{"version":3,"file":"flicking.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 9c2a9cf5b281d3dcb10a","webpack:///src/browser.js","webpack:///src/consts.js","webpack:///src/index.js","webpack:///src/Flicking.js","webpack:///external {\"commonjs\":\"@egjs/component\",\"commonjs2\":\"@egjs/component\",\"amd\":\"@egjs/component\",\"root\":[\"eg\",\"Component\"]}","webpack:///external {\"commonjs\":\"@egjs/axes\",\"commonjs2\":\"@egjs/axes\",\"amd\":\"@egjs/axes\",\"root\":[\"eg\",\"Axes\"]}","webpack:///src/utils.js","webpack:///src/config.js","webpack:///src/eventHandler.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@egjs/component\"), require(\"@egjs/axes\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flicking\", [\"@egjs/component\", \"@egjs/axes\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flicking\"] = factory(require(\"@egjs/component\"), require(\"@egjs/axes\"));\n\telse\n\t\troot[\"eg\"] = root[\"eg\"] || {}, root[\"eg\"][\"Flicking\"] = factory(root[\"eg\"][\"Component\"], root[\"eg\"][\"Axes\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_5__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9c2a9cf5b281d3dcb10a","/**\r\n * Copyright (c) 2015 NAVER Corp.\r\n * egjs projects are licensed under the MIT license\r\n */\r\n/* eslint-disable no-new-func, no-nested-ternary */\r\nconst win = typeof window !== \"undefined\" &&\r\n\twindow.Math === Math ? window : (\r\n\t\ttypeof self !== \"undefined\" && (\r\n\t\t\tself.Math === Math ? self : Function(\"return this\")()\r\n\t\t)\r\n\t);\r\n/* eslint-enable no-new-func, no-nested-ternary */\r\n\r\nconst document = win.document;\r\n\r\nexport {\r\n\twin as window,\r\n\tdocument\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// src/browser.js","/**\r\n * Copyright (c) 2015 NAVER Corp.\r\n * egjs projects are licensed under the MIT license\r\n */\r\nimport {window as global, document as doc} from \"./browser\";\r\n\r\n// define custom events name\r\nconst EVENTS = {\r\n\tbeforeFlickStart: \"beforeFlickStart\",\r\n\tbeforeRestore: \"beforeRestore\",\r\n\tflick: \"flick\",\r\n\tflickEnd: \"flickEnd\",\r\n\trestore: \"restore\"\r\n};\r\n\r\n// check for the transform property\r\nconst TRANSFORM = {\r\n\tname: \"transform\"\r\n};\r\n\r\nTRANSFORM.support = (() => {\r\n\tconst style = doc.documentElement.style;\r\n\r\n\treturn TRANSFORM.name in style || (TRANSFORM.name = \"webkitTransform\") in style;\r\n})();\r\n\r\n// check for will-change support\r\nconst SUPPORT_WILLCHANGE = global.CSS && global.CSS.supports &&\r\n\tglobal.CSS.supports(\"will-change\", \"transform\");\r\n\r\n// check for Android 2.x\r\nconst IS_ANDROID2 = /Android 2\\./.test(navigator.userAgent);\r\n\r\n// data-height attribute's name for adaptiveHeight option\r\nconst DATA_HEIGHT = \"data-height\";\r\n\r\nexport {\r\n\tEVENTS,\r\n\tTRANSFORM,\r\n\tSUPPORT_WILLCHANGE,\r\n\tIS_ANDROID2,\r\n\tDATA_HEIGHT\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// src/consts.js","/**\r\n * Copyright (c) 2015 NAVER Corp.\r\n * egjs projects are licensed under the MIT license\r\n */\r\nimport Flicking from \"./Flicking\";\r\n\r\nFlicking.VERSION = \"2.1.0\";\r\nmodule.exports = Flicking;\r\n\n\n\n// WEBPACK FOOTER //\n// src/index.js","/**\r\n * Copyright (c) 2015 NAVER Corp.\r\n * egjs projects are licensed under the MIT license\r\n */\r\nimport Component from \"@egjs/component\";\r\nimport Axes from \"@egjs/axes\";\r\nimport {utils, Mixin} from \"./utils\";\r\nimport * as consts from \"./consts\";\r\nimport {CONFIG, OPTIONS} from \"./config\";\r\nimport {document} from \"./browser\";\r\nimport eventHandler from \"./eventHandler\";\r\n\r\n/**\r\n * A module used to implement flicking interactions. With this module, you can make flicking gestures, which are ways to navigate left and right to move between panels arranged side by side.\r\n * @ko 플리킹 UI를 구현하는 모듈. 나란히 배치한 패널을 쓸어 넘겨 다음 패널이나 이전 패널로 이동하는 플리킹 UI를 만들 수 있다.\r\n * @alias eg.Flicking\r\n * @extends eg.Component\r\n *\r\n * @support {\"ie\": \"10+\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\" , \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"2.3+ (except 3.x)\"}\r\n */\r\nexport default class Flicking extends Mixin(Component).with(eventHandler) {\r\n\t/**\r\n\t* Constructor\r\n\t* @param {HTMLElement|String|jQuery} element A base element for the eg.Flicking module eg.Flicking 모듈을 사용할 기준 엘리먼트\r\n\t* @param {Object} options The option object of the eg.Flicking moduleeg.Flicking 모듈의 옵션 객체\r\n\t* @param {Boolean} [options.hwAccelerable=eg.isHWAccelerable()] Force hardware compositing 하드웨어 가속 사용 여부\r\n\t* @param {String} [options.prefix=eg-flick] A prefix for class names of the panel elements 패널 엘리먼트의 클래스 이름에 설정할 접두사\r\n\t* @param {Number} [options.deceleration=0.0006] Deceleration of the animation where acceleration is manually enabled by user. A higher value indicates shorter running time 사용자의 동작으로 가속도가 적용된 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아진다\r\n\t* @param {Boolean} [options.horizontal=true] Direction of the panel movement (true: horizontal, false: vertical) 패널 이동 방향 (true 가로방향, false 세로방향)\r\n\t* @param {Boolean} [options.circular=false] Indicates whether a circular panel is available 패널 순환 여부\r\n\t* @param {Number|Array} [options.previewPadding=[0,0]] The preview size for the previous or next panel. If direction is set to \"horizontal\", the preview section will be displayed on the left and right of the panel. If direction is set to \"vertical\", it will be displayed on the top and bottom of the panel 이전 패널과 다음 패널을 미리 보는 영역의 크기. 패널 이동 방향이 가로 방향이면 패널 왼쪽과 오른쪽에 미리 보는 영역이 나타난다. 패널 이동 방향이 세로 방향이면 패널 위쪽과 아래쪽에 미리 보는 영역이 나타난다\r\n\t* @param {Number|Array} [options.bounce=[10,10]] −\tThe size of bouncing area. If a panel is set to \"non-circulable\", the start and end panels can exceed the base element area and move further as much as the bouncing area. If a panel is dragged to the bouncing area and then dropped, the panel where bouncing effects are applied is retuned back into the base element area. 바운스 영역의 크기. 패널이 순환하지 않도록 설정됐다면 시작 패널과 마지막 패널은 기준 엘리먼트 영역을 넘어 바운스 영역의 크기만큼 더 이동할 수 있다. 패널을 바운스 영역까지 끌었다가 놓으면, 바운스 효과가 적용된 패널이 다시 기준 엘리먼트 영역 안으로 들어온다\r\n\t* @param {Number} [options.threshold=40] Distance threshold. If the drag exceeds the threshold value, it will be changed to the next panel 다음 패널로 바뀌는 기준 이동 거리. 패널을 기준 이동 거리 이상 끌었다 놓으면 패널이 다음 패널로 바뀐다\r\n\t* @param {Number} [options.duration=100] Duration of the panel movement (unit: ms) 패널 이동 애니메이션 진행 시간(단위: ms)\r\n\t* @param {Function} [options.panelEffect=easeOutCubic] The easing function to apply to a panel moving animation 패널 이동 애니메이션에 적용할 easing 함수\r\n\t* @param {Number} [options.defaultIndex=0] The index number of a panel to be selected upon module initialization 모듈이 초기화될 때 선택할 패널의 인덱스 번호\r\n\t* @param {Array} [options.inputType] Types of input devices.
- touch: A touch screen can be used to move a panel.
- mouse: A mouse can be used to move a panel. 입력 장치 종류.
- touch: 터치 입력 장치로 패널을 이동할 수 있다.
- mouse: 마우스로 패널을 이동할 수 있다.\r\n\t* @param {Number} [options.thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) 사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90)\r\n\t* @param {Boolean} [options.adaptiveHeight=false] Set container's height be adaptive according panel's height.
(Note: on Android 4.1.x stock browser, has rendering bug which not correctly render height value on panel with single node. To avoid just append another empty node at the end.)컨테이너 영역이 패널의 높이값에 따라 변경될지 여부
(참고: Android 4.1.x 스톡 브라우저에서 단일 노드로 구성된 패널의 높이값 변경이 제대로 렌더링 되지 않는 버그가 있음. 비어있는 노드를 추가하면 해결이 가능하다.)\r\n\t*\r\n * @see Easing Functions Cheat Sheet {@link http://easings.net/}\r\n * @see If you want to try a different easing function, use the jQuery easing plugin ({@link http://gsgd.co.uk/sandbox/jquery/easing}) or the jQuery UI easing library ({@link https://jqueryui.com/easing}). 다른 easing 함수를 사용하려면 jQuery easing 플러그인({@link http://gsgd.co.uk/sandbox/jquery/easing})이나, jQuery UI easing 라이브러리({@link https://jqueryui.com/easing})를 사용한다\r\n\t*/\r\n\tconstructor(element, options, _prefix) {\r\n\t\tsuper();\r\n\r\n\t\tthis.$wrapper = utils.$(element);\r\n\t\tconst $children = this.$wrapper && this.$wrapper.children;\r\n\r\n\t\tif (!this.$wrapper || !$children || !$children.length) {\r\n\t\t\t// eslint-disable validateLineBreaks, maximumLineLength\r\n\t\t\tthrow new Error(\"Given base element doesn't exist or it hasn't proper DOM structure to be initialized.\");\r\n\r\n\t\t\t// eslint-enable validateLineBreaks, maximumLineLength\r\n\t\t}\r\n\r\n\t\tthis._setOptions(options);\r\n\t\tthis._setConfig($children, _prefix);\r\n\r\n\t\t!utils.hasClickBug() && (this._setPointerEvents = () => {});\r\n\r\n\t\tthis._build();\r\n\t\tthis._bindEvents(true);\r\n\r\n\t\tthis._applyPanelsCss();\r\n\t\tthis._arrangePanels();\r\n\r\n\t\tthis.options.hwAccelerable && consts.SUPPORT_WILLCHANGE && this._setHint();\r\n\t\tthis.options.adaptiveHeight && this._setAdaptiveHeight();\r\n\r\n\t\tthis._adjustContainerCss(\"end\");\r\n\t}\r\n\r\n\t/**\r\n\t * Set options values\r\n\t * @param {Object} options\r\n\t */\r\n\t_setOptions(options) {\r\n\t\t// default value of previewPadding and bounce\r\n\t\tconst arrVal = {\r\n\t\t\tpreviewPadding: [0, 0],\r\n\t\t\tbounce: [10, 10]\r\n\t\t};\r\n\r\n\t\tthis.options = utils.extend(utils.extend({}, OPTIONS), arrVal, options);\r\n\r\n\t\tfor (const key in arrVal) {\r\n\t\t\tlet val = this.options[key];\r\n\r\n\t\t\tif (typeof val === \"number\") {\r\n\t\t\t\tval = [val, val];\r\n\t\t\t} else if (!utils.isArray(val)) {\r\n\t\t\t\tval = arrVal[key];\r\n\t\t\t}\r\n\r\n\t\t\tthis.options[key] = val;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set config values\r\n\t * @param {HTMLCollection} $children wrappers' children elements\r\n\t * @param {String} _prefix event prefix\r\n\t * @return {HTMLElement}\r\n\t */\r\n\t_setConfig($children, _prefix) {\r\n\t\tconst options = this.options;\r\n\t\tconst padding = options.previewPadding;\r\n\t\tlet $nodes = $children;\r\n\r\n\t\tif (utils.classList($nodes[0], `${options.prefix}-container`)) {\r\n\t\t\t$nodes = $nodes[0];\r\n\t\t\tthis.$container = $nodes;\r\n\t\t\t$nodes = $nodes.children;\r\n\t\t}\r\n\r\n\t\t// convert to array\r\n\t\t$nodes = [].slice.call($nodes);\r\n\r\n\t\t// config value\r\n\t\tconst conf = this._conf = utils.extend(utils.extend({}, CONFIG), {\r\n\t\t\tpanel: {\r\n\t\t\t\t$list: $nodes,\r\n\t\t\t\tminCount: padding[0] + padding[1] > 0 ? 5 : 3 // minimum panel count\r\n\t\t\t},\r\n\t\t\t// remember original class and inline style in case of restoration on destroy()\r\n\t\t\torigPanelStyle: {\r\n\t\t\t\twrapper: {\r\n\t\t\t\t\tclassName: this.$wrapper.getAttribute(\"class\") || null,\r\n\t\t\t\t\tstyle: this.$wrapper.getAttribute(\"style\") || null\r\n\t\t\t\t},\r\n\t\t\t\tcontainer: {\r\n\t\t\t\t\tclassName: (this.$container && this.$container.getAttribute(\"class\")) || null,\r\n\t\t\t\t\tstyle: (this.$container && this.$container.getAttribute(\"style\")) || null\r\n\t\t\t\t},\r\n\t\t\t\tlist: $nodes.map(v => ({\r\n\t\t\t\t\tclassName: v.getAttribute(\"class\") || null,\r\n\t\t\t\t\tstyle: v.getAttribute(\"style\") || null\r\n\t\t\t\t}))\r\n\t\t\t},\r\n\t\t\tuseLayerHack: options.hwAccelerable && !consts.SUPPORT_WILLCHANGE,\r\n\t\t\teventPrefix: _prefix || \"\"\r\n\t\t});\r\n\r\n\t\t[[\"LEFT\", \"RIGHT\"], [\"UP\", \"DOWN\"]][+!options.horizontal]\r\n\t\t\t.forEach(v => conf.dirData.push(Axes[`DIRECTION_${v}`]));\r\n\t}\r\n\r\n\t/**\r\n\t * Build and set panel nodes to make flicking structure\r\n\t */\r\n\t_build() {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst options = this.options;\r\n\t\tconst $children = panel.$list;\r\n\t\tconst padding = options.previewPadding.concat();\r\n\t\tconst prefix = options.prefix;\r\n\t\tconst horizontal = options.horizontal;\r\n\t\tlet panelCount = panel.count = panel.origCount = $children.length;\r\n\t\tconst bounce = options.bounce;\r\n\r\n\t\tthis._setPadding(padding, true);\r\n\t\tconst sizeValue = this._getDataByDirection([panel.size, \"100%\"]);\r\n\r\n\t\t// container element style\r\n\t\tconst cssValue = {\r\n\t\t\tposition: \"relative\",\r\n\t\t\tzIndex: 2000,\r\n\t\t\twidth: \"100%\",\r\n\t\t\theight: \"100%\"\r\n\t\t};\r\n\r\n\t\thorizontal && (cssValue.top = \"0px\");\r\n\r\n\t\tif (this.$container) {\r\n\t\t\tutils.css(this.$container, cssValue);\r\n\t\t} else {\r\n\t\t\tconst $parent = $children[0].parentNode;\r\n\t\t\tconst $container = document.createElement(\"div\");\r\n\r\n\t\t\t$container.className = `${prefix}-container`;\r\n\t\t\tutils.css($container, cssValue);\r\n\r\n\t\t\t$children.forEach(v => $container.appendChild(v));\r\n\r\n\t\t\t$parent.appendChild($container);\r\n\t\t\tthis.$container = $container;\r\n\t\t}\r\n\r\n\t\t// panels' css values\r\n\t\t$children.forEach(v => {\r\n\t\t\tutils.classList(v, `${prefix}-panel`, true);\r\n\r\n\t\t\tutils.css(v, {\r\n\t\t\t\tposition: \"absolute\",\r\n\t\t\t\twidth: utils.getUnitValue(sizeValue[0]),\r\n\t\t\t\theight: utils.getUnitValue(sizeValue[1]),\r\n\t\t\t\tboxSizing: \"border-box\",\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tleft: 0\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tif (this._addClonePanels()) {\r\n\t\t\tpanelCount = panel.count = (\r\n\t\t\t\tpanel.$list = [].slice.call(this.$container.children)\r\n\t\t\t).length;\r\n\t\t}\r\n\r\n\t\t// create Axes instance\r\n\t\tthis._axesInst = new Axes({\r\n\t\t\tflick: {\r\n\t\t\t\trange: [0, panel.size * (panelCount - 1)],\r\n\t\t\t\tbounce\r\n\t\t\t}\r\n\t\t}, {\r\n\t\t\teasing: options.panelEffect,\r\n\t\t\tdeceleration: options.deceleration,\r\n\t\t\tinterruptable: false\r\n\t\t});\r\n\r\n\t\tthis._setDefaultPanel(options.defaultIndex);\r\n\t}\r\n\r\n\t/**\r\n\t * Set preview padding value\r\n\t * @param {Array} padding\r\n\t * @param {Boolean} build\r\n\t */\r\n\t_setPadding(padding, build) {\r\n\t\tconst horizontal = this.options.horizontal;\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst paddingSum = padding[0] + padding[1];\r\n\t\tconst cssValue = {};\r\n\r\n\t\tif (paddingSum || !build) {\r\n\t\t\tcssValue.padding = horizontal ?\r\n\t\t\t\t`0 ${padding.reverse().join(\"px 0 \")}px` :\r\n\t\t\t\t`${padding.join(\"px 0 \")}px`;\r\n\t\t}\r\n\r\n\t\tif (build) {\r\n\t\t\tcssValue.overflow = \"hidden\";\r\n\t\t\tcssValue.boxSizing = \"border-box\";\r\n\t\t}\r\n\r\n\t\tObject.keys(cssValue).length &&\r\n\t\t\tutils.css(this.$wrapper, cssValue);\r\n\r\n\t\tconst wrapperStyle = getComputedStyle(this.$wrapper);\r\n\t\tconst paddingType = horizontal ? [\"Left\", \"Right\"] : [\"Top\", \"Bottom\"];\r\n\t\tconst wrapperSize = Math.max(\r\n\t\t\tthis.$wrapper[`offset${horizontal ? \"Width\" : \"Height\"}`],\r\n\t\t\tutils.getNumValue(wrapperStyle[horizontal ? \"width\" : \"height\"])\r\n\t\t);\r\n\r\n\t\tpanel.size = wrapperSize - (\r\n\t\t\tutils.getNumValue(wrapperStyle[`padding${paddingType[0]}`]) +\r\n\t\t\tutils.getNumValue(wrapperStyle[`padding${paddingType[1]}`])\r\n\t\t);\r\n\t}\r\n\r\n\t/**\r\n\t * To fulfill minimum panel count cloning original node when circular or previewPadding option are set\r\n\t * @return {Boolean} true : added clone node, false : not added\r\n\t */\r\n\t_addClonePanels() {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst panelCount = panel.origCount;\r\n\t\tconst cloneCount = panel.minCount - panelCount;\r\n\t\tconst list = panel.$list;\r\n\t\tlet cloneNodes;\r\n\r\n\t\t// if panels are given less than required when circular option is set, then clone node to apply circular mode\r\n\t\tif (this.options.circular && panelCount < panel.minCount) {\r\n\t\t\tcloneNodes = list.map(v => v.cloneNode(true));\r\n\r\n\t\t\twhile (cloneNodes.length < cloneCount) {\r\n\t\t\t\tcloneNodes = cloneNodes.concat(\r\n\t\t\t\t\tlist.map(v => v.cloneNode(true))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tcloneNodes.forEach(v => this.$container.appendChild(v));\r\n\r\n\t\t\treturn !!cloneNodes.length;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\t/**\r\n\t * Move panel's position within array\r\n\t * @param {Number} count element counts to move\r\n\t * @param {Boolean} append where the list to be appended(moved) (true: to the end, false: to the beginning)\r\n\t */\r\n\t_movePanelPosition(count, append) {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst list = panel.$list;\r\n\t\tconst listToMove = list.splice(append ? 0 : panel.count - count, count);\r\n\r\n\t\tpanel.$list = append ?\r\n\t\t\tlist.concat(listToMove) :\r\n\t\t\tlistToMove.concat(list);\r\n\t}\r\n\r\n\t/**\r\n\t * Set default panel to show\r\n\t * @param {Number} index\r\n\t */\r\n\t_setDefaultPanel(index) {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst lastIndex = panel.count - 1;\r\n\t\tlet coords;\r\n\t\tlet baseIndex;\r\n\r\n\t\tif (this.options.circular) {\r\n\t\t\t// if default index is given, then move correspond panel to the first position\r\n\t\t\tif (index > 0 && index <= lastIndex) {\r\n\t\t\t\tthis._movePanelPosition(index, true);\r\n\t\t\t}\r\n\r\n\t\t\t// set first panel's position according physical node length\r\n\t\t\tbaseIndex = this._getBasePositionIndex();\r\n\t\t\tthis._movePanelPosition(baseIndex, false);\r\n\r\n\t\t\tthis._setPanelNo({\r\n\t\t\t\tno: index,\r\n\t\t\t\tcurrNo: index\r\n\t\t\t});\r\n\t\t\t// if defaultIndex option is given, then move to that index panel\r\n\t\t} else if (index > 0 && index <= lastIndex) {\r\n\t\t\tthis._setPanelNo({\r\n\t\t\t\tindex,\r\n\t\t\t\tno: index,\r\n\t\t\t\tcurrIndex: index,\r\n\t\t\t\tcurrNo: index\r\n\t\t\t});\r\n\r\n\t\t\tcoords = [-(panel.size * index), 0];\r\n\r\n\t\t\tthis._setTranslate(coords);\r\n\t\t\tthis._setAxes(\"setTo\", Math.abs(coords[0]), 0);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Arrange panels' position\r\n\t * @param {Boolean} sort Need to sort panel's position\r\n\t * @param {Number} indexToMove Number to move from current position (negative: left, positive: right)\r\n\t */\r\n\t_arrangePanels(sort, indexToMove) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst panel = conf.panel;\r\n\t\tconst touch = conf.touch;\r\n\t\tconst dirData = conf.dirData;\r\n\t\tlet baseIndex;\r\n\r\n\t\tif (this.options.circular) {\r\n\t\t\t// when arranging panels, set flag to not trigger flick custom event\r\n\t\t\tconf.customEvent.flick = false;\r\n\r\n\t\t\t// move elements according direction\r\n\t\t\tif (sort) {\r\n\t\t\t\tindexToMove && (touch.direction = dirData[+!(indexToMove > 0)]);\r\n\t\t\t\tthis._arrangePanelPosition(touch.direction, indexToMove);\r\n\t\t\t}\r\n\r\n\t\t\t// set index for base element's position\r\n\t\t\tbaseIndex = this._getBasePositionIndex();\r\n\r\n\t\t\tthis._setPanelNo({\r\n\t\t\t\tindex: baseIndex,\r\n\t\t\t\tcurrIndex: baseIndex\r\n\t\t\t});\r\n\r\n\t\t\t// arrange Axes' coord position\r\n\t\t\tconf.customEvent.flick = !!this._setAxes(\"setTo\", panel.size * panel.index, 0);\r\n\t\t}\r\n\r\n\t\tthis._applyPanelsPos();\r\n\t}\r\n\r\n\t/**\r\n\t * Set each panel's position in DOM\r\n\t */\r\n\t_applyPanelsPos() {\r\n\t\tthis._conf.panel.$list.forEach(this._applyPanelsCss.bind(this));\r\n\t}\r\n\r\n\t/**\r\n\t * Set CSS style values to move elements\r\n\t *\r\n\t * Initialize setting up checking if browser support transform css property.\r\n\t * If browser doesn't support transform, then use left/top properties instead.\r\n\t * @param {HTMLElement} $el\r\n\t * @param {Array} coordsValue\r\n\t */\r\n\t_setMoveStyle($el, coordsValue) {\r\n\t\tconst transform = consts.TRANSFORM;\r\n\r\n\t\tthis._setMoveStyle = transform.support ?\r\n\t\t\tfunction($element, coords) {\r\n\t\t\t\tutils.css($element, {\r\n\t\t\t\t\t[transform.name]: utils.translate(coords[0], coords[1], this._conf.useLayerHack)\r\n\t\t\t\t});\r\n\t\t\t} : ($element, coords) => {\r\n\t\t\t\tutils.css($element, {left: coords[0], top: coords[1]});\r\n\t\t\t};\r\n\r\n\t\tthis._setMoveStyle($el, coordsValue);\r\n\t}\r\n\r\n\t/**\r\n\t * Callback function for applying CSS values to each panels\r\n\t * Need to be initialized before use, to set up for Android 2.x browsers or others.\r\n\t */\r\n\t_applyPanelsCss() {\r\n\t\tconst conf = this._conf;\r\n\t\tconst dummyAnchorClassName = \"__dummy_anchor\";\r\n\r\n\t\tif (consts.IS_ANDROID2) {\r\n\t\t\tconf.$dummyAnchor = utils.$(`.${dummyAnchorClassName}`);\r\n\r\n\t\t\t!conf.$dummyAnchor && this.$wrapper.appendChild(\r\n\t\t\t\tconf.$dummyAnchor = utils.$(``)\r\n\t\t\t);\r\n\r\n\t\t\tthis._applyPanelsCss = function applyCss(v, i) {\r\n\t\t\t\tconst coords = this._getDataByDirection(\r\n\t\t\t\t\t[`${this._conf.panel.size * i}px`, 0]\r\n\t\t\t\t);\r\n\r\n\t\t\t\tutils.css(v, {\r\n\t\t\t\t\tleft: coords[0],\r\n\t\t\t\t\ttop: coords[1]\r\n\t\t\t\t});\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tthis._applyPanelsCss = function applyCss(v, i) {\r\n\t\t\t\tconst coords = this._getDataByDirection([\r\n\t\t\t\t\tconsts.TRANSFORM.support ?\r\n\t\t\t\t\t\t`${100 * i}%` :\r\n\t\t\t\t\t\t`${this._conf.panel.size * i}px`, 0\r\n\t\t\t\t]);\r\n\r\n\t\t\t\tthis._setMoveStyle(v, coords);\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Adjust container's css value to handle Android 2.x link highlighting bug\r\n\t * @param {String} phase\r\n\t * start - set left/top value to 0\r\n\t * end - set translate value to 0\r\n\t * @param {Array} toValue coordinate value\r\n\t */\r\n\t_adjustContainerCss(phase, toValue) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst panel = conf.panel;\r\n\t\tconst options = this.options;\r\n\t\tconst horizontal = options.horizontal;\r\n\t\tconst paddingTop = options.previewPadding[0];\r\n\t\tlet container = this.$container;\r\n\t\tlet to = toValue;\r\n\t\tlet value;\r\n\r\n\t\tif (consts.IS_ANDROID2) {\r\n\t\t\tif (!to) {\r\n\t\t\t\tto = -panel.size * panel.index;\r\n\t\t\t}\r\n\r\n\t\t\tif (phase === \"start\") {\r\n\t\t\t\tcontainer = container.style;\r\n\t\t\t\tvalue = parseInt(container[horizontal ? \"left\" : \"top\"], 10);\r\n\r\n\t\t\t\tif (horizontal) {\r\n\t\t\t\t\tvalue && (container.left = \"0px\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalue !== paddingTop && (container.top = \"0px\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._setTranslate([-to, 0]);\r\n\t\t\t} else if (phase === \"end\") {\r\n\t\t\t\tto = this._getCoordsValue([to, 0]);\r\n\r\n\t\t\t\tutils.css(container, {\r\n\t\t\t\t\tleft: to.x,\r\n\t\t\t\t\ttop: to.y,\r\n\t\t\t\t\t[consts.TRANSFORM.name]: utils.translate(0, 0, conf.useLayerHack)\r\n\t\t\t\t});\r\n\r\n\t\t\t\tconf.$dummyAnchor.focus();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set Axes coord value\r\n\t * @param {String} method\r\n\t * @param {Number} flick destination value\r\n\t * @param {Number} duration\r\n\t * @return {eg.Axes} Axes instance\r\n\t */\r\n\t_setAxes(method, flick, duration) {\r\n\t\treturn this._axesInst[method]({flick}, duration);\r\n\t}\r\n\r\n\t/**\r\n\t * Set hint for browser to decide efficient way of doing transform changes(or animation)\r\n\t * https://dev.opera.com/articles/css-will-change-property/\r\n\t */\r\n\t_setHint() {\r\n\t\tconst style = {willChange: \"transform\"};\r\n\r\n\t\tutils.css(this.$container, style);\r\n\t\tutils.css(this._conf.panel.$list, style);\r\n\t}\r\n\r\n\t/**\r\n\t * Get data according options.horizontal value\r\n\t * @param {Array} value primary data to handle\r\n\t * @return {Array}\r\n\t */\r\n\t_getDataByDirection(value) {\r\n\t\tconst data = value.concat();\r\n\r\n\t\t!this.options.horizontal && data.reverse();\r\n\t\treturn data;\r\n\t}\r\n\r\n\t/**\r\n\t * Move nodes\r\n\t * @param {Boolean} direction\r\n\t * @param {Number} indexToMove\r\n\t */\r\n\t_arrangePanelPosition(direction, indexToMove) {\r\n\t\tconst next = direction === this._conf.dirData[0];\r\n\r\n\t\tthis._movePanelPosition(Math.abs(indexToMove || 1), next);\r\n\t}\r\n\r\n\t/**\r\n\t * Get the base position index of the panel\r\n\t */\r\n\t_getBasePositionIndex() {\r\n\t\treturn Math.floor(this._conf.panel.count / 2 - 0.1);\r\n\t}\r\n\r\n\t/**\r\n\t * Bind events\r\n\t * @param {Boolean} bind\r\n\t */\r\n\t_bindEvents(bind) {\r\n\t\tconst options = this.options;\r\n\t\tconst $wrapper = this.$wrapper;\r\n\t\tconst axesInst = this._axesInst;\r\n\r\n\t\tif (bind) {\r\n\t\t\tthis._panInput = new Axes.PanInput($wrapper, {\r\n\t\t\t\tinputType: options.inputType,\r\n\t\t\t\tthresholdAngle: options.thresholdAngle,\r\n\t\t\t\tscale: this._getDataByDirection([-1, 0])\r\n\t\t\t});\r\n\r\n\t\t\taxesInst.on({\r\n\t\t\t\thold: this._holdHandler.bind(this),\r\n\t\t\t\tchange: this._changeHandler.bind(this),\r\n\t\t\t\trelease: this._releaseHandler.bind(this),\r\n\t\t\t\tanimationStart: this._animationStartHandler.bind(this),\r\n\t\t\t\tanimationEnd: this._animationEndHandler.bind(this)\r\n\t\t\t}).connect(this._getDataByDirection([\"flick\", \"\"]), this._panInput);\r\n\t\t} else {\r\n\t\t\tthis.disableInput();\r\n\t\t\taxesInst.off();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set container's height value according to children's height\r\n\t * @param {Number} direction\r\n\t */\r\n\t_setAdaptiveHeight(direction) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst indexToMove = conf.indexToMove;\r\n\t\tlet $children;\r\n\t\tlet height;\r\n\r\n\t\tconst $panel = indexToMove === 0 ?\r\n\r\n\t\t\t// panel moved by 1\r\n\t\t\tthis[`get${\r\n\t\t\t\t(direction === Axes.DIRECTION_LEFT && \"Next\") ||\r\n\t\t\t\t(direction === Axes.DIRECTION_RIGHT && \"Prev\") || \"\"\r\n\t\t\t}Element`]() :\r\n\r\n\t\t\t// panel moved by .moveTo()\r\n\t\t\tconf.panel.$list[\r\n\t\t\t\tconf.panel.currIndex + indexToMove\r\n\t\t\t];\r\n\r\n\t\tconst $first = $panel.querySelector(\":first-child\");\r\n\r\n\t\tif ($first) {\r\n\t\t\theight = $first.getAttribute(consts.DATA_HEIGHT);\r\n\r\n\t\t\tif (!height) {\r\n\t\t\t\t$children = $panel.children;\r\n\r\n\t\t\t\theight = utils.outerHeight(\r\n\t\t\t\t\t$children.length > 1 ? ($panel.style.height = \"auto\", $panel) : $first\r\n\t\t\t\t);\r\n\r\n\t\t\t\theight > 0 && $first.setAttribute(consts.DATA_HEIGHT, height);\r\n\t\t\t}\r\n\r\n\t\t\theight > 0 && (this.$wrapper.style.height = `${height}px`);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Trigger beforeRestore event\r\n\t * @param {Object} e event object\r\n\t */\r\n\t_triggerBeforeRestore(e) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst touch = conf.touch;\r\n\r\n\t\t// reverse direction value when restore\r\n\t\ttouch.direction = +conf.dirData.join(\"\").replace(touch.direction, \"\");\r\n\r\n\t\t/**\r\n\t\t * This event is fired before an element is restored to its original position when user action is done while the element is not dragged until a certain distance threshold is reached\r\n\t\t * @ko 다음 패널로 바뀌는 기준 이동 거리만큼 이동하기 전에 사용자의 동작이 끝났을 때 원래 패널로 복원되기 전에 발생하는 이벤트\r\n\t\t * @name eg.Flicking#beforeRestore\r\n\t\t * @event\r\n\t\t * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\r\n\t\t * @param {String} param.eventType The name of the event 이름명\r\n\t\t * @param {Boolean} param.isTrusted true when the event was generated by a user action otherwise false사용자의 액션으로 인해 이벤트가 생성된 경우, true. 그 외는 false\r\n\t\t * @param {Number} param.index Physical index number of the current panel element, which is relative to DOM. (@deprecated since 1.3.0)현재 패널 엘리먼트의 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다. (@deprecated since 1.3.0)\r\n\t\t * @param {Number} param.no Logical index number of the current panel element, which is relative to the panel content.현재 패널 엘리먼트의 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다\r\n\t\t * @param {Number} param.direction Direction of the movement (see eg.Flicking.DIRECTION_* constant) 이동 방향(eg.Flicking.DIRECTION_* constant 참고)\r\n\t\t * @param {Number} param.depaPos starting coordinate 출발점 좌표\r\n\t\t * @param {Number} param.destPos destination coordinate 도착점 좌표\r\n\t\t */\r\n\t\tconf.customEvent.restore = this._triggerEvent(consts.EVENTS.beforeRestore, {\r\n\t\t\tdepaPos: e.depaPos.flick,\r\n\t\t\tdestPos: e.destPos.flick\r\n\t\t});\r\n\r\n\t\tif (!conf.customEvent.restore) {\r\n\t\t\t\"stop\" in e && e.stop();\r\n\t\t\tconf.panel.animating = false;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Trigger restore event\r\n\t */\r\n\t_triggerRestore() {\r\n\t\tconst customEvent = this._conf.customEvent;\r\n\r\n\t\t/**\r\n\t\t * This event is fired after an element is restored to its original position when user action is done while the element is not dragged until a certain distance threshold is reached.\r\n\t\t * @ko 다음 패널로 바뀌는 기준 이동 거리만큼 이동하기 전에 사용자의 동작이 끝났을 때 원래 패널로 복원된 다음 발생하는 이벤트\r\n\t\t * @name eg.Flicking#restore\r\n\t\t * @event\r\n\t\t * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\r\n\t\t * @param {String} param.eventType The name of the event 이름명\r\n\t\t * @param {Boolean} param.isTrusted true when the event was generated by a user action otherwise false사용자의 액션으로 인해 이벤트가 생성된 경우, true. 그 외는 false\r\n\t\t * @param {Number} param.index Physical index number of the current panel element, which is relative to DOM(@deprecated since 1.3.0)현재 패널 엘리먼트의 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다 (@deprecated since 1.3.0)\r\n\t\t * @param {Number} param.no Logical index number of the current panel element, which is relative to the panel content. 현재 패널 엘리먼트의 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다\r\n\t\t * @param {Number} param.direction Direction of the panel move (see eg.Flicking.DIRECTION_* constant) 이동 방향(eg.Flicking.DIRECTION_* constant 참고)\r\n\t\t */\r\n\t\tcustomEvent.restore && this._triggerEvent(consts.EVENTS.restore);\r\n\t\tcustomEvent.restore = customEvent.restoreCall = false;\r\n\t}\r\n\r\n\t/**\r\n\t * Set value when panel changes\r\n\t * @param {String} phase - [start|end]\r\n\t * @param {Object} pos\r\n\t */\r\n\t_setPhaseValue(phase, pos) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst options = this.options;\r\n\t\tconst panel = conf.panel;\r\n\r\n\t\tif (phase === \"start\" && (panel.changed = this._isMovable())) {\r\n\t\t\t/**\r\n\t\t\t * This event is fired before flicking starts\r\n\t\t\t * @ko 플리킹이 시작하기 전에 발생하는 이벤트\r\n\t\t\t * @name eg.Flicking#beforeFlickStart\r\n\t\t\t * @event\r\n\t\t\t * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\r\n\t\t\t * @param {String} param.eventType The name of the event 이름명\r\n\t\t\t * @param {Boolean} param.isTrusted true when the event was generated by a user action otherwise false사용자의 액션으로 인해 이벤트가 생성된 경우, true. 그 외는 false\r\n\t\t\t * @param {Number} param.index Physical index number of the current panel element, which is relative to DOM. (@deprecated since 1.3.0)현재 패널 엘리먼트의 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다 (@deprecated since 1.3.0)\r\n\t\t\t * @param {Number} param.no Logical index number of the current panel element, which is relative to the panel content.현재 패널 엘리먼트의 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다\r\n\t\t\t * @param {Number} param.direction Direction of the movement (see eg.Flicking.DIRECTION_* constant) −\t이동 방향(eg.Flicking.DIRECTION_* constant 참고)\r\n\t\t\t * @param {Number} param.depaPos starting coordinate 출발점 좌표\r\n\t\t\t * @param {Number} param.destPos destination coordinate 도착점 좌표\r\n\t\t\t */\r\n\t\t\tif (!this._triggerEvent(consts.EVENTS.beforeFlickStart, pos)) {\r\n\t\t\t\tpanel.changed = panel.animating = false;\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\toptions.adaptiveHeight && this._setAdaptiveHeight(conf.touch.direction);\r\n\t\t\t}\r\n\r\n\t\t\tconf.indexToMove === 0 && this._setPanelNo();\r\n\t\t} else if (phase === \"end\") {\r\n\t\t\tif (options.circular && panel.changed) {\r\n\t\t\t\tthis._arrangePanels(true, conf.indexToMove);\r\n\t\t\t}\r\n\r\n\t\t\t!consts.IS_ANDROID2 && this._setTranslate([-panel.size * panel.index, 0]);\r\n\t\t\tconf.touch.distance = conf.indexToMove = 0;\r\n\r\n\t\t\t/**\r\n\t\t\t * This event is fired after panel moves.\r\n\t\t\t * @ko 패널이 이동한 다음 발생하는 이벤트\r\n\t\t\t * @name eg.Flicking#flickEnd\r\n\t\t\t * @event\r\n\t\t\t * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\r\n\t\t\t * @param {String} param.eventType The name of the event 이름명\r\n\t\t\t * @param {Boolean} param.isTrusted true when the event was generated by a user action otherwise false사용자의 액션으로 인해 이벤트가 생성된 경우, true. 그 외는 false\r\n\t\t\t * @param {Number} param.index Physical index number of the current panel element, which is relative to DOM (@deprecated since 1.3.0)현재 패널 엘리먼트의 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다 (@deprecated since 1.3.0)\r\n\t\t\t * @param {Number} param.no Logical index number of the current panel element, which is relative to the panel content. 현재 패널 엘리먼트의 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다.\r\n\t\t\t * @param {Number} param.direction Direction of the movemen (see eg.Flicking.DIRECTION_* constant) 이동 방향(eg.Flicking.DIRECTION_* constant 참고\r\n\t\t\t */\r\n\t\t\tpanel.changed && this._triggerEvent(consts.EVENTS.flickEnd);\r\n\t\t}\r\n\r\n\t\tthis._adjustContainerCss(phase);\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * Get positive or negative according direction\r\n\t */\r\n\t_getNumByDirection() {\r\n\t\tconst conf = this._conf;\r\n\r\n\t\treturn conf.touch.direction === conf.dirData[0] ? 1 : -1;\r\n\t}\r\n\r\n\t/**\r\n\t * Revert panel number\r\n\t */\r\n\t_revertPanelNo() {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst num = this._getNumByDirection();\r\n\r\n\t\tconst index = panel.currIndex >= 0 ? panel.currIndex : panel.index - num;\r\n\t\tconst no = panel.currNo >= 0 ? panel.currNo : panel.no - num;\r\n\r\n\t\tthis._setPanelNo({\r\n\t\t\tindex,\r\n\t\t\tno\r\n\t\t});\r\n\t}\r\n\r\n\t/**\r\n\t * Set the panel number\r\n\t * @param {Object} obj number object\r\n\t */\r\n\t_setPanelNo(obj) {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst count = panel.origCount - 1;\r\n\t\tconst num = this._getNumByDirection();\r\n\r\n\t\tif (utils.isObject(obj)) {\r\n\t\t\tfor (const key in obj) {\r\n\t\t\t\tpanel[key] = obj[key];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// remember current value\r\n\t\t\tpanel.currIndex = panel.index;\r\n\t\t\tpanel.currNo = panel.no;\r\n\r\n\t\t\tpanel.index += num;\r\n\t\t\tpanel.no += num;\r\n\t\t}\r\n\r\n\t\tif (panel.no > count) {\r\n\t\t\tpanel.no = 0;\r\n\t\t} else if (panel.no < 0) {\r\n\t\t\tpanel.no = count;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Set pointerEvents css property on container element due to the iOS click bug\r\n\t * @param {Event} e\r\n\t */\r\n\t_setPointerEvents(e) {\r\n\t\tconst pointer = utils.css(this.$container, \"pointerEvents\");\r\n\t\tlet val;\r\n\r\n\t\tif (e && e.holding &&\r\n\t\t\te.inputEvent && e.inputEvent.preventSystemEvent &&\r\n\t\t\tpointer !== \"none\"\r\n\t\t) {\r\n\t\t\tval = \"none\";\r\n\t\t} else if (!e && pointer !== \"auto\") {\r\n\t\t\tval = \"auto\";\r\n\t\t}\r\n\r\n\t\tval && utils.css(this.$container, {pointerEvents: val});\r\n\t}\r\n\r\n\t/**\r\n\t * Get coordinate value with unit\r\n\t * @param coordsValue {Array} x,y numeric value\r\n\t * @return {Object} x,y coordinate value with unit\r\n\t */\r\n\t_getCoordsValue(coordsValue) {\r\n\t\t// the param comes as [ val, 0 ], whatever the direction. So reorder the value depend the direction.\r\n\t\tconst coords = this._getDataByDirection(coordsValue);\r\n\r\n\t\treturn {\r\n\t\t\tx: utils.getUnitValue(coords[0]),\r\n\t\t\ty: utils.getUnitValue(coords[1])\r\n\t\t};\r\n\t}\r\n\r\n\t/**\r\n\t * Set translate property value\r\n\t * @param {Array} coordsValue coordinate x,y value\r\n\t */\r\n\t_setTranslate(coordsValue) {\r\n\t\tconst coords = this._getCoordsValue(coordsValue);\r\n\r\n\t\tthis._setMoveStyle(this.$container, [coords.x, coords.y]);\r\n\t}\r\n\r\n\t/**\r\n\t * Check if panel passed through threshold pixel\r\n\t */\r\n\t_isMovable() {\r\n\t\tconst options = this.options;\r\n\t\tconst axesInst = this._axesInst;\r\n\t\tconst isMovable = Math.abs(this._conf.touch.distance) >= options.threshold;\r\n\t\tlet max;\r\n\t\tlet currPos;\r\n\r\n\t\tif (!options.circular && isMovable) {\r\n\t\t\tmax = axesInst.axis.flick.range[1];\r\n\t\t\tcurrPos = axesInst.get().flick;\r\n\r\n\t\t\t// if current position out of range\r\n\t\t\tif (currPos < 0 || currPos > max) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn isMovable;\r\n\t}\r\n\r\n\t/**\r\n\t * Trigger custom events\r\n\t * @param {String} name - event name\r\n\t * @param {Object} param - additional event value\r\n\t * @return {Boolean}\r\n\t */\r\n\t_triggerEvent(name, param) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst panel = conf.panel;\r\n\r\n\t\t// pass changed panel no only on 'flickEnd' event\r\n\t\tif (name === consts.EVENTS.flickEnd) {\r\n\t\t\tpanel.currNo = panel.no;\r\n\t\t\tpanel.currIndex = panel.index;\r\n\t\t}\r\n\r\n\t\treturn this.trigger(conf.eventPrefix + name, utils.extend({\r\n\t\t\teventType: name,\r\n\t\t\tindex: panel.currIndex,\r\n\t\t\tno: panel.currNo,\r\n\t\t\tdirection: conf.touch.direction,\r\n\t\t\tisTrusted: conf.touch.isTrusted\r\n\t\t}, param));\r\n\t}\r\n\r\n\t/**\r\n\t * Get next/prev panel element/index.\r\n\t * @param {Boolean} direction\r\n\t * @param {Boolean} element - true:to get element, false:to get index\r\n\t * @param {Number} physical - true : physical, false : logical\r\n\t * @return {HTMLElement|Number}\r\n\t */\r\n\t_getElement(direction, element, physical) {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst circular = this.options.circular;\r\n\t\tconst pos = panel.currIndex;\r\n\t\tconst next = direction === this._conf.dirData[0];\r\n\t\tlet result = null;\r\n\t\tlet total;\r\n\t\tlet index;\r\n\r\n\t\tif (physical) {\r\n\t\t\ttotal = panel.count;\r\n\t\t\tindex = pos;\r\n\t\t} else {\r\n\t\t\ttotal = panel.origCount;\r\n\t\t\tindex = panel.currNo;\r\n\t\t}\r\n\r\n\t\tconst currentIndex = index;\r\n\r\n\t\tif (next) {\r\n\t\t\tif (index < total - 1) {\r\n\t\t\t\tindex++;\r\n\t\t\t} else if (circular) {\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (index > 0) {\r\n\t\t\t\tindex--;\r\n\t\t\t} else if (circular) {\r\n\t\t\t\tindex = total - 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (currentIndex !== index) {\r\n\t\t\tresult = element ? panel.$list[next ? pos + 1 : pos - 1] : index;\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/**\r\n\t * Set value to force move panels when duration is 0\r\n\t * @param {Boolean} next\r\n\t */\r\n\t_setValueToMove(next) {\r\n\t\tconst conf = this._conf;\r\n\r\n\t\tconf.touch.distance = this.options.threshold + 1;\r\n\t\tconf.touch.direction = conf.dirData[+!next];\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index number of the current panel element.\r\n\t * @ko 현재 패널 엘리먼트의 인덱스 번호를 반환한다\r\n\t * @method eg.Flicking#getIndex\r\n\t * @param {Boolean} [physical=false] Types of index numbers
- true: Indicates physical index numbers relative to DOM.
- false: Indicates logical index numbers relative to the panel content. −\t인덱스 번호의 종류
- true: 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다.
- false: 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다.\r\n\t * @return {Number} Index number of the current panel element 현재 패널의 인덱스 번호\r\n\t */\r\n\tgetIndex(physical) {\r\n\t\treturn this._conf.panel[physical ? \"currIndex\" : \"currNo\"];\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the reference of the current panel element.\r\n\t * @ko 현재 패널 엘리먼트의 레퍼런스를 반환한다\r\n\t * @method eg.Flicking#getElement\r\n\t * @return {HTMLElement} Current element 현재 엘리먼트\r\n\t */\r\n\tgetElement() {\r\n\t\tconst panel = this._conf.panel;\r\n\r\n\t\treturn panel.$list[panel.currIndex];\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the reference of the next panel element.\r\n\t * @ko 다음 패널 엘리먼트의 레퍼런스를 반환한다.\r\n\t * @method eg.Flicking#getNextElement\r\n\t * @return {HTMLElement|null} Next panel element or null if it does not exist.다음 패널 엘리먼트. 패널이 없으면 'null'을 반환한다.\r\n\t */\r\n\tgetNextElement() {\r\n\t\treturn this._getElement(this._conf.dirData[0], true);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index number of the next panel element.\r\n\t * @ko 다음 패널 엘리먼트의 인덱스 번호를 반환한다\r\n\t * @method eg.Flicking#getNextIndex\r\n\t * @param {Boolean} [physical=false] Types of index numbers
- true: Indicates physical index numbers relative to DOM.
- false: Indicates logical index numbers relative to the panel content. −\t인덱스 번호의 종류
- true: 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다.
- false: 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다.\r\n\t * @return {Number|null} Index number of the next panel element or null if it does not exist. 다음 패널 엘리먼트의 인덱스 번호. 패널이 없으면 'null'을 반환한다\r\n\t */\r\n\tgetNextIndex(physical) {\r\n\t\treturn this._getElement(this._conf.dirData[0], false, physical);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the references of whole panel elements.\r\n\t * @ko 패널을 구성하는 모든 엘리먼트의 레퍼런스를 반환한다\r\n\t * @method eg.Flicking#getAllElements\r\n\t * @return {HTMLElement[]} Whole panel elements 모든 패널 엘리먼트\r\n\t */\r\n\tgetAllElements() {\r\n\t\treturn this._conf.panel.$list;\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the reference of the previous panel element.\r\n\t * @ko 이전 패널 엘리먼트의 레퍼런스를 반환한다.\r\n\t * @method eg.Flicking#getPrevElement\r\n\t * @return {HTMLElement|null} Previous panel element or null if it does not exist. 이전 패널 엘리먼트. 패널이 없으면 'null'을 반환한다\r\n\t */\r\n\tgetPrevElement() {\r\n\t\treturn this._getElement(this._conf.dirData[1], true);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the index number of the previous panel element.\r\n\t * @ko 이전 패널 엘리먼트의 인덱스 번호를 반환한다\r\n\t * @method eg.Flicking#getPrevIndex\r\n\t * @param {Boolean} [physical=false] Types of index numbers
- true: Indicates physical index numbers relative to DOM.
- false: Indicates logical index numbers relative to the panel content. −\t인덱스 번호의 종류
- true: 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다.
- false: 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다.\r\n\t * @return {Number|null} Previous element index value or null if no more element exist이전 패널 인덱스 번호. 패널이 없는 경우에는 null\r\n\t */\r\n\tgetPrevIndex(physical) {\r\n\t\treturn this._getElement(this._conf.dirData[1], false, physical);\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the total number of whole panel elements.\r\n\t * @ko 전체 패널 엘리먼트의 개수를 반환한다\r\n\t * @method eg.Flicking#getTotalCount\r\n\t * @deprecated since 1.3.0\r\n\t * @param {Boolean} [physical=false] Number of elements relative to (true: DOM, false: panel content)엘리먼트 개수의 기준(true: DOM 엘리먼트 기준, false: 패널 콘텐츠 기준)\r\n\t * @return {Number} Total number of whole panel elements 모든 패널 엘리먼트의 개수\r\n\t */\r\n\tgetTotalCount(physical) {\r\n\t\treturn this._conf.panel[physical ? \"count\" : \"origCount\"];\r\n\t}\r\n\r\n\t/**\r\n\t * Checks whether the animated panel is playing.\r\n\t * @ko 패널 이동 애니메이션이 진행 중인지 확인한다.\r\n\t * @method eg.Flicking#isPlaying\r\n\t * @return {Boolean} Indicates whether the animated panel is playing 패널 이동 애니메이션 진행 중 여부\r\n\t */\r\n\tisPlaying() {\r\n\t\treturn this._conf.panel.animating;\r\n\t}\r\n\r\n\t/**\r\n\t * Move panel to the given direction\r\n\t * @param {Boolean} next\r\n\t * @param {Number} duration\r\n\t */\r\n\t_movePanel(next, duration) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst panel = conf.panel;\r\n\t\tconst options = this.options;\r\n\r\n\t\tif (panel.animating || conf.touch.holding) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\tthis._setValueToMove(next);\r\n\r\n\t\tif (options.circular ||\r\n\t\t\tthis[`get${next ? \"Next\" : \"Prev\"}Index`]() !== null\r\n\t\t) {\r\n\t\t\tthis._movePanelByPhase(\"setBy\", panel.size * (next ? 1 : -1), duration);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Move panel applying start/end phase value\r\n\t * @param {String} method Axes' method name\r\n\t * @param {Number} to destination value\r\n\t * @param {Number} durationValue duration value\r\n\t */\r\n\t_movePanelByPhase(method, to, durationValue) {\r\n\t\tconst duration = utils.getNumValue(durationValue, this.options.duration);\r\n\r\n\t\tif (this._setPhaseValue(\"start\") !== false) {\r\n\t\t\tthis._setAxes(method, to, duration);\r\n\t\t\t!duration && this._setPhaseValue(\"end\");\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Moves an element to the next panel.\r\n\t * @ko 다음 패널로 이동한다.\r\n\t * @method eg.Flicking#next\r\n\t * @param {Number} [duration=options.duration] Duration of the panel movement (unit: ms) 패널 이동 애니메이션 진행 시간(단위: ms)\r\n\t * @return {eg.Flicking} An instance of a module itself 모듈 자신의 인스턴스\r\n\t */\r\n\tnext(duration) {\r\n\t\treturn this._movePanel(true, duration);\r\n\t}\r\n\r\n\t/**\r\n\t * Moves an element to the previous panel.\r\n\t * @ko 이전 패널로 이동한다.\r\n\t * @method eg.Flicking#prev\r\n\t * @param {Number} [duration=options.duration] Duration of the panel movement (unit: ms) 패널 이동 애니메이션 진행 시간(단위: ms)\r\n\t * @return {eg.Flicking} An instance of a module itself모듈 자신의 인스턴스\r\n\t */\r\n\tprev(duration) {\r\n\t\treturn this._movePanel(false, duration);\r\n\t}\r\n\r\n\t/**\r\n\t * Moves an element to the indicated panel.\r\n\t * @ko 지정한 패널로 이동한다.\r\n\t * @method eg.Flicking#moveTo\r\n\t * @param {Number} noValue Logical index number of the target panel element, which is relative to the panel content. 이동할 패널 엘리먼트의 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다\r\n\t * @param {Number} [duration=options.duration] Duration of the panel movement (unit: ms) 패널 이동 애니메이션 진행 시간(단위: ms)\r\n\t * @return {eg.Flicking} An instance of a module itself모듈 자신의 인스턴스\r\n\t */\r\n\tmoveTo(noValue, duration) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst panel = conf.panel;\r\n\t\tconst circular = this.options.circular;\r\n\t\tconst currentIndex = panel.index;\r\n\t\tlet indexToMove;\r\n\t\tlet isPositive;\r\n\t\tlet no = noValue;\r\n\r\n\t\tno = utils.getNumValue(no, -1);\r\n\r\n\t\tif (no < 0 || no >= panel.origCount || no === panel.no ||\r\n\t\t\tpanel.animating || conf.touch.holding) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tindexToMove = no - (circular ? panel.no : currentIndex);\r\n\t\tisPositive = indexToMove > 0;\r\n\r\n\t\t// check for real panel count which can be moved on each sides in circular mode\r\n\t\tif (circular &&\r\n\t\t\tMath.abs(indexToMove) >\r\n\t\t\t(isPositive ? panel.count - (currentIndex + 1) : currentIndex)) {\r\n\t\t\tindexToMove += (isPositive ? -1 : 1) * panel.count;\r\n\t\t\tisPositive = indexToMove > 0;\r\n\t\t}\r\n\r\n\t\tthis._setPanelNo(circular ? {no} : {no, index: no});\r\n\t\tthis._conf.indexToMove = indexToMove;\r\n\t\tthis._setValueToMove(isPositive);\r\n\r\n\t\tthis._movePanelByPhase(\r\n\t\t\tcircular ? \"setBy\" : \"setTo\",\r\n\t\t\tpanel.size * (circular ? indexToMove : no),\r\n\t\t\tduration\r\n\t\t);\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the size of the panel.\r\n\t * @ko 패널의 크기를 갱신한다\r\n\t * @method eg.Flicking#resize\r\n\t * @return {eg.Flicking} An instance of a module itself모듈 자신의 인스턴스\r\n\t * @example\r\n\t let some = new eg.Flicking(\"#mflick\", {\r\n\t\t\t\t\tpreviewPadding: [10,10]\r\n\t\t\t\t});\r\n\r\n\t // when device orientaion changes\r\n\t some.resize();\r\n\r\n\t // or when changes previewPadding option from its original value\r\n\t some.options.previewPadding = [20, 30];\r\n\t some.resize();\r\n\t */\r\n\tresize() {\r\n\t\tconst conf = this._conf;\r\n\t\tconst options = this.options;\r\n\t\tconst panel = conf.panel;\r\n\t\tconst horizontal = options.horizontal;\r\n\t\tlet panelSize;\r\n\r\n\t\tif (!this.isPlaying()) {\r\n\t\t\tif (utils.isArray(options.previewPadding) && typeof +options.previewPadding.join(\"\") === \"number\") {\r\n\t\t\t\tthis._setPadding(options.previewPadding.concat());\r\n\t\t\t\tpanelSize = panel.size;\r\n\t\t\t} else if (horizontal) {\r\n\t\t\t\tpanelSize = panel.size = utils.css(this.$wrapper, \"width\", true);\r\n\t\t\t}\r\n\r\n\t\t\tconst max = panelSize * (panel.count - 1);\r\n\t\t\tconst maxCoords = this._getDataByDirection([max, 0]);\r\n\r\n\t\t\t// resize elements\r\n\t\t\thorizontal && utils.css(this.$container, {width: `${maxCoords[0] + panelSize}px`});\r\n\t\t\tutils.css(panel.$list, {\r\n\t\t\t\t[horizontal ? \"width\" : \"height\"]: utils.getUnitValue(panelSize)\r\n\t\t\t});\r\n\r\n\t\t\t// remove data-height attribute and re-evaluate panel's height\r\n\t\t\tif (options.adaptiveHeight) {\r\n\t\t\t\tconst $panel = this.$container.querySelectorAll(`[${consts.DATA_HEIGHT}]`);\r\n\r\n\t\t\t\tif ($panel.length) {\r\n\t\t\t\t\t[].slice.call($panel)\r\n\t\t\t\t\t\t.forEach(v => v.removeAttribute(consts.DATA_HEIGHT));\r\n\r\n\t\t\t\t\tthis._setAdaptiveHeight();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis._axesInst.axis.flick.range = [0, max];\r\n\t\t\tthis._setAxes(\"setTo\", panelSize * panel.index, 0);\r\n\r\n\t\t\tif (consts.IS_ANDROID2) {\r\n\t\t\t\tthis._applyPanelsPos();\r\n\t\t\t\tthis._adjustContainerCss(\"end\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Restores an element to its original position when it movement stops while the element is not dragged until a certain distance threshold is reached.\r\n\t * @ko 다음 패널로 바뀌기 전에 패널 이동이 멈췄을 때 원래 패널로 복원한다\r\n\t * @method eg.Flicking#restore\r\n\t * @param {Number} [durationValue=options.duration] Duration of the panel movement (unit: ms) 패널 이동 애니메이션 진행 시간(단위: ms)\r\n\t * @return {eg.Flicking} An instance of a module itself모듈 자신의 인스턴스\r\n\t * @example\r\n\t * let some = new eg.Flicking(\"#mflick\").on({\r\n\t *\t\t\t\tbeforeFlickStart : function(e) {\r\n\t *\t\t\t\t\tif(e.no === 2) {\r\n\t *\t\t\t\t\t\te.stop(); // stop flicking\r\n\t *\t\t\t\t\t\tthis.restore(100); // restoring to previous position\r\n\t *\t\t\t\t\t}\r\n\t *\t\t\t\t}\r\n\t *\t\t\t);\r\n\t */\r\n\trestore(durationValue) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst panel = conf.panel;\r\n\t\tconst currPos = this._axesInst.get().flick;\r\n\t\tlet duration = durationValue;\r\n\t\tlet destPos;\r\n\r\n\t\t// check if the panel isn't in right position\r\n\t\tif (currPos !== panel.currIndex * panel.size) {\r\n\t\t\tconf.customEvent.restoreCall = true;\r\n\t\t\tduration = utils.getNumValue(duration, this.options.duration);\r\n\r\n\t\t\tthis._revertPanelNo();\r\n\t\t\tdestPos = panel.size * panel.index;\r\n\r\n\t\t\tthis._triggerBeforeRestore({depaPos: currPos, destPos});\r\n\t\t\tthis._setAxes(\"setTo\", destPos, duration);\r\n\r\n\t\t\tif (!duration) {\r\n\t\t\t\tthis._adjustContainerCss(\"end\");\r\n\t\t\t\tthis._triggerRestore();\r\n\t\t\t}\r\n\r\n\t\t\t// to handle on api call\r\n\t\t} else if (panel.changed) {\r\n\t\t\tthis._revertPanelNo();\r\n\t\t\tconf.touch.distance = conf.indexToMove = 0;\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Enables input devices.\r\n\t * @ko 입력 장치를 사용할 수 있게 한다\r\n\t * @method eg.Flicking#enableInput\r\n\t * @return {eg.Flicking} An instance of a module itself 모듈 자신의 인스턴스\r\n\t */\r\n\tenableInput() {\r\n\t\tthis._panInput.enable();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Disables input devices.\r\n\t * @ko 입력 장치를 사용할 수 없게 한다.\r\n\t * @method eg.Flicking#disableInput\r\n\t * @return {eg.Flicking} An instance of a module itself 모듈 자신의 인스턴스\r\n\t */\r\n\tdisableInput() {\r\n\t\tthis._panInput.disable();\r\n\t\treturn this;\r\n\t}\r\n\r\n\t/**\r\n\t * Get current flicking status\r\n\t * @ko 현재의 상태 값을 반환한다.\r\n\t * @method eg.Flicking#getStatus\r\n\t * @param {Boolean} stringify Set true if want get stringified status value 상태 값을 문자열로 전달받고자 하는지 여부\r\n\t * @return {{panel: {index: (*|number), no: (*|number), currIndex: number, currNo: number}, $list}}\r\n\t */\r\n\tgetStatus(stringify) {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst rxStyle = /((?:-webkit-)?transform|left|top|will-change|box-sizing|width):[^;]*;/g;\r\n\t\tconst status = {\r\n\t\t\t// current panel position\r\n\t\t\tpanel: {\r\n\t\t\t\tindex: panel.index,\r\n\t\t\t\tno: panel.no,\r\n\t\t\t\tcurrIndex: panel.currIndex,\r\n\t\t\t\tcurrNo: panel.currNo\r\n\t\t\t},\r\n\r\n\t\t\t// panel's html\r\n\t\t\t$list: panel.$list.map(v => ({\r\n\t\t\t\tstyle: v.style.cssText.replace(rxStyle, \"\").trim(),\r\n\t\t\t\tclassName: v.className,\r\n\t\t\t\thtml: v.innerHTML\r\n\t\t\t}))\r\n\t\t};\r\n\r\n\t\treturn stringify ?\r\n\t\t\tJSON.stringify(status) : status;\r\n\t}\r\n\r\n\t/**\r\n\t * Set flicking as given status\r\n\t * @method eg.Flicking#setStatus\r\n\t * @param {Object|String} statusValue status value to be restored 복원할 상태 값\r\n\t */\r\n\tsetStatus(statusValue) {\r\n\t\tconst panel = this._conf.panel;\r\n\t\tconst isAdaptiveHeight = this.options.adaptiveHeight;\r\n\t\tconst status = typeof statusValue === \"string\" ?\r\n\t\t\tJSON.parse(statusValue) : statusValue;\r\n\r\n\t\tif (status) {\r\n\t\t\tfor (const x in status.panel) {\r\n\t\t\t\tx in panel && (panel[x] = status.panel[x]);\r\n\t\t\t}\r\n\r\n\t\t\tpanel.$list.forEach((v, i) => {\r\n\t\t\t\tconst data = status.$list[i];\r\n\t\t\t\tconst style = data.style;\r\n\t\t\t\tconst className = data.className;\r\n\t\t\t\tconst html = data.html;\r\n\r\n\t\t\t\tstyle && (v.style.cssText += style);\r\n\t\t\t\tclassName && (v.className = className);\r\n\t\t\t\thtml && (v.innerHTML = html);\r\n\t\t\t});\r\n\r\n\t\t\tisAdaptiveHeight && this._setAdaptiveHeight();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Destroys elements, properties, and events used in a panel.\r\n\t * @ko 패널에 사용한 엘리먼트와 속성, 이벤트를 해제한다\r\n\t * @method eg.Flicking#destroy\r\n\t */\r\n\tdestroy() {\r\n\t\tconst conf = this._conf;\r\n\t\tconst origPanelStyle = conf.origPanelStyle;\r\n\t\tconst wrapper = origPanelStyle.wrapper;\r\n\t\tconst container = origPanelStyle.container;\r\n\t\tconst list = origPanelStyle.list;\r\n\r\n\t\t// unwrap container element and restore original inline style\r\n\t\t// restore wrapper style\r\n\t\tconst $wrapper = this.$wrapper;\r\n\r\n\t\t$wrapper.setAttribute(\"class\", wrapper.className);\r\n\t\t$wrapper[wrapper.style ? \"setAttribute\" : \"removeAttribute\"](\"style\", wrapper.style);\r\n\r\n\t\t// restore container style\r\n\t\tconst $container = this.$container;\r\n\t\tconst $children = []\r\n\t\t\t.slice.call($container.children);\r\n\r\n\t\tif (origPanelStyle.container.className) {\r\n\t\t\t$container.setAttribute(\"class\", container.className);\r\n\t\t\t$container[container.style ? \"setAttribute\" : \"removeAttribute\"](\"style\", container.style);\r\n\t\t} else {\r\n\t\t\t$children.forEach(v => $wrapper.appendChild(v));\r\n\t\t\t$container.parentNode.removeChild($container);\r\n\t\t}\r\n\r\n\t\tfor (let i = 0, $el; ($el = $children[i]); i++) {\r\n\t\t\tif (i > list.length - 1) {\r\n\t\t\t\t$el.parentNode.removeChild($el);\r\n\t\t\t} else {\r\n\t\t\t\tconst className = list[i].className;\r\n\t\t\t\tconst style = list[i].style;\r\n\r\n\t\t\t\t$el[className ? \"setAttribute\" : \"removeAttribute\"](\"class\", className);\r\n\t\t\t\t$el[style ? \"setAttribute\" : \"removeAttribute\"](\"style\", style);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// unbind events\r\n\t\tthis._bindEvents(false);\r\n\t\tthis.off();\r\n\r\n\t\t// destroy eg.Axes instance\r\n\t\tthis._axesInst.destroy();\r\n\t\tthis._panInput.destroy();\r\n\r\n\t\t// release resources\r\n\t\tfor (const x in this) {\r\n\t\t\tthis[x] = null;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Constant value for none direction\r\n\t * @ko none 방향에 대한 상수 값\r\n\t * @name DIRECTION_NONE\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_NONE = Axes.DIRECTION_NONE;\r\n\r\n\t/**\r\n\t * @description Constant value for left direction\r\n\t * @ko left 방향에 대한 상수 값\r\n\t * @name DIRECTION_LEFT\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_LEFT = Axes.DIRECTION_LEFT;\r\n\r\n\t/**\r\n\t * Constant value for right direction\r\n\t * @ko right 방향에 대한 상수 값\r\n\t * @name DIRECTION_RIGHT\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_RIGHT = Axes.DIRECTION_RIGHT;\r\n\r\n\t/**\r\n\t * Constant value for up direction\r\n\t * @ko up 방향에 대한 상수 값\r\n\t * @name DIRECTION_UP\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_UP = Axes.DIRECTION_UP;\r\n\r\n\t/**\r\n\t * Constant value for down direction\r\n\t * @ko down 방향에 대한 상수 값\r\n\t * @name DIRECTION_DOWN\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_DOWN = Axes.DIRECTION_DOWN;\r\n\r\n\t/**\r\n\t * Constant value for horizontal direction\r\n\t * @ko horizontal 방향에 대한 상수 값\r\n\t * @name DIRECTION_HORIZONTAL\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_HORIZONTAL = Axes.DIRECTION_HORIZONTAL;\r\n\r\n\t/**\r\n\t * Constant value for vertical direction\r\n\t * @ko vertical 방향에 대한 상수 값\r\n\t * @name DIRECTION_VERTICAL\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_VERTICAL = Axes.DIRECTION_VERTICAL;\r\n\r\n\t/**\r\n\t * Constant value for all direction\r\n\t * @ko all 방향에 대한 상수 값\r\n\t * @name DIRECTION_ALL\r\n\t * @memberof eg.Flicking\r\n\t * @static\r\n\t * @type {Number}\r\n\t */\r\n\tstatic DIRECTION_ALL = Axes.DIRECTION_ALL;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// src/Flicking.js","module.exports = __WEBPACK_EXTERNAL_MODULE_4__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"commonjs\":\"@egjs/component\",\"commonjs2\":\"@egjs/component\",\"amd\":\"@egjs/component\",\"root\":[\"eg\",\"Component\"]}\n// module id = 4\n// module chunks = 0 1","module.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"commonjs\":\"@egjs/axes\",\"commonjs2\":\"@egjs/axes\",\"amd\":\"@egjs/axes\",\"root\":[\"eg\",\"Axes\"]}\n// module id = 5\n// module chunks = 0 1","/**\r\n * Copyright (c) 2015 NAVER Corp.\r\n * egjs projects are licensed under the MIT license\r\n */\r\nimport {window, document} from \"./browser\";\r\n\r\nconst utils = {\r\n\t/**\r\n\t * Select or create element\r\n\t * @param {String|HTMLElement} param\r\n\t * when string given is as HTML tag, then create element\r\n\t * otherwise it returns selected elements\r\n\t * @returns {HTMLElement}\r\n\t */\r\n\t$(param) {\r\n\t\tlet el = null;\r\n\r\n\t\tif (typeof param === \"string\") {\r\n\t\t\t// check if string is HTML tag format\r\n\t\t\tconst match = param.match(/^<([a-z]+)\\s*([^>]*)>/);\r\n\r\n\t\t\t// creating element\r\n\t\t\tif (match) {\r\n\t\t\t\tel = document.createElement(match[1]);\r\n\r\n\t\t\t\t// attributes\r\n\t\t\t\tmatch.length === 3 &&\r\n\t\t\t\t\tmatch[2].split(\" \").forEach(v => {\r\n\t\t\t\t\t\tconst attr = v.split(\"=\");\r\n\r\n\t\t\t\t\t\tel.setAttribute(attr[0], attr[1].trim().replace(/(^[\"']|[\"']$)/g, \"\"));\r\n\t\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\tel = document.querySelectorAll(param);\r\n\r\n\t\t\t\tif (!el.length) {\r\n\t\t\t\t\tel = null;\r\n\t\t\t\t} else if (el.length === 1) {\r\n\t\t\t\t\tel = el[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (param.nodeName && param.nodeType === 1) {\r\n\t\t\tel = param;\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t},\r\n\r\n\t/**\r\n\t * Check if is array\r\n\t * @param arr\r\n\t * @returns {Boolean}\r\n\t */\r\n\tisArray(arr) {\r\n\t\treturn arr && arr.constructor === Array;\r\n\t},\r\n\r\n\t/**\r\n\t * Check if is object\r\n\t * @param {Object} obj\r\n\t * @returns {Boolean}\r\n\t */\r\n\tisObject(obj) {\r\n\t\treturn obj && !obj.nodeType && typeof obj === \"object\" && !this.isArray(obj);\r\n\t},\r\n\r\n\t/**\r\n\t * Merge object returning new object\r\n\t * @param {Object} target\r\n\t * @param {Object} objectN\r\n\t * @returns {Object} merged target object\r\n\t * @example\r\n\t * var target = { a: 1 };\r\n\t * utils.extend(target, { b: 2, c: 3 });\r\n\t * target; // { a: 1, b: 2, c: 3 };\r\n\t */\r\n\textend(target, ...objectN) {\r\n\t\tif (!objectN.length || (objectN.length === 1 && !objectN[0])) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\tconst source = objectN.shift();\r\n\r\n\t\tif (this.isObject(target) && this.isObject(source)) {\r\n\t\t\tObject.keys(source).forEach(key => {\r\n\t\t\t\tconst value = source[key];\r\n\r\n\t\t\t\tif (this.isObject(value)) {\r\n\t\t\t\t\t!target[key] && (target[key] = {});\r\n\r\n\t\t\t\t\ttarget[key] = this.extend(target[key], value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttarget[key] = this.isArray(value) ?\r\n\t\t\t\t\t\tvalue.concat() : value;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.extend(target, ...objectN);\r\n\t},\r\n\r\n\t/**\r\n\t * Get or set the style value or apply\r\n\t * @param {HTMLElement} el\r\n\t * @param {String|Object} style\r\n\t * String: return style property value\r\n\t * Object: set style value\r\n\t * @param {Boolean} getAsNumber Get the value as number\r\n\t * @returns {String|HTMLElement}\r\n\t */\r\n\tcss(el, style, getAsNumber) {\r\n\t\tif (typeof(style) === \"string\") {\r\n\t\t\tconst value = window.getComputedStyle(el)[style];\r\n\r\n\t\t\treturn getAsNumber ? this.getNumValue(value) : value;\r\n\t\t} else {\r\n\t\t\tconst applyStyle = (target, source) =>\r\n\t\t\t\tObject.keys(source).forEach(v => {\r\n\t\t\t\t\ttarget[v] = source[v];\r\n\t\t\t\t});\r\n\r\n\t\t\tthis.isArray(el) ?\r\n\t\t\t\tel.forEach(v => applyStyle(v.style, style)) :\r\n\t\t\t\tapplyStyle(el.style, style);\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t},\r\n\r\n\t/**\r\n\t * classList\r\n\t * @param {HTMLElement} el target DOM element\r\n\t * @param {String} className class name string to be handled\r\n\t * @param {Boolean} add Add or remove class - true: Add, false: Remove\r\n\t * @return {Boolean} if add param is missing, then return existence of class name\r\n\t */\r\n\tclassList(el, className, add) {\r\n\t\tconst isAddParam = typeof add === \"boolean\";\r\n\t\tlet res;\r\n\r\n\t\tif (el.classList) {\r\n\t\t\tres = el.classList[\r\n\t\t\t\t(isAddParam && (add ? \"add\" : \"remove\")) || \"contains\"\r\n\t\t\t](className);\r\n\t\t} else {\r\n\t\t\tres = el.className;\r\n\r\n\t\t\tif (isAddParam) {\r\n\t\t\t\tif (add && res.indexOf(className) === -1) {\r\n\t\t\t\t\tres = el.className = (`${res} ${className}`).replace(/\\s{2,}/g, \" \");\r\n\t\t\t\t} else if (!add) {\r\n\t\t\t\t\tres = el.className = res.replace(className, \"\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tres = new RegExp(`\\\\b${className}\\\\b`).test(res);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn res;\r\n\t},\r\n\r\n\t/**\r\n\t * Check and parse value to number\r\n\t * @param {Number|String} val\r\n\t * @param {Number} defVal\r\n\t * @return {Number}\r\n\t */\r\n\tgetNumValue(val, defVal) {\r\n\t\tlet num = val;\r\n\r\n\t\treturn isNaN(num = parseInt(num, 10)) ? defVal : num;\r\n\t},\r\n\r\n\t/**\r\n\t * Return unit formatted value\r\n\t * @param {Number|String} val\r\n\t * @return {String} val Value formatted with unit\r\n\t */\r\n\tgetUnitValue(val) {\r\n\t\tconst rx = /(?:[a-z]{2,}|%)$/;\r\n\r\n\t\treturn (parseInt(val, 10) || 0) + (String(val).match(rx) || \"px\");\r\n\t},\r\n\r\n\t/**\r\n\t * Get element's outer value\r\n\t * @param {HTMLElement} el\r\n\t * @param {String} type - [outerWidth|outerHeight]\r\n\t * @returns {Number} outer's value\r\n\t */\r\n\tgetOuter(el, type) {\r\n\t\tconst style = window.getComputedStyle(el);\r\n\t\tconst margin = type === \"outerWidth\" ?\r\n\t\t\t[\"marginLeft\", \"marginRight\"] : [\"marginTop\", \"marginBottom\"];\r\n\r\n\t\treturn this.getNumValue(style[type.replace(\"outer\", \"\").toLocaleLowerCase()]) +\r\n\t\t\tthis.getNumValue(style[margin[0]]) +\r\n\t\t\tthis.getNumValue(style[margin[1]]);\r\n\t},\r\n\r\n\t/**\r\n\t * Get element's outerWidth value with margin\r\n\t * @param {HTMLElement} el\r\n\t * @returns {Number}\r\n\t */\r\n\touterWidth(el) {\r\n\t\treturn this.getOuter(el, \"outerWidth\");\r\n\t},\r\n\r\n\t/**\r\n\t * Get element's outerHeight value with margin\r\n\t * @param {HTMLElement} el\r\n\t * @returns {Number}\r\n\t */\r\n\touterHeight(el) {\r\n\t\treturn this.getOuter(el, \"outerHeight\");\r\n\t},\r\n\r\n\t/**\r\n\t * Checks whether hardware acceleration is enabled.\r\n\t *\r\n\t * @ko 하드웨어 가속을 사용할 수 있는 환경인지 확인한다\r\n\t * @method eg#isHWAccelerable\r\n\t * @return {Boolean} Indicates whether hardware acceleration is enabled. 하드웨어 가속 사용 가능 여부\r\n\t */\r\n\tisHWAccelerable() {\r\n\t\tconst ua = window.navigator.userAgent;\r\n\t\tlet result = false;\r\n\t\tlet match;\r\n\r\n\t\t// chrome 25- has a text blur bug (except Samsung's sbrowser)\r\n\t\tif ((match = ua.match(/Chrome\\/(\\d+)/))) {\r\n\t\t\tresult = match[1] >= \"25\";\r\n\t\t} else if (/ie|edge|firefox|safari|inapp/.test(ua)) {\r\n\t\t\tresult = true;\r\n\t\t} else if ((match = ua.match(/Android ([\\d.]+)/))) {\r\n\t\t\tconst version = match[1];\r\n\t\t\tconst useragent = (ua.match(/\\(.*\\)/) || [null])[0];\r\n\r\n\t\t\t// android 4.1+ blacklist\r\n\t\t\t// EK-GN120 : Galaxy Camera, SM-G386F : Galaxy Core LTE\r\n\t\t\t// SHW-M420 : Galaxy Nexus , SHW-M200 : NexusS , GT-S7562 : Galaxy S duos\r\n\t\t\tresult = (version >= \"4.1.0\" && !/EK-GN120|SM-G386F/.test(useragent)) ||\r\n\t\t\t\t(\r\n\t\t\t\t\tversion >= \"4.0.3\" &&\r\n\t\t\t\t\t\t/SHW-|SHV-|GT-|SCH-|SGH-|SPH-|LG-F160|LG-F100|LG-F180|LG-F200|EK-|IM-A|LG-F240|LG-F260/.test(useragent) &&\r\n\t\t\t\t\t\t\t!/SHW-M420|SHW-M200|GT-S7562/.test(useragent)\r\n\t\t\t\t);\r\n\t\t}\r\n\r\n\t\tthis.isHWAccelerable = () => result;\r\n\t\treturn result;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the syntax of the translate style which is applied to CSS transition properties.\r\n\t *\r\n\t * @ko CSS 트랜지션 속성에 적용할 translate 스타일 구문을 반환한다\r\n\t * @method eg#translate\r\n\t * @param {String} x Distance to move along the X axis x축을 따라 이동할 거리\r\n\t * @param {String} y Distance to move along the Y axis y축을 따라 이동할 거리\r\n\t * @param {Boolean} [isHA] Force hardware acceleration 하드웨어 가속 사용 여부\r\n\t * @return {String} Syntax of the translate style translate 스타일 구문\r\n\t */\r\n\ttranslate(x, y, isHA) {\r\n\t\treturn isHA || false ?\r\n\t\t\t`translate3d(${x},${y},0)` : `translate(${x},${y})`;\r\n\t},\r\n\r\n\t// 1. user press one position on screen.\r\n\t// 2. user moves to the other position on screen.\r\n\t// 3. when user releases fingers on screen, 'click' event is fired at previous position.\r\n\thasClickBug() {\r\n\t\tconst ua = window.navigator.userAgent;\r\n\t\tconst result = /Safari/.test(ua);\r\n\r\n\t\tthis.hasClickBug = () => result;\r\n\t\treturn result;\r\n\t}\r\n};\r\n\r\nclass MixinBuilder {\r\n\tconstructor(superclass) {\r\n\t\tthis.superclass = superclass || class {};\r\n\t}\r\n\r\n\twith(...mixins) {\r\n\t\treturn mixins.reduce((c, m) => m(c), this.superclass);\r\n\t}\r\n}\r\n\r\nconst Mixin = superclass => new MixinBuilder(superclass);\r\n\r\nexport {utils, Mixin};\r\n\n\n\n// WEBPACK FOOTER //\n// src/utils.js","/**\r\n * Copyright (c) 2015 NAVER Corp.\r\n * egjs projects are licensed under the MIT license\r\n */\r\n// internal config values\r\nconst CONFIG = {\r\n\tpanel: {\r\n\t\t$list: null, // panel list\r\n\t\tindex: 0,\t\t\t// dom index used among process\r\n\t\tno: 0,\t\t\t\t// panel no used among process\r\n\t\tcurrIndex: 0, // current physical dom index\r\n\t\tcurrNo: 0, // current logical panel number\r\n\t\tsize: 0,\t\t\t// panel size\r\n\t\tcount: 0,\t\t\t// total physical panel count\r\n\t\torigCount: 0,\t\t// total count of given original panels\r\n\t\tchanged: false,\t\t// if panel changed\r\n\t\tanimating: false,\t// current animating status boolean\r\n\t\tminCount: 3 // minimum panel count\r\n\t},\r\n\ttouch: {\r\n\t\tholdPos: 0, // hold x,y coordinate\r\n\t\tdestPos: 0,\t // destination x,y coordinate\r\n\t\tdistance: 0,\t\t// touch distance pixel of start to end touch\r\n\t\tdirection: null,\t// touch direction\r\n\t\tlastPos: 0,\t\t\t// to determine move on holding\r\n\t\tholding: false,\r\n\t\tisTrusted: false // if event was instantiated by user's action explicitly\r\n\t},\r\n\tcustomEvent: { // for custom events value\r\n\t\tflick: true,\r\n\t\trestore: false,\r\n\t\trestoreCall: false\r\n\t},\r\n\tdirData: [],\t\t\t// direction constant value according horizontal or vertical\r\n\tindexToMove: 0,\r\n\t$dummyAnchor: null // For buggy link highlighting on Android 2.x\r\n};\r\n\r\n\r\n// default options\r\nconst OPTIONS = {\r\n\thwAccelerable: true, // ns.isHWAccelerable(), // check weather hw acceleration is available\r\n\tprefix: \"eg-flick\", // prefix value of class name\r\n\tdeceleration: 0.0006, // deceleration value\r\n\thorizontal: true, // move direction (true == horizontal, false == vertical)\r\n\tcircular: false, // circular mode. In this mode at least 3 panels are required.\r\n\tpreviewPadding: null, // preview padding value in left(up) to right(down) order. In this mode at least 5 panels are required.\r\n\tbounce: null, // bounce value in left(up) to right(down) order. Works only in non-circular mode.\r\n\tthreshold: 40, // the distance pixel threshold value for change panel\r\n\tduration: 100, // duration ms for animation\r\n\tpanelEffect: x => 1 - Math.pow(1 - x, 3), // easing function for panel change animation\r\n\tdefaultIndex: 0, // initial panel index to be shown\r\n\tinputType: [ // input type\r\n\t\t\"touch\", \"mouse\"\r\n\t],\r\n\tthresholdAngle: 45, // the threshold value that determines whether user action is horizontal or vertical (0~90)\r\n\tadaptiveHeight: false // Set container's height be adaptive according panel's height\r\n};\r\n\r\nexport {\r\n\tCONFIG,\r\n\tOPTIONS\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// src/config.js","/**\r\n * Copyright (c) 2015 NAVER Corp.\r\n * egjs projects are licensed under the MIT license\r\n */\r\nimport * as consts from \"./consts\";\r\n\r\nexport default superclass => class extends superclass {\r\n\t/**\r\n\t * 'hold' event handler\r\n\t */\r\n\t_holdHandler(e) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst touch = conf.touch;\r\n\t\tconst holdPos = e.pos.flick;\r\n\r\n\t\ttouch.holdPos = holdPos;\r\n\t\ttouch.holding = true;\r\n\t\ttouch.isTrusted = true;\r\n\t\tconf.panel.changed = false;\r\n\r\n\t\tthis._adjustContainerCss(\"start\", holdPos);\r\n\t}\r\n\r\n\t/**\r\n\t * 'change' event handler\r\n\t */\r\n\t_changeHandler(e) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst touch = conf.touch;\r\n\t\tconst pos = e.pos.flick;\r\n\t\tconst holdPos = touch.holdPos;\r\n\t\tlet direction;\r\n\t\tlet eventRes = null;\r\n\t\tlet movedPx;\r\n\r\n\t\tthis._setPointerEvents(e); // for \"click\" bug\r\n\r\n\t\t/**\r\n\t\t * This event is fired when panel moves.\r\n\t\t * @ko 패널이 이동할 때 발생하는 이벤트\r\n\t\t * @name eg.Flicking#flick\r\n\t\t * @event\r\n\t\t * @param {Object} param The object of data to be sent to an event 이벤트에 전달되는 데이터 객체\r\n\t\t * @param {String} param.eventType The name of the event이름명\r\n\t\t * @param {Boolean} param.isTrusted true when the event was generated by a user action otherwise false사용자의 액션으로 인해 이벤트가 생성된 경우, true. 그 외는 false\r\n\t\t * @param {Number} param.index Physical index number of the current panel element, which is relative to DOM (@deprecated since 1.3.0)현재 패널 엘리먼트의 물리적 인덱스 번호. DOM 엘리먼트를 기준으로 하는 인덱스 번호다 (@deprecated since 1.3.0)\r\n\t\t * @param {Number} param.no Logical index number of the current panel element, which is relative to the panel content 현재 패널 엘리먼트의 논리적 인덱스 번호. 패널 콘텐츠를 기준으로 하는 인덱스 번호다\r\n\t\t * @param {Number} param.direction Direction of the movement (see eg.Axes.DIRECTION_* constant) 이동 방향(eg.Axes.DIRECTION_* constant 참고)\r\n\t\t * @param {Number} param.pos current coordinate 현재 좌표\r\n\t\t * @param {Boolean} param.holding Indicates whether a user holds an element on the screen of the device. 사용자가 기기의 화면을 누르고 있는지 여부\r\n\t\t * @param {Number} param.distance Distance moved from then starting point. According the move direction, positive on eg.Axes.DIRECTION_LEFT/UP and negative on eg.Axes.DIRECTION_RIGHT/DOWN 시작점부터 이동된 거리의 값. 이동 방향에 따라 eg.Axes.DIRECTION_LEFT/UP의 경우 양수를 eg.Axes.DIRECTION_RIGHT/DOWN의 경우는 음수를 반환\r\n\t\t */\r\n\t\tif (e.inputEvent) {\r\n\t\t\tdirection = e.inputEvent.direction;\r\n\r\n\t\t\t// Adjust direction in case of diagonal touch move\r\n\t\t\tmovedPx = e.inputEvent[this.options.horizontal ? \"deltaX\" : \"deltaY\"];\r\n\r\n\t\t\tif (!~conf.dirData.indexOf(direction)) {\r\n\t\t\t\tdirection = conf.dirData[+(Math.abs(touch.lastPos) <= movedPx)];\r\n\t\t\t}\r\n\r\n\t\t\ttouch.lastPos = movedPx;\r\n\t\t} else {\r\n\t\t\ttouch.lastPos = null;\r\n\t\t}\r\n\r\n\t\tconf.customEvent.flick && (eventRes =\r\n\t\t\tthis._triggerEvent(consts.EVENTS.flick, {\r\n\t\t\t\tpos,\r\n\t\t\t\tholding: e.holding,\r\n\t\t\t\tdirection: direction || touch.direction,\r\n\t\t\t\tdistance: pos - holdPos\r\n\t\t\t})\r\n\t\t);\r\n\r\n\t\t(eventRes || eventRes === null) && this._setTranslate([-pos, 0]);\r\n\t}\r\n\r\n\t/**\r\n\t * 'release' event handler\r\n\t */\r\n\t_releaseHandler(e) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst touch = conf.touch;\r\n\t\tconst holdPos = touch.holdPos;\r\n\t\tconst panelSize = conf.panel.size;\r\n\t\tconst customEvent = conf.customEvent;\r\n\t\tconst isPlusMove = touch.holdPos < e.depaPos.flick;\r\n\r\n\t\ttouch.distance = e.depaPos.flick - holdPos;\r\n\t\ttouch.direction = conf.dirData[+!(isPlusMove)];\r\n\t\ttouch.destPos = holdPos + (isPlusMove ? panelSize : -panelSize);\r\n\r\n\t\tconst distance = touch.distance;\r\n\t\tlet duration = this.options.duration;\r\n\t\tlet moveTo = holdPos;\r\n\r\n\t\tif (this._isMovable()) {\r\n\t\t\t!customEvent.restoreCall && (customEvent.restore = false);\r\n\t\t\tmoveTo = touch.destPos;\r\n\t\t} else if (Math.abs(distance) > 0) {\r\n\t\t\tthis._triggerBeforeRestore(e);\r\n\t\t} else {\r\n\t\t\tduration = 0;\r\n\t\t}\r\n\r\n\t\t// trigger animation\r\n\t\te.setTo({flick: moveTo}, duration);\r\n\r\n\t\tdistance === 0 && this._adjustContainerCss(\"end\");\r\n\t\ttouch.holding = false;\r\n\r\n\t\tthis._setPointerEvents(); // for \"click\" bug\r\n\t}\r\n\r\n\t/**\r\n\t * 'animationStart' event handler\r\n\t */\r\n\t_animationStartHandler(e) {\r\n\t\tconst conf = this._conf;\r\n\t\tconst panel = conf.panel;\r\n\t\tconst customEvent = conf.customEvent;\r\n\t\tconst isFromInput = e.inputEvent || conf.touch.lastPos;\r\n\r\n\t\t// when animation was started by input action\r\n\t\tif (!customEvent.restoreCall && isFromInput &&\r\n\t\t\tthis._setPhaseValue(\"start\", {\r\n\t\t\t\tdepaPos: e.depaPos.flick,\r\n\t\t\t\tdestPos: e.destPos.flick\r\n\t\t\t}) === false) {\r\n\t\t\te.stop();\r\n\t\t}\r\n\r\n\t\tif (isFromInput) {\r\n\t\t\te.duration = this.options.duration;\r\n\r\n\t\t\te.destPos.flick =\r\n\t\t\t\tpanel.size * (\r\n\t\t\t\t\tpanel.index + conf.indexToMove\r\n\t\t\t\t);\r\n\t\t}\r\n\r\n\t\tpanel.animating = true;\r\n\t}\r\n\r\n\t/**\r\n\t * 'animationEnd' event handler\r\n\t */\r\n\t_animationEndHandler() {\r\n\t\tconst conf = this._conf;\r\n\r\n\t\tconf.panel.animating = false;\r\n\r\n\t\tthis._setPhaseValue(\"end\");\r\n\t\tthis._triggerRestore();\r\n\r\n\t\t// reset isTrusted\r\n\t\tconf.touch.isTrusted = false;\r\n\t}\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// src/eventHandler.js"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;A;;;;;;;;AC7DA;;;;AAIA;AACA;AAMA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AACA;AAOA;AAfA;;;;AAgBA;AACA;AADA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;;;;;AACA;;;;;AACA;;;;;;;;;;;ACHA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;AADA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;;;;;;;;;;;AAXA;;;;;;AAYA;;;;;;;;AAQA;;;AACA;;;;;;;;;;;;;;;;;;;;;;AAsBA;AAAA;AACA;AADA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3BA;AA4BA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AAFA;AAIA;AAAA;AACA;AACA;AAFA;AAAA;AATA;AAcA;AACA;AArBA;AACA;AAuBA;AACA;AAAA;AACA;AACA;AACA;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAQA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AADA;AAMA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAIA;AAIA;AACA;AACA;;;;;;AAIA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAGA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAFA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAGA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AAFA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAGA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AACA;AAMA;AACA;AAAA;AACA;AACA;AACA;AAHA;AAAA;AAVA;AACA;AAgBA;AAEA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;;;;;;;;;;AAUA;;;;;;;;;;AAUA;;;;;;;;;;AAUA;;;;;;;;;;AAUA;;;;;;;;;;AAUA;;;;;;;;;;AAUA;;;;;;;;;;;AAh7CA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;ACpBA;;;;;;ACAA;;;;;;;;;;;;ACAA;;;;;;AAIA;AACA;;;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;;;;;;AAUA;AAAA;AACA;AADA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAHA;AACA;AAIA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AAEA;AAGA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;;;;;;;;;;AAUA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAhRA;AACA;AAkRA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AADA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;;;;AAEA;AAAA;AAAA;AACA;AACA;AAAA;;;;;;;;;;ACrSA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA;AASA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AA9BA;AACA;AAiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAhBA;AACA;AAmBA;AACA;;;;;;;;;;;ACzDA;AACA;AADA;AACA;;;;;;;AALA;;;;;;AAMA;AAAA;AAAA;AACA;AADA;AAAA;AACA;AADA;AAAA;AACA;AAAA;;;AADA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAjBA;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAJA;AACA;AAOA;AACA;AACA;AACA;;;;;AAzEA;AA6EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AA9GA;AAkHA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;;;;;AA5IA;AAgJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1JA;AAAA;AAAA;AACA;;;;;A","sourceRoot":""}