From 8e57219ce4756329811bdb9b3e55201966ac4870 Mon Sep 17 00:00:00 2001 From: malangfox Date: Wed, 31 Jul 2024 19:55:24 +0900 Subject: [PATCH] chore(release): merge 4.11.4-rc --- .gitignore | 2 +- dist/flicking-inline.css | 45 - dist/flicking-inline.min.css | 1 - dist/flicking.cjs.js | 8214 -------------------- dist/flicking.cjs.js.map | 1 - dist/flicking.css | 44 - dist/flicking.esm.js | 8058 ------------------- dist/flicking.esm.js.map | 1 - dist/flicking.js | 8187 -------------------- dist/flicking.js.map | 1 - dist/flicking.min.css | 1 - dist/flicking.min.js | 10 - dist/flicking.min.js.map | 1 - dist/flicking.pkgd.js | 13222 -------------------------------- dist/flicking.pkgd.js.map | 1 - dist/flicking.pkgd.min.js | 10 - dist/flicking.pkgd.min.js.map | 1 - package.json | 2 +- 18 files changed, 2 insertions(+), 37800 deletions(-) delete mode 100644 dist/flicking-inline.css delete mode 100644 dist/flicking-inline.min.css delete mode 100644 dist/flicking.cjs.js delete mode 100644 dist/flicking.cjs.js.map delete mode 100644 dist/flicking.css delete mode 100644 dist/flicking.esm.js delete mode 100644 dist/flicking.esm.js.map delete mode 100644 dist/flicking.js delete mode 100644 dist/flicking.js.map delete mode 100644 dist/flicking.min.css delete mode 100644 dist/flicking.min.js delete mode 100644 dist/flicking.min.js.map delete mode 100644 dist/flicking.pkgd.js delete mode 100644 dist/flicking.pkgd.js.map delete mode 100644 dist/flicking.pkgd.min.js delete mode 100644 dist/flicking.pkgd.min.js.map diff --git a/.gitignore b/.gitignore index 24faf6df08..0340ad9861 100644 --- a/.gitignore +++ b/.gitignore @@ -223,4 +223,4 @@ demo/_data/version.yml outjs/ declaration/ - +dist/ diff --git a/dist/flicking-inline.css b/dist/flicking-inline.css deleted file mode 100644 index ac0a4ee31e..0000000000 --- a/dist/flicking-inline.css +++ /dev/null @@ -1,45 +0,0 @@ -.flicking-viewport { - position: relative; - overflow: hidden; -} - -.flicking-viewport:not(.vertical) { - width: 100%; - height: 100%; -} - -.flicking-viewport.vertical, -.flicking-viewport.vertical > .flicking-camera { - display: inline-block; -} - -.flicking-viewport.vertical.middle > .flicking-camera > * { - vertical-align: middle; -} - -.flicking-viewport.vertical.bottom > .flicking-camera > * { - vertical-align: bottom; -} - -.flicking-viewport.vertical > .flicking-camera > * { - display: block; -} - -.flicking-viewport.flicking-hidden > .flicking-camera > * { - visibility: hidden; -} - -.flicking-camera { - width: 100%; - height: 100%; - position: relative; - z-index: 1; - white-space: nowrap; - will-change: transform; -} - -.flicking-camera > * { - display: inline-block; - white-space: normal; - vertical-align: top; -} diff --git a/dist/flicking-inline.min.css b/dist/flicking-inline.min.css deleted file mode 100644 index 8fc4674ab6..0000000000 --- a/dist/flicking-inline.min.css +++ /dev/null @@ -1 +0,0 @@ -.flicking-viewport{position:relative;overflow:hidden}.flicking-viewport:not(.vertical){width:100%;height:100%}.flicking-viewport.vertical,.flicking-viewport.vertical>.flicking-camera{display:inline-block}.flicking-viewport.vertical.middle>.flicking-camera>*{vertical-align:middle}.flicking-viewport.vertical.bottom>.flicking-camera>*{vertical-align:bottom}.flicking-viewport.vertical>.flicking-camera>*{display:block}.flicking-viewport.flicking-hidden>.flicking-camera>*{visibility:hidden}.flicking-camera{width:100%;height:100%;position:relative;z-index:1;white-space:nowrap;will-change:transform}.flicking-camera>*{display:inline-block;white-space:normal;vertical-align:top} \ No newline at end of file diff --git a/dist/flicking.cjs.js b/dist/flicking.cjs.js deleted file mode 100644 index 889388a2f4..0000000000 --- a/dist/flicking.cjs.js +++ /dev/null @@ -1,8214 +0,0 @@ -/* -Copyright (c) 2015-present NAVER Corp. -name: @egjs/flicking -license: MIT -author: NAVER Corp. -repository: https://github.com/naver/egjs-flicking -version: 4.11.4 -*/ -'use strict'; - -var Component = require('@egjs/component'); -var Axes = require('@egjs/axes'); -var ImReady = require('@egjs/imready'); - -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol */ - -var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); -}; -function __extends(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -var __assign = function () { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -} -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, - m = s && o[s], - i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { - error: error - }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} - -/** @deprecated */ -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -} -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ -/** - * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs. - * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다. - * @name ERROR_CODE - * @constant - * @type object - * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우 - * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우 - * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우 - * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우) - * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때 - * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우 - * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우 - * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8) - * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우 - * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우 - * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우 - * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...) - * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우 - * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우 - * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다 - * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우 - */ -var CODE = { - WRONG_TYPE: 0, - ELEMENT_NOT_FOUND: 1, - VAL_MUST_NOT_NULL: 2, - NOT_ATTACHED_TO_FLICKING: 3, - WRONG_OPTION: 4, - INDEX_OUT_OF_RANGE: 5, - POSITION_NOT_REACHABLE: 6, - TRANSFORM_NOT_SUPPORTED: 7, - STOP_CALLED_BY_USER: 8, - ANIMATION_INTERRUPTED: 9, - ANIMATION_ALREADY_PLAYING: 10, - NOT_ALLOWED_IN_FRAMEWORK: 11, - NOT_INITIALIZED: 12, - NO_ACTIVE: 13, - NOT_ALLOWED_IN_VIRTUAL: 14 -}; -var MESSAGE = { - WRONG_TYPE: function (wrongVal, correctTypes) { - return wrongVal + "(" + typeof wrongVal + ") is not a " + correctTypes.map(function (type) { - return "\"" + type + "\""; - }).join(" or ") + "."; - }, - ELEMENT_NOT_FOUND: function (selector) { - return "Element with selector \"" + selector + "\" not found."; - }, - VAL_MUST_NOT_NULL: function (val, name) { - return name + " should be provided. Given: " + val; - }, - NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.", - WRONG_OPTION: function (optionName, val) { - return "Option \"" + optionName + "\" is not in correct format, given: " + val; - }, - INDEX_OUT_OF_RANGE: function (val, min, max) { - return "Index \"" + val + "\" is out of range: should be between " + min + " and " + max + "."; - }, - POSITION_NOT_REACHABLE: function (position) { - return "Position \"" + position + "\" is not reachable."; - }, - TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.", - STOP_CALLED_BY_USER: "Event stop() is called by user.", - ANIMATION_INTERRUPTED: "Animation is interrupted by user input.", - ANIMATION_ALREADY_PLAYING: "Animation is already playing.", - NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.", - NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.", - NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.", - NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled" -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/** - * Event type object with event name strings of {@link Flicking} - * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체 - * @type {object} - * @property {"holdStart"} HOLD_START holdStart eventholdStart 이벤트 - * @property {"holdEnd"} HOLD_END holdEnd eventholdEnd 이벤트 - * @property {"moveStart"} MOVE_START moveStart eventmoveStart 이벤트 - * @property {"move"} MOVE move eventmove 이벤트 - * @property {"moveEnd"} MOVE_END moveEnd eventmoveEnd 이벤트 - * @property {"willChange"} WILL_CHANGE willChange eventwillChange 이벤트 - * @property {"changed"} CHANGED changed eventchanged 이벤트 - * @property {"willRestore"} WILL_RESTORE willRestore eventwillRestore 이벤트 - * @property {"restored"} RESTORED restored eventrestored 이벤트 - * @property {"select"} SELECT select eventselect 이벤트 - * @property {"needPanel"} NEED_PANEL needPanel eventneedPanel 이벤트 - * @property {"panelChange"} PANEL_CHANGE panelChange eventpanelChange 이벤트 - * @example - * ```ts - * import { EVENTS } from "@egjs/flicking"; - * EVENTS.MOVE_START; // "moveStart" - * ``` - */ -var EVENTS = { - READY: "ready", - BEFORE_RESIZE: "beforeResize", - AFTER_RESIZE: "afterResize", - HOLD_START: "holdStart", - HOLD_END: "holdEnd", - MOVE_START: "moveStart", - MOVE: "move", - MOVE_END: "moveEnd", - WILL_CHANGE: "willChange", - CHANGED: "changed", - WILL_RESTORE: "willRestore", - RESTORED: "restored", - SELECT: "select", - NEED_PANEL: "needPanel", - VISIBLE_CHANGE: "visibleChange", - REACH_EDGE: "reachEdge", - PANEL_CHANGE: "panelChange" -}; -/** - * An object with all possible predefined literal string for the {@link Flicking#align align} option - * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체 - * @type {object} - * @property {"prev"} PREV left/top align좌/상 정렬 - * @property {"center"} CENTER center align중앙 정렬 - * @property {"next"} NEXT right/bottom align우/하 정렬 - */ -var ALIGN = { - PREV: "prev", - CENTER: "center", - NEXT: "next" -}; -/** - * An object of directions - * @ko 방향을 나타내는 값들을 담고 있는 객체 - * @type {object} - * @property {"PREV"} PREV "left" when {@link Flicking#horizontal horizontal} is true, and "top" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다 - * @property {"NEXT"} NEXT "right" when {@link Flicking#horizontal horizontal} is true, and "bottom" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다 - * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다 - */ -var DIRECTION = { - PREV: "PREV", - NEXT: "NEXT", - NONE: null -}; -/** - * An object with all possible {@link Flicking#moveType moveType}s - * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체 - * @type {object} - * @property {"snap"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"freeScroll"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"strict"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType} - */ -var MOVE_TYPE = { - SNAP: "snap", - FREE_SCROLL: "freeScroll", - STRICT: "strict" -}; -var CLASS = { - VERTICAL: "vertical", - HIDDEN: "flicking-hidden", - DEFAULT_VIRTUAL: "flicking-panel" -}; -/** - * An object with all possible {@link Flicking#circularFallback circularFallback}s - * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체 - * @type {object} - * @property {string} LINEAR "linear" - * @property {string} BOUND "bound" - */ -var CIRCULAR_FALLBACK = { - LINEAR: "linear", - BOUND: "bound" -}; -/** - * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체 - * @type {object} - * @property {string} LTR "ltr" - * @property {string} RTL "rtl" - */ -var ORDER = { - LTR: "ltr", - RTL: "rtl" -}; - -// eslint-disable-next-line @typescript-eslint/ban-types -var merge = function (target) { - var sources = []; - for (var _i = 1; _i < arguments.length; _i++) { - sources[_i - 1] = arguments[_i]; - } - sources.forEach(function (source) { - Object.keys(source).forEach(function (key) { - target[key] = source[key]; - }); - }); - return target; -}; -var getElement = function (el, parent) { - var targetEl = null; - if (isString(el)) { - var parentEl = parent ? parent : document; - var queryResult = parentEl.querySelector(el); - if (!queryResult) { - throw new FlickingError(MESSAGE.ELEMENT_NOT_FOUND(el), CODE.ELEMENT_NOT_FOUND); - } - targetEl = queryResult; - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - targetEl = el; - } - if (!targetEl) { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - return targetEl; -}; -var checkExistence = function (value, nameOnErrMsg) { - if (value == null) { - throw new FlickingError(MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), CODE.VAL_MUST_NOT_NULL); - } -}; -var clamp = function (x, min, max) { - return Math.max(Math.min(x, max), min); -}; -var getFlickingAttached = function (val) { - if (!val) { - throw new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING); - } - return val; -}; -var toArray = function (iterable) { - return [].slice.call(iterable); -}; -var parseAlign$1 = function (align, size) { - var alignPoint; - if (isString(align)) { - switch (align) { - case ALIGN.PREV: - alignPoint = 0; - break; - case ALIGN.CENTER: - alignPoint = 0.5 * size; - break; - case ALIGN.NEXT: - alignPoint = size; - break; - default: - alignPoint = parseArithmeticSize(align, size); - if (alignPoint == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("align", align), CODE.WRONG_OPTION); - } - } - } else { - alignPoint = align; - } - return alignPoint; -}; -var parseBounce = function (bounce, size) { - var parsedBounce; - if (Array.isArray(bounce)) { - parsedBounce = bounce.map(function (val) { - return parseArithmeticSize(val, size); - }); - } else { - var parsedVal = parseArithmeticSize(bounce, size); - parsedBounce = [parsedVal, parsedVal]; - } - return parsedBounce.map(function (val) { - if (val == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("bounce", bounce), CODE.WRONG_OPTION); - } - return val; - }); -}; -var parseArithmeticSize = function (cssValue, base) { - var parsed = parseArithmeticExpression(cssValue); - if (parsed == null) return null; - return parsed.percentage * base + parsed.absolute; -}; -var parseArithmeticExpression = function (cssValue) { - var cssRegex = /(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g; - if (typeof cssValue === "number") { - return { - percentage: 0, - absolute: cssValue - }; - } - var parsed = { - percentage: 0, - absolute: 0 - }; - var idx = 0; - var matchResult = cssRegex.exec(cssValue); - while (matchResult != null) { - var sign = matchResult[1]; - var value = matchResult[2]; - var unit = matchResult[3]; - var parsedValue = parseFloat(value); - if (idx <= 0) { - sign = sign || "+"; - } - // Return default value for values not in good form - if (!sign) { - return null; - } - var signMultiplier = sign === "+" ? 1 : -1; - if (unit === "%") { - parsed.percentage += signMultiplier * (parsedValue / 100); - } else { - parsed.absolute += signMultiplier * parsedValue; - } - // Match next occurrence - ++idx; - matchResult = cssRegex.exec(cssValue); - } - // None-matched - if (idx === 0) { - return null; - } - return parsed; -}; -var parseCSSSizeValue = function (val) { - return isString(val) ? val : val + "px"; -}; -var parsePanelAlign = function (align) { - return typeof align === "object" ? align.panel : align; -}; -var getDirection = function (start, end) { - if (start === end) return DIRECTION.NONE; - return start < end ? DIRECTION.NEXT : DIRECTION.PREV; -}; -var parseElement = function (element) { - if (!Array.isArray(element)) { - element = [element]; - } - var elements = []; - element.forEach(function (el) { - if (isString(el)) { - var tempDiv = document.createElement("div"); - tempDiv.innerHTML = el; - elements.push.apply(elements, __spread(toArray(tempDiv.children))); - while (tempDiv.firstChild) { - tempDiv.removeChild(tempDiv.firstChild); - } - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - elements.push(el); - } else { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - }); - return elements; -}; -var getMinusCompensatedIndex = function (idx, max) { - return idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max); -}; -var includes = function (array, target) { - var e_1, _a; - try { - for (var array_1 = __values(array), array_1_1 = array_1.next(); !array_1_1.done; array_1_1 = array_1.next()) { - var val = array_1_1.value; - if (val === target) return true; - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (array_1_1 && !array_1_1.done && (_a = array_1.return)) _a.call(array_1); - } finally { - if (e_1) throw e_1.error; - } - } - return false; -}; -var isString = function (val) { - return typeof val === "string"; -}; -var circulatePosition = function (pos, min, max) { - var size = max - min; - if (pos < min) { - var offset = (min - pos) % size; - pos = max - offset; - } else if (pos > max) { - var offset = (pos - max) % size; - pos = min + offset; - } - return pos; -}; -var find = function (array, checker) { - var e_2, _a; - try { - for (var array_2 = __values(array), array_2_1 = array_2.next(); !array_2_1.done; array_2_1 = array_2.next()) { - var val = array_2_1.value; - if (checker(val)) { - return val; - } - } - } catch (e_2_1) { - e_2 = { - error: e_2_1 - }; - } finally { - try { - if (array_2_1 && !array_2_1.done && (_a = array_2.return)) _a.call(array_2); - } finally { - if (e_2) throw e_2.error; - } - } - return null; -}; -var findRight = function (array, checker) { - for (var idx = array.length - 1; idx >= 0; idx--) { - var val = array[idx]; - if (checker(val)) { - return val; - } - } - return null; -}; -var findIndex = function (array, checker) { - for (var idx = 0; idx < array.length; idx++) { - if (checker(array[idx])) { - return idx; - } - } - return -1; -}; -var getProgress = function (pos, prev, next) { - return (pos - prev) / (next - prev); -}; -// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -var getStyle = function (el) { - return window.getComputedStyle(el) || el.currentStyle; -}; -var setSize = function (el, _a) { - var width = _a.width, - height = _a.height; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - el.style.width = width + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - el.style.height = height + "px"; - } - } -}; -var isBetween = function (val, min, max) { - return val >= min && val <= max; -}; -var circulateIndex = function (index, max) { - if (index >= max) { - return index % max; - } else if (index < 0) { - return getMinusCompensatedIndex((index + 1) % max - 1, max); - } else { - return index; - } -}; -var range = function (end) { - var arr = new Array(end); - for (var i = 0; i < end; i++) { - arr[i] = i; - } - return arr; -}; -var getElementSize = function (_a) { - var el = _a.el, - horizontal = _a.horizontal, - useFractionalSize = _a.useFractionalSize, - useOffset = _a.useOffset, - style = _a.style; - var size = 0; - if (useFractionalSize) { - var baseSize = parseFloat(horizontal ? style.width : style.height) || 0; - var isBorderBoxSizing = style.boxSizing === "border-box"; - var border = horizontal ? parseFloat(style.borderLeftWidth || "0") + parseFloat(style.borderRightWidth || "0") : parseFloat(style.borderTopWidth || "0") + parseFloat(style.borderBottomWidth || "0"); - if (isBorderBoxSizing) { - size = useOffset ? baseSize : baseSize - border; - } else { - var padding = horizontal ? parseFloat(style.paddingLeft || "0") + parseFloat(style.paddingRight || "0") : parseFloat(style.paddingTop || "0") + parseFloat(style.paddingBottom || "0"); - size = useOffset ? baseSize + padding + border : baseSize + padding; - } - } else { - var sizeStr = horizontal ? "Width" : "Height"; - size = useOffset ? el["offset" + sizeStr] : el["client" + sizeStr]; - } - return Math.max(size, 0); -}; -var setPrototypeOf = Object.setPrototypeOf || function (obj, proto) { - obj.__proto__ = proto; - return obj; -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/** - * Special type of known error that {@link Flicking} throws. - * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러 - * @property {number} code Error code에러 코드 - * @property {string} message Error message에러 메시지 - * @see {@link ERROR_CODE ERROR_CODE} - * @example - * ```ts - * import Flicking, { FlickingError, ERROR_CODES } from "@egjs/flicking"; - * try { - * const flicking = new Flicking(".flicking-viewport") - * } catch (e) { - * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) { - * console.error("Element not found") - * } - * } - * ``` - */ -var FlickingError = /*#__PURE__*/function (_super) { - __extends(FlickingError, _super); - /** - * @param message Error message에러 메시지 - * @param code Error code에러 코드 - */ - function FlickingError(message, code) { - var _this = _super.call(this, message) || this; - setPrototypeOf(_this, FlickingError.prototype); - _this.name = "FlickingError"; - _this.code = code; - return _this; - } - return FlickingError; -}(Error); - -/** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - */ -var Viewport = /*#__PURE__*/function () { - /** - * @param el A viewport element뷰포트 엘리먼트 - */ - function Viewport(flicking, el) { - this._flicking = flicking; - this._el = el; - this._width = 0; - this._height = 0; - this._padding = { - left: 0, - right: 0, - top: 0, - bottom: 0 - }; - this._isBorderBoxSizing = false; - } - var __proto = Viewport.prototype; - Object.defineProperty(__proto, "element", { - /** - * A viewport(root) element - * @ko 뷰포트(root) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "width", { - /** - * Viewport width, without paddings - * @ko 뷰포트 너비 - * @type {number} - * @readonly - */ - get: function () { - return this._width - this._padding.left - this._padding.right; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Viewport height, without paddings - * @ko 뷰포트 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height - this._padding.top - this._padding.bottom; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "padding", { - /** - * Viewport paddings - * @ko 뷰포트 CSS padding 값 - * @type {object} - * @property {number} left CSS `padding-left` - * @property {number} right CSS `padding-right` - * @property {number} top CSS `padding-top` - * @property {number} bottom CSS `padding-bottom` - * @readonly - */ - get: function () { - return this._padding; - }, - enumerable: false, - configurable: true - }); - /** - * Change viewport's size. - * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property - * @ko 뷰포트 크기를 변경합니다. - * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New viewport size새 뷰포트 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - */ - __proto.setSize = function (_a) { - var width = _a.width, - height = _a.height; - var el = this._el; - var padding = this._padding; - var isBorderBoxSizing = this._isBorderBoxSizing; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - var newWidth = isBorderBoxSizing ? width + padding.left + padding.right : width; - el.style.width = newWidth + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - var newHeight = isBorderBoxSizing ? height + padding.top + padding.bottom : height; - el.style.height = newHeight + "px"; - } - } - this.resize(); - }; - /** - * Update width/height to the current viewport element's size - * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다 - */ - __proto.resize = function () { - var el = this._el; - var elStyle = getStyle(el); - var useFractionalSize = this._flicking.useFractionalSize; - this._width = getElementSize({ - el: el, - horizontal: true, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._height = getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._padding = { - left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0, - right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0, - top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0, - bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0 - }; - this._isBorderBoxSizing = elStyle.boxSizing === "border-box"; - }; - return Viewport; -}(); - -var AutoResizer = /*#__PURE__*/function () { - function AutoResizer(flicking) { - var _this = this; - this._onResize = function () { - var flicking = _this._flicking; - var resizeDebounce = flicking.resizeDebounce; - var maxResizeDebounce = flicking.maxResizeDebounce; - if (resizeDebounce <= 0) { - void flicking.resize(); - } else { - if (_this._maxResizeDebounceTimer <= 0) { - if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) { - _this._maxResizeDebounceTimer = window.setTimeout(_this._doScheduledResize, maxResizeDebounce); - } - } - if (_this._resizeTimer > 0) { - clearTimeout(_this._resizeTimer); - _this._resizeTimer = 0; - } - _this._resizeTimer = window.setTimeout(_this._doScheduledResize, resizeDebounce); - } - }; - this._doScheduledResize = function () { - clearTimeout(_this._resizeTimer); - clearTimeout(_this._maxResizeDebounceTimer); - _this._maxResizeDebounceTimer = -1; - _this._resizeTimer = -1; - void _this._flicking.resize(); - }; - // eslint-disable-next-line @typescript-eslint/member-ordering - this._skipFirstResize = function () { - var isFirstResize = true; - return function () { - if (isFirstResize) { - isFirstResize = false; - return; - } - _this._onResize(); - }; - }(); - this._flicking = flicking; - this._enabled = false; - this._resizeObserver = null; - this._resizeTimer = -1; - this._maxResizeDebounceTimer = -1; - } - var __proto = AutoResizer.prototype; - Object.defineProperty(__proto, "enabled", { - get: function () { - return this._enabled; - }, - enumerable: false, - configurable: true - }); - __proto.enable = function () { - var flicking = this._flicking; - var viewport = flicking.viewport; - if (this._enabled) { - this.disable(); - } - if (flicking.useResizeObserver && !!window.ResizeObserver) { - var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0; - var resizeObserver = viewportSizeNot0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize); - resizeObserver.observe(flicking.viewport.element); - this._resizeObserver = resizeObserver; - } else { - window.addEventListener("resize", this._onResize); - } - this._enabled = true; - return this; - }; - __proto.disable = function () { - if (!this._enabled) return this; - var resizeObserver = this._resizeObserver; - if (resizeObserver) { - resizeObserver.disconnect(); - this._resizeObserver = null; - } else { - window.removeEventListener("resize", this._onResize); - } - this._enabled = false; - return this; - }; - return AutoResizer; -}(); - -/** - * @internal - */ -var VanillaElementProvider = /*#__PURE__*/function () { - function VanillaElementProvider(element) { - this._element = element; - this._rendered = true; - } - var __proto = VanillaElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - __proto.show = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement !== cameraEl) { - cameraEl.appendChild(el); - this._rendered = true; - } - }; - __proto.hide = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement === cameraEl) { - cameraEl.removeChild(el); - this._rendered = false; - } - }; - return VanillaElementProvider; -}(); - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/** - * @internal - */ -var VirtualElementProvider = /*#__PURE__*/function () { - function VirtualElementProvider(flicking) { - this._flicking = flicking; - } - var __proto = VirtualElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._virtualElement.nativeElement; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._virtualElement.visible; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "_virtualElement", { - get: function () { - var flicking = this._flicking; - var elIndex = this._panel.elementIndex; - var virtualElements = flicking.virtual.elements; - return virtualElements[elIndex]; - }, - enumerable: false, - configurable: true - }); - __proto.init = function (panel) { - this._panel = panel; - }; - __proto.show = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - __proto.hide = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - return VirtualElementProvider; -}(); - -/** - * A manager class to add / remove virtual panels - */ -var VirtualManager = /*#__PURE__*/function () { - function VirtualManager(flicking, options) { - var _a, _b, _c, _d; - this._flicking = flicking; - this._renderPanel = (_a = options === null || options === void 0 ? void 0 : options.renderPanel) !== null && _a !== void 0 ? _a : function () { - return ""; - }; - this._initialPanelCount = (_b = options === null || options === void 0 ? void 0 : options.initialPanelCount) !== null && _b !== void 0 ? _b : -1; - this._cache = (_c = options === null || options === void 0 ? void 0 : options.cache) !== null && _c !== void 0 ? _c : false; - this._panelClass = (_d = options === null || options === void 0 ? void 0 : options.panelClass) !== null && _d !== void 0 ? _d : CLASS.DEFAULT_VIRTUAL; - this._elements = []; - } - var __proto = VirtualManager.prototype; - Object.defineProperty(__proto, "elements", { - get: function () { - return this._elements; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderPanel", { - // Options - /** - * A rendering function for the panel element's innerHTML - * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @type {function} - * @param {VirtualPanel} panel Instance of the panel패널 인스턴스 - * @param {number} index Index of the panel패널 인덱스 - * @default "() => {}" - */ - get: function () { - return this._renderPanel; - }, - set: function (val) { - this._renderPanel = val; - this._flicking.renderer.panels.forEach(function (panel) { - return panel.uncacheRenderResult(); - }); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialPanelCount", { - /** - * Initial panel count to render - * @ko 최초로 렌더링할 패널의 개수 - * @readonly - * @type {number} - * @default -1 - */ - get: function () { - return this._initialPanelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cache", { - /** - * Whether to cache rendered panel's innerHTML - * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @type {boolean} - * @default false - */ - get: function () { - return this._cache; - }, - set: function (val) { - this._cache = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelClass", { - /** - * The class name that will be applied to rendered panel elements - * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @type {string} - * @default "flicking-panel" - */ - get: function () { - return this._panelClass; - }, - set: function (val) { - this._panelClass = val; - }, - enumerable: false, - configurable: true - }); - __proto.init = function () { - var flicking = this._flicking; - if (!flicking.virtualEnabled) return; - if (!flicking.externalRenderer && !flicking.renderExternal) { - this._initVirtualElements(); - } - var virtualElements = flicking.camera.children; - this._elements = virtualElements.map(function (el) { - return { - nativeElement: el, - visible: true - }; - }); - }; - __proto.show = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = true; - if (nativeEl.style.display) { - nativeEl.style.display = ""; - } - }; - __proto.hide = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = false; - nativeEl.style.display = "none"; - }; - /** - * Add new virtual panels at the end of the list - * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.append = function (count) { - if (count === void 0) { - count = 1; - } - var flicking = this._flicking; - return this.insert(flicking.panels.length, count); - }; - /** - * Add new virtual panels at the start of the list - * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.prepend = function (count) { - if (count === void 0) { - count = 1; - } - return this.insert(0, count); - }; - /** - * Add new virtual panels at the given index - * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.insert = function (index, count) { - if (count === void 0) { - count = 1; - } - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchInsert({ - index: index, - elements: range(count), - hasDOMInElements: false - }); - }; - /** - * Remove panels at the given index - * @ko 주어진 인덱스에서 패널들을 삭제합니다 - * @param {number} count The number of panels to remove삭제할 패널의 개수 - * @returns {Array} The panels removed삭제된 패널들 - */ - __proto.remove = function (index, count) { - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchRemove({ - index: index, - deleteCount: count, - hasDOMInElements: false - }); - }; - __proto._initVirtualElements = function () { - var _this = this; - var flicking = this._flicking; - var cameraElement = flicking.camera.element; - var panelsPerView = flicking.panelsPerView; - var fragment = document.createDocumentFragment(); - var newElements = range(panelsPerView + 1).map(function (idx) { - var panelEl = document.createElement("div"); - panelEl.className = _this._panelClass; - panelEl.dataset.elementIndex = idx.toString(); - return panelEl; - }); - newElements.forEach(function (el) { - fragment.appendChild(el); - }); - cameraElement.appendChild(fragment); - }; - return VirtualManager; -}(); - -/** - * All possible @egjs/axes event keys - * @internal - */ -var EVENT = { - HOLD: "hold", - CHANGE: "change", - RELEASE: "release", - ANIMATION_END: "animationEnd", - FINISH: "finish" -}; -/** - * An Axis key that Flicking uses - * @internal - */ -var POSITION_KEY = "flick"; - -var STATE_TYPE; -(function (STATE_TYPE) { - STATE_TYPE[STATE_TYPE["IDLE"] = 0] = "IDLE"; - STATE_TYPE[STATE_TYPE["HOLDING"] = 1] = "HOLDING"; - STATE_TYPE[STATE_TYPE["DRAGGING"] = 2] = "DRAGGING"; - STATE_TYPE[STATE_TYPE["ANIMATING"] = 3] = "ANIMATING"; - STATE_TYPE[STATE_TYPE["DISABLED"] = 4] = "DISABLED"; -})(STATE_TYPE || (STATE_TYPE = {})); -/** - * A component that shows the current status of the user input or the animation - * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트 - * @internal - */ -var State = /*#__PURE__*/function () { - function State() { - this._delta = 0; - this._targetPanel = null; - } - var __proto = State.prototype; - Object.defineProperty(__proto, "delta", { - /** - * A sum of delta values of change events from the last hold event of Axes - * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산 - * @type {number} - * @readonly - */ - get: function () { - return this._delta; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "targetPanel", { - /** - * A panel to set as {@link Control#activePanel} after the animation is finished - * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널 - * @type {number} - * @readonly - */ - get: function () { - return this._targetPanel; - }, - set: function (val) { - this._targetPanel = val; - }, - enumerable: false, - configurable: true - }); - /** - * An callback which is called when state has changed to this state - * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수 - * @param {State} prevState An previous state이전 상태값 - * @return {void} - */ - __proto.onEnter = function (prevState) { - this._delta = prevState._delta; - this._targetPanel = prevState._targetPanel; - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onHold = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onChange = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onRelease = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onAnimationEnd = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onFinish = function (ctx) { - // DO NOTHING - }; - __proto._moveToChangedPosition = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var delta = axesEvent.delta[POSITION_KEY]; - if (!delta) { - return; - } - this._delta += delta; - var camera = flicking.camera; - var prevPosition = camera.position; - var position = axesEvent.pos[POSITION_KEY]; - var newPosition = flicking.circularEnabled ? circulatePosition(position, camera.range.min, camera.range.max) : position; - camera.lookAt(newPosition); - var moveEvent = new Component.ComponentEvent(EVENTS.MOVE, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(0, axesEvent.delta[POSITION_KEY]), - axesEvent: axesEvent - }); - flicking.trigger(moveEvent); - if (moveEvent.isCanceled()) { - // Return to previous position - camera.lookAt(prevPosition); - transitTo(STATE_TYPE.DISABLED); - } - }; - return State; -}(); - -/** - * A default state when there's no user input and no animation's playing - * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태 - * @internal - */ -var IdleState = /*#__PURE__*/function (_super) { - __extends(IdleState, _super); - function IdleState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - return _this; - } - var __proto = IdleState.prototype; - __proto.onEnter = function () { - this._delta = 0; - this._targetPanel = null; - }; - __proto.onHold = function (ctx) { - // Shouldn't do any action until any panels on flicking area - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - if (flicking.renderer.panelCount <= 0) { - transitTo(STATE_TYPE.DISABLED); - return; - } - var holdStartEvent = new Component.ComponentEvent(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.HOLDING); - } - }; - // By methods call - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var controller = flicking.control.controller; - var animatingContext = controller.animatingContext; - var moveStartEvent = new Component.ComponentEvent(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger AnimatingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.ANIMATING).onChange(ctx); - } - }; - return IdleState; -}(State); - -/** - * A state that activates when user's holding the Flicking area, but not moved a single pixel yet - * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태 - * @internal - */ -var HoldingState = /*#__PURE__*/function (_super) { - __extends(HoldingState, _super); - function HoldingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - _this._releaseEvent = null; - return _this; - } - var __proto = HoldingState.prototype; - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var inputEvent = axesEvent.inputEvent; - var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY; - var moveStartEvent = new Component.ComponentEvent(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(0, -offset), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger DraggingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.DRAGGING).onChange(ctx); - } - }; - __proto.onRelease = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - flicking.trigger(new Component.ComponentEvent(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (axesEvent.delta.flick !== 0) { - // Sometimes "release" event on axes triggered before "change" event - // Especially if user flicked panel fast in really short amount of time - // if delta is not zero, that means above case happened. - // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END - // At least one move event should be included between holdStart and holdEnd - axesEvent.setTo({ - flick: flicking.camera.position - }, 0); - transitTo(STATE_TYPE.IDLE); - return; - } - // Can't handle select event here, - // As "finish" axes event happens - this._releaseEvent = axesEvent; - }; - __proto.onFinish = function (ctx) { - var e_1, _a; - var flicking = ctx.flicking, - transitTo = ctx.transitTo; - // Should transite to IDLE state before select event - // As user expects hold is already finished - transitTo(STATE_TYPE.IDLE); - if (!this._releaseEvent) { - return; - } - // Handle release event here - // To prevent finish event called twice - var releaseEvent = this._releaseEvent; - // Static click - /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */ - var srcEvent = releaseEvent.inputEvent.srcEvent; - var clickedElement; - if (srcEvent.type === "touchend") { - var touchEvent = srcEvent; - var touch = touchEvent.changedTouches[0]; - clickedElement = document.elementFromPoint(touch.clientX, touch.clientY); - } else { - clickedElement = srcEvent.target; - } - /* eslint-enable */ - var panels = flicking.renderer.panels; - var clickedPanel = null; - try { - for (var panels_1 = __values(panels), panels_1_1 = panels_1.next(); !panels_1_1.done; panels_1_1 = panels_1.next()) { - var panel = panels_1_1.value; - if (panel.contains(clickedElement)) { - clickedPanel = panel; - break; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (panels_1_1 && !panels_1_1.done && (_a = panels_1.return)) _a.call(panels_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (clickedPanel) { - var cameraPosition = flicking.camera.position; - var clickedPanelPosition = clickedPanel.position; - flicking.trigger(new Component.ComponentEvent(EVENTS.SELECT, { - index: clickedPanel.index, - panel: clickedPanel, - // Direction to the clicked panel - direction: getDirection(cameraPosition, clickedPanelPosition) - })); - } - }; - return HoldingState; -}(State); - -/** - * A state that activates when user's dragging the Flicking area - * @ko 사용자가 드래깅중인 상태 - * @internal - */ -var DraggingState = /*#__PURE__*/function (_super) { - __extends(DraggingState, _super); - function DraggingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DraggingState.prototype; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onRelease = function (ctx) { - var _a; - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Update last position to cope with Axes's animating behavior - // Axes uses start position when animation start - flicking.trigger(new Component.ComponentEvent(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (flicking.renderer.panelCount <= 0) { - // There're no panels - transitTo(STATE_TYPE.IDLE); - return; - } - transitTo(STATE_TYPE.ANIMATING); - var control = flicking.control; - var position = axesEvent.destPos[POSITION_KEY]; - var duration = Math.max(axesEvent.duration, flicking.duration); - try { - void control.moveToPosition(position, duration, axesEvent); - } catch (err) { - transitTo(STATE_TYPE.IDLE); - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = flicking.camera.position, _a), 0); - } - }; - return DraggingState; -}(State); - -/** - * A state that activates when Flicking's animating by user input or method call - * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태 - * @internal - */ -var AnimatingState = /*#__PURE__*/function (_super) { - __extends(AnimatingState, _super); - function AnimatingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = AnimatingState.prototype; - __proto.onHold = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var targetPanel = this._targetPanel; - var control = flicking.control; - this._delta = 0; - flicking.control.updateInput(); - if (flicking.changeOnHold && targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - var holdStartEvent = new Component.ComponentEvent(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.DRAGGING); - } - }; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onFinish = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var control = flicking.control; - var controller = control.controller; - var animatingContext = controller.animatingContext; - transitTo(STATE_TYPE.IDLE); - flicking.trigger(new Component.ComponentEvent(EVENTS.MOVE_END, { - isTrusted: axesEvent.isTrusted, - direction: getDirection(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - })); - var targetPanel = this._targetPanel; - if (targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - }; - return AnimatingState; -}(State); - -/** - * A state that activates when Flicking is stopped by event's `stop` method - * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태 - * @internal - */ -var DisabledState = /*#__PURE__*/function (_super) { - __extends(DisabledState, _super); - function DisabledState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DisabledState.prototype; - __proto.onAnimationEnd = function (ctx) { - var transitTo = ctx.transitTo; - transitTo(STATE_TYPE.IDLE); - }; - __proto.onChange = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Can stop Axes's change event - axesEvent.stop(); - transitTo(STATE_TYPE.IDLE); - }; - __proto.onRelease = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // This is needed when stopped hold start event - if (axesEvent.delta.flick === 0) { - transitTo(STATE_TYPE.IDLE); - } - }; - return DisabledState; -}(State); - -/** - * @internal - */ -var StateMachine = /*#__PURE__*/function () { - function StateMachine() { - var _this = this; - this.transitTo = function (nextStateType) { - var nextState; - switch (nextStateType) { - case STATE_TYPE.IDLE: - nextState = new IdleState(); - break; - case STATE_TYPE.HOLDING: - nextState = new HoldingState(); - break; - case STATE_TYPE.DRAGGING: - nextState = new DraggingState(); - break; - case STATE_TYPE.ANIMATING: - nextState = new AnimatingState(); - break; - case STATE_TYPE.DISABLED: - nextState = new DisabledState(); - break; - } - nextState.onEnter(_this._state); - _this._state = nextState; - return _this._state; - }; - this._state = new IdleState(); - } - var __proto = StateMachine.prototype; - Object.defineProperty(__proto, "state", { - get: function () { - return this._state; - }, - enumerable: false, - configurable: true - }); - __proto.fire = function (eventType, externalCtx) { - var currentState = this._state; - var ctx = __assign(__assign({}, externalCtx), { - transitTo: this.transitTo - }); - switch (eventType) { - case EVENT.HOLD: - currentState.onHold(ctx); - break; - case EVENT.CHANGE: - currentState.onChange(ctx); - break; - case EVENT.RELEASE: - currentState.onRelease(ctx); - break; - case EVENT.ANIMATION_END: - currentState.onAnimationEnd(ctx); - break; - case EVENT.FINISH: - currentState.onFinish(ctx); - break; - } - }; - return StateMachine; -}(); - -/** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @internal - */ -var AxesController = /*#__PURE__*/function () { - /** */ - function AxesController() { - var _this = this; - this._onAxesHold = function () { - _this._dragged = false; - }; - this._onAxesChange = function () { - var _a; - _this._dragged = !!((_a = _this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()); - }; - this._preventClickWhenDragged = function (e) { - if (_this._dragged) { - e.preventDefault(); - e.stopPropagation(); - } - _this._dragged = false; - }; - this._resetInternalValues(); - this._stateMachine = new StateMachine(); - } - var __proto = AxesController.prototype; - Object.defineProperty(__proto, "axes", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스 - * @type {Axes | null} - * @see https://naver.github.io/egjs-axes/docs/api/Axes - * @readonly - */ - get: function () { - return this._axes; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panInput", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스 - * @type {PanInput | null} - * @see https://naver.github.io/egjs-axes/docs/api/PanInput - * @readonly - */ - get: function () { - return this._panInput; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "stateMachine", { - /** - * @internal - */ - get: function () { - return this._stateMachine; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "state", { - /** - * A activated {@link State} that shows the current status of the user input or the animation - * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다 - * @type {State} - */ - get: function () { - return this._stateMachine.state; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animatingContext", { - /** - * A context of the current animation playing - * @ko 현재 재생중인 애니메이션 정보 - * @type {object} - * @property {number} start A start position of the animation애니메이션 시작 지점 - * @property {number} end A end position of the animation애니메이션 끝 지점 - * @property {number} offset camera offset카메라 오프셋 - * @readonly - */ - get: function () { - return this._animatingContext; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current control parameters of the Axes instance - * @ko 활성화된 현재 Axes 패러미터들 - * @type {ControlParams} - */ - get: function () { - var axes = this._axes; - if (!axes) { - return { - range: { - min: 0, - max: 0 - }, - position: 0, - circular: false - }; - } - var axis = axes.axis[POSITION_KEY]; - return { - range: { - min: axis.range[0], - max: axis.range[1] - }, - circular: axis.circular[0], - position: this.position - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "enabled", { - /** - * A Boolean indicating whether the user input is enabled - * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()) !== null && _b !== void 0 ? _b : false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값 - * @type {number} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.get([POSITION_KEY])[POSITION_KEY]) !== null && _b !== void 0 ? _b : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값 - * @type {number[]} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].range) !== null && _b !== void 0 ? _b : [0, 0]; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * Actual bounce size(px) - * @ko 적용된 bounce 크기(px 단위) - * @type {number[]} - * @readonly - */ - get: function () { - var _a; - return (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].bounce; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize AxesController - * @ko AxesController를 초기화합니다 - * @param {Flicking} flicking An instance of Flicking - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - var _a; - var _this = this; - this._flicking = flicking; - this._axes = new Axes((_a = {}, _a[POSITION_KEY] = { - range: [0, 0], - circular: false, - bounce: [0, 0] - }, _a), { - deceleration: flicking.deceleration, - interruptable: flicking.interruptable, - nested: flicking.nested, - easing: flicking.easing - }); - this._panInput = new Axes.PanInput(flicking.viewport.element, { - inputType: flicking.inputType, - threshold: 1, - iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold, - preventDefaultOnDrag: flicking.preventDefaultOnDrag, - scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1], - releaseOnScroll: true - }); - var axes = this._axes; - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], this._panInput); - var _loop_1 = function (key) { - var eventType = EVENT[key]; - axes.on(eventType, function (e) { - _this._stateMachine.fire(eventType, { - flicking: flicking, - axesEvent: e - }); - }); - }; - for (var key in EVENT) { - _loop_1(key); - } - return this; - }; - /** - * Destroy AxesController and return to initial state - * @ko AxesController를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - var _a; - if (this._axes) { - this.removePreventClickHandler(); - this._axes.destroy(); - } - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.destroy(); - this._resetInternalValues(); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @chainable - * @return {this} - */ - __proto.updateAnimation = function (position, duration) { - var _a; - var _b; - this._animatingContext = __assign(__assign({}, this._animatingContext), { - end: position - }); - (_b = this._axes) === null || _b === void 0 ? void 0 : _b.updateAnimation({ - destPos: (_a = {}, _a[POSITION_KEY] = position, _a), - duration: duration - }); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var _a; - (_a = this._axes) === null || _a === void 0 ? void 0 : _a.stopAnimation(); - return this; - }; - /** - * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before - * {@link AxesController#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.update = function (controlParams) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var axes = this._axes; - var axis = axes.axis[POSITION_KEY]; - axis.circular = [controlParams.circular, controlParams.circular]; - axis.range = [controlParams.range.min, controlParams.range.max]; - axis.bounce = parseBounce(flicking.bounce, camera.size); - axes.axisManager.set((_a = {}, _a[POSITION_KEY] = controlParams.position, _a)); - return this; - }; - /** - * Attach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다 - * @return {this} - */ - __proto.addPreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.on(EVENT.HOLD, this._onAxesHold); - axes.on(EVENT.CHANGE, this._onAxesChange); - cameraEl.addEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Detach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다 - * @return {this} - */ - __proto.removePreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.off(EVENT.HOLD, this._onAxesHold); - axes.off(EVENT.CHANGE, this._onAxesChange); - cameraEl.removeEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다. - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.animateTo = function (position, duration, axesEvent) { - var _this = this; - var _a; - var axes = this._axes; - var state = this._stateMachine.state; - if (!axes) { - return Promise.reject(new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING)); - } - var startPos = axes.get([POSITION_KEY])[POSITION_KEY]; - if (startPos === position) { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.lookAt(position); - if (state.targetPanel) { - flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (_a = axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) !== null && _a !== void 0 ? _a : false); - } - return Promise.resolve(); - } - this._animatingContext = { - start: startPos, - end: position, - offset: 0 - }; - var animate = function () { - var _a, _b; - var resetContext = function () { - _this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - }; - axes.once(EVENT.FINISH, resetContext); - if (axesEvent) { - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = position, _a), duration); - } else { - axes.setTo((_b = {}, _b[POSITION_KEY] = position, _b), duration); - } - }; - return new Promise(function (resolve, reject) { - var animationFinishHandler = function () { - axes.off(EVENT.HOLD, interruptionHandler); - resolve(); - }; - var interruptionHandler = function () { - axes.off(EVENT.FINISH, animationFinishHandler); - reject(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED)); - }; - axes.once(EVENT.FINISH, animationFinishHandler); - axes.once(EVENT.HOLD, interruptionHandler); - animate(); - }); - }; - __proto.updateDirection = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var panInput = this._panInput; - axes.disconnect(panInput); - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput); - panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1]; - }; - __proto._resetInternalValues = function () { - this._flicking = null; - this._axes = null; - this._panInput = null; - this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - this._dragged = false; - }; - return AxesController; -}(); - -/** - * A component that manages inputs and animation of Flicking - * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트 - */ -var Control = /*#__PURE__*/function () { - /** */ - function Control() { - this._flicking = null; - this._controller = new AxesController(); - this._activePanel = null; - } - var __proto = Control.prototype; - Object.defineProperty(__proto, "controller", { - /** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @type {AxesController} - * @readonly - */ - get: function () { - return this._controller; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activeIndex", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : -1; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePanel", { - /** - * An active panel - * @ko 현재 선택된 패널 - * @type {Panel | null} - * @readonly - */ - get: function () { - return this._activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.holding; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Control - * @ko Control을 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._controller.init(flicking); - return this; - }; - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._controller.destroy(); - this._flicking = null; - this._activePanel = null; - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - this._controller.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - this._controller.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - this._controller.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우 - * @return {this} - */ - __proto.updateAnimation = function (panel, duration, direction) { - var state = this._controller.state; - var position = this._getPosition(panel, direction !== null && direction !== void 0 ? direction : DIRECTION.NONE); - state.targetPanel = panel; - this._controller.updateAnimation(position, duration); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var state = this._controller.state; - state.targetPanel = null; - this._controller.stopAnimation(); - return this; - }; - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - camera.lookAt(camera.clampToReachablePosition(activePanel.position)); - } - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._controller.update(camera.controlParams); - return this; - }; - /** - * Reset {@link Control#activePanel activePanel} to `null` - * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다 - * @chainable - * @return {this} - */ - __proto.resetActive = function () { - this._activePanel = null; - return this; - }; - /** - * Move {@link Camera} to the given panel - * @ko {@link Camera}를 해당 패널 위로 이동합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {object} options An options object옵션 오브젝트 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveToPanel = function (panel, _a) { - var duration = _a.duration, - _b = _a.direction, - direction = _b === void 0 ? DIRECTION.NONE : _b, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var position; - return __generator(this, function (_c) { - position = this._getPosition(panel, direction); - this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction); - return [2 /*return*/, this._animateToPosition({ - position: position, - duration: duration, - newActivePanel: panel, - axesEvent: axesEvent - })]; - }); - }); - }; - /** - * @internal - */ - __proto.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - var _a; - var flicking = getFlickingAttached(this._flicking); - this._activePanel = newActivePanel; - this._nextPanel = null; - flicking.camera.updateAdaptiveHeight(); - if (newActivePanel !== prevActivePanel) { - flicking.trigger(new Component.ComponentEvent(EVENTS.CHANGED, { - index: newActivePanel.index, - panel: newActivePanel, - prevIndex: (_a = prevActivePanel === null || prevActivePanel === void 0 ? void 0 : prevActivePanel.index) !== null && _a !== void 0 ? _a : -1, - prevPanel: prevActivePanel, - isTrusted: isTrusted, - direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE - })); - } else { - flicking.trigger(new Component.ComponentEvent(EVENTS.RESTORED, { - isTrusted: isTrusted - })); - } - }; - /** - * @internal - */ - __proto.copy = function (control) { - this._flicking = control._flicking; - this._activePanel = control._activePanel; - this._controller = control._controller; - }; - __proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE; - var camera = flicking.camera; - var activePanel = this._activePanel; - var event = new Component.ComponentEvent(triggeringEvent, { - index: panel.index, - panel: panel, - isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false, - direction: direction !== null && direction !== void 0 ? direction : getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position) - }); - this._nextPanel = panel; - flicking.trigger(event); - if (event.isCanceled()) { - throw new FlickingError(MESSAGE.STOP_CALLED_BY_USER, CODE.STOP_CALLED_BY_USER); - } - }; - __proto._animateToPosition = function (_a) { - var position = _a.position, - duration = _a.duration, - newActivePanel = _a.newActivePanel, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var flicking, animate, state; - var _this = this; - return __generator(this, function (_b) { - flicking = getFlickingAttached(this._flicking); - animate = function () { - return _this._controller.animateTo(position, duration, axesEvent); - }; - state = this._controller.state; - state.targetPanel = newActivePanel; - if (duration <= 0) { - return [2 /*return*/, animate()]; - } else { - return [2 /*return*/, animate().then(function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 /*yield*/, flicking.renderer.render()]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }).catch(function (err) { - if (axesEvent && err instanceof FlickingError && err.code === CODE.ANIMATION_INTERRUPTED) return; - throw err; - })]; - } - }); - }); - }; - - __proto._getPosition = function (panel, direction) { - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var position = panel.position; - var nearestAnchor = camera.findNearestAnchor(position); - if (panel.removed || !nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(panel.position), CODE.POSITION_NOT_REACHABLE); - } - if (!camera.canReach(panel)) { - // Override position & panel if that panel is not reachable - position = nearestAnchor.position; - panel = nearestAnchor.panel; - } else if (flicking.circularEnabled) { - // Circular mode is enabled, find nearest distance to panel - var camPos_1 = this._controller.position; // Actual position of the Axes - var camRangeDiff = camera.rangeDiff; - var possiblePositions = [position, position + camRangeDiff, position - camRangeDiff].filter(function (pos) { - if (direction === DIRECTION.NONE) return true; - return direction === DIRECTION.PREV ? pos <= camPos_1 : pos >= camPos_1; - }); - position = possiblePositions.reduce(function (nearestPosition, pos) { - if (Math.abs(camPos_1 - pos) < Math.abs(camPos_1 - nearestPosition)) { - return pos; - } else { - return nearestPosition; - } - }, Infinity); - } - return position; - }; - return Control; -}(); - -/** - * A data component that has actual position where the camera should be stopped at - * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트 - */ -var AnchorPoint = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 객체 - * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스 - * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표 - * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel} - */ - function AnchorPoint(_a) { - var index = _a.index, - position = _a.position, - panel = _a.panel; - this._index = index; - this._pos = position; - this._panel = panel; - } - var __proto = AnchorPoint.prototype; - Object.defineProperty(__proto, "index", { - /** - * Index of AnchorPoint - * @ko AnchorPoint의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of AnchorPoint - * @ko AnchorPoint의 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._pos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panel", { - /** - * A {@link Panel} instance AnchorPoint is referencing to - * @ko AnchorPoint가 참조하고 있는 {@link Panel} - * @type {Panel} - * @readonly - */ - get: function () { - return this._panel; - }, - enumerable: false, - configurable: true - }); - return AnchorPoint; -}(); - -/** - * A {@link Control} that uses a release momentum to choose destination panel - * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control} - */ -var SnapControl = /*#__PURE__*/function (_super) { - __extends(SnapControl, _super); - /** */ - function SnapControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? Infinity : _b; - var _this = _super.call(this) || this; - _this._count = count; - return _this; - } - var __proto = SnapControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels can go after release - * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수 - * @type {number} - * @default Infinity - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activeAnchor = camera.findActiveAnchor(); - var anchorAtCamera = camera.findNearestAnchor(camera.position); - var state = this._controller.state; - if (!activeAnchor || !anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor); - var posDelta = flicking.animating ? state.delta : position - camera.position; - var absPosDelta = Math.abs(posDelta); - var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta; - var targetAnchor; - if (snapDelta >= snapThreshold && snapDelta > 0) { - // Move to anchor at position - targetAnchor = this._findSnappedAnchor(position, anchorAtCamera); - } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) { - // Move to the adjacent panel - targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera); - } else { - // Fallback to nearest panel from current camera - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent); - return this._animateToPosition({ - position: camera.clampToReachablePosition(targetAnchor.position), - duration: duration, - newActivePanel: targetAnchor.panel, - axesEvent: axesEvent - }); - }; - __proto._findSnappedAnchor = function (position, anchorAtCamera) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var count = this._count; - var currentPos = camera.position; - var clampedPosition = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtCamera || !anchorAtPosition) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE); - } - if (!isFinite(count)) { - return anchorAtPosition; - } - var panelCount = flicking.panelCount; - var anchors = camera.anchorPoints; - var loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff); - if (position > currentPos && anchorAtPosition.index < anchorAtCamera.index || anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount += 1; - } else if (position < currentPos && anchorAtPosition.index > anchorAtCamera.index || anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount -= 1; - } - var circularIndexOffset = loopCount * panelCount; - var anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset; - if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) { - var anchor = anchors[anchorAtPosition.index]; - return new AnchorPoint({ - index: anchor.index, - position: anchor.position + loopCount * camera.rangeDiff, - panel: anchor.panel - }); - } - if (flicking.circularEnabled) { - var targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)]; - var loop = Math.floor(count / panelCount); - if (position > currentPos && targetAnchor.index < anchorAtCamera.index) { - loop += 1; - } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) { - loop -= 1; - } - return new AnchorPoint({ - index: targetAnchor.index, - position: targetAnchor.position + loop * camera.rangeDiff, - panel: targetAnchor.panel - }); - } else { - return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)]; - } - }; - __proto._findAdjacentAnchor = function (position, posDelta, anchorAtCamera) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - if (camera.circularEnabled) { - var anchorIncludePosition = camera.findAnchorIncludePosition(position); - if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) { - return anchorIncludePosition; - } - } - var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera; - return adjacentAnchor; - }; - __proto._calcSnapThreshold = function (threshold, position, activeAnchor) { - var isNextDirection = position > activeAnchor.position; - var panel = activeAnchor.panel; - var panelSize = panel.size; - var alignPos = panel.alignPosition; - // Minimum distance needed to decide prev/next panel as nearest - /* - * | Prev | Next | - * |<------>|<------------>| - * [ |<-Anchor ] - */ - return Math.max(threshold, isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev); - }; - return SnapControl; -}(Control); - -/** - * A {@link Control} that can be scrolled freely without alignment - * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control} - */ -var FreeControl = /*#__PURE__*/function (_super) { - __extends(FreeControl, _super); - /** */ - function FreeControl(_a) { - var _b = (_a === void 0 ? {} : _a).stopAtEdge, - stopAtEdge = _b === void 0 ? true : _b; - var _this = _super.call(this) || this; - _this._stopAtEdge = stopAtEdge; - return _this; - } - var __proto = FreeControl.prototype; - Object.defineProperty(__proto, "stopAtEdge", { - /** - * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area - * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._stopAtEdge; - }, - set: function (val) { - this._stopAtEdge = val; - }, - enumerable: false, - configurable: true - }); - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - var panelRange = activePanel.range; - var newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - camera.lookAt(camera.clampToReachablePosition(newPosition)); - } - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var targetPos = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(targetPos); - if (!anchorAtPosition) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var targetPanel = anchorAtPosition.panel; - // Trigger only change event - if (targetPanel !== this._activePanel) { - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - } - return this._animateToPosition({ - position: this._stopAtEdge ? targetPos : position, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - return FreeControl; -}(Control); - -/** - * A {@link Control} that allow you to select the maximum number of panels to move at a time - * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control} - */ -var StrictControl = /*#__PURE__*/function (_super) { - __extends(StrictControl, _super); - /** */ - function StrictControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? 1 : _b; - var _this = _super.call(this) || this; - _this.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - _super.prototype.setActive.call(_this, newActivePanel, prevActivePanel, isTrusted); - _this.updateInput(); - }; - _this._count = count; - _this._resetIndexRange(); - return _this; - } - var __proto = StrictControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels that can be moved at a time - * @ko 최대로 움직일 수 있는 패널의 개수 - * @type {number} - * @default 1 - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - _super.prototype.destroy.call(this); - this._resetIndexRange(); - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var renderer = flicking.renderer; - var controller = this._controller; - var controlParams = camera.controlParams; - var count = this._count; - var activePanel = controller.state.animating ? (_a = camera.findNearestAnchor(camera.position)) === null || _a === void 0 ? void 0 : _a.panel : this._activePanel; - if (!activePanel) { - controller.update(controlParams); - this._resetIndexRange(); - return this; - } - var cameraRange = controlParams.range; - var currentPos = activePanel.position; - var currentIndex = activePanel.index; - var panelCount = renderer.panelCount; - var prevPanelIndex = currentIndex - count; - var nextPanelIndex = currentIndex + count; - if (prevPanelIndex < 0) { - prevPanelIndex = flicking.circularEnabled ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount) : clamp(prevPanelIndex, 0, panelCount - 1); - } - if (nextPanelIndex >= panelCount) { - nextPanelIndex = flicking.circularEnabled ? nextPanelIndex % panelCount : clamp(nextPanelIndex, 0, panelCount - 1); - } - var prevPanel = renderer.panels[prevPanelIndex]; - var nextPanel = renderer.panels[nextPanelIndex]; - var prevPos = Math.max(prevPanel.position, cameraRange.min); - var nextPos = Math.min(nextPanel.position, cameraRange.max); - if (prevPos > currentPos) { - prevPos -= camera.rangeDiff; - } - if (nextPos < currentPos) { - nextPos += camera.rangeDiff; - } - controlParams.range = { - min: prevPos, - max: nextPos - }; - if (controlParams.circular) { - if (controlParams.position < prevPos) { - controlParams.position += camera.rangeDiff; - } - if (controlParams.position > nextPos) { - controlParams.position -= camera.rangeDiff; - } - } - controlParams.circular = false; - controller.update(controlParams); - this._indexRange = { - min: prevPanel.index, - max: nextPanel.index - }; - return this; - }; - __proto.moveToPanel = function (panel, options) { - return __awaiter(this, void 0, void 0, function () { - var flicking, camera, controller; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - camera = flicking.camera; - controller = this._controller; - controller.update(camera.controlParams); - return [2 /*return*/, _super.prototype.moveToPanel.call(this, panel, options)]; - }); - }); - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var currentPanel = (_a = this._nextPanel) !== null && _a !== void 0 ? _a : this._activePanel; - var axesRange = this._controller.range; - var indexRange = this._indexRange; - var cameraRange = camera.range; - var state = this._controller.state; - var clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtPosition || !currentPanel) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var prevPos = currentPanel.position; - var posDelta = flicking.animating ? state.delta : position - camera.position; - var isOverThreshold = Math.abs(posDelta) >= flicking.threshold; - var adjacentAnchor = position > prevPos ? camera.getNextAnchor(anchorAtPosition) : camera.getPrevAnchor(anchorAtPosition); - var targetPos; - var targetPanel; - var anchors = camera.anchorPoints; - var firstAnchor = anchors[0]; - var lastAnchor = anchors[anchors.length - 1]; - var shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max); - var shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max); - var isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max) : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max); - if (shouldBounceToFirst || shouldBounceToLast) { - // In bounce area - var targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor; - targetPanel = targetAnchor.panel; - targetPos = targetAnchor.position; - } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) { - // Move to anchor at position - targetPanel = anchorAtPosition.panel; - targetPos = anchorAtPosition.position; - } else if (isOverThreshold && isAdjacent) { - // Move to adjacent anchor - targetPanel = adjacentAnchor.panel; - targetPos = adjacentAnchor.position; - } else { - // Fallback to nearest panel from current camera - var anchorAtCamera = camera.findNearestAnchor(camera.position); - if (!anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - return this._animateToPosition({ - position: targetPos, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - __proto._resetIndexRange = function () { - this._indexRange = { - min: 0, - max: 0 - }; - }; - return StrictControl; -}(Control); - -/** - * A mode of camera - */ -var CameraMode = /*#__PURE__*/function () { - /** */ - function CameraMode(flicking) { - this._flicking = flicking; - } - var __proto = CameraMode.prototype; - __proto.getAnchors = function () { - var panels = this._flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findAnchorIncludePosition = function (position) { - var anchors = this._flicking.camera.anchorPoints; - var anchorsIncludingPosition = anchors.filter(function (anchor) { - return anchor.panel.includePosition(position, true); - }); - return anchorsIncludingPosition.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - }; - __proto.findNearestAnchor = function (position) { - var anchors = this._flicking.camera.anchorPoints; - if (anchors.length <= 0) return null; - var prevDist = Infinity; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.abs(anchor.position - position); - if (dist > prevDist) { - // Return previous anchor - return anchors[anchorIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return anchors[anchors.length - 1]; - }; - __proto.clampToReachablePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - return clamp(position, range.min, range.max); - }; - __proto.getCircularOffset = function () { - return 0; - }; - __proto.canReach = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - if (panel.removed) return false; - var panelPos = panel.position; - return panelPos >= range.min && panelPos <= range.max; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var visibleRange = camera.visibleRange; - // Should not include margin, as we don't declare what the margin is visible as what the panel is visible. - return panel.isVisibleOnRange(visibleRange.min, visibleRange.max); - }; - return CameraMode; -}(); - -var LinearCameraMode = /*#__PURE__*/function (_super) { - __extends(LinearCameraMode, _super); - function LinearCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = LinearCameraMode.prototype; - __proto.checkAvailability = function () { - // It's always available - return true; - }; - __proto.getRange = function () { - var _a, _b; - var renderer = this._flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - return { - min: (_a = firstPanel === null || firstPanel === void 0 ? void 0 : firstPanel.position) !== null && _a !== void 0 ? _a : 0, - max: (_b = lastPanel === null || lastPanel === void 0 ? void 0 : lastPanel.position) !== null && _b !== void 0 ? _b : 0 - }; - }; - return LinearCameraMode; -}(CameraMode); - -/** - * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop - * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드 - */ -var CircularCameraMode = /*#__PURE__*/function (_super) { - __extends(CircularCameraMode, _super); - function CircularCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = CircularCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var panels = renderer.panels; - if (panels.length <= 0) { - return false; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - var visibleSize = flicking.camera.size; - var panelSizeSum = lastPanelNext - firstPanelPrev; - var canSetCircularMode = panels.every(function (panel) { - return panelSizeSum - panel.size >= visibleSize; - }); - return canSetCircularMode; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return { - min: 0, - max: 0 - }; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - return { - min: firstPanelPrev, - max: lastPanelNext - }; - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findNearestAnchor = function (position) { - var camera = this._flicking.camera; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - var camRange = camera.range; - var minDist = Infinity; - var minDistIndex = -1; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.min(Math.abs(anchor.position - position), Math.abs(anchor.position - camRange.min + camRange.max - position), Math.abs(position - camRange.min + camRange.max - anchor.position)); - if (dist < minDist) { - minDist = dist; - minDistIndex = anchorIdx; - } - } - // Return last anchor - return anchors[minDistIndex]; - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - var rangeDiff = camera.rangeDiff; - var anchorCount = anchors.length; - var positionInRange = circulatePosition(position, range.min, range.max); - var anchorInRange = _super.prototype.findAnchorIncludePosition.call(this, positionInRange); - if (anchorCount > 0 && (position === range.min || position === range.max)) { - var possibleAnchors = [anchorInRange, new AnchorPoint({ - index: 0, - position: anchors[0].position + rangeDiff, - panel: anchors[0].panel - }), new AnchorPoint({ - index: anchorCount - 1, - position: anchors[anchorCount - 1].position - rangeDiff, - panel: anchors[anchorCount - 1].panel - })].filter(function (anchor) { - return !!anchor; - }); - anchorInRange = possibleAnchors.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - } - if (!anchorInRange) return null; - if (position < range.min) { - var loopCount = -Math.floor((range.min - position) / rangeDiff) - 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } else if (position > range.max) { - var loopCount = Math.floor((position - range.max) / rangeDiff) + 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } - return anchorInRange; - }; - __proto.getCircularOffset = function () { - var flicking = this._flicking; - var camera = flicking.camera; - if (!camera.circularEnabled) return 0; - var toggled = flicking.panels.filter(function (panel) { - return panel.toggled; - }); - var toggledPrev = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.NEXT; - }); - return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext); - }; - __proto.clampToReachablePosition = function (position) { - // Basically all position is reachable for circular camera - return position; - }; - __proto.canReach = function (panel) { - if (panel.removed) return false; - // Always reachable on circular mode - return true; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - var rangeDiff = camera.rangeDiff; - var visibleRange = camera.visibleRange; - var visibleInCurrentRange = _super.prototype.canSee.call(this, panel); - // Check looped visible area for circular case - if (visibleRange.min < range.min) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff); - } else if (visibleRange.max > range.max) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff); - } - return visibleInCurrentRange; - }; - __proto._calcPanelAreaSum = function (panels) { - return panels.reduce(function (sum, panel) { - return sum + panel.sizeIncludingMargin; - }, 0); - }; - return CircularCameraMode; -}(CameraMode); - -var BoundCameraMode = /*#__PURE__*/function (_super) { - __extends(BoundCameraMode, _super); - function BoundCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = BoundCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return false; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - return isBiggerThanViewport; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var alignPos = flicking.camera.alignPosition; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return { - min: 0, - max: 0 - }; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - var firstPos = firstPanelPrev + alignPos; - var lastPos = lastPanelNext - viewportSize + alignPos; - if (isBiggerThanViewport) { - return { - min: firstPos, - max: lastPos - }; - } else { - var align = flicking.camera.align; - var alignVal = typeof align === "object" ? align.camera : align; - var pos = firstPos + parseAlign$1(alignVal, lastPos - firstPos); - return { - min: pos, - max: pos - }; - } - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var camera = flicking.camera; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return []; - } - var range = flicking.camera.range; - var reachablePanels = panels.filter(function (panel) { - return camera.canReach(panel); - }); - if (reachablePanels.length > 0) { - var shouldPrependBoundAnchor = reachablePanels[0].position !== range.min; - var shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max; - var indexOffset_1 = shouldPrependBoundAnchor ? 1 : 0; - var newAnchors = reachablePanels.map(function (panel, idx) { - return new AnchorPoint({ - index: idx + indexOffset_1, - position: panel.position, - panel: panel - }); - }); - if (shouldPrependBoundAnchor) { - newAnchors.splice(0, 0, new AnchorPoint({ - index: 0, - position: range.min, - panel: panels[reachablePanels[0].index - 1] - })); - } - if (shouldAppendBoundAnchor) { - newAnchors.push(new AnchorPoint({ - index: newAnchors.length, - position: range.max, - panel: panels[reachablePanels[reachablePanels.length - 1].index + 1] - })); - } - return newAnchors; - } else if (range.min !== range.max) { - // There're more than 2 panels - var nearestPanelAtMin = this._findNearestPanel(range.min, panels); - var panelAtMin = nearestPanelAtMin.index === panels.length - 1 ? nearestPanelAtMin.prev() : nearestPanelAtMin; - var panelAtMax = panelAtMin.next(); - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: panelAtMin - }), new AnchorPoint({ - index: 1, - position: range.max, - panel: panelAtMax - })]; - } else { - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: this._findNearestPanel(range.min, panels) - })]; - } - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - if (position <= range.min) { - return anchors[0]; - } else if (position >= range.max) { - return anchors[anchors.length - 1]; - } else { - return _super.prototype.findAnchorIncludePosition.call(this, position); - } - }; - __proto._findNearestPanel = function (pos, panels) { - var prevDist = Infinity; - for (var panelIdx = 0; panelIdx < panels.length; panelIdx++) { - var panel = panels[panelIdx]; - var dist = Math.abs(panel.position - pos); - if (dist > prevDist) { - // Return previous anchor - return panels[panelIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return panels[panels.length - 1]; - }; - return BoundCameraMode; -}(CameraMode); - -/** - * A component that manages actual movement inside the viewport - * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트 - */ -var Camera = /*#__PURE__*/function () { - /** */ - function Camera(flicking, _a) { - var _this = this; - var _b = (_a === void 0 ? {} : _a).align, - align = _b === void 0 ? ALIGN.CENTER : _b; - this._checkTranslateSupport = function () { - var e_1, _a; - var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"]; - var supportedStyle = document.documentElement.style; - var transformName = ""; - try { - for (var transforms_1 = __values(transforms), transforms_1_1 = transforms_1.next(); !transforms_1_1.done; transforms_1_1 = transforms_1.next()) { - var prefixedTransform = transforms_1_1.value; - if (prefixedTransform in supportedStyle) { - transformName = prefixedTransform; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (transforms_1_1 && !transforms_1_1.done && (_a = transforms_1.return)) _a.call(transforms_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (!transformName) { - throw new FlickingError(MESSAGE.TRANSFORM_NOT_SUPPORTED, CODE.TRANSFORM_NOT_SUPPORTED); - } - _this._transform = transformName; - }; - this._flicking = flicking; - this._resetInternalValues(); - // Options - this._align = align; - } - var __proto = Camera.prototype; - Object.defineProperty(__proto, "element", { - // Internal states getter - /** - * The camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`) - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "children", { - /** - * An array of the child elements of the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열 - * @type {HTMLElement[]} - * @readonly - */ - get: function () { - return toArray(this._el.children); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position of the camera - * @ko Camera의 현재 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._position; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at - * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option - * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다. - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._offset - this._circularOffset; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "mode", { - /** - * A current camera mode - * @type {CameraMode} - * @readonly - */ - get: function () { - return this._mode; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * A range that Camera's {@link Camera#position position} can reach - * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} max A maximum position최대 위치 - * @readonly - */ - get: function () { - return this._range; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rangeDiff", { - /** - * A difference between Camera's minimum and maximum position that can reach - * @ko Camera가 도달 가능한 최소/최대 좌표의 차이 - * @type {number} - * @readonly - */ - get: function () { - return this._range.max - this._range.min; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * An array of visible panels from the current position - * @ko 현재 보이는 패널들의 배열 - * @type {Panel[]} - * @readonly - */ - get: function () { - return this._visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRange", { - /** - * A range of the visible area from the current position - * @ko 현재 위치에서 보이는 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} min A maximum position최대 위치 - * @readonly - */ - get: function () { - return { - min: this._position - this._alignPos, - max: this._position - this._alignPos + this.size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "anchorPoints", { - /** - * An array of {@link AnchorPoint}s that Camera can be stopped at - * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록 - * @type {AnchorPoint[]} - * @readonly - */ - get: function () { - return this._anchors; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current parameters of the Camera for updating {@link AxesController} - * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들 - * @type {ControlParams} - * @readonly - */ - get: function () { - return { - range: this._range, - position: this._position, - circular: this._circularEnabled - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "atEdge", { - /** - * A Boolean value indicating whether Camera's over the minimum or maximum position reachable - * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다 - * @type {boolean} - * @readonly - */ - get: function () { - return this._position <= this._range.min || this._position >= this._range.max; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Return the size of the viewport - * @ko 뷰포트 크기를 반환합니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return flicking ? flicking.horizontal ? flicking.viewport.width : flicking.viewport.height : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Return the camera's position progress from the first panel to last panel - * Range is from 0 to last panel's index - * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다 - * 범위는 0부터 마지막 패널의 인덱스까지입니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var position = this._position + this._offset; - var nearestAnchor = this.findNearestAnchor(this._position); - if (!flicking || !nearestAnchor) { - return NaN; - } - var nearestPanel = nearestAnchor.panel; - var panelPos = nearestPanel.position + nearestPanel.offset; - var bounceSize = flicking.control.controller.bounce; - var _a = this.range, - prevRange = _a.min, - nextRange = _a.max; - var rangeDiff = this.rangeDiff; - if (position === panelPos) { - return nearestPanel.index; - } - if (position < panelPos) { - var prevPanel = nearestPanel.prev(); - var prevPosition = prevPanel ? prevPanel.position + prevPanel.offset : prevRange - bounceSize[0]; - // Looped - if (prevPosition > panelPos) { - prevPosition -= rangeDiff; - } - return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos); - } else { - var nextPanel = nearestPanel.next(); - var nextPosition = nextPanel ? nextPanel.position + nextPanel.offset : nextRange + bounceSize[1]; - // Looped - if (nextPosition < panelPos) { - nextPosition += rangeDiff; - } - return nearestPanel.index + getProgress(position, panelPos, nextPosition); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelOrder", { - /** - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성 - * @type {string} - * @readonly - */ - get: function () { - return this._panelOrder; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element - * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Camera - * @ko Camera를 초기화합니다 - * @throws {FlickingError} - * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element - * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우 - * @return {this} - */ - __proto.init = function () { - var viewportEl = this._flicking.viewport.element; - checkExistence(viewportEl.firstElementChild, "First element child of the viewport element"); - this._el = viewportEl.firstElementChild; - this._checkTranslateSupport(); - this._updateMode(); - this.updatePanelOrder(); - return this; - }; - /** - * Destroy Camera and return to initial state - * @ko Camera를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalValues(); - return this; - }; - /** - * Move to the given position and apply CSS transform - * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다 - * @param {number} pos A new position움직일 위치 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.lookAt = function (pos) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var prevPos = this._position; - this._position = pos; - var toggled = this._togglePanels(prevPos, pos); - this._refreshVisiblePanels(); - this._checkNeedPanel(); - this._checkReachEnd(prevPos, pos); - if (toggled) { - void flicking.renderer.render().then(function () { - _this.updateOffset(); - }); - } else { - this.applyTransform(); - } - }; - /** - * Return a previous {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint} - */ - __proto.getPrevAnchor = function (anchor) { - if (!this._circularEnabled || anchor.index !== 0) { - return this._anchors[anchor.index - 1] || null; - } else { - var anchors = this._anchors; - var rangeDiff = this.rangeDiff; - var lastAnchor = anchors[anchors.length - 1]; - return new AnchorPoint({ - index: lastAnchor.index, - position: lastAnchor.position - rangeDiff, - panel: lastAnchor.panel - }); - } - }; - /** - * Return a next {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint} - */ - __proto.getNextAnchor = function (anchor) { - var anchors = this._anchors; - if (!this._circularEnabled || anchor.index !== anchors.length - 1) { - return anchors[anchor.index + 1] || null; - } else { - var rangeDiff = this.rangeDiff; - var firstAnchor = anchors[0]; - return new AnchorPoint({ - index: firstAnchor.index, - position: firstAnchor.position + rangeDiff, - panel: firstAnchor.panel - }); - } - }; - /** - * Return the camera's position progress in the panel below - * Value is from 0 to 1 when the camera's inside panel - * Value can be lower than 0 or bigger than 1 when it's in the margin area - * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다 - * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다 - * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다 - */ - __proto.getProgressInPanel = function (panel) { - var panelRange = panel.range; - return (this._position - panelRange.min) / (panelRange.max - panelRange.min); - }; - /** - * Return {@link AnchorPoint} that includes given position - * If there's no {@link AnchorPoint} that includes the given position, return `null` instead - * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다 - * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint} - */ - __proto.findAnchorIncludePosition = function (position) { - return this._mode.findAnchorIncludePosition(position); - }; - /** - * Return {@link AnchorPoint} nearest to given position - * If there're no {@link AnchorPoint}s, return `null` instead - * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다 - * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint} - */ - __proto.findNearestAnchor = function (position) { - return this._mode.findNearestAnchor(position); - }; - /** - * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel} - * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다 - * @return {AnchorPoint | null} - */ - __proto.findActiveAnchor = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!activePanel) return null; - return (_a = find(this._anchors, function (anchor) { - return anchor.panel.index === activePanel.index; - })) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position); - }; - /** - * Clamp the given position between camera's range - * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다 - * @param {number} position A position to clamp범위를 제한할 좌표 - * @return {number} A clamped position범위 제한된 좌표 - */ - __proto.clampToReachablePosition = function (position) { - return this._mode.clampToReachablePosition(position); - }; - /** - * Check whether the given panel is inside of the Camera's range - * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부 - */ - __proto.canReach = function (panel) { - return this._mode.canReach(panel); - }; - /** - * Check whether the given panel element is visible at the current position - * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부 - */ - __proto.canSee = function (panel) { - return this._mode.canSee(panel); - }; - /** - * Update {@link Camera#range range} of Camera - * @ko Camera의 {@link Camera#range range}를 업데이트합니다 - * @method - * @abstract - * @memberof Camera - * @instance - * @name updateRange - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.updateRange = function () { - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - var panels = renderer.panels; - this._updateMode(); - this._range = this._mode.getRange(); - panels.forEach(function (panel) { - return panel.updateCircularToggleDirection(); - }); - return this; - }; - /** - * Update Camera's {@link Camera#alignPosition alignPosition} - * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateAlignPos = function () { - var align = this._align; - var alignVal = typeof align === "object" ? align.camera : align; - this._alignPos = parseAlign$1(alignVal, this.size); - return this; - }; - /** - * Update Camera's {@link Camera#anchorPoints anchorPoints} - * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAnchors = function () { - this._anchors = this._mode.getAnchors(); - return this; - }; - /** - * Update Viewport's height to active panel's height - * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAdaptiveHeight = function () { - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!flicking.horizontal || !flicking.adaptive || !activePanel) return; - flicking.viewport.setSize({ - height: activePanel.height - }); - }; - /** - * Update current offset of the camera - * @ko 현재 카메라의 오프셋을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateOffset = function () { - var flicking = getFlickingAttached(this._flicking); - var position = this._position; - var unRenderedPanels = flicking.panels.filter(function (panel) { - return !panel.rendered; - }); - this._offset = unRenderedPanels.filter(function (panel) { - return panel.position + panel.offset < position; - }).reduce(function (offset, panel) { - return offset + panel.sizeIncludingMargin; - }, 0); - this._circularOffset = this._mode.getCircularOffset(); - this.applyTransform(); - return this; - }; - /** - * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element - * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다 - * @return {this} - */ - __proto.updatePanelOrder = function () { - var flicking = getFlickingAttached(this._flicking); - if (!flicking.horizontal) return this; - var el = this._el; - var direction = getStyle(el).direction; - if (direction !== this._panelOrder) { - this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR; - if (flicking.initialized) { - flicking.control.controller.updateDirection(); - } - } - return this; - }; - /** - * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again - * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다 - * @chainable - * @return {this} - */ - __proto.resetNeedPanelHistory = function () { - this._needPanelTriggered = { - prev: false, - next: false - }; - return this; - }; - /** - * Apply "transform" style with the current position to camera element - * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다. - * @return {this} - */ - __proto.applyTransform = function () { - var el = this._el; - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - if (renderer.rendering || !flicking.initialized) return this; - var actualPosition = this._position - this._alignPos - this._offset + this._circularOffset; - el.style[this._transform] = flicking.horizontal ? "translate(" + (this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition) + "px)" : "translate(0, " + -actualPosition + "px)"; - return this; - }; - __proto._resetInternalValues = function () { - this._position = 0; - this._alignPos = 0; - this._offset = 0; - this._circularOffset = 0; - this._circularEnabled = false; - this._range = { - min: 0, - max: 0 - }; - this._visiblePanels = []; - this._anchors = []; - this._needPanelTriggered = { - prev: false, - next: false - }; - }; - __proto._refreshVisiblePanels = function () { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var newVisiblePanels = panels.filter(function (panel) { - return _this.canSee(panel); - }); - var prevVisiblePanels = this._visiblePanels; - this._visiblePanels = newVisiblePanels; - var added = newVisiblePanels.filter(function (panel) { - return !includes(prevVisiblePanels, panel); - }); - var removed = prevVisiblePanels.filter(function (panel) { - return !includes(newVisiblePanels, panel); - }); - if (added.length > 0 || removed.length > 0) { - void flicking.renderer.render().then(function () { - flicking.trigger(new Component.ComponentEvent(EVENTS.VISIBLE_CHANGE, { - added: added, - removed: removed, - visiblePanels: newVisiblePanels - })); - }); - } - }; - __proto._checkNeedPanel = function () { - var needPanelTriggered = this._needPanelTriggered; - if (needPanelTriggered.prev && needPanelTriggered.next) return; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - if (!needPanelTriggered.prev) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - if (!needPanelTriggered.next) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - return; - } - var cameraPosition = this._position; - var cameraSize = this.size; - var cameraRange = this._range; - var needPanelThreshold = flicking.needPanelThreshold; - var cameraPrev = cameraPosition - this._alignPos; - var cameraNext = cameraPrev + cameraSize; - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - if (!needPanelTriggered.prev) { - var firstPanelPrev = firstPanel.range.min; - if (cameraPrev <= firstPanelPrev + needPanelThreshold || cameraPosition <= cameraRange.min + needPanelThreshold) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - } - if (!needPanelTriggered.next) { - var lastPanelNext = lastPanel.range.max; - if (cameraNext >= lastPanelNext - needPanelThreshold || cameraPosition >= cameraRange.max - needPanelThreshold) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - } - }; - __proto._checkReachEnd = function (prevPos, newPos) { - var flicking = getFlickingAttached(this._flicking); - var range = this._range; - var wasBetweenRange = prevPos > range.min && prevPos < range.max; - var isBetweenRange = newPos > range.min && newPos < range.max; - if (!wasBetweenRange || isBetweenRange) return; - var direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT; - flicking.trigger(new Component.ComponentEvent(EVENTS.REACH_EDGE, { - direction: direction - })); - }; - __proto._updateMode = function () { - var flicking = getFlickingAttached(this._flicking); - if (flicking.circular) { - var circularMode = new CircularCameraMode(flicking); - var canSetCircularMode = circularMode.checkAvailability(); - if (canSetCircularMode) { - this._mode = circularMode; - } else { - var fallbackMode = flicking.circularFallback; - this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - } - this._circularEnabled = canSetCircularMode; - } else { - this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - this._circularEnabled = false; - } - }; - __proto._togglePanels = function (prevPos, pos) { - if (pos === prevPos) return false; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var toggled = panels.map(function (panel) { - return panel.toggle(prevPos, pos); - }); - return toggled.some(function (isToggled) { - return isToggled; - }); - }; - return Camera; -}(); - -/** - * A component that manages {@link Panel} and its elements - * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트 - */ -var Renderer = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {Constants.ALIGN | string | number} [options.align="center"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값 - * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈) - */ - function Renderer(_a) { - var _b = _a.align, - align = _b === void 0 ? ALIGN.CENTER : _b, - strategy = _a.strategy; - this._flicking = null; - this._panels = []; - this._rendering = false; - // Bind options - this._align = align; - this._strategy = strategy; - } - var __proto = Renderer.prototype; - Object.defineProperty(__proto, "panels", { - // Internal states Getter - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendering", { - /** - * A boolean value indicating whether rendering is in progress - * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부 - * @type {boolean} - * @readonly - * @internal - */ - get: function () { - return this._rendering; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._panels.length; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "strategy", { - /** - * @internal - */ - get: function () { - return this._strategy; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A {@link Panel}'s {@link Panel#align align} value that applied to all panels - * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - var panelAlign = parsePanelAlign(val); - this._panels.forEach(function (panel) { - panel.align = panelAlign; - }); - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Renderer - * @ko Renderer를 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._collectPanels(); - return this; - }; - /** - * Destroy Renderer and return to initial state - * @ko Renderer를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._flicking = null; - this._panels = []; - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - */ - __proto.getPanel = function (index) { - return this._panels[index] || null; - }; - __proto.forceRenderAllPanels = function () { - this._panels.forEach(function (panel) { - return panel.markForShow(); - }); - return Promise.resolve(); - }; - /** - * Update all panel sizes - * @ko 모든 패널의 크기를 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updatePanelSize = function () { - var flicking = getFlickingAttached(this._flicking); - var panels = this._panels; - if (panels.length <= 0) return this; - if (flicking.panelsPerView > 0) { - var firstPanel = panels[0]; - firstPanel.resize(); - this._updatePanelSizeByGrid(firstPanel, panels); - } else { - flicking.panels.forEach(function (panel) { - return panel.resize(); - }); - } - return this; - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {Array} items An array of items to insert추가할 아이템들의 배열 - * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열 - * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - */ - __proto.batchInsert = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsInserted = this.batchInsertDefer.apply(this, __spread(items)); - if (allPanelsInserted.length <= 0) return []; - this.updateAfterPanelChange(allPanelsInserted, []); - return allPanelsInserted; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchInsertDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var prevFirstPanel = panels[0]; - var align = parsePanelAlign(this._align); - var allPanelsInserted = items.reduce(function (addedPanels, item) { - var _a; - var insertingIdx = getMinusCompensatedIndex(item.index, panels.length); - var panelsPushed = panels.slice(insertingIdx); - var panelsInserted = item.elements.map(function (el, idx) { - return _this._createPanel(el, { - index: insertingIdx + idx, - align: align, - flicking: flicking - }); - }); - panels.splice.apply(panels, __spread([insertingIdx, 0], panelsInserted)); - if (item.hasDOMInElements) { - // Insert the actual elements as camera element's children - _this._insertPanelElements(panelsInserted, (_a = panelsPushed[0]) !== null && _a !== void 0 ? _a : null); - } - // Resize the newly added panels - if (flicking.panelsPerView > 0) { - var firstPanel = prevFirstPanel || panelsInserted[0].resize(); - _this._updatePanelSizeByGrid(firstPanel, panelsInserted); - } else { - panelsInserted.forEach(function (panel) { - return panel.resize(); - }); - } - // Update panel indexes & positions - panelsPushed.forEach(function (panel) { - panel.increaseIndex(panelsInserted.length); - panel.updatePosition(); - }); - return __spread(addedPanels, panelsInserted); - }, []); - return allPanelsInserted; - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {Array} items An array of items to remove제거할 아이템들의 배열 - * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스 - * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다 - * @return An array of removed panels제거된 패널들의 배열 - */ - __proto.batchRemove = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsRemoved = this.batchRemoveDefer.apply(this, __spread(items)); - if (allPanelsRemoved.length <= 0) return []; - this.updateAfterPanelChange([], allPanelsRemoved); - return allPanelsRemoved; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchRemoveDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var control = flicking.control; - var activePanel = control.activePanel; - var allPanelsRemoved = items.reduce(function (removed, item) { - var index = item.index, - deleteCount = item.deleteCount; - var removingIdx = getMinusCompensatedIndex(index, panels.length); - var panelsPulled = panels.slice(removingIdx + deleteCount); - var panelsRemoved = panels.splice(removingIdx, deleteCount); - if (panelsRemoved.length <= 0) return []; - // Update panel indexes & positions - panelsPulled.forEach(function (panel) { - panel.decreaseIndex(panelsRemoved.length); - panel.updatePosition(); - }); - if (item.hasDOMInElements) { - _this._removePanelElements(panelsRemoved); - } - // Remove panel elements - panelsRemoved.forEach(function (panel) { - return panel.destroy(); - }); - if (includes(panelsRemoved, activePanel)) { - control.resetActive(); - } - return __spread(removed, panelsRemoved); - }, []); - return allPanelsRemoved; - }; - /** - * @internal - */ - __proto.updateAfterPanelChange = function (panelsAdded, panelsRemoved) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - var panels = this._panels; - var activePanel = control.activePanel; - // Update camera & control - this._updateCameraAndControl(); - void this.render(); - if (!flicking.animating) { - if (!activePanel || activePanel.removed) { - if (panels.length <= 0) { - // All panels removed - camera.lookAt(0); - } else { - var targetIndex = (_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.index) !== null && _a !== void 0 ? _a : 0; - if (targetIndex > panels.length - 1) { - targetIndex = panels.length - 1; - } - void control.moveToPanel(panels[targetIndex], { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } else { - void control.moveToPanel(activePanel, { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } - flicking.camera.updateOffset(); - if (panelsAdded.length > 0 || panelsRemoved.length > 0) { - flicking.trigger(new Component.ComponentEvent(EVENTS.PANEL_CHANGE, { - added: panelsAdded, - removed: panelsRemoved - })); - this.checkPanelContentsReady(__spread(panelsAdded, panelsRemoved)); - } - }; - /** - * @internal - */ - __proto.checkPanelContentsReady = function (checkingPanels) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var resizeOnContentsReady = flicking.resizeOnContentsReady; - var panels = this._panels; - if (!resizeOnContentsReady || flicking.virtualEnabled) return; - var hasContents = function (panel) { - return panel.element && !!panel.element.querySelector("img, video"); - }; - checkingPanels = checkingPanels.filter(function (panel) { - return hasContents(panel); - }); - if (checkingPanels.length <= 0) return; - var contentsReadyChecker = new ImReady(); - checkingPanels.forEach(function (panel) { - panel.loading = true; - }); - contentsReadyChecker.on("readyElement", function (e) { - if (!_this._flicking) { - // Renderer's destroy() is called before - contentsReadyChecker.destroy(); - return; - } - var panel = checkingPanels[e.index]; - var camera = flicking.camera; - var control = flicking.control; - var prevProgressInPanel = control.activePanel ? camera.getProgressInPanel(control.activePanel) : 0; - panel.loading = false; - panel.resize(); - panels.slice(panel.index + 1).forEach(function (panelBehind) { - return panelBehind.updatePosition(); - }); - if (!flicking.initialized) return; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - }); - contentsReadyChecker.on("preReady", function (e) { - if (_this._flicking) { - void _this.render(); - } - if (e.readyCount === e.totalCount) { - contentsReadyChecker.destroy(); - } - }); - contentsReadyChecker.on("ready", function () { - if (_this._flicking) { - void _this.render(); - } - contentsReadyChecker.destroy(); - }); - contentsReadyChecker.check(checkingPanels.map(function (panel) { - return panel.element; - })); - }; - __proto._updateCameraAndControl = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - camera.resetNeedPanelHistory(); - control.updateInput(); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - }; - __proto._updatePanelSizeByGrid = function (referencePanel, panels) { - var flicking = getFlickingAttached(this._flicking); - var panelsPerView = flicking.panelsPerView; - if (panelsPerView <= 0) { - throw new FlickingError(MESSAGE.WRONG_OPTION("panelsPerView", panelsPerView), CODE.WRONG_OPTION); - } - if (panels.length <= 0) return; - var viewportSize = flicking.camera.size; - var gap = referencePanel.margin.prev + referencePanel.margin.next; - var panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView; - var panelSizeObj = flicking.horizontal ? { - width: panelSize - } : { - height: panelSize - }; - var firstPanelSizeObj = __assign({ - size: panelSize, - margin: referencePanel.margin - }, !flicking.horizontal && { - height: referencePanel.height - }); - if (!flicking.noPanelStyleOverride) { - this._strategy.updatePanelSizes(flicking, panelSizeObj); - } - flicking.panels.forEach(function (panel) { - return panel.resize(firstPanelSizeObj); - }); - }; - __proto._removeAllChildsFromCamera = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove other elements - while (cameraElement.firstChild) { - cameraElement.removeChild(cameraElement.firstChild); - } - }; - __proto._insertPanelElements = function (panels, nextSibling) { - if (nextSibling === void 0) { - nextSibling = null; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var cameraElement = camera.element; - var nextSiblingElement = (nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.element) || null; - var fragment = document.createDocumentFragment(); - panels.forEach(function (panel) { - return fragment.appendChild(panel.element); - }); - cameraElement.insertBefore(fragment, nextSiblingElement); - }; - __proto._removePanelElements = function (panels) { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - panels.forEach(function (panel) { - cameraElement.removeChild(panel.element); - }); - }; - __proto._afterRender = function () { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.applyTransform(); - }; - return Renderer; -}(); - -/** - * - */ -var VanillaRenderer = /*#__PURE__*/function (_super) { - __extends(VanillaRenderer, _super); - function VanillaRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - // eslint-disable-next-line @typescript-eslint/require-await - var __proto = VanillaRenderer.prototype; - __proto.render = function () { - return __awaiter(this, void 0, void 0, function () { - var flicking, strategy; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - strategy = this._strategy; - strategy.updateRenderingPanels(flicking); - strategy.renderPanels(flicking); - this._resetPanelElementOrder(); - this._afterRender(); - return [2 /*return*/]; - }); - }); - }; - - __proto._collectPanels = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._removeAllTextNodes(); - this._panels = this._strategy.collectPanels(flicking, camera.children); - }; - __proto._createPanel = function (el, options) { - return this._strategy.createPanel(el, options); - }; - __proto._resetPanelElementOrder = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraEl = flicking.camera.element; - // We're using reversed panels here as last panel should be the last element of camera element - var reversedElements = this._strategy.getRenderingElementsByOrder(flicking).reverse(); - reversedElements.forEach(function (el, idx) { - var nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null; - if (el.nextElementSibling !== nextEl) { - cameraEl.insertBefore(el, nextEl); - } - }); - }; - __proto._removeAllTextNodes = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove all text nodes in the camera element - toArray(cameraElement.childNodes).forEach(function (node) { - if (node.nodeType === Node.TEXT_NODE) { - cameraElement.removeChild(node); - } - }); - }; - return VanillaRenderer; -}(Renderer); - -/** - * @internal - */ -var ExternalRenderer = /*#__PURE__*/function (_super) { - __extends(ExternalRenderer, _super); - function ExternalRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* eslint-disable @typescript-eslint/no-unused-vars */ - var __proto = ExternalRenderer.prototype; - __proto._removePanelElements = function (panels) { - // DO NOTHING, overrided to prevent an unexpected error - }; - __proto._removeAllChildsFromCamera = function () { - // DO NOTHING, overrided to prevent an unexpected error - }; - return ExternalRenderer; -}(Renderer); - -/** - * A slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ -var Panel = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스 - */ - function Panel(_a) { - var index = _a.index, - align = _a.align, - flicking = _a.flicking, - elementProvider = _a.elementProvider; - this._index = index; - this._flicking = flicking; - this._elProvider = elementProvider; - this._align = align; - this._removed = false; - this._rendered = true; - this._loading = false; - this._resetInternalStates(); - } - var __proto = Panel.prototype; - Object.defineProperty(__proto, "element", { - // Internal States Getter - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementProvider", { - /** - * @internal - * @readonly - */ - get: function () { - return this._elProvider; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index of the panel - * @ko 패널의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of the panel, including {@link Panel#alignPosition alignPosition} - * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다 - * @type {number} - * @readonly - */ - get: function () { - return this._pos + this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Cached size of the panel element - * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else - * @ko 패널 엘리먼트의 캐시된 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "sizeIncludingMargin", { - /** - * Panel's size including CSS `margin` - * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else - * @ko CSS `margin`을 포함한 패널의 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size + this._margin.prev + this._margin.next; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Height of the panel element - * @ko 패널 엘리먼트의 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "margin", { - /** - * Cached CSS `margin` value of the panel element - * @ko 패널 엘리먼트의 CSS `margin` 값 - * @type {object} - * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값 - * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값 - * @readonly - */ - get: function () { - return this._margin; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at - * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "removed", { - /** - * A value indicating whether the panel's {@link Flicking#remove remove}d - * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._removed; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - /** - * A value indicating whether the panel's element is being rendered on the screen - * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "loading", { - /** - * A value indicating whether the panel's image/video is not loaded and waiting for resize - * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._loading; - }, - set: function (val) { - this._loading = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Panel element's range of the bounding box - * @ko 패널 엘리먼트의 Bounding box 범위 - * @type {object} - * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false) - * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false) - * @readonly - */ - get: function () { - return { - min: this._pos, - max: this._pos + this._size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggled", { - /** - * A value indicating whether the panel's position is toggled by circular behavior - * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._toggled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggleDirection", { - /** - * A direction where the panel's position is toggled - * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향 - * @type {DIRECTION} - * @readonly - */ - get: function () { - return this._toggleDirection; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Actual position offset determined by {@link Panel#order} - * @ko {@link Panel#order}에 의한 실제 위치 변경값 - * @type {number} - * @readonly - */ - get: function () { - var toggleDirection = this._toggleDirection; - var cameraRangeDiff = this._flicking.camera.rangeDiff; - return toggleDirection === DIRECTION.NONE || !this._toggled ? 0 : toggleDirection === DIRECTION.PREV ? -cameraRangeDiff : cameraRangeDiff; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Progress of movement between previous or next panel relative to current panel - * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return this.index - flicking.camera.progress; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "outsetProgress", { - /** - * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1) - * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1) - * @type {number} - * @readonly - */ - get: function () { - var position = this.position + this.offset; - var alignPosition = this._alignPos; - var camera = this._flicking.camera; - var camPos = camera.position; - if (camPos === position) { - return 0; - } - if (camPos < position) { - var disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition; - return -getProgress(camPos, position, disappearPosNext); - } else { - var disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition); - return 1 - getProgress(camPos, disappearPosPrev, position); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRatio", { - /** - * Percentage of area where panel is visible in the viewport - * @ko 뷰포트 안에서 패널이 보이는 영역의 비율 - * @type {number} - * @readonly - */ - get: function () { - var range = this.range; - var size = this._size; - var offset = this.offset; - var visibleRange = this._flicking.camera.visibleRange; - var checkingRange = { - min: range.min + offset, - max: range.max + offset - }; - if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) { - return 0; - } - var visibleSize = size; - if (visibleRange.min > checkingRange.min) { - visibleSize -= visibleRange.min - checkingRange.min; - } - if (visibleRange.max < checkingRange.max) { - visibleSize -= checkingRange.max - visibleRange.max; - } - return visibleSize / size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element - * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - this._updateAlignPos(); - }, - enumerable: false, - configurable: true - }); - /** - * Mark panel element to be appended on the camera element - * @internal - */ - __proto.markForShow = function () { - this._rendered = true; - this._elProvider.show(this._flicking); - }; - /** - * Mark panel element to be removed from the camera element - * @internal - */ - __proto.markForHide = function () { - this._rendered = false; - this._elProvider.hide(this._flicking); - }; - /** - * Update size of the panel - * @ko 패널의 크기를 갱신합니다 - * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보 - * @chainable - * @return {this} - */ - __proto.resize = function (cached) { - var _a; - var el = this.element; - var flicking = this._flicking; - var horizontal = flicking.horizontal, - useFractionalSize = flicking.useFractionalSize; - if (cached) { - this._size = cached.size; - this._margin = __assign({}, cached.margin); - this._height = (_a = cached.height) !== null && _a !== void 0 ? _a : getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: getStyle(el) - }); - } else { - var elStyle = getStyle(el); - this._size = getElementSize({ - el: el, - horizontal: horizontal, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }); - this._margin = horizontal ? { - prev: parseFloat(elStyle.marginLeft || "0"), - next: parseFloat(elStyle.marginRight || "0") - } : { - prev: parseFloat(elStyle.marginTop || "0"), - next: parseFloat(elStyle.marginBottom || "0") - }; - this._height = horizontal ? getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }) : this._size; - } - this.updatePosition(); - this._updateAlignPos(); - return this; - }; - /** - * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property - * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New panel size새 패널 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @chainable - * @return {this} - */ - __proto.setSize = function (size) { - setSize(this.element, size); - return this; - }; - /** - * Check whether the given element is inside of this panel's {@link Panel#element element} - * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다 - * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement - * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부 - */ - __proto.contains = function (element) { - var _a; - return !!((_a = this.element) === null || _a === void 0 ? void 0 : _a.contains(element)); - }; - /** - * Reset internal state and set {@link Panel#removed removed} to `true` - * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다. - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalStates(); - this._removed = true; - }; - /** - * Check whether the given position is inside of this panel's {@link Panel#range range} - * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다. - * @param {number} pos A position to check확인하고자 하는 좌표 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부 - */ - __proto.includePosition = function (pos, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - return this.includeRange(pos, pos, includeMargin); - }; - /** - * Check whether the given range is fully included in this panel's area (inclusive) - * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부 - */ - __proto.includeRange = function (min, max, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - var margin = this._margin; - var panelRange = this.range; - if (includeMargin) { - panelRange.min -= margin.prev; - panelRange.max += margin.next; - } - return max >= panelRange.min && min <= panelRange.max; - }; - /** - * Check whether the panel is visble in the given range (exclusive) - * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부 - */ - __proto.isVisibleOnRange = function (min, max) { - var panelRange = this.range; - return max > panelRange.min && min < panelRange.max; - }; - /** - * Move {@link Camera} to this panel - * @ko {@link Camera}를 이 패널로 이동합니다 - * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise - */ - __proto.focus = function (duration) { - return this._flicking.moveTo(this._index, duration); - }; - /** - * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel - * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다 - * @returns {Panel | null} The previous panel이전 패널 - */ - __proto.prev = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1) : renderer.getPanel(index - 1); - }; - /** - * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel - * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다 - * @returns {Panel | null} The previous panel다음 패널 - */ - __proto.next = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1) : renderer.getPanel(index + 1); - }; - /** - * Increase panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.increaseIndex = function (val) { - this._index += Math.max(val, 0); - return this; - }; - /** - * Decrease panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.decreaseIndex = function (val) { - this._index -= Math.max(val, 0); - return this; - }; - /** - * @internal - */ - __proto.updatePosition = function () { - var prevPanel = this._flicking.renderer.panels[this._index - 1]; - this._pos = prevPanel ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev : this._margin.prev; - return this; - }; - /** - * @internal - * @return {boolean} toggled - */ - __proto.toggle = function (prevPos, newPos) { - var toggleDirection = this._toggleDirection; - var togglePosition = this._togglePosition; - if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false; - var prevToggled = this._toggled; - if (newPos > prevPos) { - if (togglePosition >= prevPos && togglePosition <= newPos) { - this._toggled = toggleDirection === DIRECTION.NEXT; - } - } else { - if (togglePosition <= prevPos && togglePosition >= newPos) { - this._toggled = toggleDirection !== DIRECTION.NEXT; - } - } - return prevToggled !== this._toggled; - }; - /** - * @internal - */ - __proto.updateCircularToggleDirection = function () { - var flicking = this._flicking; - if (!flicking.circularEnabled) { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - this._toggled = false; - return this; - } - var camera = flicking.camera; - var camRange = camera.range; - var camAlignPosition = camera.alignPosition; - var camVisibleRange = camera.visibleRange; - var camVisibleSize = camVisibleRange.max - camVisibleRange.min; - var minimumVisible = camRange.min - camAlignPosition; - var maximumVisible = camRange.max - camAlignPosition + camVisibleSize; - var shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false); - var shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false); - this._toggled = false; - if (shouldBeVisibleAtMin) { - this._toggleDirection = DIRECTION.PREV; - this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition; - this.toggle(Infinity, camera.position); - } else if (shouldBeVisibleAtMax) { - this._toggleDirection = DIRECTION.NEXT; - this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition; - this.toggle(-Infinity, camera.position); - } else { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - } - return this; - }; - __proto._updateAlignPos = function () { - this._alignPos = parseAlign$1(this._align, this._size); - }; - __proto._resetInternalStates = function () { - this._size = 0; - this._pos = 0; - this._margin = { - prev: 0, - next: 0 - }; - this._height = 0; - this._alignPos = 0; - this._toggled = false; - this._togglePosition = 0; - this._toggleDirection = DIRECTION.NONE; - }; - return Panel; -}(); - -var NormalRenderingStrategy = /*#__PURE__*/function () { - function NormalRenderingStrategy(_a) { - var providerCtor = _a.providerCtor; - this._providerCtor = providerCtor; - } - var __proto = NormalRenderingStrategy.prototype; - __proto.renderPanels = function () { - // DO_NOTHING - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var renderedPanels = flicking.renderer.panels.filter(function (panel) { - return panel.rendered; - }); - var toggledPrev = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.NEXT; - }); - var notToggled = renderedPanels.filter(function (panel) { - return !panel.toggled; - }); - return __spread(toggledPrev, notToggled, toggledNext).map(function (panel) { - return panel.index; - }); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var panels = flicking.panels; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return panels[index].element; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - if (flicking.renderOnlyVisible) { - this._showOnlyVisiblePanels(flicking); - } else { - flicking.panels.forEach(function (panel) { - return panel.markForShow(); - }); - } - }; - __proto.collectPanels = function (flicking, elements) { - var _this = this; - var align = parsePanelAlign(flicking.renderer.align); - return elements.map(function (el, index) { - return new Panel({ - index: index, - elementProvider: new _this._providerCtor(el), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (element, options) { - return new Panel(__assign(__assign({}, options), { - elementProvider: new this._providerCtor(element) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - return NormalRenderingStrategy; -}(); - -/** - * An slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ -var VirtualPanel = /*#__PURE__*/function (_super) { - __extends(VirtualPanel, _super); - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - */ - function VirtualPanel(options) { - var _this = _super.call(this, options) || this; - options.elementProvider.init(_this); - _this._elProvider = options.elementProvider; - _this._cachedInnerHTML = null; - return _this; - } - var __proto = VirtualPanel.prototype; - Object.defineProperty(__proto, "element", { - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cachedInnerHTML", { - /** - * Cached innerHTML by the previous render function - * @ko 이전 렌더링에서 캐시된 innerHTML 정보 - * @type {string|null} - * @readonly - */ - get: function () { - return this._cachedInnerHTML; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementIndex", { - /** - * An number for indexing which element it will be rendered on - * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var virtualElCount = flicking.panelsPerView + 1; - var panelCount = flicking.panelCount; - var index = this._index; - if (this._toggled) { - // To prevent element duplication - index = this._toggleDirection === DIRECTION.NEXT ? index + panelCount : index - panelCount; - } - return circulateIndex(index, virtualElCount); - }, - enumerable: false, - configurable: true - }); - __proto.cacheRenderResult = function (result) { - this._cachedInnerHTML = result; - }; - __proto.uncacheRenderResult = function () { - this._cachedInnerHTML = null; - }; - __proto.render = function () { - var flicking = this._flicking; - var _a = flicking.virtual, - renderPanel = _a.renderPanel, - cache = _a.cache; - var element = this._elProvider.element; - var newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index); - if (newInnerHTML === element.innerHTML) return; - element.innerHTML = newInnerHTML; - if (cache) { - this.cacheRenderResult(newInnerHTML); - } - }; - __proto.increaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.increaseIndex.call(this, val); - }; - __proto.decreaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.decreaseIndex.call(this, val); - }; - return VirtualPanel; -}(Panel); - -var VirtualRenderingStrategy = /*#__PURE__*/function () { - function VirtualRenderingStrategy() {} - var __proto = VirtualRenderingStrategy.prototype; - __proto.renderPanels = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = flicking.visiblePanels; - var invisibleIndexes = range(flicking.panelsPerView + 1); - visiblePanels.forEach(function (panel) { - var elementIndex = panel.elementIndex; - panel.render(); - virtualManager.show(elementIndex); - invisibleIndexes[elementIndex] = -1; - }); - invisibleIndexes.filter(function (val) { - return val >= 0; - }).forEach(function (idx) { - virtualManager.hide(idx); - }); - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = __spread(flicking.visiblePanels).filter(function (panel) { - return panel.rendered; - }).sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }); - if (visiblePanels.length <= 0) return virtualManager.elements.map(function (_, idx) { - return idx; - }); - var visibleIndexes = visiblePanels.map(function (panel) { - return panel.elementIndex; - }); - var invisibleIndexes = virtualManager.elements.map(function (el, idx) { - return __assign(__assign({}, el), { - idx: idx - }); - }).filter(function (el) { - return !el.visible; - }).map(function (el) { - return el.idx; - }); - return __spread(visibleIndexes, invisibleIndexes); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var elements = virtualManager.elements; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return elements[index].nativeElement; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else { - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - __proto.collectPanels = function (flicking) { - var align = parsePanelAlign(flicking.renderer.align); - return range(flicking.virtual.initialPanelCount).map(function (index) { - return new VirtualPanel({ - index: index, - elementProvider: new VirtualElementProvider(flicking), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (_el, options) { - return new VirtualPanel(__assign(__assign({}, options), { - elementProvider: new VirtualElementProvider(options.flicking) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.virtual.elements.forEach(function (el) { - setSize(el.nativeElement, size); - }); - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - return VirtualRenderingStrategy; -}(); - -/** - * @extends Component - * @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"} - * @requires {@link https://github.com/naver/egjs-component|@egjs/component} - * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes} - */ -var Flicking = /*#__PURE__*/function (_super) { - __extends(Flicking, _super); - /** - * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string - * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다. - * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트 - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist| - * - * - * |code|조건| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우| - * - * - * @example - * ```ts - * import Flicking from "@egjs/flicking"; - * - * // Creating new instance of Flicking with HTMLElement - * const flicking = new Flicking(document.querySelector(".flicking-viewport"), { circular: true }); - * - * // Creating new instance of Flicking with CSS selector - * const flicking2 = new Flicking(".flicking-viewport", { circular: true }); - * ``` - */ - function Flicking(root, _a) { - var _b = _a === void 0 ? {} : _a, - _c = _b.align, - align = _c === void 0 ? ALIGN.CENTER : _c, - _d = _b.defaultIndex, - defaultIndex = _d === void 0 ? 0 : _d, - _e = _b.horizontal, - horizontal = _e === void 0 ? true : _e, - _f = _b.circular, - circular = _f === void 0 ? false : _f, - _g = _b.circularFallback, - circularFallback = _g === void 0 ? CIRCULAR_FALLBACK.LINEAR : _g, - _h = _b.bound, - bound = _h === void 0 ? false : _h, - _j = _b.adaptive, - adaptive = _j === void 0 ? false : _j, - _k = _b.panelsPerView, - panelsPerView = _k === void 0 ? -1 : _k, - _l = _b.noPanelStyleOverride, - noPanelStyleOverride = _l === void 0 ? false : _l, - _m = _b.resizeOnContentsReady, - resizeOnContentsReady = _m === void 0 ? false : _m, - _o = _b.nested, - nested = _o === void 0 ? false : _o, - _p = _b.needPanelThreshold, - needPanelThreshold = _p === void 0 ? 0 : _p, - _q = _b.preventEventsBeforeInit, - preventEventsBeforeInit = _q === void 0 ? true : _q, - _r = _b.deceleration, - deceleration = _r === void 0 ? 0.0075 : _r, - _s = _b.duration, - duration = _s === void 0 ? 500 : _s, - _t = _b.easing, - easing = _t === void 0 ? function (x) { - return 1 - Math.pow(1 - x, 3); - } : _t, - _u = _b.inputType, - inputType = _u === void 0 ? ["mouse", "touch"] : _u, - _v = _b.moveType, - moveType = _v === void 0 ? "snap" : _v, - _w = _b.threshold, - threshold = _w === void 0 ? 40 : _w, - _x = _b.interruptable, - interruptable = _x === void 0 ? true : _x, - _y = _b.bounce, - bounce = _y === void 0 ? "20%" : _y, - _z = _b.iOSEdgeSwipeThreshold, - iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z, - _0 = _b.preventClickOnDrag, - preventClickOnDrag = _0 === void 0 ? true : _0, - _1 = _b.preventDefaultOnDrag, - preventDefaultOnDrag = _1 === void 0 ? false : _1, - _2 = _b.disableOnInit, - disableOnInit = _2 === void 0 ? false : _2, - _3 = _b.changeOnHold, - changeOnHold = _3 === void 0 ? false : _3, - _4 = _b.renderOnlyVisible, - renderOnlyVisible = _4 === void 0 ? false : _4, - _5 = _b.virtual, - virtual = _5 === void 0 ? null : _5, - _6 = _b.autoInit, - autoInit = _6 === void 0 ? true : _6, - _7 = _b.autoResize, - autoResize = _7 === void 0 ? true : _7, - _8 = _b.useResizeObserver, - useResizeObserver = _8 === void 0 ? true : _8, - _9 = _b.resizeDebounce, - resizeDebounce = _9 === void 0 ? 0 : _9, - _10 = _b.maxResizeDebounce, - maxResizeDebounce = _10 === void 0 ? 100 : _10, - _11 = _b.useFractionalSize, - useFractionalSize = _11 === void 0 ? false : _11, - _12 = _b.externalRenderer, - externalRenderer = _12 === void 0 ? null : _12, - _13 = _b.renderExternal, - renderExternal = _13 === void 0 ? null : _13; - var _this = _super.call(this) || this; - // Internal states - _this._initialized = false; - _this._plugins = []; - // Bind options - _this._align = align; - _this._defaultIndex = defaultIndex; - _this._horizontal = horizontal; - _this._circular = circular; - _this._circularFallback = circularFallback; - _this._bound = bound; - _this._adaptive = adaptive; - _this._panelsPerView = panelsPerView; - _this._noPanelStyleOverride = noPanelStyleOverride; - _this._resizeOnContentsReady = resizeOnContentsReady; - _this._nested = nested; - _this._virtual = virtual; - _this._needPanelThreshold = needPanelThreshold; - _this._preventEventsBeforeInit = preventEventsBeforeInit; - _this._deceleration = deceleration; - _this._duration = duration; - _this._easing = easing; - _this._inputType = inputType; - _this._moveType = moveType; - _this._threshold = threshold; - _this._interruptable = interruptable; - _this._bounce = bounce; - _this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold; - _this._preventClickOnDrag = preventClickOnDrag; - _this._preventDefaultOnDrag = preventDefaultOnDrag; - _this._disableOnInit = disableOnInit; - _this._changeOnHold = changeOnHold; - _this._renderOnlyVisible = renderOnlyVisible; - _this._autoInit = autoInit; - _this._autoResize = autoResize; - _this._useResizeObserver = useResizeObserver; - _this._resizeDebounce = resizeDebounce; - _this._maxResizeDebounce = maxResizeDebounce; - _this._useFractionalSize = useFractionalSize; - _this._externalRenderer = externalRenderer; - _this._renderExternal = renderExternal; - // Create core components - _this._viewport = new Viewport(_this, getElement(root)); - _this._autoResizer = new AutoResizer(_this); - _this._renderer = _this._createRenderer(); - _this._camera = _this._createCamera(); - _this._control = _this._createControl(); - _this._virtualManager = new VirtualManager(_this, virtual); - if (_this._autoInit) { - void _this.init(); - } - return _this; - } - var __proto = Flicking.prototype; - Object.defineProperty(__proto, "control", { - // Components - /** - * {@link Control} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스 - * @type {Control} - * @default SnapControl - * @readonly - * @see Control - * @see SnapControl - * @see FreeControl - */ - get: function () { - return this._control; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "camera", { - /** - * {@link Camera} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스 - * @type {Camera} - * @default LinearCamera - * @readonly - * @see Camera - * @see LinearCamera - * @see BoundCamera - * @see CircularCamera - */ - get: function () { - return this._camera; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderer", { - /** - * {@link Renderer} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스 - * @type {Renderer} - * @default VanillaRenderer - * @readonly - * @see Renderer - * @see VanillaRenderer - * @see ExternalRenderer - */ - get: function () { - return this._renderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "viewport", { - /** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - * @type {Viewport} - * @readonly - * @see Viewport - */ - get: function () { - return this._viewport; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialized", { - // Internal States - /** - * Whether Flicking's {@link Flicking#init init()} is called. - * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}. - * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수. - * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._initialized; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._camera.circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtualEnabled", { - /** - * Whether the `virtual` option is enabled. - * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero. - * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._panelsPerView > 0 && this._virtual != null; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._control.activeIndex; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "element", { - /** - * The root(`.flicking-viewport`) element - * @ko root(`.flicking-viewport`) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._viewport.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "currentPanel", { - /** - * Currently active panel - * @ko 현재 선택된 패널 - * @type {Panel} - * @readonly - * @see Panel - */ - get: function () { - return this._control.activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panels", { - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._renderer.panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._renderer.panelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * Array of panels that is visible at the current position - * @ko 현재 보이는 패널의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._camera.visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.holding; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePlugins", { - /** - * A current list of activated plugins - * @ko 현재 활성화된 플러그인 목록 - * @type {Plugin[]} - * @readonly - */ - get: function () { - return this._plugins; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - // UI / LAYOUT - /** - * Align position of the panels within viewport. You can set different values each for the panel and camera - * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다 - * @type {ALIGN | string | number | { panel: string | number, camera: string | number }} - * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값 - * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값 - * @default "center" - * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // Literal strings - * "prev", "center", "next", - * // % values, applied to both panel & camera - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000, - * // Setting a different value for panel & camera - * { panel: "10%", camera: "25%" } - * ]; - * - * possibleOptions.forEach(align => { - * new Flicking("#el", { align }); - * }); - * ``` - */ - get: function () { - return this._align; - }, - // Options Setter - // UI / LAYOUT - set: function (val) { - this._align = val; - this._renderer.align = val; - this._camera.align = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "defaultIndex", { - /** - * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer - * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )} - */ - get: function () { - return this._defaultIndex; - }, - set: function (val) { - this._defaultIndex = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "horizontal", { - /** - * Direction of panel movement (true: horizontal, false: vertical) - * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향) - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )} - */ - get: function () { - return this._horizontal; - }, - set: function (val) { - this._horizontal = val; - this._control.controller.updateDirection(); - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circular", { - /** - * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling. - * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )} - */ - get: function () { - return this._circular; - }, - set: function (val) { - this._circular = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularFallback", { - /** - * Set panel control mode for the case when circular cannot be enabled. - * "linear" will set the view's range from the top of the first panel to the top of the last panel. - * "bound" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel. - * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다. - * "linear" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다. - * "bound" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다. - * @see CIRCULAR_FALLBACK - * @type {string} - * @default "linear" - * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )} - */ - get: function () { - return this._circularFallback; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bound", { - /** - * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel - * Only can be enabled when `circular=false` - * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다 - * `circular=false`인 경우에만 사용할 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )} - */ - get: function () { - return this._bound; - }, - set: function (val) { - this._bound = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "adaptive", { - /** - * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true` - * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )} - */ - get: function () { - return this._adaptive; - }, - set: function (val) { - this._adaptive = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelsPerView", { - /** - * A visible number of panels on viewport. Enabling this option will automatically resize panel size - * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다 - * @type {number} - * @default -1 - * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )} - */ - get: function () { - return this._panelsPerView; - }, - set: function (val) { - this._panelsPerView = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "noPanelStyleOverride", { - /** - * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled. - * This behavior can be useful in terms of performance when you're manually managing all panel sizes - * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다. - * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다 - * @type {boolean} - * @default false - */ - get: function () { - return this._noPanelStyleOverride; - }, - set: function (val) { - this._noPanelStyleOverride = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeOnContentsReady", { - /** - * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded. - * This can be useful when you have contents inside Flicking that changes its size when it's loaded - * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다. - * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )} - */ - get: function () { - return this._resizeOnContentsReady; - }, - set: function (val) { - this._resizeOnContentsReady = val; - if (val) { - this._renderer.checkPanelContentsReady(this._renderer.panels); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "nested", { - /** - * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel. - * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option. - * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다. - * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )} - */ - get: function () { - return this._nested; - }, - set: function (val) { - this._nested = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.nested = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "needPanelThreshold", { - // EVENTS - /** - * A Threshold from viewport edge before triggering `needPanel` event - * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )} - */ - get: function () { - return this._needPanelThreshold; - }, - // EVENTS - set: function (val) { - this._needPanelThreshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventEventsBeforeInit", { - /** - * When enabled, events are not triggered before `ready` when initializing - * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )} - */ - get: function () { - return this._preventEventsBeforeInit; - }, - set: function (val) { - this._preventEventsBeforeInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "deceleration", { - // ANIMATION - /** - * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time - * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다 - * @type {number} - * @default 0.0075 - * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )} - */ - get: function () { - return this._deceleration; - }, - // ANIMATION - set: function (val) { - this._deceleration = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.deceleration = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "easing", { - /** - * An easing function applied to the panel movement animation. Default value is `easeOutCubic` - * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다 - * @type {function} - * @default x => 1 - Math.pow(1 - x, 3) - * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/} - * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )} - */ - get: function () { - return this._easing; - }, - set: function (val) { - this._easing = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.easing = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "duration", { - /** - * Default duration of the animation (ms) - * @ko 디폴트 애니메이션 재생 시간 (ms) - * @type {number} - * @default 500 - * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )} - */ - get: function () { - return this._duration; - }, - set: function (val) { - this._duration = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "inputType", { - // INPUT - /** - * Types of input devices to enable - * @ko 활성화할 입력 장치 종류 - * @type {string[]} - * @default ["touch", "mouse"] - * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)} - * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)} - * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )} - */ - get: function () { - return this._inputType; - }, - // INPUT - set: function (val) { - this._inputType = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.inputType = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "moveType", { - /** - * Movement style by user input. This will change instance type of {@link Flicking#control} - * You can use the values of the constant {@link MOVE_TYPE} - * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다 - * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다 - * @type {MOVE_TYPE | Pair} - * @default "snap" - * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )} - * @example - * |moveType|control|options| - * |:---:|:---:|:---:| - * |"snap"|{@link SnapControl}|| - * |"freeScroll"|{@link FreeControl}|{@link FreeControlOptions}| - * - * ```ts - * import Flicking, { MOVE_TYPE } from "@egjs/flicking"; - * - * const flicking = new Flicking({ - * moveType: MOVE_TYPE.SNAP - * }); - * ``` - * - * ```ts - * const flicking = new Flicking({ - * // If you want more specific settings for the moveType - * // [moveType, options for that moveType] - * // In this case, it's ["freeScroll", FreeControlOptions] - * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }] - * }); - * ``` - */ - get: function () { - return this._moveType; - }, - set: function (val) { - this._moveType = val; - var prevControl = this._control; - var newControl = this._createControl(); - var activePanel = prevControl.activePanel; - newControl.copy(prevControl); - var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0; - this._control = newControl; - this._control.updatePosition(prevProgressInPanel); - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "threshold", { - /** - * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel. - * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다. - * @type {number} - * @default 40 - * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )} - */ - get: function () { - return this._threshold; - }, - set: function (val) { - this._threshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "interruptable", { - /** - * Set animation to be interruptable by click/touch. - * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )} - */ - get: function () { - return this._interruptable; - }, - set: function (val) { - this._interruptable = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.interruptable = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * The size value of the bounce area. Only can be enabled when `circular=false`. - * You can set different bounce value for prev/next direction by using array. - * `number` for px value, and `string` for px, and % value relative to viewport size. - * You have to call {@link Control#updateInput} after changing this to take effect. - * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다. - * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다. - * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다. - * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다. - * @type {string | number | Array} - * @default "20%" - * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // % values, relative to viewport element(".flicking-viewport")'s size - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000 - * ]; - * ``` - * - * @example - * ```ts - * const flicking = new Flicking("#el", { bounce: "20%" }); - * - * flicking.bounce = "100%"; - * flicking.control.updateInput(); // Call this to update! - * ``` - */ - get: function () { - return this._bounce; - }, - set: function (val) { - this._bounce = val; - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "iOSEdgeSwipeThreshold", { - /** - * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward - * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px) - * @type {number} - * @default 30 - * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )} - */ - get: function () { - return this._iOSEdgeSwipeThreshold; - }, - set: function (val) { - this._iOSEdgeSwipeThreshold = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.iOSEdgeSwipeThreshold = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventClickOnDrag", { - /** - * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element - * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )} - */ - get: function () { - return this._preventClickOnDrag; - }, - set: function (val) { - var prevVal = this._preventClickOnDrag; - if (val === prevVal) return; - var controller = this._control.controller; - if (val) { - controller.addPreventClickHandler(); - } else { - controller.removePreventClickHandler(); - } - this._preventClickOnDrag = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventDefaultOnDrag", { - /** - * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging - * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )} - */ - get: function () { - return this._preventDefaultOnDrag; - }, - set: function (val) { - this._preventDefaultOnDrag = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.preventDefaultOnDrag = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "disableOnInit", { - /** - * Automatically call {@link Flicking#disableInput disableInput()} on initialization - * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )} - */ - get: function () { - return this._disableOnInit; - }, - set: function (val) { - this._disableOnInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "changeOnHold", { - /** - * Change active panel index on mouse/touch hold while animating. - * `index` of the `willChange`/`willRestore` event will be used as new index. - * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다. - * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )} - */ - get: function () { - return this._changeOnHold; - }, - set: function (val) { - this._changeOnHold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderOnlyVisible", { - // PERFORMANCE - /** - * Whether to render visible panels only. This can dramatically increase performance when there're many panels - * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )} - */ - get: function () { - return this._renderOnlyVisible; - }, - // PERFORMANCE - set: function (val) { - this._renderOnlyVisible = val; - void this._renderer.render(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtual", { - /** - * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1` - * Must be used with `panelsPerview`. - * After Flicking's initialized, this property can be used to add/remove the panel count. - * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다. - * `panelsPerView` 옵션과 함께 사용되어야만 합니다. - * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다. - * @type {VirtualManager} - * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수 - * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @property {string} [panelClass="flicking-panel"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )} - * @example - * ```ts - * import Flicking, { VirtualPanel } from "@egjs/flicking"; - * - * const flicking = new Flicking("#some_el", { - * panelsPerView: 3, - * virtual: { - * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`, - * initialPanelCount: 100 - * } - * }); - * - * // Add 100 virtual panels (at the end) - * flicking.virtual.append(100); - * - * // Remove 100 virtual panels from 0 to 100 - * flicking.virtual.remove(0, 100); - * ``` - */ - get: function () { - return this._virtualManager; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoInit", { - // OTHERS - /** - * Call {@link Flicking#init init()} automatically when creating Flicking's instance - * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )} - * @readonly - */ - get: function () { - return this._autoInit; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoResize", { - /** - * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed - * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._autoResize; - }, - // OTHERS - set: function (val) { - this._autoResize = val; - if (val) { - this._autoResizer.enable(); - } else { - this._autoResizer.disable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useResizeObserver", { - /** - * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option - * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )} - */ - get: function () { - return this._useResizeObserver; - }, - set: function (val) { - this._useResizeObserver = val; - if (this._autoResize) { - this._autoResizer.enable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeDebounce", { - /** - * Delays size recalculation from `autoResize` by the given time in milisecond. - * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again. - * This can increase performance by preventing `resize` being called too often. - * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다. - * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다. - * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다. - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )} - */ - get: function () { - return this._resizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "maxResizeDebounce", { - /** - * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond. - * This guarantees that size recalculation is performed at least once every (n)ms. - * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms) - * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다. - * @type {number} - * @default 100 - * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )} - */ - get: function () { - return this._maxResizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useFractionalSize", { - /** - * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle. - * This can prevent 1px offset issue in some cases where panel size has the fractional part. - * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element. - * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다. - * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다. - * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )} - */ - get: function () { - return this._useFractionalSize; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "externalRenderer", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - */ - get: function () { - return this._externalRenderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderExternal", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - * @deprecated - */ - get: function () { - return this._renderExternal; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Flicking and move to the default index - * This is automatically called on Flicking's constructor when `autoInit` is true(default) - * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다 - * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다 - * @fires Flicking#ready - * @return {Promise} - */ - __proto.init = function () { - var _this = this; - if (this._initialized) return Promise.resolve(); - var camera = this._camera; - var renderer = this._renderer; - var control = this._control; - var virtualManager = this._virtualManager; - var originalTrigger = this.trigger; - var preventEventsBeforeInit = this._preventEventsBeforeInit; - camera.init(); - virtualManager.init(); - renderer.init(this); - control.init(this); - if (preventEventsBeforeInit) { - this.trigger = function () { - return _this; - }; - } - this._initialResize(); - // Look at initial panel - this._moveToInitialPanel(); - if (this._autoResize) { - this._autoResizer.enable(); - } - if (this._preventClickOnDrag) { - control.controller.addPreventClickHandler(); - } - if (this._disableOnInit) { - this.disableInput(); - } - renderer.checkPanelContentsReady(renderer.panels); - this._initialized = true; - return renderer.render().then(function () { - // Done initializing & emit ready event - _this._plugins.forEach(function (plugin) { - return plugin.init(_this); - }); - if (preventEventsBeforeInit) { - _this.trigger = originalTrigger; - } - _this.trigger(new Component.ComponentEvent(EVENTS.READY)); - }); - }; - /** - * Destroy Flicking and remove all event handlers - * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다 - * @return {void} - */ - __proto.destroy = function () { - this.off(); - this._autoResizer.disable(); - this._control.destroy(); - this._camera.destroy(); - this._renderer.destroy(); - this._plugins.forEach(function (plugin) { - return plugin.destroy(); - }); - this._initialized = false; - }; - /** - * Move to the previous panel (current index - 1) - * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise - */ - __proto.prev = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.prev()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : -1, duration, DIRECTION.PREV); - }; - /** - * Move to the next panel (current index + 1) - * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise - */ - __proto.next = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.next()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : this._renderer.panelCount, duration, DIRECTION.NEXT); - }; - /** - * Move to the panel with given index - * @ko 주어진 인덱스에 해당하는 패널로 이동합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveTo = function (index, duration, direction) { - if (duration === void 0) { - duration = this._duration; - } - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - return Promise.reject(new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE)); - } - if (this._control.animating) { - return Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING)); - } - if (this._control.holding) { - this._control.controller.release(); - } - return this._control.moveToPanel(panel, { - duration: duration, - direction: direction - }); - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @throws {FlickingError} - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우 - * @return {void} - */ - __proto.updateAnimation = function (index, duration, direction) { - if (!this._control.animating) { - return; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - throw new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE); - } - this._control.updateAnimation(panel, duration, direction); - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @fires Flicking#moveEnd - * @return {void} - */ - __proto.stopAnimation = function () { - if (!this._control.animating) { - return; - } - this._control.stopAnimation(); - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - * @example - * ```ts - * const panel = flicking.getPanel(0); - * // Which is a shorthand to... - * const samePanel = flicking.panels[0]; - * ``` - */ - __proto.getPanel = function (index) { - return this._renderer.getPanel(index); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @return {this} - */ - __proto.enableInput = function () { - this._control.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @return {this} - */ - __proto.disableInput = function () { - this._control.disable(); - return this; - }; - /** - * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()} - * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다 - * @param {object} options Status retrieving optionsStatus 반환 옵션 - * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다 - * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다 - * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다 - * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true - * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다. - * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체. - */ - __proto.getStatus = function (_a) { - var _b, _c; - var _d = _a === void 0 ? {} : _a, - _e = _d.index, - index = _e === void 0 ? true : _e, - _f = _d.position, - position = _f === void 0 ? true : _f, - _g = _d.includePanelHTML, - includePanelHTML = _g === void 0 ? false : _g, - _h = _d.visiblePanelsOnly, - visiblePanelsOnly = _h === void 0 ? false : _h; - var camera = this._camera; - var panels = visiblePanelsOnly ? this.visiblePanels : this.panels; - var status = { - panels: panels.map(function (panel) { - var panelInfo = { - index: panel.index - }; - if (includePanelHTML) { - panelInfo.html = panel.element.outerHTML; - } - return panelInfo; - }) - }; - if (index) { - status.index = this.index; - } - if (position) { - var nearestAnchor = camera.findNearestAnchor(camera.position); - if (nearestAnchor) { - status.position = { - panel: nearestAnchor.panel.index, - progressInPanel: camera.getProgressInPanel(nearestAnchor.panel) - }; - } - } - if (visiblePanelsOnly) { - var visiblePanels = this.visiblePanels; - status.visibleOffset = (_c = (_b = visiblePanels[0]) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : 0; - } - return status; - }; - /** - * Restore to the state of the given {@link Status} - * @ko 주어진 {@link Status}의 상태로 복원합니다 - * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다 - * @return {void} - */ - __proto.setStatus = function (status) { - var _a; - if (!this._initialized) { - throw new FlickingError(MESSAGE.NOT_INITIALIZED, CODE.NOT_INITIALIZED); - } - var index = status.index, - position = status.position, - visibleOffset = status.visibleOffset, - panels = status.panels; - var renderer = this._renderer; - var control = this._control; - // Can't add/remove panels on external rendering - if (((_a = panels[0]) === null || _a === void 0 ? void 0 : _a.html) && !this._renderExternal) { - renderer.batchRemove({ - index: 0, - deleteCount: this.panels.length, - hasDOMInElements: true - }); - renderer.batchInsert({ - index: 0, - elements: parseElement(panels.map(function (panel) { - return panel.html; - })), - hasDOMInElements: true - }); - } - if (index != null) { - var panelIndex = visibleOffset ? index - visibleOffset : index; - void this.moveTo(panelIndex, 0).catch(function () { - return void 0; - }); - } - if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) { - var panel = position.panel, - progressInPanel = position.progressInPanel; - var panelIndex = visibleOffset ? panel - visibleOffset : panel; - var panelRange = renderer.panels[panelIndex].range; - var newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - void control.moveToPosition(newCameraPos, 0).catch(function () { - return void 0; - }); - } - }; - /** - * Add plugins that can have different effects on Flicking - * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다 - * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들) - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.addPlugins = function () { - var _a; - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - if (this._initialized) { - plugins.forEach(function (item) { - return item.init(_this); - }); - } - (_a = this._plugins).push.apply(_a, __spread(plugins)); - return this; - }; - /** - * Remove plugins from Flicking. - * @ko 플리킹으로부터 플러그인들을 제거합니다. - * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들). - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.removePlugins = function () { - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - plugins.forEach(function (item) { - var foundIndex = findIndex(_this._plugins, function (val) { - return val === item; - }); - if (foundIndex >= 0) { - item.destroy(); - _this._plugins.splice(foundIndex, 1); - } - }); - return this; - }; - /** - * Update viewport/panel sizes - * @ko 패널 및 뷰포트의 크기를 갱신합니다 - * @method - * @fires Flicking#beforeResize - * @fires Flicking#afterResize - * @return {this} - */ - __proto.resize = function () { - return __awaiter(this, void 0, void 0, function () { - var viewport, renderer, camera, control, activePanel, prevWidth, prevHeight, prevProgressInPanel, newWidth, newHeight, sizeChanged; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - viewport = this._viewport; - renderer = this._renderer; - camera = this._camera; - control = this._control; - activePanel = control.activePanel; - prevWidth = viewport.width; - prevHeight = viewport.height; - prevProgressInPanel = activePanel ? camera.getProgressInPanel(activePanel) : 0; - this.trigger(new Component.ComponentEvent(EVENTS.BEFORE_RESIZE, { - width: prevWidth, - height: prevHeight, - element: viewport.element - })); - viewport.resize(); - return [4 /*yield*/, renderer.forceRenderAllPanels()]; - case 1: - _a.sent(); // Render all panel elements, to update sizes - if (!this._initialized) { - return [2 /*return*/]; - } - - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateAdaptiveHeight(); - camera.updatePanelOrder(); - camera.updateOffset(); - return [4 /*yield*/, renderer.render()]; - case 2: - _a.sent(); - if (!this._initialized) { - return [2 /*return*/]; - } - - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - newWidth = viewport.width; - newHeight = viewport.height; - sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight; - this.trigger(new Component.ComponentEvent(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: prevWidth, - height: prevHeight - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Add new panels after the last panel - * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of appended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new Flicking("#flick"); - * // These are possible parameters - * flicking.append(document.createElement("div")); - * flicking.append("\Panel\"); - * flicking.append(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.append("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.append = function (element) { - return this.insert(this._renderer.panelCount, element); - }; - /** - * Add new panels before the first panel - * This will increase index of panels after by the number of panels added - * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다 - * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다. - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.prepend(document.createElement("div")); - * flicking.prepend("\Panel\"); - * flicking.prepend(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.prepend("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.prepend = function (element) { - return this.insert(0, element); - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.insert(0, document.createElement("div")); - * flicking.insert(2, "\Panel\"); - * flicking.insert(1, ["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.insert(3, "\Panel 1\\Panel 2\"); - * ``` - */ - __proto.insert = function (index, element) { - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchInsert({ - index: index, - elements: parseElement(element), - hasDOMInElements: true - }); - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {number} index Index of panel to remove제거할 패널의 인덱스 - * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @return {Panel[]} An array of removed panels제거된 패널들의 배열 - */ - __proto.remove = function (index, deleteCount) { - if (deleteCount === void 0) { - deleteCount = 1; - } - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchRemove({ - index: index, - deleteCount: deleteCount, - hasDOMInElements: true - }); - }; - __proto._createControl = function () { - var _a; - var moveType = this._moveType; - var moveTypes = Object.keys(MOVE_TYPE).map(function (key) { - return MOVE_TYPE[key]; - }); - var moveTypeStr = Array.isArray(moveType) ? moveType[0] : moveType; - var moveTypeOptions = Array.isArray(moveType) ? (_a = moveType[1]) !== null && _a !== void 0 ? _a : {} : {}; - if (!includes(moveTypes, moveTypeStr)) { - throw new FlickingError(MESSAGE.WRONG_OPTION("moveType", JSON.stringify(moveType)), CODE.WRONG_OPTION); - } - switch (moveTypeStr) { - case MOVE_TYPE.SNAP: - return new SnapControl(moveTypeOptions); - case MOVE_TYPE.FREE_SCROLL: - return new FreeControl(moveTypeOptions); - case MOVE_TYPE.STRICT: - return new StrictControl(moveTypeOptions); - } - }; - __proto._createCamera = function () { - if (this._circular && this._bound) { - // eslint-disable-next-line no-console - console.warn("\"circular\" and \"bound\" option cannot be used together, ignoring bound."); - } - return new Camera(this, { - align: this._align - }); - }; - __proto._createRenderer = function () { - var externalRenderer = this._externalRenderer; - if (this._virtual && this._panelsPerView <= 0) { - // eslint-disable-next-line no-console - console.warn("\"virtual\" and \"panelsPerView\" option should be used together, ignoring virtual."); - } - return externalRenderer ? externalRenderer : this._renderExternal ? this._createExternalRenderer() : this._createVanillaRenderer(); - }; - __proto._createExternalRenderer = function () { - var _a = this._renderExternal, - renderer = _a.renderer, - rendererOptions = _a.rendererOptions; - return new renderer(__assign({ - align: this._align - }, rendererOptions)); - }; - __proto._createVanillaRenderer = function () { - var virtual = this.virtualEnabled; - return new VanillaRenderer({ - align: this._align, - strategy: virtual ? new VirtualRenderingStrategy() : new NormalRenderingStrategy({ - providerCtor: VanillaElementProvider - }) - }); - }; - __proto._moveToInitialPanel = function () { - var renderer = this._renderer; - var control = this._control; - var camera = this._camera; - var defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0); - if (!defaultPanel) return; - var nearestAnchor = camera.findNearestAnchor(defaultPanel.position); - var initialPanel = nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index ? nearestAnchor.panel : defaultPanel; - control.setActive(initialPanel, null, false); - if (!nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), CODE.POSITION_NOT_REACHABLE); - } - var position = initialPanel.position; - if (!camera.canReach(initialPanel)) { - position = nearestAnchor.position; - } - camera.lookAt(position); - control.updateInput(); - camera.updateOffset(); - }; - __proto._initialResize = function () { - var viewport = this._viewport; - var renderer = this._renderer; - var camera = this._camera; - var control = this._control; - this.trigger(new Component.ComponentEvent(EVENTS.BEFORE_RESIZE, { - width: 0, - height: 0, - element: viewport.element - })); - viewport.resize(); - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateOffset(); - control.updateInput(); - var newWidth = viewport.width; - var newHeight = viewport.height; - var sizeChanged = newWidth !== 0 || newHeight !== 0; - this.trigger(new Component.ComponentEvent(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: 0, - height: 0 - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - }; - /** - * Version info string - * @ko 버전정보 문자열 - * @type {string} - * @readonly - * @example - * ```ts - * Flicking.VERSION; // ex) 4.0.0 - * ``` - */ - Flicking.VERSION = "4.11.4"; - return Flicking; -}(Component); - -/** - * Decorator that makes the method of flicking available in the framework. - * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터. - * @memberof eg.Flicking - * @private - * @example - * ```js - * import Flicking, { withFlickingMethods } from "@egjs/flicking"; - * - * class Flicking extends React.Component> { - * @withFlickingMethods - * private flicking: Flicking; - * } - * ``` - */ -var withFlickingMethods = function (prototype, flickingName) { - [Component.prototype, Flicking.prototype].forEach(function (proto) { - Object.getOwnPropertyNames(proto).filter(function (name) { - return !prototype[name] && name.indexOf("_") !== 0 && name !== "constructor"; - }).forEach(function (name) { - var descriptor = Object.getOwnPropertyDescriptor(proto, name); - if (descriptor.value) { - // Public Function - Object.defineProperty(prototype, name, { - value: function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.value).call.apply(_a, __spread([this[flickingName]], args)); - } - }); - } else { - var getterDescriptor = {}; - if (descriptor.get) { - getterDescriptor.get = function () { - var _a; - var flicking = this[flickingName]; - return flicking && ((_a = descriptor.get) === null || _a === void 0 ? void 0 : _a.call(flicking)); - }; - } - if (descriptor.set) { - getterDescriptor.set = function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.set) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spread([this[flickingName]], args)); - }; - } - Object.defineProperty(prototype, name, getterDescriptor); - } - }); - }); -}; - -var sync = (function (flicking, diffResult, rendered) { - var renderer = flicking.renderer; - var panels = renderer.panels; - var prevList = __spread(diffResult.prevList); - var added = []; - var removed = []; - if (diffResult.removed.length > 0) { - var endIdx_1 = -1; - var prevIdx_1 = -1; - diffResult.removed.forEach(function (removedIdx) { - if (endIdx_1 < 0) { - endIdx_1 = removedIdx; - } - if (prevIdx_1 >= 0 && removedIdx !== prevIdx_1 - 1) { - removed.push.apply(removed, __spread(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - endIdx_1 = removedIdx; - prevIdx_1 = removedIdx; - } else { - prevIdx_1 = removedIdx; - } - prevList.splice(removedIdx, 1); - }); - removed.push.apply(removed, __spread(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - } - diffResult.ordered.forEach(function (_a) { - var _b = __read(_a, 2), - from = _b[0], - to = _b[1]; - var prevPanel = panels.splice(from, 1)[0]; - panels.splice(to, 0, prevPanel); - }); - if (diffResult.ordered.length > 0) { - panels.forEach(function (panel, idx) { - var indexDiff = idx - panel.index; - if (indexDiff > 0) { - panel.increaseIndex(indexDiff); - } else { - panel.decreaseIndex(-indexDiff); - } - }); - panels.sort(function (panel1, panel2) { - return panel1.index - panel2.index; - }); - panels.forEach(function (panel) { - panel.updatePosition(); - }); - } - if (diffResult.added.length > 0) { - var startIdx_1 = -1; - var prevIdx_2 = -1; - var addedElements_1 = rendered.slice(prevList.length); - diffResult.added.forEach(function (addedIdx, idx) { - if (startIdx_1 < 0) { - startIdx_1 = idx; - } - if (prevIdx_2 >= 0 && addedIdx !== prevIdx_2 + 1) { - added.push.apply(added, __spread(batchInsert(renderer, diffResult, addedElements_1, startIdx_1, idx + 1))); - startIdx_1 = -1; - prevIdx_2 = -1; - } else { - prevIdx_2 = addedIdx; - } - }); - if (startIdx_1 >= 0) { - added.push.apply(added, __spread(batchInsert(renderer, diffResult, addedElements_1, startIdx_1))); - } - } - if (diffResult.added.length > 0 || diffResult.removed.length > 0) { - renderer.updateAfterPanelChange(added, removed); - } -}); -var batchInsert = function (renderer, diffResult, addedElements, startIdx, endIdx) { - return renderer.batchInsertDefer.apply(renderer, __spread(diffResult.added.slice(startIdx, endIdx).map(function (index, elIdx) { - return { - index: index, - elements: [addedElements[elIdx]], - hasDOMInElements: false - }; - }))); -}; -var batchRemove = function (renderer, startIdx, endIdx) { - var removed = renderer.panels.slice(startIdx, endIdx); - return renderer.batchRemoveDefer({ - index: startIdx, - deleteCount: removed.length, - hasDOMInElements: false - }); -}; - -var getRenderingPanels = (function (flicking, diffResult) { - var removedPanels = diffResult.removed.reduce(function (map, idx) { - map[idx] = true; - return map; - }, {}); - var maintainedMap = diffResult.maintained.reduce(function (map, _a) { - var _b = __read(_a, 2), - prev = _b[0], - current = _b[1]; - map[prev] = current; - return map; - }, {}); - return __spread(flicking.panels.filter(function (panel) { - return !removedPanels[panel.index]; - }) - // Sort panels by position - .sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }).map(function (panel) { - return diffResult.list[maintainedMap[panel.index]]; - }), diffResult.added.map(function (idx) { - return diffResult.list[idx]; - })); -}); - -var getDefaultCameraTransform = (function (align, horizontal, firstPanelSize) { - if (align === void 0) { - align = ALIGN.CENTER; - } - if (horizontal === void 0) { - horizontal = true; - } - var cameraAlign = getCameraAlign(align); - var panelAlign = getPanelAlign(align); - if (panelAlign == null) return ""; - var camPosition = "calc(" + cameraAlign + " - (" + (firstPanelSize || "0px") + " * " + panelAlign.percentage + ") - " + panelAlign.absolute + "px)"; - return horizontal ? "translate(" + camPosition + ")" : "translate(0, " + camPosition + ")"; -}); -var getCameraAlign = function (align) { - var alignVal = typeof align === "object" ? align.camera : align; - return parseAlign(alignVal); -}; -var getPanelAlign = function (align) { - var alignVal = typeof align === "object" ? align.panel : align; - return parseArithmeticExpression(parseAlign(alignVal)); -}; -var parseAlign = function (alignVal) { - if (typeof alignVal === "number") { - return alignVal + "px"; - } - switch (alignVal) { - case ALIGN.CENTER: - return "50%"; - case ALIGN.NEXT: - return "100%"; - case ALIGN.PREV: - return "0%"; - default: - return alignVal; - } -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - -var modules = { - __proto__: null, - 'default': Flicking, - VanillaElementProvider: VanillaElementProvider, - VirtualElementProvider: VirtualElementProvider, - Panel: Panel, - VirtualPanel: VirtualPanel, - Viewport: Viewport, - FlickingError: FlickingError, - AnchorPoint: AnchorPoint, - VirtualManager: VirtualManager, - LinearCameraMode: LinearCameraMode, - CircularCameraMode: CircularCameraMode, - BoundCameraMode: BoundCameraMode, - Camera: Camera, - Control: Control, - SnapControl: SnapControl, - FreeControl: FreeControl, - StrictControl: StrictControl, - AxesController: AxesController, - State: State, - IdleState: IdleState, - HoldingState: HoldingState, - DraggingState: DraggingState, - AnimatingState: AnimatingState, - DisabledState: DisabledState, - StateMachine: StateMachine, - NormalRenderingStrategy: NormalRenderingStrategy, - VirtualRenderingStrategy: VirtualRenderingStrategy, - Renderer: Renderer, - VanillaRenderer: VanillaRenderer, - ExternalRenderer: ExternalRenderer, - ERROR_CODE: CODE, - EVENTS: EVENTS, - ALIGN: ALIGN, - DIRECTION: DIRECTION, - MOVE_TYPE: MOVE_TYPE, - CLASS: CLASS, - CIRCULAR_FALLBACK: CIRCULAR_FALLBACK, - ORDER: ORDER, - withFlickingMethods: withFlickingMethods, - sync: sync, - getRenderingPanels: getRenderingPanels, - getDefaultCameraTransform: getDefaultCameraTransform, - merge: merge, - getElement: getElement, - checkExistence: checkExistence, - clamp: clamp, - getFlickingAttached: getFlickingAttached, - toArray: toArray, - parseAlign: parseAlign$1, - parseBounce: parseBounce, - parseArithmeticSize: parseArithmeticSize, - parseArithmeticExpression: parseArithmeticExpression, - parseCSSSizeValue: parseCSSSizeValue, - parsePanelAlign: parsePanelAlign, - getDirection: getDirection, - parseElement: parseElement, - getMinusCompensatedIndex: getMinusCompensatedIndex, - includes: includes, - isString: isString, - circulatePosition: circulatePosition, - find: find, - findRight: findRight, - findIndex: findIndex, - getProgress: getProgress, - getStyle: getStyle, - setSize: setSize, - isBetween: isBetween, - circulateIndex: circulateIndex, - range: range, - getElementSize: getElementSize, - setPrototypeOf: setPrototypeOf -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -for (var name_1 in modules) { - Flicking[name_1] = modules[name_1]; -} -module.exports = Flicking; - -exports.ALIGN = ALIGN; -exports.AnchorPoint = AnchorPoint; -exports.AnimatingState = AnimatingState; -exports.AxesController = AxesController; -exports.BoundCameraMode = BoundCameraMode; -exports.CIRCULAR_FALLBACK = CIRCULAR_FALLBACK; -exports.CLASS = CLASS; -exports.Camera = Camera; -exports.CircularCameraMode = CircularCameraMode; -exports.Control = Control; -exports.DIRECTION = DIRECTION; -exports.DisabledState = DisabledState; -exports.DraggingState = DraggingState; -exports.ERROR_CODE = CODE; -exports.EVENTS = EVENTS; -exports.ExternalRenderer = ExternalRenderer; -exports.FlickingError = FlickingError; -exports.FreeControl = FreeControl; -exports.HoldingState = HoldingState; -exports.IdleState = IdleState; -exports.LinearCameraMode = LinearCameraMode; -exports.MOVE_TYPE = MOVE_TYPE; -exports.NormalRenderingStrategy = NormalRenderingStrategy; -exports.ORDER = ORDER; -exports.Panel = Panel; -exports.Renderer = Renderer; -exports.SnapControl = SnapControl; -exports.State = State; -exports.StateMachine = StateMachine; -exports.StrictControl = StrictControl; -exports.VanillaElementProvider = VanillaElementProvider; -exports.VanillaRenderer = VanillaRenderer; -exports.Viewport = Viewport; -exports.VirtualElementProvider = VirtualElementProvider; -exports.VirtualManager = VirtualManager; -exports.VirtualPanel = VirtualPanel; -exports.VirtualRenderingStrategy = VirtualRenderingStrategy; -exports.checkExistence = checkExistence; -exports.circulateIndex = circulateIndex; -exports.circulatePosition = circulatePosition; -exports.clamp = clamp; -exports["default"] = Flicking; -exports.find = find; -exports.findIndex = findIndex; -exports.findRight = findRight; -exports.getDefaultCameraTransform = getDefaultCameraTransform; -exports.getDirection = getDirection; -exports.getElement = getElement; -exports.getElementSize = getElementSize; -exports.getFlickingAttached = getFlickingAttached; -exports.getMinusCompensatedIndex = getMinusCompensatedIndex; -exports.getProgress = getProgress; -exports.getRenderingPanels = getRenderingPanels; -exports.getStyle = getStyle; -exports.includes = includes; -exports.isBetween = isBetween; -exports.isString = isString; -exports.merge = merge; -exports.parseAlign = parseAlign$1; -exports.parseArithmeticExpression = parseArithmeticExpression; -exports.parseArithmeticSize = parseArithmeticSize; -exports.parseBounce = parseBounce; -exports.parseCSSSizeValue = parseCSSSizeValue; -exports.parseElement = parseElement; -exports.parsePanelAlign = parsePanelAlign; -exports.range = range; -exports.setPrototypeOf = setPrototypeOf; -exports.setSize = setSize; -exports.sync = sync; -exports.toArray = toArray; -exports.withFlickingMethods = withFlickingMethods; -//# sourceMappingURL=flicking.cjs.js.map diff --git a/dist/flicking.cjs.js.map b/dist/flicking.cjs.js.map deleted file mode 100644 index 3af0d0daea..0000000000 --- a/dist/flicking.cjs.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flicking.cjs.js","sources":["../src/const/error.ts","../src/const/external.ts","../src/utils.ts","../src/core/FlickingError.ts","../src/core/Viewport.ts","../src/core/AutoResizer.ts","../src/core/panel/provider/VanillaElementProvider.ts","../src/core/panel/provider/VirtualElementProvider.ts","../src/core/VirtualManager.ts","../src/const/axes.ts","../src/control/states/State.ts","../src/control/states/IdleState.ts","../src/control/states/HoldingState.ts","../src/control/states/DraggingState.ts","../src/control/states/AnimatingState.ts","../src/control/states/DisabledState.ts","../src/control/StateMachine.ts","../src/control/AxesController.ts","../src/control/Control.ts","../src/core/AnchorPoint.ts","../src/control/SnapControl.ts","../src/control/FreeControl.ts","../src/control/StrictControl.ts","../src/camera/mode/CameraMode.ts","../src/camera/mode/LinearCameraMode.ts","../src/camera/mode/CircularCameraMode.ts","../src/camera/mode/BoundCameraMode.ts","../src/camera/Camera.ts","../src/renderer/Renderer.ts","../src/renderer/VanillaRenderer.ts","../src/renderer/ExternalRenderer.ts","../src/core/panel/Panel.ts","../src/renderer/strategy/NormalRenderingStrategy.ts","../src/core/panel/VirtualPanel.ts","../src/renderer/strategy/VirtualRenderingStrategy.ts","../src/Flicking.ts","../src/cfc/withFlickingMethods.ts","../src/cfc/sync.ts","../src/cfc/getRenderingPanels.ts","../src/cfc/getDefaultCameraTransform.ts","../src/index.ts","../src/index.cjs.ts"],"sourcesContent":["/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/restrict-template-expressions */\n\n/**\n * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.\n * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.\n * @name ERROR_CODE\n * @constant\n * @type object\n * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우\n * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우\n * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우\n * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)\n * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때\n * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우\n * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우\n * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)\n * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우\n * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우\n * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우\n * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)\n * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우\n * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우\n * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다\n * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우\n */\nexport const CODE = {\n WRONG_TYPE: 0,\n ELEMENT_NOT_FOUND: 1,\n VAL_MUST_NOT_NULL: 2,\n NOT_ATTACHED_TO_FLICKING: 3,\n WRONG_OPTION: 4,\n INDEX_OUT_OF_RANGE: 5,\n POSITION_NOT_REACHABLE: 6,\n TRANSFORM_NOT_SUPPORTED: 7,\n STOP_CALLED_BY_USER: 8,\n ANIMATION_INTERRUPTED: 9,\n ANIMATION_ALREADY_PLAYING: 10,\n NOT_ALLOWED_IN_FRAMEWORK: 11,\n NOT_INITIALIZED: 12,\n NO_ACTIVE: 13,\n NOT_ALLOWED_IN_VIRTUAL: 14\n} as const;\n\nexport const MESSAGE = {\n WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `\"${type}\"`).join(\" or \")}.`,\n ELEMENT_NOT_FOUND: (selector: string) => `Element with selector \"${selector}\" not found.`,\n VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,\n NOT_ATTACHED_TO_FLICKING: \"This module is not attached to the Flicking instance. \\\"init()\\\" should be called first.\",\n WRONG_OPTION: (optionName: string, val: any) => `Option \"${optionName}\" is not in correct format, given: ${val}`,\n INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index \"${val}\" is out of range: should be between ${min} and ${max}.`,\n POSITION_NOT_REACHABLE: (position: number) => `Position \"${position}\" is not reachable.`,\n TRANSFORM_NOT_SUPPORTED: \"Browser does not support CSS transform.\",\n STOP_CALLED_BY_USER: \"Event stop() is called by user.\",\n ANIMATION_INTERRUPTED: \"Animation is interrupted by user input.\",\n ANIMATION_ALREADY_PLAYING: \"Animation is already playing.\",\n NOT_ALLOWED_IN_FRAMEWORK: \"This behavior is not allowed in the frameworks like React, Vue, or Angular.\",\n NOT_INITIALIZED: \"Flicking is not initialized yet, call init() first.\",\n NO_ACTIVE: \"There's no active panel that Flicking has selected. This may be due to the absence of any panels.\",\n NOT_ALLOWED_IN_VIRTUAL: \"This behavior is not allowed when the virtual option is enabled\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nexport { CODE as ERROR_CODE } from \"./error\";\n\n/**\n * Event type object with event name strings of {@link Flicking}\n * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체\n * @type {object}\n * @property {\"holdStart\"} HOLD_START holdStart eventholdStart 이벤트\n * @property {\"holdEnd\"} HOLD_END holdEnd eventholdEnd 이벤트\n * @property {\"moveStart\"} MOVE_START moveStart eventmoveStart 이벤트\n * @property {\"move\"} MOVE move eventmove 이벤트\n * @property {\"moveEnd\"} MOVE_END moveEnd eventmoveEnd 이벤트\n * @property {\"willChange\"} WILL_CHANGE willChange eventwillChange 이벤트\n * @property {\"changed\"} CHANGED changed eventchanged 이벤트\n * @property {\"willRestore\"} WILL_RESTORE willRestore eventwillRestore 이벤트\n * @property {\"restored\"} RESTORED restored eventrestored 이벤트\n * @property {\"select\"} SELECT select eventselect 이벤트\n * @property {\"needPanel\"} NEED_PANEL needPanel eventneedPanel 이벤트\n * @property {\"panelChange\"} PANEL_CHANGE panelChange eventpanelChange 이벤트\n * @example\n * ```ts\n * import { EVENTS } from \"@egjs/flicking\";\n * EVENTS.MOVE_START; // \"moveStart\"\n * ```\n */\nexport const EVENTS = {\n READY: \"ready\",\n BEFORE_RESIZE: \"beforeResize\",\n AFTER_RESIZE: \"afterResize\",\n HOLD_START: \"holdStart\",\n HOLD_END: \"holdEnd\",\n MOVE_START: \"moveStart\",\n MOVE: \"move\",\n MOVE_END: \"moveEnd\",\n WILL_CHANGE: \"willChange\",\n CHANGED: \"changed\",\n WILL_RESTORE: \"willRestore\",\n RESTORED: \"restored\",\n SELECT: \"select\",\n NEED_PANEL: \"needPanel\",\n VISIBLE_CHANGE: \"visibleChange\",\n REACH_EDGE: \"reachEdge\",\n PANEL_CHANGE: \"panelChange\"\n} as const;\n\n/**\n * An object with all possible predefined literal string for the {@link Flicking#align align} option\n * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체\n * @type {object}\n * @property {\"prev\"} PREV left/top align좌/상 정렬\n * @property {\"center\"} CENTER center align중앙 정렬\n * @property {\"next\"} NEXT right/bottom align우/하 정렬\n */\nexport const ALIGN = {\n PREV: \"prev\",\n CENTER: \"center\",\n NEXT: \"next\"\n} as const;\n\n/**\n * An object of directions\n * @ko 방향을 나타내는 값들을 담고 있는 객체\n * @type {object}\n * @property {\"PREV\"} PREV \"left\" when {@link Flicking#horizontal horizontal} is true, and \"top\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다\n * @property {\"NEXT\"} NEXT \"right\" when {@link Flicking#horizontal horizontal} is true, and \"bottom\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다\n * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다\n */\nexport const DIRECTION = {\n PREV: \"PREV\",\n NEXT: \"NEXT\",\n NONE: null\n} as const;\n\n/**\n * An object with all possible {@link Flicking#moveType moveType}s\n * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체\n * @type {object}\n * @property {\"snap\"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"freeScroll\"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"strict\"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n */\nexport const MOVE_TYPE = {\n SNAP: \"snap\",\n FREE_SCROLL: \"freeScroll\",\n STRICT: \"strict\"\n} as const;\n\nexport const CLASS = {\n VERTICAL: \"vertical\",\n HIDDEN: \"flicking-hidden\",\n DEFAULT_VIRTUAL: \"flicking-panel\"\n};\n\n/**\n * An object with all possible {@link Flicking#circularFallback circularFallback}s\n * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체\n * @type {object}\n * @property {string} LINEAR \"linear\"\n * @property {string} BOUND \"bound\"\n */\nexport const CIRCULAR_FALLBACK = {\n LINEAR: \"linear\",\n BOUND: \"bound\"\n} as const;\n\n/**\n * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체\n * @type {object}\n * @property {string} LTR \"ltr\"\n * @property {string} RTL \"rtl\"\n */\nexport const ORDER = {\n LTR: \"ltr\",\n RTL: \"rtl\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking, { FlickingOptions } from \"./Flicking\";\nimport FlickingError from \"./core/FlickingError\";\nimport * as ERROR from \"./const/error\";\nimport { ALIGN, DIRECTION } from \"./const/external\";\nimport { LiteralUnion, Merged, ValueOf } from \"./type/internal\";\nimport { ElementLike } from \"./type/external\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const merge = (target: From, ...sources: To[]): Merged => {\n sources.forEach(source => {\n Object.keys(source).forEach(key => {\n target[key] = source[key] as unknown;\n });\n });\n\n return target as Merged;\n};\n\nexport const getElement = (el: HTMLElement | string | null, parent?: HTMLElement): HTMLElement => {\n let targetEl: HTMLElement | null = null;\n\n if (isString(el)) {\n const parentEl = parent ? parent : document;\n const queryResult = parentEl.querySelector(el);\n if (!queryResult) {\n throw new FlickingError(ERROR.MESSAGE.ELEMENT_NOT_FOUND(el), ERROR.CODE.ELEMENT_NOT_FOUND);\n }\n targetEl = queryResult as HTMLElement;\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n targetEl = el;\n }\n\n if (!targetEl) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n\n return targetEl;\n};\n\nexport const checkExistence = (value: any, nameOnErrMsg: string) => {\n if (value == null) {\n throw new FlickingError(ERROR.MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), ERROR.CODE.VAL_MUST_NOT_NULL);\n }\n};\n\nexport const clamp = (x: number, min: number, max: number) => Math.max(Math.min(x, max), min);\n\nexport const getFlickingAttached = (val: Flicking | null): Flicking => {\n if (!val) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING);\n }\n\n return val;\n};\n\nexport const toArray = (iterable: ArrayLike): T[] => [].slice.call(iterable) as T[];\n\nexport const parseAlign = (align: LiteralUnion> | number, size: number): number => {\n let alignPoint: number | null;\n if (isString(align)) {\n switch (align) {\n case ALIGN.PREV:\n alignPoint = 0;\n break;\n case ALIGN.CENTER:\n alignPoint = 0.5 * size;\n break;\n case ALIGN.NEXT:\n alignPoint = size;\n break;\n default:\n alignPoint = parseArithmeticSize(align, size);\n if (alignPoint == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"align\", align), ERROR.CODE.WRONG_OPTION);\n }\n }\n } else {\n alignPoint = align as number;\n }\n\n return alignPoint;\n};\n\nexport const parseBounce = (bounce: FlickingOptions[\"bounce\"], size: number): number[] => {\n let parsedBounce: Array;\n\n if (Array.isArray(bounce)) {\n parsedBounce = (bounce as string[]).map(val => parseArithmeticSize(val, size));\n } else {\n const parsedVal = parseArithmeticSize(bounce, size);\n\n parsedBounce = [parsedVal, parsedVal];\n }\n\n return parsedBounce.map(val => {\n if (val == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"bounce\", bounce), ERROR.CODE.WRONG_OPTION);\n }\n return val;\n });\n};\n\nexport const parseArithmeticSize = (cssValue: number | string, base: number): number | null => {\n const parsed = parseArithmeticExpression(cssValue);\n\n if (parsed == null) return null;\n\n return parsed.percentage * base + parsed.absolute;\n};\n\nexport const parseArithmeticExpression = (cssValue: number | string): { percentage: number; absolute: number } | null => {\n const cssRegex = /(?:(\\+|\\-)\\s*)?(\\d+(?:\\.\\d+)?(%|px)?)/g;\n\n if (typeof cssValue === \"number\") {\n return { percentage: 0, absolute: cssValue };\n }\n\n const parsed = {\n percentage: 0,\n absolute: 0\n };\n let idx = 0;\n let matchResult = cssRegex.exec(cssValue);\n while (matchResult != null) {\n let sign = matchResult[1];\n const value = matchResult[2];\n const unit = matchResult[3];\n const parsedValue = parseFloat(value);\n\n if (idx <= 0) {\n sign = sign || \"+\";\n }\n\n // Return default value for values not in good form\n if (!sign) {\n return null;\n }\n\n const signMultiplier = sign === \"+\" ? 1 : -1;\n\n if (unit === \"%\") {\n parsed.percentage += signMultiplier * (parsedValue / 100);\n } else {\n parsed.absolute += signMultiplier * parsedValue;\n }\n\n // Match next occurrence\n ++idx;\n matchResult = cssRegex.exec(cssValue);\n }\n\n // None-matched\n if (idx === 0) {\n return null;\n }\n\n return parsed;\n};\n\nexport const parseCSSSizeValue = (val: string | number): string => isString(val) ? val : `${val}px`;\n\nexport const parsePanelAlign = (align: FlickingOptions[\"align\"]) => typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\nexport const getDirection = (start: number, end: number): ValueOf => {\n if (start === end) return DIRECTION.NONE;\n return start < end ? DIRECTION.NEXT : DIRECTION.PREV;\n};\n\nexport const parseElement = (element: ElementLike | ElementLike[]): HTMLElement[] => {\n if (!Array.isArray(element)) {\n element = [element];\n }\n\n const elements: HTMLElement[] = [];\n element.forEach(el => {\n if (isString(el)) {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = el;\n\n elements.push(...toArray(tempDiv.children) as HTMLElement[]);\n while (tempDiv.firstChild) {\n tempDiv.removeChild(tempDiv.firstChild);\n }\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n elements.push(el);\n } else {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n });\n\n return elements;\n};\n\nexport const getMinusCompensatedIndex = (idx: number, max: number) => idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max);\n\nexport const includes = (array: T[], target: any): target is T => {\n for (const val of array) {\n if (val === target) return true;\n }\n return false;\n};\n\nexport const isString = (val: any): val is string => typeof val === \"string\";\n\nexport const circulatePosition = (pos: number, min: number, max: number) => {\n const size = max - min;\n\n if (pos < min) {\n const offset = (min - pos) % size;\n pos = max - offset;\n } else if (pos > max) {\n const offset = (pos - max) % size;\n pos = min + offset;\n }\n\n return pos;\n};\n\nexport const find = (array: T[], checker: (val: T) => boolean): T | null => {\n for (const val of array) {\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findRight = (array: T[], checker: (val: T) => boolean): T | null => {\n for (let idx = array.length - 1; idx >= 0; idx--) {\n const val = array[idx];\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findIndex = (array: T[], checker: (val: T) => boolean): number => {\n for (let idx = 0; idx < array.length; idx++) {\n if (checker(array[idx])) {\n return idx;\n }\n }\n\n return -1;\n};\n\nexport const getProgress = (pos: number, prev: number, next: number) => (pos - prev) / (next - prev);\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nexport const getStyle = (el: HTMLElement): CSSStyleDeclaration => window.getComputedStyle(el) || (el as any).currentStyle as CSSStyleDeclaration;\n\nexport const setSize = (el: HTMLElement, { width, height }: Partial<{\n width: number | string;\n height: number | string;\n}>) => {\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n el.style.width = `${width}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n el.style.height = `${height}px`;\n }\n }\n};\n\nexport const isBetween = (val: number, min: number, max: number) => val >= min && val <= max;\n\nexport const circulateIndex = (index: number, max: number): number => {\n if (index >= max) {\n return index % max;\n } else if (index < 0) {\n return getMinusCompensatedIndex((index + 1) % max - 1, max);\n } else {\n return index;\n }\n};\n\nexport const range = (end: number): number[] => {\n const arr = new Array(end);\n\n for (let i = 0; i < end; i++) {\n arr[i] = i;\n }\n\n return arr;\n};\n\nexport const getElementSize = ({\n el,\n horizontal,\n useFractionalSize,\n useOffset,\n style\n}: {\n el: HTMLElement;\n horizontal: boolean;\n useFractionalSize: boolean;\n useOffset: boolean;\n style: CSSStyleDeclaration;\n}): number => {\n let size = 0;\n if (useFractionalSize) {\n const baseSize = parseFloat(horizontal ? style.width : style.height) || 0;\n const isBorderBoxSizing = style.boxSizing === \"border-box\";\n const border = horizontal\n ? parseFloat(style.borderLeftWidth || \"0\") + parseFloat(style.borderRightWidth || \"0\")\n : parseFloat(style.borderTopWidth || \"0\") + parseFloat(style.borderBottomWidth || \"0\");\n\n if (isBorderBoxSizing) {\n size = useOffset\n ? baseSize\n : baseSize - border;\n } else {\n const padding = horizontal\n ? parseFloat(style.paddingLeft || \"0\") + parseFloat(style.paddingRight || \"0\")\n : parseFloat(style.paddingTop || \"0\") + parseFloat(style.paddingBottom || \"0\");\n\n size = useOffset\n ? baseSize + padding + border\n : baseSize + padding;\n }\n } else {\n const sizeStr = horizontal ? \"Width\" : \"Height\";\n\n size = useOffset\n ? el[`offset${sizeStr}`]\n : el[`client${sizeStr}`];\n }\n\n return Math.max(size, 0);\n};\n\nexport const setPrototypeOf = Object.setPrototypeOf || ((obj, proto) => {\n obj.__proto__ = proto;\n return obj;\n});\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport { setPrototypeOf } from \"../utils\";\n\n/**\n * Special type of known error that {@link Flicking} throws.\n * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러\n * @property {number} code Error code에러 코드\n * @property {string} message Error message에러 메시지\n * @see {@link ERROR_CODE ERROR_CODE}\n * @example\n * ```ts\n * import Flicking, { FlickingError, ERROR_CODES } from \"@egjs/flicking\";\n * try {\n * const flicking = new Flicking(\".flicking-viewport\")\n * } catch (e) {\n * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) {\n * console.error(\"Element not found\")\n * }\n * }\n * ```\n */\nclass FlickingError extends Error {\n public code: number;\n\n /**\n * @param message Error message에러 메시지\n * @param code Error code에러 코드\n */\n public constructor(message: string, code: number) {\n super(message);\n\n setPrototypeOf(this, FlickingError.prototype);\n this.name = \"FlickingError\";\n this.code = code;\n }\n}\n\nexport default FlickingError;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { getElementSize, getStyle, isString } from \"../utils\";\n\n/**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n */\nclass Viewport {\n private _flicking: Flicking;\n private _el: HTMLElement;\n private _width: number;\n private _height: number;\n private _isBorderBoxSizing: boolean;\n private _padding: {\n left: number;\n right: number;\n top: number;\n bottom: number;\n };\n\n /**\n * A viewport(root) element\n * @ko 뷰포트(root) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n\n /**\n * Viewport width, without paddings\n * @ko 뷰포트 너비\n * @type {number}\n * @readonly\n */\n public get width() { return this._width - this._padding.left - this._padding.right; }\n /**\n * Viewport height, without paddings\n * @ko 뷰포트 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height - this._padding.top - this._padding.bottom; }\n /**\n * Viewport paddings\n * @ko 뷰포트 CSS padding 값\n * @type {object}\n * @property {number} left CSS `padding-left`\n * @property {number} right CSS `padding-right`\n * @property {number} top CSS `padding-top`\n * @property {number} bottom CSS `padding-bottom`\n * @readonly\n */\n public get padding() { return this._padding; }\n\n /**\n * @param el A viewport element뷰포트 엘리먼트\n */\n public constructor(flicking: Flicking, el: HTMLElement) {\n this._flicking = flicking;\n this._el = el;\n this._width = 0;\n this._height = 0;\n this._padding = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this._isBorderBoxSizing = false;\n }\n\n /**\n * Change viewport's size.\n * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property\n * @ko 뷰포트 크기를 변경합니다.\n * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New viewport size새 뷰포트 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n */\n public setSize({\n width,\n height\n }: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n const el = this._el;\n const padding = this._padding;\n const isBorderBoxSizing = this._isBorderBoxSizing;\n\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n const newWidth = isBorderBoxSizing\n ? width + padding.left + padding.right\n : width;\n el.style.width = `${newWidth}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n const newHeight = isBorderBoxSizing\n ? height + padding.top + padding.bottom\n : height;\n el.style.height = `${newHeight}px`;\n }\n }\n this.resize();\n }\n\n /**\n * Update width/height to the current viewport element's size\n * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다\n */\n public resize() {\n const el = this._el;\n const elStyle = getStyle(el);\n const {\n useFractionalSize\n } = this._flicking;\n\n this._width = getElementSize({\n el,\n horizontal: true,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n this._height = getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n\n this._padding = {\n left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0,\n right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0,\n top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0,\n bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0\n };\n this._isBorderBoxSizing = elStyle.boxSizing === \"border-box\";\n }\n}\n\nexport default Viewport;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\n\nclass AutoResizer {\n private _flicking: Flicking;\n private _enabled: boolean;\n private _resizeObserver: ResizeObserver | null;\n private _resizeTimer: number;\n private _maxResizeDebounceTimer: number;\n\n public get enabled() { return this._enabled; }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n this._enabled = false;\n this._resizeObserver = null;\n this._resizeTimer = -1;\n this._maxResizeDebounceTimer = -1;\n }\n\n public enable(): this {\n const flicking = this._flicking;\n const viewport = flicking.viewport;\n\n if (this._enabled) {\n this.disable();\n }\n\n if (flicking.useResizeObserver && !!window.ResizeObserver) {\n const viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;\n\n const resizeObserver = viewportSizeNot0\n ? new ResizeObserver(this._skipFirstResize)\n : new ResizeObserver(this._onResize);\n\n resizeObserver.observe(flicking.viewport.element);\n\n this._resizeObserver = resizeObserver;\n } else {\n window.addEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = true;\n\n return this;\n }\n\n public disable(): this {\n if (!this._enabled) return this;\n\n const resizeObserver = this._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n this._resizeObserver = null;\n } else {\n window.removeEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = false;\n\n return this;\n }\n\n private _onResize = () => {\n const flicking = this._flicking;\n const resizeDebounce = flicking.resizeDebounce;\n const maxResizeDebounce = flicking.maxResizeDebounce;\n\n if (resizeDebounce <= 0) {\n void flicking.resize();\n } else {\n if (this._maxResizeDebounceTimer <= 0) {\n if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) {\n this._maxResizeDebounceTimer = window.setTimeout(this._doScheduledResize, maxResizeDebounce);\n }\n }\n\n if (this._resizeTimer > 0) {\n clearTimeout(this._resizeTimer);\n this._resizeTimer = 0;\n }\n\n this._resizeTimer = window.setTimeout(this._doScheduledResize, resizeDebounce);\n }\n };\n\n private _doScheduledResize = () => {\n clearTimeout(this._resizeTimer);\n clearTimeout(this._maxResizeDebounceTimer);\n\n this._maxResizeDebounceTimer = -1;\n this._resizeTimer = -1;\n\n void this._flicking.resize();\n };\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n private _skipFirstResize = (() => {\n let isFirstResize = true;\n\n return (() => {\n if (isFirstResize) {\n isFirstResize = false;\n return;\n }\n this._onResize();\n });\n })();\n}\n\nexport default AutoResizer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../../Flicking\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VanillaElementProvider implements ElementProvider {\n private _element: HTMLElement;\n private _rendered: boolean;\n\n public get element() { return this._element; }\n public get rendered() { return this._rendered; }\n\n public constructor(element: HTMLElement) {\n this._element = element;\n this._rendered = true;\n }\n\n public show(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement !== cameraEl) {\n cameraEl.appendChild(el);\n this._rendered = true;\n }\n }\n\n public hide(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement === cameraEl) {\n cameraEl.removeChild(el);\n this._rendered = false;\n }\n }\n}\n\nexport default VanillaElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport Flicking from \"../../../Flicking\";\nimport VirtualPanel from \"../VirtualPanel\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VirtualElementProvider implements ElementProvider {\n private _flicking: Flicking;\n private _panel: VirtualPanel;\n\n public get element() { return this._virtualElement.nativeElement; }\n public get rendered() { return this._virtualElement.visible; }\n\n private get _virtualElement() {\n const flicking = this._flicking;\n const elIndex = this._panel.elementIndex;\n const virtualElements = flicking.virtual.elements;\n\n return virtualElements[elIndex];\n }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public init(panel: VirtualPanel) {\n this._panel = panel;\n }\n\n public show(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n\n public hide(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n}\n\nexport default VirtualElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { range } from \"../utils\";\nimport { CLASS } from \"../const/external\";\n\nimport VirtualPanel from \"./panel/VirtualPanel\";\n\nexport interface VirtualOptions {\n renderPanel: (panel: VirtualPanel, index: number) => string;\n initialPanelCount: number;\n cache?: boolean;\n panelClass?: string;\n}\n\n/**\n * A manager class to add / remove virtual panels\n */\nclass VirtualManager {\n private _flicking: Flicking;\n\n private _renderPanel: (panel: VirtualPanel, index: number) => string;\n private _initialPanelCount: number;\n private _cache: boolean;\n private _panelClass: string;\n\n private _elements: Array<{ nativeElement: HTMLElement; visible: boolean }>;\n\n public get elements() { return this._elements; }\n\n // Options\n /**\n * A rendering function for the panel element's innerHTML\n * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @type {function}\n * @param {VirtualPanel} panel Instance of the panel패널 인스턴스\n * @param {number} index Index of the panel패널 인덱스\n * @default \"() => {}\"\n */\n public get renderPanel() { return this._renderPanel; }\n /**\n * Initial panel count to render\n * @ko 최초로 렌더링할 패널의 개수\n * @readonly\n * @type {number}\n * @default -1\n */\n public get initialPanelCount() { return this._initialPanelCount; }\n /**\n * Whether to cache rendered panel's innerHTML\n * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @type {boolean}\n * @default false\n */\n public get cache() { return this._cache; }\n /**\n * The class name that will be applied to rendered panel elements\n * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @type {string}\n * @default \"flicking-panel\"\n */\n public get panelClass() { return this._panelClass; }\n\n public set renderPanel(val: VirtualOptions[\"renderPanel\"]) {\n this._renderPanel = val;\n this._flicking.renderer.panels.forEach((panel: VirtualPanel) => panel.uncacheRenderResult());\n }\n\n public set cache(val: NonNullable) { this._cache = val; }\n public set panelClass(val: NonNullable) { this._panelClass = val; }\n\n public constructor(flicking: Flicking, options: VirtualOptions | null) {\n this._flicking = flicking;\n\n this._renderPanel = options?.renderPanel ?? (() => \"\");\n this._initialPanelCount = options?.initialPanelCount ?? -1;\n this._cache = options?.cache ?? false;\n this._panelClass = options?.panelClass ?? CLASS.DEFAULT_VIRTUAL;\n\n this._elements = [];\n }\n\n public init() {\n const flicking = this._flicking;\n\n if (!flicking.virtualEnabled) return;\n\n if (!flicking.externalRenderer && !flicking.renderExternal) {\n this._initVirtualElements();\n }\n\n const virtualElements = flicking.camera.children;\n this._elements = virtualElements.map(el => ({ nativeElement: el, visible: true }));\n }\n\n public show(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = true;\n\n if (nativeEl.style.display) {\n nativeEl.style.display = \"\";\n }\n }\n\n public hide(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = false;\n nativeEl.style.display = \"none\";\n }\n\n /**\n * Add new virtual panels at the end of the list\n * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public append(count: number = 1): VirtualPanel[] {\n const flicking = this._flicking;\n\n return this.insert(flicking.panels.length, count);\n }\n\n /**\n * Add new virtual panels at the start of the list\n * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public prepend(count: number = 1): VirtualPanel[] {\n return this.insert(0, count);\n }\n\n /**\n * Add new virtual panels at the given index\n * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public insert(index: number, count: number = 1): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchInsert({ index, elements: range(count), hasDOMInElements: false }) as VirtualPanel[];\n }\n\n /**\n * Remove panels at the given index\n * @ko 주어진 인덱스에서 패널들을 삭제합니다\n * @param {number} count The number of panels to remove삭제할 패널의 개수\n * @returns {Array} The panels removed삭제된 패널들\n */\n public remove(index: number, count: number): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchRemove({ index, deleteCount: count, hasDOMInElements: false }) as VirtualPanel[];\n }\n\n private _initVirtualElements() {\n const flicking = this._flicking;\n const cameraElement = flicking.camera.element;\n const panelsPerView = flicking.panelsPerView;\n const fragment = document.createDocumentFragment();\n\n const newElements = range(panelsPerView + 1).map(idx => {\n const panelEl = document.createElement(\"div\");\n panelEl.className = this._panelClass;\n panelEl.dataset.elementIndex = idx.toString();\n return panelEl;\n });\n\n newElements.forEach(el => {\n fragment.appendChild(el);\n });\n\n cameraElement.appendChild(fragment);\n }\n}\n\nexport default VirtualManager;\n","/**\n * All possible @egjs/axes event keys\n * @internal\n */\nexport const EVENT = {\n HOLD: \"hold\",\n CHANGE: \"change\",\n RELEASE: \"release\",\n ANIMATION_END: \"animationEnd\",\n FINISH: \"finish\"\n} as const;\n\n/**\n * An Axis key that Flicking uses\n * @internal\n */\nexport const POSITION_KEY = \"flick\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\nimport { circulatePosition, getDirection } from \"../../utils\";\n\nexport enum STATE_TYPE {\n IDLE,\n HOLDING,\n DRAGGING,\n ANIMATING,\n DISABLED\n}\n\n/**\n * A component that shows the current status of the user input or the animation\n * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트\n * @internal\n */\nabstract class State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly holding: boolean;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly animating: boolean;\n\n protected _delta: number = 0;\n protected _targetPanel: Panel | null = null;\n\n /**\n * A sum of delta values of change events from the last hold event of Axes\n * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산\n * @type {number}\n * @readonly\n */\n public get delta() { return this._delta; }\n\n /**\n * A panel to set as {@link Control#activePanel} after the animation is finished\n * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널\n * @type {number}\n * @readonly\n */\n public get targetPanel() { return this._targetPanel; }\n\n public set targetPanel(val: Panel | null) { this._targetPanel = val; }\n\n /**\n * An callback which is called when state has changed to this state\n * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수\n * @param {State} prevState An previous state이전 상태값\n * @return {void}\n */\n public onEnter(prevState: State): void {\n this._delta = prevState._delta;\n this._targetPanel = prevState._targetPanel;\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onHold(ctx: {\n flicking: Flicking;\n axesEvent: OnHold;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onChange(ctx: {\n flicking: Flicking;\n axesEvent: OnChange;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onRelease(ctx: {\n flicking: Flicking;\n axesEvent: OnRelease;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onAnimationEnd(ctx: {\n flicking: Flicking;\n axesEvent: OnAnimationEnd;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onFinish(ctx: {\n flicking: Flicking;\n axesEvent: OnFinish;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n protected _moveToChangedPosition(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const delta = axesEvent.delta[AXES.POSITION_KEY];\n\n if (!delta) {\n return;\n }\n\n this._delta += delta;\n\n const camera = flicking.camera;\n const prevPosition = camera.position;\n const position = axesEvent.pos[AXES.POSITION_KEY];\n const newPosition = flicking.circularEnabled\n ? circulatePosition(position, camera.range.min, camera.range.max)\n : position;\n\n camera.lookAt(newPosition);\n\n const moveEvent = new ComponentEvent(EVENTS.MOVE, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, axesEvent.delta[AXES.POSITION_KEY]),\n axesEvent\n });\n\n flicking.trigger(moveEvent);\n\n if (moveEvent.isCanceled()) {\n // Return to previous position\n camera.lookAt(prevPosition);\n transitTo(STATE_TYPE.DISABLED);\n }\n }\n}\n\nexport default State;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A default state when there's no user input and no animation's playing\n * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태\n * @internal\n */\nclass IdleState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n public onEnter() {\n this._delta = 0;\n this._targetPanel = null;\n }\n\n public onHold(ctx: Parameters[0]): void {\n // Shouldn't do any action until any panels on flicking area\n const { flicking, axesEvent, transitTo } = ctx;\n\n if (flicking.renderer.panelCount <= 0) {\n transitTo(STATE_TYPE.DISABLED);\n return;\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, {\n axesEvent\n });\n\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.HOLDING);\n }\n }\n\n // By methods call\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const controller = flicking.control.controller;\n const animatingContext = controller.animatingContext;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger AnimatingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.ANIMATING).onChange(ctx);\n }\n }\n}\n\nexport default IdleState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's holding the Flicking area, but not moved a single pixel yet\n * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태\n * @internal\n */\nclass HoldingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n private _releaseEvent: OnRelease | null = null;\n\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const inputEvent = axesEvent.inputEvent as { offsetX: number; offsetY: number };\n\n const offset = flicking.horizontal\n ? inputEvent.offsetX\n : inputEvent.offsetY;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, -offset),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger DraggingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.DRAGGING).onChange(ctx);\n }\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { axesEvent }));\n\n if (axesEvent.delta.flick !== 0) {\n // Sometimes \"release\" event on axes triggered before \"change\" event\n // Especially if user flicked panel fast in really short amount of time\n // if delta is not zero, that means above case happened.\n\n // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END\n // At least one move event should be included between holdStart and holdEnd\n axesEvent.setTo({ flick: flicking.camera.position }, 0);\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n // Can't handle select event here,\n // As \"finish\" axes event happens\n this._releaseEvent = axesEvent;\n }\n\n public onFinish(ctx: Parameters[0]): void {\n const { flicking, transitTo } = ctx;\n\n // Should transite to IDLE state before select event\n // As user expects hold is already finished\n transitTo(STATE_TYPE.IDLE);\n\n if (!this._releaseEvent) {\n return;\n }\n\n // Handle release event here\n // To prevent finish event called twice\n const releaseEvent = this._releaseEvent;\n\n // Static click\n /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */\n const srcEvent = releaseEvent.inputEvent.srcEvent;\n\n let clickedElement: HTMLElement;\n if (srcEvent.type === \"touchend\") {\n const touchEvent = srcEvent as TouchEvent;\n const touch = touchEvent.changedTouches[0];\n clickedElement = document.elementFromPoint(touch.clientX, touch.clientY) as HTMLElement;\n } else {\n clickedElement = srcEvent.target;\n }\n /* eslint-enable */\n\n const panels = flicking.renderer.panels;\n let clickedPanel: Panel | null = null;\n\n for (const panel of panels) {\n if (panel.contains(clickedElement)) {\n clickedPanel = panel;\n break;\n }\n }\n\n if (clickedPanel) {\n const cameraPosition = flicking.camera.position;\n const clickedPanelPosition = clickedPanel.position;\n\n flicking.trigger(new ComponentEvent(EVENTS.SELECT, {\n index: clickedPanel.index,\n panel: clickedPanel,\n // Direction to the clicked panel\n direction: getDirection(cameraPosition, clickedPanelPosition)\n }));\n }\n }\n}\n\nexport default HoldingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's dragging the Flicking area\n * @ko 사용자가 드래깅중인 상태\n * @internal\n */\nclass DraggingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onRelease(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n // Update last position to cope with Axes's animating behavior\n // Axes uses start position when animation start\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, {\n axesEvent\n }));\n\n if (flicking.renderer.panelCount <= 0) {\n // There're no panels\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n transitTo(STATE_TYPE.ANIMATING);\n\n const control = flicking.control;\n const position = axesEvent.destPos[AXES.POSITION_KEY];\n const duration = Math.max(axesEvent.duration, flicking.duration);\n\n try {\n void control.moveToPosition(position, duration, axesEvent);\n } catch (err) {\n transitTo(STATE_TYPE.IDLE);\n axesEvent.setTo({ [AXES.POSITION_KEY]: flicking.camera.position }, 0);\n }\n }\n}\n\nexport default DraggingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking's animating by user input or method call\n * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태\n * @internal\n */\nclass AnimatingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onHold(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const targetPanel = this._targetPanel;\n const control = flicking.control;\n\n this._delta = 0;\n flicking.control.updateInput();\n\n if (flicking.changeOnHold && targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { axesEvent });\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.DRAGGING);\n }\n }\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onFinish(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const control = flicking.control;\n const controller = control.controller;\n const animatingContext = controller.animatingContext;\n\n transitTo(STATE_TYPE.IDLE);\n\n flicking.trigger(new ComponentEvent(EVENTS.MOVE_END, {\n isTrusted: axesEvent.isTrusted,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n }));\n\n const targetPanel = this._targetPanel;\n if (targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n }\n}\n\nexport default AnimatingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking is stopped by event's `stop` method\n * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태\n * @internal\n */\nclass DisabledState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onAnimationEnd(ctx: Parameters[0]): void {\n const { transitTo } = ctx;\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onChange(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // Can stop Axes's change event\n axesEvent.stop();\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // This is needed when stopped hold start event\n if (axesEvent.delta.flick === 0) {\n transitTo(STATE_TYPE.IDLE);\n }\n }\n}\n\nexport default DisabledState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { AxesEvents } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport * as AXES from \"../const/axes\";\n\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport State, { STATE_TYPE } from \"./states/State\";\n\n/**\n * @internal\n */\nclass StateMachine {\n private _state: State;\n\n public get state(): State { return this._state; }\n\n public constructor() {\n this._state = new IdleState();\n }\n\n public fire(eventType: keyof AxesEvents, externalCtx: {\n flicking: Flicking;\n axesEvent: any;\n }) {\n const currentState = this._state;\n const ctx = { ...externalCtx, transitTo: this.transitTo };\n\n switch (eventType) {\n case AXES.EVENT.HOLD:\n currentState.onHold(ctx);\n break;\n case AXES.EVENT.CHANGE:\n currentState.onChange(ctx);\n break;\n case AXES.EVENT.RELEASE:\n currentState.onRelease(ctx);\n break;\n case AXES.EVENT.ANIMATION_END:\n currentState.onAnimationEnd(ctx);\n break;\n case AXES.EVENT.FINISH:\n currentState.onFinish(ctx);\n break;\n }\n }\n\n public transitTo = (nextStateType: STATE_TYPE): State => {\n let nextState: State;\n\n switch (nextStateType) {\n case STATE_TYPE.IDLE:\n nextState = new IdleState();\n break;\n case STATE_TYPE.HOLDING:\n nextState = new HoldingState();\n break;\n case STATE_TYPE.DRAGGING:\n nextState = new DraggingState();\n break;\n case STATE_TYPE.ANIMATING:\n nextState = new AnimatingState();\n break;\n case STATE_TYPE.DISABLED:\n nextState = new DisabledState();\n break;\n }\n\n nextState.onEnter(this._state);\n\n this._state = nextState;\n\n return this._state;\n };\n}\n\nexport default StateMachine;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Axes, { PanInput, AxesEvents, OnRelease } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\nimport { ORDER } from \"../const/external\";\nimport { getFlickingAttached, parseBounce } from \"../utils\";\nimport { ControlParams } from \"../type/external\";\n\nimport StateMachine from \"./StateMachine\";\n\n/**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @internal\n */\nclass AxesController {\n private _flicking: Flicking | null;\n private _axes: Axes | null;\n private _panInput: PanInput | null;\n private _stateMachine: StateMachine;\n\n private _animatingContext: { start: number; end: number; offset: number };\n private _dragged: boolean;\n\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스\n * @type {Axes | null}\n * @see https://naver.github.io/egjs-axes/docs/api/Axes\n * @readonly\n */\n public get axes() { return this._axes; }\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스\n * @type {PanInput | null}\n * @see https://naver.github.io/egjs-axes/docs/api/PanInput\n * @readonly\n */\n public get panInput() { return this._panInput; }\n /**\n * @internal\n */\n public get stateMachine() { return this._stateMachine; }\n /**\n * A activated {@link State} that shows the current status of the user input or the animation\n * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다\n * @type {State}\n */\n public get state() { return this._stateMachine.state; }\n /**\n * A context of the current animation playing\n * @ko 현재 재생중인 애니메이션 정보\n * @type {object}\n * @property {number} start A start position of the animation애니메이션 시작 지점\n * @property {number} end A end position of the animation애니메이션 끝 지점\n * @property {number} offset camera offset카메라 오프셋\n * @readonly\n */\n public get animatingContext() { return this._animatingContext; }\n /**\n * A current control parameters of the Axes instance\n * @ko 활성화된 현재 Axes 패러미터들\n * @type {ControlParams}\n */\n public get controlParams(): ControlParams {\n const axes = this._axes;\n\n if (!axes) {\n return {\n range: { min: 0, max: 0 },\n position: 0,\n circular: false\n };\n }\n\n const axis = axes.axis[AXES.POSITION_KEY];\n\n return {\n range: { min: axis.range![0], max: axis.range![1] },\n circular: (axis.circular as boolean[])[0],\n position: this.position\n };\n }\n\n /**\n * A Boolean indicating whether the user input is enabled\n * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get enabled() { return this._panInput?.isEnabled() ?? false; }\n /**\n * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값\n * @type {number}\n * @readonly\n */\n public get position() { return this._axes?.get([AXES.POSITION_KEY])[AXES.POSITION_KEY] ?? 0; }\n /**\n * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값\n * @type {number[]}\n * @readonly\n */\n public get range() { return this._axes?.axis[AXES.POSITION_KEY].range ?? [0, 0]; }\n /**\n * Actual bounce size(px)\n * @ko 적용된 bounce 크기(px 단위)\n * @type {number[]}\n * @readonly\n */\n public get bounce() { return this._axes?.axis[AXES.POSITION_KEY].bounce as number[] | undefined; }\n\n /** */\n public constructor() {\n this._resetInternalValues();\n this._stateMachine = new StateMachine();\n }\n\n /**\n * Initialize AxesController\n * @ko AxesController를 초기화합니다\n * @param {Flicking} flicking An instance of Flicking\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n\n this._axes = new Axes({\n [AXES.POSITION_KEY]: {\n range: [0, 0],\n circular: false,\n bounce: [0, 0]\n }\n }, {\n deceleration: flicking.deceleration,\n interruptable: flicking.interruptable,\n nested: flicking.nested,\n easing: flicking.easing\n });\n this._panInput = new PanInput(flicking.viewport.element, {\n inputType: flicking.inputType,\n threshold: 1,\n iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,\n preventDefaultOnDrag: flicking.preventDefaultOnDrag,\n scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],\n releaseOnScroll: true\n });\n\n const axes = this._axes;\n\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], this._panInput);\n\n for (const key in AXES.EVENT) {\n const eventType = AXES.EVENT[key] as keyof AxesEvents;\n\n axes.on(eventType, (e: AxesEvents[typeof eventType]) => {\n this._stateMachine.fire(eventType, {\n flicking,\n axesEvent: e\n });\n });\n }\n\n return this;\n }\n\n /**\n * Destroy AxesController and return to initial state\n * @ko AxesController를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n if (this._axes) {\n this.removePreventClickHandler();\n this._axes.destroy();\n }\n\n this._panInput?.destroy();\n\n this._resetInternalValues();\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._panInput?.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._panInput?.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._panInput?.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @chainable\n * @return {this}\n */\n public updateAnimation(position: number, duration?: number): this {\n this._animatingContext = {\n ...this._animatingContext,\n end: position\n };\n this._axes?.updateAnimation({\n destPos: { [AXES.POSITION_KEY]: position },\n duration\n });\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n this._axes?.stopAnimation();\n\n return this;\n }\n\n /**\n * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before\n * {@link AxesController#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public update(controlParams: ControlParams): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const axes = this._axes!;\n const axis = axes.axis[AXES.POSITION_KEY];\n\n axis.circular = [controlParams.circular, controlParams.circular];\n axis.range = [controlParams.range.min, controlParams.range.max];\n axis.bounce = parseBounce(flicking.bounce, camera.size);\n\n axes.axisManager.set({ [AXES.POSITION_KEY]: controlParams.position });\n\n return this;\n }\n\n /**\n * Attach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다\n * @return {this}\n */\n public addPreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.on(AXES.EVENT.HOLD, this._onAxesHold);\n axes.on(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.addEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Detach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다\n * @return {this}\n */\n public removePreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.off(AXES.EVENT.HOLD, this._onAxesHold);\n axes.off(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.removeEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다.\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise {\n const axes = this._axes;\n const state = this._stateMachine.state;\n\n if (!axes) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING));\n }\n\n const startPos = axes.get([AXES.POSITION_KEY])[AXES.POSITION_KEY];\n\n if (startPos === position) {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.lookAt(position);\n\n if (state.targetPanel) {\n flicking.control.setActive(state.targetPanel, flicking.control.activePanel, axesEvent?.isTrusted ?? false);\n }\n return Promise.resolve();\n }\n\n this._animatingContext = {\n start: startPos,\n end: position,\n offset: 0\n };\n\n const animate = () => {\n const resetContext = () => {\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n };\n\n axes.once(AXES.EVENT.FINISH, resetContext);\n\n if (axesEvent) {\n axesEvent.setTo({ [AXES.POSITION_KEY]: position }, duration);\n } else {\n axes.setTo({ [AXES.POSITION_KEY]: position }, duration);\n }\n };\n\n return new Promise((resolve, reject) => {\n const animationFinishHandler = () => {\n axes.off(AXES.EVENT.HOLD, interruptionHandler);\n resolve();\n };\n\n const interruptionHandler = () => {\n axes.off(AXES.EVENT.FINISH, animationFinishHandler);\n reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));\n };\n\n axes.once(AXES.EVENT.FINISH, animationFinishHandler);\n axes.once(AXES.EVENT.HOLD, interruptionHandler);\n\n animate();\n });\n }\n\n public updateDirection() {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const panInput = this._panInput!;\n\n axes.disconnect(panInput);\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], panInput);\n\n panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];\n }\n\n private _resetInternalValues() {\n this._flicking = null;\n this._axes = null;\n this._panInput = null;\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n this._dragged = false;\n }\n\n private _onAxesHold = () => {\n this._dragged = false;\n };\n\n private _onAxesChange = () => {\n this._dragged = !!this._panInput?.isEnabled();\n };\n\n private _preventClickWhenDragged = (e: MouseEvent) => {\n if (this._dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n this._dragged = false;\n };\n}\n\nexport default AxesController;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AxesController from \"../control/AxesController\";\nimport { DIRECTION, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getDirection, getFlickingAttached } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\n/**\n * A component that manages inputs and animation of Flicking\n * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트\n */\nabstract class Control {\n // Internal States\n protected _flicking: Flicking | null;\n protected _controller: AxesController;\n protected _activePanel: Panel | null;\n protected _nextPanel: Panel | null;\n\n /**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @type {AxesController}\n * @readonly\n */\n public get controller() { return this._controller; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get activeIndex() { return this._activePanel?.index ?? -1; }\n /**\n * An active panel\n * @ko 현재 선택된 패널\n * @type {Panel | null}\n * @readonly\n */\n public get activePanel() { return this._activePanel; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._controller.state.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._controller.state.holding; }\n\n /** */\n public constructor() {\n this._flicking = null;\n this._controller = new AxesController();\n this._activePanel = null;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @method\n * @abstract\n * @memberof Control\n * @instance\n * @name moveToPosition\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise;\n\n /**\n * Initialize Control\n * @ko Control을 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._controller.init(flicking);\n\n return this;\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._controller.destroy();\n\n this._flicking = null;\n this._activePanel = null;\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._controller.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._controller.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._controller.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우\n * @return {this}\n */\n public updateAnimation(panel: Panel, duration?: number, direction?: ValueOf): this {\n const state = this._controller.state;\n const position = this._getPosition(panel, direction ?? DIRECTION.NONE);\n\n state.targetPanel = panel;\n this._controller.updateAnimation(position, duration);\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n const state = this._controller.state;\n\n state.targetPanel = null;\n this._controller.stopAnimation();\n\n return this;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n camera.lookAt(camera.clampToReachablePosition(activePanel.position));\n }\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._controller.update(camera.controlParams);\n\n return this;\n }\n\n /**\n * Reset {@link Control#activePanel activePanel} to `null`\n * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다\n * @chainable\n * @return {this}\n */\n public resetActive(): this {\n this._activePanel = null;\n\n return this;\n }\n\n /**\n * Move {@link Camera} to the given panel\n * @ko {@link Camera}를 해당 패널 위로 이동합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {object} options An options object옵션 오브젝트\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public async moveToPanel(panel: Panel, {\n duration,\n direction = DIRECTION.NONE,\n axesEvent\n }: {\n duration: number;\n direction?: ValueOf;\n axesEvent?: OnRelease;\n }) {\n const position = this._getPosition(panel, direction);\n this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);\n\n return this._animateToPosition({ position, duration, newActivePanel: panel, axesEvent });\n }\n\n /**\n * @internal\n */\n public setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) {\n const flicking = getFlickingAttached(this._flicking);\n\n this._activePanel = newActivePanel;\n this._nextPanel = null;\n\n flicking.camera.updateAdaptiveHeight();\n\n if (newActivePanel !== prevActivePanel) {\n flicking.trigger(new ComponentEvent(EVENTS.CHANGED, {\n index: newActivePanel.index,\n panel: newActivePanel,\n prevIndex: prevActivePanel?.index ?? -1,\n prevPanel: prevActivePanel,\n isTrusted,\n direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE\n }));\n } else {\n flicking.trigger(new ComponentEvent(EVENTS.RESTORED, {\n isTrusted\n }));\n }\n }\n\n /**\n * @internal\n */\n public copy(control: Control) {\n this._flicking = control._flicking;\n this._activePanel = control._activePanel;\n this._controller = control._controller;\n }\n\n protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf) {\n const flicking = getFlickingAttached(this._flicking);\n const triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n const event = new ComponentEvent(triggeringEvent, {\n index: panel.index,\n panel,\n isTrusted: axesEvent?.isTrusted || false,\n direction: direction ?? getDirection(activePanel?.position ?? camera.position, position)\n });\n\n this._nextPanel = panel;\n flicking.trigger(event);\n\n if (event.isCanceled()) {\n throw new FlickingError(ERROR.MESSAGE.STOP_CALLED_BY_USER, ERROR.CODE.STOP_CALLED_BY_USER);\n }\n }\n\n protected async _animateToPosition({\n position,\n duration,\n newActivePanel,\n axesEvent\n }: {\n position: number;\n duration: number;\n newActivePanel: Panel;\n axesEvent?: OnRelease;\n }) {\n const flicking = getFlickingAttached(this._flicking);\n const animate = () => this._controller.animateTo(position, duration, axesEvent);\n const state = this._controller.state;\n\n state.targetPanel = newActivePanel;\n\n if (duration <= 0) {\n return animate();\n } else {\n return animate().then(async () => {\n await flicking.renderer.render();\n }).catch(err => {\n if (axesEvent && err instanceof FlickingError && err.code === ERROR.CODE.ANIMATION_INTERRUPTED) return;\n throw err;\n });\n }\n }\n\n private _getPosition(panel: Panel, direction: ValueOf = DIRECTION.NONE) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n let position = panel.position;\n const nearestAnchor = camera.findNearestAnchor(position);\n\n if (panel.removed || !nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(panel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n if (!camera.canReach(panel)) {\n // Override position & panel if that panel is not reachable\n position = nearestAnchor.position;\n panel = nearestAnchor.panel;\n } else if (flicking.circularEnabled) {\n // Circular mode is enabled, find nearest distance to panel\n const camPos = this._controller.position; // Actual position of the Axes\n const camRangeDiff = camera.rangeDiff;\n const possiblePositions = [position, position + camRangeDiff, position - camRangeDiff]\n .filter(pos => {\n if (direction === DIRECTION.NONE) return true;\n\n return direction === DIRECTION.PREV\n ? pos <= camPos\n : pos >= camPos;\n });\n\n position = possiblePositions.reduce((nearestPosition, pos) => {\n if (Math.abs(camPos - pos) < Math.abs(camPos - nearestPosition)) {\n return pos;\n } else {\n return nearestPosition;\n }\n }, Infinity);\n }\n\n return position;\n }\n}\n\nexport default Control;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"./panel/Panel\";\n\n/**\n * A data component that has actual position where the camera should be stopped at\n * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트\n */\nclass AnchorPoint {\n private _index: number;\n private _pos: number;\n private _panel: Panel;\n\n /**\n * Index of AnchorPoint\n * @ko AnchorPoint의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of AnchorPoint\n * @ko AnchorPoint의 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos; }\n /**\n * A {@link Panel} instance AnchorPoint is referencing to\n * @ko AnchorPoint가 참조하고 있는 {@link Panel}\n * @type {Panel}\n * @readonly\n */\n public get panel() { return this._panel; }\n\n /**\n * @param {object} options An options object옵션 객체\n * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스\n * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표\n * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel}\n */\n public constructor({\n index,\n position,\n panel\n }: {\n index: number;\n position: number;\n panel: Panel;\n }) {\n this._index = index;\n this._pos = position;\n this._panel = panel;\n }\n}\n\nexport default AnchorPoint;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport { circulateIndex, clamp, getFlickingAttached } from \"../utils\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link SnapControl}\n * @ko {@link SnapControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels can go after release입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n */\nexport interface SnapControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that uses a release momentum to choose destination panel\n * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control}\n */\nclass SnapControl extends Control {\n private _count: SnapControlOptions[\"count\"];\n\n /**\n * Maximum number of panels can go after release\n * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n * @type {number}\n * @default Infinity\n */\n public get count() { return this._count; }\n\n public set count(val: SnapControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = Infinity\n }: Partial = {}) {\n super();\n\n this._count = count;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activeAnchor = camera.findActiveAnchor();\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n const state = this._controller.state;\n\n if (!activeAnchor || !anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);\n\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n const absPosDelta = Math.abs(posDelta);\n const snapDelta = axesEvent && axesEvent.delta[AXES.POSITION_KEY] !== 0\n ? Math.abs(axesEvent.delta[AXES.POSITION_KEY])\n : absPosDelta;\n let targetAnchor: AnchorPoint;\n\n if (snapDelta >= snapThreshold && snapDelta > 0) {\n // Move to anchor at position\n targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);\n } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {\n // Move to the adjacent panel\n targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);\n } else {\n // Fallback to nearest panel from current camera\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent);\n\n return this._animateToPosition({\n position: camera.clampToReachablePosition(targetAnchor.position),\n duration,\n newActivePanel: targetAnchor.panel,\n axesEvent\n });\n }\n\n private _findSnappedAnchor(position: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const count = this._count;\n\n const currentPos = camera.position;\n\n const clampedPosition = camera.clampToReachablePosition(position);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtCamera || !anchorAtPosition) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n if (!isFinite(count)) {\n return anchorAtPosition;\n }\n\n const panelCount = flicking.panelCount;\n const anchors = camera.anchorPoints;\n\n let loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff);\n if ((position > currentPos && anchorAtPosition.index < anchorAtCamera.index)\n || (anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount += 1;\n } else if ((position < currentPos && anchorAtPosition.index > anchorAtCamera.index)\n || (anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount -= 1;\n }\n\n const circularIndexOffset = loopCount * panelCount;\n const anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset;\n\n if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) {\n const anchor = anchors[anchorAtPosition.index];\n\n return new AnchorPoint({\n index: anchor.index,\n position: anchor.position + loopCount * camera.rangeDiff,\n panel: anchor.panel\n });\n }\n\n if (flicking.circularEnabled) {\n const targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)];\n let loop = Math.floor(count / panelCount);\n\n if (position > currentPos && targetAnchor.index < anchorAtCamera.index) {\n loop += 1;\n } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) {\n loop -= 1;\n }\n\n return new AnchorPoint({\n index: targetAnchor.index,\n position: targetAnchor.position + loop * camera.rangeDiff,\n panel: targetAnchor.panel\n });\n } else {\n return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)];\n }\n }\n\n private _findAdjacentAnchor(position: number, posDelta: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n if (camera.circularEnabled) {\n const anchorIncludePosition = camera.findAnchorIncludePosition(position);\n\n if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) {\n return anchorIncludePosition;\n }\n }\n\n const adjacentAnchor = (posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) ?? anchorAtCamera;\n\n return adjacentAnchor;\n }\n\n private _calcSnapThreshold(threshold: number, position: number, activeAnchor: AnchorPoint): number {\n const isNextDirection = position > activeAnchor.position;\n const panel = activeAnchor.panel;\n const panelSize = panel.size;\n const alignPos = panel.alignPosition;\n\n // Minimum distance needed to decide prev/next panel as nearest\n /*\n * | Prev | Next |\n * |<------>|<------------>|\n * [ |<-Anchor ]\n */\n return Math.max(threshold, isNextDirection\n ? panelSize - alignPos + panel.margin.next\n : alignPos + panel.margin.prev);\n }\n}\n\nexport default SnapControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached } from \"../utils\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link FreeControl}\n * @ko {@link FreeControl} 생성시 사용되는 옵션\n * @interface\n * @property {boolean} stopAtEdge Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n */\nexport interface FreeControlOptions {\n stopAtEdge: boolean;\n}\n\n/**\n * A {@link Control} that can be scrolled freely without alignment\n * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control}\n */\nclass FreeControl extends Control {\n private _stopAtEdge: FreeControlOptions[\"stopAtEdge\"];\n\n /**\n * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n * @type {boolean}\n * @default true\n */\n public get stopAtEdge() { return this._stopAtEdge; }\n\n public set stopAtEdge(val: FreeControlOptions[\"stopAtEdge\"]) { this._stopAtEdge = val; }\n\n /** */\n public constructor({\n stopAtEdge = true\n }: Partial = {}) {\n super();\n\n this._stopAtEdge = stopAtEdge;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n const panelRange = activePanel.range;\n const newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n camera.lookAt(camera.clampToReachablePosition(newPosition));\n }\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n\n const camera = flicking.camera;\n const targetPos = camera.clampToReachablePosition(position);\n\n const anchorAtPosition = camera.findAnchorIncludePosition(targetPos);\n\n if (!anchorAtPosition) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const targetPanel = anchorAtPosition.panel;\n\n // Trigger only change event\n if (targetPanel !== this._activePanel) {\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n }\n\n return this._animateToPosition({ position: this._stopAtEdge ? targetPos : position, duration, newActivePanel: targetPanel, axesEvent });\n }\n}\n\nexport default FreeControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport Panel from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { clamp, getFlickingAttached, getMinusCompensatedIndex, isBetween } from \"../utils\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n/**\n * An options for the {@link StrictControl}\n * @ko {@link StrictControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels that can be moved at a time최대로 움직일 수 있는 패널의 개수\n */\nexport interface StrictControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that allow you to select the maximum number of panels to move at a time\n * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control}\n */\nclass StrictControl extends Control {\n private _count: number;\n private _indexRange: { min: number; max: number };\n\n /**\n * Maximum number of panels that can be moved at a time\n * @ko 최대로 움직일 수 있는 패널의 개수\n * @type {number}\n * @default 1\n */\n public get count() { return this._count; }\n\n public set count(val: StrictControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = 1\n }: Partial = {}) {\n super();\n\n this._count = count;\n this._resetIndexRange();\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy() {\n super.destroy();\n\n this._resetIndexRange();\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const renderer = flicking.renderer;\n const controller = this._controller;\n const controlParams = camera.controlParams;\n const count = this._count;\n\n const activePanel = controller.state.animating\n ? camera.findNearestAnchor(camera.position)?.panel\n : this._activePanel;\n\n if (!activePanel) {\n controller.update(controlParams);\n this._resetIndexRange();\n return this;\n }\n\n const cameraRange = controlParams.range;\n const currentPos = activePanel.position;\n const currentIndex = activePanel.index;\n const panelCount = renderer.panelCount;\n\n let prevPanelIndex = currentIndex - count;\n let nextPanelIndex = currentIndex + count;\n\n if (prevPanelIndex < 0) {\n prevPanelIndex = flicking.circularEnabled\n ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount)\n : clamp(prevPanelIndex, 0, panelCount - 1);\n }\n if (nextPanelIndex >= panelCount) {\n nextPanelIndex = flicking.circularEnabled\n ? nextPanelIndex % panelCount\n : clamp(nextPanelIndex, 0, panelCount - 1);\n }\n\n const prevPanel = renderer.panels[prevPanelIndex];\n const nextPanel = renderer.panels[nextPanelIndex];\n\n let prevPos = Math.max(prevPanel.position, cameraRange.min);\n let nextPos = Math.min(nextPanel.position, cameraRange.max);\n\n if (prevPos > currentPos) {\n prevPos -= camera.rangeDiff;\n }\n if (nextPos < currentPos) {\n nextPos += camera.rangeDiff;\n }\n\n controlParams.range = {\n min: prevPos,\n max: nextPos\n };\n\n if (controlParams.circular) {\n if (controlParams.position < prevPos) {\n controlParams.position += camera.rangeDiff;\n }\n\n if (controlParams.position > nextPos) {\n controlParams.position -= camera.rangeDiff;\n }\n }\n\n controlParams.circular = false;\n controller.update(controlParams);\n\n this._indexRange = {\n min: prevPanel.index,\n max: nextPanel.index\n };\n\n return this;\n }\n\n public async moveToPanel(panel: Panel, options: Parameters[1]): Promise {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const controller = this._controller;\n\n controller.update(camera.controlParams);\n\n return super.moveToPanel(panel, options);\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const currentPanel = this._nextPanel ?? this._activePanel;\n const axesRange = this._controller.range;\n const indexRange = this._indexRange;\n const cameraRange = camera.range;\n const state = this._controller.state;\n\n const clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtPosition || !currentPanel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const prevPos = currentPanel.position;\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n\n const isOverThreshold = Math.abs(posDelta) >= flicking.threshold;\n const adjacentAnchor = (position > prevPos)\n ? camera.getNextAnchor(anchorAtPosition)\n : camera.getPrevAnchor(anchorAtPosition);\n\n let targetPos: number;\n let targetPanel: Panel;\n\n const anchors = camera.anchorPoints;\n const firstAnchor = anchors[0];\n const lastAnchor = anchors[anchors.length - 1];\n\n const shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max);\n const shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max);\n\n const isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max\n ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max)\n : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max);\n\n if (shouldBounceToFirst || shouldBounceToLast) {\n // In bounce area\n const targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor;\n\n targetPanel = targetAnchor.panel;\n targetPos = targetAnchor.position;\n } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) {\n // Move to anchor at position\n targetPanel = anchorAtPosition.panel;\n targetPos = anchorAtPosition.position;\n } else if (isOverThreshold && isAdjacent) {\n // Move to adjacent anchor\n targetPanel = adjacentAnchor!.panel;\n targetPos = adjacentAnchor!.position;\n } else {\n // Fallback to nearest panel from current camera\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n if (!anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n\n return this._animateToPosition({\n position: targetPos,\n duration,\n newActivePanel: targetPanel,\n axesEvent\n });\n }\n\n public setActive = (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => {\n super.setActive(newActivePanel, prevActivePanel, isTrusted);\n this.updateInput();\n };\n\n private _resetIndexRange() {\n this._indexRange = { min: 0, max: 0 };\n }\n}\n\nexport default StrictControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { clamp } from \"../../utils\";\n\n/**\n * A mode of camera\n */\nabstract class CameraMode {\n protected _flicking: Flicking;\n\n /** */\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public abstract checkAvailability(): boolean;\n public abstract getRange(): { min: number; max: number };\n\n public getAnchors(): AnchorPoint[] {\n const panels = this._flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n const anchorsIncludingPosition = anchors.filter(anchor => anchor.panel.includePosition(position, true));\n\n return anchorsIncludingPosition.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n let prevDist = Infinity;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.abs(anchor.position - position);\n\n if (dist > prevDist) {\n // Return previous anchor\n return anchors[anchorIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return anchors[anchors.length - 1];\n }\n\n public clampToReachablePosition(position: number): number {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n return clamp(position, range.min, range.max);\n }\n\n public getCircularOffset(): number {\n return 0;\n }\n\n public canReach(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n if (panel.removed) return false;\n\n const panelPos = panel.position;\n\n return panelPos >= range.min && panelPos <= range.max;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const visibleRange = camera.visibleRange;\n // Should not include margin, as we don't declare what the margin is visible as what the panel is visible.\n return panel.isVisibleOnRange(visibleRange.min, visibleRange.max);\n }\n}\n\nexport default CameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport CameraMode from \"./CameraMode\";\n\nclass LinearCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n // It's always available\n return true;\n }\n\n public getRange(): { min: number; max: number } {\n const renderer = this._flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n return { min: firstPanel?.position ?? 0, max: lastPanel?.position ?? 0 };\n }\n}\n\nexport default LinearCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { DIRECTION } from \"../../const/external\";\nimport { circulatePosition } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\n/**\n * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop\n * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드\n */\nclass CircularCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n if (panels.length <= 0) {\n return false;\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n const visibleSize = flicking.camera.size;\n const panelSizeSum = lastPanelNext - firstPanelPrev;\n\n const canSetCircularMode = panels\n .every(panel => panelSizeSum - panel.size >= visibleSize);\n\n return canSetCircularMode;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return { min: 0, max: 0 };\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n return { min: firstPanelPrev, max: lastPanelNext };\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n const camRange = camera.range;\n let minDist = Infinity;\n let minDistIndex = -1;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.min(\n Math.abs(anchor.position - position),\n Math.abs(anchor.position - camRange.min + camRange.max - position),\n Math.abs(position - camRange.min + camRange.max - anchor.position)\n );\n\n if (dist < minDist) {\n minDist = dist;\n minDistIndex = anchorIdx;\n }\n }\n\n // Return last anchor\n return anchors[minDistIndex];\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n const rangeDiff = camera.rangeDiff;\n const anchorCount = anchors.length;\n const positionInRange = circulatePosition(position, range.min, range.max);\n\n let anchorInRange: AnchorPoint | null = super.findAnchorIncludePosition(positionInRange);\n\n if (anchorCount > 0 && (position === range.min || position === range.max)) {\n const possibleAnchors = [\n anchorInRange,\n new AnchorPoint({\n index: 0,\n position: anchors[0].position + rangeDiff,\n panel: anchors[0].panel\n }),\n new AnchorPoint({\n index: anchorCount - 1,\n position: anchors[anchorCount - 1].position - rangeDiff,\n panel: anchors[anchorCount - 1].panel\n })\n ].filter(anchor => !!anchor) as AnchorPoint[];\n\n anchorInRange = possibleAnchors.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n if (!anchorInRange) return null;\n\n if (position < range.min) {\n const loopCount = -Math.floor((range.min - position) / rangeDiff) - 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n } else if (position > range.max) {\n const loopCount = Math.floor((position - range.max) / rangeDiff) + 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n }\n\n return anchorInRange;\n }\n\n public getCircularOffset(): number {\n const flicking = this._flicking;\n const camera = flicking.camera;\n\n if (!camera.circularEnabled) return 0;\n\n const toggled = flicking.panels.filter(panel => panel.toggled);\n const toggledPrev = toggled.filter(panel => panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = toggled.filter(panel => panel.toggleDirection === DIRECTION.NEXT);\n\n return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext);\n }\n\n public clampToReachablePosition(position: number): number {\n // Basically all position is reachable for circular camera\n return position;\n }\n\n public canReach(panel: Panel): boolean {\n if (panel.removed) return false;\n\n // Always reachable on circular mode\n return true;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n const rangeDiff = camera.rangeDiff;\n const visibleRange = camera.visibleRange;\n const visibleInCurrentRange = super.canSee(panel);\n\n // Check looped visible area for circular case\n if (visibleRange.min < range.min) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff);\n } else if (visibleRange.max > range.max) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff);\n }\n\n return visibleInCurrentRange;\n }\n\n private _calcPanelAreaSum(panels: Panel[]) {\n return panels.reduce((sum: number, panel: Panel) => sum + panel.sizeIncludingMargin, 0);\n }\n}\n\nexport default CircularCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport Panel from \"../../core/panel/Panel\";\nimport { parseAlign } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\nclass BoundCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return false;\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n return isBiggerThanViewport;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const alignPos = flicking.camera.alignPosition;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return { min: 0, max: 0 };\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n const firstPos = firstPanelPrev + alignPos;\n const lastPos = lastPanelNext - viewportSize + alignPos;\n\n if (isBiggerThanViewport) {\n return { min: firstPos, max: lastPos };\n } else {\n const align = flicking.camera.align;\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n const pos = firstPos + parseAlign(alignVal, lastPos - firstPos);\n\n return { min: pos, max: pos };\n }\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const camera = flicking.camera;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return [];\n }\n\n const range = flicking.camera.range;\n const reachablePanels = panels.filter(panel => camera.canReach(panel));\n\n if (reachablePanels.length > 0) {\n const shouldPrependBoundAnchor = reachablePanels[0].position !== range.min;\n const shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max;\n const indexOffset = shouldPrependBoundAnchor ? 1 : 0;\n\n const newAnchors = reachablePanels.map((panel, idx) => new AnchorPoint({\n index: idx + indexOffset,\n position: panel.position,\n panel\n }));\n\n if (shouldPrependBoundAnchor) {\n newAnchors.splice(0, 0, new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panels[reachablePanels[0].index - 1]\n }));\n }\n\n if (shouldAppendBoundAnchor) {\n newAnchors.push(new AnchorPoint({\n index: newAnchors.length,\n position: range.max,\n panel: panels[reachablePanels[reachablePanels.length - 1].index + 1]\n }));\n }\n\n return newAnchors;\n } else if (range.min !== range.max) {\n // There're more than 2 panels\n const nearestPanelAtMin = this._findNearestPanel(range.min, panels);\n const panelAtMin = nearestPanelAtMin.index === panels.length - 1\n ? nearestPanelAtMin.prev()!\n : nearestPanelAtMin;\n const panelAtMax = panelAtMin.next()!;\n\n return [\n new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panelAtMin\n }),\n new AnchorPoint({\n index: 1,\n position: range.max,\n panel: panelAtMax\n })\n ];\n } else {\n return [new AnchorPoint({\n index: 0,\n position: range.min,\n panel: this._findNearestPanel(range.min, panels)\n })];\n }\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n if (position <= range.min) {\n return anchors[0];\n } else if (position >= range.max) {\n return anchors[anchors.length - 1];\n } else {\n return super.findAnchorIncludePosition(position);\n }\n }\n\n private _findNearestPanel(pos: number, panels: Panel[]): Panel {\n let prevDist = Infinity;\n for (let panelIdx = 0; panelIdx < panels.length; panelIdx++) {\n const panel = panels[panelIdx];\n const dist = Math.abs(panel.position - pos);\n\n if (dist > prevDist) {\n // Return previous anchor\n return panels[panelIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return panels[panels.length - 1];\n }\n}\n\nexport default BoundCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport * as ERROR from \"../const/error\";\nimport { ALIGN, CIRCULAR_FALLBACK, DIRECTION, EVENTS, ORDER } from \"../const/external\";\nimport { checkExistence, find, getFlickingAttached, getProgress, getStyle, includes, parseAlign, toArray } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\nimport { CameraMode, BoundCameraMode, CircularCameraMode, LinearCameraMode } from \"./mode\";\n\nexport interface CameraOptions {\n align: FlickingOptions[\"align\"];\n}\n\n/**\n * A component that manages actual movement inside the viewport\n * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트\n */\nclass Camera {\n // Options\n private _align: FlickingOptions[\"align\"];\n\n // Internal states\n private _flicking: Flicking;\n private _mode: CameraMode;\n private _el: HTMLElement;\n private _transform: string;\n private _position: number;\n private _alignPos: number;\n private _offset: number;\n private _circularOffset: number;\n private _circularEnabled: boolean;\n private _range: { min: number; max: number };\n private _visiblePanels: Panel[];\n private _anchors: AnchorPoint[];\n private _needPanelTriggered: { prev: boolean; next: boolean };\n private _panelOrder: ValueOf;\n\n // Internal states getter\n /**\n * The camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n /**\n * An array of the child elements of the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열\n * @type {HTMLElement[]}\n * @readonly\n */\n public get children() { return toArray(this._el.children) as HTMLElement[]; }\n /**\n * Current position of the camera\n * @ko Camera의 현재 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._position; }\n /**\n * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at\n * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option\n * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다.\n * @type {number}\n * @default 0\n * @readonly\n */\n public get offset() { return this._offset - this._circularOffset; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._circularEnabled; }\n /**\n * A current camera mode\n * @type {CameraMode}\n * @readonly\n */\n public get mode() { return this._mode; }\n /**\n * A range that Camera's {@link Camera#position position} can reach\n * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} max A maximum position최대 위치\n * @readonly\n */\n public get range() { return this._range; }\n /**\n * A difference between Camera's minimum and maximum position that can reach\n * @ko Camera가 도달 가능한 최소/최대 좌표의 차이\n * @type {number}\n * @readonly\n */\n public get rangeDiff() { return this._range.max - this._range.min; }\n /**\n * An array of visible panels from the current position\n * @ko 현재 보이는 패널들의 배열\n * @type {Panel[]}\n * @readonly\n */\n public get visiblePanels() { return this._visiblePanels; }\n /**\n * A range of the visible area from the current position\n * @ko 현재 위치에서 보이는 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} min A maximum position최대 위치\n * @readonly\n */\n public get visibleRange() { return { min: this._position - this._alignPos, max: this._position - this._alignPos + this.size }; }\n /**\n * An array of {@link AnchorPoint}s that Camera can be stopped at\n * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록\n * @type {AnchorPoint[]}\n * @readonly\n */\n public get anchorPoints() { return this._anchors; }\n /**\n * A current parameters of the Camera for updating {@link AxesController}\n * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들\n * @type {ControlParams}\n * @readonly\n */\n public get controlParams() { return { range: this._range, position: this._position, circular: this._circularEnabled }; }\n /**\n * A Boolean value indicating whether Camera's over the minimum or maximum position reachable\n * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다\n * @type {boolean}\n * @readonly\n */\n public get atEdge() { return this._position <= this._range.min || this._position >= this._range.max; }\n /**\n * Return the size of the viewport\n * @ko 뷰포트 크기를 반환합니다\n * @type {number}\n * @readonly\n */\n public get size() {\n const flicking = this._flicking;\n return flicking\n ? flicking.horizontal\n ? flicking.viewport.width\n : flicking.viewport.height\n : 0;\n }\n\n /**\n * Return the camera's position progress from the first panel to last panel\n * Range is from 0 to last panel's index\n * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다\n * 범위는 0부터 마지막 패널의 인덱스까지입니다\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n const position = this._position + this._offset;\n const nearestAnchor = this.findNearestAnchor(this._position);\n\n if (!flicking || !nearestAnchor) {\n return NaN;\n }\n\n const nearestPanel = nearestAnchor.panel;\n const panelPos = nearestPanel.position + nearestPanel.offset;\n const bounceSize = flicking.control.controller.bounce!;\n\n const { min: prevRange, max: nextRange } = this.range;\n const rangeDiff = this.rangeDiff;\n\n if (position === panelPos) {\n return nearestPanel.index;\n }\n\n if (position < panelPos) {\n const prevPanel = nearestPanel.prev();\n let prevPosition = prevPanel\n ? prevPanel.position + prevPanel.offset\n : prevRange - bounceSize[0];\n\n // Looped\n if (prevPosition > panelPos) {\n prevPosition -= rangeDiff;\n }\n\n return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos);\n } else {\n const nextPanel = nearestPanel.next();\n let nextPosition = nextPanel\n ? nextPanel.position + nextPanel.offset\n : nextRange + bounceSize[1];\n\n // Looped\n if (nextPosition < panelPos) {\n nextPosition += rangeDiff;\n }\n\n return nearestPanel.index + getProgress(position, panelPos, nextPosition);\n }\n }\n\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성\n * @type {string}\n * @readonly\n */\n public get panelOrder() { return this._panelOrder; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element\n * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n }\n\n /** */\n public constructor(flicking: Flicking, {\n align = ALIGN.CENTER\n }: Partial = {}) {\n this._flicking = flicking;\n this._resetInternalValues();\n\n // Options\n this._align = align;\n }\n\n /**\n * Initialize Camera\n * @ko Camera를 초기화합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우\n * @return {this}\n */\n public init(): this {\n const viewportEl = this._flicking.viewport.element;\n\n checkExistence(viewportEl.firstElementChild, \"First element child of the viewport element\");\n this._el = viewportEl.firstElementChild as HTMLElement;\n this._checkTranslateSupport();\n\n this._updateMode();\n this.updatePanelOrder();\n\n return this;\n }\n\n /**\n * Destroy Camera and return to initial state\n * @ko Camera를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): this {\n this._resetInternalValues();\n return this;\n }\n\n /**\n * Move to the given position and apply CSS transform\n * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다\n * @param {number} pos A new position움직일 위치\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public lookAt(pos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const prevPos = this._position;\n\n this._position = pos;\n const toggled = this._togglePanels(prevPos, pos);\n this._refreshVisiblePanels();\n this._checkNeedPanel();\n this._checkReachEnd(prevPos, pos);\n\n if (toggled) {\n void flicking.renderer.render().then(() => {\n this.updateOffset();\n });\n } else {\n this.applyTransform();\n }\n }\n\n /**\n * Return a previous {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint}\n */\n public getPrevAnchor(anchor: AnchorPoint): AnchorPoint | null {\n if (!this._circularEnabled || anchor.index !== 0) {\n return this._anchors[anchor.index - 1] || null;\n } else {\n const anchors = this._anchors;\n const rangeDiff = this.rangeDiff;\n const lastAnchor = anchors[anchors.length - 1];\n\n return new AnchorPoint({\n index: lastAnchor.index,\n position: lastAnchor.position - rangeDiff,\n panel: lastAnchor.panel\n });\n }\n }\n\n /**\n * Return a next {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint}\n */\n public getNextAnchor(anchor: AnchorPoint): AnchorPoint | null {\n const anchors = this._anchors;\n\n if (!this._circularEnabled || anchor.index !== anchors.length - 1) {\n return anchors[anchor.index + 1] || null;\n } else {\n const rangeDiff = this.rangeDiff;\n const firstAnchor = anchors[0];\n\n return new AnchorPoint({\n index: firstAnchor.index,\n position: firstAnchor.position + rangeDiff,\n panel: firstAnchor.panel\n });\n }\n }\n\n /**\n * Return the camera's position progress in the panel below\n * Value is from 0 to 1 when the camera's inside panel\n * Value can be lower than 0 or bigger than 1 when it's in the margin area\n * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다\n * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다\n * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다\n */\n public getProgressInPanel(panel: Panel) {\n const panelRange = panel.range;\n\n return (this._position - panelRange.min) / (panelRange.max - panelRange.min);\n }\n\n /**\n * Return {@link AnchorPoint} that includes given position\n * If there's no {@link AnchorPoint} that includes the given position, return `null` instead\n * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다\n * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint}\n */\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n return this._mode.findAnchorIncludePosition(position);\n }\n\n /**\n * Return {@link AnchorPoint} nearest to given position\n * If there're no {@link AnchorPoint}s, return `null` instead\n * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다\n * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint}\n */\n public findNearestAnchor(position: number): AnchorPoint | null {\n return this._mode.findNearestAnchor(position);\n }\n\n /**\n * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel}\n * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다\n * @return {AnchorPoint | null}\n */\n public findActiveAnchor(): AnchorPoint | null {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!activePanel) return null;\n\n return find(this._anchors, anchor => anchor.panel.index === activePanel.index) ?? this.findNearestAnchor(activePanel.position);\n }\n\n /**\n * Clamp the given position between camera's range\n * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다\n * @param {number} position A position to clamp범위를 제한할 좌표\n * @return {number} A clamped position범위 제한된 좌표\n */\n public clampToReachablePosition(position: number): number {\n return this._mode.clampToReachablePosition(position);\n }\n\n /**\n * Check whether the given panel is inside of the Camera's range\n * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부\n */\n public canReach(panel: Panel): boolean {\n return this._mode.canReach(panel);\n }\n\n /**\n * Check whether the given panel element is visible at the current position\n * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부\n */\n public canSee(panel: Panel): boolean {\n return this._mode.canSee(panel);\n }\n\n /**\n * Update {@link Camera#range range} of Camera\n * @ko Camera의 {@link Camera#range range}를 업데이트합니다\n * @method\n * @abstract\n * @memberof Camera\n * @instance\n * @name updateRange\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public updateRange() {\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n this._updateMode();\n this._range = this._mode.getRange();\n\n panels.forEach(panel => panel.updateCircularToggleDirection());\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#alignPosition alignPosition}\n * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateAlignPos(): this {\n const align = this._align;\n\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n this._alignPos = parseAlign(alignVal, this.size);\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#anchorPoints anchorPoints}\n * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAnchors(): this {\n this._anchors = this._mode.getAnchors();\n\n return this;\n }\n\n /**\n * Update Viewport's height to active panel's height\n * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAdaptiveHeight() {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;\n\n flicking.viewport.setSize({\n height: activePanel.height\n });\n }\n\n /**\n * Update current offset of the camera\n * @ko 현재 카메라의 오프셋을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateOffset(): this {\n const flicking = getFlickingAttached(this._flicking);\n const position = this._position;\n const unRenderedPanels = flicking.panels.filter(panel => !panel.rendered);\n\n this._offset = unRenderedPanels\n .filter(panel => panel.position + panel.offset < position)\n .reduce((offset, panel) => offset + panel.sizeIncludingMargin, 0);\n\n this._circularOffset = this._mode.getCircularOffset();\n\n this.applyTransform();\n\n return this;\n }\n\n /**\n * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element\n * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다\n * @return {this}\n */\n public updatePanelOrder(): this {\n const flicking = getFlickingAttached(this._flicking);\n\n if (!flicking.horizontal) return this;\n\n const el = this._el;\n const direction = getStyle(el).direction;\n if (direction !== this._panelOrder) {\n this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR;\n if (flicking.initialized) {\n flicking.control.controller.updateDirection();\n }\n }\n\n return this;\n }\n\n /**\n * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again\n * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다\n * @chainable\n * @return {this}\n */\n public resetNeedPanelHistory(): this {\n this._needPanelTriggered = { prev: false, next: false };\n return this;\n }\n\n /**\n * Apply \"transform\" style with the current position to camera element\n * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다.\n * @return {this}\n */\n public applyTransform(): this {\n const el = this._el;\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n\n if (renderer.rendering || !flicking.initialized) return this;\n\n const actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;\n\n el.style[this._transform] = flicking.horizontal\n ? `translate(${this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition}px)`\n : `translate(0, ${-actualPosition}px)`;\n\n return this;\n }\n\n private _resetInternalValues() {\n this._position = 0;\n this._alignPos = 0;\n this._offset = 0;\n this._circularOffset = 0;\n this._circularEnabled = false;\n this._range = { min: 0, max: 0 };\n this._visiblePanels = [];\n this._anchors = [];\n this._needPanelTriggered = { prev: false, next: false };\n }\n\n private _refreshVisiblePanels() {\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n const newVisiblePanels = panels.filter(panel => this.canSee(panel));\n const prevVisiblePanels = this._visiblePanels;\n this._visiblePanels = newVisiblePanels;\n\n const added: Panel[] = newVisiblePanels.filter(panel => !includes(prevVisiblePanels, panel));\n const removed: Panel[] = prevVisiblePanels.filter(panel => !includes(newVisiblePanels, panel));\n\n if (added.length > 0 || removed.length > 0) {\n void flicking.renderer.render().then(() => {\n flicking.trigger(new ComponentEvent(EVENTS.VISIBLE_CHANGE, {\n added,\n removed,\n visiblePanels: newVisiblePanels\n }));\n });\n }\n }\n\n private _checkNeedPanel(): void {\n const needPanelTriggered = this._needPanelTriggered;\n\n if (needPanelTriggered.prev && needPanelTriggered.next) return;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n if (!needPanelTriggered.prev) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n if (!needPanelTriggered.next) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n\n return;\n }\n\n const cameraPosition = this._position;\n const cameraSize = this.size;\n const cameraRange = this._range;\n const needPanelThreshold = flicking.needPanelThreshold;\n\n const cameraPrev = cameraPosition - this._alignPos;\n const cameraNext = cameraPrev + cameraSize;\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n\n if (!needPanelTriggered.prev) {\n const firstPanelPrev = firstPanel.range.min;\n\n if (cameraPrev <= (firstPanelPrev + needPanelThreshold) || cameraPosition <= (cameraRange.min + needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n }\n\n if (!needPanelTriggered.next) {\n const lastPanelNext = lastPanel.range.max;\n\n if (cameraNext >= (lastPanelNext - needPanelThreshold) || cameraPosition >= (cameraRange.max - needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n }\n }\n\n private _checkReachEnd(prevPos: number, newPos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const range = this._range;\n\n const wasBetweenRange = prevPos > range.min && prevPos < range.max;\n const isBetweenRange = newPos > range.min && newPos < range.max;\n\n if (!wasBetweenRange || isBetweenRange) return;\n\n const direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT;\n\n flicking.trigger(new ComponentEvent(EVENTS.REACH_EDGE, {\n direction\n }));\n }\n\n private _checkTranslateSupport = () => {\n const transforms = [\"webkitTransform\", \"msTransform\", \"MozTransform\", \"OTransform\", \"transform\"];\n\n const supportedStyle = document.documentElement.style;\n let transformName = \"\";\n for (const prefixedTransform of transforms) {\n if (prefixedTransform in supportedStyle) {\n transformName = prefixedTransform;\n }\n }\n\n if (!transformName) {\n throw new FlickingError(ERROR.MESSAGE.TRANSFORM_NOT_SUPPORTED, ERROR.CODE.TRANSFORM_NOT_SUPPORTED);\n }\n\n this._transform = transformName;\n };\n\n private _updateMode() {\n const flicking = getFlickingAttached(this._flicking);\n\n if (flicking.circular) {\n const circularMode = new CircularCameraMode(flicking);\n const canSetCircularMode = circularMode.checkAvailability();\n\n if (canSetCircularMode) {\n this._mode = circularMode;\n } else {\n const fallbackMode = flicking.circularFallback;\n\n this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n }\n\n this._circularEnabled = canSetCircularMode;\n } else {\n this._mode = flicking.bound\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n this._circularEnabled = false;\n }\n }\n\n private _togglePanels(prevPos: number, pos: number): boolean {\n if (pos === prevPos) return false;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n const toggled = panels.map(panel => panel.toggle(prevPos, pos));\n\n return toggled.some(isToggled => isToggled);\n }\n}\n\nexport default Camera;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\nimport ImReady from \"@egjs/imready\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { ALIGN, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached, getMinusCompensatedIndex, includes, parsePanelAlign } from \"../utils\";\n\nimport RenderingStrategy from \"./strategy/RenderingStrategy\";\n\nexport interface RendererOptions {\n align?: FlickingOptions[\"align\"];\n strategy: RenderingStrategy;\n}\n\n/**\n * A component that manages {@link Panel} and its elements\n * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트\n */\nabstract class Renderer {\n // Internal States\n protected _flicking: Flicking | null;\n protected _panels: Panel[];\n protected _rendering: boolean;\n\n // Options\n protected _align: NonNullable;\n protected _strategy: RendererOptions[\"strategy\"];\n\n // Internal states Getter\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._panels; }\n /**\n * A boolean value indicating whether rendering is in progress\n * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부\n * @type {boolean}\n * @readonly\n * @internal\n */\n public get rendering() { return this._rendering; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._panels.length; }\n /**\n * @internal\n */\n public get strategy() { return this._strategy; }\n\n // Options Getter\n /**\n * A {@link Panel}'s {@link Panel#align align} value that applied to all panels\n * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: NonNullable) {\n this._align = val;\n\n const panelAlign = parsePanelAlign(val);\n this._panels.forEach(panel => { panel.align = panelAlign; });\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {Constants.ALIGN | string | number} [options.align=\"center\"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값\n * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈)\n */\n public constructor({\n align = ALIGN.CENTER,\n strategy\n }: RendererOptions) {\n this._flicking = null;\n this._panels = [];\n this._rendering = false;\n\n // Bind options\n this._align = align;\n this._strategy = strategy;\n }\n\n /**\n * Render panel elements inside the camera element\n * @ko 패널 엘리먼트들을 카메라 엘리먼트 내부에 렌더링합니다\n * @method\n * @abstract\n * @memberof Renderer\n * @instance\n * @name render\n * @chainable\n * @return {this}\n */\n public abstract render(): Promise;\n\n protected abstract _collectPanels(): void;\n protected abstract _createPanel(el: any, options: Omit): Panel;\n\n /**\n * Initialize Renderer\n * @ko Renderer를 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._collectPanels();\n\n return this;\n }\n\n /**\n * Destroy Renderer and return to initial state\n * @ko Renderer를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._flicking = null;\n this._panels = [];\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n */\n public getPanel(index: number): Panel | null {\n return this._panels[index] || null;\n }\n\n public forceRenderAllPanels(): Promise {\n this._panels.forEach(panel => panel.markForShow());\n\n return Promise.resolve();\n }\n\n /**\n * Update all panel sizes\n * @ko 모든 패널의 크기를 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updatePanelSize(): this {\n const flicking = getFlickingAttached(this._flicking);\n const panels = this._panels;\n\n if (panels.length <= 0) return this;\n\n if (flicking.panelsPerView > 0) {\n const firstPanel = panels[0];\n firstPanel.resize();\n\n this._updatePanelSizeByGrid(firstPanel, panels);\n } else {\n flicking.panels.forEach(panel => panel.resize());\n }\n\n return this;\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {Array} items An array of items to insert추가할 아이템들의 배열\n * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열\n * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n */\n public batchInsert(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsInserted = this.batchInsertDefer(...items);\n\n if (allPanelsInserted.length <= 0) return [];\n\n this.updateAfterPanelChange(allPanelsInserted, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchInsertDefer(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const prevFirstPanel = panels[0];\n const align = parsePanelAlign(this._align);\n\n const allPanelsInserted = items.reduce((addedPanels, item) => {\n const insertingIdx = getMinusCompensatedIndex(item.index, panels.length);\n const panelsPushed = panels.slice(insertingIdx);\n const panelsInserted = item.elements.map((el, idx) => this._createPanel(el, { index: insertingIdx + idx, align, flicking }));\n\n panels.splice(insertingIdx, 0, ...panelsInserted);\n\n if (item.hasDOMInElements) {\n // Insert the actual elements as camera element's children\n this._insertPanelElements(panelsInserted, panelsPushed[0] ?? null);\n }\n\n // Resize the newly added panels\n if (flicking.panelsPerView > 0) {\n const firstPanel = prevFirstPanel || panelsInserted[0].resize();\n\n this._updatePanelSizeByGrid(firstPanel, panelsInserted);\n } else {\n panelsInserted.forEach(panel => panel.resize());\n }\n\n // Update panel indexes & positions\n panelsPushed.forEach(panel => {\n panel.increaseIndex(panelsInserted.length);\n panel.updatePosition();\n });\n\n return [...addedPanels, ...panelsInserted];\n }, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {Array} items An array of items to remove제거할 아이템들의 배열\n * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스\n * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다\n * @return An array of removed panels제거된 패널들의 배열\n */\n public batchRemove(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsRemoved = this.batchRemoveDefer(...items);\n\n if (allPanelsRemoved.length <= 0) return [];\n\n this.updateAfterPanelChange([], allPanelsRemoved);\n\n return allPanelsRemoved;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchRemoveDefer(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const { control } = flicking;\n const activePanel = control.activePanel;\n\n const allPanelsRemoved = items.reduce((removed, item) => {\n const { index, deleteCount } = item;\n const removingIdx = getMinusCompensatedIndex(index, panels.length);\n\n const panelsPulled = panels.slice(removingIdx + deleteCount);\n const panelsRemoved = panels.splice(removingIdx, deleteCount);\n\n if (panelsRemoved.length <= 0) return [];\n\n // Update panel indexes & positions\n panelsPulled.forEach(panel => {\n panel.decreaseIndex(panelsRemoved.length);\n panel.updatePosition();\n });\n\n if (item.hasDOMInElements) {\n this._removePanelElements(panelsRemoved);\n }\n\n // Remove panel elements\n panelsRemoved.forEach(panel => panel.destroy());\n\n if (includes(panelsRemoved, activePanel)) {\n control.resetActive();\n }\n\n return [...removed, ...panelsRemoved];\n }, []);\n\n return allPanelsRemoved;\n }\n\n /**\n * @internal\n */\n public updateAfterPanelChange(panelsAdded: Panel[], panelsRemoved: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n const panels = this._panels;\n const activePanel = control.activePanel;\n\n // Update camera & control\n this._updateCameraAndControl();\n\n void this.render();\n\n if (!flicking.animating) {\n if (!activePanel || activePanel.removed) {\n if (panels.length <= 0) {\n // All panels removed\n camera.lookAt(0);\n } else {\n let targetIndex = activePanel?.index ?? 0;\n if (targetIndex > panels.length - 1) {\n targetIndex = panels.length - 1;\n }\n\n void control.moveToPanel(panels[targetIndex], {\n duration: 0\n }).catch(() => void 0);\n }\n } else {\n void control.moveToPanel(activePanel, {\n duration: 0\n }).catch(() => void 0);\n }\n }\n\n flicking.camera.updateOffset();\n\n if (panelsAdded.length > 0 || panelsRemoved.length > 0) {\n flicking.trigger(new ComponentEvent(EVENTS.PANEL_CHANGE, {\n added: panelsAdded,\n removed: panelsRemoved\n }));\n\n this.checkPanelContentsReady([\n ...panelsAdded,\n ...panelsRemoved\n ]);\n }\n }\n\n /**\n * @internal\n */\n public checkPanelContentsReady(checkingPanels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const resizeOnContentsReady = flicking.resizeOnContentsReady;\n const panels = this._panels;\n\n if (!resizeOnContentsReady || flicking.virtualEnabled) return;\n\n const hasContents = (panel: Panel) => panel.element && !!panel.element.querySelector(\"img, video\");\n checkingPanels = checkingPanels.filter(panel => hasContents(panel));\n\n if (checkingPanels.length <= 0) return;\n\n const contentsReadyChecker = new ImReady();\n\n checkingPanels.forEach(panel => {\n panel.loading = true;\n });\n\n contentsReadyChecker.on(\"readyElement\", e => {\n if (!this._flicking) {\n // Renderer's destroy() is called before\n contentsReadyChecker.destroy();\n return;\n }\n\n const panel = checkingPanels[e.index];\n const camera = flicking.camera;\n const control = flicking.control;\n const prevProgressInPanel = control.activePanel\n ? camera.getProgressInPanel(control.activePanel)\n : 0;\n\n panel.loading = false;\n panel.resize();\n panels.slice(panel.index + 1).forEach(panelBehind => panelBehind.updatePosition());\n\n if (!flicking.initialized) return;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n\n if (control.animating) {\n // TODO: Need Axes update\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n });\n\n contentsReadyChecker.on(\"preReady\", e => {\n if (this._flicking) {\n void this.render();\n }\n\n if (e.readyCount === e.totalCount) {\n contentsReadyChecker.destroy();\n }\n });\n\n contentsReadyChecker.on(\"ready\", () => {\n if (this._flicking) {\n void this.render();\n }\n contentsReadyChecker.destroy();\n });\n\n contentsReadyChecker.check(checkingPanels.map(panel => panel.element));\n }\n\n protected _updateCameraAndControl() {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n camera.resetNeedPanelHistory();\n control.updateInput();\n }\n\n protected _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n }\n\n protected _updatePanelSizeByGrid(referencePanel: Panel, panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const panelsPerView = flicking.panelsPerView;\n\n if (panelsPerView <= 0) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"panelsPerView\", panelsPerView), ERROR.CODE.WRONG_OPTION);\n }\n if (panels.length <= 0) return;\n\n const viewportSize = flicking.camera.size;\n const gap = referencePanel.margin.prev + referencePanel.margin.next;\n\n const panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView;\n const panelSizeObj = flicking.horizontal\n ? { width: panelSize }\n : { height: panelSize };\n const firstPanelSizeObj = {\n size: panelSize,\n margin: referencePanel.margin,\n ...(!flicking.horizontal && { height: referencePanel.height})\n };\n\n if (!flicking.noPanelStyleOverride) {\n this._strategy.updatePanelSizes(flicking, panelSizeObj);\n }\n\n flicking.panels.forEach(panel => panel.resize(firstPanelSizeObj));\n }\n\n protected _removeAllChildsFromCamera() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove other elements\n while (cameraElement.firstChild) {\n cameraElement.removeChild(cameraElement.firstChild);\n }\n }\n\n protected _insertPanelElements(panels: Panel[], nextSibling: Panel | null = null) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const cameraElement = camera.element;\n const nextSiblingElement = nextSibling?.element || null;\n const fragment = document.createDocumentFragment();\n\n panels.forEach(panel => fragment.appendChild(panel.element));\n cameraElement.insertBefore(fragment, nextSiblingElement);\n }\n\n protected _removePanelElements(panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n panels.forEach(panel => {\n cameraElement.removeChild(panel.element);\n });\n }\n\n protected _afterRender() {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.applyTransform();\n }\n}\n\nexport default Renderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { getFlickingAttached, toArray } from \"../utils\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n *\n */\nclass VanillaRenderer extends Renderer {\n // eslint-disable-next-line @typescript-eslint/require-await\n public async render() {\n const flicking = getFlickingAttached(this._flicking);\n const strategy = this._strategy;\n\n strategy.updateRenderingPanels(flicking);\n strategy.renderPanels(flicking);\n\n this._resetPanelElementOrder();\n this._afterRender();\n }\n\n protected _collectPanels() {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._removeAllTextNodes();\n this._panels = this._strategy.collectPanels(flicking, camera.children);\n }\n\n protected _createPanel(el: HTMLElement, options: Omit): Panel {\n return this._strategy.createPanel(el, options);\n }\n\n private _resetPanelElementOrder() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraEl = flicking.camera.element;\n\n // We're using reversed panels here as last panel should be the last element of camera element\n const reversedElements = this._strategy\n .getRenderingElementsByOrder(flicking)\n .reverse();\n\n reversedElements.forEach((el, idx) => {\n const nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null;\n\n if (el.nextElementSibling !== nextEl) {\n cameraEl.insertBefore(el, nextEl);\n }\n });\n }\n\n private _removeAllTextNodes() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove all text nodes in the camera element\n toArray(cameraElement.childNodes).forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n cameraElement.removeChild(node);\n }\n });\n }\n}\n\nexport default VanillaRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n * @internal\n */\nabstract class ExternalRenderer extends Renderer {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n protected _removePanelElements(panels: Panel[]): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n\n protected _removeAllChildsFromCamera(): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n /* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\nexport default ExternalRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { getElementSize, getProgress, getStyle, parseAlign, setSize } from \"../../utils\";\nimport { ALIGN, DIRECTION } from \"../../const/external\";\nimport { LiteralUnion, ValueOf } from \"../../type/internal\";\n\nimport ElementProvider from \"./provider/ElementProvider\";\n\nexport interface PanelOptions {\n index: number;\n align: LiteralUnion> | number;\n flicking: Flicking;\n elementProvider: ElementProvider;\n}\n\n/**\n * A slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass Panel {\n // Internal States\n protected _flicking: Flicking;\n protected _elProvider: ElementProvider;\n protected _index: number;\n protected _pos: number;\n protected _size: number;\n protected _height: number;\n protected _margin: { prev: number; next: number };\n protected _alignPos: number; // Actual align pos\n protected _rendered: boolean;\n protected _removed: boolean;\n protected _loading: boolean;\n protected _toggleDirection: ValueOf;\n protected _toggled: boolean;\n protected _togglePosition: number;\n\n // Options\n protected _align: PanelOptions[\"align\"];\n\n // Internal States Getter\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n /**\n * @internal\n * @readonly\n */\n public get elementProvider() { return this._elProvider; }\n /**\n * Index of the panel\n * @ko 패널의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of the panel, including {@link Panel#alignPosition alignPosition}\n * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos + this._alignPos; }\n /**\n * Cached size of the panel element\n * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else\n * @ko 패널 엘리먼트의 캐시된 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다\n * @type {number}\n * @readonly\n */\n public get size() { return this._size; }\n /**\n * Panel's size including CSS `margin`\n * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else\n * @ko CSS `margin`을 포함한 패널의 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다\n * @type {number}\n * @readonly\n */\n public get sizeIncludingMargin() { return this._size + this._margin.prev + this._margin.next; }\n /**\n * Height of the panel element\n * @ko 패널 엘리먼트의 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height; }\n /**\n * Cached CSS `margin` value of the panel element\n * @ko 패널 엘리먼트의 CSS `margin` 값\n * @type {object}\n * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값\n * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값\n * @readonly\n */\n public get margin() { return this._margin; }\n /**\n * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at\n * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * A value indicating whether the panel's {@link Flicking#remove remove}d\n * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get removed() { return this._removed; }\n /**\n * A value indicating whether the panel's element is being rendered on the screen\n * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get rendered() { return this._rendered; }\n /**\n * A value indicating whether the panel's image/video is not loaded and waiting for resize\n * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get loading() { return this._loading; }\n /**\n * Panel element's range of the bounding box\n * @ko 패널 엘리먼트의 Bounding box 범위\n * @type {object}\n * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false)\n * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false)\n * @readonly\n */\n public get range() { return { min: this._pos, max: this._pos + this._size }; }\n /**\n * A value indicating whether the panel's position is toggled by circular behavior\n * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get toggled() { return this._toggled; }\n /**\n * A direction where the panel's position is toggled\n * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향\n * @type {DIRECTION}\n * @readonly\n */\n public get toggleDirection() { return this._toggleDirection; }\n /**\n * Actual position offset determined by {@link Panel#order}\n * @ko {@link Panel#order}에 의한 실제 위치 변경값\n * @type {number}\n * @readonly\n */\n public get offset() {\n const toggleDirection = this._toggleDirection;\n const cameraRangeDiff = this._flicking.camera.rangeDiff;\n\n return toggleDirection === DIRECTION.NONE || !this._toggled\n ? 0\n : toggleDirection === DIRECTION.PREV\n ? -cameraRangeDiff\n : cameraRangeDiff;\n }\n\n /**\n * Progress of movement between previous or next panel relative to current panel\n * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n\n return this.index - flicking.camera.progress;\n }\n\n /**\n * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1)\n * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1)\n * @type {number}\n * @readonly\n */\n public get outsetProgress() {\n const position = this.position + this.offset;\n const alignPosition = this._alignPos;\n const camera = this._flicking.camera;\n const camPos = camera.position;\n\n if (camPos === position) {\n return 0;\n }\n\n if (camPos < position) {\n const disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition;\n\n return -getProgress(camPos, position, disappearPosNext);\n } else {\n const disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition);\n\n return 1 - getProgress(camPos, disappearPosPrev, position);\n }\n }\n\n /**\n * Percentage of area where panel is visible in the viewport\n * @ko 뷰포트 안에서 패널이 보이는 영역의 비율\n * @type {number}\n * @readonly\n */\n public get visibleRatio() {\n const range = this.range;\n const size = this._size;\n const offset = this.offset;\n const visibleRange = this._flicking.camera.visibleRange;\n\n const checkingRange = {\n min: range.min + offset,\n max: range.max + offset\n };\n\n if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) {\n return 0;\n }\n\n let visibleSize = size;\n\n if (visibleRange.min > checkingRange.min) {\n visibleSize -= visibleRange.min - checkingRange.min;\n }\n if (visibleRange.max < checkingRange.max) {\n visibleSize -= checkingRange.max - visibleRange.max;\n }\n\n return visibleSize / size;\n }\n\n public set loading(val: boolean) { this._loading = val; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element\n * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: PanelOptions[\"align\"]) {\n this._align = val;\n this._updateAlignPos();\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스\n */\n public constructor({\n index,\n align,\n flicking,\n elementProvider\n }: PanelOptions) {\n this._index = index;\n this._flicking = flicking;\n this._elProvider = elementProvider;\n\n this._align = align;\n\n this._removed = false;\n this._rendered = true;\n this._loading = false;\n this._resetInternalStates();\n }\n\n /**\n * Mark panel element to be appended on the camera element\n * @internal\n */\n public markForShow() {\n this._rendered = true;\n this._elProvider.show(this._flicking);\n }\n\n /**\n * Mark panel element to be removed from the camera element\n * @internal\n */\n public markForHide() {\n this._rendered = false;\n this._elProvider.hide(this._flicking);\n }\n\n /**\n * Update size of the panel\n * @ko 패널의 크기를 갱신합니다\n * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보\n * @chainable\n * @return {this}\n */\n public resize(cached?: {\n size: number;\n height?: number;\n margin: { prev: number; next: number };\n }): this {\n const el = this.element;\n const flicking = this._flicking;\n const {\n horizontal,\n useFractionalSize\n } = flicking;\n\n if (cached) {\n this._size = cached.size;\n this._margin = { ...cached.margin };\n this._height = cached.height ?? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: getStyle(el)\n });\n } else {\n const elStyle = getStyle(el);\n\n this._size = getElementSize({\n el,\n horizontal,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n });\n\n this._margin = horizontal\n ? {\n prev: parseFloat(elStyle.marginLeft || \"0\"),\n next: parseFloat(elStyle.marginRight || \"0\")\n } : {\n prev: parseFloat(elStyle.marginTop || \"0\"),\n next: parseFloat(elStyle.marginBottom || \"0\")\n };\n\n this._height = horizontal\n ? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n })\n : this._size;\n }\n\n this.updatePosition();\n this._updateAlignPos();\n\n return this;\n }\n\n /**\n * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property\n * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New panel size새 패널 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @chainable\n * @return {this}\n */\n public setSize(size: Partial<{\n width: number | string;\n height: number | string;\n }>): this {\n setSize(this.element, size);\n\n return this;\n }\n\n /**\n * Check whether the given element is inside of this panel's {@link Panel#element element}\n * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다\n * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement\n * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부\n */\n public contains(element: HTMLElement): boolean {\n return !!this.element?.contains(element);\n }\n\n /**\n * Reset internal state and set {@link Panel#removed removed} to `true`\n * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다.\n * @return {void}\n */\n public destroy(): void {\n this._resetInternalStates();\n this._removed = true;\n }\n\n /**\n * Check whether the given position is inside of this panel's {@link Panel#range range}\n * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다.\n * @param {number} pos A position to check확인하고자 하는 좌표\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부\n */\n public includePosition(pos: number, includeMargin: boolean = false): boolean {\n return this.includeRange(pos, pos, includeMargin);\n }\n\n /**\n * Check whether the given range is fully included in this panel's area (inclusive)\n * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부\n */\n public includeRange(min: number, max: number, includeMargin: boolean = false): boolean {\n const margin = this._margin;\n const panelRange = this.range;\n\n if (includeMargin) {\n panelRange.min -= margin.prev;\n panelRange.max += margin.next;\n }\n\n return max >= panelRange.min && min <= panelRange.max;\n }\n\n /**\n * Check whether the panel is visble in the given range (exclusive)\n * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부\n */\n public isVisibleOnRange(min: number, max: number): boolean {\n const panelRange = this.range;\n\n return max > panelRange.min && min < panelRange.max;\n }\n\n /**\n * Move {@link Camera} to this panel\n * @ko {@link Camera}를 이 패널로 이동합니다\n * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise\n */\n public focus(duration?: number) {\n return this._flicking.moveTo(this._index, duration);\n }\n\n /**\n * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel\n * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다\n * @returns {Panel | null} The previous panel이전 패널\n */\n public prev(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1)\n : renderer.getPanel(index - 1);\n }\n\n /**\n * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel\n * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다\n * @returns {Panel | null} The previous panel다음 패널\n */\n public next(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1)\n : renderer.getPanel(index + 1);\n }\n\n /**\n * Increase panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public increaseIndex(val: number): this {\n this._index += Math.max(val, 0);\n return this;\n }\n\n /**\n * Decrease panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public decreaseIndex(val: number): this {\n this._index -= Math.max(val, 0);\n return this;\n }\n\n /**\n * @internal\n */\n public updatePosition(): this {\n const prevPanel = this._flicking.renderer.panels[this._index - 1];\n\n this._pos = prevPanel\n ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev\n : this._margin.prev;\n\n return this;\n }\n\n /**\n * @internal\n * @return {boolean} toggled\n */\n public toggle(prevPos: number, newPos: number): boolean {\n const toggleDirection = this._toggleDirection;\n const togglePosition = this._togglePosition;\n\n if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false;\n\n const prevToggled = this._toggled;\n\n if (newPos > prevPos) {\n if (togglePosition >= prevPos && togglePosition <= newPos) {\n this._toggled = toggleDirection === DIRECTION.NEXT;\n }\n } else {\n if (togglePosition <= prevPos && togglePosition >= newPos) {\n this._toggled = toggleDirection !== DIRECTION.NEXT;\n }\n }\n\n return prevToggled !== this._toggled;\n }\n\n /**\n * @internal\n */\n public updateCircularToggleDirection(): this {\n const flicking = this._flicking;\n\n if (!flicking.circularEnabled) {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n this._toggled = false;\n return this;\n }\n\n const camera = flicking.camera;\n const camRange = camera.range;\n const camAlignPosition = camera.alignPosition;\n const camVisibleRange = camera.visibleRange;\n const camVisibleSize = camVisibleRange.max - camVisibleRange.min;\n\n const minimumVisible = camRange.min - camAlignPosition;\n const maximumVisible = camRange.max - camAlignPosition + camVisibleSize;\n\n const shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false);\n const shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false);\n\n this._toggled = false;\n if (shouldBeVisibleAtMin) {\n this._toggleDirection = DIRECTION.PREV;\n this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition;\n this.toggle(Infinity, camera.position);\n } else if (shouldBeVisibleAtMax) {\n this._toggleDirection = DIRECTION.NEXT;\n this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition;\n this.toggle(-Infinity, camera.position);\n } else {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n }\n\n return this;\n }\n\n private _updateAlignPos() {\n this._alignPos = parseAlign(this._align, this._size);\n }\n\n private _resetInternalStates() {\n this._size = 0;\n this._pos = 0;\n this._margin = { prev: 0, next: 0 };\n this._height = 0;\n this._alignPos = 0;\n this._toggled = false;\n this._togglePosition = 0;\n this._toggleDirection = DIRECTION.NONE;\n }\n}\n\nexport default Panel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel, { PanelOptions } from \"../../core/panel/Panel\";\nimport ElementProvider from \"../../core/panel/provider/ElementProvider\";\nimport { DIRECTION } from \"../../const/external\";\nimport { parsePanelAlign } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nexport interface NormalRenderingStrategyOptions {\n providerCtor: new (...args: any) => ElementProvider;\n}\n\n\nclass NormalRenderingStrategy implements RenderingStrategy {\n private _providerCtor: NormalRenderingStrategyOptions[\"providerCtor\"];\n\n public constructor({ providerCtor }: NormalRenderingStrategyOptions) {\n this._providerCtor = providerCtor;\n }\n\n public renderPanels() {\n // DO_NOTHING\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const renderedPanels = flicking.renderer.panels.filter(panel => panel.rendered);\n const toggledPrev = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.NEXT);\n const notToggled = renderedPanels.filter(panel => !panel.toggled);\n\n return [...toggledPrev, ...notToggled, ...toggledNext].map(panel => panel.index);\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const panels = flicking.panels;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => panels[index].element);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n if (flicking.renderOnlyVisible) {\n this._showOnlyVisiblePanels(flicking);\n } else {\n flicking.panels.forEach(panel => panel.markForShow());\n }\n }\n\n public collectPanels(\n flicking: Flicking,\n elements: any[]\n ) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return elements.map((el, index) => new Panel({\n index,\n elementProvider: new this._providerCtor(el),\n align,\n flicking\n }));\n }\n\n public createPanel(\n element: any,\n options: Omit\n ) {\n return new Panel({\n ...options,\n elementProvider: new this._providerCtor(element)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n\n private _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n}\n\nexport default NormalRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { DIRECTION } from \"../../const/external\";\nimport { circulateIndex } from \"../../utils\";\n\nimport Panel, { PanelOptions } from \"./Panel\";\nimport VirtualElementProvider from \"./provider/VirtualElementProvider\";\n\ninterface VirtualPanelOptions extends PanelOptions {\n elementProvider: VirtualElementProvider;\n}\n\n/**\n * An slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass VirtualPanel extends Panel {\n protected _elProvider: VirtualElementProvider;\n protected _cachedInnerHTML: string | null;\n\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n\n /**\n * Cached innerHTML by the previous render function\n * @ko 이전 렌더링에서 캐시된 innerHTML 정보\n * @type {string|null}\n * @readonly\n */\n public get cachedInnerHTML() { return this._cachedInnerHTML; }\n\n /**\n * An number for indexing which element it will be rendered on\n * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자\n * @type {number}\n * @readonly\n */\n public get elementIndex() {\n const flicking = this._flicking;\n const virtualElCount = flicking.panelsPerView + 1;\n const panelCount = flicking.panelCount;\n let index = this._index;\n\n if (this._toggled) {\n // To prevent element duplication\n index = this._toggleDirection === DIRECTION.NEXT\n ? index + panelCount\n : index - panelCount;\n }\n\n return circulateIndex(index, virtualElCount);\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n */\n public constructor(options: VirtualPanelOptions) {\n super(options);\n\n options.elementProvider.init(this);\n this._elProvider = options.elementProvider;\n this._cachedInnerHTML = null;\n }\n\n public cacheRenderResult(result: string) {\n this._cachedInnerHTML = result;\n }\n\n public uncacheRenderResult() {\n this._cachedInnerHTML = null;\n }\n\n public render() {\n const flicking = this._flicking;\n const { renderPanel, cache } = flicking.virtual;\n\n const element = this._elProvider.element;\n const newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index);\n\n if (newInnerHTML === element.innerHTML) return;\n\n element.innerHTML = newInnerHTML;\n\n if (cache) {\n this.cacheRenderResult(newInnerHTML);\n }\n }\n\n public increaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.increaseIndex(val);\n }\n\n public decreaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.decreaseIndex(val);\n }\n}\n\nexport default VirtualPanel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { PanelOptions } from \"../../core/panel/Panel\";\nimport VirtualPanel from \"../../core/panel/VirtualPanel\";\nimport VirtualElementProvider from \"../../core/panel/provider/VirtualElementProvider\";\nimport { parsePanelAlign, range, setSize } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nclass VirtualRenderingStrategy implements RenderingStrategy {\n public renderPanels(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = flicking.visiblePanels as VirtualPanel[];\n const invisibleIndexes = range(flicking.panelsPerView + 1);\n\n visiblePanels.forEach(panel => {\n const elementIndex = panel.elementIndex;\n\n panel.render();\n\n virtualManager.show(elementIndex);\n invisibleIndexes[elementIndex] = -1;\n });\n\n invisibleIndexes\n .filter(val => val >= 0)\n .forEach(idx => {\n virtualManager.hide(idx);\n });\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = [...flicking.visiblePanels]\n .filter(panel => panel.rendered)\n .sort((panel1, panel2) => {\n return (panel1.position + panel1.offset) - (panel2.position + panel2.offset);\n }) as VirtualPanel[];\n\n if (visiblePanels.length <= 0) return virtualManager.elements.map((_, idx) => idx);\n\n const visibleIndexes = visiblePanels.map(panel => panel.elementIndex);\n const invisibleIndexes = virtualManager.elements\n .map((el, idx) => ({ ...el, idx }))\n .filter(el => !el.visible)\n .map(el => el.idx);\n\n return [...visibleIndexes, ...invisibleIndexes];\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const elements = virtualManager.elements;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => elements[index].nativeElement);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else {\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n\n public collectPanels(flicking: Flicking) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return range(flicking.virtual.initialPanelCount).map(index => new VirtualPanel({\n index,\n elementProvider: new VirtualElementProvider(flicking),\n align,\n flicking\n }));\n }\n\n public createPanel(_el: any, options: PanelOptions) {\n return new VirtualPanel({\n ...options,\n elementProvider: new VirtualElementProvider(options.flicking)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.virtual.elements.forEach(el => {\n setSize(el.nativeElement, size);\n });\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n}\n\nexport default VirtualRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Component, { ComponentEvent } from \"@egjs/component\";\n\nimport FlickingError from \"./core/FlickingError\";\nimport Viewport from \"./core/Viewport\";\nimport AutoResizer from \"./core/AutoResizer\";\nimport { Panel } from \"./core/panel\";\nimport { VanillaElementProvider } from \"./core/panel/provider\";\nimport VirtualManager, { VirtualOptions } from \"./core/VirtualManager\";\nimport { Control, SnapControl, SnapControlOptions, FreeControl, StrictControl, FreeControlOptions, StrictControlOptions } from \"./control\";\nimport { Camera } from \"./camera\";\nimport { Renderer, VanillaRenderer, ExternalRenderer, RendererOptions, NormalRenderingStrategy, VirtualRenderingStrategy } from \"./renderer\";\nimport { EVENTS, ALIGN, MOVE_TYPE, DIRECTION, CIRCULAR_FALLBACK } from \"./const/external\";\nimport * as ERROR from \"./const/error\";\nimport { findIndex, getElement, includes, parseElement } from \"./utils\";\nimport { HoldStartEvent, HoldEndEvent, MoveStartEvent, SelectEvent, MoveEvent, MoveEndEvent, WillChangeEvent, WillRestoreEvent, NeedPanelEvent, VisibleChangeEvent, ReachEdgeEvent, ReadyEvent, AfterResizeEvent, BeforeResizeEvent, ChangedEvent, RestoredEvent, PanelChangeEvent } from \"./type/event\";\nimport { LiteralUnion, ValueOf } from \"./type/internal\";\nimport { ElementLike, Plugin, Status, MoveTypeOptions } from \"./type/external\";\n\n/**\n * @interface\n */\nexport interface FlickingEvents {\n [EVENTS.READY]: ReadyEvent;\n [EVENTS.BEFORE_RESIZE]: BeforeResizeEvent;\n [EVENTS.AFTER_RESIZE]: AfterResizeEvent;\n [EVENTS.HOLD_START]: HoldStartEvent;\n [EVENTS.HOLD_END]: HoldEndEvent;\n [EVENTS.MOVE_START]: MoveStartEvent;\n [EVENTS.MOVE]: MoveEvent;\n [EVENTS.MOVE_END]: MoveEndEvent;\n [EVENTS.WILL_CHANGE]: WillChangeEvent;\n [EVENTS.CHANGED]: ChangedEvent;\n [EVENTS.WILL_RESTORE]: WillRestoreEvent;\n [EVENTS.RESTORED]: RestoredEvent;\n [EVENTS.SELECT]: SelectEvent;\n [EVENTS.NEED_PANEL]: NeedPanelEvent;\n [EVENTS.VISIBLE_CHANGE]: VisibleChangeEvent;\n [EVENTS.REACH_EDGE]: ReachEdgeEvent;\n [EVENTS.PANEL_CHANGE]: PanelChangeEvent;\n}\n\n/**\n * @interface\n */\nexport interface FlickingOptions {\n // UI / LAYOUT\n align: LiteralUnion> | number | { panel: number | string; camera: number | string };\n defaultIndex: number;\n horizontal: boolean;\n circular: boolean;\n circularFallback: LiteralUnion>;\n bound: boolean;\n adaptive: boolean;\n panelsPerView: number;\n noPanelStyleOverride: boolean;\n resizeOnContentsReady: boolean;\n nested: boolean;\n\n // EVENT\n needPanelThreshold: number;\n preventEventsBeforeInit: boolean;\n\n // ANIMATION\n deceleration: number;\n duration: number;\n easing: (x: number) => number;\n\n // INPUT\n inputType: string[];\n moveType: ValueOf | MoveTypeOptions>;\n threshold: number;\n interruptable: boolean;\n bounce: number | string | [number | string, number | string];\n iOSEdgeSwipeThreshold: number;\n preventClickOnDrag: boolean;\n preventDefaultOnDrag: boolean;\n disableOnInit: boolean;\n changeOnHold: boolean;\n\n // PERFORMANCE\n renderOnlyVisible: boolean;\n virtual: VirtualOptions | null;\n\n // OTHERS\n autoInit: boolean;\n autoResize: boolean;\n useResizeObserver: boolean;\n resizeDebounce: number;\n maxResizeDebounce: number;\n useFractionalSize: boolean;\n externalRenderer: ExternalRenderer | null;\n\n // @deprecated\n renderExternal: {\n renderer: new (options: RendererOptions) => ExternalRenderer;\n rendererOptions: RendererOptions;\n } | null;\n}\n\n/**\n * @extends Component\n * @support {\"ie\": \"9+(with polyfill)\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"4.X+\"}\n * @requires {@link https://github.com/naver/egjs-component|@egjs/component}\n * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}\n */\nclass Flicking extends Component {\n /**\n * Version info string\n * @ko 버전정보 문자열\n * @type {string}\n * @readonly\n * @example\n * ```ts\n * Flicking.VERSION; // ex) 4.0.0\n * ```\n */\n public static VERSION = \"#__VERSION__#\";\n\n // Core components\n private _viewport: Viewport;\n private _autoResizer: AutoResizer;\n private _camera: Camera;\n private _control: Control;\n private _renderer: Renderer;\n private _virtualManager: VirtualManager;\n\n // Options\n private _align: FlickingOptions[\"align\"];\n private _defaultIndex: FlickingOptions[\"defaultIndex\"];\n private _horizontal: FlickingOptions[\"horizontal\"];\n private _circular: FlickingOptions[\"circular\"];\n private _circularFallback: FlickingOptions[\"circularFallback\"];\n private _bound: FlickingOptions[\"bound\"];\n private _adaptive: FlickingOptions[\"adaptive\"];\n private _panelsPerView: FlickingOptions[\"panelsPerView\"];\n private _noPanelStyleOverride: FlickingOptions[\"noPanelStyleOverride\"];\n private _resizeOnContentsReady: FlickingOptions[\"resizeOnContentsReady\"];\n private _virtual: FlickingOptions[\"virtual\"];\n private _nested: FlickingOptions[\"nested\"];\n\n private _needPanelThreshold: FlickingOptions[\"needPanelThreshold\"];\n private _preventEventsBeforeInit: FlickingOptions[\"preventEventsBeforeInit\"];\n\n private _deceleration: FlickingOptions[\"deceleration\"];\n private _duration: FlickingOptions[\"duration\"];\n private _easing: FlickingOptions[\"easing\"];\n\n private _inputType: FlickingOptions[\"inputType\"];\n private _moveType: FlickingOptions[\"moveType\"];\n private _threshold: FlickingOptions[\"threshold\"];\n private _interruptable: FlickingOptions[\"interruptable\"];\n private _bounce: FlickingOptions[\"bounce\"];\n private _iOSEdgeSwipeThreshold: FlickingOptions[\"iOSEdgeSwipeThreshold\"];\n private _preventClickOnDrag: FlickingOptions[\"preventClickOnDrag\"];\n private _preventDefaultOnDrag: FlickingOptions[\"preventDefaultOnDrag\"];\n private _disableOnInit: FlickingOptions[\"disableOnInit\"];\n private _changeOnHold: FlickingOptions[\"changeOnHold\"];\n\n private _renderOnlyVisible: FlickingOptions[\"renderOnlyVisible\"];\n\n private _autoInit: FlickingOptions[\"autoInit\"];\n private _autoResize: FlickingOptions[\"autoResize\"];\n private _useResizeObserver: FlickingOptions[\"useResizeObserver\"];\n private _resizeDebounce: FlickingOptions[\"resizeDebounce\"];\n private _maxResizeDebounce: FlickingOptions[\"maxResizeDebounce\"];\n private _useFractionalSize: FlickingOptions[\"useFractionalSize\"];\n private _externalRenderer: FlickingOptions[\"externalRenderer\"];\n private _renderExternal: FlickingOptions[\"renderExternal\"];\n\n // Internal State\n private _initialized: boolean;\n private _plugins: Plugin[];\n\n // Components\n /**\n * {@link Control} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스\n * @type {Control}\n * @default SnapControl\n * @readonly\n * @see Control\n * @see SnapControl\n * @see FreeControl\n */\n public get control() { return this._control; }\n /**\n * {@link Camera} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스\n * @type {Camera}\n * @default LinearCamera\n * @readonly\n * @see Camera\n * @see LinearCamera\n * @see BoundCamera\n * @see CircularCamera\n */\n public get camera() { return this._camera; }\n /**\n * {@link Renderer} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스\n * @type {Renderer}\n * @default VanillaRenderer\n * @readonly\n * @see Renderer\n * @see VanillaRenderer\n * @see ExternalRenderer\n */\n public get renderer() { return this._renderer; }\n /**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n * @type {Viewport}\n * @readonly\n * @see Viewport\n */\n public get viewport() { return this._viewport; }\n // Internal States\n /**\n * Whether Flicking's {@link Flicking#init init()} is called.\n * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.\n * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.\n * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get initialized() { return this._initialized; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._camera.circularEnabled; }\n /**\n * Whether the `virtual` option is enabled.\n * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero.\n * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get virtualEnabled() { return this._panelsPerView > 0 && this._virtual != null; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get index() { return this._control.activeIndex; }\n /**\n * The root(`.flicking-viewport`) element\n * @ko root(`.flicking-viewport`) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._viewport.element; }\n /**\n * Currently active panel\n * @ko 현재 선택된 패널\n * @type {Panel}\n * @readonly\n * @see Panel\n */\n public get currentPanel() { return this._control.activePanel; }\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._renderer.panels; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._renderer.panelCount; }\n /**\n * Array of panels that is visible at the current position\n * @ko 현재 보이는 패널의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get visiblePanels() { return this._camera.visiblePanels; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._control.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._control.holding; }\n /**\n * A current list of activated plugins\n * @ko 현재 활성화된 플러그인 목록\n * @type {Plugin[]}\n * @readonly\n */\n public get activePlugins() { return this._plugins; }\n\n // Options Getter\n // UI / LAYOUT\n /**\n * Align position of the panels within viewport. You can set different values each for the panel and camera\n * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다\n * @type {ALIGN | string | number | { panel: string | number, camera: string | number }}\n * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값\n * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값\n * @default \"center\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // Literal strings\n * \"prev\", \"center\", \"next\",\n * // % values, applied to both panel & camera\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000,\n * // Setting a different value for panel & camera\n * { panel: \"10%\", camera: \"25%\" }\n * ];\n *\n * possibleOptions.forEach(align => {\n * new Flicking(\"#el\", { align });\n * });\n * ```\n */\n public get align() { return this._align; }\n /**\n * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer\n * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}\n */\n public get defaultIndex() { return this._defaultIndex; }\n /**\n * Direction of panel movement (true: horizontal, false: vertical)\n * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향)\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )}\n */\n public get horizontal() { return this._horizontal; }\n /**\n * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling.\n * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )}\n */\n public get circular() { return this._circular; }\n /**\n * Set panel control mode for the case when circular cannot be enabled.\n * \"linear\" will set the view's range from the top of the first panel to the top of the last panel.\n * \"bound\" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel.\n * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다.\n * \"linear\" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다.\n * \"bound\" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다.\n * @see CIRCULAR_FALLBACK\n * @type {string}\n * @default \"linear\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )}\n */\n public get circularFallback() { return this._circularFallback; }\n /**\n * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel\n * Only can be enabled when `circular=false`\n * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다\n * `circular=false`인 경우에만 사용할 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )}\n */\n public get bound() { return this._bound; }\n /**\n * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true`\n * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )}\n */\n public get adaptive() { return this._adaptive; }\n /**\n * A visible number of panels on viewport. Enabling this option will automatically resize panel size\n * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다\n * @type {number}\n * @default -1\n * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )}\n */\n public get panelsPerView() { return this._panelsPerView; }\n /**\n * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled.\n * This behavior can be useful in terms of performance when you're manually managing all panel sizes\n * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다.\n * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다\n * @type {boolean}\n * @default false\n */\n public get noPanelStyleOverride() { return this._noPanelStyleOverride; }\n /**\n * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded.\n * This can be useful when you have contents inside Flicking that changes its size when it's loaded\n * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다.\n * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )}\n */\n public get resizeOnContentsReady() { return this._resizeOnContentsReady; }\n /**\n * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.\n * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.\n * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.\n * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )}\n */\n public get nested() { return this._nested; }\n // EVENTS\n /**\n * A Threshold from viewport edge before triggering `needPanel` event\n * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )}\n */\n public get needPanelThreshold() { return this._needPanelThreshold; }\n /**\n * When enabled, events are not triggered before `ready` when initializing\n * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )}\n */\n public get preventEventsBeforeInit() { return this._preventEventsBeforeInit; }\n // ANIMATION\n /**\n * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time\n * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다\n * @type {number}\n * @default 0.0075\n * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )}\n */\n public get deceleration() { return this._deceleration; }\n /**\n * An easing function applied to the panel movement animation. Default value is `easeOutCubic`\n * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다\n * @type {function}\n * @default x => 1 - Math.pow(1 - x, 3)\n * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/}\n * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )}\n */\n public get easing() { return this._easing; }\n /**\n * Default duration of the animation (ms)\n * @ko 디폴트 애니메이션 재생 시간 (ms)\n * @type {number}\n * @default 500\n * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )}\n */\n public get duration() { return this._duration; }\n // INPUT\n /**\n * Types of input devices to enable\n * @ko 활성화할 입력 장치 종류\n * @type {string[]}\n * @default [\"touch\", \"mouse\"]\n * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)}\n * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)}\n * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )}\n */\n public get inputType() { return this._inputType; }\n /**\n * Movement style by user input. This will change instance type of {@link Flicking#control}\n * You can use the values of the constant {@link MOVE_TYPE}\n * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다\n * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다\n * @type {MOVE_TYPE | Pair}\n * @default \"snap\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )}\n * @example\n * |moveType|control|options|\n * |:---:|:---:|:---:|\n * |\"snap\"|{@link SnapControl}||\n * |\"freeScroll\"|{@link FreeControl}|{@link FreeControlOptions}|\n *\n * ```ts\n * import Flicking, { MOVE_TYPE } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking({\n * moveType: MOVE_TYPE.SNAP\n * });\n * ```\n *\n * ```ts\n * const flicking = new Flicking({\n * // If you want more specific settings for the moveType\n * // [moveType, options for that moveType]\n * // In this case, it's [\"freeScroll\", FreeControlOptions]\n * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }]\n * });\n * ```\n */\n public get moveType() { return this._moveType; }\n /**\n * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.\n * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.\n * @type {number}\n * @default 40\n * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}\n */\n public get threshold() { return this._threshold; }\n /**\n * Set animation to be interruptable by click/touch.\n * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )}\n */\n public get interruptable() { return this._interruptable; }\n /**\n * The size value of the bounce area. Only can be enabled when `circular=false`.\n * You can set different bounce value for prev/next direction by using array.\n * `number` for px value, and `string` for px, and % value relative to viewport size.\n * You have to call {@link Control#updateInput} after changing this to take effect.\n * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다.\n * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다.\n * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다.\n * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다.\n * @type {string | number | Array}\n * @default \"20%\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // % values, relative to viewport element(\".flicking-viewport\")'s size\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000\n * ];\n * ```\n *\n * @example\n * ```ts\n * const flicking = new Flicking(\"#el\", { bounce: \"20%\" });\n *\n * flicking.bounce = \"100%\";\n * flicking.control.updateInput(); // Call this to update!\n * ```\n */\n public get bounce() { return this._bounce; }\n /**\n * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward\n * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px)\n * @type {number}\n * @default 30\n * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )}\n */\n public get iOSEdgeSwipeThreshold() { return this._iOSEdgeSwipeThreshold; }\n /**\n * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element\n * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )}\n */\n public get preventClickOnDrag() { return this._preventClickOnDrag; }\n /**\n * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging\n * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )}\n */\n public get preventDefaultOnDrag() { return this._preventDefaultOnDrag; }\n /**\n * Automatically call {@link Flicking#disableInput disableInput()} on initialization\n * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )}\n */\n public get disableOnInit() { return this._disableOnInit; }\n /**\n * Change active panel index on mouse/touch hold while animating.\n * `index` of the `willChange`/`willRestore` event will be used as new index.\n * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.\n * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}\n */\n public get changeOnHold() { return this._changeOnHold; }\n // PERFORMANCE\n /**\n * Whether to render visible panels only. This can dramatically increase performance when there're many panels\n * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )}\n */\n public get renderOnlyVisible() { return this._renderOnlyVisible; }\n /**\n * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1`\n * Must be used with `panelsPerview`.\n * After Flicking's initialized, this property can be used to add/remove the panel count.\n * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다.\n * `panelsPerView` 옵션과 함께 사용되어야만 합니다.\n * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다.\n * @type {VirtualManager}\n * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수\n * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @property {string} [panelClass=\"flicking-panel\"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )}\n * @example\n * ```ts\n * import Flicking, { VirtualPanel } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking(\"#some_el\", {\n * panelsPerView: 3,\n * virtual: {\n * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`,\n * initialPanelCount: 100\n * }\n * });\n *\n * // Add 100 virtual panels (at the end)\n * flicking.virtual.append(100);\n *\n * // Remove 100 virtual panels from 0 to 100\n * flicking.virtual.remove(0, 100);\n * ```\n */\n public get virtual() { return this._virtualManager; }\n\n // OTHERS\n /**\n * Call {@link Flicking#init init()} automatically when creating Flicking's instance\n * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )}\n * @readonly\n */\n public get autoInit() { return this._autoInit; }\n /**\n * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed\n * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n */\n public get autoResize() { return this._autoResize; }\n /**\n * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option\n * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )}\n */\n public get useResizeObserver() { return this._useResizeObserver; }\n /**\n * Delays size recalculation from `autoResize` by the given time in milisecond.\n * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again.\n * This can increase performance by preventing `resize` being called too often.\n * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다.\n * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다.\n * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다.\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )}\n */\n public get resizeDebounce() { return this._resizeDebounce; }\n /**\n * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond.\n * This guarantees that size recalculation is performed at least once every (n)ms.\n * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms)\n * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다.\n * @type {number}\n * @default 100\n * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )}\n */\n public get maxResizeDebounce() { return this._maxResizeDebounce; }\n /**\n * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle.\n * This can prevent 1px offset issue in some cases where panel size has the fractional part.\n * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element.\n * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다.\n * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다.\n * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )}\n */\n public get useFractionalSize() { return this._useFractionalSize; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n */\n public get externalRenderer() { return this._externalRenderer; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n * @deprecated\n */\n public get renderExternal() { return this._renderExternal; }\n\n // Options Setter\n // UI / LAYOUT\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n this._renderer.align = val;\n this._camera.align = val;\n void this.resize();\n }\n\n public set defaultIndex(val: FlickingOptions[\"defaultIndex\"]) { this._defaultIndex = val; }\n public set horizontal(val: FlickingOptions[\"horizontal\"]) {\n this._horizontal = val;\n this._control.controller.updateDirection();\n void this.resize();\n }\n\n public set circular(val: FlickingOptions[\"circular\"]) {\n this._circular = val;\n void this.resize();\n }\n\n public set bound(val: FlickingOptions[\"bound\"]) {\n this._bound = val;\n void this.resize();\n }\n\n public set adaptive(val: FlickingOptions[\"adaptive\"]) {\n this._adaptive = val;\n void this.resize();\n }\n\n public set panelsPerView(val: FlickingOptions[\"panelsPerView\"]) {\n this._panelsPerView = val;\n void this.resize();\n }\n\n public set noPanelStyleOverride(val: FlickingOptions[\"noPanelStyleOverride\"]) {\n this._noPanelStyleOverride = val;\n void this.resize();\n }\n\n public set resizeOnContentsReady(val: FlickingOptions[\"resizeOnContentsReady\"]) {\n this._resizeOnContentsReady = val;\n if (val) {\n this._renderer.checkPanelContentsReady(this._renderer.panels);\n }\n }\n\n public set nested(val: FlickingOptions[\"nested\"]) {\n this._nested = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.nested = val;\n }\n }\n\n // EVENTS\n public set needPanelThreshold(val: FlickingOptions[\"needPanelThreshold\"]) { this._needPanelThreshold = val; }\n public set preventEventsBeforeInit(val: FlickingOptions[\"preventEventsBeforeInit\"]) { this._preventEventsBeforeInit = val; }\n // ANIMATION\n public set deceleration(val: FlickingOptions[\"deceleration\"]) {\n this._deceleration = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.deceleration = val;\n }\n }\n\n public set easing(val: FlickingOptions[\"easing\"]) {\n this._easing = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.easing = val;\n }\n }\n\n public set duration(val: FlickingOptions[\"duration\"]) { this._duration = val; }\n // INPUT\n public set inputType(val: FlickingOptions[\"inputType\"]) {\n this._inputType = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.inputType = val;\n }\n }\n\n public set moveType(val: FlickingOptions[\"moveType\"]) {\n this._moveType = val;\n\n const prevControl = this._control;\n const newControl = this._createControl();\n const activePanel = prevControl.activePanel;\n newControl.copy(prevControl);\n\n const prevProgressInPanel = activePanel\n ? this._camera.getProgressInPanel(activePanel)\n : 0;\n\n this._control = newControl;\n this._control.updatePosition(prevProgressInPanel);\n this._control.updateInput();\n }\n\n public set threshold(val: FlickingOptions[\"threshold\"]) { this._threshold = val; }\n public set interruptable(val: FlickingOptions[\"interruptable\"]) {\n this._interruptable = val;\n\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.interruptable = val;\n }\n }\n\n public set bounce(val: FlickingOptions[\"bounce\"]) {\n this._bounce = val;\n this._control.updateInput();\n }\n\n public set iOSEdgeSwipeThreshold(val: FlickingOptions[\"iOSEdgeSwipeThreshold\"]) {\n this._iOSEdgeSwipeThreshold = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.iOSEdgeSwipeThreshold = val;\n }\n }\n\n public set preventClickOnDrag(val: FlickingOptions[\"preventClickOnDrag\"]) {\n const prevVal = this._preventClickOnDrag;\n\n if (val === prevVal) return;\n\n const controller = this._control.controller;\n\n if (val) {\n controller.addPreventClickHandler();\n } else {\n controller.removePreventClickHandler();\n }\n\n this._preventClickOnDrag = val;\n }\n\n public set preventDefaultOnDrag(val: FlickingOptions[\"preventDefaultOnDrag\"]) {\n this._preventDefaultOnDrag = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.preventDefaultOnDrag = val;\n }\n }\n\n public set disableOnInit(val: FlickingOptions[\"disableOnInit\"]) { this._disableOnInit = val; }\n public set changeOnHold(val: FlickingOptions[\"changeOnHold\"]) { this._changeOnHold = val; }\n // PERFORMANCE\n public set renderOnlyVisible(val: FlickingOptions[\"renderOnlyVisible\"]) {\n this._renderOnlyVisible = val;\n void this._renderer.render();\n }\n\n // OTHERS\n public set autoResize(val: FlickingOptions[\"autoResize\"]) {\n this._autoResize = val;\n\n if (val) {\n this._autoResizer.enable();\n } else {\n this._autoResizer.disable();\n }\n }\n\n public set useResizeObserver(val: FlickingOptions[\"useResizeObserver\"]) {\n this._useResizeObserver = val;\n\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n }\n\n /**\n * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string\n * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다.\n * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist|\n * \n *\n * |code|조건|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우|\n *\n * \n * @example\n * ```ts\n * import Flicking from \"@egjs/flicking\";\n *\n * // Creating new instance of Flicking with HTMLElement\n * const flicking = new Flicking(document.querySelector(\".flicking-viewport\"), { circular: true });\n *\n * // Creating new instance of Flicking with CSS selector\n * const flicking2 = new Flicking(\".flicking-viewport\", { circular: true });\n * ```\n */\n public constructor(root: HTMLElement | string, {\n align = ALIGN.CENTER,\n defaultIndex = 0,\n horizontal = true,\n circular = false,\n circularFallback = CIRCULAR_FALLBACK.LINEAR,\n bound = false,\n adaptive = false,\n panelsPerView = -1,\n noPanelStyleOverride = false,\n resizeOnContentsReady = false,\n nested = false,\n needPanelThreshold = 0,\n preventEventsBeforeInit = true,\n deceleration = 0.0075,\n duration = 500,\n easing = x => 1 - Math.pow(1 - x, 3),\n inputType = [\"mouse\", \"touch\"],\n moveType = \"snap\",\n threshold = 40,\n interruptable = true,\n bounce = \"20%\",\n iOSEdgeSwipeThreshold = 30,\n preventClickOnDrag = true,\n preventDefaultOnDrag = false,\n disableOnInit = false,\n changeOnHold = false,\n renderOnlyVisible = false,\n virtual = null,\n autoInit = true,\n autoResize = true,\n useResizeObserver = true,\n resizeDebounce = 0,\n maxResizeDebounce = 100,\n useFractionalSize = false,\n externalRenderer = null,\n renderExternal = null\n }: Partial = {}) {\n super();\n\n // Internal states\n this._initialized = false;\n this._plugins = [];\n\n // Bind options\n this._align = align;\n this._defaultIndex = defaultIndex;\n this._horizontal = horizontal;\n this._circular = circular;\n this._circularFallback = circularFallback;\n this._bound = bound;\n this._adaptive = adaptive;\n this._panelsPerView = panelsPerView;\n this._noPanelStyleOverride = noPanelStyleOverride;\n this._resizeOnContentsReady = resizeOnContentsReady;\n this._nested = nested;\n this._virtual = virtual;\n this._needPanelThreshold = needPanelThreshold;\n this._preventEventsBeforeInit = preventEventsBeforeInit;\n this._deceleration = deceleration;\n this._duration = duration;\n this._easing = easing;\n this._inputType = inputType;\n this._moveType = moveType;\n this._threshold = threshold;\n this._interruptable = interruptable;\n this._bounce = bounce;\n this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;\n this._preventClickOnDrag = preventClickOnDrag;\n this._preventDefaultOnDrag = preventDefaultOnDrag;\n this._disableOnInit = disableOnInit;\n this._changeOnHold = changeOnHold;\n this._renderOnlyVisible = renderOnlyVisible;\n this._autoInit = autoInit;\n this._autoResize = autoResize;\n this._useResizeObserver = useResizeObserver;\n this._resizeDebounce = resizeDebounce;\n this._maxResizeDebounce = maxResizeDebounce;\n this._useFractionalSize = useFractionalSize;\n this._externalRenderer = externalRenderer;\n this._renderExternal = renderExternal;\n\n // Create core components\n this._viewport = new Viewport(this, getElement(root));\n this._autoResizer = new AutoResizer(this);\n this._renderer = this._createRenderer();\n this._camera = this._createCamera();\n this._control = this._createControl();\n this._virtualManager = new VirtualManager(this, virtual);\n\n if (this._autoInit) {\n void this.init();\n }\n }\n\n /**\n * Initialize Flicking and move to the default index\n * This is automatically called on Flicking's constructor when `autoInit` is true(default)\n * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다\n * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다\n * @fires Flicking#ready\n * @return {Promise}\n */\n public init(): Promise {\n if (this._initialized) return Promise.resolve();\n\n const camera = this._camera;\n const renderer = this._renderer;\n const control = this._control;\n const virtualManager = this._virtualManager;\n const originalTrigger = this.trigger;\n const preventEventsBeforeInit = this._preventEventsBeforeInit;\n\n camera.init();\n virtualManager.init();\n renderer.init(this);\n control.init(this);\n\n if (preventEventsBeforeInit) {\n this.trigger = () => this;\n }\n\n this._initialResize();\n\n // Look at initial panel\n this._moveToInitialPanel();\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n if (this._preventClickOnDrag) {\n control.controller.addPreventClickHandler();\n }\n if (this._disableOnInit) {\n this.disableInput();\n }\n renderer.checkPanelContentsReady(renderer.panels);\n this._initialized = true;\n\n return renderer.render().then(() => {\n // Done initializing & emit ready event\n this._plugins.forEach(plugin => plugin.init(this));\n\n if (preventEventsBeforeInit) {\n this.trigger = originalTrigger;\n }\n this.trigger(new ComponentEvent(EVENTS.READY));\n });\n }\n\n /**\n * Destroy Flicking and remove all event handlers\n * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다\n * @return {void}\n */\n public destroy(): void {\n this.off();\n\n this._autoResizer.disable();\n this._control.destroy();\n this._camera.destroy();\n this._renderer.destroy();\n\n this._plugins.forEach(plugin => plugin.destroy());\n\n this._initialized = false;\n }\n\n /**\n * Move to the previous panel (current index - 1)\n * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n * \n * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise\n */\n public prev(duration: number = this._duration): Promise {\n return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, duration, DIRECTION.PREV);\n }\n\n /**\n * Move to the next panel (current index + 1)\n * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise\n */\n public next(duration: number = this._duration) {\n return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, duration, DIRECTION.NEXT);\n }\n\n /**\n * Move to the panel with given index\n * @ko 주어진 인덱스에 해당하는 패널로 이동합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public moveTo(index: number, duration: number = this._duration, direction: ValueOf = DIRECTION.NONE) {\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE));\n }\n\n if (this._control.animating) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.ANIMATION_ALREADY_PLAYING, ERROR.CODE.ANIMATION_ALREADY_PLAYING));\n }\n\n if (this._control.holding) {\n this._control.controller.release();\n }\n\n return this._control.moveToPanel(panel, {\n duration,\n direction\n });\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우\n * @return {void}\n */\n public updateAnimation(index: number, duration?: number, direction?: ValueOf): void {\n if (!this._control.animating) {\n return;\n }\n\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n throw new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE);\n }\n\n this._control.updateAnimation(panel, duration, direction);\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @fires Flicking#moveEnd\n * @return {void}\n */\n public stopAnimation(): void {\n if (!this._control.animating) {\n return;\n }\n\n this._control.stopAnimation();\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n * @example\n * ```ts\n * const panel = flicking.getPanel(0);\n * // Which is a shorthand to...\n * const samePanel = flicking.panels[0];\n * ```\n */\n public getPanel(index: number): Panel | null {\n return this._renderer.getPanel(index);\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @return {this}\n */\n public enableInput(): this {\n this._control.enable();\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @return {this}\n */\n public disableInput(): this {\n this._control.disable();\n return this;\n }\n\n /**\n * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()}\n * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다\n * @param {object} options Status retrieving optionsStatus 반환 옵션\n * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다\n * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다\n * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다\n * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true\n * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다.\n * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체.\n */\n public getStatus({\n index = true,\n position = true,\n includePanelHTML = false,\n visiblePanelsOnly = false\n }: Partial<{\n index: boolean;\n position: boolean;\n includePanelHTML: boolean;\n visiblePanelsOnly: boolean;\n }> = {}): Status {\n const camera = this._camera;\n const panels = visiblePanelsOnly ? this.visiblePanels : this.panels;\n\n const status: Status = {\n panels: panels.map(panel => {\n const panelInfo: Status[\"panels\"][0] = { index: panel.index };\n\n if (includePanelHTML) {\n panelInfo.html = panel.element.outerHTML;\n }\n\n return panelInfo;\n })\n };\n\n if (index) {\n status.index = this.index;\n }\n if (position) {\n const nearestAnchor = camera.findNearestAnchor(camera.position);\n\n if (nearestAnchor) {\n status.position = {\n panel: nearestAnchor.panel.index,\n progressInPanel: camera.getProgressInPanel(nearestAnchor.panel)\n };\n }\n\n }\n\n if (visiblePanelsOnly) {\n const visiblePanels = this.visiblePanels;\n\n status.visibleOffset = visiblePanels[0]?.index ?? 0;\n }\n\n return status;\n }\n\n /**\n * Restore to the state of the given {@link Status}\n * @ko 주어진 {@link Status}의 상태로 복원합니다\n * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다\n * @return {void}\n */\n public setStatus(status: Status): void {\n if (!this._initialized) {\n throw new FlickingError(ERROR.MESSAGE.NOT_INITIALIZED, ERROR.CODE.NOT_INITIALIZED);\n }\n\n const {\n index,\n position,\n visibleOffset,\n panels\n } = status;\n\n const renderer = this._renderer;\n const control = this._control;\n\n // Can't add/remove panels on external rendering\n if (panels[0]?.html && !this._renderExternal) {\n renderer.batchRemove({ index: 0, deleteCount: this.panels.length, hasDOMInElements: true });\n renderer.batchInsert({ index: 0, elements: parseElement(panels.map(panel => panel.html!)), hasDOMInElements: true });\n }\n\n if (index != null) {\n const panelIndex = visibleOffset\n ? index - visibleOffset\n : index;\n\n void this.moveTo(panelIndex, 0).catch(() => void 0);\n }\n\n if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) {\n const { panel, progressInPanel } = position;\n const panelIndex = visibleOffset\n ? panel - visibleOffset\n : panel;\n const panelRange = renderer.panels[panelIndex].range;\n const newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n void control.moveToPosition(newCameraPos, 0).catch(() => void 0);\n }\n }\n\n /**\n * Add plugins that can have different effects on Flicking\n * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다\n * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들)\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public addPlugins(...plugins: Plugin[]) {\n if (this._initialized) {\n plugins.forEach(item => item.init(this));\n }\n\n this._plugins.push(...plugins);\n\n return this;\n }\n\n /**\n * Remove plugins from Flicking.\n * @ko 플리킹으로부터 플러그인들을 제거합니다.\n * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들).\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public removePlugins(...plugins: Plugin[]) {\n plugins.forEach(item => {\n const foundIndex = findIndex(this._plugins, val => val === item);\n\n if (foundIndex >= 0) {\n item.destroy();\n this._plugins.splice(foundIndex, 1);\n }\n });\n\n return this;\n }\n\n /**\n * Update viewport/panel sizes\n * @ko 패널 및 뷰포트의 크기를 갱신합니다\n * @method\n * @fires Flicking#beforeResize\n * @fires Flicking#afterResize\n * @return {this}\n */\n public async resize(): Promise {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n const activePanel = control.activePanel;\n const prevWidth = viewport.width;\n const prevHeight = viewport.height;\n const prevProgressInPanel = activePanel\n ? camera.getProgressInPanel(activePanel)\n : 0;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: prevWidth,\n height: prevHeight,\n element: viewport.element\n }));\n\n viewport.resize();\n await renderer.forceRenderAllPanels(); // Render all panel elements, to update sizes\n if (!this._initialized) {\n return;\n }\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateAdaptiveHeight();\n camera.updatePanelOrder();\n camera.updateOffset();\n await renderer.render();\n if (!this._initialized) {\n return;\n }\n\n if (control.animating) {\n // TODO:\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: prevWidth,\n height: prevHeight\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n\n /**\n * Add new panels after the last panel\n * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of appended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new Flicking(\"#flick\");\n * // These are possible parameters\n * flicking.append(document.createElement(\"div\"));\n * flicking.append(\"\\Panel\\\");\n * flicking.append([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.append(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public append(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(this._renderer.panelCount, element);\n }\n\n /**\n * Add new panels before the first panel\n * This will increase index of panels after by the number of panels added\n * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다\n * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다.\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.prepend(document.createElement(\"div\"));\n * flicking.prepend(\"\\Panel\\\");\n * flicking.prepend([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.prepend(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public prepend(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(0, element);\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.insert(0, document.createElement(\"div\"));\n * flicking.insert(2, \"\\Panel\\\");\n * flicking.insert(1, [\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.insert(3, \"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public insert(index: number, element: ElementLike | ElementLike[]): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchInsert({ index, elements: parseElement(element), hasDOMInElements: true });\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {number} index Index of panel to remove제거할 패널의 인덱스\n * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @return {Panel[]} An array of removed panels제거된 패널들의 배열\n */\n public remove(index: number, deleteCount: number = 1): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchRemove({ index, deleteCount, hasDOMInElements: true });\n }\n\n private _createControl(): Control {\n const moveType = this._moveType;\n const moveTypes = Object.keys(MOVE_TYPE).map(key => MOVE_TYPE[key] as ValueOf);\n\n const moveTypeStr = Array.isArray(moveType)\n ? moveType[0]\n : moveType;\n\n const moveTypeOptions = Array.isArray(moveType)\n ? moveType[1] ?? {}\n : {};\n\n if (!includes(moveTypes, moveTypeStr)) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"moveType\", JSON.stringify(moveType)), ERROR.CODE.WRONG_OPTION);\n }\n\n switch (moveTypeStr) {\n case MOVE_TYPE.SNAP:\n return new SnapControl(moveTypeOptions as SnapControlOptions);\n case MOVE_TYPE.FREE_SCROLL:\n return new FreeControl(moveTypeOptions as FreeControlOptions);\n case MOVE_TYPE.STRICT:\n return new StrictControl(moveTypeOptions as StrictControlOptions);\n }\n }\n\n private _createCamera(): Camera {\n if (this._circular && this._bound) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"circular\\\" and \\\"bound\\\" option cannot be used together, ignoring bound.\");\n }\n\n return new Camera(this, {\n align: this._align\n });\n }\n\n private _createRenderer(): Renderer {\n const externalRenderer = this._externalRenderer;\n if (this._virtual && this._panelsPerView <= 0) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"virtual\\\" and \\\"panelsPerView\\\" option should be used together, ignoring virtual.\");\n }\n\n return externalRenderer\n ? externalRenderer\n : this._renderExternal\n ? this._createExternalRenderer()\n : this._createVanillaRenderer();\n }\n\n private _createExternalRenderer(): ExternalRenderer {\n const {\n renderer,\n rendererOptions\n } = this._renderExternal!;\n\n return new (renderer)({ align: this._align, ...rendererOptions });\n }\n\n private _createVanillaRenderer(): VanillaRenderer {\n const virtual = this.virtualEnabled;\n\n return new VanillaRenderer({\n align: this._align,\n strategy: virtual\n ? new VirtualRenderingStrategy()\n : new NormalRenderingStrategy({\n providerCtor: VanillaElementProvider\n })\n });\n }\n\n private _moveToInitialPanel(): void {\n const renderer = this._renderer;\n const control = this._control;\n const camera = this._camera;\n const defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);\n\n if (!defaultPanel) return;\n\n const nearestAnchor = camera.findNearestAnchor(defaultPanel.position);\n const initialPanel = (nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index) ? nearestAnchor.panel : defaultPanel;\n control.setActive(initialPanel, null, false);\n\n if (!nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n let position = initialPanel.position;\n\n if (!camera.canReach(initialPanel)) {\n position = nearestAnchor.position;\n }\n\n camera.lookAt(position);\n control.updateInput();\n camera.updateOffset();\n }\n\n private _initialResize() {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: 0,\n height: 0,\n element: viewport.element\n }));\n\n viewport.resize();\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateOffset();\n control.updateInput();\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== 0 || newHeight !== 0;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: 0,\n height: 0\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n}\n\nexport default Flicking;\n","import Component from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\n\n/**\n * Decorator that makes the method of flicking available in the framework.\n * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.\n * @memberof eg.Flicking\n * @private\n * @example\n * ```js\n * import Flicking, { withFlickingMethods } from \"@egjs/flicking\";\n *\n * class Flicking extends React.Component> {\n * @withFlickingMethods\n * private flicking: Flicking;\n * }\n * ```\n */\nconst withFlickingMethods = (prototype: any, flickingName: string) => {\n [Component.prototype, Flicking.prototype].forEach(proto => {\n Object.getOwnPropertyNames(proto).filter(name => !prototype[name] && name.indexOf(\"_\") !== 0 && name !== \"constructor\")\n .forEach((name: string) => {\n const descriptor = Object.getOwnPropertyDescriptor(proto, name)!;\n\n if (descriptor.value) {\n // Public Function\n Object.defineProperty(prototype, name, {\n value: function(...args) {\n return descriptor.value.call(this[flickingName], ...args);\n }\n });\n } else {\n const getterDescriptor: { get?: () => any; set?: (val: any) => void } = {};\n if (descriptor.get) {\n getterDescriptor.get = function() {\n const flicking = this[flickingName];\n return flicking && descriptor.get?.call(flicking);\n };\n }\n if (descriptor.set) {\n getterDescriptor.set = function(...args) {\n return descriptor.set?.call(this[flickingName], ...args);\n };\n }\n\n Object.defineProperty(prototype, name, getterDescriptor);\n }\n });\n });\n};\n\nexport default withFlickingMethods;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\nimport Renderer from \"../renderer/Renderer\";\nimport Panel from \"../core/panel/Panel\";\n\nexport default (flicking: Flicking, diffResult: DiffResult, rendered: any[]) => {\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n const prevList = [...diffResult.prevList];\n\n const added: Panel[] = [];\n const removed: Panel[] = [];\n\n if (diffResult.removed.length > 0) {\n let endIdx = -1;\n let prevIdx = -1;\n\n diffResult.removed.forEach(removedIdx => {\n if (endIdx < 0) {\n endIdx = removedIdx;\n }\n\n if (prevIdx >= 0 && removedIdx !== prevIdx - 1) {\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n\n endIdx = removedIdx;\n prevIdx = removedIdx;\n } else {\n prevIdx = removedIdx;\n }\n\n prevList.splice(removedIdx, 1);\n });\n\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n }\n\n diffResult.ordered.forEach(([from, to]) => {\n const prevPanel = panels.splice(from, 1)[0];\n panels.splice(to, 0, prevPanel);\n });\n\n if (diffResult.ordered.length > 0) {\n panels.forEach((panel, idx) => {\n const indexDiff = idx - panel.index;\n\n if (indexDiff > 0) {\n panel.increaseIndex(indexDiff);\n } else {\n panel.decreaseIndex(-indexDiff);\n }\n });\n\n panels.sort((panel1, panel2) => panel1.index - panel2.index);\n\n panels.forEach(panel => {\n panel.updatePosition();\n });\n }\n\n if (diffResult.added.length > 0) {\n let startIdx = -1;\n let prevIdx = -1;\n\n const addedElements = rendered.slice(prevList.length);\n\n diffResult.added.forEach((addedIdx, idx) => {\n if (startIdx < 0) {\n startIdx = idx;\n }\n\n if (prevIdx >= 0 && addedIdx !== prevIdx + 1) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx, idx + 1));\n\n startIdx = -1;\n prevIdx = -1;\n } else {\n prevIdx = addedIdx;\n }\n });\n\n if (startIdx >= 0) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx));\n }\n }\n\n if (diffResult.added.length > 0 || diffResult.removed.length > 0) {\n renderer.updateAfterPanelChange(added, removed);\n }\n};\n\nconst batchInsert = (renderer: Renderer, diffResult: DiffResult, addedElements: any[], startIdx: number, endIdx?: number) => {\n return renderer.batchInsertDefer(\n ...diffResult.added.slice(startIdx, endIdx).map((index, elIdx) => ({ index, elements: [addedElements[elIdx]], hasDOMInElements: false }))\n );\n};\n\nconst batchRemove = (renderer: Renderer, startIdx: number, endIdx?: number) => {\n const removed = renderer.panels.slice(startIdx, endIdx);\n\n return renderer.batchRemoveDefer({ index: startIdx, deleteCount: removed.length, hasDOMInElements: false });\n};\n\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\n\nexport default (flicking: Flicking, diffResult: DiffResult) => {\n const removedPanels = diffResult.removed.reduce((map, idx) => {\n map[idx] = true;\n return map;\n }, {});\n\n const maintainedMap = diffResult.maintained.reduce((map, [prev, current]) => {\n map[prev] = current;\n return map;\n }, {});\n\n return [\n ...flicking.panels\n .filter(panel => !removedPanels[panel.index])\n // Sort panels by position\n .sort((panel1, panel2) => (panel1.position + panel1.offset) - (panel2.position + panel2.offset))\n .map(panel => diffResult.list[maintainedMap[panel.index]]),\n ...diffResult.added.map(idx => diffResult.list[idx])\n ];\n};\n\n","import { FlickingOptions } from \"../Flicking\";\nimport { ALIGN } from \"../const/external\";\nimport { parseArithmeticExpression } from \"../utils\";\n\nexport default (align: FlickingOptions[\"align\"] = ALIGN.CENTER, horizontal: boolean = true, firstPanelSize?: string) => {\n const cameraAlign = getCameraAlign(align);\n const panelAlign = getPanelAlign(align);\n\n if (panelAlign == null) return \"\";\n\n const camPosition = `calc(${cameraAlign} - (${firstPanelSize || \"0px\"} * ${panelAlign.percentage}) - ${panelAlign.absolute}px)`;\n\n return horizontal\n ? `translate(${camPosition})`\n : `translate(0, ${camPosition})`;\n};\n\nconst getCameraAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n return parseAlign(alignVal);\n};\n\nconst getPanelAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\n return parseArithmeticExpression(parseAlign(alignVal));\n};\n\nconst parseAlign = (alignVal: number | string) => {\n if (typeof alignVal === \"number\") {\n return `${alignVal}px`;\n }\n\n switch (alignVal) {\n case ALIGN.CENTER:\n return \"50%\";\n case ALIGN.NEXT:\n return \"100%\";\n case ALIGN.PREV:\n return \"0%\";\n default:\n return alignVal;\n }\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"./Flicking\";\nimport type { FlickingOptions, FlickingEvents } from \"./Flicking\";\n\nexport * from \"./core\";\nexport * from \"./camera\";\nexport * from \"./control\";\nexport * from \"./renderer\";\nexport * from \"./const/external\";\nexport * from \"./cfc\";\nexport * from \"./utils\";\n\nexport * from \"./type/event\";\nexport * from \"./type/external\";\nexport type { FlickingOptions, FlickingEvents };\n\nexport default Flicking;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking, * as modules from \"./index\";\n\nfor (const name in modules) {\n (Flicking as any)[name] = (modules as any)[name];\n}\n\ndeclare const module: any;\nmodule.exports = Flicking;\nexport default Flicking;\nexport * from \"./index\";\n"],"names":["CODE","WRONG_TYPE","ELEMENT_NOT_FOUND","VAL_MUST_NOT_NULL","NOT_ATTACHED_TO_FLICKING","WRONG_OPTION","INDEX_OUT_OF_RANGE","POSITION_NOT_REACHABLE","TRANSFORM_NOT_SUPPORTED","STOP_CALLED_BY_USER","ANIMATION_INTERRUPTED","ANIMATION_ALREADY_PLAYING","NOT_ALLOWED_IN_FRAMEWORK","NOT_INITIALIZED","NO_ACTIVE","NOT_ALLOWED_IN_VIRTUAL","MESSAGE","wrongVal","correctTypes","map","type","join","selector","val","name","optionName","min","max","position","EVENTS","READY","BEFORE_RESIZE","AFTER_RESIZE","HOLD_START","HOLD_END","MOVE_START","MOVE","MOVE_END","WILL_CHANGE","CHANGED","WILL_RESTORE","RESTORED","SELECT","NEED_PANEL","VISIBLE_CHANGE","REACH_EDGE","PANEL_CHANGE","ALIGN","PREV","CENTER","NEXT","DIRECTION","NONE","MOVE_TYPE","SNAP","FREE_SCROLL","STRICT","CLASS","VERTICAL","HIDDEN","DEFAULT_VIRTUAL","CIRCULAR_FALLBACK","LINEAR","BOUND","ORDER","LTR","RTL","merge","target","sources","_i","arguments","length","forEach","source","Object","keys","key","getElement","el","parent","targetEl","isString","parentEl","document","queryResult","querySelector","FlickingError","ERROR","nodeType","Node","ELEMENT_NODE","checkExistence","value","nameOnErrMsg","clamp","x","Math","getFlickingAttached","toArray","iterable","slice","call","parseAlign","align","size","alignPoint","parseArithmeticSize","parseBounce","bounce","parsedBounce","Array","isArray","parsedVal","cssValue","base","parsed","parseArithmeticExpression","percentage","absolute","cssRegex","idx","matchResult","exec","sign","unit","parsedValue","parseFloat","signMultiplier","parseCSSSizeValue","parsePanelAlign","panel","getDirection","start","end","parseElement","element","elements","tempDiv","createElement","innerHTML","push","apply","__spread","children","firstChild","removeChild","getMinusCompensatedIndex","includes","array","array_1","__values","array_1_1","done","next","circulatePosition","pos","offset","find","checker","array_2","array_2_1","findRight","findIndex","getProgress","prev","getStyle","window","getComputedStyle","currentStyle","setSize","_a","width","height","style","isBetween","circulateIndex","index","range","arr","i","getElementSize","horizontal","useFractionalSize","useOffset","baseSize","isBorderBoxSizing","boxSizing","border","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","sizeStr","setPrototypeOf","obj","proto","__proto__","_super","__extends","message","code","_this","prototype","Error","Viewport","flicking","_flicking","_el","_width","_height","_padding","left","right","top","bottom","_isBorderBoxSizing","__proto","defineProperty","get","newWidth","newHeight","resize","elStyle","AutoResizer","_onResize","resizeDebounce","maxResizeDebounce","_maxResizeDebounceTimer","setTimeout","_doScheduledResize","_resizeTimer","clearTimeout","_skipFirstResize","isFirstResize","_enabled","_resizeObserver","enable","viewport","disable","useResizeObserver","ResizeObserver","viewportSizeNot0","resizeObserver","observe","addEventListener","disconnect","removeEventListener","VanillaElementProvider","_element","_rendered","show","cameraEl","camera","parentElement","appendChild","hide","VirtualElementProvider","_virtualElement","nativeElement","visible","elIndex","_panel","elementIndex","virtualElements","virtual","init","VirtualManager","options","_renderPanel","renderPanel","_initialPanelCount","_b","initialPanelCount","_cache","_c","cache","_panelClass","_d","panelClass","_elements","set","renderer","panels","uncacheRenderResult","virtualEnabled","externalRenderer","renderExternal","_initVirtualElements","nativeEl","display","append","count","insert","prepend","batchInsert","hasDOMInElements","remove","batchRemove","deleteCount","cameraElement","panelsPerView","fragment","createDocumentFragment","newElements","panelEl","className","dataset","toString","EVENT","HOLD","CHANGE","RELEASE","ANIMATION_END","FINISH","POSITION_KEY","STATE_TYPE","State","_delta","_targetPanel","onEnter","prevState","onHold","ctx","onChange","onRelease","onAnimationEnd","onFinish","_moveToChangedPosition","axesEvent","transitTo","delta","AXES","prevPosition","newPosition","circularEnabled","lookAt","moveEvent","ComponentEvent","isTrusted","holding","direction","trigger","isCanceled","DISABLED","IdleState","animating","panelCount","holdStartEvent","HOLDING","controller","control","animatingContext","moveStartEvent","ANIMATING","HoldingState","_releaseEvent","inputEvent","offsetX","offsetY","DRAGGING","flick","setTo","IDLE","releaseEvent","srcEvent","clickedElement","touchEvent","touch","changedTouches","elementFromPoint","clientX","clientY","clickedPanel","panels_1","panels_1_1","contains","cameraPosition","clickedPanelPosition","DraggingState","destPos","duration","moveToPosition","err","AnimatingState","targetPanel","updateInput","changeOnHold","setActive","activePanel","DisabledState","stop","StateMachine","nextStateType","nextState","_state","fire","eventType","externalCtx","currentState","__assign","AxesController","_onAxesHold","_dragged","_onAxesChange","_panInput","isEnabled","_preventClickWhenDragged","e","preventDefault","stopPropagation","_resetInternalValues","_stateMachine","_axes","state","_animatingContext","axes","circular","axis","Axes","deceleration","interruptable","nested","easing","PanInput","inputType","threshold","iOSEdgeSwipeThreshold","preventDefaultOnDrag","scale","panelOrder","releaseOnScroll","connect","on","destroy","removePreventClickHandler","release","updateAnimation","stopAnimation","update","controlParams","axisManager","addPreventClickHandler","off","animateTo","Promise","reject","startPos","resolve","animate","resetContext","once","animationFinishHandler","interruptionHandler","updateDirection","panInput","Control","_controller","_activePanel","_getPosition","updatePosition","progressInPanel","clampToReachablePosition","resetActive","moveToPanel","_triggerIndexChangeEvent","_animateToPosition","newActivePanel","prevActivePanel","_nextPanel","updateAdaptiveHeight","prevIndex","prevPanel","copy","triggeringEvent","event","then","__awaiter","render","sent","catch","nearestAnchor","findNearestAnchor","removed","canReach","camPos_1","camRangeDiff","rangeDiff","possiblePositions","filter","reduce","nearestPosition","abs","Infinity","AnchorPoint","_index","_pos","SnapControl","_count","activeAnchor","findActiveAnchor","anchorAtCamera","snapThreshold","_calcSnapThreshold","posDelta","absPosDelta","snapDelta","targetAnchor","_findSnappedAnchor","_findAdjacentAnchor","currentPos","clampedPosition","anchorAtPosition","findAnchorIncludePosition","isFinite","anchors","anchorPoints","loopCount","floor","circularIndexOffset","anchorAtPositionIndex","anchor","loop","anchorIncludePosition","adjacentAnchor","getNextAnchor","getPrevAnchor","isNextDirection","panelSize","alignPos","alignPosition","margin","FreeControl","stopAtEdge","_stopAtEdge","panelRange","targetPos","StrictControl","_resetIndexRange","cameraRange","currentIndex","prevPanelIndex","nextPanelIndex","nextPanel","prevPos","nextPos","_indexRange","currentPanel","axesRange","indexRange","isOverThreshold","firstAnchor","lastAnchor","shouldBounceToFirst","shouldBounceToLast","isAdjacent","CameraMode","getAnchors","anchorsIncludingPosition","includePosition","nearest","prevDist","anchorIdx","dist","getCircularOffset","panelPos","canSee","visibleRange","isVisibleOnRange","LinearCameraMode","checkAvailability","getRange","firstPanel","getPanel","lastPanel","CircularCameraMode","firstPanelPrev","lastPanelNext","visibleSize","panelSizeSum","canSetCircularMode","every","camRange","minDist","minDistIndex","anchorCount","positionInRange","anchorInRange","possibleAnchors","toggled","toggledPrev","toggleDirection","toggledNext","_calcPanelAreaSum","visibleInCurrentRange","sum","sizeIncludingMargin","BoundCameraMode","viewportSize","panelAreaSize","isBiggerThanViewport","firstPos","lastPos","alignVal","reachablePanels","shouldPrependBoundAnchor","shouldAppendBoundAnchor","indexOffset_1","newAnchors","splice","nearestPanelAtMin","_findNearestPanel","panelAtMin","panelAtMax","panelIdx","Camera","_checkTranslateSupport","transforms","supportedStyle","documentElement","transformName","transforms_1","transforms_1_1","prefixedTransform","_transform","_align","_position","_alignPos","_offset","_circularOffset","_circularEnabled","_mode","_range","_visiblePanels","_anchors","NaN","nearestPanel","bounceSize","prevRange","nextRange","nextPosition","_panelOrder","viewportEl","firstElementChild","_updateMode","updatePanelOrder","_togglePanels","_refreshVisiblePanels","_checkNeedPanel","_checkReachEnd","updateOffset","applyTransform","getProgressInPanel","updateRange","updateCircularToggleDirection","updateAlignPos","updateAnchors","adaptive","unRenderedPanels","rendered","initialized","resetNeedPanelHistory","_needPanelTriggered","rendering","actualPosition","newVisiblePanels","prevVisiblePanels","added","visiblePanels","needPanelTriggered","cameraSize","needPanelThreshold","cameraPrev","cameraNext","newPos","wasBetweenRange","isBetweenRange","circularMode","fallbackMode","circularFallback","bound","toggle","some","isToggled","Renderer","strategy","_panels","_rendering","_strategy","panelAlign","_collectPanels","forceRenderAllPanels","markForShow","updatePanelSize","_updatePanelSizeByGrid","items","allPanelsInserted","batchInsertDefer","updateAfterPanelChange","prevFirstPanel","addedPanels","item","insertingIdx","panelsPushed","panelsInserted","_createPanel","_insertPanelElements","increaseIndex","allPanelsRemoved","batchRemoveDefer","removingIdx","panelsPulled","panelsRemoved","decreaseIndex","_removePanelElements","panelsAdded","_updateCameraAndControl","targetIndex","checkPanelContentsReady","checkingPanels","resizeOnContentsReady","hasContents","contentsReadyChecker","ImReady","loading","prevProgressInPanel","panelBehind","readyCount","totalCount","check","_showOnlyVisiblePanels","visibleIndexes","visibles","markForHide","referencePanel","gap","panelSizeObj","firstPanelSizeObj","noPanelStyleOverride","updatePanelSizes","_removeAllChildsFromCamera","nextSibling","nextSiblingElement","insertBefore","_afterRender","VanillaRenderer","updateRenderingPanels","renderPanels","_resetPanelElementOrder","_removeAllTextNodes","collectPanels","createPanel","reversedElements","getRenderingElementsByOrder","reverse","nextEl","nextElementSibling","childNodes","node","TEXT_NODE","ExternalRenderer","Panel","elementProvider","_elProvider","_removed","_loading","_resetInternalStates","_size","_margin","_toggled","_toggleDirection","cameraRangeDiff","progress","camPos","disappearPosNext","disappearPosPrev","checkingRange","_updateAlignPos","cached","marginLeft","marginRight","marginTop","marginBottom","includeMargin","includeRange","focus","moveTo","togglePosition","_togglePosition","prevToggled","camAlignPosition","camVisibleRange","camVisibleSize","minimumVisible","maximumVisible","shouldBeVisibleAtMin","shouldBeVisibleAtMax","NormalRenderingStrategy","providerCtor","_providerCtor","getRenderingIndexesByOrder","renderedPanels","notToggled","renderOnlyVisible","VirtualPanel","_cachedInnerHTML","virtualElCount","cacheRenderResult","result","newInnerHTML","VirtualRenderingStrategy","virtualManager","invisibleIndexes","sort","panel1","panel2","_","Flicking","root","defaultIndex","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","preventEventsBeforeInit","_r","_s","_t","pow","_u","_v","moveType","_w","_x","_y","_z","_0","preventClickOnDrag","_1","_2","disableOnInit","_3","_4","_5","_6","autoInit","_7","autoResize","_8","_9","_10","_11","_12","_13","_initialized","_plugins","_defaultIndex","_horizontal","_circular","_circularFallback","_bound","_adaptive","_panelsPerView","_noPanelStyleOverride","_resizeOnContentsReady","_nested","_virtual","_needPanelThreshold","_preventEventsBeforeInit","_deceleration","_duration","_easing","_inputType","_moveType","_threshold","_interruptable","_bounce","_iOSEdgeSwipeThreshold","_preventClickOnDrag","_preventDefaultOnDrag","_disableOnInit","_changeOnHold","_renderOnlyVisible","_autoInit","_autoResize","_useResizeObserver","_resizeDebounce","_maxResizeDebounce","_useFractionalSize","_externalRenderer","_renderExternal","_viewport","_autoResizer","_renderer","_createRenderer","_camera","_createCamera","_control","_createControl","_virtualManager","activeIndex","prevControl","newControl","prevVal","originalTrigger","_initialResize","_moveToInitialPanel","disableInput","plugin","enableInput","getStatus","includePanelHTML","visiblePanelsOnly","status","panelInfo","html","outerHTML","visibleOffset","setStatus","panelIndex","newCameraPos","addPlugins","plugins","removePlugins","foundIndex","prevWidth","prevHeight","sizeChanged","moveTypes","moveTypeStr","moveTypeOptions","JSON","stringify","console","warn","_createExternalRenderer","_createVanillaRenderer","rendererOptions","defaultPanel","initialPanel","VERSION","Component","withFlickingMethods","flickingName","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","args","getterDescriptor","diffResult","prevList","endIdx_1","prevIdx_1","removedIdx","ordered","__read","from","to","indexDiff","startIdx_1","prevIdx_2","addedElements_1","addedIdx","addedElements","startIdx","endIdx","elIdx","removedPanels","maintainedMap","maintained","current","list","firstPanelSize","cameraAlign","getCameraAlign","getPanelAlign","camPosition","name_1","modules","module","exports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AACH;AAEA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACI,IAAMA,IAAI,GAAG;AAClBC,EAAAA,UAAU,EAAE,CAAC;AACbC,EAAAA,iBAAiB,EAAE,CAAC;AACpBC,EAAAA,iBAAiB,EAAE,CAAC;AACpBC,EAAAA,wBAAwB,EAAE,CAAC;AAC3BC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,kBAAkB,EAAE,CAAC;AACrBC,EAAAA,sBAAsB,EAAE,CAAC;AACzBC,EAAAA,uBAAuB,EAAE,CAAC;AAC1BC,EAAAA,mBAAmB,EAAE,CAAC;AACtBC,EAAAA,qBAAqB,EAAE,CAAC;AACxBC,EAAAA,yBAAyB,EAAE,EAAE;AAC7BC,EAAAA,wBAAwB,EAAE,EAAE;AAC5BC,EAAAA,eAAe,EAAE,EAAE;AACnBC,EAAAA,SAAS,EAAE,EAAE;AACbC,EAAAA,sBAAsB,EAAE,EAAA;EAChB;AAEH,IAAMC,OAAO,GAAG;AACrBf,EAAAA,UAAU,EAAE,UAACgB,QAAa,EAAEC,YAAsB,EAAK;AAAA,IAAA,OA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OgjB,QAAQ,CAAA;AAAC,GAAA;AAEtB,CAAC;;AChDD;;;AAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACHH;;;AAGG;AAGH,KAAK,IAAM8X,MAAI,IAAIC,OAAO,EAAE;AACzBzK,EAAAA,QAAgB,CAACwK,MAAI,CAAC,GAAIC,OAAe,CAACD,MAAI,CAAC,CAAA;AACjD,CAAA;AAGDE,MAAM,CAACC,OAAO,GAAG3K,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/flicking.css b/dist/flicking.css deleted file mode 100644 index c6b4a96884..0000000000 --- a/dist/flicking.css +++ /dev/null @@ -1,44 +0,0 @@ -.flicking-viewport { - position: relative; - overflow: hidden; -} - -.flicking-viewport.vertical { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; -} - -.flicking-viewport.vertical > .flicking-camera { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} - -.flicking-viewport.flicking-hidden > .flicking-camera > * { - visibility: hidden; -} - -.flicking-camera { - width: 100%; - height: 100%; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - position: relative; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - z-index: 1; - will-change: transform; -} - -.flicking-camera > * { - -ms-flex-negative: 0; - flex-shrink: 0; -} diff --git a/dist/flicking.esm.js b/dist/flicking.esm.js deleted file mode 100644 index 08f6265c29..0000000000 --- a/dist/flicking.esm.js +++ /dev/null @@ -1,8058 +0,0 @@ -/* -Copyright (c) 2015-present NAVER Corp. -name: @egjs/flicking -license: MIT -author: NAVER Corp. -repository: https://github.com/naver/egjs-flicking -version: 4.11.4 -*/ -import Component, { ComponentEvent } from '@egjs/component'; -import Axes, { PanInput } from '@egjs/axes'; -import ImReady from '@egjs/imready'; - -/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */ -/* global Reflect, Promise, SuppressedError, Symbol */ - -var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); -}; -function __extends(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} -var __assign = function () { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} -function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -} -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, - m = s && o[s], - i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { - error: error - }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; -} - -/** @deprecated */ -function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; -} -typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ -/** - * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs. - * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다. - * @name ERROR_CODE - * @constant - * @type object - * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우 - * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우 - * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우 - * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우) - * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때 - * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우 - * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우 - * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8) - * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우 - * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우 - * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우 - * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...) - * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우 - * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우 - * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다 - * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우 - */ -var CODE = { - WRONG_TYPE: 0, - ELEMENT_NOT_FOUND: 1, - VAL_MUST_NOT_NULL: 2, - NOT_ATTACHED_TO_FLICKING: 3, - WRONG_OPTION: 4, - INDEX_OUT_OF_RANGE: 5, - POSITION_NOT_REACHABLE: 6, - TRANSFORM_NOT_SUPPORTED: 7, - STOP_CALLED_BY_USER: 8, - ANIMATION_INTERRUPTED: 9, - ANIMATION_ALREADY_PLAYING: 10, - NOT_ALLOWED_IN_FRAMEWORK: 11, - NOT_INITIALIZED: 12, - NO_ACTIVE: 13, - NOT_ALLOWED_IN_VIRTUAL: 14 -}; -var MESSAGE = { - WRONG_TYPE: function (wrongVal, correctTypes) { - return wrongVal + "(" + typeof wrongVal + ") is not a " + correctTypes.map(function (type) { - return "\"" + type + "\""; - }).join(" or ") + "."; - }, - ELEMENT_NOT_FOUND: function (selector) { - return "Element with selector \"" + selector + "\" not found."; - }, - VAL_MUST_NOT_NULL: function (val, name) { - return name + " should be provided. Given: " + val; - }, - NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.", - WRONG_OPTION: function (optionName, val) { - return "Option \"" + optionName + "\" is not in correct format, given: " + val; - }, - INDEX_OUT_OF_RANGE: function (val, min, max) { - return "Index \"" + val + "\" is out of range: should be between " + min + " and " + max + "."; - }, - POSITION_NOT_REACHABLE: function (position) { - return "Position \"" + position + "\" is not reachable."; - }, - TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.", - STOP_CALLED_BY_USER: "Event stop() is called by user.", - ANIMATION_INTERRUPTED: "Animation is interrupted by user input.", - ANIMATION_ALREADY_PLAYING: "Animation is already playing.", - NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.", - NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.", - NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.", - NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled" -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/** - * Event type object with event name strings of {@link Flicking} - * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체 - * @type {object} - * @property {"holdStart"} HOLD_START holdStart eventholdStart 이벤트 - * @property {"holdEnd"} HOLD_END holdEnd eventholdEnd 이벤트 - * @property {"moveStart"} MOVE_START moveStart eventmoveStart 이벤트 - * @property {"move"} MOVE move eventmove 이벤트 - * @property {"moveEnd"} MOVE_END moveEnd eventmoveEnd 이벤트 - * @property {"willChange"} WILL_CHANGE willChange eventwillChange 이벤트 - * @property {"changed"} CHANGED changed eventchanged 이벤트 - * @property {"willRestore"} WILL_RESTORE willRestore eventwillRestore 이벤트 - * @property {"restored"} RESTORED restored eventrestored 이벤트 - * @property {"select"} SELECT select eventselect 이벤트 - * @property {"needPanel"} NEED_PANEL needPanel eventneedPanel 이벤트 - * @property {"panelChange"} PANEL_CHANGE panelChange eventpanelChange 이벤트 - * @example - * ```ts - * import { EVENTS } from "@egjs/flicking"; - * EVENTS.MOVE_START; // "moveStart" - * ``` - */ -var EVENTS = { - READY: "ready", - BEFORE_RESIZE: "beforeResize", - AFTER_RESIZE: "afterResize", - HOLD_START: "holdStart", - HOLD_END: "holdEnd", - MOVE_START: "moveStart", - MOVE: "move", - MOVE_END: "moveEnd", - WILL_CHANGE: "willChange", - CHANGED: "changed", - WILL_RESTORE: "willRestore", - RESTORED: "restored", - SELECT: "select", - NEED_PANEL: "needPanel", - VISIBLE_CHANGE: "visibleChange", - REACH_EDGE: "reachEdge", - PANEL_CHANGE: "panelChange" -}; -/** - * An object with all possible predefined literal string for the {@link Flicking#align align} option - * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체 - * @type {object} - * @property {"prev"} PREV left/top align좌/상 정렬 - * @property {"center"} CENTER center align중앙 정렬 - * @property {"next"} NEXT right/bottom align우/하 정렬 - */ -var ALIGN = { - PREV: "prev", - CENTER: "center", - NEXT: "next" -}; -/** - * An object of directions - * @ko 방향을 나타내는 값들을 담고 있는 객체 - * @type {object} - * @property {"PREV"} PREV "left" when {@link Flicking#horizontal horizontal} is true, and "top" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다 - * @property {"NEXT"} NEXT "right" when {@link Flicking#horizontal horizontal} is true, and "bottom" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다 - * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다 - */ -var DIRECTION = { - PREV: "PREV", - NEXT: "NEXT", - NONE: null -}; -/** - * An object with all possible {@link Flicking#moveType moveType}s - * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체 - * @type {object} - * @property {"snap"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"freeScroll"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"strict"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType} - */ -var MOVE_TYPE = { - SNAP: "snap", - FREE_SCROLL: "freeScroll", - STRICT: "strict" -}; -var CLASS = { - VERTICAL: "vertical", - HIDDEN: "flicking-hidden", - DEFAULT_VIRTUAL: "flicking-panel" -}; -/** - * An object with all possible {@link Flicking#circularFallback circularFallback}s - * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체 - * @type {object} - * @property {string} LINEAR "linear" - * @property {string} BOUND "bound" - */ -var CIRCULAR_FALLBACK = { - LINEAR: "linear", - BOUND: "bound" -}; -/** - * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체 - * @type {object} - * @property {string} LTR "ltr" - * @property {string} RTL "rtl" - */ -var ORDER = { - LTR: "ltr", - RTL: "rtl" -}; - -// eslint-disable-next-line @typescript-eslint/ban-types -var merge = function (target) { - var sources = []; - for (var _i = 1; _i < arguments.length; _i++) { - sources[_i - 1] = arguments[_i]; - } - sources.forEach(function (source) { - Object.keys(source).forEach(function (key) { - target[key] = source[key]; - }); - }); - return target; -}; -var getElement = function (el, parent) { - var targetEl = null; - if (isString(el)) { - var parentEl = parent ? parent : document; - var queryResult = parentEl.querySelector(el); - if (!queryResult) { - throw new FlickingError(MESSAGE.ELEMENT_NOT_FOUND(el), CODE.ELEMENT_NOT_FOUND); - } - targetEl = queryResult; - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - targetEl = el; - } - if (!targetEl) { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - return targetEl; -}; -var checkExistence = function (value, nameOnErrMsg) { - if (value == null) { - throw new FlickingError(MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), CODE.VAL_MUST_NOT_NULL); - } -}; -var clamp = function (x, min, max) { - return Math.max(Math.min(x, max), min); -}; -var getFlickingAttached = function (val) { - if (!val) { - throw new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING); - } - return val; -}; -var toArray = function (iterable) { - return [].slice.call(iterable); -}; -var parseAlign$1 = function (align, size) { - var alignPoint; - if (isString(align)) { - switch (align) { - case ALIGN.PREV: - alignPoint = 0; - break; - case ALIGN.CENTER: - alignPoint = 0.5 * size; - break; - case ALIGN.NEXT: - alignPoint = size; - break; - default: - alignPoint = parseArithmeticSize(align, size); - if (alignPoint == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("align", align), CODE.WRONG_OPTION); - } - } - } else { - alignPoint = align; - } - return alignPoint; -}; -var parseBounce = function (bounce, size) { - var parsedBounce; - if (Array.isArray(bounce)) { - parsedBounce = bounce.map(function (val) { - return parseArithmeticSize(val, size); - }); - } else { - var parsedVal = parseArithmeticSize(bounce, size); - parsedBounce = [parsedVal, parsedVal]; - } - return parsedBounce.map(function (val) { - if (val == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("bounce", bounce), CODE.WRONG_OPTION); - } - return val; - }); -}; -var parseArithmeticSize = function (cssValue, base) { - var parsed = parseArithmeticExpression(cssValue); - if (parsed == null) return null; - return parsed.percentage * base + parsed.absolute; -}; -var parseArithmeticExpression = function (cssValue) { - var cssRegex = /(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g; - if (typeof cssValue === "number") { - return { - percentage: 0, - absolute: cssValue - }; - } - var parsed = { - percentage: 0, - absolute: 0 - }; - var idx = 0; - var matchResult = cssRegex.exec(cssValue); - while (matchResult != null) { - var sign = matchResult[1]; - var value = matchResult[2]; - var unit = matchResult[3]; - var parsedValue = parseFloat(value); - if (idx <= 0) { - sign = sign || "+"; - } - // Return default value for values not in good form - if (!sign) { - return null; - } - var signMultiplier = sign === "+" ? 1 : -1; - if (unit === "%") { - parsed.percentage += signMultiplier * (parsedValue / 100); - } else { - parsed.absolute += signMultiplier * parsedValue; - } - // Match next occurrence - ++idx; - matchResult = cssRegex.exec(cssValue); - } - // None-matched - if (idx === 0) { - return null; - } - return parsed; -}; -var parseCSSSizeValue = function (val) { - return isString(val) ? val : val + "px"; -}; -var parsePanelAlign = function (align) { - return typeof align === "object" ? align.panel : align; -}; -var getDirection = function (start, end) { - if (start === end) return DIRECTION.NONE; - return start < end ? DIRECTION.NEXT : DIRECTION.PREV; -}; -var parseElement = function (element) { - if (!Array.isArray(element)) { - element = [element]; - } - var elements = []; - element.forEach(function (el) { - if (isString(el)) { - var tempDiv = document.createElement("div"); - tempDiv.innerHTML = el; - elements.push.apply(elements, __spread(toArray(tempDiv.children))); - while (tempDiv.firstChild) { - tempDiv.removeChild(tempDiv.firstChild); - } - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - elements.push(el); - } else { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - }); - return elements; -}; -var getMinusCompensatedIndex = function (idx, max) { - return idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max); -}; -var includes = function (array, target) { - var e_1, _a; - try { - for (var array_1 = __values(array), array_1_1 = array_1.next(); !array_1_1.done; array_1_1 = array_1.next()) { - var val = array_1_1.value; - if (val === target) return true; - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (array_1_1 && !array_1_1.done && (_a = array_1.return)) _a.call(array_1); - } finally { - if (e_1) throw e_1.error; - } - } - return false; -}; -var isString = function (val) { - return typeof val === "string"; -}; -var circulatePosition = function (pos, min, max) { - var size = max - min; - if (pos < min) { - var offset = (min - pos) % size; - pos = max - offset; - } else if (pos > max) { - var offset = (pos - max) % size; - pos = min + offset; - } - return pos; -}; -var find = function (array, checker) { - var e_2, _a; - try { - for (var array_2 = __values(array), array_2_1 = array_2.next(); !array_2_1.done; array_2_1 = array_2.next()) { - var val = array_2_1.value; - if (checker(val)) { - return val; - } - } - } catch (e_2_1) { - e_2 = { - error: e_2_1 - }; - } finally { - try { - if (array_2_1 && !array_2_1.done && (_a = array_2.return)) _a.call(array_2); - } finally { - if (e_2) throw e_2.error; - } - } - return null; -}; -var findRight = function (array, checker) { - for (var idx = array.length - 1; idx >= 0; idx--) { - var val = array[idx]; - if (checker(val)) { - return val; - } - } - return null; -}; -var findIndex = function (array, checker) { - for (var idx = 0; idx < array.length; idx++) { - if (checker(array[idx])) { - return idx; - } - } - return -1; -}; -var getProgress = function (pos, prev, next) { - return (pos - prev) / (next - prev); -}; -// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -var getStyle = function (el) { - return window.getComputedStyle(el) || el.currentStyle; -}; -var setSize = function (el, _a) { - var width = _a.width, - height = _a.height; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - el.style.width = width + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - el.style.height = height + "px"; - } - } -}; -var isBetween = function (val, min, max) { - return val >= min && val <= max; -}; -var circulateIndex = function (index, max) { - if (index >= max) { - return index % max; - } else if (index < 0) { - return getMinusCompensatedIndex((index + 1) % max - 1, max); - } else { - return index; - } -}; -var range = function (end) { - var arr = new Array(end); - for (var i = 0; i < end; i++) { - arr[i] = i; - } - return arr; -}; -var getElementSize = function (_a) { - var el = _a.el, - horizontal = _a.horizontal, - useFractionalSize = _a.useFractionalSize, - useOffset = _a.useOffset, - style = _a.style; - var size = 0; - if (useFractionalSize) { - var baseSize = parseFloat(horizontal ? style.width : style.height) || 0; - var isBorderBoxSizing = style.boxSizing === "border-box"; - var border = horizontal ? parseFloat(style.borderLeftWidth || "0") + parseFloat(style.borderRightWidth || "0") : parseFloat(style.borderTopWidth || "0") + parseFloat(style.borderBottomWidth || "0"); - if (isBorderBoxSizing) { - size = useOffset ? baseSize : baseSize - border; - } else { - var padding = horizontal ? parseFloat(style.paddingLeft || "0") + parseFloat(style.paddingRight || "0") : parseFloat(style.paddingTop || "0") + parseFloat(style.paddingBottom || "0"); - size = useOffset ? baseSize + padding + border : baseSize + padding; - } - } else { - var sizeStr = horizontal ? "Width" : "Height"; - size = useOffset ? el["offset" + sizeStr] : el["client" + sizeStr]; - } - return Math.max(size, 0); -}; -var setPrototypeOf = Object.setPrototypeOf || function (obj, proto) { - obj.__proto__ = proto; - return obj; -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/** - * Special type of known error that {@link Flicking} throws. - * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러 - * @property {number} code Error code에러 코드 - * @property {string} message Error message에러 메시지 - * @see {@link ERROR_CODE ERROR_CODE} - * @example - * ```ts - * import Flicking, { FlickingError, ERROR_CODES } from "@egjs/flicking"; - * try { - * const flicking = new Flicking(".flicking-viewport") - * } catch (e) { - * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) { - * console.error("Element not found") - * } - * } - * ``` - */ -var FlickingError = /*#__PURE__*/function (_super) { - __extends(FlickingError, _super); - /** - * @param message Error message에러 메시지 - * @param code Error code에러 코드 - */ - function FlickingError(message, code) { - var _this = _super.call(this, message) || this; - setPrototypeOf(_this, FlickingError.prototype); - _this.name = "FlickingError"; - _this.code = code; - return _this; - } - return FlickingError; -}(Error); - -/** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - */ -var Viewport = /*#__PURE__*/function () { - /** - * @param el A viewport element뷰포트 엘리먼트 - */ - function Viewport(flicking, el) { - this._flicking = flicking; - this._el = el; - this._width = 0; - this._height = 0; - this._padding = { - left: 0, - right: 0, - top: 0, - bottom: 0 - }; - this._isBorderBoxSizing = false; - } - var __proto = Viewport.prototype; - Object.defineProperty(__proto, "element", { - /** - * A viewport(root) element - * @ko 뷰포트(root) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "width", { - /** - * Viewport width, without paddings - * @ko 뷰포트 너비 - * @type {number} - * @readonly - */ - get: function () { - return this._width - this._padding.left - this._padding.right; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Viewport height, without paddings - * @ko 뷰포트 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height - this._padding.top - this._padding.bottom; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "padding", { - /** - * Viewport paddings - * @ko 뷰포트 CSS padding 값 - * @type {object} - * @property {number} left CSS `padding-left` - * @property {number} right CSS `padding-right` - * @property {number} top CSS `padding-top` - * @property {number} bottom CSS `padding-bottom` - * @readonly - */ - get: function () { - return this._padding; - }, - enumerable: false, - configurable: true - }); - /** - * Change viewport's size. - * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property - * @ko 뷰포트 크기를 변경합니다. - * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New viewport size새 뷰포트 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - */ - __proto.setSize = function (_a) { - var width = _a.width, - height = _a.height; - var el = this._el; - var padding = this._padding; - var isBorderBoxSizing = this._isBorderBoxSizing; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - var newWidth = isBorderBoxSizing ? width + padding.left + padding.right : width; - el.style.width = newWidth + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - var newHeight = isBorderBoxSizing ? height + padding.top + padding.bottom : height; - el.style.height = newHeight + "px"; - } - } - this.resize(); - }; - /** - * Update width/height to the current viewport element's size - * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다 - */ - __proto.resize = function () { - var el = this._el; - var elStyle = getStyle(el); - var useFractionalSize = this._flicking.useFractionalSize; - this._width = getElementSize({ - el: el, - horizontal: true, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._height = getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._padding = { - left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0, - right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0, - top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0, - bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0 - }; - this._isBorderBoxSizing = elStyle.boxSizing === "border-box"; - }; - return Viewport; -}(); - -var AutoResizer = /*#__PURE__*/function () { - function AutoResizer(flicking) { - var _this = this; - this._onResize = function () { - var flicking = _this._flicking; - var resizeDebounce = flicking.resizeDebounce; - var maxResizeDebounce = flicking.maxResizeDebounce; - if (resizeDebounce <= 0) { - void flicking.resize(); - } else { - if (_this._maxResizeDebounceTimer <= 0) { - if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) { - _this._maxResizeDebounceTimer = window.setTimeout(_this._doScheduledResize, maxResizeDebounce); - } - } - if (_this._resizeTimer > 0) { - clearTimeout(_this._resizeTimer); - _this._resizeTimer = 0; - } - _this._resizeTimer = window.setTimeout(_this._doScheduledResize, resizeDebounce); - } - }; - this._doScheduledResize = function () { - clearTimeout(_this._resizeTimer); - clearTimeout(_this._maxResizeDebounceTimer); - _this._maxResizeDebounceTimer = -1; - _this._resizeTimer = -1; - void _this._flicking.resize(); - }; - // eslint-disable-next-line @typescript-eslint/member-ordering - this._skipFirstResize = function () { - var isFirstResize = true; - return function () { - if (isFirstResize) { - isFirstResize = false; - return; - } - _this._onResize(); - }; - }(); - this._flicking = flicking; - this._enabled = false; - this._resizeObserver = null; - this._resizeTimer = -1; - this._maxResizeDebounceTimer = -1; - } - var __proto = AutoResizer.prototype; - Object.defineProperty(__proto, "enabled", { - get: function () { - return this._enabled; - }, - enumerable: false, - configurable: true - }); - __proto.enable = function () { - var flicking = this._flicking; - var viewport = flicking.viewport; - if (this._enabled) { - this.disable(); - } - if (flicking.useResizeObserver && !!window.ResizeObserver) { - var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0; - var resizeObserver = viewportSizeNot0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize); - resizeObserver.observe(flicking.viewport.element); - this._resizeObserver = resizeObserver; - } else { - window.addEventListener("resize", this._onResize); - } - this._enabled = true; - return this; - }; - __proto.disable = function () { - if (!this._enabled) return this; - var resizeObserver = this._resizeObserver; - if (resizeObserver) { - resizeObserver.disconnect(); - this._resizeObserver = null; - } else { - window.removeEventListener("resize", this._onResize); - } - this._enabled = false; - return this; - }; - return AutoResizer; -}(); - -/** - * @internal - */ -var VanillaElementProvider = /*#__PURE__*/function () { - function VanillaElementProvider(element) { - this._element = element; - this._rendered = true; - } - var __proto = VanillaElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - __proto.show = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement !== cameraEl) { - cameraEl.appendChild(el); - this._rendered = true; - } - }; - __proto.hide = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement === cameraEl) { - cameraEl.removeChild(el); - this._rendered = false; - } - }; - return VanillaElementProvider; -}(); - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ -/** - * @internal - */ -var VirtualElementProvider = /*#__PURE__*/function () { - function VirtualElementProvider(flicking) { - this._flicking = flicking; - } - var __proto = VirtualElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._virtualElement.nativeElement; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._virtualElement.visible; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "_virtualElement", { - get: function () { - var flicking = this._flicking; - var elIndex = this._panel.elementIndex; - var virtualElements = flicking.virtual.elements; - return virtualElements[elIndex]; - }, - enumerable: false, - configurable: true - }); - __proto.init = function (panel) { - this._panel = panel; - }; - __proto.show = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - __proto.hide = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - return VirtualElementProvider; -}(); - -/** - * A manager class to add / remove virtual panels - */ -var VirtualManager = /*#__PURE__*/function () { - function VirtualManager(flicking, options) { - var _a, _b, _c, _d; - this._flicking = flicking; - this._renderPanel = (_a = options === null || options === void 0 ? void 0 : options.renderPanel) !== null && _a !== void 0 ? _a : function () { - return ""; - }; - this._initialPanelCount = (_b = options === null || options === void 0 ? void 0 : options.initialPanelCount) !== null && _b !== void 0 ? _b : -1; - this._cache = (_c = options === null || options === void 0 ? void 0 : options.cache) !== null && _c !== void 0 ? _c : false; - this._panelClass = (_d = options === null || options === void 0 ? void 0 : options.panelClass) !== null && _d !== void 0 ? _d : CLASS.DEFAULT_VIRTUAL; - this._elements = []; - } - var __proto = VirtualManager.prototype; - Object.defineProperty(__proto, "elements", { - get: function () { - return this._elements; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderPanel", { - // Options - /** - * A rendering function for the panel element's innerHTML - * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @type {function} - * @param {VirtualPanel} panel Instance of the panel패널 인스턴스 - * @param {number} index Index of the panel패널 인덱스 - * @default "() => {}" - */ - get: function () { - return this._renderPanel; - }, - set: function (val) { - this._renderPanel = val; - this._flicking.renderer.panels.forEach(function (panel) { - return panel.uncacheRenderResult(); - }); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialPanelCount", { - /** - * Initial panel count to render - * @ko 최초로 렌더링할 패널의 개수 - * @readonly - * @type {number} - * @default -1 - */ - get: function () { - return this._initialPanelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cache", { - /** - * Whether to cache rendered panel's innerHTML - * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @type {boolean} - * @default false - */ - get: function () { - return this._cache; - }, - set: function (val) { - this._cache = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelClass", { - /** - * The class name that will be applied to rendered panel elements - * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @type {string} - * @default "flicking-panel" - */ - get: function () { - return this._panelClass; - }, - set: function (val) { - this._panelClass = val; - }, - enumerable: false, - configurable: true - }); - __proto.init = function () { - var flicking = this._flicking; - if (!flicking.virtualEnabled) return; - if (!flicking.externalRenderer && !flicking.renderExternal) { - this._initVirtualElements(); - } - var virtualElements = flicking.camera.children; - this._elements = virtualElements.map(function (el) { - return { - nativeElement: el, - visible: true - }; - }); - }; - __proto.show = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = true; - if (nativeEl.style.display) { - nativeEl.style.display = ""; - } - }; - __proto.hide = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = false; - nativeEl.style.display = "none"; - }; - /** - * Add new virtual panels at the end of the list - * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.append = function (count) { - if (count === void 0) { - count = 1; - } - var flicking = this._flicking; - return this.insert(flicking.panels.length, count); - }; - /** - * Add new virtual panels at the start of the list - * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.prepend = function (count) { - if (count === void 0) { - count = 1; - } - return this.insert(0, count); - }; - /** - * Add new virtual panels at the given index - * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.insert = function (index, count) { - if (count === void 0) { - count = 1; - } - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchInsert({ - index: index, - elements: range(count), - hasDOMInElements: false - }); - }; - /** - * Remove panels at the given index - * @ko 주어진 인덱스에서 패널들을 삭제합니다 - * @param {number} count The number of panels to remove삭제할 패널의 개수 - * @returns {Array} The panels removed삭제된 패널들 - */ - __proto.remove = function (index, count) { - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchRemove({ - index: index, - deleteCount: count, - hasDOMInElements: false - }); - }; - __proto._initVirtualElements = function () { - var _this = this; - var flicking = this._flicking; - var cameraElement = flicking.camera.element; - var panelsPerView = flicking.panelsPerView; - var fragment = document.createDocumentFragment(); - var newElements = range(panelsPerView + 1).map(function (idx) { - var panelEl = document.createElement("div"); - panelEl.className = _this._panelClass; - panelEl.dataset.elementIndex = idx.toString(); - return panelEl; - }); - newElements.forEach(function (el) { - fragment.appendChild(el); - }); - cameraElement.appendChild(fragment); - }; - return VirtualManager; -}(); - -/** - * All possible @egjs/axes event keys - * @internal - */ -var EVENT = { - HOLD: "hold", - CHANGE: "change", - RELEASE: "release", - ANIMATION_END: "animationEnd", - FINISH: "finish" -}; -/** - * An Axis key that Flicking uses - * @internal - */ -var POSITION_KEY = "flick"; - -var STATE_TYPE; -(function (STATE_TYPE) { - STATE_TYPE[STATE_TYPE["IDLE"] = 0] = "IDLE"; - STATE_TYPE[STATE_TYPE["HOLDING"] = 1] = "HOLDING"; - STATE_TYPE[STATE_TYPE["DRAGGING"] = 2] = "DRAGGING"; - STATE_TYPE[STATE_TYPE["ANIMATING"] = 3] = "ANIMATING"; - STATE_TYPE[STATE_TYPE["DISABLED"] = 4] = "DISABLED"; -})(STATE_TYPE || (STATE_TYPE = {})); -/** - * A component that shows the current status of the user input or the animation - * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트 - * @internal - */ -var State = /*#__PURE__*/function () { - function State() { - this._delta = 0; - this._targetPanel = null; - } - var __proto = State.prototype; - Object.defineProperty(__proto, "delta", { - /** - * A sum of delta values of change events from the last hold event of Axes - * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산 - * @type {number} - * @readonly - */ - get: function () { - return this._delta; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "targetPanel", { - /** - * A panel to set as {@link Control#activePanel} after the animation is finished - * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널 - * @type {number} - * @readonly - */ - get: function () { - return this._targetPanel; - }, - set: function (val) { - this._targetPanel = val; - }, - enumerable: false, - configurable: true - }); - /** - * An callback which is called when state has changed to this state - * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수 - * @param {State} prevState An previous state이전 상태값 - * @return {void} - */ - __proto.onEnter = function (prevState) { - this._delta = prevState._delta; - this._targetPanel = prevState._targetPanel; - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onHold = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onChange = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onRelease = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onAnimationEnd = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onFinish = function (ctx) { - // DO NOTHING - }; - __proto._moveToChangedPosition = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var delta = axesEvent.delta[POSITION_KEY]; - if (!delta) { - return; - } - this._delta += delta; - var camera = flicking.camera; - var prevPosition = camera.position; - var position = axesEvent.pos[POSITION_KEY]; - var newPosition = flicking.circularEnabled ? circulatePosition(position, camera.range.min, camera.range.max) : position; - camera.lookAt(newPosition); - var moveEvent = new ComponentEvent(EVENTS.MOVE, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(0, axesEvent.delta[POSITION_KEY]), - axesEvent: axesEvent - }); - flicking.trigger(moveEvent); - if (moveEvent.isCanceled()) { - // Return to previous position - camera.lookAt(prevPosition); - transitTo(STATE_TYPE.DISABLED); - } - }; - return State; -}(); - -/** - * A default state when there's no user input and no animation's playing - * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태 - * @internal - */ -var IdleState = /*#__PURE__*/function (_super) { - __extends(IdleState, _super); - function IdleState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - return _this; - } - var __proto = IdleState.prototype; - __proto.onEnter = function () { - this._delta = 0; - this._targetPanel = null; - }; - __proto.onHold = function (ctx) { - // Shouldn't do any action until any panels on flicking area - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - if (flicking.renderer.panelCount <= 0) { - transitTo(STATE_TYPE.DISABLED); - return; - } - var holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.HOLDING); - } - }; - // By methods call - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var controller = flicking.control.controller; - var animatingContext = controller.animatingContext; - var moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger AnimatingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.ANIMATING).onChange(ctx); - } - }; - return IdleState; -}(State); - -/** - * A state that activates when user's holding the Flicking area, but not moved a single pixel yet - * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태 - * @internal - */ -var HoldingState = /*#__PURE__*/function (_super) { - __extends(HoldingState, _super); - function HoldingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - _this._releaseEvent = null; - return _this; - } - var __proto = HoldingState.prototype; - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var inputEvent = axesEvent.inputEvent; - var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY; - var moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(0, -offset), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger DraggingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.DRAGGING).onChange(ctx); - } - }; - __proto.onRelease = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (axesEvent.delta.flick !== 0) { - // Sometimes "release" event on axes triggered before "change" event - // Especially if user flicked panel fast in really short amount of time - // if delta is not zero, that means above case happened. - // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END - // At least one move event should be included between holdStart and holdEnd - axesEvent.setTo({ - flick: flicking.camera.position - }, 0); - transitTo(STATE_TYPE.IDLE); - return; - } - // Can't handle select event here, - // As "finish" axes event happens - this._releaseEvent = axesEvent; - }; - __proto.onFinish = function (ctx) { - var e_1, _a; - var flicking = ctx.flicking, - transitTo = ctx.transitTo; - // Should transite to IDLE state before select event - // As user expects hold is already finished - transitTo(STATE_TYPE.IDLE); - if (!this._releaseEvent) { - return; - } - // Handle release event here - // To prevent finish event called twice - var releaseEvent = this._releaseEvent; - // Static click - /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */ - var srcEvent = releaseEvent.inputEvent.srcEvent; - var clickedElement; - if (srcEvent.type === "touchend") { - var touchEvent = srcEvent; - var touch = touchEvent.changedTouches[0]; - clickedElement = document.elementFromPoint(touch.clientX, touch.clientY); - } else { - clickedElement = srcEvent.target; - } - /* eslint-enable */ - var panels = flicking.renderer.panels; - var clickedPanel = null; - try { - for (var panels_1 = __values(panels), panels_1_1 = panels_1.next(); !panels_1_1.done; panels_1_1 = panels_1.next()) { - var panel = panels_1_1.value; - if (panel.contains(clickedElement)) { - clickedPanel = panel; - break; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (panels_1_1 && !panels_1_1.done && (_a = panels_1.return)) _a.call(panels_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (clickedPanel) { - var cameraPosition = flicking.camera.position; - var clickedPanelPosition = clickedPanel.position; - flicking.trigger(new ComponentEvent(EVENTS.SELECT, { - index: clickedPanel.index, - panel: clickedPanel, - // Direction to the clicked panel - direction: getDirection(cameraPosition, clickedPanelPosition) - })); - } - }; - return HoldingState; -}(State); - -/** - * A state that activates when user's dragging the Flicking area - * @ko 사용자가 드래깅중인 상태 - * @internal - */ -var DraggingState = /*#__PURE__*/function (_super) { - __extends(DraggingState, _super); - function DraggingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DraggingState.prototype; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onRelease = function (ctx) { - var _a; - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Update last position to cope with Axes's animating behavior - // Axes uses start position when animation start - flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (flicking.renderer.panelCount <= 0) { - // There're no panels - transitTo(STATE_TYPE.IDLE); - return; - } - transitTo(STATE_TYPE.ANIMATING); - var control = flicking.control; - var position = axesEvent.destPos[POSITION_KEY]; - var duration = Math.max(axesEvent.duration, flicking.duration); - try { - void control.moveToPosition(position, duration, axesEvent); - } catch (err) { - transitTo(STATE_TYPE.IDLE); - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = flicking.camera.position, _a), 0); - } - }; - return DraggingState; -}(State); - -/** - * A state that activates when Flicking's animating by user input or method call - * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태 - * @internal - */ -var AnimatingState = /*#__PURE__*/function (_super) { - __extends(AnimatingState, _super); - function AnimatingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = AnimatingState.prototype; - __proto.onHold = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var targetPanel = this._targetPanel; - var control = flicking.control; - this._delta = 0; - flicking.control.updateInput(); - if (flicking.changeOnHold && targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - var holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.DRAGGING); - } - }; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onFinish = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var control = flicking.control; - var controller = control.controller; - var animatingContext = controller.animatingContext; - transitTo(STATE_TYPE.IDLE); - flicking.trigger(new ComponentEvent(EVENTS.MOVE_END, { - isTrusted: axesEvent.isTrusted, - direction: getDirection(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - })); - var targetPanel = this._targetPanel; - if (targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - }; - return AnimatingState; -}(State); - -/** - * A state that activates when Flicking is stopped by event's `stop` method - * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태 - * @internal - */ -var DisabledState = /*#__PURE__*/function (_super) { - __extends(DisabledState, _super); - function DisabledState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DisabledState.prototype; - __proto.onAnimationEnd = function (ctx) { - var transitTo = ctx.transitTo; - transitTo(STATE_TYPE.IDLE); - }; - __proto.onChange = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Can stop Axes's change event - axesEvent.stop(); - transitTo(STATE_TYPE.IDLE); - }; - __proto.onRelease = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // This is needed when stopped hold start event - if (axesEvent.delta.flick === 0) { - transitTo(STATE_TYPE.IDLE); - } - }; - return DisabledState; -}(State); - -/** - * @internal - */ -var StateMachine = /*#__PURE__*/function () { - function StateMachine() { - var _this = this; - this.transitTo = function (nextStateType) { - var nextState; - switch (nextStateType) { - case STATE_TYPE.IDLE: - nextState = new IdleState(); - break; - case STATE_TYPE.HOLDING: - nextState = new HoldingState(); - break; - case STATE_TYPE.DRAGGING: - nextState = new DraggingState(); - break; - case STATE_TYPE.ANIMATING: - nextState = new AnimatingState(); - break; - case STATE_TYPE.DISABLED: - nextState = new DisabledState(); - break; - } - nextState.onEnter(_this._state); - _this._state = nextState; - return _this._state; - }; - this._state = new IdleState(); - } - var __proto = StateMachine.prototype; - Object.defineProperty(__proto, "state", { - get: function () { - return this._state; - }, - enumerable: false, - configurable: true - }); - __proto.fire = function (eventType, externalCtx) { - var currentState = this._state; - var ctx = __assign(__assign({}, externalCtx), { - transitTo: this.transitTo - }); - switch (eventType) { - case EVENT.HOLD: - currentState.onHold(ctx); - break; - case EVENT.CHANGE: - currentState.onChange(ctx); - break; - case EVENT.RELEASE: - currentState.onRelease(ctx); - break; - case EVENT.ANIMATION_END: - currentState.onAnimationEnd(ctx); - break; - case EVENT.FINISH: - currentState.onFinish(ctx); - break; - } - }; - return StateMachine; -}(); - -/** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @internal - */ -var AxesController = /*#__PURE__*/function () { - /** */ - function AxesController() { - var _this = this; - this._onAxesHold = function () { - _this._dragged = false; - }; - this._onAxesChange = function () { - var _a; - _this._dragged = !!((_a = _this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()); - }; - this._preventClickWhenDragged = function (e) { - if (_this._dragged) { - e.preventDefault(); - e.stopPropagation(); - } - _this._dragged = false; - }; - this._resetInternalValues(); - this._stateMachine = new StateMachine(); - } - var __proto = AxesController.prototype; - Object.defineProperty(__proto, "axes", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스 - * @type {Axes | null} - * @see https://naver.github.io/egjs-axes/docs/api/Axes - * @readonly - */ - get: function () { - return this._axes; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panInput", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스 - * @type {PanInput | null} - * @see https://naver.github.io/egjs-axes/docs/api/PanInput - * @readonly - */ - get: function () { - return this._panInput; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "stateMachine", { - /** - * @internal - */ - get: function () { - return this._stateMachine; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "state", { - /** - * A activated {@link State} that shows the current status of the user input or the animation - * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다 - * @type {State} - */ - get: function () { - return this._stateMachine.state; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animatingContext", { - /** - * A context of the current animation playing - * @ko 현재 재생중인 애니메이션 정보 - * @type {object} - * @property {number} start A start position of the animation애니메이션 시작 지점 - * @property {number} end A end position of the animation애니메이션 끝 지점 - * @property {number} offset camera offset카메라 오프셋 - * @readonly - */ - get: function () { - return this._animatingContext; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current control parameters of the Axes instance - * @ko 활성화된 현재 Axes 패러미터들 - * @type {ControlParams} - */ - get: function () { - var axes = this._axes; - if (!axes) { - return { - range: { - min: 0, - max: 0 - }, - position: 0, - circular: false - }; - } - var axis = axes.axis[POSITION_KEY]; - return { - range: { - min: axis.range[0], - max: axis.range[1] - }, - circular: axis.circular[0], - position: this.position - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "enabled", { - /** - * A Boolean indicating whether the user input is enabled - * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()) !== null && _b !== void 0 ? _b : false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값 - * @type {number} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.get([POSITION_KEY])[POSITION_KEY]) !== null && _b !== void 0 ? _b : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값 - * @type {number[]} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].range) !== null && _b !== void 0 ? _b : [0, 0]; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * Actual bounce size(px) - * @ko 적용된 bounce 크기(px 단위) - * @type {number[]} - * @readonly - */ - get: function () { - var _a; - return (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].bounce; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize AxesController - * @ko AxesController를 초기화합니다 - * @param {Flicking} flicking An instance of Flicking - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - var _a; - var _this = this; - this._flicking = flicking; - this._axes = new Axes((_a = {}, _a[POSITION_KEY] = { - range: [0, 0], - circular: false, - bounce: [0, 0] - }, _a), { - deceleration: flicking.deceleration, - interruptable: flicking.interruptable, - nested: flicking.nested, - easing: flicking.easing - }); - this._panInput = new PanInput(flicking.viewport.element, { - inputType: flicking.inputType, - threshold: 1, - iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold, - preventDefaultOnDrag: flicking.preventDefaultOnDrag, - scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1], - releaseOnScroll: true - }); - var axes = this._axes; - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], this._panInput); - var _loop_1 = function (key) { - var eventType = EVENT[key]; - axes.on(eventType, function (e) { - _this._stateMachine.fire(eventType, { - flicking: flicking, - axesEvent: e - }); - }); - }; - for (var key in EVENT) { - _loop_1(key); - } - return this; - }; - /** - * Destroy AxesController and return to initial state - * @ko AxesController를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - var _a; - if (this._axes) { - this.removePreventClickHandler(); - this._axes.destroy(); - } - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.destroy(); - this._resetInternalValues(); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @chainable - * @return {this} - */ - __proto.updateAnimation = function (position, duration) { - var _a; - var _b; - this._animatingContext = __assign(__assign({}, this._animatingContext), { - end: position - }); - (_b = this._axes) === null || _b === void 0 ? void 0 : _b.updateAnimation({ - destPos: (_a = {}, _a[POSITION_KEY] = position, _a), - duration: duration - }); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var _a; - (_a = this._axes) === null || _a === void 0 ? void 0 : _a.stopAnimation(); - return this; - }; - /** - * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before - * {@link AxesController#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.update = function (controlParams) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var axes = this._axes; - var axis = axes.axis[POSITION_KEY]; - axis.circular = [controlParams.circular, controlParams.circular]; - axis.range = [controlParams.range.min, controlParams.range.max]; - axis.bounce = parseBounce(flicking.bounce, camera.size); - axes.axisManager.set((_a = {}, _a[POSITION_KEY] = controlParams.position, _a)); - return this; - }; - /** - * Attach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다 - * @return {this} - */ - __proto.addPreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.on(EVENT.HOLD, this._onAxesHold); - axes.on(EVENT.CHANGE, this._onAxesChange); - cameraEl.addEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Detach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다 - * @return {this} - */ - __proto.removePreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.off(EVENT.HOLD, this._onAxesHold); - axes.off(EVENT.CHANGE, this._onAxesChange); - cameraEl.removeEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다. - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.animateTo = function (position, duration, axesEvent) { - var _this = this; - var _a; - var axes = this._axes; - var state = this._stateMachine.state; - if (!axes) { - return Promise.reject(new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING)); - } - var startPos = axes.get([POSITION_KEY])[POSITION_KEY]; - if (startPos === position) { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.lookAt(position); - if (state.targetPanel) { - flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (_a = axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) !== null && _a !== void 0 ? _a : false); - } - return Promise.resolve(); - } - this._animatingContext = { - start: startPos, - end: position, - offset: 0 - }; - var animate = function () { - var _a, _b; - var resetContext = function () { - _this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - }; - axes.once(EVENT.FINISH, resetContext); - if (axesEvent) { - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = position, _a), duration); - } else { - axes.setTo((_b = {}, _b[POSITION_KEY] = position, _b), duration); - } - }; - return new Promise(function (resolve, reject) { - var animationFinishHandler = function () { - axes.off(EVENT.HOLD, interruptionHandler); - resolve(); - }; - var interruptionHandler = function () { - axes.off(EVENT.FINISH, animationFinishHandler); - reject(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED)); - }; - axes.once(EVENT.FINISH, animationFinishHandler); - axes.once(EVENT.HOLD, interruptionHandler); - animate(); - }); - }; - __proto.updateDirection = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var panInput = this._panInput; - axes.disconnect(panInput); - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput); - panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1]; - }; - __proto._resetInternalValues = function () { - this._flicking = null; - this._axes = null; - this._panInput = null; - this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - this._dragged = false; - }; - return AxesController; -}(); - -/** - * A component that manages inputs and animation of Flicking - * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트 - */ -var Control = /*#__PURE__*/function () { - /** */ - function Control() { - this._flicking = null; - this._controller = new AxesController(); - this._activePanel = null; - } - var __proto = Control.prototype; - Object.defineProperty(__proto, "controller", { - /** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @type {AxesController} - * @readonly - */ - get: function () { - return this._controller; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activeIndex", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : -1; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePanel", { - /** - * An active panel - * @ko 현재 선택된 패널 - * @type {Panel | null} - * @readonly - */ - get: function () { - return this._activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.holding; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Control - * @ko Control을 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._controller.init(flicking); - return this; - }; - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._controller.destroy(); - this._flicking = null; - this._activePanel = null; - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - this._controller.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - this._controller.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - this._controller.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우 - * @return {this} - */ - __proto.updateAnimation = function (panel, duration, direction) { - var state = this._controller.state; - var position = this._getPosition(panel, direction !== null && direction !== void 0 ? direction : DIRECTION.NONE); - state.targetPanel = panel; - this._controller.updateAnimation(position, duration); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var state = this._controller.state; - state.targetPanel = null; - this._controller.stopAnimation(); - return this; - }; - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - camera.lookAt(camera.clampToReachablePosition(activePanel.position)); - } - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._controller.update(camera.controlParams); - return this; - }; - /** - * Reset {@link Control#activePanel activePanel} to `null` - * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다 - * @chainable - * @return {this} - */ - __proto.resetActive = function () { - this._activePanel = null; - return this; - }; - /** - * Move {@link Camera} to the given panel - * @ko {@link Camera}를 해당 패널 위로 이동합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {object} options An options object옵션 오브젝트 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveToPanel = function (panel, _a) { - var duration = _a.duration, - _b = _a.direction, - direction = _b === void 0 ? DIRECTION.NONE : _b, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var position; - return __generator(this, function (_c) { - position = this._getPosition(panel, direction); - this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction); - return [2 /*return*/, this._animateToPosition({ - position: position, - duration: duration, - newActivePanel: panel, - axesEvent: axesEvent - })]; - }); - }); - }; - /** - * @internal - */ - __proto.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - var _a; - var flicking = getFlickingAttached(this._flicking); - this._activePanel = newActivePanel; - this._nextPanel = null; - flicking.camera.updateAdaptiveHeight(); - if (newActivePanel !== prevActivePanel) { - flicking.trigger(new ComponentEvent(EVENTS.CHANGED, { - index: newActivePanel.index, - panel: newActivePanel, - prevIndex: (_a = prevActivePanel === null || prevActivePanel === void 0 ? void 0 : prevActivePanel.index) !== null && _a !== void 0 ? _a : -1, - prevPanel: prevActivePanel, - isTrusted: isTrusted, - direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE - })); - } else { - flicking.trigger(new ComponentEvent(EVENTS.RESTORED, { - isTrusted: isTrusted - })); - } - }; - /** - * @internal - */ - __proto.copy = function (control) { - this._flicking = control._flicking; - this._activePanel = control._activePanel; - this._controller = control._controller; - }; - __proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE; - var camera = flicking.camera; - var activePanel = this._activePanel; - var event = new ComponentEvent(triggeringEvent, { - index: panel.index, - panel: panel, - isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false, - direction: direction !== null && direction !== void 0 ? direction : getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position) - }); - this._nextPanel = panel; - flicking.trigger(event); - if (event.isCanceled()) { - throw new FlickingError(MESSAGE.STOP_CALLED_BY_USER, CODE.STOP_CALLED_BY_USER); - } - }; - __proto._animateToPosition = function (_a) { - var position = _a.position, - duration = _a.duration, - newActivePanel = _a.newActivePanel, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var flicking, animate, state; - var _this = this; - return __generator(this, function (_b) { - flicking = getFlickingAttached(this._flicking); - animate = function () { - return _this._controller.animateTo(position, duration, axesEvent); - }; - state = this._controller.state; - state.targetPanel = newActivePanel; - if (duration <= 0) { - return [2 /*return*/, animate()]; - } else { - return [2 /*return*/, animate().then(function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 /*yield*/, flicking.renderer.render()]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }).catch(function (err) { - if (axesEvent && err instanceof FlickingError && err.code === CODE.ANIMATION_INTERRUPTED) return; - throw err; - })]; - } - }); - }); - }; - - __proto._getPosition = function (panel, direction) { - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var position = panel.position; - var nearestAnchor = camera.findNearestAnchor(position); - if (panel.removed || !nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(panel.position), CODE.POSITION_NOT_REACHABLE); - } - if (!camera.canReach(panel)) { - // Override position & panel if that panel is not reachable - position = nearestAnchor.position; - panel = nearestAnchor.panel; - } else if (flicking.circularEnabled) { - // Circular mode is enabled, find nearest distance to panel - var camPos_1 = this._controller.position; // Actual position of the Axes - var camRangeDiff = camera.rangeDiff; - var possiblePositions = [position, position + camRangeDiff, position - camRangeDiff].filter(function (pos) { - if (direction === DIRECTION.NONE) return true; - return direction === DIRECTION.PREV ? pos <= camPos_1 : pos >= camPos_1; - }); - position = possiblePositions.reduce(function (nearestPosition, pos) { - if (Math.abs(camPos_1 - pos) < Math.abs(camPos_1 - nearestPosition)) { - return pos; - } else { - return nearestPosition; - } - }, Infinity); - } - return position; - }; - return Control; -}(); - -/** - * A data component that has actual position where the camera should be stopped at - * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트 - */ -var AnchorPoint = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 객체 - * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스 - * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표 - * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel} - */ - function AnchorPoint(_a) { - var index = _a.index, - position = _a.position, - panel = _a.panel; - this._index = index; - this._pos = position; - this._panel = panel; - } - var __proto = AnchorPoint.prototype; - Object.defineProperty(__proto, "index", { - /** - * Index of AnchorPoint - * @ko AnchorPoint의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of AnchorPoint - * @ko AnchorPoint의 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._pos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panel", { - /** - * A {@link Panel} instance AnchorPoint is referencing to - * @ko AnchorPoint가 참조하고 있는 {@link Panel} - * @type {Panel} - * @readonly - */ - get: function () { - return this._panel; - }, - enumerable: false, - configurable: true - }); - return AnchorPoint; -}(); - -/** - * A {@link Control} that uses a release momentum to choose destination panel - * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control} - */ -var SnapControl = /*#__PURE__*/function (_super) { - __extends(SnapControl, _super); - /** */ - function SnapControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? Infinity : _b; - var _this = _super.call(this) || this; - _this._count = count; - return _this; - } - var __proto = SnapControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels can go after release - * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수 - * @type {number} - * @default Infinity - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activeAnchor = camera.findActiveAnchor(); - var anchorAtCamera = camera.findNearestAnchor(camera.position); - var state = this._controller.state; - if (!activeAnchor || !anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor); - var posDelta = flicking.animating ? state.delta : position - camera.position; - var absPosDelta = Math.abs(posDelta); - var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta; - var targetAnchor; - if (snapDelta >= snapThreshold && snapDelta > 0) { - // Move to anchor at position - targetAnchor = this._findSnappedAnchor(position, anchorAtCamera); - } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) { - // Move to the adjacent panel - targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera); - } else { - // Fallback to nearest panel from current camera - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent); - return this._animateToPosition({ - position: camera.clampToReachablePosition(targetAnchor.position), - duration: duration, - newActivePanel: targetAnchor.panel, - axesEvent: axesEvent - }); - }; - __proto._findSnappedAnchor = function (position, anchorAtCamera) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var count = this._count; - var currentPos = camera.position; - var clampedPosition = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtCamera || !anchorAtPosition) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE); - } - if (!isFinite(count)) { - return anchorAtPosition; - } - var panelCount = flicking.panelCount; - var anchors = camera.anchorPoints; - var loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff); - if (position > currentPos && anchorAtPosition.index < anchorAtCamera.index || anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount += 1; - } else if (position < currentPos && anchorAtPosition.index > anchorAtCamera.index || anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount -= 1; - } - var circularIndexOffset = loopCount * panelCount; - var anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset; - if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) { - var anchor = anchors[anchorAtPosition.index]; - return new AnchorPoint({ - index: anchor.index, - position: anchor.position + loopCount * camera.rangeDiff, - panel: anchor.panel - }); - } - if (flicking.circularEnabled) { - var targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)]; - var loop = Math.floor(count / panelCount); - if (position > currentPos && targetAnchor.index < anchorAtCamera.index) { - loop += 1; - } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) { - loop -= 1; - } - return new AnchorPoint({ - index: targetAnchor.index, - position: targetAnchor.position + loop * camera.rangeDiff, - panel: targetAnchor.panel - }); - } else { - return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)]; - } - }; - __proto._findAdjacentAnchor = function (position, posDelta, anchorAtCamera) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - if (camera.circularEnabled) { - var anchorIncludePosition = camera.findAnchorIncludePosition(position); - if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) { - return anchorIncludePosition; - } - } - var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera; - return adjacentAnchor; - }; - __proto._calcSnapThreshold = function (threshold, position, activeAnchor) { - var isNextDirection = position > activeAnchor.position; - var panel = activeAnchor.panel; - var panelSize = panel.size; - var alignPos = panel.alignPosition; - // Minimum distance needed to decide prev/next panel as nearest - /* - * | Prev | Next | - * |<------>|<------------>| - * [ |<-Anchor ] - */ - return Math.max(threshold, isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev); - }; - return SnapControl; -}(Control); - -/** - * A {@link Control} that can be scrolled freely without alignment - * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control} - */ -var FreeControl = /*#__PURE__*/function (_super) { - __extends(FreeControl, _super); - /** */ - function FreeControl(_a) { - var _b = (_a === void 0 ? {} : _a).stopAtEdge, - stopAtEdge = _b === void 0 ? true : _b; - var _this = _super.call(this) || this; - _this._stopAtEdge = stopAtEdge; - return _this; - } - var __proto = FreeControl.prototype; - Object.defineProperty(__proto, "stopAtEdge", { - /** - * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area - * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._stopAtEdge; - }, - set: function (val) { - this._stopAtEdge = val; - }, - enumerable: false, - configurable: true - }); - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - var panelRange = activePanel.range; - var newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - camera.lookAt(camera.clampToReachablePosition(newPosition)); - } - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var targetPos = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(targetPos); - if (!anchorAtPosition) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var targetPanel = anchorAtPosition.panel; - // Trigger only change event - if (targetPanel !== this._activePanel) { - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - } - return this._animateToPosition({ - position: this._stopAtEdge ? targetPos : position, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - return FreeControl; -}(Control); - -/** - * A {@link Control} that allow you to select the maximum number of panels to move at a time - * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control} - */ -var StrictControl = /*#__PURE__*/function (_super) { - __extends(StrictControl, _super); - /** */ - function StrictControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? 1 : _b; - var _this = _super.call(this) || this; - _this.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - _super.prototype.setActive.call(_this, newActivePanel, prevActivePanel, isTrusted); - _this.updateInput(); - }; - _this._count = count; - _this._resetIndexRange(); - return _this; - } - var __proto = StrictControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels that can be moved at a time - * @ko 최대로 움직일 수 있는 패널의 개수 - * @type {number} - * @default 1 - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - _super.prototype.destroy.call(this); - this._resetIndexRange(); - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var renderer = flicking.renderer; - var controller = this._controller; - var controlParams = camera.controlParams; - var count = this._count; - var activePanel = controller.state.animating ? (_a = camera.findNearestAnchor(camera.position)) === null || _a === void 0 ? void 0 : _a.panel : this._activePanel; - if (!activePanel) { - controller.update(controlParams); - this._resetIndexRange(); - return this; - } - var cameraRange = controlParams.range; - var currentPos = activePanel.position; - var currentIndex = activePanel.index; - var panelCount = renderer.panelCount; - var prevPanelIndex = currentIndex - count; - var nextPanelIndex = currentIndex + count; - if (prevPanelIndex < 0) { - prevPanelIndex = flicking.circularEnabled ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount) : clamp(prevPanelIndex, 0, panelCount - 1); - } - if (nextPanelIndex >= panelCount) { - nextPanelIndex = flicking.circularEnabled ? nextPanelIndex % panelCount : clamp(nextPanelIndex, 0, panelCount - 1); - } - var prevPanel = renderer.panels[prevPanelIndex]; - var nextPanel = renderer.panels[nextPanelIndex]; - var prevPos = Math.max(prevPanel.position, cameraRange.min); - var nextPos = Math.min(nextPanel.position, cameraRange.max); - if (prevPos > currentPos) { - prevPos -= camera.rangeDiff; - } - if (nextPos < currentPos) { - nextPos += camera.rangeDiff; - } - controlParams.range = { - min: prevPos, - max: nextPos - }; - if (controlParams.circular) { - if (controlParams.position < prevPos) { - controlParams.position += camera.rangeDiff; - } - if (controlParams.position > nextPos) { - controlParams.position -= camera.rangeDiff; - } - } - controlParams.circular = false; - controller.update(controlParams); - this._indexRange = { - min: prevPanel.index, - max: nextPanel.index - }; - return this; - }; - __proto.moveToPanel = function (panel, options) { - return __awaiter(this, void 0, void 0, function () { - var flicking, camera, controller; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - camera = flicking.camera; - controller = this._controller; - controller.update(camera.controlParams); - return [2 /*return*/, _super.prototype.moveToPanel.call(this, panel, options)]; - }); - }); - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var currentPanel = (_a = this._nextPanel) !== null && _a !== void 0 ? _a : this._activePanel; - var axesRange = this._controller.range; - var indexRange = this._indexRange; - var cameraRange = camera.range; - var state = this._controller.state; - var clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtPosition || !currentPanel) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var prevPos = currentPanel.position; - var posDelta = flicking.animating ? state.delta : position - camera.position; - var isOverThreshold = Math.abs(posDelta) >= flicking.threshold; - var adjacentAnchor = position > prevPos ? camera.getNextAnchor(anchorAtPosition) : camera.getPrevAnchor(anchorAtPosition); - var targetPos; - var targetPanel; - var anchors = camera.anchorPoints; - var firstAnchor = anchors[0]; - var lastAnchor = anchors[anchors.length - 1]; - var shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max); - var shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max); - var isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max) : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max); - if (shouldBounceToFirst || shouldBounceToLast) { - // In bounce area - var targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor; - targetPanel = targetAnchor.panel; - targetPos = targetAnchor.position; - } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) { - // Move to anchor at position - targetPanel = anchorAtPosition.panel; - targetPos = anchorAtPosition.position; - } else if (isOverThreshold && isAdjacent) { - // Move to adjacent anchor - targetPanel = adjacentAnchor.panel; - targetPos = adjacentAnchor.position; - } else { - // Fallback to nearest panel from current camera - var anchorAtCamera = camera.findNearestAnchor(camera.position); - if (!anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - return this._animateToPosition({ - position: targetPos, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - __proto._resetIndexRange = function () { - this._indexRange = { - min: 0, - max: 0 - }; - }; - return StrictControl; -}(Control); - -/** - * A mode of camera - */ -var CameraMode = /*#__PURE__*/function () { - /** */ - function CameraMode(flicking) { - this._flicking = flicking; - } - var __proto = CameraMode.prototype; - __proto.getAnchors = function () { - var panels = this._flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findAnchorIncludePosition = function (position) { - var anchors = this._flicking.camera.anchorPoints; - var anchorsIncludingPosition = anchors.filter(function (anchor) { - return anchor.panel.includePosition(position, true); - }); - return anchorsIncludingPosition.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - }; - __proto.findNearestAnchor = function (position) { - var anchors = this._flicking.camera.anchorPoints; - if (anchors.length <= 0) return null; - var prevDist = Infinity; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.abs(anchor.position - position); - if (dist > prevDist) { - // Return previous anchor - return anchors[anchorIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return anchors[anchors.length - 1]; - }; - __proto.clampToReachablePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - return clamp(position, range.min, range.max); - }; - __proto.getCircularOffset = function () { - return 0; - }; - __proto.canReach = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - if (panel.removed) return false; - var panelPos = panel.position; - return panelPos >= range.min && panelPos <= range.max; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var visibleRange = camera.visibleRange; - // Should not include margin, as we don't declare what the margin is visible as what the panel is visible. - return panel.isVisibleOnRange(visibleRange.min, visibleRange.max); - }; - return CameraMode; -}(); - -var LinearCameraMode = /*#__PURE__*/function (_super) { - __extends(LinearCameraMode, _super); - function LinearCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = LinearCameraMode.prototype; - __proto.checkAvailability = function () { - // It's always available - return true; - }; - __proto.getRange = function () { - var _a, _b; - var renderer = this._flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - return { - min: (_a = firstPanel === null || firstPanel === void 0 ? void 0 : firstPanel.position) !== null && _a !== void 0 ? _a : 0, - max: (_b = lastPanel === null || lastPanel === void 0 ? void 0 : lastPanel.position) !== null && _b !== void 0 ? _b : 0 - }; - }; - return LinearCameraMode; -}(CameraMode); - -/** - * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop - * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드 - */ -var CircularCameraMode = /*#__PURE__*/function (_super) { - __extends(CircularCameraMode, _super); - function CircularCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = CircularCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var panels = renderer.panels; - if (panels.length <= 0) { - return false; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - var visibleSize = flicking.camera.size; - var panelSizeSum = lastPanelNext - firstPanelPrev; - var canSetCircularMode = panels.every(function (panel) { - return panelSizeSum - panel.size >= visibleSize; - }); - return canSetCircularMode; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return { - min: 0, - max: 0 - }; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - return { - min: firstPanelPrev, - max: lastPanelNext - }; - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findNearestAnchor = function (position) { - var camera = this._flicking.camera; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - var camRange = camera.range; - var minDist = Infinity; - var minDistIndex = -1; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.min(Math.abs(anchor.position - position), Math.abs(anchor.position - camRange.min + camRange.max - position), Math.abs(position - camRange.min + camRange.max - anchor.position)); - if (dist < minDist) { - minDist = dist; - minDistIndex = anchorIdx; - } - } - // Return last anchor - return anchors[minDistIndex]; - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - var rangeDiff = camera.rangeDiff; - var anchorCount = anchors.length; - var positionInRange = circulatePosition(position, range.min, range.max); - var anchorInRange = _super.prototype.findAnchorIncludePosition.call(this, positionInRange); - if (anchorCount > 0 && (position === range.min || position === range.max)) { - var possibleAnchors = [anchorInRange, new AnchorPoint({ - index: 0, - position: anchors[0].position + rangeDiff, - panel: anchors[0].panel - }), new AnchorPoint({ - index: anchorCount - 1, - position: anchors[anchorCount - 1].position - rangeDiff, - panel: anchors[anchorCount - 1].panel - })].filter(function (anchor) { - return !!anchor; - }); - anchorInRange = possibleAnchors.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - } - if (!anchorInRange) return null; - if (position < range.min) { - var loopCount = -Math.floor((range.min - position) / rangeDiff) - 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } else if (position > range.max) { - var loopCount = Math.floor((position - range.max) / rangeDiff) + 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } - return anchorInRange; - }; - __proto.getCircularOffset = function () { - var flicking = this._flicking; - var camera = flicking.camera; - if (!camera.circularEnabled) return 0; - var toggled = flicking.panels.filter(function (panel) { - return panel.toggled; - }); - var toggledPrev = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.NEXT; - }); - return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext); - }; - __proto.clampToReachablePosition = function (position) { - // Basically all position is reachable for circular camera - return position; - }; - __proto.canReach = function (panel) { - if (panel.removed) return false; - // Always reachable on circular mode - return true; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - var rangeDiff = camera.rangeDiff; - var visibleRange = camera.visibleRange; - var visibleInCurrentRange = _super.prototype.canSee.call(this, panel); - // Check looped visible area for circular case - if (visibleRange.min < range.min) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff); - } else if (visibleRange.max > range.max) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff); - } - return visibleInCurrentRange; - }; - __proto._calcPanelAreaSum = function (panels) { - return panels.reduce(function (sum, panel) { - return sum + panel.sizeIncludingMargin; - }, 0); - }; - return CircularCameraMode; -}(CameraMode); - -var BoundCameraMode = /*#__PURE__*/function (_super) { - __extends(BoundCameraMode, _super); - function BoundCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = BoundCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return false; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - return isBiggerThanViewport; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var alignPos = flicking.camera.alignPosition; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return { - min: 0, - max: 0 - }; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - var firstPos = firstPanelPrev + alignPos; - var lastPos = lastPanelNext - viewportSize + alignPos; - if (isBiggerThanViewport) { - return { - min: firstPos, - max: lastPos - }; - } else { - var align = flicking.camera.align; - var alignVal = typeof align === "object" ? align.camera : align; - var pos = firstPos + parseAlign$1(alignVal, lastPos - firstPos); - return { - min: pos, - max: pos - }; - } - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var camera = flicking.camera; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return []; - } - var range = flicking.camera.range; - var reachablePanels = panels.filter(function (panel) { - return camera.canReach(panel); - }); - if (reachablePanels.length > 0) { - var shouldPrependBoundAnchor = reachablePanels[0].position !== range.min; - var shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max; - var indexOffset_1 = shouldPrependBoundAnchor ? 1 : 0; - var newAnchors = reachablePanels.map(function (panel, idx) { - return new AnchorPoint({ - index: idx + indexOffset_1, - position: panel.position, - panel: panel - }); - }); - if (shouldPrependBoundAnchor) { - newAnchors.splice(0, 0, new AnchorPoint({ - index: 0, - position: range.min, - panel: panels[reachablePanels[0].index - 1] - })); - } - if (shouldAppendBoundAnchor) { - newAnchors.push(new AnchorPoint({ - index: newAnchors.length, - position: range.max, - panel: panels[reachablePanels[reachablePanels.length - 1].index + 1] - })); - } - return newAnchors; - } else if (range.min !== range.max) { - // There're more than 2 panels - var nearestPanelAtMin = this._findNearestPanel(range.min, panels); - var panelAtMin = nearestPanelAtMin.index === panels.length - 1 ? nearestPanelAtMin.prev() : nearestPanelAtMin; - var panelAtMax = panelAtMin.next(); - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: panelAtMin - }), new AnchorPoint({ - index: 1, - position: range.max, - panel: panelAtMax - })]; - } else { - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: this._findNearestPanel(range.min, panels) - })]; - } - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - if (position <= range.min) { - return anchors[0]; - } else if (position >= range.max) { - return anchors[anchors.length - 1]; - } else { - return _super.prototype.findAnchorIncludePosition.call(this, position); - } - }; - __proto._findNearestPanel = function (pos, panels) { - var prevDist = Infinity; - for (var panelIdx = 0; panelIdx < panels.length; panelIdx++) { - var panel = panels[panelIdx]; - var dist = Math.abs(panel.position - pos); - if (dist > prevDist) { - // Return previous anchor - return panels[panelIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return panels[panels.length - 1]; - }; - return BoundCameraMode; -}(CameraMode); - -/** - * A component that manages actual movement inside the viewport - * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트 - */ -var Camera = /*#__PURE__*/function () { - /** */ - function Camera(flicking, _a) { - var _this = this; - var _b = (_a === void 0 ? {} : _a).align, - align = _b === void 0 ? ALIGN.CENTER : _b; - this._checkTranslateSupport = function () { - var e_1, _a; - var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"]; - var supportedStyle = document.documentElement.style; - var transformName = ""; - try { - for (var transforms_1 = __values(transforms), transforms_1_1 = transforms_1.next(); !transforms_1_1.done; transforms_1_1 = transforms_1.next()) { - var prefixedTransform = transforms_1_1.value; - if (prefixedTransform in supportedStyle) { - transformName = prefixedTransform; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (transforms_1_1 && !transforms_1_1.done && (_a = transforms_1.return)) _a.call(transforms_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (!transformName) { - throw new FlickingError(MESSAGE.TRANSFORM_NOT_SUPPORTED, CODE.TRANSFORM_NOT_SUPPORTED); - } - _this._transform = transformName; - }; - this._flicking = flicking; - this._resetInternalValues(); - // Options - this._align = align; - } - var __proto = Camera.prototype; - Object.defineProperty(__proto, "element", { - // Internal states getter - /** - * The camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`) - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "children", { - /** - * An array of the child elements of the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열 - * @type {HTMLElement[]} - * @readonly - */ - get: function () { - return toArray(this._el.children); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position of the camera - * @ko Camera의 현재 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._position; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at - * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option - * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다. - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._offset - this._circularOffset; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "mode", { - /** - * A current camera mode - * @type {CameraMode} - * @readonly - */ - get: function () { - return this._mode; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * A range that Camera's {@link Camera#position position} can reach - * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} max A maximum position최대 위치 - * @readonly - */ - get: function () { - return this._range; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rangeDiff", { - /** - * A difference between Camera's minimum and maximum position that can reach - * @ko Camera가 도달 가능한 최소/최대 좌표의 차이 - * @type {number} - * @readonly - */ - get: function () { - return this._range.max - this._range.min; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * An array of visible panels from the current position - * @ko 현재 보이는 패널들의 배열 - * @type {Panel[]} - * @readonly - */ - get: function () { - return this._visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRange", { - /** - * A range of the visible area from the current position - * @ko 현재 위치에서 보이는 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} min A maximum position최대 위치 - * @readonly - */ - get: function () { - return { - min: this._position - this._alignPos, - max: this._position - this._alignPos + this.size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "anchorPoints", { - /** - * An array of {@link AnchorPoint}s that Camera can be stopped at - * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록 - * @type {AnchorPoint[]} - * @readonly - */ - get: function () { - return this._anchors; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current parameters of the Camera for updating {@link AxesController} - * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들 - * @type {ControlParams} - * @readonly - */ - get: function () { - return { - range: this._range, - position: this._position, - circular: this._circularEnabled - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "atEdge", { - /** - * A Boolean value indicating whether Camera's over the minimum or maximum position reachable - * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다 - * @type {boolean} - * @readonly - */ - get: function () { - return this._position <= this._range.min || this._position >= this._range.max; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Return the size of the viewport - * @ko 뷰포트 크기를 반환합니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return flicking ? flicking.horizontal ? flicking.viewport.width : flicking.viewport.height : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Return the camera's position progress from the first panel to last panel - * Range is from 0 to last panel's index - * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다 - * 범위는 0부터 마지막 패널의 인덱스까지입니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var position = this._position + this._offset; - var nearestAnchor = this.findNearestAnchor(this._position); - if (!flicking || !nearestAnchor) { - return NaN; - } - var nearestPanel = nearestAnchor.panel; - var panelPos = nearestPanel.position + nearestPanel.offset; - var bounceSize = flicking.control.controller.bounce; - var _a = this.range, - prevRange = _a.min, - nextRange = _a.max; - var rangeDiff = this.rangeDiff; - if (position === panelPos) { - return nearestPanel.index; - } - if (position < panelPos) { - var prevPanel = nearestPanel.prev(); - var prevPosition = prevPanel ? prevPanel.position + prevPanel.offset : prevRange - bounceSize[0]; - // Looped - if (prevPosition > panelPos) { - prevPosition -= rangeDiff; - } - return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos); - } else { - var nextPanel = nearestPanel.next(); - var nextPosition = nextPanel ? nextPanel.position + nextPanel.offset : nextRange + bounceSize[1]; - // Looped - if (nextPosition < panelPos) { - nextPosition += rangeDiff; - } - return nearestPanel.index + getProgress(position, panelPos, nextPosition); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelOrder", { - /** - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성 - * @type {string} - * @readonly - */ - get: function () { - return this._panelOrder; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element - * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Camera - * @ko Camera를 초기화합니다 - * @throws {FlickingError} - * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element - * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우 - * @return {this} - */ - __proto.init = function () { - var viewportEl = this._flicking.viewport.element; - checkExistence(viewportEl.firstElementChild, "First element child of the viewport element"); - this._el = viewportEl.firstElementChild; - this._checkTranslateSupport(); - this._updateMode(); - this.updatePanelOrder(); - return this; - }; - /** - * Destroy Camera and return to initial state - * @ko Camera를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalValues(); - return this; - }; - /** - * Move to the given position and apply CSS transform - * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다 - * @param {number} pos A new position움직일 위치 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.lookAt = function (pos) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var prevPos = this._position; - this._position = pos; - var toggled = this._togglePanels(prevPos, pos); - this._refreshVisiblePanels(); - this._checkNeedPanel(); - this._checkReachEnd(prevPos, pos); - if (toggled) { - void flicking.renderer.render().then(function () { - _this.updateOffset(); - }); - } else { - this.applyTransform(); - } - }; - /** - * Return a previous {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint} - */ - __proto.getPrevAnchor = function (anchor) { - if (!this._circularEnabled || anchor.index !== 0) { - return this._anchors[anchor.index - 1] || null; - } else { - var anchors = this._anchors; - var rangeDiff = this.rangeDiff; - var lastAnchor = anchors[anchors.length - 1]; - return new AnchorPoint({ - index: lastAnchor.index, - position: lastAnchor.position - rangeDiff, - panel: lastAnchor.panel - }); - } - }; - /** - * Return a next {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint} - */ - __proto.getNextAnchor = function (anchor) { - var anchors = this._anchors; - if (!this._circularEnabled || anchor.index !== anchors.length - 1) { - return anchors[anchor.index + 1] || null; - } else { - var rangeDiff = this.rangeDiff; - var firstAnchor = anchors[0]; - return new AnchorPoint({ - index: firstAnchor.index, - position: firstAnchor.position + rangeDiff, - panel: firstAnchor.panel - }); - } - }; - /** - * Return the camera's position progress in the panel below - * Value is from 0 to 1 when the camera's inside panel - * Value can be lower than 0 or bigger than 1 when it's in the margin area - * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다 - * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다 - * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다 - */ - __proto.getProgressInPanel = function (panel) { - var panelRange = panel.range; - return (this._position - panelRange.min) / (panelRange.max - panelRange.min); - }; - /** - * Return {@link AnchorPoint} that includes given position - * If there's no {@link AnchorPoint} that includes the given position, return `null` instead - * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다 - * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint} - */ - __proto.findAnchorIncludePosition = function (position) { - return this._mode.findAnchorIncludePosition(position); - }; - /** - * Return {@link AnchorPoint} nearest to given position - * If there're no {@link AnchorPoint}s, return `null` instead - * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다 - * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint} - */ - __proto.findNearestAnchor = function (position) { - return this._mode.findNearestAnchor(position); - }; - /** - * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel} - * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다 - * @return {AnchorPoint | null} - */ - __proto.findActiveAnchor = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!activePanel) return null; - return (_a = find(this._anchors, function (anchor) { - return anchor.panel.index === activePanel.index; - })) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position); - }; - /** - * Clamp the given position between camera's range - * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다 - * @param {number} position A position to clamp범위를 제한할 좌표 - * @return {number} A clamped position범위 제한된 좌표 - */ - __proto.clampToReachablePosition = function (position) { - return this._mode.clampToReachablePosition(position); - }; - /** - * Check whether the given panel is inside of the Camera's range - * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부 - */ - __proto.canReach = function (panel) { - return this._mode.canReach(panel); - }; - /** - * Check whether the given panel element is visible at the current position - * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부 - */ - __proto.canSee = function (panel) { - return this._mode.canSee(panel); - }; - /** - * Update {@link Camera#range range} of Camera - * @ko Camera의 {@link Camera#range range}를 업데이트합니다 - * @method - * @abstract - * @memberof Camera - * @instance - * @name updateRange - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.updateRange = function () { - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - var panels = renderer.panels; - this._updateMode(); - this._range = this._mode.getRange(); - panels.forEach(function (panel) { - return panel.updateCircularToggleDirection(); - }); - return this; - }; - /** - * Update Camera's {@link Camera#alignPosition alignPosition} - * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateAlignPos = function () { - var align = this._align; - var alignVal = typeof align === "object" ? align.camera : align; - this._alignPos = parseAlign$1(alignVal, this.size); - return this; - }; - /** - * Update Camera's {@link Camera#anchorPoints anchorPoints} - * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAnchors = function () { - this._anchors = this._mode.getAnchors(); - return this; - }; - /** - * Update Viewport's height to active panel's height - * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAdaptiveHeight = function () { - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!flicking.horizontal || !flicking.adaptive || !activePanel) return; - flicking.viewport.setSize({ - height: activePanel.height - }); - }; - /** - * Update current offset of the camera - * @ko 현재 카메라의 오프셋을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateOffset = function () { - var flicking = getFlickingAttached(this._flicking); - var position = this._position; - var unRenderedPanels = flicking.panels.filter(function (panel) { - return !panel.rendered; - }); - this._offset = unRenderedPanels.filter(function (panel) { - return panel.position + panel.offset < position; - }).reduce(function (offset, panel) { - return offset + panel.sizeIncludingMargin; - }, 0); - this._circularOffset = this._mode.getCircularOffset(); - this.applyTransform(); - return this; - }; - /** - * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element - * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다 - * @return {this} - */ - __proto.updatePanelOrder = function () { - var flicking = getFlickingAttached(this._flicking); - if (!flicking.horizontal) return this; - var el = this._el; - var direction = getStyle(el).direction; - if (direction !== this._panelOrder) { - this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR; - if (flicking.initialized) { - flicking.control.controller.updateDirection(); - } - } - return this; - }; - /** - * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again - * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다 - * @chainable - * @return {this} - */ - __proto.resetNeedPanelHistory = function () { - this._needPanelTriggered = { - prev: false, - next: false - }; - return this; - }; - /** - * Apply "transform" style with the current position to camera element - * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다. - * @return {this} - */ - __proto.applyTransform = function () { - var el = this._el; - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - if (renderer.rendering || !flicking.initialized) return this; - var actualPosition = this._position - this._alignPos - this._offset + this._circularOffset; - el.style[this._transform] = flicking.horizontal ? "translate(" + (this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition) + "px)" : "translate(0, " + -actualPosition + "px)"; - return this; - }; - __proto._resetInternalValues = function () { - this._position = 0; - this._alignPos = 0; - this._offset = 0; - this._circularOffset = 0; - this._circularEnabled = false; - this._range = { - min: 0, - max: 0 - }; - this._visiblePanels = []; - this._anchors = []; - this._needPanelTriggered = { - prev: false, - next: false - }; - }; - __proto._refreshVisiblePanels = function () { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var newVisiblePanels = panels.filter(function (panel) { - return _this.canSee(panel); - }); - var prevVisiblePanels = this._visiblePanels; - this._visiblePanels = newVisiblePanels; - var added = newVisiblePanels.filter(function (panel) { - return !includes(prevVisiblePanels, panel); - }); - var removed = prevVisiblePanels.filter(function (panel) { - return !includes(newVisiblePanels, panel); - }); - if (added.length > 0 || removed.length > 0) { - void flicking.renderer.render().then(function () { - flicking.trigger(new ComponentEvent(EVENTS.VISIBLE_CHANGE, { - added: added, - removed: removed, - visiblePanels: newVisiblePanels - })); - }); - } - }; - __proto._checkNeedPanel = function () { - var needPanelTriggered = this._needPanelTriggered; - if (needPanelTriggered.prev && needPanelTriggered.next) return; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - if (!needPanelTriggered.prev) { - flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - if (!needPanelTriggered.next) { - flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - return; - } - var cameraPosition = this._position; - var cameraSize = this.size; - var cameraRange = this._range; - var needPanelThreshold = flicking.needPanelThreshold; - var cameraPrev = cameraPosition - this._alignPos; - var cameraNext = cameraPrev + cameraSize; - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - if (!needPanelTriggered.prev) { - var firstPanelPrev = firstPanel.range.min; - if (cameraPrev <= firstPanelPrev + needPanelThreshold || cameraPosition <= cameraRange.min + needPanelThreshold) { - flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - } - if (!needPanelTriggered.next) { - var lastPanelNext = lastPanel.range.max; - if (cameraNext >= lastPanelNext - needPanelThreshold || cameraPosition >= cameraRange.max - needPanelThreshold) { - flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - } - }; - __proto._checkReachEnd = function (prevPos, newPos) { - var flicking = getFlickingAttached(this._flicking); - var range = this._range; - var wasBetweenRange = prevPos > range.min && prevPos < range.max; - var isBetweenRange = newPos > range.min && newPos < range.max; - if (!wasBetweenRange || isBetweenRange) return; - var direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT; - flicking.trigger(new ComponentEvent(EVENTS.REACH_EDGE, { - direction: direction - })); - }; - __proto._updateMode = function () { - var flicking = getFlickingAttached(this._flicking); - if (flicking.circular) { - var circularMode = new CircularCameraMode(flicking); - var canSetCircularMode = circularMode.checkAvailability(); - if (canSetCircularMode) { - this._mode = circularMode; - } else { - var fallbackMode = flicking.circularFallback; - this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - } - this._circularEnabled = canSetCircularMode; - } else { - this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - this._circularEnabled = false; - } - }; - __proto._togglePanels = function (prevPos, pos) { - if (pos === prevPos) return false; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var toggled = panels.map(function (panel) { - return panel.toggle(prevPos, pos); - }); - return toggled.some(function (isToggled) { - return isToggled; - }); - }; - return Camera; -}(); - -/** - * A component that manages {@link Panel} and its elements - * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트 - */ -var Renderer = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {Constants.ALIGN | string | number} [options.align="center"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값 - * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈) - */ - function Renderer(_a) { - var _b = _a.align, - align = _b === void 0 ? ALIGN.CENTER : _b, - strategy = _a.strategy; - this._flicking = null; - this._panels = []; - this._rendering = false; - // Bind options - this._align = align; - this._strategy = strategy; - } - var __proto = Renderer.prototype; - Object.defineProperty(__proto, "panels", { - // Internal states Getter - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendering", { - /** - * A boolean value indicating whether rendering is in progress - * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부 - * @type {boolean} - * @readonly - * @internal - */ - get: function () { - return this._rendering; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._panels.length; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "strategy", { - /** - * @internal - */ - get: function () { - return this._strategy; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A {@link Panel}'s {@link Panel#align align} value that applied to all panels - * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - var panelAlign = parsePanelAlign(val); - this._panels.forEach(function (panel) { - panel.align = panelAlign; - }); - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Renderer - * @ko Renderer를 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._collectPanels(); - return this; - }; - /** - * Destroy Renderer and return to initial state - * @ko Renderer를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._flicking = null; - this._panels = []; - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - */ - __proto.getPanel = function (index) { - return this._panels[index] || null; - }; - __proto.forceRenderAllPanels = function () { - this._panels.forEach(function (panel) { - return panel.markForShow(); - }); - return Promise.resolve(); - }; - /** - * Update all panel sizes - * @ko 모든 패널의 크기를 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updatePanelSize = function () { - var flicking = getFlickingAttached(this._flicking); - var panels = this._panels; - if (panels.length <= 0) return this; - if (flicking.panelsPerView > 0) { - var firstPanel = panels[0]; - firstPanel.resize(); - this._updatePanelSizeByGrid(firstPanel, panels); - } else { - flicking.panels.forEach(function (panel) { - return panel.resize(); - }); - } - return this; - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {Array} items An array of items to insert추가할 아이템들의 배열 - * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열 - * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - */ - __proto.batchInsert = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsInserted = this.batchInsertDefer.apply(this, __spread(items)); - if (allPanelsInserted.length <= 0) return []; - this.updateAfterPanelChange(allPanelsInserted, []); - return allPanelsInserted; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchInsertDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var prevFirstPanel = panels[0]; - var align = parsePanelAlign(this._align); - var allPanelsInserted = items.reduce(function (addedPanels, item) { - var _a; - var insertingIdx = getMinusCompensatedIndex(item.index, panels.length); - var panelsPushed = panels.slice(insertingIdx); - var panelsInserted = item.elements.map(function (el, idx) { - return _this._createPanel(el, { - index: insertingIdx + idx, - align: align, - flicking: flicking - }); - }); - panels.splice.apply(panels, __spread([insertingIdx, 0], panelsInserted)); - if (item.hasDOMInElements) { - // Insert the actual elements as camera element's children - _this._insertPanelElements(panelsInserted, (_a = panelsPushed[0]) !== null && _a !== void 0 ? _a : null); - } - // Resize the newly added panels - if (flicking.panelsPerView > 0) { - var firstPanel = prevFirstPanel || panelsInserted[0].resize(); - _this._updatePanelSizeByGrid(firstPanel, panelsInserted); - } else { - panelsInserted.forEach(function (panel) { - return panel.resize(); - }); - } - // Update panel indexes & positions - panelsPushed.forEach(function (panel) { - panel.increaseIndex(panelsInserted.length); - panel.updatePosition(); - }); - return __spread(addedPanels, panelsInserted); - }, []); - return allPanelsInserted; - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {Array} items An array of items to remove제거할 아이템들의 배열 - * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스 - * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다 - * @return An array of removed panels제거된 패널들의 배열 - */ - __proto.batchRemove = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsRemoved = this.batchRemoveDefer.apply(this, __spread(items)); - if (allPanelsRemoved.length <= 0) return []; - this.updateAfterPanelChange([], allPanelsRemoved); - return allPanelsRemoved; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchRemoveDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var control = flicking.control; - var activePanel = control.activePanel; - var allPanelsRemoved = items.reduce(function (removed, item) { - var index = item.index, - deleteCount = item.deleteCount; - var removingIdx = getMinusCompensatedIndex(index, panels.length); - var panelsPulled = panels.slice(removingIdx + deleteCount); - var panelsRemoved = panels.splice(removingIdx, deleteCount); - if (panelsRemoved.length <= 0) return []; - // Update panel indexes & positions - panelsPulled.forEach(function (panel) { - panel.decreaseIndex(panelsRemoved.length); - panel.updatePosition(); - }); - if (item.hasDOMInElements) { - _this._removePanelElements(panelsRemoved); - } - // Remove panel elements - panelsRemoved.forEach(function (panel) { - return panel.destroy(); - }); - if (includes(panelsRemoved, activePanel)) { - control.resetActive(); - } - return __spread(removed, panelsRemoved); - }, []); - return allPanelsRemoved; - }; - /** - * @internal - */ - __proto.updateAfterPanelChange = function (panelsAdded, panelsRemoved) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - var panels = this._panels; - var activePanel = control.activePanel; - // Update camera & control - this._updateCameraAndControl(); - void this.render(); - if (!flicking.animating) { - if (!activePanel || activePanel.removed) { - if (panels.length <= 0) { - // All panels removed - camera.lookAt(0); - } else { - var targetIndex = (_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.index) !== null && _a !== void 0 ? _a : 0; - if (targetIndex > panels.length - 1) { - targetIndex = panels.length - 1; - } - void control.moveToPanel(panels[targetIndex], { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } else { - void control.moveToPanel(activePanel, { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } - flicking.camera.updateOffset(); - if (panelsAdded.length > 0 || panelsRemoved.length > 0) { - flicking.trigger(new ComponentEvent(EVENTS.PANEL_CHANGE, { - added: panelsAdded, - removed: panelsRemoved - })); - this.checkPanelContentsReady(__spread(panelsAdded, panelsRemoved)); - } - }; - /** - * @internal - */ - __proto.checkPanelContentsReady = function (checkingPanels) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var resizeOnContentsReady = flicking.resizeOnContentsReady; - var panels = this._panels; - if (!resizeOnContentsReady || flicking.virtualEnabled) return; - var hasContents = function (panel) { - return panel.element && !!panel.element.querySelector("img, video"); - }; - checkingPanels = checkingPanels.filter(function (panel) { - return hasContents(panel); - }); - if (checkingPanels.length <= 0) return; - var contentsReadyChecker = new ImReady(); - checkingPanels.forEach(function (panel) { - panel.loading = true; - }); - contentsReadyChecker.on("readyElement", function (e) { - if (!_this._flicking) { - // Renderer's destroy() is called before - contentsReadyChecker.destroy(); - return; - } - var panel = checkingPanels[e.index]; - var camera = flicking.camera; - var control = flicking.control; - var prevProgressInPanel = control.activePanel ? camera.getProgressInPanel(control.activePanel) : 0; - panel.loading = false; - panel.resize(); - panels.slice(panel.index + 1).forEach(function (panelBehind) { - return panelBehind.updatePosition(); - }); - if (!flicking.initialized) return; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - }); - contentsReadyChecker.on("preReady", function (e) { - if (_this._flicking) { - void _this.render(); - } - if (e.readyCount === e.totalCount) { - contentsReadyChecker.destroy(); - } - }); - contentsReadyChecker.on("ready", function () { - if (_this._flicking) { - void _this.render(); - } - contentsReadyChecker.destroy(); - }); - contentsReadyChecker.check(checkingPanels.map(function (panel) { - return panel.element; - })); - }; - __proto._updateCameraAndControl = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - camera.resetNeedPanelHistory(); - control.updateInput(); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - }; - __proto._updatePanelSizeByGrid = function (referencePanel, panels) { - var flicking = getFlickingAttached(this._flicking); - var panelsPerView = flicking.panelsPerView; - if (panelsPerView <= 0) { - throw new FlickingError(MESSAGE.WRONG_OPTION("panelsPerView", panelsPerView), CODE.WRONG_OPTION); - } - if (panels.length <= 0) return; - var viewportSize = flicking.camera.size; - var gap = referencePanel.margin.prev + referencePanel.margin.next; - var panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView; - var panelSizeObj = flicking.horizontal ? { - width: panelSize - } : { - height: panelSize - }; - var firstPanelSizeObj = __assign({ - size: panelSize, - margin: referencePanel.margin - }, !flicking.horizontal && { - height: referencePanel.height - }); - if (!flicking.noPanelStyleOverride) { - this._strategy.updatePanelSizes(flicking, panelSizeObj); - } - flicking.panels.forEach(function (panel) { - return panel.resize(firstPanelSizeObj); - }); - }; - __proto._removeAllChildsFromCamera = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove other elements - while (cameraElement.firstChild) { - cameraElement.removeChild(cameraElement.firstChild); - } - }; - __proto._insertPanelElements = function (panels, nextSibling) { - if (nextSibling === void 0) { - nextSibling = null; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var cameraElement = camera.element; - var nextSiblingElement = (nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.element) || null; - var fragment = document.createDocumentFragment(); - panels.forEach(function (panel) { - return fragment.appendChild(panel.element); - }); - cameraElement.insertBefore(fragment, nextSiblingElement); - }; - __proto._removePanelElements = function (panels) { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - panels.forEach(function (panel) { - cameraElement.removeChild(panel.element); - }); - }; - __proto._afterRender = function () { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.applyTransform(); - }; - return Renderer; -}(); - -/** - * - */ -var VanillaRenderer = /*#__PURE__*/function (_super) { - __extends(VanillaRenderer, _super); - function VanillaRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - // eslint-disable-next-line @typescript-eslint/require-await - var __proto = VanillaRenderer.prototype; - __proto.render = function () { - return __awaiter(this, void 0, void 0, function () { - var flicking, strategy; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - strategy = this._strategy; - strategy.updateRenderingPanels(flicking); - strategy.renderPanels(flicking); - this._resetPanelElementOrder(); - this._afterRender(); - return [2 /*return*/]; - }); - }); - }; - - __proto._collectPanels = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._removeAllTextNodes(); - this._panels = this._strategy.collectPanels(flicking, camera.children); - }; - __proto._createPanel = function (el, options) { - return this._strategy.createPanel(el, options); - }; - __proto._resetPanelElementOrder = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraEl = flicking.camera.element; - // We're using reversed panels here as last panel should be the last element of camera element - var reversedElements = this._strategy.getRenderingElementsByOrder(flicking).reverse(); - reversedElements.forEach(function (el, idx) { - var nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null; - if (el.nextElementSibling !== nextEl) { - cameraEl.insertBefore(el, nextEl); - } - }); - }; - __proto._removeAllTextNodes = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove all text nodes in the camera element - toArray(cameraElement.childNodes).forEach(function (node) { - if (node.nodeType === Node.TEXT_NODE) { - cameraElement.removeChild(node); - } - }); - }; - return VanillaRenderer; -}(Renderer); - -/** - * @internal - */ -var ExternalRenderer = /*#__PURE__*/function (_super) { - __extends(ExternalRenderer, _super); - function ExternalRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* eslint-disable @typescript-eslint/no-unused-vars */ - var __proto = ExternalRenderer.prototype; - __proto._removePanelElements = function (panels) { - // DO NOTHING, overrided to prevent an unexpected error - }; - __proto._removeAllChildsFromCamera = function () { - // DO NOTHING, overrided to prevent an unexpected error - }; - return ExternalRenderer; -}(Renderer); - -/** - * A slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ -var Panel = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스 - */ - function Panel(_a) { - var index = _a.index, - align = _a.align, - flicking = _a.flicking, - elementProvider = _a.elementProvider; - this._index = index; - this._flicking = flicking; - this._elProvider = elementProvider; - this._align = align; - this._removed = false; - this._rendered = true; - this._loading = false; - this._resetInternalStates(); - } - var __proto = Panel.prototype; - Object.defineProperty(__proto, "element", { - // Internal States Getter - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementProvider", { - /** - * @internal - * @readonly - */ - get: function () { - return this._elProvider; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index of the panel - * @ko 패널의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of the panel, including {@link Panel#alignPosition alignPosition} - * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다 - * @type {number} - * @readonly - */ - get: function () { - return this._pos + this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Cached size of the panel element - * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else - * @ko 패널 엘리먼트의 캐시된 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "sizeIncludingMargin", { - /** - * Panel's size including CSS `margin` - * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else - * @ko CSS `margin`을 포함한 패널의 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size + this._margin.prev + this._margin.next; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Height of the panel element - * @ko 패널 엘리먼트의 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "margin", { - /** - * Cached CSS `margin` value of the panel element - * @ko 패널 엘리먼트의 CSS `margin` 값 - * @type {object} - * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값 - * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값 - * @readonly - */ - get: function () { - return this._margin; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at - * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "removed", { - /** - * A value indicating whether the panel's {@link Flicking#remove remove}d - * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._removed; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - /** - * A value indicating whether the panel's element is being rendered on the screen - * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "loading", { - /** - * A value indicating whether the panel's image/video is not loaded and waiting for resize - * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._loading; - }, - set: function (val) { - this._loading = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Panel element's range of the bounding box - * @ko 패널 엘리먼트의 Bounding box 범위 - * @type {object} - * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false) - * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false) - * @readonly - */ - get: function () { - return { - min: this._pos, - max: this._pos + this._size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggled", { - /** - * A value indicating whether the panel's position is toggled by circular behavior - * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._toggled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggleDirection", { - /** - * A direction where the panel's position is toggled - * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향 - * @type {DIRECTION} - * @readonly - */ - get: function () { - return this._toggleDirection; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Actual position offset determined by {@link Panel#order} - * @ko {@link Panel#order}에 의한 실제 위치 변경값 - * @type {number} - * @readonly - */ - get: function () { - var toggleDirection = this._toggleDirection; - var cameraRangeDiff = this._flicking.camera.rangeDiff; - return toggleDirection === DIRECTION.NONE || !this._toggled ? 0 : toggleDirection === DIRECTION.PREV ? -cameraRangeDiff : cameraRangeDiff; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Progress of movement between previous or next panel relative to current panel - * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return this.index - flicking.camera.progress; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "outsetProgress", { - /** - * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1) - * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1) - * @type {number} - * @readonly - */ - get: function () { - var position = this.position + this.offset; - var alignPosition = this._alignPos; - var camera = this._flicking.camera; - var camPos = camera.position; - if (camPos === position) { - return 0; - } - if (camPos < position) { - var disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition; - return -getProgress(camPos, position, disappearPosNext); - } else { - var disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition); - return 1 - getProgress(camPos, disappearPosPrev, position); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRatio", { - /** - * Percentage of area where panel is visible in the viewport - * @ko 뷰포트 안에서 패널이 보이는 영역의 비율 - * @type {number} - * @readonly - */ - get: function () { - var range = this.range; - var size = this._size; - var offset = this.offset; - var visibleRange = this._flicking.camera.visibleRange; - var checkingRange = { - min: range.min + offset, - max: range.max + offset - }; - if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) { - return 0; - } - var visibleSize = size; - if (visibleRange.min > checkingRange.min) { - visibleSize -= visibleRange.min - checkingRange.min; - } - if (visibleRange.max < checkingRange.max) { - visibleSize -= checkingRange.max - visibleRange.max; - } - return visibleSize / size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element - * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - this._updateAlignPos(); - }, - enumerable: false, - configurable: true - }); - /** - * Mark panel element to be appended on the camera element - * @internal - */ - __proto.markForShow = function () { - this._rendered = true; - this._elProvider.show(this._flicking); - }; - /** - * Mark panel element to be removed from the camera element - * @internal - */ - __proto.markForHide = function () { - this._rendered = false; - this._elProvider.hide(this._flicking); - }; - /** - * Update size of the panel - * @ko 패널의 크기를 갱신합니다 - * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보 - * @chainable - * @return {this} - */ - __proto.resize = function (cached) { - var _a; - var el = this.element; - var flicking = this._flicking; - var horizontal = flicking.horizontal, - useFractionalSize = flicking.useFractionalSize; - if (cached) { - this._size = cached.size; - this._margin = __assign({}, cached.margin); - this._height = (_a = cached.height) !== null && _a !== void 0 ? _a : getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: getStyle(el) - }); - } else { - var elStyle = getStyle(el); - this._size = getElementSize({ - el: el, - horizontal: horizontal, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }); - this._margin = horizontal ? { - prev: parseFloat(elStyle.marginLeft || "0"), - next: parseFloat(elStyle.marginRight || "0") - } : { - prev: parseFloat(elStyle.marginTop || "0"), - next: parseFloat(elStyle.marginBottom || "0") - }; - this._height = horizontal ? getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }) : this._size; - } - this.updatePosition(); - this._updateAlignPos(); - return this; - }; - /** - * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property - * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New panel size새 패널 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @chainable - * @return {this} - */ - __proto.setSize = function (size) { - setSize(this.element, size); - return this; - }; - /** - * Check whether the given element is inside of this panel's {@link Panel#element element} - * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다 - * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement - * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부 - */ - __proto.contains = function (element) { - var _a; - return !!((_a = this.element) === null || _a === void 0 ? void 0 : _a.contains(element)); - }; - /** - * Reset internal state and set {@link Panel#removed removed} to `true` - * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다. - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalStates(); - this._removed = true; - }; - /** - * Check whether the given position is inside of this panel's {@link Panel#range range} - * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다. - * @param {number} pos A position to check확인하고자 하는 좌표 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부 - */ - __proto.includePosition = function (pos, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - return this.includeRange(pos, pos, includeMargin); - }; - /** - * Check whether the given range is fully included in this panel's area (inclusive) - * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부 - */ - __proto.includeRange = function (min, max, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - var margin = this._margin; - var panelRange = this.range; - if (includeMargin) { - panelRange.min -= margin.prev; - panelRange.max += margin.next; - } - return max >= panelRange.min && min <= panelRange.max; - }; - /** - * Check whether the panel is visble in the given range (exclusive) - * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부 - */ - __proto.isVisibleOnRange = function (min, max) { - var panelRange = this.range; - return max > panelRange.min && min < panelRange.max; - }; - /** - * Move {@link Camera} to this panel - * @ko {@link Camera}를 이 패널로 이동합니다 - * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise - */ - __proto.focus = function (duration) { - return this._flicking.moveTo(this._index, duration); - }; - /** - * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel - * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다 - * @returns {Panel | null} The previous panel이전 패널 - */ - __proto.prev = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1) : renderer.getPanel(index - 1); - }; - /** - * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel - * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다 - * @returns {Panel | null} The previous panel다음 패널 - */ - __proto.next = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1) : renderer.getPanel(index + 1); - }; - /** - * Increase panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.increaseIndex = function (val) { - this._index += Math.max(val, 0); - return this; - }; - /** - * Decrease panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.decreaseIndex = function (val) { - this._index -= Math.max(val, 0); - return this; - }; - /** - * @internal - */ - __proto.updatePosition = function () { - var prevPanel = this._flicking.renderer.panels[this._index - 1]; - this._pos = prevPanel ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev : this._margin.prev; - return this; - }; - /** - * @internal - * @return {boolean} toggled - */ - __proto.toggle = function (prevPos, newPos) { - var toggleDirection = this._toggleDirection; - var togglePosition = this._togglePosition; - if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false; - var prevToggled = this._toggled; - if (newPos > prevPos) { - if (togglePosition >= prevPos && togglePosition <= newPos) { - this._toggled = toggleDirection === DIRECTION.NEXT; - } - } else { - if (togglePosition <= prevPos && togglePosition >= newPos) { - this._toggled = toggleDirection !== DIRECTION.NEXT; - } - } - return prevToggled !== this._toggled; - }; - /** - * @internal - */ - __proto.updateCircularToggleDirection = function () { - var flicking = this._flicking; - if (!flicking.circularEnabled) { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - this._toggled = false; - return this; - } - var camera = flicking.camera; - var camRange = camera.range; - var camAlignPosition = camera.alignPosition; - var camVisibleRange = camera.visibleRange; - var camVisibleSize = camVisibleRange.max - camVisibleRange.min; - var minimumVisible = camRange.min - camAlignPosition; - var maximumVisible = camRange.max - camAlignPosition + camVisibleSize; - var shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false); - var shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false); - this._toggled = false; - if (shouldBeVisibleAtMin) { - this._toggleDirection = DIRECTION.PREV; - this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition; - this.toggle(Infinity, camera.position); - } else if (shouldBeVisibleAtMax) { - this._toggleDirection = DIRECTION.NEXT; - this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition; - this.toggle(-Infinity, camera.position); - } else { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - } - return this; - }; - __proto._updateAlignPos = function () { - this._alignPos = parseAlign$1(this._align, this._size); - }; - __proto._resetInternalStates = function () { - this._size = 0; - this._pos = 0; - this._margin = { - prev: 0, - next: 0 - }; - this._height = 0; - this._alignPos = 0; - this._toggled = false; - this._togglePosition = 0; - this._toggleDirection = DIRECTION.NONE; - }; - return Panel; -}(); - -var NormalRenderingStrategy = /*#__PURE__*/function () { - function NormalRenderingStrategy(_a) { - var providerCtor = _a.providerCtor; - this._providerCtor = providerCtor; - } - var __proto = NormalRenderingStrategy.prototype; - __proto.renderPanels = function () { - // DO_NOTHING - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var renderedPanels = flicking.renderer.panels.filter(function (panel) { - return panel.rendered; - }); - var toggledPrev = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.NEXT; - }); - var notToggled = renderedPanels.filter(function (panel) { - return !panel.toggled; - }); - return __spread(toggledPrev, notToggled, toggledNext).map(function (panel) { - return panel.index; - }); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var panels = flicking.panels; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return panels[index].element; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - if (flicking.renderOnlyVisible) { - this._showOnlyVisiblePanels(flicking); - } else { - flicking.panels.forEach(function (panel) { - return panel.markForShow(); - }); - } - }; - __proto.collectPanels = function (flicking, elements) { - var _this = this; - var align = parsePanelAlign(flicking.renderer.align); - return elements.map(function (el, index) { - return new Panel({ - index: index, - elementProvider: new _this._providerCtor(el), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (element, options) { - return new Panel(__assign(__assign({}, options), { - elementProvider: new this._providerCtor(element) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - return NormalRenderingStrategy; -}(); - -/** - * An slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ -var VirtualPanel = /*#__PURE__*/function (_super) { - __extends(VirtualPanel, _super); - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - */ - function VirtualPanel(options) { - var _this = _super.call(this, options) || this; - options.elementProvider.init(_this); - _this._elProvider = options.elementProvider; - _this._cachedInnerHTML = null; - return _this; - } - var __proto = VirtualPanel.prototype; - Object.defineProperty(__proto, "element", { - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cachedInnerHTML", { - /** - * Cached innerHTML by the previous render function - * @ko 이전 렌더링에서 캐시된 innerHTML 정보 - * @type {string|null} - * @readonly - */ - get: function () { - return this._cachedInnerHTML; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementIndex", { - /** - * An number for indexing which element it will be rendered on - * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var virtualElCount = flicking.panelsPerView + 1; - var panelCount = flicking.panelCount; - var index = this._index; - if (this._toggled) { - // To prevent element duplication - index = this._toggleDirection === DIRECTION.NEXT ? index + panelCount : index - panelCount; - } - return circulateIndex(index, virtualElCount); - }, - enumerable: false, - configurable: true - }); - __proto.cacheRenderResult = function (result) { - this._cachedInnerHTML = result; - }; - __proto.uncacheRenderResult = function () { - this._cachedInnerHTML = null; - }; - __proto.render = function () { - var flicking = this._flicking; - var _a = flicking.virtual, - renderPanel = _a.renderPanel, - cache = _a.cache; - var element = this._elProvider.element; - var newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index); - if (newInnerHTML === element.innerHTML) return; - element.innerHTML = newInnerHTML; - if (cache) { - this.cacheRenderResult(newInnerHTML); - } - }; - __proto.increaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.increaseIndex.call(this, val); - }; - __proto.decreaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.decreaseIndex.call(this, val); - }; - return VirtualPanel; -}(Panel); - -var VirtualRenderingStrategy = /*#__PURE__*/function () { - function VirtualRenderingStrategy() {} - var __proto = VirtualRenderingStrategy.prototype; - __proto.renderPanels = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = flicking.visiblePanels; - var invisibleIndexes = range(flicking.panelsPerView + 1); - visiblePanels.forEach(function (panel) { - var elementIndex = panel.elementIndex; - panel.render(); - virtualManager.show(elementIndex); - invisibleIndexes[elementIndex] = -1; - }); - invisibleIndexes.filter(function (val) { - return val >= 0; - }).forEach(function (idx) { - virtualManager.hide(idx); - }); - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = __spread(flicking.visiblePanels).filter(function (panel) { - return panel.rendered; - }).sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }); - if (visiblePanels.length <= 0) return virtualManager.elements.map(function (_, idx) { - return idx; - }); - var visibleIndexes = visiblePanels.map(function (panel) { - return panel.elementIndex; - }); - var invisibleIndexes = virtualManager.elements.map(function (el, idx) { - return __assign(__assign({}, el), { - idx: idx - }); - }).filter(function (el) { - return !el.visible; - }).map(function (el) { - return el.idx; - }); - return __spread(visibleIndexes, invisibleIndexes); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var elements = virtualManager.elements; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return elements[index].nativeElement; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else { - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - __proto.collectPanels = function (flicking) { - var align = parsePanelAlign(flicking.renderer.align); - return range(flicking.virtual.initialPanelCount).map(function (index) { - return new VirtualPanel({ - index: index, - elementProvider: new VirtualElementProvider(flicking), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (_el, options) { - return new VirtualPanel(__assign(__assign({}, options), { - elementProvider: new VirtualElementProvider(options.flicking) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.virtual.elements.forEach(function (el) { - setSize(el.nativeElement, size); - }); - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - return VirtualRenderingStrategy; -}(); - -/** - * @extends Component - * @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"} - * @requires {@link https://github.com/naver/egjs-component|@egjs/component} - * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes} - */ -var Flicking = /*#__PURE__*/function (_super) { - __extends(Flicking, _super); - /** - * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string - * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다. - * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트 - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist| - * - * - * |code|조건| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우| - * - * - * @example - * ```ts - * import Flicking from "@egjs/flicking"; - * - * // Creating new instance of Flicking with HTMLElement - * const flicking = new Flicking(document.querySelector(".flicking-viewport"), { circular: true }); - * - * // Creating new instance of Flicking with CSS selector - * const flicking2 = new Flicking(".flicking-viewport", { circular: true }); - * ``` - */ - function Flicking(root, _a) { - var _b = _a === void 0 ? {} : _a, - _c = _b.align, - align = _c === void 0 ? ALIGN.CENTER : _c, - _d = _b.defaultIndex, - defaultIndex = _d === void 0 ? 0 : _d, - _e = _b.horizontal, - horizontal = _e === void 0 ? true : _e, - _f = _b.circular, - circular = _f === void 0 ? false : _f, - _g = _b.circularFallback, - circularFallback = _g === void 0 ? CIRCULAR_FALLBACK.LINEAR : _g, - _h = _b.bound, - bound = _h === void 0 ? false : _h, - _j = _b.adaptive, - adaptive = _j === void 0 ? false : _j, - _k = _b.panelsPerView, - panelsPerView = _k === void 0 ? -1 : _k, - _l = _b.noPanelStyleOverride, - noPanelStyleOverride = _l === void 0 ? false : _l, - _m = _b.resizeOnContentsReady, - resizeOnContentsReady = _m === void 0 ? false : _m, - _o = _b.nested, - nested = _o === void 0 ? false : _o, - _p = _b.needPanelThreshold, - needPanelThreshold = _p === void 0 ? 0 : _p, - _q = _b.preventEventsBeforeInit, - preventEventsBeforeInit = _q === void 0 ? true : _q, - _r = _b.deceleration, - deceleration = _r === void 0 ? 0.0075 : _r, - _s = _b.duration, - duration = _s === void 0 ? 500 : _s, - _t = _b.easing, - easing = _t === void 0 ? function (x) { - return 1 - Math.pow(1 - x, 3); - } : _t, - _u = _b.inputType, - inputType = _u === void 0 ? ["mouse", "touch"] : _u, - _v = _b.moveType, - moveType = _v === void 0 ? "snap" : _v, - _w = _b.threshold, - threshold = _w === void 0 ? 40 : _w, - _x = _b.interruptable, - interruptable = _x === void 0 ? true : _x, - _y = _b.bounce, - bounce = _y === void 0 ? "20%" : _y, - _z = _b.iOSEdgeSwipeThreshold, - iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z, - _0 = _b.preventClickOnDrag, - preventClickOnDrag = _0 === void 0 ? true : _0, - _1 = _b.preventDefaultOnDrag, - preventDefaultOnDrag = _1 === void 0 ? false : _1, - _2 = _b.disableOnInit, - disableOnInit = _2 === void 0 ? false : _2, - _3 = _b.changeOnHold, - changeOnHold = _3 === void 0 ? false : _3, - _4 = _b.renderOnlyVisible, - renderOnlyVisible = _4 === void 0 ? false : _4, - _5 = _b.virtual, - virtual = _5 === void 0 ? null : _5, - _6 = _b.autoInit, - autoInit = _6 === void 0 ? true : _6, - _7 = _b.autoResize, - autoResize = _7 === void 0 ? true : _7, - _8 = _b.useResizeObserver, - useResizeObserver = _8 === void 0 ? true : _8, - _9 = _b.resizeDebounce, - resizeDebounce = _9 === void 0 ? 0 : _9, - _10 = _b.maxResizeDebounce, - maxResizeDebounce = _10 === void 0 ? 100 : _10, - _11 = _b.useFractionalSize, - useFractionalSize = _11 === void 0 ? false : _11, - _12 = _b.externalRenderer, - externalRenderer = _12 === void 0 ? null : _12, - _13 = _b.renderExternal, - renderExternal = _13 === void 0 ? null : _13; - var _this = _super.call(this) || this; - // Internal states - _this._initialized = false; - _this._plugins = []; - // Bind options - _this._align = align; - _this._defaultIndex = defaultIndex; - _this._horizontal = horizontal; - _this._circular = circular; - _this._circularFallback = circularFallback; - _this._bound = bound; - _this._adaptive = adaptive; - _this._panelsPerView = panelsPerView; - _this._noPanelStyleOverride = noPanelStyleOverride; - _this._resizeOnContentsReady = resizeOnContentsReady; - _this._nested = nested; - _this._virtual = virtual; - _this._needPanelThreshold = needPanelThreshold; - _this._preventEventsBeforeInit = preventEventsBeforeInit; - _this._deceleration = deceleration; - _this._duration = duration; - _this._easing = easing; - _this._inputType = inputType; - _this._moveType = moveType; - _this._threshold = threshold; - _this._interruptable = interruptable; - _this._bounce = bounce; - _this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold; - _this._preventClickOnDrag = preventClickOnDrag; - _this._preventDefaultOnDrag = preventDefaultOnDrag; - _this._disableOnInit = disableOnInit; - _this._changeOnHold = changeOnHold; - _this._renderOnlyVisible = renderOnlyVisible; - _this._autoInit = autoInit; - _this._autoResize = autoResize; - _this._useResizeObserver = useResizeObserver; - _this._resizeDebounce = resizeDebounce; - _this._maxResizeDebounce = maxResizeDebounce; - _this._useFractionalSize = useFractionalSize; - _this._externalRenderer = externalRenderer; - _this._renderExternal = renderExternal; - // Create core components - _this._viewport = new Viewport(_this, getElement(root)); - _this._autoResizer = new AutoResizer(_this); - _this._renderer = _this._createRenderer(); - _this._camera = _this._createCamera(); - _this._control = _this._createControl(); - _this._virtualManager = new VirtualManager(_this, virtual); - if (_this._autoInit) { - void _this.init(); - } - return _this; - } - var __proto = Flicking.prototype; - Object.defineProperty(__proto, "control", { - // Components - /** - * {@link Control} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스 - * @type {Control} - * @default SnapControl - * @readonly - * @see Control - * @see SnapControl - * @see FreeControl - */ - get: function () { - return this._control; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "camera", { - /** - * {@link Camera} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스 - * @type {Camera} - * @default LinearCamera - * @readonly - * @see Camera - * @see LinearCamera - * @see BoundCamera - * @see CircularCamera - */ - get: function () { - return this._camera; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderer", { - /** - * {@link Renderer} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스 - * @type {Renderer} - * @default VanillaRenderer - * @readonly - * @see Renderer - * @see VanillaRenderer - * @see ExternalRenderer - */ - get: function () { - return this._renderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "viewport", { - /** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - * @type {Viewport} - * @readonly - * @see Viewport - */ - get: function () { - return this._viewport; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialized", { - // Internal States - /** - * Whether Flicking's {@link Flicking#init init()} is called. - * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}. - * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수. - * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._initialized; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._camera.circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtualEnabled", { - /** - * Whether the `virtual` option is enabled. - * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero. - * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._panelsPerView > 0 && this._virtual != null; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._control.activeIndex; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "element", { - /** - * The root(`.flicking-viewport`) element - * @ko root(`.flicking-viewport`) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._viewport.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "currentPanel", { - /** - * Currently active panel - * @ko 현재 선택된 패널 - * @type {Panel} - * @readonly - * @see Panel - */ - get: function () { - return this._control.activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panels", { - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._renderer.panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._renderer.panelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * Array of panels that is visible at the current position - * @ko 현재 보이는 패널의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._camera.visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.holding; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePlugins", { - /** - * A current list of activated plugins - * @ko 현재 활성화된 플러그인 목록 - * @type {Plugin[]} - * @readonly - */ - get: function () { - return this._plugins; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - // UI / LAYOUT - /** - * Align position of the panels within viewport. You can set different values each for the panel and camera - * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다 - * @type {ALIGN | string | number | { panel: string | number, camera: string | number }} - * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값 - * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값 - * @default "center" - * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // Literal strings - * "prev", "center", "next", - * // % values, applied to both panel & camera - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000, - * // Setting a different value for panel & camera - * { panel: "10%", camera: "25%" } - * ]; - * - * possibleOptions.forEach(align => { - * new Flicking("#el", { align }); - * }); - * ``` - */ - get: function () { - return this._align; - }, - // Options Setter - // UI / LAYOUT - set: function (val) { - this._align = val; - this._renderer.align = val; - this._camera.align = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "defaultIndex", { - /** - * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer - * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )} - */ - get: function () { - return this._defaultIndex; - }, - set: function (val) { - this._defaultIndex = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "horizontal", { - /** - * Direction of panel movement (true: horizontal, false: vertical) - * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향) - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )} - */ - get: function () { - return this._horizontal; - }, - set: function (val) { - this._horizontal = val; - this._control.controller.updateDirection(); - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circular", { - /** - * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling. - * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )} - */ - get: function () { - return this._circular; - }, - set: function (val) { - this._circular = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularFallback", { - /** - * Set panel control mode for the case when circular cannot be enabled. - * "linear" will set the view's range from the top of the first panel to the top of the last panel. - * "bound" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel. - * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다. - * "linear" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다. - * "bound" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다. - * @see CIRCULAR_FALLBACK - * @type {string} - * @default "linear" - * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )} - */ - get: function () { - return this._circularFallback; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bound", { - /** - * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel - * Only can be enabled when `circular=false` - * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다 - * `circular=false`인 경우에만 사용할 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )} - */ - get: function () { - return this._bound; - }, - set: function (val) { - this._bound = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "adaptive", { - /** - * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true` - * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )} - */ - get: function () { - return this._adaptive; - }, - set: function (val) { - this._adaptive = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelsPerView", { - /** - * A visible number of panels on viewport. Enabling this option will automatically resize panel size - * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다 - * @type {number} - * @default -1 - * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )} - */ - get: function () { - return this._panelsPerView; - }, - set: function (val) { - this._panelsPerView = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "noPanelStyleOverride", { - /** - * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled. - * This behavior can be useful in terms of performance when you're manually managing all panel sizes - * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다. - * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다 - * @type {boolean} - * @default false - */ - get: function () { - return this._noPanelStyleOverride; - }, - set: function (val) { - this._noPanelStyleOverride = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeOnContentsReady", { - /** - * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded. - * This can be useful when you have contents inside Flicking that changes its size when it's loaded - * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다. - * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )} - */ - get: function () { - return this._resizeOnContentsReady; - }, - set: function (val) { - this._resizeOnContentsReady = val; - if (val) { - this._renderer.checkPanelContentsReady(this._renderer.panels); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "nested", { - /** - * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel. - * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option. - * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다. - * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )} - */ - get: function () { - return this._nested; - }, - set: function (val) { - this._nested = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.nested = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "needPanelThreshold", { - // EVENTS - /** - * A Threshold from viewport edge before triggering `needPanel` event - * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )} - */ - get: function () { - return this._needPanelThreshold; - }, - // EVENTS - set: function (val) { - this._needPanelThreshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventEventsBeforeInit", { - /** - * When enabled, events are not triggered before `ready` when initializing - * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )} - */ - get: function () { - return this._preventEventsBeforeInit; - }, - set: function (val) { - this._preventEventsBeforeInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "deceleration", { - // ANIMATION - /** - * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time - * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다 - * @type {number} - * @default 0.0075 - * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )} - */ - get: function () { - return this._deceleration; - }, - // ANIMATION - set: function (val) { - this._deceleration = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.deceleration = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "easing", { - /** - * An easing function applied to the panel movement animation. Default value is `easeOutCubic` - * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다 - * @type {function} - * @default x => 1 - Math.pow(1 - x, 3) - * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/} - * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )} - */ - get: function () { - return this._easing; - }, - set: function (val) { - this._easing = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.easing = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "duration", { - /** - * Default duration of the animation (ms) - * @ko 디폴트 애니메이션 재생 시간 (ms) - * @type {number} - * @default 500 - * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )} - */ - get: function () { - return this._duration; - }, - set: function (val) { - this._duration = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "inputType", { - // INPUT - /** - * Types of input devices to enable - * @ko 활성화할 입력 장치 종류 - * @type {string[]} - * @default ["touch", "mouse"] - * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)} - * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)} - * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )} - */ - get: function () { - return this._inputType; - }, - // INPUT - set: function (val) { - this._inputType = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.inputType = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "moveType", { - /** - * Movement style by user input. This will change instance type of {@link Flicking#control} - * You can use the values of the constant {@link MOVE_TYPE} - * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다 - * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다 - * @type {MOVE_TYPE | Pair} - * @default "snap" - * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )} - * @example - * |moveType|control|options| - * |:---:|:---:|:---:| - * |"snap"|{@link SnapControl}|| - * |"freeScroll"|{@link FreeControl}|{@link FreeControlOptions}| - * - * ```ts - * import Flicking, { MOVE_TYPE } from "@egjs/flicking"; - * - * const flicking = new Flicking({ - * moveType: MOVE_TYPE.SNAP - * }); - * ``` - * - * ```ts - * const flicking = new Flicking({ - * // If you want more specific settings for the moveType - * // [moveType, options for that moveType] - * // In this case, it's ["freeScroll", FreeControlOptions] - * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }] - * }); - * ``` - */ - get: function () { - return this._moveType; - }, - set: function (val) { - this._moveType = val; - var prevControl = this._control; - var newControl = this._createControl(); - var activePanel = prevControl.activePanel; - newControl.copy(prevControl); - var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0; - this._control = newControl; - this._control.updatePosition(prevProgressInPanel); - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "threshold", { - /** - * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel. - * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다. - * @type {number} - * @default 40 - * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )} - */ - get: function () { - return this._threshold; - }, - set: function (val) { - this._threshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "interruptable", { - /** - * Set animation to be interruptable by click/touch. - * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )} - */ - get: function () { - return this._interruptable; - }, - set: function (val) { - this._interruptable = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.interruptable = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * The size value of the bounce area. Only can be enabled when `circular=false`. - * You can set different bounce value for prev/next direction by using array. - * `number` for px value, and `string` for px, and % value relative to viewport size. - * You have to call {@link Control#updateInput} after changing this to take effect. - * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다. - * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다. - * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다. - * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다. - * @type {string | number | Array} - * @default "20%" - * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // % values, relative to viewport element(".flicking-viewport")'s size - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000 - * ]; - * ``` - * - * @example - * ```ts - * const flicking = new Flicking("#el", { bounce: "20%" }); - * - * flicking.bounce = "100%"; - * flicking.control.updateInput(); // Call this to update! - * ``` - */ - get: function () { - return this._bounce; - }, - set: function (val) { - this._bounce = val; - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "iOSEdgeSwipeThreshold", { - /** - * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward - * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px) - * @type {number} - * @default 30 - * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )} - */ - get: function () { - return this._iOSEdgeSwipeThreshold; - }, - set: function (val) { - this._iOSEdgeSwipeThreshold = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.iOSEdgeSwipeThreshold = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventClickOnDrag", { - /** - * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element - * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )} - */ - get: function () { - return this._preventClickOnDrag; - }, - set: function (val) { - var prevVal = this._preventClickOnDrag; - if (val === prevVal) return; - var controller = this._control.controller; - if (val) { - controller.addPreventClickHandler(); - } else { - controller.removePreventClickHandler(); - } - this._preventClickOnDrag = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventDefaultOnDrag", { - /** - * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging - * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )} - */ - get: function () { - return this._preventDefaultOnDrag; - }, - set: function (val) { - this._preventDefaultOnDrag = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.preventDefaultOnDrag = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "disableOnInit", { - /** - * Automatically call {@link Flicking#disableInput disableInput()} on initialization - * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )} - */ - get: function () { - return this._disableOnInit; - }, - set: function (val) { - this._disableOnInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "changeOnHold", { - /** - * Change active panel index on mouse/touch hold while animating. - * `index` of the `willChange`/`willRestore` event will be used as new index. - * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다. - * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )} - */ - get: function () { - return this._changeOnHold; - }, - set: function (val) { - this._changeOnHold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderOnlyVisible", { - // PERFORMANCE - /** - * Whether to render visible panels only. This can dramatically increase performance when there're many panels - * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )} - */ - get: function () { - return this._renderOnlyVisible; - }, - // PERFORMANCE - set: function (val) { - this._renderOnlyVisible = val; - void this._renderer.render(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtual", { - /** - * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1` - * Must be used with `panelsPerview`. - * After Flicking's initialized, this property can be used to add/remove the panel count. - * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다. - * `panelsPerView` 옵션과 함께 사용되어야만 합니다. - * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다. - * @type {VirtualManager} - * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수 - * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @property {string} [panelClass="flicking-panel"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )} - * @example - * ```ts - * import Flicking, { VirtualPanel } from "@egjs/flicking"; - * - * const flicking = new Flicking("#some_el", { - * panelsPerView: 3, - * virtual: { - * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`, - * initialPanelCount: 100 - * } - * }); - * - * // Add 100 virtual panels (at the end) - * flicking.virtual.append(100); - * - * // Remove 100 virtual panels from 0 to 100 - * flicking.virtual.remove(0, 100); - * ``` - */ - get: function () { - return this._virtualManager; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoInit", { - // OTHERS - /** - * Call {@link Flicking#init init()} automatically when creating Flicking's instance - * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )} - * @readonly - */ - get: function () { - return this._autoInit; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoResize", { - /** - * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed - * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._autoResize; - }, - // OTHERS - set: function (val) { - this._autoResize = val; - if (val) { - this._autoResizer.enable(); - } else { - this._autoResizer.disable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useResizeObserver", { - /** - * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option - * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )} - */ - get: function () { - return this._useResizeObserver; - }, - set: function (val) { - this._useResizeObserver = val; - if (this._autoResize) { - this._autoResizer.enable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeDebounce", { - /** - * Delays size recalculation from `autoResize` by the given time in milisecond. - * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again. - * This can increase performance by preventing `resize` being called too often. - * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다. - * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다. - * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다. - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )} - */ - get: function () { - return this._resizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "maxResizeDebounce", { - /** - * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond. - * This guarantees that size recalculation is performed at least once every (n)ms. - * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms) - * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다. - * @type {number} - * @default 100 - * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )} - */ - get: function () { - return this._maxResizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useFractionalSize", { - /** - * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle. - * This can prevent 1px offset issue in some cases where panel size has the fractional part. - * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element. - * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다. - * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다. - * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )} - */ - get: function () { - return this._useFractionalSize; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "externalRenderer", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - */ - get: function () { - return this._externalRenderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderExternal", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - * @deprecated - */ - get: function () { - return this._renderExternal; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Flicking and move to the default index - * This is automatically called on Flicking's constructor when `autoInit` is true(default) - * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다 - * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다 - * @fires Flicking#ready - * @return {Promise} - */ - __proto.init = function () { - var _this = this; - if (this._initialized) return Promise.resolve(); - var camera = this._camera; - var renderer = this._renderer; - var control = this._control; - var virtualManager = this._virtualManager; - var originalTrigger = this.trigger; - var preventEventsBeforeInit = this._preventEventsBeforeInit; - camera.init(); - virtualManager.init(); - renderer.init(this); - control.init(this); - if (preventEventsBeforeInit) { - this.trigger = function () { - return _this; - }; - } - this._initialResize(); - // Look at initial panel - this._moveToInitialPanel(); - if (this._autoResize) { - this._autoResizer.enable(); - } - if (this._preventClickOnDrag) { - control.controller.addPreventClickHandler(); - } - if (this._disableOnInit) { - this.disableInput(); - } - renderer.checkPanelContentsReady(renderer.panels); - this._initialized = true; - return renderer.render().then(function () { - // Done initializing & emit ready event - _this._plugins.forEach(function (plugin) { - return plugin.init(_this); - }); - if (preventEventsBeforeInit) { - _this.trigger = originalTrigger; - } - _this.trigger(new ComponentEvent(EVENTS.READY)); - }); - }; - /** - * Destroy Flicking and remove all event handlers - * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다 - * @return {void} - */ - __proto.destroy = function () { - this.off(); - this._autoResizer.disable(); - this._control.destroy(); - this._camera.destroy(); - this._renderer.destroy(); - this._plugins.forEach(function (plugin) { - return plugin.destroy(); - }); - this._initialized = false; - }; - /** - * Move to the previous panel (current index - 1) - * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise - */ - __proto.prev = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.prev()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : -1, duration, DIRECTION.PREV); - }; - /** - * Move to the next panel (current index + 1) - * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise - */ - __proto.next = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.next()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : this._renderer.panelCount, duration, DIRECTION.NEXT); - }; - /** - * Move to the panel with given index - * @ko 주어진 인덱스에 해당하는 패널로 이동합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveTo = function (index, duration, direction) { - if (duration === void 0) { - duration = this._duration; - } - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - return Promise.reject(new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE)); - } - if (this._control.animating) { - return Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING)); - } - if (this._control.holding) { - this._control.controller.release(); - } - return this._control.moveToPanel(panel, { - duration: duration, - direction: direction - }); - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @throws {FlickingError} - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우 - * @return {void} - */ - __proto.updateAnimation = function (index, duration, direction) { - if (!this._control.animating) { - return; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - throw new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE); - } - this._control.updateAnimation(panel, duration, direction); - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @fires Flicking#moveEnd - * @return {void} - */ - __proto.stopAnimation = function () { - if (!this._control.animating) { - return; - } - this._control.stopAnimation(); - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - * @example - * ```ts - * const panel = flicking.getPanel(0); - * // Which is a shorthand to... - * const samePanel = flicking.panels[0]; - * ``` - */ - __proto.getPanel = function (index) { - return this._renderer.getPanel(index); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @return {this} - */ - __proto.enableInput = function () { - this._control.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @return {this} - */ - __proto.disableInput = function () { - this._control.disable(); - return this; - }; - /** - * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()} - * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다 - * @param {object} options Status retrieving optionsStatus 반환 옵션 - * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다 - * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다 - * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다 - * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true - * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다. - * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체. - */ - __proto.getStatus = function (_a) { - var _b, _c; - var _d = _a === void 0 ? {} : _a, - _e = _d.index, - index = _e === void 0 ? true : _e, - _f = _d.position, - position = _f === void 0 ? true : _f, - _g = _d.includePanelHTML, - includePanelHTML = _g === void 0 ? false : _g, - _h = _d.visiblePanelsOnly, - visiblePanelsOnly = _h === void 0 ? false : _h; - var camera = this._camera; - var panels = visiblePanelsOnly ? this.visiblePanels : this.panels; - var status = { - panels: panels.map(function (panel) { - var panelInfo = { - index: panel.index - }; - if (includePanelHTML) { - panelInfo.html = panel.element.outerHTML; - } - return panelInfo; - }) - }; - if (index) { - status.index = this.index; - } - if (position) { - var nearestAnchor = camera.findNearestAnchor(camera.position); - if (nearestAnchor) { - status.position = { - panel: nearestAnchor.panel.index, - progressInPanel: camera.getProgressInPanel(nearestAnchor.panel) - }; - } - } - if (visiblePanelsOnly) { - var visiblePanels = this.visiblePanels; - status.visibleOffset = (_c = (_b = visiblePanels[0]) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : 0; - } - return status; - }; - /** - * Restore to the state of the given {@link Status} - * @ko 주어진 {@link Status}의 상태로 복원합니다 - * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다 - * @return {void} - */ - __proto.setStatus = function (status) { - var _a; - if (!this._initialized) { - throw new FlickingError(MESSAGE.NOT_INITIALIZED, CODE.NOT_INITIALIZED); - } - var index = status.index, - position = status.position, - visibleOffset = status.visibleOffset, - panels = status.panels; - var renderer = this._renderer; - var control = this._control; - // Can't add/remove panels on external rendering - if (((_a = panels[0]) === null || _a === void 0 ? void 0 : _a.html) && !this._renderExternal) { - renderer.batchRemove({ - index: 0, - deleteCount: this.panels.length, - hasDOMInElements: true - }); - renderer.batchInsert({ - index: 0, - elements: parseElement(panels.map(function (panel) { - return panel.html; - })), - hasDOMInElements: true - }); - } - if (index != null) { - var panelIndex = visibleOffset ? index - visibleOffset : index; - void this.moveTo(panelIndex, 0).catch(function () { - return void 0; - }); - } - if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) { - var panel = position.panel, - progressInPanel = position.progressInPanel; - var panelIndex = visibleOffset ? panel - visibleOffset : panel; - var panelRange = renderer.panels[panelIndex].range; - var newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - void control.moveToPosition(newCameraPos, 0).catch(function () { - return void 0; - }); - } - }; - /** - * Add plugins that can have different effects on Flicking - * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다 - * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들) - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.addPlugins = function () { - var _a; - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - if (this._initialized) { - plugins.forEach(function (item) { - return item.init(_this); - }); - } - (_a = this._plugins).push.apply(_a, __spread(plugins)); - return this; - }; - /** - * Remove plugins from Flicking. - * @ko 플리킹으로부터 플러그인들을 제거합니다. - * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들). - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.removePlugins = function () { - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - plugins.forEach(function (item) { - var foundIndex = findIndex(_this._plugins, function (val) { - return val === item; - }); - if (foundIndex >= 0) { - item.destroy(); - _this._plugins.splice(foundIndex, 1); - } - }); - return this; - }; - /** - * Update viewport/panel sizes - * @ko 패널 및 뷰포트의 크기를 갱신합니다 - * @method - * @fires Flicking#beforeResize - * @fires Flicking#afterResize - * @return {this} - */ - __proto.resize = function () { - return __awaiter(this, void 0, void 0, function () { - var viewport, renderer, camera, control, activePanel, prevWidth, prevHeight, prevProgressInPanel, newWidth, newHeight, sizeChanged; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - viewport = this._viewport; - renderer = this._renderer; - camera = this._camera; - control = this._control; - activePanel = control.activePanel; - prevWidth = viewport.width; - prevHeight = viewport.height; - prevProgressInPanel = activePanel ? camera.getProgressInPanel(activePanel) : 0; - this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, { - width: prevWidth, - height: prevHeight, - element: viewport.element - })); - viewport.resize(); - return [4 /*yield*/, renderer.forceRenderAllPanels()]; - case 1: - _a.sent(); // Render all panel elements, to update sizes - if (!this._initialized) { - return [2 /*return*/]; - } - - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateAdaptiveHeight(); - camera.updatePanelOrder(); - camera.updateOffset(); - return [4 /*yield*/, renderer.render()]; - case 2: - _a.sent(); - if (!this._initialized) { - return [2 /*return*/]; - } - - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - newWidth = viewport.width; - newHeight = viewport.height; - sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight; - this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: prevWidth, - height: prevHeight - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Add new panels after the last panel - * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of appended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new Flicking("#flick"); - * // These are possible parameters - * flicking.append(document.createElement("div")); - * flicking.append("\Panel\"); - * flicking.append(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.append("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.append = function (element) { - return this.insert(this._renderer.panelCount, element); - }; - /** - * Add new panels before the first panel - * This will increase index of panels after by the number of panels added - * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다 - * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다. - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.prepend(document.createElement("div")); - * flicking.prepend("\Panel\"); - * flicking.prepend(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.prepend("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.prepend = function (element) { - return this.insert(0, element); - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.insert(0, document.createElement("div")); - * flicking.insert(2, "\Panel\"); - * flicking.insert(1, ["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.insert(3, "\Panel 1\\Panel 2\"); - * ``` - */ - __proto.insert = function (index, element) { - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchInsert({ - index: index, - elements: parseElement(element), - hasDOMInElements: true - }); - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {number} index Index of panel to remove제거할 패널의 인덱스 - * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @return {Panel[]} An array of removed panels제거된 패널들의 배열 - */ - __proto.remove = function (index, deleteCount) { - if (deleteCount === void 0) { - deleteCount = 1; - } - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchRemove({ - index: index, - deleteCount: deleteCount, - hasDOMInElements: true - }); - }; - __proto._createControl = function () { - var _a; - var moveType = this._moveType; - var moveTypes = Object.keys(MOVE_TYPE).map(function (key) { - return MOVE_TYPE[key]; - }); - var moveTypeStr = Array.isArray(moveType) ? moveType[0] : moveType; - var moveTypeOptions = Array.isArray(moveType) ? (_a = moveType[1]) !== null && _a !== void 0 ? _a : {} : {}; - if (!includes(moveTypes, moveTypeStr)) { - throw new FlickingError(MESSAGE.WRONG_OPTION("moveType", JSON.stringify(moveType)), CODE.WRONG_OPTION); - } - switch (moveTypeStr) { - case MOVE_TYPE.SNAP: - return new SnapControl(moveTypeOptions); - case MOVE_TYPE.FREE_SCROLL: - return new FreeControl(moveTypeOptions); - case MOVE_TYPE.STRICT: - return new StrictControl(moveTypeOptions); - } - }; - __proto._createCamera = function () { - if (this._circular && this._bound) { - // eslint-disable-next-line no-console - console.warn("\"circular\" and \"bound\" option cannot be used together, ignoring bound."); - } - return new Camera(this, { - align: this._align - }); - }; - __proto._createRenderer = function () { - var externalRenderer = this._externalRenderer; - if (this._virtual && this._panelsPerView <= 0) { - // eslint-disable-next-line no-console - console.warn("\"virtual\" and \"panelsPerView\" option should be used together, ignoring virtual."); - } - return externalRenderer ? externalRenderer : this._renderExternal ? this._createExternalRenderer() : this._createVanillaRenderer(); - }; - __proto._createExternalRenderer = function () { - var _a = this._renderExternal, - renderer = _a.renderer, - rendererOptions = _a.rendererOptions; - return new renderer(__assign({ - align: this._align - }, rendererOptions)); - }; - __proto._createVanillaRenderer = function () { - var virtual = this.virtualEnabled; - return new VanillaRenderer({ - align: this._align, - strategy: virtual ? new VirtualRenderingStrategy() : new NormalRenderingStrategy({ - providerCtor: VanillaElementProvider - }) - }); - }; - __proto._moveToInitialPanel = function () { - var renderer = this._renderer; - var control = this._control; - var camera = this._camera; - var defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0); - if (!defaultPanel) return; - var nearestAnchor = camera.findNearestAnchor(defaultPanel.position); - var initialPanel = nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index ? nearestAnchor.panel : defaultPanel; - control.setActive(initialPanel, null, false); - if (!nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), CODE.POSITION_NOT_REACHABLE); - } - var position = initialPanel.position; - if (!camera.canReach(initialPanel)) { - position = nearestAnchor.position; - } - camera.lookAt(position); - control.updateInput(); - camera.updateOffset(); - }; - __proto._initialResize = function () { - var viewport = this._viewport; - var renderer = this._renderer; - var camera = this._camera; - var control = this._control; - this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, { - width: 0, - height: 0, - element: viewport.element - })); - viewport.resize(); - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateOffset(); - control.updateInput(); - var newWidth = viewport.width; - var newHeight = viewport.height; - var sizeChanged = newWidth !== 0 || newHeight !== 0; - this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: 0, - height: 0 - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - }; - /** - * Version info string - * @ko 버전정보 문자열 - * @type {string} - * @readonly - * @example - * ```ts - * Flicking.VERSION; // ex) 4.0.0 - * ``` - */ - Flicking.VERSION = "4.11.4"; - return Flicking; -}(Component); - -/** - * Decorator that makes the method of flicking available in the framework. - * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터. - * @memberof eg.Flicking - * @private - * @example - * ```js - * import Flicking, { withFlickingMethods } from "@egjs/flicking"; - * - * class Flicking extends React.Component> { - * @withFlickingMethods - * private flicking: Flicking; - * } - * ``` - */ -var withFlickingMethods = function (prototype, flickingName) { - [Component.prototype, Flicking.prototype].forEach(function (proto) { - Object.getOwnPropertyNames(proto).filter(function (name) { - return !prototype[name] && name.indexOf("_") !== 0 && name !== "constructor"; - }).forEach(function (name) { - var descriptor = Object.getOwnPropertyDescriptor(proto, name); - if (descriptor.value) { - // Public Function - Object.defineProperty(prototype, name, { - value: function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.value).call.apply(_a, __spread([this[flickingName]], args)); - } - }); - } else { - var getterDescriptor = {}; - if (descriptor.get) { - getterDescriptor.get = function () { - var _a; - var flicking = this[flickingName]; - return flicking && ((_a = descriptor.get) === null || _a === void 0 ? void 0 : _a.call(flicking)); - }; - } - if (descriptor.set) { - getterDescriptor.set = function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.set) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spread([this[flickingName]], args)); - }; - } - Object.defineProperty(prototype, name, getterDescriptor); - } - }); - }); -}; - -var sync = (function (flicking, diffResult, rendered) { - var renderer = flicking.renderer; - var panels = renderer.panels; - var prevList = __spread(diffResult.prevList); - var added = []; - var removed = []; - if (diffResult.removed.length > 0) { - var endIdx_1 = -1; - var prevIdx_1 = -1; - diffResult.removed.forEach(function (removedIdx) { - if (endIdx_1 < 0) { - endIdx_1 = removedIdx; - } - if (prevIdx_1 >= 0 && removedIdx !== prevIdx_1 - 1) { - removed.push.apply(removed, __spread(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - endIdx_1 = removedIdx; - prevIdx_1 = removedIdx; - } else { - prevIdx_1 = removedIdx; - } - prevList.splice(removedIdx, 1); - }); - removed.push.apply(removed, __spread(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - } - diffResult.ordered.forEach(function (_a) { - var _b = __read(_a, 2), - from = _b[0], - to = _b[1]; - var prevPanel = panels.splice(from, 1)[0]; - panels.splice(to, 0, prevPanel); - }); - if (diffResult.ordered.length > 0) { - panels.forEach(function (panel, idx) { - var indexDiff = idx - panel.index; - if (indexDiff > 0) { - panel.increaseIndex(indexDiff); - } else { - panel.decreaseIndex(-indexDiff); - } - }); - panels.sort(function (panel1, panel2) { - return panel1.index - panel2.index; - }); - panels.forEach(function (panel) { - panel.updatePosition(); - }); - } - if (diffResult.added.length > 0) { - var startIdx_1 = -1; - var prevIdx_2 = -1; - var addedElements_1 = rendered.slice(prevList.length); - diffResult.added.forEach(function (addedIdx, idx) { - if (startIdx_1 < 0) { - startIdx_1 = idx; - } - if (prevIdx_2 >= 0 && addedIdx !== prevIdx_2 + 1) { - added.push.apply(added, __spread(batchInsert(renderer, diffResult, addedElements_1, startIdx_1, idx + 1))); - startIdx_1 = -1; - prevIdx_2 = -1; - } else { - prevIdx_2 = addedIdx; - } - }); - if (startIdx_1 >= 0) { - added.push.apply(added, __spread(batchInsert(renderer, diffResult, addedElements_1, startIdx_1))); - } - } - if (diffResult.added.length > 0 || diffResult.removed.length > 0) { - renderer.updateAfterPanelChange(added, removed); - } -}); -var batchInsert = function (renderer, diffResult, addedElements, startIdx, endIdx) { - return renderer.batchInsertDefer.apply(renderer, __spread(diffResult.added.slice(startIdx, endIdx).map(function (index, elIdx) { - return { - index: index, - elements: [addedElements[elIdx]], - hasDOMInElements: false - }; - }))); -}; -var batchRemove = function (renderer, startIdx, endIdx) { - var removed = renderer.panels.slice(startIdx, endIdx); - return renderer.batchRemoveDefer({ - index: startIdx, - deleteCount: removed.length, - hasDOMInElements: false - }); -}; - -var getRenderingPanels = (function (flicking, diffResult) { - var removedPanels = diffResult.removed.reduce(function (map, idx) { - map[idx] = true; - return map; - }, {}); - var maintainedMap = diffResult.maintained.reduce(function (map, _a) { - var _b = __read(_a, 2), - prev = _b[0], - current = _b[1]; - map[prev] = current; - return map; - }, {}); - return __spread(flicking.panels.filter(function (panel) { - return !removedPanels[panel.index]; - }) - // Sort panels by position - .sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }).map(function (panel) { - return diffResult.list[maintainedMap[panel.index]]; - }), diffResult.added.map(function (idx) { - return diffResult.list[idx]; - })); -}); - -var getDefaultCameraTransform = (function (align, horizontal, firstPanelSize) { - if (align === void 0) { - align = ALIGN.CENTER; - } - if (horizontal === void 0) { - horizontal = true; - } - var cameraAlign = getCameraAlign(align); - var panelAlign = getPanelAlign(align); - if (panelAlign == null) return ""; - var camPosition = "calc(" + cameraAlign + " - (" + (firstPanelSize || "0px") + " * " + panelAlign.percentage + ") - " + panelAlign.absolute + "px)"; - return horizontal ? "translate(" + camPosition + ")" : "translate(0, " + camPosition + ")"; -}); -var getCameraAlign = function (align) { - var alignVal = typeof align === "object" ? align.camera : align; - return parseAlign(alignVal); -}; -var getPanelAlign = function (align) { - var alignVal = typeof align === "object" ? align.panel : align; - return parseArithmeticExpression(parseAlign(alignVal)); -}; -var parseAlign = function (alignVal) { - if (typeof alignVal === "number") { - return alignVal + "px"; - } - switch (alignVal) { - case ALIGN.CENTER: - return "50%"; - case ALIGN.NEXT: - return "100%"; - case ALIGN.PREV: - return "0%"; - default: - return alignVal; - } -}; - -/* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - -export { ALIGN, AnchorPoint, AnimatingState, AxesController, BoundCameraMode, CIRCULAR_FALLBACK, CLASS, Camera, CircularCameraMode, Control, DIRECTION, DisabledState, DraggingState, CODE as ERROR_CODE, EVENTS, ExternalRenderer, FlickingError, FreeControl, HoldingState, IdleState, LinearCameraMode, MOVE_TYPE, NormalRenderingStrategy, ORDER, Panel, Renderer, SnapControl, State, StateMachine, StrictControl, VanillaElementProvider, VanillaRenderer, Viewport, VirtualElementProvider, VirtualManager, VirtualPanel, VirtualRenderingStrategy, checkExistence, circulateIndex, circulatePosition, clamp, Flicking as default, find, findIndex, findRight, getDefaultCameraTransform, getDirection, getElement, getElementSize, getFlickingAttached, getMinusCompensatedIndex, getProgress, getRenderingPanels, getStyle, includes, isBetween, isString, merge, parseAlign$1 as parseAlign, parseArithmeticExpression, parseArithmeticSize, parseBounce, parseCSSSizeValue, parseElement, parsePanelAlign, range, setPrototypeOf, setSize, sync, toArray, withFlickingMethods }; -//# sourceMappingURL=flicking.esm.js.map diff --git a/dist/flicking.esm.js.map b/dist/flicking.esm.js.map deleted file mode 100644 index f7d9fdbbde..0000000000 --- a/dist/flicking.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flicking.esm.js","sources":["../src/const/error.ts","../src/const/external.ts","../src/utils.ts","../src/core/FlickingError.ts","../src/core/Viewport.ts","../src/core/AutoResizer.ts","../src/core/panel/provider/VanillaElementProvider.ts","../src/core/panel/provider/VirtualElementProvider.ts","../src/core/VirtualManager.ts","../src/const/axes.ts","../src/control/states/State.ts","../src/control/states/IdleState.ts","../src/control/states/HoldingState.ts","../src/control/states/DraggingState.ts","../src/control/states/AnimatingState.ts","../src/control/states/DisabledState.ts","../src/control/StateMachine.ts","../src/control/AxesController.ts","../src/control/Control.ts","../src/core/AnchorPoint.ts","../src/control/SnapControl.ts","../src/control/FreeControl.ts","../src/control/StrictControl.ts","../src/camera/mode/CameraMode.ts","../src/camera/mode/LinearCameraMode.ts","../src/camera/mode/CircularCameraMode.ts","../src/camera/mode/BoundCameraMode.ts","../src/camera/Camera.ts","../src/renderer/Renderer.ts","../src/renderer/VanillaRenderer.ts","../src/renderer/ExternalRenderer.ts","../src/core/panel/Panel.ts","../src/renderer/strategy/NormalRenderingStrategy.ts","../src/core/panel/VirtualPanel.ts","../src/renderer/strategy/VirtualRenderingStrategy.ts","../src/Flicking.ts","../src/cfc/withFlickingMethods.ts","../src/cfc/sync.ts","../src/cfc/getRenderingPanels.ts","../src/cfc/getDefaultCameraTransform.ts","../src/index.ts"],"sourcesContent":["/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/restrict-template-expressions */\n\n/**\n * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.\n * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.\n * @name ERROR_CODE\n * @constant\n * @type object\n * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우\n * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우\n * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우\n * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)\n * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때\n * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우\n * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우\n * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)\n * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우\n * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우\n * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우\n * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)\n * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우\n * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우\n * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다\n * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우\n */\nexport const CODE = {\n WRONG_TYPE: 0,\n ELEMENT_NOT_FOUND: 1,\n VAL_MUST_NOT_NULL: 2,\n NOT_ATTACHED_TO_FLICKING: 3,\n WRONG_OPTION: 4,\n INDEX_OUT_OF_RANGE: 5,\n POSITION_NOT_REACHABLE: 6,\n TRANSFORM_NOT_SUPPORTED: 7,\n STOP_CALLED_BY_USER: 8,\n ANIMATION_INTERRUPTED: 9,\n ANIMATION_ALREADY_PLAYING: 10,\n NOT_ALLOWED_IN_FRAMEWORK: 11,\n NOT_INITIALIZED: 12,\n NO_ACTIVE: 13,\n NOT_ALLOWED_IN_VIRTUAL: 14\n} as const;\n\nexport const MESSAGE = {\n WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `\"${type}\"`).join(\" or \")}.`,\n ELEMENT_NOT_FOUND: (selector: string) => `Element with selector \"${selector}\" not found.`,\n VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,\n NOT_ATTACHED_TO_FLICKING: \"This module is not attached to the Flicking instance. \\\"init()\\\" should be called first.\",\n WRONG_OPTION: (optionName: string, val: any) => `Option \"${optionName}\" is not in correct format, given: ${val}`,\n INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index \"${val}\" is out of range: should be between ${min} and ${max}.`,\n POSITION_NOT_REACHABLE: (position: number) => `Position \"${position}\" is not reachable.`,\n TRANSFORM_NOT_SUPPORTED: \"Browser does not support CSS transform.\",\n STOP_CALLED_BY_USER: \"Event stop() is called by user.\",\n ANIMATION_INTERRUPTED: \"Animation is interrupted by user input.\",\n ANIMATION_ALREADY_PLAYING: \"Animation is already playing.\",\n NOT_ALLOWED_IN_FRAMEWORK: \"This behavior is not allowed in the frameworks like React, Vue, or Angular.\",\n NOT_INITIALIZED: \"Flicking is not initialized yet, call init() first.\",\n NO_ACTIVE: \"There's no active panel that Flicking has selected. This may be due to the absence of any panels.\",\n NOT_ALLOWED_IN_VIRTUAL: \"This behavior is not allowed when the virtual option is enabled\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nexport { CODE as ERROR_CODE } from \"./error\";\n\n/**\n * Event type object with event name strings of {@link Flicking}\n * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체\n * @type {object}\n * @property {\"holdStart\"} HOLD_START holdStart eventholdStart 이벤트\n * @property {\"holdEnd\"} HOLD_END holdEnd eventholdEnd 이벤트\n * @property {\"moveStart\"} MOVE_START moveStart eventmoveStart 이벤트\n * @property {\"move\"} MOVE move eventmove 이벤트\n * @property {\"moveEnd\"} MOVE_END moveEnd eventmoveEnd 이벤트\n * @property {\"willChange\"} WILL_CHANGE willChange eventwillChange 이벤트\n * @property {\"changed\"} CHANGED changed eventchanged 이벤트\n * @property {\"willRestore\"} WILL_RESTORE willRestore eventwillRestore 이벤트\n * @property {\"restored\"} RESTORED restored eventrestored 이벤트\n * @property {\"select\"} SELECT select eventselect 이벤트\n * @property {\"needPanel\"} NEED_PANEL needPanel eventneedPanel 이벤트\n * @property {\"panelChange\"} PANEL_CHANGE panelChange eventpanelChange 이벤트\n * @example\n * ```ts\n * import { EVENTS } from \"@egjs/flicking\";\n * EVENTS.MOVE_START; // \"moveStart\"\n * ```\n */\nexport const EVENTS = {\n READY: \"ready\",\n BEFORE_RESIZE: \"beforeResize\",\n AFTER_RESIZE: \"afterResize\",\n HOLD_START: \"holdStart\",\n HOLD_END: \"holdEnd\",\n MOVE_START: \"moveStart\",\n MOVE: \"move\",\n MOVE_END: \"moveEnd\",\n WILL_CHANGE: \"willChange\",\n CHANGED: \"changed\",\n WILL_RESTORE: \"willRestore\",\n RESTORED: \"restored\",\n SELECT: \"select\",\n NEED_PANEL: \"needPanel\",\n VISIBLE_CHANGE: \"visibleChange\",\n REACH_EDGE: \"reachEdge\",\n PANEL_CHANGE: \"panelChange\"\n} as const;\n\n/**\n * An object with all possible predefined literal string for the {@link Flicking#align align} option\n * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체\n * @type {object}\n * @property {\"prev\"} PREV left/top align좌/상 정렬\n * @property {\"center\"} CENTER center align중앙 정렬\n * @property {\"next\"} NEXT right/bottom align우/하 정렬\n */\nexport const ALIGN = {\n PREV: \"prev\",\n CENTER: \"center\",\n NEXT: \"next\"\n} as const;\n\n/**\n * An object of directions\n * @ko 방향을 나타내는 값들을 담고 있는 객체\n * @type {object}\n * @property {\"PREV\"} PREV \"left\" when {@link Flicking#horizontal horizontal} is true, and \"top\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다\n * @property {\"NEXT\"} NEXT \"right\" when {@link Flicking#horizontal horizontal} is true, and \"bottom\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다\n * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다\n */\nexport const DIRECTION = {\n PREV: \"PREV\",\n NEXT: \"NEXT\",\n NONE: null\n} as const;\n\n/**\n * An object with all possible {@link Flicking#moveType moveType}s\n * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체\n * @type {object}\n * @property {\"snap\"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"freeScroll\"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"strict\"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n */\nexport const MOVE_TYPE = {\n SNAP: \"snap\",\n FREE_SCROLL: \"freeScroll\",\n STRICT: \"strict\"\n} as const;\n\nexport const CLASS = {\n VERTICAL: \"vertical\",\n HIDDEN: \"flicking-hidden\",\n DEFAULT_VIRTUAL: \"flicking-panel\"\n};\n\n/**\n * An object with all possible {@link Flicking#circularFallback circularFallback}s\n * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체\n * @type {object}\n * @property {string} LINEAR \"linear\"\n * @property {string} BOUND \"bound\"\n */\nexport const CIRCULAR_FALLBACK = {\n LINEAR: \"linear\",\n BOUND: \"bound\"\n} as const;\n\n/**\n * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체\n * @type {object}\n * @property {string} LTR \"ltr\"\n * @property {string} RTL \"rtl\"\n */\nexport const ORDER = {\n LTR: \"ltr\",\n RTL: \"rtl\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking, { FlickingOptions } from \"./Flicking\";\nimport FlickingError from \"./core/FlickingError\";\nimport * as ERROR from \"./const/error\";\nimport { ALIGN, DIRECTION } from \"./const/external\";\nimport { LiteralUnion, Merged, ValueOf } from \"./type/internal\";\nimport { ElementLike } from \"./type/external\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const merge = (target: From, ...sources: To[]): Merged => {\n sources.forEach(source => {\n Object.keys(source).forEach(key => {\n target[key] = source[key] as unknown;\n });\n });\n\n return target as Merged;\n};\n\nexport const getElement = (el: HTMLElement | string | null, parent?: HTMLElement): HTMLElement => {\n let targetEl: HTMLElement | null = null;\n\n if (isString(el)) {\n const parentEl = parent ? parent : document;\n const queryResult = parentEl.querySelector(el);\n if (!queryResult) {\n throw new FlickingError(ERROR.MESSAGE.ELEMENT_NOT_FOUND(el), ERROR.CODE.ELEMENT_NOT_FOUND);\n }\n targetEl = queryResult as HTMLElement;\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n targetEl = el;\n }\n\n if (!targetEl) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n\n return targetEl;\n};\n\nexport const checkExistence = (value: any, nameOnErrMsg: string) => {\n if (value == null) {\n throw new FlickingError(ERROR.MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), ERROR.CODE.VAL_MUST_NOT_NULL);\n }\n};\n\nexport const clamp = (x: number, min: number, max: number) => Math.max(Math.min(x, max), min);\n\nexport const getFlickingAttached = (val: Flicking | null): Flicking => {\n if (!val) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING);\n }\n\n return val;\n};\n\nexport const toArray = (iterable: ArrayLike): T[] => [].slice.call(iterable) as T[];\n\nexport const parseAlign = (align: LiteralUnion> | number, size: number): number => {\n let alignPoint: number | null;\n if (isString(align)) {\n switch (align) {\n case ALIGN.PREV:\n alignPoint = 0;\n break;\n case ALIGN.CENTER:\n alignPoint = 0.5 * size;\n break;\n case ALIGN.NEXT:\n alignPoint = size;\n break;\n default:\n alignPoint = parseArithmeticSize(align, size);\n if (alignPoint == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"align\", align), ERROR.CODE.WRONG_OPTION);\n }\n }\n } else {\n alignPoint = align as number;\n }\n\n return alignPoint;\n};\n\nexport const parseBounce = (bounce: FlickingOptions[\"bounce\"], size: number): number[] => {\n let parsedBounce: Array;\n\n if (Array.isArray(bounce)) {\n parsedBounce = (bounce as string[]).map(val => parseArithmeticSize(val, size));\n } else {\n const parsedVal = parseArithmeticSize(bounce, size);\n\n parsedBounce = [parsedVal, parsedVal];\n }\n\n return parsedBounce.map(val => {\n if (val == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"bounce\", bounce), ERROR.CODE.WRONG_OPTION);\n }\n return val;\n });\n};\n\nexport const parseArithmeticSize = (cssValue: number | string, base: number): number | null => {\n const parsed = parseArithmeticExpression(cssValue);\n\n if (parsed == null) return null;\n\n return parsed.percentage * base + parsed.absolute;\n};\n\nexport const parseArithmeticExpression = (cssValue: number | string): { percentage: number; absolute: number } | null => {\n const cssRegex = /(?:(\\+|\\-)\\s*)?(\\d+(?:\\.\\d+)?(%|px)?)/g;\n\n if (typeof cssValue === \"number\") {\n return { percentage: 0, absolute: cssValue };\n }\n\n const parsed = {\n percentage: 0,\n absolute: 0\n };\n let idx = 0;\n let matchResult = cssRegex.exec(cssValue);\n while (matchResult != null) {\n let sign = matchResult[1];\n const value = matchResult[2];\n const unit = matchResult[3];\n const parsedValue = parseFloat(value);\n\n if (idx <= 0) {\n sign = sign || \"+\";\n }\n\n // Return default value for values not in good form\n if (!sign) {\n return null;\n }\n\n const signMultiplier = sign === \"+\" ? 1 : -1;\n\n if (unit === \"%\") {\n parsed.percentage += signMultiplier * (parsedValue / 100);\n } else {\n parsed.absolute += signMultiplier * parsedValue;\n }\n\n // Match next occurrence\n ++idx;\n matchResult = cssRegex.exec(cssValue);\n }\n\n // None-matched\n if (idx === 0) {\n return null;\n }\n\n return parsed;\n};\n\nexport const parseCSSSizeValue = (val: string | number): string => isString(val) ? val : `${val}px`;\n\nexport const parsePanelAlign = (align: FlickingOptions[\"align\"]) => typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\nexport const getDirection = (start: number, end: number): ValueOf => {\n if (start === end) return DIRECTION.NONE;\n return start < end ? DIRECTION.NEXT : DIRECTION.PREV;\n};\n\nexport const parseElement = (element: ElementLike | ElementLike[]): HTMLElement[] => {\n if (!Array.isArray(element)) {\n element = [element];\n }\n\n const elements: HTMLElement[] = [];\n element.forEach(el => {\n if (isString(el)) {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = el;\n\n elements.push(...toArray(tempDiv.children) as HTMLElement[]);\n while (tempDiv.firstChild) {\n tempDiv.removeChild(tempDiv.firstChild);\n }\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n elements.push(el);\n } else {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n });\n\n return elements;\n};\n\nexport const getMinusCompensatedIndex = (idx: number, max: number) => idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max);\n\nexport const includes = (array: T[], target: any): target is T => {\n for (const val of array) {\n if (val === target) return true;\n }\n return false;\n};\n\nexport const isString = (val: any): val is string => typeof val === \"string\";\n\nexport const circulatePosition = (pos: number, min: number, max: number) => {\n const size = max - min;\n\n if (pos < min) {\n const offset = (min - pos) % size;\n pos = max - offset;\n } else if (pos > max) {\n const offset = (pos - max) % size;\n pos = min + offset;\n }\n\n return pos;\n};\n\nexport const find = (array: T[], checker: (val: T) => boolean): T | null => {\n for (const val of array) {\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findRight = (array: T[], checker: (val: T) => boolean): T | null => {\n for (let idx = array.length - 1; idx >= 0; idx--) {\n const val = array[idx];\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findIndex = (array: T[], checker: (val: T) => boolean): number => {\n for (let idx = 0; idx < array.length; idx++) {\n if (checker(array[idx])) {\n return idx;\n }\n }\n\n return -1;\n};\n\nexport const getProgress = (pos: number, prev: number, next: number) => (pos - prev) / (next - prev);\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nexport const getStyle = (el: HTMLElement): CSSStyleDeclaration => window.getComputedStyle(el) || (el as any).currentStyle as CSSStyleDeclaration;\n\nexport const setSize = (el: HTMLElement, { width, height }: Partial<{\n width: number | string;\n height: number | string;\n}>) => {\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n el.style.width = `${width}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n el.style.height = `${height}px`;\n }\n }\n};\n\nexport const isBetween = (val: number, min: number, max: number) => val >= min && val <= max;\n\nexport const circulateIndex = (index: number, max: number): number => {\n if (index >= max) {\n return index % max;\n } else if (index < 0) {\n return getMinusCompensatedIndex((index + 1) % max - 1, max);\n } else {\n return index;\n }\n};\n\nexport const range = (end: number): number[] => {\n const arr = new Array(end);\n\n for (let i = 0; i < end; i++) {\n arr[i] = i;\n }\n\n return arr;\n};\n\nexport const getElementSize = ({\n el,\n horizontal,\n useFractionalSize,\n useOffset,\n style\n}: {\n el: HTMLElement;\n horizontal: boolean;\n useFractionalSize: boolean;\n useOffset: boolean;\n style: CSSStyleDeclaration;\n}): number => {\n let size = 0;\n if (useFractionalSize) {\n const baseSize = parseFloat(horizontal ? style.width : style.height) || 0;\n const isBorderBoxSizing = style.boxSizing === \"border-box\";\n const border = horizontal\n ? parseFloat(style.borderLeftWidth || \"0\") + parseFloat(style.borderRightWidth || \"0\")\n : parseFloat(style.borderTopWidth || \"0\") + parseFloat(style.borderBottomWidth || \"0\");\n\n if (isBorderBoxSizing) {\n size = useOffset\n ? baseSize\n : baseSize - border;\n } else {\n const padding = horizontal\n ? parseFloat(style.paddingLeft || \"0\") + parseFloat(style.paddingRight || \"0\")\n : parseFloat(style.paddingTop || \"0\") + parseFloat(style.paddingBottom || \"0\");\n\n size = useOffset\n ? baseSize + padding + border\n : baseSize + padding;\n }\n } else {\n const sizeStr = horizontal ? \"Width\" : \"Height\";\n\n size = useOffset\n ? el[`offset${sizeStr}`]\n : el[`client${sizeStr}`];\n }\n\n return Math.max(size, 0);\n};\n\nexport const setPrototypeOf = Object.setPrototypeOf || ((obj, proto) => {\n obj.__proto__ = proto;\n return obj;\n});\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport { setPrototypeOf } from \"../utils\";\n\n/**\n * Special type of known error that {@link Flicking} throws.\n * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러\n * @property {number} code Error code에러 코드\n * @property {string} message Error message에러 메시지\n * @see {@link ERROR_CODE ERROR_CODE}\n * @example\n * ```ts\n * import Flicking, { FlickingError, ERROR_CODES } from \"@egjs/flicking\";\n * try {\n * const flicking = new Flicking(\".flicking-viewport\")\n * } catch (e) {\n * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) {\n * console.error(\"Element not found\")\n * }\n * }\n * ```\n */\nclass FlickingError extends Error {\n public code: number;\n\n /**\n * @param message Error message에러 메시지\n * @param code Error code에러 코드\n */\n public constructor(message: string, code: number) {\n super(message);\n\n setPrototypeOf(this, FlickingError.prototype);\n this.name = \"FlickingError\";\n this.code = code;\n }\n}\n\nexport default FlickingError;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { getElementSize, getStyle, isString } from \"../utils\";\n\n/**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n */\nclass Viewport {\n private _flicking: Flicking;\n private _el: HTMLElement;\n private _width: number;\n private _height: number;\n private _isBorderBoxSizing: boolean;\n private _padding: {\n left: number;\n right: number;\n top: number;\n bottom: number;\n };\n\n /**\n * A viewport(root) element\n * @ko 뷰포트(root) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n\n /**\n * Viewport width, without paddings\n * @ko 뷰포트 너비\n * @type {number}\n * @readonly\n */\n public get width() { return this._width - this._padding.left - this._padding.right; }\n /**\n * Viewport height, without paddings\n * @ko 뷰포트 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height - this._padding.top - this._padding.bottom; }\n /**\n * Viewport paddings\n * @ko 뷰포트 CSS padding 값\n * @type {object}\n * @property {number} left CSS `padding-left`\n * @property {number} right CSS `padding-right`\n * @property {number} top CSS `padding-top`\n * @property {number} bottom CSS `padding-bottom`\n * @readonly\n */\n public get padding() { return this._padding; }\n\n /**\n * @param el A viewport element뷰포트 엘리먼트\n */\n public constructor(flicking: Flicking, el: HTMLElement) {\n this._flicking = flicking;\n this._el = el;\n this._width = 0;\n this._height = 0;\n this._padding = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this._isBorderBoxSizing = false;\n }\n\n /**\n * Change viewport's size.\n * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property\n * @ko 뷰포트 크기를 변경합니다.\n * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New viewport size새 뷰포트 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n */\n public setSize({\n width,\n height\n }: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n const el = this._el;\n const padding = this._padding;\n const isBorderBoxSizing = this._isBorderBoxSizing;\n\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n const newWidth = isBorderBoxSizing\n ? width + padding.left + padding.right\n : width;\n el.style.width = `${newWidth}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n const newHeight = isBorderBoxSizing\n ? height + padding.top + padding.bottom\n : height;\n el.style.height = `${newHeight}px`;\n }\n }\n this.resize();\n }\n\n /**\n * Update width/height to the current viewport element's size\n * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다\n */\n public resize() {\n const el = this._el;\n const elStyle = getStyle(el);\n const {\n useFractionalSize\n } = this._flicking;\n\n this._width = getElementSize({\n el,\n horizontal: true,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n this._height = getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n\n this._padding = {\n left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0,\n right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0,\n top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0,\n bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0\n };\n this._isBorderBoxSizing = elStyle.boxSizing === \"border-box\";\n }\n}\n\nexport default Viewport;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\n\nclass AutoResizer {\n private _flicking: Flicking;\n private _enabled: boolean;\n private _resizeObserver: ResizeObserver | null;\n private _resizeTimer: number;\n private _maxResizeDebounceTimer: number;\n\n public get enabled() { return this._enabled; }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n this._enabled = false;\n this._resizeObserver = null;\n this._resizeTimer = -1;\n this._maxResizeDebounceTimer = -1;\n }\n\n public enable(): this {\n const flicking = this._flicking;\n const viewport = flicking.viewport;\n\n if (this._enabled) {\n this.disable();\n }\n\n if (flicking.useResizeObserver && !!window.ResizeObserver) {\n const viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;\n\n const resizeObserver = viewportSizeNot0\n ? new ResizeObserver(this._skipFirstResize)\n : new ResizeObserver(this._onResize);\n\n resizeObserver.observe(flicking.viewport.element);\n\n this._resizeObserver = resizeObserver;\n } else {\n window.addEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = true;\n\n return this;\n }\n\n public disable(): this {\n if (!this._enabled) return this;\n\n const resizeObserver = this._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n this._resizeObserver = null;\n } else {\n window.removeEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = false;\n\n return this;\n }\n\n private _onResize = () => {\n const flicking = this._flicking;\n const resizeDebounce = flicking.resizeDebounce;\n const maxResizeDebounce = flicking.maxResizeDebounce;\n\n if (resizeDebounce <= 0) {\n void flicking.resize();\n } else {\n if (this._maxResizeDebounceTimer <= 0) {\n if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) {\n this._maxResizeDebounceTimer = window.setTimeout(this._doScheduledResize, maxResizeDebounce);\n }\n }\n\n if (this._resizeTimer > 0) {\n clearTimeout(this._resizeTimer);\n this._resizeTimer = 0;\n }\n\n this._resizeTimer = window.setTimeout(this._doScheduledResize, resizeDebounce);\n }\n };\n\n private _doScheduledResize = () => {\n clearTimeout(this._resizeTimer);\n clearTimeout(this._maxResizeDebounceTimer);\n\n this._maxResizeDebounceTimer = -1;\n this._resizeTimer = -1;\n\n void this._flicking.resize();\n };\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n private _skipFirstResize = (() => {\n let isFirstResize = true;\n\n return (() => {\n if (isFirstResize) {\n isFirstResize = false;\n return;\n }\n this._onResize();\n });\n })();\n}\n\nexport default AutoResizer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../../Flicking\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VanillaElementProvider implements ElementProvider {\n private _element: HTMLElement;\n private _rendered: boolean;\n\n public get element() { return this._element; }\n public get rendered() { return this._rendered; }\n\n public constructor(element: HTMLElement) {\n this._element = element;\n this._rendered = true;\n }\n\n public show(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement !== cameraEl) {\n cameraEl.appendChild(el);\n this._rendered = true;\n }\n }\n\n public hide(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement === cameraEl) {\n cameraEl.removeChild(el);\n this._rendered = false;\n }\n }\n}\n\nexport default VanillaElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport Flicking from \"../../../Flicking\";\nimport VirtualPanel from \"../VirtualPanel\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VirtualElementProvider implements ElementProvider {\n private _flicking: Flicking;\n private _panel: VirtualPanel;\n\n public get element() { return this._virtualElement.nativeElement; }\n public get rendered() { return this._virtualElement.visible; }\n\n private get _virtualElement() {\n const flicking = this._flicking;\n const elIndex = this._panel.elementIndex;\n const virtualElements = flicking.virtual.elements;\n\n return virtualElements[elIndex];\n }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public init(panel: VirtualPanel) {\n this._panel = panel;\n }\n\n public show(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n\n public hide(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n}\n\nexport default VirtualElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { range } from \"../utils\";\nimport { CLASS } from \"../const/external\";\n\nimport VirtualPanel from \"./panel/VirtualPanel\";\n\nexport interface VirtualOptions {\n renderPanel: (panel: VirtualPanel, index: number) => string;\n initialPanelCount: number;\n cache?: boolean;\n panelClass?: string;\n}\n\n/**\n * A manager class to add / remove virtual panels\n */\nclass VirtualManager {\n private _flicking: Flicking;\n\n private _renderPanel: (panel: VirtualPanel, index: number) => string;\n private _initialPanelCount: number;\n private _cache: boolean;\n private _panelClass: string;\n\n private _elements: Array<{ nativeElement: HTMLElement; visible: boolean }>;\n\n public get elements() { return this._elements; }\n\n // Options\n /**\n * A rendering function for the panel element's innerHTML\n * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @type {function}\n * @param {VirtualPanel} panel Instance of the panel패널 인스턴스\n * @param {number} index Index of the panel패널 인덱스\n * @default \"() => {}\"\n */\n public get renderPanel() { return this._renderPanel; }\n /**\n * Initial panel count to render\n * @ko 최초로 렌더링할 패널의 개수\n * @readonly\n * @type {number}\n * @default -1\n */\n public get initialPanelCount() { return this._initialPanelCount; }\n /**\n * Whether to cache rendered panel's innerHTML\n * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @type {boolean}\n * @default false\n */\n public get cache() { return this._cache; }\n /**\n * The class name that will be applied to rendered panel elements\n * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @type {string}\n * @default \"flicking-panel\"\n */\n public get panelClass() { return this._panelClass; }\n\n public set renderPanel(val: VirtualOptions[\"renderPanel\"]) {\n this._renderPanel = val;\n this._flicking.renderer.panels.forEach((panel: VirtualPanel) => panel.uncacheRenderResult());\n }\n\n public set cache(val: NonNullable) { this._cache = val; }\n public set panelClass(val: NonNullable) { this._panelClass = val; }\n\n public constructor(flicking: Flicking, options: VirtualOptions | null) {\n this._flicking = flicking;\n\n this._renderPanel = options?.renderPanel ?? (() => \"\");\n this._initialPanelCount = options?.initialPanelCount ?? -1;\n this._cache = options?.cache ?? false;\n this._panelClass = options?.panelClass ?? CLASS.DEFAULT_VIRTUAL;\n\n this._elements = [];\n }\n\n public init() {\n const flicking = this._flicking;\n\n if (!flicking.virtualEnabled) return;\n\n if (!flicking.externalRenderer && !flicking.renderExternal) {\n this._initVirtualElements();\n }\n\n const virtualElements = flicking.camera.children;\n this._elements = virtualElements.map(el => ({ nativeElement: el, visible: true }));\n }\n\n public show(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = true;\n\n if (nativeEl.style.display) {\n nativeEl.style.display = \"\";\n }\n }\n\n public hide(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = false;\n nativeEl.style.display = \"none\";\n }\n\n /**\n * Add new virtual panels at the end of the list\n * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public append(count: number = 1): VirtualPanel[] {\n const flicking = this._flicking;\n\n return this.insert(flicking.panels.length, count);\n }\n\n /**\n * Add new virtual panels at the start of the list\n * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public prepend(count: number = 1): VirtualPanel[] {\n return this.insert(0, count);\n }\n\n /**\n * Add new virtual panels at the given index\n * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public insert(index: number, count: number = 1): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchInsert({ index, elements: range(count), hasDOMInElements: false }) as VirtualPanel[];\n }\n\n /**\n * Remove panels at the given index\n * @ko 주어진 인덱스에서 패널들을 삭제합니다\n * @param {number} count The number of panels to remove삭제할 패널의 개수\n * @returns {Array} The panels removed삭제된 패널들\n */\n public remove(index: number, count: number): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchRemove({ index, deleteCount: count, hasDOMInElements: false }) as VirtualPanel[];\n }\n\n private _initVirtualElements() {\n const flicking = this._flicking;\n const cameraElement = flicking.camera.element;\n const panelsPerView = flicking.panelsPerView;\n const fragment = document.createDocumentFragment();\n\n const newElements = range(panelsPerView + 1).map(idx => {\n const panelEl = document.createElement(\"div\");\n panelEl.className = this._panelClass;\n panelEl.dataset.elementIndex = idx.toString();\n return panelEl;\n });\n\n newElements.forEach(el => {\n fragment.appendChild(el);\n });\n\n cameraElement.appendChild(fragment);\n }\n}\n\nexport default VirtualManager;\n","/**\n * All possible @egjs/axes event keys\n * @internal\n */\nexport const EVENT = {\n HOLD: \"hold\",\n CHANGE: \"change\",\n RELEASE: \"release\",\n ANIMATION_END: \"animationEnd\",\n FINISH: \"finish\"\n} as const;\n\n/**\n * An Axis key that Flicking uses\n * @internal\n */\nexport const POSITION_KEY = \"flick\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\nimport { circulatePosition, getDirection } from \"../../utils\";\n\nexport enum STATE_TYPE {\n IDLE,\n HOLDING,\n DRAGGING,\n ANIMATING,\n DISABLED\n}\n\n/**\n * A component that shows the current status of the user input or the animation\n * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트\n * @internal\n */\nabstract class State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly holding: boolean;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly animating: boolean;\n\n protected _delta: number = 0;\n protected _targetPanel: Panel | null = null;\n\n /**\n * A sum of delta values of change events from the last hold event of Axes\n * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산\n * @type {number}\n * @readonly\n */\n public get delta() { return this._delta; }\n\n /**\n * A panel to set as {@link Control#activePanel} after the animation is finished\n * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널\n * @type {number}\n * @readonly\n */\n public get targetPanel() { return this._targetPanel; }\n\n public set targetPanel(val: Panel | null) { this._targetPanel = val; }\n\n /**\n * An callback which is called when state has changed to this state\n * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수\n * @param {State} prevState An previous state이전 상태값\n * @return {void}\n */\n public onEnter(prevState: State): void {\n this._delta = prevState._delta;\n this._targetPanel = prevState._targetPanel;\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onHold(ctx: {\n flicking: Flicking;\n axesEvent: OnHold;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onChange(ctx: {\n flicking: Flicking;\n axesEvent: OnChange;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onRelease(ctx: {\n flicking: Flicking;\n axesEvent: OnRelease;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onAnimationEnd(ctx: {\n flicking: Flicking;\n axesEvent: OnAnimationEnd;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onFinish(ctx: {\n flicking: Flicking;\n axesEvent: OnFinish;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n protected _moveToChangedPosition(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const delta = axesEvent.delta[AXES.POSITION_KEY];\n\n if (!delta) {\n return;\n }\n\n this._delta += delta;\n\n const camera = flicking.camera;\n const prevPosition = camera.position;\n const position = axesEvent.pos[AXES.POSITION_KEY];\n const newPosition = flicking.circularEnabled\n ? circulatePosition(position, camera.range.min, camera.range.max)\n : position;\n\n camera.lookAt(newPosition);\n\n const moveEvent = new ComponentEvent(EVENTS.MOVE, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, axesEvent.delta[AXES.POSITION_KEY]),\n axesEvent\n });\n\n flicking.trigger(moveEvent);\n\n if (moveEvent.isCanceled()) {\n // Return to previous position\n camera.lookAt(prevPosition);\n transitTo(STATE_TYPE.DISABLED);\n }\n }\n}\n\nexport default State;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A default state when there's no user input and no animation's playing\n * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태\n * @internal\n */\nclass IdleState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n public onEnter() {\n this._delta = 0;\n this._targetPanel = null;\n }\n\n public onHold(ctx: Parameters[0]): void {\n // Shouldn't do any action until any panels on flicking area\n const { flicking, axesEvent, transitTo } = ctx;\n\n if (flicking.renderer.panelCount <= 0) {\n transitTo(STATE_TYPE.DISABLED);\n return;\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, {\n axesEvent\n });\n\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.HOLDING);\n }\n }\n\n // By methods call\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const controller = flicking.control.controller;\n const animatingContext = controller.animatingContext;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger AnimatingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.ANIMATING).onChange(ctx);\n }\n }\n}\n\nexport default IdleState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's holding the Flicking area, but not moved a single pixel yet\n * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태\n * @internal\n */\nclass HoldingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n private _releaseEvent: OnRelease | null = null;\n\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const inputEvent = axesEvent.inputEvent as { offsetX: number; offsetY: number };\n\n const offset = flicking.horizontal\n ? inputEvent.offsetX\n : inputEvent.offsetY;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, -offset),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger DraggingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.DRAGGING).onChange(ctx);\n }\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { axesEvent }));\n\n if (axesEvent.delta.flick !== 0) {\n // Sometimes \"release\" event on axes triggered before \"change\" event\n // Especially if user flicked panel fast in really short amount of time\n // if delta is not zero, that means above case happened.\n\n // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END\n // At least one move event should be included between holdStart and holdEnd\n axesEvent.setTo({ flick: flicking.camera.position }, 0);\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n // Can't handle select event here,\n // As \"finish\" axes event happens\n this._releaseEvent = axesEvent;\n }\n\n public onFinish(ctx: Parameters[0]): void {\n const { flicking, transitTo } = ctx;\n\n // Should transite to IDLE state before select event\n // As user expects hold is already finished\n transitTo(STATE_TYPE.IDLE);\n\n if (!this._releaseEvent) {\n return;\n }\n\n // Handle release event here\n // To prevent finish event called twice\n const releaseEvent = this._releaseEvent;\n\n // Static click\n /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */\n const srcEvent = releaseEvent.inputEvent.srcEvent;\n\n let clickedElement: HTMLElement;\n if (srcEvent.type === \"touchend\") {\n const touchEvent = srcEvent as TouchEvent;\n const touch = touchEvent.changedTouches[0];\n clickedElement = document.elementFromPoint(touch.clientX, touch.clientY) as HTMLElement;\n } else {\n clickedElement = srcEvent.target;\n }\n /* eslint-enable */\n\n const panels = flicking.renderer.panels;\n let clickedPanel: Panel | null = null;\n\n for (const panel of panels) {\n if (panel.contains(clickedElement)) {\n clickedPanel = panel;\n break;\n }\n }\n\n if (clickedPanel) {\n const cameraPosition = flicking.camera.position;\n const clickedPanelPosition = clickedPanel.position;\n\n flicking.trigger(new ComponentEvent(EVENTS.SELECT, {\n index: clickedPanel.index,\n panel: clickedPanel,\n // Direction to the clicked panel\n direction: getDirection(cameraPosition, clickedPanelPosition)\n }));\n }\n }\n}\n\nexport default HoldingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's dragging the Flicking area\n * @ko 사용자가 드래깅중인 상태\n * @internal\n */\nclass DraggingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onRelease(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n // Update last position to cope with Axes's animating behavior\n // Axes uses start position when animation start\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, {\n axesEvent\n }));\n\n if (flicking.renderer.panelCount <= 0) {\n // There're no panels\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n transitTo(STATE_TYPE.ANIMATING);\n\n const control = flicking.control;\n const position = axesEvent.destPos[AXES.POSITION_KEY];\n const duration = Math.max(axesEvent.duration, flicking.duration);\n\n try {\n void control.moveToPosition(position, duration, axesEvent);\n } catch (err) {\n transitTo(STATE_TYPE.IDLE);\n axesEvent.setTo({ [AXES.POSITION_KEY]: flicking.camera.position }, 0);\n }\n }\n}\n\nexport default DraggingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking's animating by user input or method call\n * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태\n * @internal\n */\nclass AnimatingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onHold(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const targetPanel = this._targetPanel;\n const control = flicking.control;\n\n this._delta = 0;\n flicking.control.updateInput();\n\n if (flicking.changeOnHold && targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { axesEvent });\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.DRAGGING);\n }\n }\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onFinish(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const control = flicking.control;\n const controller = control.controller;\n const animatingContext = controller.animatingContext;\n\n transitTo(STATE_TYPE.IDLE);\n\n flicking.trigger(new ComponentEvent(EVENTS.MOVE_END, {\n isTrusted: axesEvent.isTrusted,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n }));\n\n const targetPanel = this._targetPanel;\n if (targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n }\n}\n\nexport default AnimatingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking is stopped by event's `stop` method\n * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태\n * @internal\n */\nclass DisabledState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onAnimationEnd(ctx: Parameters[0]): void {\n const { transitTo } = ctx;\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onChange(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // Can stop Axes's change event\n axesEvent.stop();\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // This is needed when stopped hold start event\n if (axesEvent.delta.flick === 0) {\n transitTo(STATE_TYPE.IDLE);\n }\n }\n}\n\nexport default DisabledState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { AxesEvents } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport * as AXES from \"../const/axes\";\n\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport State, { STATE_TYPE } from \"./states/State\";\n\n/**\n * @internal\n */\nclass StateMachine {\n private _state: State;\n\n public get state(): State { return this._state; }\n\n public constructor() {\n this._state = new IdleState();\n }\n\n public fire(eventType: keyof AxesEvents, externalCtx: {\n flicking: Flicking;\n axesEvent: any;\n }) {\n const currentState = this._state;\n const ctx = { ...externalCtx, transitTo: this.transitTo };\n\n switch (eventType) {\n case AXES.EVENT.HOLD:\n currentState.onHold(ctx);\n break;\n case AXES.EVENT.CHANGE:\n currentState.onChange(ctx);\n break;\n case AXES.EVENT.RELEASE:\n currentState.onRelease(ctx);\n break;\n case AXES.EVENT.ANIMATION_END:\n currentState.onAnimationEnd(ctx);\n break;\n case AXES.EVENT.FINISH:\n currentState.onFinish(ctx);\n break;\n }\n }\n\n public transitTo = (nextStateType: STATE_TYPE): State => {\n let nextState: State;\n\n switch (nextStateType) {\n case STATE_TYPE.IDLE:\n nextState = new IdleState();\n break;\n case STATE_TYPE.HOLDING:\n nextState = new HoldingState();\n break;\n case STATE_TYPE.DRAGGING:\n nextState = new DraggingState();\n break;\n case STATE_TYPE.ANIMATING:\n nextState = new AnimatingState();\n break;\n case STATE_TYPE.DISABLED:\n nextState = new DisabledState();\n break;\n }\n\n nextState.onEnter(this._state);\n\n this._state = nextState;\n\n return this._state;\n };\n}\n\nexport default StateMachine;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Axes, { PanInput, AxesEvents, OnRelease } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\nimport { ORDER } from \"../const/external\";\nimport { getFlickingAttached, parseBounce } from \"../utils\";\nimport { ControlParams } from \"../type/external\";\n\nimport StateMachine from \"./StateMachine\";\n\n/**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @internal\n */\nclass AxesController {\n private _flicking: Flicking | null;\n private _axes: Axes | null;\n private _panInput: PanInput | null;\n private _stateMachine: StateMachine;\n\n private _animatingContext: { start: number; end: number; offset: number };\n private _dragged: boolean;\n\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스\n * @type {Axes | null}\n * @see https://naver.github.io/egjs-axes/docs/api/Axes\n * @readonly\n */\n public get axes() { return this._axes; }\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스\n * @type {PanInput | null}\n * @see https://naver.github.io/egjs-axes/docs/api/PanInput\n * @readonly\n */\n public get panInput() { return this._panInput; }\n /**\n * @internal\n */\n public get stateMachine() { return this._stateMachine; }\n /**\n * A activated {@link State} that shows the current status of the user input or the animation\n * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다\n * @type {State}\n */\n public get state() { return this._stateMachine.state; }\n /**\n * A context of the current animation playing\n * @ko 현재 재생중인 애니메이션 정보\n * @type {object}\n * @property {number} start A start position of the animation애니메이션 시작 지점\n * @property {number} end A end position of the animation애니메이션 끝 지점\n * @property {number} offset camera offset카메라 오프셋\n * @readonly\n */\n public get animatingContext() { return this._animatingContext; }\n /**\n * A current control parameters of the Axes instance\n * @ko 활성화된 현재 Axes 패러미터들\n * @type {ControlParams}\n */\n public get controlParams(): ControlParams {\n const axes = this._axes;\n\n if (!axes) {\n return {\n range: { min: 0, max: 0 },\n position: 0,\n circular: false\n };\n }\n\n const axis = axes.axis[AXES.POSITION_KEY];\n\n return {\n range: { min: axis.range![0], max: axis.range![1] },\n circular: (axis.circular as boolean[])[0],\n position: this.position\n };\n }\n\n /**\n * A Boolean indicating whether the user input is enabled\n * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get enabled() { return this._panInput?.isEnabled() ?? false; }\n /**\n * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값\n * @type {number}\n * @readonly\n */\n public get position() { return this._axes?.get([AXES.POSITION_KEY])[AXES.POSITION_KEY] ?? 0; }\n /**\n * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값\n * @type {number[]}\n * @readonly\n */\n public get range() { return this._axes?.axis[AXES.POSITION_KEY].range ?? [0, 0]; }\n /**\n * Actual bounce size(px)\n * @ko 적용된 bounce 크기(px 단위)\n * @type {number[]}\n * @readonly\n */\n public get bounce() { return this._axes?.axis[AXES.POSITION_KEY].bounce as number[] | undefined; }\n\n /** */\n public constructor() {\n this._resetInternalValues();\n this._stateMachine = new StateMachine();\n }\n\n /**\n * Initialize AxesController\n * @ko AxesController를 초기화합니다\n * @param {Flicking} flicking An instance of Flicking\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n\n this._axes = new Axes({\n [AXES.POSITION_KEY]: {\n range: [0, 0],\n circular: false,\n bounce: [0, 0]\n }\n }, {\n deceleration: flicking.deceleration,\n interruptable: flicking.interruptable,\n nested: flicking.nested,\n easing: flicking.easing\n });\n this._panInput = new PanInput(flicking.viewport.element, {\n inputType: flicking.inputType,\n threshold: 1,\n iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,\n preventDefaultOnDrag: flicking.preventDefaultOnDrag,\n scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],\n releaseOnScroll: true\n });\n\n const axes = this._axes;\n\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], this._panInput);\n\n for (const key in AXES.EVENT) {\n const eventType = AXES.EVENT[key] as keyof AxesEvents;\n\n axes.on(eventType, (e: AxesEvents[typeof eventType]) => {\n this._stateMachine.fire(eventType, {\n flicking,\n axesEvent: e\n });\n });\n }\n\n return this;\n }\n\n /**\n * Destroy AxesController and return to initial state\n * @ko AxesController를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n if (this._axes) {\n this.removePreventClickHandler();\n this._axes.destroy();\n }\n\n this._panInput?.destroy();\n\n this._resetInternalValues();\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._panInput?.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._panInput?.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._panInput?.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @chainable\n * @return {this}\n */\n public updateAnimation(position: number, duration?: number): this {\n this._animatingContext = {\n ...this._animatingContext,\n end: position\n };\n this._axes?.updateAnimation({\n destPos: { [AXES.POSITION_KEY]: position },\n duration\n });\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n this._axes?.stopAnimation();\n\n return this;\n }\n\n /**\n * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before\n * {@link AxesController#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public update(controlParams: ControlParams): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const axes = this._axes!;\n const axis = axes.axis[AXES.POSITION_KEY];\n\n axis.circular = [controlParams.circular, controlParams.circular];\n axis.range = [controlParams.range.min, controlParams.range.max];\n axis.bounce = parseBounce(flicking.bounce, camera.size);\n\n axes.axisManager.set({ [AXES.POSITION_KEY]: controlParams.position });\n\n return this;\n }\n\n /**\n * Attach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다\n * @return {this}\n */\n public addPreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.on(AXES.EVENT.HOLD, this._onAxesHold);\n axes.on(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.addEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Detach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다\n * @return {this}\n */\n public removePreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.off(AXES.EVENT.HOLD, this._onAxesHold);\n axes.off(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.removeEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다.\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise {\n const axes = this._axes;\n const state = this._stateMachine.state;\n\n if (!axes) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING));\n }\n\n const startPos = axes.get([AXES.POSITION_KEY])[AXES.POSITION_KEY];\n\n if (startPos === position) {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.lookAt(position);\n\n if (state.targetPanel) {\n flicking.control.setActive(state.targetPanel, flicking.control.activePanel, axesEvent?.isTrusted ?? false);\n }\n return Promise.resolve();\n }\n\n this._animatingContext = {\n start: startPos,\n end: position,\n offset: 0\n };\n\n const animate = () => {\n const resetContext = () => {\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n };\n\n axes.once(AXES.EVENT.FINISH, resetContext);\n\n if (axesEvent) {\n axesEvent.setTo({ [AXES.POSITION_KEY]: position }, duration);\n } else {\n axes.setTo({ [AXES.POSITION_KEY]: position }, duration);\n }\n };\n\n return new Promise((resolve, reject) => {\n const animationFinishHandler = () => {\n axes.off(AXES.EVENT.HOLD, interruptionHandler);\n resolve();\n };\n\n const interruptionHandler = () => {\n axes.off(AXES.EVENT.FINISH, animationFinishHandler);\n reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));\n };\n\n axes.once(AXES.EVENT.FINISH, animationFinishHandler);\n axes.once(AXES.EVENT.HOLD, interruptionHandler);\n\n animate();\n });\n }\n\n public updateDirection() {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const panInput = this._panInput!;\n\n axes.disconnect(panInput);\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], panInput);\n\n panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];\n }\n\n private _resetInternalValues() {\n this._flicking = null;\n this._axes = null;\n this._panInput = null;\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n this._dragged = false;\n }\n\n private _onAxesHold = () => {\n this._dragged = false;\n };\n\n private _onAxesChange = () => {\n this._dragged = !!this._panInput?.isEnabled();\n };\n\n private _preventClickWhenDragged = (e: MouseEvent) => {\n if (this._dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n this._dragged = false;\n };\n}\n\nexport default AxesController;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AxesController from \"../control/AxesController\";\nimport { DIRECTION, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getDirection, getFlickingAttached } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\n/**\n * A component that manages inputs and animation of Flicking\n * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트\n */\nabstract class Control {\n // Internal States\n protected _flicking: Flicking | null;\n protected _controller: AxesController;\n protected _activePanel: Panel | null;\n protected _nextPanel: Panel | null;\n\n /**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @type {AxesController}\n * @readonly\n */\n public get controller() { return this._controller; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get activeIndex() { return this._activePanel?.index ?? -1; }\n /**\n * An active panel\n * @ko 현재 선택된 패널\n * @type {Panel | null}\n * @readonly\n */\n public get activePanel() { return this._activePanel; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._controller.state.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._controller.state.holding; }\n\n /** */\n public constructor() {\n this._flicking = null;\n this._controller = new AxesController();\n this._activePanel = null;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @method\n * @abstract\n * @memberof Control\n * @instance\n * @name moveToPosition\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise;\n\n /**\n * Initialize Control\n * @ko Control을 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._controller.init(flicking);\n\n return this;\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._controller.destroy();\n\n this._flicking = null;\n this._activePanel = null;\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._controller.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._controller.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._controller.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우\n * @return {this}\n */\n public updateAnimation(panel: Panel, duration?: number, direction?: ValueOf): this {\n const state = this._controller.state;\n const position = this._getPosition(panel, direction ?? DIRECTION.NONE);\n\n state.targetPanel = panel;\n this._controller.updateAnimation(position, duration);\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n const state = this._controller.state;\n\n state.targetPanel = null;\n this._controller.stopAnimation();\n\n return this;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n camera.lookAt(camera.clampToReachablePosition(activePanel.position));\n }\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._controller.update(camera.controlParams);\n\n return this;\n }\n\n /**\n * Reset {@link Control#activePanel activePanel} to `null`\n * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다\n * @chainable\n * @return {this}\n */\n public resetActive(): this {\n this._activePanel = null;\n\n return this;\n }\n\n /**\n * Move {@link Camera} to the given panel\n * @ko {@link Camera}를 해당 패널 위로 이동합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {object} options An options object옵션 오브젝트\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public async moveToPanel(panel: Panel, {\n duration,\n direction = DIRECTION.NONE,\n axesEvent\n }: {\n duration: number;\n direction?: ValueOf;\n axesEvent?: OnRelease;\n }) {\n const position = this._getPosition(panel, direction);\n this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);\n\n return this._animateToPosition({ position, duration, newActivePanel: panel, axesEvent });\n }\n\n /**\n * @internal\n */\n public setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) {\n const flicking = getFlickingAttached(this._flicking);\n\n this._activePanel = newActivePanel;\n this._nextPanel = null;\n\n flicking.camera.updateAdaptiveHeight();\n\n if (newActivePanel !== prevActivePanel) {\n flicking.trigger(new ComponentEvent(EVENTS.CHANGED, {\n index: newActivePanel.index,\n panel: newActivePanel,\n prevIndex: prevActivePanel?.index ?? -1,\n prevPanel: prevActivePanel,\n isTrusted,\n direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE\n }));\n } else {\n flicking.trigger(new ComponentEvent(EVENTS.RESTORED, {\n isTrusted\n }));\n }\n }\n\n /**\n * @internal\n */\n public copy(control: Control) {\n this._flicking = control._flicking;\n this._activePanel = control._activePanel;\n this._controller = control._controller;\n }\n\n protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf) {\n const flicking = getFlickingAttached(this._flicking);\n const triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n const event = new ComponentEvent(triggeringEvent, {\n index: panel.index,\n panel,\n isTrusted: axesEvent?.isTrusted || false,\n direction: direction ?? getDirection(activePanel?.position ?? camera.position, position)\n });\n\n this._nextPanel = panel;\n flicking.trigger(event);\n\n if (event.isCanceled()) {\n throw new FlickingError(ERROR.MESSAGE.STOP_CALLED_BY_USER, ERROR.CODE.STOP_CALLED_BY_USER);\n }\n }\n\n protected async _animateToPosition({\n position,\n duration,\n newActivePanel,\n axesEvent\n }: {\n position: number;\n duration: number;\n newActivePanel: Panel;\n axesEvent?: OnRelease;\n }) {\n const flicking = getFlickingAttached(this._flicking);\n const animate = () => this._controller.animateTo(position, duration, axesEvent);\n const state = this._controller.state;\n\n state.targetPanel = newActivePanel;\n\n if (duration <= 0) {\n return animate();\n } else {\n return animate().then(async () => {\n await flicking.renderer.render();\n }).catch(err => {\n if (axesEvent && err instanceof FlickingError && err.code === ERROR.CODE.ANIMATION_INTERRUPTED) return;\n throw err;\n });\n }\n }\n\n private _getPosition(panel: Panel, direction: ValueOf = DIRECTION.NONE) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n let position = panel.position;\n const nearestAnchor = camera.findNearestAnchor(position);\n\n if (panel.removed || !nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(panel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n if (!camera.canReach(panel)) {\n // Override position & panel if that panel is not reachable\n position = nearestAnchor.position;\n panel = nearestAnchor.panel;\n } else if (flicking.circularEnabled) {\n // Circular mode is enabled, find nearest distance to panel\n const camPos = this._controller.position; // Actual position of the Axes\n const camRangeDiff = camera.rangeDiff;\n const possiblePositions = [position, position + camRangeDiff, position - camRangeDiff]\n .filter(pos => {\n if (direction === DIRECTION.NONE) return true;\n\n return direction === DIRECTION.PREV\n ? pos <= camPos\n : pos >= camPos;\n });\n\n position = possiblePositions.reduce((nearestPosition, pos) => {\n if (Math.abs(camPos - pos) < Math.abs(camPos - nearestPosition)) {\n return pos;\n } else {\n return nearestPosition;\n }\n }, Infinity);\n }\n\n return position;\n }\n}\n\nexport default Control;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"./panel/Panel\";\n\n/**\n * A data component that has actual position where the camera should be stopped at\n * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트\n */\nclass AnchorPoint {\n private _index: number;\n private _pos: number;\n private _panel: Panel;\n\n /**\n * Index of AnchorPoint\n * @ko AnchorPoint의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of AnchorPoint\n * @ko AnchorPoint의 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos; }\n /**\n * A {@link Panel} instance AnchorPoint is referencing to\n * @ko AnchorPoint가 참조하고 있는 {@link Panel}\n * @type {Panel}\n * @readonly\n */\n public get panel() { return this._panel; }\n\n /**\n * @param {object} options An options object옵션 객체\n * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스\n * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표\n * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel}\n */\n public constructor({\n index,\n position,\n panel\n }: {\n index: number;\n position: number;\n panel: Panel;\n }) {\n this._index = index;\n this._pos = position;\n this._panel = panel;\n }\n}\n\nexport default AnchorPoint;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport { circulateIndex, clamp, getFlickingAttached } from \"../utils\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link SnapControl}\n * @ko {@link SnapControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels can go after release입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n */\nexport interface SnapControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that uses a release momentum to choose destination panel\n * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control}\n */\nclass SnapControl extends Control {\n private _count: SnapControlOptions[\"count\"];\n\n /**\n * Maximum number of panels can go after release\n * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n * @type {number}\n * @default Infinity\n */\n public get count() { return this._count; }\n\n public set count(val: SnapControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = Infinity\n }: Partial = {}) {\n super();\n\n this._count = count;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activeAnchor = camera.findActiveAnchor();\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n const state = this._controller.state;\n\n if (!activeAnchor || !anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);\n\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n const absPosDelta = Math.abs(posDelta);\n const snapDelta = axesEvent && axesEvent.delta[AXES.POSITION_KEY] !== 0\n ? Math.abs(axesEvent.delta[AXES.POSITION_KEY])\n : absPosDelta;\n let targetAnchor: AnchorPoint;\n\n if (snapDelta >= snapThreshold && snapDelta > 0) {\n // Move to anchor at position\n targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);\n } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {\n // Move to the adjacent panel\n targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);\n } else {\n // Fallback to nearest panel from current camera\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent);\n\n return this._animateToPosition({\n position: camera.clampToReachablePosition(targetAnchor.position),\n duration,\n newActivePanel: targetAnchor.panel,\n axesEvent\n });\n }\n\n private _findSnappedAnchor(position: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const count = this._count;\n\n const currentPos = camera.position;\n\n const clampedPosition = camera.clampToReachablePosition(position);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtCamera || !anchorAtPosition) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n if (!isFinite(count)) {\n return anchorAtPosition;\n }\n\n const panelCount = flicking.panelCount;\n const anchors = camera.anchorPoints;\n\n let loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff);\n if ((position > currentPos && anchorAtPosition.index < anchorAtCamera.index)\n || (anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount += 1;\n } else if ((position < currentPos && anchorAtPosition.index > anchorAtCamera.index)\n || (anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount -= 1;\n }\n\n const circularIndexOffset = loopCount * panelCount;\n const anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset;\n\n if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) {\n const anchor = anchors[anchorAtPosition.index];\n\n return new AnchorPoint({\n index: anchor.index,\n position: anchor.position + loopCount * camera.rangeDiff,\n panel: anchor.panel\n });\n }\n\n if (flicking.circularEnabled) {\n const targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)];\n let loop = Math.floor(count / panelCount);\n\n if (position > currentPos && targetAnchor.index < anchorAtCamera.index) {\n loop += 1;\n } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) {\n loop -= 1;\n }\n\n return new AnchorPoint({\n index: targetAnchor.index,\n position: targetAnchor.position + loop * camera.rangeDiff,\n panel: targetAnchor.panel\n });\n } else {\n return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)];\n }\n }\n\n private _findAdjacentAnchor(position: number, posDelta: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n if (camera.circularEnabled) {\n const anchorIncludePosition = camera.findAnchorIncludePosition(position);\n\n if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) {\n return anchorIncludePosition;\n }\n }\n\n const adjacentAnchor = (posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) ?? anchorAtCamera;\n\n return adjacentAnchor;\n }\n\n private _calcSnapThreshold(threshold: number, position: number, activeAnchor: AnchorPoint): number {\n const isNextDirection = position > activeAnchor.position;\n const panel = activeAnchor.panel;\n const panelSize = panel.size;\n const alignPos = panel.alignPosition;\n\n // Minimum distance needed to decide prev/next panel as nearest\n /*\n * | Prev | Next |\n * |<------>|<------------>|\n * [ |<-Anchor ]\n */\n return Math.max(threshold, isNextDirection\n ? panelSize - alignPos + panel.margin.next\n : alignPos + panel.margin.prev);\n }\n}\n\nexport default SnapControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached } from \"../utils\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link FreeControl}\n * @ko {@link FreeControl} 생성시 사용되는 옵션\n * @interface\n * @property {boolean} stopAtEdge Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n */\nexport interface FreeControlOptions {\n stopAtEdge: boolean;\n}\n\n/**\n * A {@link Control} that can be scrolled freely without alignment\n * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control}\n */\nclass FreeControl extends Control {\n private _stopAtEdge: FreeControlOptions[\"stopAtEdge\"];\n\n /**\n * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n * @type {boolean}\n * @default true\n */\n public get stopAtEdge() { return this._stopAtEdge; }\n\n public set stopAtEdge(val: FreeControlOptions[\"stopAtEdge\"]) { this._stopAtEdge = val; }\n\n /** */\n public constructor({\n stopAtEdge = true\n }: Partial = {}) {\n super();\n\n this._stopAtEdge = stopAtEdge;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n const panelRange = activePanel.range;\n const newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n camera.lookAt(camera.clampToReachablePosition(newPosition));\n }\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n\n const camera = flicking.camera;\n const targetPos = camera.clampToReachablePosition(position);\n\n const anchorAtPosition = camera.findAnchorIncludePosition(targetPos);\n\n if (!anchorAtPosition) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const targetPanel = anchorAtPosition.panel;\n\n // Trigger only change event\n if (targetPanel !== this._activePanel) {\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n }\n\n return this._animateToPosition({ position: this._stopAtEdge ? targetPos : position, duration, newActivePanel: targetPanel, axesEvent });\n }\n}\n\nexport default FreeControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport Panel from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { clamp, getFlickingAttached, getMinusCompensatedIndex, isBetween } from \"../utils\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n/**\n * An options for the {@link StrictControl}\n * @ko {@link StrictControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels that can be moved at a time최대로 움직일 수 있는 패널의 개수\n */\nexport interface StrictControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that allow you to select the maximum number of panels to move at a time\n * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control}\n */\nclass StrictControl extends Control {\n private _count: number;\n private _indexRange: { min: number; max: number };\n\n /**\n * Maximum number of panels that can be moved at a time\n * @ko 최대로 움직일 수 있는 패널의 개수\n * @type {number}\n * @default 1\n */\n public get count() { return this._count; }\n\n public set count(val: StrictControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = 1\n }: Partial = {}) {\n super();\n\n this._count = count;\n this._resetIndexRange();\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy() {\n super.destroy();\n\n this._resetIndexRange();\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const renderer = flicking.renderer;\n const controller = this._controller;\n const controlParams = camera.controlParams;\n const count = this._count;\n\n const activePanel = controller.state.animating\n ? camera.findNearestAnchor(camera.position)?.panel\n : this._activePanel;\n\n if (!activePanel) {\n controller.update(controlParams);\n this._resetIndexRange();\n return this;\n }\n\n const cameraRange = controlParams.range;\n const currentPos = activePanel.position;\n const currentIndex = activePanel.index;\n const panelCount = renderer.panelCount;\n\n let prevPanelIndex = currentIndex - count;\n let nextPanelIndex = currentIndex + count;\n\n if (prevPanelIndex < 0) {\n prevPanelIndex = flicking.circularEnabled\n ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount)\n : clamp(prevPanelIndex, 0, panelCount - 1);\n }\n if (nextPanelIndex >= panelCount) {\n nextPanelIndex = flicking.circularEnabled\n ? nextPanelIndex % panelCount\n : clamp(nextPanelIndex, 0, panelCount - 1);\n }\n\n const prevPanel = renderer.panels[prevPanelIndex];\n const nextPanel = renderer.panels[nextPanelIndex];\n\n let prevPos = Math.max(prevPanel.position, cameraRange.min);\n let nextPos = Math.min(nextPanel.position, cameraRange.max);\n\n if (prevPos > currentPos) {\n prevPos -= camera.rangeDiff;\n }\n if (nextPos < currentPos) {\n nextPos += camera.rangeDiff;\n }\n\n controlParams.range = {\n min: prevPos,\n max: nextPos\n };\n\n if (controlParams.circular) {\n if (controlParams.position < prevPos) {\n controlParams.position += camera.rangeDiff;\n }\n\n if (controlParams.position > nextPos) {\n controlParams.position -= camera.rangeDiff;\n }\n }\n\n controlParams.circular = false;\n controller.update(controlParams);\n\n this._indexRange = {\n min: prevPanel.index,\n max: nextPanel.index\n };\n\n return this;\n }\n\n public async moveToPanel(panel: Panel, options: Parameters[1]): Promise {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const controller = this._controller;\n\n controller.update(camera.controlParams);\n\n return super.moveToPanel(panel, options);\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const currentPanel = this._nextPanel ?? this._activePanel;\n const axesRange = this._controller.range;\n const indexRange = this._indexRange;\n const cameraRange = camera.range;\n const state = this._controller.state;\n\n const clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtPosition || !currentPanel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const prevPos = currentPanel.position;\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n\n const isOverThreshold = Math.abs(posDelta) >= flicking.threshold;\n const adjacentAnchor = (position > prevPos)\n ? camera.getNextAnchor(anchorAtPosition)\n : camera.getPrevAnchor(anchorAtPosition);\n\n let targetPos: number;\n let targetPanel: Panel;\n\n const anchors = camera.anchorPoints;\n const firstAnchor = anchors[0];\n const lastAnchor = anchors[anchors.length - 1];\n\n const shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max);\n const shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max);\n\n const isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max\n ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max)\n : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max);\n\n if (shouldBounceToFirst || shouldBounceToLast) {\n // In bounce area\n const targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor;\n\n targetPanel = targetAnchor.panel;\n targetPos = targetAnchor.position;\n } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) {\n // Move to anchor at position\n targetPanel = anchorAtPosition.panel;\n targetPos = anchorAtPosition.position;\n } else if (isOverThreshold && isAdjacent) {\n // Move to adjacent anchor\n targetPanel = adjacentAnchor!.panel;\n targetPos = adjacentAnchor!.position;\n } else {\n // Fallback to nearest panel from current camera\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n if (!anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n\n return this._animateToPosition({\n position: targetPos,\n duration,\n newActivePanel: targetPanel,\n axesEvent\n });\n }\n\n public setActive = (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => {\n super.setActive(newActivePanel, prevActivePanel, isTrusted);\n this.updateInput();\n };\n\n private _resetIndexRange() {\n this._indexRange = { min: 0, max: 0 };\n }\n}\n\nexport default StrictControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { clamp } from \"../../utils\";\n\n/**\n * A mode of camera\n */\nabstract class CameraMode {\n protected _flicking: Flicking;\n\n /** */\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public abstract checkAvailability(): boolean;\n public abstract getRange(): { min: number; max: number };\n\n public getAnchors(): AnchorPoint[] {\n const panels = this._flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n const anchorsIncludingPosition = anchors.filter(anchor => anchor.panel.includePosition(position, true));\n\n return anchorsIncludingPosition.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n let prevDist = Infinity;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.abs(anchor.position - position);\n\n if (dist > prevDist) {\n // Return previous anchor\n return anchors[anchorIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return anchors[anchors.length - 1];\n }\n\n public clampToReachablePosition(position: number): number {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n return clamp(position, range.min, range.max);\n }\n\n public getCircularOffset(): number {\n return 0;\n }\n\n public canReach(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n if (panel.removed) return false;\n\n const panelPos = panel.position;\n\n return panelPos >= range.min && panelPos <= range.max;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const visibleRange = camera.visibleRange;\n // Should not include margin, as we don't declare what the margin is visible as what the panel is visible.\n return panel.isVisibleOnRange(visibleRange.min, visibleRange.max);\n }\n}\n\nexport default CameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport CameraMode from \"./CameraMode\";\n\nclass LinearCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n // It's always available\n return true;\n }\n\n public getRange(): { min: number; max: number } {\n const renderer = this._flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n return { min: firstPanel?.position ?? 0, max: lastPanel?.position ?? 0 };\n }\n}\n\nexport default LinearCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { DIRECTION } from \"../../const/external\";\nimport { circulatePosition } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\n/**\n * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop\n * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드\n */\nclass CircularCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n if (panels.length <= 0) {\n return false;\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n const visibleSize = flicking.camera.size;\n const panelSizeSum = lastPanelNext - firstPanelPrev;\n\n const canSetCircularMode = panels\n .every(panel => panelSizeSum - panel.size >= visibleSize);\n\n return canSetCircularMode;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return { min: 0, max: 0 };\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n return { min: firstPanelPrev, max: lastPanelNext };\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n const camRange = camera.range;\n let minDist = Infinity;\n let minDistIndex = -1;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.min(\n Math.abs(anchor.position - position),\n Math.abs(anchor.position - camRange.min + camRange.max - position),\n Math.abs(position - camRange.min + camRange.max - anchor.position)\n );\n\n if (dist < minDist) {\n minDist = dist;\n minDistIndex = anchorIdx;\n }\n }\n\n // Return last anchor\n return anchors[minDistIndex];\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n const rangeDiff = camera.rangeDiff;\n const anchorCount = anchors.length;\n const positionInRange = circulatePosition(position, range.min, range.max);\n\n let anchorInRange: AnchorPoint | null = super.findAnchorIncludePosition(positionInRange);\n\n if (anchorCount > 0 && (position === range.min || position === range.max)) {\n const possibleAnchors = [\n anchorInRange,\n new AnchorPoint({\n index: 0,\n position: anchors[0].position + rangeDiff,\n panel: anchors[0].panel\n }),\n new AnchorPoint({\n index: anchorCount - 1,\n position: anchors[anchorCount - 1].position - rangeDiff,\n panel: anchors[anchorCount - 1].panel\n })\n ].filter(anchor => !!anchor) as AnchorPoint[];\n\n anchorInRange = possibleAnchors.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n if (!anchorInRange) return null;\n\n if (position < range.min) {\n const loopCount = -Math.floor((range.min - position) / rangeDiff) - 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n } else if (position > range.max) {\n const loopCount = Math.floor((position - range.max) / rangeDiff) + 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n }\n\n return anchorInRange;\n }\n\n public getCircularOffset(): number {\n const flicking = this._flicking;\n const camera = flicking.camera;\n\n if (!camera.circularEnabled) return 0;\n\n const toggled = flicking.panels.filter(panel => panel.toggled);\n const toggledPrev = toggled.filter(panel => panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = toggled.filter(panel => panel.toggleDirection === DIRECTION.NEXT);\n\n return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext);\n }\n\n public clampToReachablePosition(position: number): number {\n // Basically all position is reachable for circular camera\n return position;\n }\n\n public canReach(panel: Panel): boolean {\n if (panel.removed) return false;\n\n // Always reachable on circular mode\n return true;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n const rangeDiff = camera.rangeDiff;\n const visibleRange = camera.visibleRange;\n const visibleInCurrentRange = super.canSee(panel);\n\n // Check looped visible area for circular case\n if (visibleRange.min < range.min) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff);\n } else if (visibleRange.max > range.max) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff);\n }\n\n return visibleInCurrentRange;\n }\n\n private _calcPanelAreaSum(panels: Panel[]) {\n return panels.reduce((sum: number, panel: Panel) => sum + panel.sizeIncludingMargin, 0);\n }\n}\n\nexport default CircularCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport Panel from \"../../core/panel/Panel\";\nimport { parseAlign } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\nclass BoundCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return false;\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n return isBiggerThanViewport;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const alignPos = flicking.camera.alignPosition;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return { min: 0, max: 0 };\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n const firstPos = firstPanelPrev + alignPos;\n const lastPos = lastPanelNext - viewportSize + alignPos;\n\n if (isBiggerThanViewport) {\n return { min: firstPos, max: lastPos };\n } else {\n const align = flicking.camera.align;\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n const pos = firstPos + parseAlign(alignVal, lastPos - firstPos);\n\n return { min: pos, max: pos };\n }\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const camera = flicking.camera;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return [];\n }\n\n const range = flicking.camera.range;\n const reachablePanels = panels.filter(panel => camera.canReach(panel));\n\n if (reachablePanels.length > 0) {\n const shouldPrependBoundAnchor = reachablePanels[0].position !== range.min;\n const shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max;\n const indexOffset = shouldPrependBoundAnchor ? 1 : 0;\n\n const newAnchors = reachablePanels.map((panel, idx) => new AnchorPoint({\n index: idx + indexOffset,\n position: panel.position,\n panel\n }));\n\n if (shouldPrependBoundAnchor) {\n newAnchors.splice(0, 0, new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panels[reachablePanels[0].index - 1]\n }));\n }\n\n if (shouldAppendBoundAnchor) {\n newAnchors.push(new AnchorPoint({\n index: newAnchors.length,\n position: range.max,\n panel: panels[reachablePanels[reachablePanels.length - 1].index + 1]\n }));\n }\n\n return newAnchors;\n } else if (range.min !== range.max) {\n // There're more than 2 panels\n const nearestPanelAtMin = this._findNearestPanel(range.min, panels);\n const panelAtMin = nearestPanelAtMin.index === panels.length - 1\n ? nearestPanelAtMin.prev()!\n : nearestPanelAtMin;\n const panelAtMax = panelAtMin.next()!;\n\n return [\n new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panelAtMin\n }),\n new AnchorPoint({\n index: 1,\n position: range.max,\n panel: panelAtMax\n })\n ];\n } else {\n return [new AnchorPoint({\n index: 0,\n position: range.min,\n panel: this._findNearestPanel(range.min, panels)\n })];\n }\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n if (position <= range.min) {\n return anchors[0];\n } else if (position >= range.max) {\n return anchors[anchors.length - 1];\n } else {\n return super.findAnchorIncludePosition(position);\n }\n }\n\n private _findNearestPanel(pos: number, panels: Panel[]): Panel {\n let prevDist = Infinity;\n for (let panelIdx = 0; panelIdx < panels.length; panelIdx++) {\n const panel = panels[panelIdx];\n const dist = Math.abs(panel.position - pos);\n\n if (dist > prevDist) {\n // Return previous anchor\n return panels[panelIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return panels[panels.length - 1];\n }\n}\n\nexport default BoundCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport * as ERROR from \"../const/error\";\nimport { ALIGN, CIRCULAR_FALLBACK, DIRECTION, EVENTS, ORDER } from \"../const/external\";\nimport { checkExistence, find, getFlickingAttached, getProgress, getStyle, includes, parseAlign, toArray } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\nimport { CameraMode, BoundCameraMode, CircularCameraMode, LinearCameraMode } from \"./mode\";\n\nexport interface CameraOptions {\n align: FlickingOptions[\"align\"];\n}\n\n/**\n * A component that manages actual movement inside the viewport\n * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트\n */\nclass Camera {\n // Options\n private _align: FlickingOptions[\"align\"];\n\n // Internal states\n private _flicking: Flicking;\n private _mode: CameraMode;\n private _el: HTMLElement;\n private _transform: string;\n private _position: number;\n private _alignPos: number;\n private _offset: number;\n private _circularOffset: number;\n private _circularEnabled: boolean;\n private _range: { min: number; max: number };\n private _visiblePanels: Panel[];\n private _anchors: AnchorPoint[];\n private _needPanelTriggered: { prev: boolean; next: boolean };\n private _panelOrder: ValueOf;\n\n // Internal states getter\n /**\n * The camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n /**\n * An array of the child elements of the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열\n * @type {HTMLElement[]}\n * @readonly\n */\n public get children() { return toArray(this._el.children) as HTMLElement[]; }\n /**\n * Current position of the camera\n * @ko Camera의 현재 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._position; }\n /**\n * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at\n * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option\n * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다.\n * @type {number}\n * @default 0\n * @readonly\n */\n public get offset() { return this._offset - this._circularOffset; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._circularEnabled; }\n /**\n * A current camera mode\n * @type {CameraMode}\n * @readonly\n */\n public get mode() { return this._mode; }\n /**\n * A range that Camera's {@link Camera#position position} can reach\n * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} max A maximum position최대 위치\n * @readonly\n */\n public get range() { return this._range; }\n /**\n * A difference between Camera's minimum and maximum position that can reach\n * @ko Camera가 도달 가능한 최소/최대 좌표의 차이\n * @type {number}\n * @readonly\n */\n public get rangeDiff() { return this._range.max - this._range.min; }\n /**\n * An array of visible panels from the current position\n * @ko 현재 보이는 패널들의 배열\n * @type {Panel[]}\n * @readonly\n */\n public get visiblePanels() { return this._visiblePanels; }\n /**\n * A range of the visible area from the current position\n * @ko 현재 위치에서 보이는 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} min A maximum position최대 위치\n * @readonly\n */\n public get visibleRange() { return { min: this._position - this._alignPos, max: this._position - this._alignPos + this.size }; }\n /**\n * An array of {@link AnchorPoint}s that Camera can be stopped at\n * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록\n * @type {AnchorPoint[]}\n * @readonly\n */\n public get anchorPoints() { return this._anchors; }\n /**\n * A current parameters of the Camera for updating {@link AxesController}\n * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들\n * @type {ControlParams}\n * @readonly\n */\n public get controlParams() { return { range: this._range, position: this._position, circular: this._circularEnabled }; }\n /**\n * A Boolean value indicating whether Camera's over the minimum or maximum position reachable\n * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다\n * @type {boolean}\n * @readonly\n */\n public get atEdge() { return this._position <= this._range.min || this._position >= this._range.max; }\n /**\n * Return the size of the viewport\n * @ko 뷰포트 크기를 반환합니다\n * @type {number}\n * @readonly\n */\n public get size() {\n const flicking = this._flicking;\n return flicking\n ? flicking.horizontal\n ? flicking.viewport.width\n : flicking.viewport.height\n : 0;\n }\n\n /**\n * Return the camera's position progress from the first panel to last panel\n * Range is from 0 to last panel's index\n * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다\n * 범위는 0부터 마지막 패널의 인덱스까지입니다\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n const position = this._position + this._offset;\n const nearestAnchor = this.findNearestAnchor(this._position);\n\n if (!flicking || !nearestAnchor) {\n return NaN;\n }\n\n const nearestPanel = nearestAnchor.panel;\n const panelPos = nearestPanel.position + nearestPanel.offset;\n const bounceSize = flicking.control.controller.bounce!;\n\n const { min: prevRange, max: nextRange } = this.range;\n const rangeDiff = this.rangeDiff;\n\n if (position === panelPos) {\n return nearestPanel.index;\n }\n\n if (position < panelPos) {\n const prevPanel = nearestPanel.prev();\n let prevPosition = prevPanel\n ? prevPanel.position + prevPanel.offset\n : prevRange - bounceSize[0];\n\n // Looped\n if (prevPosition > panelPos) {\n prevPosition -= rangeDiff;\n }\n\n return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos);\n } else {\n const nextPanel = nearestPanel.next();\n let nextPosition = nextPanel\n ? nextPanel.position + nextPanel.offset\n : nextRange + bounceSize[1];\n\n // Looped\n if (nextPosition < panelPos) {\n nextPosition += rangeDiff;\n }\n\n return nearestPanel.index + getProgress(position, panelPos, nextPosition);\n }\n }\n\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성\n * @type {string}\n * @readonly\n */\n public get panelOrder() { return this._panelOrder; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element\n * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n }\n\n /** */\n public constructor(flicking: Flicking, {\n align = ALIGN.CENTER\n }: Partial = {}) {\n this._flicking = flicking;\n this._resetInternalValues();\n\n // Options\n this._align = align;\n }\n\n /**\n * Initialize Camera\n * @ko Camera를 초기화합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우\n * @return {this}\n */\n public init(): this {\n const viewportEl = this._flicking.viewport.element;\n\n checkExistence(viewportEl.firstElementChild, \"First element child of the viewport element\");\n this._el = viewportEl.firstElementChild as HTMLElement;\n this._checkTranslateSupport();\n\n this._updateMode();\n this.updatePanelOrder();\n\n return this;\n }\n\n /**\n * Destroy Camera and return to initial state\n * @ko Camera를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): this {\n this._resetInternalValues();\n return this;\n }\n\n /**\n * Move to the given position and apply CSS transform\n * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다\n * @param {number} pos A new position움직일 위치\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public lookAt(pos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const prevPos = this._position;\n\n this._position = pos;\n const toggled = this._togglePanels(prevPos, pos);\n this._refreshVisiblePanels();\n this._checkNeedPanel();\n this._checkReachEnd(prevPos, pos);\n\n if (toggled) {\n void flicking.renderer.render().then(() => {\n this.updateOffset();\n });\n } else {\n this.applyTransform();\n }\n }\n\n /**\n * Return a previous {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint}\n */\n public getPrevAnchor(anchor: AnchorPoint): AnchorPoint | null {\n if (!this._circularEnabled || anchor.index !== 0) {\n return this._anchors[anchor.index - 1] || null;\n } else {\n const anchors = this._anchors;\n const rangeDiff = this.rangeDiff;\n const lastAnchor = anchors[anchors.length - 1];\n\n return new AnchorPoint({\n index: lastAnchor.index,\n position: lastAnchor.position - rangeDiff,\n panel: lastAnchor.panel\n });\n }\n }\n\n /**\n * Return a next {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint}\n */\n public getNextAnchor(anchor: AnchorPoint): AnchorPoint | null {\n const anchors = this._anchors;\n\n if (!this._circularEnabled || anchor.index !== anchors.length - 1) {\n return anchors[anchor.index + 1] || null;\n } else {\n const rangeDiff = this.rangeDiff;\n const firstAnchor = anchors[0];\n\n return new AnchorPoint({\n index: firstAnchor.index,\n position: firstAnchor.position + rangeDiff,\n panel: firstAnchor.panel\n });\n }\n }\n\n /**\n * Return the camera's position progress in the panel below\n * Value is from 0 to 1 when the camera's inside panel\n * Value can be lower than 0 or bigger than 1 when it's in the margin area\n * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다\n * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다\n * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다\n */\n public getProgressInPanel(panel: Panel) {\n const panelRange = panel.range;\n\n return (this._position - panelRange.min) / (panelRange.max - panelRange.min);\n }\n\n /**\n * Return {@link AnchorPoint} that includes given position\n * If there's no {@link AnchorPoint} that includes the given position, return `null` instead\n * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다\n * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint}\n */\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n return this._mode.findAnchorIncludePosition(position);\n }\n\n /**\n * Return {@link AnchorPoint} nearest to given position\n * If there're no {@link AnchorPoint}s, return `null` instead\n * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다\n * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint}\n */\n public findNearestAnchor(position: number): AnchorPoint | null {\n return this._mode.findNearestAnchor(position);\n }\n\n /**\n * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel}\n * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다\n * @return {AnchorPoint | null}\n */\n public findActiveAnchor(): AnchorPoint | null {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!activePanel) return null;\n\n return find(this._anchors, anchor => anchor.panel.index === activePanel.index) ?? this.findNearestAnchor(activePanel.position);\n }\n\n /**\n * Clamp the given position between camera's range\n * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다\n * @param {number} position A position to clamp범위를 제한할 좌표\n * @return {number} A clamped position범위 제한된 좌표\n */\n public clampToReachablePosition(position: number): number {\n return this._mode.clampToReachablePosition(position);\n }\n\n /**\n * Check whether the given panel is inside of the Camera's range\n * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부\n */\n public canReach(panel: Panel): boolean {\n return this._mode.canReach(panel);\n }\n\n /**\n * Check whether the given panel element is visible at the current position\n * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부\n */\n public canSee(panel: Panel): boolean {\n return this._mode.canSee(panel);\n }\n\n /**\n * Update {@link Camera#range range} of Camera\n * @ko Camera의 {@link Camera#range range}를 업데이트합니다\n * @method\n * @abstract\n * @memberof Camera\n * @instance\n * @name updateRange\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public updateRange() {\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n this._updateMode();\n this._range = this._mode.getRange();\n\n panels.forEach(panel => panel.updateCircularToggleDirection());\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#alignPosition alignPosition}\n * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateAlignPos(): this {\n const align = this._align;\n\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n this._alignPos = parseAlign(alignVal, this.size);\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#anchorPoints anchorPoints}\n * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAnchors(): this {\n this._anchors = this._mode.getAnchors();\n\n return this;\n }\n\n /**\n * Update Viewport's height to active panel's height\n * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAdaptiveHeight() {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;\n\n flicking.viewport.setSize({\n height: activePanel.height\n });\n }\n\n /**\n * Update current offset of the camera\n * @ko 현재 카메라의 오프셋을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateOffset(): this {\n const flicking = getFlickingAttached(this._flicking);\n const position = this._position;\n const unRenderedPanels = flicking.panels.filter(panel => !panel.rendered);\n\n this._offset = unRenderedPanels\n .filter(panel => panel.position + panel.offset < position)\n .reduce((offset, panel) => offset + panel.sizeIncludingMargin, 0);\n\n this._circularOffset = this._mode.getCircularOffset();\n\n this.applyTransform();\n\n return this;\n }\n\n /**\n * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element\n * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다\n * @return {this}\n */\n public updatePanelOrder(): this {\n const flicking = getFlickingAttached(this._flicking);\n\n if (!flicking.horizontal) return this;\n\n const el = this._el;\n const direction = getStyle(el).direction;\n if (direction !== this._panelOrder) {\n this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR;\n if (flicking.initialized) {\n flicking.control.controller.updateDirection();\n }\n }\n\n return this;\n }\n\n /**\n * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again\n * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다\n * @chainable\n * @return {this}\n */\n public resetNeedPanelHistory(): this {\n this._needPanelTriggered = { prev: false, next: false };\n return this;\n }\n\n /**\n * Apply \"transform\" style with the current position to camera element\n * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다.\n * @return {this}\n */\n public applyTransform(): this {\n const el = this._el;\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n\n if (renderer.rendering || !flicking.initialized) return this;\n\n const actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;\n\n el.style[this._transform] = flicking.horizontal\n ? `translate(${this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition}px)`\n : `translate(0, ${-actualPosition}px)`;\n\n return this;\n }\n\n private _resetInternalValues() {\n this._position = 0;\n this._alignPos = 0;\n this._offset = 0;\n this._circularOffset = 0;\n this._circularEnabled = false;\n this._range = { min: 0, max: 0 };\n this._visiblePanels = [];\n this._anchors = [];\n this._needPanelTriggered = { prev: false, next: false };\n }\n\n private _refreshVisiblePanels() {\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n const newVisiblePanels = panels.filter(panel => this.canSee(panel));\n const prevVisiblePanels = this._visiblePanels;\n this._visiblePanels = newVisiblePanels;\n\n const added: Panel[] = newVisiblePanels.filter(panel => !includes(prevVisiblePanels, panel));\n const removed: Panel[] = prevVisiblePanels.filter(panel => !includes(newVisiblePanels, panel));\n\n if (added.length > 0 || removed.length > 0) {\n void flicking.renderer.render().then(() => {\n flicking.trigger(new ComponentEvent(EVENTS.VISIBLE_CHANGE, {\n added,\n removed,\n visiblePanels: newVisiblePanels\n }));\n });\n }\n }\n\n private _checkNeedPanel(): void {\n const needPanelTriggered = this._needPanelTriggered;\n\n if (needPanelTriggered.prev && needPanelTriggered.next) return;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n if (!needPanelTriggered.prev) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n if (!needPanelTriggered.next) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n\n return;\n }\n\n const cameraPosition = this._position;\n const cameraSize = this.size;\n const cameraRange = this._range;\n const needPanelThreshold = flicking.needPanelThreshold;\n\n const cameraPrev = cameraPosition - this._alignPos;\n const cameraNext = cameraPrev + cameraSize;\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n\n if (!needPanelTriggered.prev) {\n const firstPanelPrev = firstPanel.range.min;\n\n if (cameraPrev <= (firstPanelPrev + needPanelThreshold) || cameraPosition <= (cameraRange.min + needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n }\n\n if (!needPanelTriggered.next) {\n const lastPanelNext = lastPanel.range.max;\n\n if (cameraNext >= (lastPanelNext - needPanelThreshold) || cameraPosition >= (cameraRange.max - needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n }\n }\n\n private _checkReachEnd(prevPos: number, newPos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const range = this._range;\n\n const wasBetweenRange = prevPos > range.min && prevPos < range.max;\n const isBetweenRange = newPos > range.min && newPos < range.max;\n\n if (!wasBetweenRange || isBetweenRange) return;\n\n const direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT;\n\n flicking.trigger(new ComponentEvent(EVENTS.REACH_EDGE, {\n direction\n }));\n }\n\n private _checkTranslateSupport = () => {\n const transforms = [\"webkitTransform\", \"msTransform\", \"MozTransform\", \"OTransform\", \"transform\"];\n\n const supportedStyle = document.documentElement.style;\n let transformName = \"\";\n for (const prefixedTransform of transforms) {\n if (prefixedTransform in supportedStyle) {\n transformName = prefixedTransform;\n }\n }\n\n if (!transformName) {\n throw new FlickingError(ERROR.MESSAGE.TRANSFORM_NOT_SUPPORTED, ERROR.CODE.TRANSFORM_NOT_SUPPORTED);\n }\n\n this._transform = transformName;\n };\n\n private _updateMode() {\n const flicking = getFlickingAttached(this._flicking);\n\n if (flicking.circular) {\n const circularMode = new CircularCameraMode(flicking);\n const canSetCircularMode = circularMode.checkAvailability();\n\n if (canSetCircularMode) {\n this._mode = circularMode;\n } else {\n const fallbackMode = flicking.circularFallback;\n\n this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n }\n\n this._circularEnabled = canSetCircularMode;\n } else {\n this._mode = flicking.bound\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n this._circularEnabled = false;\n }\n }\n\n private _togglePanels(prevPos: number, pos: number): boolean {\n if (pos === prevPos) return false;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n const toggled = panels.map(panel => panel.toggle(prevPos, pos));\n\n return toggled.some(isToggled => isToggled);\n }\n}\n\nexport default Camera;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\nimport ImReady from \"@egjs/imready\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { ALIGN, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached, getMinusCompensatedIndex, includes, parsePanelAlign } from \"../utils\";\n\nimport RenderingStrategy from \"./strategy/RenderingStrategy\";\n\nexport interface RendererOptions {\n align?: FlickingOptions[\"align\"];\n strategy: RenderingStrategy;\n}\n\n/**\n * A component that manages {@link Panel} and its elements\n * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트\n */\nabstract class Renderer {\n // Internal States\n protected _flicking: Flicking | null;\n protected _panels: Panel[];\n protected _rendering: boolean;\n\n // Options\n protected _align: NonNullable;\n protected _strategy: RendererOptions[\"strategy\"];\n\n // Internal states Getter\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._panels; }\n /**\n * A boolean value indicating whether rendering is in progress\n * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부\n * @type {boolean}\n * @readonly\n * @internal\n */\n public get rendering() { return this._rendering; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._panels.length; }\n /**\n * @internal\n */\n public get strategy() { return this._strategy; }\n\n // Options Getter\n /**\n * A {@link Panel}'s {@link Panel#align align} value that applied to all panels\n * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: NonNullable) {\n this._align = val;\n\n const panelAlign = parsePanelAlign(val);\n this._panels.forEach(panel => { panel.align = panelAlign; });\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {Constants.ALIGN | string | number} [options.align=\"center\"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값\n * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈)\n */\n public constructor({\n align = ALIGN.CENTER,\n strategy\n }: RendererOptions) {\n this._flicking = null;\n this._panels = [];\n this._rendering = false;\n\n // Bind options\n this._align = align;\n this._strategy = strategy;\n }\n\n /**\n * Render panel elements inside the camera element\n * @ko 패널 엘리먼트들을 카메라 엘리먼트 내부에 렌더링합니다\n * @method\n * @abstract\n * @memberof Renderer\n * @instance\n * @name render\n * @chainable\n * @return {this}\n */\n public abstract render(): Promise;\n\n protected abstract _collectPanels(): void;\n protected abstract _createPanel(el: any, options: Omit): Panel;\n\n /**\n * Initialize Renderer\n * @ko Renderer를 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._collectPanels();\n\n return this;\n }\n\n /**\n * Destroy Renderer and return to initial state\n * @ko Renderer를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._flicking = null;\n this._panels = [];\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n */\n public getPanel(index: number): Panel | null {\n return this._panels[index] || null;\n }\n\n public forceRenderAllPanels(): Promise {\n this._panels.forEach(panel => panel.markForShow());\n\n return Promise.resolve();\n }\n\n /**\n * Update all panel sizes\n * @ko 모든 패널의 크기를 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updatePanelSize(): this {\n const flicking = getFlickingAttached(this._flicking);\n const panels = this._panels;\n\n if (panels.length <= 0) return this;\n\n if (flicking.panelsPerView > 0) {\n const firstPanel = panels[0];\n firstPanel.resize();\n\n this._updatePanelSizeByGrid(firstPanel, panels);\n } else {\n flicking.panels.forEach(panel => panel.resize());\n }\n\n return this;\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {Array} items An array of items to insert추가할 아이템들의 배열\n * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열\n * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n */\n public batchInsert(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsInserted = this.batchInsertDefer(...items);\n\n if (allPanelsInserted.length <= 0) return [];\n\n this.updateAfterPanelChange(allPanelsInserted, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchInsertDefer(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const prevFirstPanel = panels[0];\n const align = parsePanelAlign(this._align);\n\n const allPanelsInserted = items.reduce((addedPanels, item) => {\n const insertingIdx = getMinusCompensatedIndex(item.index, panels.length);\n const panelsPushed = panels.slice(insertingIdx);\n const panelsInserted = item.elements.map((el, idx) => this._createPanel(el, { index: insertingIdx + idx, align, flicking }));\n\n panels.splice(insertingIdx, 0, ...panelsInserted);\n\n if (item.hasDOMInElements) {\n // Insert the actual elements as camera element's children\n this._insertPanelElements(panelsInserted, panelsPushed[0] ?? null);\n }\n\n // Resize the newly added panels\n if (flicking.panelsPerView > 0) {\n const firstPanel = prevFirstPanel || panelsInserted[0].resize();\n\n this._updatePanelSizeByGrid(firstPanel, panelsInserted);\n } else {\n panelsInserted.forEach(panel => panel.resize());\n }\n\n // Update panel indexes & positions\n panelsPushed.forEach(panel => {\n panel.increaseIndex(panelsInserted.length);\n panel.updatePosition();\n });\n\n return [...addedPanels, ...panelsInserted];\n }, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {Array} items An array of items to remove제거할 아이템들의 배열\n * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스\n * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다\n * @return An array of removed panels제거된 패널들의 배열\n */\n public batchRemove(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsRemoved = this.batchRemoveDefer(...items);\n\n if (allPanelsRemoved.length <= 0) return [];\n\n this.updateAfterPanelChange([], allPanelsRemoved);\n\n return allPanelsRemoved;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchRemoveDefer(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const { control } = flicking;\n const activePanel = control.activePanel;\n\n const allPanelsRemoved = items.reduce((removed, item) => {\n const { index, deleteCount } = item;\n const removingIdx = getMinusCompensatedIndex(index, panels.length);\n\n const panelsPulled = panels.slice(removingIdx + deleteCount);\n const panelsRemoved = panels.splice(removingIdx, deleteCount);\n\n if (panelsRemoved.length <= 0) return [];\n\n // Update panel indexes & positions\n panelsPulled.forEach(panel => {\n panel.decreaseIndex(panelsRemoved.length);\n panel.updatePosition();\n });\n\n if (item.hasDOMInElements) {\n this._removePanelElements(panelsRemoved);\n }\n\n // Remove panel elements\n panelsRemoved.forEach(panel => panel.destroy());\n\n if (includes(panelsRemoved, activePanel)) {\n control.resetActive();\n }\n\n return [...removed, ...panelsRemoved];\n }, []);\n\n return allPanelsRemoved;\n }\n\n /**\n * @internal\n */\n public updateAfterPanelChange(panelsAdded: Panel[], panelsRemoved: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n const panels = this._panels;\n const activePanel = control.activePanel;\n\n // Update camera & control\n this._updateCameraAndControl();\n\n void this.render();\n\n if (!flicking.animating) {\n if (!activePanel || activePanel.removed) {\n if (panels.length <= 0) {\n // All panels removed\n camera.lookAt(0);\n } else {\n let targetIndex = activePanel?.index ?? 0;\n if (targetIndex > panels.length - 1) {\n targetIndex = panels.length - 1;\n }\n\n void control.moveToPanel(panels[targetIndex], {\n duration: 0\n }).catch(() => void 0);\n }\n } else {\n void control.moveToPanel(activePanel, {\n duration: 0\n }).catch(() => void 0);\n }\n }\n\n flicking.camera.updateOffset();\n\n if (panelsAdded.length > 0 || panelsRemoved.length > 0) {\n flicking.trigger(new ComponentEvent(EVENTS.PANEL_CHANGE, {\n added: panelsAdded,\n removed: panelsRemoved\n }));\n\n this.checkPanelContentsReady([\n ...panelsAdded,\n ...panelsRemoved\n ]);\n }\n }\n\n /**\n * @internal\n */\n public checkPanelContentsReady(checkingPanels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const resizeOnContentsReady = flicking.resizeOnContentsReady;\n const panels = this._panels;\n\n if (!resizeOnContentsReady || flicking.virtualEnabled) return;\n\n const hasContents = (panel: Panel) => panel.element && !!panel.element.querySelector(\"img, video\");\n checkingPanels = checkingPanels.filter(panel => hasContents(panel));\n\n if (checkingPanels.length <= 0) return;\n\n const contentsReadyChecker = new ImReady();\n\n checkingPanels.forEach(panel => {\n panel.loading = true;\n });\n\n contentsReadyChecker.on(\"readyElement\", e => {\n if (!this._flicking) {\n // Renderer's destroy() is called before\n contentsReadyChecker.destroy();\n return;\n }\n\n const panel = checkingPanels[e.index];\n const camera = flicking.camera;\n const control = flicking.control;\n const prevProgressInPanel = control.activePanel\n ? camera.getProgressInPanel(control.activePanel)\n : 0;\n\n panel.loading = false;\n panel.resize();\n panels.slice(panel.index + 1).forEach(panelBehind => panelBehind.updatePosition());\n\n if (!flicking.initialized) return;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n\n if (control.animating) {\n // TODO: Need Axes update\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n });\n\n contentsReadyChecker.on(\"preReady\", e => {\n if (this._flicking) {\n void this.render();\n }\n\n if (e.readyCount === e.totalCount) {\n contentsReadyChecker.destroy();\n }\n });\n\n contentsReadyChecker.on(\"ready\", () => {\n if (this._flicking) {\n void this.render();\n }\n contentsReadyChecker.destroy();\n });\n\n contentsReadyChecker.check(checkingPanels.map(panel => panel.element));\n }\n\n protected _updateCameraAndControl() {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n camera.resetNeedPanelHistory();\n control.updateInput();\n }\n\n protected _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n }\n\n protected _updatePanelSizeByGrid(referencePanel: Panel, panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const panelsPerView = flicking.panelsPerView;\n\n if (panelsPerView <= 0) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"panelsPerView\", panelsPerView), ERROR.CODE.WRONG_OPTION);\n }\n if (panels.length <= 0) return;\n\n const viewportSize = flicking.camera.size;\n const gap = referencePanel.margin.prev + referencePanel.margin.next;\n\n const panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView;\n const panelSizeObj = flicking.horizontal\n ? { width: panelSize }\n : { height: panelSize };\n const firstPanelSizeObj = {\n size: panelSize,\n margin: referencePanel.margin,\n ...(!flicking.horizontal && { height: referencePanel.height})\n };\n\n if (!flicking.noPanelStyleOverride) {\n this._strategy.updatePanelSizes(flicking, panelSizeObj);\n }\n\n flicking.panels.forEach(panel => panel.resize(firstPanelSizeObj));\n }\n\n protected _removeAllChildsFromCamera() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove other elements\n while (cameraElement.firstChild) {\n cameraElement.removeChild(cameraElement.firstChild);\n }\n }\n\n protected _insertPanelElements(panels: Panel[], nextSibling: Panel | null = null) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const cameraElement = camera.element;\n const nextSiblingElement = nextSibling?.element || null;\n const fragment = document.createDocumentFragment();\n\n panels.forEach(panel => fragment.appendChild(panel.element));\n cameraElement.insertBefore(fragment, nextSiblingElement);\n }\n\n protected _removePanelElements(panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n panels.forEach(panel => {\n cameraElement.removeChild(panel.element);\n });\n }\n\n protected _afterRender() {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.applyTransform();\n }\n}\n\nexport default Renderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { getFlickingAttached, toArray } from \"../utils\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n *\n */\nclass VanillaRenderer extends Renderer {\n // eslint-disable-next-line @typescript-eslint/require-await\n public async render() {\n const flicking = getFlickingAttached(this._flicking);\n const strategy = this._strategy;\n\n strategy.updateRenderingPanels(flicking);\n strategy.renderPanels(flicking);\n\n this._resetPanelElementOrder();\n this._afterRender();\n }\n\n protected _collectPanels() {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._removeAllTextNodes();\n this._panels = this._strategy.collectPanels(flicking, camera.children);\n }\n\n protected _createPanel(el: HTMLElement, options: Omit): Panel {\n return this._strategy.createPanel(el, options);\n }\n\n private _resetPanelElementOrder() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraEl = flicking.camera.element;\n\n // We're using reversed panels here as last panel should be the last element of camera element\n const reversedElements = this._strategy\n .getRenderingElementsByOrder(flicking)\n .reverse();\n\n reversedElements.forEach((el, idx) => {\n const nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null;\n\n if (el.nextElementSibling !== nextEl) {\n cameraEl.insertBefore(el, nextEl);\n }\n });\n }\n\n private _removeAllTextNodes() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove all text nodes in the camera element\n toArray(cameraElement.childNodes).forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n cameraElement.removeChild(node);\n }\n });\n }\n}\n\nexport default VanillaRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n * @internal\n */\nabstract class ExternalRenderer extends Renderer {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n protected _removePanelElements(panels: Panel[]): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n\n protected _removeAllChildsFromCamera(): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n /* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\nexport default ExternalRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { getElementSize, getProgress, getStyle, parseAlign, setSize } from \"../../utils\";\nimport { ALIGN, DIRECTION } from \"../../const/external\";\nimport { LiteralUnion, ValueOf } from \"../../type/internal\";\n\nimport ElementProvider from \"./provider/ElementProvider\";\n\nexport interface PanelOptions {\n index: number;\n align: LiteralUnion> | number;\n flicking: Flicking;\n elementProvider: ElementProvider;\n}\n\n/**\n * A slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass Panel {\n // Internal States\n protected _flicking: Flicking;\n protected _elProvider: ElementProvider;\n protected _index: number;\n protected _pos: number;\n protected _size: number;\n protected _height: number;\n protected _margin: { prev: number; next: number };\n protected _alignPos: number; // Actual align pos\n protected _rendered: boolean;\n protected _removed: boolean;\n protected _loading: boolean;\n protected _toggleDirection: ValueOf;\n protected _toggled: boolean;\n protected _togglePosition: number;\n\n // Options\n protected _align: PanelOptions[\"align\"];\n\n // Internal States Getter\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n /**\n * @internal\n * @readonly\n */\n public get elementProvider() { return this._elProvider; }\n /**\n * Index of the panel\n * @ko 패널의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of the panel, including {@link Panel#alignPosition alignPosition}\n * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos + this._alignPos; }\n /**\n * Cached size of the panel element\n * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else\n * @ko 패널 엘리먼트의 캐시된 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다\n * @type {number}\n * @readonly\n */\n public get size() { return this._size; }\n /**\n * Panel's size including CSS `margin`\n * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else\n * @ko CSS `margin`을 포함한 패널의 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다\n * @type {number}\n * @readonly\n */\n public get sizeIncludingMargin() { return this._size + this._margin.prev + this._margin.next; }\n /**\n * Height of the panel element\n * @ko 패널 엘리먼트의 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height; }\n /**\n * Cached CSS `margin` value of the panel element\n * @ko 패널 엘리먼트의 CSS `margin` 값\n * @type {object}\n * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값\n * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값\n * @readonly\n */\n public get margin() { return this._margin; }\n /**\n * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at\n * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * A value indicating whether the panel's {@link Flicking#remove remove}d\n * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get removed() { return this._removed; }\n /**\n * A value indicating whether the panel's element is being rendered on the screen\n * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get rendered() { return this._rendered; }\n /**\n * A value indicating whether the panel's image/video is not loaded and waiting for resize\n * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get loading() { return this._loading; }\n /**\n * Panel element's range of the bounding box\n * @ko 패널 엘리먼트의 Bounding box 범위\n * @type {object}\n * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false)\n * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false)\n * @readonly\n */\n public get range() { return { min: this._pos, max: this._pos + this._size }; }\n /**\n * A value indicating whether the panel's position is toggled by circular behavior\n * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get toggled() { return this._toggled; }\n /**\n * A direction where the panel's position is toggled\n * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향\n * @type {DIRECTION}\n * @readonly\n */\n public get toggleDirection() { return this._toggleDirection; }\n /**\n * Actual position offset determined by {@link Panel#order}\n * @ko {@link Panel#order}에 의한 실제 위치 변경값\n * @type {number}\n * @readonly\n */\n public get offset() {\n const toggleDirection = this._toggleDirection;\n const cameraRangeDiff = this._flicking.camera.rangeDiff;\n\n return toggleDirection === DIRECTION.NONE || !this._toggled\n ? 0\n : toggleDirection === DIRECTION.PREV\n ? -cameraRangeDiff\n : cameraRangeDiff;\n }\n\n /**\n * Progress of movement between previous or next panel relative to current panel\n * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n\n return this.index - flicking.camera.progress;\n }\n\n /**\n * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1)\n * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1)\n * @type {number}\n * @readonly\n */\n public get outsetProgress() {\n const position = this.position + this.offset;\n const alignPosition = this._alignPos;\n const camera = this._flicking.camera;\n const camPos = camera.position;\n\n if (camPos === position) {\n return 0;\n }\n\n if (camPos < position) {\n const disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition;\n\n return -getProgress(camPos, position, disappearPosNext);\n } else {\n const disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition);\n\n return 1 - getProgress(camPos, disappearPosPrev, position);\n }\n }\n\n /**\n * Percentage of area where panel is visible in the viewport\n * @ko 뷰포트 안에서 패널이 보이는 영역의 비율\n * @type {number}\n * @readonly\n */\n public get visibleRatio() {\n const range = this.range;\n const size = this._size;\n const offset = this.offset;\n const visibleRange = this._flicking.camera.visibleRange;\n\n const checkingRange = {\n min: range.min + offset,\n max: range.max + offset\n };\n\n if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) {\n return 0;\n }\n\n let visibleSize = size;\n\n if (visibleRange.min > checkingRange.min) {\n visibleSize -= visibleRange.min - checkingRange.min;\n }\n if (visibleRange.max < checkingRange.max) {\n visibleSize -= checkingRange.max - visibleRange.max;\n }\n\n return visibleSize / size;\n }\n\n public set loading(val: boolean) { this._loading = val; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element\n * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: PanelOptions[\"align\"]) {\n this._align = val;\n this._updateAlignPos();\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스\n */\n public constructor({\n index,\n align,\n flicking,\n elementProvider\n }: PanelOptions) {\n this._index = index;\n this._flicking = flicking;\n this._elProvider = elementProvider;\n\n this._align = align;\n\n this._removed = false;\n this._rendered = true;\n this._loading = false;\n this._resetInternalStates();\n }\n\n /**\n * Mark panel element to be appended on the camera element\n * @internal\n */\n public markForShow() {\n this._rendered = true;\n this._elProvider.show(this._flicking);\n }\n\n /**\n * Mark panel element to be removed from the camera element\n * @internal\n */\n public markForHide() {\n this._rendered = false;\n this._elProvider.hide(this._flicking);\n }\n\n /**\n * Update size of the panel\n * @ko 패널의 크기를 갱신합니다\n * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보\n * @chainable\n * @return {this}\n */\n public resize(cached?: {\n size: number;\n height?: number;\n margin: { prev: number; next: number };\n }): this {\n const el = this.element;\n const flicking = this._flicking;\n const {\n horizontal,\n useFractionalSize\n } = flicking;\n\n if (cached) {\n this._size = cached.size;\n this._margin = { ...cached.margin };\n this._height = cached.height ?? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: getStyle(el)\n });\n } else {\n const elStyle = getStyle(el);\n\n this._size = getElementSize({\n el,\n horizontal,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n });\n\n this._margin = horizontal\n ? {\n prev: parseFloat(elStyle.marginLeft || \"0\"),\n next: parseFloat(elStyle.marginRight || \"0\")\n } : {\n prev: parseFloat(elStyle.marginTop || \"0\"),\n next: parseFloat(elStyle.marginBottom || \"0\")\n };\n\n this._height = horizontal\n ? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n })\n : this._size;\n }\n\n this.updatePosition();\n this._updateAlignPos();\n\n return this;\n }\n\n /**\n * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property\n * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New panel size새 패널 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @chainable\n * @return {this}\n */\n public setSize(size: Partial<{\n width: number | string;\n height: number | string;\n }>): this {\n setSize(this.element, size);\n\n return this;\n }\n\n /**\n * Check whether the given element is inside of this panel's {@link Panel#element element}\n * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다\n * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement\n * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부\n */\n public contains(element: HTMLElement): boolean {\n return !!this.element?.contains(element);\n }\n\n /**\n * Reset internal state and set {@link Panel#removed removed} to `true`\n * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다.\n * @return {void}\n */\n public destroy(): void {\n this._resetInternalStates();\n this._removed = true;\n }\n\n /**\n * Check whether the given position is inside of this panel's {@link Panel#range range}\n * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다.\n * @param {number} pos A position to check확인하고자 하는 좌표\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부\n */\n public includePosition(pos: number, includeMargin: boolean = false): boolean {\n return this.includeRange(pos, pos, includeMargin);\n }\n\n /**\n * Check whether the given range is fully included in this panel's area (inclusive)\n * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부\n */\n public includeRange(min: number, max: number, includeMargin: boolean = false): boolean {\n const margin = this._margin;\n const panelRange = this.range;\n\n if (includeMargin) {\n panelRange.min -= margin.prev;\n panelRange.max += margin.next;\n }\n\n return max >= panelRange.min && min <= panelRange.max;\n }\n\n /**\n * Check whether the panel is visble in the given range (exclusive)\n * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부\n */\n public isVisibleOnRange(min: number, max: number): boolean {\n const panelRange = this.range;\n\n return max > panelRange.min && min < panelRange.max;\n }\n\n /**\n * Move {@link Camera} to this panel\n * @ko {@link Camera}를 이 패널로 이동합니다\n * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise\n */\n public focus(duration?: number) {\n return this._flicking.moveTo(this._index, duration);\n }\n\n /**\n * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel\n * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다\n * @returns {Panel | null} The previous panel이전 패널\n */\n public prev(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1)\n : renderer.getPanel(index - 1);\n }\n\n /**\n * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel\n * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다\n * @returns {Panel | null} The previous panel다음 패널\n */\n public next(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1)\n : renderer.getPanel(index + 1);\n }\n\n /**\n * Increase panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public increaseIndex(val: number): this {\n this._index += Math.max(val, 0);\n return this;\n }\n\n /**\n * Decrease panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public decreaseIndex(val: number): this {\n this._index -= Math.max(val, 0);\n return this;\n }\n\n /**\n * @internal\n */\n public updatePosition(): this {\n const prevPanel = this._flicking.renderer.panels[this._index - 1];\n\n this._pos = prevPanel\n ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev\n : this._margin.prev;\n\n return this;\n }\n\n /**\n * @internal\n * @return {boolean} toggled\n */\n public toggle(prevPos: number, newPos: number): boolean {\n const toggleDirection = this._toggleDirection;\n const togglePosition = this._togglePosition;\n\n if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false;\n\n const prevToggled = this._toggled;\n\n if (newPos > prevPos) {\n if (togglePosition >= prevPos && togglePosition <= newPos) {\n this._toggled = toggleDirection === DIRECTION.NEXT;\n }\n } else {\n if (togglePosition <= prevPos && togglePosition >= newPos) {\n this._toggled = toggleDirection !== DIRECTION.NEXT;\n }\n }\n\n return prevToggled !== this._toggled;\n }\n\n /**\n * @internal\n */\n public updateCircularToggleDirection(): this {\n const flicking = this._flicking;\n\n if (!flicking.circularEnabled) {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n this._toggled = false;\n return this;\n }\n\n const camera = flicking.camera;\n const camRange = camera.range;\n const camAlignPosition = camera.alignPosition;\n const camVisibleRange = camera.visibleRange;\n const camVisibleSize = camVisibleRange.max - camVisibleRange.min;\n\n const minimumVisible = camRange.min - camAlignPosition;\n const maximumVisible = camRange.max - camAlignPosition + camVisibleSize;\n\n const shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false);\n const shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false);\n\n this._toggled = false;\n if (shouldBeVisibleAtMin) {\n this._toggleDirection = DIRECTION.PREV;\n this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition;\n this.toggle(Infinity, camera.position);\n } else if (shouldBeVisibleAtMax) {\n this._toggleDirection = DIRECTION.NEXT;\n this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition;\n this.toggle(-Infinity, camera.position);\n } else {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n }\n\n return this;\n }\n\n private _updateAlignPos() {\n this._alignPos = parseAlign(this._align, this._size);\n }\n\n private _resetInternalStates() {\n this._size = 0;\n this._pos = 0;\n this._margin = { prev: 0, next: 0 };\n this._height = 0;\n this._alignPos = 0;\n this._toggled = false;\n this._togglePosition = 0;\n this._toggleDirection = DIRECTION.NONE;\n }\n}\n\nexport default Panel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel, { PanelOptions } from \"../../core/panel/Panel\";\nimport ElementProvider from \"../../core/panel/provider/ElementProvider\";\nimport { DIRECTION } from \"../../const/external\";\nimport { parsePanelAlign } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nexport interface NormalRenderingStrategyOptions {\n providerCtor: new (...args: any) => ElementProvider;\n}\n\n\nclass NormalRenderingStrategy implements RenderingStrategy {\n private _providerCtor: NormalRenderingStrategyOptions[\"providerCtor\"];\n\n public constructor({ providerCtor }: NormalRenderingStrategyOptions) {\n this._providerCtor = providerCtor;\n }\n\n public renderPanels() {\n // DO_NOTHING\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const renderedPanels = flicking.renderer.panels.filter(panel => panel.rendered);\n const toggledPrev = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.NEXT);\n const notToggled = renderedPanels.filter(panel => !panel.toggled);\n\n return [...toggledPrev, ...notToggled, ...toggledNext].map(panel => panel.index);\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const panels = flicking.panels;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => panels[index].element);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n if (flicking.renderOnlyVisible) {\n this._showOnlyVisiblePanels(flicking);\n } else {\n flicking.panels.forEach(panel => panel.markForShow());\n }\n }\n\n public collectPanels(\n flicking: Flicking,\n elements: any[]\n ) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return elements.map((el, index) => new Panel({\n index,\n elementProvider: new this._providerCtor(el),\n align,\n flicking\n }));\n }\n\n public createPanel(\n element: any,\n options: Omit\n ) {\n return new Panel({\n ...options,\n elementProvider: new this._providerCtor(element)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n\n private _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n}\n\nexport default NormalRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { DIRECTION } from \"../../const/external\";\nimport { circulateIndex } from \"../../utils\";\n\nimport Panel, { PanelOptions } from \"./Panel\";\nimport VirtualElementProvider from \"./provider/VirtualElementProvider\";\n\ninterface VirtualPanelOptions extends PanelOptions {\n elementProvider: VirtualElementProvider;\n}\n\n/**\n * An slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass VirtualPanel extends Panel {\n protected _elProvider: VirtualElementProvider;\n protected _cachedInnerHTML: string | null;\n\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n\n /**\n * Cached innerHTML by the previous render function\n * @ko 이전 렌더링에서 캐시된 innerHTML 정보\n * @type {string|null}\n * @readonly\n */\n public get cachedInnerHTML() { return this._cachedInnerHTML; }\n\n /**\n * An number for indexing which element it will be rendered on\n * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자\n * @type {number}\n * @readonly\n */\n public get elementIndex() {\n const flicking = this._flicking;\n const virtualElCount = flicking.panelsPerView + 1;\n const panelCount = flicking.panelCount;\n let index = this._index;\n\n if (this._toggled) {\n // To prevent element duplication\n index = this._toggleDirection === DIRECTION.NEXT\n ? index + panelCount\n : index - panelCount;\n }\n\n return circulateIndex(index, virtualElCount);\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n */\n public constructor(options: VirtualPanelOptions) {\n super(options);\n\n options.elementProvider.init(this);\n this._elProvider = options.elementProvider;\n this._cachedInnerHTML = null;\n }\n\n public cacheRenderResult(result: string) {\n this._cachedInnerHTML = result;\n }\n\n public uncacheRenderResult() {\n this._cachedInnerHTML = null;\n }\n\n public render() {\n const flicking = this._flicking;\n const { renderPanel, cache } = flicking.virtual;\n\n const element = this._elProvider.element;\n const newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index);\n\n if (newInnerHTML === element.innerHTML) return;\n\n element.innerHTML = newInnerHTML;\n\n if (cache) {\n this.cacheRenderResult(newInnerHTML);\n }\n }\n\n public increaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.increaseIndex(val);\n }\n\n public decreaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.decreaseIndex(val);\n }\n}\n\nexport default VirtualPanel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { PanelOptions } from \"../../core/panel/Panel\";\nimport VirtualPanel from \"../../core/panel/VirtualPanel\";\nimport VirtualElementProvider from \"../../core/panel/provider/VirtualElementProvider\";\nimport { parsePanelAlign, range, setSize } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nclass VirtualRenderingStrategy implements RenderingStrategy {\n public renderPanels(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = flicking.visiblePanels as VirtualPanel[];\n const invisibleIndexes = range(flicking.panelsPerView + 1);\n\n visiblePanels.forEach(panel => {\n const elementIndex = panel.elementIndex;\n\n panel.render();\n\n virtualManager.show(elementIndex);\n invisibleIndexes[elementIndex] = -1;\n });\n\n invisibleIndexes\n .filter(val => val >= 0)\n .forEach(idx => {\n virtualManager.hide(idx);\n });\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = [...flicking.visiblePanels]\n .filter(panel => panel.rendered)\n .sort((panel1, panel2) => {\n return (panel1.position + panel1.offset) - (panel2.position + panel2.offset);\n }) as VirtualPanel[];\n\n if (visiblePanels.length <= 0) return virtualManager.elements.map((_, idx) => idx);\n\n const visibleIndexes = visiblePanels.map(panel => panel.elementIndex);\n const invisibleIndexes = virtualManager.elements\n .map((el, idx) => ({ ...el, idx }))\n .filter(el => !el.visible)\n .map(el => el.idx);\n\n return [...visibleIndexes, ...invisibleIndexes];\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const elements = virtualManager.elements;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => elements[index].nativeElement);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else {\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n\n public collectPanels(flicking: Flicking) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return range(flicking.virtual.initialPanelCount).map(index => new VirtualPanel({\n index,\n elementProvider: new VirtualElementProvider(flicking),\n align,\n flicking\n }));\n }\n\n public createPanel(_el: any, options: PanelOptions) {\n return new VirtualPanel({\n ...options,\n elementProvider: new VirtualElementProvider(options.flicking)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.virtual.elements.forEach(el => {\n setSize(el.nativeElement, size);\n });\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n}\n\nexport default VirtualRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Component, { ComponentEvent } from \"@egjs/component\";\n\nimport FlickingError from \"./core/FlickingError\";\nimport Viewport from \"./core/Viewport\";\nimport AutoResizer from \"./core/AutoResizer\";\nimport { Panel } from \"./core/panel\";\nimport { VanillaElementProvider } from \"./core/panel/provider\";\nimport VirtualManager, { VirtualOptions } from \"./core/VirtualManager\";\nimport { Control, SnapControl, SnapControlOptions, FreeControl, StrictControl, FreeControlOptions, StrictControlOptions } from \"./control\";\nimport { Camera } from \"./camera\";\nimport { Renderer, VanillaRenderer, ExternalRenderer, RendererOptions, NormalRenderingStrategy, VirtualRenderingStrategy } from \"./renderer\";\nimport { EVENTS, ALIGN, MOVE_TYPE, DIRECTION, CIRCULAR_FALLBACK } from \"./const/external\";\nimport * as ERROR from \"./const/error\";\nimport { findIndex, getElement, includes, parseElement } from \"./utils\";\nimport { HoldStartEvent, HoldEndEvent, MoveStartEvent, SelectEvent, MoveEvent, MoveEndEvent, WillChangeEvent, WillRestoreEvent, NeedPanelEvent, VisibleChangeEvent, ReachEdgeEvent, ReadyEvent, AfterResizeEvent, BeforeResizeEvent, ChangedEvent, RestoredEvent, PanelChangeEvent } from \"./type/event\";\nimport { LiteralUnion, ValueOf } from \"./type/internal\";\nimport { ElementLike, Plugin, Status, MoveTypeOptions } from \"./type/external\";\n\n/**\n * @interface\n */\nexport interface FlickingEvents {\n [EVENTS.READY]: ReadyEvent;\n [EVENTS.BEFORE_RESIZE]: BeforeResizeEvent;\n [EVENTS.AFTER_RESIZE]: AfterResizeEvent;\n [EVENTS.HOLD_START]: HoldStartEvent;\n [EVENTS.HOLD_END]: HoldEndEvent;\n [EVENTS.MOVE_START]: MoveStartEvent;\n [EVENTS.MOVE]: MoveEvent;\n [EVENTS.MOVE_END]: MoveEndEvent;\n [EVENTS.WILL_CHANGE]: WillChangeEvent;\n [EVENTS.CHANGED]: ChangedEvent;\n [EVENTS.WILL_RESTORE]: WillRestoreEvent;\n [EVENTS.RESTORED]: RestoredEvent;\n [EVENTS.SELECT]: SelectEvent;\n [EVENTS.NEED_PANEL]: NeedPanelEvent;\n [EVENTS.VISIBLE_CHANGE]: VisibleChangeEvent;\n [EVENTS.REACH_EDGE]: ReachEdgeEvent;\n [EVENTS.PANEL_CHANGE]: PanelChangeEvent;\n}\n\n/**\n * @interface\n */\nexport interface FlickingOptions {\n // UI / LAYOUT\n align: LiteralUnion> | number | { panel: number | string; camera: number | string };\n defaultIndex: number;\n horizontal: boolean;\n circular: boolean;\n circularFallback: LiteralUnion>;\n bound: boolean;\n adaptive: boolean;\n panelsPerView: number;\n noPanelStyleOverride: boolean;\n resizeOnContentsReady: boolean;\n nested: boolean;\n\n // EVENT\n needPanelThreshold: number;\n preventEventsBeforeInit: boolean;\n\n // ANIMATION\n deceleration: number;\n duration: number;\n easing: (x: number) => number;\n\n // INPUT\n inputType: string[];\n moveType: ValueOf | MoveTypeOptions>;\n threshold: number;\n interruptable: boolean;\n bounce: number | string | [number | string, number | string];\n iOSEdgeSwipeThreshold: number;\n preventClickOnDrag: boolean;\n preventDefaultOnDrag: boolean;\n disableOnInit: boolean;\n changeOnHold: boolean;\n\n // PERFORMANCE\n renderOnlyVisible: boolean;\n virtual: VirtualOptions | null;\n\n // OTHERS\n autoInit: boolean;\n autoResize: boolean;\n useResizeObserver: boolean;\n resizeDebounce: number;\n maxResizeDebounce: number;\n useFractionalSize: boolean;\n externalRenderer: ExternalRenderer | null;\n\n // @deprecated\n renderExternal: {\n renderer: new (options: RendererOptions) => ExternalRenderer;\n rendererOptions: RendererOptions;\n } | null;\n}\n\n/**\n * @extends Component\n * @support {\"ie\": \"9+(with polyfill)\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"4.X+\"}\n * @requires {@link https://github.com/naver/egjs-component|@egjs/component}\n * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}\n */\nclass Flicking extends Component {\n /**\n * Version info string\n * @ko 버전정보 문자열\n * @type {string}\n * @readonly\n * @example\n * ```ts\n * Flicking.VERSION; // ex) 4.0.0\n * ```\n */\n public static VERSION = \"#__VERSION__#\";\n\n // Core components\n private _viewport: Viewport;\n private _autoResizer: AutoResizer;\n private _camera: Camera;\n private _control: Control;\n private _renderer: Renderer;\n private _virtualManager: VirtualManager;\n\n // Options\n private _align: FlickingOptions[\"align\"];\n private _defaultIndex: FlickingOptions[\"defaultIndex\"];\n private _horizontal: FlickingOptions[\"horizontal\"];\n private _circular: FlickingOptions[\"circular\"];\n private _circularFallback: FlickingOptions[\"circularFallback\"];\n private _bound: FlickingOptions[\"bound\"];\n private _adaptive: FlickingOptions[\"adaptive\"];\n private _panelsPerView: FlickingOptions[\"panelsPerView\"];\n private _noPanelStyleOverride: FlickingOptions[\"noPanelStyleOverride\"];\n private _resizeOnContentsReady: FlickingOptions[\"resizeOnContentsReady\"];\n private _virtual: FlickingOptions[\"virtual\"];\n private _nested: FlickingOptions[\"nested\"];\n\n private _needPanelThreshold: FlickingOptions[\"needPanelThreshold\"];\n private _preventEventsBeforeInit: FlickingOptions[\"preventEventsBeforeInit\"];\n\n private _deceleration: FlickingOptions[\"deceleration\"];\n private _duration: FlickingOptions[\"duration\"];\n private _easing: FlickingOptions[\"easing\"];\n\n private _inputType: FlickingOptions[\"inputType\"];\n private _moveType: FlickingOptions[\"moveType\"];\n private _threshold: FlickingOptions[\"threshold\"];\n private _interruptable: FlickingOptions[\"interruptable\"];\n private _bounce: FlickingOptions[\"bounce\"];\n private _iOSEdgeSwipeThreshold: FlickingOptions[\"iOSEdgeSwipeThreshold\"];\n private _preventClickOnDrag: FlickingOptions[\"preventClickOnDrag\"];\n private _preventDefaultOnDrag: FlickingOptions[\"preventDefaultOnDrag\"];\n private _disableOnInit: FlickingOptions[\"disableOnInit\"];\n private _changeOnHold: FlickingOptions[\"changeOnHold\"];\n\n private _renderOnlyVisible: FlickingOptions[\"renderOnlyVisible\"];\n\n private _autoInit: FlickingOptions[\"autoInit\"];\n private _autoResize: FlickingOptions[\"autoResize\"];\n private _useResizeObserver: FlickingOptions[\"useResizeObserver\"];\n private _resizeDebounce: FlickingOptions[\"resizeDebounce\"];\n private _maxResizeDebounce: FlickingOptions[\"maxResizeDebounce\"];\n private _useFractionalSize: FlickingOptions[\"useFractionalSize\"];\n private _externalRenderer: FlickingOptions[\"externalRenderer\"];\n private _renderExternal: FlickingOptions[\"renderExternal\"];\n\n // Internal State\n private _initialized: boolean;\n private _plugins: Plugin[];\n\n // Components\n /**\n * {@link Control} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스\n * @type {Control}\n * @default SnapControl\n * @readonly\n * @see Control\n * @see SnapControl\n * @see FreeControl\n */\n public get control() { return this._control; }\n /**\n * {@link Camera} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스\n * @type {Camera}\n * @default LinearCamera\n * @readonly\n * @see Camera\n * @see LinearCamera\n * @see BoundCamera\n * @see CircularCamera\n */\n public get camera() { return this._camera; }\n /**\n * {@link Renderer} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스\n * @type {Renderer}\n * @default VanillaRenderer\n * @readonly\n * @see Renderer\n * @see VanillaRenderer\n * @see ExternalRenderer\n */\n public get renderer() { return this._renderer; }\n /**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n * @type {Viewport}\n * @readonly\n * @see Viewport\n */\n public get viewport() { return this._viewport; }\n // Internal States\n /**\n * Whether Flicking's {@link Flicking#init init()} is called.\n * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.\n * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.\n * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get initialized() { return this._initialized; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._camera.circularEnabled; }\n /**\n * Whether the `virtual` option is enabled.\n * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero.\n * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get virtualEnabled() { return this._panelsPerView > 0 && this._virtual != null; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get index() { return this._control.activeIndex; }\n /**\n * The root(`.flicking-viewport`) element\n * @ko root(`.flicking-viewport`) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._viewport.element; }\n /**\n * Currently active panel\n * @ko 현재 선택된 패널\n * @type {Panel}\n * @readonly\n * @see Panel\n */\n public get currentPanel() { return this._control.activePanel; }\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._renderer.panels; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._renderer.panelCount; }\n /**\n * Array of panels that is visible at the current position\n * @ko 현재 보이는 패널의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get visiblePanels() { return this._camera.visiblePanels; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._control.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._control.holding; }\n /**\n * A current list of activated plugins\n * @ko 현재 활성화된 플러그인 목록\n * @type {Plugin[]}\n * @readonly\n */\n public get activePlugins() { return this._plugins; }\n\n // Options Getter\n // UI / LAYOUT\n /**\n * Align position of the panels within viewport. You can set different values each for the panel and camera\n * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다\n * @type {ALIGN | string | number | { panel: string | number, camera: string | number }}\n * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값\n * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값\n * @default \"center\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // Literal strings\n * \"prev\", \"center\", \"next\",\n * // % values, applied to both panel & camera\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000,\n * // Setting a different value for panel & camera\n * { panel: \"10%\", camera: \"25%\" }\n * ];\n *\n * possibleOptions.forEach(align => {\n * new Flicking(\"#el\", { align });\n * });\n * ```\n */\n public get align() { return this._align; }\n /**\n * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer\n * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}\n */\n public get defaultIndex() { return this._defaultIndex; }\n /**\n * Direction of panel movement (true: horizontal, false: vertical)\n * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향)\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )}\n */\n public get horizontal() { return this._horizontal; }\n /**\n * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling.\n * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )}\n */\n public get circular() { return this._circular; }\n /**\n * Set panel control mode for the case when circular cannot be enabled.\n * \"linear\" will set the view's range from the top of the first panel to the top of the last panel.\n * \"bound\" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel.\n * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다.\n * \"linear\" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다.\n * \"bound\" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다.\n * @see CIRCULAR_FALLBACK\n * @type {string}\n * @default \"linear\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )}\n */\n public get circularFallback() { return this._circularFallback; }\n /**\n * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel\n * Only can be enabled when `circular=false`\n * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다\n * `circular=false`인 경우에만 사용할 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )}\n */\n public get bound() { return this._bound; }\n /**\n * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true`\n * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )}\n */\n public get adaptive() { return this._adaptive; }\n /**\n * A visible number of panels on viewport. Enabling this option will automatically resize panel size\n * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다\n * @type {number}\n * @default -1\n * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )}\n */\n public get panelsPerView() { return this._panelsPerView; }\n /**\n * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled.\n * This behavior can be useful in terms of performance when you're manually managing all panel sizes\n * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다.\n * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다\n * @type {boolean}\n * @default false\n */\n public get noPanelStyleOverride() { return this._noPanelStyleOverride; }\n /**\n * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded.\n * This can be useful when you have contents inside Flicking that changes its size when it's loaded\n * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다.\n * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )}\n */\n public get resizeOnContentsReady() { return this._resizeOnContentsReady; }\n /**\n * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.\n * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.\n * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.\n * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )}\n */\n public get nested() { return this._nested; }\n // EVENTS\n /**\n * A Threshold from viewport edge before triggering `needPanel` event\n * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )}\n */\n public get needPanelThreshold() { return this._needPanelThreshold; }\n /**\n * When enabled, events are not triggered before `ready` when initializing\n * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )}\n */\n public get preventEventsBeforeInit() { return this._preventEventsBeforeInit; }\n // ANIMATION\n /**\n * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time\n * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다\n * @type {number}\n * @default 0.0075\n * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )}\n */\n public get deceleration() { return this._deceleration; }\n /**\n * An easing function applied to the panel movement animation. Default value is `easeOutCubic`\n * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다\n * @type {function}\n * @default x => 1 - Math.pow(1 - x, 3)\n * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/}\n * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )}\n */\n public get easing() { return this._easing; }\n /**\n * Default duration of the animation (ms)\n * @ko 디폴트 애니메이션 재생 시간 (ms)\n * @type {number}\n * @default 500\n * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )}\n */\n public get duration() { return this._duration; }\n // INPUT\n /**\n * Types of input devices to enable\n * @ko 활성화할 입력 장치 종류\n * @type {string[]}\n * @default [\"touch\", \"mouse\"]\n * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)}\n * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)}\n * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )}\n */\n public get inputType() { return this._inputType; }\n /**\n * Movement style by user input. This will change instance type of {@link Flicking#control}\n * You can use the values of the constant {@link MOVE_TYPE}\n * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다\n * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다\n * @type {MOVE_TYPE | Pair}\n * @default \"snap\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )}\n * @example\n * |moveType|control|options|\n * |:---:|:---:|:---:|\n * |\"snap\"|{@link SnapControl}||\n * |\"freeScroll\"|{@link FreeControl}|{@link FreeControlOptions}|\n *\n * ```ts\n * import Flicking, { MOVE_TYPE } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking({\n * moveType: MOVE_TYPE.SNAP\n * });\n * ```\n *\n * ```ts\n * const flicking = new Flicking({\n * // If you want more specific settings for the moveType\n * // [moveType, options for that moveType]\n * // In this case, it's [\"freeScroll\", FreeControlOptions]\n * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }]\n * });\n * ```\n */\n public get moveType() { return this._moveType; }\n /**\n * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.\n * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.\n * @type {number}\n * @default 40\n * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}\n */\n public get threshold() { return this._threshold; }\n /**\n * Set animation to be interruptable by click/touch.\n * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )}\n */\n public get interruptable() { return this._interruptable; }\n /**\n * The size value of the bounce area. Only can be enabled when `circular=false`.\n * You can set different bounce value for prev/next direction by using array.\n * `number` for px value, and `string` for px, and % value relative to viewport size.\n * You have to call {@link Control#updateInput} after changing this to take effect.\n * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다.\n * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다.\n * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다.\n * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다.\n * @type {string | number | Array}\n * @default \"20%\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // % values, relative to viewport element(\".flicking-viewport\")'s size\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000\n * ];\n * ```\n *\n * @example\n * ```ts\n * const flicking = new Flicking(\"#el\", { bounce: \"20%\" });\n *\n * flicking.bounce = \"100%\";\n * flicking.control.updateInput(); // Call this to update!\n * ```\n */\n public get bounce() { return this._bounce; }\n /**\n * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward\n * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px)\n * @type {number}\n * @default 30\n * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )}\n */\n public get iOSEdgeSwipeThreshold() { return this._iOSEdgeSwipeThreshold; }\n /**\n * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element\n * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )}\n */\n public get preventClickOnDrag() { return this._preventClickOnDrag; }\n /**\n * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging\n * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )}\n */\n public get preventDefaultOnDrag() { return this._preventDefaultOnDrag; }\n /**\n * Automatically call {@link Flicking#disableInput disableInput()} on initialization\n * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )}\n */\n public get disableOnInit() { return this._disableOnInit; }\n /**\n * Change active panel index on mouse/touch hold while animating.\n * `index` of the `willChange`/`willRestore` event will be used as new index.\n * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.\n * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}\n */\n public get changeOnHold() { return this._changeOnHold; }\n // PERFORMANCE\n /**\n * Whether to render visible panels only. This can dramatically increase performance when there're many panels\n * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )}\n */\n public get renderOnlyVisible() { return this._renderOnlyVisible; }\n /**\n * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1`\n * Must be used with `panelsPerview`.\n * After Flicking's initialized, this property can be used to add/remove the panel count.\n * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다.\n * `panelsPerView` 옵션과 함께 사용되어야만 합니다.\n * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다.\n * @type {VirtualManager}\n * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수\n * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @property {string} [panelClass=\"flicking-panel\"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )}\n * @example\n * ```ts\n * import Flicking, { VirtualPanel } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking(\"#some_el\", {\n * panelsPerView: 3,\n * virtual: {\n * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`,\n * initialPanelCount: 100\n * }\n * });\n *\n * // Add 100 virtual panels (at the end)\n * flicking.virtual.append(100);\n *\n * // Remove 100 virtual panels from 0 to 100\n * flicking.virtual.remove(0, 100);\n * ```\n */\n public get virtual() { return this._virtualManager; }\n\n // OTHERS\n /**\n * Call {@link Flicking#init init()} automatically when creating Flicking's instance\n * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )}\n * @readonly\n */\n public get autoInit() { return this._autoInit; }\n /**\n * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed\n * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n */\n public get autoResize() { return this._autoResize; }\n /**\n * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option\n * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )}\n */\n public get useResizeObserver() { return this._useResizeObserver; }\n /**\n * Delays size recalculation from `autoResize` by the given time in milisecond.\n * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again.\n * This can increase performance by preventing `resize` being called too often.\n * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다.\n * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다.\n * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다.\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )}\n */\n public get resizeDebounce() { return this._resizeDebounce; }\n /**\n * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond.\n * This guarantees that size recalculation is performed at least once every (n)ms.\n * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms)\n * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다.\n * @type {number}\n * @default 100\n * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )}\n */\n public get maxResizeDebounce() { return this._maxResizeDebounce; }\n /**\n * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle.\n * This can prevent 1px offset issue in some cases where panel size has the fractional part.\n * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element.\n * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다.\n * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다.\n * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )}\n */\n public get useFractionalSize() { return this._useFractionalSize; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n */\n public get externalRenderer() { return this._externalRenderer; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n * @deprecated\n */\n public get renderExternal() { return this._renderExternal; }\n\n // Options Setter\n // UI / LAYOUT\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n this._renderer.align = val;\n this._camera.align = val;\n void this.resize();\n }\n\n public set defaultIndex(val: FlickingOptions[\"defaultIndex\"]) { this._defaultIndex = val; }\n public set horizontal(val: FlickingOptions[\"horizontal\"]) {\n this._horizontal = val;\n this._control.controller.updateDirection();\n void this.resize();\n }\n\n public set circular(val: FlickingOptions[\"circular\"]) {\n this._circular = val;\n void this.resize();\n }\n\n public set bound(val: FlickingOptions[\"bound\"]) {\n this._bound = val;\n void this.resize();\n }\n\n public set adaptive(val: FlickingOptions[\"adaptive\"]) {\n this._adaptive = val;\n void this.resize();\n }\n\n public set panelsPerView(val: FlickingOptions[\"panelsPerView\"]) {\n this._panelsPerView = val;\n void this.resize();\n }\n\n public set noPanelStyleOverride(val: FlickingOptions[\"noPanelStyleOverride\"]) {\n this._noPanelStyleOverride = val;\n void this.resize();\n }\n\n public set resizeOnContentsReady(val: FlickingOptions[\"resizeOnContentsReady\"]) {\n this._resizeOnContentsReady = val;\n if (val) {\n this._renderer.checkPanelContentsReady(this._renderer.panels);\n }\n }\n\n public set nested(val: FlickingOptions[\"nested\"]) {\n this._nested = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.nested = val;\n }\n }\n\n // EVENTS\n public set needPanelThreshold(val: FlickingOptions[\"needPanelThreshold\"]) { this._needPanelThreshold = val; }\n public set preventEventsBeforeInit(val: FlickingOptions[\"preventEventsBeforeInit\"]) { this._preventEventsBeforeInit = val; }\n // ANIMATION\n public set deceleration(val: FlickingOptions[\"deceleration\"]) {\n this._deceleration = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.deceleration = val;\n }\n }\n\n public set easing(val: FlickingOptions[\"easing\"]) {\n this._easing = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.easing = val;\n }\n }\n\n public set duration(val: FlickingOptions[\"duration\"]) { this._duration = val; }\n // INPUT\n public set inputType(val: FlickingOptions[\"inputType\"]) {\n this._inputType = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.inputType = val;\n }\n }\n\n public set moveType(val: FlickingOptions[\"moveType\"]) {\n this._moveType = val;\n\n const prevControl = this._control;\n const newControl = this._createControl();\n const activePanel = prevControl.activePanel;\n newControl.copy(prevControl);\n\n const prevProgressInPanel = activePanel\n ? this._camera.getProgressInPanel(activePanel)\n : 0;\n\n this._control = newControl;\n this._control.updatePosition(prevProgressInPanel);\n this._control.updateInput();\n }\n\n public set threshold(val: FlickingOptions[\"threshold\"]) { this._threshold = val; }\n public set interruptable(val: FlickingOptions[\"interruptable\"]) {\n this._interruptable = val;\n\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.interruptable = val;\n }\n }\n\n public set bounce(val: FlickingOptions[\"bounce\"]) {\n this._bounce = val;\n this._control.updateInput();\n }\n\n public set iOSEdgeSwipeThreshold(val: FlickingOptions[\"iOSEdgeSwipeThreshold\"]) {\n this._iOSEdgeSwipeThreshold = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.iOSEdgeSwipeThreshold = val;\n }\n }\n\n public set preventClickOnDrag(val: FlickingOptions[\"preventClickOnDrag\"]) {\n const prevVal = this._preventClickOnDrag;\n\n if (val === prevVal) return;\n\n const controller = this._control.controller;\n\n if (val) {\n controller.addPreventClickHandler();\n } else {\n controller.removePreventClickHandler();\n }\n\n this._preventClickOnDrag = val;\n }\n\n public set preventDefaultOnDrag(val: FlickingOptions[\"preventDefaultOnDrag\"]) {\n this._preventDefaultOnDrag = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.preventDefaultOnDrag = val;\n }\n }\n\n public set disableOnInit(val: FlickingOptions[\"disableOnInit\"]) { this._disableOnInit = val; }\n public set changeOnHold(val: FlickingOptions[\"changeOnHold\"]) { this._changeOnHold = val; }\n // PERFORMANCE\n public set renderOnlyVisible(val: FlickingOptions[\"renderOnlyVisible\"]) {\n this._renderOnlyVisible = val;\n void this._renderer.render();\n }\n\n // OTHERS\n public set autoResize(val: FlickingOptions[\"autoResize\"]) {\n this._autoResize = val;\n\n if (val) {\n this._autoResizer.enable();\n } else {\n this._autoResizer.disable();\n }\n }\n\n public set useResizeObserver(val: FlickingOptions[\"useResizeObserver\"]) {\n this._useResizeObserver = val;\n\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n }\n\n /**\n * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string\n * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다.\n * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist|\n * \n *\n * |code|조건|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우|\n *\n * \n * @example\n * ```ts\n * import Flicking from \"@egjs/flicking\";\n *\n * // Creating new instance of Flicking with HTMLElement\n * const flicking = new Flicking(document.querySelector(\".flicking-viewport\"), { circular: true });\n *\n * // Creating new instance of Flicking with CSS selector\n * const flicking2 = new Flicking(\".flicking-viewport\", { circular: true });\n * ```\n */\n public constructor(root: HTMLElement | string, {\n align = ALIGN.CENTER,\n defaultIndex = 0,\n horizontal = true,\n circular = false,\n circularFallback = CIRCULAR_FALLBACK.LINEAR,\n bound = false,\n adaptive = false,\n panelsPerView = -1,\n noPanelStyleOverride = false,\n resizeOnContentsReady = false,\n nested = false,\n needPanelThreshold = 0,\n preventEventsBeforeInit = true,\n deceleration = 0.0075,\n duration = 500,\n easing = x => 1 - Math.pow(1 - x, 3),\n inputType = [\"mouse\", \"touch\"],\n moveType = \"snap\",\n threshold = 40,\n interruptable = true,\n bounce = \"20%\",\n iOSEdgeSwipeThreshold = 30,\n preventClickOnDrag = true,\n preventDefaultOnDrag = false,\n disableOnInit = false,\n changeOnHold = false,\n renderOnlyVisible = false,\n virtual = null,\n autoInit = true,\n autoResize = true,\n useResizeObserver = true,\n resizeDebounce = 0,\n maxResizeDebounce = 100,\n useFractionalSize = false,\n externalRenderer = null,\n renderExternal = null\n }: Partial = {}) {\n super();\n\n // Internal states\n this._initialized = false;\n this._plugins = [];\n\n // Bind options\n this._align = align;\n this._defaultIndex = defaultIndex;\n this._horizontal = horizontal;\n this._circular = circular;\n this._circularFallback = circularFallback;\n this._bound = bound;\n this._adaptive = adaptive;\n this._panelsPerView = panelsPerView;\n this._noPanelStyleOverride = noPanelStyleOverride;\n this._resizeOnContentsReady = resizeOnContentsReady;\n this._nested = nested;\n this._virtual = virtual;\n this._needPanelThreshold = needPanelThreshold;\n this._preventEventsBeforeInit = preventEventsBeforeInit;\n this._deceleration = deceleration;\n this._duration = duration;\n this._easing = easing;\n this._inputType = inputType;\n this._moveType = moveType;\n this._threshold = threshold;\n this._interruptable = interruptable;\n this._bounce = bounce;\n this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;\n this._preventClickOnDrag = preventClickOnDrag;\n this._preventDefaultOnDrag = preventDefaultOnDrag;\n this._disableOnInit = disableOnInit;\n this._changeOnHold = changeOnHold;\n this._renderOnlyVisible = renderOnlyVisible;\n this._autoInit = autoInit;\n this._autoResize = autoResize;\n this._useResizeObserver = useResizeObserver;\n this._resizeDebounce = resizeDebounce;\n this._maxResizeDebounce = maxResizeDebounce;\n this._useFractionalSize = useFractionalSize;\n this._externalRenderer = externalRenderer;\n this._renderExternal = renderExternal;\n\n // Create core components\n this._viewport = new Viewport(this, getElement(root));\n this._autoResizer = new AutoResizer(this);\n this._renderer = this._createRenderer();\n this._camera = this._createCamera();\n this._control = this._createControl();\n this._virtualManager = new VirtualManager(this, virtual);\n\n if (this._autoInit) {\n void this.init();\n }\n }\n\n /**\n * Initialize Flicking and move to the default index\n * This is automatically called on Flicking's constructor when `autoInit` is true(default)\n * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다\n * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다\n * @fires Flicking#ready\n * @return {Promise}\n */\n public init(): Promise {\n if (this._initialized) return Promise.resolve();\n\n const camera = this._camera;\n const renderer = this._renderer;\n const control = this._control;\n const virtualManager = this._virtualManager;\n const originalTrigger = this.trigger;\n const preventEventsBeforeInit = this._preventEventsBeforeInit;\n\n camera.init();\n virtualManager.init();\n renderer.init(this);\n control.init(this);\n\n if (preventEventsBeforeInit) {\n this.trigger = () => this;\n }\n\n this._initialResize();\n\n // Look at initial panel\n this._moveToInitialPanel();\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n if (this._preventClickOnDrag) {\n control.controller.addPreventClickHandler();\n }\n if (this._disableOnInit) {\n this.disableInput();\n }\n renderer.checkPanelContentsReady(renderer.panels);\n this._initialized = true;\n\n return renderer.render().then(() => {\n // Done initializing & emit ready event\n this._plugins.forEach(plugin => plugin.init(this));\n\n if (preventEventsBeforeInit) {\n this.trigger = originalTrigger;\n }\n this.trigger(new ComponentEvent(EVENTS.READY));\n });\n }\n\n /**\n * Destroy Flicking and remove all event handlers\n * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다\n * @return {void}\n */\n public destroy(): void {\n this.off();\n\n this._autoResizer.disable();\n this._control.destroy();\n this._camera.destroy();\n this._renderer.destroy();\n\n this._plugins.forEach(plugin => plugin.destroy());\n\n this._initialized = false;\n }\n\n /**\n * Move to the previous panel (current index - 1)\n * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n * \n * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise\n */\n public prev(duration: number = this._duration): Promise {\n return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, duration, DIRECTION.PREV);\n }\n\n /**\n * Move to the next panel (current index + 1)\n * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise\n */\n public next(duration: number = this._duration) {\n return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, duration, DIRECTION.NEXT);\n }\n\n /**\n * Move to the panel with given index\n * @ko 주어진 인덱스에 해당하는 패널로 이동합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public moveTo(index: number, duration: number = this._duration, direction: ValueOf = DIRECTION.NONE) {\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE));\n }\n\n if (this._control.animating) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.ANIMATION_ALREADY_PLAYING, ERROR.CODE.ANIMATION_ALREADY_PLAYING));\n }\n\n if (this._control.holding) {\n this._control.controller.release();\n }\n\n return this._control.moveToPanel(panel, {\n duration,\n direction\n });\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우\n * @return {void}\n */\n public updateAnimation(index: number, duration?: number, direction?: ValueOf): void {\n if (!this._control.animating) {\n return;\n }\n\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n throw new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE);\n }\n\n this._control.updateAnimation(panel, duration, direction);\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @fires Flicking#moveEnd\n * @return {void}\n */\n public stopAnimation(): void {\n if (!this._control.animating) {\n return;\n }\n\n this._control.stopAnimation();\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n * @example\n * ```ts\n * const panel = flicking.getPanel(0);\n * // Which is a shorthand to...\n * const samePanel = flicking.panels[0];\n * ```\n */\n public getPanel(index: number): Panel | null {\n return this._renderer.getPanel(index);\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @return {this}\n */\n public enableInput(): this {\n this._control.enable();\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @return {this}\n */\n public disableInput(): this {\n this._control.disable();\n return this;\n }\n\n /**\n * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()}\n * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다\n * @param {object} options Status retrieving optionsStatus 반환 옵션\n * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다\n * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다\n * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다\n * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true\n * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다.\n * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체.\n */\n public getStatus({\n index = true,\n position = true,\n includePanelHTML = false,\n visiblePanelsOnly = false\n }: Partial<{\n index: boolean;\n position: boolean;\n includePanelHTML: boolean;\n visiblePanelsOnly: boolean;\n }> = {}): Status {\n const camera = this._camera;\n const panels = visiblePanelsOnly ? this.visiblePanels : this.panels;\n\n const status: Status = {\n panels: panels.map(panel => {\n const panelInfo: Status[\"panels\"][0] = { index: panel.index };\n\n if (includePanelHTML) {\n panelInfo.html = panel.element.outerHTML;\n }\n\n return panelInfo;\n })\n };\n\n if (index) {\n status.index = this.index;\n }\n if (position) {\n const nearestAnchor = camera.findNearestAnchor(camera.position);\n\n if (nearestAnchor) {\n status.position = {\n panel: nearestAnchor.panel.index,\n progressInPanel: camera.getProgressInPanel(nearestAnchor.panel)\n };\n }\n\n }\n\n if (visiblePanelsOnly) {\n const visiblePanels = this.visiblePanels;\n\n status.visibleOffset = visiblePanels[0]?.index ?? 0;\n }\n\n return status;\n }\n\n /**\n * Restore to the state of the given {@link Status}\n * @ko 주어진 {@link Status}의 상태로 복원합니다\n * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다\n * @return {void}\n */\n public setStatus(status: Status): void {\n if (!this._initialized) {\n throw new FlickingError(ERROR.MESSAGE.NOT_INITIALIZED, ERROR.CODE.NOT_INITIALIZED);\n }\n\n const {\n index,\n position,\n visibleOffset,\n panels\n } = status;\n\n const renderer = this._renderer;\n const control = this._control;\n\n // Can't add/remove panels on external rendering\n if (panels[0]?.html && !this._renderExternal) {\n renderer.batchRemove({ index: 0, deleteCount: this.panels.length, hasDOMInElements: true });\n renderer.batchInsert({ index: 0, elements: parseElement(panels.map(panel => panel.html!)), hasDOMInElements: true });\n }\n\n if (index != null) {\n const panelIndex = visibleOffset\n ? index - visibleOffset\n : index;\n\n void this.moveTo(panelIndex, 0).catch(() => void 0);\n }\n\n if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) {\n const { panel, progressInPanel } = position;\n const panelIndex = visibleOffset\n ? panel - visibleOffset\n : panel;\n const panelRange = renderer.panels[panelIndex].range;\n const newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n void control.moveToPosition(newCameraPos, 0).catch(() => void 0);\n }\n }\n\n /**\n * Add plugins that can have different effects on Flicking\n * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다\n * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들)\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public addPlugins(...plugins: Plugin[]) {\n if (this._initialized) {\n plugins.forEach(item => item.init(this));\n }\n\n this._plugins.push(...plugins);\n\n return this;\n }\n\n /**\n * Remove plugins from Flicking.\n * @ko 플리킹으로부터 플러그인들을 제거합니다.\n * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들).\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public removePlugins(...plugins: Plugin[]) {\n plugins.forEach(item => {\n const foundIndex = findIndex(this._plugins, val => val === item);\n\n if (foundIndex >= 0) {\n item.destroy();\n this._plugins.splice(foundIndex, 1);\n }\n });\n\n return this;\n }\n\n /**\n * Update viewport/panel sizes\n * @ko 패널 및 뷰포트의 크기를 갱신합니다\n * @method\n * @fires Flicking#beforeResize\n * @fires Flicking#afterResize\n * @return {this}\n */\n public async resize(): Promise {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n const activePanel = control.activePanel;\n const prevWidth = viewport.width;\n const prevHeight = viewport.height;\n const prevProgressInPanel = activePanel\n ? camera.getProgressInPanel(activePanel)\n : 0;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: prevWidth,\n height: prevHeight,\n element: viewport.element\n }));\n\n viewport.resize();\n await renderer.forceRenderAllPanels(); // Render all panel elements, to update sizes\n if (!this._initialized) {\n return;\n }\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateAdaptiveHeight();\n camera.updatePanelOrder();\n camera.updateOffset();\n await renderer.render();\n if (!this._initialized) {\n return;\n }\n\n if (control.animating) {\n // TODO:\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: prevWidth,\n height: prevHeight\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n\n /**\n * Add new panels after the last panel\n * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of appended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new Flicking(\"#flick\");\n * // These are possible parameters\n * flicking.append(document.createElement(\"div\"));\n * flicking.append(\"\\Panel\\\");\n * flicking.append([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.append(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public append(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(this._renderer.panelCount, element);\n }\n\n /**\n * Add new panels before the first panel\n * This will increase index of panels after by the number of panels added\n * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다\n * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다.\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.prepend(document.createElement(\"div\"));\n * flicking.prepend(\"\\Panel\\\");\n * flicking.prepend([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.prepend(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public prepend(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(0, element);\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.insert(0, document.createElement(\"div\"));\n * flicking.insert(2, \"\\Panel\\\");\n * flicking.insert(1, [\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.insert(3, \"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public insert(index: number, element: ElementLike | ElementLike[]): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchInsert({ index, elements: parseElement(element), hasDOMInElements: true });\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {number} index Index of panel to remove제거할 패널의 인덱스\n * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @return {Panel[]} An array of removed panels제거된 패널들의 배열\n */\n public remove(index: number, deleteCount: number = 1): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchRemove({ index, deleteCount, hasDOMInElements: true });\n }\n\n private _createControl(): Control {\n const moveType = this._moveType;\n const moveTypes = Object.keys(MOVE_TYPE).map(key => MOVE_TYPE[key] as ValueOf);\n\n const moveTypeStr = Array.isArray(moveType)\n ? moveType[0]\n : moveType;\n\n const moveTypeOptions = Array.isArray(moveType)\n ? moveType[1] ?? {}\n : {};\n\n if (!includes(moveTypes, moveTypeStr)) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"moveType\", JSON.stringify(moveType)), ERROR.CODE.WRONG_OPTION);\n }\n\n switch (moveTypeStr) {\n case MOVE_TYPE.SNAP:\n return new SnapControl(moveTypeOptions as SnapControlOptions);\n case MOVE_TYPE.FREE_SCROLL:\n return new FreeControl(moveTypeOptions as FreeControlOptions);\n case MOVE_TYPE.STRICT:\n return new StrictControl(moveTypeOptions as StrictControlOptions);\n }\n }\n\n private _createCamera(): Camera {\n if (this._circular && this._bound) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"circular\\\" and \\\"bound\\\" option cannot be used together, ignoring bound.\");\n }\n\n return new Camera(this, {\n align: this._align\n });\n }\n\n private _createRenderer(): Renderer {\n const externalRenderer = this._externalRenderer;\n if (this._virtual && this._panelsPerView <= 0) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"virtual\\\" and \\\"panelsPerView\\\" option should be used together, ignoring virtual.\");\n }\n\n return externalRenderer\n ? externalRenderer\n : this._renderExternal\n ? this._createExternalRenderer()\n : this._createVanillaRenderer();\n }\n\n private _createExternalRenderer(): ExternalRenderer {\n const {\n renderer,\n rendererOptions\n } = this._renderExternal!;\n\n return new (renderer)({ align: this._align, ...rendererOptions });\n }\n\n private _createVanillaRenderer(): VanillaRenderer {\n const virtual = this.virtualEnabled;\n\n return new VanillaRenderer({\n align: this._align,\n strategy: virtual\n ? new VirtualRenderingStrategy()\n : new NormalRenderingStrategy({\n providerCtor: VanillaElementProvider\n })\n });\n }\n\n private _moveToInitialPanel(): void {\n const renderer = this._renderer;\n const control = this._control;\n const camera = this._camera;\n const defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);\n\n if (!defaultPanel) return;\n\n const nearestAnchor = camera.findNearestAnchor(defaultPanel.position);\n const initialPanel = (nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index) ? nearestAnchor.panel : defaultPanel;\n control.setActive(initialPanel, null, false);\n\n if (!nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n let position = initialPanel.position;\n\n if (!camera.canReach(initialPanel)) {\n position = nearestAnchor.position;\n }\n\n camera.lookAt(position);\n control.updateInput();\n camera.updateOffset();\n }\n\n private _initialResize() {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: 0,\n height: 0,\n element: viewport.element\n }));\n\n viewport.resize();\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateOffset();\n control.updateInput();\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== 0 || newHeight !== 0;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: 0,\n height: 0\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n}\n\nexport default Flicking;\n","import Component from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\n\n/**\n * Decorator that makes the method of flicking available in the framework.\n * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.\n * @memberof eg.Flicking\n * @private\n * @example\n * ```js\n * import Flicking, { withFlickingMethods } from \"@egjs/flicking\";\n *\n * class Flicking extends React.Component> {\n * @withFlickingMethods\n * private flicking: Flicking;\n * }\n * ```\n */\nconst withFlickingMethods = (prototype: any, flickingName: string) => {\n [Component.prototype, Flicking.prototype].forEach(proto => {\n Object.getOwnPropertyNames(proto).filter(name => !prototype[name] && name.indexOf(\"_\") !== 0 && name !== \"constructor\")\n .forEach((name: string) => {\n const descriptor = Object.getOwnPropertyDescriptor(proto, name)!;\n\n if (descriptor.value) {\n // Public Function\n Object.defineProperty(prototype, name, {\n value: function(...args) {\n return descriptor.value.call(this[flickingName], ...args);\n }\n });\n } else {\n const getterDescriptor: { get?: () => any; set?: (val: any) => void } = {};\n if (descriptor.get) {\n getterDescriptor.get = function() {\n const flicking = this[flickingName];\n return flicking && descriptor.get?.call(flicking);\n };\n }\n if (descriptor.set) {\n getterDescriptor.set = function(...args) {\n return descriptor.set?.call(this[flickingName], ...args);\n };\n }\n\n Object.defineProperty(prototype, name, getterDescriptor);\n }\n });\n });\n};\n\nexport default withFlickingMethods;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\nimport Renderer from \"../renderer/Renderer\";\nimport Panel from \"../core/panel/Panel\";\n\nexport default (flicking: Flicking, diffResult: DiffResult, rendered: any[]) => {\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n const prevList = [...diffResult.prevList];\n\n const added: Panel[] = [];\n const removed: Panel[] = [];\n\n if (diffResult.removed.length > 0) {\n let endIdx = -1;\n let prevIdx = -1;\n\n diffResult.removed.forEach(removedIdx => {\n if (endIdx < 0) {\n endIdx = removedIdx;\n }\n\n if (prevIdx >= 0 && removedIdx !== prevIdx - 1) {\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n\n endIdx = removedIdx;\n prevIdx = removedIdx;\n } else {\n prevIdx = removedIdx;\n }\n\n prevList.splice(removedIdx, 1);\n });\n\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n }\n\n diffResult.ordered.forEach(([from, to]) => {\n const prevPanel = panels.splice(from, 1)[0];\n panels.splice(to, 0, prevPanel);\n });\n\n if (diffResult.ordered.length > 0) {\n panels.forEach((panel, idx) => {\n const indexDiff = idx - panel.index;\n\n if (indexDiff > 0) {\n panel.increaseIndex(indexDiff);\n } else {\n panel.decreaseIndex(-indexDiff);\n }\n });\n\n panels.sort((panel1, panel2) => panel1.index - panel2.index);\n\n panels.forEach(panel => {\n panel.updatePosition();\n });\n }\n\n if (diffResult.added.length > 0) {\n let startIdx = -1;\n let prevIdx = -1;\n\n const addedElements = rendered.slice(prevList.length);\n\n diffResult.added.forEach((addedIdx, idx) => {\n if (startIdx < 0) {\n startIdx = idx;\n }\n\n if (prevIdx >= 0 && addedIdx !== prevIdx + 1) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx, idx + 1));\n\n startIdx = -1;\n prevIdx = -1;\n } else {\n prevIdx = addedIdx;\n }\n });\n\n if (startIdx >= 0) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx));\n }\n }\n\n if (diffResult.added.length > 0 || diffResult.removed.length > 0) {\n renderer.updateAfterPanelChange(added, removed);\n }\n};\n\nconst batchInsert = (renderer: Renderer, diffResult: DiffResult, addedElements: any[], startIdx: number, endIdx?: number) => {\n return renderer.batchInsertDefer(\n ...diffResult.added.slice(startIdx, endIdx).map((index, elIdx) => ({ index, elements: [addedElements[elIdx]], hasDOMInElements: false }))\n );\n};\n\nconst batchRemove = (renderer: Renderer, startIdx: number, endIdx?: number) => {\n const removed = renderer.panels.slice(startIdx, endIdx);\n\n return renderer.batchRemoveDefer({ index: startIdx, deleteCount: removed.length, hasDOMInElements: false });\n};\n\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\n\nexport default (flicking: Flicking, diffResult: DiffResult) => {\n const removedPanels = diffResult.removed.reduce((map, idx) => {\n map[idx] = true;\n return map;\n }, {});\n\n const maintainedMap = diffResult.maintained.reduce((map, [prev, current]) => {\n map[prev] = current;\n return map;\n }, {});\n\n return [\n ...flicking.panels\n .filter(panel => !removedPanels[panel.index])\n // Sort panels by position\n .sort((panel1, panel2) => (panel1.position + panel1.offset) - (panel2.position + panel2.offset))\n .map(panel => diffResult.list[maintainedMap[panel.index]]),\n ...diffResult.added.map(idx => diffResult.list[idx])\n ];\n};\n\n","import { FlickingOptions } from \"../Flicking\";\nimport { ALIGN } from \"../const/external\";\nimport { parseArithmeticExpression } from \"../utils\";\n\nexport default (align: FlickingOptions[\"align\"] = ALIGN.CENTER, horizontal: boolean = true, firstPanelSize?: string) => {\n const cameraAlign = getCameraAlign(align);\n const panelAlign = getPanelAlign(align);\n\n if (panelAlign == null) return \"\";\n\n const camPosition = `calc(${cameraAlign} - (${firstPanelSize || \"0px\"} * ${panelAlign.percentage}) - ${panelAlign.absolute}px)`;\n\n return horizontal\n ? `translate(${camPosition})`\n : `translate(0, ${camPosition})`;\n};\n\nconst getCameraAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n return parseAlign(alignVal);\n};\n\nconst getPanelAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\n return parseArithmeticExpression(parseAlign(alignVal));\n};\n\nconst parseAlign = (alignVal: number | string) => {\n if (typeof alignVal === \"number\") {\n return `${alignVal}px`;\n }\n\n switch (alignVal) {\n case ALIGN.CENTER:\n return \"50%\";\n case ALIGN.NEXT:\n return \"100%\";\n case ALIGN.PREV:\n return \"0%\";\n default:\n return alignVal;\n }\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"./Flicking\";\nimport type { FlickingOptions, FlickingEvents } from \"./Flicking\";\n\nexport * from \"./core\";\nexport * from \"./camera\";\nexport * from \"./control\";\nexport * from \"./renderer\";\nexport * from \"./const/external\";\nexport * from \"./cfc\";\nexport * from \"./utils\";\n\nexport * from \"./type/event\";\nexport * from \"./type/external\";\nexport type { FlickingOptions, FlickingEvents };\n\nexport default Flicking;\n"],"names":["CODE","WRONG_TYPE","ELEMENT_NOT_FOUND","VAL_MUST_NOT_NULL","NOT_ATTACHED_TO_FLICKING","WRONG_OPTION","INDEX_OUT_OF_RANGE","POSITION_NOT_REACHABLE","TRANSFORM_NOT_SUPPORTED","STOP_CALLED_BY_USER","ANIMATION_INTERRUPTED","ANIMATION_ALREADY_PLAYING","NOT_ALLOWED_IN_FRAMEWORK","NOT_INITIALIZED","NO_ACTIVE","NOT_ALLOWED_IN_VIRTUAL","MESSAGE","wrongVal","correctTypes","map","type","join","selector","val","name","optionName","min","max","position","EVENTS","READY","BEFORE_RESIZE","AFTER_RESIZE","HOLD_START","HOLD_END","MOVE_START","MOVE","MOVE_END","WILL_CHANGE","CHANGED","WILL_RESTORE","RESTORED","SELECT","NEED_PANEL","VISIBLE_CHANGE","REACH_EDGE","PANEL_CHANGE","ALIGN","PREV","CENTER","NEXT","DIRECTION","NONE","MOVE_TYPE","SNAP","FREE_SCROLL","STRICT","CLASS","VERTICAL","HIDDEN","DEFAULT_VIRTUAL","CIRCULAR_FALLBACK","LINEAR","BOUND","ORDER","LTR","RTL","merge","target","sources","_i","arguments","length","forEach","source","Object","keys","key","getElement","el","parent","targetEl","isString","parentEl","document","queryResult","querySelector","FlickingError","ERROR","nodeType","Node","ELEMENT_NODE","checkExistence","value","nameOnErrMsg","clamp","x","Math","getFlickingAttached","toArray","iterable","slice","call","parseAlign","align","size","alignPoint","parseArithmeticSize","parseBounce","bounce","parsedBounce","Array","isArray","parsedVal","cssValue","base","parsed","parseArithmeticExpression","percentage","absolute","cssRegex","idx","matchResult","exec","sign","unit","parsedValue","parseFloat","signMultiplier","parseCSSSizeValue","parsePanelAlign","panel","getDirection","start","end","parseElement","element","elements","tempDiv","createElement","innerHTML","push","apply","__spread","children","firstChild","removeChild","getMinusCompensatedIndex","includes","array","array_1","__values","array_1_1","done","next","circulatePosition","pos","offset","find","checker","array_2","array_2_1","findRight","findIndex","getProgress","prev","getStyle","window","getComputedStyle","currentStyle","setSize","_a","width","height","style","isBetween","circulateIndex","index","range","arr","i","getElementSize","horizontal","useFractionalSize","useOffset","baseSize","isBorderBoxSizing","boxSizing","border","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","sizeStr","setPrototypeOf","obj","proto","__proto__","_super","__extends","message","code","_this","prototype","Error","Viewport","flicking","_flicking","_el","_width","_height","_padding","left","right","top","bottom","_isBorderBoxSizing","__proto","defineProperty","get","newWidth","newHeight","resize","elStyle","AutoResizer","_onResize","resizeDebounce","maxResizeDebounce","_maxResizeDebounceTimer","setTimeout","_doScheduledResize","_resizeTimer","clearTimeout","_skipFirstResize","isFirstResize","_enabled","_resizeObserver","enable","viewport","disable","useResizeObserver","ResizeObserver","viewportSizeNot0","resizeObserver","observe","addEventListener","disconnect","removeEventListener","VanillaElementProvider","_element","_rendered","show","cameraEl","camera","parentElement","appendChild","hide","VirtualElementProvider","_virtualElement","nativeElement","visible","elIndex","_panel","elementIndex","virtualElements","virtual","init","VirtualManager","options","_renderPanel","renderPanel","_initialPanelCount","_b","initialPanelCount","_cache","_c","cache","_panelClass","_d","panelClass","_elements","set","renderer","panels","uncacheRenderResult","virtualEnabled","externalRenderer","renderExternal","_initVirtualElements","nativeEl","display","append","count","insert","prepend","batchInsert","hasDOMInElements","remove","batchRemove","deleteCount","cameraElement","panelsPerView","fragment","createDocumentFragment","newElements","panelEl","className","dataset","toString","EVENT","HOLD","CHANGE","RELEASE","ANIMATION_END","FINISH","POSITION_KEY","STATE_TYPE","State","_delta","_targetPanel","onEnter","prevState","onHold","ctx","onChange","onRelease","onAnimationEnd","onFinish","_moveToChangedPosition","axesEvent","transitTo","delta","AXES","prevPosition","newPosition","circularEnabled","lookAt","moveEvent","ComponentEvent","isTrusted","holding","direction","trigger","isCanceled","DISABLED","IdleState","animating","panelCount","holdStartEvent","HOLDING","controller","control","animatingContext","moveStartEvent","ANIMATING","HoldingState","_releaseEvent","inputEvent","offsetX","offsetY","DRAGGING","flick","setTo","IDLE","releaseEvent","srcEvent","clickedElement","touchEvent","touch","changedTouches","elementFromPoint","clientX","clientY","clickedPanel","panels_1","panels_1_1","contains","cameraPosition","clickedPanelPosition","DraggingState","destPos","duration","moveToPosition","err","AnimatingState","targetPanel","updateInput","changeOnHold","setActive","activePanel","DisabledState","stop","StateMachine","nextStateType","nextState","_state","fire","eventType","externalCtx","currentState","__assign","AxesController","_onAxesHold","_dragged","_onAxesChange","_panInput","isEnabled","_preventClickWhenDragged","e","preventDefault","stopPropagation","_resetInternalValues","_stateMachine","_axes","state","_animatingContext","axes","circular","axis","Axes","deceleration","interruptable","nested","easing","PanInput","inputType","threshold","iOSEdgeSwipeThreshold","preventDefaultOnDrag","scale","panelOrder","releaseOnScroll","connect","on","destroy","removePreventClickHandler","release","updateAnimation","stopAnimation","update","controlParams","axisManager","addPreventClickHandler","off","animateTo","Promise","reject","startPos","resolve","animate","resetContext","once","animationFinishHandler","interruptionHandler","updateDirection","panInput","Control","_controller","_activePanel","_getPosition","updatePosition","progressInPanel","clampToReachablePosition","resetActive","moveToPanel","_triggerIndexChangeEvent","_animateToPosition","newActivePanel","prevActivePanel","_nextPanel","updateAdaptiveHeight","prevIndex","prevPanel","copy","triggeringEvent","event","then","__awaiter","render","sent","catch","nearestAnchor","findNearestAnchor","removed","canReach","camPos_1","camRangeDiff","rangeDiff","possiblePositions","filter","reduce","nearestPosition","abs","Infinity","AnchorPoint","_index","_pos","SnapControl","_count","activeAnchor","findActiveAnchor","anchorAtCamera","snapThreshold","_calcSnapThreshold","posDelta","absPosDelta","snapDelta","targetAnchor","_findSnappedAnchor","_findAdjacentAnchor","currentPos","clampedPosition","anchorAtPosition","findAnchorIncludePosition","isFinite","anchors","anchorPoints","loopCount","floor","circularIndexOffset","anchorAtPositionIndex","anchor","loop","anchorIncludePosition","adjacentAnchor","getNextAnchor","getPrevAnchor","isNextDirection","panelSize","alignPos","alignPosition","margin","FreeControl","stopAtEdge","_stopAtEdge","panelRange","targetPos","StrictControl","_resetIndexRange","cameraRange","currentIndex","prevPanelIndex","nextPanelIndex","nextPanel","prevPos","nextPos","_indexRange","currentPanel","axesRange","indexRange","isOverThreshold","firstAnchor","lastAnchor","shouldBounceToFirst","shouldBounceToLast","isAdjacent","CameraMode","getAnchors","anchorsIncludingPosition","includePosition","nearest","prevDist","anchorIdx","dist","getCircularOffset","panelPos","canSee","visibleRange","isVisibleOnRange","LinearCameraMode","checkAvailability","getRange","firstPanel","getPanel","lastPanel","CircularCameraMode","firstPanelPrev","lastPanelNext","visibleSize","panelSizeSum","canSetCircularMode","every","camRange","minDist","minDistIndex","anchorCount","positionInRange","anchorInRange","possibleAnchors","toggled","toggledPrev","toggleDirection","toggledNext","_calcPanelAreaSum","visibleInCurrentRange","sum","sizeIncludingMargin","BoundCameraMode","viewportSize","panelAreaSize","isBiggerThanViewport","firstPos","lastPos","alignVal","reachablePanels","shouldPrependBoundAnchor","shouldAppendBoundAnchor","indexOffset_1","newAnchors","splice","nearestPanelAtMin","_findNearestPanel","panelAtMin","panelAtMax","panelIdx","Camera","_checkTranslateSupport","transforms","supportedStyle","documentElement","transformName","transforms_1","transforms_1_1","prefixedTransform","_transform","_align","_position","_alignPos","_offset","_circularOffset","_circularEnabled","_mode","_range","_visiblePanels","_anchors","NaN","nearestPanel","bounceSize","prevRange","nextRange","nextPosition","_panelOrder","viewportEl","firstElementChild","_updateMode","updatePanelOrder","_togglePanels","_refreshVisiblePanels","_checkNeedPanel","_checkReachEnd","updateOffset","applyTransform","getProgressInPanel","updateRange","updateCircularToggleDirection","updateAlignPos","updateAnchors","adaptive","unRenderedPanels","rendered","initialized","resetNeedPanelHistory","_needPanelTriggered","rendering","actualPosition","newVisiblePanels","prevVisiblePanels","added","visiblePanels","needPanelTriggered","cameraSize","needPanelThreshold","cameraPrev","cameraNext","newPos","wasBetweenRange","isBetweenRange","circularMode","fallbackMode","circularFallback","bound","toggle","some","isToggled","Renderer","strategy","_panels","_rendering","_strategy","panelAlign","_collectPanels","forceRenderAllPanels","markForShow","updatePanelSize","_updatePanelSizeByGrid","items","allPanelsInserted","batchInsertDefer","updateAfterPanelChange","prevFirstPanel","addedPanels","item","insertingIdx","panelsPushed","panelsInserted","_createPanel","_insertPanelElements","increaseIndex","allPanelsRemoved","batchRemoveDefer","removingIdx","panelsPulled","panelsRemoved","decreaseIndex","_removePanelElements","panelsAdded","_updateCameraAndControl","targetIndex","checkPanelContentsReady","checkingPanels","resizeOnContentsReady","hasContents","contentsReadyChecker","ImReady","loading","prevProgressInPanel","panelBehind","readyCount","totalCount","check","_showOnlyVisiblePanels","visibleIndexes","visibles","markForHide","referencePanel","gap","panelSizeObj","firstPanelSizeObj","noPanelStyleOverride","updatePanelSizes","_removeAllChildsFromCamera","nextSibling","nextSiblingElement","insertBefore","_afterRender","VanillaRenderer","updateRenderingPanels","renderPanels","_resetPanelElementOrder","_removeAllTextNodes","collectPanels","createPanel","reversedElements","getRenderingElementsByOrder","reverse","nextEl","nextElementSibling","childNodes","node","TEXT_NODE","ExternalRenderer","Panel","elementProvider","_elProvider","_removed","_loading","_resetInternalStates","_size","_margin","_toggled","_toggleDirection","cameraRangeDiff","progress","camPos","disappearPosNext","disappearPosPrev","checkingRange","_updateAlignPos","cached","marginLeft","marginRight","marginTop","marginBottom","includeMargin","includeRange","focus","moveTo","togglePosition","_togglePosition","prevToggled","camAlignPosition","camVisibleRange","camVisibleSize","minimumVisible","maximumVisible","shouldBeVisibleAtMin","shouldBeVisibleAtMax","NormalRenderingStrategy","providerCtor","_providerCtor","getRenderingIndexesByOrder","renderedPanels","notToggled","renderOnlyVisible","VirtualPanel","_cachedInnerHTML","virtualElCount","cacheRenderResult","result","newInnerHTML","VirtualRenderingStrategy","virtualManager","invisibleIndexes","sort","panel1","panel2","_","Flicking","root","defaultIndex","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","preventEventsBeforeInit","_r","_s","_t","pow","_u","_v","moveType","_w","_x","_y","_z","_0","preventClickOnDrag","_1","_2","disableOnInit","_3","_4","_5","_6","autoInit","_7","autoResize","_8","_9","_10","_11","_12","_13","_initialized","_plugins","_defaultIndex","_horizontal","_circular","_circularFallback","_bound","_adaptive","_panelsPerView","_noPanelStyleOverride","_resizeOnContentsReady","_nested","_virtual","_needPanelThreshold","_preventEventsBeforeInit","_deceleration","_duration","_easing","_inputType","_moveType","_threshold","_interruptable","_bounce","_iOSEdgeSwipeThreshold","_preventClickOnDrag","_preventDefaultOnDrag","_disableOnInit","_changeOnHold","_renderOnlyVisible","_autoInit","_autoResize","_useResizeObserver","_resizeDebounce","_maxResizeDebounce","_useFractionalSize","_externalRenderer","_renderExternal","_viewport","_autoResizer","_renderer","_createRenderer","_camera","_createCamera","_control","_createControl","_virtualManager","activeIndex","prevControl","newControl","prevVal","originalTrigger","_initialResize","_moveToInitialPanel","disableInput","plugin","enableInput","getStatus","includePanelHTML","visiblePanelsOnly","status","panelInfo","html","outerHTML","visibleOffset","setStatus","panelIndex","newCameraPos","addPlugins","plugins","removePlugins","foundIndex","prevWidth","prevHeight","sizeChanged","moveTypes","moveTypeStr","moveTypeOptions","JSON","stringify","console","warn","_createExternalRenderer","_createVanillaRenderer","rendererOptions","defaultPanel","initialPanel","VERSION","Component","withFlickingMethods","flickingName","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","args","getterDescriptor","diffResult","prevList","endIdx_1","prevIdx_1","removedIdx","ordered","__read","from","to","indexDiff","startIdx_1","prevIdx_2","addedElements_1","addedIdx","addedElements","startIdx","endIdx","elIdx","removedPanels","maintainedMap","maintained","current","list","firstPanelSize","cameraAlign","getCameraAlign","getPanelAlign","camPosition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AACH;AAEA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACI,IAAMA,IAAI,GAAG;AAClBC,EAAAA,UAAU,EAAE,CAAC;AACbC,EAAAA,iBAAiB,EAAE,CAAC;AACpBC,EAAAA,iBAAiB,EAAE,CAAC;AACpBC,EAAAA,wBAAwB,EAAE,CAAC;AAC3BC,EAAAA,YAAY,EAAE,CAAC;AACfC,EAAAA,kBAAkB,EAAE,CAAC;AACrBC,EAAAA,sBAAsB,EAAE,CAAC;AACzBC,EAAAA,uBAAuB,EAAE,CAAC;AAC1BC,EAAAA,mBAAmB,EAAE,CAAC;AACtBC,EAAAA,qBAAqB,EAAE,CAAC;AACxBC,EAAAA,yBAAyB,EAAE,EAAE;AAC7BC,EAAAA,wBAAwB,EAAE,EAAE;AAC5BC,EAAAA,eAAe,EAAE,EAAE;AACnBC,EAAAA,SAAS,EAAE,EAAE;AACbC,EAAAA,sBAAsB,EAAE,EAAA;EAChB;AAEH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CAACC,IAAI;AACb,MAAA,OAAO,IAAI,CAAA;AACb,IAAA;AACE,MAAA,OAAOgjB,QAAQ,CAAA;AAAC,GAAA;AAEtB,CAAC;;AChDD;;;AAGG;;;;"} \ No newline at end of file diff --git a/dist/flicking.js b/dist/flicking.js deleted file mode 100644 index 5bc52a1223..0000000000 --- a/dist/flicking.js +++ /dev/null @@ -1,8187 +0,0 @@ -/* -Copyright (c) 2015-present NAVER Corp. -name: @egjs/flicking -license: MIT -author: NAVER Corp. -repository: https://github.com/naver/egjs-flicking -version: 4.11.4 -*/ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@egjs/component'), require('@egjs/axes'), require('@egjs/imready')) : - typeof define === 'function' && define.amd ? define(['@egjs/component', '@egjs/axes', '@egjs/imready'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory(global.eg.Component, global.eg.Axes, global.eg.ImReady)); -})(this, (function (Component, Axes, ImReady) { 'use strict'; - - /****************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise, SuppressedError, Symbol */ - - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); - }; - function __extends(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - var __assign = function () { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } - } - function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, - m = s && o[s], - i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - } - function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { - error: error - }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; - } - - /** @deprecated */ - function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; - } - typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /* eslint-disable @typescript-eslint/restrict-template-expressions */ - /** - * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs. - * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다. - * @name ERROR_CODE - * @constant - * @type object - * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우 - * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우 - * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우 - * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우) - * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때 - * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우 - * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우 - * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8) - * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우 - * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우 - * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우 - * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...) - * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우 - * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우 - * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다 - * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우 - */ - var CODE = { - WRONG_TYPE: 0, - ELEMENT_NOT_FOUND: 1, - VAL_MUST_NOT_NULL: 2, - NOT_ATTACHED_TO_FLICKING: 3, - WRONG_OPTION: 4, - INDEX_OUT_OF_RANGE: 5, - POSITION_NOT_REACHABLE: 6, - TRANSFORM_NOT_SUPPORTED: 7, - STOP_CALLED_BY_USER: 8, - ANIMATION_INTERRUPTED: 9, - ANIMATION_ALREADY_PLAYING: 10, - NOT_ALLOWED_IN_FRAMEWORK: 11, - NOT_INITIALIZED: 12, - NO_ACTIVE: 13, - NOT_ALLOWED_IN_VIRTUAL: 14 - }; - var MESSAGE = { - WRONG_TYPE: function (wrongVal, correctTypes) { - return wrongVal + "(" + typeof wrongVal + ") is not a " + correctTypes.map(function (type) { - return "\"" + type + "\""; - }).join(" or ") + "."; - }, - ELEMENT_NOT_FOUND: function (selector) { - return "Element with selector \"" + selector + "\" not found."; - }, - VAL_MUST_NOT_NULL: function (val, name) { - return name + " should be provided. Given: " + val; - }, - NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.", - WRONG_OPTION: function (optionName, val) { - return "Option \"" + optionName + "\" is not in correct format, given: " + val; - }, - INDEX_OUT_OF_RANGE: function (val, min, max) { - return "Index \"" + val + "\" is out of range: should be between " + min + " and " + max + "."; - }, - POSITION_NOT_REACHABLE: function (position) { - return "Position \"" + position + "\" is not reachable."; - }, - TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.", - STOP_CALLED_BY_USER: "Event stop() is called by user.", - ANIMATION_INTERRUPTED: "Animation is interrupted by user input.", - ANIMATION_ALREADY_PLAYING: "Animation is already playing.", - NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.", - NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.", - NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.", - NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled" - }; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /** - * Event type object with event name strings of {@link Flicking} - * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체 - * @type {object} - * @property {"holdStart"} HOLD_START holdStart eventholdStart 이벤트 - * @property {"holdEnd"} HOLD_END holdEnd eventholdEnd 이벤트 - * @property {"moveStart"} MOVE_START moveStart eventmoveStart 이벤트 - * @property {"move"} MOVE move eventmove 이벤트 - * @property {"moveEnd"} MOVE_END moveEnd eventmoveEnd 이벤트 - * @property {"willChange"} WILL_CHANGE willChange eventwillChange 이벤트 - * @property {"changed"} CHANGED changed eventchanged 이벤트 - * @property {"willRestore"} WILL_RESTORE willRestore eventwillRestore 이벤트 - * @property {"restored"} RESTORED restored eventrestored 이벤트 - * @property {"select"} SELECT select eventselect 이벤트 - * @property {"needPanel"} NEED_PANEL needPanel eventneedPanel 이벤트 - * @property {"panelChange"} PANEL_CHANGE panelChange eventpanelChange 이벤트 - * @example - * ```ts - * import { EVENTS } from "@egjs/flicking"; - * EVENTS.MOVE_START; // "moveStart" - * ``` - */ - var EVENTS = { - READY: "ready", - BEFORE_RESIZE: "beforeResize", - AFTER_RESIZE: "afterResize", - HOLD_START: "holdStart", - HOLD_END: "holdEnd", - MOVE_START: "moveStart", - MOVE: "move", - MOVE_END: "moveEnd", - WILL_CHANGE: "willChange", - CHANGED: "changed", - WILL_RESTORE: "willRestore", - RESTORED: "restored", - SELECT: "select", - NEED_PANEL: "needPanel", - VISIBLE_CHANGE: "visibleChange", - REACH_EDGE: "reachEdge", - PANEL_CHANGE: "panelChange" - }; - /** - * An object with all possible predefined literal string for the {@link Flicking#align align} option - * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체 - * @type {object} - * @property {"prev"} PREV left/top align좌/상 정렬 - * @property {"center"} CENTER center align중앙 정렬 - * @property {"next"} NEXT right/bottom align우/하 정렬 - */ - var ALIGN = { - PREV: "prev", - CENTER: "center", - NEXT: "next" - }; - /** - * An object of directions - * @ko 방향을 나타내는 값들을 담고 있는 객체 - * @type {object} - * @property {"PREV"} PREV "left" when {@link Flicking#horizontal horizontal} is true, and "top" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다 - * @property {"NEXT"} NEXT "right" when {@link Flicking#horizontal horizontal} is true, and "bottom" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다 - * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다 - */ - var DIRECTION = { - PREV: "PREV", - NEXT: "NEXT", - NONE: null - }; - /** - * An object with all possible {@link Flicking#moveType moveType}s - * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체 - * @type {object} - * @property {"snap"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"freeScroll"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"strict"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType} - */ - var MOVE_TYPE = { - SNAP: "snap", - FREE_SCROLL: "freeScroll", - STRICT: "strict" - }; - var CLASS = { - VERTICAL: "vertical", - HIDDEN: "flicking-hidden", - DEFAULT_VIRTUAL: "flicking-panel" - }; - /** - * An object with all possible {@link Flicking#circularFallback circularFallback}s - * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체 - * @type {object} - * @property {string} LINEAR "linear" - * @property {string} BOUND "bound" - */ - var CIRCULAR_FALLBACK = { - LINEAR: "linear", - BOUND: "bound" - }; - /** - * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체 - * @type {object} - * @property {string} LTR "ltr" - * @property {string} RTL "rtl" - */ - var ORDER = { - LTR: "ltr", - RTL: "rtl" - }; - - var Constants = { - __proto__: null, - EVENTS: EVENTS, - ALIGN: ALIGN, - DIRECTION: DIRECTION, - MOVE_TYPE: MOVE_TYPE, - CLASS: CLASS, - CIRCULAR_FALLBACK: CIRCULAR_FALLBACK, - ORDER: ORDER, - ERROR_CODE: CODE - }; - - // eslint-disable-next-line @typescript-eslint/ban-types - var merge = function (target) { - var sources = []; - for (var _i = 1; _i < arguments.length; _i++) { - sources[_i - 1] = arguments[_i]; - } - sources.forEach(function (source) { - Object.keys(source).forEach(function (key) { - target[key] = source[key]; - }); - }); - return target; - }; - var getElement = function (el, parent) { - var targetEl = null; - if (isString(el)) { - var parentEl = parent ? parent : document; - var queryResult = parentEl.querySelector(el); - if (!queryResult) { - throw new FlickingError(MESSAGE.ELEMENT_NOT_FOUND(el), CODE.ELEMENT_NOT_FOUND); - } - targetEl = queryResult; - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - targetEl = el; - } - if (!targetEl) { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - return targetEl; - }; - var checkExistence = function (value, nameOnErrMsg) { - if (value == null) { - throw new FlickingError(MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), CODE.VAL_MUST_NOT_NULL); - } - }; - var clamp = function (x, min, max) { - return Math.max(Math.min(x, max), min); - }; - var getFlickingAttached = function (val) { - if (!val) { - throw new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING); - } - return val; - }; - var toArray = function (iterable) { - return [].slice.call(iterable); - }; - var parseAlign$1 = function (align, size) { - var alignPoint; - if (isString(align)) { - switch (align) { - case ALIGN.PREV: - alignPoint = 0; - break; - case ALIGN.CENTER: - alignPoint = 0.5 * size; - break; - case ALIGN.NEXT: - alignPoint = size; - break; - default: - alignPoint = parseArithmeticSize(align, size); - if (alignPoint == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("align", align), CODE.WRONG_OPTION); - } - } - } else { - alignPoint = align; - } - return alignPoint; - }; - var parseBounce = function (bounce, size) { - var parsedBounce; - if (Array.isArray(bounce)) { - parsedBounce = bounce.map(function (val) { - return parseArithmeticSize(val, size); - }); - } else { - var parsedVal = parseArithmeticSize(bounce, size); - parsedBounce = [parsedVal, parsedVal]; - } - return parsedBounce.map(function (val) { - if (val == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("bounce", bounce), CODE.WRONG_OPTION); - } - return val; - }); - }; - var parseArithmeticSize = function (cssValue, base) { - var parsed = parseArithmeticExpression(cssValue); - if (parsed == null) return null; - return parsed.percentage * base + parsed.absolute; - }; - var parseArithmeticExpression = function (cssValue) { - var cssRegex = /(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g; - if (typeof cssValue === "number") { - return { - percentage: 0, - absolute: cssValue - }; - } - var parsed = { - percentage: 0, - absolute: 0 - }; - var idx = 0; - var matchResult = cssRegex.exec(cssValue); - while (matchResult != null) { - var sign = matchResult[1]; - var value = matchResult[2]; - var unit = matchResult[3]; - var parsedValue = parseFloat(value); - if (idx <= 0) { - sign = sign || "+"; - } - // Return default value for values not in good form - if (!sign) { - return null; - } - var signMultiplier = sign === "+" ? 1 : -1; - if (unit === "%") { - parsed.percentage += signMultiplier * (parsedValue / 100); - } else { - parsed.absolute += signMultiplier * parsedValue; - } - // Match next occurrence - ++idx; - matchResult = cssRegex.exec(cssValue); - } - // None-matched - if (idx === 0) { - return null; - } - return parsed; - }; - var parseCSSSizeValue = function (val) { - return isString(val) ? val : val + "px"; - }; - var parsePanelAlign = function (align) { - return typeof align === "object" ? align.panel : align; - }; - var getDirection = function (start, end) { - if (start === end) return DIRECTION.NONE; - return start < end ? DIRECTION.NEXT : DIRECTION.PREV; - }; - var parseElement = function (element) { - if (!Array.isArray(element)) { - element = [element]; - } - var elements = []; - element.forEach(function (el) { - if (isString(el)) { - var tempDiv = document.createElement("div"); - tempDiv.innerHTML = el; - elements.push.apply(elements, __spread(toArray(tempDiv.children))); - while (tempDiv.firstChild) { - tempDiv.removeChild(tempDiv.firstChild); - } - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - elements.push(el); - } else { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - }); - return elements; - }; - var getMinusCompensatedIndex = function (idx, max) { - return idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max); - }; - var includes = function (array, target) { - var e_1, _a; - try { - for (var array_1 = __values(array), array_1_1 = array_1.next(); !array_1_1.done; array_1_1 = array_1.next()) { - var val = array_1_1.value; - if (val === target) return true; - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (array_1_1 && !array_1_1.done && (_a = array_1.return)) _a.call(array_1); - } finally { - if (e_1) throw e_1.error; - } - } - return false; - }; - var isString = function (val) { - return typeof val === "string"; - }; - var circulatePosition = function (pos, min, max) { - var size = max - min; - if (pos < min) { - var offset = (min - pos) % size; - pos = max - offset; - } else if (pos > max) { - var offset = (pos - max) % size; - pos = min + offset; - } - return pos; - }; - var find = function (array, checker) { - var e_2, _a; - try { - for (var array_2 = __values(array), array_2_1 = array_2.next(); !array_2_1.done; array_2_1 = array_2.next()) { - var val = array_2_1.value; - if (checker(val)) { - return val; - } - } - } catch (e_2_1) { - e_2 = { - error: e_2_1 - }; - } finally { - try { - if (array_2_1 && !array_2_1.done && (_a = array_2.return)) _a.call(array_2); - } finally { - if (e_2) throw e_2.error; - } - } - return null; - }; - var findRight = function (array, checker) { - for (var idx = array.length - 1; idx >= 0; idx--) { - var val = array[idx]; - if (checker(val)) { - return val; - } - } - return null; - }; - var findIndex = function (array, checker) { - for (var idx = 0; idx < array.length; idx++) { - if (checker(array[idx])) { - return idx; - } - } - return -1; - }; - var getProgress = function (pos, prev, next) { - return (pos - prev) / (next - prev); - }; - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - var getStyle = function (el) { - return window.getComputedStyle(el) || el.currentStyle; - }; - var setSize = function (el, _a) { - var width = _a.width, - height = _a.height; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - el.style.width = width + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - el.style.height = height + "px"; - } - } - }; - var isBetween = function (val, min, max) { - return val >= min && val <= max; - }; - var circulateIndex = function (index, max) { - if (index >= max) { - return index % max; - } else if (index < 0) { - return getMinusCompensatedIndex((index + 1) % max - 1, max); - } else { - return index; - } - }; - var range = function (end) { - var arr = new Array(end); - for (var i = 0; i < end; i++) { - arr[i] = i; - } - return arr; - }; - var getElementSize = function (_a) { - var el = _a.el, - horizontal = _a.horizontal, - useFractionalSize = _a.useFractionalSize, - useOffset = _a.useOffset, - style = _a.style; - var size = 0; - if (useFractionalSize) { - var baseSize = parseFloat(horizontal ? style.width : style.height) || 0; - var isBorderBoxSizing = style.boxSizing === "border-box"; - var border = horizontal ? parseFloat(style.borderLeftWidth || "0") + parseFloat(style.borderRightWidth || "0") : parseFloat(style.borderTopWidth || "0") + parseFloat(style.borderBottomWidth || "0"); - if (isBorderBoxSizing) { - size = useOffset ? baseSize : baseSize - border; - } else { - var padding = horizontal ? parseFloat(style.paddingLeft || "0") + parseFloat(style.paddingRight || "0") : parseFloat(style.paddingTop || "0") + parseFloat(style.paddingBottom || "0"); - size = useOffset ? baseSize + padding + border : baseSize + padding; - } - } else { - var sizeStr = horizontal ? "Width" : "Height"; - size = useOffset ? el["offset" + sizeStr] : el["client" + sizeStr]; - } - return Math.max(size, 0); - }; - var setPrototypeOf = Object.setPrototypeOf || function (obj, proto) { - obj.__proto__ = proto; - return obj; - }; - - var Utils = { - __proto__: null, - merge: merge, - getElement: getElement, - checkExistence: checkExistence, - clamp: clamp, - getFlickingAttached: getFlickingAttached, - toArray: toArray, - parseAlign: parseAlign$1, - parseBounce: parseBounce, - parseArithmeticSize: parseArithmeticSize, - parseArithmeticExpression: parseArithmeticExpression, - parseCSSSizeValue: parseCSSSizeValue, - parsePanelAlign: parsePanelAlign, - getDirection: getDirection, - parseElement: parseElement, - getMinusCompensatedIndex: getMinusCompensatedIndex, - includes: includes, - isString: isString, - circulatePosition: circulatePosition, - find: find, - findRight: findRight, - findIndex: findIndex, - getProgress: getProgress, - getStyle: getStyle, - setSize: setSize, - isBetween: isBetween, - circulateIndex: circulateIndex, - range: range, - getElementSize: getElementSize, - setPrototypeOf: setPrototypeOf - }; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /** - * Special type of known error that {@link Flicking} throws. - * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러 - * @property {number} code Error code에러 코드 - * @property {string} message Error message에러 메시지 - * @see {@link ERROR_CODE ERROR_CODE} - * @example - * ```ts - * import Flicking, { FlickingError, ERROR_CODES } from "@egjs/flicking"; - * try { - * const flicking = new Flicking(".flicking-viewport") - * } catch (e) { - * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) { - * console.error("Element not found") - * } - * } - * ``` - */ - var FlickingError = /*#__PURE__*/function (_super) { - __extends(FlickingError, _super); - /** - * @param message Error message에러 메시지 - * @param code Error code에러 코드 - */ - function FlickingError(message, code) { - var _this = _super.call(this, message) || this; - setPrototypeOf(_this, FlickingError.prototype); - _this.name = "FlickingError"; - _this.code = code; - return _this; - } - return FlickingError; - }(Error); - - /** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - */ - var Viewport = /*#__PURE__*/function () { - /** - * @param el A viewport element뷰포트 엘리먼트 - */ - function Viewport(flicking, el) { - this._flicking = flicking; - this._el = el; - this._width = 0; - this._height = 0; - this._padding = { - left: 0, - right: 0, - top: 0, - bottom: 0 - }; - this._isBorderBoxSizing = false; - } - var __proto = Viewport.prototype; - Object.defineProperty(__proto, "element", { - /** - * A viewport(root) element - * @ko 뷰포트(root) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "width", { - /** - * Viewport width, without paddings - * @ko 뷰포트 너비 - * @type {number} - * @readonly - */ - get: function () { - return this._width - this._padding.left - this._padding.right; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Viewport height, without paddings - * @ko 뷰포트 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height - this._padding.top - this._padding.bottom; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "padding", { - /** - * Viewport paddings - * @ko 뷰포트 CSS padding 값 - * @type {object} - * @property {number} left CSS `padding-left` - * @property {number} right CSS `padding-right` - * @property {number} top CSS `padding-top` - * @property {number} bottom CSS `padding-bottom` - * @readonly - */ - get: function () { - return this._padding; - }, - enumerable: false, - configurable: true - }); - /** - * Change viewport's size. - * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property - * @ko 뷰포트 크기를 변경합니다. - * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New viewport size새 뷰포트 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - */ - __proto.setSize = function (_a) { - var width = _a.width, - height = _a.height; - var el = this._el; - var padding = this._padding; - var isBorderBoxSizing = this._isBorderBoxSizing; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - var newWidth = isBorderBoxSizing ? width + padding.left + padding.right : width; - el.style.width = newWidth + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - var newHeight = isBorderBoxSizing ? height + padding.top + padding.bottom : height; - el.style.height = newHeight + "px"; - } - } - this.resize(); - }; - /** - * Update width/height to the current viewport element's size - * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다 - */ - __proto.resize = function () { - var el = this._el; - var elStyle = getStyle(el); - var useFractionalSize = this._flicking.useFractionalSize; - this._width = getElementSize({ - el: el, - horizontal: true, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._height = getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._padding = { - left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0, - right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0, - top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0, - bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0 - }; - this._isBorderBoxSizing = elStyle.boxSizing === "border-box"; - }; - return Viewport; - }(); - - var AutoResizer = /*#__PURE__*/function () { - function AutoResizer(flicking) { - var _this = this; - this._onResize = function () { - var flicking = _this._flicking; - var resizeDebounce = flicking.resizeDebounce; - var maxResizeDebounce = flicking.maxResizeDebounce; - if (resizeDebounce <= 0) { - void flicking.resize(); - } else { - if (_this._maxResizeDebounceTimer <= 0) { - if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) { - _this._maxResizeDebounceTimer = window.setTimeout(_this._doScheduledResize, maxResizeDebounce); - } - } - if (_this._resizeTimer > 0) { - clearTimeout(_this._resizeTimer); - _this._resizeTimer = 0; - } - _this._resizeTimer = window.setTimeout(_this._doScheduledResize, resizeDebounce); - } - }; - this._doScheduledResize = function () { - clearTimeout(_this._resizeTimer); - clearTimeout(_this._maxResizeDebounceTimer); - _this._maxResizeDebounceTimer = -1; - _this._resizeTimer = -1; - void _this._flicking.resize(); - }; - // eslint-disable-next-line @typescript-eslint/member-ordering - this._skipFirstResize = function () { - var isFirstResize = true; - return function () { - if (isFirstResize) { - isFirstResize = false; - return; - } - _this._onResize(); - }; - }(); - this._flicking = flicking; - this._enabled = false; - this._resizeObserver = null; - this._resizeTimer = -1; - this._maxResizeDebounceTimer = -1; - } - var __proto = AutoResizer.prototype; - Object.defineProperty(__proto, "enabled", { - get: function () { - return this._enabled; - }, - enumerable: false, - configurable: true - }); - __proto.enable = function () { - var flicking = this._flicking; - var viewport = flicking.viewport; - if (this._enabled) { - this.disable(); - } - if (flicking.useResizeObserver && !!window.ResizeObserver) { - var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0; - var resizeObserver = viewportSizeNot0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize); - resizeObserver.observe(flicking.viewport.element); - this._resizeObserver = resizeObserver; - } else { - window.addEventListener("resize", this._onResize); - } - this._enabled = true; - return this; - }; - __proto.disable = function () { - if (!this._enabled) return this; - var resizeObserver = this._resizeObserver; - if (resizeObserver) { - resizeObserver.disconnect(); - this._resizeObserver = null; - } else { - window.removeEventListener("resize", this._onResize); - } - this._enabled = false; - return this; - }; - return AutoResizer; - }(); - - /** - * @internal - */ - var VanillaElementProvider = /*#__PURE__*/function () { - function VanillaElementProvider(element) { - this._element = element; - this._rendered = true; - } - var __proto = VanillaElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - __proto.show = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement !== cameraEl) { - cameraEl.appendChild(el); - this._rendered = true; - } - }; - __proto.hide = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement === cameraEl) { - cameraEl.removeChild(el); - this._rendered = false; - } - }; - return VanillaElementProvider; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /** - * @internal - */ - var VirtualElementProvider = /*#__PURE__*/function () { - function VirtualElementProvider(flicking) { - this._flicking = flicking; - } - var __proto = VirtualElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._virtualElement.nativeElement; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._virtualElement.visible; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "_virtualElement", { - get: function () { - var flicking = this._flicking; - var elIndex = this._panel.elementIndex; - var virtualElements = flicking.virtual.elements; - return virtualElements[elIndex]; - }, - enumerable: false, - configurable: true - }); - __proto.init = function (panel) { - this._panel = panel; - }; - __proto.show = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - __proto.hide = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - return VirtualElementProvider; - }(); - - /** - * A manager class to add / remove virtual panels - */ - var VirtualManager = /*#__PURE__*/function () { - function VirtualManager(flicking, options) { - var _a, _b, _c, _d; - this._flicking = flicking; - this._renderPanel = (_a = options === null || options === void 0 ? void 0 : options.renderPanel) !== null && _a !== void 0 ? _a : function () { - return ""; - }; - this._initialPanelCount = (_b = options === null || options === void 0 ? void 0 : options.initialPanelCount) !== null && _b !== void 0 ? _b : -1; - this._cache = (_c = options === null || options === void 0 ? void 0 : options.cache) !== null && _c !== void 0 ? _c : false; - this._panelClass = (_d = options === null || options === void 0 ? void 0 : options.panelClass) !== null && _d !== void 0 ? _d : CLASS.DEFAULT_VIRTUAL; - this._elements = []; - } - var __proto = VirtualManager.prototype; - Object.defineProperty(__proto, "elements", { - get: function () { - return this._elements; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderPanel", { - // Options - /** - * A rendering function for the panel element's innerHTML - * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @type {function} - * @param {VirtualPanel} panel Instance of the panel패널 인스턴스 - * @param {number} index Index of the panel패널 인덱스 - * @default "() => {}" - */ - get: function () { - return this._renderPanel; - }, - set: function (val) { - this._renderPanel = val; - this._flicking.renderer.panels.forEach(function (panel) { - return panel.uncacheRenderResult(); - }); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialPanelCount", { - /** - * Initial panel count to render - * @ko 최초로 렌더링할 패널의 개수 - * @readonly - * @type {number} - * @default -1 - */ - get: function () { - return this._initialPanelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cache", { - /** - * Whether to cache rendered panel's innerHTML - * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @type {boolean} - * @default false - */ - get: function () { - return this._cache; - }, - set: function (val) { - this._cache = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelClass", { - /** - * The class name that will be applied to rendered panel elements - * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @type {string} - * @default "flicking-panel" - */ - get: function () { - return this._panelClass; - }, - set: function (val) { - this._panelClass = val; - }, - enumerable: false, - configurable: true - }); - __proto.init = function () { - var flicking = this._flicking; - if (!flicking.virtualEnabled) return; - if (!flicking.externalRenderer && !flicking.renderExternal) { - this._initVirtualElements(); - } - var virtualElements = flicking.camera.children; - this._elements = virtualElements.map(function (el) { - return { - nativeElement: el, - visible: true - }; - }); - }; - __proto.show = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = true; - if (nativeEl.style.display) { - nativeEl.style.display = ""; - } - }; - __proto.hide = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = false; - nativeEl.style.display = "none"; - }; - /** - * Add new virtual panels at the end of the list - * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.append = function (count) { - if (count === void 0) { - count = 1; - } - var flicking = this._flicking; - return this.insert(flicking.panels.length, count); - }; - /** - * Add new virtual panels at the start of the list - * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.prepend = function (count) { - if (count === void 0) { - count = 1; - } - return this.insert(0, count); - }; - /** - * Add new virtual panels at the given index - * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.insert = function (index, count) { - if (count === void 0) { - count = 1; - } - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchInsert({ - index: index, - elements: range(count), - hasDOMInElements: false - }); - }; - /** - * Remove panels at the given index - * @ko 주어진 인덱스에서 패널들을 삭제합니다 - * @param {number} count The number of panels to remove삭제할 패널의 개수 - * @returns {Array} The panels removed삭제된 패널들 - */ - __proto.remove = function (index, count) { - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchRemove({ - index: index, - deleteCount: count, - hasDOMInElements: false - }); - }; - __proto._initVirtualElements = function () { - var _this = this; - var flicking = this._flicking; - var cameraElement = flicking.camera.element; - var panelsPerView = flicking.panelsPerView; - var fragment = document.createDocumentFragment(); - var newElements = range(panelsPerView + 1).map(function (idx) { - var panelEl = document.createElement("div"); - panelEl.className = _this._panelClass; - panelEl.dataset.elementIndex = idx.toString(); - return panelEl; - }); - newElements.forEach(function (el) { - fragment.appendChild(el); - }); - cameraElement.appendChild(fragment); - }; - return VirtualManager; - }(); - - /** - * All possible @egjs/axes event keys - * @internal - */ - var EVENT = { - HOLD: "hold", - CHANGE: "change", - RELEASE: "release", - ANIMATION_END: "animationEnd", - FINISH: "finish" - }; - /** - * An Axis key that Flicking uses - * @internal - */ - var POSITION_KEY = "flick"; - - var STATE_TYPE; - (function (STATE_TYPE) { - STATE_TYPE[STATE_TYPE["IDLE"] = 0] = "IDLE"; - STATE_TYPE[STATE_TYPE["HOLDING"] = 1] = "HOLDING"; - STATE_TYPE[STATE_TYPE["DRAGGING"] = 2] = "DRAGGING"; - STATE_TYPE[STATE_TYPE["ANIMATING"] = 3] = "ANIMATING"; - STATE_TYPE[STATE_TYPE["DISABLED"] = 4] = "DISABLED"; - })(STATE_TYPE || (STATE_TYPE = {})); - /** - * A component that shows the current status of the user input or the animation - * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트 - * @internal - */ - var State = /*#__PURE__*/function () { - function State() { - this._delta = 0; - this._targetPanel = null; - } - var __proto = State.prototype; - Object.defineProperty(__proto, "delta", { - /** - * A sum of delta values of change events from the last hold event of Axes - * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산 - * @type {number} - * @readonly - */ - get: function () { - return this._delta; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "targetPanel", { - /** - * A panel to set as {@link Control#activePanel} after the animation is finished - * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널 - * @type {number} - * @readonly - */ - get: function () { - return this._targetPanel; - }, - set: function (val) { - this._targetPanel = val; - }, - enumerable: false, - configurable: true - }); - /** - * An callback which is called when state has changed to this state - * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수 - * @param {State} prevState An previous state이전 상태값 - * @return {void} - */ - __proto.onEnter = function (prevState) { - this._delta = prevState._delta; - this._targetPanel = prevState._targetPanel; - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onHold = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onChange = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onRelease = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onAnimationEnd = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onFinish = function (ctx) { - // DO NOTHING - }; - __proto._moveToChangedPosition = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var delta = axesEvent.delta[POSITION_KEY]; - if (!delta) { - return; - } - this._delta += delta; - var camera = flicking.camera; - var prevPosition = camera.position; - var position = axesEvent.pos[POSITION_KEY]; - var newPosition = flicking.circularEnabled ? circulatePosition(position, camera.range.min, camera.range.max) : position; - camera.lookAt(newPosition); - var moveEvent = new Component.ComponentEvent(EVENTS.MOVE, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(0, axesEvent.delta[POSITION_KEY]), - axesEvent: axesEvent - }); - flicking.trigger(moveEvent); - if (moveEvent.isCanceled()) { - // Return to previous position - camera.lookAt(prevPosition); - transitTo(STATE_TYPE.DISABLED); - } - }; - return State; - }(); - - /** - * A default state when there's no user input and no animation's playing - * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태 - * @internal - */ - var IdleState = /*#__PURE__*/function (_super) { - __extends(IdleState, _super); - function IdleState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - return _this; - } - var __proto = IdleState.prototype; - __proto.onEnter = function () { - this._delta = 0; - this._targetPanel = null; - }; - __proto.onHold = function (ctx) { - // Shouldn't do any action until any panels on flicking area - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - if (flicking.renderer.panelCount <= 0) { - transitTo(STATE_TYPE.DISABLED); - return; - } - var holdStartEvent = new Component.ComponentEvent(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.HOLDING); - } - }; - // By methods call - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var controller = flicking.control.controller; - var animatingContext = controller.animatingContext; - var moveStartEvent = new Component.ComponentEvent(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger AnimatingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.ANIMATING).onChange(ctx); - } - }; - return IdleState; - }(State); - - /** - * A state that activates when user's holding the Flicking area, but not moved a single pixel yet - * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태 - * @internal - */ - var HoldingState = /*#__PURE__*/function (_super) { - __extends(HoldingState, _super); - function HoldingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - _this._releaseEvent = null; - return _this; - } - var __proto = HoldingState.prototype; - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var inputEvent = axesEvent.inputEvent; - var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY; - var moveStartEvent = new Component.ComponentEvent(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection(0, -offset), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger DraggingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.DRAGGING).onChange(ctx); - } - }; - __proto.onRelease = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - flicking.trigger(new Component.ComponentEvent(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (axesEvent.delta.flick !== 0) { - // Sometimes "release" event on axes triggered before "change" event - // Especially if user flicked panel fast in really short amount of time - // if delta is not zero, that means above case happened. - // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END - // At least one move event should be included between holdStart and holdEnd - axesEvent.setTo({ - flick: flicking.camera.position - }, 0); - transitTo(STATE_TYPE.IDLE); - return; - } - // Can't handle select event here, - // As "finish" axes event happens - this._releaseEvent = axesEvent; - }; - __proto.onFinish = function (ctx) { - var e_1, _a; - var flicking = ctx.flicking, - transitTo = ctx.transitTo; - // Should transite to IDLE state before select event - // As user expects hold is already finished - transitTo(STATE_TYPE.IDLE); - if (!this._releaseEvent) { - return; - } - // Handle release event here - // To prevent finish event called twice - var releaseEvent = this._releaseEvent; - // Static click - /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */ - var srcEvent = releaseEvent.inputEvent.srcEvent; - var clickedElement; - if (srcEvent.type === "touchend") { - var touchEvent = srcEvent; - var touch = touchEvent.changedTouches[0]; - clickedElement = document.elementFromPoint(touch.clientX, touch.clientY); - } else { - clickedElement = srcEvent.target; - } - /* eslint-enable */ - var panels = flicking.renderer.panels; - var clickedPanel = null; - try { - for (var panels_1 = __values(panels), panels_1_1 = panels_1.next(); !panels_1_1.done; panels_1_1 = panels_1.next()) { - var panel = panels_1_1.value; - if (panel.contains(clickedElement)) { - clickedPanel = panel; - break; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (panels_1_1 && !panels_1_1.done && (_a = panels_1.return)) _a.call(panels_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (clickedPanel) { - var cameraPosition = flicking.camera.position; - var clickedPanelPosition = clickedPanel.position; - flicking.trigger(new Component.ComponentEvent(EVENTS.SELECT, { - index: clickedPanel.index, - panel: clickedPanel, - // Direction to the clicked panel - direction: getDirection(cameraPosition, clickedPanelPosition) - })); - } - }; - return HoldingState; - }(State); - - /** - * A state that activates when user's dragging the Flicking area - * @ko 사용자가 드래깅중인 상태 - * @internal - */ - var DraggingState = /*#__PURE__*/function (_super) { - __extends(DraggingState, _super); - function DraggingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DraggingState.prototype; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onRelease = function (ctx) { - var _a; - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Update last position to cope with Axes's animating behavior - // Axes uses start position when animation start - flicking.trigger(new Component.ComponentEvent(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (flicking.renderer.panelCount <= 0) { - // There're no panels - transitTo(STATE_TYPE.IDLE); - return; - } - transitTo(STATE_TYPE.ANIMATING); - var control = flicking.control; - var position = axesEvent.destPos[POSITION_KEY]; - var duration = Math.max(axesEvent.duration, flicking.duration); - try { - void control.moveToPosition(position, duration, axesEvent); - } catch (err) { - transitTo(STATE_TYPE.IDLE); - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = flicking.camera.position, _a), 0); - } - }; - return DraggingState; - }(State); - - /** - * A state that activates when Flicking's animating by user input or method call - * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태 - * @internal - */ - var AnimatingState = /*#__PURE__*/function (_super) { - __extends(AnimatingState, _super); - function AnimatingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = AnimatingState.prototype; - __proto.onHold = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var targetPanel = this._targetPanel; - var control = flicking.control; - this._delta = 0; - flicking.control.updateInput(); - if (flicking.changeOnHold && targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - var holdStartEvent = new Component.ComponentEvent(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.DRAGGING); - } - }; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onFinish = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var control = flicking.control; - var controller = control.controller; - var animatingContext = controller.animatingContext; - transitTo(STATE_TYPE.IDLE); - flicking.trigger(new Component.ComponentEvent(EVENTS.MOVE_END, { - isTrusted: axesEvent.isTrusted, - direction: getDirection(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - })); - var targetPanel = this._targetPanel; - if (targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - }; - return AnimatingState; - }(State); - - /** - * A state that activates when Flicking is stopped by event's `stop` method - * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태 - * @internal - */ - var DisabledState = /*#__PURE__*/function (_super) { - __extends(DisabledState, _super); - function DisabledState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DisabledState.prototype; - __proto.onAnimationEnd = function (ctx) { - var transitTo = ctx.transitTo; - transitTo(STATE_TYPE.IDLE); - }; - __proto.onChange = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Can stop Axes's change event - axesEvent.stop(); - transitTo(STATE_TYPE.IDLE); - }; - __proto.onRelease = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // This is needed when stopped hold start event - if (axesEvent.delta.flick === 0) { - transitTo(STATE_TYPE.IDLE); - } - }; - return DisabledState; - }(State); - - /** - * @internal - */ - var StateMachine = /*#__PURE__*/function () { - function StateMachine() { - var _this = this; - this.transitTo = function (nextStateType) { - var nextState; - switch (nextStateType) { - case STATE_TYPE.IDLE: - nextState = new IdleState(); - break; - case STATE_TYPE.HOLDING: - nextState = new HoldingState(); - break; - case STATE_TYPE.DRAGGING: - nextState = new DraggingState(); - break; - case STATE_TYPE.ANIMATING: - nextState = new AnimatingState(); - break; - case STATE_TYPE.DISABLED: - nextState = new DisabledState(); - break; - } - nextState.onEnter(_this._state); - _this._state = nextState; - return _this._state; - }; - this._state = new IdleState(); - } - var __proto = StateMachine.prototype; - Object.defineProperty(__proto, "state", { - get: function () { - return this._state; - }, - enumerable: false, - configurable: true - }); - __proto.fire = function (eventType, externalCtx) { - var currentState = this._state; - var ctx = __assign(__assign({}, externalCtx), { - transitTo: this.transitTo - }); - switch (eventType) { - case EVENT.HOLD: - currentState.onHold(ctx); - break; - case EVENT.CHANGE: - currentState.onChange(ctx); - break; - case EVENT.RELEASE: - currentState.onRelease(ctx); - break; - case EVENT.ANIMATION_END: - currentState.onAnimationEnd(ctx); - break; - case EVENT.FINISH: - currentState.onFinish(ctx); - break; - } - }; - return StateMachine; - }(); - - /** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @internal - */ - var AxesController = /*#__PURE__*/function () { - /** */ - function AxesController() { - var _this = this; - this._onAxesHold = function () { - _this._dragged = false; - }; - this._onAxesChange = function () { - var _a; - _this._dragged = !!((_a = _this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()); - }; - this._preventClickWhenDragged = function (e) { - if (_this._dragged) { - e.preventDefault(); - e.stopPropagation(); - } - _this._dragged = false; - }; - this._resetInternalValues(); - this._stateMachine = new StateMachine(); - } - var __proto = AxesController.prototype; - Object.defineProperty(__proto, "axes", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스 - * @type {Axes | null} - * @see https://naver.github.io/egjs-axes/docs/api/Axes - * @readonly - */ - get: function () { - return this._axes; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panInput", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스 - * @type {PanInput | null} - * @see https://naver.github.io/egjs-axes/docs/api/PanInput - * @readonly - */ - get: function () { - return this._panInput; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "stateMachine", { - /** - * @internal - */ - get: function () { - return this._stateMachine; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "state", { - /** - * A activated {@link State} that shows the current status of the user input or the animation - * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다 - * @type {State} - */ - get: function () { - return this._stateMachine.state; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animatingContext", { - /** - * A context of the current animation playing - * @ko 현재 재생중인 애니메이션 정보 - * @type {object} - * @property {number} start A start position of the animation애니메이션 시작 지점 - * @property {number} end A end position of the animation애니메이션 끝 지점 - * @property {number} offset camera offset카메라 오프셋 - * @readonly - */ - get: function () { - return this._animatingContext; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current control parameters of the Axes instance - * @ko 활성화된 현재 Axes 패러미터들 - * @type {ControlParams} - */ - get: function () { - var axes = this._axes; - if (!axes) { - return { - range: { - min: 0, - max: 0 - }, - position: 0, - circular: false - }; - } - var axis = axes.axis[POSITION_KEY]; - return { - range: { - min: axis.range[0], - max: axis.range[1] - }, - circular: axis.circular[0], - position: this.position - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "enabled", { - /** - * A Boolean indicating whether the user input is enabled - * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()) !== null && _b !== void 0 ? _b : false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값 - * @type {number} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.get([POSITION_KEY])[POSITION_KEY]) !== null && _b !== void 0 ? _b : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값 - * @type {number[]} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].range) !== null && _b !== void 0 ? _b : [0, 0]; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * Actual bounce size(px) - * @ko 적용된 bounce 크기(px 단위) - * @type {number[]} - * @readonly - */ - get: function () { - var _a; - return (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].bounce; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize AxesController - * @ko AxesController를 초기화합니다 - * @param {Flicking} flicking An instance of Flicking - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - var _a; - var _this = this; - this._flicking = flicking; - this._axes = new Axes((_a = {}, _a[POSITION_KEY] = { - range: [0, 0], - circular: false, - bounce: [0, 0] - }, _a), { - deceleration: flicking.deceleration, - interruptable: flicking.interruptable, - nested: flicking.nested, - easing: flicking.easing - }); - this._panInput = new Axes.PanInput(flicking.viewport.element, { - inputType: flicking.inputType, - threshold: 1, - iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold, - preventDefaultOnDrag: flicking.preventDefaultOnDrag, - scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1], - releaseOnScroll: true - }); - var axes = this._axes; - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], this._panInput); - var _loop_1 = function (key) { - var eventType = EVENT[key]; - axes.on(eventType, function (e) { - _this._stateMachine.fire(eventType, { - flicking: flicking, - axesEvent: e - }); - }); - }; - for (var key in EVENT) { - _loop_1(key); - } - return this; - }; - /** - * Destroy AxesController and return to initial state - * @ko AxesController를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - var _a; - if (this._axes) { - this.removePreventClickHandler(); - this._axes.destroy(); - } - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.destroy(); - this._resetInternalValues(); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @chainable - * @return {this} - */ - __proto.updateAnimation = function (position, duration) { - var _a; - var _b; - this._animatingContext = __assign(__assign({}, this._animatingContext), { - end: position - }); - (_b = this._axes) === null || _b === void 0 ? void 0 : _b.updateAnimation({ - destPos: (_a = {}, _a[POSITION_KEY] = position, _a), - duration: duration - }); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var _a; - (_a = this._axes) === null || _a === void 0 ? void 0 : _a.stopAnimation(); - return this; - }; - /** - * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before - * {@link AxesController#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.update = function (controlParams) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var axes = this._axes; - var axis = axes.axis[POSITION_KEY]; - axis.circular = [controlParams.circular, controlParams.circular]; - axis.range = [controlParams.range.min, controlParams.range.max]; - axis.bounce = parseBounce(flicking.bounce, camera.size); - axes.axisManager.set((_a = {}, _a[POSITION_KEY] = controlParams.position, _a)); - return this; - }; - /** - * Attach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다 - * @return {this} - */ - __proto.addPreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.on(EVENT.HOLD, this._onAxesHold); - axes.on(EVENT.CHANGE, this._onAxesChange); - cameraEl.addEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Detach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다 - * @return {this} - */ - __proto.removePreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.off(EVENT.HOLD, this._onAxesHold); - axes.off(EVENT.CHANGE, this._onAxesChange); - cameraEl.removeEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다. - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.animateTo = function (position, duration, axesEvent) { - var _this = this; - var _a; - var axes = this._axes; - var state = this._stateMachine.state; - if (!axes) { - return Promise.reject(new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING)); - } - var startPos = axes.get([POSITION_KEY])[POSITION_KEY]; - if (startPos === position) { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.lookAt(position); - if (state.targetPanel) { - flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (_a = axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) !== null && _a !== void 0 ? _a : false); - } - return Promise.resolve(); - } - this._animatingContext = { - start: startPos, - end: position, - offset: 0 - }; - var animate = function () { - var _a, _b; - var resetContext = function () { - _this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - }; - axes.once(EVENT.FINISH, resetContext); - if (axesEvent) { - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = position, _a), duration); - } else { - axes.setTo((_b = {}, _b[POSITION_KEY] = position, _b), duration); - } - }; - return new Promise(function (resolve, reject) { - var animationFinishHandler = function () { - axes.off(EVENT.HOLD, interruptionHandler); - resolve(); - }; - var interruptionHandler = function () { - axes.off(EVENT.FINISH, animationFinishHandler); - reject(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED)); - }; - axes.once(EVENT.FINISH, animationFinishHandler); - axes.once(EVENT.HOLD, interruptionHandler); - animate(); - }); - }; - __proto.updateDirection = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var panInput = this._panInput; - axes.disconnect(panInput); - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput); - panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1]; - }; - __proto._resetInternalValues = function () { - this._flicking = null; - this._axes = null; - this._panInput = null; - this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - this._dragged = false; - }; - return AxesController; - }(); - - /** - * A component that manages inputs and animation of Flicking - * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트 - */ - var Control$1 = /*#__PURE__*/function () { - /** */ - function Control() { - this._flicking = null; - this._controller = new AxesController(); - this._activePanel = null; - } - var __proto = Control.prototype; - Object.defineProperty(__proto, "controller", { - /** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @type {AxesController} - * @readonly - */ - get: function () { - return this._controller; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activeIndex", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : -1; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePanel", { - /** - * An active panel - * @ko 현재 선택된 패널 - * @type {Panel | null} - * @readonly - */ - get: function () { - return this._activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.holding; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Control - * @ko Control을 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._controller.init(flicking); - return this; - }; - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._controller.destroy(); - this._flicking = null; - this._activePanel = null; - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - this._controller.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - this._controller.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - this._controller.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우 - * @return {this} - */ - __proto.updateAnimation = function (panel, duration, direction) { - var state = this._controller.state; - var position = this._getPosition(panel, direction !== null && direction !== void 0 ? direction : DIRECTION.NONE); - state.targetPanel = panel; - this._controller.updateAnimation(position, duration); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var state = this._controller.state; - state.targetPanel = null; - this._controller.stopAnimation(); - return this; - }; - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - camera.lookAt(camera.clampToReachablePosition(activePanel.position)); - } - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._controller.update(camera.controlParams); - return this; - }; - /** - * Reset {@link Control#activePanel activePanel} to `null` - * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다 - * @chainable - * @return {this} - */ - __proto.resetActive = function () { - this._activePanel = null; - return this; - }; - /** - * Move {@link Camera} to the given panel - * @ko {@link Camera}를 해당 패널 위로 이동합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {object} options An options object옵션 오브젝트 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveToPanel = function (panel, _a) { - var duration = _a.duration, - _b = _a.direction, - direction = _b === void 0 ? DIRECTION.NONE : _b, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var position; - return __generator(this, function (_c) { - position = this._getPosition(panel, direction); - this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction); - return [2 /*return*/, this._animateToPosition({ - position: position, - duration: duration, - newActivePanel: panel, - axesEvent: axesEvent - })]; - }); - }); - }; - /** - * @internal - */ - __proto.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - var _a; - var flicking = getFlickingAttached(this._flicking); - this._activePanel = newActivePanel; - this._nextPanel = null; - flicking.camera.updateAdaptiveHeight(); - if (newActivePanel !== prevActivePanel) { - flicking.trigger(new Component.ComponentEvent(EVENTS.CHANGED, { - index: newActivePanel.index, - panel: newActivePanel, - prevIndex: (_a = prevActivePanel === null || prevActivePanel === void 0 ? void 0 : prevActivePanel.index) !== null && _a !== void 0 ? _a : -1, - prevPanel: prevActivePanel, - isTrusted: isTrusted, - direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE - })); - } else { - flicking.trigger(new Component.ComponentEvent(EVENTS.RESTORED, { - isTrusted: isTrusted - })); - } - }; - /** - * @internal - */ - __proto.copy = function (control) { - this._flicking = control._flicking; - this._activePanel = control._activePanel; - this._controller = control._controller; - }; - __proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE; - var camera = flicking.camera; - var activePanel = this._activePanel; - var event = new Component.ComponentEvent(triggeringEvent, { - index: panel.index, - panel: panel, - isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false, - direction: direction !== null && direction !== void 0 ? direction : getDirection((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position) - }); - this._nextPanel = panel; - flicking.trigger(event); - if (event.isCanceled()) { - throw new FlickingError(MESSAGE.STOP_CALLED_BY_USER, CODE.STOP_CALLED_BY_USER); - } - }; - __proto._animateToPosition = function (_a) { - var position = _a.position, - duration = _a.duration, - newActivePanel = _a.newActivePanel, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var flicking, animate, state; - var _this = this; - return __generator(this, function (_b) { - flicking = getFlickingAttached(this._flicking); - animate = function () { - return _this._controller.animateTo(position, duration, axesEvent); - }; - state = this._controller.state; - state.targetPanel = newActivePanel; - if (duration <= 0) { - return [2 /*return*/, animate()]; - } else { - return [2 /*return*/, animate().then(function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 /*yield*/, flicking.renderer.render()]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }).catch(function (err) { - if (axesEvent && err instanceof FlickingError && err.code === CODE.ANIMATION_INTERRUPTED) return; - throw err; - })]; - } - }); - }); - }; - - __proto._getPosition = function (panel, direction) { - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var position = panel.position; - var nearestAnchor = camera.findNearestAnchor(position); - if (panel.removed || !nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(panel.position), CODE.POSITION_NOT_REACHABLE); - } - if (!camera.canReach(panel)) { - // Override position & panel if that panel is not reachable - position = nearestAnchor.position; - panel = nearestAnchor.panel; - } else if (flicking.circularEnabled) { - // Circular mode is enabled, find nearest distance to panel - var camPos_1 = this._controller.position; // Actual position of the Axes - var camRangeDiff = camera.rangeDiff; - var possiblePositions = [position, position + camRangeDiff, position - camRangeDiff].filter(function (pos) { - if (direction === DIRECTION.NONE) return true; - return direction === DIRECTION.PREV ? pos <= camPos_1 : pos >= camPos_1; - }); - position = possiblePositions.reduce(function (nearestPosition, pos) { - if (Math.abs(camPos_1 - pos) < Math.abs(camPos_1 - nearestPosition)) { - return pos; - } else { - return nearestPosition; - } - }, Infinity); - } - return position; - }; - return Control; - }(); - - /** - * A data component that has actual position where the camera should be stopped at - * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트 - */ - var AnchorPoint = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 객체 - * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스 - * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표 - * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel} - */ - function AnchorPoint(_a) { - var index = _a.index, - position = _a.position, - panel = _a.panel; - this._index = index; - this._pos = position; - this._panel = panel; - } - var __proto = AnchorPoint.prototype; - Object.defineProperty(__proto, "index", { - /** - * Index of AnchorPoint - * @ko AnchorPoint의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of AnchorPoint - * @ko AnchorPoint의 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._pos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panel", { - /** - * A {@link Panel} instance AnchorPoint is referencing to - * @ko AnchorPoint가 참조하고 있는 {@link Panel} - * @type {Panel} - * @readonly - */ - get: function () { - return this._panel; - }, - enumerable: false, - configurable: true - }); - return AnchorPoint; - }(); - - /** - * A {@link Control} that uses a release momentum to choose destination panel - * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control} - */ - var SnapControl = /*#__PURE__*/function (_super) { - __extends(SnapControl, _super); - /** */ - function SnapControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? Infinity : _b; - var _this = _super.call(this) || this; - _this._count = count; - return _this; - } - var __proto = SnapControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels can go after release - * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수 - * @type {number} - * @default Infinity - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activeAnchor = camera.findActiveAnchor(); - var anchorAtCamera = camera.findNearestAnchor(camera.position); - var state = this._controller.state; - if (!activeAnchor || !anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor); - var posDelta = flicking.animating ? state.delta : position - camera.position; - var absPosDelta = Math.abs(posDelta); - var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta; - var targetAnchor; - if (snapDelta >= snapThreshold && snapDelta > 0) { - // Move to anchor at position - targetAnchor = this._findSnappedAnchor(position, anchorAtCamera); - } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) { - // Move to the adjacent panel - targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera); - } else { - // Fallback to nearest panel from current camera - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent); - return this._animateToPosition({ - position: camera.clampToReachablePosition(targetAnchor.position), - duration: duration, - newActivePanel: targetAnchor.panel, - axesEvent: axesEvent - }); - }; - __proto._findSnappedAnchor = function (position, anchorAtCamera) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var count = this._count; - var currentPos = camera.position; - var clampedPosition = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtCamera || !anchorAtPosition) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE); - } - if (!isFinite(count)) { - return anchorAtPosition; - } - var panelCount = flicking.panelCount; - var anchors = camera.anchorPoints; - var loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff); - if (position > currentPos && anchorAtPosition.index < anchorAtCamera.index || anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount += 1; - } else if (position < currentPos && anchorAtPosition.index > anchorAtCamera.index || anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount -= 1; - } - var circularIndexOffset = loopCount * panelCount; - var anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset; - if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) { - var anchor = anchors[anchorAtPosition.index]; - return new AnchorPoint({ - index: anchor.index, - position: anchor.position + loopCount * camera.rangeDiff, - panel: anchor.panel - }); - } - if (flicking.circularEnabled) { - var targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)]; - var loop = Math.floor(count / panelCount); - if (position > currentPos && targetAnchor.index < anchorAtCamera.index) { - loop += 1; - } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) { - loop -= 1; - } - return new AnchorPoint({ - index: targetAnchor.index, - position: targetAnchor.position + loop * camera.rangeDiff, - panel: targetAnchor.panel - }); - } else { - return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)]; - } - }; - __proto._findAdjacentAnchor = function (position, posDelta, anchorAtCamera) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - if (camera.circularEnabled) { - var anchorIncludePosition = camera.findAnchorIncludePosition(position); - if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) { - return anchorIncludePosition; - } - } - var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera; - return adjacentAnchor; - }; - __proto._calcSnapThreshold = function (threshold, position, activeAnchor) { - var isNextDirection = position > activeAnchor.position; - var panel = activeAnchor.panel; - var panelSize = panel.size; - var alignPos = panel.alignPosition; - // Minimum distance needed to decide prev/next panel as nearest - /* - * | Prev | Next | - * |<------>|<------------>| - * [ |<-Anchor ] - */ - return Math.max(threshold, isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev); - }; - return SnapControl; - }(Control$1); - - /** - * A {@link Control} that can be scrolled freely without alignment - * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control} - */ - var FreeControl = /*#__PURE__*/function (_super) { - __extends(FreeControl, _super); - /** */ - function FreeControl(_a) { - var _b = (_a === void 0 ? {} : _a).stopAtEdge, - stopAtEdge = _b === void 0 ? true : _b; - var _this = _super.call(this) || this; - _this._stopAtEdge = stopAtEdge; - return _this; - } - var __proto = FreeControl.prototype; - Object.defineProperty(__proto, "stopAtEdge", { - /** - * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area - * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._stopAtEdge; - }, - set: function (val) { - this._stopAtEdge = val; - }, - enumerable: false, - configurable: true - }); - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - var panelRange = activePanel.range; - var newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - camera.lookAt(camera.clampToReachablePosition(newPosition)); - } - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var targetPos = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(targetPos); - if (!anchorAtPosition) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var targetPanel = anchorAtPosition.panel; - // Trigger only change event - if (targetPanel !== this._activePanel) { - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - } - return this._animateToPosition({ - position: this._stopAtEdge ? targetPos : position, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - return FreeControl; - }(Control$1); - - /** - * A {@link Control} that allow you to select the maximum number of panels to move at a time - * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control} - */ - var StrictControl = /*#__PURE__*/function (_super) { - __extends(StrictControl, _super); - /** */ - function StrictControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? 1 : _b; - var _this = _super.call(this) || this; - _this.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - _super.prototype.setActive.call(_this, newActivePanel, prevActivePanel, isTrusted); - _this.updateInput(); - }; - _this._count = count; - _this._resetIndexRange(); - return _this; - } - var __proto = StrictControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels that can be moved at a time - * @ko 최대로 움직일 수 있는 패널의 개수 - * @type {number} - * @default 1 - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - _super.prototype.destroy.call(this); - this._resetIndexRange(); - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var renderer = flicking.renderer; - var controller = this._controller; - var controlParams = camera.controlParams; - var count = this._count; - var activePanel = controller.state.animating ? (_a = camera.findNearestAnchor(camera.position)) === null || _a === void 0 ? void 0 : _a.panel : this._activePanel; - if (!activePanel) { - controller.update(controlParams); - this._resetIndexRange(); - return this; - } - var cameraRange = controlParams.range; - var currentPos = activePanel.position; - var currentIndex = activePanel.index; - var panelCount = renderer.panelCount; - var prevPanelIndex = currentIndex - count; - var nextPanelIndex = currentIndex + count; - if (prevPanelIndex < 0) { - prevPanelIndex = flicking.circularEnabled ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount) : clamp(prevPanelIndex, 0, panelCount - 1); - } - if (nextPanelIndex >= panelCount) { - nextPanelIndex = flicking.circularEnabled ? nextPanelIndex % panelCount : clamp(nextPanelIndex, 0, panelCount - 1); - } - var prevPanel = renderer.panels[prevPanelIndex]; - var nextPanel = renderer.panels[nextPanelIndex]; - var prevPos = Math.max(prevPanel.position, cameraRange.min); - var nextPos = Math.min(nextPanel.position, cameraRange.max); - if (prevPos > currentPos) { - prevPos -= camera.rangeDiff; - } - if (nextPos < currentPos) { - nextPos += camera.rangeDiff; - } - controlParams.range = { - min: prevPos, - max: nextPos - }; - if (controlParams.circular) { - if (controlParams.position < prevPos) { - controlParams.position += camera.rangeDiff; - } - if (controlParams.position > nextPos) { - controlParams.position -= camera.rangeDiff; - } - } - controlParams.circular = false; - controller.update(controlParams); - this._indexRange = { - min: prevPanel.index, - max: nextPanel.index - }; - return this; - }; - __proto.moveToPanel = function (panel, options) { - return __awaiter(this, void 0, void 0, function () { - var flicking, camera, controller; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - camera = flicking.camera; - controller = this._controller; - controller.update(camera.controlParams); - return [2 /*return*/, _super.prototype.moveToPanel.call(this, panel, options)]; - }); - }); - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var currentPanel = (_a = this._nextPanel) !== null && _a !== void 0 ? _a : this._activePanel; - var axesRange = this._controller.range; - var indexRange = this._indexRange; - var cameraRange = camera.range; - var state = this._controller.state; - var clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtPosition || !currentPanel) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var prevPos = currentPanel.position; - var posDelta = flicking.animating ? state.delta : position - camera.position; - var isOverThreshold = Math.abs(posDelta) >= flicking.threshold; - var adjacentAnchor = position > prevPos ? camera.getNextAnchor(anchorAtPosition) : camera.getPrevAnchor(anchorAtPosition); - var targetPos; - var targetPanel; - var anchors = camera.anchorPoints; - var firstAnchor = anchors[0]; - var lastAnchor = anchors[anchors.length - 1]; - var shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max); - var shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max); - var isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max) : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max); - if (shouldBounceToFirst || shouldBounceToLast) { - // In bounce area - var targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor; - targetPanel = targetAnchor.panel; - targetPos = targetAnchor.position; - } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) { - // Move to anchor at position - targetPanel = anchorAtPosition.panel; - targetPos = anchorAtPosition.position; - } else if (isOverThreshold && isAdjacent) { - // Move to adjacent anchor - targetPanel = adjacentAnchor.panel; - targetPos = adjacentAnchor.position; - } else { - // Fallback to nearest panel from current camera - var anchorAtCamera = camera.findNearestAnchor(camera.position); - if (!anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - return this._animateToPosition({ - position: targetPos, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - __proto._resetIndexRange = function () { - this._indexRange = { - min: 0, - max: 0 - }; - }; - return StrictControl; - }(Control$1); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Control = { - __proto__: null, - Control: Control$1, - SnapControl: SnapControl, - FreeControl: FreeControl, - StrictControl: StrictControl, - AxesController: AxesController, - State: State, - IdleState: IdleState, - HoldingState: HoldingState, - DraggingState: DraggingState, - AnimatingState: AnimatingState, - DisabledState: DisabledState, - StateMachine: StateMachine - }; - - /** - * A mode of camera - */ - var CameraMode = /*#__PURE__*/function () { - /** */ - function CameraMode(flicking) { - this._flicking = flicking; - } - var __proto = CameraMode.prototype; - __proto.getAnchors = function () { - var panels = this._flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findAnchorIncludePosition = function (position) { - var anchors = this._flicking.camera.anchorPoints; - var anchorsIncludingPosition = anchors.filter(function (anchor) { - return anchor.panel.includePosition(position, true); - }); - return anchorsIncludingPosition.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - }; - __proto.findNearestAnchor = function (position) { - var anchors = this._flicking.camera.anchorPoints; - if (anchors.length <= 0) return null; - var prevDist = Infinity; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.abs(anchor.position - position); - if (dist > prevDist) { - // Return previous anchor - return anchors[anchorIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return anchors[anchors.length - 1]; - }; - __proto.clampToReachablePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - return clamp(position, range.min, range.max); - }; - __proto.getCircularOffset = function () { - return 0; - }; - __proto.canReach = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - if (panel.removed) return false; - var panelPos = panel.position; - return panelPos >= range.min && panelPos <= range.max; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var visibleRange = camera.visibleRange; - // Should not include margin, as we don't declare what the margin is visible as what the panel is visible. - return panel.isVisibleOnRange(visibleRange.min, visibleRange.max); - }; - return CameraMode; - }(); - - var LinearCameraMode = /*#__PURE__*/function (_super) { - __extends(LinearCameraMode, _super); - function LinearCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = LinearCameraMode.prototype; - __proto.checkAvailability = function () { - // It's always available - return true; - }; - __proto.getRange = function () { - var _a, _b; - var renderer = this._flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - return { - min: (_a = firstPanel === null || firstPanel === void 0 ? void 0 : firstPanel.position) !== null && _a !== void 0 ? _a : 0, - max: (_b = lastPanel === null || lastPanel === void 0 ? void 0 : lastPanel.position) !== null && _b !== void 0 ? _b : 0 - }; - }; - return LinearCameraMode; - }(CameraMode); - - /** - * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop - * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드 - */ - var CircularCameraMode = /*#__PURE__*/function (_super) { - __extends(CircularCameraMode, _super); - function CircularCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = CircularCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var panels = renderer.panels; - if (panels.length <= 0) { - return false; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - var visibleSize = flicking.camera.size; - var panelSizeSum = lastPanelNext - firstPanelPrev; - var canSetCircularMode = panels.every(function (panel) { - return panelSizeSum - panel.size >= visibleSize; - }); - return canSetCircularMode; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return { - min: 0, - max: 0 - }; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - return { - min: firstPanelPrev, - max: lastPanelNext - }; - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findNearestAnchor = function (position) { - var camera = this._flicking.camera; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - var camRange = camera.range; - var minDist = Infinity; - var minDistIndex = -1; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.min(Math.abs(anchor.position - position), Math.abs(anchor.position - camRange.min + camRange.max - position), Math.abs(position - camRange.min + camRange.max - anchor.position)); - if (dist < minDist) { - minDist = dist; - minDistIndex = anchorIdx; - } - } - // Return last anchor - return anchors[minDistIndex]; - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - var rangeDiff = camera.rangeDiff; - var anchorCount = anchors.length; - var positionInRange = circulatePosition(position, range.min, range.max); - var anchorInRange = _super.prototype.findAnchorIncludePosition.call(this, positionInRange); - if (anchorCount > 0 && (position === range.min || position === range.max)) { - var possibleAnchors = [anchorInRange, new AnchorPoint({ - index: 0, - position: anchors[0].position + rangeDiff, - panel: anchors[0].panel - }), new AnchorPoint({ - index: anchorCount - 1, - position: anchors[anchorCount - 1].position - rangeDiff, - panel: anchors[anchorCount - 1].panel - })].filter(function (anchor) { - return !!anchor; - }); - anchorInRange = possibleAnchors.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - } - if (!anchorInRange) return null; - if (position < range.min) { - var loopCount = -Math.floor((range.min - position) / rangeDiff) - 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } else if (position > range.max) { - var loopCount = Math.floor((position - range.max) / rangeDiff) + 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } - return anchorInRange; - }; - __proto.getCircularOffset = function () { - var flicking = this._flicking; - var camera = flicking.camera; - if (!camera.circularEnabled) return 0; - var toggled = flicking.panels.filter(function (panel) { - return panel.toggled; - }); - var toggledPrev = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.NEXT; - }); - return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext); - }; - __proto.clampToReachablePosition = function (position) { - // Basically all position is reachable for circular camera - return position; - }; - __proto.canReach = function (panel) { - if (panel.removed) return false; - // Always reachable on circular mode - return true; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - var rangeDiff = camera.rangeDiff; - var visibleRange = camera.visibleRange; - var visibleInCurrentRange = _super.prototype.canSee.call(this, panel); - // Check looped visible area for circular case - if (visibleRange.min < range.min) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff); - } else if (visibleRange.max > range.max) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff); - } - return visibleInCurrentRange; - }; - __proto._calcPanelAreaSum = function (panels) { - return panels.reduce(function (sum, panel) { - return sum + panel.sizeIncludingMargin; - }, 0); - }; - return CircularCameraMode; - }(CameraMode); - - var BoundCameraMode = /*#__PURE__*/function (_super) { - __extends(BoundCameraMode, _super); - function BoundCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = BoundCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return false; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - return isBiggerThanViewport; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var alignPos = flicking.camera.alignPosition; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return { - min: 0, - max: 0 - }; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - var firstPos = firstPanelPrev + alignPos; - var lastPos = lastPanelNext - viewportSize + alignPos; - if (isBiggerThanViewport) { - return { - min: firstPos, - max: lastPos - }; - } else { - var align = flicking.camera.align; - var alignVal = typeof align === "object" ? align.camera : align; - var pos = firstPos + parseAlign$1(alignVal, lastPos - firstPos); - return { - min: pos, - max: pos - }; - } - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var camera = flicking.camera; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return []; - } - var range = flicking.camera.range; - var reachablePanels = panels.filter(function (panel) { - return camera.canReach(panel); - }); - if (reachablePanels.length > 0) { - var shouldPrependBoundAnchor = reachablePanels[0].position !== range.min; - var shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max; - var indexOffset_1 = shouldPrependBoundAnchor ? 1 : 0; - var newAnchors = reachablePanels.map(function (panel, idx) { - return new AnchorPoint({ - index: idx + indexOffset_1, - position: panel.position, - panel: panel - }); - }); - if (shouldPrependBoundAnchor) { - newAnchors.splice(0, 0, new AnchorPoint({ - index: 0, - position: range.min, - panel: panels[reachablePanels[0].index - 1] - })); - } - if (shouldAppendBoundAnchor) { - newAnchors.push(new AnchorPoint({ - index: newAnchors.length, - position: range.max, - panel: panels[reachablePanels[reachablePanels.length - 1].index + 1] - })); - } - return newAnchors; - } else if (range.min !== range.max) { - // There're more than 2 panels - var nearestPanelAtMin = this._findNearestPanel(range.min, panels); - var panelAtMin = nearestPanelAtMin.index === panels.length - 1 ? nearestPanelAtMin.prev() : nearestPanelAtMin; - var panelAtMax = panelAtMin.next(); - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: panelAtMin - }), new AnchorPoint({ - index: 1, - position: range.max, - panel: panelAtMax - })]; - } else { - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: this._findNearestPanel(range.min, panels) - })]; - } - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - if (position <= range.min) { - return anchors[0]; - } else if (position >= range.max) { - return anchors[anchors.length - 1]; - } else { - return _super.prototype.findAnchorIncludePosition.call(this, position); - } - }; - __proto._findNearestPanel = function (pos, panels) { - var prevDist = Infinity; - for (var panelIdx = 0; panelIdx < panels.length; panelIdx++) { - var panel = panels[panelIdx]; - var dist = Math.abs(panel.position - pos); - if (dist > prevDist) { - // Return previous anchor - return panels[panelIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return panels[panels.length - 1]; - }; - return BoundCameraMode; - }(CameraMode); - - /** - * A component that manages actual movement inside the viewport - * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트 - */ - var Camera$1 = /*#__PURE__*/function () { - /** */ - function Camera(flicking, _a) { - var _this = this; - var _b = (_a === void 0 ? {} : _a).align, - align = _b === void 0 ? ALIGN.CENTER : _b; - this._checkTranslateSupport = function () { - var e_1, _a; - var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"]; - var supportedStyle = document.documentElement.style; - var transformName = ""; - try { - for (var transforms_1 = __values(transforms), transforms_1_1 = transforms_1.next(); !transforms_1_1.done; transforms_1_1 = transforms_1.next()) { - var prefixedTransform = transforms_1_1.value; - if (prefixedTransform in supportedStyle) { - transformName = prefixedTransform; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (transforms_1_1 && !transforms_1_1.done && (_a = transforms_1.return)) _a.call(transforms_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (!transformName) { - throw new FlickingError(MESSAGE.TRANSFORM_NOT_SUPPORTED, CODE.TRANSFORM_NOT_SUPPORTED); - } - _this._transform = transformName; - }; - this._flicking = flicking; - this._resetInternalValues(); - // Options - this._align = align; - } - var __proto = Camera.prototype; - Object.defineProperty(__proto, "element", { - // Internal states getter - /** - * The camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`) - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "children", { - /** - * An array of the child elements of the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열 - * @type {HTMLElement[]} - * @readonly - */ - get: function () { - return toArray(this._el.children); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position of the camera - * @ko Camera의 현재 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._position; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at - * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option - * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다. - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._offset - this._circularOffset; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "mode", { - /** - * A current camera mode - * @type {CameraMode} - * @readonly - */ - get: function () { - return this._mode; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * A range that Camera's {@link Camera#position position} can reach - * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} max A maximum position최대 위치 - * @readonly - */ - get: function () { - return this._range; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rangeDiff", { - /** - * A difference between Camera's minimum and maximum position that can reach - * @ko Camera가 도달 가능한 최소/최대 좌표의 차이 - * @type {number} - * @readonly - */ - get: function () { - return this._range.max - this._range.min; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * An array of visible panels from the current position - * @ko 현재 보이는 패널들의 배열 - * @type {Panel[]} - * @readonly - */ - get: function () { - return this._visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRange", { - /** - * A range of the visible area from the current position - * @ko 현재 위치에서 보이는 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} min A maximum position최대 위치 - * @readonly - */ - get: function () { - return { - min: this._position - this._alignPos, - max: this._position - this._alignPos + this.size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "anchorPoints", { - /** - * An array of {@link AnchorPoint}s that Camera can be stopped at - * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록 - * @type {AnchorPoint[]} - * @readonly - */ - get: function () { - return this._anchors; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current parameters of the Camera for updating {@link AxesController} - * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들 - * @type {ControlParams} - * @readonly - */ - get: function () { - return { - range: this._range, - position: this._position, - circular: this._circularEnabled - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "atEdge", { - /** - * A Boolean value indicating whether Camera's over the minimum or maximum position reachable - * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다 - * @type {boolean} - * @readonly - */ - get: function () { - return this._position <= this._range.min || this._position >= this._range.max; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Return the size of the viewport - * @ko 뷰포트 크기를 반환합니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return flicking ? flicking.horizontal ? flicking.viewport.width : flicking.viewport.height : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Return the camera's position progress from the first panel to last panel - * Range is from 0 to last panel's index - * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다 - * 범위는 0부터 마지막 패널의 인덱스까지입니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var position = this._position + this._offset; - var nearestAnchor = this.findNearestAnchor(this._position); - if (!flicking || !nearestAnchor) { - return NaN; - } - var nearestPanel = nearestAnchor.panel; - var panelPos = nearestPanel.position + nearestPanel.offset; - var bounceSize = flicking.control.controller.bounce; - var _a = this.range, - prevRange = _a.min, - nextRange = _a.max; - var rangeDiff = this.rangeDiff; - if (position === panelPos) { - return nearestPanel.index; - } - if (position < panelPos) { - var prevPanel = nearestPanel.prev(); - var prevPosition = prevPanel ? prevPanel.position + prevPanel.offset : prevRange - bounceSize[0]; - // Looped - if (prevPosition > panelPos) { - prevPosition -= rangeDiff; - } - return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos); - } else { - var nextPanel = nearestPanel.next(); - var nextPosition = nextPanel ? nextPanel.position + nextPanel.offset : nextRange + bounceSize[1]; - // Looped - if (nextPosition < panelPos) { - nextPosition += rangeDiff; - } - return nearestPanel.index + getProgress(position, panelPos, nextPosition); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelOrder", { - /** - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성 - * @type {string} - * @readonly - */ - get: function () { - return this._panelOrder; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element - * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Camera - * @ko Camera를 초기화합니다 - * @throws {FlickingError} - * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element - * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우 - * @return {this} - */ - __proto.init = function () { - var viewportEl = this._flicking.viewport.element; - checkExistence(viewportEl.firstElementChild, "First element child of the viewport element"); - this._el = viewportEl.firstElementChild; - this._checkTranslateSupport(); - this._updateMode(); - this.updatePanelOrder(); - return this; - }; - /** - * Destroy Camera and return to initial state - * @ko Camera를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalValues(); - return this; - }; - /** - * Move to the given position and apply CSS transform - * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다 - * @param {number} pos A new position움직일 위치 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.lookAt = function (pos) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var prevPos = this._position; - this._position = pos; - var toggled = this._togglePanels(prevPos, pos); - this._refreshVisiblePanels(); - this._checkNeedPanel(); - this._checkReachEnd(prevPos, pos); - if (toggled) { - void flicking.renderer.render().then(function () { - _this.updateOffset(); - }); - } else { - this.applyTransform(); - } - }; - /** - * Return a previous {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint} - */ - __proto.getPrevAnchor = function (anchor) { - if (!this._circularEnabled || anchor.index !== 0) { - return this._anchors[anchor.index - 1] || null; - } else { - var anchors = this._anchors; - var rangeDiff = this.rangeDiff; - var lastAnchor = anchors[anchors.length - 1]; - return new AnchorPoint({ - index: lastAnchor.index, - position: lastAnchor.position - rangeDiff, - panel: lastAnchor.panel - }); - } - }; - /** - * Return a next {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint} - */ - __proto.getNextAnchor = function (anchor) { - var anchors = this._anchors; - if (!this._circularEnabled || anchor.index !== anchors.length - 1) { - return anchors[anchor.index + 1] || null; - } else { - var rangeDiff = this.rangeDiff; - var firstAnchor = anchors[0]; - return new AnchorPoint({ - index: firstAnchor.index, - position: firstAnchor.position + rangeDiff, - panel: firstAnchor.panel - }); - } - }; - /** - * Return the camera's position progress in the panel below - * Value is from 0 to 1 when the camera's inside panel - * Value can be lower than 0 or bigger than 1 when it's in the margin area - * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다 - * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다 - * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다 - */ - __proto.getProgressInPanel = function (panel) { - var panelRange = panel.range; - return (this._position - panelRange.min) / (panelRange.max - panelRange.min); - }; - /** - * Return {@link AnchorPoint} that includes given position - * If there's no {@link AnchorPoint} that includes the given position, return `null` instead - * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다 - * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint} - */ - __proto.findAnchorIncludePosition = function (position) { - return this._mode.findAnchorIncludePosition(position); - }; - /** - * Return {@link AnchorPoint} nearest to given position - * If there're no {@link AnchorPoint}s, return `null` instead - * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다 - * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint} - */ - __proto.findNearestAnchor = function (position) { - return this._mode.findNearestAnchor(position); - }; - /** - * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel} - * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다 - * @return {AnchorPoint | null} - */ - __proto.findActiveAnchor = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!activePanel) return null; - return (_a = find(this._anchors, function (anchor) { - return anchor.panel.index === activePanel.index; - })) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position); - }; - /** - * Clamp the given position between camera's range - * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다 - * @param {number} position A position to clamp범위를 제한할 좌표 - * @return {number} A clamped position범위 제한된 좌표 - */ - __proto.clampToReachablePosition = function (position) { - return this._mode.clampToReachablePosition(position); - }; - /** - * Check whether the given panel is inside of the Camera's range - * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부 - */ - __proto.canReach = function (panel) { - return this._mode.canReach(panel); - }; - /** - * Check whether the given panel element is visible at the current position - * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부 - */ - __proto.canSee = function (panel) { - return this._mode.canSee(panel); - }; - /** - * Update {@link Camera#range range} of Camera - * @ko Camera의 {@link Camera#range range}를 업데이트합니다 - * @method - * @abstract - * @memberof Camera - * @instance - * @name updateRange - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.updateRange = function () { - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - var panels = renderer.panels; - this._updateMode(); - this._range = this._mode.getRange(); - panels.forEach(function (panel) { - return panel.updateCircularToggleDirection(); - }); - return this; - }; - /** - * Update Camera's {@link Camera#alignPosition alignPosition} - * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateAlignPos = function () { - var align = this._align; - var alignVal = typeof align === "object" ? align.camera : align; - this._alignPos = parseAlign$1(alignVal, this.size); - return this; - }; - /** - * Update Camera's {@link Camera#anchorPoints anchorPoints} - * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAnchors = function () { - this._anchors = this._mode.getAnchors(); - return this; - }; - /** - * Update Viewport's height to active panel's height - * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAdaptiveHeight = function () { - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!flicking.horizontal || !flicking.adaptive || !activePanel) return; - flicking.viewport.setSize({ - height: activePanel.height - }); - }; - /** - * Update current offset of the camera - * @ko 현재 카메라의 오프셋을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateOffset = function () { - var flicking = getFlickingAttached(this._flicking); - var position = this._position; - var unRenderedPanels = flicking.panels.filter(function (panel) { - return !panel.rendered; - }); - this._offset = unRenderedPanels.filter(function (panel) { - return panel.position + panel.offset < position; - }).reduce(function (offset, panel) { - return offset + panel.sizeIncludingMargin; - }, 0); - this._circularOffset = this._mode.getCircularOffset(); - this.applyTransform(); - return this; - }; - /** - * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element - * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다 - * @return {this} - */ - __proto.updatePanelOrder = function () { - var flicking = getFlickingAttached(this._flicking); - if (!flicking.horizontal) return this; - var el = this._el; - var direction = getStyle(el).direction; - if (direction !== this._panelOrder) { - this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR; - if (flicking.initialized) { - flicking.control.controller.updateDirection(); - } - } - return this; - }; - /** - * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again - * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다 - * @chainable - * @return {this} - */ - __proto.resetNeedPanelHistory = function () { - this._needPanelTriggered = { - prev: false, - next: false - }; - return this; - }; - /** - * Apply "transform" style with the current position to camera element - * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다. - * @return {this} - */ - __proto.applyTransform = function () { - var el = this._el; - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - if (renderer.rendering || !flicking.initialized) return this; - var actualPosition = this._position - this._alignPos - this._offset + this._circularOffset; - el.style[this._transform] = flicking.horizontal ? "translate(" + (this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition) + "px)" : "translate(0, " + -actualPosition + "px)"; - return this; - }; - __proto._resetInternalValues = function () { - this._position = 0; - this._alignPos = 0; - this._offset = 0; - this._circularOffset = 0; - this._circularEnabled = false; - this._range = { - min: 0, - max: 0 - }; - this._visiblePanels = []; - this._anchors = []; - this._needPanelTriggered = { - prev: false, - next: false - }; - }; - __proto._refreshVisiblePanels = function () { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var newVisiblePanels = panels.filter(function (panel) { - return _this.canSee(panel); - }); - var prevVisiblePanels = this._visiblePanels; - this._visiblePanels = newVisiblePanels; - var added = newVisiblePanels.filter(function (panel) { - return !includes(prevVisiblePanels, panel); - }); - var removed = prevVisiblePanels.filter(function (panel) { - return !includes(newVisiblePanels, panel); - }); - if (added.length > 0 || removed.length > 0) { - void flicking.renderer.render().then(function () { - flicking.trigger(new Component.ComponentEvent(EVENTS.VISIBLE_CHANGE, { - added: added, - removed: removed, - visiblePanels: newVisiblePanels - })); - }); - } - }; - __proto._checkNeedPanel = function () { - var needPanelTriggered = this._needPanelTriggered; - if (needPanelTriggered.prev && needPanelTriggered.next) return; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - if (!needPanelTriggered.prev) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - if (!needPanelTriggered.next) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - return; - } - var cameraPosition = this._position; - var cameraSize = this.size; - var cameraRange = this._range; - var needPanelThreshold = flicking.needPanelThreshold; - var cameraPrev = cameraPosition - this._alignPos; - var cameraNext = cameraPrev + cameraSize; - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - if (!needPanelTriggered.prev) { - var firstPanelPrev = firstPanel.range.min; - if (cameraPrev <= firstPanelPrev + needPanelThreshold || cameraPosition <= cameraRange.min + needPanelThreshold) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - } - if (!needPanelTriggered.next) { - var lastPanelNext = lastPanel.range.max; - if (cameraNext >= lastPanelNext - needPanelThreshold || cameraPosition >= cameraRange.max - needPanelThreshold) { - flicking.trigger(new Component.ComponentEvent(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - } - }; - __proto._checkReachEnd = function (prevPos, newPos) { - var flicking = getFlickingAttached(this._flicking); - var range = this._range; - var wasBetweenRange = prevPos > range.min && prevPos < range.max; - var isBetweenRange = newPos > range.min && newPos < range.max; - if (!wasBetweenRange || isBetweenRange) return; - var direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT; - flicking.trigger(new Component.ComponentEvent(EVENTS.REACH_EDGE, { - direction: direction - })); - }; - __proto._updateMode = function () { - var flicking = getFlickingAttached(this._flicking); - if (flicking.circular) { - var circularMode = new CircularCameraMode(flicking); - var canSetCircularMode = circularMode.checkAvailability(); - if (canSetCircularMode) { - this._mode = circularMode; - } else { - var fallbackMode = flicking.circularFallback; - this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - } - this._circularEnabled = canSetCircularMode; - } else { - this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - this._circularEnabled = false; - } - }; - __proto._togglePanels = function (prevPos, pos) { - if (pos === prevPos) return false; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var toggled = panels.map(function (panel) { - return panel.toggle(prevPos, pos); - }); - return toggled.some(function (isToggled) { - return isToggled; - }); - }; - return Camera; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Camera = { - __proto__: null, - Camera: Camera$1, - LinearCameraMode: LinearCameraMode, - CircularCameraMode: CircularCameraMode, - BoundCameraMode: BoundCameraMode - }; - - /** - * A component that manages {@link Panel} and its elements - * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트 - */ - var Renderer$1 = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {Constants.ALIGN | string | number} [options.align="center"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값 - * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈) - */ - function Renderer(_a) { - var _b = _a.align, - align = _b === void 0 ? ALIGN.CENTER : _b, - strategy = _a.strategy; - this._flicking = null; - this._panels = []; - this._rendering = false; - // Bind options - this._align = align; - this._strategy = strategy; - } - var __proto = Renderer.prototype; - Object.defineProperty(__proto, "panels", { - // Internal states Getter - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendering", { - /** - * A boolean value indicating whether rendering is in progress - * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부 - * @type {boolean} - * @readonly - * @internal - */ - get: function () { - return this._rendering; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._panels.length; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "strategy", { - /** - * @internal - */ - get: function () { - return this._strategy; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A {@link Panel}'s {@link Panel#align align} value that applied to all panels - * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - var panelAlign = parsePanelAlign(val); - this._panels.forEach(function (panel) { - panel.align = panelAlign; - }); - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Renderer - * @ko Renderer를 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._collectPanels(); - return this; - }; - /** - * Destroy Renderer and return to initial state - * @ko Renderer를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._flicking = null; - this._panels = []; - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - */ - __proto.getPanel = function (index) { - return this._panels[index] || null; - }; - __proto.forceRenderAllPanels = function () { - this._panels.forEach(function (panel) { - return panel.markForShow(); - }); - return Promise.resolve(); - }; - /** - * Update all panel sizes - * @ko 모든 패널의 크기를 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updatePanelSize = function () { - var flicking = getFlickingAttached(this._flicking); - var panels = this._panels; - if (panels.length <= 0) return this; - if (flicking.panelsPerView > 0) { - var firstPanel = panels[0]; - firstPanel.resize(); - this._updatePanelSizeByGrid(firstPanel, panels); - } else { - flicking.panels.forEach(function (panel) { - return panel.resize(); - }); - } - return this; - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {Array} items An array of items to insert추가할 아이템들의 배열 - * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열 - * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - */ - __proto.batchInsert = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsInserted = this.batchInsertDefer.apply(this, __spread(items)); - if (allPanelsInserted.length <= 0) return []; - this.updateAfterPanelChange(allPanelsInserted, []); - return allPanelsInserted; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchInsertDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var prevFirstPanel = panels[0]; - var align = parsePanelAlign(this._align); - var allPanelsInserted = items.reduce(function (addedPanels, item) { - var _a; - var insertingIdx = getMinusCompensatedIndex(item.index, panels.length); - var panelsPushed = panels.slice(insertingIdx); - var panelsInserted = item.elements.map(function (el, idx) { - return _this._createPanel(el, { - index: insertingIdx + idx, - align: align, - flicking: flicking - }); - }); - panels.splice.apply(panels, __spread([insertingIdx, 0], panelsInserted)); - if (item.hasDOMInElements) { - // Insert the actual elements as camera element's children - _this._insertPanelElements(panelsInserted, (_a = panelsPushed[0]) !== null && _a !== void 0 ? _a : null); - } - // Resize the newly added panels - if (flicking.panelsPerView > 0) { - var firstPanel = prevFirstPanel || panelsInserted[0].resize(); - _this._updatePanelSizeByGrid(firstPanel, panelsInserted); - } else { - panelsInserted.forEach(function (panel) { - return panel.resize(); - }); - } - // Update panel indexes & positions - panelsPushed.forEach(function (panel) { - panel.increaseIndex(panelsInserted.length); - panel.updatePosition(); - }); - return __spread(addedPanels, panelsInserted); - }, []); - return allPanelsInserted; - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {Array} items An array of items to remove제거할 아이템들의 배열 - * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스 - * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다 - * @return An array of removed panels제거된 패널들의 배열 - */ - __proto.batchRemove = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsRemoved = this.batchRemoveDefer.apply(this, __spread(items)); - if (allPanelsRemoved.length <= 0) return []; - this.updateAfterPanelChange([], allPanelsRemoved); - return allPanelsRemoved; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchRemoveDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var control = flicking.control; - var activePanel = control.activePanel; - var allPanelsRemoved = items.reduce(function (removed, item) { - var index = item.index, - deleteCount = item.deleteCount; - var removingIdx = getMinusCompensatedIndex(index, panels.length); - var panelsPulled = panels.slice(removingIdx + deleteCount); - var panelsRemoved = panels.splice(removingIdx, deleteCount); - if (panelsRemoved.length <= 0) return []; - // Update panel indexes & positions - panelsPulled.forEach(function (panel) { - panel.decreaseIndex(panelsRemoved.length); - panel.updatePosition(); - }); - if (item.hasDOMInElements) { - _this._removePanelElements(panelsRemoved); - } - // Remove panel elements - panelsRemoved.forEach(function (panel) { - return panel.destroy(); - }); - if (includes(panelsRemoved, activePanel)) { - control.resetActive(); - } - return __spread(removed, panelsRemoved); - }, []); - return allPanelsRemoved; - }; - /** - * @internal - */ - __proto.updateAfterPanelChange = function (panelsAdded, panelsRemoved) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - var panels = this._panels; - var activePanel = control.activePanel; - // Update camera & control - this._updateCameraAndControl(); - void this.render(); - if (!flicking.animating) { - if (!activePanel || activePanel.removed) { - if (panels.length <= 0) { - // All panels removed - camera.lookAt(0); - } else { - var targetIndex = (_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.index) !== null && _a !== void 0 ? _a : 0; - if (targetIndex > panels.length - 1) { - targetIndex = panels.length - 1; - } - void control.moveToPanel(panels[targetIndex], { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } else { - void control.moveToPanel(activePanel, { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } - flicking.camera.updateOffset(); - if (panelsAdded.length > 0 || panelsRemoved.length > 0) { - flicking.trigger(new Component.ComponentEvent(EVENTS.PANEL_CHANGE, { - added: panelsAdded, - removed: panelsRemoved - })); - this.checkPanelContentsReady(__spread(panelsAdded, panelsRemoved)); - } - }; - /** - * @internal - */ - __proto.checkPanelContentsReady = function (checkingPanels) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var resizeOnContentsReady = flicking.resizeOnContentsReady; - var panels = this._panels; - if (!resizeOnContentsReady || flicking.virtualEnabled) return; - var hasContents = function (panel) { - return panel.element && !!panel.element.querySelector("img, video"); - }; - checkingPanels = checkingPanels.filter(function (panel) { - return hasContents(panel); - }); - if (checkingPanels.length <= 0) return; - var contentsReadyChecker = new ImReady(); - checkingPanels.forEach(function (panel) { - panel.loading = true; - }); - contentsReadyChecker.on("readyElement", function (e) { - if (!_this._flicking) { - // Renderer's destroy() is called before - contentsReadyChecker.destroy(); - return; - } - var panel = checkingPanels[e.index]; - var camera = flicking.camera; - var control = flicking.control; - var prevProgressInPanel = control.activePanel ? camera.getProgressInPanel(control.activePanel) : 0; - panel.loading = false; - panel.resize(); - panels.slice(panel.index + 1).forEach(function (panelBehind) { - return panelBehind.updatePosition(); - }); - if (!flicking.initialized) return; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - }); - contentsReadyChecker.on("preReady", function (e) { - if (_this._flicking) { - void _this.render(); - } - if (e.readyCount === e.totalCount) { - contentsReadyChecker.destroy(); - } - }); - contentsReadyChecker.on("ready", function () { - if (_this._flicking) { - void _this.render(); - } - contentsReadyChecker.destroy(); - }); - contentsReadyChecker.check(checkingPanels.map(function (panel) { - return panel.element; - })); - }; - __proto._updateCameraAndControl = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - camera.resetNeedPanelHistory(); - control.updateInput(); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - }; - __proto._updatePanelSizeByGrid = function (referencePanel, panels) { - var flicking = getFlickingAttached(this._flicking); - var panelsPerView = flicking.panelsPerView; - if (panelsPerView <= 0) { - throw new FlickingError(MESSAGE.WRONG_OPTION("panelsPerView", panelsPerView), CODE.WRONG_OPTION); - } - if (panels.length <= 0) return; - var viewportSize = flicking.camera.size; - var gap = referencePanel.margin.prev + referencePanel.margin.next; - var panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView; - var panelSizeObj = flicking.horizontal ? { - width: panelSize - } : { - height: panelSize - }; - var firstPanelSizeObj = __assign({ - size: panelSize, - margin: referencePanel.margin - }, !flicking.horizontal && { - height: referencePanel.height - }); - if (!flicking.noPanelStyleOverride) { - this._strategy.updatePanelSizes(flicking, panelSizeObj); - } - flicking.panels.forEach(function (panel) { - return panel.resize(firstPanelSizeObj); - }); - }; - __proto._removeAllChildsFromCamera = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove other elements - while (cameraElement.firstChild) { - cameraElement.removeChild(cameraElement.firstChild); - } - }; - __proto._insertPanelElements = function (panels, nextSibling) { - if (nextSibling === void 0) { - nextSibling = null; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var cameraElement = camera.element; - var nextSiblingElement = (nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.element) || null; - var fragment = document.createDocumentFragment(); - panels.forEach(function (panel) { - return fragment.appendChild(panel.element); - }); - cameraElement.insertBefore(fragment, nextSiblingElement); - }; - __proto._removePanelElements = function (panels) { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - panels.forEach(function (panel) { - cameraElement.removeChild(panel.element); - }); - }; - __proto._afterRender = function () { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.applyTransform(); - }; - return Renderer; - }(); - - /** - * - */ - var VanillaRenderer = /*#__PURE__*/function (_super) { - __extends(VanillaRenderer, _super); - function VanillaRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - // eslint-disable-next-line @typescript-eslint/require-await - var __proto = VanillaRenderer.prototype; - __proto.render = function () { - return __awaiter(this, void 0, void 0, function () { - var flicking, strategy; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - strategy = this._strategy; - strategy.updateRenderingPanels(flicking); - strategy.renderPanels(flicking); - this._resetPanelElementOrder(); - this._afterRender(); - return [2 /*return*/]; - }); - }); - }; - - __proto._collectPanels = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._removeAllTextNodes(); - this._panels = this._strategy.collectPanels(flicking, camera.children); - }; - __proto._createPanel = function (el, options) { - return this._strategy.createPanel(el, options); - }; - __proto._resetPanelElementOrder = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraEl = flicking.camera.element; - // We're using reversed panels here as last panel should be the last element of camera element - var reversedElements = this._strategy.getRenderingElementsByOrder(flicking).reverse(); - reversedElements.forEach(function (el, idx) { - var nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null; - if (el.nextElementSibling !== nextEl) { - cameraEl.insertBefore(el, nextEl); - } - }); - }; - __proto._removeAllTextNodes = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove all text nodes in the camera element - toArray(cameraElement.childNodes).forEach(function (node) { - if (node.nodeType === Node.TEXT_NODE) { - cameraElement.removeChild(node); - } - }); - }; - return VanillaRenderer; - }(Renderer$1); - - /** - * @internal - */ - var ExternalRenderer = /*#__PURE__*/function (_super) { - __extends(ExternalRenderer, _super); - function ExternalRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* eslint-disable @typescript-eslint/no-unused-vars */ - var __proto = ExternalRenderer.prototype; - __proto._removePanelElements = function (panels) { - // DO NOTHING, overrided to prevent an unexpected error - }; - __proto._removeAllChildsFromCamera = function () { - // DO NOTHING, overrided to prevent an unexpected error - }; - return ExternalRenderer; - }(Renderer$1); - - /** - * A slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ - var Panel = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스 - */ - function Panel(_a) { - var index = _a.index, - align = _a.align, - flicking = _a.flicking, - elementProvider = _a.elementProvider; - this._index = index; - this._flicking = flicking; - this._elProvider = elementProvider; - this._align = align; - this._removed = false; - this._rendered = true; - this._loading = false; - this._resetInternalStates(); - } - var __proto = Panel.prototype; - Object.defineProperty(__proto, "element", { - // Internal States Getter - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementProvider", { - /** - * @internal - * @readonly - */ - get: function () { - return this._elProvider; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index of the panel - * @ko 패널의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of the panel, including {@link Panel#alignPosition alignPosition} - * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다 - * @type {number} - * @readonly - */ - get: function () { - return this._pos + this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Cached size of the panel element - * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else - * @ko 패널 엘리먼트의 캐시된 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "sizeIncludingMargin", { - /** - * Panel's size including CSS `margin` - * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else - * @ko CSS `margin`을 포함한 패널의 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size + this._margin.prev + this._margin.next; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Height of the panel element - * @ko 패널 엘리먼트의 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "margin", { - /** - * Cached CSS `margin` value of the panel element - * @ko 패널 엘리먼트의 CSS `margin` 값 - * @type {object} - * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값 - * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값 - * @readonly - */ - get: function () { - return this._margin; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at - * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "removed", { - /** - * A value indicating whether the panel's {@link Flicking#remove remove}d - * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._removed; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - /** - * A value indicating whether the panel's element is being rendered on the screen - * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "loading", { - /** - * A value indicating whether the panel's image/video is not loaded and waiting for resize - * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._loading; - }, - set: function (val) { - this._loading = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Panel element's range of the bounding box - * @ko 패널 엘리먼트의 Bounding box 범위 - * @type {object} - * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false) - * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false) - * @readonly - */ - get: function () { - return { - min: this._pos, - max: this._pos + this._size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggled", { - /** - * A value indicating whether the panel's position is toggled by circular behavior - * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._toggled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggleDirection", { - /** - * A direction where the panel's position is toggled - * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향 - * @type {DIRECTION} - * @readonly - */ - get: function () { - return this._toggleDirection; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Actual position offset determined by {@link Panel#order} - * @ko {@link Panel#order}에 의한 실제 위치 변경값 - * @type {number} - * @readonly - */ - get: function () { - var toggleDirection = this._toggleDirection; - var cameraRangeDiff = this._flicking.camera.rangeDiff; - return toggleDirection === DIRECTION.NONE || !this._toggled ? 0 : toggleDirection === DIRECTION.PREV ? -cameraRangeDiff : cameraRangeDiff; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Progress of movement between previous or next panel relative to current panel - * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return this.index - flicking.camera.progress; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "outsetProgress", { - /** - * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1) - * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1) - * @type {number} - * @readonly - */ - get: function () { - var position = this.position + this.offset; - var alignPosition = this._alignPos; - var camera = this._flicking.camera; - var camPos = camera.position; - if (camPos === position) { - return 0; - } - if (camPos < position) { - var disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition; - return -getProgress(camPos, position, disappearPosNext); - } else { - var disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition); - return 1 - getProgress(camPos, disappearPosPrev, position); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRatio", { - /** - * Percentage of area where panel is visible in the viewport - * @ko 뷰포트 안에서 패널이 보이는 영역의 비율 - * @type {number} - * @readonly - */ - get: function () { - var range = this.range; - var size = this._size; - var offset = this.offset; - var visibleRange = this._flicking.camera.visibleRange; - var checkingRange = { - min: range.min + offset, - max: range.max + offset - }; - if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) { - return 0; - } - var visibleSize = size; - if (visibleRange.min > checkingRange.min) { - visibleSize -= visibleRange.min - checkingRange.min; - } - if (visibleRange.max < checkingRange.max) { - visibleSize -= checkingRange.max - visibleRange.max; - } - return visibleSize / size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element - * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - this._updateAlignPos(); - }, - enumerable: false, - configurable: true - }); - /** - * Mark panel element to be appended on the camera element - * @internal - */ - __proto.markForShow = function () { - this._rendered = true; - this._elProvider.show(this._flicking); - }; - /** - * Mark panel element to be removed from the camera element - * @internal - */ - __proto.markForHide = function () { - this._rendered = false; - this._elProvider.hide(this._flicking); - }; - /** - * Update size of the panel - * @ko 패널의 크기를 갱신합니다 - * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보 - * @chainable - * @return {this} - */ - __proto.resize = function (cached) { - var _a; - var el = this.element; - var flicking = this._flicking; - var horizontal = flicking.horizontal, - useFractionalSize = flicking.useFractionalSize; - if (cached) { - this._size = cached.size; - this._margin = __assign({}, cached.margin); - this._height = (_a = cached.height) !== null && _a !== void 0 ? _a : getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: getStyle(el) - }); - } else { - var elStyle = getStyle(el); - this._size = getElementSize({ - el: el, - horizontal: horizontal, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }); - this._margin = horizontal ? { - prev: parseFloat(elStyle.marginLeft || "0"), - next: parseFloat(elStyle.marginRight || "0") - } : { - prev: parseFloat(elStyle.marginTop || "0"), - next: parseFloat(elStyle.marginBottom || "0") - }; - this._height = horizontal ? getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }) : this._size; - } - this.updatePosition(); - this._updateAlignPos(); - return this; - }; - /** - * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property - * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New panel size새 패널 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @chainable - * @return {this} - */ - __proto.setSize = function (size) { - setSize(this.element, size); - return this; - }; - /** - * Check whether the given element is inside of this panel's {@link Panel#element element} - * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다 - * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement - * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부 - */ - __proto.contains = function (element) { - var _a; - return !!((_a = this.element) === null || _a === void 0 ? void 0 : _a.contains(element)); - }; - /** - * Reset internal state and set {@link Panel#removed removed} to `true` - * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다. - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalStates(); - this._removed = true; - }; - /** - * Check whether the given position is inside of this panel's {@link Panel#range range} - * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다. - * @param {number} pos A position to check확인하고자 하는 좌표 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부 - */ - __proto.includePosition = function (pos, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - return this.includeRange(pos, pos, includeMargin); - }; - /** - * Check whether the given range is fully included in this panel's area (inclusive) - * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부 - */ - __proto.includeRange = function (min, max, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - var margin = this._margin; - var panelRange = this.range; - if (includeMargin) { - panelRange.min -= margin.prev; - panelRange.max += margin.next; - } - return max >= panelRange.min && min <= panelRange.max; - }; - /** - * Check whether the panel is visble in the given range (exclusive) - * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부 - */ - __proto.isVisibleOnRange = function (min, max) { - var panelRange = this.range; - return max > panelRange.min && min < panelRange.max; - }; - /** - * Move {@link Camera} to this panel - * @ko {@link Camera}를 이 패널로 이동합니다 - * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise - */ - __proto.focus = function (duration) { - return this._flicking.moveTo(this._index, duration); - }; - /** - * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel - * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다 - * @returns {Panel | null} The previous panel이전 패널 - */ - __proto.prev = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1) : renderer.getPanel(index - 1); - }; - /** - * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel - * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다 - * @returns {Panel | null} The previous panel다음 패널 - */ - __proto.next = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1) : renderer.getPanel(index + 1); - }; - /** - * Increase panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.increaseIndex = function (val) { - this._index += Math.max(val, 0); - return this; - }; - /** - * Decrease panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.decreaseIndex = function (val) { - this._index -= Math.max(val, 0); - return this; - }; - /** - * @internal - */ - __proto.updatePosition = function () { - var prevPanel = this._flicking.renderer.panels[this._index - 1]; - this._pos = prevPanel ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev : this._margin.prev; - return this; - }; - /** - * @internal - * @return {boolean} toggled - */ - __proto.toggle = function (prevPos, newPos) { - var toggleDirection = this._toggleDirection; - var togglePosition = this._togglePosition; - if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false; - var prevToggled = this._toggled; - if (newPos > prevPos) { - if (togglePosition >= prevPos && togglePosition <= newPos) { - this._toggled = toggleDirection === DIRECTION.NEXT; - } - } else { - if (togglePosition <= prevPos && togglePosition >= newPos) { - this._toggled = toggleDirection !== DIRECTION.NEXT; - } - } - return prevToggled !== this._toggled; - }; - /** - * @internal - */ - __proto.updateCircularToggleDirection = function () { - var flicking = this._flicking; - if (!flicking.circularEnabled) { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - this._toggled = false; - return this; - } - var camera = flicking.camera; - var camRange = camera.range; - var camAlignPosition = camera.alignPosition; - var camVisibleRange = camera.visibleRange; - var camVisibleSize = camVisibleRange.max - camVisibleRange.min; - var minimumVisible = camRange.min - camAlignPosition; - var maximumVisible = camRange.max - camAlignPosition + camVisibleSize; - var shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false); - var shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false); - this._toggled = false; - if (shouldBeVisibleAtMin) { - this._toggleDirection = DIRECTION.PREV; - this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition; - this.toggle(Infinity, camera.position); - } else if (shouldBeVisibleAtMax) { - this._toggleDirection = DIRECTION.NEXT; - this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition; - this.toggle(-Infinity, camera.position); - } else { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - } - return this; - }; - __proto._updateAlignPos = function () { - this._alignPos = parseAlign$1(this._align, this._size); - }; - __proto._resetInternalStates = function () { - this._size = 0; - this._pos = 0; - this._margin = { - prev: 0, - next: 0 - }; - this._height = 0; - this._alignPos = 0; - this._toggled = false; - this._togglePosition = 0; - this._toggleDirection = DIRECTION.NONE; - }; - return Panel; - }(); - - var NormalRenderingStrategy = /*#__PURE__*/function () { - function NormalRenderingStrategy(_a) { - var providerCtor = _a.providerCtor; - this._providerCtor = providerCtor; - } - var __proto = NormalRenderingStrategy.prototype; - __proto.renderPanels = function () { - // DO_NOTHING - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var renderedPanels = flicking.renderer.panels.filter(function (panel) { - return panel.rendered; - }); - var toggledPrev = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.NEXT; - }); - var notToggled = renderedPanels.filter(function (panel) { - return !panel.toggled; - }); - return __spread(toggledPrev, notToggled, toggledNext).map(function (panel) { - return panel.index; - }); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var panels = flicking.panels; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return panels[index].element; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - if (flicking.renderOnlyVisible) { - this._showOnlyVisiblePanels(flicking); - } else { - flicking.panels.forEach(function (panel) { - return panel.markForShow(); - }); - } - }; - __proto.collectPanels = function (flicking, elements) { - var _this = this; - var align = parsePanelAlign(flicking.renderer.align); - return elements.map(function (el, index) { - return new Panel({ - index: index, - elementProvider: new _this._providerCtor(el), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (element, options) { - return new Panel(__assign(__assign({}, options), { - elementProvider: new this._providerCtor(element) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - return NormalRenderingStrategy; - }(); - - /** - * An slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ - var VirtualPanel = /*#__PURE__*/function (_super) { - __extends(VirtualPanel, _super); - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - */ - function VirtualPanel(options) { - var _this = _super.call(this, options) || this; - options.elementProvider.init(_this); - _this._elProvider = options.elementProvider; - _this._cachedInnerHTML = null; - return _this; - } - var __proto = VirtualPanel.prototype; - Object.defineProperty(__proto, "element", { - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cachedInnerHTML", { - /** - * Cached innerHTML by the previous render function - * @ko 이전 렌더링에서 캐시된 innerHTML 정보 - * @type {string|null} - * @readonly - */ - get: function () { - return this._cachedInnerHTML; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementIndex", { - /** - * An number for indexing which element it will be rendered on - * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var virtualElCount = flicking.panelsPerView + 1; - var panelCount = flicking.panelCount; - var index = this._index; - if (this._toggled) { - // To prevent element duplication - index = this._toggleDirection === DIRECTION.NEXT ? index + panelCount : index - panelCount; - } - return circulateIndex(index, virtualElCount); - }, - enumerable: false, - configurable: true - }); - __proto.cacheRenderResult = function (result) { - this._cachedInnerHTML = result; - }; - __proto.uncacheRenderResult = function () { - this._cachedInnerHTML = null; - }; - __proto.render = function () { - var flicking = this._flicking; - var _a = flicking.virtual, - renderPanel = _a.renderPanel, - cache = _a.cache; - var element = this._elProvider.element; - var newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index); - if (newInnerHTML === element.innerHTML) return; - element.innerHTML = newInnerHTML; - if (cache) { - this.cacheRenderResult(newInnerHTML); - } - }; - __proto.increaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.increaseIndex.call(this, val); - }; - __proto.decreaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.decreaseIndex.call(this, val); - }; - return VirtualPanel; - }(Panel); - - var VirtualRenderingStrategy = /*#__PURE__*/function () { - function VirtualRenderingStrategy() {} - var __proto = VirtualRenderingStrategy.prototype; - __proto.renderPanels = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = flicking.visiblePanels; - var invisibleIndexes = range(flicking.panelsPerView + 1); - visiblePanels.forEach(function (panel) { - var elementIndex = panel.elementIndex; - panel.render(); - virtualManager.show(elementIndex); - invisibleIndexes[elementIndex] = -1; - }); - invisibleIndexes.filter(function (val) { - return val >= 0; - }).forEach(function (idx) { - virtualManager.hide(idx); - }); - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = __spread(flicking.visiblePanels).filter(function (panel) { - return panel.rendered; - }).sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }); - if (visiblePanels.length <= 0) return virtualManager.elements.map(function (_, idx) { - return idx; - }); - var visibleIndexes = visiblePanels.map(function (panel) { - return panel.elementIndex; - }); - var invisibleIndexes = virtualManager.elements.map(function (el, idx) { - return __assign(__assign({}, el), { - idx: idx - }); - }).filter(function (el) { - return !el.visible; - }).map(function (el) { - return el.idx; - }); - return __spread(visibleIndexes, invisibleIndexes); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var elements = virtualManager.elements; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return elements[index].nativeElement; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else { - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - __proto.collectPanels = function (flicking) { - var align = parsePanelAlign(flicking.renderer.align); - return range(flicking.virtual.initialPanelCount).map(function (index) { - return new VirtualPanel({ - index: index, - elementProvider: new VirtualElementProvider(flicking), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (_el, options) { - return new VirtualPanel(__assign(__assign({}, options), { - elementProvider: new VirtualElementProvider(options.flicking) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.virtual.elements.forEach(function (el) { - setSize(el.nativeElement, size); - }); - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - return VirtualRenderingStrategy; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Renderer = { - __proto__: null, - Renderer: Renderer$1, - VanillaRenderer: VanillaRenderer, - ExternalRenderer: ExternalRenderer, - NormalRenderingStrategy: NormalRenderingStrategy, - VirtualRenderingStrategy: VirtualRenderingStrategy - }; - - /** - * @extends Component - * @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"} - * @requires {@link https://github.com/naver/egjs-component|@egjs/component} - * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes} - */ - var Flicking = /*#__PURE__*/function (_super) { - __extends(Flicking, _super); - /** - * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string - * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다. - * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트 - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist| - * - * - * |code|조건| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우| - * - * - * @example - * ```ts - * import Flicking from "@egjs/flicking"; - * - * // Creating new instance of Flicking with HTMLElement - * const flicking = new Flicking(document.querySelector(".flicking-viewport"), { circular: true }); - * - * // Creating new instance of Flicking with CSS selector - * const flicking2 = new Flicking(".flicking-viewport", { circular: true }); - * ``` - */ - function Flicking(root, _a) { - var _b = _a === void 0 ? {} : _a, - _c = _b.align, - align = _c === void 0 ? ALIGN.CENTER : _c, - _d = _b.defaultIndex, - defaultIndex = _d === void 0 ? 0 : _d, - _e = _b.horizontal, - horizontal = _e === void 0 ? true : _e, - _f = _b.circular, - circular = _f === void 0 ? false : _f, - _g = _b.circularFallback, - circularFallback = _g === void 0 ? CIRCULAR_FALLBACK.LINEAR : _g, - _h = _b.bound, - bound = _h === void 0 ? false : _h, - _j = _b.adaptive, - adaptive = _j === void 0 ? false : _j, - _k = _b.panelsPerView, - panelsPerView = _k === void 0 ? -1 : _k, - _l = _b.noPanelStyleOverride, - noPanelStyleOverride = _l === void 0 ? false : _l, - _m = _b.resizeOnContentsReady, - resizeOnContentsReady = _m === void 0 ? false : _m, - _o = _b.nested, - nested = _o === void 0 ? false : _o, - _p = _b.needPanelThreshold, - needPanelThreshold = _p === void 0 ? 0 : _p, - _q = _b.preventEventsBeforeInit, - preventEventsBeforeInit = _q === void 0 ? true : _q, - _r = _b.deceleration, - deceleration = _r === void 0 ? 0.0075 : _r, - _s = _b.duration, - duration = _s === void 0 ? 500 : _s, - _t = _b.easing, - easing = _t === void 0 ? function (x) { - return 1 - Math.pow(1 - x, 3); - } : _t, - _u = _b.inputType, - inputType = _u === void 0 ? ["mouse", "touch"] : _u, - _v = _b.moveType, - moveType = _v === void 0 ? "snap" : _v, - _w = _b.threshold, - threshold = _w === void 0 ? 40 : _w, - _x = _b.interruptable, - interruptable = _x === void 0 ? true : _x, - _y = _b.bounce, - bounce = _y === void 0 ? "20%" : _y, - _z = _b.iOSEdgeSwipeThreshold, - iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z, - _0 = _b.preventClickOnDrag, - preventClickOnDrag = _0 === void 0 ? true : _0, - _1 = _b.preventDefaultOnDrag, - preventDefaultOnDrag = _1 === void 0 ? false : _1, - _2 = _b.disableOnInit, - disableOnInit = _2 === void 0 ? false : _2, - _3 = _b.changeOnHold, - changeOnHold = _3 === void 0 ? false : _3, - _4 = _b.renderOnlyVisible, - renderOnlyVisible = _4 === void 0 ? false : _4, - _5 = _b.virtual, - virtual = _5 === void 0 ? null : _5, - _6 = _b.autoInit, - autoInit = _6 === void 0 ? true : _6, - _7 = _b.autoResize, - autoResize = _7 === void 0 ? true : _7, - _8 = _b.useResizeObserver, - useResizeObserver = _8 === void 0 ? true : _8, - _9 = _b.resizeDebounce, - resizeDebounce = _9 === void 0 ? 0 : _9, - _10 = _b.maxResizeDebounce, - maxResizeDebounce = _10 === void 0 ? 100 : _10, - _11 = _b.useFractionalSize, - useFractionalSize = _11 === void 0 ? false : _11, - _12 = _b.externalRenderer, - externalRenderer = _12 === void 0 ? null : _12, - _13 = _b.renderExternal, - renderExternal = _13 === void 0 ? null : _13; - var _this = _super.call(this) || this; - // Internal states - _this._initialized = false; - _this._plugins = []; - // Bind options - _this._align = align; - _this._defaultIndex = defaultIndex; - _this._horizontal = horizontal; - _this._circular = circular; - _this._circularFallback = circularFallback; - _this._bound = bound; - _this._adaptive = adaptive; - _this._panelsPerView = panelsPerView; - _this._noPanelStyleOverride = noPanelStyleOverride; - _this._resizeOnContentsReady = resizeOnContentsReady; - _this._nested = nested; - _this._virtual = virtual; - _this._needPanelThreshold = needPanelThreshold; - _this._preventEventsBeforeInit = preventEventsBeforeInit; - _this._deceleration = deceleration; - _this._duration = duration; - _this._easing = easing; - _this._inputType = inputType; - _this._moveType = moveType; - _this._threshold = threshold; - _this._interruptable = interruptable; - _this._bounce = bounce; - _this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold; - _this._preventClickOnDrag = preventClickOnDrag; - _this._preventDefaultOnDrag = preventDefaultOnDrag; - _this._disableOnInit = disableOnInit; - _this._changeOnHold = changeOnHold; - _this._renderOnlyVisible = renderOnlyVisible; - _this._autoInit = autoInit; - _this._autoResize = autoResize; - _this._useResizeObserver = useResizeObserver; - _this._resizeDebounce = resizeDebounce; - _this._maxResizeDebounce = maxResizeDebounce; - _this._useFractionalSize = useFractionalSize; - _this._externalRenderer = externalRenderer; - _this._renderExternal = renderExternal; - // Create core components - _this._viewport = new Viewport(_this, getElement(root)); - _this._autoResizer = new AutoResizer(_this); - _this._renderer = _this._createRenderer(); - _this._camera = _this._createCamera(); - _this._control = _this._createControl(); - _this._virtualManager = new VirtualManager(_this, virtual); - if (_this._autoInit) { - void _this.init(); - } - return _this; - } - var __proto = Flicking.prototype; - Object.defineProperty(__proto, "control", { - // Components - /** - * {@link Control} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스 - * @type {Control} - * @default SnapControl - * @readonly - * @see Control - * @see SnapControl - * @see FreeControl - */ - get: function () { - return this._control; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "camera", { - /** - * {@link Camera} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스 - * @type {Camera} - * @default LinearCamera - * @readonly - * @see Camera - * @see LinearCamera - * @see BoundCamera - * @see CircularCamera - */ - get: function () { - return this._camera; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderer", { - /** - * {@link Renderer} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스 - * @type {Renderer} - * @default VanillaRenderer - * @readonly - * @see Renderer - * @see VanillaRenderer - * @see ExternalRenderer - */ - get: function () { - return this._renderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "viewport", { - /** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - * @type {Viewport} - * @readonly - * @see Viewport - */ - get: function () { - return this._viewport; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialized", { - // Internal States - /** - * Whether Flicking's {@link Flicking#init init()} is called. - * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}. - * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수. - * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._initialized; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._camera.circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtualEnabled", { - /** - * Whether the `virtual` option is enabled. - * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero. - * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._panelsPerView > 0 && this._virtual != null; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._control.activeIndex; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "element", { - /** - * The root(`.flicking-viewport`) element - * @ko root(`.flicking-viewport`) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._viewport.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "currentPanel", { - /** - * Currently active panel - * @ko 현재 선택된 패널 - * @type {Panel} - * @readonly - * @see Panel - */ - get: function () { - return this._control.activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panels", { - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._renderer.panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._renderer.panelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * Array of panels that is visible at the current position - * @ko 현재 보이는 패널의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._camera.visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.holding; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePlugins", { - /** - * A current list of activated plugins - * @ko 현재 활성화된 플러그인 목록 - * @type {Plugin[]} - * @readonly - */ - get: function () { - return this._plugins; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - // UI / LAYOUT - /** - * Align position of the panels within viewport. You can set different values each for the panel and camera - * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다 - * @type {ALIGN | string | number | { panel: string | number, camera: string | number }} - * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값 - * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값 - * @default "center" - * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // Literal strings - * "prev", "center", "next", - * // % values, applied to both panel & camera - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000, - * // Setting a different value for panel & camera - * { panel: "10%", camera: "25%" } - * ]; - * - * possibleOptions.forEach(align => { - * new Flicking("#el", { align }); - * }); - * ``` - */ - get: function () { - return this._align; - }, - // Options Setter - // UI / LAYOUT - set: function (val) { - this._align = val; - this._renderer.align = val; - this._camera.align = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "defaultIndex", { - /** - * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer - * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )} - */ - get: function () { - return this._defaultIndex; - }, - set: function (val) { - this._defaultIndex = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "horizontal", { - /** - * Direction of panel movement (true: horizontal, false: vertical) - * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향) - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )} - */ - get: function () { - return this._horizontal; - }, - set: function (val) { - this._horizontal = val; - this._control.controller.updateDirection(); - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circular", { - /** - * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling. - * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )} - */ - get: function () { - return this._circular; - }, - set: function (val) { - this._circular = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularFallback", { - /** - * Set panel control mode for the case when circular cannot be enabled. - * "linear" will set the view's range from the top of the first panel to the top of the last panel. - * "bound" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel. - * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다. - * "linear" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다. - * "bound" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다. - * @see CIRCULAR_FALLBACK - * @type {string} - * @default "linear" - * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )} - */ - get: function () { - return this._circularFallback; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bound", { - /** - * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel - * Only can be enabled when `circular=false` - * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다 - * `circular=false`인 경우에만 사용할 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )} - */ - get: function () { - return this._bound; - }, - set: function (val) { - this._bound = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "adaptive", { - /** - * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true` - * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )} - */ - get: function () { - return this._adaptive; - }, - set: function (val) { - this._adaptive = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelsPerView", { - /** - * A visible number of panels on viewport. Enabling this option will automatically resize panel size - * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다 - * @type {number} - * @default -1 - * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )} - */ - get: function () { - return this._panelsPerView; - }, - set: function (val) { - this._panelsPerView = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "noPanelStyleOverride", { - /** - * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled. - * This behavior can be useful in terms of performance when you're manually managing all panel sizes - * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다. - * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다 - * @type {boolean} - * @default false - */ - get: function () { - return this._noPanelStyleOverride; - }, - set: function (val) { - this._noPanelStyleOverride = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeOnContentsReady", { - /** - * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded. - * This can be useful when you have contents inside Flicking that changes its size when it's loaded - * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다. - * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )} - */ - get: function () { - return this._resizeOnContentsReady; - }, - set: function (val) { - this._resizeOnContentsReady = val; - if (val) { - this._renderer.checkPanelContentsReady(this._renderer.panels); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "nested", { - /** - * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel. - * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option. - * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다. - * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )} - */ - get: function () { - return this._nested; - }, - set: function (val) { - this._nested = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.nested = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "needPanelThreshold", { - // EVENTS - /** - * A Threshold from viewport edge before triggering `needPanel` event - * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )} - */ - get: function () { - return this._needPanelThreshold; - }, - // EVENTS - set: function (val) { - this._needPanelThreshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventEventsBeforeInit", { - /** - * When enabled, events are not triggered before `ready` when initializing - * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )} - */ - get: function () { - return this._preventEventsBeforeInit; - }, - set: function (val) { - this._preventEventsBeforeInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "deceleration", { - // ANIMATION - /** - * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time - * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다 - * @type {number} - * @default 0.0075 - * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )} - */ - get: function () { - return this._deceleration; - }, - // ANIMATION - set: function (val) { - this._deceleration = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.deceleration = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "easing", { - /** - * An easing function applied to the panel movement animation. Default value is `easeOutCubic` - * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다 - * @type {function} - * @default x => 1 - Math.pow(1 - x, 3) - * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/} - * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )} - */ - get: function () { - return this._easing; - }, - set: function (val) { - this._easing = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.easing = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "duration", { - /** - * Default duration of the animation (ms) - * @ko 디폴트 애니메이션 재생 시간 (ms) - * @type {number} - * @default 500 - * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )} - */ - get: function () { - return this._duration; - }, - set: function (val) { - this._duration = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "inputType", { - // INPUT - /** - * Types of input devices to enable - * @ko 활성화할 입력 장치 종류 - * @type {string[]} - * @default ["touch", "mouse"] - * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)} - * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)} - * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )} - */ - get: function () { - return this._inputType; - }, - // INPUT - set: function (val) { - this._inputType = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.inputType = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "moveType", { - /** - * Movement style by user input. This will change instance type of {@link Flicking#control} - * You can use the values of the constant {@link MOVE_TYPE} - * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다 - * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다 - * @type {MOVE_TYPE | Pair} - * @default "snap" - * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )} - * @example - * |moveType|control|options| - * |:---:|:---:|:---:| - * |"snap"|{@link SnapControl}|| - * |"freeScroll"|{@link FreeControl}|{@link FreeControlOptions}| - * - * ```ts - * import Flicking, { MOVE_TYPE } from "@egjs/flicking"; - * - * const flicking = new Flicking({ - * moveType: MOVE_TYPE.SNAP - * }); - * ``` - * - * ```ts - * const flicking = new Flicking({ - * // If you want more specific settings for the moveType - * // [moveType, options for that moveType] - * // In this case, it's ["freeScroll", FreeControlOptions] - * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }] - * }); - * ``` - */ - get: function () { - return this._moveType; - }, - set: function (val) { - this._moveType = val; - var prevControl = this._control; - var newControl = this._createControl(); - var activePanel = prevControl.activePanel; - newControl.copy(prevControl); - var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0; - this._control = newControl; - this._control.updatePosition(prevProgressInPanel); - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "threshold", { - /** - * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel. - * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다. - * @type {number} - * @default 40 - * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )} - */ - get: function () { - return this._threshold; - }, - set: function (val) { - this._threshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "interruptable", { - /** - * Set animation to be interruptable by click/touch. - * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )} - */ - get: function () { - return this._interruptable; - }, - set: function (val) { - this._interruptable = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.interruptable = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * The size value of the bounce area. Only can be enabled when `circular=false`. - * You can set different bounce value for prev/next direction by using array. - * `number` for px value, and `string` for px, and % value relative to viewport size. - * You have to call {@link Control#updateInput} after changing this to take effect. - * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다. - * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다. - * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다. - * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다. - * @type {string | number | Array} - * @default "20%" - * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // % values, relative to viewport element(".flicking-viewport")'s size - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000 - * ]; - * ``` - * - * @example - * ```ts - * const flicking = new Flicking("#el", { bounce: "20%" }); - * - * flicking.bounce = "100%"; - * flicking.control.updateInput(); // Call this to update! - * ``` - */ - get: function () { - return this._bounce; - }, - set: function (val) { - this._bounce = val; - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "iOSEdgeSwipeThreshold", { - /** - * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward - * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px) - * @type {number} - * @default 30 - * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )} - */ - get: function () { - return this._iOSEdgeSwipeThreshold; - }, - set: function (val) { - this._iOSEdgeSwipeThreshold = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.iOSEdgeSwipeThreshold = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventClickOnDrag", { - /** - * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element - * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )} - */ - get: function () { - return this._preventClickOnDrag; - }, - set: function (val) { - var prevVal = this._preventClickOnDrag; - if (val === prevVal) return; - var controller = this._control.controller; - if (val) { - controller.addPreventClickHandler(); - } else { - controller.removePreventClickHandler(); - } - this._preventClickOnDrag = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventDefaultOnDrag", { - /** - * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging - * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )} - */ - get: function () { - return this._preventDefaultOnDrag; - }, - set: function (val) { - this._preventDefaultOnDrag = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.preventDefaultOnDrag = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "disableOnInit", { - /** - * Automatically call {@link Flicking#disableInput disableInput()} on initialization - * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )} - */ - get: function () { - return this._disableOnInit; - }, - set: function (val) { - this._disableOnInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "changeOnHold", { - /** - * Change active panel index on mouse/touch hold while animating. - * `index` of the `willChange`/`willRestore` event will be used as new index. - * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다. - * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )} - */ - get: function () { - return this._changeOnHold; - }, - set: function (val) { - this._changeOnHold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderOnlyVisible", { - // PERFORMANCE - /** - * Whether to render visible panels only. This can dramatically increase performance when there're many panels - * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )} - */ - get: function () { - return this._renderOnlyVisible; - }, - // PERFORMANCE - set: function (val) { - this._renderOnlyVisible = val; - void this._renderer.render(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtual", { - /** - * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1` - * Must be used with `panelsPerview`. - * After Flicking's initialized, this property can be used to add/remove the panel count. - * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다. - * `panelsPerView` 옵션과 함께 사용되어야만 합니다. - * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다. - * @type {VirtualManager} - * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수 - * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @property {string} [panelClass="flicking-panel"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )} - * @example - * ```ts - * import Flicking, { VirtualPanel } from "@egjs/flicking"; - * - * const flicking = new Flicking("#some_el", { - * panelsPerView: 3, - * virtual: { - * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`, - * initialPanelCount: 100 - * } - * }); - * - * // Add 100 virtual panels (at the end) - * flicking.virtual.append(100); - * - * // Remove 100 virtual panels from 0 to 100 - * flicking.virtual.remove(0, 100); - * ``` - */ - get: function () { - return this._virtualManager; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoInit", { - // OTHERS - /** - * Call {@link Flicking#init init()} automatically when creating Flicking's instance - * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )} - * @readonly - */ - get: function () { - return this._autoInit; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoResize", { - /** - * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed - * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._autoResize; - }, - // OTHERS - set: function (val) { - this._autoResize = val; - if (val) { - this._autoResizer.enable(); - } else { - this._autoResizer.disable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useResizeObserver", { - /** - * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option - * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )} - */ - get: function () { - return this._useResizeObserver; - }, - set: function (val) { - this._useResizeObserver = val; - if (this._autoResize) { - this._autoResizer.enable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeDebounce", { - /** - * Delays size recalculation from `autoResize` by the given time in milisecond. - * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again. - * This can increase performance by preventing `resize` being called too often. - * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다. - * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다. - * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다. - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )} - */ - get: function () { - return this._resizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "maxResizeDebounce", { - /** - * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond. - * This guarantees that size recalculation is performed at least once every (n)ms. - * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms) - * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다. - * @type {number} - * @default 100 - * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )} - */ - get: function () { - return this._maxResizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useFractionalSize", { - /** - * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle. - * This can prevent 1px offset issue in some cases where panel size has the fractional part. - * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element. - * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다. - * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다. - * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )} - */ - get: function () { - return this._useFractionalSize; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "externalRenderer", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - */ - get: function () { - return this._externalRenderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderExternal", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - * @deprecated - */ - get: function () { - return this._renderExternal; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Flicking and move to the default index - * This is automatically called on Flicking's constructor when `autoInit` is true(default) - * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다 - * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다 - * @fires Flicking#ready - * @return {Promise} - */ - __proto.init = function () { - var _this = this; - if (this._initialized) return Promise.resolve(); - var camera = this._camera; - var renderer = this._renderer; - var control = this._control; - var virtualManager = this._virtualManager; - var originalTrigger = this.trigger; - var preventEventsBeforeInit = this._preventEventsBeforeInit; - camera.init(); - virtualManager.init(); - renderer.init(this); - control.init(this); - if (preventEventsBeforeInit) { - this.trigger = function () { - return _this; - }; - } - this._initialResize(); - // Look at initial panel - this._moveToInitialPanel(); - if (this._autoResize) { - this._autoResizer.enable(); - } - if (this._preventClickOnDrag) { - control.controller.addPreventClickHandler(); - } - if (this._disableOnInit) { - this.disableInput(); - } - renderer.checkPanelContentsReady(renderer.panels); - this._initialized = true; - return renderer.render().then(function () { - // Done initializing & emit ready event - _this._plugins.forEach(function (plugin) { - return plugin.init(_this); - }); - if (preventEventsBeforeInit) { - _this.trigger = originalTrigger; - } - _this.trigger(new Component.ComponentEvent(EVENTS.READY)); - }); - }; - /** - * Destroy Flicking and remove all event handlers - * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다 - * @return {void} - */ - __proto.destroy = function () { - this.off(); - this._autoResizer.disable(); - this._control.destroy(); - this._camera.destroy(); - this._renderer.destroy(); - this._plugins.forEach(function (plugin) { - return plugin.destroy(); - }); - this._initialized = false; - }; - /** - * Move to the previous panel (current index - 1) - * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise - */ - __proto.prev = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.prev()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : -1, duration, DIRECTION.PREV); - }; - /** - * Move to the next panel (current index + 1) - * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise - */ - __proto.next = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.next()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : this._renderer.panelCount, duration, DIRECTION.NEXT); - }; - /** - * Move to the panel with given index - * @ko 주어진 인덱스에 해당하는 패널로 이동합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveTo = function (index, duration, direction) { - if (duration === void 0) { - duration = this._duration; - } - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - return Promise.reject(new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE)); - } - if (this._control.animating) { - return Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING)); - } - if (this._control.holding) { - this._control.controller.release(); - } - return this._control.moveToPanel(panel, { - duration: duration, - direction: direction - }); - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @throws {FlickingError} - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우 - * @return {void} - */ - __proto.updateAnimation = function (index, duration, direction) { - if (!this._control.animating) { - return; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - throw new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE); - } - this._control.updateAnimation(panel, duration, direction); - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @fires Flicking#moveEnd - * @return {void} - */ - __proto.stopAnimation = function () { - if (!this._control.animating) { - return; - } - this._control.stopAnimation(); - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - * @example - * ```ts - * const panel = flicking.getPanel(0); - * // Which is a shorthand to... - * const samePanel = flicking.panels[0]; - * ``` - */ - __proto.getPanel = function (index) { - return this._renderer.getPanel(index); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @return {this} - */ - __proto.enableInput = function () { - this._control.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @return {this} - */ - __proto.disableInput = function () { - this._control.disable(); - return this; - }; - /** - * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()} - * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다 - * @param {object} options Status retrieving optionsStatus 반환 옵션 - * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다 - * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다 - * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다 - * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true - * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다. - * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체. - */ - __proto.getStatus = function (_a) { - var _b, _c; - var _d = _a === void 0 ? {} : _a, - _e = _d.index, - index = _e === void 0 ? true : _e, - _f = _d.position, - position = _f === void 0 ? true : _f, - _g = _d.includePanelHTML, - includePanelHTML = _g === void 0 ? false : _g, - _h = _d.visiblePanelsOnly, - visiblePanelsOnly = _h === void 0 ? false : _h; - var camera = this._camera; - var panels = visiblePanelsOnly ? this.visiblePanels : this.panels; - var status = { - panels: panels.map(function (panel) { - var panelInfo = { - index: panel.index - }; - if (includePanelHTML) { - panelInfo.html = panel.element.outerHTML; - } - return panelInfo; - }) - }; - if (index) { - status.index = this.index; - } - if (position) { - var nearestAnchor = camera.findNearestAnchor(camera.position); - if (nearestAnchor) { - status.position = { - panel: nearestAnchor.panel.index, - progressInPanel: camera.getProgressInPanel(nearestAnchor.panel) - }; - } - } - if (visiblePanelsOnly) { - var visiblePanels = this.visiblePanels; - status.visibleOffset = (_c = (_b = visiblePanels[0]) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : 0; - } - return status; - }; - /** - * Restore to the state of the given {@link Status} - * @ko 주어진 {@link Status}의 상태로 복원합니다 - * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다 - * @return {void} - */ - __proto.setStatus = function (status) { - var _a; - if (!this._initialized) { - throw new FlickingError(MESSAGE.NOT_INITIALIZED, CODE.NOT_INITIALIZED); - } - var index = status.index, - position = status.position, - visibleOffset = status.visibleOffset, - panels = status.panels; - var renderer = this._renderer; - var control = this._control; - // Can't add/remove panels on external rendering - if (((_a = panels[0]) === null || _a === void 0 ? void 0 : _a.html) && !this._renderExternal) { - renderer.batchRemove({ - index: 0, - deleteCount: this.panels.length, - hasDOMInElements: true - }); - renderer.batchInsert({ - index: 0, - elements: parseElement(panels.map(function (panel) { - return panel.html; - })), - hasDOMInElements: true - }); - } - if (index != null) { - var panelIndex = visibleOffset ? index - visibleOffset : index; - void this.moveTo(panelIndex, 0).catch(function () { - return void 0; - }); - } - if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) { - var panel = position.panel, - progressInPanel = position.progressInPanel; - var panelIndex = visibleOffset ? panel - visibleOffset : panel; - var panelRange = renderer.panels[panelIndex].range; - var newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - void control.moveToPosition(newCameraPos, 0).catch(function () { - return void 0; - }); - } - }; - /** - * Add plugins that can have different effects on Flicking - * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다 - * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들) - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.addPlugins = function () { - var _a; - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - if (this._initialized) { - plugins.forEach(function (item) { - return item.init(_this); - }); - } - (_a = this._plugins).push.apply(_a, __spread(plugins)); - return this; - }; - /** - * Remove plugins from Flicking. - * @ko 플리킹으로부터 플러그인들을 제거합니다. - * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들). - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.removePlugins = function () { - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - plugins.forEach(function (item) { - var foundIndex = findIndex(_this._plugins, function (val) { - return val === item; - }); - if (foundIndex >= 0) { - item.destroy(); - _this._plugins.splice(foundIndex, 1); - } - }); - return this; - }; - /** - * Update viewport/panel sizes - * @ko 패널 및 뷰포트의 크기를 갱신합니다 - * @method - * @fires Flicking#beforeResize - * @fires Flicking#afterResize - * @return {this} - */ - __proto.resize = function () { - return __awaiter(this, void 0, void 0, function () { - var viewport, renderer, camera, control, activePanel, prevWidth, prevHeight, prevProgressInPanel, newWidth, newHeight, sizeChanged; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - viewport = this._viewport; - renderer = this._renderer; - camera = this._camera; - control = this._control; - activePanel = control.activePanel; - prevWidth = viewport.width; - prevHeight = viewport.height; - prevProgressInPanel = activePanel ? camera.getProgressInPanel(activePanel) : 0; - this.trigger(new Component.ComponentEvent(EVENTS.BEFORE_RESIZE, { - width: prevWidth, - height: prevHeight, - element: viewport.element - })); - viewport.resize(); - return [4 /*yield*/, renderer.forceRenderAllPanels()]; - case 1: - _a.sent(); // Render all panel elements, to update sizes - if (!this._initialized) { - return [2 /*return*/]; - } - - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateAdaptiveHeight(); - camera.updatePanelOrder(); - camera.updateOffset(); - return [4 /*yield*/, renderer.render()]; - case 2: - _a.sent(); - if (!this._initialized) { - return [2 /*return*/]; - } - - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - newWidth = viewport.width; - newHeight = viewport.height; - sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight; - this.trigger(new Component.ComponentEvent(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: prevWidth, - height: prevHeight - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Add new panels after the last panel - * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of appended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new Flicking("#flick"); - * // These are possible parameters - * flicking.append(document.createElement("div")); - * flicking.append("\Panel\"); - * flicking.append(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.append("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.append = function (element) { - return this.insert(this._renderer.panelCount, element); - }; - /** - * Add new panels before the first panel - * This will increase index of panels after by the number of panels added - * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다 - * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다. - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.prepend(document.createElement("div")); - * flicking.prepend("\Panel\"); - * flicking.prepend(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.prepend("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.prepend = function (element) { - return this.insert(0, element); - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.insert(0, document.createElement("div")); - * flicking.insert(2, "\Panel\"); - * flicking.insert(1, ["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.insert(3, "\Panel 1\\Panel 2\"); - * ``` - */ - __proto.insert = function (index, element) { - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchInsert({ - index: index, - elements: parseElement(element), - hasDOMInElements: true - }); - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {number} index Index of panel to remove제거할 패널의 인덱스 - * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @return {Panel[]} An array of removed panels제거된 패널들의 배열 - */ - __proto.remove = function (index, deleteCount) { - if (deleteCount === void 0) { - deleteCount = 1; - } - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchRemove({ - index: index, - deleteCount: deleteCount, - hasDOMInElements: true - }); - }; - __proto._createControl = function () { - var _a; - var moveType = this._moveType; - var moveTypes = Object.keys(MOVE_TYPE).map(function (key) { - return MOVE_TYPE[key]; - }); - var moveTypeStr = Array.isArray(moveType) ? moveType[0] : moveType; - var moveTypeOptions = Array.isArray(moveType) ? (_a = moveType[1]) !== null && _a !== void 0 ? _a : {} : {}; - if (!includes(moveTypes, moveTypeStr)) { - throw new FlickingError(MESSAGE.WRONG_OPTION("moveType", JSON.stringify(moveType)), CODE.WRONG_OPTION); - } - switch (moveTypeStr) { - case MOVE_TYPE.SNAP: - return new SnapControl(moveTypeOptions); - case MOVE_TYPE.FREE_SCROLL: - return new FreeControl(moveTypeOptions); - case MOVE_TYPE.STRICT: - return new StrictControl(moveTypeOptions); - } - }; - __proto._createCamera = function () { - if (this._circular && this._bound) { - // eslint-disable-next-line no-console - console.warn("\"circular\" and \"bound\" option cannot be used together, ignoring bound."); - } - return new Camera$1(this, { - align: this._align - }); - }; - __proto._createRenderer = function () { - var externalRenderer = this._externalRenderer; - if (this._virtual && this._panelsPerView <= 0) { - // eslint-disable-next-line no-console - console.warn("\"virtual\" and \"panelsPerView\" option should be used together, ignoring virtual."); - } - return externalRenderer ? externalRenderer : this._renderExternal ? this._createExternalRenderer() : this._createVanillaRenderer(); - }; - __proto._createExternalRenderer = function () { - var _a = this._renderExternal, - renderer = _a.renderer, - rendererOptions = _a.rendererOptions; - return new renderer(__assign({ - align: this._align - }, rendererOptions)); - }; - __proto._createVanillaRenderer = function () { - var virtual = this.virtualEnabled; - return new VanillaRenderer({ - align: this._align, - strategy: virtual ? new VirtualRenderingStrategy() : new NormalRenderingStrategy({ - providerCtor: VanillaElementProvider - }) - }); - }; - __proto._moveToInitialPanel = function () { - var renderer = this._renderer; - var control = this._control; - var camera = this._camera; - var defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0); - if (!defaultPanel) return; - var nearestAnchor = camera.findNearestAnchor(defaultPanel.position); - var initialPanel = nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index ? nearestAnchor.panel : defaultPanel; - control.setActive(initialPanel, null, false); - if (!nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), CODE.POSITION_NOT_REACHABLE); - } - var position = initialPanel.position; - if (!camera.canReach(initialPanel)) { - position = nearestAnchor.position; - } - camera.lookAt(position); - control.updateInput(); - camera.updateOffset(); - }; - __proto._initialResize = function () { - var viewport = this._viewport; - var renderer = this._renderer; - var camera = this._camera; - var control = this._control; - this.trigger(new Component.ComponentEvent(EVENTS.BEFORE_RESIZE, { - width: 0, - height: 0, - element: viewport.element - })); - viewport.resize(); - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateOffset(); - control.updateInput(); - var newWidth = viewport.width; - var newHeight = viewport.height; - var sizeChanged = newWidth !== 0 || newHeight !== 0; - this.trigger(new Component.ComponentEvent(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: 0, - height: 0 - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - }; - /** - * Version info string - * @ko 버전정보 문자열 - * @type {string} - * @readonly - * @example - * ```ts - * Flicking.VERSION; // ex) 4.0.0 - * ``` - */ - Flicking.VERSION = "4.11.4"; - return Flicking; - }(Component); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Core = { - __proto__: null, - Viewport: Viewport, - FlickingError: FlickingError, - AnchorPoint: AnchorPoint, - VirtualManager: VirtualManager, - VanillaElementProvider: VanillaElementProvider, - VirtualElementProvider: VirtualElementProvider, - Panel: Panel, - VirtualPanel: VirtualPanel - }; - - /** - * Decorator that makes the method of flicking available in the framework. - * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터. - * @memberof eg.Flicking - * @private - * @example - * ```js - * import Flicking, { withFlickingMethods } from "@egjs/flicking"; - * - * class Flicking extends React.Component> { - * @withFlickingMethods - * private flicking: Flicking; - * } - * ``` - */ - var withFlickingMethods = function (prototype, flickingName) { - [Component.prototype, Flicking.prototype].forEach(function (proto) { - Object.getOwnPropertyNames(proto).filter(function (name) { - return !prototype[name] && name.indexOf("_") !== 0 && name !== "constructor"; - }).forEach(function (name) { - var descriptor = Object.getOwnPropertyDescriptor(proto, name); - if (descriptor.value) { - // Public Function - Object.defineProperty(prototype, name, { - value: function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.value).call.apply(_a, __spread([this[flickingName]], args)); - } - }); - } else { - var getterDescriptor = {}; - if (descriptor.get) { - getterDescriptor.get = function () { - var _a; - var flicking = this[flickingName]; - return flicking && ((_a = descriptor.get) === null || _a === void 0 ? void 0 : _a.call(flicking)); - }; - } - if (descriptor.set) { - getterDescriptor.set = function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.set) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spread([this[flickingName]], args)); - }; - } - Object.defineProperty(prototype, name, getterDescriptor); - } - }); - }); - }; - - var sync = (function (flicking, diffResult, rendered) { - var renderer = flicking.renderer; - var panels = renderer.panels; - var prevList = __spread(diffResult.prevList); - var added = []; - var removed = []; - if (diffResult.removed.length > 0) { - var endIdx_1 = -1; - var prevIdx_1 = -1; - diffResult.removed.forEach(function (removedIdx) { - if (endIdx_1 < 0) { - endIdx_1 = removedIdx; - } - if (prevIdx_1 >= 0 && removedIdx !== prevIdx_1 - 1) { - removed.push.apply(removed, __spread(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - endIdx_1 = removedIdx; - prevIdx_1 = removedIdx; - } else { - prevIdx_1 = removedIdx; - } - prevList.splice(removedIdx, 1); - }); - removed.push.apply(removed, __spread(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - } - diffResult.ordered.forEach(function (_a) { - var _b = __read(_a, 2), - from = _b[0], - to = _b[1]; - var prevPanel = panels.splice(from, 1)[0]; - panels.splice(to, 0, prevPanel); - }); - if (diffResult.ordered.length > 0) { - panels.forEach(function (panel, idx) { - var indexDiff = idx - panel.index; - if (indexDiff > 0) { - panel.increaseIndex(indexDiff); - } else { - panel.decreaseIndex(-indexDiff); - } - }); - panels.sort(function (panel1, panel2) { - return panel1.index - panel2.index; - }); - panels.forEach(function (panel) { - panel.updatePosition(); - }); - } - if (diffResult.added.length > 0) { - var startIdx_1 = -1; - var prevIdx_2 = -1; - var addedElements_1 = rendered.slice(prevList.length); - diffResult.added.forEach(function (addedIdx, idx) { - if (startIdx_1 < 0) { - startIdx_1 = idx; - } - if (prevIdx_2 >= 0 && addedIdx !== prevIdx_2 + 1) { - added.push.apply(added, __spread(batchInsert(renderer, diffResult, addedElements_1, startIdx_1, idx + 1))); - startIdx_1 = -1; - prevIdx_2 = -1; - } else { - prevIdx_2 = addedIdx; - } - }); - if (startIdx_1 >= 0) { - added.push.apply(added, __spread(batchInsert(renderer, diffResult, addedElements_1, startIdx_1))); - } - } - if (diffResult.added.length > 0 || diffResult.removed.length > 0) { - renderer.updateAfterPanelChange(added, removed); - } - }); - var batchInsert = function (renderer, diffResult, addedElements, startIdx, endIdx) { - return renderer.batchInsertDefer.apply(renderer, __spread(diffResult.added.slice(startIdx, endIdx).map(function (index, elIdx) { - return { - index: index, - elements: [addedElements[elIdx]], - hasDOMInElements: false - }; - }))); - }; - var batchRemove = function (renderer, startIdx, endIdx) { - var removed = renderer.panels.slice(startIdx, endIdx); - return renderer.batchRemoveDefer({ - index: startIdx, - deleteCount: removed.length, - hasDOMInElements: false - }); - }; - - var getRenderingPanels = (function (flicking, diffResult) { - var removedPanels = diffResult.removed.reduce(function (map, idx) { - map[idx] = true; - return map; - }, {}); - var maintainedMap = diffResult.maintained.reduce(function (map, _a) { - var _b = __read(_a, 2), - prev = _b[0], - current = _b[1]; - map[prev] = current; - return map; - }, {}); - return __spread(flicking.panels.filter(function (panel) { - return !removedPanels[panel.index]; - }) - // Sort panels by position - .sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }).map(function (panel) { - return diffResult.list[maintainedMap[panel.index]]; - }), diffResult.added.map(function (idx) { - return diffResult.list[idx]; - })); - }); - - var getDefaultCameraTransform = (function (align, horizontal, firstPanelSize) { - if (align === void 0) { - align = ALIGN.CENTER; - } - if (horizontal === void 0) { - horizontal = true; - } - var cameraAlign = getCameraAlign(align); - var panelAlign = getPanelAlign(align); - if (panelAlign == null) return ""; - var camPosition = "calc(" + cameraAlign + " - (" + (firstPanelSize || "0px") + " * " + panelAlign.percentage + ") - " + panelAlign.absolute + "px)"; - return horizontal ? "translate(" + camPosition + ")" : "translate(0, " + camPosition + ")"; - }); - var getCameraAlign = function (align) { - var alignVal = typeof align === "object" ? align.camera : align; - return parseAlign(alignVal); - }; - var getPanelAlign = function (align) { - var alignVal = typeof align === "object" ? align.panel : align; - return parseArithmeticExpression(parseAlign(alignVal)); - }; - var parseAlign = function (alignVal) { - if (typeof alignVal === "number") { - return alignVal + "px"; - } - switch (alignVal) { - case ALIGN.CENTER: - return "50%"; - case ALIGN.NEXT: - return "100%"; - case ALIGN.PREV: - return "0%"; - default: - return alignVal; - } - }; - - var CFC = { - __proto__: null, - withFlickingMethods: withFlickingMethods, - sync: sync, - getRenderingPanels: getRenderingPanels, - getDefaultCameraTransform: getDefaultCameraTransform - }; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - merge(Flicking, Core); - merge(Flicking, Camera); - merge(Flicking, Control); - merge(Flicking, Renderer); - merge(Flicking, Constants); - merge(Flicking, CFC); - merge(Flicking, Utils); - - return Flicking; - -})); -//# sourceMappingURL=flicking.js.map diff --git a/dist/flicking.js.map b/dist/flicking.js.map deleted file mode 100644 index d9889a32fc..0000000000 --- a/dist/flicking.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flicking.js","sources":["../src/const/error.ts","../src/const/external.ts","../src/utils.ts","../src/core/FlickingError.ts","../src/core/Viewport.ts","../src/core/AutoResizer.ts","../src/core/panel/provider/VanillaElementProvider.ts","../src/core/panel/provider/VirtualElementProvider.ts","../src/core/VirtualManager.ts","../src/const/axes.ts","../src/control/states/State.ts","../src/control/states/IdleState.ts","../src/control/states/HoldingState.ts","../src/control/states/DraggingState.ts","../src/control/states/AnimatingState.ts","../src/control/states/DisabledState.ts","../src/control/StateMachine.ts","../src/control/AxesController.ts","../src/control/Control.ts","../src/core/AnchorPoint.ts","../src/control/SnapControl.ts","../src/control/FreeControl.ts","../src/control/StrictControl.ts","../src/control/index.ts","../src/camera/mode/CameraMode.ts","../src/camera/mode/LinearCameraMode.ts","../src/camera/mode/CircularCameraMode.ts","../src/camera/mode/BoundCameraMode.ts","../src/camera/Camera.ts","../src/camera/index.ts","../src/renderer/Renderer.ts","../src/renderer/VanillaRenderer.ts","../src/renderer/ExternalRenderer.ts","../src/core/panel/Panel.ts","../src/renderer/strategy/NormalRenderingStrategy.ts","../src/core/panel/VirtualPanel.ts","../src/renderer/strategy/VirtualRenderingStrategy.ts","../src/renderer/index.ts","../src/Flicking.ts","../src/core/index.ts","../src/cfc/withFlickingMethods.ts","../src/cfc/sync.ts","../src/cfc/getRenderingPanels.ts","../src/cfc/getDefaultCameraTransform.ts","../src/index.umd.ts"],"sourcesContent":["/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/restrict-template-expressions */\n\n/**\n * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.\n * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.\n * @name ERROR_CODE\n * @constant\n * @type object\n * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우\n * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우\n * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우\n * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)\n * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때\n * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우\n * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우\n * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)\n * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우\n * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우\n * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우\n * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)\n * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우\n * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우\n * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다\n * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우\n */\nexport const CODE = {\n WRONG_TYPE: 0,\n ELEMENT_NOT_FOUND: 1,\n VAL_MUST_NOT_NULL: 2,\n NOT_ATTACHED_TO_FLICKING: 3,\n WRONG_OPTION: 4,\n INDEX_OUT_OF_RANGE: 5,\n POSITION_NOT_REACHABLE: 6,\n TRANSFORM_NOT_SUPPORTED: 7,\n STOP_CALLED_BY_USER: 8,\n ANIMATION_INTERRUPTED: 9,\n ANIMATION_ALREADY_PLAYING: 10,\n NOT_ALLOWED_IN_FRAMEWORK: 11,\n NOT_INITIALIZED: 12,\n NO_ACTIVE: 13,\n NOT_ALLOWED_IN_VIRTUAL: 14\n} as const;\n\nexport const MESSAGE = {\n WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `\"${type}\"`).join(\" or \")}.`,\n ELEMENT_NOT_FOUND: (selector: string) => `Element with selector \"${selector}\" not found.`,\n VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,\n NOT_ATTACHED_TO_FLICKING: \"This module is not attached to the Flicking instance. \\\"init()\\\" should be called first.\",\n WRONG_OPTION: (optionName: string, val: any) => `Option \"${optionName}\" is not in correct format, given: ${val}`,\n INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index \"${val}\" is out of range: should be between ${min} and ${max}.`,\n POSITION_NOT_REACHABLE: (position: number) => `Position \"${position}\" is not reachable.`,\n TRANSFORM_NOT_SUPPORTED: \"Browser does not support CSS transform.\",\n STOP_CALLED_BY_USER: \"Event stop() is called by user.\",\n ANIMATION_INTERRUPTED: \"Animation is interrupted by user input.\",\n ANIMATION_ALREADY_PLAYING: \"Animation is already playing.\",\n NOT_ALLOWED_IN_FRAMEWORK: \"This behavior is not allowed in the frameworks like React, Vue, or Angular.\",\n NOT_INITIALIZED: \"Flicking is not initialized yet, call init() first.\",\n NO_ACTIVE: \"There's no active panel that Flicking has selected. This may be due to the absence of any panels.\",\n NOT_ALLOWED_IN_VIRTUAL: \"This behavior is not allowed when the virtual option is enabled\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nexport { CODE as ERROR_CODE } from \"./error\";\n\n/**\n * Event type object with event name strings of {@link Flicking}\n * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체\n * @type {object}\n * @property {\"holdStart\"} HOLD_START holdStart eventholdStart 이벤트\n * @property {\"holdEnd\"} HOLD_END holdEnd eventholdEnd 이벤트\n * @property {\"moveStart\"} MOVE_START moveStart eventmoveStart 이벤트\n * @property {\"move\"} MOVE move eventmove 이벤트\n * @property {\"moveEnd\"} MOVE_END moveEnd eventmoveEnd 이벤트\n * @property {\"willChange\"} WILL_CHANGE willChange eventwillChange 이벤트\n * @property {\"changed\"} CHANGED changed eventchanged 이벤트\n * @property {\"willRestore\"} WILL_RESTORE willRestore eventwillRestore 이벤트\n * @property {\"restored\"} RESTORED restored eventrestored 이벤트\n * @property {\"select\"} SELECT select eventselect 이벤트\n * @property {\"needPanel\"} NEED_PANEL needPanel eventneedPanel 이벤트\n * @property {\"panelChange\"} PANEL_CHANGE panelChange eventpanelChange 이벤트\n * @example\n * ```ts\n * import { EVENTS } from \"@egjs/flicking\";\n * EVENTS.MOVE_START; // \"moveStart\"\n * ```\n */\nexport const EVENTS = {\n READY: \"ready\",\n BEFORE_RESIZE: \"beforeResize\",\n AFTER_RESIZE: \"afterResize\",\n HOLD_START: \"holdStart\",\n HOLD_END: \"holdEnd\",\n MOVE_START: \"moveStart\",\n MOVE: \"move\",\n MOVE_END: \"moveEnd\",\n WILL_CHANGE: \"willChange\",\n CHANGED: \"changed\",\n WILL_RESTORE: \"willRestore\",\n RESTORED: \"restored\",\n SELECT: \"select\",\n NEED_PANEL: \"needPanel\",\n VISIBLE_CHANGE: \"visibleChange\",\n REACH_EDGE: \"reachEdge\",\n PANEL_CHANGE: \"panelChange\"\n} as const;\n\n/**\n * An object with all possible predefined literal string for the {@link Flicking#align align} option\n * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체\n * @type {object}\n * @property {\"prev\"} PREV left/top align좌/상 정렬\n * @property {\"center\"} CENTER center align중앙 정렬\n * @property {\"next\"} NEXT right/bottom align우/하 정렬\n */\nexport const ALIGN = {\n PREV: \"prev\",\n CENTER: \"center\",\n NEXT: \"next\"\n} as const;\n\n/**\n * An object of directions\n * @ko 방향을 나타내는 값들을 담고 있는 객체\n * @type {object}\n * @property {\"PREV\"} PREV \"left\" when {@link Flicking#horizontal horizontal} is true, and \"top\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다\n * @property {\"NEXT\"} NEXT \"right\" when {@link Flicking#horizontal horizontal} is true, and \"bottom\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다\n * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다\n */\nexport const DIRECTION = {\n PREV: \"PREV\",\n NEXT: \"NEXT\",\n NONE: null\n} as const;\n\n/**\n * An object with all possible {@link Flicking#moveType moveType}s\n * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체\n * @type {object}\n * @property {\"snap\"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"freeScroll\"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"strict\"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n */\nexport const MOVE_TYPE = {\n SNAP: \"snap\",\n FREE_SCROLL: \"freeScroll\",\n STRICT: \"strict\"\n} as const;\n\nexport const CLASS = {\n VERTICAL: \"vertical\",\n HIDDEN: \"flicking-hidden\",\n DEFAULT_VIRTUAL: \"flicking-panel\"\n};\n\n/**\n * An object with all possible {@link Flicking#circularFallback circularFallback}s\n * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체\n * @type {object}\n * @property {string} LINEAR \"linear\"\n * @property {string} BOUND \"bound\"\n */\nexport const CIRCULAR_FALLBACK = {\n LINEAR: \"linear\",\n BOUND: \"bound\"\n} as const;\n\n/**\n * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체\n * @type {object}\n * @property {string} LTR \"ltr\"\n * @property {string} RTL \"rtl\"\n */\nexport const ORDER = {\n LTR: \"ltr\",\n RTL: \"rtl\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking, { FlickingOptions } from \"./Flicking\";\nimport FlickingError from \"./core/FlickingError\";\nimport * as ERROR from \"./const/error\";\nimport { ALIGN, DIRECTION } from \"./const/external\";\nimport { LiteralUnion, Merged, ValueOf } from \"./type/internal\";\nimport { ElementLike } from \"./type/external\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const merge = (target: From, ...sources: To[]): Merged => {\n sources.forEach(source => {\n Object.keys(source).forEach(key => {\n target[key] = source[key] as unknown;\n });\n });\n\n return target as Merged;\n};\n\nexport const getElement = (el: HTMLElement | string | null, parent?: HTMLElement): HTMLElement => {\n let targetEl: HTMLElement | null = null;\n\n if (isString(el)) {\n const parentEl = parent ? parent : document;\n const queryResult = parentEl.querySelector(el);\n if (!queryResult) {\n throw new FlickingError(ERROR.MESSAGE.ELEMENT_NOT_FOUND(el), ERROR.CODE.ELEMENT_NOT_FOUND);\n }\n targetEl = queryResult as HTMLElement;\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n targetEl = el;\n }\n\n if (!targetEl) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n\n return targetEl;\n};\n\nexport const checkExistence = (value: any, nameOnErrMsg: string) => {\n if (value == null) {\n throw new FlickingError(ERROR.MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), ERROR.CODE.VAL_MUST_NOT_NULL);\n }\n};\n\nexport const clamp = (x: number, min: number, max: number) => Math.max(Math.min(x, max), min);\n\nexport const getFlickingAttached = (val: Flicking | null): Flicking => {\n if (!val) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING);\n }\n\n return val;\n};\n\nexport const toArray = (iterable: ArrayLike): T[] => [].slice.call(iterable) as T[];\n\nexport const parseAlign = (align: LiteralUnion> | number, size: number): number => {\n let alignPoint: number | null;\n if (isString(align)) {\n switch (align) {\n case ALIGN.PREV:\n alignPoint = 0;\n break;\n case ALIGN.CENTER:\n alignPoint = 0.5 * size;\n break;\n case ALIGN.NEXT:\n alignPoint = size;\n break;\n default:\n alignPoint = parseArithmeticSize(align, size);\n if (alignPoint == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"align\", align), ERROR.CODE.WRONG_OPTION);\n }\n }\n } else {\n alignPoint = align as number;\n }\n\n return alignPoint;\n};\n\nexport const parseBounce = (bounce: FlickingOptions[\"bounce\"], size: number): number[] => {\n let parsedBounce: Array;\n\n if (Array.isArray(bounce)) {\n parsedBounce = (bounce as string[]).map(val => parseArithmeticSize(val, size));\n } else {\n const parsedVal = parseArithmeticSize(bounce, size);\n\n parsedBounce = [parsedVal, parsedVal];\n }\n\n return parsedBounce.map(val => {\n if (val == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"bounce\", bounce), ERROR.CODE.WRONG_OPTION);\n }\n return val;\n });\n};\n\nexport const parseArithmeticSize = (cssValue: number | string, base: number): number | null => {\n const parsed = parseArithmeticExpression(cssValue);\n\n if (parsed == null) return null;\n\n return parsed.percentage * base + parsed.absolute;\n};\n\nexport const parseArithmeticExpression = (cssValue: number | string): { percentage: number; absolute: number } | null => {\n const cssRegex = /(?:(\\+|\\-)\\s*)?(\\d+(?:\\.\\d+)?(%|px)?)/g;\n\n if (typeof cssValue === \"number\") {\n return { percentage: 0, absolute: cssValue };\n }\n\n const parsed = {\n percentage: 0,\n absolute: 0\n };\n let idx = 0;\n let matchResult = cssRegex.exec(cssValue);\n while (matchResult != null) {\n let sign = matchResult[1];\n const value = matchResult[2];\n const unit = matchResult[3];\n const parsedValue = parseFloat(value);\n\n if (idx <= 0) {\n sign = sign || \"+\";\n }\n\n // Return default value for values not in good form\n if (!sign) {\n return null;\n }\n\n const signMultiplier = sign === \"+\" ? 1 : -1;\n\n if (unit === \"%\") {\n parsed.percentage += signMultiplier * (parsedValue / 100);\n } else {\n parsed.absolute += signMultiplier * parsedValue;\n }\n\n // Match next occurrence\n ++idx;\n matchResult = cssRegex.exec(cssValue);\n }\n\n // None-matched\n if (idx === 0) {\n return null;\n }\n\n return parsed;\n};\n\nexport const parseCSSSizeValue = (val: string | number): string => isString(val) ? val : `${val}px`;\n\nexport const parsePanelAlign = (align: FlickingOptions[\"align\"]) => typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\nexport const getDirection = (start: number, end: number): ValueOf => {\n if (start === end) return DIRECTION.NONE;\n return start < end ? DIRECTION.NEXT : DIRECTION.PREV;\n};\n\nexport const parseElement = (element: ElementLike | ElementLike[]): HTMLElement[] => {\n if (!Array.isArray(element)) {\n element = [element];\n }\n\n const elements: HTMLElement[] = [];\n element.forEach(el => {\n if (isString(el)) {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = el;\n\n elements.push(...toArray(tempDiv.children) as HTMLElement[]);\n while (tempDiv.firstChild) {\n tempDiv.removeChild(tempDiv.firstChild);\n }\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n elements.push(el);\n } else {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n });\n\n return elements;\n};\n\nexport const getMinusCompensatedIndex = (idx: number, max: number) => idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max);\n\nexport const includes = (array: T[], target: any): target is T => {\n for (const val of array) {\n if (val === target) return true;\n }\n return false;\n};\n\nexport const isString = (val: any): val is string => typeof val === \"string\";\n\nexport const circulatePosition = (pos: number, min: number, max: number) => {\n const size = max - min;\n\n if (pos < min) {\n const offset = (min - pos) % size;\n pos = max - offset;\n } else if (pos > max) {\n const offset = (pos - max) % size;\n pos = min + offset;\n }\n\n return pos;\n};\n\nexport const find = (array: T[], checker: (val: T) => boolean): T | null => {\n for (const val of array) {\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findRight = (array: T[], checker: (val: T) => boolean): T | null => {\n for (let idx = array.length - 1; idx >= 0; idx--) {\n const val = array[idx];\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findIndex = (array: T[], checker: (val: T) => boolean): number => {\n for (let idx = 0; idx < array.length; idx++) {\n if (checker(array[idx])) {\n return idx;\n }\n }\n\n return -1;\n};\n\nexport const getProgress = (pos: number, prev: number, next: number) => (pos - prev) / (next - prev);\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nexport const getStyle = (el: HTMLElement): CSSStyleDeclaration => window.getComputedStyle(el) || (el as any).currentStyle as CSSStyleDeclaration;\n\nexport const setSize = (el: HTMLElement, { width, height }: Partial<{\n width: number | string;\n height: number | string;\n}>) => {\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n el.style.width = `${width}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n el.style.height = `${height}px`;\n }\n }\n};\n\nexport const isBetween = (val: number, min: number, max: number) => val >= min && val <= max;\n\nexport const circulateIndex = (index: number, max: number): number => {\n if (index >= max) {\n return index % max;\n } else if (index < 0) {\n return getMinusCompensatedIndex((index + 1) % max - 1, max);\n } else {\n return index;\n }\n};\n\nexport const range = (end: number): number[] => {\n const arr = new Array(end);\n\n for (let i = 0; i < end; i++) {\n arr[i] = i;\n }\n\n return arr;\n};\n\nexport const getElementSize = ({\n el,\n horizontal,\n useFractionalSize,\n useOffset,\n style\n}: {\n el: HTMLElement;\n horizontal: boolean;\n useFractionalSize: boolean;\n useOffset: boolean;\n style: CSSStyleDeclaration;\n}): number => {\n let size = 0;\n if (useFractionalSize) {\n const baseSize = parseFloat(horizontal ? style.width : style.height) || 0;\n const isBorderBoxSizing = style.boxSizing === \"border-box\";\n const border = horizontal\n ? parseFloat(style.borderLeftWidth || \"0\") + parseFloat(style.borderRightWidth || \"0\")\n : parseFloat(style.borderTopWidth || \"0\") + parseFloat(style.borderBottomWidth || \"0\");\n\n if (isBorderBoxSizing) {\n size = useOffset\n ? baseSize\n : baseSize - border;\n } else {\n const padding = horizontal\n ? parseFloat(style.paddingLeft || \"0\") + parseFloat(style.paddingRight || \"0\")\n : parseFloat(style.paddingTop || \"0\") + parseFloat(style.paddingBottom || \"0\");\n\n size = useOffset\n ? baseSize + padding + border\n : baseSize + padding;\n }\n } else {\n const sizeStr = horizontal ? \"Width\" : \"Height\";\n\n size = useOffset\n ? el[`offset${sizeStr}`]\n : el[`client${sizeStr}`];\n }\n\n return Math.max(size, 0);\n};\n\nexport const setPrototypeOf = Object.setPrototypeOf || ((obj, proto) => {\n obj.__proto__ = proto;\n return obj;\n});\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport { setPrototypeOf } from \"../utils\";\n\n/**\n * Special type of known error that {@link Flicking} throws.\n * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러\n * @property {number} code Error code에러 코드\n * @property {string} message Error message에러 메시지\n * @see {@link ERROR_CODE ERROR_CODE}\n * @example\n * ```ts\n * import Flicking, { FlickingError, ERROR_CODES } from \"@egjs/flicking\";\n * try {\n * const flicking = new Flicking(\".flicking-viewport\")\n * } catch (e) {\n * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) {\n * console.error(\"Element not found\")\n * }\n * }\n * ```\n */\nclass FlickingError extends Error {\n public code: number;\n\n /**\n * @param message Error message에러 메시지\n * @param code Error code에러 코드\n */\n public constructor(message: string, code: number) {\n super(message);\n\n setPrototypeOf(this, FlickingError.prototype);\n this.name = \"FlickingError\";\n this.code = code;\n }\n}\n\nexport default FlickingError;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { getElementSize, getStyle, isString } from \"../utils\";\n\n/**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n */\nclass Viewport {\n private _flicking: Flicking;\n private _el: HTMLElement;\n private _width: number;\n private _height: number;\n private _isBorderBoxSizing: boolean;\n private _padding: {\n left: number;\n right: number;\n top: number;\n bottom: number;\n };\n\n /**\n * A viewport(root) element\n * @ko 뷰포트(root) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n\n /**\n * Viewport width, without paddings\n * @ko 뷰포트 너비\n * @type {number}\n * @readonly\n */\n public get width() { return this._width - this._padding.left - this._padding.right; }\n /**\n * Viewport height, without paddings\n * @ko 뷰포트 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height - this._padding.top - this._padding.bottom; }\n /**\n * Viewport paddings\n * @ko 뷰포트 CSS padding 값\n * @type {object}\n * @property {number} left CSS `padding-left`\n * @property {number} right CSS `padding-right`\n * @property {number} top CSS `padding-top`\n * @property {number} bottom CSS `padding-bottom`\n * @readonly\n */\n public get padding() { return this._padding; }\n\n /**\n * @param el A viewport element뷰포트 엘리먼트\n */\n public constructor(flicking: Flicking, el: HTMLElement) {\n this._flicking = flicking;\n this._el = el;\n this._width = 0;\n this._height = 0;\n this._padding = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this._isBorderBoxSizing = false;\n }\n\n /**\n * Change viewport's size.\n * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property\n * @ko 뷰포트 크기를 변경합니다.\n * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New viewport size새 뷰포트 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n */\n public setSize({\n width,\n height\n }: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n const el = this._el;\n const padding = this._padding;\n const isBorderBoxSizing = this._isBorderBoxSizing;\n\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n const newWidth = isBorderBoxSizing\n ? width + padding.left + padding.right\n : width;\n el.style.width = `${newWidth}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n const newHeight = isBorderBoxSizing\n ? height + padding.top + padding.bottom\n : height;\n el.style.height = `${newHeight}px`;\n }\n }\n this.resize();\n }\n\n /**\n * Update width/height to the current viewport element's size\n * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다\n */\n public resize() {\n const el = this._el;\n const elStyle = getStyle(el);\n const {\n useFractionalSize\n } = this._flicking;\n\n this._width = getElementSize({\n el,\n horizontal: true,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n this._height = getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n\n this._padding = {\n left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0,\n right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0,\n top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0,\n bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0\n };\n this._isBorderBoxSizing = elStyle.boxSizing === \"border-box\";\n }\n}\n\nexport default Viewport;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\n\nclass AutoResizer {\n private _flicking: Flicking;\n private _enabled: boolean;\n private _resizeObserver: ResizeObserver | null;\n private _resizeTimer: number;\n private _maxResizeDebounceTimer: number;\n\n public get enabled() { return this._enabled; }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n this._enabled = false;\n this._resizeObserver = null;\n this._resizeTimer = -1;\n this._maxResizeDebounceTimer = -1;\n }\n\n public enable(): this {\n const flicking = this._flicking;\n const viewport = flicking.viewport;\n\n if (this._enabled) {\n this.disable();\n }\n\n if (flicking.useResizeObserver && !!window.ResizeObserver) {\n const viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;\n\n const resizeObserver = viewportSizeNot0\n ? new ResizeObserver(this._skipFirstResize)\n : new ResizeObserver(this._onResize);\n\n resizeObserver.observe(flicking.viewport.element);\n\n this._resizeObserver = resizeObserver;\n } else {\n window.addEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = true;\n\n return this;\n }\n\n public disable(): this {\n if (!this._enabled) return this;\n\n const resizeObserver = this._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n this._resizeObserver = null;\n } else {\n window.removeEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = false;\n\n return this;\n }\n\n private _onResize = () => {\n const flicking = this._flicking;\n const resizeDebounce = flicking.resizeDebounce;\n const maxResizeDebounce = flicking.maxResizeDebounce;\n\n if (resizeDebounce <= 0) {\n void flicking.resize();\n } else {\n if (this._maxResizeDebounceTimer <= 0) {\n if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) {\n this._maxResizeDebounceTimer = window.setTimeout(this._doScheduledResize, maxResizeDebounce);\n }\n }\n\n if (this._resizeTimer > 0) {\n clearTimeout(this._resizeTimer);\n this._resizeTimer = 0;\n }\n\n this._resizeTimer = window.setTimeout(this._doScheduledResize, resizeDebounce);\n }\n };\n\n private _doScheduledResize = () => {\n clearTimeout(this._resizeTimer);\n clearTimeout(this._maxResizeDebounceTimer);\n\n this._maxResizeDebounceTimer = -1;\n this._resizeTimer = -1;\n\n void this._flicking.resize();\n };\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n private _skipFirstResize = (() => {\n let isFirstResize = true;\n\n return (() => {\n if (isFirstResize) {\n isFirstResize = false;\n return;\n }\n this._onResize();\n });\n })();\n}\n\nexport default AutoResizer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../../Flicking\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VanillaElementProvider implements ElementProvider {\n private _element: HTMLElement;\n private _rendered: boolean;\n\n public get element() { return this._element; }\n public get rendered() { return this._rendered; }\n\n public constructor(element: HTMLElement) {\n this._element = element;\n this._rendered = true;\n }\n\n public show(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement !== cameraEl) {\n cameraEl.appendChild(el);\n this._rendered = true;\n }\n }\n\n public hide(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement === cameraEl) {\n cameraEl.removeChild(el);\n this._rendered = false;\n }\n }\n}\n\nexport default VanillaElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport Flicking from \"../../../Flicking\";\nimport VirtualPanel from \"../VirtualPanel\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VirtualElementProvider implements ElementProvider {\n private _flicking: Flicking;\n private _panel: VirtualPanel;\n\n public get element() { return this._virtualElement.nativeElement; }\n public get rendered() { return this._virtualElement.visible; }\n\n private get _virtualElement() {\n const flicking = this._flicking;\n const elIndex = this._panel.elementIndex;\n const virtualElements = flicking.virtual.elements;\n\n return virtualElements[elIndex];\n }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public init(panel: VirtualPanel) {\n this._panel = panel;\n }\n\n public show(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n\n public hide(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n}\n\nexport default VirtualElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { range } from \"../utils\";\nimport { CLASS } from \"../const/external\";\n\nimport VirtualPanel from \"./panel/VirtualPanel\";\n\nexport interface VirtualOptions {\n renderPanel: (panel: VirtualPanel, index: number) => string;\n initialPanelCount: number;\n cache?: boolean;\n panelClass?: string;\n}\n\n/**\n * A manager class to add / remove virtual panels\n */\nclass VirtualManager {\n private _flicking: Flicking;\n\n private _renderPanel: (panel: VirtualPanel, index: number) => string;\n private _initialPanelCount: number;\n private _cache: boolean;\n private _panelClass: string;\n\n private _elements: Array<{ nativeElement: HTMLElement; visible: boolean }>;\n\n public get elements() { return this._elements; }\n\n // Options\n /**\n * A rendering function for the panel element's innerHTML\n * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @type {function}\n * @param {VirtualPanel} panel Instance of the panel패널 인스턴스\n * @param {number} index Index of the panel패널 인덱스\n * @default \"() => {}\"\n */\n public get renderPanel() { return this._renderPanel; }\n /**\n * Initial panel count to render\n * @ko 최초로 렌더링할 패널의 개수\n * @readonly\n * @type {number}\n * @default -1\n */\n public get initialPanelCount() { return this._initialPanelCount; }\n /**\n * Whether to cache rendered panel's innerHTML\n * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @type {boolean}\n * @default false\n */\n public get cache() { return this._cache; }\n /**\n * The class name that will be applied to rendered panel elements\n * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @type {string}\n * @default \"flicking-panel\"\n */\n public get panelClass() { return this._panelClass; }\n\n public set renderPanel(val: VirtualOptions[\"renderPanel\"]) {\n this._renderPanel = val;\n this._flicking.renderer.panels.forEach((panel: VirtualPanel) => panel.uncacheRenderResult());\n }\n\n public set cache(val: NonNullable) { this._cache = val; }\n public set panelClass(val: NonNullable) { this._panelClass = val; }\n\n public constructor(flicking: Flicking, options: VirtualOptions | null) {\n this._flicking = flicking;\n\n this._renderPanel = options?.renderPanel ?? (() => \"\");\n this._initialPanelCount = options?.initialPanelCount ?? -1;\n this._cache = options?.cache ?? false;\n this._panelClass = options?.panelClass ?? CLASS.DEFAULT_VIRTUAL;\n\n this._elements = [];\n }\n\n public init() {\n const flicking = this._flicking;\n\n if (!flicking.virtualEnabled) return;\n\n if (!flicking.externalRenderer && !flicking.renderExternal) {\n this._initVirtualElements();\n }\n\n const virtualElements = flicking.camera.children;\n this._elements = virtualElements.map(el => ({ nativeElement: el, visible: true }));\n }\n\n public show(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = true;\n\n if (nativeEl.style.display) {\n nativeEl.style.display = \"\";\n }\n }\n\n public hide(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = false;\n nativeEl.style.display = \"none\";\n }\n\n /**\n * Add new virtual panels at the end of the list\n * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public append(count: number = 1): VirtualPanel[] {\n const flicking = this._flicking;\n\n return this.insert(flicking.panels.length, count);\n }\n\n /**\n * Add new virtual panels at the start of the list\n * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public prepend(count: number = 1): VirtualPanel[] {\n return this.insert(0, count);\n }\n\n /**\n * Add new virtual panels at the given index\n * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public insert(index: number, count: number = 1): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchInsert({ index, elements: range(count), hasDOMInElements: false }) as VirtualPanel[];\n }\n\n /**\n * Remove panels at the given index\n * @ko 주어진 인덱스에서 패널들을 삭제합니다\n * @param {number} count The number of panels to remove삭제할 패널의 개수\n * @returns {Array} The panels removed삭제된 패널들\n */\n public remove(index: number, count: number): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchRemove({ index, deleteCount: count, hasDOMInElements: false }) as VirtualPanel[];\n }\n\n private _initVirtualElements() {\n const flicking = this._flicking;\n const cameraElement = flicking.camera.element;\n const panelsPerView = flicking.panelsPerView;\n const fragment = document.createDocumentFragment();\n\n const newElements = range(panelsPerView + 1).map(idx => {\n const panelEl = document.createElement(\"div\");\n panelEl.className = this._panelClass;\n panelEl.dataset.elementIndex = idx.toString();\n return panelEl;\n });\n\n newElements.forEach(el => {\n fragment.appendChild(el);\n });\n\n cameraElement.appendChild(fragment);\n }\n}\n\nexport default VirtualManager;\n","/**\n * All possible @egjs/axes event keys\n * @internal\n */\nexport const EVENT = {\n HOLD: \"hold\",\n CHANGE: \"change\",\n RELEASE: \"release\",\n ANIMATION_END: \"animationEnd\",\n FINISH: \"finish\"\n} as const;\n\n/**\n * An Axis key that Flicking uses\n * @internal\n */\nexport const POSITION_KEY = \"flick\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\nimport { circulatePosition, getDirection } from \"../../utils\";\n\nexport enum STATE_TYPE {\n IDLE,\n HOLDING,\n DRAGGING,\n ANIMATING,\n DISABLED\n}\n\n/**\n * A component that shows the current status of the user input or the animation\n * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트\n * @internal\n */\nabstract class State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly holding: boolean;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly animating: boolean;\n\n protected _delta: number = 0;\n protected _targetPanel: Panel | null = null;\n\n /**\n * A sum of delta values of change events from the last hold event of Axes\n * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산\n * @type {number}\n * @readonly\n */\n public get delta() { return this._delta; }\n\n /**\n * A panel to set as {@link Control#activePanel} after the animation is finished\n * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널\n * @type {number}\n * @readonly\n */\n public get targetPanel() { return this._targetPanel; }\n\n public set targetPanel(val: Panel | null) { this._targetPanel = val; }\n\n /**\n * An callback which is called when state has changed to this state\n * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수\n * @param {State} prevState An previous state이전 상태값\n * @return {void}\n */\n public onEnter(prevState: State): void {\n this._delta = prevState._delta;\n this._targetPanel = prevState._targetPanel;\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onHold(ctx: {\n flicking: Flicking;\n axesEvent: OnHold;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onChange(ctx: {\n flicking: Flicking;\n axesEvent: OnChange;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onRelease(ctx: {\n flicking: Flicking;\n axesEvent: OnRelease;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onAnimationEnd(ctx: {\n flicking: Flicking;\n axesEvent: OnAnimationEnd;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onFinish(ctx: {\n flicking: Flicking;\n axesEvent: OnFinish;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n protected _moveToChangedPosition(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const delta = axesEvent.delta[AXES.POSITION_KEY];\n\n if (!delta) {\n return;\n }\n\n this._delta += delta;\n\n const camera = flicking.camera;\n const prevPosition = camera.position;\n const position = axesEvent.pos[AXES.POSITION_KEY];\n const newPosition = flicking.circularEnabled\n ? circulatePosition(position, camera.range.min, camera.range.max)\n : position;\n\n camera.lookAt(newPosition);\n\n const moveEvent = new ComponentEvent(EVENTS.MOVE, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, axesEvent.delta[AXES.POSITION_KEY]),\n axesEvent\n });\n\n flicking.trigger(moveEvent);\n\n if (moveEvent.isCanceled()) {\n // Return to previous position\n camera.lookAt(prevPosition);\n transitTo(STATE_TYPE.DISABLED);\n }\n }\n}\n\nexport default State;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A default state when there's no user input and no animation's playing\n * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태\n * @internal\n */\nclass IdleState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n public onEnter() {\n this._delta = 0;\n this._targetPanel = null;\n }\n\n public onHold(ctx: Parameters[0]): void {\n // Shouldn't do any action until any panels on flicking area\n const { flicking, axesEvent, transitTo } = ctx;\n\n if (flicking.renderer.panelCount <= 0) {\n transitTo(STATE_TYPE.DISABLED);\n return;\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, {\n axesEvent\n });\n\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.HOLDING);\n }\n }\n\n // By methods call\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const controller = flicking.control.controller;\n const animatingContext = controller.animatingContext;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger AnimatingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.ANIMATING).onChange(ctx);\n }\n }\n}\n\nexport default IdleState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's holding the Flicking area, but not moved a single pixel yet\n * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태\n * @internal\n */\nclass HoldingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n private _releaseEvent: OnRelease | null = null;\n\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const inputEvent = axesEvent.inputEvent as { offsetX: number; offsetY: number };\n\n const offset = flicking.horizontal\n ? inputEvent.offsetX\n : inputEvent.offsetY;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, -offset),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger DraggingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.DRAGGING).onChange(ctx);\n }\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { axesEvent }));\n\n if (axesEvent.delta.flick !== 0) {\n // Sometimes \"release\" event on axes triggered before \"change\" event\n // Especially if user flicked panel fast in really short amount of time\n // if delta is not zero, that means above case happened.\n\n // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END\n // At least one move event should be included between holdStart and holdEnd\n axesEvent.setTo({ flick: flicking.camera.position }, 0);\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n // Can't handle select event here,\n // As \"finish\" axes event happens\n this._releaseEvent = axesEvent;\n }\n\n public onFinish(ctx: Parameters[0]): void {\n const { flicking, transitTo } = ctx;\n\n // Should transite to IDLE state before select event\n // As user expects hold is already finished\n transitTo(STATE_TYPE.IDLE);\n\n if (!this._releaseEvent) {\n return;\n }\n\n // Handle release event here\n // To prevent finish event called twice\n const releaseEvent = this._releaseEvent;\n\n // Static click\n /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */\n const srcEvent = releaseEvent.inputEvent.srcEvent;\n\n let clickedElement: HTMLElement;\n if (srcEvent.type === \"touchend\") {\n const touchEvent = srcEvent as TouchEvent;\n const touch = touchEvent.changedTouches[0];\n clickedElement = document.elementFromPoint(touch.clientX, touch.clientY) as HTMLElement;\n } else {\n clickedElement = srcEvent.target;\n }\n /* eslint-enable */\n\n const panels = flicking.renderer.panels;\n let clickedPanel: Panel | null = null;\n\n for (const panel of panels) {\n if (panel.contains(clickedElement)) {\n clickedPanel = panel;\n break;\n }\n }\n\n if (clickedPanel) {\n const cameraPosition = flicking.camera.position;\n const clickedPanelPosition = clickedPanel.position;\n\n flicking.trigger(new ComponentEvent(EVENTS.SELECT, {\n index: clickedPanel.index,\n panel: clickedPanel,\n // Direction to the clicked panel\n direction: getDirection(cameraPosition, clickedPanelPosition)\n }));\n }\n }\n}\n\nexport default HoldingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's dragging the Flicking area\n * @ko 사용자가 드래깅중인 상태\n * @internal\n */\nclass DraggingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onRelease(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n // Update last position to cope with Axes's animating behavior\n // Axes uses start position when animation start\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, {\n axesEvent\n }));\n\n if (flicking.renderer.panelCount <= 0) {\n // There're no panels\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n transitTo(STATE_TYPE.ANIMATING);\n\n const control = flicking.control;\n const position = axesEvent.destPos[AXES.POSITION_KEY];\n const duration = Math.max(axesEvent.duration, flicking.duration);\n\n try {\n void control.moveToPosition(position, duration, axesEvent);\n } catch (err) {\n transitTo(STATE_TYPE.IDLE);\n axesEvent.setTo({ [AXES.POSITION_KEY]: flicking.camera.position }, 0);\n }\n }\n}\n\nexport default DraggingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking's animating by user input or method call\n * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태\n * @internal\n */\nclass AnimatingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onHold(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const targetPanel = this._targetPanel;\n const control = flicking.control;\n\n this._delta = 0;\n flicking.control.updateInput();\n\n if (flicking.changeOnHold && targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { axesEvent });\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.DRAGGING);\n }\n }\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onFinish(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const control = flicking.control;\n const controller = control.controller;\n const animatingContext = controller.animatingContext;\n\n transitTo(STATE_TYPE.IDLE);\n\n flicking.trigger(new ComponentEvent(EVENTS.MOVE_END, {\n isTrusted: axesEvent.isTrusted,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n }));\n\n const targetPanel = this._targetPanel;\n if (targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n }\n}\n\nexport default AnimatingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking is stopped by event's `stop` method\n * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태\n * @internal\n */\nclass DisabledState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onAnimationEnd(ctx: Parameters[0]): void {\n const { transitTo } = ctx;\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onChange(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // Can stop Axes's change event\n axesEvent.stop();\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // This is needed when stopped hold start event\n if (axesEvent.delta.flick === 0) {\n transitTo(STATE_TYPE.IDLE);\n }\n }\n}\n\nexport default DisabledState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { AxesEvents } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport * as AXES from \"../const/axes\";\n\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport State, { STATE_TYPE } from \"./states/State\";\n\n/**\n * @internal\n */\nclass StateMachine {\n private _state: State;\n\n public get state(): State { return this._state; }\n\n public constructor() {\n this._state = new IdleState();\n }\n\n public fire(eventType: keyof AxesEvents, externalCtx: {\n flicking: Flicking;\n axesEvent: any;\n }) {\n const currentState = this._state;\n const ctx = { ...externalCtx, transitTo: this.transitTo };\n\n switch (eventType) {\n case AXES.EVENT.HOLD:\n currentState.onHold(ctx);\n break;\n case AXES.EVENT.CHANGE:\n currentState.onChange(ctx);\n break;\n case AXES.EVENT.RELEASE:\n currentState.onRelease(ctx);\n break;\n case AXES.EVENT.ANIMATION_END:\n currentState.onAnimationEnd(ctx);\n break;\n case AXES.EVENT.FINISH:\n currentState.onFinish(ctx);\n break;\n }\n }\n\n public transitTo = (nextStateType: STATE_TYPE): State => {\n let nextState: State;\n\n switch (nextStateType) {\n case STATE_TYPE.IDLE:\n nextState = new IdleState();\n break;\n case STATE_TYPE.HOLDING:\n nextState = new HoldingState();\n break;\n case STATE_TYPE.DRAGGING:\n nextState = new DraggingState();\n break;\n case STATE_TYPE.ANIMATING:\n nextState = new AnimatingState();\n break;\n case STATE_TYPE.DISABLED:\n nextState = new DisabledState();\n break;\n }\n\n nextState.onEnter(this._state);\n\n this._state = nextState;\n\n return this._state;\n };\n}\n\nexport default StateMachine;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Axes, { PanInput, AxesEvents, OnRelease } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\nimport { ORDER } from \"../const/external\";\nimport { getFlickingAttached, parseBounce } from \"../utils\";\nimport { ControlParams } from \"../type/external\";\n\nimport StateMachine from \"./StateMachine\";\n\n/**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @internal\n */\nclass AxesController {\n private _flicking: Flicking | null;\n private _axes: Axes | null;\n private _panInput: PanInput | null;\n private _stateMachine: StateMachine;\n\n private _animatingContext: { start: number; end: number; offset: number };\n private _dragged: boolean;\n\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스\n * @type {Axes | null}\n * @see https://naver.github.io/egjs-axes/docs/api/Axes\n * @readonly\n */\n public get axes() { return this._axes; }\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스\n * @type {PanInput | null}\n * @see https://naver.github.io/egjs-axes/docs/api/PanInput\n * @readonly\n */\n public get panInput() { return this._panInput; }\n /**\n * @internal\n */\n public get stateMachine() { return this._stateMachine; }\n /**\n * A activated {@link State} that shows the current status of the user input or the animation\n * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다\n * @type {State}\n */\n public get state() { return this._stateMachine.state; }\n /**\n * A context of the current animation playing\n * @ko 현재 재생중인 애니메이션 정보\n * @type {object}\n * @property {number} start A start position of the animation애니메이션 시작 지점\n * @property {number} end A end position of the animation애니메이션 끝 지점\n * @property {number} offset camera offset카메라 오프셋\n * @readonly\n */\n public get animatingContext() { return this._animatingContext; }\n /**\n * A current control parameters of the Axes instance\n * @ko 활성화된 현재 Axes 패러미터들\n * @type {ControlParams}\n */\n public get controlParams(): ControlParams {\n const axes = this._axes;\n\n if (!axes) {\n return {\n range: { min: 0, max: 0 },\n position: 0,\n circular: false\n };\n }\n\n const axis = axes.axis[AXES.POSITION_KEY];\n\n return {\n range: { min: axis.range![0], max: axis.range![1] },\n circular: (axis.circular as boolean[])[0],\n position: this.position\n };\n }\n\n /**\n * A Boolean indicating whether the user input is enabled\n * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get enabled() { return this._panInput?.isEnabled() ?? false; }\n /**\n * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값\n * @type {number}\n * @readonly\n */\n public get position() { return this._axes?.get([AXES.POSITION_KEY])[AXES.POSITION_KEY] ?? 0; }\n /**\n * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값\n * @type {number[]}\n * @readonly\n */\n public get range() { return this._axes?.axis[AXES.POSITION_KEY].range ?? [0, 0]; }\n /**\n * Actual bounce size(px)\n * @ko 적용된 bounce 크기(px 단위)\n * @type {number[]}\n * @readonly\n */\n public get bounce() { return this._axes?.axis[AXES.POSITION_KEY].bounce as number[] | undefined; }\n\n /** */\n public constructor() {\n this._resetInternalValues();\n this._stateMachine = new StateMachine();\n }\n\n /**\n * Initialize AxesController\n * @ko AxesController를 초기화합니다\n * @param {Flicking} flicking An instance of Flicking\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n\n this._axes = new Axes({\n [AXES.POSITION_KEY]: {\n range: [0, 0],\n circular: false,\n bounce: [0, 0]\n }\n }, {\n deceleration: flicking.deceleration,\n interruptable: flicking.interruptable,\n nested: flicking.nested,\n easing: flicking.easing\n });\n this._panInput = new PanInput(flicking.viewport.element, {\n inputType: flicking.inputType,\n threshold: 1,\n iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,\n preventDefaultOnDrag: flicking.preventDefaultOnDrag,\n scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],\n releaseOnScroll: true\n });\n\n const axes = this._axes;\n\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], this._panInput);\n\n for (const key in AXES.EVENT) {\n const eventType = AXES.EVENT[key] as keyof AxesEvents;\n\n axes.on(eventType, (e: AxesEvents[typeof eventType]) => {\n this._stateMachine.fire(eventType, {\n flicking,\n axesEvent: e\n });\n });\n }\n\n return this;\n }\n\n /**\n * Destroy AxesController and return to initial state\n * @ko AxesController를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n if (this._axes) {\n this.removePreventClickHandler();\n this._axes.destroy();\n }\n\n this._panInput?.destroy();\n\n this._resetInternalValues();\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._panInput?.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._panInput?.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._panInput?.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @chainable\n * @return {this}\n */\n public updateAnimation(position: number, duration?: number): this {\n this._animatingContext = {\n ...this._animatingContext,\n end: position\n };\n this._axes?.updateAnimation({\n destPos: { [AXES.POSITION_KEY]: position },\n duration\n });\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n this._axes?.stopAnimation();\n\n return this;\n }\n\n /**\n * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before\n * {@link AxesController#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public update(controlParams: ControlParams): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const axes = this._axes!;\n const axis = axes.axis[AXES.POSITION_KEY];\n\n axis.circular = [controlParams.circular, controlParams.circular];\n axis.range = [controlParams.range.min, controlParams.range.max];\n axis.bounce = parseBounce(flicking.bounce, camera.size);\n\n axes.axisManager.set({ [AXES.POSITION_KEY]: controlParams.position });\n\n return this;\n }\n\n /**\n * Attach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다\n * @return {this}\n */\n public addPreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.on(AXES.EVENT.HOLD, this._onAxesHold);\n axes.on(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.addEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Detach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다\n * @return {this}\n */\n public removePreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.off(AXES.EVENT.HOLD, this._onAxesHold);\n axes.off(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.removeEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다.\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise {\n const axes = this._axes;\n const state = this._stateMachine.state;\n\n if (!axes) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING));\n }\n\n const startPos = axes.get([AXES.POSITION_KEY])[AXES.POSITION_KEY];\n\n if (startPos === position) {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.lookAt(position);\n\n if (state.targetPanel) {\n flicking.control.setActive(state.targetPanel, flicking.control.activePanel, axesEvent?.isTrusted ?? false);\n }\n return Promise.resolve();\n }\n\n this._animatingContext = {\n start: startPos,\n end: position,\n offset: 0\n };\n\n const animate = () => {\n const resetContext = () => {\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n };\n\n axes.once(AXES.EVENT.FINISH, resetContext);\n\n if (axesEvent) {\n axesEvent.setTo({ [AXES.POSITION_KEY]: position }, duration);\n } else {\n axes.setTo({ [AXES.POSITION_KEY]: position }, duration);\n }\n };\n\n return new Promise((resolve, reject) => {\n const animationFinishHandler = () => {\n axes.off(AXES.EVENT.HOLD, interruptionHandler);\n resolve();\n };\n\n const interruptionHandler = () => {\n axes.off(AXES.EVENT.FINISH, animationFinishHandler);\n reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));\n };\n\n axes.once(AXES.EVENT.FINISH, animationFinishHandler);\n axes.once(AXES.EVENT.HOLD, interruptionHandler);\n\n animate();\n });\n }\n\n public updateDirection() {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const panInput = this._panInput!;\n\n axes.disconnect(panInput);\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], panInput);\n\n panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];\n }\n\n private _resetInternalValues() {\n this._flicking = null;\n this._axes = null;\n this._panInput = null;\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n this._dragged = false;\n }\n\n private _onAxesHold = () => {\n this._dragged = false;\n };\n\n private _onAxesChange = () => {\n this._dragged = !!this._panInput?.isEnabled();\n };\n\n private _preventClickWhenDragged = (e: MouseEvent) => {\n if (this._dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n this._dragged = false;\n };\n}\n\nexport default AxesController;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AxesController from \"../control/AxesController\";\nimport { DIRECTION, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getDirection, getFlickingAttached } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\n/**\n * A component that manages inputs and animation of Flicking\n * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트\n */\nabstract class Control {\n // Internal States\n protected _flicking: Flicking | null;\n protected _controller: AxesController;\n protected _activePanel: Panel | null;\n protected _nextPanel: Panel | null;\n\n /**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @type {AxesController}\n * @readonly\n */\n public get controller() { return this._controller; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get activeIndex() { return this._activePanel?.index ?? -1; }\n /**\n * An active panel\n * @ko 현재 선택된 패널\n * @type {Panel | null}\n * @readonly\n */\n public get activePanel() { return this._activePanel; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._controller.state.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._controller.state.holding; }\n\n /** */\n public constructor() {\n this._flicking = null;\n this._controller = new AxesController();\n this._activePanel = null;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @method\n * @abstract\n * @memberof Control\n * @instance\n * @name moveToPosition\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise;\n\n /**\n * Initialize Control\n * @ko Control을 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._controller.init(flicking);\n\n return this;\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._controller.destroy();\n\n this._flicking = null;\n this._activePanel = null;\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._controller.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._controller.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._controller.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우\n * @return {this}\n */\n public updateAnimation(panel: Panel, duration?: number, direction?: ValueOf): this {\n const state = this._controller.state;\n const position = this._getPosition(panel, direction ?? DIRECTION.NONE);\n\n state.targetPanel = panel;\n this._controller.updateAnimation(position, duration);\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n const state = this._controller.state;\n\n state.targetPanel = null;\n this._controller.stopAnimation();\n\n return this;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n camera.lookAt(camera.clampToReachablePosition(activePanel.position));\n }\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._controller.update(camera.controlParams);\n\n return this;\n }\n\n /**\n * Reset {@link Control#activePanel activePanel} to `null`\n * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다\n * @chainable\n * @return {this}\n */\n public resetActive(): this {\n this._activePanel = null;\n\n return this;\n }\n\n /**\n * Move {@link Camera} to the given panel\n * @ko {@link Camera}를 해당 패널 위로 이동합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {object} options An options object옵션 오브젝트\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public async moveToPanel(panel: Panel, {\n duration,\n direction = DIRECTION.NONE,\n axesEvent\n }: {\n duration: number;\n direction?: ValueOf;\n axesEvent?: OnRelease;\n }) {\n const position = this._getPosition(panel, direction);\n this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);\n\n return this._animateToPosition({ position, duration, newActivePanel: panel, axesEvent });\n }\n\n /**\n * @internal\n */\n public setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) {\n const flicking = getFlickingAttached(this._flicking);\n\n this._activePanel = newActivePanel;\n this._nextPanel = null;\n\n flicking.camera.updateAdaptiveHeight();\n\n if (newActivePanel !== prevActivePanel) {\n flicking.trigger(new ComponentEvent(EVENTS.CHANGED, {\n index: newActivePanel.index,\n panel: newActivePanel,\n prevIndex: prevActivePanel?.index ?? -1,\n prevPanel: prevActivePanel,\n isTrusted,\n direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE\n }));\n } else {\n flicking.trigger(new ComponentEvent(EVENTS.RESTORED, {\n isTrusted\n }));\n }\n }\n\n /**\n * @internal\n */\n public copy(control: Control) {\n this._flicking = control._flicking;\n this._activePanel = control._activePanel;\n this._controller = control._controller;\n }\n\n protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf) {\n const flicking = getFlickingAttached(this._flicking);\n const triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n const event = new ComponentEvent(triggeringEvent, {\n index: panel.index,\n panel,\n isTrusted: axesEvent?.isTrusted || false,\n direction: direction ?? getDirection(activePanel?.position ?? camera.position, position)\n });\n\n this._nextPanel = panel;\n flicking.trigger(event);\n\n if (event.isCanceled()) {\n throw new FlickingError(ERROR.MESSAGE.STOP_CALLED_BY_USER, ERROR.CODE.STOP_CALLED_BY_USER);\n }\n }\n\n protected async _animateToPosition({\n position,\n duration,\n newActivePanel,\n axesEvent\n }: {\n position: number;\n duration: number;\n newActivePanel: Panel;\n axesEvent?: OnRelease;\n }) {\n const flicking = getFlickingAttached(this._flicking);\n const animate = () => this._controller.animateTo(position, duration, axesEvent);\n const state = this._controller.state;\n\n state.targetPanel = newActivePanel;\n\n if (duration <= 0) {\n return animate();\n } else {\n return animate().then(async () => {\n await flicking.renderer.render();\n }).catch(err => {\n if (axesEvent && err instanceof FlickingError && err.code === ERROR.CODE.ANIMATION_INTERRUPTED) return;\n throw err;\n });\n }\n }\n\n private _getPosition(panel: Panel, direction: ValueOf = DIRECTION.NONE) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n let position = panel.position;\n const nearestAnchor = camera.findNearestAnchor(position);\n\n if (panel.removed || !nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(panel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n if (!camera.canReach(panel)) {\n // Override position & panel if that panel is not reachable\n position = nearestAnchor.position;\n panel = nearestAnchor.panel;\n } else if (flicking.circularEnabled) {\n // Circular mode is enabled, find nearest distance to panel\n const camPos = this._controller.position; // Actual position of the Axes\n const camRangeDiff = camera.rangeDiff;\n const possiblePositions = [position, position + camRangeDiff, position - camRangeDiff]\n .filter(pos => {\n if (direction === DIRECTION.NONE) return true;\n\n return direction === DIRECTION.PREV\n ? pos <= camPos\n : pos >= camPos;\n });\n\n position = possiblePositions.reduce((nearestPosition, pos) => {\n if (Math.abs(camPos - pos) < Math.abs(camPos - nearestPosition)) {\n return pos;\n } else {\n return nearestPosition;\n }\n }, Infinity);\n }\n\n return position;\n }\n}\n\nexport default Control;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"./panel/Panel\";\n\n/**\n * A data component that has actual position where the camera should be stopped at\n * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트\n */\nclass AnchorPoint {\n private _index: number;\n private _pos: number;\n private _panel: Panel;\n\n /**\n * Index of AnchorPoint\n * @ko AnchorPoint의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of AnchorPoint\n * @ko AnchorPoint의 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos; }\n /**\n * A {@link Panel} instance AnchorPoint is referencing to\n * @ko AnchorPoint가 참조하고 있는 {@link Panel}\n * @type {Panel}\n * @readonly\n */\n public get panel() { return this._panel; }\n\n /**\n * @param {object} options An options object옵션 객체\n * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스\n * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표\n * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel}\n */\n public constructor({\n index,\n position,\n panel\n }: {\n index: number;\n position: number;\n panel: Panel;\n }) {\n this._index = index;\n this._pos = position;\n this._panel = panel;\n }\n}\n\nexport default AnchorPoint;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport { circulateIndex, clamp, getFlickingAttached } from \"../utils\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link SnapControl}\n * @ko {@link SnapControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels can go after release입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n */\nexport interface SnapControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that uses a release momentum to choose destination panel\n * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control}\n */\nclass SnapControl extends Control {\n private _count: SnapControlOptions[\"count\"];\n\n /**\n * Maximum number of panels can go after release\n * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n * @type {number}\n * @default Infinity\n */\n public get count() { return this._count; }\n\n public set count(val: SnapControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = Infinity\n }: Partial = {}) {\n super();\n\n this._count = count;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activeAnchor = camera.findActiveAnchor();\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n const state = this._controller.state;\n\n if (!activeAnchor || !anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);\n\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n const absPosDelta = Math.abs(posDelta);\n const snapDelta = axesEvent && axesEvent.delta[AXES.POSITION_KEY] !== 0\n ? Math.abs(axesEvent.delta[AXES.POSITION_KEY])\n : absPosDelta;\n let targetAnchor: AnchorPoint;\n\n if (snapDelta >= snapThreshold && snapDelta > 0) {\n // Move to anchor at position\n targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);\n } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {\n // Move to the adjacent panel\n targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);\n } else {\n // Fallback to nearest panel from current camera\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent);\n\n return this._animateToPosition({\n position: camera.clampToReachablePosition(targetAnchor.position),\n duration,\n newActivePanel: targetAnchor.panel,\n axesEvent\n });\n }\n\n private _findSnappedAnchor(position: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const count = this._count;\n\n const currentPos = camera.position;\n\n const clampedPosition = camera.clampToReachablePosition(position);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtCamera || !anchorAtPosition) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n if (!isFinite(count)) {\n return anchorAtPosition;\n }\n\n const panelCount = flicking.panelCount;\n const anchors = camera.anchorPoints;\n\n let loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff);\n if ((position > currentPos && anchorAtPosition.index < anchorAtCamera.index)\n || (anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount += 1;\n } else if ((position < currentPos && anchorAtPosition.index > anchorAtCamera.index)\n || (anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount -= 1;\n }\n\n const circularIndexOffset = loopCount * panelCount;\n const anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset;\n\n if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) {\n const anchor = anchors[anchorAtPosition.index];\n\n return new AnchorPoint({\n index: anchor.index,\n position: anchor.position + loopCount * camera.rangeDiff,\n panel: anchor.panel\n });\n }\n\n if (flicking.circularEnabled) {\n const targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)];\n let loop = Math.floor(count / panelCount);\n\n if (position > currentPos && targetAnchor.index < anchorAtCamera.index) {\n loop += 1;\n } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) {\n loop -= 1;\n }\n\n return new AnchorPoint({\n index: targetAnchor.index,\n position: targetAnchor.position + loop * camera.rangeDiff,\n panel: targetAnchor.panel\n });\n } else {\n return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)];\n }\n }\n\n private _findAdjacentAnchor(position: number, posDelta: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n if (camera.circularEnabled) {\n const anchorIncludePosition = camera.findAnchorIncludePosition(position);\n\n if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) {\n return anchorIncludePosition;\n }\n }\n\n const adjacentAnchor = (posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) ?? anchorAtCamera;\n\n return adjacentAnchor;\n }\n\n private _calcSnapThreshold(threshold: number, position: number, activeAnchor: AnchorPoint): number {\n const isNextDirection = position > activeAnchor.position;\n const panel = activeAnchor.panel;\n const panelSize = panel.size;\n const alignPos = panel.alignPosition;\n\n // Minimum distance needed to decide prev/next panel as nearest\n /*\n * | Prev | Next |\n * |<------>|<------------>|\n * [ |<-Anchor ]\n */\n return Math.max(threshold, isNextDirection\n ? panelSize - alignPos + panel.margin.next\n : alignPos + panel.margin.prev);\n }\n}\n\nexport default SnapControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached } from \"../utils\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link FreeControl}\n * @ko {@link FreeControl} 생성시 사용되는 옵션\n * @interface\n * @property {boolean} stopAtEdge Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n */\nexport interface FreeControlOptions {\n stopAtEdge: boolean;\n}\n\n/**\n * A {@link Control} that can be scrolled freely without alignment\n * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control}\n */\nclass FreeControl extends Control {\n private _stopAtEdge: FreeControlOptions[\"stopAtEdge\"];\n\n /**\n * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n * @type {boolean}\n * @default true\n */\n public get stopAtEdge() { return this._stopAtEdge; }\n\n public set stopAtEdge(val: FreeControlOptions[\"stopAtEdge\"]) { this._stopAtEdge = val; }\n\n /** */\n public constructor({\n stopAtEdge = true\n }: Partial = {}) {\n super();\n\n this._stopAtEdge = stopAtEdge;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n const panelRange = activePanel.range;\n const newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n camera.lookAt(camera.clampToReachablePosition(newPosition));\n }\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n\n const camera = flicking.camera;\n const targetPos = camera.clampToReachablePosition(position);\n\n const anchorAtPosition = camera.findAnchorIncludePosition(targetPos);\n\n if (!anchorAtPosition) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const targetPanel = anchorAtPosition.panel;\n\n // Trigger only change event\n if (targetPanel !== this._activePanel) {\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n }\n\n return this._animateToPosition({ position: this._stopAtEdge ? targetPos : position, duration, newActivePanel: targetPanel, axesEvent });\n }\n}\n\nexport default FreeControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport Panel from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { clamp, getFlickingAttached, getMinusCompensatedIndex, isBetween } from \"../utils\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n/**\n * An options for the {@link StrictControl}\n * @ko {@link StrictControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels that can be moved at a time최대로 움직일 수 있는 패널의 개수\n */\nexport interface StrictControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that allow you to select the maximum number of panels to move at a time\n * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control}\n */\nclass StrictControl extends Control {\n private _count: number;\n private _indexRange: { min: number; max: number };\n\n /**\n * Maximum number of panels that can be moved at a time\n * @ko 최대로 움직일 수 있는 패널의 개수\n * @type {number}\n * @default 1\n */\n public get count() { return this._count; }\n\n public set count(val: StrictControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = 1\n }: Partial = {}) {\n super();\n\n this._count = count;\n this._resetIndexRange();\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy() {\n super.destroy();\n\n this._resetIndexRange();\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const renderer = flicking.renderer;\n const controller = this._controller;\n const controlParams = camera.controlParams;\n const count = this._count;\n\n const activePanel = controller.state.animating\n ? camera.findNearestAnchor(camera.position)?.panel\n : this._activePanel;\n\n if (!activePanel) {\n controller.update(controlParams);\n this._resetIndexRange();\n return this;\n }\n\n const cameraRange = controlParams.range;\n const currentPos = activePanel.position;\n const currentIndex = activePanel.index;\n const panelCount = renderer.panelCount;\n\n let prevPanelIndex = currentIndex - count;\n let nextPanelIndex = currentIndex + count;\n\n if (prevPanelIndex < 0) {\n prevPanelIndex = flicking.circularEnabled\n ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount)\n : clamp(prevPanelIndex, 0, panelCount - 1);\n }\n if (nextPanelIndex >= panelCount) {\n nextPanelIndex = flicking.circularEnabled\n ? nextPanelIndex % panelCount\n : clamp(nextPanelIndex, 0, panelCount - 1);\n }\n\n const prevPanel = renderer.panels[prevPanelIndex];\n const nextPanel = renderer.panels[nextPanelIndex];\n\n let prevPos = Math.max(prevPanel.position, cameraRange.min);\n let nextPos = Math.min(nextPanel.position, cameraRange.max);\n\n if (prevPos > currentPos) {\n prevPos -= camera.rangeDiff;\n }\n if (nextPos < currentPos) {\n nextPos += camera.rangeDiff;\n }\n\n controlParams.range = {\n min: prevPos,\n max: nextPos\n };\n\n if (controlParams.circular) {\n if (controlParams.position < prevPos) {\n controlParams.position += camera.rangeDiff;\n }\n\n if (controlParams.position > nextPos) {\n controlParams.position -= camera.rangeDiff;\n }\n }\n\n controlParams.circular = false;\n controller.update(controlParams);\n\n this._indexRange = {\n min: prevPanel.index,\n max: nextPanel.index\n };\n\n return this;\n }\n\n public async moveToPanel(panel: Panel, options: Parameters[1]): Promise {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const controller = this._controller;\n\n controller.update(camera.controlParams);\n\n return super.moveToPanel(panel, options);\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const currentPanel = this._nextPanel ?? this._activePanel;\n const axesRange = this._controller.range;\n const indexRange = this._indexRange;\n const cameraRange = camera.range;\n const state = this._controller.state;\n\n const clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtPosition || !currentPanel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const prevPos = currentPanel.position;\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n\n const isOverThreshold = Math.abs(posDelta) >= flicking.threshold;\n const adjacentAnchor = (position > prevPos)\n ? camera.getNextAnchor(anchorAtPosition)\n : camera.getPrevAnchor(anchorAtPosition);\n\n let targetPos: number;\n let targetPanel: Panel;\n\n const anchors = camera.anchorPoints;\n const firstAnchor = anchors[0];\n const lastAnchor = anchors[anchors.length - 1];\n\n const shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max);\n const shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max);\n\n const isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max\n ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max)\n : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max);\n\n if (shouldBounceToFirst || shouldBounceToLast) {\n // In bounce area\n const targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor;\n\n targetPanel = targetAnchor.panel;\n targetPos = targetAnchor.position;\n } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) {\n // Move to anchor at position\n targetPanel = anchorAtPosition.panel;\n targetPos = anchorAtPosition.position;\n } else if (isOverThreshold && isAdjacent) {\n // Move to adjacent anchor\n targetPanel = adjacentAnchor!.panel;\n targetPos = adjacentAnchor!.position;\n } else {\n // Fallback to nearest panel from current camera\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n if (!anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n\n return this._animateToPosition({\n position: targetPos,\n duration,\n newActivePanel: targetPanel,\n axesEvent\n });\n }\n\n public setActive = (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => {\n super.setActive(newActivePanel, prevActivePanel, isTrusted);\n this.updateInput();\n };\n\n private _resetIndexRange() {\n this._indexRange = { min: 0, max: 0 };\n }\n}\n\nexport default StrictControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Control from \"./Control\";\nimport SnapControl, { SnapControlOptions } from \"./SnapControl\";\nimport FreeControl, { FreeControlOptions } from \"./FreeControl\";\nimport StrictControl, { StrictControlOptions } from \"./StrictControl\";\nimport AxesController from \"./AxesController\";\nimport State from \"./states/State\";\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport StateMachine from \"./StateMachine\";\n\nexport {\n Control,\n SnapControl,\n FreeControl,\n StrictControl,\n AxesController,\n State,\n IdleState,\n HoldingState,\n DraggingState,\n AnimatingState,\n DisabledState,\n StateMachine\n};\n\nexport type {\n SnapControlOptions,\n FreeControlOptions,\n StrictControlOptions\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { clamp } from \"../../utils\";\n\n/**\n * A mode of camera\n */\nabstract class CameraMode {\n protected _flicking: Flicking;\n\n /** */\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public abstract checkAvailability(): boolean;\n public abstract getRange(): { min: number; max: number };\n\n public getAnchors(): AnchorPoint[] {\n const panels = this._flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n const anchorsIncludingPosition = anchors.filter(anchor => anchor.panel.includePosition(position, true));\n\n return anchorsIncludingPosition.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n let prevDist = Infinity;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.abs(anchor.position - position);\n\n if (dist > prevDist) {\n // Return previous anchor\n return anchors[anchorIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return anchors[anchors.length - 1];\n }\n\n public clampToReachablePosition(position: number): number {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n return clamp(position, range.min, range.max);\n }\n\n public getCircularOffset(): number {\n return 0;\n }\n\n public canReach(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n if (panel.removed) return false;\n\n const panelPos = panel.position;\n\n return panelPos >= range.min && panelPos <= range.max;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const visibleRange = camera.visibleRange;\n // Should not include margin, as we don't declare what the margin is visible as what the panel is visible.\n return panel.isVisibleOnRange(visibleRange.min, visibleRange.max);\n }\n}\n\nexport default CameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport CameraMode from \"./CameraMode\";\n\nclass LinearCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n // It's always available\n return true;\n }\n\n public getRange(): { min: number; max: number } {\n const renderer = this._flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n return { min: firstPanel?.position ?? 0, max: lastPanel?.position ?? 0 };\n }\n}\n\nexport default LinearCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { DIRECTION } from \"../../const/external\";\nimport { circulatePosition } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\n/**\n * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop\n * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드\n */\nclass CircularCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n if (panels.length <= 0) {\n return false;\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n const visibleSize = flicking.camera.size;\n const panelSizeSum = lastPanelNext - firstPanelPrev;\n\n const canSetCircularMode = panels\n .every(panel => panelSizeSum - panel.size >= visibleSize);\n\n return canSetCircularMode;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return { min: 0, max: 0 };\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n return { min: firstPanelPrev, max: lastPanelNext };\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n const camRange = camera.range;\n let minDist = Infinity;\n let minDistIndex = -1;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.min(\n Math.abs(anchor.position - position),\n Math.abs(anchor.position - camRange.min + camRange.max - position),\n Math.abs(position - camRange.min + camRange.max - anchor.position)\n );\n\n if (dist < minDist) {\n minDist = dist;\n minDistIndex = anchorIdx;\n }\n }\n\n // Return last anchor\n return anchors[minDistIndex];\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n const rangeDiff = camera.rangeDiff;\n const anchorCount = anchors.length;\n const positionInRange = circulatePosition(position, range.min, range.max);\n\n let anchorInRange: AnchorPoint | null = super.findAnchorIncludePosition(positionInRange);\n\n if (anchorCount > 0 && (position === range.min || position === range.max)) {\n const possibleAnchors = [\n anchorInRange,\n new AnchorPoint({\n index: 0,\n position: anchors[0].position + rangeDiff,\n panel: anchors[0].panel\n }),\n new AnchorPoint({\n index: anchorCount - 1,\n position: anchors[anchorCount - 1].position - rangeDiff,\n panel: anchors[anchorCount - 1].panel\n })\n ].filter(anchor => !!anchor) as AnchorPoint[];\n\n anchorInRange = possibleAnchors.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n if (!anchorInRange) return null;\n\n if (position < range.min) {\n const loopCount = -Math.floor((range.min - position) / rangeDiff) - 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n } else if (position > range.max) {\n const loopCount = Math.floor((position - range.max) / rangeDiff) + 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n }\n\n return anchorInRange;\n }\n\n public getCircularOffset(): number {\n const flicking = this._flicking;\n const camera = flicking.camera;\n\n if (!camera.circularEnabled) return 0;\n\n const toggled = flicking.panels.filter(panel => panel.toggled);\n const toggledPrev = toggled.filter(panel => panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = toggled.filter(panel => panel.toggleDirection === DIRECTION.NEXT);\n\n return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext);\n }\n\n public clampToReachablePosition(position: number): number {\n // Basically all position is reachable for circular camera\n return position;\n }\n\n public canReach(panel: Panel): boolean {\n if (panel.removed) return false;\n\n // Always reachable on circular mode\n return true;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n const rangeDiff = camera.rangeDiff;\n const visibleRange = camera.visibleRange;\n const visibleInCurrentRange = super.canSee(panel);\n\n // Check looped visible area for circular case\n if (visibleRange.min < range.min) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff);\n } else if (visibleRange.max > range.max) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff);\n }\n\n return visibleInCurrentRange;\n }\n\n private _calcPanelAreaSum(panels: Panel[]) {\n return panels.reduce((sum: number, panel: Panel) => sum + panel.sizeIncludingMargin, 0);\n }\n}\n\nexport default CircularCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport Panel from \"../../core/panel/Panel\";\nimport { parseAlign } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\nclass BoundCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return false;\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n return isBiggerThanViewport;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const alignPos = flicking.camera.alignPosition;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return { min: 0, max: 0 };\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n const firstPos = firstPanelPrev + alignPos;\n const lastPos = lastPanelNext - viewportSize + alignPos;\n\n if (isBiggerThanViewport) {\n return { min: firstPos, max: lastPos };\n } else {\n const align = flicking.camera.align;\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n const pos = firstPos + parseAlign(alignVal, lastPos - firstPos);\n\n return { min: pos, max: pos };\n }\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const camera = flicking.camera;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return [];\n }\n\n const range = flicking.camera.range;\n const reachablePanels = panels.filter(panel => camera.canReach(panel));\n\n if (reachablePanels.length > 0) {\n const shouldPrependBoundAnchor = reachablePanels[0].position !== range.min;\n const shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max;\n const indexOffset = shouldPrependBoundAnchor ? 1 : 0;\n\n const newAnchors = reachablePanels.map((panel, idx) => new AnchorPoint({\n index: idx + indexOffset,\n position: panel.position,\n panel\n }));\n\n if (shouldPrependBoundAnchor) {\n newAnchors.splice(0, 0, new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panels[reachablePanels[0].index - 1]\n }));\n }\n\n if (shouldAppendBoundAnchor) {\n newAnchors.push(new AnchorPoint({\n index: newAnchors.length,\n position: range.max,\n panel: panels[reachablePanels[reachablePanels.length - 1].index + 1]\n }));\n }\n\n return newAnchors;\n } else if (range.min !== range.max) {\n // There're more than 2 panels\n const nearestPanelAtMin = this._findNearestPanel(range.min, panels);\n const panelAtMin = nearestPanelAtMin.index === panels.length - 1\n ? nearestPanelAtMin.prev()!\n : nearestPanelAtMin;\n const panelAtMax = panelAtMin.next()!;\n\n return [\n new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panelAtMin\n }),\n new AnchorPoint({\n index: 1,\n position: range.max,\n panel: panelAtMax\n })\n ];\n } else {\n return [new AnchorPoint({\n index: 0,\n position: range.min,\n panel: this._findNearestPanel(range.min, panels)\n })];\n }\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n if (position <= range.min) {\n return anchors[0];\n } else if (position >= range.max) {\n return anchors[anchors.length - 1];\n } else {\n return super.findAnchorIncludePosition(position);\n }\n }\n\n private _findNearestPanel(pos: number, panels: Panel[]): Panel {\n let prevDist = Infinity;\n for (let panelIdx = 0; panelIdx < panels.length; panelIdx++) {\n const panel = panels[panelIdx];\n const dist = Math.abs(panel.position - pos);\n\n if (dist > prevDist) {\n // Return previous anchor\n return panels[panelIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return panels[panels.length - 1];\n }\n}\n\nexport default BoundCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport * as ERROR from \"../const/error\";\nimport { ALIGN, CIRCULAR_FALLBACK, DIRECTION, EVENTS, ORDER } from \"../const/external\";\nimport { checkExistence, find, getFlickingAttached, getProgress, getStyle, includes, parseAlign, toArray } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\nimport { CameraMode, BoundCameraMode, CircularCameraMode, LinearCameraMode } from \"./mode\";\n\nexport interface CameraOptions {\n align: FlickingOptions[\"align\"];\n}\n\n/**\n * A component that manages actual movement inside the viewport\n * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트\n */\nclass Camera {\n // Options\n private _align: FlickingOptions[\"align\"];\n\n // Internal states\n private _flicking: Flicking;\n private _mode: CameraMode;\n private _el: HTMLElement;\n private _transform: string;\n private _position: number;\n private _alignPos: number;\n private _offset: number;\n private _circularOffset: number;\n private _circularEnabled: boolean;\n private _range: { min: number; max: number };\n private _visiblePanels: Panel[];\n private _anchors: AnchorPoint[];\n private _needPanelTriggered: { prev: boolean; next: boolean };\n private _panelOrder: ValueOf;\n\n // Internal states getter\n /**\n * The camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n /**\n * An array of the child elements of the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열\n * @type {HTMLElement[]}\n * @readonly\n */\n public get children() { return toArray(this._el.children) as HTMLElement[]; }\n /**\n * Current position of the camera\n * @ko Camera의 현재 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._position; }\n /**\n * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at\n * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option\n * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다.\n * @type {number}\n * @default 0\n * @readonly\n */\n public get offset() { return this._offset - this._circularOffset; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._circularEnabled; }\n /**\n * A current camera mode\n * @type {CameraMode}\n * @readonly\n */\n public get mode() { return this._mode; }\n /**\n * A range that Camera's {@link Camera#position position} can reach\n * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} max A maximum position최대 위치\n * @readonly\n */\n public get range() { return this._range; }\n /**\n * A difference between Camera's minimum and maximum position that can reach\n * @ko Camera가 도달 가능한 최소/최대 좌표의 차이\n * @type {number}\n * @readonly\n */\n public get rangeDiff() { return this._range.max - this._range.min; }\n /**\n * An array of visible panels from the current position\n * @ko 현재 보이는 패널들의 배열\n * @type {Panel[]}\n * @readonly\n */\n public get visiblePanels() { return this._visiblePanels; }\n /**\n * A range of the visible area from the current position\n * @ko 현재 위치에서 보이는 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} min A maximum position최대 위치\n * @readonly\n */\n public get visibleRange() { return { min: this._position - this._alignPos, max: this._position - this._alignPos + this.size }; }\n /**\n * An array of {@link AnchorPoint}s that Camera can be stopped at\n * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록\n * @type {AnchorPoint[]}\n * @readonly\n */\n public get anchorPoints() { return this._anchors; }\n /**\n * A current parameters of the Camera for updating {@link AxesController}\n * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들\n * @type {ControlParams}\n * @readonly\n */\n public get controlParams() { return { range: this._range, position: this._position, circular: this._circularEnabled }; }\n /**\n * A Boolean value indicating whether Camera's over the minimum or maximum position reachable\n * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다\n * @type {boolean}\n * @readonly\n */\n public get atEdge() { return this._position <= this._range.min || this._position >= this._range.max; }\n /**\n * Return the size of the viewport\n * @ko 뷰포트 크기를 반환합니다\n * @type {number}\n * @readonly\n */\n public get size() {\n const flicking = this._flicking;\n return flicking\n ? flicking.horizontal\n ? flicking.viewport.width\n : flicking.viewport.height\n : 0;\n }\n\n /**\n * Return the camera's position progress from the first panel to last panel\n * Range is from 0 to last panel's index\n * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다\n * 범위는 0부터 마지막 패널의 인덱스까지입니다\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n const position = this._position + this._offset;\n const nearestAnchor = this.findNearestAnchor(this._position);\n\n if (!flicking || !nearestAnchor) {\n return NaN;\n }\n\n const nearestPanel = nearestAnchor.panel;\n const panelPos = nearestPanel.position + nearestPanel.offset;\n const bounceSize = flicking.control.controller.bounce!;\n\n const { min: prevRange, max: nextRange } = this.range;\n const rangeDiff = this.rangeDiff;\n\n if (position === panelPos) {\n return nearestPanel.index;\n }\n\n if (position < panelPos) {\n const prevPanel = nearestPanel.prev();\n let prevPosition = prevPanel\n ? prevPanel.position + prevPanel.offset\n : prevRange - bounceSize[0];\n\n // Looped\n if (prevPosition > panelPos) {\n prevPosition -= rangeDiff;\n }\n\n return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos);\n } else {\n const nextPanel = nearestPanel.next();\n let nextPosition = nextPanel\n ? nextPanel.position + nextPanel.offset\n : nextRange + bounceSize[1];\n\n // Looped\n if (nextPosition < panelPos) {\n nextPosition += rangeDiff;\n }\n\n return nearestPanel.index + getProgress(position, panelPos, nextPosition);\n }\n }\n\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성\n * @type {string}\n * @readonly\n */\n public get panelOrder() { return this._panelOrder; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element\n * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n }\n\n /** */\n public constructor(flicking: Flicking, {\n align = ALIGN.CENTER\n }: Partial = {}) {\n this._flicking = flicking;\n this._resetInternalValues();\n\n // Options\n this._align = align;\n }\n\n /**\n * Initialize Camera\n * @ko Camera를 초기화합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우\n * @return {this}\n */\n public init(): this {\n const viewportEl = this._flicking.viewport.element;\n\n checkExistence(viewportEl.firstElementChild, \"First element child of the viewport element\");\n this._el = viewportEl.firstElementChild as HTMLElement;\n this._checkTranslateSupport();\n\n this._updateMode();\n this.updatePanelOrder();\n\n return this;\n }\n\n /**\n * Destroy Camera and return to initial state\n * @ko Camera를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): this {\n this._resetInternalValues();\n return this;\n }\n\n /**\n * Move to the given position and apply CSS transform\n * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다\n * @param {number} pos A new position움직일 위치\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public lookAt(pos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const prevPos = this._position;\n\n this._position = pos;\n const toggled = this._togglePanels(prevPos, pos);\n this._refreshVisiblePanels();\n this._checkNeedPanel();\n this._checkReachEnd(prevPos, pos);\n\n if (toggled) {\n void flicking.renderer.render().then(() => {\n this.updateOffset();\n });\n } else {\n this.applyTransform();\n }\n }\n\n /**\n * Return a previous {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint}\n */\n public getPrevAnchor(anchor: AnchorPoint): AnchorPoint | null {\n if (!this._circularEnabled || anchor.index !== 0) {\n return this._anchors[anchor.index - 1] || null;\n } else {\n const anchors = this._anchors;\n const rangeDiff = this.rangeDiff;\n const lastAnchor = anchors[anchors.length - 1];\n\n return new AnchorPoint({\n index: lastAnchor.index,\n position: lastAnchor.position - rangeDiff,\n panel: lastAnchor.panel\n });\n }\n }\n\n /**\n * Return a next {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint}\n */\n public getNextAnchor(anchor: AnchorPoint): AnchorPoint | null {\n const anchors = this._anchors;\n\n if (!this._circularEnabled || anchor.index !== anchors.length - 1) {\n return anchors[anchor.index + 1] || null;\n } else {\n const rangeDiff = this.rangeDiff;\n const firstAnchor = anchors[0];\n\n return new AnchorPoint({\n index: firstAnchor.index,\n position: firstAnchor.position + rangeDiff,\n panel: firstAnchor.panel\n });\n }\n }\n\n /**\n * Return the camera's position progress in the panel below\n * Value is from 0 to 1 when the camera's inside panel\n * Value can be lower than 0 or bigger than 1 when it's in the margin area\n * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다\n * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다\n * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다\n */\n public getProgressInPanel(panel: Panel) {\n const panelRange = panel.range;\n\n return (this._position - panelRange.min) / (panelRange.max - panelRange.min);\n }\n\n /**\n * Return {@link AnchorPoint} that includes given position\n * If there's no {@link AnchorPoint} that includes the given position, return `null` instead\n * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다\n * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint}\n */\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n return this._mode.findAnchorIncludePosition(position);\n }\n\n /**\n * Return {@link AnchorPoint} nearest to given position\n * If there're no {@link AnchorPoint}s, return `null` instead\n * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다\n * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint}\n */\n public findNearestAnchor(position: number): AnchorPoint | null {\n return this._mode.findNearestAnchor(position);\n }\n\n /**\n * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel}\n * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다\n * @return {AnchorPoint | null}\n */\n public findActiveAnchor(): AnchorPoint | null {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!activePanel) return null;\n\n return find(this._anchors, anchor => anchor.panel.index === activePanel.index) ?? this.findNearestAnchor(activePanel.position);\n }\n\n /**\n * Clamp the given position between camera's range\n * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다\n * @param {number} position A position to clamp범위를 제한할 좌표\n * @return {number} A clamped position범위 제한된 좌표\n */\n public clampToReachablePosition(position: number): number {\n return this._mode.clampToReachablePosition(position);\n }\n\n /**\n * Check whether the given panel is inside of the Camera's range\n * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부\n */\n public canReach(panel: Panel): boolean {\n return this._mode.canReach(panel);\n }\n\n /**\n * Check whether the given panel element is visible at the current position\n * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부\n */\n public canSee(panel: Panel): boolean {\n return this._mode.canSee(panel);\n }\n\n /**\n * Update {@link Camera#range range} of Camera\n * @ko Camera의 {@link Camera#range range}를 업데이트합니다\n * @method\n * @abstract\n * @memberof Camera\n * @instance\n * @name updateRange\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public updateRange() {\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n this._updateMode();\n this._range = this._mode.getRange();\n\n panels.forEach(panel => panel.updateCircularToggleDirection());\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#alignPosition alignPosition}\n * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateAlignPos(): this {\n const align = this._align;\n\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n this._alignPos = parseAlign(alignVal, this.size);\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#anchorPoints anchorPoints}\n * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAnchors(): this {\n this._anchors = this._mode.getAnchors();\n\n return this;\n }\n\n /**\n * Update Viewport's height to active panel's height\n * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAdaptiveHeight() {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;\n\n flicking.viewport.setSize({\n height: activePanel.height\n });\n }\n\n /**\n * Update current offset of the camera\n * @ko 현재 카메라의 오프셋을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateOffset(): this {\n const flicking = getFlickingAttached(this._flicking);\n const position = this._position;\n const unRenderedPanels = flicking.panels.filter(panel => !panel.rendered);\n\n this._offset = unRenderedPanels\n .filter(panel => panel.position + panel.offset < position)\n .reduce((offset, panel) => offset + panel.sizeIncludingMargin, 0);\n\n this._circularOffset = this._mode.getCircularOffset();\n\n this.applyTransform();\n\n return this;\n }\n\n /**\n * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element\n * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다\n * @return {this}\n */\n public updatePanelOrder(): this {\n const flicking = getFlickingAttached(this._flicking);\n\n if (!flicking.horizontal) return this;\n\n const el = this._el;\n const direction = getStyle(el).direction;\n if (direction !== this._panelOrder) {\n this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR;\n if (flicking.initialized) {\n flicking.control.controller.updateDirection();\n }\n }\n\n return this;\n }\n\n /**\n * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again\n * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다\n * @chainable\n * @return {this}\n */\n public resetNeedPanelHistory(): this {\n this._needPanelTriggered = { prev: false, next: false };\n return this;\n }\n\n /**\n * Apply \"transform\" style with the current position to camera element\n * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다.\n * @return {this}\n */\n public applyTransform(): this {\n const el = this._el;\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n\n if (renderer.rendering || !flicking.initialized) return this;\n\n const actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;\n\n el.style[this._transform] = flicking.horizontal\n ? `translate(${this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition}px)`\n : `translate(0, ${-actualPosition}px)`;\n\n return this;\n }\n\n private _resetInternalValues() {\n this._position = 0;\n this._alignPos = 0;\n this._offset = 0;\n this._circularOffset = 0;\n this._circularEnabled = false;\n this._range = { min: 0, max: 0 };\n this._visiblePanels = [];\n this._anchors = [];\n this._needPanelTriggered = { prev: false, next: false };\n }\n\n private _refreshVisiblePanels() {\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n const newVisiblePanels = panels.filter(panel => this.canSee(panel));\n const prevVisiblePanels = this._visiblePanels;\n this._visiblePanels = newVisiblePanels;\n\n const added: Panel[] = newVisiblePanels.filter(panel => !includes(prevVisiblePanels, panel));\n const removed: Panel[] = prevVisiblePanels.filter(panel => !includes(newVisiblePanels, panel));\n\n if (added.length > 0 || removed.length > 0) {\n void flicking.renderer.render().then(() => {\n flicking.trigger(new ComponentEvent(EVENTS.VISIBLE_CHANGE, {\n added,\n removed,\n visiblePanels: newVisiblePanels\n }));\n });\n }\n }\n\n private _checkNeedPanel(): void {\n const needPanelTriggered = this._needPanelTriggered;\n\n if (needPanelTriggered.prev && needPanelTriggered.next) return;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n if (!needPanelTriggered.prev) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n if (!needPanelTriggered.next) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n\n return;\n }\n\n const cameraPosition = this._position;\n const cameraSize = this.size;\n const cameraRange = this._range;\n const needPanelThreshold = flicking.needPanelThreshold;\n\n const cameraPrev = cameraPosition - this._alignPos;\n const cameraNext = cameraPrev + cameraSize;\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n\n if (!needPanelTriggered.prev) {\n const firstPanelPrev = firstPanel.range.min;\n\n if (cameraPrev <= (firstPanelPrev + needPanelThreshold) || cameraPosition <= (cameraRange.min + needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n }\n\n if (!needPanelTriggered.next) {\n const lastPanelNext = lastPanel.range.max;\n\n if (cameraNext >= (lastPanelNext - needPanelThreshold) || cameraPosition >= (cameraRange.max - needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n }\n }\n\n private _checkReachEnd(prevPos: number, newPos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const range = this._range;\n\n const wasBetweenRange = prevPos > range.min && prevPos < range.max;\n const isBetweenRange = newPos > range.min && newPos < range.max;\n\n if (!wasBetweenRange || isBetweenRange) return;\n\n const direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT;\n\n flicking.trigger(new ComponentEvent(EVENTS.REACH_EDGE, {\n direction\n }));\n }\n\n private _checkTranslateSupport = () => {\n const transforms = [\"webkitTransform\", \"msTransform\", \"MozTransform\", \"OTransform\", \"transform\"];\n\n const supportedStyle = document.documentElement.style;\n let transformName = \"\";\n for (const prefixedTransform of transforms) {\n if (prefixedTransform in supportedStyle) {\n transformName = prefixedTransform;\n }\n }\n\n if (!transformName) {\n throw new FlickingError(ERROR.MESSAGE.TRANSFORM_NOT_SUPPORTED, ERROR.CODE.TRANSFORM_NOT_SUPPORTED);\n }\n\n this._transform = transformName;\n };\n\n private _updateMode() {\n const flicking = getFlickingAttached(this._flicking);\n\n if (flicking.circular) {\n const circularMode = new CircularCameraMode(flicking);\n const canSetCircularMode = circularMode.checkAvailability();\n\n if (canSetCircularMode) {\n this._mode = circularMode;\n } else {\n const fallbackMode = flicking.circularFallback;\n\n this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n }\n\n this._circularEnabled = canSetCircularMode;\n } else {\n this._mode = flicking.bound\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n this._circularEnabled = false;\n }\n }\n\n private _togglePanels(prevPos: number, pos: number): boolean {\n if (pos === prevPos) return false;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n const toggled = panels.map(panel => panel.toggle(prevPos, pos));\n\n return toggled.some(isToggled => isToggled);\n }\n}\n\nexport default Camera;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Camera, { CameraOptions } from \"./Camera\";\n\nexport {\n Camera\n};\n\nexport type {\n CameraOptions\n};\n\nexport * from \"./mode\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\nimport ImReady from \"@egjs/imready\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { ALIGN, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached, getMinusCompensatedIndex, includes, parsePanelAlign } from \"../utils\";\n\nimport RenderingStrategy from \"./strategy/RenderingStrategy\";\n\nexport interface RendererOptions {\n align?: FlickingOptions[\"align\"];\n strategy: RenderingStrategy;\n}\n\n/**\n * A component that manages {@link Panel} and its elements\n * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트\n */\nabstract class Renderer {\n // Internal States\n protected _flicking: Flicking | null;\n protected _panels: Panel[];\n protected _rendering: boolean;\n\n // Options\n protected _align: NonNullable;\n protected _strategy: RendererOptions[\"strategy\"];\n\n // Internal states Getter\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._panels; }\n /**\n * A boolean value indicating whether rendering is in progress\n * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부\n * @type {boolean}\n * @readonly\n * @internal\n */\n public get rendering() { return this._rendering; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._panels.length; }\n /**\n * @internal\n */\n public get strategy() { return this._strategy; }\n\n // Options Getter\n /**\n * A {@link Panel}'s {@link Panel#align align} value that applied to all panels\n * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: NonNullable) {\n this._align = val;\n\n const panelAlign = parsePanelAlign(val);\n this._panels.forEach(panel => { panel.align = panelAlign; });\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {Constants.ALIGN | string | number} [options.align=\"center\"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값\n * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈)\n */\n public constructor({\n align = ALIGN.CENTER,\n strategy\n }: RendererOptions) {\n this._flicking = null;\n this._panels = [];\n this._rendering = false;\n\n // Bind options\n this._align = align;\n this._strategy = strategy;\n }\n\n /**\n * Render panel elements inside the camera element\n * @ko 패널 엘리먼트들을 카메라 엘리먼트 내부에 렌더링합니다\n * @method\n * @abstract\n * @memberof Renderer\n * @instance\n * @name render\n * @chainable\n * @return {this}\n */\n public abstract render(): Promise;\n\n protected abstract _collectPanels(): void;\n protected abstract _createPanel(el: any, options: Omit): Panel;\n\n /**\n * Initialize Renderer\n * @ko Renderer를 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._collectPanels();\n\n return this;\n }\n\n /**\n * Destroy Renderer and return to initial state\n * @ko Renderer를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._flicking = null;\n this._panels = [];\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n */\n public getPanel(index: number): Panel | null {\n return this._panels[index] || null;\n }\n\n public forceRenderAllPanels(): Promise {\n this._panels.forEach(panel => panel.markForShow());\n\n return Promise.resolve();\n }\n\n /**\n * Update all panel sizes\n * @ko 모든 패널의 크기를 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updatePanelSize(): this {\n const flicking = getFlickingAttached(this._flicking);\n const panels = this._panels;\n\n if (panels.length <= 0) return this;\n\n if (flicking.panelsPerView > 0) {\n const firstPanel = panels[0];\n firstPanel.resize();\n\n this._updatePanelSizeByGrid(firstPanel, panels);\n } else {\n flicking.panels.forEach(panel => panel.resize());\n }\n\n return this;\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {Array} items An array of items to insert추가할 아이템들의 배열\n * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열\n * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n */\n public batchInsert(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsInserted = this.batchInsertDefer(...items);\n\n if (allPanelsInserted.length <= 0) return [];\n\n this.updateAfterPanelChange(allPanelsInserted, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchInsertDefer(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const prevFirstPanel = panels[0];\n const align = parsePanelAlign(this._align);\n\n const allPanelsInserted = items.reduce((addedPanels, item) => {\n const insertingIdx = getMinusCompensatedIndex(item.index, panels.length);\n const panelsPushed = panels.slice(insertingIdx);\n const panelsInserted = item.elements.map((el, idx) => this._createPanel(el, { index: insertingIdx + idx, align, flicking }));\n\n panels.splice(insertingIdx, 0, ...panelsInserted);\n\n if (item.hasDOMInElements) {\n // Insert the actual elements as camera element's children\n this._insertPanelElements(panelsInserted, panelsPushed[0] ?? null);\n }\n\n // Resize the newly added panels\n if (flicking.panelsPerView > 0) {\n const firstPanel = prevFirstPanel || panelsInserted[0].resize();\n\n this._updatePanelSizeByGrid(firstPanel, panelsInserted);\n } else {\n panelsInserted.forEach(panel => panel.resize());\n }\n\n // Update panel indexes & positions\n panelsPushed.forEach(panel => {\n panel.increaseIndex(panelsInserted.length);\n panel.updatePosition();\n });\n\n return [...addedPanels, ...panelsInserted];\n }, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {Array} items An array of items to remove제거할 아이템들의 배열\n * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스\n * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다\n * @return An array of removed panels제거된 패널들의 배열\n */\n public batchRemove(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsRemoved = this.batchRemoveDefer(...items);\n\n if (allPanelsRemoved.length <= 0) return [];\n\n this.updateAfterPanelChange([], allPanelsRemoved);\n\n return allPanelsRemoved;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchRemoveDefer(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const { control } = flicking;\n const activePanel = control.activePanel;\n\n const allPanelsRemoved = items.reduce((removed, item) => {\n const { index, deleteCount } = item;\n const removingIdx = getMinusCompensatedIndex(index, panels.length);\n\n const panelsPulled = panels.slice(removingIdx + deleteCount);\n const panelsRemoved = panels.splice(removingIdx, deleteCount);\n\n if (panelsRemoved.length <= 0) return [];\n\n // Update panel indexes & positions\n panelsPulled.forEach(panel => {\n panel.decreaseIndex(panelsRemoved.length);\n panel.updatePosition();\n });\n\n if (item.hasDOMInElements) {\n this._removePanelElements(panelsRemoved);\n }\n\n // Remove panel elements\n panelsRemoved.forEach(panel => panel.destroy());\n\n if (includes(panelsRemoved, activePanel)) {\n control.resetActive();\n }\n\n return [...removed, ...panelsRemoved];\n }, []);\n\n return allPanelsRemoved;\n }\n\n /**\n * @internal\n */\n public updateAfterPanelChange(panelsAdded: Panel[], panelsRemoved: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n const panels = this._panels;\n const activePanel = control.activePanel;\n\n // Update camera & control\n this._updateCameraAndControl();\n\n void this.render();\n\n if (!flicking.animating) {\n if (!activePanel || activePanel.removed) {\n if (panels.length <= 0) {\n // All panels removed\n camera.lookAt(0);\n } else {\n let targetIndex = activePanel?.index ?? 0;\n if (targetIndex > panels.length - 1) {\n targetIndex = panels.length - 1;\n }\n\n void control.moveToPanel(panels[targetIndex], {\n duration: 0\n }).catch(() => void 0);\n }\n } else {\n void control.moveToPanel(activePanel, {\n duration: 0\n }).catch(() => void 0);\n }\n }\n\n flicking.camera.updateOffset();\n\n if (panelsAdded.length > 0 || panelsRemoved.length > 0) {\n flicking.trigger(new ComponentEvent(EVENTS.PANEL_CHANGE, {\n added: panelsAdded,\n removed: panelsRemoved\n }));\n\n this.checkPanelContentsReady([\n ...panelsAdded,\n ...panelsRemoved\n ]);\n }\n }\n\n /**\n * @internal\n */\n public checkPanelContentsReady(checkingPanels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const resizeOnContentsReady = flicking.resizeOnContentsReady;\n const panels = this._panels;\n\n if (!resizeOnContentsReady || flicking.virtualEnabled) return;\n\n const hasContents = (panel: Panel) => panel.element && !!panel.element.querySelector(\"img, video\");\n checkingPanels = checkingPanels.filter(panel => hasContents(panel));\n\n if (checkingPanels.length <= 0) return;\n\n const contentsReadyChecker = new ImReady();\n\n checkingPanels.forEach(panel => {\n panel.loading = true;\n });\n\n contentsReadyChecker.on(\"readyElement\", e => {\n if (!this._flicking) {\n // Renderer's destroy() is called before\n contentsReadyChecker.destroy();\n return;\n }\n\n const panel = checkingPanels[e.index];\n const camera = flicking.camera;\n const control = flicking.control;\n const prevProgressInPanel = control.activePanel\n ? camera.getProgressInPanel(control.activePanel)\n : 0;\n\n panel.loading = false;\n panel.resize();\n panels.slice(panel.index + 1).forEach(panelBehind => panelBehind.updatePosition());\n\n if (!flicking.initialized) return;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n\n if (control.animating) {\n // TODO: Need Axes update\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n });\n\n contentsReadyChecker.on(\"preReady\", e => {\n if (this._flicking) {\n void this.render();\n }\n\n if (e.readyCount === e.totalCount) {\n contentsReadyChecker.destroy();\n }\n });\n\n contentsReadyChecker.on(\"ready\", () => {\n if (this._flicking) {\n void this.render();\n }\n contentsReadyChecker.destroy();\n });\n\n contentsReadyChecker.check(checkingPanels.map(panel => panel.element));\n }\n\n protected _updateCameraAndControl() {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n camera.resetNeedPanelHistory();\n control.updateInput();\n }\n\n protected _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n }\n\n protected _updatePanelSizeByGrid(referencePanel: Panel, panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const panelsPerView = flicking.panelsPerView;\n\n if (panelsPerView <= 0) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"panelsPerView\", panelsPerView), ERROR.CODE.WRONG_OPTION);\n }\n if (panels.length <= 0) return;\n\n const viewportSize = flicking.camera.size;\n const gap = referencePanel.margin.prev + referencePanel.margin.next;\n\n const panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView;\n const panelSizeObj = flicking.horizontal\n ? { width: panelSize }\n : { height: panelSize };\n const firstPanelSizeObj = {\n size: panelSize,\n margin: referencePanel.margin,\n ...(!flicking.horizontal && { height: referencePanel.height})\n };\n\n if (!flicking.noPanelStyleOverride) {\n this._strategy.updatePanelSizes(flicking, panelSizeObj);\n }\n\n flicking.panels.forEach(panel => panel.resize(firstPanelSizeObj));\n }\n\n protected _removeAllChildsFromCamera() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove other elements\n while (cameraElement.firstChild) {\n cameraElement.removeChild(cameraElement.firstChild);\n }\n }\n\n protected _insertPanelElements(panels: Panel[], nextSibling: Panel | null = null) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const cameraElement = camera.element;\n const nextSiblingElement = nextSibling?.element || null;\n const fragment = document.createDocumentFragment();\n\n panels.forEach(panel => fragment.appendChild(panel.element));\n cameraElement.insertBefore(fragment, nextSiblingElement);\n }\n\n protected _removePanelElements(panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n panels.forEach(panel => {\n cameraElement.removeChild(panel.element);\n });\n }\n\n protected _afterRender() {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.applyTransform();\n }\n}\n\nexport default Renderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { getFlickingAttached, toArray } from \"../utils\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n *\n */\nclass VanillaRenderer extends Renderer {\n // eslint-disable-next-line @typescript-eslint/require-await\n public async render() {\n const flicking = getFlickingAttached(this._flicking);\n const strategy = this._strategy;\n\n strategy.updateRenderingPanels(flicking);\n strategy.renderPanels(flicking);\n\n this._resetPanelElementOrder();\n this._afterRender();\n }\n\n protected _collectPanels() {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._removeAllTextNodes();\n this._panels = this._strategy.collectPanels(flicking, camera.children);\n }\n\n protected _createPanel(el: HTMLElement, options: Omit): Panel {\n return this._strategy.createPanel(el, options);\n }\n\n private _resetPanelElementOrder() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraEl = flicking.camera.element;\n\n // We're using reversed panels here as last panel should be the last element of camera element\n const reversedElements = this._strategy\n .getRenderingElementsByOrder(flicking)\n .reverse();\n\n reversedElements.forEach((el, idx) => {\n const nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null;\n\n if (el.nextElementSibling !== nextEl) {\n cameraEl.insertBefore(el, nextEl);\n }\n });\n }\n\n private _removeAllTextNodes() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove all text nodes in the camera element\n toArray(cameraElement.childNodes).forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n cameraElement.removeChild(node);\n }\n });\n }\n}\n\nexport default VanillaRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n * @internal\n */\nabstract class ExternalRenderer extends Renderer {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n protected _removePanelElements(panels: Panel[]): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n\n protected _removeAllChildsFromCamera(): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n /* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\nexport default ExternalRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { getElementSize, getProgress, getStyle, parseAlign, setSize } from \"../../utils\";\nimport { ALIGN, DIRECTION } from \"../../const/external\";\nimport { LiteralUnion, ValueOf } from \"../../type/internal\";\n\nimport ElementProvider from \"./provider/ElementProvider\";\n\nexport interface PanelOptions {\n index: number;\n align: LiteralUnion> | number;\n flicking: Flicking;\n elementProvider: ElementProvider;\n}\n\n/**\n * A slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass Panel {\n // Internal States\n protected _flicking: Flicking;\n protected _elProvider: ElementProvider;\n protected _index: number;\n protected _pos: number;\n protected _size: number;\n protected _height: number;\n protected _margin: { prev: number; next: number };\n protected _alignPos: number; // Actual align pos\n protected _rendered: boolean;\n protected _removed: boolean;\n protected _loading: boolean;\n protected _toggleDirection: ValueOf;\n protected _toggled: boolean;\n protected _togglePosition: number;\n\n // Options\n protected _align: PanelOptions[\"align\"];\n\n // Internal States Getter\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n /**\n * @internal\n * @readonly\n */\n public get elementProvider() { return this._elProvider; }\n /**\n * Index of the panel\n * @ko 패널의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of the panel, including {@link Panel#alignPosition alignPosition}\n * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos + this._alignPos; }\n /**\n * Cached size of the panel element\n * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else\n * @ko 패널 엘리먼트의 캐시된 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다\n * @type {number}\n * @readonly\n */\n public get size() { return this._size; }\n /**\n * Panel's size including CSS `margin`\n * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else\n * @ko CSS `margin`을 포함한 패널의 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다\n * @type {number}\n * @readonly\n */\n public get sizeIncludingMargin() { return this._size + this._margin.prev + this._margin.next; }\n /**\n * Height of the panel element\n * @ko 패널 엘리먼트의 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height; }\n /**\n * Cached CSS `margin` value of the panel element\n * @ko 패널 엘리먼트의 CSS `margin` 값\n * @type {object}\n * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값\n * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값\n * @readonly\n */\n public get margin() { return this._margin; }\n /**\n * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at\n * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * A value indicating whether the panel's {@link Flicking#remove remove}d\n * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get removed() { return this._removed; }\n /**\n * A value indicating whether the panel's element is being rendered on the screen\n * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get rendered() { return this._rendered; }\n /**\n * A value indicating whether the panel's image/video is not loaded and waiting for resize\n * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get loading() { return this._loading; }\n /**\n * Panel element's range of the bounding box\n * @ko 패널 엘리먼트의 Bounding box 범위\n * @type {object}\n * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false)\n * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false)\n * @readonly\n */\n public get range() { return { min: this._pos, max: this._pos + this._size }; }\n /**\n * A value indicating whether the panel's position is toggled by circular behavior\n * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get toggled() { return this._toggled; }\n /**\n * A direction where the panel's position is toggled\n * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향\n * @type {DIRECTION}\n * @readonly\n */\n public get toggleDirection() { return this._toggleDirection; }\n /**\n * Actual position offset determined by {@link Panel#order}\n * @ko {@link Panel#order}에 의한 실제 위치 변경값\n * @type {number}\n * @readonly\n */\n public get offset() {\n const toggleDirection = this._toggleDirection;\n const cameraRangeDiff = this._flicking.camera.rangeDiff;\n\n return toggleDirection === DIRECTION.NONE || !this._toggled\n ? 0\n : toggleDirection === DIRECTION.PREV\n ? -cameraRangeDiff\n : cameraRangeDiff;\n }\n\n /**\n * Progress of movement between previous or next panel relative to current panel\n * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n\n return this.index - flicking.camera.progress;\n }\n\n /**\n * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1)\n * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1)\n * @type {number}\n * @readonly\n */\n public get outsetProgress() {\n const position = this.position + this.offset;\n const alignPosition = this._alignPos;\n const camera = this._flicking.camera;\n const camPos = camera.position;\n\n if (camPos === position) {\n return 0;\n }\n\n if (camPos < position) {\n const disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition;\n\n return -getProgress(camPos, position, disappearPosNext);\n } else {\n const disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition);\n\n return 1 - getProgress(camPos, disappearPosPrev, position);\n }\n }\n\n /**\n * Percentage of area where panel is visible in the viewport\n * @ko 뷰포트 안에서 패널이 보이는 영역의 비율\n * @type {number}\n * @readonly\n */\n public get visibleRatio() {\n const range = this.range;\n const size = this._size;\n const offset = this.offset;\n const visibleRange = this._flicking.camera.visibleRange;\n\n const checkingRange = {\n min: range.min + offset,\n max: range.max + offset\n };\n\n if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) {\n return 0;\n }\n\n let visibleSize = size;\n\n if (visibleRange.min > checkingRange.min) {\n visibleSize -= visibleRange.min - checkingRange.min;\n }\n if (visibleRange.max < checkingRange.max) {\n visibleSize -= checkingRange.max - visibleRange.max;\n }\n\n return visibleSize / size;\n }\n\n public set loading(val: boolean) { this._loading = val; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element\n * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: PanelOptions[\"align\"]) {\n this._align = val;\n this._updateAlignPos();\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스\n */\n public constructor({\n index,\n align,\n flicking,\n elementProvider\n }: PanelOptions) {\n this._index = index;\n this._flicking = flicking;\n this._elProvider = elementProvider;\n\n this._align = align;\n\n this._removed = false;\n this._rendered = true;\n this._loading = false;\n this._resetInternalStates();\n }\n\n /**\n * Mark panel element to be appended on the camera element\n * @internal\n */\n public markForShow() {\n this._rendered = true;\n this._elProvider.show(this._flicking);\n }\n\n /**\n * Mark panel element to be removed from the camera element\n * @internal\n */\n public markForHide() {\n this._rendered = false;\n this._elProvider.hide(this._flicking);\n }\n\n /**\n * Update size of the panel\n * @ko 패널의 크기를 갱신합니다\n * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보\n * @chainable\n * @return {this}\n */\n public resize(cached?: {\n size: number;\n height?: number;\n margin: { prev: number; next: number };\n }): this {\n const el = this.element;\n const flicking = this._flicking;\n const {\n horizontal,\n useFractionalSize\n } = flicking;\n\n if (cached) {\n this._size = cached.size;\n this._margin = { ...cached.margin };\n this._height = cached.height ?? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: getStyle(el)\n });\n } else {\n const elStyle = getStyle(el);\n\n this._size = getElementSize({\n el,\n horizontal,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n });\n\n this._margin = horizontal\n ? {\n prev: parseFloat(elStyle.marginLeft || \"0\"),\n next: parseFloat(elStyle.marginRight || \"0\")\n } : {\n prev: parseFloat(elStyle.marginTop || \"0\"),\n next: parseFloat(elStyle.marginBottom || \"0\")\n };\n\n this._height = horizontal\n ? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n })\n : this._size;\n }\n\n this.updatePosition();\n this._updateAlignPos();\n\n return this;\n }\n\n /**\n * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property\n * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New panel size새 패널 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @chainable\n * @return {this}\n */\n public setSize(size: Partial<{\n width: number | string;\n height: number | string;\n }>): this {\n setSize(this.element, size);\n\n return this;\n }\n\n /**\n * Check whether the given element is inside of this panel's {@link Panel#element element}\n * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다\n * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement\n * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부\n */\n public contains(element: HTMLElement): boolean {\n return !!this.element?.contains(element);\n }\n\n /**\n * Reset internal state and set {@link Panel#removed removed} to `true`\n * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다.\n * @return {void}\n */\n public destroy(): void {\n this._resetInternalStates();\n this._removed = true;\n }\n\n /**\n * Check whether the given position is inside of this panel's {@link Panel#range range}\n * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다.\n * @param {number} pos A position to check확인하고자 하는 좌표\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부\n */\n public includePosition(pos: number, includeMargin: boolean = false): boolean {\n return this.includeRange(pos, pos, includeMargin);\n }\n\n /**\n * Check whether the given range is fully included in this panel's area (inclusive)\n * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부\n */\n public includeRange(min: number, max: number, includeMargin: boolean = false): boolean {\n const margin = this._margin;\n const panelRange = this.range;\n\n if (includeMargin) {\n panelRange.min -= margin.prev;\n panelRange.max += margin.next;\n }\n\n return max >= panelRange.min && min <= panelRange.max;\n }\n\n /**\n * Check whether the panel is visble in the given range (exclusive)\n * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부\n */\n public isVisibleOnRange(min: number, max: number): boolean {\n const panelRange = this.range;\n\n return max > panelRange.min && min < panelRange.max;\n }\n\n /**\n * Move {@link Camera} to this panel\n * @ko {@link Camera}를 이 패널로 이동합니다\n * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise\n */\n public focus(duration?: number) {\n return this._flicking.moveTo(this._index, duration);\n }\n\n /**\n * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel\n * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다\n * @returns {Panel | null} The previous panel이전 패널\n */\n public prev(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1)\n : renderer.getPanel(index - 1);\n }\n\n /**\n * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel\n * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다\n * @returns {Panel | null} The previous panel다음 패널\n */\n public next(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1)\n : renderer.getPanel(index + 1);\n }\n\n /**\n * Increase panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public increaseIndex(val: number): this {\n this._index += Math.max(val, 0);\n return this;\n }\n\n /**\n * Decrease panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public decreaseIndex(val: number): this {\n this._index -= Math.max(val, 0);\n return this;\n }\n\n /**\n * @internal\n */\n public updatePosition(): this {\n const prevPanel = this._flicking.renderer.panels[this._index - 1];\n\n this._pos = prevPanel\n ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev\n : this._margin.prev;\n\n return this;\n }\n\n /**\n * @internal\n * @return {boolean} toggled\n */\n public toggle(prevPos: number, newPos: number): boolean {\n const toggleDirection = this._toggleDirection;\n const togglePosition = this._togglePosition;\n\n if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false;\n\n const prevToggled = this._toggled;\n\n if (newPos > prevPos) {\n if (togglePosition >= prevPos && togglePosition <= newPos) {\n this._toggled = toggleDirection === DIRECTION.NEXT;\n }\n } else {\n if (togglePosition <= prevPos && togglePosition >= newPos) {\n this._toggled = toggleDirection !== DIRECTION.NEXT;\n }\n }\n\n return prevToggled !== this._toggled;\n }\n\n /**\n * @internal\n */\n public updateCircularToggleDirection(): this {\n const flicking = this._flicking;\n\n if (!flicking.circularEnabled) {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n this._toggled = false;\n return this;\n }\n\n const camera = flicking.camera;\n const camRange = camera.range;\n const camAlignPosition = camera.alignPosition;\n const camVisibleRange = camera.visibleRange;\n const camVisibleSize = camVisibleRange.max - camVisibleRange.min;\n\n const minimumVisible = camRange.min - camAlignPosition;\n const maximumVisible = camRange.max - camAlignPosition + camVisibleSize;\n\n const shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false);\n const shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false);\n\n this._toggled = false;\n if (shouldBeVisibleAtMin) {\n this._toggleDirection = DIRECTION.PREV;\n this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition;\n this.toggle(Infinity, camera.position);\n } else if (shouldBeVisibleAtMax) {\n this._toggleDirection = DIRECTION.NEXT;\n this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition;\n this.toggle(-Infinity, camera.position);\n } else {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n }\n\n return this;\n }\n\n private _updateAlignPos() {\n this._alignPos = parseAlign(this._align, this._size);\n }\n\n private _resetInternalStates() {\n this._size = 0;\n this._pos = 0;\n this._margin = { prev: 0, next: 0 };\n this._height = 0;\n this._alignPos = 0;\n this._toggled = false;\n this._togglePosition = 0;\n this._toggleDirection = DIRECTION.NONE;\n }\n}\n\nexport default Panel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel, { PanelOptions } from \"../../core/panel/Panel\";\nimport ElementProvider from \"../../core/panel/provider/ElementProvider\";\nimport { DIRECTION } from \"../../const/external\";\nimport { parsePanelAlign } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nexport interface NormalRenderingStrategyOptions {\n providerCtor: new (...args: any) => ElementProvider;\n}\n\n\nclass NormalRenderingStrategy implements RenderingStrategy {\n private _providerCtor: NormalRenderingStrategyOptions[\"providerCtor\"];\n\n public constructor({ providerCtor }: NormalRenderingStrategyOptions) {\n this._providerCtor = providerCtor;\n }\n\n public renderPanels() {\n // DO_NOTHING\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const renderedPanels = flicking.renderer.panels.filter(panel => panel.rendered);\n const toggledPrev = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.NEXT);\n const notToggled = renderedPanels.filter(panel => !panel.toggled);\n\n return [...toggledPrev, ...notToggled, ...toggledNext].map(panel => panel.index);\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const panels = flicking.panels;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => panels[index].element);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n if (flicking.renderOnlyVisible) {\n this._showOnlyVisiblePanels(flicking);\n } else {\n flicking.panels.forEach(panel => panel.markForShow());\n }\n }\n\n public collectPanels(\n flicking: Flicking,\n elements: any[]\n ) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return elements.map((el, index) => new Panel({\n index,\n elementProvider: new this._providerCtor(el),\n align,\n flicking\n }));\n }\n\n public createPanel(\n element: any,\n options: Omit\n ) {\n return new Panel({\n ...options,\n elementProvider: new this._providerCtor(element)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n\n private _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n}\n\nexport default NormalRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { DIRECTION } from \"../../const/external\";\nimport { circulateIndex } from \"../../utils\";\n\nimport Panel, { PanelOptions } from \"./Panel\";\nimport VirtualElementProvider from \"./provider/VirtualElementProvider\";\n\ninterface VirtualPanelOptions extends PanelOptions {\n elementProvider: VirtualElementProvider;\n}\n\n/**\n * An slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass VirtualPanel extends Panel {\n protected _elProvider: VirtualElementProvider;\n protected _cachedInnerHTML: string | null;\n\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n\n /**\n * Cached innerHTML by the previous render function\n * @ko 이전 렌더링에서 캐시된 innerHTML 정보\n * @type {string|null}\n * @readonly\n */\n public get cachedInnerHTML() { return this._cachedInnerHTML; }\n\n /**\n * An number for indexing which element it will be rendered on\n * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자\n * @type {number}\n * @readonly\n */\n public get elementIndex() {\n const flicking = this._flicking;\n const virtualElCount = flicking.panelsPerView + 1;\n const panelCount = flicking.panelCount;\n let index = this._index;\n\n if (this._toggled) {\n // To prevent element duplication\n index = this._toggleDirection === DIRECTION.NEXT\n ? index + panelCount\n : index - panelCount;\n }\n\n return circulateIndex(index, virtualElCount);\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n */\n public constructor(options: VirtualPanelOptions) {\n super(options);\n\n options.elementProvider.init(this);\n this._elProvider = options.elementProvider;\n this._cachedInnerHTML = null;\n }\n\n public cacheRenderResult(result: string) {\n this._cachedInnerHTML = result;\n }\n\n public uncacheRenderResult() {\n this._cachedInnerHTML = null;\n }\n\n public render() {\n const flicking = this._flicking;\n const { renderPanel, cache } = flicking.virtual;\n\n const element = this._elProvider.element;\n const newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index);\n\n if (newInnerHTML === element.innerHTML) return;\n\n element.innerHTML = newInnerHTML;\n\n if (cache) {\n this.cacheRenderResult(newInnerHTML);\n }\n }\n\n public increaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.increaseIndex(val);\n }\n\n public decreaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.decreaseIndex(val);\n }\n}\n\nexport default VirtualPanel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { PanelOptions } from \"../../core/panel/Panel\";\nimport VirtualPanel from \"../../core/panel/VirtualPanel\";\nimport VirtualElementProvider from \"../../core/panel/provider/VirtualElementProvider\";\nimport { parsePanelAlign, range, setSize } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nclass VirtualRenderingStrategy implements RenderingStrategy {\n public renderPanels(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = flicking.visiblePanels as VirtualPanel[];\n const invisibleIndexes = range(flicking.panelsPerView + 1);\n\n visiblePanels.forEach(panel => {\n const elementIndex = panel.elementIndex;\n\n panel.render();\n\n virtualManager.show(elementIndex);\n invisibleIndexes[elementIndex] = -1;\n });\n\n invisibleIndexes\n .filter(val => val >= 0)\n .forEach(idx => {\n virtualManager.hide(idx);\n });\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = [...flicking.visiblePanels]\n .filter(panel => panel.rendered)\n .sort((panel1, panel2) => {\n return (panel1.position + panel1.offset) - (panel2.position + panel2.offset);\n }) as VirtualPanel[];\n\n if (visiblePanels.length <= 0) return virtualManager.elements.map((_, idx) => idx);\n\n const visibleIndexes = visiblePanels.map(panel => panel.elementIndex);\n const invisibleIndexes = virtualManager.elements\n .map((el, idx) => ({ ...el, idx }))\n .filter(el => !el.visible)\n .map(el => el.idx);\n\n return [...visibleIndexes, ...invisibleIndexes];\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const elements = virtualManager.elements;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => elements[index].nativeElement);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else {\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n\n public collectPanels(flicking: Flicking) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return range(flicking.virtual.initialPanelCount).map(index => new VirtualPanel({\n index,\n elementProvider: new VirtualElementProvider(flicking),\n align,\n flicking\n }));\n }\n\n public createPanel(_el: any, options: PanelOptions) {\n return new VirtualPanel({\n ...options,\n elementProvider: new VirtualElementProvider(options.flicking)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.virtual.elements.forEach(el => {\n setSize(el.nativeElement, size);\n });\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n}\n\nexport default VirtualRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Renderer, { RendererOptions } from \"./Renderer\";\nimport VanillaRenderer from \"./VanillaRenderer\";\nimport ExternalRenderer from \"./ExternalRenderer\";\n\nexport * from \"./strategy\";\n\nexport {\n Renderer,\n VanillaRenderer,\n ExternalRenderer\n};\n\nexport type {\n RendererOptions\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Component, { ComponentEvent } from \"@egjs/component\";\n\nimport FlickingError from \"./core/FlickingError\";\nimport Viewport from \"./core/Viewport\";\nimport AutoResizer from \"./core/AutoResizer\";\nimport { Panel } from \"./core/panel\";\nimport { VanillaElementProvider } from \"./core/panel/provider\";\nimport VirtualManager, { VirtualOptions } from \"./core/VirtualManager\";\nimport { Control, SnapControl, SnapControlOptions, FreeControl, StrictControl, FreeControlOptions, StrictControlOptions } from \"./control\";\nimport { Camera } from \"./camera\";\nimport { Renderer, VanillaRenderer, ExternalRenderer, RendererOptions, NormalRenderingStrategy, VirtualRenderingStrategy } from \"./renderer\";\nimport { EVENTS, ALIGN, MOVE_TYPE, DIRECTION, CIRCULAR_FALLBACK } from \"./const/external\";\nimport * as ERROR from \"./const/error\";\nimport { findIndex, getElement, includes, parseElement } from \"./utils\";\nimport { HoldStartEvent, HoldEndEvent, MoveStartEvent, SelectEvent, MoveEvent, MoveEndEvent, WillChangeEvent, WillRestoreEvent, NeedPanelEvent, VisibleChangeEvent, ReachEdgeEvent, ReadyEvent, AfterResizeEvent, BeforeResizeEvent, ChangedEvent, RestoredEvent, PanelChangeEvent } from \"./type/event\";\nimport { LiteralUnion, ValueOf } from \"./type/internal\";\nimport { ElementLike, Plugin, Status, MoveTypeOptions } from \"./type/external\";\n\n/**\n * @interface\n */\nexport interface FlickingEvents {\n [EVENTS.READY]: ReadyEvent;\n [EVENTS.BEFORE_RESIZE]: BeforeResizeEvent;\n [EVENTS.AFTER_RESIZE]: AfterResizeEvent;\n [EVENTS.HOLD_START]: HoldStartEvent;\n [EVENTS.HOLD_END]: HoldEndEvent;\n [EVENTS.MOVE_START]: MoveStartEvent;\n [EVENTS.MOVE]: MoveEvent;\n [EVENTS.MOVE_END]: MoveEndEvent;\n [EVENTS.WILL_CHANGE]: WillChangeEvent;\n [EVENTS.CHANGED]: ChangedEvent;\n [EVENTS.WILL_RESTORE]: WillRestoreEvent;\n [EVENTS.RESTORED]: RestoredEvent;\n [EVENTS.SELECT]: SelectEvent;\n [EVENTS.NEED_PANEL]: NeedPanelEvent;\n [EVENTS.VISIBLE_CHANGE]: VisibleChangeEvent;\n [EVENTS.REACH_EDGE]: ReachEdgeEvent;\n [EVENTS.PANEL_CHANGE]: PanelChangeEvent;\n}\n\n/**\n * @interface\n */\nexport interface FlickingOptions {\n // UI / LAYOUT\n align: LiteralUnion> | number | { panel: number | string; camera: number | string };\n defaultIndex: number;\n horizontal: boolean;\n circular: boolean;\n circularFallback: LiteralUnion>;\n bound: boolean;\n adaptive: boolean;\n panelsPerView: number;\n noPanelStyleOverride: boolean;\n resizeOnContentsReady: boolean;\n nested: boolean;\n\n // EVENT\n needPanelThreshold: number;\n preventEventsBeforeInit: boolean;\n\n // ANIMATION\n deceleration: number;\n duration: number;\n easing: (x: number) => number;\n\n // INPUT\n inputType: string[];\n moveType: ValueOf | MoveTypeOptions>;\n threshold: number;\n interruptable: boolean;\n bounce: number | string | [number | string, number | string];\n iOSEdgeSwipeThreshold: number;\n preventClickOnDrag: boolean;\n preventDefaultOnDrag: boolean;\n disableOnInit: boolean;\n changeOnHold: boolean;\n\n // PERFORMANCE\n renderOnlyVisible: boolean;\n virtual: VirtualOptions | null;\n\n // OTHERS\n autoInit: boolean;\n autoResize: boolean;\n useResizeObserver: boolean;\n resizeDebounce: number;\n maxResizeDebounce: number;\n useFractionalSize: boolean;\n externalRenderer: ExternalRenderer | null;\n\n // @deprecated\n renderExternal: {\n renderer: new (options: RendererOptions) => ExternalRenderer;\n rendererOptions: RendererOptions;\n } | null;\n}\n\n/**\n * @extends Component\n * @support {\"ie\": \"9+(with polyfill)\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"4.X+\"}\n * @requires {@link https://github.com/naver/egjs-component|@egjs/component}\n * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}\n */\nclass Flicking extends Component {\n /**\n * Version info string\n * @ko 버전정보 문자열\n * @type {string}\n * @readonly\n * @example\n * ```ts\n * Flicking.VERSION; // ex) 4.0.0\n * ```\n */\n public static VERSION = \"#__VERSION__#\";\n\n // Core components\n private _viewport: Viewport;\n private _autoResizer: AutoResizer;\n private _camera: Camera;\n private _control: Control;\n private _renderer: Renderer;\n private _virtualManager: VirtualManager;\n\n // Options\n private _align: FlickingOptions[\"align\"];\n private _defaultIndex: FlickingOptions[\"defaultIndex\"];\n private _horizontal: FlickingOptions[\"horizontal\"];\n private _circular: FlickingOptions[\"circular\"];\n private _circularFallback: FlickingOptions[\"circularFallback\"];\n private _bound: FlickingOptions[\"bound\"];\n private _adaptive: FlickingOptions[\"adaptive\"];\n private _panelsPerView: FlickingOptions[\"panelsPerView\"];\n private _noPanelStyleOverride: FlickingOptions[\"noPanelStyleOverride\"];\n private _resizeOnContentsReady: FlickingOptions[\"resizeOnContentsReady\"];\n private _virtual: FlickingOptions[\"virtual\"];\n private _nested: FlickingOptions[\"nested\"];\n\n private _needPanelThreshold: FlickingOptions[\"needPanelThreshold\"];\n private _preventEventsBeforeInit: FlickingOptions[\"preventEventsBeforeInit\"];\n\n private _deceleration: FlickingOptions[\"deceleration\"];\n private _duration: FlickingOptions[\"duration\"];\n private _easing: FlickingOptions[\"easing\"];\n\n private _inputType: FlickingOptions[\"inputType\"];\n private _moveType: FlickingOptions[\"moveType\"];\n private _threshold: FlickingOptions[\"threshold\"];\n private _interruptable: FlickingOptions[\"interruptable\"];\n private _bounce: FlickingOptions[\"bounce\"];\n private _iOSEdgeSwipeThreshold: FlickingOptions[\"iOSEdgeSwipeThreshold\"];\n private _preventClickOnDrag: FlickingOptions[\"preventClickOnDrag\"];\n private _preventDefaultOnDrag: FlickingOptions[\"preventDefaultOnDrag\"];\n private _disableOnInit: FlickingOptions[\"disableOnInit\"];\n private _changeOnHold: FlickingOptions[\"changeOnHold\"];\n\n private _renderOnlyVisible: FlickingOptions[\"renderOnlyVisible\"];\n\n private _autoInit: FlickingOptions[\"autoInit\"];\n private _autoResize: FlickingOptions[\"autoResize\"];\n private _useResizeObserver: FlickingOptions[\"useResizeObserver\"];\n private _resizeDebounce: FlickingOptions[\"resizeDebounce\"];\n private _maxResizeDebounce: FlickingOptions[\"maxResizeDebounce\"];\n private _useFractionalSize: FlickingOptions[\"useFractionalSize\"];\n private _externalRenderer: FlickingOptions[\"externalRenderer\"];\n private _renderExternal: FlickingOptions[\"renderExternal\"];\n\n // Internal State\n private _initialized: boolean;\n private _plugins: Plugin[];\n\n // Components\n /**\n * {@link Control} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스\n * @type {Control}\n * @default SnapControl\n * @readonly\n * @see Control\n * @see SnapControl\n * @see FreeControl\n */\n public get control() { return this._control; }\n /**\n * {@link Camera} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스\n * @type {Camera}\n * @default LinearCamera\n * @readonly\n * @see Camera\n * @see LinearCamera\n * @see BoundCamera\n * @see CircularCamera\n */\n public get camera() { return this._camera; }\n /**\n * {@link Renderer} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스\n * @type {Renderer}\n * @default VanillaRenderer\n * @readonly\n * @see Renderer\n * @see VanillaRenderer\n * @see ExternalRenderer\n */\n public get renderer() { return this._renderer; }\n /**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n * @type {Viewport}\n * @readonly\n * @see Viewport\n */\n public get viewport() { return this._viewport; }\n // Internal States\n /**\n * Whether Flicking's {@link Flicking#init init()} is called.\n * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.\n * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.\n * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get initialized() { return this._initialized; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._camera.circularEnabled; }\n /**\n * Whether the `virtual` option is enabled.\n * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero.\n * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get virtualEnabled() { return this._panelsPerView > 0 && this._virtual != null; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get index() { return this._control.activeIndex; }\n /**\n * The root(`.flicking-viewport`) element\n * @ko root(`.flicking-viewport`) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._viewport.element; }\n /**\n * Currently active panel\n * @ko 현재 선택된 패널\n * @type {Panel}\n * @readonly\n * @see Panel\n */\n public get currentPanel() { return this._control.activePanel; }\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._renderer.panels; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._renderer.panelCount; }\n /**\n * Array of panels that is visible at the current position\n * @ko 현재 보이는 패널의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get visiblePanels() { return this._camera.visiblePanels; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._control.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._control.holding; }\n /**\n * A current list of activated plugins\n * @ko 현재 활성화된 플러그인 목록\n * @type {Plugin[]}\n * @readonly\n */\n public get activePlugins() { return this._plugins; }\n\n // Options Getter\n // UI / LAYOUT\n /**\n * Align position of the panels within viewport. You can set different values each for the panel and camera\n * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다\n * @type {ALIGN | string | number | { panel: string | number, camera: string | number }}\n * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값\n * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값\n * @default \"center\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // Literal strings\n * \"prev\", \"center\", \"next\",\n * // % values, applied to both panel & camera\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000,\n * // Setting a different value for panel & camera\n * { panel: \"10%\", camera: \"25%\" }\n * ];\n *\n * possibleOptions.forEach(align => {\n * new Flicking(\"#el\", { align });\n * });\n * ```\n */\n public get align() { return this._align; }\n /**\n * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer\n * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}\n */\n public get defaultIndex() { return this._defaultIndex; }\n /**\n * Direction of panel movement (true: horizontal, false: vertical)\n * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향)\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )}\n */\n public get horizontal() { return this._horizontal; }\n /**\n * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling.\n * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )}\n */\n public get circular() { return this._circular; }\n /**\n * Set panel control mode for the case when circular cannot be enabled.\n * \"linear\" will set the view's range from the top of the first panel to the top of the last panel.\n * \"bound\" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel.\n * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다.\n * \"linear\" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다.\n * \"bound\" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다.\n * @see CIRCULAR_FALLBACK\n * @type {string}\n * @default \"linear\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )}\n */\n public get circularFallback() { return this._circularFallback; }\n /**\n * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel\n * Only can be enabled when `circular=false`\n * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다\n * `circular=false`인 경우에만 사용할 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )}\n */\n public get bound() { return this._bound; }\n /**\n * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true`\n * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )}\n */\n public get adaptive() { return this._adaptive; }\n /**\n * A visible number of panels on viewport. Enabling this option will automatically resize panel size\n * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다\n * @type {number}\n * @default -1\n * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )}\n */\n public get panelsPerView() { return this._panelsPerView; }\n /**\n * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled.\n * This behavior can be useful in terms of performance when you're manually managing all panel sizes\n * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다.\n * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다\n * @type {boolean}\n * @default false\n */\n public get noPanelStyleOverride() { return this._noPanelStyleOverride; }\n /**\n * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded.\n * This can be useful when you have contents inside Flicking that changes its size when it's loaded\n * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다.\n * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )}\n */\n public get resizeOnContentsReady() { return this._resizeOnContentsReady; }\n /**\n * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.\n * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.\n * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.\n * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )}\n */\n public get nested() { return this._nested; }\n // EVENTS\n /**\n * A Threshold from viewport edge before triggering `needPanel` event\n * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )}\n */\n public get needPanelThreshold() { return this._needPanelThreshold; }\n /**\n * When enabled, events are not triggered before `ready` when initializing\n * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )}\n */\n public get preventEventsBeforeInit() { return this._preventEventsBeforeInit; }\n // ANIMATION\n /**\n * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time\n * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다\n * @type {number}\n * @default 0.0075\n * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )}\n */\n public get deceleration() { return this._deceleration; }\n /**\n * An easing function applied to the panel movement animation. Default value is `easeOutCubic`\n * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다\n * @type {function}\n * @default x => 1 - Math.pow(1 - x, 3)\n * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/}\n * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )}\n */\n public get easing() { return this._easing; }\n /**\n * Default duration of the animation (ms)\n * @ko 디폴트 애니메이션 재생 시간 (ms)\n * @type {number}\n * @default 500\n * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )}\n */\n public get duration() { return this._duration; }\n // INPUT\n /**\n * Types of input devices to enable\n * @ko 활성화할 입력 장치 종류\n * @type {string[]}\n * @default [\"touch\", \"mouse\"]\n * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)}\n * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)}\n * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )}\n */\n public get inputType() { return this._inputType; }\n /**\n * Movement style by user input. This will change instance type of {@link Flicking#control}\n * You can use the values of the constant {@link MOVE_TYPE}\n * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다\n * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다\n * @type {MOVE_TYPE | Pair}\n * @default \"snap\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )}\n * @example\n * |moveType|control|options|\n * |:---:|:---:|:---:|\n * |\"snap\"|{@link SnapControl}||\n * |\"freeScroll\"|{@link FreeControl}|{@link FreeControlOptions}|\n *\n * ```ts\n * import Flicking, { MOVE_TYPE } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking({\n * moveType: MOVE_TYPE.SNAP\n * });\n * ```\n *\n * ```ts\n * const flicking = new Flicking({\n * // If you want more specific settings for the moveType\n * // [moveType, options for that moveType]\n * // In this case, it's [\"freeScroll\", FreeControlOptions]\n * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }]\n * });\n * ```\n */\n public get moveType() { return this._moveType; }\n /**\n * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.\n * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.\n * @type {number}\n * @default 40\n * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}\n */\n public get threshold() { return this._threshold; }\n /**\n * Set animation to be interruptable by click/touch.\n * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )}\n */\n public get interruptable() { return this._interruptable; }\n /**\n * The size value of the bounce area. Only can be enabled when `circular=false`.\n * You can set different bounce value for prev/next direction by using array.\n * `number` for px value, and `string` for px, and % value relative to viewport size.\n * You have to call {@link Control#updateInput} after changing this to take effect.\n * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다.\n * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다.\n * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다.\n * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다.\n * @type {string | number | Array}\n * @default \"20%\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // % values, relative to viewport element(\".flicking-viewport\")'s size\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000\n * ];\n * ```\n *\n * @example\n * ```ts\n * const flicking = new Flicking(\"#el\", { bounce: \"20%\" });\n *\n * flicking.bounce = \"100%\";\n * flicking.control.updateInput(); // Call this to update!\n * ```\n */\n public get bounce() { return this._bounce; }\n /**\n * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward\n * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px)\n * @type {number}\n * @default 30\n * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )}\n */\n public get iOSEdgeSwipeThreshold() { return this._iOSEdgeSwipeThreshold; }\n /**\n * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element\n * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )}\n */\n public get preventClickOnDrag() { return this._preventClickOnDrag; }\n /**\n * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging\n * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )}\n */\n public get preventDefaultOnDrag() { return this._preventDefaultOnDrag; }\n /**\n * Automatically call {@link Flicking#disableInput disableInput()} on initialization\n * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )}\n */\n public get disableOnInit() { return this._disableOnInit; }\n /**\n * Change active panel index on mouse/touch hold while animating.\n * `index` of the `willChange`/`willRestore` event will be used as new index.\n * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.\n * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}\n */\n public get changeOnHold() { return this._changeOnHold; }\n // PERFORMANCE\n /**\n * Whether to render visible panels only. This can dramatically increase performance when there're many panels\n * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )}\n */\n public get renderOnlyVisible() { return this._renderOnlyVisible; }\n /**\n * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1`\n * Must be used with `panelsPerview`.\n * After Flicking's initialized, this property can be used to add/remove the panel count.\n * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다.\n * `panelsPerView` 옵션과 함께 사용되어야만 합니다.\n * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다.\n * @type {VirtualManager}\n * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수\n * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @property {string} [panelClass=\"flicking-panel\"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )}\n * @example\n * ```ts\n * import Flicking, { VirtualPanel } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking(\"#some_el\", {\n * panelsPerView: 3,\n * virtual: {\n * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`,\n * initialPanelCount: 100\n * }\n * });\n *\n * // Add 100 virtual panels (at the end)\n * flicking.virtual.append(100);\n *\n * // Remove 100 virtual panels from 0 to 100\n * flicking.virtual.remove(0, 100);\n * ```\n */\n public get virtual() { return this._virtualManager; }\n\n // OTHERS\n /**\n * Call {@link Flicking#init init()} automatically when creating Flicking's instance\n * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )}\n * @readonly\n */\n public get autoInit() { return this._autoInit; }\n /**\n * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed\n * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n */\n public get autoResize() { return this._autoResize; }\n /**\n * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option\n * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )}\n */\n public get useResizeObserver() { return this._useResizeObserver; }\n /**\n * Delays size recalculation from `autoResize` by the given time in milisecond.\n * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again.\n * This can increase performance by preventing `resize` being called too often.\n * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다.\n * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다.\n * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다.\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )}\n */\n public get resizeDebounce() { return this._resizeDebounce; }\n /**\n * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond.\n * This guarantees that size recalculation is performed at least once every (n)ms.\n * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms)\n * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다.\n * @type {number}\n * @default 100\n * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )}\n */\n public get maxResizeDebounce() { return this._maxResizeDebounce; }\n /**\n * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle.\n * This can prevent 1px offset issue in some cases where panel size has the fractional part.\n * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element.\n * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다.\n * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다.\n * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )}\n */\n public get useFractionalSize() { return this._useFractionalSize; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n */\n public get externalRenderer() { return this._externalRenderer; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n * @deprecated\n */\n public get renderExternal() { return this._renderExternal; }\n\n // Options Setter\n // UI / LAYOUT\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n this._renderer.align = val;\n this._camera.align = val;\n void this.resize();\n }\n\n public set defaultIndex(val: FlickingOptions[\"defaultIndex\"]) { this._defaultIndex = val; }\n public set horizontal(val: FlickingOptions[\"horizontal\"]) {\n this._horizontal = val;\n this._control.controller.updateDirection();\n void this.resize();\n }\n\n public set circular(val: FlickingOptions[\"circular\"]) {\n this._circular = val;\n void this.resize();\n }\n\n public set bound(val: FlickingOptions[\"bound\"]) {\n this._bound = val;\n void this.resize();\n }\n\n public set adaptive(val: FlickingOptions[\"adaptive\"]) {\n this._adaptive = val;\n void this.resize();\n }\n\n public set panelsPerView(val: FlickingOptions[\"panelsPerView\"]) {\n this._panelsPerView = val;\n void this.resize();\n }\n\n public set noPanelStyleOverride(val: FlickingOptions[\"noPanelStyleOverride\"]) {\n this._noPanelStyleOverride = val;\n void this.resize();\n }\n\n public set resizeOnContentsReady(val: FlickingOptions[\"resizeOnContentsReady\"]) {\n this._resizeOnContentsReady = val;\n if (val) {\n this._renderer.checkPanelContentsReady(this._renderer.panels);\n }\n }\n\n public set nested(val: FlickingOptions[\"nested\"]) {\n this._nested = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.nested = val;\n }\n }\n\n // EVENTS\n public set needPanelThreshold(val: FlickingOptions[\"needPanelThreshold\"]) { this._needPanelThreshold = val; }\n public set preventEventsBeforeInit(val: FlickingOptions[\"preventEventsBeforeInit\"]) { this._preventEventsBeforeInit = val; }\n // ANIMATION\n public set deceleration(val: FlickingOptions[\"deceleration\"]) {\n this._deceleration = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.deceleration = val;\n }\n }\n\n public set easing(val: FlickingOptions[\"easing\"]) {\n this._easing = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.easing = val;\n }\n }\n\n public set duration(val: FlickingOptions[\"duration\"]) { this._duration = val; }\n // INPUT\n public set inputType(val: FlickingOptions[\"inputType\"]) {\n this._inputType = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.inputType = val;\n }\n }\n\n public set moveType(val: FlickingOptions[\"moveType\"]) {\n this._moveType = val;\n\n const prevControl = this._control;\n const newControl = this._createControl();\n const activePanel = prevControl.activePanel;\n newControl.copy(prevControl);\n\n const prevProgressInPanel = activePanel\n ? this._camera.getProgressInPanel(activePanel)\n : 0;\n\n this._control = newControl;\n this._control.updatePosition(prevProgressInPanel);\n this._control.updateInput();\n }\n\n public set threshold(val: FlickingOptions[\"threshold\"]) { this._threshold = val; }\n public set interruptable(val: FlickingOptions[\"interruptable\"]) {\n this._interruptable = val;\n\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.interruptable = val;\n }\n }\n\n public set bounce(val: FlickingOptions[\"bounce\"]) {\n this._bounce = val;\n this._control.updateInput();\n }\n\n public set iOSEdgeSwipeThreshold(val: FlickingOptions[\"iOSEdgeSwipeThreshold\"]) {\n this._iOSEdgeSwipeThreshold = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.iOSEdgeSwipeThreshold = val;\n }\n }\n\n public set preventClickOnDrag(val: FlickingOptions[\"preventClickOnDrag\"]) {\n const prevVal = this._preventClickOnDrag;\n\n if (val === prevVal) return;\n\n const controller = this._control.controller;\n\n if (val) {\n controller.addPreventClickHandler();\n } else {\n controller.removePreventClickHandler();\n }\n\n this._preventClickOnDrag = val;\n }\n\n public set preventDefaultOnDrag(val: FlickingOptions[\"preventDefaultOnDrag\"]) {\n this._preventDefaultOnDrag = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.preventDefaultOnDrag = val;\n }\n }\n\n public set disableOnInit(val: FlickingOptions[\"disableOnInit\"]) { this._disableOnInit = val; }\n public set changeOnHold(val: FlickingOptions[\"changeOnHold\"]) { this._changeOnHold = val; }\n // PERFORMANCE\n public set renderOnlyVisible(val: FlickingOptions[\"renderOnlyVisible\"]) {\n this._renderOnlyVisible = val;\n void this._renderer.render();\n }\n\n // OTHERS\n public set autoResize(val: FlickingOptions[\"autoResize\"]) {\n this._autoResize = val;\n\n if (val) {\n this._autoResizer.enable();\n } else {\n this._autoResizer.disable();\n }\n }\n\n public set useResizeObserver(val: FlickingOptions[\"useResizeObserver\"]) {\n this._useResizeObserver = val;\n\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n }\n\n /**\n * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string\n * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다.\n * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist|\n * \n *\n * |code|조건|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우|\n *\n * \n * @example\n * ```ts\n * import Flicking from \"@egjs/flicking\";\n *\n * // Creating new instance of Flicking with HTMLElement\n * const flicking = new Flicking(document.querySelector(\".flicking-viewport\"), { circular: true });\n *\n * // Creating new instance of Flicking with CSS selector\n * const flicking2 = new Flicking(\".flicking-viewport\", { circular: true });\n * ```\n */\n public constructor(root: HTMLElement | string, {\n align = ALIGN.CENTER,\n defaultIndex = 0,\n horizontal = true,\n circular = false,\n circularFallback = CIRCULAR_FALLBACK.LINEAR,\n bound = false,\n adaptive = false,\n panelsPerView = -1,\n noPanelStyleOverride = false,\n resizeOnContentsReady = false,\n nested = false,\n needPanelThreshold = 0,\n preventEventsBeforeInit = true,\n deceleration = 0.0075,\n duration = 500,\n easing = x => 1 - Math.pow(1 - x, 3),\n inputType = [\"mouse\", \"touch\"],\n moveType = \"snap\",\n threshold = 40,\n interruptable = true,\n bounce = \"20%\",\n iOSEdgeSwipeThreshold = 30,\n preventClickOnDrag = true,\n preventDefaultOnDrag = false,\n disableOnInit = false,\n changeOnHold = false,\n renderOnlyVisible = false,\n virtual = null,\n autoInit = true,\n autoResize = true,\n useResizeObserver = true,\n resizeDebounce = 0,\n maxResizeDebounce = 100,\n useFractionalSize = false,\n externalRenderer = null,\n renderExternal = null\n }: Partial = {}) {\n super();\n\n // Internal states\n this._initialized = false;\n this._plugins = [];\n\n // Bind options\n this._align = align;\n this._defaultIndex = defaultIndex;\n this._horizontal = horizontal;\n this._circular = circular;\n this._circularFallback = circularFallback;\n this._bound = bound;\n this._adaptive = adaptive;\n this._panelsPerView = panelsPerView;\n this._noPanelStyleOverride = noPanelStyleOverride;\n this._resizeOnContentsReady = resizeOnContentsReady;\n this._nested = nested;\n this._virtual = virtual;\n this._needPanelThreshold = needPanelThreshold;\n this._preventEventsBeforeInit = preventEventsBeforeInit;\n this._deceleration = deceleration;\n this._duration = duration;\n this._easing = easing;\n this._inputType = inputType;\n this._moveType = moveType;\n this._threshold = threshold;\n this._interruptable = interruptable;\n this._bounce = bounce;\n this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;\n this._preventClickOnDrag = preventClickOnDrag;\n this._preventDefaultOnDrag = preventDefaultOnDrag;\n this._disableOnInit = disableOnInit;\n this._changeOnHold = changeOnHold;\n this._renderOnlyVisible = renderOnlyVisible;\n this._autoInit = autoInit;\n this._autoResize = autoResize;\n this._useResizeObserver = useResizeObserver;\n this._resizeDebounce = resizeDebounce;\n this._maxResizeDebounce = maxResizeDebounce;\n this._useFractionalSize = useFractionalSize;\n this._externalRenderer = externalRenderer;\n this._renderExternal = renderExternal;\n\n // Create core components\n this._viewport = new Viewport(this, getElement(root));\n this._autoResizer = new AutoResizer(this);\n this._renderer = this._createRenderer();\n this._camera = this._createCamera();\n this._control = this._createControl();\n this._virtualManager = new VirtualManager(this, virtual);\n\n if (this._autoInit) {\n void this.init();\n }\n }\n\n /**\n * Initialize Flicking and move to the default index\n * This is automatically called on Flicking's constructor when `autoInit` is true(default)\n * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다\n * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다\n * @fires Flicking#ready\n * @return {Promise}\n */\n public init(): Promise {\n if (this._initialized) return Promise.resolve();\n\n const camera = this._camera;\n const renderer = this._renderer;\n const control = this._control;\n const virtualManager = this._virtualManager;\n const originalTrigger = this.trigger;\n const preventEventsBeforeInit = this._preventEventsBeforeInit;\n\n camera.init();\n virtualManager.init();\n renderer.init(this);\n control.init(this);\n\n if (preventEventsBeforeInit) {\n this.trigger = () => this;\n }\n\n this._initialResize();\n\n // Look at initial panel\n this._moveToInitialPanel();\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n if (this._preventClickOnDrag) {\n control.controller.addPreventClickHandler();\n }\n if (this._disableOnInit) {\n this.disableInput();\n }\n renderer.checkPanelContentsReady(renderer.panels);\n this._initialized = true;\n\n return renderer.render().then(() => {\n // Done initializing & emit ready event\n this._plugins.forEach(plugin => plugin.init(this));\n\n if (preventEventsBeforeInit) {\n this.trigger = originalTrigger;\n }\n this.trigger(new ComponentEvent(EVENTS.READY));\n });\n }\n\n /**\n * Destroy Flicking and remove all event handlers\n * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다\n * @return {void}\n */\n public destroy(): void {\n this.off();\n\n this._autoResizer.disable();\n this._control.destroy();\n this._camera.destroy();\n this._renderer.destroy();\n\n this._plugins.forEach(plugin => plugin.destroy());\n\n this._initialized = false;\n }\n\n /**\n * Move to the previous panel (current index - 1)\n * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n * \n * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise\n */\n public prev(duration: number = this._duration): Promise {\n return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, duration, DIRECTION.PREV);\n }\n\n /**\n * Move to the next panel (current index + 1)\n * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise\n */\n public next(duration: number = this._duration) {\n return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, duration, DIRECTION.NEXT);\n }\n\n /**\n * Move to the panel with given index\n * @ko 주어진 인덱스에 해당하는 패널로 이동합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public moveTo(index: number, duration: number = this._duration, direction: ValueOf = DIRECTION.NONE) {\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE));\n }\n\n if (this._control.animating) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.ANIMATION_ALREADY_PLAYING, ERROR.CODE.ANIMATION_ALREADY_PLAYING));\n }\n\n if (this._control.holding) {\n this._control.controller.release();\n }\n\n return this._control.moveToPanel(panel, {\n duration,\n direction\n });\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우\n * @return {void}\n */\n public updateAnimation(index: number, duration?: number, direction?: ValueOf): void {\n if (!this._control.animating) {\n return;\n }\n\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n throw new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE);\n }\n\n this._control.updateAnimation(panel, duration, direction);\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @fires Flicking#moveEnd\n * @return {void}\n */\n public stopAnimation(): void {\n if (!this._control.animating) {\n return;\n }\n\n this._control.stopAnimation();\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n * @example\n * ```ts\n * const panel = flicking.getPanel(0);\n * // Which is a shorthand to...\n * const samePanel = flicking.panels[0];\n * ```\n */\n public getPanel(index: number): Panel | null {\n return this._renderer.getPanel(index);\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @return {this}\n */\n public enableInput(): this {\n this._control.enable();\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @return {this}\n */\n public disableInput(): this {\n this._control.disable();\n return this;\n }\n\n /**\n * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()}\n * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다\n * @param {object} options Status retrieving optionsStatus 반환 옵션\n * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다\n * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다\n * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다\n * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true\n * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다.\n * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체.\n */\n public getStatus({\n index = true,\n position = true,\n includePanelHTML = false,\n visiblePanelsOnly = false\n }: Partial<{\n index: boolean;\n position: boolean;\n includePanelHTML: boolean;\n visiblePanelsOnly: boolean;\n }> = {}): Status {\n const camera = this._camera;\n const panels = visiblePanelsOnly ? this.visiblePanels : this.panels;\n\n const status: Status = {\n panels: panels.map(panel => {\n const panelInfo: Status[\"panels\"][0] = { index: panel.index };\n\n if (includePanelHTML) {\n panelInfo.html = panel.element.outerHTML;\n }\n\n return panelInfo;\n })\n };\n\n if (index) {\n status.index = this.index;\n }\n if (position) {\n const nearestAnchor = camera.findNearestAnchor(camera.position);\n\n if (nearestAnchor) {\n status.position = {\n panel: nearestAnchor.panel.index,\n progressInPanel: camera.getProgressInPanel(nearestAnchor.panel)\n };\n }\n\n }\n\n if (visiblePanelsOnly) {\n const visiblePanels = this.visiblePanels;\n\n status.visibleOffset = visiblePanels[0]?.index ?? 0;\n }\n\n return status;\n }\n\n /**\n * Restore to the state of the given {@link Status}\n * @ko 주어진 {@link Status}의 상태로 복원합니다\n * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다\n * @return {void}\n */\n public setStatus(status: Status): void {\n if (!this._initialized) {\n throw new FlickingError(ERROR.MESSAGE.NOT_INITIALIZED, ERROR.CODE.NOT_INITIALIZED);\n }\n\n const {\n index,\n position,\n visibleOffset,\n panels\n } = status;\n\n const renderer = this._renderer;\n const control = this._control;\n\n // Can't add/remove panels on external rendering\n if (panels[0]?.html && !this._renderExternal) {\n renderer.batchRemove({ index: 0, deleteCount: this.panels.length, hasDOMInElements: true });\n renderer.batchInsert({ index: 0, elements: parseElement(panels.map(panel => panel.html!)), hasDOMInElements: true });\n }\n\n if (index != null) {\n const panelIndex = visibleOffset\n ? index - visibleOffset\n : index;\n\n void this.moveTo(panelIndex, 0).catch(() => void 0);\n }\n\n if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) {\n const { panel, progressInPanel } = position;\n const panelIndex = visibleOffset\n ? panel - visibleOffset\n : panel;\n const panelRange = renderer.panels[panelIndex].range;\n const newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n void control.moveToPosition(newCameraPos, 0).catch(() => void 0);\n }\n }\n\n /**\n * Add plugins that can have different effects on Flicking\n * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다\n * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들)\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public addPlugins(...plugins: Plugin[]) {\n if (this._initialized) {\n plugins.forEach(item => item.init(this));\n }\n\n this._plugins.push(...plugins);\n\n return this;\n }\n\n /**\n * Remove plugins from Flicking.\n * @ko 플리킹으로부터 플러그인들을 제거합니다.\n * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들).\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public removePlugins(...plugins: Plugin[]) {\n plugins.forEach(item => {\n const foundIndex = findIndex(this._plugins, val => val === item);\n\n if (foundIndex >= 0) {\n item.destroy();\n this._plugins.splice(foundIndex, 1);\n }\n });\n\n return this;\n }\n\n /**\n * Update viewport/panel sizes\n * @ko 패널 및 뷰포트의 크기를 갱신합니다\n * @method\n * @fires Flicking#beforeResize\n * @fires Flicking#afterResize\n * @return {this}\n */\n public async resize(): Promise {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n const activePanel = control.activePanel;\n const prevWidth = viewport.width;\n const prevHeight = viewport.height;\n const prevProgressInPanel = activePanel\n ? camera.getProgressInPanel(activePanel)\n : 0;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: prevWidth,\n height: prevHeight,\n element: viewport.element\n }));\n\n viewport.resize();\n await renderer.forceRenderAllPanels(); // Render all panel elements, to update sizes\n if (!this._initialized) {\n return;\n }\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateAdaptiveHeight();\n camera.updatePanelOrder();\n camera.updateOffset();\n await renderer.render();\n if (!this._initialized) {\n return;\n }\n\n if (control.animating) {\n // TODO:\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: prevWidth,\n height: prevHeight\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n\n /**\n * Add new panels after the last panel\n * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of appended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new Flicking(\"#flick\");\n * // These are possible parameters\n * flicking.append(document.createElement(\"div\"));\n * flicking.append(\"\\Panel\\\");\n * flicking.append([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.append(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public append(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(this._renderer.panelCount, element);\n }\n\n /**\n * Add new panels before the first panel\n * This will increase index of panels after by the number of panels added\n * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다\n * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다.\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.prepend(document.createElement(\"div\"));\n * flicking.prepend(\"\\Panel\\\");\n * flicking.prepend([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.prepend(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public prepend(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(0, element);\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.insert(0, document.createElement(\"div\"));\n * flicking.insert(2, \"\\Panel\\\");\n * flicking.insert(1, [\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.insert(3, \"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public insert(index: number, element: ElementLike | ElementLike[]): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchInsert({ index, elements: parseElement(element), hasDOMInElements: true });\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {number} index Index of panel to remove제거할 패널의 인덱스\n * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @return {Panel[]} An array of removed panels제거된 패널들의 배열\n */\n public remove(index: number, deleteCount: number = 1): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchRemove({ index, deleteCount, hasDOMInElements: true });\n }\n\n private _createControl(): Control {\n const moveType = this._moveType;\n const moveTypes = Object.keys(MOVE_TYPE).map(key => MOVE_TYPE[key] as ValueOf);\n\n const moveTypeStr = Array.isArray(moveType)\n ? moveType[0]\n : moveType;\n\n const moveTypeOptions = Array.isArray(moveType)\n ? moveType[1] ?? {}\n : {};\n\n if (!includes(moveTypes, moveTypeStr)) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"moveType\", JSON.stringify(moveType)), ERROR.CODE.WRONG_OPTION);\n }\n\n switch (moveTypeStr) {\n case MOVE_TYPE.SNAP:\n return new SnapControl(moveTypeOptions as SnapControlOptions);\n case MOVE_TYPE.FREE_SCROLL:\n return new FreeControl(moveTypeOptions as FreeControlOptions);\n case MOVE_TYPE.STRICT:\n return new StrictControl(moveTypeOptions as StrictControlOptions);\n }\n }\n\n private _createCamera(): Camera {\n if (this._circular && this._bound) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"circular\\\" and \\\"bound\\\" option cannot be used together, ignoring bound.\");\n }\n\n return new Camera(this, {\n align: this._align\n });\n }\n\n private _createRenderer(): Renderer {\n const externalRenderer = this._externalRenderer;\n if (this._virtual && this._panelsPerView <= 0) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"virtual\\\" and \\\"panelsPerView\\\" option should be used together, ignoring virtual.\");\n }\n\n return externalRenderer\n ? externalRenderer\n : this._renderExternal\n ? this._createExternalRenderer()\n : this._createVanillaRenderer();\n }\n\n private _createExternalRenderer(): ExternalRenderer {\n const {\n renderer,\n rendererOptions\n } = this._renderExternal!;\n\n return new (renderer)({ align: this._align, ...rendererOptions });\n }\n\n private _createVanillaRenderer(): VanillaRenderer {\n const virtual = this.virtualEnabled;\n\n return new VanillaRenderer({\n align: this._align,\n strategy: virtual\n ? new VirtualRenderingStrategy()\n : new NormalRenderingStrategy({\n providerCtor: VanillaElementProvider\n })\n });\n }\n\n private _moveToInitialPanel(): void {\n const renderer = this._renderer;\n const control = this._control;\n const camera = this._camera;\n const defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);\n\n if (!defaultPanel) return;\n\n const nearestAnchor = camera.findNearestAnchor(defaultPanel.position);\n const initialPanel = (nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index) ? nearestAnchor.panel : defaultPanel;\n control.setActive(initialPanel, null, false);\n\n if (!nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n let position = initialPanel.position;\n\n if (!camera.canReach(initialPanel)) {\n position = nearestAnchor.position;\n }\n\n camera.lookAt(position);\n control.updateInput();\n camera.updateOffset();\n }\n\n private _initialResize() {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: 0,\n height: 0,\n element: viewport.element\n }));\n\n viewport.resize();\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateOffset();\n control.updateInput();\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== 0 || newHeight !== 0;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: 0,\n height: 0\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n}\n\nexport default Flicking;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Viewport from \"./Viewport\";\nimport FlickingError from \"./FlickingError\";\nimport AnchorPoint from \"./AnchorPoint\";\nimport VirtualManager from \"./VirtualManager\";\n\nexport {\n Viewport,\n FlickingError,\n AnchorPoint,\n VirtualManager\n};\n\nexport * from \"./panel\";\n","import Component from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\n\n/**\n * Decorator that makes the method of flicking available in the framework.\n * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.\n * @memberof eg.Flicking\n * @private\n * @example\n * ```js\n * import Flicking, { withFlickingMethods } from \"@egjs/flicking\";\n *\n * class Flicking extends React.Component> {\n * @withFlickingMethods\n * private flicking: Flicking;\n * }\n * ```\n */\nconst withFlickingMethods = (prototype: any, flickingName: string) => {\n [Component.prototype, Flicking.prototype].forEach(proto => {\n Object.getOwnPropertyNames(proto).filter(name => !prototype[name] && name.indexOf(\"_\") !== 0 && name !== \"constructor\")\n .forEach((name: string) => {\n const descriptor = Object.getOwnPropertyDescriptor(proto, name)!;\n\n if (descriptor.value) {\n // Public Function\n Object.defineProperty(prototype, name, {\n value: function(...args) {\n return descriptor.value.call(this[flickingName], ...args);\n }\n });\n } else {\n const getterDescriptor: { get?: () => any; set?: (val: any) => void } = {};\n if (descriptor.get) {\n getterDescriptor.get = function() {\n const flicking = this[flickingName];\n return flicking && descriptor.get?.call(flicking);\n };\n }\n if (descriptor.set) {\n getterDescriptor.set = function(...args) {\n return descriptor.set?.call(this[flickingName], ...args);\n };\n }\n\n Object.defineProperty(prototype, name, getterDescriptor);\n }\n });\n });\n};\n\nexport default withFlickingMethods;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\nimport Renderer from \"../renderer/Renderer\";\nimport Panel from \"../core/panel/Panel\";\n\nexport default (flicking: Flicking, diffResult: DiffResult, rendered: any[]) => {\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n const prevList = [...diffResult.prevList];\n\n const added: Panel[] = [];\n const removed: Panel[] = [];\n\n if (diffResult.removed.length > 0) {\n let endIdx = -1;\n let prevIdx = -1;\n\n diffResult.removed.forEach(removedIdx => {\n if (endIdx < 0) {\n endIdx = removedIdx;\n }\n\n if (prevIdx >= 0 && removedIdx !== prevIdx - 1) {\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n\n endIdx = removedIdx;\n prevIdx = removedIdx;\n } else {\n prevIdx = removedIdx;\n }\n\n prevList.splice(removedIdx, 1);\n });\n\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n }\n\n diffResult.ordered.forEach(([from, to]) => {\n const prevPanel = panels.splice(from, 1)[0];\n panels.splice(to, 0, prevPanel);\n });\n\n if (diffResult.ordered.length > 0) {\n panels.forEach((panel, idx) => {\n const indexDiff = idx - panel.index;\n\n if (indexDiff > 0) {\n panel.increaseIndex(indexDiff);\n } else {\n panel.decreaseIndex(-indexDiff);\n }\n });\n\n panels.sort((panel1, panel2) => panel1.index - panel2.index);\n\n panels.forEach(panel => {\n panel.updatePosition();\n });\n }\n\n if (diffResult.added.length > 0) {\n let startIdx = -1;\n let prevIdx = -1;\n\n const addedElements = rendered.slice(prevList.length);\n\n diffResult.added.forEach((addedIdx, idx) => {\n if (startIdx < 0) {\n startIdx = idx;\n }\n\n if (prevIdx >= 0 && addedIdx !== prevIdx + 1) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx, idx + 1));\n\n startIdx = -1;\n prevIdx = -1;\n } else {\n prevIdx = addedIdx;\n }\n });\n\n if (startIdx >= 0) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx));\n }\n }\n\n if (diffResult.added.length > 0 || diffResult.removed.length > 0) {\n renderer.updateAfterPanelChange(added, removed);\n }\n};\n\nconst batchInsert = (renderer: Renderer, diffResult: DiffResult, addedElements: any[], startIdx: number, endIdx?: number) => {\n return renderer.batchInsertDefer(\n ...diffResult.added.slice(startIdx, endIdx).map((index, elIdx) => ({ index, elements: [addedElements[elIdx]], hasDOMInElements: false }))\n );\n};\n\nconst batchRemove = (renderer: Renderer, startIdx: number, endIdx?: number) => {\n const removed = renderer.panels.slice(startIdx, endIdx);\n\n return renderer.batchRemoveDefer({ index: startIdx, deleteCount: removed.length, hasDOMInElements: false });\n};\n\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\n\nexport default (flicking: Flicking, diffResult: DiffResult) => {\n const removedPanels = diffResult.removed.reduce((map, idx) => {\n map[idx] = true;\n return map;\n }, {});\n\n const maintainedMap = diffResult.maintained.reduce((map, [prev, current]) => {\n map[prev] = current;\n return map;\n }, {});\n\n return [\n ...flicking.panels\n .filter(panel => !removedPanels[panel.index])\n // Sort panels by position\n .sort((panel1, panel2) => (panel1.position + panel1.offset) - (panel2.position + panel2.offset))\n .map(panel => diffResult.list[maintainedMap[panel.index]]),\n ...diffResult.added.map(idx => diffResult.list[idx])\n ];\n};\n\n","import { FlickingOptions } from \"../Flicking\";\nimport { ALIGN } from \"../const/external\";\nimport { parseArithmeticExpression } from \"../utils\";\n\nexport default (align: FlickingOptions[\"align\"] = ALIGN.CENTER, horizontal: boolean = true, firstPanelSize?: string) => {\n const cameraAlign = getCameraAlign(align);\n const panelAlign = getPanelAlign(align);\n\n if (panelAlign == null) return \"\";\n\n const camPosition = `calc(${cameraAlign} - (${firstPanelSize || \"0px\"} * ${panelAlign.percentage}) - ${panelAlign.absolute}px)`;\n\n return horizontal\n ? `translate(${camPosition})`\n : `translate(0, ${camPosition})`;\n};\n\nconst getCameraAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n return parseAlign(alignVal);\n};\n\nconst getPanelAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\n return parseArithmeticExpression(parseAlign(alignVal));\n};\n\nconst parseAlign = (alignVal: number | string) => {\n if (typeof alignVal === \"number\") {\n return `${alignVal}px`;\n }\n\n switch (alignVal) {\n case ALIGN.CENTER:\n return \"50%\";\n case ALIGN.NEXT:\n return \"100%\";\n case ALIGN.PREV:\n return \"0%\";\n default:\n return alignVal;\n }\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"./Flicking\";\nimport * as Core from \"./core\";\nimport * as Camera from \"./camera\";\nimport * as Control from \"./control\";\nimport * as Renderer from \"./renderer\";\nimport * as Constants from \"./const/external\";\nimport * as CFC from \"./cfc\";\nimport * as Utils from \"./utils\";\nimport { merge } from \"./utils\";\n\nmerge(Flicking, Core);\nmerge(Flicking, Camera);\nmerge(Flicking, Control);\nmerge(Flicking, Renderer);\nmerge(Flicking, Constants);\nmerge(Flicking, CFC);\nmerge(Flicking, Utils);\n\nexport default Flicking;\n"],"names":["CODE","WRONG_TYPE","ELEMENT_NOT_FOUND","VAL_MUST_NOT_NULL","NOT_ATTACHED_TO_FLICKING","WRONG_OPTION","INDEX_OUT_OF_RANGE","POSITION_NOT_REACHABLE","TRANSFORM_NOT_SUPPORTED","STOP_CALLED_BY_USER","ANIMATION_INTERRUPTED","ANIMATION_ALREADY_PLAYING","NOT_ALLOWED_IN_FRAMEWORK","NOT_INITIALIZED","NO_ACTIVE","NOT_ALLOWED_IN_VIRTUAL","MESSAGE","wrongVal","correctTypes","map","type","join","selector","val","name","optionName","min","max","position","EVENTS","READY","BEFORE_RESIZE","AFTER_RESIZE","HOLD_START","HOLD_END","MOVE_START","MOVE","MOVE_END","WILL_CHANGE","CHANGED","WILL_RESTORE","RESTORED","SELECT","NEED_PANEL","VISIBLE_CHANGE","REACH_EDGE","PANEL_CHANGE","ALIGN","PREV","CENTER","NEXT","DIRECTION","NONE","MOVE_TYPE","SNAP","FREE_SCROLL","STRICT","CLASS","VERTICAL","HIDDEN","DEFAULT_VIRTUAL","CIRCULAR_FALLBACK","LINEAR","BOUND","ORDER","LTR","RTL","merge","target","sources","_i","arguments","length","forEach","source","Object","keys","key","getElement","el","parent","targetEl","isString","parentEl","document","queryResult","querySelector","FlickingError","ERROR","nodeType","Node","ELEMENT_NODE","checkExistence","value","nameOnErrMsg","clamp","x","Math","getFlickingAttached","toArray","iterable","slice","call","parseAlign","align","size","alignPoint","parseArithmeticSize","parseBounce","bounce","parsedBounce","Array","isArray","parsedVal","cssValue","base","parsed","parseArithmeticExpression","percentage","absolute","cssRegex","idx","matchResult","exec","sign","unit","parsedValue","parseFloat","signMultiplier","parseCSSSizeValue","parsePanelAlign","panel","getDirection","start","end","parseElement","element","elements","tempDiv","createElement","innerHTML","push","apply","__spread","children","firstChild","removeChild","getMinusCompensatedIndex","includes","array","array_1","__values","array_1_1","done","next","circulatePosition","pos","offset","find","checker","array_2","array_2_1","findRight","findIndex","getProgress","prev","getStyle","window","getComputedStyle","currentStyle","setSize","_a","width","height","style","isBetween","circulateIndex","index","range","arr","i","getElementSize","horizontal","useFractionalSize","useOffset","baseSize","isBorderBoxSizing","boxSizing","border","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","sizeStr","setPrototypeOf","obj","proto","__proto__","_super","__extends","message","code","_this","prototype","Error","Viewport","flicking","_flicking","_el","_width","_height","_padding","left","right","top","bottom","_isBorderBoxSizing","__proto","defineProperty","get","newWidth","newHeight","resize","elStyle","AutoResizer","_onResize","resizeDebounce","maxResizeDebounce","_maxResizeDebounceTimer","setTimeout","_doScheduledResize","_resizeTimer","clearTimeout","_skipFirstResize","isFirstResize","_enabled","_resizeObserver","enable","viewport","disable","useResizeObserver","ResizeObserver","viewportSizeNot0","resizeObserver","observe","addEventListener","disconnect","removeEventListener","VanillaElementProvider","_element","_rendered","show","cameraEl","camera","parentElement","appendChild","hide","VirtualElementProvider","_virtualElement","nativeElement","visible","elIndex","_panel","elementIndex","virtualElements","virtual","init","VirtualManager","options","_renderPanel","renderPanel","_initialPanelCount","_b","initialPanelCount","_cache","_c","cache","_panelClass","_d","panelClass","_elements","set","renderer","panels","uncacheRenderResult","virtualEnabled","externalRenderer","renderExternal","_initVirtualElements","nativeEl","display","append","count","insert","prepend","batchInsert","hasDOMInElements","remove","batchRemove","deleteCount","cameraElement","panelsPerView","fragment","createDocumentFragment","newElements","panelEl","className","dataset","toString","EVENT","HOLD","CHANGE","RELEASE","ANIMATION_END","FINISH","POSITION_KEY","STATE_TYPE","State","_delta","_targetPanel","onEnter","prevState","onHold","ctx","onChange","onRelease","onAnimationEnd","onFinish","_moveToChangedPosition","axesEvent","transitTo","delta","AXES","prevPosition","newPosition","circularEnabled","lookAt","moveEvent","ComponentEvent","isTrusted","holding","direction","trigger","isCanceled","DISABLED","IdleState","animating","panelCount","holdStartEvent","HOLDING","controller","control","animatingContext","moveStartEvent","ANIMATING","HoldingState","_releaseEvent","inputEvent","offsetX","offsetY","DRAGGING","flick","setTo","IDLE","releaseEvent","srcEvent","clickedElement","touchEvent","touch","changedTouches","elementFromPoint","clientX","clientY","clickedPanel","panels_1","panels_1_1","contains","cameraPosition","clickedPanelPosition","DraggingState","destPos","duration","moveToPosition","err","AnimatingState","targetPanel","updateInput","changeOnHold","setActive","activePanel","DisabledState","stop","StateMachine","nextStateType","nextState","_state","fire","eventType","externalCtx","currentState","__assign","AxesController","_onAxesHold","_dragged","_onAxesChange","_panInput","isEnabled","_preventClickWhenDragged","e","preventDefault","stopPropagation","_resetInternalValues","_stateMachine","_axes","state","_animatingContext","axes","circular","axis","Axes","deceleration","interruptable","nested","easing","PanInput","inputType","threshold","iOSEdgeSwipeThreshold","preventDefaultOnDrag","scale","panelOrder","releaseOnScroll","connect","on","destroy","removePreventClickHandler","release","updateAnimation","stopAnimation","update","controlParams","axisManager","addPreventClickHandler","off","animateTo","Promise","reject","startPos","resolve","animate","resetContext","once","animationFinishHandler","interruptionHandler","updateDirection","panInput","Control","_controller","_activePanel","_getPosition","updatePosition","progressInPanel","clampToReachablePosition","resetActive","moveToPanel","_triggerIndexChangeEvent","_animateToPosition","newActivePanel","prevActivePanel","_nextPanel","updateAdaptiveHeight","prevIndex","prevPanel","copy","triggeringEvent","event","then","__awaiter","render","sent","catch","nearestAnchor","findNearestAnchor","removed","canReach","camPos_1","camRangeDiff","rangeDiff","possiblePositions","filter","reduce","nearestPosition","abs","Infinity","AnchorPoint","_index","_pos","SnapControl","_count","activeAnchor","findActiveAnchor","anchorAtCamera","snapThreshold","_calcSnapThreshold","posDelta","absPosDelta","snapDelta","targetAnchor","_findSnappedAnchor","_findAdjacentAnchor","currentPos","clampedPosition","anchorAtPosition","findAnchorIncludePosition","isFinite","anchors","anchorPoints","loopCount","floor","circularIndexOffset","anchorAtPositionIndex","anchor","loop","anchorIncludePosition","adjacentAnchor","getNextAnchor","getPrevAnchor","isNextDirection","panelSize","alignPos","alignPosition","margin","FreeControl","stopAtEdge","_stopAtEdge","panelRange","targetPos","StrictControl","_resetIndexRange","cameraRange","currentIndex","prevPanelIndex","nextPanelIndex","nextPanel","prevPos","nextPos","_indexRange","currentPanel","axesRange","indexRange","isOverThreshold","firstAnchor","lastAnchor","shouldBounceToFirst","shouldBounceToLast","isAdjacent","CameraMode","getAnchors","anchorsIncludingPosition","includePosition","nearest","prevDist","anchorIdx","dist","getCircularOffset","panelPos","canSee","visibleRange","isVisibleOnRange","LinearCameraMode","checkAvailability","getRange","firstPanel","getPanel","lastPanel","CircularCameraMode","firstPanelPrev","lastPanelNext","visibleSize","panelSizeSum","canSetCircularMode","every","camRange","minDist","minDistIndex","anchorCount","positionInRange","anchorInRange","possibleAnchors","toggled","toggledPrev","toggleDirection","toggledNext","_calcPanelAreaSum","visibleInCurrentRange","sum","sizeIncludingMargin","BoundCameraMode","viewportSize","panelAreaSize","isBiggerThanViewport","firstPos","lastPos","alignVal","reachablePanels","shouldPrependBoundAnchor","shouldAppendBoundAnchor","indexOffset_1","newAnchors","splice","nearestPanelAtMin","_findNearestPanel","panelAtMin","panelAtMax","panelIdx","Camera","_checkTranslateSupport","transforms","supportedStyle","documentElement","transformName","transforms_1","transforms_1_1","prefixedTransform","_transform","_align","_position","_alignPos","_offset","_circularOffset","_circularEnabled","_mode","_range","_visiblePanels","_anchors","NaN","nearestPanel","bounceSize","prevRange","nextRange","nextPosition","_panelOrder","viewportEl","firstElementChild","_updateMode","updatePanelOrder","_togglePanels","_refreshVisiblePanels","_checkNeedPanel","_checkReachEnd","updateOffset","applyTransform","getProgressInPanel","updateRange","updateCircularToggleDirection","updateAlignPos","updateAnchors","adaptive","unRenderedPanels","rendered","initialized","resetNeedPanelHistory","_needPanelTriggered","rendering","actualPosition","newVisiblePanels","prevVisiblePanels","added","visiblePanels","needPanelTriggered","cameraSize","needPanelThreshold","cameraPrev","cameraNext","newPos","wasBetweenRange","isBetweenRange","circularMode","fallbackMode","circularFallback","bound","toggle","some","isToggled","Renderer","strategy","_panels","_rendering","_strategy","panelAlign","_collectPanels","forceRenderAllPanels","markForShow","updatePanelSize","_updatePanelSizeByGrid","items","allPanelsInserted","batchInsertDefer","updateAfterPanelChange","prevFirstPanel","addedPanels","item","insertingIdx","panelsPushed","panelsInserted","_createPanel","_insertPanelElements","increaseIndex","allPanelsRemoved","batchRemoveDefer","removingIdx","panelsPulled","panelsRemoved","decreaseIndex","_removePanelElements","panelsAdded","_updateCameraAndControl","targetIndex","checkPanelContentsReady","checkingPanels","resizeOnContentsReady","hasContents","contentsReadyChecker","ImReady","loading","prevProgressInPanel","panelBehind","readyCount","totalCount","check","_showOnlyVisiblePanels","visibleIndexes","visibles","markForHide","referencePanel","gap","panelSizeObj","firstPanelSizeObj","noPanelStyleOverride","updatePanelSizes","_removeAllChildsFromCamera","nextSibling","nextSiblingElement","insertBefore","_afterRender","VanillaRenderer","updateRenderingPanels","renderPanels","_resetPanelElementOrder","_removeAllTextNodes","collectPanels","createPanel","reversedElements","getRenderingElementsByOrder","reverse","nextEl","nextElementSibling","childNodes","node","TEXT_NODE","ExternalRenderer","Panel","elementProvider","_elProvider","_removed","_loading","_resetInternalStates","_size","_margin","_toggled","_toggleDirection","cameraRangeDiff","progress","camPos","disappearPosNext","disappearPosPrev","checkingRange","_updateAlignPos","cached","marginLeft","marginRight","marginTop","marginBottom","includeMargin","includeRange","focus","moveTo","togglePosition","_togglePosition","prevToggled","camAlignPosition","camVisibleRange","camVisibleSize","minimumVisible","maximumVisible","shouldBeVisibleAtMin","shouldBeVisibleAtMax","NormalRenderingStrategy","providerCtor","_providerCtor","getRenderingIndexesByOrder","renderedPanels","notToggled","renderOnlyVisible","VirtualPanel","_cachedInnerHTML","virtualElCount","cacheRenderResult","result","newInnerHTML","VirtualRenderingStrategy","virtualManager","invisibleIndexes","sort","panel1","panel2","_","Flicking","root","defaultIndex","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","preventEventsBeforeInit","_r","_s","_t","pow","_u","_v","moveType","_w","_x","_y","_z","_0","preventClickOnDrag","_1","_2","disableOnInit","_3","_4","_5","_6","autoInit","_7","autoResize","_8","_9","_10","_11","_12","_13","_initialized","_plugins","_defaultIndex","_horizontal","_circular","_circularFallback","_bound","_adaptive","_panelsPerView","_noPanelStyleOverride","_resizeOnContentsReady","_nested","_virtual","_needPanelThreshold","_preventEventsBeforeInit","_deceleration","_duration","_easing","_inputType","_moveType","_threshold","_interruptable","_bounce","_iOSEdgeSwipeThreshold","_preventClickOnDrag","_preventDefaultOnDrag","_disableOnInit","_changeOnHold","_renderOnlyVisible","_autoInit","_autoResize","_useResizeObserver","_resizeDebounce","_maxResizeDebounce","_useFractionalSize","_externalRenderer","_renderExternal","_viewport","_autoResizer","_renderer","_createRenderer","_camera","_createCamera","_control","_createControl","_virtualManager","activeIndex","prevControl","newControl","prevVal","originalTrigger","_initialResize","_moveToInitialPanel","disableInput","plugin","enableInput","getStatus","includePanelHTML","visiblePanelsOnly","status","panelInfo","html","outerHTML","visibleOffset","setStatus","panelIndex","newCameraPos","addPlugins","plugins","removePlugins","foundIndex","prevWidth","prevHeight","sizeChanged","moveTypes","moveTypeStr","moveTypeOptions","JSON","stringify","console","warn","_createExternalRenderer","_createVanillaRenderer","rendererOptions","defaultPanel","initialPanel","VERSION","Component","withFlickingMethods","flickingName","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","args","getterDescriptor","diffResult","prevList","endIdx_1","prevIdx_1","removedIdx","ordered","__read","from","to","indexDiff","startIdx_1","prevIdx_2","addedElements_1","addedIdx","addedElements","startIdx","endIdx","elIdx","removedPanels","maintainedMap","maintained","current","list","firstPanelSize","cameraAlign","getCameraAlign","getPanelAlign","camPosition","Core","Constants","CFC","Utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;IAGG;I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;QACd,KAAKF,KAAK,CAACG,IAAI;IACb,MAAA,OAAO,MAAM,CAAA;QACf,KAAKH,KAAK,CAACC,IAAI;IACb,MAAA,OAAO,IAAI,CAAA;IACb,IAAA;IACE,MAAA,OAAOgjB,QAAQ,CAAA;IAAC,GAAA;IAEtB,CAAC;;;;;;;;;;IChDD;;;IAGG;IAWH7hB,KAAK,CAACmvB,QAAQ,EAAEwK,IAAI,CAAC,CAAA;IACrB35B,KAAK,CAACmvB,QAAQ,EAAE1M,MAAM,CAAC,CAAA;IACvBziB,KAAK,CAACmvB,QAAQ,EAAEzW,OAAO,CAAC,CAAA;IACxB1Y,KAAK,CAACmvB,QAAQ,EAAErI,QAAQ,CAAC,CAAA;IACzB9mB,KAAK,CAACmvB,QAAQ,EAAEyK,SAAS,CAAC,CAAA;IAC1B55B,KAAK,CAACmvB,QAAQ,EAAE0K,GAAG,CAAC,CAAA;IACpB75B,KAAK,CAACmvB,QAAQ,EAAE2K,KAAK,CAAC;;;;;;;;"} \ No newline at end of file diff --git a/dist/flicking.min.css b/dist/flicking.min.css deleted file mode 100644 index c57ea1ed1c..0000000000 --- a/dist/flicking.min.css +++ /dev/null @@ -1 +0,0 @@ -.flicking-viewport{position:relative;overflow:hidden}.flicking-viewport.vertical{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.flicking-viewport.vertical>.flicking-camera{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.flicking-viewport.flicking-hidden>.flicking-camera>*{visibility:hidden}.flicking-camera{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;z-index:1;will-change:transform}.flicking-camera>*{-ms-flex-negative:0;flex-shrink:0} \ No newline at end of file diff --git a/dist/flicking.min.js b/dist/flicking.min.js deleted file mode 100644 index b4a151eeb5..0000000000 --- a/dist/flicking.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright (c) 2015-present NAVER Corp. -name: @egjs/flicking -license: MIT -author: NAVER Corp. -repository: https://github.com/naver/egjs-flicking -version: 4.11.4 -*/ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("@egjs/component"),require("@egjs/axes"),require("@egjs/imready")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/axes","@egjs/imready"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n(e.eg.Component,e.eg.Axes,e.eg.ImReady)}(this,(function(e,n,t){"use strict";var i=function(e,n){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},i(e,n)};function r(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}i(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var o=function(){return o=Object.assign||function(e){for(var n,t=1,i=arguments.length;t0&&r[r.length-1])||6!==l[0]&&2!==l[0])){a=0;continue}if(3===l[0]&&(!r||l[1]>r[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function c(){for(var e=[],n=0;nt){e=n+(e-t)%i}return e},J=function(e,n){var t,i;try{for(var r=s(e),o=r.next();!o.done;o=r.next()){var a=o.value;if(n(a))return a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null},Q=function(e,n){for(var t=0;t=n&&e<=t},ie=function(e,n){return e>=n?e%n:e<0?Y((e+1)%n-1,n):e},re=function(e){for(var n=new Array(e),t=0;t=0;t--){var i=e[t];if(n(i))return i}return null},findIndex:Q,getProgress:$,getStyle:ee,setSize:ne,isBetween:te,circulateIndex:ie,range:re,getElementSize:oe,setPrototypeOf:ae},se=function(e){function n(t,i){var r=e.call(this,t)||this;return ae(r,n.prototype),r.name="FlickingError",r.code=i,r}return r(n,e),n}(Error),ue=function(){function e(e,n){this._flicking=e,this._el=n,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(n,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),n.setSize=function(e){var n=e.width,t=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=n)if(K(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if(K(t))i.style.height=t;else{var l=o?t+r.top+r.bottom:t;i.style.height=l+"px"}this.resize()},n.resize=function(){var e=this._el,n=ee(e),t=this._flicking.useFractionalSize;this._width=oe({el:e,horizontal:!0,useFractionalSize:t,useOffset:!1,style:n}),this._height=oe({el:e,horizontal:!1,useFractionalSize:t,useOffset:!1,style:n}),this._padding={left:n.paddingLeft?parseFloat(n.paddingLeft):0,right:n.paddingRight?parseFloat(n.paddingRight):0,top:n.paddingTop?parseFloat(n.paddingTop):0,bottom:n.paddingBottom?parseFloat(n.paddingBottom):0},this._isBorderBoxSizing="border-box"===n.boxSizing},e}(),ce=function(){function e(e){var n,t=this;this._onResize=function(){var e=t._flicking,n=e.resizeDebounce,i=e.maxResizeDebounce;n<=0?e.resize():(t._maxResizeDebounceTimer<=0&&i>0&&i>=n&&(t._maxResizeDebounceTimer=window.setTimeout(t._doScheduledResize,i)),t._resizeTimer>0&&(clearTimeout(t._resizeTimer),t._resizeTimer=0),t._resizeTimer=window.setTimeout(t._doScheduledResize,n))},this._doScheduledResize=function(){clearTimeout(t._resizeTimer),clearTimeout(t._maxResizeDebounceTimer),t._maxResizeDebounceTimer=-1,t._resizeTimer=-1,t._flicking.resize()},this._skipFirstResize=(n=!0,function(){n?n=!1:t._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var n=e.prototype;return Object.defineProperty(n,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),n.enable=function(){var e=this._flicking,n=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var t=0!==n.width||0!==n.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);t.observe(e.viewport.element),this._resizeObserver=t}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},n.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._enabled=!1,this},e}(),fe=function(){function e(e){this._element=e,this._rendered=!0}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),n.show=function(e){var n=this.element,t=e.camera.element;n.parentElement!==t&&(t.appendChild(n),this._rendered=!0)},n.hide=function(e){var n=this.element,t=e.camera.element;n.parentElement===t&&(t.removeChild(n),this._rendered=!1)},e}(),he=function(){function e(e){this._flicking=e}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(n,"_virtualElement",{get:function(){var e=this._flicking,n=this._panel.elementIndex;return e.virtual.elements[n]},enumerable:!1,configurable:!0}),n.init=function(e){this._panel=e},n.show=function(){},n.hide=function(){},e}(),de=function(){function e(e,n){var t,i,r,o;this._flicking=e,this._renderPanel=null!==(t=null==n?void 0:n.renderPanel)&&void 0!==t?t:function(){return""},this._initialPanelCount=null!==(i=null==n?void 0:n.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==n?void 0:n.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==n?void 0:n.panelClass)&&void 0!==o?o:N.DEFAULT_VIRTUAL,this._elements=[]}var n=e.prototype;return Object.defineProperty(n,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach((function(e){return e.uncacheRenderResult()}))},enumerable:!1,configurable:!0}),Object.defineProperty(n,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var n=e.camera.children;this._elements=n.map((function(e){return{nativeElement:e,visible:!0}}))}},n.show=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!0,t.style.display&&(t.style.display="")},n.hide=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!1,t.style.display="none"},n.append=function(e){void 0===e&&(e=1);var n=this._flicking;return this.insert(n.panels.length,e)},n.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},n.insert=function(e,n){return void 0===n&&(n=1),n<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:re(n),hasDOMInElements:!1})},n.remove=function(e,n){return n<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!1})},n._initVirtualElements=function(){var e=this,n=this._flicking,t=n.camera.element,i=n.panelsPerView,r=document.createDocumentFragment();re(i+1).map((function(n){var t=document.createElement("div");return t.className=e._panelClass,t.dataset.elementIndex=n.toString(),t})).forEach((function(e){r.appendChild(e)})),t.appendChild(r)},e}(),ge={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},pe="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(f||(f={}));var _e=function(){function n(){this._delta=0,this._targetPanel=null}var t=n.prototype;return Object.defineProperty(t,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(t,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),t.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},t.onHold=function(e){},t.onChange=function(e){},t.onRelease=function(e){},t.onAnimationEnd=function(e){},t.onFinish=function(e){},t._moveToChangedPosition=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=i.delta[pe];if(o){this._delta+=o;var a=t.camera,l=a.position,s=i.pos[pe],u=t.circularEnabled?q(s,a.range.min,a.range.max):s;a.lookAt(u);var c=new e.ComponentEvent(R.MOVE,{isTrusted:i.isTrusted,holding:this.holding,direction:U(0,i.delta[pe]),axesEvent:i});t.trigger(c),c.isCanceled()&&(a.lookAt(l),r(f.DISABLED))}},n}(),ve=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!1,e}r(t,n);var i=t.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo;if(t.renderer.panelCount<=0)r(f.DISABLED);else{var o=new e.ComponentEvent(R.HOLD_START,{axesEvent:i});t.trigger(o),o.isCanceled()?r(f.DISABLED):r(f.HOLDING)}},i.onChange=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=t.control.controller.animatingContext,a=new e.ComponentEvent(R.MOVE_START,{isTrusted:i.isTrusted,holding:this.holding,direction:U(o.start,o.end),axesEvent:i});t.trigger(a),a.isCanceled()?r(f.DISABLED):r(f.ANIMATING).onChange(n)},t}(_e),me=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!1,e._releaseEvent=null,e}r(t,n);var i=t.prototype;return i.onChange=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=i.inputEvent,a=t.horizontal?o.offsetX:o.offsetY,l=new e.ComponentEvent(R.MOVE_START,{isTrusted:i.isTrusted,holding:this.holding,direction:U(0,-a),axesEvent:i});t.trigger(l),l.isCanceled()?r(f.DISABLED):r(f.DRAGGING).onChange(n)},i.onRelease=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo;if(t.trigger(new e.ComponentEvent(R.HOLD_END,{axesEvent:i})),0!==i.delta.flick)return i.setTo({flick:t.camera.position},0),void r(f.IDLE);this._releaseEvent=i},i.onFinish=function(n){var t,i,r=n.flicking;if((0,n.transitTo)(f.IDLE),this._releaseEvent){var o,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var l=a.changedTouches[0];o=document.elementFromPoint(l.clientX,l.clientY)}else o=a.target;var u=r.renderer.panels,c=null;try{for(var h=s(u),d=h.next();!d.done;d=h.next()){var g=d.value;if(g.contains(o)){c=g;break}}}catch(e){t={error:e}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(t)throw t.error}}if(c){var p=r.camera.position,_=c.position;r.trigger(new e.ComponentEvent(R.SELECT,{index:c.index,panel:c,direction:U(p,_)}))}}},t}(_e),be=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!0,e.animating=!0,e}r(t,n);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(n){var t,i=n.flicking,r=n.axesEvent,o=n.transitTo;if(i.trigger(new e.ComponentEvent(R.HOLD_END,{axesEvent:r})),i.renderer.panelCount<=0)o(f.IDLE);else{o(f.ANIMATING);var a=i.control,l=r.destPos[pe],s=Math.max(r.duration,i.duration);try{a.moveToPosition(l,s,r)}catch(e){o(f.IDLE),r.setTo(((t={})[pe]=i.camera.position,t),0)}}},t}(_e),Pe=function(n){function t(){var e=null!==n&&n.apply(this,arguments)||this;return e.holding=!1,e.animating=!0,e}r(t,n);var i=t.prototype;return i.onHold=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=this._targetPanel,a=t.control;this._delta=0,t.control.updateInput(),t.changeOnHold&&o&&a.setActive(o,a.activePanel,i.isTrusted);var l=new e.ComponentEvent(R.HOLD_START,{axesEvent:i});t.trigger(l),l.isCanceled()?r(f.DISABLED):r(f.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(n){var t=n.flicking,i=n.axesEvent,r=n.transitTo,o=t.control,a=o.controller.animatingContext;r(f.IDLE),t.trigger(new e.ComponentEvent(R.MOVE_END,{isTrusted:i.isTrusted,direction:U(a.start,a.end),axesEvent:i}));var l=this._targetPanel;l&&o.setActive(l,o.activePanel,i.isTrusted)},t}(_e),Ee=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}r(n,e);var t=n.prototype;return t.onAnimationEnd=function(e){(0,e.transitTo)(f.IDLE)},t.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t(f.IDLE)},t.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t(f.IDLE)},n}(_e),Oe=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case f.IDLE:t=new ve;break;case f.HOLDING:t=new me;break;case f.DRAGGING:t=new be;break;case f.ANIMATING:t=new Pe;break;case f.DISABLED:t=new Ee}return t.onEnter(e._state),e._state=t,e._state},this._state=new ve}var n=e.prototype;return Object.defineProperty(n,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),n.fire=function(e,n){var t=this._state,i=o(o({},n),{transitTo:this.transitTo});switch(e){case ge.HOLD:t.onHold(i);break;case ge.CHANGE:t.onChange(i);break;case ge.RELEASE:t.onRelease(i);break;case ge.ANIMATION_END:t.onAnimationEnd(i);break;case ge.FINISH:t.onFinish(i)}},e}(),ye=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var n;e._dragged=!!(null===(n=e._panInput)||void 0===n?void 0:n.isEnabled())},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new Oe}var t=e.prototype;return Object.defineProperty(t,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(t,"panInput",{get:function(){return this._panInput},enumerable:!1,configurable:!0}),Object.defineProperty(t,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(t,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var n=e.axis[pe];return{range:{min:n.range[0],max:n.range[1]},circular:n.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"enabled",{get:function(){var e,n;return null!==(n=null===(e=this._panInput)||void 0===e?void 0:e.isEnabled())&&void 0!==n&&n},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([pe])[pe])&&void 0!==n?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.axis[pe].range)&&void 0!==n?n:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis[pe].bounce},enumerable:!1,configurable:!0}),t.init=function(e){var t,i=this;this._flicking=e,this._axes=new n(((t={})[pe]={range:[0,0],circular:!1,bounce:[0,0]},t),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new n.PanInput(e.viewport.element,{inputType:e.inputType,threshold:1,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,preventDefaultOnDrag:e.preventDefaultOnDrag,scale:e.horizontal?[e.camera.panelOrder===k.RTL?1:-1,0]:[0,-1],releaseOnScroll:!0});var r=this._axes;r.connect(e.horizontal?[pe,""]:["",pe],this._panInput);var o=function(n){var t=ge[n];r.on(t,(function(n){i._stateMachine.fire(t,{flicking:e,axesEvent:n})}))};for(var a in ge)o(a);return this},t.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},t.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},t.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},t.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},t.updateAnimation=function(e,n){var t,i;return this._animatingContext=o(o({},this._animatingContext),{end:e}),null===(i=this._axes)||void 0===i||i.updateAnimation({destPos:(t={},t[pe]=e,t),duration:n}),this},t.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},t.update=function(e){var n,t=M(this._flicking),i=t.camera,r=this._axes,o=r.axis[pe];return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=V(t.bounce,i.size),r.axisManager.set(((n={})[pe]=e.position,n)),this},t.addPreventClickHandler=function(){var e=M(this._flicking),n=this._axes,t=e.camera.element;return n.on(ge.HOLD,this._onAxesHold),n.on(ge.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},t.removePreventClickHandler=function(){var e=M(this._flicking),n=this._axes,t=e.camera.element;return n.off(ge.HOLD,this._onAxesHold),n.off(ge.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},t.animateTo=function(e,n,t){var i,r=this,o=this._axes,a=this._stateMachine.state;if(!o)return Promise.reject(new se(_,h.NOT_ATTACHED_TO_FLICKING));var l=o.get([pe])[pe];if(l===e){var s=M(this._flicking);return s.camera.lookAt(e),a.targetPanel&&s.control.setActive(a.targetPanel,s.control.activePanel,null!==(i=null==t?void 0:t.isTrusted)&&void 0!==i&&i),Promise.resolve()}this._animatingContext={start:l,end:e,offset:0};return new Promise((function(i,a){var l=function(){o.off(ge.HOLD,s),i()},s=function(){o.off(ge.FINISH,l),a(new se(O,h.ANIMATION_INTERRUPTED))};o.once(ge.FINISH,l),o.once(ge.HOLD,s),function(){var i,a;o.once(ge.FINISH,(function(){r._animatingContext={start:0,end:0,offset:0}})),t?t.setTo(((i={})[pe]=e,i),n):o.setTo(((a={})[pe]=e,a),n)}()}))},t.updateDirection=function(){var e=M(this._flicking),n=this._axes,t=this._panInput;n.disconnect(t),n.connect(e.horizontal?[pe,""]:["",pe],t),t.options.scale=e.horizontal?[e.camera.panelOrder===k.RTL?1:-1,0]:[0,-1]},t._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),xe=function(){function n(){this._flicking=null,this._controller=new ye,this._activePanel=null}var t=n.prototype;return Object.defineProperty(t,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activeIndex",{get:function(){var e,n;return null!==(n=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==n?n:-1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(t,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(t,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),t.init=function(e){return this._flicking=e,this._controller.init(e),this},t.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},t.enable=function(){return this._controller.enable(),this},t.disable=function(){return this._controller.disable(),this},t.release=function(){return this._controller.release(),this},t.updateAnimation=function(e,n,t){var i=this._controller.state,r=this._getPosition(e,null!=t?t:A.NONE);return i.targetPanel=e,this._controller.updateAnimation(r,n),this},t.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},t.updatePosition=function(e){var n=M(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},t.updateInput=function(){var e=M(this._flicking).camera;return this._controller.update(e.controlParams),this},t.resetActive=function(){return this._activePanel=null,this},t.moveToPanel=function(e,n){var t=n.duration,i=n.direction,r=void 0===i?A.NONE:i,o=n.axesEvent;return a(this,void 0,void 0,(function(){var n;return l(this,(function(i){return n=this._getPosition(e,r),this._triggerIndexChangeEvent(e,e.position,o,r),[2,this._animateToPosition({position:n,duration:t,newActivePanel:e,axesEvent:o})]}))}))},t.setActive=function(n,t,i){var r,o=M(this._flicking);this._activePanel=n,this._nextPanel=null,o.camera.updateAdaptiveHeight(),n!==t?o.trigger(new e.ComponentEvent(R.CHANGED,{index:n.index,panel:n,prevIndex:null!==(r=null==t?void 0:t.index)&&void 0!==r?r:-1,prevPanel:t,isTrusted:i,direction:t?U(t.position,n.position):A.NONE})):o.trigger(new e.ComponentEvent(R.RESTORED,{isTrusted:i}))},t.copy=function(e){this._flicking=e._flicking,this._activePanel=e._activePanel,this._controller=e._controller},t._triggerIndexChangeEvent=function(n,t,i,r){var o,a=M(this._flicking),l=n!==this._activePanel?R.WILL_CHANGE:R.WILL_RESTORE,s=a.camera,u=this._activePanel,c=new e.ComponentEvent(l,{index:n.index,panel:n,isTrusted:(null==i?void 0:i.isTrusted)||!1,direction:null!=r?r:U(null!==(o=null==u?void 0:u.position)&&void 0!==o?o:s.position,t)});if(this._nextPanel=n,a.trigger(c),c.isCanceled())throw new se(E,h.STOP_CALLED_BY_USER)},t._animateToPosition=function(e){var n=e.position,t=e.duration,i=e.newActivePanel,r=e.axesEvent;return a(this,void 0,void 0,(function(){var e,o,s=this;return l(this,(function(u){return e=M(this._flicking),o=function(){return s._controller.animateTo(n,t,r)},this._controller.state.targetPanel=i,t<=0?[2,o()]:[2,o().then((function(){return a(s,void 0,void 0,(function(){return l(this,(function(n){switch(n.label){case 0:return[4,e.renderer.render()];case 1:return n.sent(),[2]}}))}))})).catch((function(e){if(!(r&&e instanceof se&&e.code===h.ANIMATION_INTERRUPTED))throw e}))]}))}))},t._getPosition=function(e,n){void 0===n&&(n=A.NONE);var t=M(this._flicking),i=t.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new se(b(e.position),h.POSITION_NOT_REACHABLE);if(i.canReach(e)){if(t.circularEnabled){var a=this._controller.position,l=i.rangeDiff,s=[r,r+l,r-l].filter((function(e){return n===A.NONE||(n===A.PREV?e<=a:e>=a)}));r=s.reduce((function(e,n){return Math.abs(a-n)=u&&d>0)s=this._findSnappedAnchor(e,a);else{if(!(f>=i.threshold&&f>0))return this.moveToPanel(a.panel,{duration:n,axesEvent:t});s=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(s.panel,e,t),this._animateToPosition({position:r.clampToReachablePosition(s.position),duration:n,newActivePanel:s.panel,axesEvent:t})},t._findSnappedAnchor=function(e,n){var t=M(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),l=i.findAnchorIncludePosition(a);if(!n||!l)throw new se(b(e),h.POSITION_NOT_REACHABLE);if(!isFinite(r))return l;var s=t.panelCount,u=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&l.indexn.position&&l.index===n.index?c+=1:(en.index||l.positiono&&p.indexn.index&&(_-=1),new Te({index:p.index,position:p.position+_*i.rangeDiff,panel:p.panel})}return u[L(n.index+Math.sign(e-o)*r,0,u.length-1)]},t._findAdjacentAnchor=function(e,n,t){var i,r=M(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==t.position)return o}return null!==(i=n>0?r.getNextAnchor(t):r.getPrevAnchor(t))&&void 0!==i?i:t},t._calcSnapThreshold=function(e,n,t){var i=n>t.position,r=t.panel,o=r.size,a=r.alignPosition;return Math.max(e,i?o-a+r.margin.next:a+r.margin.prev)},n}(xe),Ie=function(e){function n(n){var t=(void 0===n?{}:n).stopAtEdge,i=void 0===t||t,r=e.call(this)||this;return r._stopAtEdge=i,r}r(n,e);var t=n.prototype;return Object.defineProperty(t,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),t.updatePosition=function(e){var n=M(this._flicking).camera,t=this._activePanel;if(t){var i=t.range,r=i.min+(i.max-i.min)*e;n.lookAt(n.clampToReachablePosition(r))}},t.moveToPosition=function(e,n,t){var i=M(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new se(b(e),h.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,t),this._animateToPosition({position:this._stopAtEdge?r:e,duration:n,newActivePanel:a,axesEvent:t})},n}(xe),Ae=function(e){function n(n){var t=(void 0===n?{}:n).count,i=void 0===t?1:t,r=e.call(this)||this;return r.setActive=function(n,t,i){e.prototype.setActive.call(r,n,t,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}r(n,e);var t=n.prototype;return Object.defineProperty(t,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),t.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},t.updateInput=function(){var e,n=M(this._flicking),t=n.camera,i=n.renderer,r=this._controller,o=t.controlParams,a=this._count,l=r.state.animating?null===(e=t.findNearestAnchor(t.position))||void 0===e?void 0:e.panel:this._activePanel;if(!l)return r.update(o),this._resetIndexRange(),this;var s=o.range,u=l.position,c=l.index,f=i.panelCount,h=c-a,d=c+a;h<0&&(h=n.circularEnabled?Y((h+1)%f-1,f):L(h,0,f-1)),d>=f&&(d=n.circularEnabled?d%f:L(d,0,f-1));var g=i.panels[h],p=i.panels[d],_=Math.max(g.position,s.min),v=Math.min(p.position,s.max);return _>u&&(_-=t.rangeDiff),vv&&(o.position-=t.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:g.index,max:p.index},this},t.moveToPanel=function(n,t){return a(this,void 0,void 0,(function(){var i,r;return l(this,(function(o){return i=M(this._flicking),r=i.camera,this._controller.update(r.controlParams),[2,e.prototype.moveToPanel.call(this,n,t)]}))}))},t.moveToPosition=function(e,n,t){var i,r=M(this._flicking),o=r.camera,a=null!==(i=this._nextPanel)&&void 0!==i?i:this._activePanel,l=this._controller.range,s=this._indexRange,u=o.range,c=this._controller.state,f=L(o.clampToReachablePosition(e),l[0],l[1]),d=o.findAnchorIncludePosition(f);if(!d||!a)return Promise.reject(new se(b(e),h.POSITION_NOT_REACHABLE));var g,p,_=a.position,v=r.animating?c.delta:e-o.position,m=Math.abs(v)>=r.threshold,P=e>_?o.getNextAnchor(d):o.getPrevAnchor(d),E=o.anchorPoints,O=E[0],y=E[E.length-1],x=e<=u.min&&te(O.panel.index,s.min,s.max),T=e>=u.max&&te(y.panel.index,s.min,s.max),R=P&&(s.min<=s.max?te(P.index,s.min,s.max):P.index>=s.min||P.index<=s.max);if(x||T){var I=et)return n[i-1];t=o}return n[n.length-1]},n.clampToReachablePosition=function(e){var n=this._flicking.camera.range;return L(e,n.min,n.max)},n.getCircularOffset=function(){return 0},n.canReach=function(e){var n=this._flicking.camera.range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},n.canSee=function(e){var n=this._flicking.camera.visibleRange;return e.isVisibleOnRange(n.min,n.max)},e}(),Ce=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t.checkAvailability=function(){return!0},t.getRange=function(){var e,n,t=this._flicking.renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(n=null==r?void 0:r.position)&&void 0!==n?n:0}},n}(Ne),ke=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t.checkAvailability=function(){var e=this._flicking,n=e.renderer.panels;if(n.length<=0)return!1;var t=n[0],i=n[n.length-1],r=t.range.min-t.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,l=o-r;return n.every((function(e){return l-e.size>=a}))},t.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var n=e[0],t=e[e.length-1];return{min:n.range.min-n.margin.prev,max:t.range.max+t.margin.next}},t.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new Te({index:n,position:e.position,panel:e})}))},t.findNearestAnchor=function(e){var n=this._flicking.camera,t=n.anchorPoints;if(t.length<=0)return null;for(var i=n.range,r=1/0,o=-1,a=0;a0&&(n===i.min||n===i.max)){var u=[s,new Te({index:0,position:r[0].position+o,panel:r[0].panel}),new Te({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));s=u.reduce((function(e,t){return e&&Math.abs(e.position-n)i.max){c=Math.floor((n-i.max)/o)+1;return new Te({index:s.index,position:s.position+o*c,panel:s.panel})}return s},t.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var n=e.panels.filter((function(e){return e.toggled})),t=n.filter((function(e){return e.toggleDirection===A.PREV})),i=n.filter((function(e){return e.toggleDirection===A.NEXT}));return this._calcPanelAreaSum(t)-this._calcPanelAreaSum(i)},t.clampToReachablePosition=function(e){return e},t.canReach=function(e){return!e.removed},t.canSee=function(n){var t=this._flicking.camera,i=t.range,r=t.rangeDiff,o=t.visibleRange,a=e.prototype.canSee.call(this,n);return o.mini.max?a||n.isVisibleOnRange(o.min-r,o.max-r):a},t._calcPanelAreaSum=function(e){return e.reduce((function(e,n){return e+n.sizeIncludingMargin}),0)},n}(Ne),De=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t.checkAvailability=function(){var e=this._flicking,n=e.renderer,t=n.getPanel(0),i=n.getPanel(n.panelCount-1);if(!t||!i)return!1;var r=e.camera.size,o=t.range.min;return r0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,l=o?1:0,s=r.map((function(e,n){return new Te({index:n+l,position:e.position,panel:e})}));return o&&s.splice(0,0,new Te({index:0,position:i.min,panel:t[r[0].index-1]})),a&&s.push(new Te({index:s.length,position:i.max,panel:t[r[r.length-1].index+1]})),s}if(i.min!==i.max){var u=this._findNearestPanel(i.min,t),c=u.index===t.length-1?u.prev():u,f=c.next();return[new Te({index:0,position:i.min,panel:c}),new Te({index:1,position:i.max,panel:f})]}return[new Te({index:0,position:i.min,panel:this._findNearestPanel(i.min,t)})]},t.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints;return r.length<=0?null:n<=i.min?r[0]:n>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,n)},t._findNearestPanel=function(e,n){for(var t=1/0,i=0;it)return n[i-1];t=o}return n[n.length-1]},n}(Ne),ze=function(){function n(e,n){var t=this,i=(void 0===n?{}:n).align,r=void 0===i?I.CENTER:i;this._checkTranslateSupport=function(){var e,n,i=document.documentElement.style,r="";try{for(var o=s(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),a=o.next();!a.done;a=o.next()){var l=a.value;l in i&&(r=l)}}catch(n){e={error:n}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}if(!r)throw new se(P,h.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var t=n.prototype;return Object.defineProperty(t,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(t,"children",{get:function(){return F(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(t,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(t,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(t,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(t,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(t,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(t,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(t,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(t,"progress",{get:function(){var e=this._flicking,n=this._position+this._offset,t=this.findNearestAnchor(this._position);if(!e||!t)return NaN;var i=t.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,l=a.min,s=a.max,u=this.rangeDiff;if(n===r)return i.index;if(nr&&(f-=u),i.index-1+$(n,f,r)}var h=i.next(),d=h?h.position+h.offset:s+o[1];return d0||a.length>0)&&t.renderer.render().then((function(){t.trigger(new e.ComponentEvent(R.VISIBLE_CHANGE,{added:o,removed:a,visiblePanels:i}))}))},t._checkNeedPanel=function(){var n=this._needPanelTriggered;if(!n.prev||!n.next){var t=M(this._flicking),i=t.renderer.panels;if(i.length<=0)return n.prev||(t.trigger(new e.ComponentEvent(R.NEED_PANEL,{direction:A.PREV})),n.prev=!0),void(n.next||(t.trigger(new e.ComponentEvent(R.NEED_PANEL,{direction:A.NEXT})),n.next=!0));var r=this._position,o=this.size,a=this._range,l=t.needPanelThreshold,s=r-this._alignPos,u=s+o,c=i[0],f=i[i.length-1];if(!n.prev)(s<=c.range.min+l||r<=a.min+l)&&(t.trigger(new e.ComponentEvent(R.NEED_PANEL,{direction:A.PREV})),n.prev=!0);if(!n.next)(u>=f.range.max-l||r>=a.max-l)&&(t.trigger(new e.ComponentEvent(R.NEED_PANEL,{direction:A.NEXT})),n.next=!0)}},t._checkReachEnd=function(n,t){var i=M(this._flicking),r=this._range,o=n>r.min&&nr.min&&t0){var t=n[0];t.resize(),this._updatePanelSizeByGrid(t,n)}else e.panels.forEach((function(e){return e.resize()}));return this},i.batchInsert=function(){for(var e=[],n=0;n0){var h=o||f[0].resize();e._updatePanelSizeByGrid(h,f)}else f.forEach((function(e){return e.resize()}));return u.forEach((function(e){e.increaseIndex(f.length),e.updatePosition()})),c(n,f)}),[])},i.batchRemove=function(){for(var e=[],n=0;nl.length-1&&(u=l.length-1),a.moveToPanel(l[u],{duration:0}).catch((function(){}))}else a.moveToPanel(s,{duration:0}).catch((function(){}));r.camera.updateOffset(),(n.length>0||t.length>0)&&(r.trigger(new e.ComponentEvent(R.PANEL_CHANGE,{added:n,removed:t})),this.checkPanelContentsReady(c(n,t)))},i.checkPanelContentsReady=function(e){var n=this,i=M(this._flicking),r=i.resizeOnContentsReady,o=this._panels;if(r&&!i.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return e.element&&!!e.element.querySelector("img, video")}(e)}))).length<=0)){var a=new t;e.forEach((function(e){e.loading=!0})),a.on("readyElement",(function(t){if(n._flicking){var r=e[t.index],l=i.camera,s=i.control,u=s.activePanel?l.getProgressInPanel(s.activePanel):0;r.loading=!1,r.resize(),o.slice(r.index+1).forEach((function(e){return e.updatePosition()})),i.initialized&&(l.updateRange(),l.updateOffset(),l.updateAnchors(),s.animating||(s.updatePosition(u),s.updateInput()))}else a.destroy()})),a.on("preReady",(function(e){n._flicking&&n.render(),e.readyCount===e.totalCount&&a.destroy()})),a.on("ready",(function(){n._flicking&&n.render(),a.destroy()})),a.check(e.map((function(e){return e.element})))}}},i._updateCameraAndControl=function(){var e=M(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateOffset(),n.updateAnchors(),n.resetNeedPanelHistory(),t.updateInput()},i._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in t||n.loading?n.markForShow():e.holding||n.markForHide()}))},i._updatePanelSizeByGrid=function(e,n){var t=M(this._flicking),i=t.panelsPerView;if(i<=0)throw new se(v("panelsPerView",i),h.WRONG_OPTION);if(!(n.length<=0)){var r=(t.camera.size-(e.margin.prev+e.margin.next)*(i-1))/i,a=t.horizontal?{width:r}:{height:r},l=o({size:r,margin:e.margin},!t.horizontal&&{height:e.height});t.noPanelStyleOverride||this._strategy.updatePanelSizes(t,a),t.panels.forEach((function(e){return e.resize(l)}))}},i._removeAllChildsFromCamera=function(){for(var e=M(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},i._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=M(this._flicking).camera.element,i=(null==n?void 0:n.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),t.insertBefore(r,i)},i._removePanelElements=function(e){var n=M(this._flicking).camera.element;e.forEach((function(e){n.removeChild(e.element)}))},i._afterRender=function(){M(this._flicking).camera.applyTransform()},n}(),Le=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t.render=function(){return a(this,void 0,void 0,(function(){var e,n;return l(this,(function(t){return e=M(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),this._afterRender(),[2]}))}))},t._collectPanels=function(){var e=M(this._flicking),n=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,n.children)},t._createPanel=function(e,n){return this._strategy.createPanel(e,n)},t._resetPanelElementOrder=function(){var e=M(this._flicking),n=e.camera.element,t=this._strategy.getRenderingElementsByOrder(e).reverse();t.forEach((function(e,i){var r=t[i-1]?t[i-1]:null;e.nextElementSibling!==r&&n.insertBefore(e,r)}))},t._removeAllTextNodes=function(){var e=M(this._flicking).camera.element;F(e.childNodes).forEach((function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)}))},n}(je),Me=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}r(n,e);var t=n.prototype;return t._removePanelElements=function(e){},t._removeAllChildsFromCamera=function(){},n}(je),Fe=function(){function e(e){var n=e.index,t=e.align,i=e.flicking,r=e.elementProvider;this._index=n,this._flicking=i,this._elProvider=r,this._align=t,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(n,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(n,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){var e=this._toggleDirection,n=this._flicking.camera.rangeDiff;return e!==A.NONE&&this._toggled?e===A.PREV?-n:n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(n,"outsetProgress",{get:function(){var e=this.position+this.offset,n=this._alignPos,t=this._flicking.camera,i=t.position;if(i===e)return 0;if(i=i.max)return 0;var a=n;return i.min>r&&(a-=i.min-r),i.max=r.min&&e<=r.max},n.isVisibleOnRange=function(e,n){var t=this.range;return n>t.min&&ee?i>=e&&i<=n&&(this._toggled=t===A.NEXT):i<=e&&i>=n&&(this._toggled=t!==A.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=A.NONE,this._togglePosition=0,this._toggled=!1,this;var n=e.camera,t=n.range,i=n.alignPosition,r=n.visibleRange,o=r.max-r.min,a=t.min-i,l=t.max-i+o,s=this.includeRange(l-o,l,!1),u=this.includeRange(a,a+o,!1);return this._toggled=!1,s?(this._toggleDirection=A.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):u?(this._toggleDirection=A.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=A.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=H(this._align,this._size)},n._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=A.NONE},e}(),He=function(){function e(e){var n=e.providerCtor;this._providerCtor=n}var n=e.prototype;return n.renderPanels=function(){},n.getRenderingIndexesByOrder=function(e){var n=e.renderer.panels.filter((function(e){return e.rendered})),t=n.filter((function(e){return e.toggled&&e.toggleDirection===A.PREV})),i=n.filter((function(e){return e.toggled&&e.toggleDirection===A.NEXT}));return c(t,n.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},n.getRenderingElementsByOrder=function(e){var n=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].element}))},n.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},n.collectPanels=function(e,n){var t=this,i=W(e.renderer.align);return n.map((function(n,r){return new Fe({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})}))},n.createPanel=function(e,n){return new Fe(o(o({},n),{elementProvider:new this._providerCtor(e)}))},n.updatePanelSizes=function(e,n){e.panels.forEach((function(e){return e.setSize(n)}))},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in i||n.loading?n.markForShow():e.holding||n.markForHide()})),t.updateOffset()},e}(),Ve=function(e){function n(n){var t=e.call(this,n)||this;return n.elementProvider.init(t),t._elProvider=n.elementProvider,t._cachedInnerHTML=null,t}r(n,e);var t=n.prototype;return Object.defineProperty(t,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(t,"elementIndex",{get:function(){var e=this._flicking,n=e.panelsPerView+1,t=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===A.NEXT?i+t:i-t),ie(i,n)},enumerable:!1,configurable:!0}),t.cacheRenderResult=function(e){this._cachedInnerHTML=e},t.uncacheRenderResult=function(){this._cachedInnerHTML=null},t.render=function(){var e=this._flicking.virtual,n=e.renderPanel,t=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||n(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,t&&this.cacheRenderResult(r))},t.increaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,n)},t.decreaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,n)},n}(Fe),Be=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=re(e.panelsPerView+1);t.forEach((function(e){var t=e.elementIndex;e.render(),n.show(t),i[t]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){n.hide(e)}))},n.getRenderingIndexesByOrder=function(e){var n=e.virtual,t=c(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)}));return t.length<=0?n.elements.map((function(e,n){return n})):c(t.map((function(e){return e.elementIndex})),n.elements.map((function(e,n){return o(o({},e),{idx:n})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},n.getRenderingElementsByOrder=function(e){var n=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].nativeElement}))},n.updateRenderingPanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),t.updateOffset()},n.collectPanels=function(e){var n=W(e.renderer.align);return re(e.virtual.initialPanelCount).map((function(t){return new Ve({index:t,elementProvider:new he(e),align:n,flicking:e})}))},n.createPanel=function(e,n){return new Ve(o(o({},n),{elementProvider:new he(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach((function(e){ne(e.nativeElement,n)})),e.panels.forEach((function(e){return e.setSize(n)}))},e}(),Ge={__proto__:null,Renderer:je,VanillaRenderer:Le,ExternalRenderer:Me,NormalRenderingStrategy:He,VirtualRenderingStrategy:Be},We=function(n){function t(e,t){var i=void 0===t?{}:t,r=i.align,o=void 0===r?I.CENTER:r,a=i.defaultIndex,l=void 0===a?0:a,s=i.horizontal,u=void 0===s||s,c=i.circular,f=void 0!==c&&c,h=i.circularFallback,d=void 0===h?C.LINEAR:h,g=i.bound,p=void 0!==g&&g,_=i.adaptive,v=void 0!==_&&_,m=i.panelsPerView,b=void 0===m?-1:m,P=i.noPanelStyleOverride,E=void 0!==P&&P,O=i.resizeOnContentsReady,y=void 0!==O&&O,x=i.nested,T=void 0!==x&&x,R=i.needPanelThreshold,A=void 0===R?0:R,w=i.preventEventsBeforeInit,N=void 0===w||w,k=i.deceleration,D=void 0===k?.0075:k,z=i.duration,j=void 0===z?500:z,L=i.easing,M=void 0===L?function(e){return 1-Math.pow(1-e,3)}:L,F=i.inputType,H=void 0===F?["mouse","touch"]:F,V=i.moveType,B=void 0===V?"snap":V,G=i.threshold,W=void 0===G?40:G,U=i.interruptable,X=void 0===U||U,Y=i.bounce,Z=void 0===Y?"20%":Y,K=i.iOSEdgeSwipeThreshold,q=void 0===K?30:K,J=i.preventClickOnDrag,Q=void 0===J||J,$=i.preventDefaultOnDrag,ee=void 0!==$&&$,ne=i.disableOnInit,te=void 0!==ne&&ne,ie=i.changeOnHold,re=void 0!==ie&&ie,oe=i.renderOnlyVisible,ae=void 0!==oe&&oe,le=i.virtual,se=void 0===le?null:le,fe=i.autoInit,he=void 0===fe||fe,ge=i.autoResize,pe=void 0===ge||ge,_e=i.useResizeObserver,ve=void 0===_e||_e,me=i.resizeDebounce,be=void 0===me?0:me,Pe=i.maxResizeDebounce,Ee=void 0===Pe?100:Pe,Oe=i.useFractionalSize,ye=void 0!==Oe&&Oe,xe=i.externalRenderer,Te=void 0===xe?null:xe,Re=i.renderExternal,Ie=void 0===Re?null:Re,Ae=n.call(this)||this;return Ae._initialized=!1,Ae._plugins=[],Ae._align=o,Ae._defaultIndex=l,Ae._horizontal=u,Ae._circular=f,Ae._circularFallback=d,Ae._bound=p,Ae._adaptive=v,Ae._panelsPerView=b,Ae._noPanelStyleOverride=E,Ae._resizeOnContentsReady=y,Ae._nested=T,Ae._virtual=se,Ae._needPanelThreshold=A,Ae._preventEventsBeforeInit=N,Ae._deceleration=D,Ae._duration=j,Ae._easing=M,Ae._inputType=H,Ae._moveType=B,Ae._threshold=W,Ae._interruptable=X,Ae._bounce=Z,Ae._iOSEdgeSwipeThreshold=q,Ae._preventClickOnDrag=Q,Ae._preventDefaultOnDrag=ee,Ae._disableOnInit=te,Ae._changeOnHold=re,Ae._renderOnlyVisible=ae,Ae._autoInit=he,Ae._autoResize=pe,Ae._useResizeObserver=ve,Ae._resizeDebounce=be,Ae._maxResizeDebounce=Ee,Ae._useFractionalSize=ye,Ae._externalRenderer=Te,Ae._renderExternal=Ie,Ae._viewport=new ue(Ae,S(e)),Ae._autoResizer=new ce(Ae),Ae._renderer=Ae._createRenderer(),Ae._camera=Ae._createCamera(),Ae._control=Ae._createControl(),Ae._virtualManager=new de(Ae,se),Ae._autoInit&&Ae.init(),Ae}r(t,n);var i=t.prototype;return Object.defineProperty(i,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(i,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(i,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(i,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(i,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(i,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(i,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(i,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(i,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(i,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(i,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(i,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e,this._control.controller.updateDirection(),this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circular",{get:function(){return this._circular},set:function(e){this._circular=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bound",{get:function(){return this._bound},set:function(e){this._bound=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e,e&&this._renderer.checkPanelContentsReady(this._renderer.panels)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"nested",{get:function(){return this._nested},set:function(e){this._nested=e;var n=this._control.controller.axes;n&&(n.options.nested=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e;var n=this._control.controller.axes;n&&(n.options.deceleration=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"easing",{get:function(){return this._easing},set:function(e){this._easing=e;var n=this._control.controller.axes;n&&(n.options.easing=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e;var n=this._control.controller.panInput;n&&(n.options.inputType=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e;var n=this._control,t=this._createControl(),i=n.activePanel;t.copy(n);var r=i?this._camera.getProgressInPanel(i):0;this._control=t,this._control.updatePosition(r),this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e;var n=this._control.controller.axes;n&&(n.options.interruptable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e,this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e;var n=this._control.controller.panInput;n&&(n.options.iOSEdgeSwipeThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var n=this._control.controller;e?n.addPreventClickHandler():n.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"preventDefaultOnDrag",{get:function(){return this._preventDefaultOnDrag},set:function(e){this._preventDefaultOnDrag=e;var n=this._control.controller.panInput;n&&(n.options.preventDefaultOnDrag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(i,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e,this._renderer.render()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(i,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(i,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,e?this._autoResizer.enable():this._autoResizer.disable()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(i,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(i,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(i,"useFractionalSize",{get:function(){return this._useFractionalSize},enumerable:!1,configurable:!0}),Object.defineProperty(i,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(i,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),i.init=function(){var n=this;if(this._initialized)return Promise.resolve();var t=this._camera,i=this._renderer,r=this._control,o=this._virtualManager,a=this.trigger,l=this._preventEventsBeforeInit;return t.init(),o.init(),i.init(this),r.init(this),l&&(this.trigger=function(){return n}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&r.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),i.checkPanelContentsReady(i.panels),this._initialized=!0,i.render().then((function(){n._plugins.forEach((function(e){return e.init(n)})),l&&(n.trigger=a),n.trigger(new e.ComponentEvent(R.READY))}))},i.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach((function(e){return e.destroy()})),this._initialized=!1},i.prev=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.prev())||void 0===t?void 0:t.index)&&void 0!==i?i:-1,e,A.PREV)},i.next=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.next())||void 0===t?void 0:t.index)&&void 0!==i?i:this._renderer.panelCount,e,A.NEXT)},i.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=A.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new se(y,h.ANIMATION_ALREADY_PLAYING)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:n,direction:t})):Promise.reject(new se(m(e,0,r-1),h.INDEX_OUT_OF_RANGE))},i.updateAnimation=function(e,n,t){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new se(m(e,0,r-1),h.INDEX_OUT_OF_RANGE);this._control.updateAnimation(o,n,t)}},i.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},i.getPanel=function(e){return this._renderer.getPanel(e)},i.enableInput=function(){return this._control.enable(),this},i.disableInput=function(){return this._control.disable(),this},i.getStatus=function(e){var n,t,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,l=void 0===a||a,s=i.includePanelHTML,u=void 0!==s&&s,c=i.visiblePanelsOnly,f=void 0!==c&&c,h=this._camera,d={panels:(f?this.visiblePanels:this.panels).map((function(e){var n={index:e.index};return u&&(n.html=e.element.outerHTML),n}))};if(o&&(d.index=this.index),l){var g=h.findNearestAnchor(h.position);g&&(d.position={panel:g.panel.index,progressInPanel:h.getProgressInPanel(g.panel)})}if(f){var p=this.visiblePanels;d.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return d},i.setStatus=function(e){var n;if(!this._initialized)throw new se(T,h.NOT_INITIALIZED);var t=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,l=this._control;if((null===(n=o[0])||void 0===n?void 0:n.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:X(o.map((function(e){return e.html}))),hasDOMInElements:!0})),null!=t){var s=r?t-r:t;this.moveTo(s,0).catch((function(){}))}if(i&&this._moveType===w.FREE_SCROLL){var u=i.panel,c=i.progressInPanel,f=(s=r?u-r:u,a.panels[s].range),d=f.min+(f.max-f.min)*c;l.moveToPosition(d,0).catch((function(){}))}},i.addPlugins=function(){for(var e,n=this,t=[],i=0;i=0&&(n.destroy(),e._plugins.splice(t,1))})),this},i.resize=function(){return a(this,void 0,void 0,(function(){var n,t,i,r,o,a,s,u,c,f,h;return l(this,(function(l){switch(l.label){case 0:return n=this._viewport,t=this._renderer,i=this._camera,r=this._control,o=r.activePanel,a=n.width,s=n.height,u=o?i.getProgressInPanel(o):0,this.trigger(new e.ComponentEvent(R.BEFORE_RESIZE,{width:a,height:s,element:n.element})),n.resize(),[4,t.forceRenderAllPanels()];case 1:return l.sent(),this._initialized?(t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),i.updateAdaptiveHeight(),i.updatePanelOrder(),i.updateOffset(),[4,t.render()]):[2];case 2:return l.sent(),this._initialized?(r.animating||(r.updatePosition(u),r.updateInput()),c=n.width,f=n.height,h=c!==a||f!==s,this.trigger(new e.ComponentEvent(R.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:a,height:s},sizeChanged:h,element:n.element})),[2]):[2]}}))}))},i.append=function(e){return this.insert(this._renderer.panelCount,e)},i.prepend=function(e){return this.insert(0,e)},i.insert=function(e,n){if(this._renderExternal)throw new se(x,h.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:X(n),hasDOMInElements:!0})},i.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new se(x,h.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!0})},i._createControl=function(){var e,n=this._moveType,t=Object.keys(w).map((function(e){return w[e]})),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!Z(t,i))throw new se(v("moveType",JSON.stringify(n)),h.WRONG_OPTION);switch(i){case w.SNAP:return new Re(r);case w.FREE_SCROLL:return new Ie(r);case w.STRICT:return new Ae(r)}},i._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new ze(this,{align:this._align})},i._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},i._createExternalRenderer=function(){var e=this._renderExternal,n=e.renderer,t=e.rendererOptions;return new n(o({align:this._align},t))},i._createVanillaRenderer=function(){var e=this.virtualEnabled;return new Le({align:this._align,strategy:e?new Be:new He({providerCtor:fe})})},i._moveToInitialPanel=function(){var e=this._renderer,n=this._control,t=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=t.findNearestAnchor(i.position),o=r&&i.index!==r.panel.index?r.panel:i;if(n.setActive(o,null,!1),!r)throw new se(b(o.position),h.POSITION_NOT_REACHABLE);var a=o.position;t.canReach(o)||(a=r.position),t.lookAt(a),n.updateInput(),t.updateOffset()}},i._initialResize=function(){var n=this._viewport,t=this._renderer,i=this._camera,r=this._control;this.trigger(new e.ComponentEvent(R.BEFORE_RESIZE,{width:0,height:0,element:n.element})),n.resize(),t.updatePanelSize(),i.updateAlignPos(),i.updateRange(),i.updateAnchors(),i.updateOffset(),r.updateInput();var o=n.width,a=n.height,l=0!==o||0!==a;this.trigger(new e.ComponentEvent(R.AFTER_RESIZE,{width:n.width,height:n.height,prev:{width:0,height:0},sizeChanged:l,element:n.element}))},t.VERSION="4.11.4",t}(e),Ue=function(e,n,t,i,r){return e.batchInsertDefer.apply(e,c(n.added.slice(i,r).map((function(e,n){return{index:e,elements:[t[n]],hasDOMInElements:!1}}))))},Xe=function(e,n,t){var i=e.panels.slice(n,t);return e.batchRemoveDefer({index:n,deleteCount:i.length,hasDOMInElements:!1})},Ye=function(e){var n="object"==typeof e?e.camera:e;return Ke(n)},Ze=function(e){var n="object"==typeof e?e.panel:e;return G(Ke(n))},Ke=function(e){if("number"==typeof e)return e+"px";switch(e){case I.CENTER:return"50%";case I.NEXT:return"100%";case I.PREV:return"0%";default:return e}},qe={__proto__:null,withFlickingMethods:function(n,t){[e.prototype,We.prototype].forEach((function(e){Object.getOwnPropertyNames(e).filter((function(e){return!n[e]&&0!==e.indexOf("_")&&"constructor"!==e})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(e,i);if(r.value)Object.defineProperty(n,i,{value:function(){for(var e,n=[],i=0;i0){var s=-1,f=-1;n.removed.forEach((function(e){s<0&&(s=e),f>=0&&e!==f-1?(l.push.apply(l,c(Xe(i,f,s+1))),s=e,f=e):f=e,o.splice(e,1)})),l.push.apply(l,c(Xe(i,f,s+1)))}if(n.ordered.forEach((function(e){var n=u(e,2),t=n[0],i=n[1],o=r.splice(t,1)[0];r.splice(i,0,o)})),n.ordered.length>0&&(r.forEach((function(e,n){var t=n-e.index;t>0?e.increaseIndex(t):e.decreaseIndex(-t)})),r.sort((function(e,n){return e.index-n.index})),r.forEach((function(e){e.updatePosition()}))),n.added.length>0){var h=-1,d=-1,g=t.slice(o.length);n.added.forEach((function(e,t){h<0&&(h=t),d>=0&&e!==d+1?(a.push.apply(a,c(Ue(i,n,g,h,t+1))),h=-1,d=-1):d=e})),h>=0&&a.push.apply(a,c(Ue(i,n,g,h)))}(n.added.length>0||n.removed.length>0)&&i.updateAfterPanelChange(a,l)},getRenderingPanels:function(e,n){var t=n.removed.reduce((function(e,n){return e[n]=!0,e}),{}),i=n.maintained.reduce((function(e,n){var t=u(n,2),i=t[0],r=t[1];return e[i]=r,e}),{});return c(e.panels.filter((function(e){return!t[e.index]})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)})).map((function(e){return n.list[i[e.index]]})),n.added.map((function(e){return n.list[e]})))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=I.CENTER),void 0===n&&(n=!0);var i=Ye(e),r=Ze(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}};return z(We,{__proto__:null,Viewport:ue,FlickingError:se,AnchorPoint:Te,VirtualManager:de,VanillaElementProvider:fe,VirtualElementProvider:he,Panel:Fe,VirtualPanel:Ve}),z(We,Se),z(We,we),z(We,Ge),z(We,D),z(We,qe),z(We,le),We})); -//# sourceMappingURL=flicking.min.js.map diff --git a/dist/flicking.min.js.map b/dist/flicking.min.js.map deleted file mode 100644 index e68f67f979..0000000000 --- a/dist/flicking.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flicking.min.js","sources":["../src/const/error.ts","../src/control/states/State.ts","../src/const/external.ts","../src/utils.ts","../src/core/FlickingError.ts","../src/core/Viewport.ts","../src/core/AutoResizer.ts","../src/core/panel/provider/VanillaElementProvider.ts","../src/core/panel/provider/VirtualElementProvider.ts","../src/core/VirtualManager.ts","../src/const/axes.ts","../src/control/states/IdleState.ts","../src/control/states/HoldingState.ts","../src/control/states/DraggingState.ts","../src/control/states/AnimatingState.ts","../src/control/states/DisabledState.ts","../src/control/StateMachine.ts","../src/control/AxesController.ts","../src/control/Control.ts","../src/core/AnchorPoint.ts","../src/control/SnapControl.ts","../src/control/FreeControl.ts","../src/control/StrictControl.ts","../src/camera/mode/CameraMode.ts","../src/camera/mode/LinearCameraMode.ts","../src/camera/mode/CircularCameraMode.ts","../src/camera/mode/BoundCameraMode.ts","../src/camera/Camera.ts","../src/renderer/Renderer.ts","../src/renderer/VanillaRenderer.ts","../src/renderer/ExternalRenderer.ts","../src/core/panel/Panel.ts","../src/renderer/strategy/NormalRenderingStrategy.ts","../src/core/panel/VirtualPanel.ts","../src/renderer/strategy/VirtualRenderingStrategy.ts","../src/Flicking.ts","../src/cfc/sync.ts","../src/cfc/getDefaultCameraTransform.ts","../src/cfc/withFlickingMethods.ts","../src/cfc/getRenderingPanels.ts","../src/index.umd.ts"],"sourcesContent":["/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/restrict-template-expressions */\n\n/**\n * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.\n * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.\n * @name ERROR_CODE\n * @constant\n * @type object\n * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우\n * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우\n * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우\n * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)\n * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때\n * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우\n * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우\n * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)\n * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우\n * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우\n * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우\n * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)\n * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우\n * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우\n * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다\n * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우\n */\nexport const CODE = {\n WRONG_TYPE: 0,\n ELEMENT_NOT_FOUND: 1,\n VAL_MUST_NOT_NULL: 2,\n NOT_ATTACHED_TO_FLICKING: 3,\n WRONG_OPTION: 4,\n INDEX_OUT_OF_RANGE: 5,\n POSITION_NOT_REACHABLE: 6,\n TRANSFORM_NOT_SUPPORTED: 7,\n STOP_CALLED_BY_USER: 8,\n ANIMATION_INTERRUPTED: 9,\n ANIMATION_ALREADY_PLAYING: 10,\n NOT_ALLOWED_IN_FRAMEWORK: 11,\n NOT_INITIALIZED: 12,\n NO_ACTIVE: 13,\n NOT_ALLOWED_IN_VIRTUAL: 14\n} as const;\n\nexport const MESSAGE = {\n WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `\"${type}\"`).join(\" or \")}.`,\n ELEMENT_NOT_FOUND: (selector: string) => `Element with selector \"${selector}\" not found.`,\n VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,\n NOT_ATTACHED_TO_FLICKING: \"This module is not attached to the Flicking instance. \\\"init()\\\" should be called first.\",\n WRONG_OPTION: (optionName: string, val: any) => `Option \"${optionName}\" is not in correct format, given: ${val}`,\n INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index \"${val}\" is out of range: should be between ${min} and ${max}.`,\n POSITION_NOT_REACHABLE: (position: number) => `Position \"${position}\" is not reachable.`,\n TRANSFORM_NOT_SUPPORTED: \"Browser does not support CSS transform.\",\n STOP_CALLED_BY_USER: \"Event stop() is called by user.\",\n ANIMATION_INTERRUPTED: \"Animation is interrupted by user input.\",\n ANIMATION_ALREADY_PLAYING: \"Animation is already playing.\",\n NOT_ALLOWED_IN_FRAMEWORK: \"This behavior is not allowed in the frameworks like React, Vue, or Angular.\",\n NOT_INITIALIZED: \"Flicking is not initialized yet, call init() first.\",\n NO_ACTIVE: \"There's no active panel that Flicking has selected. This may be due to the absence of any panels.\",\n NOT_ALLOWED_IN_VIRTUAL: \"This behavior is not allowed when the virtual option is enabled\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\nimport { circulatePosition, getDirection } from \"../../utils\";\n\nexport enum STATE_TYPE {\n IDLE,\n HOLDING,\n DRAGGING,\n ANIMATING,\n DISABLED\n}\n\n/**\n * A component that shows the current status of the user input or the animation\n * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트\n * @internal\n */\nabstract class State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly holding: boolean;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly animating: boolean;\n\n protected _delta: number = 0;\n protected _targetPanel: Panel | null = null;\n\n /**\n * A sum of delta values of change events from the last hold event of Axes\n * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산\n * @type {number}\n * @readonly\n */\n public get delta() { return this._delta; }\n\n /**\n * A panel to set as {@link Control#activePanel} after the animation is finished\n * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널\n * @type {number}\n * @readonly\n */\n public get targetPanel() { return this._targetPanel; }\n\n public set targetPanel(val: Panel | null) { this._targetPanel = val; }\n\n /**\n * An callback which is called when state has changed to this state\n * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수\n * @param {State} prevState An previous state이전 상태값\n * @return {void}\n */\n public onEnter(prevState: State): void {\n this._delta = prevState._delta;\n this._targetPanel = prevState._targetPanel;\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onHold(ctx: {\n flicking: Flicking;\n axesEvent: OnHold;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onChange(ctx: {\n flicking: Flicking;\n axesEvent: OnChange;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onRelease(ctx: {\n flicking: Flicking;\n axesEvent: OnRelease;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onAnimationEnd(ctx: {\n flicking: Flicking;\n axesEvent: OnAnimationEnd;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onFinish(ctx: {\n flicking: Flicking;\n axesEvent: OnFinish;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n protected _moveToChangedPosition(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const delta = axesEvent.delta[AXES.POSITION_KEY];\n\n if (!delta) {\n return;\n }\n\n this._delta += delta;\n\n const camera = flicking.camera;\n const prevPosition = camera.position;\n const position = axesEvent.pos[AXES.POSITION_KEY];\n const newPosition = flicking.circularEnabled\n ? circulatePosition(position, camera.range.min, camera.range.max)\n : position;\n\n camera.lookAt(newPosition);\n\n const moveEvent = new ComponentEvent(EVENTS.MOVE, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, axesEvent.delta[AXES.POSITION_KEY]),\n axesEvent\n });\n\n flicking.trigger(moveEvent);\n\n if (moveEvent.isCanceled()) {\n // Return to previous position\n camera.lookAt(prevPosition);\n transitTo(STATE_TYPE.DISABLED);\n }\n }\n}\n\nexport default State;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nexport { CODE as ERROR_CODE } from \"./error\";\n\n/**\n * Event type object with event name strings of {@link Flicking}\n * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체\n * @type {object}\n * @property {\"holdStart\"} HOLD_START holdStart eventholdStart 이벤트\n * @property {\"holdEnd\"} HOLD_END holdEnd eventholdEnd 이벤트\n * @property {\"moveStart\"} MOVE_START moveStart eventmoveStart 이벤트\n * @property {\"move\"} MOVE move eventmove 이벤트\n * @property {\"moveEnd\"} MOVE_END moveEnd eventmoveEnd 이벤트\n * @property {\"willChange\"} WILL_CHANGE willChange eventwillChange 이벤트\n * @property {\"changed\"} CHANGED changed eventchanged 이벤트\n * @property {\"willRestore\"} WILL_RESTORE willRestore eventwillRestore 이벤트\n * @property {\"restored\"} RESTORED restored eventrestored 이벤트\n * @property {\"select\"} SELECT select eventselect 이벤트\n * @property {\"needPanel\"} NEED_PANEL needPanel eventneedPanel 이벤트\n * @property {\"panelChange\"} PANEL_CHANGE panelChange eventpanelChange 이벤트\n * @example\n * ```ts\n * import { EVENTS } from \"@egjs/flicking\";\n * EVENTS.MOVE_START; // \"moveStart\"\n * ```\n */\nexport const EVENTS = {\n READY: \"ready\",\n BEFORE_RESIZE: \"beforeResize\",\n AFTER_RESIZE: \"afterResize\",\n HOLD_START: \"holdStart\",\n HOLD_END: \"holdEnd\",\n MOVE_START: \"moveStart\",\n MOVE: \"move\",\n MOVE_END: \"moveEnd\",\n WILL_CHANGE: \"willChange\",\n CHANGED: \"changed\",\n WILL_RESTORE: \"willRestore\",\n RESTORED: \"restored\",\n SELECT: \"select\",\n NEED_PANEL: \"needPanel\",\n VISIBLE_CHANGE: \"visibleChange\",\n REACH_EDGE: \"reachEdge\",\n PANEL_CHANGE: \"panelChange\"\n} as const;\n\n/**\n * An object with all possible predefined literal string for the {@link Flicking#align align} option\n * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체\n * @type {object}\n * @property {\"prev\"} PREV left/top align좌/상 정렬\n * @property {\"center\"} CENTER center align중앙 정렬\n * @property {\"next\"} NEXT right/bottom align우/하 정렬\n */\nexport const ALIGN = {\n PREV: \"prev\",\n CENTER: \"center\",\n NEXT: \"next\"\n} as const;\n\n/**\n * An object of directions\n * @ko 방향을 나타내는 값들을 담고 있는 객체\n * @type {object}\n * @property {\"PREV\"} PREV \"left\" when {@link Flicking#horizontal horizontal} is true, and \"top\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다\n * @property {\"NEXT\"} NEXT \"right\" when {@link Flicking#horizontal horizontal} is true, and \"bottom\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다\n * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다\n */\nexport const DIRECTION = {\n PREV: \"PREV\",\n NEXT: \"NEXT\",\n NONE: null\n} as const;\n\n/**\n * An object with all possible {@link Flicking#moveType moveType}s\n * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체\n * @type {object}\n * @property {\"snap\"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"freeScroll\"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"strict\"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n */\nexport const MOVE_TYPE = {\n SNAP: \"snap\",\n FREE_SCROLL: \"freeScroll\",\n STRICT: \"strict\"\n} as const;\n\nexport const CLASS = {\n VERTICAL: \"vertical\",\n HIDDEN: \"flicking-hidden\",\n DEFAULT_VIRTUAL: \"flicking-panel\"\n};\n\n/**\n * An object with all possible {@link Flicking#circularFallback circularFallback}s\n * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체\n * @type {object}\n * @property {string} LINEAR \"linear\"\n * @property {string} BOUND \"bound\"\n */\nexport const CIRCULAR_FALLBACK = {\n LINEAR: \"linear\",\n BOUND: \"bound\"\n} as const;\n\n/**\n * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체\n * @type {object}\n * @property {string} LTR \"ltr\"\n * @property {string} RTL \"rtl\"\n */\nexport const ORDER = {\n LTR: \"ltr\",\n RTL: \"rtl\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking, { FlickingOptions } from \"./Flicking\";\nimport FlickingError from \"./core/FlickingError\";\nimport * as ERROR from \"./const/error\";\nimport { ALIGN, DIRECTION } from \"./const/external\";\nimport { LiteralUnion, Merged, ValueOf } from \"./type/internal\";\nimport { ElementLike } from \"./type/external\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const merge = (target: From, ...sources: To[]): Merged => {\n sources.forEach(source => {\n Object.keys(source).forEach(key => {\n target[key] = source[key] as unknown;\n });\n });\n\n return target as Merged;\n};\n\nexport const getElement = (el: HTMLElement | string | null, parent?: HTMLElement): HTMLElement => {\n let targetEl: HTMLElement | null = null;\n\n if (isString(el)) {\n const parentEl = parent ? parent : document;\n const queryResult = parentEl.querySelector(el);\n if (!queryResult) {\n throw new FlickingError(ERROR.MESSAGE.ELEMENT_NOT_FOUND(el), ERROR.CODE.ELEMENT_NOT_FOUND);\n }\n targetEl = queryResult as HTMLElement;\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n targetEl = el;\n }\n\n if (!targetEl) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n\n return targetEl;\n};\n\nexport const checkExistence = (value: any, nameOnErrMsg: string) => {\n if (value == null) {\n throw new FlickingError(ERROR.MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), ERROR.CODE.VAL_MUST_NOT_NULL);\n }\n};\n\nexport const clamp = (x: number, min: number, max: number) => Math.max(Math.min(x, max), min);\n\nexport const getFlickingAttached = (val: Flicking | null): Flicking => {\n if (!val) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING);\n }\n\n return val;\n};\n\nexport const toArray = (iterable: ArrayLike): T[] => [].slice.call(iterable) as T[];\n\nexport const parseAlign = (align: LiteralUnion> | number, size: number): number => {\n let alignPoint: number | null;\n if (isString(align)) {\n switch (align) {\n case ALIGN.PREV:\n alignPoint = 0;\n break;\n case ALIGN.CENTER:\n alignPoint = 0.5 * size;\n break;\n case ALIGN.NEXT:\n alignPoint = size;\n break;\n default:\n alignPoint = parseArithmeticSize(align, size);\n if (alignPoint == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"align\", align), ERROR.CODE.WRONG_OPTION);\n }\n }\n } else {\n alignPoint = align as number;\n }\n\n return alignPoint;\n};\n\nexport const parseBounce = (bounce: FlickingOptions[\"bounce\"], size: number): number[] => {\n let parsedBounce: Array;\n\n if (Array.isArray(bounce)) {\n parsedBounce = (bounce as string[]).map(val => parseArithmeticSize(val, size));\n } else {\n const parsedVal = parseArithmeticSize(bounce, size);\n\n parsedBounce = [parsedVal, parsedVal];\n }\n\n return parsedBounce.map(val => {\n if (val == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"bounce\", bounce), ERROR.CODE.WRONG_OPTION);\n }\n return val;\n });\n};\n\nexport const parseArithmeticSize = (cssValue: number | string, base: number): number | null => {\n const parsed = parseArithmeticExpression(cssValue);\n\n if (parsed == null) return null;\n\n return parsed.percentage * base + parsed.absolute;\n};\n\nexport const parseArithmeticExpression = (cssValue: number | string): { percentage: number; absolute: number } | null => {\n const cssRegex = /(?:(\\+|\\-)\\s*)?(\\d+(?:\\.\\d+)?(%|px)?)/g;\n\n if (typeof cssValue === \"number\") {\n return { percentage: 0, absolute: cssValue };\n }\n\n const parsed = {\n percentage: 0,\n absolute: 0\n };\n let idx = 0;\n let matchResult = cssRegex.exec(cssValue);\n while (matchResult != null) {\n let sign = matchResult[1];\n const value = matchResult[2];\n const unit = matchResult[3];\n const parsedValue = parseFloat(value);\n\n if (idx <= 0) {\n sign = sign || \"+\";\n }\n\n // Return default value for values not in good form\n if (!sign) {\n return null;\n }\n\n const signMultiplier = sign === \"+\" ? 1 : -1;\n\n if (unit === \"%\") {\n parsed.percentage += signMultiplier * (parsedValue / 100);\n } else {\n parsed.absolute += signMultiplier * parsedValue;\n }\n\n // Match next occurrence\n ++idx;\n matchResult = cssRegex.exec(cssValue);\n }\n\n // None-matched\n if (idx === 0) {\n return null;\n }\n\n return parsed;\n};\n\nexport const parseCSSSizeValue = (val: string | number): string => isString(val) ? val : `${val}px`;\n\nexport const parsePanelAlign = (align: FlickingOptions[\"align\"]) => typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\nexport const getDirection = (start: number, end: number): ValueOf => {\n if (start === end) return DIRECTION.NONE;\n return start < end ? DIRECTION.NEXT : DIRECTION.PREV;\n};\n\nexport const parseElement = (element: ElementLike | ElementLike[]): HTMLElement[] => {\n if (!Array.isArray(element)) {\n element = [element];\n }\n\n const elements: HTMLElement[] = [];\n element.forEach(el => {\n if (isString(el)) {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = el;\n\n elements.push(...toArray(tempDiv.children) as HTMLElement[]);\n while (tempDiv.firstChild) {\n tempDiv.removeChild(tempDiv.firstChild);\n }\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n elements.push(el);\n } else {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n });\n\n return elements;\n};\n\nexport const getMinusCompensatedIndex = (idx: number, max: number) => idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max);\n\nexport const includes = (array: T[], target: any): target is T => {\n for (const val of array) {\n if (val === target) return true;\n }\n return false;\n};\n\nexport const isString = (val: any): val is string => typeof val === \"string\";\n\nexport const circulatePosition = (pos: number, min: number, max: number) => {\n const size = max - min;\n\n if (pos < min) {\n const offset = (min - pos) % size;\n pos = max - offset;\n } else if (pos > max) {\n const offset = (pos - max) % size;\n pos = min + offset;\n }\n\n return pos;\n};\n\nexport const find = (array: T[], checker: (val: T) => boolean): T | null => {\n for (const val of array) {\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findRight = (array: T[], checker: (val: T) => boolean): T | null => {\n for (let idx = array.length - 1; idx >= 0; idx--) {\n const val = array[idx];\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findIndex = (array: T[], checker: (val: T) => boolean): number => {\n for (let idx = 0; idx < array.length; idx++) {\n if (checker(array[idx])) {\n return idx;\n }\n }\n\n return -1;\n};\n\nexport const getProgress = (pos: number, prev: number, next: number) => (pos - prev) / (next - prev);\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nexport const getStyle = (el: HTMLElement): CSSStyleDeclaration => window.getComputedStyle(el) || (el as any).currentStyle as CSSStyleDeclaration;\n\nexport const setSize = (el: HTMLElement, { width, height }: Partial<{\n width: number | string;\n height: number | string;\n}>) => {\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n el.style.width = `${width}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n el.style.height = `${height}px`;\n }\n }\n};\n\nexport const isBetween = (val: number, min: number, max: number) => val >= min && val <= max;\n\nexport const circulateIndex = (index: number, max: number): number => {\n if (index >= max) {\n return index % max;\n } else if (index < 0) {\n return getMinusCompensatedIndex((index + 1) % max - 1, max);\n } else {\n return index;\n }\n};\n\nexport const range = (end: number): number[] => {\n const arr = new Array(end);\n\n for (let i = 0; i < end; i++) {\n arr[i] = i;\n }\n\n return arr;\n};\n\nexport const getElementSize = ({\n el,\n horizontal,\n useFractionalSize,\n useOffset,\n style\n}: {\n el: HTMLElement;\n horizontal: boolean;\n useFractionalSize: boolean;\n useOffset: boolean;\n style: CSSStyleDeclaration;\n}): number => {\n let size = 0;\n if (useFractionalSize) {\n const baseSize = parseFloat(horizontal ? style.width : style.height) || 0;\n const isBorderBoxSizing = style.boxSizing === \"border-box\";\n const border = horizontal\n ? parseFloat(style.borderLeftWidth || \"0\") + parseFloat(style.borderRightWidth || \"0\")\n : parseFloat(style.borderTopWidth || \"0\") + parseFloat(style.borderBottomWidth || \"0\");\n\n if (isBorderBoxSizing) {\n size = useOffset\n ? baseSize\n : baseSize - border;\n } else {\n const padding = horizontal\n ? parseFloat(style.paddingLeft || \"0\") + parseFloat(style.paddingRight || \"0\")\n : parseFloat(style.paddingTop || \"0\") + parseFloat(style.paddingBottom || \"0\");\n\n size = useOffset\n ? baseSize + padding + border\n : baseSize + padding;\n }\n } else {\n const sizeStr = horizontal ? \"Width\" : \"Height\";\n\n size = useOffset\n ? el[`offset${sizeStr}`]\n : el[`client${sizeStr}`];\n }\n\n return Math.max(size, 0);\n};\n\nexport const setPrototypeOf = Object.setPrototypeOf || ((obj, proto) => {\n obj.__proto__ = proto;\n return obj;\n});\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport { setPrototypeOf } from \"../utils\";\n\n/**\n * Special type of known error that {@link Flicking} throws.\n * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러\n * @property {number} code Error code에러 코드\n * @property {string} message Error message에러 메시지\n * @see {@link ERROR_CODE ERROR_CODE}\n * @example\n * ```ts\n * import Flicking, { FlickingError, ERROR_CODES } from \"@egjs/flicking\";\n * try {\n * const flicking = new Flicking(\".flicking-viewport\")\n * } catch (e) {\n * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) {\n * console.error(\"Element not found\")\n * }\n * }\n * ```\n */\nclass FlickingError extends Error {\n public code: number;\n\n /**\n * @param message Error message에러 메시지\n * @param code Error code에러 코드\n */\n public constructor(message: string, code: number) {\n super(message);\n\n setPrototypeOf(this, FlickingError.prototype);\n this.name = \"FlickingError\";\n this.code = code;\n }\n}\n\nexport default FlickingError;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { getElementSize, getStyle, isString } from \"../utils\";\n\n/**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n */\nclass Viewport {\n private _flicking: Flicking;\n private _el: HTMLElement;\n private _width: number;\n private _height: number;\n private _isBorderBoxSizing: boolean;\n private _padding: {\n left: number;\n right: number;\n top: number;\n bottom: number;\n };\n\n /**\n * A viewport(root) element\n * @ko 뷰포트(root) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n\n /**\n * Viewport width, without paddings\n * @ko 뷰포트 너비\n * @type {number}\n * @readonly\n */\n public get width() { return this._width - this._padding.left - this._padding.right; }\n /**\n * Viewport height, without paddings\n * @ko 뷰포트 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height - this._padding.top - this._padding.bottom; }\n /**\n * Viewport paddings\n * @ko 뷰포트 CSS padding 값\n * @type {object}\n * @property {number} left CSS `padding-left`\n * @property {number} right CSS `padding-right`\n * @property {number} top CSS `padding-top`\n * @property {number} bottom CSS `padding-bottom`\n * @readonly\n */\n public get padding() { return this._padding; }\n\n /**\n * @param el A viewport element뷰포트 엘리먼트\n */\n public constructor(flicking: Flicking, el: HTMLElement) {\n this._flicking = flicking;\n this._el = el;\n this._width = 0;\n this._height = 0;\n this._padding = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this._isBorderBoxSizing = false;\n }\n\n /**\n * Change viewport's size.\n * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property\n * @ko 뷰포트 크기를 변경합니다.\n * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New viewport size새 뷰포트 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n */\n public setSize({\n width,\n height\n }: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n const el = this._el;\n const padding = this._padding;\n const isBorderBoxSizing = this._isBorderBoxSizing;\n\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n const newWidth = isBorderBoxSizing\n ? width + padding.left + padding.right\n : width;\n el.style.width = `${newWidth}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n const newHeight = isBorderBoxSizing\n ? height + padding.top + padding.bottom\n : height;\n el.style.height = `${newHeight}px`;\n }\n }\n this.resize();\n }\n\n /**\n * Update width/height to the current viewport element's size\n * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다\n */\n public resize() {\n const el = this._el;\n const elStyle = getStyle(el);\n const {\n useFractionalSize\n } = this._flicking;\n\n this._width = getElementSize({\n el,\n horizontal: true,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n this._height = getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n\n this._padding = {\n left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0,\n right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0,\n top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0,\n bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0\n };\n this._isBorderBoxSizing = elStyle.boxSizing === \"border-box\";\n }\n}\n\nexport default Viewport;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\n\nclass AutoResizer {\n private _flicking: Flicking;\n private _enabled: boolean;\n private _resizeObserver: ResizeObserver | null;\n private _resizeTimer: number;\n private _maxResizeDebounceTimer: number;\n\n public get enabled() { return this._enabled; }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n this._enabled = false;\n this._resizeObserver = null;\n this._resizeTimer = -1;\n this._maxResizeDebounceTimer = -1;\n }\n\n public enable(): this {\n const flicking = this._flicking;\n const viewport = flicking.viewport;\n\n if (this._enabled) {\n this.disable();\n }\n\n if (flicking.useResizeObserver && !!window.ResizeObserver) {\n const viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;\n\n const resizeObserver = viewportSizeNot0\n ? new ResizeObserver(this._skipFirstResize)\n : new ResizeObserver(this._onResize);\n\n resizeObserver.observe(flicking.viewport.element);\n\n this._resizeObserver = resizeObserver;\n } else {\n window.addEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = true;\n\n return this;\n }\n\n public disable(): this {\n if (!this._enabled) return this;\n\n const resizeObserver = this._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n this._resizeObserver = null;\n } else {\n window.removeEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = false;\n\n return this;\n }\n\n private _onResize = () => {\n const flicking = this._flicking;\n const resizeDebounce = flicking.resizeDebounce;\n const maxResizeDebounce = flicking.maxResizeDebounce;\n\n if (resizeDebounce <= 0) {\n void flicking.resize();\n } else {\n if (this._maxResizeDebounceTimer <= 0) {\n if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) {\n this._maxResizeDebounceTimer = window.setTimeout(this._doScheduledResize, maxResizeDebounce);\n }\n }\n\n if (this._resizeTimer > 0) {\n clearTimeout(this._resizeTimer);\n this._resizeTimer = 0;\n }\n\n this._resizeTimer = window.setTimeout(this._doScheduledResize, resizeDebounce);\n }\n };\n\n private _doScheduledResize = () => {\n clearTimeout(this._resizeTimer);\n clearTimeout(this._maxResizeDebounceTimer);\n\n this._maxResizeDebounceTimer = -1;\n this._resizeTimer = -1;\n\n void this._flicking.resize();\n };\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n private _skipFirstResize = (() => {\n let isFirstResize = true;\n\n return (() => {\n if (isFirstResize) {\n isFirstResize = false;\n return;\n }\n this._onResize();\n });\n })();\n}\n\nexport default AutoResizer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../../Flicking\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VanillaElementProvider implements ElementProvider {\n private _element: HTMLElement;\n private _rendered: boolean;\n\n public get element() { return this._element; }\n public get rendered() { return this._rendered; }\n\n public constructor(element: HTMLElement) {\n this._element = element;\n this._rendered = true;\n }\n\n public show(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement !== cameraEl) {\n cameraEl.appendChild(el);\n this._rendered = true;\n }\n }\n\n public hide(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement === cameraEl) {\n cameraEl.removeChild(el);\n this._rendered = false;\n }\n }\n}\n\nexport default VanillaElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport Flicking from \"../../../Flicking\";\nimport VirtualPanel from \"../VirtualPanel\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VirtualElementProvider implements ElementProvider {\n private _flicking: Flicking;\n private _panel: VirtualPanel;\n\n public get element() { return this._virtualElement.nativeElement; }\n public get rendered() { return this._virtualElement.visible; }\n\n private get _virtualElement() {\n const flicking = this._flicking;\n const elIndex = this._panel.elementIndex;\n const virtualElements = flicking.virtual.elements;\n\n return virtualElements[elIndex];\n }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public init(panel: VirtualPanel) {\n this._panel = panel;\n }\n\n public show(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n\n public hide(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n}\n\nexport default VirtualElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { range } from \"../utils\";\nimport { CLASS } from \"../const/external\";\n\nimport VirtualPanel from \"./panel/VirtualPanel\";\n\nexport interface VirtualOptions {\n renderPanel: (panel: VirtualPanel, index: number) => string;\n initialPanelCount: number;\n cache?: boolean;\n panelClass?: string;\n}\n\n/**\n * A manager class to add / remove virtual panels\n */\nclass VirtualManager {\n private _flicking: Flicking;\n\n private _renderPanel: (panel: VirtualPanel, index: number) => string;\n private _initialPanelCount: number;\n private _cache: boolean;\n private _panelClass: string;\n\n private _elements: Array<{ nativeElement: HTMLElement; visible: boolean }>;\n\n public get elements() { return this._elements; }\n\n // Options\n /**\n * A rendering function for the panel element's innerHTML\n * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @type {function}\n * @param {VirtualPanel} panel Instance of the panel패널 인스턴스\n * @param {number} index Index of the panel패널 인덱스\n * @default \"() => {}\"\n */\n public get renderPanel() { return this._renderPanel; }\n /**\n * Initial panel count to render\n * @ko 최초로 렌더링할 패널의 개수\n * @readonly\n * @type {number}\n * @default -1\n */\n public get initialPanelCount() { return this._initialPanelCount; }\n /**\n * Whether to cache rendered panel's innerHTML\n * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @type {boolean}\n * @default false\n */\n public get cache() { return this._cache; }\n /**\n * The class name that will be applied to rendered panel elements\n * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @type {string}\n * @default \"flicking-panel\"\n */\n public get panelClass() { return this._panelClass; }\n\n public set renderPanel(val: VirtualOptions[\"renderPanel\"]) {\n this._renderPanel = val;\n this._flicking.renderer.panels.forEach((panel: VirtualPanel) => panel.uncacheRenderResult());\n }\n\n public set cache(val: NonNullable) { this._cache = val; }\n public set panelClass(val: NonNullable) { this._panelClass = val; }\n\n public constructor(flicking: Flicking, options: VirtualOptions | null) {\n this._flicking = flicking;\n\n this._renderPanel = options?.renderPanel ?? (() => \"\");\n this._initialPanelCount = options?.initialPanelCount ?? -1;\n this._cache = options?.cache ?? false;\n this._panelClass = options?.panelClass ?? CLASS.DEFAULT_VIRTUAL;\n\n this._elements = [];\n }\n\n public init() {\n const flicking = this._flicking;\n\n if (!flicking.virtualEnabled) return;\n\n if (!flicking.externalRenderer && !flicking.renderExternal) {\n this._initVirtualElements();\n }\n\n const virtualElements = flicking.camera.children;\n this._elements = virtualElements.map(el => ({ nativeElement: el, visible: true }));\n }\n\n public show(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = true;\n\n if (nativeEl.style.display) {\n nativeEl.style.display = \"\";\n }\n }\n\n public hide(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = false;\n nativeEl.style.display = \"none\";\n }\n\n /**\n * Add new virtual panels at the end of the list\n * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public append(count: number = 1): VirtualPanel[] {\n const flicking = this._flicking;\n\n return this.insert(flicking.panels.length, count);\n }\n\n /**\n * Add new virtual panels at the start of the list\n * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public prepend(count: number = 1): VirtualPanel[] {\n return this.insert(0, count);\n }\n\n /**\n * Add new virtual panels at the given index\n * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public insert(index: number, count: number = 1): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchInsert({ index, elements: range(count), hasDOMInElements: false }) as VirtualPanel[];\n }\n\n /**\n * Remove panels at the given index\n * @ko 주어진 인덱스에서 패널들을 삭제합니다\n * @param {number} count The number of panels to remove삭제할 패널의 개수\n * @returns {Array} The panels removed삭제된 패널들\n */\n public remove(index: number, count: number): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchRemove({ index, deleteCount: count, hasDOMInElements: false }) as VirtualPanel[];\n }\n\n private _initVirtualElements() {\n const flicking = this._flicking;\n const cameraElement = flicking.camera.element;\n const panelsPerView = flicking.panelsPerView;\n const fragment = document.createDocumentFragment();\n\n const newElements = range(panelsPerView + 1).map(idx => {\n const panelEl = document.createElement(\"div\");\n panelEl.className = this._panelClass;\n panelEl.dataset.elementIndex = idx.toString();\n return panelEl;\n });\n\n newElements.forEach(el => {\n fragment.appendChild(el);\n });\n\n cameraElement.appendChild(fragment);\n }\n}\n\nexport default VirtualManager;\n","/**\n * All possible @egjs/axes event keys\n * @internal\n */\nexport const EVENT = {\n HOLD: \"hold\",\n CHANGE: \"change\",\n RELEASE: \"release\",\n ANIMATION_END: \"animationEnd\",\n FINISH: \"finish\"\n} as const;\n\n/**\n * An Axis key that Flicking uses\n * @internal\n */\nexport const POSITION_KEY = \"flick\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A default state when there's no user input and no animation's playing\n * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태\n * @internal\n */\nclass IdleState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n public onEnter() {\n this._delta = 0;\n this._targetPanel = null;\n }\n\n public onHold(ctx: Parameters[0]): void {\n // Shouldn't do any action until any panels on flicking area\n const { flicking, axesEvent, transitTo } = ctx;\n\n if (flicking.renderer.panelCount <= 0) {\n transitTo(STATE_TYPE.DISABLED);\n return;\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, {\n axesEvent\n });\n\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.HOLDING);\n }\n }\n\n // By methods call\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const controller = flicking.control.controller;\n const animatingContext = controller.animatingContext;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger AnimatingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.ANIMATING).onChange(ctx);\n }\n }\n}\n\nexport default IdleState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's holding the Flicking area, but not moved a single pixel yet\n * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태\n * @internal\n */\nclass HoldingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n private _releaseEvent: OnRelease | null = null;\n\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const inputEvent = axesEvent.inputEvent as { offsetX: number; offsetY: number };\n\n const offset = flicking.horizontal\n ? inputEvent.offsetX\n : inputEvent.offsetY;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, -offset),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger DraggingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.DRAGGING).onChange(ctx);\n }\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { axesEvent }));\n\n if (axesEvent.delta.flick !== 0) {\n // Sometimes \"release\" event on axes triggered before \"change\" event\n // Especially if user flicked panel fast in really short amount of time\n // if delta is not zero, that means above case happened.\n\n // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END\n // At least one move event should be included between holdStart and holdEnd\n axesEvent.setTo({ flick: flicking.camera.position }, 0);\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n // Can't handle select event here,\n // As \"finish\" axes event happens\n this._releaseEvent = axesEvent;\n }\n\n public onFinish(ctx: Parameters[0]): void {\n const { flicking, transitTo } = ctx;\n\n // Should transite to IDLE state before select event\n // As user expects hold is already finished\n transitTo(STATE_TYPE.IDLE);\n\n if (!this._releaseEvent) {\n return;\n }\n\n // Handle release event here\n // To prevent finish event called twice\n const releaseEvent = this._releaseEvent;\n\n // Static click\n /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */\n const srcEvent = releaseEvent.inputEvent.srcEvent;\n\n let clickedElement: HTMLElement;\n if (srcEvent.type === \"touchend\") {\n const touchEvent = srcEvent as TouchEvent;\n const touch = touchEvent.changedTouches[0];\n clickedElement = document.elementFromPoint(touch.clientX, touch.clientY) as HTMLElement;\n } else {\n clickedElement = srcEvent.target;\n }\n /* eslint-enable */\n\n const panels = flicking.renderer.panels;\n let clickedPanel: Panel | null = null;\n\n for (const panel of panels) {\n if (panel.contains(clickedElement)) {\n clickedPanel = panel;\n break;\n }\n }\n\n if (clickedPanel) {\n const cameraPosition = flicking.camera.position;\n const clickedPanelPosition = clickedPanel.position;\n\n flicking.trigger(new ComponentEvent(EVENTS.SELECT, {\n index: clickedPanel.index,\n panel: clickedPanel,\n // Direction to the clicked panel\n direction: getDirection(cameraPosition, clickedPanelPosition)\n }));\n }\n }\n}\n\nexport default HoldingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's dragging the Flicking area\n * @ko 사용자가 드래깅중인 상태\n * @internal\n */\nclass DraggingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onRelease(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n // Update last position to cope with Axes's animating behavior\n // Axes uses start position when animation start\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, {\n axesEvent\n }));\n\n if (flicking.renderer.panelCount <= 0) {\n // There're no panels\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n transitTo(STATE_TYPE.ANIMATING);\n\n const control = flicking.control;\n const position = axesEvent.destPos[AXES.POSITION_KEY];\n const duration = Math.max(axesEvent.duration, flicking.duration);\n\n try {\n void control.moveToPosition(position, duration, axesEvent);\n } catch (err) {\n transitTo(STATE_TYPE.IDLE);\n axesEvent.setTo({ [AXES.POSITION_KEY]: flicking.camera.position }, 0);\n }\n }\n}\n\nexport default DraggingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking's animating by user input or method call\n * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태\n * @internal\n */\nclass AnimatingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onHold(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const targetPanel = this._targetPanel;\n const control = flicking.control;\n\n this._delta = 0;\n flicking.control.updateInput();\n\n if (flicking.changeOnHold && targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { axesEvent });\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.DRAGGING);\n }\n }\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onFinish(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const control = flicking.control;\n const controller = control.controller;\n const animatingContext = controller.animatingContext;\n\n transitTo(STATE_TYPE.IDLE);\n\n flicking.trigger(new ComponentEvent(EVENTS.MOVE_END, {\n isTrusted: axesEvent.isTrusted,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n }));\n\n const targetPanel = this._targetPanel;\n if (targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n }\n}\n\nexport default AnimatingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking is stopped by event's `stop` method\n * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태\n * @internal\n */\nclass DisabledState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onAnimationEnd(ctx: Parameters[0]): void {\n const { transitTo } = ctx;\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onChange(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // Can stop Axes's change event\n axesEvent.stop();\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // This is needed when stopped hold start event\n if (axesEvent.delta.flick === 0) {\n transitTo(STATE_TYPE.IDLE);\n }\n }\n}\n\nexport default DisabledState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { AxesEvents } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport * as AXES from \"../const/axes\";\n\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport State, { STATE_TYPE } from \"./states/State\";\n\n/**\n * @internal\n */\nclass StateMachine {\n private _state: State;\n\n public get state(): State { return this._state; }\n\n public constructor() {\n this._state = new IdleState();\n }\n\n public fire(eventType: keyof AxesEvents, externalCtx: {\n flicking: Flicking;\n axesEvent: any;\n }) {\n const currentState = this._state;\n const ctx = { ...externalCtx, transitTo: this.transitTo };\n\n switch (eventType) {\n case AXES.EVENT.HOLD:\n currentState.onHold(ctx);\n break;\n case AXES.EVENT.CHANGE:\n currentState.onChange(ctx);\n break;\n case AXES.EVENT.RELEASE:\n currentState.onRelease(ctx);\n break;\n case AXES.EVENT.ANIMATION_END:\n currentState.onAnimationEnd(ctx);\n break;\n case AXES.EVENT.FINISH:\n currentState.onFinish(ctx);\n break;\n }\n }\n\n public transitTo = (nextStateType: STATE_TYPE): State => {\n let nextState: State;\n\n switch (nextStateType) {\n case STATE_TYPE.IDLE:\n nextState = new IdleState();\n break;\n case STATE_TYPE.HOLDING:\n nextState = new HoldingState();\n break;\n case STATE_TYPE.DRAGGING:\n nextState = new DraggingState();\n break;\n case STATE_TYPE.ANIMATING:\n nextState = new AnimatingState();\n break;\n case STATE_TYPE.DISABLED:\n nextState = new DisabledState();\n break;\n }\n\n nextState.onEnter(this._state);\n\n this._state = nextState;\n\n return this._state;\n };\n}\n\nexport default StateMachine;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Axes, { PanInput, AxesEvents, OnRelease } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\nimport { ORDER } from \"../const/external\";\nimport { getFlickingAttached, parseBounce } from \"../utils\";\nimport { ControlParams } from \"../type/external\";\n\nimport StateMachine from \"./StateMachine\";\n\n/**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @internal\n */\nclass AxesController {\n private _flicking: Flicking | null;\n private _axes: Axes | null;\n private _panInput: PanInput | null;\n private _stateMachine: StateMachine;\n\n private _animatingContext: { start: number; end: number; offset: number };\n private _dragged: boolean;\n\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스\n * @type {Axes | null}\n * @see https://naver.github.io/egjs-axes/docs/api/Axes\n * @readonly\n */\n public get axes() { return this._axes; }\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스\n * @type {PanInput | null}\n * @see https://naver.github.io/egjs-axes/docs/api/PanInput\n * @readonly\n */\n public get panInput() { return this._panInput; }\n /**\n * @internal\n */\n public get stateMachine() { return this._stateMachine; }\n /**\n * A activated {@link State} that shows the current status of the user input or the animation\n * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다\n * @type {State}\n */\n public get state() { return this._stateMachine.state; }\n /**\n * A context of the current animation playing\n * @ko 현재 재생중인 애니메이션 정보\n * @type {object}\n * @property {number} start A start position of the animation애니메이션 시작 지점\n * @property {number} end A end position of the animation애니메이션 끝 지점\n * @property {number} offset camera offset카메라 오프셋\n * @readonly\n */\n public get animatingContext() { return this._animatingContext; }\n /**\n * A current control parameters of the Axes instance\n * @ko 활성화된 현재 Axes 패러미터들\n * @type {ControlParams}\n */\n public get controlParams(): ControlParams {\n const axes = this._axes;\n\n if (!axes) {\n return {\n range: { min: 0, max: 0 },\n position: 0,\n circular: false\n };\n }\n\n const axis = axes.axis[AXES.POSITION_KEY];\n\n return {\n range: { min: axis.range![0], max: axis.range![1] },\n circular: (axis.circular as boolean[])[0],\n position: this.position\n };\n }\n\n /**\n * A Boolean indicating whether the user input is enabled\n * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get enabled() { return this._panInput?.isEnabled() ?? false; }\n /**\n * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값\n * @type {number}\n * @readonly\n */\n public get position() { return this._axes?.get([AXES.POSITION_KEY])[AXES.POSITION_KEY] ?? 0; }\n /**\n * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값\n * @type {number[]}\n * @readonly\n */\n public get range() { return this._axes?.axis[AXES.POSITION_KEY].range ?? [0, 0]; }\n /**\n * Actual bounce size(px)\n * @ko 적용된 bounce 크기(px 단위)\n * @type {number[]}\n * @readonly\n */\n public get bounce() { return this._axes?.axis[AXES.POSITION_KEY].bounce as number[] | undefined; }\n\n /** */\n public constructor() {\n this._resetInternalValues();\n this._stateMachine = new StateMachine();\n }\n\n /**\n * Initialize AxesController\n * @ko AxesController를 초기화합니다\n * @param {Flicking} flicking An instance of Flicking\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n\n this._axes = new Axes({\n [AXES.POSITION_KEY]: {\n range: [0, 0],\n circular: false,\n bounce: [0, 0]\n }\n }, {\n deceleration: flicking.deceleration,\n interruptable: flicking.interruptable,\n nested: flicking.nested,\n easing: flicking.easing\n });\n this._panInput = new PanInput(flicking.viewport.element, {\n inputType: flicking.inputType,\n threshold: 1,\n iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,\n preventDefaultOnDrag: flicking.preventDefaultOnDrag,\n scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],\n releaseOnScroll: true\n });\n\n const axes = this._axes;\n\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], this._panInput);\n\n for (const key in AXES.EVENT) {\n const eventType = AXES.EVENT[key] as keyof AxesEvents;\n\n axes.on(eventType, (e: AxesEvents[typeof eventType]) => {\n this._stateMachine.fire(eventType, {\n flicking,\n axesEvent: e\n });\n });\n }\n\n return this;\n }\n\n /**\n * Destroy AxesController and return to initial state\n * @ko AxesController를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n if (this._axes) {\n this.removePreventClickHandler();\n this._axes.destroy();\n }\n\n this._panInput?.destroy();\n\n this._resetInternalValues();\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._panInput?.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._panInput?.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._panInput?.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @chainable\n * @return {this}\n */\n public updateAnimation(position: number, duration?: number): this {\n this._animatingContext = {\n ...this._animatingContext,\n end: position\n };\n this._axes?.updateAnimation({\n destPos: { [AXES.POSITION_KEY]: position },\n duration\n });\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n this._axes?.stopAnimation();\n\n return this;\n }\n\n /**\n * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before\n * {@link AxesController#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public update(controlParams: ControlParams): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const axes = this._axes!;\n const axis = axes.axis[AXES.POSITION_KEY];\n\n axis.circular = [controlParams.circular, controlParams.circular];\n axis.range = [controlParams.range.min, controlParams.range.max];\n axis.bounce = parseBounce(flicking.bounce, camera.size);\n\n axes.axisManager.set({ [AXES.POSITION_KEY]: controlParams.position });\n\n return this;\n }\n\n /**\n * Attach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다\n * @return {this}\n */\n public addPreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.on(AXES.EVENT.HOLD, this._onAxesHold);\n axes.on(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.addEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Detach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다\n * @return {this}\n */\n public removePreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.off(AXES.EVENT.HOLD, this._onAxesHold);\n axes.off(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.removeEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다.\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise {\n const axes = this._axes;\n const state = this._stateMachine.state;\n\n if (!axes) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING));\n }\n\n const startPos = axes.get([AXES.POSITION_KEY])[AXES.POSITION_KEY];\n\n if (startPos === position) {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.lookAt(position);\n\n if (state.targetPanel) {\n flicking.control.setActive(state.targetPanel, flicking.control.activePanel, axesEvent?.isTrusted ?? false);\n }\n return Promise.resolve();\n }\n\n this._animatingContext = {\n start: startPos,\n end: position,\n offset: 0\n };\n\n const animate = () => {\n const resetContext = () => {\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n };\n\n axes.once(AXES.EVENT.FINISH, resetContext);\n\n if (axesEvent) {\n axesEvent.setTo({ [AXES.POSITION_KEY]: position }, duration);\n } else {\n axes.setTo({ [AXES.POSITION_KEY]: position }, duration);\n }\n };\n\n return new Promise((resolve, reject) => {\n const animationFinishHandler = () => {\n axes.off(AXES.EVENT.HOLD, interruptionHandler);\n resolve();\n };\n\n const interruptionHandler = () => {\n axes.off(AXES.EVENT.FINISH, animationFinishHandler);\n reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));\n };\n\n axes.once(AXES.EVENT.FINISH, animationFinishHandler);\n axes.once(AXES.EVENT.HOLD, interruptionHandler);\n\n animate();\n });\n }\n\n public updateDirection() {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const panInput = this._panInput!;\n\n axes.disconnect(panInput);\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], panInput);\n\n panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];\n }\n\n private _resetInternalValues() {\n this._flicking = null;\n this._axes = null;\n this._panInput = null;\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n this._dragged = false;\n }\n\n private _onAxesHold = () => {\n this._dragged = false;\n };\n\n private _onAxesChange = () => {\n this._dragged = !!this._panInput?.isEnabled();\n };\n\n private _preventClickWhenDragged = (e: MouseEvent) => {\n if (this._dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n this._dragged = false;\n };\n}\n\nexport default AxesController;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AxesController from \"../control/AxesController\";\nimport { DIRECTION, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getDirection, getFlickingAttached } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\n/**\n * A component that manages inputs and animation of Flicking\n * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트\n */\nabstract class Control {\n // Internal States\n protected _flicking: Flicking | null;\n protected _controller: AxesController;\n protected _activePanel: Panel | null;\n protected _nextPanel: Panel | null;\n\n /**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @type {AxesController}\n * @readonly\n */\n public get controller() { return this._controller; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get activeIndex() { return this._activePanel?.index ?? -1; }\n /**\n * An active panel\n * @ko 현재 선택된 패널\n * @type {Panel | null}\n * @readonly\n */\n public get activePanel() { return this._activePanel; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._controller.state.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._controller.state.holding; }\n\n /** */\n public constructor() {\n this._flicking = null;\n this._controller = new AxesController();\n this._activePanel = null;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @method\n * @abstract\n * @memberof Control\n * @instance\n * @name moveToPosition\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise;\n\n /**\n * Initialize Control\n * @ko Control을 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._controller.init(flicking);\n\n return this;\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._controller.destroy();\n\n this._flicking = null;\n this._activePanel = null;\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._controller.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._controller.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._controller.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우\n * @return {this}\n */\n public updateAnimation(panel: Panel, duration?: number, direction?: ValueOf): this {\n const state = this._controller.state;\n const position = this._getPosition(panel, direction ?? DIRECTION.NONE);\n\n state.targetPanel = panel;\n this._controller.updateAnimation(position, duration);\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n const state = this._controller.state;\n\n state.targetPanel = null;\n this._controller.stopAnimation();\n\n return this;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n camera.lookAt(camera.clampToReachablePosition(activePanel.position));\n }\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._controller.update(camera.controlParams);\n\n return this;\n }\n\n /**\n * Reset {@link Control#activePanel activePanel} to `null`\n * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다\n * @chainable\n * @return {this}\n */\n public resetActive(): this {\n this._activePanel = null;\n\n return this;\n }\n\n /**\n * Move {@link Camera} to the given panel\n * @ko {@link Camera}를 해당 패널 위로 이동합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {object} options An options object옵션 오브젝트\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public async moveToPanel(panel: Panel, {\n duration,\n direction = DIRECTION.NONE,\n axesEvent\n }: {\n duration: number;\n direction?: ValueOf;\n axesEvent?: OnRelease;\n }) {\n const position = this._getPosition(panel, direction);\n this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);\n\n return this._animateToPosition({ position, duration, newActivePanel: panel, axesEvent });\n }\n\n /**\n * @internal\n */\n public setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) {\n const flicking = getFlickingAttached(this._flicking);\n\n this._activePanel = newActivePanel;\n this._nextPanel = null;\n\n flicking.camera.updateAdaptiveHeight();\n\n if (newActivePanel !== prevActivePanel) {\n flicking.trigger(new ComponentEvent(EVENTS.CHANGED, {\n index: newActivePanel.index,\n panel: newActivePanel,\n prevIndex: prevActivePanel?.index ?? -1,\n prevPanel: prevActivePanel,\n isTrusted,\n direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE\n }));\n } else {\n flicking.trigger(new ComponentEvent(EVENTS.RESTORED, {\n isTrusted\n }));\n }\n }\n\n /**\n * @internal\n */\n public copy(control: Control) {\n this._flicking = control._flicking;\n this._activePanel = control._activePanel;\n this._controller = control._controller;\n }\n\n protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf) {\n const flicking = getFlickingAttached(this._flicking);\n const triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n const event = new ComponentEvent(triggeringEvent, {\n index: panel.index,\n panel,\n isTrusted: axesEvent?.isTrusted || false,\n direction: direction ?? getDirection(activePanel?.position ?? camera.position, position)\n });\n\n this._nextPanel = panel;\n flicking.trigger(event);\n\n if (event.isCanceled()) {\n throw new FlickingError(ERROR.MESSAGE.STOP_CALLED_BY_USER, ERROR.CODE.STOP_CALLED_BY_USER);\n }\n }\n\n protected async _animateToPosition({\n position,\n duration,\n newActivePanel,\n axesEvent\n }: {\n position: number;\n duration: number;\n newActivePanel: Panel;\n axesEvent?: OnRelease;\n }) {\n const flicking = getFlickingAttached(this._flicking);\n const animate = () => this._controller.animateTo(position, duration, axesEvent);\n const state = this._controller.state;\n\n state.targetPanel = newActivePanel;\n\n if (duration <= 0) {\n return animate();\n } else {\n return animate().then(async () => {\n await flicking.renderer.render();\n }).catch(err => {\n if (axesEvent && err instanceof FlickingError && err.code === ERROR.CODE.ANIMATION_INTERRUPTED) return;\n throw err;\n });\n }\n }\n\n private _getPosition(panel: Panel, direction: ValueOf = DIRECTION.NONE) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n let position = panel.position;\n const nearestAnchor = camera.findNearestAnchor(position);\n\n if (panel.removed || !nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(panel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n if (!camera.canReach(panel)) {\n // Override position & panel if that panel is not reachable\n position = nearestAnchor.position;\n panel = nearestAnchor.panel;\n } else if (flicking.circularEnabled) {\n // Circular mode is enabled, find nearest distance to panel\n const camPos = this._controller.position; // Actual position of the Axes\n const camRangeDiff = camera.rangeDiff;\n const possiblePositions = [position, position + camRangeDiff, position - camRangeDiff]\n .filter(pos => {\n if (direction === DIRECTION.NONE) return true;\n\n return direction === DIRECTION.PREV\n ? pos <= camPos\n : pos >= camPos;\n });\n\n position = possiblePositions.reduce((nearestPosition, pos) => {\n if (Math.abs(camPos - pos) < Math.abs(camPos - nearestPosition)) {\n return pos;\n } else {\n return nearestPosition;\n }\n }, Infinity);\n }\n\n return position;\n }\n}\n\nexport default Control;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"./panel/Panel\";\n\n/**\n * A data component that has actual position where the camera should be stopped at\n * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트\n */\nclass AnchorPoint {\n private _index: number;\n private _pos: number;\n private _panel: Panel;\n\n /**\n * Index of AnchorPoint\n * @ko AnchorPoint의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of AnchorPoint\n * @ko AnchorPoint의 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos; }\n /**\n * A {@link Panel} instance AnchorPoint is referencing to\n * @ko AnchorPoint가 참조하고 있는 {@link Panel}\n * @type {Panel}\n * @readonly\n */\n public get panel() { return this._panel; }\n\n /**\n * @param {object} options An options object옵션 객체\n * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스\n * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표\n * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel}\n */\n public constructor({\n index,\n position,\n panel\n }: {\n index: number;\n position: number;\n panel: Panel;\n }) {\n this._index = index;\n this._pos = position;\n this._panel = panel;\n }\n}\n\nexport default AnchorPoint;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport { circulateIndex, clamp, getFlickingAttached } from \"../utils\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link SnapControl}\n * @ko {@link SnapControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels can go after release입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n */\nexport interface SnapControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that uses a release momentum to choose destination panel\n * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control}\n */\nclass SnapControl extends Control {\n private _count: SnapControlOptions[\"count\"];\n\n /**\n * Maximum number of panels can go after release\n * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n * @type {number}\n * @default Infinity\n */\n public get count() { return this._count; }\n\n public set count(val: SnapControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = Infinity\n }: Partial = {}) {\n super();\n\n this._count = count;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activeAnchor = camera.findActiveAnchor();\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n const state = this._controller.state;\n\n if (!activeAnchor || !anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);\n\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n const absPosDelta = Math.abs(posDelta);\n const snapDelta = axesEvent && axesEvent.delta[AXES.POSITION_KEY] !== 0\n ? Math.abs(axesEvent.delta[AXES.POSITION_KEY])\n : absPosDelta;\n let targetAnchor: AnchorPoint;\n\n if (snapDelta >= snapThreshold && snapDelta > 0) {\n // Move to anchor at position\n targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);\n } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {\n // Move to the adjacent panel\n targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);\n } else {\n // Fallback to nearest panel from current camera\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent);\n\n return this._animateToPosition({\n position: camera.clampToReachablePosition(targetAnchor.position),\n duration,\n newActivePanel: targetAnchor.panel,\n axesEvent\n });\n }\n\n private _findSnappedAnchor(position: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const count = this._count;\n\n const currentPos = camera.position;\n\n const clampedPosition = camera.clampToReachablePosition(position);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtCamera || !anchorAtPosition) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n if (!isFinite(count)) {\n return anchorAtPosition;\n }\n\n const panelCount = flicking.panelCount;\n const anchors = camera.anchorPoints;\n\n let loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff);\n if ((position > currentPos && anchorAtPosition.index < anchorAtCamera.index)\n || (anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount += 1;\n } else if ((position < currentPos && anchorAtPosition.index > anchorAtCamera.index)\n || (anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount -= 1;\n }\n\n const circularIndexOffset = loopCount * panelCount;\n const anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset;\n\n if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) {\n const anchor = anchors[anchorAtPosition.index];\n\n return new AnchorPoint({\n index: anchor.index,\n position: anchor.position + loopCount * camera.rangeDiff,\n panel: anchor.panel\n });\n }\n\n if (flicking.circularEnabled) {\n const targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)];\n let loop = Math.floor(count / panelCount);\n\n if (position > currentPos && targetAnchor.index < anchorAtCamera.index) {\n loop += 1;\n } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) {\n loop -= 1;\n }\n\n return new AnchorPoint({\n index: targetAnchor.index,\n position: targetAnchor.position + loop * camera.rangeDiff,\n panel: targetAnchor.panel\n });\n } else {\n return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)];\n }\n }\n\n private _findAdjacentAnchor(position: number, posDelta: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n if (camera.circularEnabled) {\n const anchorIncludePosition = camera.findAnchorIncludePosition(position);\n\n if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) {\n return anchorIncludePosition;\n }\n }\n\n const adjacentAnchor = (posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) ?? anchorAtCamera;\n\n return adjacentAnchor;\n }\n\n private _calcSnapThreshold(threshold: number, position: number, activeAnchor: AnchorPoint): number {\n const isNextDirection = position > activeAnchor.position;\n const panel = activeAnchor.panel;\n const panelSize = panel.size;\n const alignPos = panel.alignPosition;\n\n // Minimum distance needed to decide prev/next panel as nearest\n /*\n * | Prev | Next |\n * |<------>|<------------>|\n * [ |<-Anchor ]\n */\n return Math.max(threshold, isNextDirection\n ? panelSize - alignPos + panel.margin.next\n : alignPos + panel.margin.prev);\n }\n}\n\nexport default SnapControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached } from \"../utils\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link FreeControl}\n * @ko {@link FreeControl} 생성시 사용되는 옵션\n * @interface\n * @property {boolean} stopAtEdge Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n */\nexport interface FreeControlOptions {\n stopAtEdge: boolean;\n}\n\n/**\n * A {@link Control} that can be scrolled freely without alignment\n * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control}\n */\nclass FreeControl extends Control {\n private _stopAtEdge: FreeControlOptions[\"stopAtEdge\"];\n\n /**\n * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n * @type {boolean}\n * @default true\n */\n public get stopAtEdge() { return this._stopAtEdge; }\n\n public set stopAtEdge(val: FreeControlOptions[\"stopAtEdge\"]) { this._stopAtEdge = val; }\n\n /** */\n public constructor({\n stopAtEdge = true\n }: Partial = {}) {\n super();\n\n this._stopAtEdge = stopAtEdge;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n const panelRange = activePanel.range;\n const newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n camera.lookAt(camera.clampToReachablePosition(newPosition));\n }\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n\n const camera = flicking.camera;\n const targetPos = camera.clampToReachablePosition(position);\n\n const anchorAtPosition = camera.findAnchorIncludePosition(targetPos);\n\n if (!anchorAtPosition) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const targetPanel = anchorAtPosition.panel;\n\n // Trigger only change event\n if (targetPanel !== this._activePanel) {\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n }\n\n return this._animateToPosition({ position: this._stopAtEdge ? targetPos : position, duration, newActivePanel: targetPanel, axesEvent });\n }\n}\n\nexport default FreeControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport Panel from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { clamp, getFlickingAttached, getMinusCompensatedIndex, isBetween } from \"../utils\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n/**\n * An options for the {@link StrictControl}\n * @ko {@link StrictControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels that can be moved at a time최대로 움직일 수 있는 패널의 개수\n */\nexport interface StrictControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that allow you to select the maximum number of panels to move at a time\n * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control}\n */\nclass StrictControl extends Control {\n private _count: number;\n private _indexRange: { min: number; max: number };\n\n /**\n * Maximum number of panels that can be moved at a time\n * @ko 최대로 움직일 수 있는 패널의 개수\n * @type {number}\n * @default 1\n */\n public get count() { return this._count; }\n\n public set count(val: StrictControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = 1\n }: Partial = {}) {\n super();\n\n this._count = count;\n this._resetIndexRange();\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy() {\n super.destroy();\n\n this._resetIndexRange();\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const renderer = flicking.renderer;\n const controller = this._controller;\n const controlParams = camera.controlParams;\n const count = this._count;\n\n const activePanel = controller.state.animating\n ? camera.findNearestAnchor(camera.position)?.panel\n : this._activePanel;\n\n if (!activePanel) {\n controller.update(controlParams);\n this._resetIndexRange();\n return this;\n }\n\n const cameraRange = controlParams.range;\n const currentPos = activePanel.position;\n const currentIndex = activePanel.index;\n const panelCount = renderer.panelCount;\n\n let prevPanelIndex = currentIndex - count;\n let nextPanelIndex = currentIndex + count;\n\n if (prevPanelIndex < 0) {\n prevPanelIndex = flicking.circularEnabled\n ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount)\n : clamp(prevPanelIndex, 0, panelCount - 1);\n }\n if (nextPanelIndex >= panelCount) {\n nextPanelIndex = flicking.circularEnabled\n ? nextPanelIndex % panelCount\n : clamp(nextPanelIndex, 0, panelCount - 1);\n }\n\n const prevPanel = renderer.panels[prevPanelIndex];\n const nextPanel = renderer.panels[nextPanelIndex];\n\n let prevPos = Math.max(prevPanel.position, cameraRange.min);\n let nextPos = Math.min(nextPanel.position, cameraRange.max);\n\n if (prevPos > currentPos) {\n prevPos -= camera.rangeDiff;\n }\n if (nextPos < currentPos) {\n nextPos += camera.rangeDiff;\n }\n\n controlParams.range = {\n min: prevPos,\n max: nextPos\n };\n\n if (controlParams.circular) {\n if (controlParams.position < prevPos) {\n controlParams.position += camera.rangeDiff;\n }\n\n if (controlParams.position > nextPos) {\n controlParams.position -= camera.rangeDiff;\n }\n }\n\n controlParams.circular = false;\n controller.update(controlParams);\n\n this._indexRange = {\n min: prevPanel.index,\n max: nextPanel.index\n };\n\n return this;\n }\n\n public async moveToPanel(panel: Panel, options: Parameters[1]): Promise {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const controller = this._controller;\n\n controller.update(camera.controlParams);\n\n return super.moveToPanel(panel, options);\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const currentPanel = this._nextPanel ?? this._activePanel;\n const axesRange = this._controller.range;\n const indexRange = this._indexRange;\n const cameraRange = camera.range;\n const state = this._controller.state;\n\n const clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtPosition || !currentPanel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const prevPos = currentPanel.position;\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n\n const isOverThreshold = Math.abs(posDelta) >= flicking.threshold;\n const adjacentAnchor = (position > prevPos)\n ? camera.getNextAnchor(anchorAtPosition)\n : camera.getPrevAnchor(anchorAtPosition);\n\n let targetPos: number;\n let targetPanel: Panel;\n\n const anchors = camera.anchorPoints;\n const firstAnchor = anchors[0];\n const lastAnchor = anchors[anchors.length - 1];\n\n const shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max);\n const shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max);\n\n const isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max\n ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max)\n : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max);\n\n if (shouldBounceToFirst || shouldBounceToLast) {\n // In bounce area\n const targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor;\n\n targetPanel = targetAnchor.panel;\n targetPos = targetAnchor.position;\n } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) {\n // Move to anchor at position\n targetPanel = anchorAtPosition.panel;\n targetPos = anchorAtPosition.position;\n } else if (isOverThreshold && isAdjacent) {\n // Move to adjacent anchor\n targetPanel = adjacentAnchor!.panel;\n targetPos = adjacentAnchor!.position;\n } else {\n // Fallback to nearest panel from current camera\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n if (!anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n\n return this._animateToPosition({\n position: targetPos,\n duration,\n newActivePanel: targetPanel,\n axesEvent\n });\n }\n\n public setActive = (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => {\n super.setActive(newActivePanel, prevActivePanel, isTrusted);\n this.updateInput();\n };\n\n private _resetIndexRange() {\n this._indexRange = { min: 0, max: 0 };\n }\n}\n\nexport default StrictControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { clamp } from \"../../utils\";\n\n/**\n * A mode of camera\n */\nabstract class CameraMode {\n protected _flicking: Flicking;\n\n /** */\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public abstract checkAvailability(): boolean;\n public abstract getRange(): { min: number; max: number };\n\n public getAnchors(): AnchorPoint[] {\n const panels = this._flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n const anchorsIncludingPosition = anchors.filter(anchor => anchor.panel.includePosition(position, true));\n\n return anchorsIncludingPosition.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n let prevDist = Infinity;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.abs(anchor.position - position);\n\n if (dist > prevDist) {\n // Return previous anchor\n return anchors[anchorIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return anchors[anchors.length - 1];\n }\n\n public clampToReachablePosition(position: number): number {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n return clamp(position, range.min, range.max);\n }\n\n public getCircularOffset(): number {\n return 0;\n }\n\n public canReach(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n if (panel.removed) return false;\n\n const panelPos = panel.position;\n\n return panelPos >= range.min && panelPos <= range.max;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const visibleRange = camera.visibleRange;\n // Should not include margin, as we don't declare what the margin is visible as what the panel is visible.\n return panel.isVisibleOnRange(visibleRange.min, visibleRange.max);\n }\n}\n\nexport default CameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport CameraMode from \"./CameraMode\";\n\nclass LinearCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n // It's always available\n return true;\n }\n\n public getRange(): { min: number; max: number } {\n const renderer = this._flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n return { min: firstPanel?.position ?? 0, max: lastPanel?.position ?? 0 };\n }\n}\n\nexport default LinearCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { DIRECTION } from \"../../const/external\";\nimport { circulatePosition } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\n/**\n * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop\n * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드\n */\nclass CircularCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n if (panels.length <= 0) {\n return false;\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n const visibleSize = flicking.camera.size;\n const panelSizeSum = lastPanelNext - firstPanelPrev;\n\n const canSetCircularMode = panels\n .every(panel => panelSizeSum - panel.size >= visibleSize);\n\n return canSetCircularMode;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return { min: 0, max: 0 };\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n return { min: firstPanelPrev, max: lastPanelNext };\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n const camRange = camera.range;\n let minDist = Infinity;\n let minDistIndex = -1;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.min(\n Math.abs(anchor.position - position),\n Math.abs(anchor.position - camRange.min + camRange.max - position),\n Math.abs(position - camRange.min + camRange.max - anchor.position)\n );\n\n if (dist < minDist) {\n minDist = dist;\n minDistIndex = anchorIdx;\n }\n }\n\n // Return last anchor\n return anchors[minDistIndex];\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n const rangeDiff = camera.rangeDiff;\n const anchorCount = anchors.length;\n const positionInRange = circulatePosition(position, range.min, range.max);\n\n let anchorInRange: AnchorPoint | null = super.findAnchorIncludePosition(positionInRange);\n\n if (anchorCount > 0 && (position === range.min || position === range.max)) {\n const possibleAnchors = [\n anchorInRange,\n new AnchorPoint({\n index: 0,\n position: anchors[0].position + rangeDiff,\n panel: anchors[0].panel\n }),\n new AnchorPoint({\n index: anchorCount - 1,\n position: anchors[anchorCount - 1].position - rangeDiff,\n panel: anchors[anchorCount - 1].panel\n })\n ].filter(anchor => !!anchor) as AnchorPoint[];\n\n anchorInRange = possibleAnchors.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n if (!anchorInRange) return null;\n\n if (position < range.min) {\n const loopCount = -Math.floor((range.min - position) / rangeDiff) - 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n } else if (position > range.max) {\n const loopCount = Math.floor((position - range.max) / rangeDiff) + 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n }\n\n return anchorInRange;\n }\n\n public getCircularOffset(): number {\n const flicking = this._flicking;\n const camera = flicking.camera;\n\n if (!camera.circularEnabled) return 0;\n\n const toggled = flicking.panels.filter(panel => panel.toggled);\n const toggledPrev = toggled.filter(panel => panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = toggled.filter(panel => panel.toggleDirection === DIRECTION.NEXT);\n\n return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext);\n }\n\n public clampToReachablePosition(position: number): number {\n // Basically all position is reachable for circular camera\n return position;\n }\n\n public canReach(panel: Panel): boolean {\n if (panel.removed) return false;\n\n // Always reachable on circular mode\n return true;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n const rangeDiff = camera.rangeDiff;\n const visibleRange = camera.visibleRange;\n const visibleInCurrentRange = super.canSee(panel);\n\n // Check looped visible area for circular case\n if (visibleRange.min < range.min) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff);\n } else if (visibleRange.max > range.max) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff);\n }\n\n return visibleInCurrentRange;\n }\n\n private _calcPanelAreaSum(panels: Panel[]) {\n return panels.reduce((sum: number, panel: Panel) => sum + panel.sizeIncludingMargin, 0);\n }\n}\n\nexport default CircularCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport Panel from \"../../core/panel/Panel\";\nimport { parseAlign } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\nclass BoundCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return false;\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n return isBiggerThanViewport;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const alignPos = flicking.camera.alignPosition;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return { min: 0, max: 0 };\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n const firstPos = firstPanelPrev + alignPos;\n const lastPos = lastPanelNext - viewportSize + alignPos;\n\n if (isBiggerThanViewport) {\n return { min: firstPos, max: lastPos };\n } else {\n const align = flicking.camera.align;\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n const pos = firstPos + parseAlign(alignVal, lastPos - firstPos);\n\n return { min: pos, max: pos };\n }\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const camera = flicking.camera;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return [];\n }\n\n const range = flicking.camera.range;\n const reachablePanels = panels.filter(panel => camera.canReach(panel));\n\n if (reachablePanels.length > 0) {\n const shouldPrependBoundAnchor = reachablePanels[0].position !== range.min;\n const shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max;\n const indexOffset = shouldPrependBoundAnchor ? 1 : 0;\n\n const newAnchors = reachablePanels.map((panel, idx) => new AnchorPoint({\n index: idx + indexOffset,\n position: panel.position,\n panel\n }));\n\n if (shouldPrependBoundAnchor) {\n newAnchors.splice(0, 0, new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panels[reachablePanels[0].index - 1]\n }));\n }\n\n if (shouldAppendBoundAnchor) {\n newAnchors.push(new AnchorPoint({\n index: newAnchors.length,\n position: range.max,\n panel: panels[reachablePanels[reachablePanels.length - 1].index + 1]\n }));\n }\n\n return newAnchors;\n } else if (range.min !== range.max) {\n // There're more than 2 panels\n const nearestPanelAtMin = this._findNearestPanel(range.min, panels);\n const panelAtMin = nearestPanelAtMin.index === panels.length - 1\n ? nearestPanelAtMin.prev()!\n : nearestPanelAtMin;\n const panelAtMax = panelAtMin.next()!;\n\n return [\n new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panelAtMin\n }),\n new AnchorPoint({\n index: 1,\n position: range.max,\n panel: panelAtMax\n })\n ];\n } else {\n return [new AnchorPoint({\n index: 0,\n position: range.min,\n panel: this._findNearestPanel(range.min, panels)\n })];\n }\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n if (position <= range.min) {\n return anchors[0];\n } else if (position >= range.max) {\n return anchors[anchors.length - 1];\n } else {\n return super.findAnchorIncludePosition(position);\n }\n }\n\n private _findNearestPanel(pos: number, panels: Panel[]): Panel {\n let prevDist = Infinity;\n for (let panelIdx = 0; panelIdx < panels.length; panelIdx++) {\n const panel = panels[panelIdx];\n const dist = Math.abs(panel.position - pos);\n\n if (dist > prevDist) {\n // Return previous anchor\n return panels[panelIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return panels[panels.length - 1];\n }\n}\n\nexport default BoundCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport * as ERROR from \"../const/error\";\nimport { ALIGN, CIRCULAR_FALLBACK, DIRECTION, EVENTS, ORDER } from \"../const/external\";\nimport { checkExistence, find, getFlickingAttached, getProgress, getStyle, includes, parseAlign, toArray } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\nimport { CameraMode, BoundCameraMode, CircularCameraMode, LinearCameraMode } from \"./mode\";\n\nexport interface CameraOptions {\n align: FlickingOptions[\"align\"];\n}\n\n/**\n * A component that manages actual movement inside the viewport\n * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트\n */\nclass Camera {\n // Options\n private _align: FlickingOptions[\"align\"];\n\n // Internal states\n private _flicking: Flicking;\n private _mode: CameraMode;\n private _el: HTMLElement;\n private _transform: string;\n private _position: number;\n private _alignPos: number;\n private _offset: number;\n private _circularOffset: number;\n private _circularEnabled: boolean;\n private _range: { min: number; max: number };\n private _visiblePanels: Panel[];\n private _anchors: AnchorPoint[];\n private _needPanelTriggered: { prev: boolean; next: boolean };\n private _panelOrder: ValueOf;\n\n // Internal states getter\n /**\n * The camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n /**\n * An array of the child elements of the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열\n * @type {HTMLElement[]}\n * @readonly\n */\n public get children() { return toArray(this._el.children) as HTMLElement[]; }\n /**\n * Current position of the camera\n * @ko Camera의 현재 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._position; }\n /**\n * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at\n * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option\n * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다.\n * @type {number}\n * @default 0\n * @readonly\n */\n public get offset() { return this._offset - this._circularOffset; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._circularEnabled; }\n /**\n * A current camera mode\n * @type {CameraMode}\n * @readonly\n */\n public get mode() { return this._mode; }\n /**\n * A range that Camera's {@link Camera#position position} can reach\n * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} max A maximum position최대 위치\n * @readonly\n */\n public get range() { return this._range; }\n /**\n * A difference between Camera's minimum and maximum position that can reach\n * @ko Camera가 도달 가능한 최소/최대 좌표의 차이\n * @type {number}\n * @readonly\n */\n public get rangeDiff() { return this._range.max - this._range.min; }\n /**\n * An array of visible panels from the current position\n * @ko 현재 보이는 패널들의 배열\n * @type {Panel[]}\n * @readonly\n */\n public get visiblePanels() { return this._visiblePanels; }\n /**\n * A range of the visible area from the current position\n * @ko 현재 위치에서 보이는 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} min A maximum position최대 위치\n * @readonly\n */\n public get visibleRange() { return { min: this._position - this._alignPos, max: this._position - this._alignPos + this.size }; }\n /**\n * An array of {@link AnchorPoint}s that Camera can be stopped at\n * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록\n * @type {AnchorPoint[]}\n * @readonly\n */\n public get anchorPoints() { return this._anchors; }\n /**\n * A current parameters of the Camera for updating {@link AxesController}\n * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들\n * @type {ControlParams}\n * @readonly\n */\n public get controlParams() { return { range: this._range, position: this._position, circular: this._circularEnabled }; }\n /**\n * A Boolean value indicating whether Camera's over the minimum or maximum position reachable\n * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다\n * @type {boolean}\n * @readonly\n */\n public get atEdge() { return this._position <= this._range.min || this._position >= this._range.max; }\n /**\n * Return the size of the viewport\n * @ko 뷰포트 크기를 반환합니다\n * @type {number}\n * @readonly\n */\n public get size() {\n const flicking = this._flicking;\n return flicking\n ? flicking.horizontal\n ? flicking.viewport.width\n : flicking.viewport.height\n : 0;\n }\n\n /**\n * Return the camera's position progress from the first panel to last panel\n * Range is from 0 to last panel's index\n * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다\n * 범위는 0부터 마지막 패널의 인덱스까지입니다\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n const position = this._position + this._offset;\n const nearestAnchor = this.findNearestAnchor(this._position);\n\n if (!flicking || !nearestAnchor) {\n return NaN;\n }\n\n const nearestPanel = nearestAnchor.panel;\n const panelPos = nearestPanel.position + nearestPanel.offset;\n const bounceSize = flicking.control.controller.bounce!;\n\n const { min: prevRange, max: nextRange } = this.range;\n const rangeDiff = this.rangeDiff;\n\n if (position === panelPos) {\n return nearestPanel.index;\n }\n\n if (position < panelPos) {\n const prevPanel = nearestPanel.prev();\n let prevPosition = prevPanel\n ? prevPanel.position + prevPanel.offset\n : prevRange - bounceSize[0];\n\n // Looped\n if (prevPosition > panelPos) {\n prevPosition -= rangeDiff;\n }\n\n return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos);\n } else {\n const nextPanel = nearestPanel.next();\n let nextPosition = nextPanel\n ? nextPanel.position + nextPanel.offset\n : nextRange + bounceSize[1];\n\n // Looped\n if (nextPosition < panelPos) {\n nextPosition += rangeDiff;\n }\n\n return nearestPanel.index + getProgress(position, panelPos, nextPosition);\n }\n }\n\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성\n * @type {string}\n * @readonly\n */\n public get panelOrder() { return this._panelOrder; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element\n * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n }\n\n /** */\n public constructor(flicking: Flicking, {\n align = ALIGN.CENTER\n }: Partial = {}) {\n this._flicking = flicking;\n this._resetInternalValues();\n\n // Options\n this._align = align;\n }\n\n /**\n * Initialize Camera\n * @ko Camera를 초기화합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우\n * @return {this}\n */\n public init(): this {\n const viewportEl = this._flicking.viewport.element;\n\n checkExistence(viewportEl.firstElementChild, \"First element child of the viewport element\");\n this._el = viewportEl.firstElementChild as HTMLElement;\n this._checkTranslateSupport();\n\n this._updateMode();\n this.updatePanelOrder();\n\n return this;\n }\n\n /**\n * Destroy Camera and return to initial state\n * @ko Camera를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): this {\n this._resetInternalValues();\n return this;\n }\n\n /**\n * Move to the given position and apply CSS transform\n * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다\n * @param {number} pos A new position움직일 위치\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public lookAt(pos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const prevPos = this._position;\n\n this._position = pos;\n const toggled = this._togglePanels(prevPos, pos);\n this._refreshVisiblePanels();\n this._checkNeedPanel();\n this._checkReachEnd(prevPos, pos);\n\n if (toggled) {\n void flicking.renderer.render().then(() => {\n this.updateOffset();\n });\n } else {\n this.applyTransform();\n }\n }\n\n /**\n * Return a previous {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint}\n */\n public getPrevAnchor(anchor: AnchorPoint): AnchorPoint | null {\n if (!this._circularEnabled || anchor.index !== 0) {\n return this._anchors[anchor.index - 1] || null;\n } else {\n const anchors = this._anchors;\n const rangeDiff = this.rangeDiff;\n const lastAnchor = anchors[anchors.length - 1];\n\n return new AnchorPoint({\n index: lastAnchor.index,\n position: lastAnchor.position - rangeDiff,\n panel: lastAnchor.panel\n });\n }\n }\n\n /**\n * Return a next {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint}\n */\n public getNextAnchor(anchor: AnchorPoint): AnchorPoint | null {\n const anchors = this._anchors;\n\n if (!this._circularEnabled || anchor.index !== anchors.length - 1) {\n return anchors[anchor.index + 1] || null;\n } else {\n const rangeDiff = this.rangeDiff;\n const firstAnchor = anchors[0];\n\n return new AnchorPoint({\n index: firstAnchor.index,\n position: firstAnchor.position + rangeDiff,\n panel: firstAnchor.panel\n });\n }\n }\n\n /**\n * Return the camera's position progress in the panel below\n * Value is from 0 to 1 when the camera's inside panel\n * Value can be lower than 0 or bigger than 1 when it's in the margin area\n * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다\n * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다\n * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다\n */\n public getProgressInPanel(panel: Panel) {\n const panelRange = panel.range;\n\n return (this._position - panelRange.min) / (panelRange.max - panelRange.min);\n }\n\n /**\n * Return {@link AnchorPoint} that includes given position\n * If there's no {@link AnchorPoint} that includes the given position, return `null` instead\n * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다\n * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint}\n */\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n return this._mode.findAnchorIncludePosition(position);\n }\n\n /**\n * Return {@link AnchorPoint} nearest to given position\n * If there're no {@link AnchorPoint}s, return `null` instead\n * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다\n * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint}\n */\n public findNearestAnchor(position: number): AnchorPoint | null {\n return this._mode.findNearestAnchor(position);\n }\n\n /**\n * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel}\n * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다\n * @return {AnchorPoint | null}\n */\n public findActiveAnchor(): AnchorPoint | null {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!activePanel) return null;\n\n return find(this._anchors, anchor => anchor.panel.index === activePanel.index) ?? this.findNearestAnchor(activePanel.position);\n }\n\n /**\n * Clamp the given position between camera's range\n * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다\n * @param {number} position A position to clamp범위를 제한할 좌표\n * @return {number} A clamped position범위 제한된 좌표\n */\n public clampToReachablePosition(position: number): number {\n return this._mode.clampToReachablePosition(position);\n }\n\n /**\n * Check whether the given panel is inside of the Camera's range\n * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부\n */\n public canReach(panel: Panel): boolean {\n return this._mode.canReach(panel);\n }\n\n /**\n * Check whether the given panel element is visible at the current position\n * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부\n */\n public canSee(panel: Panel): boolean {\n return this._mode.canSee(panel);\n }\n\n /**\n * Update {@link Camera#range range} of Camera\n * @ko Camera의 {@link Camera#range range}를 업데이트합니다\n * @method\n * @abstract\n * @memberof Camera\n * @instance\n * @name updateRange\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public updateRange() {\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n this._updateMode();\n this._range = this._mode.getRange();\n\n panels.forEach(panel => panel.updateCircularToggleDirection());\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#alignPosition alignPosition}\n * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateAlignPos(): this {\n const align = this._align;\n\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n this._alignPos = parseAlign(alignVal, this.size);\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#anchorPoints anchorPoints}\n * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAnchors(): this {\n this._anchors = this._mode.getAnchors();\n\n return this;\n }\n\n /**\n * Update Viewport's height to active panel's height\n * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAdaptiveHeight() {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;\n\n flicking.viewport.setSize({\n height: activePanel.height\n });\n }\n\n /**\n * Update current offset of the camera\n * @ko 현재 카메라의 오프셋을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateOffset(): this {\n const flicking = getFlickingAttached(this._flicking);\n const position = this._position;\n const unRenderedPanels = flicking.panels.filter(panel => !panel.rendered);\n\n this._offset = unRenderedPanels\n .filter(panel => panel.position + panel.offset < position)\n .reduce((offset, panel) => offset + panel.sizeIncludingMargin, 0);\n\n this._circularOffset = this._mode.getCircularOffset();\n\n this.applyTransform();\n\n return this;\n }\n\n /**\n * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element\n * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다\n * @return {this}\n */\n public updatePanelOrder(): this {\n const flicking = getFlickingAttached(this._flicking);\n\n if (!flicking.horizontal) return this;\n\n const el = this._el;\n const direction = getStyle(el).direction;\n if (direction !== this._panelOrder) {\n this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR;\n if (flicking.initialized) {\n flicking.control.controller.updateDirection();\n }\n }\n\n return this;\n }\n\n /**\n * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again\n * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다\n * @chainable\n * @return {this}\n */\n public resetNeedPanelHistory(): this {\n this._needPanelTriggered = { prev: false, next: false };\n return this;\n }\n\n /**\n * Apply \"transform\" style with the current position to camera element\n * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다.\n * @return {this}\n */\n public applyTransform(): this {\n const el = this._el;\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n\n if (renderer.rendering || !flicking.initialized) return this;\n\n const actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;\n\n el.style[this._transform] = flicking.horizontal\n ? `translate(${this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition}px)`\n : `translate(0, ${-actualPosition}px)`;\n\n return this;\n }\n\n private _resetInternalValues() {\n this._position = 0;\n this._alignPos = 0;\n this._offset = 0;\n this._circularOffset = 0;\n this._circularEnabled = false;\n this._range = { min: 0, max: 0 };\n this._visiblePanels = [];\n this._anchors = [];\n this._needPanelTriggered = { prev: false, next: false };\n }\n\n private _refreshVisiblePanels() {\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n const newVisiblePanels = panels.filter(panel => this.canSee(panel));\n const prevVisiblePanels = this._visiblePanels;\n this._visiblePanels = newVisiblePanels;\n\n const added: Panel[] = newVisiblePanels.filter(panel => !includes(prevVisiblePanels, panel));\n const removed: Panel[] = prevVisiblePanels.filter(panel => !includes(newVisiblePanels, panel));\n\n if (added.length > 0 || removed.length > 0) {\n void flicking.renderer.render().then(() => {\n flicking.trigger(new ComponentEvent(EVENTS.VISIBLE_CHANGE, {\n added,\n removed,\n visiblePanels: newVisiblePanels\n }));\n });\n }\n }\n\n private _checkNeedPanel(): void {\n const needPanelTriggered = this._needPanelTriggered;\n\n if (needPanelTriggered.prev && needPanelTriggered.next) return;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n if (!needPanelTriggered.prev) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n if (!needPanelTriggered.next) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n\n return;\n }\n\n const cameraPosition = this._position;\n const cameraSize = this.size;\n const cameraRange = this._range;\n const needPanelThreshold = flicking.needPanelThreshold;\n\n const cameraPrev = cameraPosition - this._alignPos;\n const cameraNext = cameraPrev + cameraSize;\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n\n if (!needPanelTriggered.prev) {\n const firstPanelPrev = firstPanel.range.min;\n\n if (cameraPrev <= (firstPanelPrev + needPanelThreshold) || cameraPosition <= (cameraRange.min + needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n }\n\n if (!needPanelTriggered.next) {\n const lastPanelNext = lastPanel.range.max;\n\n if (cameraNext >= (lastPanelNext - needPanelThreshold) || cameraPosition >= (cameraRange.max - needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n }\n }\n\n private _checkReachEnd(prevPos: number, newPos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const range = this._range;\n\n const wasBetweenRange = prevPos > range.min && prevPos < range.max;\n const isBetweenRange = newPos > range.min && newPos < range.max;\n\n if (!wasBetweenRange || isBetweenRange) return;\n\n const direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT;\n\n flicking.trigger(new ComponentEvent(EVENTS.REACH_EDGE, {\n direction\n }));\n }\n\n private _checkTranslateSupport = () => {\n const transforms = [\"webkitTransform\", \"msTransform\", \"MozTransform\", \"OTransform\", \"transform\"];\n\n const supportedStyle = document.documentElement.style;\n let transformName = \"\";\n for (const prefixedTransform of transforms) {\n if (prefixedTransform in supportedStyle) {\n transformName = prefixedTransform;\n }\n }\n\n if (!transformName) {\n throw new FlickingError(ERROR.MESSAGE.TRANSFORM_NOT_SUPPORTED, ERROR.CODE.TRANSFORM_NOT_SUPPORTED);\n }\n\n this._transform = transformName;\n };\n\n private _updateMode() {\n const flicking = getFlickingAttached(this._flicking);\n\n if (flicking.circular) {\n const circularMode = new CircularCameraMode(flicking);\n const canSetCircularMode = circularMode.checkAvailability();\n\n if (canSetCircularMode) {\n this._mode = circularMode;\n } else {\n const fallbackMode = flicking.circularFallback;\n\n this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n }\n\n this._circularEnabled = canSetCircularMode;\n } else {\n this._mode = flicking.bound\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n this._circularEnabled = false;\n }\n }\n\n private _togglePanels(prevPos: number, pos: number): boolean {\n if (pos === prevPos) return false;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n const toggled = panels.map(panel => panel.toggle(prevPos, pos));\n\n return toggled.some(isToggled => isToggled);\n }\n}\n\nexport default Camera;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\nimport ImReady from \"@egjs/imready\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { ALIGN, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached, getMinusCompensatedIndex, includes, parsePanelAlign } from \"../utils\";\n\nimport RenderingStrategy from \"./strategy/RenderingStrategy\";\n\nexport interface RendererOptions {\n align?: FlickingOptions[\"align\"];\n strategy: RenderingStrategy;\n}\n\n/**\n * A component that manages {@link Panel} and its elements\n * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트\n */\nabstract class Renderer {\n // Internal States\n protected _flicking: Flicking | null;\n protected _panels: Panel[];\n protected _rendering: boolean;\n\n // Options\n protected _align: NonNullable;\n protected _strategy: RendererOptions[\"strategy\"];\n\n // Internal states Getter\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._panels; }\n /**\n * A boolean value indicating whether rendering is in progress\n * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부\n * @type {boolean}\n * @readonly\n * @internal\n */\n public get rendering() { return this._rendering; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._panels.length; }\n /**\n * @internal\n */\n public get strategy() { return this._strategy; }\n\n // Options Getter\n /**\n * A {@link Panel}'s {@link Panel#align align} value that applied to all panels\n * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: NonNullable) {\n this._align = val;\n\n const panelAlign = parsePanelAlign(val);\n this._panels.forEach(panel => { panel.align = panelAlign; });\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {Constants.ALIGN | string | number} [options.align=\"center\"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값\n * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈)\n */\n public constructor({\n align = ALIGN.CENTER,\n strategy\n }: RendererOptions) {\n this._flicking = null;\n this._panels = [];\n this._rendering = false;\n\n // Bind options\n this._align = align;\n this._strategy = strategy;\n }\n\n /**\n * Render panel elements inside the camera element\n * @ko 패널 엘리먼트들을 카메라 엘리먼트 내부에 렌더링합니다\n * @method\n * @abstract\n * @memberof Renderer\n * @instance\n * @name render\n * @chainable\n * @return {this}\n */\n public abstract render(): Promise;\n\n protected abstract _collectPanels(): void;\n protected abstract _createPanel(el: any, options: Omit): Panel;\n\n /**\n * Initialize Renderer\n * @ko Renderer를 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._collectPanels();\n\n return this;\n }\n\n /**\n * Destroy Renderer and return to initial state\n * @ko Renderer를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._flicking = null;\n this._panels = [];\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n */\n public getPanel(index: number): Panel | null {\n return this._panels[index] || null;\n }\n\n public forceRenderAllPanels(): Promise {\n this._panels.forEach(panel => panel.markForShow());\n\n return Promise.resolve();\n }\n\n /**\n * Update all panel sizes\n * @ko 모든 패널의 크기를 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updatePanelSize(): this {\n const flicking = getFlickingAttached(this._flicking);\n const panels = this._panels;\n\n if (panels.length <= 0) return this;\n\n if (flicking.panelsPerView > 0) {\n const firstPanel = panels[0];\n firstPanel.resize();\n\n this._updatePanelSizeByGrid(firstPanel, panels);\n } else {\n flicking.panels.forEach(panel => panel.resize());\n }\n\n return this;\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {Array} items An array of items to insert추가할 아이템들의 배열\n * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열\n * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n */\n public batchInsert(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsInserted = this.batchInsertDefer(...items);\n\n if (allPanelsInserted.length <= 0) return [];\n\n this.updateAfterPanelChange(allPanelsInserted, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchInsertDefer(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const prevFirstPanel = panels[0];\n const align = parsePanelAlign(this._align);\n\n const allPanelsInserted = items.reduce((addedPanels, item) => {\n const insertingIdx = getMinusCompensatedIndex(item.index, panels.length);\n const panelsPushed = panels.slice(insertingIdx);\n const panelsInserted = item.elements.map((el, idx) => this._createPanel(el, { index: insertingIdx + idx, align, flicking }));\n\n panels.splice(insertingIdx, 0, ...panelsInserted);\n\n if (item.hasDOMInElements) {\n // Insert the actual elements as camera element's children\n this._insertPanelElements(panelsInserted, panelsPushed[0] ?? null);\n }\n\n // Resize the newly added panels\n if (flicking.panelsPerView > 0) {\n const firstPanel = prevFirstPanel || panelsInserted[0].resize();\n\n this._updatePanelSizeByGrid(firstPanel, panelsInserted);\n } else {\n panelsInserted.forEach(panel => panel.resize());\n }\n\n // Update panel indexes & positions\n panelsPushed.forEach(panel => {\n panel.increaseIndex(panelsInserted.length);\n panel.updatePosition();\n });\n\n return [...addedPanels, ...panelsInserted];\n }, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {Array} items An array of items to remove제거할 아이템들의 배열\n * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스\n * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다\n * @return An array of removed panels제거된 패널들의 배열\n */\n public batchRemove(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsRemoved = this.batchRemoveDefer(...items);\n\n if (allPanelsRemoved.length <= 0) return [];\n\n this.updateAfterPanelChange([], allPanelsRemoved);\n\n return allPanelsRemoved;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchRemoveDefer(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const { control } = flicking;\n const activePanel = control.activePanel;\n\n const allPanelsRemoved = items.reduce((removed, item) => {\n const { index, deleteCount } = item;\n const removingIdx = getMinusCompensatedIndex(index, panels.length);\n\n const panelsPulled = panels.slice(removingIdx + deleteCount);\n const panelsRemoved = panels.splice(removingIdx, deleteCount);\n\n if (panelsRemoved.length <= 0) return [];\n\n // Update panel indexes & positions\n panelsPulled.forEach(panel => {\n panel.decreaseIndex(panelsRemoved.length);\n panel.updatePosition();\n });\n\n if (item.hasDOMInElements) {\n this._removePanelElements(panelsRemoved);\n }\n\n // Remove panel elements\n panelsRemoved.forEach(panel => panel.destroy());\n\n if (includes(panelsRemoved, activePanel)) {\n control.resetActive();\n }\n\n return [...removed, ...panelsRemoved];\n }, []);\n\n return allPanelsRemoved;\n }\n\n /**\n * @internal\n */\n public updateAfterPanelChange(panelsAdded: Panel[], panelsRemoved: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n const panels = this._panels;\n const activePanel = control.activePanel;\n\n // Update camera & control\n this._updateCameraAndControl();\n\n void this.render();\n\n if (!flicking.animating) {\n if (!activePanel || activePanel.removed) {\n if (panels.length <= 0) {\n // All panels removed\n camera.lookAt(0);\n } else {\n let targetIndex = activePanel?.index ?? 0;\n if (targetIndex > panels.length - 1) {\n targetIndex = panels.length - 1;\n }\n\n void control.moveToPanel(panels[targetIndex], {\n duration: 0\n }).catch(() => void 0);\n }\n } else {\n void control.moveToPanel(activePanel, {\n duration: 0\n }).catch(() => void 0);\n }\n }\n\n flicking.camera.updateOffset();\n\n if (panelsAdded.length > 0 || panelsRemoved.length > 0) {\n flicking.trigger(new ComponentEvent(EVENTS.PANEL_CHANGE, {\n added: panelsAdded,\n removed: panelsRemoved\n }));\n\n this.checkPanelContentsReady([\n ...panelsAdded,\n ...panelsRemoved\n ]);\n }\n }\n\n /**\n * @internal\n */\n public checkPanelContentsReady(checkingPanels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const resizeOnContentsReady = flicking.resizeOnContentsReady;\n const panels = this._panels;\n\n if (!resizeOnContentsReady || flicking.virtualEnabled) return;\n\n const hasContents = (panel: Panel) => panel.element && !!panel.element.querySelector(\"img, video\");\n checkingPanels = checkingPanels.filter(panel => hasContents(panel));\n\n if (checkingPanels.length <= 0) return;\n\n const contentsReadyChecker = new ImReady();\n\n checkingPanels.forEach(panel => {\n panel.loading = true;\n });\n\n contentsReadyChecker.on(\"readyElement\", e => {\n if (!this._flicking) {\n // Renderer's destroy() is called before\n contentsReadyChecker.destroy();\n return;\n }\n\n const panel = checkingPanels[e.index];\n const camera = flicking.camera;\n const control = flicking.control;\n const prevProgressInPanel = control.activePanel\n ? camera.getProgressInPanel(control.activePanel)\n : 0;\n\n panel.loading = false;\n panel.resize();\n panels.slice(panel.index + 1).forEach(panelBehind => panelBehind.updatePosition());\n\n if (!flicking.initialized) return;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n\n if (control.animating) {\n // TODO: Need Axes update\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n });\n\n contentsReadyChecker.on(\"preReady\", e => {\n if (this._flicking) {\n void this.render();\n }\n\n if (e.readyCount === e.totalCount) {\n contentsReadyChecker.destroy();\n }\n });\n\n contentsReadyChecker.on(\"ready\", () => {\n if (this._flicking) {\n void this.render();\n }\n contentsReadyChecker.destroy();\n });\n\n contentsReadyChecker.check(checkingPanels.map(panel => panel.element));\n }\n\n protected _updateCameraAndControl() {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n camera.resetNeedPanelHistory();\n control.updateInput();\n }\n\n protected _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n }\n\n protected _updatePanelSizeByGrid(referencePanel: Panel, panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const panelsPerView = flicking.panelsPerView;\n\n if (panelsPerView <= 0) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"panelsPerView\", panelsPerView), ERROR.CODE.WRONG_OPTION);\n }\n if (panels.length <= 0) return;\n\n const viewportSize = flicking.camera.size;\n const gap = referencePanel.margin.prev + referencePanel.margin.next;\n\n const panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView;\n const panelSizeObj = flicking.horizontal\n ? { width: panelSize }\n : { height: panelSize };\n const firstPanelSizeObj = {\n size: panelSize,\n margin: referencePanel.margin,\n ...(!flicking.horizontal && { height: referencePanel.height})\n };\n\n if (!flicking.noPanelStyleOverride) {\n this._strategy.updatePanelSizes(flicking, panelSizeObj);\n }\n\n flicking.panels.forEach(panel => panel.resize(firstPanelSizeObj));\n }\n\n protected _removeAllChildsFromCamera() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove other elements\n while (cameraElement.firstChild) {\n cameraElement.removeChild(cameraElement.firstChild);\n }\n }\n\n protected _insertPanelElements(panels: Panel[], nextSibling: Panel | null = null) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const cameraElement = camera.element;\n const nextSiblingElement = nextSibling?.element || null;\n const fragment = document.createDocumentFragment();\n\n panels.forEach(panel => fragment.appendChild(panel.element));\n cameraElement.insertBefore(fragment, nextSiblingElement);\n }\n\n protected _removePanelElements(panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n panels.forEach(panel => {\n cameraElement.removeChild(panel.element);\n });\n }\n\n protected _afterRender() {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.applyTransform();\n }\n}\n\nexport default Renderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { getFlickingAttached, toArray } from \"../utils\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n *\n */\nclass VanillaRenderer extends Renderer {\n // eslint-disable-next-line @typescript-eslint/require-await\n public async render() {\n const flicking = getFlickingAttached(this._flicking);\n const strategy = this._strategy;\n\n strategy.updateRenderingPanels(flicking);\n strategy.renderPanels(flicking);\n\n this._resetPanelElementOrder();\n this._afterRender();\n }\n\n protected _collectPanels() {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._removeAllTextNodes();\n this._panels = this._strategy.collectPanels(flicking, camera.children);\n }\n\n protected _createPanel(el: HTMLElement, options: Omit): Panel {\n return this._strategy.createPanel(el, options);\n }\n\n private _resetPanelElementOrder() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraEl = flicking.camera.element;\n\n // We're using reversed panels here as last panel should be the last element of camera element\n const reversedElements = this._strategy\n .getRenderingElementsByOrder(flicking)\n .reverse();\n\n reversedElements.forEach((el, idx) => {\n const nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null;\n\n if (el.nextElementSibling !== nextEl) {\n cameraEl.insertBefore(el, nextEl);\n }\n });\n }\n\n private _removeAllTextNodes() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove all text nodes in the camera element\n toArray(cameraElement.childNodes).forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n cameraElement.removeChild(node);\n }\n });\n }\n}\n\nexport default VanillaRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n * @internal\n */\nabstract class ExternalRenderer extends Renderer {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n protected _removePanelElements(panels: Panel[]): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n\n protected _removeAllChildsFromCamera(): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n /* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\nexport default ExternalRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { getElementSize, getProgress, getStyle, parseAlign, setSize } from \"../../utils\";\nimport { ALIGN, DIRECTION } from \"../../const/external\";\nimport { LiteralUnion, ValueOf } from \"../../type/internal\";\n\nimport ElementProvider from \"./provider/ElementProvider\";\n\nexport interface PanelOptions {\n index: number;\n align: LiteralUnion> | number;\n flicking: Flicking;\n elementProvider: ElementProvider;\n}\n\n/**\n * A slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass Panel {\n // Internal States\n protected _flicking: Flicking;\n protected _elProvider: ElementProvider;\n protected _index: number;\n protected _pos: number;\n protected _size: number;\n protected _height: number;\n protected _margin: { prev: number; next: number };\n protected _alignPos: number; // Actual align pos\n protected _rendered: boolean;\n protected _removed: boolean;\n protected _loading: boolean;\n protected _toggleDirection: ValueOf;\n protected _toggled: boolean;\n protected _togglePosition: number;\n\n // Options\n protected _align: PanelOptions[\"align\"];\n\n // Internal States Getter\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n /**\n * @internal\n * @readonly\n */\n public get elementProvider() { return this._elProvider; }\n /**\n * Index of the panel\n * @ko 패널의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of the panel, including {@link Panel#alignPosition alignPosition}\n * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos + this._alignPos; }\n /**\n * Cached size of the panel element\n * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else\n * @ko 패널 엘리먼트의 캐시된 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다\n * @type {number}\n * @readonly\n */\n public get size() { return this._size; }\n /**\n * Panel's size including CSS `margin`\n * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else\n * @ko CSS `margin`을 포함한 패널의 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다\n * @type {number}\n * @readonly\n */\n public get sizeIncludingMargin() { return this._size + this._margin.prev + this._margin.next; }\n /**\n * Height of the panel element\n * @ko 패널 엘리먼트의 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height; }\n /**\n * Cached CSS `margin` value of the panel element\n * @ko 패널 엘리먼트의 CSS `margin` 값\n * @type {object}\n * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값\n * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값\n * @readonly\n */\n public get margin() { return this._margin; }\n /**\n * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at\n * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * A value indicating whether the panel's {@link Flicking#remove remove}d\n * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get removed() { return this._removed; }\n /**\n * A value indicating whether the panel's element is being rendered on the screen\n * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get rendered() { return this._rendered; }\n /**\n * A value indicating whether the panel's image/video is not loaded and waiting for resize\n * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get loading() { return this._loading; }\n /**\n * Panel element's range of the bounding box\n * @ko 패널 엘리먼트의 Bounding box 범위\n * @type {object}\n * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false)\n * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false)\n * @readonly\n */\n public get range() { return { min: this._pos, max: this._pos + this._size }; }\n /**\n * A value indicating whether the panel's position is toggled by circular behavior\n * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get toggled() { return this._toggled; }\n /**\n * A direction where the panel's position is toggled\n * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향\n * @type {DIRECTION}\n * @readonly\n */\n public get toggleDirection() { return this._toggleDirection; }\n /**\n * Actual position offset determined by {@link Panel#order}\n * @ko {@link Panel#order}에 의한 실제 위치 변경값\n * @type {number}\n * @readonly\n */\n public get offset() {\n const toggleDirection = this._toggleDirection;\n const cameraRangeDiff = this._flicking.camera.rangeDiff;\n\n return toggleDirection === DIRECTION.NONE || !this._toggled\n ? 0\n : toggleDirection === DIRECTION.PREV\n ? -cameraRangeDiff\n : cameraRangeDiff;\n }\n\n /**\n * Progress of movement between previous or next panel relative to current panel\n * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n\n return this.index - flicking.camera.progress;\n }\n\n /**\n * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1)\n * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1)\n * @type {number}\n * @readonly\n */\n public get outsetProgress() {\n const position = this.position + this.offset;\n const alignPosition = this._alignPos;\n const camera = this._flicking.camera;\n const camPos = camera.position;\n\n if (camPos === position) {\n return 0;\n }\n\n if (camPos < position) {\n const disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition;\n\n return -getProgress(camPos, position, disappearPosNext);\n } else {\n const disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition);\n\n return 1 - getProgress(camPos, disappearPosPrev, position);\n }\n }\n\n /**\n * Percentage of area where panel is visible in the viewport\n * @ko 뷰포트 안에서 패널이 보이는 영역의 비율\n * @type {number}\n * @readonly\n */\n public get visibleRatio() {\n const range = this.range;\n const size = this._size;\n const offset = this.offset;\n const visibleRange = this._flicking.camera.visibleRange;\n\n const checkingRange = {\n min: range.min + offset,\n max: range.max + offset\n };\n\n if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) {\n return 0;\n }\n\n let visibleSize = size;\n\n if (visibleRange.min > checkingRange.min) {\n visibleSize -= visibleRange.min - checkingRange.min;\n }\n if (visibleRange.max < checkingRange.max) {\n visibleSize -= checkingRange.max - visibleRange.max;\n }\n\n return visibleSize / size;\n }\n\n public set loading(val: boolean) { this._loading = val; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element\n * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: PanelOptions[\"align\"]) {\n this._align = val;\n this._updateAlignPos();\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스\n */\n public constructor({\n index,\n align,\n flicking,\n elementProvider\n }: PanelOptions) {\n this._index = index;\n this._flicking = flicking;\n this._elProvider = elementProvider;\n\n this._align = align;\n\n this._removed = false;\n this._rendered = true;\n this._loading = false;\n this._resetInternalStates();\n }\n\n /**\n * Mark panel element to be appended on the camera element\n * @internal\n */\n public markForShow() {\n this._rendered = true;\n this._elProvider.show(this._flicking);\n }\n\n /**\n * Mark panel element to be removed from the camera element\n * @internal\n */\n public markForHide() {\n this._rendered = false;\n this._elProvider.hide(this._flicking);\n }\n\n /**\n * Update size of the panel\n * @ko 패널의 크기를 갱신합니다\n * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보\n * @chainable\n * @return {this}\n */\n public resize(cached?: {\n size: number;\n height?: number;\n margin: { prev: number; next: number };\n }): this {\n const el = this.element;\n const flicking = this._flicking;\n const {\n horizontal,\n useFractionalSize\n } = flicking;\n\n if (cached) {\n this._size = cached.size;\n this._margin = { ...cached.margin };\n this._height = cached.height ?? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: getStyle(el)\n });\n } else {\n const elStyle = getStyle(el);\n\n this._size = getElementSize({\n el,\n horizontal,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n });\n\n this._margin = horizontal\n ? {\n prev: parseFloat(elStyle.marginLeft || \"0\"),\n next: parseFloat(elStyle.marginRight || \"0\")\n } : {\n prev: parseFloat(elStyle.marginTop || \"0\"),\n next: parseFloat(elStyle.marginBottom || \"0\")\n };\n\n this._height = horizontal\n ? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n })\n : this._size;\n }\n\n this.updatePosition();\n this._updateAlignPos();\n\n return this;\n }\n\n /**\n * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property\n * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New panel size새 패널 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @chainable\n * @return {this}\n */\n public setSize(size: Partial<{\n width: number | string;\n height: number | string;\n }>): this {\n setSize(this.element, size);\n\n return this;\n }\n\n /**\n * Check whether the given element is inside of this panel's {@link Panel#element element}\n * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다\n * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement\n * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부\n */\n public contains(element: HTMLElement): boolean {\n return !!this.element?.contains(element);\n }\n\n /**\n * Reset internal state and set {@link Panel#removed removed} to `true`\n * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다.\n * @return {void}\n */\n public destroy(): void {\n this._resetInternalStates();\n this._removed = true;\n }\n\n /**\n * Check whether the given position is inside of this panel's {@link Panel#range range}\n * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다.\n * @param {number} pos A position to check확인하고자 하는 좌표\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부\n */\n public includePosition(pos: number, includeMargin: boolean = false): boolean {\n return this.includeRange(pos, pos, includeMargin);\n }\n\n /**\n * Check whether the given range is fully included in this panel's area (inclusive)\n * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부\n */\n public includeRange(min: number, max: number, includeMargin: boolean = false): boolean {\n const margin = this._margin;\n const panelRange = this.range;\n\n if (includeMargin) {\n panelRange.min -= margin.prev;\n panelRange.max += margin.next;\n }\n\n return max >= panelRange.min && min <= panelRange.max;\n }\n\n /**\n * Check whether the panel is visble in the given range (exclusive)\n * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부\n */\n public isVisibleOnRange(min: number, max: number): boolean {\n const panelRange = this.range;\n\n return max > panelRange.min && min < panelRange.max;\n }\n\n /**\n * Move {@link Camera} to this panel\n * @ko {@link Camera}를 이 패널로 이동합니다\n * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise\n */\n public focus(duration?: number) {\n return this._flicking.moveTo(this._index, duration);\n }\n\n /**\n * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel\n * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다\n * @returns {Panel | null} The previous panel이전 패널\n */\n public prev(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1)\n : renderer.getPanel(index - 1);\n }\n\n /**\n * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel\n * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다\n * @returns {Panel | null} The previous panel다음 패널\n */\n public next(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1)\n : renderer.getPanel(index + 1);\n }\n\n /**\n * Increase panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public increaseIndex(val: number): this {\n this._index += Math.max(val, 0);\n return this;\n }\n\n /**\n * Decrease panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public decreaseIndex(val: number): this {\n this._index -= Math.max(val, 0);\n return this;\n }\n\n /**\n * @internal\n */\n public updatePosition(): this {\n const prevPanel = this._flicking.renderer.panels[this._index - 1];\n\n this._pos = prevPanel\n ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev\n : this._margin.prev;\n\n return this;\n }\n\n /**\n * @internal\n * @return {boolean} toggled\n */\n public toggle(prevPos: number, newPos: number): boolean {\n const toggleDirection = this._toggleDirection;\n const togglePosition = this._togglePosition;\n\n if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false;\n\n const prevToggled = this._toggled;\n\n if (newPos > prevPos) {\n if (togglePosition >= prevPos && togglePosition <= newPos) {\n this._toggled = toggleDirection === DIRECTION.NEXT;\n }\n } else {\n if (togglePosition <= prevPos && togglePosition >= newPos) {\n this._toggled = toggleDirection !== DIRECTION.NEXT;\n }\n }\n\n return prevToggled !== this._toggled;\n }\n\n /**\n * @internal\n */\n public updateCircularToggleDirection(): this {\n const flicking = this._flicking;\n\n if (!flicking.circularEnabled) {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n this._toggled = false;\n return this;\n }\n\n const camera = flicking.camera;\n const camRange = camera.range;\n const camAlignPosition = camera.alignPosition;\n const camVisibleRange = camera.visibleRange;\n const camVisibleSize = camVisibleRange.max - camVisibleRange.min;\n\n const minimumVisible = camRange.min - camAlignPosition;\n const maximumVisible = camRange.max - camAlignPosition + camVisibleSize;\n\n const shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false);\n const shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false);\n\n this._toggled = false;\n if (shouldBeVisibleAtMin) {\n this._toggleDirection = DIRECTION.PREV;\n this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition;\n this.toggle(Infinity, camera.position);\n } else if (shouldBeVisibleAtMax) {\n this._toggleDirection = DIRECTION.NEXT;\n this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition;\n this.toggle(-Infinity, camera.position);\n } else {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n }\n\n return this;\n }\n\n private _updateAlignPos() {\n this._alignPos = parseAlign(this._align, this._size);\n }\n\n private _resetInternalStates() {\n this._size = 0;\n this._pos = 0;\n this._margin = { prev: 0, next: 0 };\n this._height = 0;\n this._alignPos = 0;\n this._toggled = false;\n this._togglePosition = 0;\n this._toggleDirection = DIRECTION.NONE;\n }\n}\n\nexport default Panel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel, { PanelOptions } from \"../../core/panel/Panel\";\nimport ElementProvider from \"../../core/panel/provider/ElementProvider\";\nimport { DIRECTION } from \"../../const/external\";\nimport { parsePanelAlign } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nexport interface NormalRenderingStrategyOptions {\n providerCtor: new (...args: any) => ElementProvider;\n}\n\n\nclass NormalRenderingStrategy implements RenderingStrategy {\n private _providerCtor: NormalRenderingStrategyOptions[\"providerCtor\"];\n\n public constructor({ providerCtor }: NormalRenderingStrategyOptions) {\n this._providerCtor = providerCtor;\n }\n\n public renderPanels() {\n // DO_NOTHING\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const renderedPanels = flicking.renderer.panels.filter(panel => panel.rendered);\n const toggledPrev = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.NEXT);\n const notToggled = renderedPanels.filter(panel => !panel.toggled);\n\n return [...toggledPrev, ...notToggled, ...toggledNext].map(panel => panel.index);\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const panels = flicking.panels;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => panels[index].element);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n if (flicking.renderOnlyVisible) {\n this._showOnlyVisiblePanels(flicking);\n } else {\n flicking.panels.forEach(panel => panel.markForShow());\n }\n }\n\n public collectPanels(\n flicking: Flicking,\n elements: any[]\n ) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return elements.map((el, index) => new Panel({\n index,\n elementProvider: new this._providerCtor(el),\n align,\n flicking\n }));\n }\n\n public createPanel(\n element: any,\n options: Omit\n ) {\n return new Panel({\n ...options,\n elementProvider: new this._providerCtor(element)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n\n private _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n}\n\nexport default NormalRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { DIRECTION } from \"../../const/external\";\nimport { circulateIndex } from \"../../utils\";\n\nimport Panel, { PanelOptions } from \"./Panel\";\nimport VirtualElementProvider from \"./provider/VirtualElementProvider\";\n\ninterface VirtualPanelOptions extends PanelOptions {\n elementProvider: VirtualElementProvider;\n}\n\n/**\n * An slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass VirtualPanel extends Panel {\n protected _elProvider: VirtualElementProvider;\n protected _cachedInnerHTML: string | null;\n\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n\n /**\n * Cached innerHTML by the previous render function\n * @ko 이전 렌더링에서 캐시된 innerHTML 정보\n * @type {string|null}\n * @readonly\n */\n public get cachedInnerHTML() { return this._cachedInnerHTML; }\n\n /**\n * An number for indexing which element it will be rendered on\n * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자\n * @type {number}\n * @readonly\n */\n public get elementIndex() {\n const flicking = this._flicking;\n const virtualElCount = flicking.panelsPerView + 1;\n const panelCount = flicking.panelCount;\n let index = this._index;\n\n if (this._toggled) {\n // To prevent element duplication\n index = this._toggleDirection === DIRECTION.NEXT\n ? index + panelCount\n : index - panelCount;\n }\n\n return circulateIndex(index, virtualElCount);\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n */\n public constructor(options: VirtualPanelOptions) {\n super(options);\n\n options.elementProvider.init(this);\n this._elProvider = options.elementProvider;\n this._cachedInnerHTML = null;\n }\n\n public cacheRenderResult(result: string) {\n this._cachedInnerHTML = result;\n }\n\n public uncacheRenderResult() {\n this._cachedInnerHTML = null;\n }\n\n public render() {\n const flicking = this._flicking;\n const { renderPanel, cache } = flicking.virtual;\n\n const element = this._elProvider.element;\n const newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index);\n\n if (newInnerHTML === element.innerHTML) return;\n\n element.innerHTML = newInnerHTML;\n\n if (cache) {\n this.cacheRenderResult(newInnerHTML);\n }\n }\n\n public increaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.increaseIndex(val);\n }\n\n public decreaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.decreaseIndex(val);\n }\n}\n\nexport default VirtualPanel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { PanelOptions } from \"../../core/panel/Panel\";\nimport VirtualPanel from \"../../core/panel/VirtualPanel\";\nimport VirtualElementProvider from \"../../core/panel/provider/VirtualElementProvider\";\nimport { parsePanelAlign, range, setSize } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nclass VirtualRenderingStrategy implements RenderingStrategy {\n public renderPanels(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = flicking.visiblePanels as VirtualPanel[];\n const invisibleIndexes = range(flicking.panelsPerView + 1);\n\n visiblePanels.forEach(panel => {\n const elementIndex = panel.elementIndex;\n\n panel.render();\n\n virtualManager.show(elementIndex);\n invisibleIndexes[elementIndex] = -1;\n });\n\n invisibleIndexes\n .filter(val => val >= 0)\n .forEach(idx => {\n virtualManager.hide(idx);\n });\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = [...flicking.visiblePanels]\n .filter(panel => panel.rendered)\n .sort((panel1, panel2) => {\n return (panel1.position + panel1.offset) - (panel2.position + panel2.offset);\n }) as VirtualPanel[];\n\n if (visiblePanels.length <= 0) return virtualManager.elements.map((_, idx) => idx);\n\n const visibleIndexes = visiblePanels.map(panel => panel.elementIndex);\n const invisibleIndexes = virtualManager.elements\n .map((el, idx) => ({ ...el, idx }))\n .filter(el => !el.visible)\n .map(el => el.idx);\n\n return [...visibleIndexes, ...invisibleIndexes];\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const elements = virtualManager.elements;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => elements[index].nativeElement);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else {\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n\n public collectPanels(flicking: Flicking) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return range(flicking.virtual.initialPanelCount).map(index => new VirtualPanel({\n index,\n elementProvider: new VirtualElementProvider(flicking),\n align,\n flicking\n }));\n }\n\n public createPanel(_el: any, options: PanelOptions) {\n return new VirtualPanel({\n ...options,\n elementProvider: new VirtualElementProvider(options.flicking)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.virtual.elements.forEach(el => {\n setSize(el.nativeElement, size);\n });\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n}\n\nexport default VirtualRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Component, { ComponentEvent } from \"@egjs/component\";\n\nimport FlickingError from \"./core/FlickingError\";\nimport Viewport from \"./core/Viewport\";\nimport AutoResizer from \"./core/AutoResizer\";\nimport { Panel } from \"./core/panel\";\nimport { VanillaElementProvider } from \"./core/panel/provider\";\nimport VirtualManager, { VirtualOptions } from \"./core/VirtualManager\";\nimport { Control, SnapControl, SnapControlOptions, FreeControl, StrictControl, FreeControlOptions, StrictControlOptions } from \"./control\";\nimport { Camera } from \"./camera\";\nimport { Renderer, VanillaRenderer, ExternalRenderer, RendererOptions, NormalRenderingStrategy, VirtualRenderingStrategy } from \"./renderer\";\nimport { EVENTS, ALIGN, MOVE_TYPE, DIRECTION, CIRCULAR_FALLBACK } from \"./const/external\";\nimport * as ERROR from \"./const/error\";\nimport { findIndex, getElement, includes, parseElement } from \"./utils\";\nimport { HoldStartEvent, HoldEndEvent, MoveStartEvent, SelectEvent, MoveEvent, MoveEndEvent, WillChangeEvent, WillRestoreEvent, NeedPanelEvent, VisibleChangeEvent, ReachEdgeEvent, ReadyEvent, AfterResizeEvent, BeforeResizeEvent, ChangedEvent, RestoredEvent, PanelChangeEvent } from \"./type/event\";\nimport { LiteralUnion, ValueOf } from \"./type/internal\";\nimport { ElementLike, Plugin, Status, MoveTypeOptions } from \"./type/external\";\n\n/**\n * @interface\n */\nexport interface FlickingEvents {\n [EVENTS.READY]: ReadyEvent;\n [EVENTS.BEFORE_RESIZE]: BeforeResizeEvent;\n [EVENTS.AFTER_RESIZE]: AfterResizeEvent;\n [EVENTS.HOLD_START]: HoldStartEvent;\n [EVENTS.HOLD_END]: HoldEndEvent;\n [EVENTS.MOVE_START]: MoveStartEvent;\n [EVENTS.MOVE]: MoveEvent;\n [EVENTS.MOVE_END]: MoveEndEvent;\n [EVENTS.WILL_CHANGE]: WillChangeEvent;\n [EVENTS.CHANGED]: ChangedEvent;\n [EVENTS.WILL_RESTORE]: WillRestoreEvent;\n [EVENTS.RESTORED]: RestoredEvent;\n [EVENTS.SELECT]: SelectEvent;\n [EVENTS.NEED_PANEL]: NeedPanelEvent;\n [EVENTS.VISIBLE_CHANGE]: VisibleChangeEvent;\n [EVENTS.REACH_EDGE]: ReachEdgeEvent;\n [EVENTS.PANEL_CHANGE]: PanelChangeEvent;\n}\n\n/**\n * @interface\n */\nexport interface FlickingOptions {\n // UI / LAYOUT\n align: LiteralUnion> | number | { panel: number | string; camera: number | string };\n defaultIndex: number;\n horizontal: boolean;\n circular: boolean;\n circularFallback: LiteralUnion>;\n bound: boolean;\n adaptive: boolean;\n panelsPerView: number;\n noPanelStyleOverride: boolean;\n resizeOnContentsReady: boolean;\n nested: boolean;\n\n // EVENT\n needPanelThreshold: number;\n preventEventsBeforeInit: boolean;\n\n // ANIMATION\n deceleration: number;\n duration: number;\n easing: (x: number) => number;\n\n // INPUT\n inputType: string[];\n moveType: ValueOf | MoveTypeOptions>;\n threshold: number;\n interruptable: boolean;\n bounce: number | string | [number | string, number | string];\n iOSEdgeSwipeThreshold: number;\n preventClickOnDrag: boolean;\n preventDefaultOnDrag: boolean;\n disableOnInit: boolean;\n changeOnHold: boolean;\n\n // PERFORMANCE\n renderOnlyVisible: boolean;\n virtual: VirtualOptions | null;\n\n // OTHERS\n autoInit: boolean;\n autoResize: boolean;\n useResizeObserver: boolean;\n resizeDebounce: number;\n maxResizeDebounce: number;\n useFractionalSize: boolean;\n externalRenderer: ExternalRenderer | null;\n\n // @deprecated\n renderExternal: {\n renderer: new (options: RendererOptions) => ExternalRenderer;\n rendererOptions: RendererOptions;\n } | null;\n}\n\n/**\n * @extends Component\n * @support {\"ie\": \"9+(with polyfill)\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"4.X+\"}\n * @requires {@link https://github.com/naver/egjs-component|@egjs/component}\n * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}\n */\nclass Flicking extends Component {\n /**\n * Version info string\n * @ko 버전정보 문자열\n * @type {string}\n * @readonly\n * @example\n * ```ts\n * Flicking.VERSION; // ex) 4.0.0\n * ```\n */\n public static VERSION = \"#__VERSION__#\";\n\n // Core components\n private _viewport: Viewport;\n private _autoResizer: AutoResizer;\n private _camera: Camera;\n private _control: Control;\n private _renderer: Renderer;\n private _virtualManager: VirtualManager;\n\n // Options\n private _align: FlickingOptions[\"align\"];\n private _defaultIndex: FlickingOptions[\"defaultIndex\"];\n private _horizontal: FlickingOptions[\"horizontal\"];\n private _circular: FlickingOptions[\"circular\"];\n private _circularFallback: FlickingOptions[\"circularFallback\"];\n private _bound: FlickingOptions[\"bound\"];\n private _adaptive: FlickingOptions[\"adaptive\"];\n private _panelsPerView: FlickingOptions[\"panelsPerView\"];\n private _noPanelStyleOverride: FlickingOptions[\"noPanelStyleOverride\"];\n private _resizeOnContentsReady: FlickingOptions[\"resizeOnContentsReady\"];\n private _virtual: FlickingOptions[\"virtual\"];\n private _nested: FlickingOptions[\"nested\"];\n\n private _needPanelThreshold: FlickingOptions[\"needPanelThreshold\"];\n private _preventEventsBeforeInit: FlickingOptions[\"preventEventsBeforeInit\"];\n\n private _deceleration: FlickingOptions[\"deceleration\"];\n private _duration: FlickingOptions[\"duration\"];\n private _easing: FlickingOptions[\"easing\"];\n\n private _inputType: FlickingOptions[\"inputType\"];\n private _moveType: FlickingOptions[\"moveType\"];\n private _threshold: FlickingOptions[\"threshold\"];\n private _interruptable: FlickingOptions[\"interruptable\"];\n private _bounce: FlickingOptions[\"bounce\"];\n private _iOSEdgeSwipeThreshold: FlickingOptions[\"iOSEdgeSwipeThreshold\"];\n private _preventClickOnDrag: FlickingOptions[\"preventClickOnDrag\"];\n private _preventDefaultOnDrag: FlickingOptions[\"preventDefaultOnDrag\"];\n private _disableOnInit: FlickingOptions[\"disableOnInit\"];\n private _changeOnHold: FlickingOptions[\"changeOnHold\"];\n\n private _renderOnlyVisible: FlickingOptions[\"renderOnlyVisible\"];\n\n private _autoInit: FlickingOptions[\"autoInit\"];\n private _autoResize: FlickingOptions[\"autoResize\"];\n private _useResizeObserver: FlickingOptions[\"useResizeObserver\"];\n private _resizeDebounce: FlickingOptions[\"resizeDebounce\"];\n private _maxResizeDebounce: FlickingOptions[\"maxResizeDebounce\"];\n private _useFractionalSize: FlickingOptions[\"useFractionalSize\"];\n private _externalRenderer: FlickingOptions[\"externalRenderer\"];\n private _renderExternal: FlickingOptions[\"renderExternal\"];\n\n // Internal State\n private _initialized: boolean;\n private _plugins: Plugin[];\n\n // Components\n /**\n * {@link Control} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스\n * @type {Control}\n * @default SnapControl\n * @readonly\n * @see Control\n * @see SnapControl\n * @see FreeControl\n */\n public get control() { return this._control; }\n /**\n * {@link Camera} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스\n * @type {Camera}\n * @default LinearCamera\n * @readonly\n * @see Camera\n * @see LinearCamera\n * @see BoundCamera\n * @see CircularCamera\n */\n public get camera() { return this._camera; }\n /**\n * {@link Renderer} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스\n * @type {Renderer}\n * @default VanillaRenderer\n * @readonly\n * @see Renderer\n * @see VanillaRenderer\n * @see ExternalRenderer\n */\n public get renderer() { return this._renderer; }\n /**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n * @type {Viewport}\n * @readonly\n * @see Viewport\n */\n public get viewport() { return this._viewport; }\n // Internal States\n /**\n * Whether Flicking's {@link Flicking#init init()} is called.\n * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.\n * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.\n * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get initialized() { return this._initialized; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._camera.circularEnabled; }\n /**\n * Whether the `virtual` option is enabled.\n * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero.\n * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get virtualEnabled() { return this._panelsPerView > 0 && this._virtual != null; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get index() { return this._control.activeIndex; }\n /**\n * The root(`.flicking-viewport`) element\n * @ko root(`.flicking-viewport`) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._viewport.element; }\n /**\n * Currently active panel\n * @ko 현재 선택된 패널\n * @type {Panel}\n * @readonly\n * @see Panel\n */\n public get currentPanel() { return this._control.activePanel; }\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._renderer.panels; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._renderer.panelCount; }\n /**\n * Array of panels that is visible at the current position\n * @ko 현재 보이는 패널의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get visiblePanels() { return this._camera.visiblePanels; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._control.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._control.holding; }\n /**\n * A current list of activated plugins\n * @ko 현재 활성화된 플러그인 목록\n * @type {Plugin[]}\n * @readonly\n */\n public get activePlugins() { return this._plugins; }\n\n // Options Getter\n // UI / LAYOUT\n /**\n * Align position of the panels within viewport. You can set different values each for the panel and camera\n * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다\n * @type {ALIGN | string | number | { panel: string | number, camera: string | number }}\n * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값\n * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값\n * @default \"center\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // Literal strings\n * \"prev\", \"center\", \"next\",\n * // % values, applied to both panel & camera\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000,\n * // Setting a different value for panel & camera\n * { panel: \"10%\", camera: \"25%\" }\n * ];\n *\n * possibleOptions.forEach(align => {\n * new Flicking(\"#el\", { align });\n * });\n * ```\n */\n public get align() { return this._align; }\n /**\n * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer\n * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}\n */\n public get defaultIndex() { return this._defaultIndex; }\n /**\n * Direction of panel movement (true: horizontal, false: vertical)\n * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향)\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )}\n */\n public get horizontal() { return this._horizontal; }\n /**\n * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling.\n * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )}\n */\n public get circular() { return this._circular; }\n /**\n * Set panel control mode for the case when circular cannot be enabled.\n * \"linear\" will set the view's range from the top of the first panel to the top of the last panel.\n * \"bound\" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel.\n * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다.\n * \"linear\" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다.\n * \"bound\" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다.\n * @see CIRCULAR_FALLBACK\n * @type {string}\n * @default \"linear\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )}\n */\n public get circularFallback() { return this._circularFallback; }\n /**\n * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel\n * Only can be enabled when `circular=false`\n * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다\n * `circular=false`인 경우에만 사용할 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )}\n */\n public get bound() { return this._bound; }\n /**\n * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true`\n * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )}\n */\n public get adaptive() { return this._adaptive; }\n /**\n * A visible number of panels on viewport. Enabling this option will automatically resize panel size\n * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다\n * @type {number}\n * @default -1\n * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )}\n */\n public get panelsPerView() { return this._panelsPerView; }\n /**\n * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled.\n * This behavior can be useful in terms of performance when you're manually managing all panel sizes\n * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다.\n * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다\n * @type {boolean}\n * @default false\n */\n public get noPanelStyleOverride() { return this._noPanelStyleOverride; }\n /**\n * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded.\n * This can be useful when you have contents inside Flicking that changes its size when it's loaded\n * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다.\n * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )}\n */\n public get resizeOnContentsReady() { return this._resizeOnContentsReady; }\n /**\n * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.\n * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.\n * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.\n * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )}\n */\n public get nested() { return this._nested; }\n // EVENTS\n /**\n * A Threshold from viewport edge before triggering `needPanel` event\n * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )}\n */\n public get needPanelThreshold() { return this._needPanelThreshold; }\n /**\n * When enabled, events are not triggered before `ready` when initializing\n * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )}\n */\n public get preventEventsBeforeInit() { return this._preventEventsBeforeInit; }\n // ANIMATION\n /**\n * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time\n * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다\n * @type {number}\n * @default 0.0075\n * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )}\n */\n public get deceleration() { return this._deceleration; }\n /**\n * An easing function applied to the panel movement animation. Default value is `easeOutCubic`\n * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다\n * @type {function}\n * @default x => 1 - Math.pow(1 - x, 3)\n * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/}\n * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )}\n */\n public get easing() { return this._easing; }\n /**\n * Default duration of the animation (ms)\n * @ko 디폴트 애니메이션 재생 시간 (ms)\n * @type {number}\n * @default 500\n * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )}\n */\n public get duration() { return this._duration; }\n // INPUT\n /**\n * Types of input devices to enable\n * @ko 활성화할 입력 장치 종류\n * @type {string[]}\n * @default [\"touch\", \"mouse\"]\n * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)}\n * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)}\n * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )}\n */\n public get inputType() { return this._inputType; }\n /**\n * Movement style by user input. This will change instance type of {@link Flicking#control}\n * You can use the values of the constant {@link MOVE_TYPE}\n * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다\n * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다\n * @type {MOVE_TYPE | Pair}\n * @default \"snap\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )}\n * @example\n * |moveType|control|options|\n * |:---:|:---:|:---:|\n * |\"snap\"|{@link SnapControl}||\n * |\"freeScroll\"|{@link FreeControl}|{@link FreeControlOptions}|\n *\n * ```ts\n * import Flicking, { MOVE_TYPE } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking({\n * moveType: MOVE_TYPE.SNAP\n * });\n * ```\n *\n * ```ts\n * const flicking = new Flicking({\n * // If you want more specific settings for the moveType\n * // [moveType, options for that moveType]\n * // In this case, it's [\"freeScroll\", FreeControlOptions]\n * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }]\n * });\n * ```\n */\n public get moveType() { return this._moveType; }\n /**\n * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.\n * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.\n * @type {number}\n * @default 40\n * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}\n */\n public get threshold() { return this._threshold; }\n /**\n * Set animation to be interruptable by click/touch.\n * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )}\n */\n public get interruptable() { return this._interruptable; }\n /**\n * The size value of the bounce area. Only can be enabled when `circular=false`.\n * You can set different bounce value for prev/next direction by using array.\n * `number` for px value, and `string` for px, and % value relative to viewport size.\n * You have to call {@link Control#updateInput} after changing this to take effect.\n * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다.\n * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다.\n * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다.\n * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다.\n * @type {string | number | Array}\n * @default \"20%\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // % values, relative to viewport element(\".flicking-viewport\")'s size\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000\n * ];\n * ```\n *\n * @example\n * ```ts\n * const flicking = new Flicking(\"#el\", { bounce: \"20%\" });\n *\n * flicking.bounce = \"100%\";\n * flicking.control.updateInput(); // Call this to update!\n * ```\n */\n public get bounce() { return this._bounce; }\n /**\n * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward\n * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px)\n * @type {number}\n * @default 30\n * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )}\n */\n public get iOSEdgeSwipeThreshold() { return this._iOSEdgeSwipeThreshold; }\n /**\n * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element\n * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )}\n */\n public get preventClickOnDrag() { return this._preventClickOnDrag; }\n /**\n * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging\n * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )}\n */\n public get preventDefaultOnDrag() { return this._preventDefaultOnDrag; }\n /**\n * Automatically call {@link Flicking#disableInput disableInput()} on initialization\n * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )}\n */\n public get disableOnInit() { return this._disableOnInit; }\n /**\n * Change active panel index on mouse/touch hold while animating.\n * `index` of the `willChange`/`willRestore` event will be used as new index.\n * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.\n * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}\n */\n public get changeOnHold() { return this._changeOnHold; }\n // PERFORMANCE\n /**\n * Whether to render visible panels only. This can dramatically increase performance when there're many panels\n * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )}\n */\n public get renderOnlyVisible() { return this._renderOnlyVisible; }\n /**\n * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1`\n * Must be used with `panelsPerview`.\n * After Flicking's initialized, this property can be used to add/remove the panel count.\n * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다.\n * `panelsPerView` 옵션과 함께 사용되어야만 합니다.\n * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다.\n * @type {VirtualManager}\n * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수\n * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @property {string} [panelClass=\"flicking-panel\"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )}\n * @example\n * ```ts\n * import Flicking, { VirtualPanel } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking(\"#some_el\", {\n * panelsPerView: 3,\n * virtual: {\n * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`,\n * initialPanelCount: 100\n * }\n * });\n *\n * // Add 100 virtual panels (at the end)\n * flicking.virtual.append(100);\n *\n * // Remove 100 virtual panels from 0 to 100\n * flicking.virtual.remove(0, 100);\n * ```\n */\n public get virtual() { return this._virtualManager; }\n\n // OTHERS\n /**\n * Call {@link Flicking#init init()} automatically when creating Flicking's instance\n * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )}\n * @readonly\n */\n public get autoInit() { return this._autoInit; }\n /**\n * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed\n * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n */\n public get autoResize() { return this._autoResize; }\n /**\n * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option\n * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )}\n */\n public get useResizeObserver() { return this._useResizeObserver; }\n /**\n * Delays size recalculation from `autoResize` by the given time in milisecond.\n * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again.\n * This can increase performance by preventing `resize` being called too often.\n * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다.\n * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다.\n * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다.\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )}\n */\n public get resizeDebounce() { return this._resizeDebounce; }\n /**\n * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond.\n * This guarantees that size recalculation is performed at least once every (n)ms.\n * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms)\n * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다.\n * @type {number}\n * @default 100\n * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )}\n */\n public get maxResizeDebounce() { return this._maxResizeDebounce; }\n /**\n * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle.\n * This can prevent 1px offset issue in some cases where panel size has the fractional part.\n * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element.\n * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다.\n * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다.\n * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )}\n */\n public get useFractionalSize() { return this._useFractionalSize; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n */\n public get externalRenderer() { return this._externalRenderer; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n * @deprecated\n */\n public get renderExternal() { return this._renderExternal; }\n\n // Options Setter\n // UI / LAYOUT\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n this._renderer.align = val;\n this._camera.align = val;\n void this.resize();\n }\n\n public set defaultIndex(val: FlickingOptions[\"defaultIndex\"]) { this._defaultIndex = val; }\n public set horizontal(val: FlickingOptions[\"horizontal\"]) {\n this._horizontal = val;\n this._control.controller.updateDirection();\n void this.resize();\n }\n\n public set circular(val: FlickingOptions[\"circular\"]) {\n this._circular = val;\n void this.resize();\n }\n\n public set bound(val: FlickingOptions[\"bound\"]) {\n this._bound = val;\n void this.resize();\n }\n\n public set adaptive(val: FlickingOptions[\"adaptive\"]) {\n this._adaptive = val;\n void this.resize();\n }\n\n public set panelsPerView(val: FlickingOptions[\"panelsPerView\"]) {\n this._panelsPerView = val;\n void this.resize();\n }\n\n public set noPanelStyleOverride(val: FlickingOptions[\"noPanelStyleOverride\"]) {\n this._noPanelStyleOverride = val;\n void this.resize();\n }\n\n public set resizeOnContentsReady(val: FlickingOptions[\"resizeOnContentsReady\"]) {\n this._resizeOnContentsReady = val;\n if (val) {\n this._renderer.checkPanelContentsReady(this._renderer.panels);\n }\n }\n\n public set nested(val: FlickingOptions[\"nested\"]) {\n this._nested = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.nested = val;\n }\n }\n\n // EVENTS\n public set needPanelThreshold(val: FlickingOptions[\"needPanelThreshold\"]) { this._needPanelThreshold = val; }\n public set preventEventsBeforeInit(val: FlickingOptions[\"preventEventsBeforeInit\"]) { this._preventEventsBeforeInit = val; }\n // ANIMATION\n public set deceleration(val: FlickingOptions[\"deceleration\"]) {\n this._deceleration = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.deceleration = val;\n }\n }\n\n public set easing(val: FlickingOptions[\"easing\"]) {\n this._easing = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.easing = val;\n }\n }\n\n public set duration(val: FlickingOptions[\"duration\"]) { this._duration = val; }\n // INPUT\n public set inputType(val: FlickingOptions[\"inputType\"]) {\n this._inputType = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.inputType = val;\n }\n }\n\n public set moveType(val: FlickingOptions[\"moveType\"]) {\n this._moveType = val;\n\n const prevControl = this._control;\n const newControl = this._createControl();\n const activePanel = prevControl.activePanel;\n newControl.copy(prevControl);\n\n const prevProgressInPanel = activePanel\n ? this._camera.getProgressInPanel(activePanel)\n : 0;\n\n this._control = newControl;\n this._control.updatePosition(prevProgressInPanel);\n this._control.updateInput();\n }\n\n public set threshold(val: FlickingOptions[\"threshold\"]) { this._threshold = val; }\n public set interruptable(val: FlickingOptions[\"interruptable\"]) {\n this._interruptable = val;\n\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.interruptable = val;\n }\n }\n\n public set bounce(val: FlickingOptions[\"bounce\"]) {\n this._bounce = val;\n this._control.updateInput();\n }\n\n public set iOSEdgeSwipeThreshold(val: FlickingOptions[\"iOSEdgeSwipeThreshold\"]) {\n this._iOSEdgeSwipeThreshold = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.iOSEdgeSwipeThreshold = val;\n }\n }\n\n public set preventClickOnDrag(val: FlickingOptions[\"preventClickOnDrag\"]) {\n const prevVal = this._preventClickOnDrag;\n\n if (val === prevVal) return;\n\n const controller = this._control.controller;\n\n if (val) {\n controller.addPreventClickHandler();\n } else {\n controller.removePreventClickHandler();\n }\n\n this._preventClickOnDrag = val;\n }\n\n public set preventDefaultOnDrag(val: FlickingOptions[\"preventDefaultOnDrag\"]) {\n this._preventDefaultOnDrag = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.preventDefaultOnDrag = val;\n }\n }\n\n public set disableOnInit(val: FlickingOptions[\"disableOnInit\"]) { this._disableOnInit = val; }\n public set changeOnHold(val: FlickingOptions[\"changeOnHold\"]) { this._changeOnHold = val; }\n // PERFORMANCE\n public set renderOnlyVisible(val: FlickingOptions[\"renderOnlyVisible\"]) {\n this._renderOnlyVisible = val;\n void this._renderer.render();\n }\n\n // OTHERS\n public set autoResize(val: FlickingOptions[\"autoResize\"]) {\n this._autoResize = val;\n\n if (val) {\n this._autoResizer.enable();\n } else {\n this._autoResizer.disable();\n }\n }\n\n public set useResizeObserver(val: FlickingOptions[\"useResizeObserver\"]) {\n this._useResizeObserver = val;\n\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n }\n\n /**\n * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string\n * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다.\n * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist|\n * \n *\n * |code|조건|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우|\n *\n * \n * @example\n * ```ts\n * import Flicking from \"@egjs/flicking\";\n *\n * // Creating new instance of Flicking with HTMLElement\n * const flicking = new Flicking(document.querySelector(\".flicking-viewport\"), { circular: true });\n *\n * // Creating new instance of Flicking with CSS selector\n * const flicking2 = new Flicking(\".flicking-viewport\", { circular: true });\n * ```\n */\n public constructor(root: HTMLElement | string, {\n align = ALIGN.CENTER,\n defaultIndex = 0,\n horizontal = true,\n circular = false,\n circularFallback = CIRCULAR_FALLBACK.LINEAR,\n bound = false,\n adaptive = false,\n panelsPerView = -1,\n noPanelStyleOverride = false,\n resizeOnContentsReady = false,\n nested = false,\n needPanelThreshold = 0,\n preventEventsBeforeInit = true,\n deceleration = 0.0075,\n duration = 500,\n easing = x => 1 - Math.pow(1 - x, 3),\n inputType = [\"mouse\", \"touch\"],\n moveType = \"snap\",\n threshold = 40,\n interruptable = true,\n bounce = \"20%\",\n iOSEdgeSwipeThreshold = 30,\n preventClickOnDrag = true,\n preventDefaultOnDrag = false,\n disableOnInit = false,\n changeOnHold = false,\n renderOnlyVisible = false,\n virtual = null,\n autoInit = true,\n autoResize = true,\n useResizeObserver = true,\n resizeDebounce = 0,\n maxResizeDebounce = 100,\n useFractionalSize = false,\n externalRenderer = null,\n renderExternal = null\n }: Partial = {}) {\n super();\n\n // Internal states\n this._initialized = false;\n this._plugins = [];\n\n // Bind options\n this._align = align;\n this._defaultIndex = defaultIndex;\n this._horizontal = horizontal;\n this._circular = circular;\n this._circularFallback = circularFallback;\n this._bound = bound;\n this._adaptive = adaptive;\n this._panelsPerView = panelsPerView;\n this._noPanelStyleOverride = noPanelStyleOverride;\n this._resizeOnContentsReady = resizeOnContentsReady;\n this._nested = nested;\n this._virtual = virtual;\n this._needPanelThreshold = needPanelThreshold;\n this._preventEventsBeforeInit = preventEventsBeforeInit;\n this._deceleration = deceleration;\n this._duration = duration;\n this._easing = easing;\n this._inputType = inputType;\n this._moveType = moveType;\n this._threshold = threshold;\n this._interruptable = interruptable;\n this._bounce = bounce;\n this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;\n this._preventClickOnDrag = preventClickOnDrag;\n this._preventDefaultOnDrag = preventDefaultOnDrag;\n this._disableOnInit = disableOnInit;\n this._changeOnHold = changeOnHold;\n this._renderOnlyVisible = renderOnlyVisible;\n this._autoInit = autoInit;\n this._autoResize = autoResize;\n this._useResizeObserver = useResizeObserver;\n this._resizeDebounce = resizeDebounce;\n this._maxResizeDebounce = maxResizeDebounce;\n this._useFractionalSize = useFractionalSize;\n this._externalRenderer = externalRenderer;\n this._renderExternal = renderExternal;\n\n // Create core components\n this._viewport = new Viewport(this, getElement(root));\n this._autoResizer = new AutoResizer(this);\n this._renderer = this._createRenderer();\n this._camera = this._createCamera();\n this._control = this._createControl();\n this._virtualManager = new VirtualManager(this, virtual);\n\n if (this._autoInit) {\n void this.init();\n }\n }\n\n /**\n * Initialize Flicking and move to the default index\n * This is automatically called on Flicking's constructor when `autoInit` is true(default)\n * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다\n * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다\n * @fires Flicking#ready\n * @return {Promise}\n */\n public init(): Promise {\n if (this._initialized) return Promise.resolve();\n\n const camera = this._camera;\n const renderer = this._renderer;\n const control = this._control;\n const virtualManager = this._virtualManager;\n const originalTrigger = this.trigger;\n const preventEventsBeforeInit = this._preventEventsBeforeInit;\n\n camera.init();\n virtualManager.init();\n renderer.init(this);\n control.init(this);\n\n if (preventEventsBeforeInit) {\n this.trigger = () => this;\n }\n\n this._initialResize();\n\n // Look at initial panel\n this._moveToInitialPanel();\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n if (this._preventClickOnDrag) {\n control.controller.addPreventClickHandler();\n }\n if (this._disableOnInit) {\n this.disableInput();\n }\n renderer.checkPanelContentsReady(renderer.panels);\n this._initialized = true;\n\n return renderer.render().then(() => {\n // Done initializing & emit ready event\n this._plugins.forEach(plugin => plugin.init(this));\n\n if (preventEventsBeforeInit) {\n this.trigger = originalTrigger;\n }\n this.trigger(new ComponentEvent(EVENTS.READY));\n });\n }\n\n /**\n * Destroy Flicking and remove all event handlers\n * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다\n * @return {void}\n */\n public destroy(): void {\n this.off();\n\n this._autoResizer.disable();\n this._control.destroy();\n this._camera.destroy();\n this._renderer.destroy();\n\n this._plugins.forEach(plugin => plugin.destroy());\n\n this._initialized = false;\n }\n\n /**\n * Move to the previous panel (current index - 1)\n * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n * \n * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise\n */\n public prev(duration: number = this._duration): Promise {\n return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, duration, DIRECTION.PREV);\n }\n\n /**\n * Move to the next panel (current index + 1)\n * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise\n */\n public next(duration: number = this._duration) {\n return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, duration, DIRECTION.NEXT);\n }\n\n /**\n * Move to the panel with given index\n * @ko 주어진 인덱스에 해당하는 패널로 이동합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public moveTo(index: number, duration: number = this._duration, direction: ValueOf = DIRECTION.NONE) {\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE));\n }\n\n if (this._control.animating) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.ANIMATION_ALREADY_PLAYING, ERROR.CODE.ANIMATION_ALREADY_PLAYING));\n }\n\n if (this._control.holding) {\n this._control.controller.release();\n }\n\n return this._control.moveToPanel(panel, {\n duration,\n direction\n });\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우\n * @return {void}\n */\n public updateAnimation(index: number, duration?: number, direction?: ValueOf): void {\n if (!this._control.animating) {\n return;\n }\n\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n throw new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE);\n }\n\n this._control.updateAnimation(panel, duration, direction);\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @fires Flicking#moveEnd\n * @return {void}\n */\n public stopAnimation(): void {\n if (!this._control.animating) {\n return;\n }\n\n this._control.stopAnimation();\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n * @example\n * ```ts\n * const panel = flicking.getPanel(0);\n * // Which is a shorthand to...\n * const samePanel = flicking.panels[0];\n * ```\n */\n public getPanel(index: number): Panel | null {\n return this._renderer.getPanel(index);\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @return {this}\n */\n public enableInput(): this {\n this._control.enable();\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @return {this}\n */\n public disableInput(): this {\n this._control.disable();\n return this;\n }\n\n /**\n * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()}\n * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다\n * @param {object} options Status retrieving optionsStatus 반환 옵션\n * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다\n * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다\n * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다\n * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true\n * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다.\n * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체.\n */\n public getStatus({\n index = true,\n position = true,\n includePanelHTML = false,\n visiblePanelsOnly = false\n }: Partial<{\n index: boolean;\n position: boolean;\n includePanelHTML: boolean;\n visiblePanelsOnly: boolean;\n }> = {}): Status {\n const camera = this._camera;\n const panels = visiblePanelsOnly ? this.visiblePanels : this.panels;\n\n const status: Status = {\n panels: panels.map(panel => {\n const panelInfo: Status[\"panels\"][0] = { index: panel.index };\n\n if (includePanelHTML) {\n panelInfo.html = panel.element.outerHTML;\n }\n\n return panelInfo;\n })\n };\n\n if (index) {\n status.index = this.index;\n }\n if (position) {\n const nearestAnchor = camera.findNearestAnchor(camera.position);\n\n if (nearestAnchor) {\n status.position = {\n panel: nearestAnchor.panel.index,\n progressInPanel: camera.getProgressInPanel(nearestAnchor.panel)\n };\n }\n\n }\n\n if (visiblePanelsOnly) {\n const visiblePanels = this.visiblePanels;\n\n status.visibleOffset = visiblePanels[0]?.index ?? 0;\n }\n\n return status;\n }\n\n /**\n * Restore to the state of the given {@link Status}\n * @ko 주어진 {@link Status}의 상태로 복원합니다\n * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다\n * @return {void}\n */\n public setStatus(status: Status): void {\n if (!this._initialized) {\n throw new FlickingError(ERROR.MESSAGE.NOT_INITIALIZED, ERROR.CODE.NOT_INITIALIZED);\n }\n\n const {\n index,\n position,\n visibleOffset,\n panels\n } = status;\n\n const renderer = this._renderer;\n const control = this._control;\n\n // Can't add/remove panels on external rendering\n if (panels[0]?.html && !this._renderExternal) {\n renderer.batchRemove({ index: 0, deleteCount: this.panels.length, hasDOMInElements: true });\n renderer.batchInsert({ index: 0, elements: parseElement(panels.map(panel => panel.html!)), hasDOMInElements: true });\n }\n\n if (index != null) {\n const panelIndex = visibleOffset\n ? index - visibleOffset\n : index;\n\n void this.moveTo(panelIndex, 0).catch(() => void 0);\n }\n\n if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) {\n const { panel, progressInPanel } = position;\n const panelIndex = visibleOffset\n ? panel - visibleOffset\n : panel;\n const panelRange = renderer.panels[panelIndex].range;\n const newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n void control.moveToPosition(newCameraPos, 0).catch(() => void 0);\n }\n }\n\n /**\n * Add plugins that can have different effects on Flicking\n * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다\n * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들)\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public addPlugins(...plugins: Plugin[]) {\n if (this._initialized) {\n plugins.forEach(item => item.init(this));\n }\n\n this._plugins.push(...plugins);\n\n return this;\n }\n\n /**\n * Remove plugins from Flicking.\n * @ko 플리킹으로부터 플러그인들을 제거합니다.\n * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들).\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public removePlugins(...plugins: Plugin[]) {\n plugins.forEach(item => {\n const foundIndex = findIndex(this._plugins, val => val === item);\n\n if (foundIndex >= 0) {\n item.destroy();\n this._plugins.splice(foundIndex, 1);\n }\n });\n\n return this;\n }\n\n /**\n * Update viewport/panel sizes\n * @ko 패널 및 뷰포트의 크기를 갱신합니다\n * @method\n * @fires Flicking#beforeResize\n * @fires Flicking#afterResize\n * @return {this}\n */\n public async resize(): Promise {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n const activePanel = control.activePanel;\n const prevWidth = viewport.width;\n const prevHeight = viewport.height;\n const prevProgressInPanel = activePanel\n ? camera.getProgressInPanel(activePanel)\n : 0;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: prevWidth,\n height: prevHeight,\n element: viewport.element\n }));\n\n viewport.resize();\n await renderer.forceRenderAllPanels(); // Render all panel elements, to update sizes\n if (!this._initialized) {\n return;\n }\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateAdaptiveHeight();\n camera.updatePanelOrder();\n camera.updateOffset();\n await renderer.render();\n if (!this._initialized) {\n return;\n }\n\n if (control.animating) {\n // TODO:\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: prevWidth,\n height: prevHeight\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n\n /**\n * Add new panels after the last panel\n * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of appended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new Flicking(\"#flick\");\n * // These are possible parameters\n * flicking.append(document.createElement(\"div\"));\n * flicking.append(\"\\Panel\\\");\n * flicking.append([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.append(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public append(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(this._renderer.panelCount, element);\n }\n\n /**\n * Add new panels before the first panel\n * This will increase index of panels after by the number of panels added\n * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다\n * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다.\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.prepend(document.createElement(\"div\"));\n * flicking.prepend(\"\\Panel\\\");\n * flicking.prepend([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.prepend(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public prepend(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(0, element);\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.insert(0, document.createElement(\"div\"));\n * flicking.insert(2, \"\\Panel\\\");\n * flicking.insert(1, [\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.insert(3, \"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public insert(index: number, element: ElementLike | ElementLike[]): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchInsert({ index, elements: parseElement(element), hasDOMInElements: true });\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {number} index Index of panel to remove제거할 패널의 인덱스\n * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @return {Panel[]} An array of removed panels제거된 패널들의 배열\n */\n public remove(index: number, deleteCount: number = 1): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchRemove({ index, deleteCount, hasDOMInElements: true });\n }\n\n private _createControl(): Control {\n const moveType = this._moveType;\n const moveTypes = Object.keys(MOVE_TYPE).map(key => MOVE_TYPE[key] as ValueOf);\n\n const moveTypeStr = Array.isArray(moveType)\n ? moveType[0]\n : moveType;\n\n const moveTypeOptions = Array.isArray(moveType)\n ? moveType[1] ?? {}\n : {};\n\n if (!includes(moveTypes, moveTypeStr)) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"moveType\", JSON.stringify(moveType)), ERROR.CODE.WRONG_OPTION);\n }\n\n switch (moveTypeStr) {\n case MOVE_TYPE.SNAP:\n return new SnapControl(moveTypeOptions as SnapControlOptions);\n case MOVE_TYPE.FREE_SCROLL:\n return new FreeControl(moveTypeOptions as FreeControlOptions);\n case MOVE_TYPE.STRICT:\n return new StrictControl(moveTypeOptions as StrictControlOptions);\n }\n }\n\n private _createCamera(): Camera {\n if (this._circular && this._bound) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"circular\\\" and \\\"bound\\\" option cannot be used together, ignoring bound.\");\n }\n\n return new Camera(this, {\n align: this._align\n });\n }\n\n private _createRenderer(): Renderer {\n const externalRenderer = this._externalRenderer;\n if (this._virtual && this._panelsPerView <= 0) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"virtual\\\" and \\\"panelsPerView\\\" option should be used together, ignoring virtual.\");\n }\n\n return externalRenderer\n ? externalRenderer\n : this._renderExternal\n ? this._createExternalRenderer()\n : this._createVanillaRenderer();\n }\n\n private _createExternalRenderer(): ExternalRenderer {\n const {\n renderer,\n rendererOptions\n } = this._renderExternal!;\n\n return new (renderer)({ align: this._align, ...rendererOptions });\n }\n\n private _createVanillaRenderer(): VanillaRenderer {\n const virtual = this.virtualEnabled;\n\n return new VanillaRenderer({\n align: this._align,\n strategy: virtual\n ? new VirtualRenderingStrategy()\n : new NormalRenderingStrategy({\n providerCtor: VanillaElementProvider\n })\n });\n }\n\n private _moveToInitialPanel(): void {\n const renderer = this._renderer;\n const control = this._control;\n const camera = this._camera;\n const defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);\n\n if (!defaultPanel) return;\n\n const nearestAnchor = camera.findNearestAnchor(defaultPanel.position);\n const initialPanel = (nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index) ? nearestAnchor.panel : defaultPanel;\n control.setActive(initialPanel, null, false);\n\n if (!nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n let position = initialPanel.position;\n\n if (!camera.canReach(initialPanel)) {\n position = nearestAnchor.position;\n }\n\n camera.lookAt(position);\n control.updateInput();\n camera.updateOffset();\n }\n\n private _initialResize() {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: 0,\n height: 0,\n element: viewport.element\n }));\n\n viewport.resize();\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateOffset();\n control.updateInput();\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== 0 || newHeight !== 0;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: 0,\n height: 0\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n}\n\nexport default Flicking;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\nimport Renderer from \"../renderer/Renderer\";\nimport Panel from \"../core/panel/Panel\";\n\nexport default (flicking: Flicking, diffResult: DiffResult, rendered: any[]) => {\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n const prevList = [...diffResult.prevList];\n\n const added: Panel[] = [];\n const removed: Panel[] = [];\n\n if (diffResult.removed.length > 0) {\n let endIdx = -1;\n let prevIdx = -1;\n\n diffResult.removed.forEach(removedIdx => {\n if (endIdx < 0) {\n endIdx = removedIdx;\n }\n\n if (prevIdx >= 0 && removedIdx !== prevIdx - 1) {\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n\n endIdx = removedIdx;\n prevIdx = removedIdx;\n } else {\n prevIdx = removedIdx;\n }\n\n prevList.splice(removedIdx, 1);\n });\n\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n }\n\n diffResult.ordered.forEach(([from, to]) => {\n const prevPanel = panels.splice(from, 1)[0];\n panels.splice(to, 0, prevPanel);\n });\n\n if (diffResult.ordered.length > 0) {\n panels.forEach((panel, idx) => {\n const indexDiff = idx - panel.index;\n\n if (indexDiff > 0) {\n panel.increaseIndex(indexDiff);\n } else {\n panel.decreaseIndex(-indexDiff);\n }\n });\n\n panels.sort((panel1, panel2) => panel1.index - panel2.index);\n\n panels.forEach(panel => {\n panel.updatePosition();\n });\n }\n\n if (diffResult.added.length > 0) {\n let startIdx = -1;\n let prevIdx = -1;\n\n const addedElements = rendered.slice(prevList.length);\n\n diffResult.added.forEach((addedIdx, idx) => {\n if (startIdx < 0) {\n startIdx = idx;\n }\n\n if (prevIdx >= 0 && addedIdx !== prevIdx + 1) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx, idx + 1));\n\n startIdx = -1;\n prevIdx = -1;\n } else {\n prevIdx = addedIdx;\n }\n });\n\n if (startIdx >= 0) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx));\n }\n }\n\n if (diffResult.added.length > 0 || diffResult.removed.length > 0) {\n renderer.updateAfterPanelChange(added, removed);\n }\n};\n\nconst batchInsert = (renderer: Renderer, diffResult: DiffResult, addedElements: any[], startIdx: number, endIdx?: number) => {\n return renderer.batchInsertDefer(\n ...diffResult.added.slice(startIdx, endIdx).map((index, elIdx) => ({ index, elements: [addedElements[elIdx]], hasDOMInElements: false }))\n );\n};\n\nconst batchRemove = (renderer: Renderer, startIdx: number, endIdx?: number) => {\n const removed = renderer.panels.slice(startIdx, endIdx);\n\n return renderer.batchRemoveDefer({ index: startIdx, deleteCount: removed.length, hasDOMInElements: false });\n};\n\n","import { FlickingOptions } from \"../Flicking\";\nimport { ALIGN } from \"../const/external\";\nimport { parseArithmeticExpression } from \"../utils\";\n\nexport default (align: FlickingOptions[\"align\"] = ALIGN.CENTER, horizontal: boolean = true, firstPanelSize?: string) => {\n const cameraAlign = getCameraAlign(align);\n const panelAlign = getPanelAlign(align);\n\n if (panelAlign == null) return \"\";\n\n const camPosition = `calc(${cameraAlign} - (${firstPanelSize || \"0px\"} * ${panelAlign.percentage}) - ${panelAlign.absolute}px)`;\n\n return horizontal\n ? `translate(${camPosition})`\n : `translate(0, ${camPosition})`;\n};\n\nconst getCameraAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n return parseAlign(alignVal);\n};\n\nconst getPanelAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\n return parseArithmeticExpression(parseAlign(alignVal));\n};\n\nconst parseAlign = (alignVal: number | string) => {\n if (typeof alignVal === \"number\") {\n return `${alignVal}px`;\n }\n\n switch (alignVal) {\n case ALIGN.CENTER:\n return \"50%\";\n case ALIGN.NEXT:\n return \"100%\";\n case ALIGN.PREV:\n return \"0%\";\n default:\n return alignVal;\n }\n};\n","import Component from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\n\n/**\n * Decorator that makes the method of flicking available in the framework.\n * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.\n * @memberof eg.Flicking\n * @private\n * @example\n * ```js\n * import Flicking, { withFlickingMethods } from \"@egjs/flicking\";\n *\n * class Flicking extends React.Component> {\n * @withFlickingMethods\n * private flicking: Flicking;\n * }\n * ```\n */\nconst withFlickingMethods = (prototype: any, flickingName: string) => {\n [Component.prototype, Flicking.prototype].forEach(proto => {\n Object.getOwnPropertyNames(proto).filter(name => !prototype[name] && name.indexOf(\"_\") !== 0 && name !== \"constructor\")\n .forEach((name: string) => {\n const descriptor = Object.getOwnPropertyDescriptor(proto, name)!;\n\n if (descriptor.value) {\n // Public Function\n Object.defineProperty(prototype, name, {\n value: function(...args) {\n return descriptor.value.call(this[flickingName], ...args);\n }\n });\n } else {\n const getterDescriptor: { get?: () => any; set?: (val: any) => void } = {};\n if (descriptor.get) {\n getterDescriptor.get = function() {\n const flicking = this[flickingName];\n return flicking && descriptor.get?.call(flicking);\n };\n }\n if (descriptor.set) {\n getterDescriptor.set = function(...args) {\n return descriptor.set?.call(this[flickingName], ...args);\n };\n }\n\n Object.defineProperty(prototype, name, getterDescriptor);\n }\n });\n });\n};\n\nexport default withFlickingMethods;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\n\nexport default (flicking: Flicking, diffResult: DiffResult) => {\n const removedPanels = diffResult.removed.reduce((map, idx) => {\n map[idx] = true;\n return map;\n }, {});\n\n const maintainedMap = diffResult.maintained.reduce((map, [prev, current]) => {\n map[prev] = current;\n return map;\n }, {});\n\n return [\n ...flicking.panels\n .filter(panel => !removedPanels[panel.index])\n // Sort panels by position\n .sort((panel1, panel2) => (panel1.position + panel1.offset) - (panel2.position + panel2.offset))\n .map(panel => diffResult.list[maintainedMap[panel.index]]),\n ...diffResult.added.map(idx => diffResult.list[idx])\n ];\n};\n\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"./Flicking\";\nimport * as Core from \"./core\";\nimport * as Camera from \"./camera\";\nimport * as Control from \"./control\";\nimport * as Renderer from \"./renderer\";\nimport * as Constants from \"./const/external\";\nimport * as CFC from \"./cfc\";\nimport * as Utils from \"./utils\";\nimport { merge } from \"./utils\";\n\nmerge(Flicking, Core);\nmerge(Flicking, Camera);\nmerge(Flicking, Control);\nmerge(Flicking, Renderer);\nmerge(Flicking, Constants);\nmerge(Flicking, CFC);\nmerge(Flicking, Utils);\n\nexport default Flicking;\n"],"names":["STATE_TYPE","CODE","WRONG_TYPE","ELEMENT_NOT_FOUND","VAL_MUST_NOT_NULL","NOT_ATTACHED_TO_FLICKING","WRONG_OPTION","INDEX_OUT_OF_RANGE","POSITION_NOT_REACHABLE","TRANSFORM_NOT_SUPPORTED","STOP_CALLED_BY_USER","ANIMATION_INTERRUPTED","ANIMATION_ALREADY_PLAYING","NOT_ALLOWED_IN_FRAMEWORK","NOT_INITIALIZED","NO_ACTIVE","NOT_ALLOWED_IN_VIRTUAL","MESSAGE","wrongVal","correctTypes","map","type","join","selector","val","name","optionName","min","max","position","EVENTS","READY","BEFORE_RESIZE","AFTER_RESIZE","HOLD_START","HOLD_END","MOVE_START","MOVE","MOVE_END","WILL_CHANGE","CHANGED","WILL_RESTORE","RESTORED","SELECT","NEED_PANEL","VISIBLE_CHANGE","REACH_EDGE","PANEL_CHANGE","ALIGN","PREV","CENTER","NEXT","DIRECTION","NONE","MOVE_TYPE","SNAP","FREE_SCROLL","STRICT","CLASS","VERTICAL","HIDDEN","DEFAULT_VIRTUAL","CIRCULAR_FALLBACK","LINEAR","BOUND","ORDER","LTR","RTL","merge","target","sources","_i","arguments","length","forEach","source","Object","keys","key","getElement","el","parent","targetEl","isString","queryResult","document","querySelector","FlickingError","ERROR","nodeType","Node","ELEMENT_NODE","checkExistence","value","nameOnErrMsg","clamp","x","Math","getFlickingAttached","toArray","iterable","slice","call","parseAlign","align","size","alignPoint","parseArithmeticSize","parseBounce","bounce","parsedBounce","Array","isArray","parsedVal","cssValue","base","parsed","parseArithmeticExpression","percentage","absolute","cssRegex","idx","matchResult","exec","sign","unit","parsedValue","parseFloat","signMultiplier","parsePanelAlign","panel","getDirection","start","end","parseElement","element","elements","tempDiv","createElement","innerHTML","push","apply","__spread","children","firstChild","removeChild","getMinusCompensatedIndex","includes","array","array_1","__values","array_1_1","done","next","circulatePosition","pos","find","checker","array_2","array_2_1","findIndex","getProgress","prev","getStyle","window","getComputedStyle","currentStyle","setSize","_a","width","height","style","isBetween","circulateIndex","index","range","arr","i","getElementSize","horizontal","useFractionalSize","useOffset","baseSize","isBorderBoxSizing","boxSizing","border","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","sizeStr","setPrototypeOf","obj","proto","__proto__","_super","message","code","_this","this","prototype","__extends","Error","Viewport","flicking","_flicking","_el","_width","_height","_padding","left","right","top","bottom","_isBorderBoxSizing","__proto","defineProperty","get","newWidth","newHeight","resize","elStyle","AutoResizer","isFirstResize","_onResize","resizeDebounce","maxResizeDebounce","_maxResizeDebounceTimer","setTimeout","_doScheduledResize","_resizeTimer","clearTimeout","_skipFirstResize","_enabled","_resizeObserver","enable","viewport","disable","useResizeObserver","ResizeObserver","resizeObserver","observe","addEventListener","disconnect","removeEventListener","VanillaElementProvider","_element","_rendered","show","cameraEl","camera","parentElement","appendChild","hide","VirtualElementProvider","_virtualElement","nativeElement","visible","elIndex","_panel","elementIndex","virtual","init","VirtualManager","options","_renderPanel","renderPanel","_initialPanelCount","_b","initialPanelCount","_cache","_c","cache","_panelClass","_d","panelClass","_elements","set","renderer","panels","uncacheRenderResult","virtualEnabled","externalRenderer","renderExternal","_initVirtualElements","virtualElements","nativeEl","display","append","count","insert","prepend","batchInsert","hasDOMInElements","remove","batchRemove","deleteCount","cameraElement","panelsPerView","fragment","createDocumentFragment","panelEl","className","dataset","toString","EVENT","HOLD","CHANGE","RELEASE","ANIMATION_END","FINISH","POSITION_KEY","State","_delta","_targetPanel","onEnter","prevState","onHold","ctx","onChange","onRelease","onAnimationEnd","onFinish","_moveToChangedPosition","axesEvent","transitTo","delta","AXES","prevPosition","newPosition","circularEnabled","lookAt","moveEvent","ComponentEvent","isTrusted","holding","direction","trigger","isCanceled","DISABLED","IdleState","animating","panelCount","holdStartEvent","HOLDING","animatingContext","control","controller","moveStartEvent","ANIMATING","HoldingState","_releaseEvent","inputEvent","offset","offsetX","offsetY","DRAGGING","flick","setTo","IDLE","clickedElement","srcEvent","touch","changedTouches","elementFromPoint","clientX","clientY","clickedPanel","panels_1","panels_1_1","contains","cameraPosition","clickedPanelPosition","DraggingState","destPos","duration","moveToPosition","err","AnimatingState","targetPanel","updateInput","changeOnHold","setActive","activePanel","DisabledState","stop","StateMachine","nextStateType","nextState","_state","fire","eventType","externalCtx","currentState","__assign","AxesController","_onAxesHold","_dragged","_onAxesChange","_panInput","isEnabled","_preventClickWhenDragged","e","preventDefault","stopPropagation","_resetInternalValues","_stateMachine","_axes","state","_animatingContext","axes","circular","axis","Axes","deceleration","interruptable","nested","easing","PanInput","inputType","threshold","iOSEdgeSwipeThreshold","preventDefaultOnDrag","scale","panelOrder","releaseOnScroll","connect","on","destroy","removePreventClickHandler","release","updateAnimation","stopAnimation","update","controlParams","axisManager","addPreventClickHandler","off","animateTo","Promise","reject","startPos","resolve","animationFinishHandler","interruptionHandler","once","animate","updateDirection","panInput","Control","_controller","_activePanel","_getPosition","updatePosition","progressInPanel","clampToReachablePosition","resetActive","moveToPanel","_triggerIndexChangeEvent","_animateToPosition","newActivePanel","prevActivePanel","_nextPanel","updateAdaptiveHeight","prevIndex","prevPanel","copy","triggeringEvent","event","then","__awaiter","render","sent","catch","nearestAnchor","findNearestAnchor","removed","canReach","camPos_1","camRangeDiff","rangeDiff","possiblePositions","filter","reduce","nearestPosition","abs","Infinity","AnchorPoint","_index","_pos","SnapControl","_count","activeAnchor","findActiveAnchor","anchorAtCamera","targetAnchor","snapThreshold","_calcSnapThreshold","posDelta","absPosDelta","snapDelta","_findSnappedAnchor","_findAdjacentAnchor","currentPos","clampedPosition","anchorAtPosition","findAnchorIncludePosition","isFinite","anchors","anchorPoints","loopCount","floor","circularIndexOffset","anchorAtPositionIndex","anchor","loop","anchorIncludePosition","getNextAnchor","getPrevAnchor","isNextDirection","panelSize","alignPos","alignPosition","margin","FreeControl","stopAtEdge","_stopAtEdge","panelRange","targetPos","StrictControl","_resetIndexRange","cameraRange","currentIndex","prevPanelIndex","nextPanelIndex","nextPanel","prevPos","nextPos","_indexRange","currentPanel","axesRange","indexRange","isOverThreshold","adjacentAnchor","firstAnchor","lastAnchor","shouldBounceToFirst","shouldBounceToLast","isAdjacent","CameraMode","getAnchors","includePosition","nearest","prevDist","anchorIdx","dist","getCircularOffset","panelPos","canSee","visibleRange","isVisibleOnRange","LinearCameraMode","checkAvailability","getRange","firstPanel","getPanel","lastPanel","CircularCameraMode","firstPanelPrev","lastPanelNext","visibleSize","panelSizeSum","every","camRange","minDist","minDistIndex","anchorCount","positionInRange","anchorInRange","possibleAnchors","toggled","toggledPrev","toggleDirection","toggledNext","_calcPanelAreaSum","visibleInCurrentRange","sum","sizeIncludingMargin","BoundCameraMode","viewportSize","firstPos","lastPos","alignVal","reachablePanels","shouldPrependBoundAnchor","shouldAppendBoundAnchor","indexOffset_1","newAnchors","splice","nearestPanelAtMin","_findNearestPanel","panelAtMin","panelAtMax","panelIdx","Camera","_checkTranslateSupport","supportedStyle","documentElement","transformName","transforms_1","transforms_1_1","prefixedTransform","_transform","_align","_position","_alignPos","_offset","_circularOffset","_circularEnabled","_mode","_range","_visiblePanels","_anchors","NaN","nearestPanel","bounceSize","prevRange","nextRange","nextPosition","_panelOrder","viewportEl","firstElementChild","_updateMode","updatePanelOrder","_togglePanels","_refreshVisiblePanels","_checkNeedPanel","_checkReachEnd","updateOffset","applyTransform","getProgressInPanel","updateRange","updateCircularToggleDirection","updateAlignPos","updateAnchors","adaptive","unRenderedPanels","rendered","initialized","resetNeedPanelHistory","_needPanelTriggered","rendering","actualPosition","newVisiblePanels","prevVisiblePanels","added","visiblePanels","needPanelTriggered","cameraSize","needPanelThreshold","cameraPrev","cameraNext","newPos","wasBetweenRange","isBetweenRange","circularMode","canSetCircularMode","fallbackMode","circularFallback","bound","toggle","some","isToggled","Renderer","strategy","_panels","_rendering","_strategy","panelAlign","_collectPanels","forceRenderAllPanels","markForShow","updatePanelSize","_updatePanelSizeByGrid","items","allPanelsInserted","batchInsertDefer","updateAfterPanelChange","prevFirstPanel","addedPanels","item","insertingIdx","panelsPushed","panelsInserted","_createPanel","_insertPanelElements","increaseIndex","allPanelsRemoved","batchRemoveDefer","removingIdx","panelsPulled","panelsRemoved","decreaseIndex","_removePanelElements","panelsAdded","_updateCameraAndControl","targetIndex","checkPanelContentsReady","checkingPanels","resizeOnContentsReady","hasContents","contentsReadyChecker","ImReady","loading","prevProgressInPanel","panelBehind","readyCount","totalCount","check","_showOnlyVisiblePanels","visibleIndexes","visibles","markForHide","referencePanel","panelSizeObj","firstPanelSizeObj","noPanelStyleOverride","updatePanelSizes","_removeAllChildsFromCamera","nextSibling","nextSiblingElement","insertBefore","_afterRender","VanillaRenderer","updateRenderingPanels","renderPanels","_resetPanelElementOrder","_removeAllTextNodes","collectPanels","createPanel","reversedElements","getRenderingElementsByOrder","reverse","nextEl","nextElementSibling","childNodes","node","TEXT_NODE","ExternalRenderer","Panel","elementProvider","_elProvider","_removed","_loading","_resetInternalStates","_size","_margin","_toggled","_toggleDirection","cameraRangeDiff","progress","camPos","disappearPosNext","disappearPosPrev","checkingRange","_updateAlignPos","cached","marginLeft","marginRight","marginTop","marginBottom","includeMargin","includeRange","focus","moveTo","togglePosition","_togglePosition","prevToggled","camAlignPosition","camVisibleRange","camVisibleSize","minimumVisible","maximumVisible","shouldBeVisibleAtMin","shouldBeVisibleAtMax","NormalRenderingStrategy","providerCtor","_providerCtor","getRenderingIndexesByOrder","renderedPanels","renderOnlyVisible","VirtualPanel","_cachedInnerHTML","virtualElCount","cacheRenderResult","result","newInnerHTML","VirtualRenderingStrategy","virtualManager","invisibleIndexes","sort","panel1","panel2","_","Flicking","root","defaultIndex","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","preventEventsBeforeInit","_r","_s","_t","pow","_u","_v","moveType","_w","_x","_y","_z","_0","preventClickOnDrag","_1","_2","disableOnInit","_3","_4","_5","_6","autoInit","_7","autoResize","_8","_9","_10","_11","_12","_13","_initialized","_plugins","_defaultIndex","_horizontal","_circular","_circularFallback","_bound","_adaptive","_panelsPerView","_noPanelStyleOverride","_resizeOnContentsReady","_nested","_virtual","_needPanelThreshold","_preventEventsBeforeInit","_deceleration","_duration","_easing","_inputType","_moveType","_threshold","_interruptable","_bounce","_iOSEdgeSwipeThreshold","_preventClickOnDrag","_preventDefaultOnDrag","_disableOnInit","_changeOnHold","_renderOnlyVisible","_autoInit","_autoResize","_useResizeObserver","_resizeDebounce","_maxResizeDebounce","_useFractionalSize","_externalRenderer","_renderExternal","_viewport","_autoResizer","_renderer","_createRenderer","_camera","_createCamera","_control","_createControl","_virtualManager","activeIndex","prevControl","newControl","originalTrigger","_initialResize","_moveToInitialPanel","disableInput","plugin","enableInput","getStatus","includePanelHTML","visiblePanelsOnly","status","panelInfo","html","outerHTML","visibleOffset","setStatus","panelIndex","newCameraPos","addPlugins","plugins","removePlugins","foundIndex","prevWidth","prevHeight","sizeChanged","moveTypes","moveTypeStr","moveTypeOptions","JSON","stringify","console","warn","_createExternalRenderer","_createVanillaRenderer","rendererOptions","defaultPanel","initialPanel","VERSION","Component","diffResult","addedElements","startIdx","endIdx","elIdx","getCameraAlign","getPanelAlign","flickingName","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","args","getterDescriptor","prevList","endIdx_1","prevIdx_1","removedIdx","ordered","__read","from","to","indexDiff","startIdx_1","prevIdx_2","addedElements_1","addedIdx","removedPanels","maintainedMap","maintained","current","list","firstPanelSize","cameraAlign","camPosition","Constants","CFC","Utils"],"mappings":";;;;;;;;ulGA6BO,ICfKA,EDeCC,EAAO,CAClBC,WAAY,EACZC,kBAAmB,EACnBC,kBAAmB,EACnBC,yBAA0B,EAC1BC,aAAc,EACdC,mBAAoB,EACpBC,uBAAwB,EACxBC,wBAAyB,EACzBC,oBAAqB,EACrBC,sBAAuB,EACvBC,0BAA2B,GAC3BC,yBAA0B,GAC1BC,gBAAiB,GACjBC,UAAW,GACXC,uBAAwB,IAGbC,EACC,SAACC,EAAeC,GAA2B,OAAGD,EAAQ,WAAWA,EAAsB,cAAAC,EAAaC,KAAI,SAAAC,GAAQ,MAAA,IAAIA,KAAO,IAAEC,KAAK,QAAO,GAAG,EAD7IL,EAEQ,SAACM,GAAqB,MAAA,0BAA0BA,EAAsB,cAAA,EAF9EN,EAGQ,SAACO,EAAUC,GAAiB,OAAGA,EAAI,+BAA+BD,CAAK,EAH/EP,EAIe,yFAJfA,EAKG,SAACS,EAAoBF,GAAa,MAAA,WAAWE,EAAU,sCAAsCF,CAAK,EALrGP,EAMS,SAACO,EAAaG,EAAaC,GAAgB,MAAA,UAAUJ,EAA2C,wCAAAG,UAAWC,EAAG,GAAG,EAN1HX,EAOa,SAACY,GAAqB,MAAA,aAAaA,EAA6B,qBAAA,EAP7EZ,EAQc,0CARdA,EASU,kCATVA,EAUY,0CAVZA,EAWgB,gCAXhBA,EAYe,8EAZfA,EAaM,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ChBlmB,EAAMquB,GAAUsK,GAChB34B,EAAMquB,GAAUuK,IAChB54B,EAAMquB,GAAUwK"} \ No newline at end of file diff --git a/dist/flicking.pkgd.js b/dist/flicking.pkgd.js deleted file mode 100644 index c2a26e772b..0000000000 --- a/dist/flicking.pkgd.js +++ /dev/null @@ -1,13222 +0,0 @@ -/* -Copyright (c) 2015-present NAVER Corp. -name: @egjs/flicking -license: MIT -author: NAVER Corp. -repository: https://github.com/naver/egjs-flicking -version: 4.11.4 -*/ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Flicking = factory()); -})(this, (function () { 'use strict'; - - /****************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise, SuppressedError, Symbol */ - - var extendStatics$3 = function (d, b) { - extendStatics$3 = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics$3(d, b); - }; - function __extends$3(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics$3(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - var __assign$2 = function () { - __assign$2 = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign$2.apply(this, arguments); - }; - function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - } - function __generator(thisArg, body) { - var _ = { - label: 0, - sent: function () { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: - case 1: - t = op; - break; - case 4: - _.label++; - return { - value: op[1], - done: false - }; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; - case 7: - op = _.ops.pop(); - _.trys.pop(); - continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); - break; - } - if (t[2]) _.ops.pop(); - _.trys.pop(); - continue; - } - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } - } - function __values$1(o) { - var s = typeof Symbol === "function" && Symbol.iterator, - m = s && o[s], - i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - } - function __read$1(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { - error: error - }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; - } - - /** @deprecated */ - function __spread$1() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$1(arguments[i])); - return ar; - } - typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { - var e = new Error(message); - return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; - }; - - /* - Copyright (c) NAVER Corp. - name: @egjs/component - license: MIT - author: NAVER Corp. - repository: https://github.com/naver/egjs-component - version: 3.0.4 - */ - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, - m = s && o[s], - i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { - value: o && o[i++], - done: !o - }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - } - function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), - r, - ar = [], - e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } catch (error) { - e = { - error: error - }; - } finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } finally { - if (e) throw e.error; - } - } - return ar; - } - function __spread() { - for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); - return ar; - } - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - var isUndefined = function (value) { - return typeof value === "undefined"; - }; - - // This class name is not matched to file name intentionally - /** - * Event class to provide additional properties - * @ko Component에서 추가적인 프로퍼티를 제공하는 이벤트 클래스 - */ - var ComponentEvent = /*#__PURE__*/function () { - /** - * Create a new instance of ComponentEvent. - * @ko ComponentEvent의 새로운 인스턴스를 생성한다. - * @param eventType The name of the event.이벤트 이름. - * @param props An object that contains additional event properties.추가적인 이벤트 프로퍼티 오브젝트. - */ - function ComponentEvent(eventType, props) { - var e_1, _a; - this._canceled = false; - if (props) { - try { - for (var _b = __values(Object.keys(props)), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - this[key] = props[key]; - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } - } - } - this.eventType = eventType; - } - /** - * Stop the event. {@link ComponentEvent#isCanceled} will return `true` after. - * @ko 이벤트를 중단한다. 이후 {@link ComponentEvent#isCanceled}가 `true`를 반환한다. - */ - var __proto = ComponentEvent.prototype; - __proto.stop = function () { - this._canceled = true; - }; - /** - * Returns a boolean value that indicates whether {@link ComponentEvent#stop} is called before. - * @ko {@link ComponentEvent#stop}이 호출되었는지 여부를 반환한다. - * @return {boolean} A boolean value that indicates whether {@link ComponentEvent#stop} is called before.이전에 {@link ComponentEvent#stop}이 불려졌는지 여부를 반환한다. - */ - __proto.isCanceled = function () { - return this._canceled; - }; - return ComponentEvent; - }(); - - /** - * A class used to manage events in a component - * @ko 컴포넌트의 이벤트을 관리할 수 있게 하는 클래스 - */ - var Component = /*#__PURE__*/function () { - /** - * @support {"ie": "7+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.1+ (except 3.x)"} - */ - function Component() { - this._eventHandler = {}; - } - /** - * Trigger a custom event. - * @ko 커스텀 이벤트를 발생시킨다 - * @param {string | ComponentEvent} event The name of the custom event to be triggered or an instance of the ComponentEvent발생할 커스텀 이벤트의 이름 또는 ComponentEvent의 인스턴스 - * @param {any[]} params Event data to be sent when triggering a custom event 커스텀 이벤트가 발생할 때 전달할 데이터 - * @return An instance of the component itself컴포넌트 자신의 인스턴스 - * @example - * ```ts - * import Component, { ComponentEvent } from "@egjs/component"; - * - * class Some extends Component<{ - * beforeHi: ComponentEvent<{ foo: number; bar: string }>; - * hi: { foo: { a: number; b: boolean } }; - * someEvent: (foo: number, bar: string) => void; - * someOtherEvent: void; // When there's no event argument - * }> { - * some(){ - * if(this.trigger("beforeHi")){ // When event call to stop return false. - * this.trigger("hi");// fire hi event. - * } - * } - * } - * - * const some = new Some(); - * some.on("beforeHi", e => { - * if(condition){ - * e.stop(); // When event call to stop, `hi` event not call. - * } - * // `currentTarget` is component instance. - * console.log(some === e.currentTarget); // true - * - * typeof e.foo; // number - * typeof e.bar; // string - * }); - * some.on("hi", e => { - * typeof e.foo.b; // boolean - * }); - * // If you want to more know event design. You can see article. - * // https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F - * ``` - */ - var __proto = Component.prototype; - __proto.trigger = function (event) { - var params = []; - for (var _i = 1; _i < arguments.length; _i++) { - params[_i - 1] = arguments[_i]; - } - var eventName = event instanceof ComponentEvent ? event.eventType : event; - var handlers = __spread(this._eventHandler[eventName] || []); - if (handlers.length <= 0) { - return this; - } - if (event instanceof ComponentEvent) { - event.currentTarget = this; - handlers.forEach(function (handler) { - handler(event); - }); - } else { - handlers.forEach(function (handler) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-call - handler.apply(void 0, __spread(params)); - }); - } - return this; - }; - /** - * Executed event just one time. - * @ko 이벤트가 한번만 실행된다. - * @param {string} eventName The name of the event to be attached or an event name - event handler mapped object.등록할 이벤트의 이름 또는 이벤트 이름-핸들러 오브젝트 - * @param {function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수 - * @return An instance of the component itself컴포넌트 자신의 인스턴스 - * @example - * ```ts - * import Component, { ComponentEvent } from "@egjs/component"; - * - * class Some extends Component<{ - * hi: ComponentEvent; - * }> { - * hi() { - * alert("hi"); - * } - * thing() { - * this.once("hi", this.hi); - * } - * } - * - * var some = new Some(); - * some.thing(); - * some.trigger(new ComponentEvent("hi")); - * // fire alert("hi"); - * some.trigger(new ComponentEvent("hi")); - * // Nothing happens - * ``` - */ - __proto.once = function (eventName, handlerToAttach) { - var _this = this; - if (typeof eventName === "object" && isUndefined(handlerToAttach)) { - var eventHash = eventName; - for (var key in eventHash) { - this.once(key, eventHash[key]); - } - return this; - } else if (typeof eventName === "string" && typeof handlerToAttach === "function") { - var listener_1 = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - // eslint-disable-next-line @typescript-eslint/no-unsafe-call - handlerToAttach.apply(void 0, __spread(args)); - _this.off(eventName, listener_1); - }; - this.on(eventName, listener_1); - } - return this; - }; - /** - * Checks whether an event has been attached to a component. - * @ko 컴포넌트에 이벤트가 등록됐는지 확인한다. - * @param {string} eventName The name of the event to be attached 등록 여부를 확인할 이벤트의 이름 - * @return {boolean} Indicates whether the event is attached. 이벤트 등록 여부 - * @example - * ```ts - * import Component from "@egjs/component"; - * - * class Some extends Component<{ - * hi: void; - * }> { - * some() { - * this.hasOn("hi");// check hi event. - * } - * } - * ``` - */ - __proto.hasOn = function (eventName) { - return !!this._eventHandler[eventName]; - }; - /** - * Attaches an event to a component. - * @ko 컴포넌트에 이벤트를 등록한다. - * @param {string} eventName The name of the event to be attached or an event name - event handler mapped object.등록할 이벤트의 이름 또는 이벤트 이름-핸들러 오브젝트 - * @param {function} handlerToAttach The handler function of the event to be attached 등록할 이벤트의 핸들러 함수 - * @return An instance of a component itself컴포넌트 자신의 인스턴스 - * @example - * ```ts - * import Component, { ComponentEvent } from "@egjs/component"; - * - * class Some extends Component<{ - * hi: void; - * }> { - * hi() { - * console.log("hi"); - * } - * some() { - * this.on("hi",this.hi); //attach event - * } - * } - * ``` - */ - __proto.on = function (eventName, handlerToAttach) { - if (typeof eventName === "object" && isUndefined(handlerToAttach)) { - var eventHash = eventName; - for (var name in eventHash) { - this.on(name, eventHash[name]); - } - return this; - } else if (typeof eventName === "string" && typeof handlerToAttach === "function") { - var handlerList = this._eventHandler[eventName]; - if (isUndefined(handlerList)) { - this._eventHandler[eventName] = []; - handlerList = this._eventHandler[eventName]; - } - handlerList.push(handlerToAttach); - } - return this; - }; - /** - * Detaches an event from the component.
If the `eventName` is not given this will detach all event handlers attached.
If the `handlerToDetach` is not given, this will detach all event handlers for `eventName`. - * @ko 컴포넌트에 등록된 이벤트를 해제한다.
`eventName`이 주어지지 않았을 경우 모든 이벤트 핸들러를 제거한다.
`handlerToAttach`가 주어지지 않았을 경우 `eventName`에 해당하는 모든 이벤트 핸들러를 제거한다. - * @param {string?} eventName The name of the event to be detached 해제할 이벤트의 이름 - * @param {function?} handlerToDetach The handler function of the event to be detached 해제할 이벤트의 핸들러 함수 - * @return An instance of a component itself 컴포넌트 자신의 인스턴스 - * @example - * ```ts - * import Component, { ComponentEvent } from "@egjs/component"; - * - * class Some extends Component<{ - * hi: void; - * }> { - * hi() { - * console.log("hi"); - * } - * some() { - * this.off("hi",this.hi); //detach event - * } - * } - * ``` - */ - __proto.off = function (eventName, handlerToDetach) { - var e_1, _a; - // Detach all event handlers. - if (isUndefined(eventName)) { - this._eventHandler = {}; - return this; - } - // Detach all handlers for eventname or detach event handlers by object. - if (isUndefined(handlerToDetach)) { - if (typeof eventName === "string") { - delete this._eventHandler[eventName]; - return this; - } else { - var eventHash = eventName; - for (var name in eventHash) { - this.off(name, eventHash[name]); - } - return this; - } - } - // Detach single event handler - var handlerList = this._eventHandler[eventName]; - if (handlerList) { - var idx = 0; - try { - for (var handlerList_1 = __values(handlerList), handlerList_1_1 = handlerList_1.next(); !handlerList_1_1.done; handlerList_1_1 = handlerList_1.next()) { - var handlerFunction = handlerList_1_1.value; - if (handlerFunction === handlerToDetach) { - handlerList.splice(idx, 1); - if (handlerList.length <= 0) { - delete this._eventHandler[eventName]; - } - break; - } - idx++; - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (handlerList_1_1 && !handlerList_1_1.done && (_a = handlerList_1.return)) _a.call(handlerList_1); - } finally { - if (e_1) throw e_1.error; - } - } - } - return this; - }; - /** - * Version info string - * @ko 버전정보 문자열 - * @name VERSION - * @static - * @example - * Component.VERSION; // ex) 3.0.0 - * @memberof Component - */ - Component.VERSION = "3.0.4"; - return Component; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-unsafe-assignment - var ComponentEvent$1 = ComponentEvent; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /* eslint-disable @typescript-eslint/restrict-template-expressions */ - /** - * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs. - * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다. - * @name ERROR_CODE - * @constant - * @type object - * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우 - * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우 - * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우 - * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우) - * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때 - * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우 - * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우 - * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8) - * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우 - * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우 - * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우 - * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...) - * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우 - * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우 - * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다 - * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우 - */ - var CODE = { - WRONG_TYPE: 0, - ELEMENT_NOT_FOUND: 1, - VAL_MUST_NOT_NULL: 2, - NOT_ATTACHED_TO_FLICKING: 3, - WRONG_OPTION: 4, - INDEX_OUT_OF_RANGE: 5, - POSITION_NOT_REACHABLE: 6, - TRANSFORM_NOT_SUPPORTED: 7, - STOP_CALLED_BY_USER: 8, - ANIMATION_INTERRUPTED: 9, - ANIMATION_ALREADY_PLAYING: 10, - NOT_ALLOWED_IN_FRAMEWORK: 11, - NOT_INITIALIZED: 12, - NO_ACTIVE: 13, - NOT_ALLOWED_IN_VIRTUAL: 14 - }; - var MESSAGE = { - WRONG_TYPE: function (wrongVal, correctTypes) { - return wrongVal + "(" + typeof wrongVal + ") is not a " + correctTypes.map(function (type) { - return "\"" + type + "\""; - }).join(" or ") + "."; - }, - ELEMENT_NOT_FOUND: function (selector) { - return "Element with selector \"" + selector + "\" not found."; - }, - VAL_MUST_NOT_NULL: function (val, name) { - return name + " should be provided. Given: " + val; - }, - NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.", - WRONG_OPTION: function (optionName, val) { - return "Option \"" + optionName + "\" is not in correct format, given: " + val; - }, - INDEX_OUT_OF_RANGE: function (val, min, max) { - return "Index \"" + val + "\" is out of range: should be between " + min + " and " + max + "."; - }, - POSITION_NOT_REACHABLE: function (position) { - return "Position \"" + position + "\" is not reachable."; - }, - TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.", - STOP_CALLED_BY_USER: "Event stop() is called by user.", - ANIMATION_INTERRUPTED: "Animation is interrupted by user input.", - ANIMATION_ALREADY_PLAYING: "Animation is already playing.", - NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.", - NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.", - NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.", - NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled" - }; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /** - * Event type object with event name strings of {@link Flicking} - * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체 - * @type {object} - * @property {"holdStart"} HOLD_START holdStart eventholdStart 이벤트 - * @property {"holdEnd"} HOLD_END holdEnd eventholdEnd 이벤트 - * @property {"moveStart"} MOVE_START moveStart eventmoveStart 이벤트 - * @property {"move"} MOVE move eventmove 이벤트 - * @property {"moveEnd"} MOVE_END moveEnd eventmoveEnd 이벤트 - * @property {"willChange"} WILL_CHANGE willChange eventwillChange 이벤트 - * @property {"changed"} CHANGED changed eventchanged 이벤트 - * @property {"willRestore"} WILL_RESTORE willRestore eventwillRestore 이벤트 - * @property {"restored"} RESTORED restored eventrestored 이벤트 - * @property {"select"} SELECT select eventselect 이벤트 - * @property {"needPanel"} NEED_PANEL needPanel eventneedPanel 이벤트 - * @property {"panelChange"} PANEL_CHANGE panelChange eventpanelChange 이벤트 - * @example - * ```ts - * import { EVENTS } from "@egjs/flicking"; - * EVENTS.MOVE_START; // "moveStart" - * ``` - */ - var EVENTS = { - READY: "ready", - BEFORE_RESIZE: "beforeResize", - AFTER_RESIZE: "afterResize", - HOLD_START: "holdStart", - HOLD_END: "holdEnd", - MOVE_START: "moveStart", - MOVE: "move", - MOVE_END: "moveEnd", - WILL_CHANGE: "willChange", - CHANGED: "changed", - WILL_RESTORE: "willRestore", - RESTORED: "restored", - SELECT: "select", - NEED_PANEL: "needPanel", - VISIBLE_CHANGE: "visibleChange", - REACH_EDGE: "reachEdge", - PANEL_CHANGE: "panelChange" - }; - /** - * An object with all possible predefined literal string for the {@link Flicking#align align} option - * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체 - * @type {object} - * @property {"prev"} PREV left/top align좌/상 정렬 - * @property {"center"} CENTER center align중앙 정렬 - * @property {"next"} NEXT right/bottom align우/하 정렬 - */ - var ALIGN = { - PREV: "prev", - CENTER: "center", - NEXT: "next" - }; - /** - * An object of directions - * @ko 방향을 나타내는 값들을 담고 있는 객체 - * @type {object} - * @property {"PREV"} PREV "left" when {@link Flicking#horizontal horizontal} is true, and "top" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다 - * @property {"NEXT"} NEXT "right" when {@link Flicking#horizontal horizontal} is true, and "bottom" when {@link Flicking#horizontal horizontal} is false - * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다 - * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다 - */ - var DIRECTION = { - PREV: "PREV", - NEXT: "NEXT", - NONE: null - }; - /** - * An object with all possible {@link Flicking#moveType moveType}s - * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체 - * @type {object} - * @property {"snap"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"freeScroll"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType} - * @property {"strict"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control} - * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType} - */ - var MOVE_TYPE = { - SNAP: "snap", - FREE_SCROLL: "freeScroll", - STRICT: "strict" - }; - var CLASS = { - VERTICAL: "vertical", - HIDDEN: "flicking-hidden", - DEFAULT_VIRTUAL: "flicking-panel" - }; - /** - * An object with all possible {@link Flicking#circularFallback circularFallback}s - * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체 - * @type {object} - * @property {string} LINEAR "linear" - * @property {string} BOUND "bound" - */ - var CIRCULAR_FALLBACK = { - LINEAR: "linear", - BOUND: "bound" - }; - /** - * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체 - * @type {object} - * @property {string} LTR "ltr" - * @property {string} RTL "rtl" - */ - var ORDER = { - LTR: "ltr", - RTL: "rtl" - }; - - var Constants = { - __proto__: null, - EVENTS: EVENTS, - ALIGN: ALIGN, - DIRECTION: DIRECTION, - MOVE_TYPE: MOVE_TYPE, - CLASS: CLASS, - CIRCULAR_FALLBACK: CIRCULAR_FALLBACK, - ORDER: ORDER, - ERROR_CODE: CODE - }; - - // eslint-disable-next-line @typescript-eslint/ban-types - var merge = function (target) { - var sources = []; - for (var _i = 1; _i < arguments.length; _i++) { - sources[_i - 1] = arguments[_i]; - } - sources.forEach(function (source) { - Object.keys(source).forEach(function (key) { - target[key] = source[key]; - }); - }); - return target; - }; - var getElement = function (el, parent) { - var targetEl = null; - if (isString(el)) { - var parentEl = parent ? parent : document; - var queryResult = parentEl.querySelector(el); - if (!queryResult) { - throw new FlickingError(MESSAGE.ELEMENT_NOT_FOUND(el), CODE.ELEMENT_NOT_FOUND); - } - targetEl = queryResult; - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - targetEl = el; - } - if (!targetEl) { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - return targetEl; - }; - var checkExistence = function (value, nameOnErrMsg) { - if (value == null) { - throw new FlickingError(MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), CODE.VAL_MUST_NOT_NULL); - } - }; - var clamp$1 = function (x, min, max) { - return Math.max(Math.min(x, max), min); - }; - var getFlickingAttached = function (val) { - if (!val) { - throw new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING); - } - return val; - }; - var toArray$2 = function (iterable) { - return [].slice.call(iterable); - }; - var parseAlign$1 = function (align, size) { - var alignPoint; - if (isString(align)) { - switch (align) { - case ALIGN.PREV: - alignPoint = 0; - break; - case ALIGN.CENTER: - alignPoint = 0.5 * size; - break; - case ALIGN.NEXT: - alignPoint = size; - break; - default: - alignPoint = parseArithmeticSize(align, size); - if (alignPoint == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("align", align), CODE.WRONG_OPTION); - } - } - } else { - alignPoint = align; - } - return alignPoint; - }; - var parseBounce = function (bounce, size) { - var parsedBounce; - if (Array.isArray(bounce)) { - parsedBounce = bounce.map(function (val) { - return parseArithmeticSize(val, size); - }); - } else { - var parsedVal = parseArithmeticSize(bounce, size); - parsedBounce = [parsedVal, parsedVal]; - } - return parsedBounce.map(function (val) { - if (val == null) { - throw new FlickingError(MESSAGE.WRONG_OPTION("bounce", bounce), CODE.WRONG_OPTION); - } - return val; - }); - }; - var parseArithmeticSize = function (cssValue, base) { - var parsed = parseArithmeticExpression(cssValue); - if (parsed == null) return null; - return parsed.percentage * base + parsed.absolute; - }; - var parseArithmeticExpression = function (cssValue) { - var cssRegex = /(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g; - if (typeof cssValue === "number") { - return { - percentage: 0, - absolute: cssValue - }; - } - var parsed = { - percentage: 0, - absolute: 0 - }; - var idx = 0; - var matchResult = cssRegex.exec(cssValue); - while (matchResult != null) { - var sign = matchResult[1]; - var value = matchResult[2]; - var unit = matchResult[3]; - var parsedValue = parseFloat(value); - if (idx <= 0) { - sign = sign || "+"; - } - // Return default value for values not in good form - if (!sign) { - return null; - } - var signMultiplier = sign === "+" ? 1 : -1; - if (unit === "%") { - parsed.percentage += signMultiplier * (parsedValue / 100); - } else { - parsed.absolute += signMultiplier * parsedValue; - } - // Match next occurrence - ++idx; - matchResult = cssRegex.exec(cssValue); - } - // None-matched - if (idx === 0) { - return null; - } - return parsed; - }; - var parseCSSSizeValue = function (val) { - return isString(val) ? val : val + "px"; - }; - var parsePanelAlign = function (align) { - return typeof align === "object" ? align.panel : align; - }; - var getDirection$1 = function (start, end) { - if (start === end) return DIRECTION.NONE; - return start < end ? DIRECTION.NEXT : DIRECTION.PREV; - }; - var parseElement = function (element) { - if (!Array.isArray(element)) { - element = [element]; - } - var elements = []; - element.forEach(function (el) { - if (isString(el)) { - var tempDiv = document.createElement("div"); - tempDiv.innerHTML = el; - elements.push.apply(elements, __spread$1(toArray$2(tempDiv.children))); - while (tempDiv.firstChild) { - tempDiv.removeChild(tempDiv.firstChild); - } - } else if (el && el.nodeType === Node.ELEMENT_NODE) { - elements.push(el); - } else { - throw new FlickingError(MESSAGE.WRONG_TYPE(el, ["HTMLElement", "string"]), CODE.WRONG_TYPE); - } - }); - return elements; - }; - var getMinusCompensatedIndex = function (idx, max) { - return idx < 0 ? clamp$1(idx + max, 0, max) : clamp$1(idx, 0, max); - }; - var includes = function (array, target) { - var e_1, _a; - try { - for (var array_1 = __values$1(array), array_1_1 = array_1.next(); !array_1_1.done; array_1_1 = array_1.next()) { - var val = array_1_1.value; - if (val === target) return true; - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (array_1_1 && !array_1_1.done && (_a = array_1.return)) _a.call(array_1); - } finally { - if (e_1) throw e_1.error; - } - } - return false; - }; - var isString = function (val) { - return typeof val === "string"; - }; - var circulatePosition = function (pos, min, max) { - var size = max - min; - if (pos < min) { - var offset = (min - pos) % size; - pos = max - offset; - } else if (pos > max) { - var offset = (pos - max) % size; - pos = min + offset; - } - return pos; - }; - var find$1 = function (array, checker) { - var e_2, _a; - try { - for (var array_2 = __values$1(array), array_2_1 = array_2.next(); !array_2_1.done; array_2_1 = array_2.next()) { - var val = array_2_1.value; - if (checker(val)) { - return val; - } - } - } catch (e_2_1) { - e_2 = { - error: e_2_1 - }; - } finally { - try { - if (array_2_1 && !array_2_1.done && (_a = array_2.return)) _a.call(array_2); - } finally { - if (e_2) throw e_2.error; - } - } - return null; - }; - var findRight = function (array, checker) { - for (var idx = array.length - 1; idx >= 0; idx--) { - var val = array[idx]; - if (checker(val)) { - return val; - } - } - return null; - }; - var findIndex = function (array, checker) { - for (var idx = 0; idx < array.length; idx++) { - if (checker(array[idx])) { - return idx; - } - } - return -1; - }; - var getProgress = function (pos, prev, next) { - return (pos - prev) / (next - prev); - }; - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - var getStyle = function (el) { - return window.getComputedStyle(el) || el.currentStyle; - }; - var setSize = function (el, _a) { - var width = _a.width, - height = _a.height; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - el.style.width = width + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - el.style.height = height + "px"; - } - } - }; - var isBetween = function (val, min, max) { - return val >= min && val <= max; - }; - var circulateIndex = function (index, max) { - if (index >= max) { - return index % max; - } else if (index < 0) { - return getMinusCompensatedIndex((index + 1) % max - 1, max); - } else { - return index; - } - }; - var range = function (end) { - var arr = new Array(end); - for (var i = 0; i < end; i++) { - arr[i] = i; - } - return arr; - }; - var getElementSize = function (_a) { - var el = _a.el, - horizontal = _a.horizontal, - useFractionalSize = _a.useFractionalSize, - useOffset = _a.useOffset, - style = _a.style; - var size = 0; - if (useFractionalSize) { - var baseSize = parseFloat(horizontal ? style.width : style.height) || 0; - var isBorderBoxSizing = style.boxSizing === "border-box"; - var border = horizontal ? parseFloat(style.borderLeftWidth || "0") + parseFloat(style.borderRightWidth || "0") : parseFloat(style.borderTopWidth || "0") + parseFloat(style.borderBottomWidth || "0"); - if (isBorderBoxSizing) { - size = useOffset ? baseSize : baseSize - border; - } else { - var padding = horizontal ? parseFloat(style.paddingLeft || "0") + parseFloat(style.paddingRight || "0") : parseFloat(style.paddingTop || "0") + parseFloat(style.paddingBottom || "0"); - size = useOffset ? baseSize + padding + border : baseSize + padding; - } - } else { - var sizeStr = horizontal ? "Width" : "Height"; - size = useOffset ? el["offset" + sizeStr] : el["client" + sizeStr]; - } - return Math.max(size, 0); - }; - var setPrototypeOf = Object.setPrototypeOf || function (obj, proto) { - obj.__proto__ = proto; - return obj; - }; - - var Utils = { - __proto__: null, - merge: merge, - getElement: getElement, - checkExistence: checkExistence, - clamp: clamp$1, - getFlickingAttached: getFlickingAttached, - toArray: toArray$2, - parseAlign: parseAlign$1, - parseBounce: parseBounce, - parseArithmeticSize: parseArithmeticSize, - parseArithmeticExpression: parseArithmeticExpression, - parseCSSSizeValue: parseCSSSizeValue, - parsePanelAlign: parsePanelAlign, - getDirection: getDirection$1, - parseElement: parseElement, - getMinusCompensatedIndex: getMinusCompensatedIndex, - includes: includes, - isString: isString, - circulatePosition: circulatePosition, - find: find$1, - findRight: findRight, - findIndex: findIndex, - getProgress: getProgress, - getStyle: getStyle, - setSize: setSize, - isBetween: isBetween, - circulateIndex: circulateIndex, - range: range, - getElementSize: getElementSize, - setPrototypeOf: setPrototypeOf - }; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /** - * Special type of known error that {@link Flicking} throws. - * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러 - * @property {number} code Error code에러 코드 - * @property {string} message Error message에러 메시지 - * @see {@link ERROR_CODE ERROR_CODE} - * @example - * ```ts - * import Flicking, { FlickingError, ERROR_CODES } from "@egjs/flicking"; - * try { - * const flicking = new Flicking(".flicking-viewport") - * } catch (e) { - * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) { - * console.error("Element not found") - * } - * } - * ``` - */ - var FlickingError = /*#__PURE__*/function (_super) { - __extends$3(FlickingError, _super); - /** - * @param message Error message에러 메시지 - * @param code Error code에러 코드 - */ - function FlickingError(message, code) { - var _this = _super.call(this, message) || this; - setPrototypeOf(_this, FlickingError.prototype); - _this.name = "FlickingError"; - _this.code = code; - return _this; - } - return FlickingError; - }(Error); - - /** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - */ - var Viewport = /*#__PURE__*/function () { - /** - * @param el A viewport element뷰포트 엘리먼트 - */ - function Viewport(flicking, el) { - this._flicking = flicking; - this._el = el; - this._width = 0; - this._height = 0; - this._padding = { - left: 0, - right: 0, - top: 0, - bottom: 0 - }; - this._isBorderBoxSizing = false; - } - var __proto = Viewport.prototype; - Object.defineProperty(__proto, "element", { - /** - * A viewport(root) element - * @ko 뷰포트(root) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "width", { - /** - * Viewport width, without paddings - * @ko 뷰포트 너비 - * @type {number} - * @readonly - */ - get: function () { - return this._width - this._padding.left - this._padding.right; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Viewport height, without paddings - * @ko 뷰포트 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height - this._padding.top - this._padding.bottom; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "padding", { - /** - * Viewport paddings - * @ko 뷰포트 CSS padding 값 - * @type {object} - * @property {number} left CSS `padding-left` - * @property {number} right CSS `padding-right` - * @property {number} top CSS `padding-top` - * @property {number} bottom CSS `padding-bottom` - * @readonly - */ - get: function () { - return this._padding; - }, - enumerable: false, - configurable: true - }); - /** - * Change viewport's size. - * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property - * @ko 뷰포트 크기를 변경합니다. - * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New viewport size새 뷰포트 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - */ - __proto.setSize = function (_a) { - var width = _a.width, - height = _a.height; - var el = this._el; - var padding = this._padding; - var isBorderBoxSizing = this._isBorderBoxSizing; - if (width != null) { - if (isString(width)) { - el.style.width = width; - } else { - var newWidth = isBorderBoxSizing ? width + padding.left + padding.right : width; - el.style.width = newWidth + "px"; - } - } - if (height != null) { - if (isString(height)) { - el.style.height = height; - } else { - var newHeight = isBorderBoxSizing ? height + padding.top + padding.bottom : height; - el.style.height = newHeight + "px"; - } - } - this.resize(); - }; - /** - * Update width/height to the current viewport element's size - * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다 - */ - __proto.resize = function () { - var el = this._el; - var elStyle = getStyle(el); - var useFractionalSize = this._flicking.useFractionalSize; - this._width = getElementSize({ - el: el, - horizontal: true, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._height = getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: false, - style: elStyle - }); - this._padding = { - left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0, - right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0, - top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0, - bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0 - }; - this._isBorderBoxSizing = elStyle.boxSizing === "border-box"; - }; - return Viewport; - }(); - - var AutoResizer = /*#__PURE__*/function () { - function AutoResizer(flicking) { - var _this = this; - this._onResize = function () { - var flicking = _this._flicking; - var resizeDebounce = flicking.resizeDebounce; - var maxResizeDebounce = flicking.maxResizeDebounce; - if (resizeDebounce <= 0) { - void flicking.resize(); - } else { - if (_this._maxResizeDebounceTimer <= 0) { - if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) { - _this._maxResizeDebounceTimer = window.setTimeout(_this._doScheduledResize, maxResizeDebounce); - } - } - if (_this._resizeTimer > 0) { - clearTimeout(_this._resizeTimer); - _this._resizeTimer = 0; - } - _this._resizeTimer = window.setTimeout(_this._doScheduledResize, resizeDebounce); - } - }; - this._doScheduledResize = function () { - clearTimeout(_this._resizeTimer); - clearTimeout(_this._maxResizeDebounceTimer); - _this._maxResizeDebounceTimer = -1; - _this._resizeTimer = -1; - void _this._flicking.resize(); - }; - // eslint-disable-next-line @typescript-eslint/member-ordering - this._skipFirstResize = function () { - var isFirstResize = true; - return function () { - if (isFirstResize) { - isFirstResize = false; - return; - } - _this._onResize(); - }; - }(); - this._flicking = flicking; - this._enabled = false; - this._resizeObserver = null; - this._resizeTimer = -1; - this._maxResizeDebounceTimer = -1; - } - var __proto = AutoResizer.prototype; - Object.defineProperty(__proto, "enabled", { - get: function () { - return this._enabled; - }, - enumerable: false, - configurable: true - }); - __proto.enable = function () { - var flicking = this._flicking; - var viewport = flicking.viewport; - if (this._enabled) { - this.disable(); - } - if (flicking.useResizeObserver && !!window.ResizeObserver) { - var viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0; - var resizeObserver = viewportSizeNot0 ? new ResizeObserver(this._skipFirstResize) : new ResizeObserver(this._onResize); - resizeObserver.observe(flicking.viewport.element); - this._resizeObserver = resizeObserver; - } else { - window.addEventListener("resize", this._onResize); - } - this._enabled = true; - return this; - }; - __proto.disable = function () { - if (!this._enabled) return this; - var resizeObserver = this._resizeObserver; - if (resizeObserver) { - resizeObserver.disconnect(); - this._resizeObserver = null; - } else { - window.removeEventListener("resize", this._onResize); - } - this._enabled = false; - return this; - }; - return AutoResizer; - }(); - - /** - * @internal - */ - var VanillaElementProvider = /*#__PURE__*/function () { - function VanillaElementProvider(element) { - this._element = element; - this._rendered = true; - } - var __proto = VanillaElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - __proto.show = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement !== cameraEl) { - cameraEl.appendChild(el); - this._rendered = true; - } - }; - __proto.hide = function (flicking) { - var el = this.element; - var cameraEl = flicking.camera.element; - if (el.parentElement === cameraEl) { - cameraEl.removeChild(el); - this._rendered = false; - } - }; - return VanillaElementProvider; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /** - * @internal - */ - var VirtualElementProvider = /*#__PURE__*/function () { - function VirtualElementProvider(flicking) { - this._flicking = flicking; - } - var __proto = VirtualElementProvider.prototype; - Object.defineProperty(__proto, "element", { - get: function () { - return this._virtualElement.nativeElement; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - get: function () { - return this._virtualElement.visible; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "_virtualElement", { - get: function () { - var flicking = this._flicking; - var elIndex = this._panel.elementIndex; - var virtualElements = flicking.virtual.elements; - return virtualElements[elIndex]; - }, - enumerable: false, - configurable: true - }); - __proto.init = function (panel) { - this._panel = panel; - }; - __proto.show = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - __proto.hide = function () { - // DO_NOTHING - // Actual element visibility is controlled by VirtualManager - }; - return VirtualElementProvider; - }(); - - /** - * A manager class to add / remove virtual panels - */ - var VirtualManager = /*#__PURE__*/function () { - function VirtualManager(flicking, options) { - var _a, _b, _c, _d; - this._flicking = flicking; - this._renderPanel = (_a = options === null || options === void 0 ? void 0 : options.renderPanel) !== null && _a !== void 0 ? _a : function () { - return ""; - }; - this._initialPanelCount = (_b = options === null || options === void 0 ? void 0 : options.initialPanelCount) !== null && _b !== void 0 ? _b : -1; - this._cache = (_c = options === null || options === void 0 ? void 0 : options.cache) !== null && _c !== void 0 ? _c : false; - this._panelClass = (_d = options === null || options === void 0 ? void 0 : options.panelClass) !== null && _d !== void 0 ? _d : CLASS.DEFAULT_VIRTUAL; - this._elements = []; - } - var __proto = VirtualManager.prototype; - Object.defineProperty(__proto, "elements", { - get: function () { - return this._elements; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderPanel", { - // Options - /** - * A rendering function for the panel element's innerHTML - * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @type {function} - * @param {VirtualPanel} panel Instance of the panel패널 인스턴스 - * @param {number} index Index of the panel패널 인덱스 - * @default "() => {}" - */ - get: function () { - return this._renderPanel; - }, - set: function (val) { - this._renderPanel = val; - this._flicking.renderer.panels.forEach(function (panel) { - return panel.uncacheRenderResult(); - }); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialPanelCount", { - /** - * Initial panel count to render - * @ko 최초로 렌더링할 패널의 개수 - * @readonly - * @type {number} - * @default -1 - */ - get: function () { - return this._initialPanelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cache", { - /** - * Whether to cache rendered panel's innerHTML - * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @type {boolean} - * @default false - */ - get: function () { - return this._cache; - }, - set: function (val) { - this._cache = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelClass", { - /** - * The class name that will be applied to rendered panel elements - * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @type {string} - * @default "flicking-panel" - */ - get: function () { - return this._panelClass; - }, - set: function (val) { - this._panelClass = val; - }, - enumerable: false, - configurable: true - }); - __proto.init = function () { - var flicking = this._flicking; - if (!flicking.virtualEnabled) return; - if (!flicking.externalRenderer && !flicking.renderExternal) { - this._initVirtualElements(); - } - var virtualElements = flicking.camera.children; - this._elements = virtualElements.map(function (el) { - return { - nativeElement: el, - visible: true - }; - }); - }; - __proto.show = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = true; - if (nativeEl.style.display) { - nativeEl.style.display = ""; - } - }; - __proto.hide = function (index) { - var el = this._elements[index]; - var nativeEl = el.nativeElement; - el.visible = false; - nativeEl.style.display = "none"; - }; - /** - * Add new virtual panels at the end of the list - * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.append = function (count) { - if (count === void 0) { - count = 1; - } - var flicking = this._flicking; - return this.insert(flicking.panels.length, count); - }; - /** - * Add new virtual panels at the start of the list - * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.prepend = function (count) { - if (count === void 0) { - count = 1; - } - return this.insert(0, count); - }; - /** - * Add new virtual panels at the given index - * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다 - * @param {number} count The number of panels to add추가할 패널의 개수 - * @returns {Array} The new panels added새롭게 추가된 패널들 - */ - __proto.insert = function (index, count) { - if (count === void 0) { - count = 1; - } - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchInsert({ - index: index, - elements: range(count), - hasDOMInElements: false - }); - }; - /** - * Remove panels at the given index - * @ko 주어진 인덱스에서 패널들을 삭제합니다 - * @param {number} count The number of panels to remove삭제할 패널의 개수 - * @returns {Array} The panels removed삭제된 패널들 - */ - __proto.remove = function (index, count) { - if (count <= 0) return []; - var flicking = this._flicking; - return flicking.renderer.batchRemove({ - index: index, - deleteCount: count, - hasDOMInElements: false - }); - }; - __proto._initVirtualElements = function () { - var _this = this; - var flicking = this._flicking; - var cameraElement = flicking.camera.element; - var panelsPerView = flicking.panelsPerView; - var fragment = document.createDocumentFragment(); - var newElements = range(panelsPerView + 1).map(function (idx) { - var panelEl = document.createElement("div"); - panelEl.className = _this._panelClass; - panelEl.dataset.elementIndex = idx.toString(); - return panelEl; - }); - newElements.forEach(function (el) { - fragment.appendChild(el); - }); - cameraElement.appendChild(fragment); - }; - return VirtualManager; - }(); - - /* - Copyright (c) 2015 NAVER Corp. - name: @egjs/agent - license: MIT - author: NAVER Corp. - repository: git+https://github.com/naver/agent.git - version: 2.4.3 - */ - function some(arr, callback) { - var length = arr.length; - - for (var i = 0; i < length; ++i) { - if (callback(arr[i], i)) { - return true; - } - } - - return false; - } - function find(arr, callback) { - var length = arr.length; - - for (var i = 0; i < length; ++i) { - if (callback(arr[i], i)) { - return arr[i]; - } - } - - return null; - } - function getUserAgentString(agent) { - var userAgent = agent; - - if (typeof userAgent === "undefined") { - if (typeof navigator === "undefined" || !navigator) { - return ""; - } - - userAgent = navigator.userAgent || ""; - } - - return userAgent.toLowerCase(); - } - function execRegExp(pattern, text) { - try { - return new RegExp(pattern, "g").exec(text); - } catch (e) { - return null; - } - } - function hasUserAgentData() { - if (typeof navigator === "undefined" || !navigator || !navigator.userAgentData) { - return false; - } - - var userAgentData = navigator.userAgentData; - var brands = userAgentData.brands || userAgentData.uaList; - return !!(brands && brands.length); - } - function findVersion(versionTest, userAgent) { - var result = execRegExp("(" + versionTest + ")((?:\\/|\\s|:)([0-9|\\.|_]+))", userAgent); - return result ? result[3] : ""; - } - function convertVersion(text) { - return text.replace(/_/g, "."); - } - function findPreset(presets, userAgent) { - var userPreset = null; - var version = "-1"; - some(presets, function (preset) { - var result = execRegExp("(" + preset.test + ")((?:\\/|\\s|:)([0-9|\\.|_]+))?", userAgent); - - if (!result || preset.brand) { - return false; - } - - userPreset = preset; - version = result[3] || "-1"; - - if (preset.versionAlias) { - version = preset.versionAlias; - } else if (preset.versionTest) { - version = findVersion(preset.versionTest.toLowerCase(), userAgent) || version; - } - - version = convertVersion(version); - return true; - }); - return { - preset: userPreset, - version: version - }; - } - function findPresetBrand(presets, brands) { - var brandInfo = { - brand: "", - version: "-1" - }; - some(presets, function (preset) { - var result = findBrand(brands, preset); - - if (!result) { - return false; - } - - brandInfo.brand = preset.id; - brandInfo.version = preset.versionAlias || result.version; - return brandInfo.version !== "-1"; - }); - return brandInfo; - } - function findBrand(brands, preset) { - return find(brands, function (_a) { - var brand = _a.brand; - return execRegExp("" + preset.test, brand.toLowerCase()); - }); - } - - var BROWSER_PRESETS = [{ - test: "phantomjs", - id: "phantomjs" - }, { - test: "whale", - id: "whale" - }, { - test: "edgios|edge|edg", - id: "edge" - }, { - test: "msie|trident|windows phone", - id: "ie", - versionTest: "iemobile|msie|rv" - }, { - test: "miuibrowser", - id: "miui browser" - }, { - test: "samsungbrowser", - id: "samsung internet" - }, { - test: "samsung", - id: "samsung internet", - versionTest: "version" - }, { - test: "chrome|crios", - id: "chrome" - }, { - test: "firefox|fxios", - id: "firefox" - }, { - test: "android", - id: "android browser", - versionTest: "version" - }, { - test: "safari|iphone|ipad|ipod", - id: "safari", - versionTest: "version" - }]; // chromium's engine(blink) is based on applewebkit 537.36. - - var CHROMIUM_PRESETS = [{ - test: "(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)", - id: "chrome", - versionTest: "chrome" - }, { - test: "chromium", - id: "chrome" - }, { - test: "whale", - id: "chrome", - versionAlias: "-1", - brand: true - }]; - var WEBKIT_PRESETS = [{ - test: "applewebkit", - id: "webkit", - versionTest: "applewebkit|safari" - }]; - var WEBVIEW_PRESETS = [{ - test: "(?=(iphone|ipad))(?!(.*version))", - id: "webview" - }, { - test: "(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))", - id: "webview" - }, { - // test webview - test: "webview", - id: "webview" - }]; - var OS_PRESETS = [{ - test: "windows phone", - id: "windows phone" - }, { - test: "windows 2000", - id: "window", - versionAlias: "5.0" - }, { - test: "windows nt", - id: "window" - }, { - test: "win32|windows", - id: "window" - }, { - test: "iphone|ipad|ipod", - id: "ios", - versionTest: "iphone os|cpu os" - }, { - test: "macos|macintel|mac os x", - id: "mac" - }, { - test: "android|linux armv81", - id: "android" - }, { - test: "tizen", - id: "tizen" - }, { - test: "webos|web0s", - id: "webos" - }]; - - function isWebView(userAgent) { - return !!findPreset(WEBVIEW_PRESETS, userAgent).preset; - } - function getLegacyAgent(userAgent) { - var nextAgent = getUserAgentString(userAgent); - var isMobile = !!/mobi/g.exec(nextAgent); - var browser = { - name: "unknown", - version: "-1", - majorVersion: -1, - webview: isWebView(nextAgent), - chromium: false, - chromiumVersion: "-1", - webkit: false, - webkitVersion: "-1" - }; - var os = { - name: "unknown", - version: "-1", - majorVersion: -1 - }; - - var _a = findPreset(BROWSER_PRESETS, nextAgent), - browserPreset = _a.preset, - browserVersion = _a.version; - - var _b = findPreset(OS_PRESETS, nextAgent), - osPreset = _b.preset, - osVersion = _b.version; - - var chromiumPreset = findPreset(CHROMIUM_PRESETS, nextAgent); - browser.chromium = !!chromiumPreset.preset; - browser.chromiumVersion = chromiumPreset.version; - - if (!browser.chromium) { - var webkitPreset = findPreset(WEBKIT_PRESETS, nextAgent); - browser.webkit = !!webkitPreset.preset; - browser.webkitVersion = webkitPreset.version; - } - - if (osPreset) { - os.name = osPreset.id; - os.version = osVersion; - os.majorVersion = parseInt(osVersion, 10); - } - - if (browserPreset) { - browser.name = browserPreset.id; - browser.version = browserVersion; // Early whale bugs - - if (browser.webview && os.name === "ios" && browser.name !== "safari") { - browser.webview = false; - } - } - - browser.majorVersion = parseInt(browser.version, 10); - return { - browser: browser, - os: os, - isMobile: isMobile, - isHints: false - }; - } - - function getClientHintsAgent(osData) { - var userAgentData = navigator.userAgentData; - var brands = (userAgentData.uaList || userAgentData.brands).slice(); - var fullVersionList = osData && osData.fullVersionList; - var isMobile = userAgentData.mobile || false; - var firstBrand = brands[0]; - var platform = (osData && osData.platform || userAgentData.platform || navigator.platform).toLowerCase(); - var browser = { - name: firstBrand.brand, - version: firstBrand.version, - majorVersion: -1, - webkit: false, - webkitVersion: "-1", - chromium: false, - chromiumVersion: "-1", - webview: !!findPresetBrand(WEBVIEW_PRESETS, brands).brand || isWebView(getUserAgentString()) - }; - var os = { - name: "unknown", - version: "-1", - majorVersion: -1 - }; - browser.webkit = !browser.chromium && some(WEBKIT_PRESETS, function (preset) { - return findBrand(brands, preset); - }); - var chromiumBrand = findPresetBrand(CHROMIUM_PRESETS, brands); - browser.chromium = !!chromiumBrand.brand; - browser.chromiumVersion = chromiumBrand.version; - - if (!browser.chromium) { - var webkitBrand = findPresetBrand(WEBKIT_PRESETS, brands); - browser.webkit = !!webkitBrand.brand; - browser.webkitVersion = webkitBrand.version; - } - - var platfomResult = find(OS_PRESETS, function (preset) { - return new RegExp("" + preset.test, "g").exec(platform); - }); - os.name = platfomResult ? platfomResult.id : ""; - - if (osData) { - os.version = osData.platformVersion; - } - - if (fullVersionList && fullVersionList.length) { - var browserBrandByFullVersionList = findPresetBrand(BROWSER_PRESETS, fullVersionList); - browser.name = browserBrandByFullVersionList.brand || browser.name; - browser.version = browserBrandByFullVersionList.version || browser.version; - } else { - var browserBrand = findPresetBrand(BROWSER_PRESETS, brands); - browser.name = browserBrand.brand || browser.name; - browser.version = browserBrand.brand && osData ? osData.uaFullVersion : browserBrand.version; - } - - if (browser.webkit) { - os.name = isMobile ? "ios" : "mac"; - } - - if (os.name === "ios" && browser.webview) { - browser.version = "-1"; - } - - os.version = convertVersion(os.version); - browser.version = convertVersion(browser.version); - os.majorVersion = parseInt(os.version, 10); - browser.majorVersion = parseInt(browser.version, 10); - return { - browser: browser, - os: os, - isMobile: isMobile, - isHints: true - }; - } - /** - * Extracts browser and operating system information from the user agent string. - * @ko 유저 에이전트 문자열에서 브라우저와 운영체제 정보를 추출한다. - * @function eg.agent#agent - * @param - user agent string to parse 파싱할 유저에이전트 문자열 - * @return - agent Info 에이전트 정보 - * @example - import agent from "@egjs/agent"; - // eg.agent(); - const { os, browser, isMobile } = agent(); - */ - - function agent(userAgent) { - if (typeof userAgent === "undefined" && hasUserAgentData()) { - return getClientHintsAgent(); - } else { - return getLegacyAgent(userAgent); - } - } - - /* - Copyright (c) 2022-present NAVER Corp. - name: @cfcs/core - license: MIT - author: NAVER Crop. - repository: https://github.com/naver/cfcs/tree/main/packages/core - version: 0.1.0 - */ - - /** - * cfcs - * Copyright (c) 2022-present NAVER Corp. - * MIT license - */ - - /** - * @hidden - */ - function keys(obj) { - return Object.keys(obj); - } - - /** - * cfcs - * Copyright (c) 2022-present NAVER Corp. - * MIT license - */ - var OBSERVERS_PATH = "__observers__"; - var COMPUTED_PATH = "__computed__"; - var CFCS_DETECTED_DEPENDENCIES_VERSION = 1; - var CFCS_DETECTED_DEPENDENCIES = "__CFCS_DETECTED_DEPENDENCIES__"; - - /****************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - - /* global Reflect, Promise */ - var extendStatics$2 = function (d, b) { - extendStatics$2 = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - - return extendStatics$2(d, b); - }; - - function __extends$2(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics$2(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - - /** - * cfcs - * Copyright (c) 2022-present NAVER Corp. - * MIT license - */ - function getDetectedStack() { - // Version issues do not occur when you access the native object in the global. - Object[CFCS_DETECTED_DEPENDENCIES] = Object[CFCS_DETECTED_DEPENDENCIES] || {}; - var versionList = Object[CFCS_DETECTED_DEPENDENCIES]; - versionList[CFCS_DETECTED_DEPENDENCIES_VERSION] = versionList[CFCS_DETECTED_DEPENDENCIES_VERSION] || []; - return versionList[CFCS_DETECTED_DEPENDENCIES_VERSION]; - } - function getCurrentDetected() { - var stack = getDetectedStack(); - return stack[stack.length - 1]; - } - function detectDependencies(host) { - var stack = getDetectedStack(); - var observers = []; - var detected = { - host: host, - observers: observers, - push: function (observer) { - if (host !== observer && observers.indexOf(observer) === -1) { - observers.push(observer); - } - } - }; - stack.push(detected); - return detected; - } - function endDetectDependencies() { - var stack = getDetectedStack(); - return stack.pop(); - } - - /** - * cfcs - * Copyright (c) 2022-present NAVER Corp. - * MIT license - */ - /** - * Creates a mutable ref object. You can access the `.current` value and detect the value change through `.subscribe`. - * @category Reactive - * @see observe - */ - - var Observer = - /*#__PURE__*/ - function () { - /** - * - */ - function Observer(value) { - this._emitter = new Component(); - this._current = value; - } - - var __proto = Observer.prototype; - Object.defineProperty(__proto, "current", { - /** - * return the current value. - */ - get: function () { - var currentDetected = getCurrentDetected(); - currentDetected === null || currentDetected === void 0 ? void 0 : currentDetected.push(this); - return this._current; - }, - set: function (value) { - this._setCurrent(value); - }, - enumerable: false, - configurable: true - }); - /** - * When the current value changes, the callback function is called. - */ - - __proto.subscribe = function (callback) { - this.current; - - this._emitter.on("update", callback); - - return this; - }; - /** - * Cancel the registered subscription through callback. - */ - - - __proto.unsubscribe = function (callback) { - this._emitter.off("update", callback); - - return this; - }; - - __proto._setCurrent = function (value) { - var prevValue = this._current; - var isUpdate = value !== prevValue; - this._current = value; - - if (isUpdate) { - this._emitter.trigger("update", value, prevValue); - } - }; - /** - * @hidden - */ - - - __proto.toString = function () { - return "".concat(this.current); - }; - /** - * @hidden - */ - - - __proto.valueOf = function () { - return this.current; - }; - - return Observer; - }(); - - /** - * @category Reactive - * @hidden - */ - - var ComputedObserver = - /*#__PURE__*/ - function (_super) { - __extends$2(ComputedObserver, _super); - /** - * @description Creates a new computed observer from the values of other observers. - * It is read-only and if you change the value of the observer used inside the callback, its value will be automatically updated. - * @param _computedCallback A function for observers to be computed. - */ - - - function ComputedObserver(_computedCallback) { - var _this = _super.call(this) || this; - - _this._computedCallback = _computedCallback; - _this._registered = []; - - _this._onCheckUpdate = function () { - _this._setCurrent(_this.current); - }; - - _this._current = _this.current; - return _this; - } - - var __proto = ComputedObserver.prototype; - Object.defineProperty(__proto, "current", { - get: function () { - var _this = this; - - detectDependencies(this); - - var value = this._computedCallback(); - - var results = endDetectDependencies(); - - this._registered.forEach(function (observer) { - observer.unsubscribe(_this._onCheckUpdate); - }); - - results.observers.forEach(function (observer) { - observer.subscribe(_this._onCheckUpdate); - }); - this._registered = results.observers; - return value; - }, - enumerable: false, - configurable: true - }); - return ComputedObserver; - }(Observer); - - /** - * cfcs - * Copyright (c) 2022-present NAVER Corp. - * MIT license - */ - - function injectObserve(prototype, memberName, publicName) { - if (publicName === void 0) { - publicName = memberName; - } - - var nextAttributes = { - configurable: true, - get: function () { - return getObserver(this, publicName).current; - }, - set: function (value) { - getObserver(this, publicName, value).current = value; - } - }; - Object.defineProperty(prototype, memberName, nextAttributes); - - if (publicName !== memberName) { - Object.defineProperty(prototype, publicName, { - configurable: true, - get: function () { - return getObserver(this, publicName).current; - } - }); - } - } - /** - * @description `Observe` is a property decorator and converts the property into a `reactive state`. You can detect its status through `.subscribe`. - * @category Reactive-Decorator - * @see ReactiveSubscribe - * @example - * ```ts - import { ReactiveSubscribe, Observe } from "@cfcs/core"; - - @ReactiveSubscribe - class Component { - // The public name and state name are the same. - @Observe value1 = 1; - // If you want to set public name and private properties separately - @Observe("value2") _value2 = 1; - - constructor() { - requestAnimationFrame(() => { - this.value1 = 2; - }); - } - } - interface C - ``` - */ - - - function Observe() { - var args = []; - - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - - if (args.length > 1) { - return injectObserve(args[0], args[1]); - } - - return function (prototype, memberName) { - return injectObserve(prototype, memberName, args[0]); - }; - } - - /** - * cfcs - * Copyright (c) 2022-present NAVER Corp. - * MIT license - */ - /** - * @hidden - */ - - function injectReactiveSubscribe(object) { - object["subscribe"] = function (name, callback) { - this[name]; - getObserver(this, name).subscribe(callback); - }; - - object["unsubscribe"] = function (name, callback) { - var _this = this; - - if (!name) { - keys(getObservers(this)).forEach(function (observerName) { - _this.unsubscribe(observerName); - }); - return; - } - - if (!(name in this)) { - return; - } - - getObserver(this, name).unsubscribe(callback); - }; - } - /** - * @description `ReactiveSubscribe` is a class decorator and adds `.subscribe` and `.unsubscribe` methods. - * @category Reactive-Decorator - * @see Observe - * @example - * ```ts - import { ReactiveSubscribe, Observe } from "@cfcs/core"; - - @ReactiveSubscribe - class Component { - @Observe value1 = 1; - - constructor() { - requestAnimationFrame(() => { - this.value1 = 2; - }); - } - } - - interface Component extends ReactiveSubscribe<{ - value1: number; - value2: number; - }> {} - - const component = new Component(); - - // 1 - console.log(component.value1); - - component.subscribe("value1", nextValue => { - // When the change event occurs => (2, 2) - console.log(nextValue, component.value2); - }); - ``` - */ - - function ReactiveSubscribe(Constructor) { - var prototype = Constructor.prototype; - injectReactiveSubscribe(prototype); - } - /** - * @description Creates a mutable ref object. You can access the `.current` value and detect the value change through `.subscribe`. - * @category Reactive - * @example - * ```ts - * import { observe } from "@cfcs/core"; - * - * const ob1 = observe(1); - * - * ob1.subscribe(nextValue => { - * console.log(nextValue); - * }); - * - * ob1.current = 2; - * ``` - */ - - function observe(defaultValue) { - return new Observer(defaultValue); - } - /** - * @hidden - */ - - function computed(computedCallback) { - return new ComputedObserver(computedCallback); - } - /** - * @hidden - */ - - function defineObservers(instance) { - var observers = {}; - Object.defineProperty(instance, OBSERVERS_PATH, { - get: function () { - return observers; - } - }); - return observers; - } - /** - * @hidden - */ - - function getObservers(instance, isComputed) { - var _a, _b; - - if (!instance[OBSERVERS_PATH]) { - defineObservers(instance); - } - - var observers = instance[OBSERVERS_PATH]; - - if (!isComputed) { - var computedList = (_b = (_a = instance === null || instance === void 0 ? void 0 : instance.constructor) === null || _a === void 0 ? void 0 : _a.prototype) === null || _b === void 0 ? void 0 : _b[COMPUTED_PATH]; - - if (computedList) { - computedList.forEach(function (name) { - if (!(name in observers) && name in instance) { - instance[name]; - } - }); - } - } - - return observers; - } - /** - * @hidden - */ - - function getObserver(instance, name, defaultValue) { - var observers = getObservers(instance); - - if (!observers[name]) { - observers[name] = observe(defaultValue); - } - - return observers[name]; - } - - /** - * cfcs - * Copyright (c) 2022-present NAVER Corp. - * MIT license - */ - /** - * @description `Computed` is a property decorator. - * Changes in computed state values are also recognized according to changes in observers used within the getter function. - * You can detect its status through `.subscribe`. - * @hidden - * @category Reactive-Decorator - * @see ReactiveSubscribe - * @example - * ```ts - const ob1 = observe(0); - const ob2 = observe(1); - - // When - @ReactiveSubscribe - class TestComputed { - @Computed - get ob3() { - return ob1.current + ob2.current; - } - } - const inst = new TestComputed(); - - inst.subscribe("ob3", ob3 => { - console.log(ob3); - }); - - ob1.current = 1; - ``` - */ - - function Computed(prototype, memberName, attributes) { - var get = attributes.get; - - function getComputed() { - var observers = getObservers(this, true); - - if (!(memberName in observers)) { - observers[memberName] = computed(get.bind(this)); - } - - return getObserver(this, memberName).current; - } - - var nextAttributes = { - configurable: true, - get: getComputed - }; - prototype[COMPUTED_PATH] || (prototype[COMPUTED_PATH] = []); - var computedList = prototype[COMPUTED_PATH]; - - if (computedList.indexOf(memberName) === -1) { - computedList.push(memberName); - } - - Object.defineProperty(prototype, memberName, nextAttributes); - return nextAttributes; - } - - /* - Copyright (c) NAVER Corp. - name: @egjs/axes - license: MIT - author: NAVER Corp. - repository: https://github.com/naver/egjs-axes - version: 3.9.1 - */ - - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. All rights reserved. - Licensed under the Apache License, Version 2.0 (the "License"); you may not use - this file except in compliance with the License. You may obtain a copy of the - License at http://www.apache.org/licenses/LICENSE-2.0 - - THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED - WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, - MERCHANTABLITY OR NON-INFRINGEMENT. - - See the Apache Version 2.0 License for specific language governing permissions - and limitations under the License. - ***************************************************************************** */ - /* global Reflect, Promise */ - - var extendStatics$1 = function (d, b) { - extendStatics$1 = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - }; - return extendStatics$1(d, b); - }; - function __extends$1(d, b) { - extendStatics$1(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - var __assign$1 = function () { - __assign$1 = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign$1.apply(this, arguments); - }; - function __decorate(decorators, target, key, desc) { - var c = arguments.length, - r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, - d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - } - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - /* eslint-disable no-new-func, no-nested-ternary */ - var win; - if (typeof window === "undefined") { - // window is undefined in node.js - win = { - navigator: { - userAgent: "" - } - }; - } else { - win = window; - } - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - var DIRECTION_NONE = 1; - var DIRECTION_LEFT = 2; - var DIRECTION_RIGHT = 4; - var DIRECTION_HORIZONTAL = 2 | 4; - var DIRECTION_UP = 8; - var DIRECTION_DOWN = 16; - var DIRECTION_VERTICAL = 8 | 16; - var DIRECTION_ALL = 2 | 4 | 8 | 16; - var MOUSE_LEFT = "left"; - var MOUSE_RIGHT = "right"; - var MOUSE_MIDDLE = "middle"; - var MOUSE_BUTTON_CODE_MAP = { - 1: MOUSE_LEFT, - 2: MOUSE_MIDDLE, - 3: MOUSE_RIGHT - }; - var ANY = "any"; - var NONE = "none"; - var SHIFT = "shift"; - var CTRL = "ctrl"; - var ALT = "alt"; - var META = "meta"; - var VELOCITY_INTERVAL = 16; - var IOS_EDGE_THRESHOLD = 30; - var IS_IOS_SAFARI = "ontouchstart" in win && agent().browser.name === "safari"; - var TRANSFORM = function () { - if (typeof document === "undefined") { - return ""; - } - var bodyStyle = (document.head || document.getElementsByTagName("head")[0]).style; - var target = ["transform", "webkitTransform", "msTransform", "mozTransform"]; - for (var i = 0, len = target.length; i < len; i++) { - if (target[i] in bodyStyle) { - return target[i]; - } - } - return ""; - }(); - var PREVENT_DRAG_CSSPROPS = { - "-webkit-user-select": "none", - "-ms-user-select": "none", - "-moz-user-select": "none", - "user-select": "none", - "-webkit-user-drag": "none" - }; - - var toArray$1 = function (nodes) { - // const el = Array.prototype.slice.call(nodes); - // for IE8 - var el = []; - for (var i = 0, len = nodes.length; i < len; i++) { - el.push(nodes[i]); - } - return el; - }; - var $ = function (param, multi) { - if (multi === void 0) { - multi = false; - } - var el; - if (typeof param === "string") { - // String (HTML, Selector) - // check if string is HTML tag format - var match = param.match(/^<([a-z]+)\s*([^>]*)>/); - // creating element - if (match) { - // HTML - var dummy = document.createElement("div"); - dummy.innerHTML = param; - el = toArray$1(dummy.childNodes); - } else { - // Selector - el = toArray$1(document.querySelectorAll(param)); - } - if (!multi) { - el = el.length >= 1 ? el[0] : undefined; - } - } else if (param === win) { - // window - el = param; - } else if ("value" in param || "current" in param) { - el = param.value || param.current; - } else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) { - // HTMLElement, Document - el = param; - } else if ("jQuery" in win && param instanceof jQuery || param.constructor.prototype.jquery) { - // jQuery - el = multi ? param.toArray() : param.get(0); - } else if (Array.isArray(param)) { - el = param.map(function (v) { - return $(v); - }); - if (!multi) { - el = el.length >= 1 ? el[0] : undefined; - } - } - return el; - }; - var raf = win.requestAnimationFrame || win.webkitRequestAnimationFrame; - var caf = win.cancelAnimationFrame || win.webkitCancelAnimationFrame; - if (raf && !caf) { - var keyInfo_1 = {}; - var oldraf_1 = raf; - raf = function (callback) { - var wrapCallback = function (timestamp) { - if (keyInfo_1[key]) { - callback(timestamp); - } - }; - var key = oldraf_1(wrapCallback); - keyInfo_1[key] = true; - return key; - }; - caf = function (key) { - delete keyInfo_1[key]; - }; - } else if (!(raf && caf)) { - raf = function (callback) { - return win.setTimeout(function () { - callback(win.performance && win.performance.now && win.performance.now() || new Date().getTime()); - }, 16); - }; - caf = win.clearTimeout; - } - /** - * A polyfill for the window.requestAnimationFrame() method. - * @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame - * @private - */ - var requestAnimationFrame = function (fp) { - return raf(fp); - }; - /** - * A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method. - * @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. requestAnimationFrame() 메서드가 반환한 아이디 값 - * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame - * @private - */ - var cancelAnimationFrame = function (key) { - caf(key); - }; - var map = function (obj, callback) { - var tranformed = {}; - for (var k in obj) { - if (k) { - tranformed[k] = callback(obj[k], k); - } - } - return tranformed; - }; - var filter = function (obj, callback) { - var filtered = {}; - for (var k in obj) { - if (k && callback(obj[k], k)) { - filtered[k] = obj[k]; - } - } - return filtered; - }; - var every = function (obj, callback) { - for (var k in obj) { - if (k && !callback(obj[k], k)) { - return false; - } - } - return true; - }; - var equal = function (target, base) { - return every(target, function (v, k) { - return v === base[k]; - }); - }; - var roundNumFunc = {}; - var roundNumber = function (num, roundUnit) { - // Cache for performance - if (!roundNumFunc[roundUnit]) { - roundNumFunc[roundUnit] = getRoundFunc(roundUnit); - } - return roundNumFunc[roundUnit](num); - }; - var roundNumbers = function (num, roundUnit) { - if (!num || !roundUnit) { - return num; - } - return map(num, function (value, key) { - return roundNumber(value, typeof roundUnit === "number" ? roundUnit : roundUnit[key]); - }); - }; - var getDecimalPlace = function (val) { - if (!isFinite(val)) { - return 0; - } - var v = "".concat(val); - if (v.indexOf("e") >= 0) { - // Exponential Format - // 1e-10, 1e-12 - var p = 0; - var e = 1; - while (Math.round(val * e) / e !== val) { - e *= 10; - p++; - } - return p; - } - // In general, following has performance benefit. - // https://jsperf.com/precision-calculation - return v.indexOf(".") >= 0 ? v.length - v.indexOf(".") - 1 : 0; - }; - var inversePow = function (n) { - // replace Math.pow(10, -n) to solve floating point issue. - // eg. Math.pow(10, -4) => 0.00009999999999999999 - return 1 / Math.pow(10, n); - }; - var getRoundFunc = function (v) { - var p = v < 1 ? Math.pow(10, getDecimalPlace(v)) : 1; - return function (n) { - if (v === 0) { - return 0; - } - return Math.round(Math.round(n / v) * v * p) / p; - }; - }; - var getAngle = function (posX, posY) { - return Math.atan2(posY, posX) * 180 / Math.PI; - }; - var isCssPropsFromAxes = function (originalCssProps) { - var same = true; - Object.keys(PREVENT_DRAG_CSSPROPS).forEach(function (prop) { - if (!originalCssProps || originalCssProps[prop] !== PREVENT_DRAG_CSSPROPS[prop]) { - same = false; - } - }); - return same; - }; - var getDirection = function (useHorizontal, useVertical) { - if (useHorizontal && useVertical) { - return DIRECTION_ALL; - } else if (useHorizontal) { - return DIRECTION_HORIZONTAL; - } else if (useVertical) { - return DIRECTION_VERTICAL; - } else { - return DIRECTION_NONE; - } - }; - var useDirection = function (checkType, direction, userDirection) { - if (userDirection) { - return !!(direction === DIRECTION_ALL || direction & checkType && userDirection & checkType); - } else { - return !!(direction & checkType); - } - }; - var setCssProps = function (element, option, direction) { - var _a; - var touchActionMap = (_a = {}, _a[DIRECTION_NONE] = "auto", _a[DIRECTION_ALL] = "none", _a[DIRECTION_VERTICAL] = "pan-x", _a[DIRECTION_HORIZONTAL] = "pan-y", _a); - var oldCssProps = {}; - if (element && element.style) { - var touchAction = option.touchAction ? option.touchAction : touchActionMap[direction]; - var newCssProps_1 = __assign$1(__assign$1({}, PREVENT_DRAG_CSSPROPS), { - "touch-action": element.style["touch-action"] === "none" ? "none" : touchAction - }); - Object.keys(newCssProps_1).forEach(function (prop) { - oldCssProps[prop] = element.style[prop]; - }); - // Old style props like user-select can be corrupted if you change the style directly in the logic above. - Object.keys(newCssProps_1).forEach(function (prop) { - element.style[prop] = newCssProps_1[prop]; - }); - } - return oldCssProps; - }; - var revertCssProps = function (element, originalCssProps) { - if (element && element.style && originalCssProps) { - Object.keys(originalCssProps).forEach(function (prop) { - element.style[prop] = originalCssProps[prop]; - }); - } - return; - }; - - var EventManager = /*#__PURE__*/function () { - function EventManager(_axes) { - this._axes = _axes; - this.holdingCount = 0; - } - /** - * This event is fired when a user holds an element on the screen of the device. - * @ko 사용자가 기기의 화면에 손을 대고 있을 때 발생하는 이벤트 - * @event Axes#hold - * @type {object} - * @property {Object.} pos coordinate 좌표 정보 - * @property {Object} input The instance of inputType where the event occurred이벤트가 발생한 inputType 인스턴스 - * @property {Object} inputEvent The event object received from inputType inputType으로 부터 받은 이벤트 객체 - * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다. - * - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("hold", function(event) { - * // event.pos - * // event.input - * // event.inputEvent - * // isTrusted - * }); - * ``` - */ - var __proto = EventManager.prototype; - __proto.hold = function (pos, option) { - var roundPos = this._getRoundPos(pos).roundPos; - this._axes.trigger(new ComponentEvent$1("hold", { - pos: roundPos, - input: option.input || null, - inputEvent: option.event || null, - isTrusted: true - })); - }; - /** - * Specifies the coordinates to move after the 'change' event. It works when the holding value of the change event is true. - * @ko 'change' 이벤트 이후 이동할 좌표를 지정한다. change이벤트의 holding 값이 true일 경우에 동작한다 - * @param {Object.} pos The coordinate to move to 이동할 좌표 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("change", function(event) { - * event.holding && event.set({x: 10}); - * }); - * ``` - */ - /** Specifies the animation coordinates to move after the 'release' or 'animationStart' events. - * @ko 'release' 또는 'animationStart' 이벤트 이후 이동할 좌표를 지정한다. - * @param {Object.} pos The coordinate to move to 이동할 좌표 - * @param {Number} [duration=0] Duration of the animation (unit: ms) 애니메이션 진행 시간(단위: ms) - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("animationStart", function(event) { - * event.setTo({x: 10}, 2000); - * }); - * ``` - */ - /** - * This event is fired when a user release an element on the screen of the device. - * @ko 사용자가 기기의 화면에서 손을 뗐을 때 발생하는 이벤트 - * @event Axes#release - * @type {object} - * @property {Object.} depaPos The coordinates when releasing an element손을 뗐을 때의 좌표 - * @property {Object.} destPos The coordinates to move to after releasing an element손을 뗀 뒤에 이동할 좌표 - * @property {Object.} delta The movement variation of coordinate 좌표의 변화량 - * @property {Object.} bounceRatio If the coordinates at the time of release are in the bounce area, the current bounce value divided by the maximum bounce value 손을 뗐을 때의 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치. - * @property {Object} inputEvent The event object received from inputType inputType으로 부터 받은 이벤트 객체 - * @property {Object} input The instance of inputType where the event occurred이벤트가 발생한 inputType 인스턴스 - * @property {setTo} setTo Specifies the animation coordinates to move after the event 이벤트 이후 이동할 애니메이션 좌표를 지정한다 - * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다. - * - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("release", function(event) { - * // event.depaPos - * // event.destPos - * // event.delta - * // event.input - * // event.inputEvent - * // event.setTo - * // event.isTrusted - * - * // if you want to change the animation coordinates to move after the 'release' event. - * event.setTo({x: 10}, 2000); - * }); - * ``` - */ - __proto.triggerRelease = function (param) { - var _a = this._getRoundPos(param.destPos, param.depaPos), - roundPos = _a.roundPos, - roundDepa = _a.roundDepa; - param.destPos = roundPos; - param.depaPos = roundDepa; - param.setTo = this._createUserControll(param.destPos, param.duration); - this._axes.trigger(new ComponentEvent$1("release", __assign$1(__assign$1({}, param), { - bounceRatio: this._getBounceRatio(roundPos) - }))); - }; - /** - * This event is fired when coordinate changes. - * @ko 좌표가 변경됐을 때 발생하는 이벤트 - * @event Axes#change - * @type {object} - * @property {Object.} pos The coordinate 좌표 - * @property {Object.} delta The movement variation of coordinate 좌표의 변화량 - * @property {Object.} bounceRatio If the current coordinates are in the bounce area, the current bounce value divided by the maximum bounce value 현재 좌표가 bounce 영역에 있는 경우 현재 bounce된 값을 최대 bounce 값으로 나눈 수치. - * @property {Boolean} holding Indicates whether a user holds an element on the screen of the device.사용자가 기기의 화면을 누르고 있는지 여부 - * @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다. - * @property {Object} inputEvent The event object received from inputType. If the value is changed by animation, it returns 'null'.inputType으로 부터 받은 이벤트 객체. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다. - * @property {set} set Specifies the coordinates to move after the event. It works when the holding value is true 이벤트 이후 이동할 좌표를 지정한다. holding 값이 true일 경우에 동작한다. - * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다. - * - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("change", function(event) { - * // event.pos - * // event.delta - * // event.input - * // event.inputEvent - * // event.holding - * // event.set - * // event.isTrusted - * - * // if you want to change the coordinates to move after the 'change' event. - * // it works when the holding value of the change event is true. - * event.holding && event.set({x: 10}); - * }); - * ``` - */ - __proto.triggerChange = function (pos, depaPos, option, holding) { - var _this = this; - if (holding === void 0) { - holding = false; - } - var animationManager = this.animationManager; - var axisManager = animationManager.axisManager; - var eventInfo = animationManager.getEventInfo(); - var _a = this._getRoundPos(pos, depaPos), - roundPos = _a.roundPos, - roundDepa = _a.roundDepa; - var moveTo = axisManager.moveTo(roundPos, roundDepa); - var inputEvent = (option === null || option === void 0 ? void 0 : option.event) || (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.event) || null; - var param = { - pos: moveTo.pos, - delta: moveTo.delta, - bounceRatio: this._getBounceRatio(moveTo.pos), - holding: holding, - inputEvent: inputEvent, - isTrusted: !!inputEvent, - input: (option === null || option === void 0 ? void 0 : option.input) || (eventInfo === null || eventInfo === void 0 ? void 0 : eventInfo.input) || null, - set: inputEvent ? this._createUserControll(moveTo.pos) : function () {} // eslint-disable-line @typescript-eslint/no-empty-function - }; - - var event = new ComponentEvent$1("change", param); - this._axes.trigger(event); - Object.keys(moveTo.pos).forEach(function (axis) { - var p = moveTo.pos[axis]; - getObserver(_this._axes, axis, p).current = p; - }); - if (inputEvent) { - axisManager.set(param.set().destPos); - } - return !event.isCanceled(); - }; - /** - * This event is fired when animation starts. - * @ko 에니메이션이 시작할 때 발생한다. - * @event Axes#animationStart - * @type {object} - * @property {Object.} depaPos The coordinates when animation starts애니메이션이 시작 되었을 때의 좌표 - * @property {Object.} destPos The coordinates to move to. If you change this value, you can run the animation이동할 좌표. 이값을 변경하여 애니메이션을 동작시킬수 있다 - * @property {Object.} delta The movement variation of coordinate 좌표의 변화량 - * @property {Number} duration Duration of the animation (unit: ms). If you change this value, you can control the animation duration time.애니메이션 진행 시간(단위: ms). 이값을 변경하여 애니메이션의 이동시간을 조절할 수 있다. - * @property {Object} input The instance of inputType where the event occurred. If the value is changed by animation, it returns 'null'.이벤트가 발생한 inputType 인스턴스. 애니메이션에 의해 값이 변경될 경우에는 'null'을 반환한다. - * @property {Object} inputEvent The event object received from inputType inputType으로 부터 받은 이벤트 객체 - * @property {setTo} setTo Specifies the animation coordinates to move after the event 이벤트 이후 이동할 애니메이션 좌표를 지정한다 - * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다. - * - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("release", function(event) { - * // event.depaPos - * // event.destPos - * // event.delta - * // event.input - * // event.inputEvent - * // event.setTo - * // event.isTrusted - * - * // if you want to change the animation coordinates to move after the 'animationStart' event. - * event.setTo({x: 10}, 2000); - * }); - * ``` - */ - __proto.triggerAnimationStart = function (param) { - var _a = this._getRoundPos(param.destPos, param.depaPos), - roundPos = _a.roundPos, - roundDepa = _a.roundDepa; - param.destPos = roundPos; - param.depaPos = roundDepa; - param.setTo = this._createUserControll(param.destPos, param.duration); - var event = new ComponentEvent$1("animationStart", param); - this._axes.trigger(event); - return !event.isCanceled(); - }; - /** - * This event is fired when animation ends. - * @ko 에니메이션이 끝났을 때 발생한다. - * @event Axes#animationEnd - * @type {object} - * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다. - * - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("animationEnd", function(event) { - * // event.isTrusted - * }); - * ``` - */ - __proto.triggerAnimationEnd = function (isTrusted) { - if (isTrusted === void 0) { - isTrusted = false; - } - this._axes.trigger(new ComponentEvent$1("animationEnd", { - isTrusted: isTrusted - })); - }; - /** - * This event is fired when all actions have been completed. - * @ko 에니메이션이 끝났을 때 발생한다. - * @event Axes#finish - * @type {object} - * @property {Boolean} isTrusted Returns true if an event was generated by the user action, or false if it was caused by a script or API call 사용자의 액션에 의해 이벤트가 발생하였으면 true, 스크립트나 API호출에 의해 발생하였을 경우에는 false를 반환한다. - * - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }).on("finish", function(event) { - * // event.isTrusted - * }); - * ``` - */ - __proto.triggerFinish = function (isTrusted) { - if (isTrusted === void 0) { - isTrusted = false; - } - this._axes.trigger(new ComponentEvent$1("finish", { - isTrusted: isTrusted - })); - }; - __proto.setAnimationManager = function (animationManager) { - this.animationManager = animationManager; - }; - __proto.destroy = function () { - this._axes.off(); - }; - __proto._createUserControll = function (pos, duration) { - if (duration === void 0) { - duration = 0; - } - // to controll - var userControl = { - destPos: __assign$1({}, pos), - duration: duration - }; - return function (toPos, userDuration) { - if (toPos) { - userControl.destPos = __assign$1({}, toPos); - } - if (userDuration !== undefined) { - userControl.duration = userDuration; - } - return userControl; - }; - }; - __proto._getRoundPos = function (pos, depaPos) { - // round value if round exist - var roundUnit = this._axes.options.round; - // if (round == null) { - // return {pos, depaPos}; // undefined, undefined - // } - return { - roundPos: roundNumbers(pos, roundUnit), - roundDepa: roundNumbers(depaPos, roundUnit) - }; - }; - __proto._getBounceRatio = function (pos) { - return this._axes.axisManager.map(pos, function (v, opt) { - if (v < opt.range[0] && opt.bounce[0] !== 0) { - return (opt.range[0] - v) / opt.bounce[0]; - } else if (v > opt.range[1] && opt.bounce[1] !== 0) { - return (v - opt.range[1]) / opt.bounce[1]; - } else { - return 0; - } - }); - }; - __decorate([Observe], EventManager.prototype, "holdingCount", void 0); - return EventManager; - }(); - - var InterruptManager = /*#__PURE__*/function () { - function InterruptManager(_options) { - this._options = _options; - this._prevented = false; // check whether the animation event was prevented - } - var __proto = InterruptManager.prototype; - __proto.isInterrupting = function () { - // when interruptable is 'true', return value is always 'true'. - return this._options.interruptable || this._prevented; - }; - __proto.isInterrupted = function () { - return !this._options.interruptable && this._prevented; - }; - __proto.setInterrupt = function (prevented) { - if (!this._options.interruptable) { - this._prevented = prevented; - } - }; - return InterruptManager; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - var getInsidePosition = function (destPos, range, circular, bounce) { - var toDestPos = destPos; - var targetRange = [circular[0] ? range[0] : bounce ? range[0] - bounce[0] : range[0], circular[1] ? range[1] : bounce ? range[1] + bounce[1] : range[1]]; - toDestPos = Math.max(targetRange[0], toDestPos); - toDestPos = Math.min(targetRange[1], toDestPos); - return toDestPos; - }; - // determine outside - var isOutside = function (pos, range) { - return pos < range[0] || pos > range[1]; - }; - // determine whether position has reached the maximum moveable area - var isEndofBounce = function (pos, range, bounce, circular) { - return !circular[0] && pos === range[0] - bounce[0] || !circular[1] && pos === range[1] + bounce[1]; - }; - var getDuration = function (distance, deceleration) { - var duration = Math.sqrt(distance / deceleration * 2); - // when duration is under 100, then value is zero - return duration < 100 ? 0 : duration; - }; - var isCircularable = function (destPos, range, circular) { - return circular[1] && destPos > range[1] || circular[0] && destPos < range[0]; - }; - var getCirculatedPos = function (pos, range, circular) { - var toPos = pos; - var min = range[0]; - var max = range[1]; - var length = max - min; - if (circular[1] && pos > max) { - // right - toPos = (toPos - max) % length + min; - } - if (circular[0] && pos < min) { - // left - toPos = (toPos - min) % length + max; - } - return toPos; - }; - - var AxisManager = /*#__PURE__*/function () { - function AxisManager(_axis) { - var _this = this; - this._axis = _axis; - this._complementOptions(); - this._pos = Object.keys(this._axis).reduce(function (pos, v) { - pos[v] = _this._axis[v].startPos; - return pos; - }, {}); - } - var __proto = AxisManager.prototype; - __proto.getDelta = function (depaPos, destPos) { - var fullDepaPos = this.get(depaPos); - return map(this.get(destPos), function (v, k) { - return v - fullDepaPos[k]; - }); - }; - __proto.get = function (axes) { - var _this = this; - if (axes && Array.isArray(axes)) { - return axes.reduce(function (acc, v) { - if (v && v in _this._pos) { - acc[v] = _this._pos[v]; - } - return acc; - }, {}); - } else { - return __assign$1(__assign$1({}, this._pos), axes || {}); - } - }; - __proto.moveTo = function (pos, depaPos) { - if (depaPos === void 0) { - depaPos = this._pos; - } - var delta = map(this._pos, function (v, key) { - return key in pos && key in depaPos ? pos[key] - depaPos[key] : 0; - }); - this.set(this.map(pos, function (v, opt) { - return opt ? getCirculatedPos(v, opt.range, opt.circular) : 0; - })); - return { - pos: __assign$1({}, this._pos), - delta: delta - }; - }; - __proto.set = function (pos) { - for (var k in pos) { - if (k && k in this._pos) { - this._pos[k] = pos[k]; - } - } - }; - __proto.every = function (pos, callback) { - var axisOptions = this._axis; - return every(pos, function (value, key) { - return callback(value, axisOptions[key], key); - }); - }; - __proto.filter = function (pos, callback) { - var axisOptions = this._axis; - return filter(pos, function (value, key) { - return callback(value, axisOptions[key], key); - }); - }; - __proto.map = function (pos, callback) { - var axisOptions = this._axis; - return map(pos, function (value, key) { - return callback(value, axisOptions[key], key); - }); - }; - __proto.isOutside = function (axes) { - return !this.every(axes ? this.get(axes) : this._pos, function (v, opt) { - return !isOutside(v, opt.range); - }); - }; - __proto.getAxisOptions = function (key) { - return this._axis[key]; - }; - __proto.setAxis = function (axis) { - var _this = this; - Object.keys(axis).forEach(function (key) { - if (!_this._axis[key]) { - throw new Error("Axis ".concat(key, " does not exist in Axes instance")); - } - _this._axis[key] = __assign$1(__assign$1({}, _this._axis[key]), axis[key]); - }); - this._complementOptions(); - }; - /** - * set up 'css' expression - * @private - */ - __proto._complementOptions = function () { - var _this = this; - Object.keys(this._axis).forEach(function (axis) { - _this._axis[axis] = __assign$1({ - range: [0, 100], - startPos: _this._axis[axis].range[0], - bounce: [0, 0], - circular: [false, false] - }, _this._axis[axis]); - ["bounce", "circular"].forEach(function (v) { - var axisOption = _this._axis; - var key = axisOption[axis][v]; - if (/string|number|boolean/.test(typeof key)) { - axisOption[axis][v] = [key, key]; - } - }); - }); - }; - return AxisManager; - }(); - - var SUPPORT_TOUCH = ("ontouchstart" in win); - var SUPPORT_POINTER = ("PointerEvent" in win); - var SUPPORT_MSPOINTER = ("MSPointerEvent" in win); - var SUPPORT_POINTER_EVENTS = SUPPORT_POINTER || SUPPORT_MSPOINTER; - var isValidKey = function (event, inputKey) { - if (!inputKey || inputKey.indexOf(ANY) > -1 || inputKey.indexOf(NONE) > -1 && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey || inputKey.indexOf(SHIFT) > -1 && event.shiftKey || inputKey.indexOf(CTRL) > -1 && event.ctrlKey || inputKey.indexOf(ALT) > -1 && event.altKey || inputKey.indexOf(META) > -1 && event.metaKey) { - return true; - } - return false; - }; - var EventInput = /*#__PURE__*/function () { - function EventInput() { - var _this = this; - this._stopContextMenu = function (event) { - event.preventDefault(); - win.removeEventListener("contextmenu", _this._stopContextMenu); - }; - } - var __proto = EventInput.prototype; - __proto.extendEvent = function (event) { - var _a; - var prevEvent = this.prevEvent; - var center = this._getCenter(event); - var movement = prevEvent ? this._getMovement(event) : { - x: 0, - y: 0 - }; - var scale = prevEvent ? this._getScale(event) : 1; - var angle = prevEvent ? getAngle(center.x - prevEvent.center.x, center.y - prevEvent.center.y) : 0; - var deltaX = prevEvent ? prevEvent.deltaX + movement.x : movement.x; - var deltaY = prevEvent ? prevEvent.deltaY + movement.y : movement.y; - var offsetX = movement.x; - var offsetY = movement.y; - var latestInterval = this._latestInterval; - var timeStamp = Date.now(); - var deltaTime = latestInterval ? timeStamp - latestInterval.timestamp : 0; - var velocityX = prevEvent ? prevEvent.velocityX : 0; - var velocityY = prevEvent ? prevEvent.velocityY : 0; - if (!latestInterval || deltaTime >= VELOCITY_INTERVAL) { - if (latestInterval) { - _a = [(deltaX - latestInterval.deltaX) / deltaTime, (deltaY - latestInterval.deltaY) / deltaTime], velocityX = _a[0], velocityY = _a[1]; - } - this._latestInterval = { - timestamp: timeStamp, - deltaX: deltaX, - deltaY: deltaY - }; - } - return { - srcEvent: event, - scale: scale, - angle: angle, - center: center, - deltaX: deltaX, - deltaY: deltaY, - offsetX: offsetX, - offsetY: offsetY, - velocityX: velocityX, - velocityY: velocityY, - preventSystemEvent: true - }; - }; - __proto._getDistance = function (start, end) { - var x = end.clientX - start.clientX; - var y = end.clientY - start.clientY; - return Math.sqrt(x * x + y * y); - }; - __proto._getButton = function (event) { - var buttonCodeMap = { - 1: MOUSE_LEFT, - 2: MOUSE_RIGHT, - 4: MOUSE_MIDDLE - }; - var button = this._isTouchEvent(event) ? MOUSE_LEFT : buttonCodeMap[event.buttons]; - return button ? button : null; - }; - __proto._isTouchEvent = function (event) { - return event.type && event.type.indexOf("touch") > -1; - }; - __proto._isValidButton = function (button, inputButton) { - return inputButton.indexOf(button) > -1; - }; - __proto._isValidEvent = function (event, inputKey, inputButton) { - return (!inputKey || isValidKey(event, inputKey)) && (!inputButton || this._isValidButton(this._getButton(event), inputButton)); - }; - __proto._preventMouseButton = function (event, button) { - if (button === MOUSE_RIGHT) { - win.addEventListener("contextmenu", this._stopContextMenu); - } else if (button === MOUSE_MIDDLE) { - event.preventDefault(); - } - }; - return EventInput; - }(); - - var MouseEventInput = /*#__PURE__*/function (_super) { - __extends$1(MouseEventInput, _super); - function MouseEventInput() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.start = ["mousedown"]; - _this.move = ["mousemove"]; - _this.end = ["mouseup"]; - return _this; - } - var __proto = MouseEventInput.prototype; - __proto.onEventStart = function (event, inputKey, inputButton) { - var button = this._getButton(event); - if (!this._isValidEvent(event, inputKey, inputButton)) { - return null; - } - this._preventMouseButton(event, button); - return this.extendEvent(event); - }; - __proto.onEventMove = function (event, inputKey, inputButton) { - if (!this._isValidEvent(event, inputKey, inputButton)) { - return null; - } - return this.extendEvent(event); - }; - __proto.onEventEnd = function () { - return; - }; - __proto.onRelease = function () { - this.prevEvent = null; - return; - }; - __proto.getTouches = function (event, inputButton) { - if (inputButton) { - return this._isValidButton(MOUSE_BUTTON_CODE_MAP[event.which], inputButton) && this.end.indexOf(event.type) === -1 ? 1 : 0; - } - return 0; - }; - __proto._getScale = function () { - return 1; - }; - __proto._getCenter = function (event) { - return { - x: event.clientX, - y: event.clientY - }; - }; - __proto._getMovement = function (event) { - var prev = this.prevEvent.srcEvent; - return { - x: event.clientX - prev.clientX, - y: event.clientY - prev.clientY - }; - }; - return MouseEventInput; - }(EventInput); - - var TouchEventInput = /*#__PURE__*/function (_super) { - __extends$1(TouchEventInput, _super); - function TouchEventInput() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.start = ["touchstart"]; - _this.move = ["touchmove"]; - _this.end = ["touchend", "touchcancel"]; - return _this; - } - var __proto = TouchEventInput.prototype; - __proto.onEventStart = function (event, inputKey) { - this._baseTouches = event.touches; - if (!this._isValidEvent(event, inputKey)) { - return null; - } - return this.extendEvent(event); - }; - __proto.onEventMove = function (event, inputKey) { - if (!this._isValidEvent(event, inputKey)) { - return null; - } - return this.extendEvent(event); - }; - __proto.onEventEnd = function (event) { - this._baseTouches = event.touches; - return; - }; - __proto.onRelease = function () { - this.prevEvent = null; - this._baseTouches = null; - return; - }; - __proto.getTouches = function (event) { - return event.touches.length; - }; - __proto._getScale = function (event) { - if (event.touches.length !== 2 || this._baseTouches.length < 2) { - return null; // TODO: consider calculating non-pinch gesture scale - } - - return this._getDistance(event.touches[0], event.touches[1]) / this._getDistance(this._baseTouches[0], this._baseTouches[1]); - }; - __proto._getCenter = function (event) { - return { - x: event.touches[0].clientX, - y: event.touches[0].clientY - }; - }; - __proto._getMovement = function (event) { - var prev = this.prevEvent.srcEvent; - if (event.touches[0].identifier !== prev.touches[0].identifier) { - return { - x: 0, - y: 0 - }; - } - return { - x: event.touches[0].clientX - prev.touches[0].clientX, - y: event.touches[0].clientY - prev.touches[0].clientY - }; - }; - return TouchEventInput; - }(EventInput); - - var PointerEventInput = /*#__PURE__*/function (_super) { - __extends$1(PointerEventInput, _super); - function PointerEventInput() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.start = SUPPORT_POINTER ? ["pointerdown"] : ["MSPointerDown"]; - _this.move = SUPPORT_POINTER ? ["pointermove"] : ["MSPointerMove"]; - _this.end = SUPPORT_POINTER ? ["pointerup", "pointercancel"] : ["MSPointerUp", "MSPointerCancel"]; - // store first, recent inputs for each event id - _this._firstInputs = []; - _this._recentInputs = []; - return _this; - } - var __proto = PointerEventInput.prototype; - __proto.onEventStart = function (event, inputKey, inputButton) { - var button = this._getButton(event); - if (!this._isValidEvent(event, inputKey, inputButton)) { - return null; - } - this._preventMouseButton(event, button); - this._updatePointerEvent(event); - return this.extendEvent(event); - }; - __proto.onEventMove = function (event, inputKey, inputButton) { - if (!this._isValidEvent(event, inputKey, inputButton)) { - return null; - } - this._updatePointerEvent(event); - return this.extendEvent(event); - }; - __proto.onEventEnd = function (event) { - this._removePointerEvent(event); - }; - __proto.onRelease = function () { - this.prevEvent = null; - this._firstInputs = []; - this._recentInputs = []; - return; - }; - __proto.getTouches = function () { - return this._recentInputs.length; - }; - __proto._getScale = function () { - if (this._recentInputs.length !== 2) { - return null; // TODO: consider calculating non-pinch gesture scale - } - - return this._getDistance(this._recentInputs[0], this._recentInputs[1]) / this._getDistance(this._firstInputs[0], this._firstInputs[1]); - }; - __proto._getCenter = function (event) { - return { - x: event.clientX, - y: event.clientY - }; - }; - __proto._getMovement = function (event) { - var prev = this.prevEvent.srcEvent; - if (event.pointerId !== prev.pointerId) { - return { - x: 0, - y: 0 - }; - } - return { - x: event.clientX - prev.clientX, - y: event.clientY - prev.clientY - }; - }; - __proto._updatePointerEvent = function (event) { - var _this = this; - var addFlag = false; - this._recentInputs.forEach(function (e, i) { - if (e.pointerId === event.pointerId) { - addFlag = true; - _this._recentInputs[i] = event; - } - }); - if (!addFlag) { - this._firstInputs.push(event); - this._recentInputs.push(event); - } - }; - __proto._removePointerEvent = function (event) { - this._firstInputs = this._firstInputs.filter(function (x) { - return x.pointerId !== event.pointerId; - }); - this._recentInputs = this._recentInputs.filter(function (x) { - return x.pointerId !== event.pointerId; - }); - }; - return PointerEventInput; - }(EventInput); - - var TouchMouseEventInput = /*#__PURE__*/function (_super) { - __extends$1(TouchMouseEventInput, _super); - function TouchMouseEventInput() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.start = ["mousedown", "touchstart"]; - _this.move = ["mousemove", "touchmove"]; - _this.end = ["mouseup", "touchend", "touchcancel"]; - return _this; - } - var __proto = TouchMouseEventInput.prototype; - __proto.onEventStart = function (event, inputKey, inputButton) { - var button = this._getButton(event); - if (this._isTouchEvent(event)) { - this._baseTouches = event.touches; - } - if (!this._isValidEvent(event, inputKey, inputButton)) { - return null; - } - this._preventMouseButton(event, button); - return this.extendEvent(event); - }; - __proto.onEventMove = function (event, inputKey, inputButton) { - if (!this._isValidEvent(event, inputKey, inputButton)) { - return null; - } - return this.extendEvent(event); - }; - __proto.onEventEnd = function (event) { - if (this._isTouchEvent(event)) { - this._baseTouches = event.touches; - } - return; - }; - __proto.onRelease = function () { - this.prevEvent = null; - this._baseTouches = null; - return; - }; - __proto.getTouches = function (event, inputButton) { - if (this._isTouchEvent(event)) { - return event.touches.length; - } else { - return this._isValidButton(MOUSE_BUTTON_CODE_MAP[event.which], inputButton) && this.end.indexOf(event.type) === -1 ? 1 : 0; - } - }; - __proto._getScale = function (event) { - if (this._isTouchEvent(event)) { - if (event.touches.length !== 2 || this._baseTouches.length < 2) { - return 1; // TODO: consider calculating non-pinch gesture scale - } - - return this._getDistance(event.touches[0], event.touches[1]) / this._getDistance(this._baseTouches[0], this._baseTouches[1]); - } - return this.prevEvent.scale; - }; - __proto._getCenter = function (event) { - if (this._isTouchEvent(event)) { - return { - x: event.touches[0].clientX, - y: event.touches[0].clientY - }; - } - return { - x: event.clientX, - y: event.clientY - }; - }; - __proto._getMovement = function (event) { - var _this = this; - var prev = this.prevEvent.srcEvent; - var _a = [event, prev].map(function (e) { - if (_this._isTouchEvent(e)) { - return { - id: e.touches[0].identifier, - x: e.touches[0].clientX, - y: e.touches[0].clientY - }; - } - return { - id: null, - x: e.clientX, - y: e.clientY - }; - }), - nextSpot = _a[0], - prevSpot = _a[1]; - return nextSpot.id === prevSpot.id ? { - x: nextSpot.x - prevSpot.x, - y: nextSpot.y - prevSpot.y - } : { - x: 0, - y: 0 - }; - }; - return TouchMouseEventInput; - }(EventInput); - - var toAxis = function (source, offset) { - return offset.reduce(function (acc, v, i) { - if (source[i]) { - acc[source[i]] = v; - } - return acc; - }, {}); - }; - var convertInputType = function (inputType) { - if (inputType === void 0) { - inputType = []; - } - var hasTouch = false; - var hasMouse = false; - var hasPointer = false; - inputType.forEach(function (v) { - switch (v) { - case "mouse": - hasMouse = true; - break; - case "touch": - hasTouch = SUPPORT_TOUCH; - break; - case "pointer": - hasPointer = SUPPORT_POINTER_EVENTS; - // no default - } - }); - - if (hasPointer) { - return new PointerEventInput(); - } else if (hasTouch && hasMouse) { - return new TouchMouseEventInput(); - } else if (hasTouch) { - return new TouchEventInput(); - } else if (hasMouse) { - return new MouseEventInput(); - } - return null; - }; - function getAddEventOptions(eventName) { - // The passive default value of the touch event is true. - // If not a touch event, return false to support ie11 - return eventName.indexOf("touch") > -1 ? { - passive: false - } : false; - } - - var InputObserver = /*#__PURE__*/function () { - function InputObserver(_a) { - var options = _a.options, - interruptManager = _a.interruptManager, - eventManager = _a.eventManager, - axisManager = _a.axisManager, - animationManager = _a.animationManager; - this._isOutside = false; - this._moveDistance = null; - this._isStopped = false; - this.options = options; - this._interruptManager = interruptManager; - this._eventManager = eventManager; - this._axisManager = axisManager; - this._animationManager = animationManager; - } - var __proto = InputObserver.prototype; - __proto.get = function (input) { - return this._axisManager.get(input.axes); - }; - __proto.hold = function (input, event) { - if (this._interruptManager.isInterrupted() || !input.axes.length) { - return; - } - var changeOption = { - input: input, - event: event - }; - this._isStopped = false; - this._interruptManager.setInterrupt(true); - this._animationManager.stopAnimation(changeOption); - ++this._eventManager.holdingCount; - if (!this._moveDistance) { - this._eventManager.hold(this._axisManager.get(), changeOption); - } - this._isOutside = this._axisManager.isOutside(input.axes); - this._moveDistance = this._axisManager.get(input.axes); - }; - __proto.change = function (input, event, offset, useAnimation) { - if (this._isStopped || !this._interruptManager.isInterrupting() || this._axisManager.every(offset, function (v) { - return v === 0; - })) { - return; - } - var nativeEvent = event.srcEvent ? event.srcEvent : event; - if (nativeEvent.__childrenAxesAlreadyChanged) { - return; - } - var depaPos = this._moveDistance || this._axisManager.get(input.axes); - var destPos; - // for outside logic - destPos = map(depaPos, function (v, k) { - return v + (offset[k] || 0); - }); - if (this._moveDistance) { - this._moveDistance = this._axisManager.map(destPos, function (v, _a) { - var circular = _a.circular, - range = _a.range; - return circular && (circular[0] || circular[1]) ? getCirculatedPos(v, range, circular) : v; - }); - } - // from outside to inside - if (this._isOutside && this._axisManager.every(depaPos, function (v, opt) { - return !isOutside(v, opt.range); - })) { - this._isOutside = false; - } - depaPos = this._atOutside(depaPos); - destPos = this._atOutside(destPos); - if (!this.options.nested || !this._isEndofAxis(offset, depaPos, destPos)) { - nativeEvent.__childrenAxesAlreadyChanged = true; - } - var changeOption = { - input: input, - event: event - }; - if (useAnimation) { - var duration = this._animationManager.getDuration(destPos, depaPos); - this._animationManager.animateTo(destPos, duration, changeOption); - } else { - var isCanceled = !this._eventManager.triggerChange(destPos, depaPos, changeOption, true); - if (isCanceled) { - this._isStopped = true; - this._moveDistance = null; - this._animationManager.finish(false); - } - } - }; - __proto.release = function (input, event, velocity, inputDuration) { - if (this._isStopped || !this._interruptManager.isInterrupting() || !this._moveDistance) { - return; - } - var nativeEvent = event.srcEvent ? event.srcEvent : event; - if (nativeEvent.__childrenAxesAlreadyReleased) { - velocity = velocity.map(function () { - return 0; - }); - } - var pos = this._axisManager.get(input.axes); - var depaPos = this._axisManager.get(); - var displacement = this._animationManager.getDisplacement(velocity); - var offset = toAxis(input.axes, displacement); - var destPos = this._axisManager.get(this._axisManager.map(offset, function (v, opt, k) { - if (opt.circular && (opt.circular[0] || opt.circular[1])) { - return pos[k] + v; - } else { - return getInsidePosition(pos[k] + v, opt.range, opt.circular, opt.bounce); - } - })); - nativeEvent.__childrenAxesAlreadyReleased = true; - var duration = this._animationManager.getDuration(destPos, pos, inputDuration); - if (duration === 0) { - destPos = __assign$1({}, depaPos); - } - // prepare params - var param = { - depaPos: depaPos, - destPos: destPos, - duration: duration, - delta: this._axisManager.getDelta(depaPos, destPos), - inputEvent: event, - input: input, - isTrusted: true - }; - --this._eventManager.holdingCount; - this._eventManager.triggerRelease(param); - if (this._eventManager.holdingCount === 0) { - this._moveDistance = null; - } - // to contol - var userWish = this._animationManager.getUserControl(param); - var isEqual = equal(userWish.destPos, depaPos); - var changeOption = { - input: input, - event: event - }; - if (isEqual || userWish.duration === 0) { - if (!isEqual) { - this._eventManager.triggerChange(userWish.destPos, depaPos, changeOption, true); - } - this._interruptManager.setInterrupt(false); - if (this._axisManager.isOutside()) { - this._animationManager.restore(changeOption); - } else { - this._eventManager.triggerFinish(true); - } - } else { - this._animationManager.animateTo(userWish.destPos, userWish.duration, changeOption); - } - }; - // when move pointer is held in outside - __proto._atOutside = function (pos) { - var _this = this; - if (this._isOutside) { - return this._axisManager.map(pos, function (v, opt) { - var tn = opt.range[0] - opt.bounce[0]; - var tx = opt.range[1] + opt.bounce[1]; - return v > tx ? tx : v < tn ? tn : v; - }); - } else { - return this._axisManager.map(pos, function (v, opt) { - var min = opt.range[0]; - var max = opt.range[1]; - var out = opt.bounce; - var circular = opt.circular; - if (circular[0] && v < min || circular[1] && v > max) { - return v; - } else if (v < min) { - // left - return min - _this._animationManager.interpolate(min - v, out[0]); - } else if (v > max) { - // right - return max + _this._animationManager.interpolate(v - max, out[1]); - } - return v; - }); - } - }; - __proto._isEndofAxis = function (offset, depaPos, destPos) { - return this._axisManager.every(depaPos, function (value, option, key) { - return offset[key] === 0 || depaPos[key] === destPos[key] && isEndofBounce(value, option.range, option.bounce, option.circular); - }); - }; - return InputObserver; - }(); - - var clamp = function (value, min, max) { - return Math.max(Math.min(value, max), min); - }; - var AnimationManager = /*#__PURE__*/function () { - function AnimationManager(_a) { - var options = _a.options, - interruptManager = _a.interruptManager, - eventManager = _a.eventManager, - axisManager = _a.axisManager; - this._options = options; - this.interruptManager = interruptManager; - this.eventManager = eventManager; - this.axisManager = axisManager; - this.animationEnd = this.animationEnd.bind(this); - } - var __proto = AnimationManager.prototype; - __proto.getDuration = function (depaPos, destPos, wishDuration) { - var _this = this; - var duration; - if (typeof wishDuration !== "undefined") { - duration = wishDuration; - } else { - var durations_1 = map(destPos, function (v, k) { - return getDuration(Math.abs(v - depaPos[k]), _this._options.deceleration); - }); - duration = Object.keys(durations_1).reduce(function (max, v) { - return Math.max(max, durations_1[v]); - }, -Infinity); - } - return clamp(duration, this._options.minimumDuration, this._options.maximumDuration); - }; - __proto.getDisplacement = function (velocity) { - var totalVelocity = Math.pow(velocity.reduce(function (total, v) { - return total + v * v; - }, 0), 1 / velocity.length); - var duration = Math.abs(totalVelocity / -this._options.deceleration); - return velocity.map(function (v) { - return v / 2 * duration; - }); - }; - __proto.stopAnimation = function (option) { - if (this._animateParam) { - var orgPos_1 = this.axisManager.get(); - var pos = this.axisManager.map(orgPos_1, function (v, opt) { - return getCirculatedPos(v, opt.range, opt.circular); - }); - if (!every(pos, function (v, k) { - return orgPos_1[k] === v; - })) { - this.eventManager.triggerChange(pos, orgPos_1, option, !!option); - } - this._animateParam = null; - if (this._raf) { - cancelAnimationFrame(this._raf); - } - this._raf = null; - this.eventManager.triggerAnimationEnd(!!(option === null || option === void 0 ? void 0 : option.event)); - } - }; - __proto.getEventInfo = function () { - if (this._animateParam && this._animateParam.input && this._animateParam.inputEvent) { - return { - input: this._animateParam.input, - event: this._animateParam.inputEvent - }; - } else { - return null; - } - }; - __proto.restore = function (option) { - var pos = this.axisManager.get(); - var destPos = this.axisManager.map(pos, function (v, opt) { - return Math.min(opt.range[1], Math.max(opt.range[0], v)); - }); - this.stopAnimation(); - this.animateTo(destPos, this.getDuration(pos, destPos), option); - }; - __proto.animationEnd = function () { - var beforeParam = this.getEventInfo(); - this._animateParam = null; - // for Circular - var circularTargets = this.axisManager.filter(this.axisManager.get(), function (v, opt) { - return isCircularable(v, opt.range, opt.circular); - }); - if (Object.keys(circularTargets).length > 0) { - this.setTo(this.axisManager.map(circularTargets, function (v, opt) { - return getCirculatedPos(v, opt.range, opt.circular); - })); - } - this.interruptManager.setInterrupt(false); - this.eventManager.triggerAnimationEnd(!!beforeParam); - if (this.axisManager.isOutside()) { - this.restore(beforeParam); - } else { - this.finish(!!beforeParam); - } - }; - __proto.finish = function (isTrusted) { - this._animateParam = null; - this.interruptManager.setInterrupt(false); - this.eventManager.triggerFinish(isTrusted); - }; - __proto.getUserControl = function (param) { - var userWish = param.setTo(); - userWish.destPos = this.axisManager.get(userWish.destPos); - userWish.duration = clamp(userWish.duration, this._options.minimumDuration, this._options.maximumDuration); - return userWish; - }; - __proto.animateTo = function (destPos, duration, option) { - var _this = this; - this.stopAnimation(); - var param = this._createAnimationParam(destPos, duration, option); - var depaPos = __assign$1({}, param.depaPos); - var retTrigger = this.eventManager.triggerAnimationStart(param); - // to control - var userWish = this.getUserControl(param); - // You can't stop the 'animationStart' event when 'circular' is true. - if (!retTrigger && this.axisManager.every(userWish.destPos, function (v, opt) { - return isCircularable(v, opt.range, opt.circular); - })) { - console.warn("You can't stop the 'animation' event when 'circular' is true."); - } - if (retTrigger && !equal(userWish.destPos, depaPos)) { - var inputEvent = (option === null || option === void 0 ? void 0 : option.event) || null; - this._animateLoop({ - depaPos: depaPos, - destPos: userWish.destPos, - duration: userWish.duration, - delta: this.axisManager.getDelta(depaPos, userWish.destPos), - isTrusted: !!inputEvent, - inputEvent: inputEvent, - input: (option === null || option === void 0 ? void 0 : option.input) || null - }, function () { - return _this.animationEnd(); - }); - } - }; - __proto.setTo = function (pos, duration) { - if (duration === void 0) { - duration = 0; - } - var axes = Object.keys(pos); - var orgPos = this.axisManager.get(axes); - if (equal(pos, orgPos)) { - return this; - } - this.interruptManager.setInterrupt(true); - var movedPos = filter(pos, function (v, k) { - return orgPos[k] !== v; - }); - if (!Object.keys(movedPos).length) { - return this; - } - movedPos = this.axisManager.map(movedPos, function (v, opt) { - var range = opt.range, - circular = opt.circular; - if (circular && (circular[0] || circular[1])) { - return v; - } else { - return getInsidePosition(v, range, circular); - } - }); - if (equal(movedPos, orgPos)) { - return this; - } - if (duration > 0) { - this.animateTo(movedPos, duration); - } else { - this.stopAnimation(); - this.eventManager.triggerChange(movedPos); - this.finish(false); - } - return this; - }; - __proto.setBy = function (pos, duration) { - if (duration === void 0) { - duration = 0; - } - return this.setTo(map(this.axisManager.get(Object.keys(pos)), function (v, k) { - return v + pos[k]; - }), duration); - }; - __proto.setOptions = function (options) { - this._options = __assign$1(__assign$1({}, this._options), options); - }; - __proto._createAnimationParam = function (pos, duration, option) { - var depaPos = this.axisManager.get(); - var destPos = pos; - var inputEvent = (option === null || option === void 0 ? void 0 : option.event) || null; - return { - depaPos: depaPos, - destPos: destPos, - duration: clamp(duration, this._options.minimumDuration, this._options.maximumDuration), - delta: this.axisManager.getDelta(depaPos, destPos), - inputEvent: inputEvent, - input: (option === null || option === void 0 ? void 0 : option.input) || null, - isTrusted: !!inputEvent, - done: this.animationEnd - }; - }; - __proto._animateLoop = function (param, complete) { - var _this = this; - if (param.duration) { - this._animateParam = __assign$1(__assign$1({}, param), { - startTime: new Date().getTime() - }); - var originalIntendedPos_1 = map(param.destPos, function (v) { - return v; - }); - var state_1 = this._initState(this._animateParam); - var loop_1 = function () { - _this._raf = null; - var animateParam = _this._animateParam; - var nextState = _this._getNextState(state_1); - var isCanceled = !_this.eventManager.triggerChange(nextState.pos, state_1.pos); - state_1 = nextState; - if (nextState.finished) { - animateParam.destPos = _this._getFinalPos(animateParam.destPos, originalIntendedPos_1); - if (!equal(animateParam.destPos, _this.axisManager.get(Object.keys(animateParam.destPos)))) { - _this.eventManager.triggerChange(animateParam.destPos, nextState.pos); - } - complete(); - return; - } else if (isCanceled) { - _this.finish(false); - } else { - _this._raf = requestAnimationFrame(loop_1); - } - }; - loop_1(); - } else { - this.eventManager.triggerChange(param.destPos); - complete(); - } - }; - /** - * Get estimated final value. - * - * If destPos is within the 'error range' of the original intended position, the initial intended position is returned. - * - eg. original intended pos: 100, destPos: 100.0000000004 ==> return 100; - * If dest Pos is outside the 'range of error' compared to the originally intended pos, it is returned rounded based on the originally intended pos. - * - eg. original intended pos: 100.123 destPos: 50.12345 => return 50.123 - * @param originalIntendedPos - * @param destPos - */ - __proto._getFinalPos = function (destPos, originalIntendedPos) { - var _this = this; - // compare destPos and originalIntendedPos - // eslint-disable-next-line @typescript-eslint/naming-convention - var ERROR_LIMIT = 0.000001; - var finalPos = map(destPos, function (value, key) { - if (value >= originalIntendedPos[key] - ERROR_LIMIT && value <= originalIntendedPos[key] + ERROR_LIMIT) { - // In error range, return original intended - return originalIntendedPos[key]; - } else { - // Out of error range, return rounded pos. - var roundUnit = _this._getRoundUnit(value, key); - var result = roundNumber(value, roundUnit); - return result; - } - }); - return finalPos; - }; - __proto._getRoundUnit = function (val, key) { - var roundUnit = this._options.round; // manual mode - var minRoundUnit = null; // auto mode - // auto mode - if (!roundUnit) { - // Get minimum round unit - var options = this.axisManager.getAxisOptions(key); - minRoundUnit = inversePow(Math.max(getDecimalPlace(options.range[0]), getDecimalPlace(options.range[1]), getDecimalPlace(val))); - } - return minRoundUnit || roundUnit; - }; - return AnimationManager; - }(); - - var EasingManager = /*#__PURE__*/function (_super) { - __extends$1(EasingManager, _super); - function EasingManager() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this._useDuration = true; - return _this; - } - var __proto = EasingManager.prototype; - __proto.interpolate = function (displacement, threshold) { - var initSlope = this._easing(0.00001) / 0.00001; - return this._easing(displacement / (threshold * initSlope)) * threshold; - }; - __proto.updateAnimation = function (options) { - var _a; - var animateParam = this._animateParam; - if (!animateParam) { - return; - } - var diffTime = new Date().getTime() - animateParam.startTime; - var pos = (options === null || options === void 0 ? void 0 : options.destPos) || animateParam.destPos; - var duration = (_a = options === null || options === void 0 ? void 0 : options.duration) !== null && _a !== void 0 ? _a : animateParam.duration; - if ((options === null || options === void 0 ? void 0 : options.restart) || duration <= diffTime) { - this.setTo(pos, duration - diffTime); - return; - } - if (options === null || options === void 0 ? void 0 : options.destPos) { - var currentPos = this.axisManager.get(); - // When destination is changed, new delta should be calculated as remaining percent. - // For example, moving x:0, y:0 to x:200, y:200 and it has current easing percent of 92%. coordinate is x:184 and y:184 - // If destination changes to x:300, y:300. xdelta:200, ydelta:200 changes to xdelta:116, ydelta:116 and use remaining easingPer as 100%, not 8% as previous. - // Therefore, original easingPer by time is kept. And divided by (1 - self._initialEasingPer) which means new total easing percent. Like calculating 8% as 100%. - this._initialEasingPer = this._prevEasingPer; - animateParam.delta = this.axisManager.getDelta(currentPos, pos); - animateParam.destPos = pos; - } - if (options === null || options === void 0 ? void 0 : options.duration) { - var ratio = (diffTime + this._durationOffset) / animateParam.duration; - // Use durationOffset for keeping animation ratio after duration is changed. - // newRatio = (diffTime + newDurationOffset) / newDuration = oldRatio - // newDurationOffset = oldRatio * newDuration - diffTime - this._durationOffset = ratio * duration - diffTime; - animateParam.duration = duration; - } - }; - __proto._initState = function (info) { - this._initialEasingPer = 0; - this._prevEasingPer = 0; - this._durationOffset = 0; - return { - pos: info.depaPos, - easingPer: 0, - finished: false - }; - }; - __proto._getNextState = function (prevState) { - var _this = this; - var animateParam = this._animateParam; - var prevPos = prevState.pos; - var destPos = animateParam.destPos; - var directions = map(prevPos, function (value, key) { - return value <= destPos[key] ? 1 : -1; - }); - var diffTime = new Date().getTime() - animateParam.startTime; - var ratio = (diffTime + this._durationOffset) / animateParam.duration; - var easingPer = this._easing(ratio); - var toPos = this.axisManager.map(prevPos, function (pos, options, key) { - var nextPos = ratio >= 1 ? destPos[key] : pos + animateParam.delta[key] * (easingPer - _this._prevEasingPer) / (1 - _this._initialEasingPer); - // Subtract distance from distance already moved. - // Recalculate the remaining distance. - // Fix the bouncing phenomenon by changing the range. - var circulatedPos = getCirculatedPos(nextPos, options.range, options.circular); - if (nextPos !== circulatedPos) { - // circular - var rangeOffset = directions[key] * (options.range[1] - options.range[0]); - destPos[key] -= rangeOffset; - prevPos[key] -= rangeOffset; - } - return circulatedPos; - }); - this._prevEasingPer = easingPer; - return { - pos: toPos, - easingPer: easingPer, - finished: easingPer >= 1 - }; - }; - __proto._easing = function (p) { - return p > 1 ? 1 : this._options.easing(p); - }; - return EasingManager; - }(AnimationManager); - - /** - * @typedef {Object} AxisOption The Axis information. The key of the axis specifies the name to use as the logical virtual coordinate system. - * @ko 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다. - * @param {Number[]} [range] The range of coordinate 좌표 범위 - * @param {Number} [range[0]=0] The coordinate of the minimum 최소 좌표 - * @param {Number} [range[1]=0] The coordinate of the maximum 최대 좌표 - * @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance 인스턴스 생성시 이동할 좌표 - * @param {Number[]} [bounce] The size of bouncing area. The coordinates can exceed the coordinate area as much as the bouncing area based on user action. If the coordinates does not exceed the bouncing area when an element is dragged, the coordinates where bouncing effects are applied are retuned back into the coordinate area바운스 영역의 크기. 사용자의 동작에 따라 좌표가 좌표 영역을 넘어 바운스 영역의 크기만큼 더 이동할 수 있다. 사용자가 끌어다 놓는 동작을 했을 때 좌표가 바운스 영역에 있으면, 바운스 효과가 적용된 좌표가 다시 좌표 영역 안으로 들어온다 - * @param {Number} [bounce[0]=0] The size of coordinate of the minimum area 최소 좌표 바운스 영역의 크기 - * @param {Number} [bounce[1]=0] The size of coordinate of the maximum area 최대 좌표 바운스 영역의 크기 - * @param {Boolean[]} [circular] Indicates whether a circular element is available. If it is set to "true" and an element is dragged outside the coordinate area, the element will appear on the other side.순환 여부. 'true'로 설정한 방향의 좌표 영역 밖으로 엘리먼트가 이동하면 반대 방향에서 엘리먼트가 나타난다 - * @param {Boolean} [circular[0]=false] Indicates whether to circulate to the coordinate of the minimum 최소 좌표 방향의 순환 여부 - * @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum 최대 좌표 방향의 순환 여부 - **/ - /** - * @typedef {Object} AxesOption The option object of the eg.Axes module - * @ko eg.Axes 모듈의 옵션 객체 - * @param {Function} [easing=easing.easeOutCubic] The easing function to apply to an animation 애니메이션에 적용할 easing 함수 - * @param {Number} [maximumDuration=Infinity] Maximum duration of the animation 가속도에 의해 애니메이션이 동작할 때의 최대 좌표 이동 시간 - * @param {Number} [minimumDuration=0] Minimum duration of the animation 가속도에 의해 애니메이션이 동작할 때의 최소 좌표 이동 시간 - * @param {Number} [deceleration=0.0006] Deceleration of the animation where acceleration is manually enabled by user. A higher value indicates shorter running time. 사용자의 동작으로 가속도가 적용된 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아진다 - * @param {Boolean} [interruptable=true] Indicates whether an animation is interruptible. - * - true: It can be paused or stopped by user action or the API. - * - false: It cannot be paused or stopped by user action or the API while it is running. - * 진행 중인 애니메이션 중지 가능 여부. - * - true: 사용자의 동작이나 API로 애니메이션을 중지할 수 있다. - * - false: 애니메이션이 진행 중일 때는 사용자의 동작이나 API가 적용되지 않는다 - * @param {Number} [round=null] Rounding unit. For example, 0.1 rounds to 0.1 decimal point(6.1234 => 6.1), 5 rounds to 5 (93 => 95) - * [Details](https://github.com/naver/egjs-axes/wiki/round-option)반올림 단위. 예를 들어 0.1 은 소숫점 0.1 까지 반올림(6.1234 => 6.1), 5 는 5 단위로 반올림(93 => 95). - * [상세내용](https://github.com/naver/egjs-axes/wiki/round-option) - * @param {Boolean} [nested=false] Whether the event propagates to other instances when the coordinates reach the end of the movable area 좌표가 이동 가능한 영역의 끝까지 도달했을 때 다른 인스턴스들로의 이벤트 전파 여부 - **/ - /** - * A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions. - * @ko 터치 입력 장치나 마우스와 같은 다양한 입력 장치를 통해 전달 받은 사용자의 동작을 논리적인 가상 좌표로 변경하는 모듈이다. 사용자 동작에 반응하는 UI를 손쉽게 만들수 있다. - * @extends eg.Component - * - * @param {Object.} axis Axis information managed by eg.Axes. The key of the axis specifies the name to use as the logical virtual coordinate system. eg.Axes가 관리하는 축 정보. 축의 키는 논리적인 가상 좌표계로 사용할 이름을 지정한다. - * @param {AxesOption} [options={}] The option object of the eg.Axes moduleeg.Axes 모듈의 옵션 객체 - * @param {Object.} [startPos={}] The coordinates to be moved when creating an instance. It is applied with higher priority than startPos of axisOption.인스턴스 생성시 이동할 좌표, axisOption의 startPos보다 높은 우선순위로 적용된다. - * - * @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"} - * @example - * ```js - * // 1. Initialize eg.Axes - * const axes = new eg.Axes({ - * something1: { - * range: [0, 150], - * bounce: 50 - * }, - * something2: { - * range: [0, 200], - * bounce: 100 - * }, - * somethingN: { - * range: [1, 10], - * } - * }, { - * deceleration : 0.0024 - * }); - * - * // 2. attach event handler - * axes.on({ - * "hold" : function(evt) { - * }, - * "release" : function(evt) { - * }, - * "animationStart" : function(evt) { - * }, - * "animationEnd" : function(evt) { - * }, - * "change" : function(evt) { - * } - * }); - * - * // 3. Initialize inputTypes - * const panInputArea = new eg.Axes.PanInput("#area", { - * scale: [0.5, 1] - * }); - * const panInputHmove = new eg.Axes.PanInput("#hmove"); - * const panInputVmove = new eg.Axes.PanInput("#vmove"); - * const pinchInputArea = new eg.Axes.PinchInput("#area", { - * scale: 1.5 - * }); - * - * // 4. Connect eg.Axes and InputTypes - * // [PanInput] When the mouse or touchscreen is down and moved. - * // Connect the 'something2' axis to the mouse or touchscreen x position and - * // connect the 'somethingN' axis to the mouse or touchscreen y position. - * axes.connect(["something2", "somethingN"], panInputArea); // or axes.connect("something2 somethingN", panInputArea); - * - * // Connect only one 'something1' axis to the mouse or touchscreen x position. - * axes.connect(["something1"], panInputHmove); // or axes.connect("something1", panInputHmove); - * - * // Connect only one 'something2' axis to the mouse or touchscreen y position. - * axes.connect(["", "something2"], panInputVmove); // or axes.connect(" something2", panInputVmove); - * - * // [PinchInput] Connect 'something2' axis when two pointers are moving toward (zoom-in) or away from each other (zoom-out). - * axes.connect("something2", pinchInputArea); - * ``` - */ - var Axes = /*#__PURE__*/function (_super) { - __extends$1(Axes, _super); - /** - * - */ - function Axes(axis, options, startPos) { - if (axis === void 0) { - axis = {}; - } - if (options === void 0) { - options = {}; - } - if (startPos === void 0) { - startPos = {}; - } - var _this = _super.call(this) || this; - _this.axis = axis; - _this._inputs = []; - _this.options = __assign$1({ - easing: function (x) { - return 1 - Math.pow(1 - x, 3); - }, - interruptable: true, - maximumDuration: Infinity, - minimumDuration: 0, - deceleration: 0.0006, - round: null, - nested: false - }, options); - Object.keys(startPos).forEach(function (key) { - _this.axis[key].startPos = startPos[key]; - }); - _this.interruptManager = new InterruptManager(_this.options); - _this.axisManager = new AxisManager(_this.axis); - _this.eventManager = new EventManager(_this); - _this.animationManager = new EasingManager(_this); - _this.inputObserver = new InputObserver(_this); - _this.eventManager.setAnimationManager(_this.animationManager); - _this.eventManager.triggerChange(_this.axisManager.get()); - return _this; - } - var __proto = Axes.prototype; - Object.defineProperty(__proto, "holding", { - /** - * @name Axes#holding - * @desc Returns true if at least one input is in progress. - * @ko 입력이 하나 이상 진행 중인지 여부를 반환한다. - * - * @readonly - * @type {boolean} - * @example - * ```js - * const axes = new eg.Axes({ - * x: { - * range: [0, 100], - * }, - * }); - * - * axes.holding - * ``` - */ - get: function () { - return this.eventManager.holdingCount > 0; - }, - enumerable: false, - configurable: true - }); - /** - * Connect the axis of eg.Axes to the inputType. - * @ko eg.Axes의 축과 inputType을 연결한다 - * @param {(String[]|String)} axes The name of the axis to associate with inputType inputType과 연결할 축의 이름 - * @param {Object} inputType The inputType instance to associate with the axis of eg.Axes eg.Axes의 축과 연결할 inputType 인스턴스 - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "xOther": { - * range: [-100, 100] - * } - * }); - * - * axes.connect("x", new eg.Axes.PanInput("#area1")) - * .connect("x xOther", new eg.Axes.PanInput("#area2")) - * .connect(" xOther", new eg.Axes.PanInput("#area3")) - * .connect(["x"], new eg.Axes.PanInput("#area4")) - * .connect(["xOther", "x"], new eg.Axes.PanInput("#area5")) - * .connect(["", "xOther"], new eg.Axes.PanInput("#area6")); - * ``` - */ - __proto.connect = function (axes, inputType) { - var mapped; - if (typeof axes === "string") { - mapped = axes.split(" "); - } else { - mapped = axes.concat(); - } - // check same instance - if (~this._inputs.indexOf(inputType)) { - this.disconnect(inputType); - } - inputType.mapAxes(mapped); - inputType.connect(this.inputObserver); - this._inputs.push(inputType); - return this; - }; - /** - * Disconnect the axis of eg.Axes from the inputType. - * @ko eg.Axes의 축과 inputType의 연결을 끊는다. - * @param {Object} [inputType] An inputType instance associated with the axis of eg.Axes eg.Axes의 축과 연결한 inputType 인스턴스 - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "xOther": { - * range: [-100, 100] - * } - * }); - * - * const input1 = new eg.Axes.PanInput("#area1"); - * const input2 = new eg.Axes.PanInput("#area2"); - * const input3 = new eg.Axes.PanInput("#area3"); - * - * axes.connect("x", input1); - * .connect("x xOther", input2) - * .connect(["xOther", "x"], input3); - * - * axes.disconnect(input1); // disconnects input1 - * axes.disconnect(); // disconnects all of them - * ``` - */ - __proto.disconnect = function (inputType) { - if (inputType) { - var index = this._inputs.indexOf(inputType); - if (index >= 0) { - this._inputs[index].disconnect(); - this._inputs.splice(index, 1); - } - } else { - this._inputs.forEach(function (v) { - return v.disconnect(); - }); - this._inputs = []; - } - return this; - }; - /** - * Returns the current position of the coordinates. - * @ko 좌표의 현재 위치를 반환한다 - * @param {Object} [axes] The names of the axis 축 이름들 - * @return {Object.} Axis coordinate information 축 좌표 정보 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "xOther": { - * range: [-100, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }); - * - * axes.get(); // {"x": 0, "xOther": -100, "zoom": 50} - * axes.get(["x", "zoom"]); // {"x": 0, "zoom": 50} - * ``` - */ - __proto.get = function (axes) { - return this.axisManager.get(axes); - }; - /** - * Moves an axis to specific coordinates. - * @ko 좌표를 이동한다. - * @param {Object.} pos The coordinate to move to 이동할 좌표 - * @param {Number} [duration=0] Duration of the animation (unit: ms) 애니메이션 진행 시간(단위: ms) - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "xOther": { - * range: [-100, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }); - * - * axes.setTo({"x": 30, "zoom": 60}); - * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60} - * - * axes.setTo({"x": 100, "xOther": 60}, 1000); // animatation - * - * // after 1000 ms - * axes.get(); // {"x": 100, "xOther": 60, "zoom": 60} - * ``` - */ - __proto.setTo = function (pos, duration) { - if (duration === void 0) { - duration = 0; - } - this.animationManager.setTo(pos, duration); - return this; - }; - /** - * Moves an axis from the current coordinates to specific coordinates. - * @ko 현재 좌표를 기준으로 좌표를 이동한다. - * @param {Object.} pos The coordinate to move to 이동할 좌표 - * @param {Number} [duration=0] Duration of the animation (unit: ms) 애니메이션 진행 시간(단위: ms) - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "xOther": { - * range: [-100, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }); - * - * axes.setBy({"x": 30, "zoom": 10}); - * axes.get(); // {"x": 30, "xOther": -100, "zoom": 60} - * - * axes.setBy({"x": 70, "xOther": 60}, 1000); // animatation - * - * // after 1000 ms - * axes.get(); // {"x": 100, "xOther": -40, "zoom": 60} - * ``` - */ - __proto.setBy = function (pos, duration) { - if (duration === void 0) { - duration = 0; - } - this.animationManager.setBy(pos, duration); - return this; - }; - /** - * Change the options of Axes instance. - * @ko 인스턴스의 옵션을 변경한다. - * @param {AxesOption} options Axes options to change 변경할 옵션 목록 - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * }, { - * round: 10, - * }); - * - * axes.setTo({"x": 48}); - * axes.get(); // {"x": 50} - * - * axes.setOptions({ - * round: 1, - * }); - * - * axes.setTo({"x": 48}); - * axes.get(); // {"x": 48} - * ``` - */ - __proto.setOptions = function (options) { - this.options = __assign$1(__assign$1({}, this.options), options); - this.animationManager.setOptions(options); - return this; - }; - /** - * Change the information of an existing axis. - * @ko 존재하는 축의 정보를 변경한다. - * @param {Object.} axis Axis options to change 변경할 축의 정보 - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * }); - * - * axes.setTo({"x": 150}); - * axes.get(); // {"x": 100} - * - * axes.setAxis({ - * "x": { - * range: [0, 200] - * }, - * }); - * - * axes.setTo({"x": 150}); - * axes.get(); // {"x": 150} - * ``` - */ - __proto.setAxis = function (axis) { - this.axisManager.setAxis(axis); - return this; - }; - /** - * Stop an animation in progress. - * @ko 재생 중인 애니메이션을 정지한다. - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * }); - * - * axes.setTo({"x": 10}, 1000); // start animatation - * - * // after 500 ms - * axes.stopAnimation(); // stop animation during movement. - * ``` - */ - __proto.stopAnimation = function () { - this.animationManager.stopAnimation(); - this.animationManager.finish(false); - return this; - }; - /** - * Change the destination of an animation in progress. - * @ko 재생 중인 애니메이션의 목적지와 진행 시간을 변경한다. - * @param {UpdateAnimationOption} pos The coordinate to move to 이동할 좌표 - * @return {eg.Axes} An instance of a module itself 모듈 자신의 인스턴스 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 200] - * }, - * "y": { - * range: [0, 200] - * } - * }); - * - * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo - * - * // after 500 ms - * axes.updateAnimation({destPos: {"x": 100, "y": 100}}); // animation will end after 500 ms, at {"x": 100, "y": 100} - * - * // after 500 ms - * axes.setTo({"x": 50, "y": 50}, 1000); // trigger animation by setTo - * - * // after 700 ms - * axes.updateAnimation({destPos: {"x": 100, "y": 100}, duration: 1500, restart: true}); // this works same as axes.setTo({"x": 100, "y": 100}, 800) since restart is true. - * ``` - */ - __proto.updateAnimation = function (options) { - this.animationManager.updateAnimation(options); - return this; - }; - /** - * Returns whether there is a coordinate in the bounce area of ​​the target axis. - * @ko 대상 축 중 bounce영역에 좌표가 존재하는지를 반환한다 - * @param {Object} [axes] The names of the axis 축 이름들 - * @return {Boolen} Whether the bounce area exists. bounce 영역 존재 여부 - * @example - * ```js - * const axes = new eg.Axes({ - * "x": { - * range: [0, 100] - * }, - * "xOther": { - * range: [-100, 100] - * }, - * "zoom": { - * range: [50, 30] - * } - * }); - * - * axes.isBounceArea(["x"]); - * axes.isBounceArea(["x", "zoom"]); - * axes.isBounceArea(); - * ``` - */ - __proto.isBounceArea = function (axes) { - return this.axisManager.isOutside(axes); - }; - /** - * Destroys properties, and events used in a module and disconnect all connections to inputTypes. - * @ko 모듈에 사용한 속성, 이벤트를 해제한다. 모든 inputType과의 연결을 끊는다. - */ - __proto.destroy = function () { - this.disconnect(); - this.eventManager.destroy(); - }; - /** - * @name VERSION - * @desc Version info string - * @ko 버전정보 문자열 - * - * @constant - * @type {String} - * @example - * ```js - * eg.Axes.VERSION; // ex) 3.3.3 - * ``` - */ - Axes.VERSION = "3.9.1"; - /* eslint-enable */ - /** - * @name TRANSFORM - * @desc Returns the transform attribute with CSS vendor prefixes. - * @ko CSS vendor prefixes를 붙인 transform 속성을 반환한다. - * - * @constant - * @type {String} - * @example - * ```js - * eg.Axes.TRANSFORM; // "transform" or "webkitTransform" - * ``` - */ - Axes.TRANSFORM = TRANSFORM; - /** - * @name DIRECTION_NONE - * @constant - * @type {Number} - */ - Axes.DIRECTION_NONE = DIRECTION_NONE; - /** - * @name DIRECTION_LEFT - * @constant - * @type {Number} - */ - Axes.DIRECTION_LEFT = DIRECTION_LEFT; - /** - * @name DIRECTION_RIGHT - * @constant - * @type {Number} - */ - Axes.DIRECTION_RIGHT = DIRECTION_RIGHT; - /** - * @name DIRECTION_UP - * @constant - * @type {Number} - */ - Axes.DIRECTION_UP = DIRECTION_UP; - /** - * @name DIRECTION_DOWN - * @constant - * @type {Number} - */ - Axes.DIRECTION_DOWN = DIRECTION_DOWN; - /** - * @name DIRECTION_HORIZONTAL - * @constant - * @type {Number} - */ - Axes.DIRECTION_HORIZONTAL = DIRECTION_HORIZONTAL; - /** - * @name DIRECTION_VERTICAL - * @constant - * @type {Number} - */ - Axes.DIRECTION_VERTICAL = DIRECTION_VERTICAL; - /** - * @name DIRECTION_ALL - * @constant - * @type {Number} - */ - Axes.DIRECTION_ALL = DIRECTION_ALL; - __decorate([Computed], Axes.prototype, "holding", null); - Axes = __decorate([ReactiveSubscribe], Axes); - return Axes; - }(Component); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - // get user's direction - var getDirectionByAngle = function (angle, thresholdAngle) { - if (thresholdAngle < 0 || thresholdAngle > 90) { - return DIRECTION_NONE; - } - var toAngle = Math.abs(angle); - return toAngle > thresholdAngle && toAngle < 180 - thresholdAngle ? DIRECTION_VERTICAL : DIRECTION_HORIZONTAL; - }; - /** - * @typedef {Object} PanInputOption The option object of the eg.Axes.PanInput module. - * @ko eg.Axes.PanInput 모듈의 옵션 객체 - * @param {String[]} [inputType=["touch", "mouse", "pointer"]] Types of input devices - * - touch: Touch screen - * - mouse: Mouse - * - pointer: Mouse and touch 입력 장치 종류 - * - touch: 터치 입력 장치 - * - mouse: 마우스 - * - pointer: 마우스 및 터치 - * @param {String[]} [inputKey=["any"]] List of key combinations to allow input - * - any: any key - * - shift: shift key - * - ctrl: ctrl key and pinch gesture on the trackpad - * - alt: alt key - * - meta: meta key - * - none: none of these keys are pressed 입력을 허용할 키 조합 목록 - * - any: 아무 키 - * - shift: shift 키 - * - ctrl: ctrl 키 및 트랙패드의 pinch 제스쳐 - * - alt: alt 키 - * - meta: meta 키 - * - none: 아무 키도 눌리지 않은 상태 - * @param {String[]} [inputButton=["left"]] List of buttons to allow input - * - left: Left mouse button and normal touch - * - middle: Mouse wheel press - * - right: Right mouse button 입력을 허용할 버튼 목록 - * - left: 마우스 왼쪽 버튼 - * - middle: 마우스 휠 눌림 - * - right: 마우스 오른쪽 버튼 - * @param {Number[]} [scale] Coordinate scale that a user can move사용자의 동작으로 이동하는 좌표의 배율 - * @param {Number} [scale[0]=1] horizontal axis scale 수평축 배율 - * @param {Number} [scale[1]=1] vertical axis scale 수직축 배율 - * @param {Number} [thresholdAngle=45] The threshold value that determines whether user action is horizontal or vertical (0~90) 사용자의 동작이 가로 방향인지 세로 방향인지 판단하는 기준 각도(0~90) - * @param {Number} [threshold=0] Minimal pan distance required before recognizing 사용자의 Pan 동작을 인식하기 위해산 최소한의 거리 - * @param {Boolean} [preventClickOnDrag=false] Whether to cancel the {@link https://developer.mozilla.org/en/docs/Web/API/Element/click_event click} event when the user finishes dragging more than 1 pixel 사용자가 1픽셀 이상 드래그를 마쳤을 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트 취소 여부 - * @param {Boolean} [preventDefaultOnDrag=false] Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부 - * @param {Number} [iOSEdgeSwipeThreshold=30] Area (px) that can go to the next page when swiping the right edge in iOS safari iOS Safari에서 오른쪽 엣지를 스와이프 하는 경우 다음 페이지로 넘어갈 수 있는 영역(px) - * @param {String} [touchAction=null] Value that overrides the element's "touch-action" css property. If set to null, it is automatically set to prevent scrolling in the direction of the connected axis. 엘리먼트의 "touch-action" CSS 속성을 덮어쓰는 값. 만약 null로 설정된 경우, 연결된 축 방향으로의 스크롤을 방지하게끔 자동으로 설정된다. - **/ - /** - * A module that passes the amount of change to eg.Axes when the mouse or touchscreen is down and moved. use less than two axes. - * @ko 마우스나 터치 스크린을 누르고 움직일때의 변화량을 eg.Axes에 전달하는 모듈. 두개 이하의 축을 사용한다. - * - * @example - * ```js - * const pan = new eg.Axes.PanInput("#area", { - * inputType: ["touch"], - * scale: [1, 1.3], - * }); - * - * // Connect the 'something2' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved. - * // Connect the 'somethingN' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved. - * axes.connect(["something2", "somethingN"], pan); // or axes.connect("something2 somethingN", pan); - * - * // Connect only one 'something1' axis to the mouse or touchscreen x position when the mouse or touchscreen is down and moved. - * axes.connect(["something1"], pan); // or axes.connect("something1", pan); - * - * // Connect only one 'something2' axis to the mouse or touchscreen y position when the mouse or touchscreen is down and moved. - * axes.connect(["", "something2"], pan); // or axes.connect(" something2", pan); - * ``` - * @param {String|HTMLElement|Ref|jQuery} element An element to use the eg.Axes.PanInput module eg.Axes.PanInput 모듈을 사용할 엘리먼트 - * @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput moduleeg.Axes.PanInput 모듈의 옵션 객체 - */ - var PanInput = /*#__PURE__*/function () { - /** - * - */ - function PanInput(el, options) { - var _this = this; - this.axes = []; - this.element = null; - this._enabled = false; - this._activeEvent = null; - this._atRightEdge = false; - this._rightEdgeTimer = 0; - this._dragged = false; - this._isOverThreshold = false; - this._preventClickWhenDragged = function (e) { - if (_this._dragged) { - e.preventDefault(); - e.stopPropagation(); - } - _this._dragged = false; - }; - this._voidFunction = function () {}; - this.element = $(el); - this.options = __assign$1({ - inputType: ["touch", "mouse", "pointer"], - inputKey: [ANY], - inputButton: [MOUSE_LEFT], - scale: [1, 1], - thresholdAngle: 45, - threshold: 0, - preventClickOnDrag: false, - preventDefaultOnDrag: false, - iOSEdgeSwipeThreshold: IOS_EDGE_THRESHOLD, - releaseOnScroll: false, - touchAction: null - }, options); - this._onPanstart = this._onPanstart.bind(this); - this._onPanmove = this._onPanmove.bind(this); - this._onPanend = this._onPanend.bind(this); - } - var __proto = PanInput.prototype; - __proto.mapAxes = function (axes) { - this._direction = getDirection(!!axes[0], !!axes[1]); - this.axes = axes; - }; - __proto.connect = function (observer) { - if (this._activeEvent) { - this._detachElementEvent(); - this._detachWindowEvent(this._activeEvent); - } - this._attachElementEvent(observer); - return this; - }; - __proto.disconnect = function () { - this._detachElementEvent(); - this._detachWindowEvent(this._activeEvent); - this._direction = DIRECTION_NONE; - return this; - }; - /** - * Destroys elements, properties, and events used in a module. - * @ko 모듈에 사용한 엘리먼트와 속성, 이벤트를 해제한다. - */ - __proto.destroy = function () { - this.disconnect(); - this.element = null; - }; - /** - * Enables input devices - * @ko 입력 장치를 사용할 수 있게 한다 - * @return {PanInput} An instance of a module itself 모듈 자신의 인스턴스 - */ - __proto.enable = function () { - if (!this._enabled) { - this._enabled = true; - this._originalCssProps = setCssProps(this.element, this.options, this._direction); - } - return this; - }; - /** - * Disables input devices - * @ko 입력 장치를 사용할 수 없게 한다. - * @return {PanInput} An instance of a module itself 모듈 자신의 인스턴스 - */ - __proto.disable = function () { - if (this._enabled) { - this._enabled = false; - if (!isCssPropsFromAxes(this._originalCssProps)) { - revertCssProps(this.element, this._originalCssProps); - } - } - return this; - }; - /** - * Returns whether to use an input device - * @ko 입력 장치 사용 여부를 반환한다. - * @return {Boolean} Whether to use an input device 입력장치 사용여부 - */ - __proto.isEnabled = function () { - return this._enabled; - }; - /** - * Releases current user input. - * @ko 사용자의 입력을 강제로 중단시킨다. - * @return {PanInput} An instance of a module itself 모듈 자신의 인스턴스 - */ - __proto.release = function () { - var activeEvent = this._activeEvent; - var prevEvent = activeEvent.prevEvent; - activeEvent.onRelease(); - this._observer.release(this, prevEvent, [0, 0]); - this._detachWindowEvent(activeEvent); - return this; - }; - __proto._onPanstart = function (event) { - var _a = this.options, - inputKey = _a.inputKey, - inputButton = _a.inputButton, - preventDefaultOnDrag = _a.preventDefaultOnDrag; - var activeEvent = this._activeEvent; - var panEvent = activeEvent.onEventStart(event, inputKey, inputButton); - if (!panEvent || !this._enabled || activeEvent.getTouches(event, inputButton) > 1) { - return; - } - if (panEvent.srcEvent.cancelable !== false) { - var edgeThreshold = this.options.iOSEdgeSwipeThreshold; - this._dragged = false; - this._isOverThreshold = false; - this._observer.hold(this, panEvent); - this._atRightEdge = IS_IOS_SAFARI && panEvent.center.x > window.innerWidth - edgeThreshold; - this._attachWindowEvent(activeEvent); - preventDefaultOnDrag && panEvent.srcEvent.type !== "touchstart" && panEvent.srcEvent.preventDefault(); - activeEvent.prevEvent = panEvent; - } - }; - __proto._onPanmove = function (event) { - var _this = this; - var _a = this.options, - iOSEdgeSwipeThreshold = _a.iOSEdgeSwipeThreshold, - preventClickOnDrag = _a.preventClickOnDrag, - releaseOnScroll = _a.releaseOnScroll, - inputKey = _a.inputKey, - inputButton = _a.inputButton, - threshold = _a.threshold, - thresholdAngle = _a.thresholdAngle; - var activeEvent = this._activeEvent; - var panEvent = activeEvent.onEventMove(event, inputKey, inputButton); - var touches = activeEvent.getTouches(event, inputButton); - if (touches === 0 || releaseOnScroll && panEvent && !panEvent.srcEvent.cancelable) { - this._onPanend(event); - return; - } - if (!panEvent || !this._enabled || touches > 1) { - return; - } - var userDirection = getDirectionByAngle(panEvent.angle, thresholdAngle); - var useHorizontal = useDirection(DIRECTION_HORIZONTAL, this._direction, userDirection); - var useVertical = useDirection(DIRECTION_VERTICAL, this._direction, userDirection); - if (activeEvent.prevEvent && IS_IOS_SAFARI) { - var swipeLeftToRight = panEvent.center.x < 0; - if (swipeLeftToRight) { - // iOS swipe left => right - this.release(); - return; - } else if (this._atRightEdge) { - clearTimeout(this._rightEdgeTimer); - // - is right to left - var swipeRightToLeft = panEvent.deltaX < -iOSEdgeSwipeThreshold; - if (swipeRightToLeft) { - this._atRightEdge = false; - } else { - // iOS swipe right => left - this._rightEdgeTimer = window.setTimeout(function () { - return _this.release(); - }, 100); - } - } - } - var distance = this._getDistance([panEvent.deltaX, panEvent.deltaY], [useHorizontal, useVertical]); - var offset = this._getOffset([panEvent.offsetX, panEvent.offsetY], [useHorizontal, useVertical]); - var prevent = offset.some(function (v) { - return v !== 0; - }); - if (prevent) { - if (panEvent.srcEvent.cancelable !== false) { - panEvent.srcEvent.preventDefault(); - } - panEvent.srcEvent.stopPropagation(); - } - panEvent.preventSystemEvent = prevent; - if (prevent && (this._isOverThreshold || distance >= threshold)) { - this._dragged = preventClickOnDrag; - this._isOverThreshold = true; - this._observer.change(this, panEvent, toAxis(this.axes, offset)); - } - activeEvent.prevEvent = panEvent; - }; - __proto._onPanend = function (event) { - var inputButton = this.options.inputButton; - var activeEvent = this._activeEvent; - activeEvent.onEventEnd(event); - if (!this._enabled || activeEvent.getTouches(event, inputButton) !== 0) { - return; - } - this._detachWindowEvent(activeEvent); - clearTimeout(this._rightEdgeTimer); - var prevEvent = activeEvent.prevEvent; - var velocity = this._isOverThreshold ? this._getOffset([Math.abs(prevEvent.velocityX) * (prevEvent.offsetX < 0 ? -1 : 1), Math.abs(prevEvent.velocityY) * (prevEvent.offsetY < 0 ? -1 : 1)], [useDirection(DIRECTION_HORIZONTAL, this._direction), useDirection(DIRECTION_VERTICAL, this._direction)]) : [0, 0]; - activeEvent.onRelease(); - this._observer.release(this, prevEvent, velocity); - }; - __proto._attachWindowEvent = function (activeEvent) { - var _this = this; - activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) { - window.addEventListener(event, _this._onPanmove, getAddEventOptions(event)); - }); - activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.end.forEach(function (event) { - window.addEventListener(event, _this._onPanend, getAddEventOptions(event)); - }); - }; - __proto._detachWindowEvent = function (activeEvent) { - var _this = this; - activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) { - window.removeEventListener(event, _this._onPanmove); - }); - activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.end.forEach(function (event) { - window.removeEventListener(event, _this._onPanend); - }); - }; - __proto._getOffset = function (properties, direction) { - var scale = this.options.scale; - return [direction[0] ? properties[0] * scale[0] : 0, direction[1] ? properties[1] * scale[1] : 0]; - }; - __proto._getDistance = function (delta, direction) { - return Math.sqrt(Number(direction[0]) * Math.pow(delta[0], 2) + Number(direction[1]) * Math.pow(delta[1], 2)); - }; - __proto._attachElementEvent = function (observer) { - var _this = this; - var activeEvent = convertInputType(this.options.inputType); - var element = this.element; - if (!activeEvent) { - return; - } - if (!element) { - throw new Error("Element to connect input does not exist."); - } - this._observer = observer; - this.enable(); - this._activeEvent = activeEvent; - element.addEventListener("click", this._preventClickWhenDragged, true); - activeEvent.start.forEach(function (event) { - element.addEventListener(event, _this._onPanstart); - }); - // adding event listener to element prevents invalid behavior in iOS Safari - activeEvent.move.forEach(function (event) { - element.addEventListener(event, _this._voidFunction); - }); - }; - __proto._detachElementEvent = function () { - var _this = this; - var activeEvent = this._activeEvent; - var element = this.element; - if (element) { - element.removeEventListener("click", this._preventClickWhenDragged, true); - activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.start.forEach(function (event) { - element.removeEventListener(event, _this._onPanstart); - }); - activeEvent === null || activeEvent === void 0 ? void 0 : activeEvent.move.forEach(function (event) { - element.removeEventListener(event, _this._voidFunction); - }); - } - this.disable(); - this._observer = null; - }; - return PanInput; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Axes$1 = Axes; - - /** - * All possible @egjs/axes event keys - * @internal - */ - var EVENT = { - HOLD: "hold", - CHANGE: "change", - RELEASE: "release", - ANIMATION_END: "animationEnd", - FINISH: "finish" - }; - /** - * An Axis key that Flicking uses - * @internal - */ - var POSITION_KEY = "flick"; - - var STATE_TYPE; - (function (STATE_TYPE) { - STATE_TYPE[STATE_TYPE["IDLE"] = 0] = "IDLE"; - STATE_TYPE[STATE_TYPE["HOLDING"] = 1] = "HOLDING"; - STATE_TYPE[STATE_TYPE["DRAGGING"] = 2] = "DRAGGING"; - STATE_TYPE[STATE_TYPE["ANIMATING"] = 3] = "ANIMATING"; - STATE_TYPE[STATE_TYPE["DISABLED"] = 4] = "DISABLED"; - })(STATE_TYPE || (STATE_TYPE = {})); - /** - * A component that shows the current status of the user input or the animation - * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트 - * @internal - */ - var State = /*#__PURE__*/function () { - function State() { - this._delta = 0; - this._targetPanel = null; - } - var __proto = State.prototype; - Object.defineProperty(__proto, "delta", { - /** - * A sum of delta values of change events from the last hold event of Axes - * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산 - * @type {number} - * @readonly - */ - get: function () { - return this._delta; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "targetPanel", { - /** - * A panel to set as {@link Control#activePanel} after the animation is finished - * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널 - * @type {number} - * @readonly - */ - get: function () { - return this._targetPanel; - }, - set: function (val) { - this._targetPanel = val; - }, - enumerable: false, - configurable: true - }); - /** - * An callback which is called when state has changed to this state - * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수 - * @param {State} prevState An previous state이전 상태값 - * @return {void} - */ - __proto.onEnter = function (prevState) { - this._delta = prevState._delta; - this._targetPanel = prevState._targetPanel; - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onHold = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onChange = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onRelease = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes - * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onAnimationEnd = function (ctx) { - // DO NOTHING - }; - /** - * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러 - * @param {object} [ctx] Event context이벤트 콘텍스트 - * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스 - * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 - * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수 - * @return {void} - */ - __proto.onFinish = function (ctx) { - // DO NOTHING - }; - __proto._moveToChangedPosition = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var delta = axesEvent.delta[POSITION_KEY]; - if (!delta) { - return; - } - this._delta += delta; - var camera = flicking.camera; - var prevPosition = camera.position; - var position = axesEvent.pos[POSITION_KEY]; - var newPosition = flicking.circularEnabled ? circulatePosition(position, camera.range.min, camera.range.max) : position; - camera.lookAt(newPosition); - var moveEvent = new ComponentEvent$1(EVENTS.MOVE, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection$1(0, axesEvent.delta[POSITION_KEY]), - axesEvent: axesEvent - }); - flicking.trigger(moveEvent); - if (moveEvent.isCanceled()) { - // Return to previous position - camera.lookAt(prevPosition); - transitTo(STATE_TYPE.DISABLED); - } - }; - return State; - }(); - - /** - * A default state when there's no user input and no animation's playing - * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태 - * @internal - */ - var IdleState = /*#__PURE__*/function (_super) { - __extends$3(IdleState, _super); - function IdleState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - return _this; - } - var __proto = IdleState.prototype; - __proto.onEnter = function () { - this._delta = 0; - this._targetPanel = null; - }; - __proto.onHold = function (ctx) { - // Shouldn't do any action until any panels on flicking area - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - if (flicking.renderer.panelCount <= 0) { - transitTo(STATE_TYPE.DISABLED); - return; - } - var holdStartEvent = new ComponentEvent$1(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.HOLDING); - } - }; - // By methods call - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var controller = flicking.control.controller; - var animatingContext = controller.animatingContext; - var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection$1(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger AnimatingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.ANIMATING).onChange(ctx); - } - }; - return IdleState; - }(State); - - /** - * A state that activates when user's holding the Flicking area, but not moved a single pixel yet - * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태 - * @internal - */ - var HoldingState = /*#__PURE__*/function (_super) { - __extends$3(HoldingState, _super); - function HoldingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {false} - * @readonly - */ - _this.animating = false; - _this._releaseEvent = null; - return _this; - } - var __proto = HoldingState.prototype; - __proto.onChange = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var inputEvent = axesEvent.inputEvent; - var offset = flicking.horizontal ? inputEvent.offsetX : inputEvent.offsetY; - var moveStartEvent = new ComponentEvent$1(EVENTS.MOVE_START, { - isTrusted: axesEvent.isTrusted, - holding: this.holding, - direction: getDirection$1(0, -offset), - axesEvent: axesEvent - }); - flicking.trigger(moveStartEvent); - if (moveStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - // Trigger DraggingState's onChange, to trigger "move" event immediately - transitTo(STATE_TYPE.DRAGGING).onChange(ctx); - } - }; - __proto.onRelease = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - flicking.trigger(new ComponentEvent$1(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (axesEvent.delta.flick !== 0) { - // Sometimes "release" event on axes triggered before "change" event - // Especially if user flicked panel fast in really short amount of time - // if delta is not zero, that means above case happened. - // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END - // At least one move event should be included between holdStart and holdEnd - axesEvent.setTo({ - flick: flicking.camera.position - }, 0); - transitTo(STATE_TYPE.IDLE); - return; - } - // Can't handle select event here, - // As "finish" axes event happens - this._releaseEvent = axesEvent; - }; - __proto.onFinish = function (ctx) { - var e_1, _a; - var flicking = ctx.flicking, - transitTo = ctx.transitTo; - // Should transite to IDLE state before select event - // As user expects hold is already finished - transitTo(STATE_TYPE.IDLE); - if (!this._releaseEvent) { - return; - } - // Handle release event here - // To prevent finish event called twice - var releaseEvent = this._releaseEvent; - // Static click - /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */ - var srcEvent = releaseEvent.inputEvent.srcEvent; - var clickedElement; - if (srcEvent.type === "touchend") { - var touchEvent = srcEvent; - var touch = touchEvent.changedTouches[0]; - clickedElement = document.elementFromPoint(touch.clientX, touch.clientY); - } else { - clickedElement = srcEvent.target; - } - /* eslint-enable */ - var panels = flicking.renderer.panels; - var clickedPanel = null; - try { - for (var panels_1 = __values$1(panels), panels_1_1 = panels_1.next(); !panels_1_1.done; panels_1_1 = panels_1.next()) { - var panel = panels_1_1.value; - if (panel.contains(clickedElement)) { - clickedPanel = panel; - break; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (panels_1_1 && !panels_1_1.done && (_a = panels_1.return)) _a.call(panels_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (clickedPanel) { - var cameraPosition = flicking.camera.position; - var clickedPanelPosition = clickedPanel.position; - flicking.trigger(new ComponentEvent$1(EVENTS.SELECT, { - index: clickedPanel.index, - panel: clickedPanel, - // Direction to the clicked panel - direction: getDirection$1(cameraPosition, clickedPanelPosition) - })); - } - }; - return HoldingState; - }(State); - - /** - * A state that activates when user's dragging the Flicking area - * @ko 사용자가 드래깅중인 상태 - * @internal - */ - var DraggingState = /*#__PURE__*/function (_super) { - __extends$3(DraggingState, _super); - function DraggingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {true} - * @readonly - */ - _this.holding = true; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DraggingState.prototype; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onRelease = function (ctx) { - var _a; - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Update last position to cope with Axes's animating behavior - // Axes uses start position when animation start - flicking.trigger(new ComponentEvent$1(EVENTS.HOLD_END, { - axesEvent: axesEvent - })); - if (flicking.renderer.panelCount <= 0) { - // There're no panels - transitTo(STATE_TYPE.IDLE); - return; - } - transitTo(STATE_TYPE.ANIMATING); - var control = flicking.control; - var position = axesEvent.destPos[POSITION_KEY]; - var duration = Math.max(axesEvent.duration, flicking.duration); - try { - void control.moveToPosition(position, duration, axesEvent); - } catch (err) { - transitTo(STATE_TYPE.IDLE); - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = flicking.camera.position, _a), 0); - } - }; - return DraggingState; - }(State); - - /** - * A state that activates when Flicking's animating by user input or method call - * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태 - * @internal - */ - var AnimatingState = /*#__PURE__*/function (_super) { - __extends$3(AnimatingState, _super); - function AnimatingState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = AnimatingState.prototype; - __proto.onHold = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var targetPanel = this._targetPanel; - var control = flicking.control; - this._delta = 0; - flicking.control.updateInput(); - if (flicking.changeOnHold && targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - var holdStartEvent = new ComponentEvent$1(EVENTS.HOLD_START, { - axesEvent: axesEvent - }); - flicking.trigger(holdStartEvent); - if (holdStartEvent.isCanceled()) { - transitTo(STATE_TYPE.DISABLED); - } else { - transitTo(STATE_TYPE.DRAGGING); - } - }; - __proto.onChange = function (ctx) { - this._moveToChangedPosition(ctx); - }; - __proto.onFinish = function (ctx) { - var flicking = ctx.flicking, - axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - var control = flicking.control; - var controller = control.controller; - var animatingContext = controller.animatingContext; - transitTo(STATE_TYPE.IDLE); - flicking.trigger(new ComponentEvent$1(EVENTS.MOVE_END, { - isTrusted: axesEvent.isTrusted, - direction: getDirection$1(animatingContext.start, animatingContext.end), - axesEvent: axesEvent - })); - var targetPanel = this._targetPanel; - if (targetPanel) { - control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted); - } - }; - return AnimatingState; - }(State); - - /** - * A state that activates when Flicking is stopped by event's `stop` method - * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태 - * @internal - */ - var DisabledState = /*#__PURE__*/function (_super) { - __extends$3(DisabledState, _super); - function DisabledState() { - var _this = _super !== null && _super.apply(this, arguments) || this; - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {false} - * @readonly - */ - _this.holding = false; - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {true} - * @readonly - */ - _this.animating = true; - return _this; - } - var __proto = DisabledState.prototype; - __proto.onAnimationEnd = function (ctx) { - var transitTo = ctx.transitTo; - transitTo(STATE_TYPE.IDLE); - }; - __proto.onChange = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // Can stop Axes's change event - axesEvent.stop(); - transitTo(STATE_TYPE.IDLE); - }; - __proto.onRelease = function (ctx) { - var axesEvent = ctx.axesEvent, - transitTo = ctx.transitTo; - // This is needed when stopped hold start event - if (axesEvent.delta.flick === 0) { - transitTo(STATE_TYPE.IDLE); - } - }; - return DisabledState; - }(State); - - /** - * @internal - */ - var StateMachine = /*#__PURE__*/function () { - function StateMachine() { - var _this = this; - this.transitTo = function (nextStateType) { - var nextState; - switch (nextStateType) { - case STATE_TYPE.IDLE: - nextState = new IdleState(); - break; - case STATE_TYPE.HOLDING: - nextState = new HoldingState(); - break; - case STATE_TYPE.DRAGGING: - nextState = new DraggingState(); - break; - case STATE_TYPE.ANIMATING: - nextState = new AnimatingState(); - break; - case STATE_TYPE.DISABLED: - nextState = new DisabledState(); - break; - } - nextState.onEnter(_this._state); - _this._state = nextState; - return _this._state; - }; - this._state = new IdleState(); - } - var __proto = StateMachine.prototype; - Object.defineProperty(__proto, "state", { - get: function () { - return this._state; - }, - enumerable: false, - configurable: true - }); - __proto.fire = function (eventType, externalCtx) { - var currentState = this._state; - var ctx = __assign$2(__assign$2({}, externalCtx), { - transitTo: this.transitTo - }); - switch (eventType) { - case EVENT.HOLD: - currentState.onHold(ctx); - break; - case EVENT.CHANGE: - currentState.onChange(ctx); - break; - case EVENT.RELEASE: - currentState.onRelease(ctx); - break; - case EVENT.ANIMATION_END: - currentState.onAnimationEnd(ctx); - break; - case EVENT.FINISH: - currentState.onFinish(ctx); - break; - } - }; - return StateMachine; - }(); - - /** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @internal - */ - var AxesController = /*#__PURE__*/function () { - /** */ - function AxesController() { - var _this = this; - this._onAxesHold = function () { - _this._dragged = false; - }; - this._onAxesChange = function () { - var _a; - _this._dragged = !!((_a = _this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()); - }; - this._preventClickWhenDragged = function (e) { - if (_this._dragged) { - e.preventDefault(); - e.stopPropagation(); - } - _this._dragged = false; - }; - this._resetInternalValues(); - this._stateMachine = new StateMachine(); - } - var __proto = AxesController.prototype; - Object.defineProperty(__proto, "axes", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스 - * @type {Axes | null} - * @see https://naver.github.io/egjs-axes/docs/api/Axes - * @readonly - */ - get: function () { - return this._axes; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panInput", { - /** - * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance - * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스 - * @type {PanInput | null} - * @see https://naver.github.io/egjs-axes/docs/api/PanInput - * @readonly - */ - get: function () { - return this._panInput; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "stateMachine", { - /** - * @internal - */ - get: function () { - return this._stateMachine; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "state", { - /** - * A activated {@link State} that shows the current status of the user input or the animation - * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다 - * @type {State} - */ - get: function () { - return this._stateMachine.state; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animatingContext", { - /** - * A context of the current animation playing - * @ko 현재 재생중인 애니메이션 정보 - * @type {object} - * @property {number} start A start position of the animation애니메이션 시작 지점 - * @property {number} end A end position of the animation애니메이션 끝 지점 - * @property {number} offset camera offset카메라 오프셋 - * @readonly - */ - get: function () { - return this._animatingContext; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current control parameters of the Axes instance - * @ko 활성화된 현재 Axes 패러미터들 - * @type {ControlParams} - */ - get: function () { - var axes = this._axes; - if (!axes) { - return { - range: { - min: 0, - max: 0 - }, - position: 0, - circular: false - }; - } - var axis = axes.axis[POSITION_KEY]; - return { - range: { - min: axis.range[0], - max: axis.range[1] - }, - circular: axis.circular[0], - position: this.position - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "enabled", { - /** - * A Boolean indicating whether the user input is enabled - * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.isEnabled()) !== null && _b !== void 0 ? _b : false; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값 - * @type {number} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.get([POSITION_KEY])[POSITION_KEY]) !== null && _b !== void 0 ? _b : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance - * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값 - * @type {number[]} - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].range) !== null && _b !== void 0 ? _b : [0, 0]; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * Actual bounce size(px) - * @ko 적용된 bounce 크기(px 단위) - * @type {number[]} - * @readonly - */ - get: function () { - var _a; - return (_a = this._axes) === null || _a === void 0 ? void 0 : _a.axis[POSITION_KEY].bounce; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize AxesController - * @ko AxesController를 초기화합니다 - * @param {Flicking} flicking An instance of Flicking - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - var _a; - var _this = this; - this._flicking = flicking; - this._axes = new Axes$1((_a = {}, _a[POSITION_KEY] = { - range: [0, 0], - circular: false, - bounce: [0, 0] - }, _a), { - deceleration: flicking.deceleration, - interruptable: flicking.interruptable, - nested: flicking.nested, - easing: flicking.easing - }); - this._panInput = new PanInput(flicking.viewport.element, { - inputType: flicking.inputType, - threshold: 1, - iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold, - preventDefaultOnDrag: flicking.preventDefaultOnDrag, - scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1], - releaseOnScroll: true - }); - var axes = this._axes; - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], this._panInput); - var _loop_1 = function (key) { - var eventType = EVENT[key]; - axes.on(eventType, function (e) { - _this._stateMachine.fire(eventType, { - flicking: flicking, - axesEvent: e - }); - }); - }; - for (var key in EVENT) { - _loop_1(key); - } - return this; - }; - /** - * Destroy AxesController and return to initial state - * @ko AxesController를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - var _a; - if (this._axes) { - this.removePreventClickHandler(); - this._axes.destroy(); - } - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.destroy(); - this._resetInternalValues(); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - var _a; - (_a = this._panInput) === null || _a === void 0 ? void 0 : _a.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @chainable - * @return {this} - */ - __proto.updateAnimation = function (position, duration) { - var _a; - var _b; - this._animatingContext = __assign$2(__assign$2({}, this._animatingContext), { - end: position - }); - (_b = this._axes) === null || _b === void 0 ? void 0 : _b.updateAnimation({ - destPos: (_a = {}, _a[POSITION_KEY] = position, _a), - duration: duration - }); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var _a; - (_a = this._axes) === null || _a === void 0 ? void 0 : _a.stopAnimation(); - return this; - }; - /** - * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before - * {@link AxesController#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.update = function (controlParams) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var axes = this._axes; - var axis = axes.axis[POSITION_KEY]; - axis.circular = [controlParams.circular, controlParams.circular]; - axis.range = [controlParams.range.min, controlParams.range.max]; - axis.bounce = parseBounce(flicking.bounce, camera.size); - axes.axisManager.set((_a = {}, _a[POSITION_KEY] = controlParams.position, _a)); - return this; - }; - /** - * Attach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다 - * @return {this} - */ - __proto.addPreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.on(EVENT.HOLD, this._onAxesHold); - axes.on(EVENT.CHANGE, this._onAxesChange); - cameraEl.addEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Detach a handler to the camera element to prevent click events during animation - * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다 - * @return {this} - */ - __proto.removePreventClickHandler = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var cameraEl = flicking.camera.element; - axes.off(EVENT.HOLD, this._onAxesHold); - axes.off(EVENT.CHANGE, this._onAxesChange); - cameraEl.removeEventListener("click", this._preventClickWhenDragged, true); - return this; - }; - /** - * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position - * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다 - * @param {number} position A position to move이동할 좌표 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다. - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.animateTo = function (position, duration, axesEvent) { - var _this = this; - var _a; - var axes = this._axes; - var state = this._stateMachine.state; - if (!axes) { - return Promise.reject(new FlickingError(MESSAGE.NOT_ATTACHED_TO_FLICKING, CODE.NOT_ATTACHED_TO_FLICKING)); - } - var startPos = axes.get([POSITION_KEY])[POSITION_KEY]; - if (startPos === position) { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.lookAt(position); - if (state.targetPanel) { - flicking.control.setActive(state.targetPanel, flicking.control.activePanel, (_a = axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) !== null && _a !== void 0 ? _a : false); - } - return Promise.resolve(); - } - this._animatingContext = { - start: startPos, - end: position, - offset: 0 - }; - var animate = function () { - var _a, _b; - var resetContext = function () { - _this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - }; - axes.once(EVENT.FINISH, resetContext); - if (axesEvent) { - axesEvent.setTo((_a = {}, _a[POSITION_KEY] = position, _a), duration); - } else { - axes.setTo((_b = {}, _b[POSITION_KEY] = position, _b), duration); - } - }; - return new Promise(function (resolve, reject) { - var animationFinishHandler = function () { - axes.off(EVENT.HOLD, interruptionHandler); - resolve(); - }; - var interruptionHandler = function () { - axes.off(EVENT.FINISH, animationFinishHandler); - reject(new FlickingError(MESSAGE.ANIMATION_INTERRUPTED, CODE.ANIMATION_INTERRUPTED)); - }; - axes.once(EVENT.FINISH, animationFinishHandler); - axes.once(EVENT.HOLD, interruptionHandler); - animate(); - }); - }; - __proto.updateDirection = function () { - var flicking = getFlickingAttached(this._flicking); - var axes = this._axes; - var panInput = this._panInput; - axes.disconnect(panInput); - axes.connect(flicking.horizontal ? [POSITION_KEY, ""] : ["", POSITION_KEY], panInput); - panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1]; - }; - __proto._resetInternalValues = function () { - this._flicking = null; - this._axes = null; - this._panInput = null; - this._animatingContext = { - start: 0, - end: 0, - offset: 0 - }; - this._dragged = false; - }; - return AxesController; - }(); - - /** - * A component that manages inputs and animation of Flicking - * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트 - */ - var Control$1 = /*#__PURE__*/function () { - /** */ - function Control() { - this._flicking = null; - this._controller = new AxesController(); - this._activePanel = null; - } - var __proto = Control.prototype; - Object.defineProperty(__proto, "controller", { - /** - * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events - * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트 - * @type {AxesController} - * @readonly - */ - get: function () { - return this._controller; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activeIndex", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - var _a, _b; - return (_b = (_a = this._activePanel) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : -1; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePanel", { - /** - * An active panel - * @ko 현재 선택된 패널 - * @type {Panel | null} - * @readonly - */ - get: function () { - return this._activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._controller.state.holding; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Control - * @ko Control을 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._controller.init(flicking); - return this; - }; - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._controller.destroy(); - this._flicking = null; - this._activePanel = null; - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @chainable - * @return {this} - */ - __proto.enable = function () { - this._controller.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @chainable - * @return {this} - */ - __proto.disable = function () { - this._controller.disable(); - return this; - }; - /** - * Releases ongoing user input (mouse/touch) - * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.release = function () { - this._controller.release(); - return this; - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range} - * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우 - * @return {this} - */ - __proto.updateAnimation = function (panel, duration, direction) { - var state = this._controller.state; - var position = this._getPosition(panel, direction !== null && direction !== void 0 ? direction : DIRECTION.NONE); - state.targetPanel = panel; - this._controller.updateAnimation(position, duration); - return this; - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @chainable - * @return {this} - */ - __proto.stopAnimation = function () { - var state = this._controller.state; - state.targetPanel = null; - this._controller.stopAnimation(); - return this; - }; - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - camera.lookAt(camera.clampToReachablePosition(activePanel.position)); - } - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._controller.update(camera.controlParams); - return this; - }; - /** - * Reset {@link Control#activePanel activePanel} to `null` - * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다 - * @chainable - * @return {this} - */ - __proto.resetActive = function () { - this._activePanel = null; - return this; - }; - /** - * Move {@link Camera} to the given panel - * @ko {@link Camera}를 해당 패널 위로 이동합니다 - * @param {Panel} panel The target panel to move이동할 패널 - * @param {object} options An options object옵션 오브젝트 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveToPanel = function (panel, _a) { - var duration = _a.duration, - _b = _a.direction, - direction = _b === void 0 ? DIRECTION.NONE : _b, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var position; - return __generator(this, function (_c) { - position = this._getPosition(panel, direction); - this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction); - return [2 /*return*/, this._animateToPosition({ - position: position, - duration: duration, - newActivePanel: panel, - axesEvent: axesEvent - })]; - }); - }); - }; - /** - * @internal - */ - __proto.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - var _a; - var flicking = getFlickingAttached(this._flicking); - this._activePanel = newActivePanel; - this._nextPanel = null; - flicking.camera.updateAdaptiveHeight(); - if (newActivePanel !== prevActivePanel) { - flicking.trigger(new ComponentEvent$1(EVENTS.CHANGED, { - index: newActivePanel.index, - panel: newActivePanel, - prevIndex: (_a = prevActivePanel === null || prevActivePanel === void 0 ? void 0 : prevActivePanel.index) !== null && _a !== void 0 ? _a : -1, - prevPanel: prevActivePanel, - isTrusted: isTrusted, - direction: prevActivePanel ? getDirection$1(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE - })); - } else { - flicking.trigger(new ComponentEvent$1(EVENTS.RESTORED, { - isTrusted: isTrusted - })); - } - }; - /** - * @internal - */ - __proto.copy = function (control) { - this._flicking = control._flicking; - this._activePanel = control._activePanel; - this._controller = control._controller; - }; - __proto._triggerIndexChangeEvent = function (panel, position, axesEvent, direction) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE; - var camera = flicking.camera; - var activePanel = this._activePanel; - var event = new ComponentEvent$1(triggeringEvent, { - index: panel.index, - panel: panel, - isTrusted: (axesEvent === null || axesEvent === void 0 ? void 0 : axesEvent.isTrusted) || false, - direction: direction !== null && direction !== void 0 ? direction : getDirection$1((_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.position) !== null && _a !== void 0 ? _a : camera.position, position) - }); - this._nextPanel = panel; - flicking.trigger(event); - if (event.isCanceled()) { - throw new FlickingError(MESSAGE.STOP_CALLED_BY_USER, CODE.STOP_CALLED_BY_USER); - } - }; - __proto._animateToPosition = function (_a) { - var position = _a.position, - duration = _a.duration, - newActivePanel = _a.newActivePanel, - axesEvent = _a.axesEvent; - return __awaiter(this, void 0, void 0, function () { - var flicking, animate, state; - var _this = this; - return __generator(this, function (_b) { - flicking = getFlickingAttached(this._flicking); - animate = function () { - return _this._controller.animateTo(position, duration, axesEvent); - }; - state = this._controller.state; - state.targetPanel = newActivePanel; - if (duration <= 0) { - return [2 /*return*/, animate()]; - } else { - return [2 /*return*/, animate().then(function () { - return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - return [4 /*yield*/, flicking.renderer.render()]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }).catch(function (err) { - if (axesEvent && err instanceof FlickingError && err.code === CODE.ANIMATION_INTERRUPTED) return; - throw err; - })]; - } - }); - }); - }; - - __proto._getPosition = function (panel, direction) { - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var position = panel.position; - var nearestAnchor = camera.findNearestAnchor(position); - if (panel.removed || !nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(panel.position), CODE.POSITION_NOT_REACHABLE); - } - if (!camera.canReach(panel)) { - // Override position & panel if that panel is not reachable - position = nearestAnchor.position; - panel = nearestAnchor.panel; - } else if (flicking.circularEnabled) { - // Circular mode is enabled, find nearest distance to panel - var camPos_1 = this._controller.position; // Actual position of the Axes - var camRangeDiff = camera.rangeDiff; - var possiblePositions = [position, position + camRangeDiff, position - camRangeDiff].filter(function (pos) { - if (direction === DIRECTION.NONE) return true; - return direction === DIRECTION.PREV ? pos <= camPos_1 : pos >= camPos_1; - }); - position = possiblePositions.reduce(function (nearestPosition, pos) { - if (Math.abs(camPos_1 - pos) < Math.abs(camPos_1 - nearestPosition)) { - return pos; - } else { - return nearestPosition; - } - }, Infinity); - } - return position; - }; - return Control; - }(); - - /** - * A data component that has actual position where the camera should be stopped at - * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트 - */ - var AnchorPoint = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 객체 - * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스 - * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표 - * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel} - */ - function AnchorPoint(_a) { - var index = _a.index, - position = _a.position, - panel = _a.panel; - this._index = index; - this._pos = position; - this._panel = panel; - } - var __proto = AnchorPoint.prototype; - Object.defineProperty(__proto, "index", { - /** - * Index of AnchorPoint - * @ko AnchorPoint의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of AnchorPoint - * @ko AnchorPoint의 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._pos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panel", { - /** - * A {@link Panel} instance AnchorPoint is referencing to - * @ko AnchorPoint가 참조하고 있는 {@link Panel} - * @type {Panel} - * @readonly - */ - get: function () { - return this._panel; - }, - enumerable: false, - configurable: true - }); - return AnchorPoint; - }(); - - /** - * A {@link Control} that uses a release momentum to choose destination panel - * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control} - */ - var SnapControl = /*#__PURE__*/function (_super) { - __extends$3(SnapControl, _super); - /** */ - function SnapControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? Infinity : _b; - var _this = _super.call(this) || this; - _this._count = count; - return _this; - } - var __proto = SnapControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels can go after release - * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수 - * @type {number} - * @default Infinity - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activeAnchor = camera.findActiveAnchor(); - var anchorAtCamera = camera.findNearestAnchor(camera.position); - var state = this._controller.state; - if (!activeAnchor || !anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor); - var posDelta = flicking.animating ? state.delta : position - camera.position; - var absPosDelta = Math.abs(posDelta); - var snapDelta = axesEvent && axesEvent.delta[POSITION_KEY] !== 0 ? Math.abs(axesEvent.delta[POSITION_KEY]) : absPosDelta; - var targetAnchor; - if (snapDelta >= snapThreshold && snapDelta > 0) { - // Move to anchor at position - targetAnchor = this._findSnappedAnchor(position, anchorAtCamera); - } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) { - // Move to the adjacent panel - targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera); - } else { - // Fallback to nearest panel from current camera - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent); - return this._animateToPosition({ - position: camera.clampToReachablePosition(targetAnchor.position), - duration: duration, - newActivePanel: targetAnchor.panel, - axesEvent: axesEvent - }); - }; - __proto._findSnappedAnchor = function (position, anchorAtCamera) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var count = this._count; - var currentPos = camera.position; - var clampedPosition = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtCamera || !anchorAtPosition) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE); - } - if (!isFinite(count)) { - return anchorAtPosition; - } - var panelCount = flicking.panelCount; - var anchors = camera.anchorPoints; - var loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff); - if (position > currentPos && anchorAtPosition.index < anchorAtCamera.index || anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount += 1; - } else if (position < currentPos && anchorAtPosition.index > anchorAtCamera.index || anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index) { - loopCount -= 1; - } - var circularIndexOffset = loopCount * panelCount; - var anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset; - if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) { - var anchor = anchors[anchorAtPosition.index]; - return new AnchorPoint({ - index: anchor.index, - position: anchor.position + loopCount * camera.rangeDiff, - panel: anchor.panel - }); - } - if (flicking.circularEnabled) { - var targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)]; - var loop = Math.floor(count / panelCount); - if (position > currentPos && targetAnchor.index < anchorAtCamera.index) { - loop += 1; - } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) { - loop -= 1; - } - return new AnchorPoint({ - index: targetAnchor.index, - position: targetAnchor.position + loop * camera.rangeDiff, - panel: targetAnchor.panel - }); - } else { - return anchors[clamp$1(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)]; - } - }; - __proto._findAdjacentAnchor = function (position, posDelta, anchorAtCamera) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - if (camera.circularEnabled) { - var anchorIncludePosition = camera.findAnchorIncludePosition(position); - if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) { - return anchorIncludePosition; - } - } - var adjacentAnchor = (_a = posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) !== null && _a !== void 0 ? _a : anchorAtCamera; - return adjacentAnchor; - }; - __proto._calcSnapThreshold = function (threshold, position, activeAnchor) { - var isNextDirection = position > activeAnchor.position; - var panel = activeAnchor.panel; - var panelSize = panel.size; - var alignPos = panel.alignPosition; - // Minimum distance needed to decide prev/next panel as nearest - /* - * | Prev | Next | - * |<------>|<------------>| - * [ |<-Anchor ] - */ - return Math.max(threshold, isNextDirection ? panelSize - alignPos + panel.margin.next : alignPos + panel.margin.prev); - }; - return SnapControl; - }(Control$1); - - /** - * A {@link Control} that can be scrolled freely without alignment - * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control} - */ - var FreeControl = /*#__PURE__*/function (_super) { - __extends$3(FreeControl, _super); - /** */ - function FreeControl(_a) { - var _b = (_a === void 0 ? {} : _a).stopAtEdge, - stopAtEdge = _b === void 0 ? true : _b; - var _this = _super.call(this) || this; - _this._stopAtEdge = stopAtEdge; - return _this; - } - var __proto = FreeControl.prototype; - Object.defineProperty(__proto, "stopAtEdge", { - /** - * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area - * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._stopAtEdge; - }, - set: function (val) { - this._stopAtEdge = val; - }, - enumerable: false, - configurable: true - }); - /** - * Update position after resizing - * @ko resize 이후에 position을 업데이트합니다 - * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {Promise} - */ - __proto.updatePosition = function (progressInPanel) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var activePanel = this._activePanel; - if (activePanel) { - var panelRange = activePanel.range; - var newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - camera.lookAt(camera.clampToReachablePosition(newPosition)); - } - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var targetPos = camera.clampToReachablePosition(position); - var anchorAtPosition = camera.findAnchorIncludePosition(targetPos); - if (!anchorAtPosition) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var targetPanel = anchorAtPosition.panel; - // Trigger only change event - if (targetPanel !== this._activePanel) { - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - } - return this._animateToPosition({ - position: this._stopAtEdge ? targetPos : position, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - return FreeControl; - }(Control$1); - - /** - * A {@link Control} that allow you to select the maximum number of panels to move at a time - * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control} - */ - var StrictControl = /*#__PURE__*/function (_super) { - __extends$3(StrictControl, _super); - /** */ - function StrictControl(_a) { - var _b = (_a === void 0 ? {} : _a).count, - count = _b === void 0 ? 1 : _b; - var _this = _super.call(this) || this; - _this.setActive = function (newActivePanel, prevActivePanel, isTrusted) { - _super.prototype.setActive.call(_this, newActivePanel, prevActivePanel, isTrusted); - _this.updateInput(); - }; - _this._count = count; - _this._resetIndexRange(); - return _this; - } - var __proto = StrictControl.prototype; - Object.defineProperty(__proto, "count", { - /** - * Maximum number of panels that can be moved at a time - * @ko 최대로 움직일 수 있는 패널의 개수 - * @type {number} - * @default 1 - */ - get: function () { - return this._count; - }, - set: function (val) { - this._count = val; - }, - enumerable: false, - configurable: true - }); - /** - * Destroy Control and return to initial state - * @ko Control을 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - _super.prototype.destroy.call(this); - this._resetIndexRange(); - }; - /** - * Update {@link Control#controller controller}'s state - * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다 - * @chainable - * @return {this} - */ - __proto.updateInput = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var renderer = flicking.renderer; - var controller = this._controller; - var controlParams = camera.controlParams; - var count = this._count; - var activePanel = controller.state.animating ? (_a = camera.findNearestAnchor(camera.position)) === null || _a === void 0 ? void 0 : _a.panel : this._activePanel; - if (!activePanel) { - controller.update(controlParams); - this._resetIndexRange(); - return this; - } - var cameraRange = controlParams.range; - var currentPos = activePanel.position; - var currentIndex = activePanel.index; - var panelCount = renderer.panelCount; - var prevPanelIndex = currentIndex - count; - var nextPanelIndex = currentIndex + count; - if (prevPanelIndex < 0) { - prevPanelIndex = flicking.circularEnabled ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount) : clamp$1(prevPanelIndex, 0, panelCount - 1); - } - if (nextPanelIndex >= panelCount) { - nextPanelIndex = flicking.circularEnabled ? nextPanelIndex % panelCount : clamp$1(nextPanelIndex, 0, panelCount - 1); - } - var prevPanel = renderer.panels[prevPanelIndex]; - var nextPanel = renderer.panels[nextPanelIndex]; - var prevPos = Math.max(prevPanel.position, cameraRange.min); - var nextPos = Math.min(nextPanel.position, cameraRange.max); - if (prevPos > currentPos) { - prevPos -= camera.rangeDiff; - } - if (nextPos < currentPos) { - nextPos += camera.rangeDiff; - } - controlParams.range = { - min: prevPos, - max: nextPos - }; - if (controlParams.circular) { - if (controlParams.position < prevPos) { - controlParams.position += camera.rangeDiff; - } - if (controlParams.position > nextPos) { - controlParams.position -= camera.rangeDiff; - } - } - controlParams.circular = false; - controller.update(controlParams); - this._indexRange = { - min: prevPanel.index, - max: nextPanel.index - }; - return this; - }; - __proto.moveToPanel = function (panel, options) { - return __awaiter(this, void 0, void 0, function () { - var flicking, camera, controller; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - camera = flicking.camera; - controller = this._controller; - controller.update(camera.controlParams); - return [2 /*return*/, _super.prototype.moveToPanel.call(this, panel, options)]; - }); - }); - }; - /** - * Move {@link Camera} to the given position - * @ko {@link Camera}를 주어진 좌표로 이동합니다 - * @param {number} position The target position to move이동할 좌표 - * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes} - * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우| - * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise - */ - __proto.moveToPosition = function (position, duration, axesEvent) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var currentPanel = (_a = this._nextPanel) !== null && _a !== void 0 ? _a : this._activePanel; - var axesRange = this._controller.range; - var indexRange = this._indexRange; - var cameraRange = camera.range; - var state = this._controller.state; - var clampedPosition = clamp$1(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]); - var anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition); - if (!anchorAtPosition || !currentPanel) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - var prevPos = currentPanel.position; - var posDelta = flicking.animating ? state.delta : position - camera.position; - var isOverThreshold = Math.abs(posDelta) >= flicking.threshold; - var adjacentAnchor = position > prevPos ? camera.getNextAnchor(anchorAtPosition) : camera.getPrevAnchor(anchorAtPosition); - var targetPos; - var targetPanel; - var anchors = camera.anchorPoints; - var firstAnchor = anchors[0]; - var lastAnchor = anchors[anchors.length - 1]; - var shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max); - var shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max); - var isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max) : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max); - if (shouldBounceToFirst || shouldBounceToLast) { - // In bounce area - var targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor; - targetPanel = targetAnchor.panel; - targetPos = targetAnchor.position; - } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) { - // Move to anchor at position - targetPanel = anchorAtPosition.panel; - targetPos = anchorAtPosition.position; - } else if (isOverThreshold && isAdjacent) { - // Move to adjacent anchor - targetPanel = adjacentAnchor.panel; - targetPos = adjacentAnchor.position; - } else { - // Fallback to nearest panel from current camera - var anchorAtCamera = camera.findNearestAnchor(camera.position); - if (!anchorAtCamera) { - return Promise.reject(new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(position), CODE.POSITION_NOT_REACHABLE)); - } - return this.moveToPanel(anchorAtCamera.panel, { - duration: duration, - axesEvent: axesEvent - }); - } - this._triggerIndexChangeEvent(targetPanel, position, axesEvent); - return this._animateToPosition({ - position: targetPos, - duration: duration, - newActivePanel: targetPanel, - axesEvent: axesEvent - }); - }; - __proto._resetIndexRange = function () { - this._indexRange = { - min: 0, - max: 0 - }; - }; - return StrictControl; - }(Control$1); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Control = { - __proto__: null, - Control: Control$1, - SnapControl: SnapControl, - FreeControl: FreeControl, - StrictControl: StrictControl, - AxesController: AxesController, - State: State, - IdleState: IdleState, - HoldingState: HoldingState, - DraggingState: DraggingState, - AnimatingState: AnimatingState, - DisabledState: DisabledState, - StateMachine: StateMachine - }; - - /** - * A mode of camera - */ - var CameraMode = /*#__PURE__*/function () { - /** */ - function CameraMode(flicking) { - this._flicking = flicking; - } - var __proto = CameraMode.prototype; - __proto.getAnchors = function () { - var panels = this._flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findAnchorIncludePosition = function (position) { - var anchors = this._flicking.camera.anchorPoints; - var anchorsIncludingPosition = anchors.filter(function (anchor) { - return anchor.panel.includePosition(position, true); - }); - return anchorsIncludingPosition.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - }; - __proto.findNearestAnchor = function (position) { - var anchors = this._flicking.camera.anchorPoints; - if (anchors.length <= 0) return null; - var prevDist = Infinity; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.abs(anchor.position - position); - if (dist > prevDist) { - // Return previous anchor - return anchors[anchorIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return anchors[anchors.length - 1]; - }; - __proto.clampToReachablePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - return clamp$1(position, range.min, range.max); - }; - __proto.getCircularOffset = function () { - return 0; - }; - __proto.canReach = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - if (panel.removed) return false; - var panelPos = panel.position; - return panelPos >= range.min && panelPos <= range.max; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var visibleRange = camera.visibleRange; - // Should not include margin, as we don't declare what the margin is visible as what the panel is visible. - return panel.isVisibleOnRange(visibleRange.min, visibleRange.max); - }; - return CameraMode; - }(); - - var LinearCameraMode = /*#__PURE__*/function (_super) { - __extends$3(LinearCameraMode, _super); - function LinearCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = LinearCameraMode.prototype; - __proto.checkAvailability = function () { - // It's always available - return true; - }; - __proto.getRange = function () { - var _a, _b; - var renderer = this._flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - return { - min: (_a = firstPanel === null || firstPanel === void 0 ? void 0 : firstPanel.position) !== null && _a !== void 0 ? _a : 0, - max: (_b = lastPanel === null || lastPanel === void 0 ? void 0 : lastPanel.position) !== null && _b !== void 0 ? _b : 0 - }; - }; - return LinearCameraMode; - }(CameraMode); - - /** - * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop - * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드 - */ - var CircularCameraMode = /*#__PURE__*/function (_super) { - __extends$3(CircularCameraMode, _super); - function CircularCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = CircularCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var panels = renderer.panels; - if (panels.length <= 0) { - return false; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - var visibleSize = flicking.camera.size; - var panelSizeSum = lastPanelNext - firstPanelPrev; - var canSetCircularMode = panels.every(function (panel) { - return panelSizeSum - panel.size >= visibleSize; - }); - return canSetCircularMode; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return { - min: 0, - max: 0 - }; - } - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - var firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev; - var lastPanelNext = lastPanel.range.max + lastPanel.margin.next; - return { - min: firstPanelPrev, - max: lastPanelNext - }; - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var panels = flicking.renderer.panels; - return panels.map(function (panel, index) { - return new AnchorPoint({ - index: index, - position: panel.position, - panel: panel - }); - }); - }; - __proto.findNearestAnchor = function (position) { - var camera = this._flicking.camera; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - var camRange = camera.range; - var minDist = Infinity; - var minDistIndex = -1; - for (var anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) { - var anchor = anchors[anchorIdx]; - var dist = Math.min(Math.abs(anchor.position - position), Math.abs(anchor.position - camRange.min + camRange.max - position), Math.abs(position - camRange.min + camRange.max - anchor.position)); - if (dist < minDist) { - minDist = dist; - minDistIndex = anchorIdx; - } - } - // Return last anchor - return anchors[minDistIndex]; - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - var rangeDiff = camera.rangeDiff; - var anchorCount = anchors.length; - var positionInRange = circulatePosition(position, range.min, range.max); - var anchorInRange = _super.prototype.findAnchorIncludePosition.call(this, positionInRange); - if (anchorCount > 0 && (position === range.min || position === range.max)) { - var possibleAnchors = [anchorInRange, new AnchorPoint({ - index: 0, - position: anchors[0].position + rangeDiff, - panel: anchors[0].panel - }), new AnchorPoint({ - index: anchorCount - 1, - position: anchors[anchorCount - 1].position - rangeDiff, - panel: anchors[anchorCount - 1].panel - })].filter(function (anchor) { - return !!anchor; - }); - anchorInRange = possibleAnchors.reduce(function (nearest, anchor) { - if (!nearest) return anchor; - return Math.abs(nearest.position - position) < Math.abs(anchor.position - position) ? nearest : anchor; - }, null); - } - if (!anchorInRange) return null; - if (position < range.min) { - var loopCount = -Math.floor((range.min - position) / rangeDiff) - 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } else if (position > range.max) { - var loopCount = Math.floor((position - range.max) / rangeDiff) + 1; - return new AnchorPoint({ - index: anchorInRange.index, - position: anchorInRange.position + rangeDiff * loopCount, - panel: anchorInRange.panel - }); - } - return anchorInRange; - }; - __proto.getCircularOffset = function () { - var flicking = this._flicking; - var camera = flicking.camera; - if (!camera.circularEnabled) return 0; - var toggled = flicking.panels.filter(function (panel) { - return panel.toggled; - }); - var toggledPrev = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = toggled.filter(function (panel) { - return panel.toggleDirection === DIRECTION.NEXT; - }); - return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext); - }; - __proto.clampToReachablePosition = function (position) { - // Basically all position is reachable for circular camera - return position; - }; - __proto.canReach = function (panel) { - if (panel.removed) return false; - // Always reachable on circular mode - return true; - }; - __proto.canSee = function (panel) { - var camera = this._flicking.camera; - var range = camera.range; - var rangeDiff = camera.rangeDiff; - var visibleRange = camera.visibleRange; - var visibleInCurrentRange = _super.prototype.canSee.call(this, panel); - // Check looped visible area for circular case - if (visibleRange.min < range.min) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff); - } else if (visibleRange.max > range.max) { - return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff); - } - return visibleInCurrentRange; - }; - __proto._calcPanelAreaSum = function (panels) { - return panels.reduce(function (sum, panel) { - return sum + panel.sizeIncludingMargin; - }, 0); - }; - return CircularCameraMode; - }(CameraMode); - - var BoundCameraMode = /*#__PURE__*/function (_super) { - __extends$3(BoundCameraMode, _super); - function BoundCameraMode() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = BoundCameraMode.prototype; - __proto.checkAvailability = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return false; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - return isBiggerThanViewport; - }; - __proto.getRange = function () { - var flicking = this._flicking; - var renderer = flicking.renderer; - var alignPos = flicking.camera.alignPosition; - var firstPanel = renderer.getPanel(0); - var lastPanel = renderer.getPanel(renderer.panelCount - 1); - if (!firstPanel || !lastPanel) { - return { - min: 0, - max: 0 - }; - } - var viewportSize = flicking.camera.size; - var firstPanelPrev = firstPanel.range.min; - var lastPanelNext = lastPanel.range.max; - var panelAreaSize = lastPanelNext - firstPanelPrev; - var isBiggerThanViewport = viewportSize < panelAreaSize; - var firstPos = firstPanelPrev + alignPos; - var lastPos = lastPanelNext - viewportSize + alignPos; - if (isBiggerThanViewport) { - return { - min: firstPos, - max: lastPos - }; - } else { - var align = flicking.camera.align; - var alignVal = typeof align === "object" ? align.camera : align; - var pos = firstPos + parseAlign$1(alignVal, lastPos - firstPos); - return { - min: pos, - max: pos - }; - } - }; - __proto.getAnchors = function () { - var flicking = this._flicking; - var camera = flicking.camera; - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - return []; - } - var range = flicking.camera.range; - var reachablePanels = panels.filter(function (panel) { - return camera.canReach(panel); - }); - if (reachablePanels.length > 0) { - var shouldPrependBoundAnchor = reachablePanels[0].position !== range.min; - var shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max; - var indexOffset_1 = shouldPrependBoundAnchor ? 1 : 0; - var newAnchors = reachablePanels.map(function (panel, idx) { - return new AnchorPoint({ - index: idx + indexOffset_1, - position: panel.position, - panel: panel - }); - }); - if (shouldPrependBoundAnchor) { - newAnchors.splice(0, 0, new AnchorPoint({ - index: 0, - position: range.min, - panel: panels[reachablePanels[0].index - 1] - })); - } - if (shouldAppendBoundAnchor) { - newAnchors.push(new AnchorPoint({ - index: newAnchors.length, - position: range.max, - panel: panels[reachablePanels[reachablePanels.length - 1].index + 1] - })); - } - return newAnchors; - } else if (range.min !== range.max) { - // There're more than 2 panels - var nearestPanelAtMin = this._findNearestPanel(range.min, panels); - var panelAtMin = nearestPanelAtMin.index === panels.length - 1 ? nearestPanelAtMin.prev() : nearestPanelAtMin; - var panelAtMax = panelAtMin.next(); - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: panelAtMin - }), new AnchorPoint({ - index: 1, - position: range.max, - panel: panelAtMax - })]; - } else { - return [new AnchorPoint({ - index: 0, - position: range.min, - panel: this._findNearestPanel(range.min, panels) - })]; - } - }; - __proto.findAnchorIncludePosition = function (position) { - var camera = this._flicking.camera; - var range = camera.range; - var anchors = camera.anchorPoints; - if (anchors.length <= 0) return null; - if (position <= range.min) { - return anchors[0]; - } else if (position >= range.max) { - return anchors[anchors.length - 1]; - } else { - return _super.prototype.findAnchorIncludePosition.call(this, position); - } - }; - __proto._findNearestPanel = function (pos, panels) { - var prevDist = Infinity; - for (var panelIdx = 0; panelIdx < panels.length; panelIdx++) { - var panel = panels[panelIdx]; - var dist = Math.abs(panel.position - pos); - if (dist > prevDist) { - // Return previous anchor - return panels[panelIdx - 1]; - } - prevDist = dist; - } - // Return last anchor - return panels[panels.length - 1]; - }; - return BoundCameraMode; - }(CameraMode); - - /** - * A component that manages actual movement inside the viewport - * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트 - */ - var Camera$1 = /*#__PURE__*/function () { - /** */ - function Camera(flicking, _a) { - var _this = this; - var _b = (_a === void 0 ? {} : _a).align, - align = _b === void 0 ? ALIGN.CENTER : _b; - this._checkTranslateSupport = function () { - var e_1, _a; - var transforms = ["webkitTransform", "msTransform", "MozTransform", "OTransform", "transform"]; - var supportedStyle = document.documentElement.style; - var transformName = ""; - try { - for (var transforms_1 = __values$1(transforms), transforms_1_1 = transforms_1.next(); !transforms_1_1.done; transforms_1_1 = transforms_1.next()) { - var prefixedTransform = transforms_1_1.value; - if (prefixedTransform in supportedStyle) { - transformName = prefixedTransform; - } - } - } catch (e_1_1) { - e_1 = { - error: e_1_1 - }; - } finally { - try { - if (transforms_1_1 && !transforms_1_1.done && (_a = transforms_1.return)) _a.call(transforms_1); - } finally { - if (e_1) throw e_1.error; - } - } - if (!transformName) { - throw new FlickingError(MESSAGE.TRANSFORM_NOT_SUPPORTED, CODE.TRANSFORM_NOT_SUPPORTED); - } - _this._transform = transformName; - }; - this._flicking = flicking; - this._resetInternalValues(); - // Options - this._align = align; - } - var __proto = Camera.prototype; - Object.defineProperty(__proto, "element", { - // Internal states getter - /** - * The camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`) - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._el; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "children", { - /** - * An array of the child elements of the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열 - * @type {HTMLElement[]} - * @readonly - */ - get: function () { - return toArray$2(this._el.children); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Current position of the camera - * @ko Camera의 현재 좌표 - * @type {number} - * @readonly - */ - get: function () { - return this._position; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at - * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option - * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다. - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._offset - this._circularOffset; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "mode", { - /** - * A current camera mode - * @type {CameraMode} - * @readonly - */ - get: function () { - return this._mode; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * A range that Camera's {@link Camera#position position} can reach - * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} max A maximum position최대 위치 - * @readonly - */ - get: function () { - return this._range; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rangeDiff", { - /** - * A difference between Camera's minimum and maximum position that can reach - * @ko Camera가 도달 가능한 최소/최대 좌표의 차이 - * @type {number} - * @readonly - */ - get: function () { - return this._range.max - this._range.min; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * An array of visible panels from the current position - * @ko 현재 보이는 패널들의 배열 - * @type {Panel[]} - * @readonly - */ - get: function () { - return this._visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRange", { - /** - * A range of the visible area from the current position - * @ko 현재 위치에서 보이는 범위 - * @type {object} - * @property {number} min A minimum position최소 위치 - * @property {number} min A maximum position최대 위치 - * @readonly - */ - get: function () { - return { - min: this._position - this._alignPos, - max: this._position - this._alignPos + this.size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "anchorPoints", { - /** - * An array of {@link AnchorPoint}s that Camera can be stopped at - * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록 - * @type {AnchorPoint[]} - * @readonly - */ - get: function () { - return this._anchors; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "controlParams", { - /** - * A current parameters of the Camera for updating {@link AxesController} - * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들 - * @type {ControlParams} - * @readonly - */ - get: function () { - return { - range: this._range, - position: this._position, - circular: this._circularEnabled - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "atEdge", { - /** - * A Boolean value indicating whether Camera's over the minimum or maximum position reachable - * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다 - * @type {boolean} - * @readonly - */ - get: function () { - return this._position <= this._range.min || this._position >= this._range.max; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Return the size of the viewport - * @ko 뷰포트 크기를 반환합니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return flicking ? flicking.horizontal ? flicking.viewport.width : flicking.viewport.height : 0; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Return the camera's position progress from the first panel to last panel - * Range is from 0 to last panel's index - * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다 - * 범위는 0부터 마지막 패널의 인덱스까지입니다 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var position = this._position + this._offset; - var nearestAnchor = this.findNearestAnchor(this._position); - if (!flicking || !nearestAnchor) { - return NaN; - } - var nearestPanel = nearestAnchor.panel; - var panelPos = nearestPanel.position + nearestPanel.offset; - var bounceSize = flicking.control.controller.bounce; - var _a = this.range, - prevRange = _a.min, - nextRange = _a.max; - var rangeDiff = this.rangeDiff; - if (position === panelPos) { - return nearestPanel.index; - } - if (position < panelPos) { - var prevPanel = nearestPanel.prev(); - var prevPosition = prevPanel ? prevPanel.position + prevPanel.offset : prevRange - bounceSize[0]; - // Looped - if (prevPosition > panelPos) { - prevPosition -= rangeDiff; - } - return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos); - } else { - var nextPanel = nearestPanel.next(); - var nextPosition = nextPanel ? nextPanel.position + nextPanel.offset : nextRange + bounceSize[1]; - // Looped - if (nextPosition < panelPos) { - nextPosition += rangeDiff; - } - return nearestPanel.index + getProgress(position, panelPos, nextPosition); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelOrder", { - /** - * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`) - * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성 - * @type {string} - * @readonly - */ - get: function () { - return this._panelOrder; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element - * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Camera - * @ko Camera를 초기화합니다 - * @throws {FlickingError} - * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element - * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우 - * @return {this} - */ - __proto.init = function () { - var viewportEl = this._flicking.viewport.element; - checkExistence(viewportEl.firstElementChild, "First element child of the viewport element"); - this._el = viewportEl.firstElementChild; - this._checkTranslateSupport(); - this._updateMode(); - this.updatePanelOrder(); - return this; - }; - /** - * Destroy Camera and return to initial state - * @ko Camera를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalValues(); - return this; - }; - /** - * Move to the given position and apply CSS transform - * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다 - * @param {number} pos A new position움직일 위치 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.lookAt = function (pos) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var prevPos = this._position; - this._position = pos; - var toggled = this._togglePanels(prevPos, pos); - this._refreshVisiblePanels(); - this._checkNeedPanel(); - this._checkReachEnd(prevPos, pos); - if (toggled) { - void flicking.renderer.render().then(function () { - _this.updateOffset(); - }); - } else { - this.applyTransform(); - } - }; - /** - * Return a previous {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint} - */ - __proto.getPrevAnchor = function (anchor) { - if (!this._circularEnabled || anchor.index !== 0) { - return this._anchors[anchor.index - 1] || null; - } else { - var anchors = this._anchors; - var rangeDiff = this.rangeDiff; - var lastAnchor = anchors[anchors.length - 1]; - return new AnchorPoint({ - index: lastAnchor.index, - position: lastAnchor.position - rangeDiff, - panel: lastAnchor.panel - }); - } - }; - /** - * Return a next {@link AnchorPoint} of given {@link AnchorPoint} - * If it does not exist, return `null` instead - * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다 - * 존재하지 않을 경우 `null`을 반환합니다 - * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint} - * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint} - */ - __proto.getNextAnchor = function (anchor) { - var anchors = this._anchors; - if (!this._circularEnabled || anchor.index !== anchors.length - 1) { - return anchors[anchor.index + 1] || null; - } else { - var rangeDiff = this.rangeDiff; - var firstAnchor = anchors[0]; - return new AnchorPoint({ - index: firstAnchor.index, - position: firstAnchor.position + rangeDiff, - panel: firstAnchor.panel - }); - } - }; - /** - * Return the camera's position progress in the panel below - * Value is from 0 to 1 when the camera's inside panel - * Value can be lower than 0 or bigger than 1 when it's in the margin area - * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다 - * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다 - * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다 - */ - __proto.getProgressInPanel = function (panel) { - var panelRange = panel.range; - return (this._position - panelRange.min) / (panelRange.max - panelRange.min); - }; - /** - * Return {@link AnchorPoint} that includes given position - * If there's no {@link AnchorPoint} that includes the given position, return `null` instead - * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다 - * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint} - */ - __proto.findAnchorIncludePosition = function (position) { - return this._mode.findAnchorIncludePosition(position); - }; - /** - * Return {@link AnchorPoint} nearest to given position - * If there're no {@link AnchorPoint}s, return `null` instead - * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다 - * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다 - * @param {number} position A position to check확인할 좌표 - * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint} - */ - __proto.findNearestAnchor = function (position) { - return this._mode.findNearestAnchor(position); - }; - /** - * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel} - * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다 - * @return {AnchorPoint | null} - */ - __proto.findActiveAnchor = function () { - var _a; - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!activePanel) return null; - return (_a = find$1(this._anchors, function (anchor) { - return anchor.panel.index === activePanel.index; - })) !== null && _a !== void 0 ? _a : this.findNearestAnchor(activePanel.position); - }; - /** - * Clamp the given position between camera's range - * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다 - * @param {number} position A position to clamp범위를 제한할 좌표 - * @return {number} A clamped position범위 제한된 좌표 - */ - __proto.clampToReachablePosition = function (position) { - return this._mode.clampToReachablePosition(position); - }; - /** - * Check whether the given panel is inside of the Camera's range - * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부 - */ - __proto.canReach = function (panel) { - return this._mode.canReach(panel); - }; - /** - * Check whether the given panel element is visible at the current position - * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다 - * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스 - * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부 - */ - __proto.canSee = function (panel) { - return this._mode.canSee(panel); - }; - /** - * Update {@link Camera#range range} of Camera - * @ko Camera의 {@link Camera#range range}를 업데이트합니다 - * @method - * @abstract - * @memberof Camera - * @instance - * @name updateRange - * @chainable - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @return {this} - */ - __proto.updateRange = function () { - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - var panels = renderer.panels; - this._updateMode(); - this._range = this._mode.getRange(); - panels.forEach(function (panel) { - return panel.updateCircularToggleDirection(); - }); - return this; - }; - /** - * Update Camera's {@link Camera#alignPosition alignPosition} - * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateAlignPos = function () { - var align = this._align; - var alignVal = typeof align === "object" ? align.camera : align; - this._alignPos = parseAlign$1(alignVal, this.size); - return this; - }; - /** - * Update Camera's {@link Camera#anchorPoints anchorPoints} - * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAnchors = function () { - this._anchors = this._mode.getAnchors(); - return this; - }; - /** - * Update Viewport's height to active panel's height - * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다 - * @throws {FlickingError} - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before - * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우 - * @chainable - * @return {this} - */ - __proto.updateAdaptiveHeight = function () { - var flicking = getFlickingAttached(this._flicking); - var activePanel = flicking.control.activePanel; - if (!flicking.horizontal || !flicking.adaptive || !activePanel) return; - flicking.viewport.setSize({ - height: activePanel.height - }); - }; - /** - * Update current offset of the camera - * @ko 현재 카메라의 오프셋을 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updateOffset = function () { - var flicking = getFlickingAttached(this._flicking); - var position = this._position; - var unRenderedPanels = flicking.panels.filter(function (panel) { - return !panel.rendered; - }); - this._offset = unRenderedPanels.filter(function (panel) { - return panel.position + panel.offset < position; - }).reduce(function (offset, panel) { - return offset + panel.sizeIncludingMargin; - }, 0); - this._circularOffset = this._mode.getCircularOffset(); - this.applyTransform(); - return this; - }; - /** - * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element - * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다 - * @return {this} - */ - __proto.updatePanelOrder = function () { - var flicking = getFlickingAttached(this._flicking); - if (!flicking.horizontal) return this; - var el = this._el; - var direction = getStyle(el).direction; - if (direction !== this._panelOrder) { - this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR; - if (flicking.initialized) { - flicking.control.controller.updateDirection(); - } - } - return this; - }; - /** - * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again - * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다 - * @chainable - * @return {this} - */ - __proto.resetNeedPanelHistory = function () { - this._needPanelTriggered = { - prev: false, - next: false - }; - return this; - }; - /** - * Apply "transform" style with the current position to camera element - * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다. - * @return {this} - */ - __proto.applyTransform = function () { - var el = this._el; - var flicking = getFlickingAttached(this._flicking); - var renderer = flicking.renderer; - if (renderer.rendering || !flicking.initialized) return this; - var actualPosition = this._position - this._alignPos - this._offset + this._circularOffset; - el.style[this._transform] = flicking.horizontal ? "translate(" + (this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition) + "px)" : "translate(0, " + -actualPosition + "px)"; - return this; - }; - __proto._resetInternalValues = function () { - this._position = 0; - this._alignPos = 0; - this._offset = 0; - this._circularOffset = 0; - this._circularEnabled = false; - this._range = { - min: 0, - max: 0 - }; - this._visiblePanels = []; - this._anchors = []; - this._needPanelTriggered = { - prev: false, - next: false - }; - }; - __proto._refreshVisiblePanels = function () { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var newVisiblePanels = panels.filter(function (panel) { - return _this.canSee(panel); - }); - var prevVisiblePanels = this._visiblePanels; - this._visiblePanels = newVisiblePanels; - var added = newVisiblePanels.filter(function (panel) { - return !includes(prevVisiblePanels, panel); - }); - var removed = prevVisiblePanels.filter(function (panel) { - return !includes(newVisiblePanels, panel); - }); - if (added.length > 0 || removed.length > 0) { - void flicking.renderer.render().then(function () { - flicking.trigger(new ComponentEvent$1(EVENTS.VISIBLE_CHANGE, { - added: added, - removed: removed, - visiblePanels: newVisiblePanels - })); - }); - } - }; - __proto._checkNeedPanel = function () { - var needPanelTriggered = this._needPanelTriggered; - if (needPanelTriggered.prev && needPanelTriggered.next) return; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - if (panels.length <= 0) { - if (!needPanelTriggered.prev) { - flicking.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - if (!needPanelTriggered.next) { - flicking.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - return; - } - var cameraPosition = this._position; - var cameraSize = this.size; - var cameraRange = this._range; - var needPanelThreshold = flicking.needPanelThreshold; - var cameraPrev = cameraPosition - this._alignPos; - var cameraNext = cameraPrev + cameraSize; - var firstPanel = panels[0]; - var lastPanel = panels[panels.length - 1]; - if (!needPanelTriggered.prev) { - var firstPanelPrev = firstPanel.range.min; - if (cameraPrev <= firstPanelPrev + needPanelThreshold || cameraPosition <= cameraRange.min + needPanelThreshold) { - flicking.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { - direction: DIRECTION.PREV - })); - needPanelTriggered.prev = true; - } - } - if (!needPanelTriggered.next) { - var lastPanelNext = lastPanel.range.max; - if (cameraNext >= lastPanelNext - needPanelThreshold || cameraPosition >= cameraRange.max - needPanelThreshold) { - flicking.trigger(new ComponentEvent$1(EVENTS.NEED_PANEL, { - direction: DIRECTION.NEXT - })); - needPanelTriggered.next = true; - } - } - }; - __proto._checkReachEnd = function (prevPos, newPos) { - var flicking = getFlickingAttached(this._flicking); - var range = this._range; - var wasBetweenRange = prevPos > range.min && prevPos < range.max; - var isBetweenRange = newPos > range.min && newPos < range.max; - if (!wasBetweenRange || isBetweenRange) return; - var direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT; - flicking.trigger(new ComponentEvent$1(EVENTS.REACH_EDGE, { - direction: direction - })); - }; - __proto._updateMode = function () { - var flicking = getFlickingAttached(this._flicking); - if (flicking.circular) { - var circularMode = new CircularCameraMode(flicking); - var canSetCircularMode = circularMode.checkAvailability(); - if (canSetCircularMode) { - this._mode = circularMode; - } else { - var fallbackMode = flicking.circularFallback; - this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - } - this._circularEnabled = canSetCircularMode; - } else { - this._mode = flicking.bound ? new BoundCameraMode(flicking) : new LinearCameraMode(flicking); - this._circularEnabled = false; - } - }; - __proto._togglePanels = function (prevPos, pos) { - if (pos === prevPos) return false; - var flicking = getFlickingAttached(this._flicking); - var panels = flicking.renderer.panels; - var toggled = panels.map(function (panel) { - return panel.toggle(prevPos, pos); - }); - return toggled.some(function (isToggled) { - return isToggled; - }); - }; - return Camera; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Camera = { - __proto__: null, - Camera: Camera$1, - LinearCameraMode: LinearCameraMode, - CircularCameraMode: CircularCameraMode, - BoundCameraMode: BoundCameraMode - }; - - /* - Copyright (c) NAVER Corp. - name: @egjs/imready - license: MIT - author: NAVER Corp. - repository: https://github.com/naver/egjs-imready - version: 1.4.1 - */ - - /****************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise */ - - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - }; - return extendStatics(d, b); - }; - function __extends(d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { - this.constructor = d; - } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - } - var __assign = function () { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); - }; - - /** @deprecated */ - function __spreadArrays() { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; - return r; - } - - /* - egjs-imready - Copyright (c) 2020-present NAVER Corp. - MIT license - */ - var isWindow = typeof window !== "undefined"; - var ua = isWindow ? window.navigator.userAgent : ""; - var SUPPORT_COMPUTEDSTYLE = isWindow ? !!("getComputedStyle" in window) : false; - var IS_IE = /MSIE|Trident|Windows Phone|Edge/.test(ua); - var SUPPORT_ADDEVENTLISTENER = isWindow ? !!("addEventListener" in document) : false; - var WIDTH = "width"; - var HEIGHT = "height"; - - function getAttribute(el, name) { - return el.getAttribute(name) || ""; - } - function toArray(arr) { - return [].slice.call(arr); - } - function hasSizeAttribute(target, prefix) { - if (prefix === void 0) { - prefix = "data-"; - } - return !!target.getAttribute(prefix + "width"); - } - function hasLoadingAttribute(target, prefix) { - if (prefix === void 0) { - prefix = "data-"; - } - return "loading" in target && target.getAttribute("loading") === "lazy" || !!target.getAttribute(prefix + "lazy"); - } - function hasSkipAttribute(target, prefix) { - if (prefix === void 0) { - prefix = "data-"; - } - return !!target.getAttribute(prefix + "skip"); - } - function addEvent(element, type, handler) { - if (SUPPORT_ADDEVENTLISTENER) { - element.addEventListener(type, handler, false); - } else if (element.attachEvent) { - element.attachEvent("on" + type, handler); - } else { - element["on" + type] = handler; - } - } - function removeEvent(element, type, handler) { - if (element.removeEventListener) { - element.removeEventListener(type, handler, false); - } else if (element.detachEvent) { - element.detachEvent("on" + type, handler); - } else { - element["on" + type] = null; - } - } - function innerWidth(el) { - return getSize(el, "Width"); - } - function innerHeight(el) { - return getSize(el, "Height"); - } - function getStyles(el) { - return (SUPPORT_COMPUTEDSTYLE ? window.getComputedStyle(el) : el.currentStyle) || {}; - } - function getSize(el, name) { - var size = el["client" + name] || el["offset" + name]; - return parseFloat(size || getStyles(el)[name.toLowerCase()]) || 0; - } - function getContentElements(element, tags, prefix) { - var skipElements = toArray(element.querySelectorAll(__spreadArrays(["[" + prefix + "skip] [" + prefix + "width]"], tags.map(function (tag) { - return ["[" + prefix + "skip] " + tag, tag + "[" + prefix + "skip]", "[" + prefix + "width] " + tag].join(", "); - })).join(", "))); - return toArray(element.querySelectorAll("[" + prefix + "width], " + tags.join(", "))).filter(function (el) { - return skipElements.indexOf(el) === -1; - }); - } - - /* - egjs-imready - Copyright (c) 2020-present NAVER Corp. - MIT license - */ - var elements = []; - function addAutoSizer(element, prefix) { - !elements.length && addEvent(window, "resize", resizeAllAutoSizers); - element.__PREFIX__ = prefix; - elements.push(element); - resize(element); - } - function removeAutoSizer(element, prefix) { - var index = elements.indexOf(element); - if (index < 0) { - return; - } - var fixed = getAttribute(element, prefix + "fixed"); - delete element.__PREFIX__; - element.style[fixed === HEIGHT ? WIDTH : HEIGHT] = ""; - elements.splice(index, 1); - !elements.length && removeEvent(window, "resize", resizeAllAutoSizers); - } - function resize(element, prefix) { - if (prefix === void 0) { - prefix = "data-"; - } - var elementPrefix = element.__PREFIX__ || prefix; - var dataWidth = parseInt(getAttribute(element, "" + elementPrefix + WIDTH), 10) || 0; - var dataHeight = parseInt(getAttribute(element, "" + elementPrefix + HEIGHT), 10) || 0; - var fixed = getAttribute(element, elementPrefix + "fixed"); - if (fixed === HEIGHT) { - var size = innerHeight(element) || dataHeight; - element.style[WIDTH] = dataWidth / dataHeight * size + "px"; - } else { - var size = innerWidth(element) || dataWidth; - element.style[HEIGHT] = dataHeight / dataWidth * size + "px"; - } - } - function resizeAllAutoSizers() { - elements.forEach(function (element) { - resize(element); - }); - } - - var Loader = /*#__PURE__*/function (_super) { - __extends(Loader, _super); - function Loader(element, options) { - if (options === void 0) { - options = {}; - } - var _this = _super.call(this) || this; - _this.isReady = false; - _this.isPreReady = false; - _this.hasDataSize = false; - _this.hasLoading = false; - _this.isSkip = false; - _this.onCheck = function (e) { - _this.clear(); - if (e && e.type === "error") { - _this.onError(_this.element); - } - if (_this.hasLoading && _this.checkElement()) { - // I'm not ready - return; - } - // I'm pre-ready and ready! - var withPreReady = !_this.hasDataSize && !_this.hasLoading; - _this.onReady(withPreReady); - }; - _this.options = __assign({ - prefix: "data-" - }, options); - _this.element = element; - var prefix = _this.options.prefix; - _this.hasDataSize = hasSizeAttribute(element, prefix); - _this.isSkip = hasSkipAttribute(element, prefix); - _this.hasLoading = hasLoadingAttribute(element, prefix); - return _this; - } - var __proto = Loader.prototype; - __proto.check = function () { - if (this.isSkip || !this.checkElement()) { - // I'm Ready - this.onAlreadyReady(true); - return false; - } - if (this.hasDataSize) { - addAutoSizer(this.element, this.options.prefix); - } - if (this.hasDataSize || this.hasLoading) { - // I'm Pre Ready - this.onAlreadyPreReady(); - } - // Wati Pre Ready, Ready - return true; - }; - __proto.addEvents = function () { - var _this = this; - var element = this.element; - this.constructor.EVENTS.forEach(function (name) { - addEvent(element, name, _this.onCheck); - }); - }; - __proto.clear = function () { - var _this = this; - var element = this.element; - this.constructor.EVENTS.forEach(function (name) { - removeEvent(element, name, _this.onCheck); - }); - this.removeAutoSizer(); - }; - __proto.destroy = function () { - this.clear(); - this.off(); - }; - __proto.removeAutoSizer = function () { - if (this.hasDataSize) { - // I'm already ready. - var prefix = this.options.prefix; - removeAutoSizer(this.element, prefix); - } - }; - __proto.onError = function (target) { - this.trigger("error", { - element: this.element, - target: target - }); - }; - __proto.onPreReady = function () { - if (this.isPreReady) { - return; - } - this.isPreReady = true; - this.trigger("preReady", { - element: this.element, - hasLoading: this.hasLoading, - isSkip: this.isSkip - }); - }; - __proto.onReady = function (withPreReady) { - if (this.isReady) { - return; - } - withPreReady = !this.isPreReady && withPreReady; - if (withPreReady) { - this.isPreReady = true; - } - this.removeAutoSizer(); - this.isReady = true; - this.trigger("ready", { - element: this.element, - withPreReady: withPreReady, - hasLoading: this.hasLoading, - isSkip: this.isSkip - }); - }; - __proto.onAlreadyError = function (target) { - var _this = this; - setTimeout(function () { - _this.onError(target); - }); - }; - __proto.onAlreadyPreReady = function () { - var _this = this; - setTimeout(function () { - _this.onPreReady(); - }); - }; - __proto.onAlreadyReady = function (withPreReady) { - var _this = this; - setTimeout(function () { - _this.onReady(withPreReady); - }); - }; - Loader.EVENTS = []; - return Loader; - }(Component); - - var ElementLoader = /*#__PURE__*/function (_super) { - __extends(ElementLoader, _super); - function ElementLoader() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = ElementLoader.prototype; - __proto.setHasLoading = function (hasLoading) { - this.hasLoading = hasLoading; - }; - __proto.check = function () { - if (this.isSkip) { - // I'm Ready - this.onAlreadyReady(true); - return false; - } - if (this.hasDataSize) { - addAutoSizer(this.element, this.options.prefix); - this.onAlreadyPreReady(); - } else { - // has not data size - this.trigger("requestChildren"); - } - return true; - }; - __proto.checkElement = function () { - return true; - }; - __proto.destroy = function () { - this.clear(); - this.trigger("requestDestroy"); - this.off(); - }; - __proto.onAlreadyPreReady = function () { - // has data size - _super.prototype.onAlreadyPreReady.call(this); - this.trigger("reqeustReadyChildren"); - }; - ElementLoader.EVENTS = []; - return ElementLoader; - }(Loader); - - /** - * @alias eg.ImReady - * @extends eg.Component - */ - var ImReadyManager = /*#__PURE__*/function (_super) { - __extends(ImReadyManager, _super); - /** - * @param - ImReady's options - */ - function ImReadyManager(options) { - if (options === void 0) { - options = {}; - } - var _this = _super.call(this) || this; - _this.readyCount = 0; - _this.preReadyCount = 0; - _this.totalCount = 0; - _this.totalErrorCount = 0; - _this.isPreReadyOver = true; - _this.elementInfos = []; - _this.options = __assign({ - loaders: {}, - prefix: "data-" - }, options); - return _this; - } - /** - * Checks whether elements are in the ready state. - * @ko 엘리먼트가 준비 상태인지 체크한다. - * @elements - Elements to check ready status. 준비 상태를 체크할 엘리먼트들. - * @example - * ```html - *
- * - * - * - *
- * ``` - * ## Javascript - * ```js - * import ImReady from "@egjs/imready"; - * - * const im = new ImReady(); // umd: eg.ImReady - * im.check(document.querySelectorAll("img")).on({ - * preReadyElement: e => { - * // 1, 3 - * // 2, 3 - * // 3, 3 - * console.log(e.preReadyCount, e.totalCount), - * }, - * }); - * ``` - */ - var __proto = ImReadyManager.prototype; - __proto.check = function (elements) { - var _this = this; - var prefix = this.options.prefix; - this.clear(); - this.elementInfos = toArray(elements).map(function (element, index) { - var loader = _this.getLoader(element, { - prefix: prefix - }); - loader.check(); - loader.on("error", function (e) { - _this.onError(index, e.target); - }).on("preReady", function (e) { - var info = _this.elementInfos[index]; - info.hasLoading = e.hasLoading; - info.isSkip = e.isSkip; - var isPreReady = _this.checkPreReady(index); - _this.onPreReadyElement(index); - isPreReady && _this.onPreReady(); - }).on("ready", function (_a) { - var withPreReady = _a.withPreReady, - hasLoading = _a.hasLoading, - isSkip = _a.isSkip; - var info = _this.elementInfos[index]; - info.hasLoading = hasLoading; - info.isSkip = isSkip; - var isPreReady = withPreReady && _this.checkPreReady(index); - var isReady = _this.checkReady(index); - // Pre-ready and ready occur simultaneously - withPreReady && _this.onPreReadyElement(index); - _this.onReadyElement(index); - isPreReady && _this.onPreReady(); - isReady && _this.onReady(); - }); - return { - loader: loader, - element: element, - hasLoading: false, - hasError: false, - isPreReady: false, - isReady: false, - isSkip: false - }; - }); - var length = this.elementInfos.length; - this.totalCount = length; - if (!length) { - setTimeout(function () { - _this.onPreReady(); - _this.onReady(); - }); - } - return this; - }; - /** - * Gets the total count of elements to be checked. - * @ko 체크하는 element의 총 개수를 가져온다. - */ - __proto.getTotalCount = function () { - return this.totalCount; - }; - /** - * Whether the elements are all pre-ready. (all sizes are known) - * @ko 엘리먼트들이 모두 사전 준비가 됐는지 (사이즈를 전부 알 수 있는지) 여부. - */ - __proto.isPreReady = function () { - return this.elementInfos.every(function (info) { - return info.isPreReady; - }); - }; - /** - * Whether the elements are all ready. - * @ko 엘리먼트들이 모두 준비가 됐는지 여부. - */ - __proto.isReady = function () { - return this.elementInfos.every(function (info) { - return info.isReady; - }); - }; - /** - * Whether an error has occurred in the elements in the current state. - * @ko 현재 상태에서 엘리먼트들이 에러가 발생했는지 여부. - */ - __proto.hasError = function () { - return this.totalErrorCount > 0; - }; - /** - * Clears events of elements being checked. - * @ko 체크 중인 엘리먼트들의 이벤트를 해제 한다. - */ - __proto.clear = function () { - this.isPreReadyOver = false; - this.totalCount = 0; - this.preReadyCount = 0; - this.readyCount = 0; - this.totalErrorCount = 0; - this.elementInfos.forEach(function (info) { - if (info.loader) { - info.loader.destroy(); - } - }); - this.elementInfos = []; - }; - /** - * Destory all events. - * @ko 모든 이벤트를 해제 한다. - */ - __proto.destroy = function () { - this.clear(); - this.off(); - }; - __proto.getLoader = function (element, options) { - var _this = this; - var tagName = element.tagName.toLowerCase(); - var loaders = this.options.loaders; - var prefix = options.prefix; - var tags = Object.keys(loaders); - if (loaders[tagName]) { - return new loaders[tagName](element, options); - } - var loader = new ElementLoader(element, options); - var children = toArray(element.querySelectorAll(tags.join(", "))); - loader.setHasLoading(children.some(function (el) { - return hasLoadingAttribute(el, prefix); - })); - var withPreReady = false; - var childrenImReady = this.clone().on("error", function (e) { - loader.onError(e.target); - }).on("ready", function () { - loader.onReady(withPreReady); - }); - loader.on("requestChildren", function () { - // has not data size - var contentElements = getContentElements(element, tags, _this.options.prefix); - childrenImReady.check(contentElements).on("preReady", function (e) { - withPreReady = e.isReady; - if (!withPreReady) { - loader.onPreReady(); - } - }); - }).on("reqeustReadyChildren", function () { - // has data size - // loader call preReady - // check only video, image elements - childrenImReady.check(children); - }).on("requestDestroy", function () { - childrenImReady.destroy(); - }); - return loader; - }; - __proto.clone = function () { - return new ImReadyManager(__assign({}, this.options)); - }; - __proto.checkPreReady = function (index) { - this.elementInfos[index].isPreReady = true; - ++this.preReadyCount; - if (this.preReadyCount < this.totalCount) { - return false; - } - return true; - }; - __proto.checkReady = function (index) { - this.elementInfos[index].isReady = true; - ++this.readyCount; - if (this.readyCount < this.totalCount) { - return false; - } - return true; - }; - __proto.onError = function (index, target) { - var info = this.elementInfos[index]; - info.hasError = true; - /** - * An event occurs if the image, video fails to load. - * @ko 이미지, 비디오가 로딩에 실패하면 이벤트가 발생한다. - * @event eg.ImReady#error - * @param {eg.ImReady.OnError} e - The object of data to be sent to an event 이벤트에 전달되는 데이터 객체 - * @example - * ```html - *
- * - * - * - *
- * ``` - * ## Javascript - * ```js - * import ImReady from "@egjs/imready"; - * - * const im = new ImReady(); // umd: eg.ImReady - * im.check([document.querySelector("div")]).on({ - * error: e => { - * //
...
, 0, - * console.log(e.element, e.index, e.target), - * }, - * }); - * ``` - */ - this.trigger(new ComponentEvent$1("error", { - element: info.element, - index: index, - target: target, - errorCount: this.getErrorCount(), - totalErrorCount: ++this.totalErrorCount - })); - }; - __proto.onPreReadyElement = function (index) { - var info = this.elementInfos[index]; - /** - * An event occurs when the element is pre-ready (when the loading attribute is applied or the size is known) - * @ko 해당 엘리먼트가 사전 준비되었을 때(loading 속성이 적용되었거나 사이즈를 알 수 있을 때) 이벤트가 발생한다. - * @event eg.ImReady#preReadyElement - * @param {eg.ImReady.OnPreReadyElement} e - The object of data to be sent to an event 이벤트에 전달되는 데이터 객체 - * @example - * ```html - *
- * - * - * - *
- * ``` - * ## Javascript - * ```js - * import ImReady from "@egjs/imready"; - * - * const im = new ImReady(); // umd: eg.ImReady - * im.check(document.querySelectorAll("img")).on({ - * preReadyElement: e => { - * // 1, 3 - * // 2, 3 - * // 3, 3 - * console.log(e.preReadyCount, e.totalCount), - * }, - * }); - * ``` - */ - this.trigger(new ComponentEvent$1("preReadyElement", { - element: info.element, - index: index, - preReadyCount: this.preReadyCount, - readyCount: this.readyCount, - totalCount: this.totalCount, - isPreReady: this.isPreReady(), - isReady: this.isReady(), - hasLoading: info.hasLoading, - isSkip: info.isSkip - })); - }; - __proto.onPreReady = function () { - this.isPreReadyOver = true; - /** - * An event occurs when all element are pre-ready (When all elements have the loading attribute applied or the size is known) - * @ko 모든 엘리먼트들이 사전 준비된 경우 (모든 엘리먼트들이 loading 속성이 적용되었거나 사이즈를 알 수 있는 경우) 이벤트가 발생한다. - * @event eg.ImReady#preReady - * @param {eg.ImReady.OnPreReady} e - The object of data to be sent to an event 이벤트에 전달되는 데이터 객체 - * @example - * ```html - *
- * - * - * - *
- * ``` - * ## Javascript - * ```js - * import ImReady from "@egjs/imready"; - * - * const im = new ImReady(); // umd: eg.ImReady - * im.check(document.querySelectorAll("img")).on({ - * preReady: e => { - * // 0, 3 - * console.log(e.readyCount, e.totalCount), - * }, - * }); - * ``` - */ - this.trigger(new ComponentEvent$1("preReady", { - readyCount: this.readyCount, - totalCount: this.totalCount, - isReady: this.isReady(), - hasLoading: this.hasLoading() - })); - }; - __proto.onReadyElement = function (index) { - var info = this.elementInfos[index]; - /** - * An event occurs when the element is ready - * @ko 해당 엘리먼트가 준비가 되었을 때 이벤트가 발생한다. - * @event eg.ImReady#readyElement - * @param {eg.ImReady.OnReadyElement} e - The object of data to be sent to an event 이벤트에 전달되는 데이터 객체 - * @example - * ```html - *
- * - * - * - *
- * ``` - * ## Javascript - * ```js - * import ImReady from "@egjs/imready"; - * - * const im = new ImReady(); // umd: eg.ImReady - * im.check(document.querySelectorAll("img")).on({ - * readyElement: e => { - * // 1, 0, false, 3 - * // 2, 1, false, 3 - * // 3, 2, true, 3 - * console.log(e.readyCount, e.index, e.hasError, e.totalCount), - * }, - * }); - * ``` - */ - this.trigger(new ComponentEvent$1("readyElement", { - index: index, - element: info.element, - hasError: info.hasError, - errorCount: this.getErrorCount(), - totalErrorCount: this.totalErrorCount, - preReadyCount: this.preReadyCount, - readyCount: this.readyCount, - totalCount: this.totalCount, - isPreReady: this.isPreReady(), - isReady: this.isReady(), - hasLoading: info.hasLoading, - isPreReadyOver: this.isPreReadyOver, - isSkip: info.isSkip - })); - }; - __proto.onReady = function () { - /** - * An event occurs when all element are ready - * @ko 모든 엘리먼트들이 준비된 경우 이벤트가 발생한다. - * @event eg.ImReady#ready - * @param {eg.ImReady.OnReady} e - The object of data to be sent to an event 이벤트에 전달되는 데이터 객체 - * @example - * ```html - *
- * - * - * - *
- * ``` - * ## Javascript - * ```js - * import ImReady from "@egjs/imready"; - * - * const im = new ImReady(); // umd: eg.ImReady - * im.check(document.querySelectorAll("img")).on({ - * preReady: e => { - * // 0, 3 - * console.log(e.readyCount, e.totalCount), - * }, - * ready: e => { - * // 1, 3 - * console.log(e.errorCount, e.totalCount), - * }, - * }); - * ``` - */ - this.trigger(new ComponentEvent$1("ready", { - errorCount: this.getErrorCount(), - totalErrorCount: this.totalErrorCount, - totalCount: this.totalCount - })); - }; - __proto.getErrorCount = function () { - return this.elementInfos.filter(function (info) { - return info.hasError; - }).length; - }; - __proto.hasLoading = function () { - return this.elementInfos.some(function (info) { - return info.hasLoading; - }); - }; - return ImReadyManager; - }(Component); - - var ImageLoader = /*#__PURE__*/function (_super) { - __extends(ImageLoader, _super); - function ImageLoader() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = ImageLoader.prototype; - __proto.checkElement = function () { - var element = this.element; - var src = element.getAttribute("src"); - if (element.complete) { - if (src) { - // complete - if (!element.naturalWidth) { - this.onAlreadyError(element); - } - return false; - } else { - // Using an external lazy loading module - this.onAlreadyPreReady(); - } - } - this.addEvents(); - IS_IE && element.setAttribute("src", src); - return true; - }; - ImageLoader.EVENTS = ["load", "error"]; - return ImageLoader; - }(Loader); - - var VideoLoader = /*#__PURE__*/function (_super) { - __extends(VideoLoader, _super); - function VideoLoader() { - return _super !== null && _super.apply(this, arguments) || this; - } - var __proto = VideoLoader.prototype; - __proto.checkElement = function () { - var element = this.element; - // HAVE_NOTHING: 0, no information whether or not the audio/video is ready - // HAVE_METADATA: 1, HAVE_METADATA - metadata for the audio/video is ready - // HAVE_CURRENT_DATA: 2, data for the current playback position is available, but not enough data to play next frame/millisecond - // HAVE_FUTURE_DATA: 3, data for the current and at least the next frame is available - // HAVE_ENOUGH_DATA: 4, enough data available to start playing - if (element.readyState >= 1) { - return false; - } - if (element.error) { - this.onAlreadyError(element); - return false; - } - this.addEvents(); - return true; - }; - VideoLoader.EVENTS = ["loadedmetadata", "error"]; - return VideoLoader; - }(Loader); - - var ImReady = /*#__PURE__*/function (_super) { - __extends(ImReady, _super); - function ImReady(options) { - if (options === void 0) { - options = {}; - } - return _super.call(this, __assign({ - loaders: { - img: ImageLoader, - video: VideoLoader - } - }, options)) || this; - } - return ImReady; - }(ImReadyManager); - - /* - egjs-imready - Copyright (c) 2020-present NAVER Corp. - MIT license - */ - - var ImReady$1 = ImReady; - - /** - * A component that manages {@link Panel} and its elements - * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트 - */ - var Renderer$1 = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {Constants.ALIGN | string | number} [options.align="center"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값 - * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈) - */ - function Renderer(_a) { - var _b = _a.align, - align = _b === void 0 ? ALIGN.CENTER : _b, - strategy = _a.strategy; - this._flicking = null; - this._panels = []; - this._rendering = false; - // Bind options - this._align = align; - this._strategy = strategy; - } - var __proto = Renderer.prototype; - Object.defineProperty(__proto, "panels", { - // Internal states Getter - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendering", { - /** - * A boolean value indicating whether rendering is in progress - * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부 - * @type {boolean} - * @readonly - * @internal - */ - get: function () { - return this._rendering; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._panels.length; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "strategy", { - /** - * @internal - */ - get: function () { - return this._strategy; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A {@link Panel}'s {@link Panel#align align} value that applied to all panels - * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - var panelAlign = parsePanelAlign(val); - this._panels.forEach(function (panel) { - panel.align = panelAlign; - }); - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Renderer - * @ko Renderer를 초기화합니다 - * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스 - * @chainable - * @return {this} - */ - __proto.init = function (flicking) { - this._flicking = flicking; - this._collectPanels(); - return this; - }; - /** - * Destroy Renderer and return to initial state - * @ko Renderer를 초기 상태로 되돌립니다 - * @return {void} - */ - __proto.destroy = function () { - this._flicking = null; - this._panels = []; - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - */ - __proto.getPanel = function (index) { - return this._panels[index] || null; - }; - __proto.forceRenderAllPanels = function () { - this._panels.forEach(function (panel) { - return panel.markForShow(); - }); - return Promise.resolve(); - }; - /** - * Update all panel sizes - * @ko 모든 패널의 크기를 업데이트합니다 - * @chainable - * @return {this} - */ - __proto.updatePanelSize = function () { - var flicking = getFlickingAttached(this._flicking); - var panels = this._panels; - if (panels.length <= 0) return this; - if (flicking.panelsPerView > 0) { - var firstPanel = panels[0]; - firstPanel.resize(); - this._updatePanelSizeByGrid(firstPanel, panels); - } else { - flicking.panels.forEach(function (panel) { - return panel.resize(); - }); - } - return this; - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {Array} items An array of items to insert추가할 아이템들의 배열 - * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열 - * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - */ - __proto.batchInsert = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsInserted = this.batchInsertDefer.apply(this, __spread$1(items)); - if (allPanelsInserted.length <= 0) return []; - this.updateAfterPanelChange(allPanelsInserted, []); - return allPanelsInserted; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchInsertDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var prevFirstPanel = panels[0]; - var align = parsePanelAlign(this._align); - var allPanelsInserted = items.reduce(function (addedPanels, item) { - var _a; - var insertingIdx = getMinusCompensatedIndex(item.index, panels.length); - var panelsPushed = panels.slice(insertingIdx); - var panelsInserted = item.elements.map(function (el, idx) { - return _this._createPanel(el, { - index: insertingIdx + idx, - align: align, - flicking: flicking - }); - }); - panels.splice.apply(panels, __spread$1([insertingIdx, 0], panelsInserted)); - if (item.hasDOMInElements) { - // Insert the actual elements as camera element's children - _this._insertPanelElements(panelsInserted, (_a = panelsPushed[0]) !== null && _a !== void 0 ? _a : null); - } - // Resize the newly added panels - if (flicking.panelsPerView > 0) { - var firstPanel = prevFirstPanel || panelsInserted[0].resize(); - _this._updatePanelSizeByGrid(firstPanel, panelsInserted); - } else { - panelsInserted.forEach(function (panel) { - return panel.resize(); - }); - } - // Update panel indexes & positions - panelsPushed.forEach(function (panel) { - panel.increaseIndex(panelsInserted.length); - panel.updatePosition(); - }); - return __spread$1(addedPanels, panelsInserted); - }, []); - return allPanelsInserted; - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {Array} items An array of items to remove제거할 아이템들의 배열 - * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스 - * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다 - * @return An array of removed panels제거된 패널들의 배열 - */ - __proto.batchRemove = function () { - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var allPanelsRemoved = this.batchRemoveDefer.apply(this, __spread$1(items)); - if (allPanelsRemoved.length <= 0) return []; - this.updateAfterPanelChange([], allPanelsRemoved); - return allPanelsRemoved; - }; - /** - * Defers update - * camera position & others will be updated after calling updateAfterPanelChange - * @internal - */ - __proto.batchRemoveDefer = function () { - var _this = this; - var items = []; - for (var _i = 0; _i < arguments.length; _i++) { - items[_i] = arguments[_i]; - } - var panels = this._panels; - var flicking = getFlickingAttached(this._flicking); - var control = flicking.control; - var activePanel = control.activePanel; - var allPanelsRemoved = items.reduce(function (removed, item) { - var index = item.index, - deleteCount = item.deleteCount; - var removingIdx = getMinusCompensatedIndex(index, panels.length); - var panelsPulled = panels.slice(removingIdx + deleteCount); - var panelsRemoved = panels.splice(removingIdx, deleteCount); - if (panelsRemoved.length <= 0) return []; - // Update panel indexes & positions - panelsPulled.forEach(function (panel) { - panel.decreaseIndex(panelsRemoved.length); - panel.updatePosition(); - }); - if (item.hasDOMInElements) { - _this._removePanelElements(panelsRemoved); - } - // Remove panel elements - panelsRemoved.forEach(function (panel) { - return panel.destroy(); - }); - if (includes(panelsRemoved, activePanel)) { - control.resetActive(); - } - return __spread$1(removed, panelsRemoved); - }, []); - return allPanelsRemoved; - }; - /** - * @internal - */ - __proto.updateAfterPanelChange = function (panelsAdded, panelsRemoved) { - var _a; - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - var panels = this._panels; - var activePanel = control.activePanel; - // Update camera & control - this._updateCameraAndControl(); - void this.render(); - if (!flicking.animating) { - if (!activePanel || activePanel.removed) { - if (panels.length <= 0) { - // All panels removed - camera.lookAt(0); - } else { - var targetIndex = (_a = activePanel === null || activePanel === void 0 ? void 0 : activePanel.index) !== null && _a !== void 0 ? _a : 0; - if (targetIndex > panels.length - 1) { - targetIndex = panels.length - 1; - } - void control.moveToPanel(panels[targetIndex], { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } else { - void control.moveToPanel(activePanel, { - duration: 0 - }).catch(function () { - return void 0; - }); - } - } - flicking.camera.updateOffset(); - if (panelsAdded.length > 0 || panelsRemoved.length > 0) { - flicking.trigger(new ComponentEvent$1(EVENTS.PANEL_CHANGE, { - added: panelsAdded, - removed: panelsRemoved - })); - this.checkPanelContentsReady(__spread$1(panelsAdded, panelsRemoved)); - } - }; - /** - * @internal - */ - __proto.checkPanelContentsReady = function (checkingPanels) { - var _this = this; - var flicking = getFlickingAttached(this._flicking); - var resizeOnContentsReady = flicking.resizeOnContentsReady; - var panels = this._panels; - if (!resizeOnContentsReady || flicking.virtualEnabled) return; - var hasContents = function (panel) { - return panel.element && !!panel.element.querySelector("img, video"); - }; - checkingPanels = checkingPanels.filter(function (panel) { - return hasContents(panel); - }); - if (checkingPanels.length <= 0) return; - var contentsReadyChecker = new ImReady$1(); - checkingPanels.forEach(function (panel) { - panel.loading = true; - }); - contentsReadyChecker.on("readyElement", function (e) { - if (!_this._flicking) { - // Renderer's destroy() is called before - contentsReadyChecker.destroy(); - return; - } - var panel = checkingPanels[e.index]; - var camera = flicking.camera; - var control = flicking.control; - var prevProgressInPanel = control.activePanel ? camera.getProgressInPanel(control.activePanel) : 0; - panel.loading = false; - panel.resize(); - panels.slice(panel.index + 1).forEach(function (panelBehind) { - return panelBehind.updatePosition(); - }); - if (!flicking.initialized) return; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - }); - contentsReadyChecker.on("preReady", function (e) { - if (_this._flicking) { - void _this.render(); - } - if (e.readyCount === e.totalCount) { - contentsReadyChecker.destroy(); - } - }); - contentsReadyChecker.on("ready", function () { - if (_this._flicking) { - void _this.render(); - } - contentsReadyChecker.destroy(); - }); - contentsReadyChecker.check(checkingPanels.map(function (panel) { - return panel.element; - })); - }; - __proto._updateCameraAndControl = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera, - control = flicking.control; - camera.updateRange(); - camera.updateOffset(); - camera.updateAnchors(); - camera.resetNeedPanelHistory(); - control.updateInput(); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - }; - __proto._updatePanelSizeByGrid = function (referencePanel, panels) { - var flicking = getFlickingAttached(this._flicking); - var panelsPerView = flicking.panelsPerView; - if (panelsPerView <= 0) { - throw new FlickingError(MESSAGE.WRONG_OPTION("panelsPerView", panelsPerView), CODE.WRONG_OPTION); - } - if (panels.length <= 0) return; - var viewportSize = flicking.camera.size; - var gap = referencePanel.margin.prev + referencePanel.margin.next; - var panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView; - var panelSizeObj = flicking.horizontal ? { - width: panelSize - } : { - height: panelSize - }; - var firstPanelSizeObj = __assign$2({ - size: panelSize, - margin: referencePanel.margin - }, !flicking.horizontal && { - height: referencePanel.height - }); - if (!flicking.noPanelStyleOverride) { - this._strategy.updatePanelSizes(flicking, panelSizeObj); - } - flicking.panels.forEach(function (panel) { - return panel.resize(firstPanelSizeObj); - }); - }; - __proto._removeAllChildsFromCamera = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove other elements - while (cameraElement.firstChild) { - cameraElement.removeChild(cameraElement.firstChild); - } - }; - __proto._insertPanelElements = function (panels, nextSibling) { - if (nextSibling === void 0) { - nextSibling = null; - } - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - var cameraElement = camera.element; - var nextSiblingElement = (nextSibling === null || nextSibling === void 0 ? void 0 : nextSibling.element) || null; - var fragment = document.createDocumentFragment(); - panels.forEach(function (panel) { - return fragment.appendChild(panel.element); - }); - cameraElement.insertBefore(fragment, nextSiblingElement); - }; - __proto._removePanelElements = function (panels) { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - panels.forEach(function (panel) { - cameraElement.removeChild(panel.element); - }); - }; - __proto._afterRender = function () { - var flicking = getFlickingAttached(this._flicking); - flicking.camera.applyTransform(); - }; - return Renderer; - }(); - - /** - * - */ - var VanillaRenderer = /*#__PURE__*/function (_super) { - __extends$3(VanillaRenderer, _super); - function VanillaRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - // eslint-disable-next-line @typescript-eslint/require-await - var __proto = VanillaRenderer.prototype; - __proto.render = function () { - return __awaiter(this, void 0, void 0, function () { - var flicking, strategy; - return __generator(this, function (_a) { - flicking = getFlickingAttached(this._flicking); - strategy = this._strategy; - strategy.updateRenderingPanels(flicking); - strategy.renderPanels(flicking); - this._resetPanelElementOrder(); - this._afterRender(); - return [2 /*return*/]; - }); - }); - }; - - __proto._collectPanels = function () { - var flicking = getFlickingAttached(this._flicking); - var camera = flicking.camera; - this._removeAllTextNodes(); - this._panels = this._strategy.collectPanels(flicking, camera.children); - }; - __proto._createPanel = function (el, options) { - return this._strategy.createPanel(el, options); - }; - __proto._resetPanelElementOrder = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraEl = flicking.camera.element; - // We're using reversed panels here as last panel should be the last element of camera element - var reversedElements = this._strategy.getRenderingElementsByOrder(flicking).reverse(); - reversedElements.forEach(function (el, idx) { - var nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null; - if (el.nextElementSibling !== nextEl) { - cameraEl.insertBefore(el, nextEl); - } - }); - }; - __proto._removeAllTextNodes = function () { - var flicking = getFlickingAttached(this._flicking); - var cameraElement = flicking.camera.element; - // Remove all text nodes in the camera element - toArray$2(cameraElement.childNodes).forEach(function (node) { - if (node.nodeType === Node.TEXT_NODE) { - cameraElement.removeChild(node); - } - }); - }; - return VanillaRenderer; - }(Renderer$1); - - /** - * @internal - */ - var ExternalRenderer = /*#__PURE__*/function (_super) { - __extends$3(ExternalRenderer, _super); - function ExternalRenderer() { - return _super !== null && _super.apply(this, arguments) || this; - } - /* eslint-disable @typescript-eslint/no-unused-vars */ - var __proto = ExternalRenderer.prototype; - __proto._removePanelElements = function (panels) { - // DO NOTHING, overrided to prevent an unexpected error - }; - __proto._removeAllChildsFromCamera = function () { - // DO NOTHING, overrided to prevent an unexpected error - }; - return ExternalRenderer; - }(Renderer$1); - - /** - * A slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ - var Panel = /*#__PURE__*/function () { - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스 - */ - function Panel(_a) { - var index = _a.index, - align = _a.align, - flicking = _a.flicking, - elementProvider = _a.elementProvider; - this._index = index; - this._flicking = flicking; - this._elProvider = elementProvider; - this._align = align; - this._removed = false; - this._rendered = true; - this._loading = false; - this._resetInternalStates(); - } - var __proto = Panel.prototype; - Object.defineProperty(__proto, "element", { - // Internal States Getter - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementProvider", { - /** - * @internal - * @readonly - */ - get: function () { - return this._elProvider; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index of the panel - * @ko 패널의 인덱스 - * @type {number} - * @readonly - */ - get: function () { - return this._index; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "position", { - /** - * Position of the panel, including {@link Panel#alignPosition alignPosition} - * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다 - * @type {number} - * @readonly - */ - get: function () { - return this._pos + this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "size", { - /** - * Cached size of the panel element - * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else - * @ko 패널 엘리먼트의 캐시된 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "sizeIncludingMargin", { - /** - * Panel's size including CSS `margin` - * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else - * @ko CSS `margin`을 포함한 패널의 크기 - * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다 - * @type {number} - * @readonly - */ - get: function () { - return this._size + this._margin.prev + this._margin.next; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "height", { - /** - * Height of the panel element - * @ko 패널 엘리먼트의 높이 - * @type {number} - * @readonly - */ - get: function () { - return this._height; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "margin", { - /** - * Cached CSS `margin` value of the panel element - * @ko 패널 엘리먼트의 CSS `margin` 값 - * @type {object} - * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값 - * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else - * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값 - * @readonly - */ - get: function () { - return this._margin; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "alignPosition", { - /** - * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at - * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다 - * @type {number} - * @readonly - */ - get: function () { - return this._alignPos; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "removed", { - /** - * A value indicating whether the panel's {@link Flicking#remove remove}d - * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._removed; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "rendered", { - /** - * A value indicating whether the panel's element is being rendered on the screen - * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._rendered; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "loading", { - /** - * A value indicating whether the panel's image/video is not loaded and waiting for resize - * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._loading; - }, - set: function (val) { - this._loading = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "range", { - /** - * Panel element's range of the bounding box - * @ko 패널 엘리먼트의 Bounding box 범위 - * @type {object} - * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false) - * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false) - * @readonly - */ - get: function () { - return { - min: this._pos, - max: this._pos + this._size - }; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggled", { - /** - * A value indicating whether the panel's position is toggled by circular behavior - * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값 - * @type {boolean} - * @readonly - */ - get: function () { - return this._toggled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "toggleDirection", { - /** - * A direction where the panel's position is toggled - * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향 - * @type {DIRECTION} - * @readonly - */ - get: function () { - return this._toggleDirection; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "offset", { - /** - * Actual position offset determined by {@link Panel#order} - * @ko {@link Panel#order}에 의한 실제 위치 변경값 - * @type {number} - * @readonly - */ - get: function () { - var toggleDirection = this._toggleDirection; - var cameraRangeDiff = this._flicking.camera.rangeDiff; - return toggleDirection === DIRECTION.NONE || !this._toggled ? 0 : toggleDirection === DIRECTION.PREV ? -cameraRangeDiff : cameraRangeDiff; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "progress", { - /** - * Progress of movement between previous or next panel relative to current panel - * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - return this.index - flicking.camera.progress; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "outsetProgress", { - /** - * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1) - * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1) - * @type {number} - * @readonly - */ - get: function () { - var position = this.position + this.offset; - var alignPosition = this._alignPos; - var camera = this._flicking.camera; - var camPos = camera.position; - if (camPos === position) { - return 0; - } - if (camPos < position) { - var disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition; - return -getProgress(camPos, position, disappearPosNext); - } else { - var disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition); - return 1 - getProgress(camPos, disappearPosPrev, position); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visibleRatio", { - /** - * Percentage of area where panel is visible in the viewport - * @ko 뷰포트 안에서 패널이 보이는 영역의 비율 - * @type {number} - * @readonly - */ - get: function () { - var range = this.range; - var size = this._size; - var offset = this.offset; - var visibleRange = this._flicking.camera.visibleRange; - var checkingRange = { - min: range.min + offset, - max: range.max + offset - }; - if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) { - return 0; - } - var visibleSize = size; - if (visibleRange.min > checkingRange.min) { - visibleSize -= visibleRange.min - checkingRange.min; - } - if (visibleRange.max < checkingRange.max) { - visibleSize -= checkingRange.max - visibleRange.max; - } - return visibleSize / size; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - /** - * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element - * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값 - * @type {Constants.ALIGN | string | number} - */ - get: function () { - return this._align; - }, - // Options Setter - set: function (val) { - this._align = val; - this._updateAlignPos(); - }, - enumerable: false, - configurable: true - }); - /** - * Mark panel element to be appended on the camera element - * @internal - */ - __proto.markForShow = function () { - this._rendered = true; - this._elProvider.show(this._flicking); - }; - /** - * Mark panel element to be removed from the camera element - * @internal - */ - __proto.markForHide = function () { - this._rendered = false; - this._elProvider.hide(this._flicking); - }; - /** - * Update size of the panel - * @ko 패널의 크기를 갱신합니다 - * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보 - * @chainable - * @return {this} - */ - __proto.resize = function (cached) { - var _a; - var el = this.element; - var flicking = this._flicking; - var horizontal = flicking.horizontal, - useFractionalSize = flicking.useFractionalSize; - if (cached) { - this._size = cached.size; - this._margin = __assign$2({}, cached.margin); - this._height = (_a = cached.height) !== null && _a !== void 0 ? _a : getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: getStyle(el) - }); - } else { - var elStyle = getStyle(el); - this._size = getElementSize({ - el: el, - horizontal: horizontal, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }); - this._margin = horizontal ? { - prev: parseFloat(elStyle.marginLeft || "0"), - next: parseFloat(elStyle.marginRight || "0") - } : { - prev: parseFloat(elStyle.marginTop || "0"), - next: parseFloat(elStyle.marginBottom || "0") - }; - this._height = horizontal ? getElementSize({ - el: el, - horizontal: false, - useFractionalSize: useFractionalSize, - useOffset: true, - style: elStyle - }) : this._size; - } - this.updatePosition(); - this._updateAlignPos(); - return this; - }; - /** - * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property - * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다 - * @param {object} [size] New panel size새 패널 크기 - * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px) - * @chainable - * @return {this} - */ - __proto.setSize = function (size) { - setSize(this.element, size); - return this; - }; - /** - * Check whether the given element is inside of this panel's {@link Panel#element element} - * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다 - * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement - * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부 - */ - __proto.contains = function (element) { - var _a; - return !!((_a = this.element) === null || _a === void 0 ? void 0 : _a.contains(element)); - }; - /** - * Reset internal state and set {@link Panel#removed removed} to `true` - * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다. - * @return {void} - */ - __proto.destroy = function () { - this._resetInternalStates(); - this._removed = true; - }; - /** - * Check whether the given position is inside of this panel's {@link Panel#range range} - * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다. - * @param {number} pos A position to check확인하고자 하는 좌표 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부 - */ - __proto.includePosition = function (pos, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - return this.includeRange(pos, pos, includeMargin); - }; - /** - * Check whether the given range is fully included in this panel's area (inclusive) - * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다 - * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부 - */ - __proto.includeRange = function (min, max, includeMargin) { - if (includeMargin === void 0) { - includeMargin = false; - } - var margin = this._margin; - var panelRange = this.range; - if (includeMargin) { - panelRange.min -= margin.prev; - panelRange.max += margin.next; - } - return max >= panelRange.min && min <= panelRange.max; - }; - /** - * Check whether the panel is visble in the given range (exclusive) - * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다 - * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위 - * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위 - * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부 - */ - __proto.isVisibleOnRange = function (min, max) { - var panelRange = this.range; - return max > panelRange.min && min < panelRange.max; - }; - /** - * Move {@link Camera} to this panel - * @ko {@link Camera}를 이 패널로 이동합니다 - * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise - */ - __proto.focus = function (duration) { - return this._flicking.moveTo(this._index, duration); - }; - /** - * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel - * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다 - * @returns {Panel | null} The previous panel이전 패널 - */ - __proto.prev = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1) : renderer.getPanel(index - 1); - }; - /** - * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead - * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel - * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다 - * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다 - * @returns {Panel | null} The previous panel다음 패널 - */ - __proto.next = function () { - var index = this._index; - var flicking = this._flicking; - var renderer = flicking.renderer; - var panelCount = renderer.panelCount; - if (panelCount === 1) return null; - return flicking.circularEnabled ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1) : renderer.getPanel(index + 1); - }; - /** - * Increase panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.increaseIndex = function (val) { - this._index += Math.max(val, 0); - return this; - }; - /** - * Decrease panel's index by the given value - * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다 - * @internal - * @chainable - * @param val An integer greater than or equal to 00보다 같거나 큰 정수 - * @returns {this} - */ - __proto.decreaseIndex = function (val) { - this._index -= Math.max(val, 0); - return this; - }; - /** - * @internal - */ - __proto.updatePosition = function () { - var prevPanel = this._flicking.renderer.panels[this._index - 1]; - this._pos = prevPanel ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev : this._margin.prev; - return this; - }; - /** - * @internal - * @return {boolean} toggled - */ - __proto.toggle = function (prevPos, newPos) { - var toggleDirection = this._toggleDirection; - var togglePosition = this._togglePosition; - if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false; - var prevToggled = this._toggled; - if (newPos > prevPos) { - if (togglePosition >= prevPos && togglePosition <= newPos) { - this._toggled = toggleDirection === DIRECTION.NEXT; - } - } else { - if (togglePosition <= prevPos && togglePosition >= newPos) { - this._toggled = toggleDirection !== DIRECTION.NEXT; - } - } - return prevToggled !== this._toggled; - }; - /** - * @internal - */ - __proto.updateCircularToggleDirection = function () { - var flicking = this._flicking; - if (!flicking.circularEnabled) { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - this._toggled = false; - return this; - } - var camera = flicking.camera; - var camRange = camera.range; - var camAlignPosition = camera.alignPosition; - var camVisibleRange = camera.visibleRange; - var camVisibleSize = camVisibleRange.max - camVisibleRange.min; - var minimumVisible = camRange.min - camAlignPosition; - var maximumVisible = camRange.max - camAlignPosition + camVisibleSize; - var shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false); - var shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false); - this._toggled = false; - if (shouldBeVisibleAtMin) { - this._toggleDirection = DIRECTION.PREV; - this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition; - this.toggle(Infinity, camera.position); - } else if (shouldBeVisibleAtMax) { - this._toggleDirection = DIRECTION.NEXT; - this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition; - this.toggle(-Infinity, camera.position); - } else { - this._toggleDirection = DIRECTION.NONE; - this._togglePosition = 0; - } - return this; - }; - __proto._updateAlignPos = function () { - this._alignPos = parseAlign$1(this._align, this._size); - }; - __proto._resetInternalStates = function () { - this._size = 0; - this._pos = 0; - this._margin = { - prev: 0, - next: 0 - }; - this._height = 0; - this._alignPos = 0; - this._toggled = false; - this._togglePosition = 0; - this._toggleDirection = DIRECTION.NONE; - }; - return Panel; - }(); - - var NormalRenderingStrategy = /*#__PURE__*/function () { - function NormalRenderingStrategy(_a) { - var providerCtor = _a.providerCtor; - this._providerCtor = providerCtor; - } - var __proto = NormalRenderingStrategy.prototype; - __proto.renderPanels = function () { - // DO_NOTHING - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var renderedPanels = flicking.renderer.panels.filter(function (panel) { - return panel.rendered; - }); - var toggledPrev = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.PREV; - }); - var toggledNext = renderedPanels.filter(function (panel) { - return panel.toggled && panel.toggleDirection === DIRECTION.NEXT; - }); - var notToggled = renderedPanels.filter(function (panel) { - return !panel.toggled; - }); - return __spread$1(toggledPrev, notToggled, toggledNext).map(function (panel) { - return panel.index; - }); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var panels = flicking.panels; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return panels[index].element; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - if (flicking.renderOnlyVisible) { - this._showOnlyVisiblePanels(flicking); - } else { - flicking.panels.forEach(function (panel) { - return panel.markForShow(); - }); - } - }; - __proto.collectPanels = function (flicking, elements) { - var _this = this; - var align = parsePanelAlign(flicking.renderer.align); - return elements.map(function (el, index) { - return new Panel({ - index: index, - elementProvider: new _this._providerCtor(el), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (element, options) { - return new Panel(__assign$2(__assign$2({}, options), { - elementProvider: new this._providerCtor(element) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - __proto._showOnlyVisiblePanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else if (!flicking.holding) { - // During the input sequence, - // Do not remove panel elements as it won't trigger touchend event. - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - return NormalRenderingStrategy; - }(); - - /** - * An slide data component that holds information of a single HTMLElement - * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다 - */ - var VirtualPanel = /*#__PURE__*/function (_super) { - __extends$3(VirtualPanel, _super); - /** - * @param {object} options An options object옵션 오브젝트 - * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스 - * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값 - * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스 - */ - function VirtualPanel(options) { - var _this = _super.call(this, options) || this; - options.elementProvider.init(_this); - _this._elProvider = options.elementProvider; - _this._cachedInnerHTML = null; - return _this; - } - var __proto = VirtualPanel.prototype; - Object.defineProperty(__proto, "element", { - /** - * `HTMLElement` that panel's referencing - * @ko 패널이 참조하고 있는 `HTMLElement` - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._elProvider.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "cachedInnerHTML", { - /** - * Cached innerHTML by the previous render function - * @ko 이전 렌더링에서 캐시된 innerHTML 정보 - * @type {string|null} - * @readonly - */ - get: function () { - return this._cachedInnerHTML; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "elementIndex", { - /** - * An number for indexing which element it will be rendered on - * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자 - * @type {number} - * @readonly - */ - get: function () { - var flicking = this._flicking; - var virtualElCount = flicking.panelsPerView + 1; - var panelCount = flicking.panelCount; - var index = this._index; - if (this._toggled) { - // To prevent element duplication - index = this._toggleDirection === DIRECTION.NEXT ? index + panelCount : index - panelCount; - } - return circulateIndex(index, virtualElCount); - }, - enumerable: false, - configurable: true - }); - __proto.cacheRenderResult = function (result) { - this._cachedInnerHTML = result; - }; - __proto.uncacheRenderResult = function () { - this._cachedInnerHTML = null; - }; - __proto.render = function () { - var flicking = this._flicking; - var _a = flicking.virtual, - renderPanel = _a.renderPanel, - cache = _a.cache; - var element = this._elProvider.element; - var newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index); - if (newInnerHTML === element.innerHTML) return; - element.innerHTML = newInnerHTML; - if (cache) { - this.cacheRenderResult(newInnerHTML); - } - }; - __proto.increaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.increaseIndex.call(this, val); - }; - __proto.decreaseIndex = function (val) { - this.uncacheRenderResult(); - return _super.prototype.decreaseIndex.call(this, val); - }; - return VirtualPanel; - }(Panel); - - var VirtualRenderingStrategy = /*#__PURE__*/function () { - function VirtualRenderingStrategy() {} - var __proto = VirtualRenderingStrategy.prototype; - __proto.renderPanels = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = flicking.visiblePanels; - var invisibleIndexes = range(flicking.panelsPerView + 1); - visiblePanels.forEach(function (panel) { - var elementIndex = panel.elementIndex; - panel.render(); - virtualManager.show(elementIndex); - invisibleIndexes[elementIndex] = -1; - }); - invisibleIndexes.filter(function (val) { - return val >= 0; - }).forEach(function (idx) { - virtualManager.hide(idx); - }); - }; - __proto.getRenderingIndexesByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var visiblePanels = __spread$1(flicking.visiblePanels).filter(function (panel) { - return panel.rendered; - }).sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }); - if (visiblePanels.length <= 0) return virtualManager.elements.map(function (_, idx) { - return idx; - }); - var visibleIndexes = visiblePanels.map(function (panel) { - return panel.elementIndex; - }); - var invisibleIndexes = virtualManager.elements.map(function (el, idx) { - return __assign$2(__assign$2({}, el), { - idx: idx - }); - }).filter(function (el) { - return !el.visible; - }).map(function (el) { - return el.idx; - }); - return __spread$1(visibleIndexes, invisibleIndexes); - }; - __proto.getRenderingElementsByOrder = function (flicking) { - var virtualManager = flicking.virtual; - var elements = virtualManager.elements; - return this.getRenderingIndexesByOrder(flicking).map(function (index) { - return elements[index].nativeElement; - }); - }; - __proto.updateRenderingPanels = function (flicking) { - var panels = flicking.renderer.panels; - var camera = flicking.camera; - var visibleIndexes = camera.visiblePanels.reduce(function (visibles, panel) { - visibles[panel.index] = true; - return visibles; - }, {}); - panels.forEach(function (panel) { - if (panel.index in visibleIndexes || panel.loading) { - panel.markForShow(); - } else { - panel.markForHide(); - } - }); - camera.updateOffset(); - }; - __proto.collectPanels = function (flicking) { - var align = parsePanelAlign(flicking.renderer.align); - return range(flicking.virtual.initialPanelCount).map(function (index) { - return new VirtualPanel({ - index: index, - elementProvider: new VirtualElementProvider(flicking), - align: align, - flicking: flicking - }); - }); - }; - __proto.createPanel = function (_el, options) { - return new VirtualPanel(__assign$2(__assign$2({}, options), { - elementProvider: new VirtualElementProvider(options.flicking) - })); - }; - __proto.updatePanelSizes = function (flicking, size) { - flicking.virtual.elements.forEach(function (el) { - setSize(el.nativeElement, size); - }); - flicking.panels.forEach(function (panel) { - return panel.setSize(size); - }); - }; - return VirtualRenderingStrategy; - }(); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Renderer = { - __proto__: null, - Renderer: Renderer$1, - VanillaRenderer: VanillaRenderer, - ExternalRenderer: ExternalRenderer, - NormalRenderingStrategy: NormalRenderingStrategy, - VirtualRenderingStrategy: VirtualRenderingStrategy - }; - - /** - * @extends Component - * @support {"ie": "9+(with polyfill)", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "4.X+"} - * @requires {@link https://github.com/naver/egjs-component|@egjs/component} - * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes} - */ - var Flicking = /*#__PURE__*/function (_super) { - __extends$3(Flicking, _super); - /** - * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string - * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다. - * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트 - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist| - * - * - * |code|조건| - * |---|---| - * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우| - * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우| - * - * - * @example - * ```ts - * import Flicking from "@egjs/flicking"; - * - * // Creating new instance of Flicking with HTMLElement - * const flicking = new Flicking(document.querySelector(".flicking-viewport"), { circular: true }); - * - * // Creating new instance of Flicking with CSS selector - * const flicking2 = new Flicking(".flicking-viewport", { circular: true }); - * ``` - */ - function Flicking(root, _a) { - var _b = _a === void 0 ? {} : _a, - _c = _b.align, - align = _c === void 0 ? ALIGN.CENTER : _c, - _d = _b.defaultIndex, - defaultIndex = _d === void 0 ? 0 : _d, - _e = _b.horizontal, - horizontal = _e === void 0 ? true : _e, - _f = _b.circular, - circular = _f === void 0 ? false : _f, - _g = _b.circularFallback, - circularFallback = _g === void 0 ? CIRCULAR_FALLBACK.LINEAR : _g, - _h = _b.bound, - bound = _h === void 0 ? false : _h, - _j = _b.adaptive, - adaptive = _j === void 0 ? false : _j, - _k = _b.panelsPerView, - panelsPerView = _k === void 0 ? -1 : _k, - _l = _b.noPanelStyleOverride, - noPanelStyleOverride = _l === void 0 ? false : _l, - _m = _b.resizeOnContentsReady, - resizeOnContentsReady = _m === void 0 ? false : _m, - _o = _b.nested, - nested = _o === void 0 ? false : _o, - _p = _b.needPanelThreshold, - needPanelThreshold = _p === void 0 ? 0 : _p, - _q = _b.preventEventsBeforeInit, - preventEventsBeforeInit = _q === void 0 ? true : _q, - _r = _b.deceleration, - deceleration = _r === void 0 ? 0.0075 : _r, - _s = _b.duration, - duration = _s === void 0 ? 500 : _s, - _t = _b.easing, - easing = _t === void 0 ? function (x) { - return 1 - Math.pow(1 - x, 3); - } : _t, - _u = _b.inputType, - inputType = _u === void 0 ? ["mouse", "touch"] : _u, - _v = _b.moveType, - moveType = _v === void 0 ? "snap" : _v, - _w = _b.threshold, - threshold = _w === void 0 ? 40 : _w, - _x = _b.interruptable, - interruptable = _x === void 0 ? true : _x, - _y = _b.bounce, - bounce = _y === void 0 ? "20%" : _y, - _z = _b.iOSEdgeSwipeThreshold, - iOSEdgeSwipeThreshold = _z === void 0 ? 30 : _z, - _0 = _b.preventClickOnDrag, - preventClickOnDrag = _0 === void 0 ? true : _0, - _1 = _b.preventDefaultOnDrag, - preventDefaultOnDrag = _1 === void 0 ? false : _1, - _2 = _b.disableOnInit, - disableOnInit = _2 === void 0 ? false : _2, - _3 = _b.changeOnHold, - changeOnHold = _3 === void 0 ? false : _3, - _4 = _b.renderOnlyVisible, - renderOnlyVisible = _4 === void 0 ? false : _4, - _5 = _b.virtual, - virtual = _5 === void 0 ? null : _5, - _6 = _b.autoInit, - autoInit = _6 === void 0 ? true : _6, - _7 = _b.autoResize, - autoResize = _7 === void 0 ? true : _7, - _8 = _b.useResizeObserver, - useResizeObserver = _8 === void 0 ? true : _8, - _9 = _b.resizeDebounce, - resizeDebounce = _9 === void 0 ? 0 : _9, - _10 = _b.maxResizeDebounce, - maxResizeDebounce = _10 === void 0 ? 100 : _10, - _11 = _b.useFractionalSize, - useFractionalSize = _11 === void 0 ? false : _11, - _12 = _b.externalRenderer, - externalRenderer = _12 === void 0 ? null : _12, - _13 = _b.renderExternal, - renderExternal = _13 === void 0 ? null : _13; - var _this = _super.call(this) || this; - // Internal states - _this._initialized = false; - _this._plugins = []; - // Bind options - _this._align = align; - _this._defaultIndex = defaultIndex; - _this._horizontal = horizontal; - _this._circular = circular; - _this._circularFallback = circularFallback; - _this._bound = bound; - _this._adaptive = adaptive; - _this._panelsPerView = panelsPerView; - _this._noPanelStyleOverride = noPanelStyleOverride; - _this._resizeOnContentsReady = resizeOnContentsReady; - _this._nested = nested; - _this._virtual = virtual; - _this._needPanelThreshold = needPanelThreshold; - _this._preventEventsBeforeInit = preventEventsBeforeInit; - _this._deceleration = deceleration; - _this._duration = duration; - _this._easing = easing; - _this._inputType = inputType; - _this._moveType = moveType; - _this._threshold = threshold; - _this._interruptable = interruptable; - _this._bounce = bounce; - _this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold; - _this._preventClickOnDrag = preventClickOnDrag; - _this._preventDefaultOnDrag = preventDefaultOnDrag; - _this._disableOnInit = disableOnInit; - _this._changeOnHold = changeOnHold; - _this._renderOnlyVisible = renderOnlyVisible; - _this._autoInit = autoInit; - _this._autoResize = autoResize; - _this._useResizeObserver = useResizeObserver; - _this._resizeDebounce = resizeDebounce; - _this._maxResizeDebounce = maxResizeDebounce; - _this._useFractionalSize = useFractionalSize; - _this._externalRenderer = externalRenderer; - _this._renderExternal = renderExternal; - // Create core components - _this._viewport = new Viewport(_this, getElement(root)); - _this._autoResizer = new AutoResizer(_this); - _this._renderer = _this._createRenderer(); - _this._camera = _this._createCamera(); - _this._control = _this._createControl(); - _this._virtualManager = new VirtualManager(_this, virtual); - if (_this._autoInit) { - void _this.init(); - } - return _this; - } - var __proto = Flicking.prototype; - Object.defineProperty(__proto, "control", { - // Components - /** - * {@link Control} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스 - * @type {Control} - * @default SnapControl - * @readonly - * @see Control - * @see SnapControl - * @see FreeControl - */ - get: function () { - return this._control; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "camera", { - /** - * {@link Camera} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스 - * @type {Camera} - * @default LinearCamera - * @readonly - * @see Camera - * @see LinearCamera - * @see BoundCamera - * @see CircularCamera - */ - get: function () { - return this._camera; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderer", { - /** - * {@link Renderer} instance of the Flicking - * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스 - * @type {Renderer} - * @default VanillaRenderer - * @readonly - * @see Renderer - * @see VanillaRenderer - * @see ExternalRenderer - */ - get: function () { - return this._renderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "viewport", { - /** - * A component that manages viewport size - * @ko 뷰포트 크기 정보를 담당하는 컴포넌트 - * @type {Viewport} - * @readonly - * @see Viewport - */ - get: function () { - return this._viewport; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "initialized", { - // Internal States - /** - * Whether Flicking's {@link Flicking#init init()} is called. - * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}. - * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수. - * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._initialized; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularEnabled", { - /** - * Whether the `circular` option is enabled. - * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small. - * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._camera.circularEnabled; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtualEnabled", { - /** - * Whether the `virtual` option is enabled. - * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero. - * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수. - * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다. - * @type {boolean} - * @default false - * @readonly - */ - get: function () { - return this._panelsPerView > 0 && this._virtual != null; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "index", { - /** - * Index number of the {@link Flicking#currentPanel currentPanel} - * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호 - * @type {number} - * @default 0 - * @readonly - */ - get: function () { - return this._control.activeIndex; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "element", { - /** - * The root(`.flicking-viewport`) element - * @ko root(`.flicking-viewport`) 엘리먼트 - * @type {HTMLElement} - * @readonly - */ - get: function () { - return this._viewport.element; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "currentPanel", { - /** - * Currently active panel - * @ko 현재 선택된 패널 - * @type {Panel} - * @readonly - * @see Panel - */ - get: function () { - return this._control.activePanel; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panels", { - /** - * Array of panels - * @ko 전체 패널들의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._renderer.panels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelCount", { - /** - * Count of panels - * @ko 전체 패널의 개수 - * @type {number} - * @readonly - */ - get: function () { - return this._renderer.panelCount; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "visiblePanels", { - /** - * Array of panels that is visible at the current position - * @ko 현재 보이는 패널의 배열 - * @type {Panel[]} - * @readonly - * @see Panel - */ - get: function () { - return this._camera.visiblePanels; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "animating", { - /** - * Whether Flicking's animating - * @ko 현재 애니메이션 동작 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.animating; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "holding", { - /** - * Whether user is clicking or touching - * @ko 현재 사용자가 클릭/터치중인지 여부 - * @type {boolean} - * @readonly - */ - get: function () { - return this._control.holding; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "activePlugins", { - /** - * A current list of activated plugins - * @ko 현재 활성화된 플러그인 목록 - * @type {Plugin[]} - * @readonly - */ - get: function () { - return this._plugins; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "align", { - // Options Getter - // UI / LAYOUT - /** - * Align position of the panels within viewport. You can set different values each for the panel and camera - * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다 - * @type {ALIGN | string | number | { panel: string | number, camera: string | number }} - * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값 - * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값 - * @default "center" - * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // Literal strings - * "prev", "center", "next", - * // % values, applied to both panel & camera - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000, - * // Setting a different value for panel & camera - * { panel: "10%", camera: "25%" } - * ]; - * - * possibleOptions.forEach(align => { - * new Flicking("#el", { align }); - * }); - * ``` - */ - get: function () { - return this._align; - }, - // Options Setter - // UI / LAYOUT - set: function (val) { - this._align = val; - this._renderer.align = val; - this._camera.align = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "defaultIndex", { - /** - * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer - * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )} - */ - get: function () { - return this._defaultIndex; - }, - set: function (val) { - this._defaultIndex = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "horizontal", { - /** - * Direction of panel movement (true: horizontal, false: vertical) - * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향) - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )} - */ - get: function () { - return this._horizontal; - }, - set: function (val) { - this._horizontal = val; - this._control.controller.updateDirection(); - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circular", { - /** - * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling. - * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )} - */ - get: function () { - return this._circular; - }, - set: function (val) { - this._circular = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "circularFallback", { - /** - * Set panel control mode for the case when circular cannot be enabled. - * "linear" will set the view's range from the top of the first panel to the top of the last panel. - * "bound" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel. - * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다. - * "linear" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다. - * "bound" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다. - * @see CIRCULAR_FALLBACK - * @type {string} - * @default "linear" - * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )} - */ - get: function () { - return this._circularFallback; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bound", { - /** - * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel - * Only can be enabled when `circular=false` - * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다 - * `circular=false`인 경우에만 사용할 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )} - */ - get: function () { - return this._bound; - }, - set: function (val) { - this._bound = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "adaptive", { - /** - * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true` - * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )} - */ - get: function () { - return this._adaptive; - }, - set: function (val) { - this._adaptive = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "panelsPerView", { - /** - * A visible number of panels on viewport. Enabling this option will automatically resize panel size - * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다 - * @type {number} - * @default -1 - * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )} - */ - get: function () { - return this._panelsPerView; - }, - set: function (val) { - this._panelsPerView = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "noPanelStyleOverride", { - /** - * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled. - * This behavior can be useful in terms of performance when you're manually managing all panel sizes - * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다. - * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다 - * @type {boolean} - * @default false - */ - get: function () { - return this._noPanelStyleOverride; - }, - set: function (val) { - this._noPanelStyleOverride = val; - void this.resize(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeOnContentsReady", { - /** - * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded. - * This can be useful when you have contents inside Flicking that changes its size when it's loaded - * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다. - * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )} - */ - get: function () { - return this._resizeOnContentsReady; - }, - set: function (val) { - this._resizeOnContentsReady = val; - if (val) { - this._renderer.checkPanelContentsReady(this._renderer.panels); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "nested", { - /** - * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel. - * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option. - * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다. - * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )} - */ - get: function () { - return this._nested; - }, - set: function (val) { - this._nested = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.nested = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "needPanelThreshold", { - // EVENTS - /** - * A Threshold from viewport edge before triggering `needPanel` event - * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리 - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )} - */ - get: function () { - return this._needPanelThreshold; - }, - // EVENTS - set: function (val) { - this._needPanelThreshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventEventsBeforeInit", { - /** - * When enabled, events are not triggered before `ready` when initializing - * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )} - */ - get: function () { - return this._preventEventsBeforeInit; - }, - set: function (val) { - this._preventEventsBeforeInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "deceleration", { - // ANIMATION - /** - * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time - * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다 - * @type {number} - * @default 0.0075 - * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )} - */ - get: function () { - return this._deceleration; - }, - // ANIMATION - set: function (val) { - this._deceleration = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.deceleration = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "easing", { - /** - * An easing function applied to the panel movement animation. Default value is `easeOutCubic` - * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다 - * @type {function} - * @default x => 1 - Math.pow(1 - x, 3) - * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/} - * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )} - */ - get: function () { - return this._easing; - }, - set: function (val) { - this._easing = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.easing = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "duration", { - /** - * Default duration of the animation (ms) - * @ko 디폴트 애니메이션 재생 시간 (ms) - * @type {number} - * @default 500 - * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )} - */ - get: function () { - return this._duration; - }, - set: function (val) { - this._duration = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "inputType", { - // INPUT - /** - * Types of input devices to enable - * @ko 활성화할 입력 장치 종류 - * @type {string[]} - * @default ["touch", "mouse"] - * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)} - * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)} - * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )} - */ - get: function () { - return this._inputType; - }, - // INPUT - set: function (val) { - this._inputType = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.inputType = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "moveType", { - /** - * Movement style by user input. This will change instance type of {@link Flicking#control} - * You can use the values of the constant {@link MOVE_TYPE} - * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다 - * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다 - * @type {MOVE_TYPE | Pair} - * @default "snap" - * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )} - * @example - * |moveType|control|options| - * |:---:|:---:|:---:| - * |"snap"|{@link SnapControl}|| - * |"freeScroll"|{@link FreeControl}|{@link FreeControlOptions}| - * - * ```ts - * import Flicking, { MOVE_TYPE } from "@egjs/flicking"; - * - * const flicking = new Flicking({ - * moveType: MOVE_TYPE.SNAP - * }); - * ``` - * - * ```ts - * const flicking = new Flicking({ - * // If you want more specific settings for the moveType - * // [moveType, options for that moveType] - * // In this case, it's ["freeScroll", FreeControlOptions] - * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }] - * }); - * ``` - */ - get: function () { - return this._moveType; - }, - set: function (val) { - this._moveType = val; - var prevControl = this._control; - var newControl = this._createControl(); - var activePanel = prevControl.activePanel; - newControl.copy(prevControl); - var prevProgressInPanel = activePanel ? this._camera.getProgressInPanel(activePanel) : 0; - this._control = newControl; - this._control.updatePosition(prevProgressInPanel); - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "threshold", { - /** - * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel. - * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다. - * @type {number} - * @default 40 - * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )} - */ - get: function () { - return this._threshold; - }, - set: function (val) { - this._threshold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "interruptable", { - /** - * Set animation to be interruptable by click/touch. - * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다. - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )} - */ - get: function () { - return this._interruptable; - }, - set: function (val) { - this._interruptable = val; - var axes = this._control.controller.axes; - if (axes) { - axes.options.interruptable = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "bounce", { - /** - * The size value of the bounce area. Only can be enabled when `circular=false`. - * You can set different bounce value for prev/next direction by using array. - * `number` for px value, and `string` for px, and % value relative to viewport size. - * You have to call {@link Control#updateInput} after changing this to take effect. - * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다. - * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다. - * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다. - * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다. - * @type {string | number | Array} - * @default "20%" - * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )} - * @example - * ```ts - * const possibleOptions = [ - * // % values, relative to viewport element(".flicking-viewport")'s size - * "0%", "25%", "42%", - * // px values, arithmetic calculation with (+/-) is also allowed. - * "0px", "100px", "50% - 25px", - * // numbers, same to number + px ("0px", "100px") - * 0, 100, 1000 - * ]; - * ``` - * - * @example - * ```ts - * const flicking = new Flicking("#el", { bounce: "20%" }); - * - * flicking.bounce = "100%"; - * flicking.control.updateInput(); // Call this to update! - * ``` - */ - get: function () { - return this._bounce; - }, - set: function (val) { - this._bounce = val; - this._control.updateInput(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "iOSEdgeSwipeThreshold", { - /** - * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward - * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px) - * @type {number} - * @default 30 - * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )} - */ - get: function () { - return this._iOSEdgeSwipeThreshold; - }, - set: function (val) { - this._iOSEdgeSwipeThreshold = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.iOSEdgeSwipeThreshold = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventClickOnDrag", { - /** - * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element - * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )} - */ - get: function () { - return this._preventClickOnDrag; - }, - set: function (val) { - var prevVal = this._preventClickOnDrag; - if (val === prevVal) return; - var controller = this._control.controller; - if (val) { - controller.addPreventClickHandler(); - } else { - controller.removePreventClickHandler(); - } - this._preventClickOnDrag = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "preventDefaultOnDrag", { - /** - * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging - * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )} - */ - get: function () { - return this._preventDefaultOnDrag; - }, - set: function (val) { - this._preventDefaultOnDrag = val; - var panInput = this._control.controller.panInput; - if (panInput) { - panInput.options.preventDefaultOnDrag = val; - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "disableOnInit", { - /** - * Automatically call {@link Flicking#disableInput disableInput()} on initialization - * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )} - */ - get: function () { - return this._disableOnInit; - }, - set: function (val) { - this._disableOnInit = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "changeOnHold", { - /** - * Change active panel index on mouse/touch hold while animating. - * `index` of the `willChange`/`willRestore` event will be used as new index. - * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다. - * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )} - */ - get: function () { - return this._changeOnHold; - }, - set: function (val) { - this._changeOnHold = val; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderOnlyVisible", { - // PERFORMANCE - /** - * Whether to render visible panels only. This can dramatically increase performance when there're many panels - * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다 - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )} - */ - get: function () { - return this._renderOnlyVisible; - }, - // PERFORMANCE - set: function (val) { - this._renderOnlyVisible = val; - void this._renderer.render(); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "virtual", { - /** - * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1` - * Must be used with `panelsPerview`. - * After Flicking's initialized, this property can be used to add/remove the panel count. - * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다. - * `panelsPerView` 옵션과 함께 사용되어야만 합니다. - * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다. - * @type {VirtualManager} - * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수 - * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수 - * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부 - * @property {string} [panelClass="flicking-panel"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름 - * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )} - * @example - * ```ts - * import Flicking, { VirtualPanel } from "@egjs/flicking"; - * - * const flicking = new Flicking("#some_el", { - * panelsPerView: 3, - * virtual: { - * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`, - * initialPanelCount: 100 - * } - * }); - * - * // Add 100 virtual panels (at the end) - * flicking.virtual.append(100); - * - * // Remove 100 virtual panels from 0 to 100 - * flicking.virtual.remove(0, 100); - * ``` - */ - get: function () { - return this._virtualManager; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoInit", { - // OTHERS - /** - * Call {@link Flicking#init init()} automatically when creating Flicking's instance - * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )} - * @readonly - */ - get: function () { - return this._autoInit; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "autoResize", { - /** - * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed - * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다 - * @type {boolean} - * @default true - */ - get: function () { - return this._autoResize; - }, - // OTHERS - set: function (val) { - this._autoResize = val; - if (val) { - this._autoResizer.enable(); - } else { - this._autoResizer.disable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useResizeObserver", { - /** - * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option - * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다 - * @type {boolean} - * @default true - * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )} - */ - get: function () { - return this._useResizeObserver; - }, - set: function (val) { - this._useResizeObserver = val; - if (this._autoResize) { - this._autoResizer.enable(); - } - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "resizeDebounce", { - /** - * Delays size recalculation from `autoResize` by the given time in milisecond. - * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again. - * This can increase performance by preventing `resize` being called too often. - * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다. - * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다. - * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다. - * @type {number} - * @default 0 - * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )} - */ - get: function () { - return this._resizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "maxResizeDebounce", { - /** - * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond. - * This guarantees that size recalculation is performed at least once every (n)ms. - * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms) - * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다. - * @type {number} - * @default 100 - * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )} - */ - get: function () { - return this._maxResizeDebounce; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "useFractionalSize", { - /** - * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle. - * This can prevent 1px offset issue in some cases where panel size has the fractional part. - * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element. - * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다. - * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다. - * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다. - * @type {boolean} - * @default false - * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )} - */ - get: function () { - return this._useFractionalSize; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "externalRenderer", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - */ - get: function () { - return this._externalRenderer; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(__proto, "renderExternal", { - /** - * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking. - * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다! - * @default null - * @internal - * @readonly - * @deprecated - */ - get: function () { - return this._renderExternal; - }, - enumerable: false, - configurable: true - }); - /** - * Initialize Flicking and move to the default index - * This is automatically called on Flicking's constructor when `autoInit` is true(default) - * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다 - * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다 - * @fires Flicking#ready - * @return {Promise} - */ - __proto.init = function () { - var _this = this; - if (this._initialized) return Promise.resolve(); - var camera = this._camera; - var renderer = this._renderer; - var control = this._control; - var virtualManager = this._virtualManager; - var originalTrigger = this.trigger; - var preventEventsBeforeInit = this._preventEventsBeforeInit; - camera.init(); - virtualManager.init(); - renderer.init(this); - control.init(this); - if (preventEventsBeforeInit) { - this.trigger = function () { - return _this; - }; - } - this._initialResize(); - // Look at initial panel - this._moveToInitialPanel(); - if (this._autoResize) { - this._autoResizer.enable(); - } - if (this._preventClickOnDrag) { - control.controller.addPreventClickHandler(); - } - if (this._disableOnInit) { - this.disableInput(); - } - renderer.checkPanelContentsReady(renderer.panels); - this._initialized = true; - return renderer.render().then(function () { - // Done initializing & emit ready event - _this._plugins.forEach(function (plugin) { - return plugin.init(_this); - }); - if (preventEventsBeforeInit) { - _this.trigger = originalTrigger; - } - _this.trigger(new ComponentEvent$1(EVENTS.READY)); - }); - }; - /** - * Destroy Flicking and remove all event handlers - * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다 - * @return {void} - */ - __proto.destroy = function () { - this.off(); - this._autoResizer.disable(); - this._control.destroy(); - this._camera.destroy(); - this._renderer.destroy(); - this._plugins.forEach(function (plugin) { - return plugin.destroy(); - }); - this._initialized = false; - }; - /** - * Move to the previous panel (current index - 1) - * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise - */ - __proto.prev = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.prev()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : -1, duration, DIRECTION.PREV); - }; - /** - * Move to the next panel (current index + 1) - * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1) - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms) - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise - */ - __proto.next = function (duration) { - var _a, _b, _c; - if (duration === void 0) { - duration = this._duration; - } - return this.moveTo((_c = (_b = (_a = this._control.activePanel) === null || _a === void 0 ? void 0 : _a.next()) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : this._renderer.panelCount, duration, DIRECTION.NEXT); - }; - /** - * Move to the panel with given index - * @ko 주어진 인덱스에 해당하는 패널로 이동합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @async - * @fires Flicking#moveStart - * @fires Flicking#move - * @fires Flicking#moveEnd - * @fires Flicking#willChange - * @fires Flicking#changed - * @fires Flicking#willRestore - * @fires Flicking#restored - * @fires Flicking#needPanel - * @fires Flicking#visibleChange - * @fires Flicking#reachEdge - * @throws {FlickingError} - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called| - * - * - * |code|condition| - * |---|---| - * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우| - * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우| - * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우| - * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우| - * - * - * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise - */ - __proto.moveTo = function (index, duration, direction) { - if (duration === void 0) { - duration = this._duration; - } - if (direction === void 0) { - direction = DIRECTION.NONE; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - return Promise.reject(new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE)); - } - if (this._control.animating) { - return Promise.reject(new FlickingError(MESSAGE.ANIMATION_ALREADY_PLAYING, CODE.ANIMATION_ALREADY_PLAYING)); - } - if (this._control.holding) { - this._control.controller.release(); - } - return this._control.moveToPanel(panel, { - duration: duration, - direction: direction - }); - }; - /** - * Change the destination and duration of the animation currently playing - * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다 - * @param {number} index The index of the panel to move이동할 패널의 인덱스 - * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms) - * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다 - * @throws {FlickingError} - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement - * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우 - * @return {void} - */ - __proto.updateAnimation = function (index, duration, direction) { - if (!this._control.animating) { - return; - } - var renderer = this._renderer; - var panelCount = renderer.panelCount; - var panel = renderer.getPanel(index); - if (!panel) { - throw new FlickingError(MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), CODE.INDEX_OUT_OF_RANGE); - } - this._control.updateAnimation(panel, duration, direction); - }; - /** - * Stops the animation currently playing - * @ko 재생 중인 애니메이션을 중단시킵니다 - * @fires Flicking#moveEnd - * @return {void} - */ - __proto.stopAnimation = function () { - if (!this._control.animating) { - return; - } - this._control.stopAnimation(); - }; - /** - * Return the {@link Panel} at the given index. `null` if it doesn't exists. - * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다. - * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널 - * @see Panel - * @example - * ```ts - * const panel = flicking.getPanel(0); - * // Which is a shorthand to... - * const samePanel = flicking.panels[0]; - * ``` - */ - __proto.getPanel = function (index) { - return this._renderer.getPanel(index); - }; - /** - * Enable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 활성화합니다 - * @return {this} - */ - __proto.enableInput = function () { - this._control.enable(); - return this; - }; - /** - * Disable input from the user (mouse/touch) - * @ko 사용자의 입력(마우스/터치)를 막습니다 - * @return {this} - */ - __proto.disableInput = function () { - this._control.disable(); - return this; - }; - /** - * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()} - * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다 - * @param {object} options Status retrieving optionsStatus 반환 옵션 - * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다 - * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다 - * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다 - * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true - * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다. - * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체. - */ - __proto.getStatus = function (_a) { - var _b, _c; - var _d = _a === void 0 ? {} : _a, - _e = _d.index, - index = _e === void 0 ? true : _e, - _f = _d.position, - position = _f === void 0 ? true : _f, - _g = _d.includePanelHTML, - includePanelHTML = _g === void 0 ? false : _g, - _h = _d.visiblePanelsOnly, - visiblePanelsOnly = _h === void 0 ? false : _h; - var camera = this._camera; - var panels = visiblePanelsOnly ? this.visiblePanels : this.panels; - var status = { - panels: panels.map(function (panel) { - var panelInfo = { - index: panel.index - }; - if (includePanelHTML) { - panelInfo.html = panel.element.outerHTML; - } - return panelInfo; - }) - }; - if (index) { - status.index = this.index; - } - if (position) { - var nearestAnchor = camera.findNearestAnchor(camera.position); - if (nearestAnchor) { - status.position = { - panel: nearestAnchor.panel.index, - progressInPanel: camera.getProgressInPanel(nearestAnchor.panel) - }; - } - } - if (visiblePanelsOnly) { - var visiblePanels = this.visiblePanels; - status.visibleOffset = (_c = (_b = visiblePanels[0]) === null || _b === void 0 ? void 0 : _b.index) !== null && _c !== void 0 ? _c : 0; - } - return status; - }; - /** - * Restore to the state of the given {@link Status} - * @ko 주어진 {@link Status}의 상태로 복원합니다 - * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다 - * @return {void} - */ - __proto.setStatus = function (status) { - var _a; - if (!this._initialized) { - throw new FlickingError(MESSAGE.NOT_INITIALIZED, CODE.NOT_INITIALIZED); - } - var index = status.index, - position = status.position, - visibleOffset = status.visibleOffset, - panels = status.panels; - var renderer = this._renderer; - var control = this._control; - // Can't add/remove panels on external rendering - if (((_a = panels[0]) === null || _a === void 0 ? void 0 : _a.html) && !this._renderExternal) { - renderer.batchRemove({ - index: 0, - deleteCount: this.panels.length, - hasDOMInElements: true - }); - renderer.batchInsert({ - index: 0, - elements: parseElement(panels.map(function (panel) { - return panel.html; - })), - hasDOMInElements: true - }); - } - if (index != null) { - var panelIndex = visibleOffset ? index - visibleOffset : index; - void this.moveTo(panelIndex, 0).catch(function () { - return void 0; - }); - } - if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) { - var panel = position.panel, - progressInPanel = position.progressInPanel; - var panelIndex = visibleOffset ? panel - visibleOffset : panel; - var panelRange = renderer.panels[panelIndex].range; - var newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel; - void control.moveToPosition(newCameraPos, 0).catch(function () { - return void 0; - }); - } - }; - /** - * Add plugins that can have different effects on Flicking - * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다 - * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들) - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.addPlugins = function () { - var _a; - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - if (this._initialized) { - plugins.forEach(function (item) { - return item.init(_this); - }); - } - (_a = this._plugins).push.apply(_a, __spread$1(plugins)); - return this; - }; - /** - * Remove plugins from Flicking. - * @ko 플리킹으로부터 플러그인들을 제거합니다. - * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들). - * @return {this} - * @see https://github.com/naver/egjs-flicking-plugins - */ - __proto.removePlugins = function () { - var _this = this; - var plugins = []; - for (var _i = 0; _i < arguments.length; _i++) { - plugins[_i] = arguments[_i]; - } - plugins.forEach(function (item) { - var foundIndex = findIndex(_this._plugins, function (val) { - return val === item; - }); - if (foundIndex >= 0) { - item.destroy(); - _this._plugins.splice(foundIndex, 1); - } - }); - return this; - }; - /** - * Update viewport/panel sizes - * @ko 패널 및 뷰포트의 크기를 갱신합니다 - * @method - * @fires Flicking#beforeResize - * @fires Flicking#afterResize - * @return {this} - */ - __proto.resize = function () { - return __awaiter(this, void 0, void 0, function () { - var viewport, renderer, camera, control, activePanel, prevWidth, prevHeight, prevProgressInPanel, newWidth, newHeight, sizeChanged; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - viewport = this._viewport; - renderer = this._renderer; - camera = this._camera; - control = this._control; - activePanel = control.activePanel; - prevWidth = viewport.width; - prevHeight = viewport.height; - prevProgressInPanel = activePanel ? camera.getProgressInPanel(activePanel) : 0; - this.trigger(new ComponentEvent$1(EVENTS.BEFORE_RESIZE, { - width: prevWidth, - height: prevHeight, - element: viewport.element - })); - viewport.resize(); - return [4 /*yield*/, renderer.forceRenderAllPanels()]; - case 1: - _a.sent(); // Render all panel elements, to update sizes - if (!this._initialized) { - return [2 /*return*/]; - } - - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateAdaptiveHeight(); - camera.updatePanelOrder(); - camera.updateOffset(); - return [4 /*yield*/, renderer.render()]; - case 2: - _a.sent(); - if (!this._initialized) { - return [2 /*return*/]; - } - - if (control.animating) ; else { - control.updatePosition(prevProgressInPanel); - control.updateInput(); - } - newWidth = viewport.width; - newHeight = viewport.height; - sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight; - this.trigger(new ComponentEvent$1(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: prevWidth, - height: prevHeight - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Add new panels after the last panel - * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of appended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new Flicking("#flick"); - * // These are possible parameters - * flicking.append(document.createElement("div")); - * flicking.append("\Panel\"); - * flicking.append(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.append("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.append = function (element) { - return this.insert(this._renderer.panelCount, element); - }; - /** - * Add new panels before the first panel - * This will increase index of panels after by the number of panels added - * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다 - * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다. - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @see Panel - * @see ElementLike - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.prepend(document.createElement("div")); - * flicking.prepend("\Panel\"); - * flicking.prepend(["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.prepend("\Panel 1\\Panel 2\"); - * ``` - */ - __proto.prepend = function (element) { - return this.insert(0, element); - }; - /** - * Insert new panels at given index - * This will increase index of panels after by the number of panels added - * @ko 주어진 인덱스에 새로운 패널들을 추가합니다 - * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다. - * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스 - * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both - * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열 - * @return {Panel[]} An array of prepended panels추가된 패널들의 배열 - * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...) - * @example - * ```ts - * const flicking = new eg.Flicking("#flick"); - * flicking.insert(0, document.createElement("div")); - * flicking.insert(2, "\Panel\"); - * flicking.insert(1, ["\Panel\", document.createElement("div")]); - * // Even this is possible - * flicking.insert(3, "\Panel 1\\Panel 2\"); - * ``` - */ - __proto.insert = function (index, element) { - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchInsert({ - index: index, - elements: parseElement(element), - hasDOMInElements: true - }); - }; - /** - * Remove the panel at the given index - * This will decrease index of panels after by the number of panels removed - * @ko 주어진 인덱스의 패널을 제거합니다 - * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다 - * @param {number} index Index of panel to remove제거할 패널의 인덱스 - * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수 - * @return {Panel[]} An array of removed panels제거된 패널들의 배열 - */ - __proto.remove = function (index, deleteCount) { - if (deleteCount === void 0) { - deleteCount = 1; - } - if (this._renderExternal) { - throw new FlickingError(MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, CODE.NOT_ALLOWED_IN_FRAMEWORK); - } - return this._renderer.batchRemove({ - index: index, - deleteCount: deleteCount, - hasDOMInElements: true - }); - }; - __proto._createControl = function () { - var _a; - var moveType = this._moveType; - var moveTypes = Object.keys(MOVE_TYPE).map(function (key) { - return MOVE_TYPE[key]; - }); - var moveTypeStr = Array.isArray(moveType) ? moveType[0] : moveType; - var moveTypeOptions = Array.isArray(moveType) ? (_a = moveType[1]) !== null && _a !== void 0 ? _a : {} : {}; - if (!includes(moveTypes, moveTypeStr)) { - throw new FlickingError(MESSAGE.WRONG_OPTION("moveType", JSON.stringify(moveType)), CODE.WRONG_OPTION); - } - switch (moveTypeStr) { - case MOVE_TYPE.SNAP: - return new SnapControl(moveTypeOptions); - case MOVE_TYPE.FREE_SCROLL: - return new FreeControl(moveTypeOptions); - case MOVE_TYPE.STRICT: - return new StrictControl(moveTypeOptions); - } - }; - __proto._createCamera = function () { - if (this._circular && this._bound) { - // eslint-disable-next-line no-console - console.warn("\"circular\" and \"bound\" option cannot be used together, ignoring bound."); - } - return new Camera$1(this, { - align: this._align - }); - }; - __proto._createRenderer = function () { - var externalRenderer = this._externalRenderer; - if (this._virtual && this._panelsPerView <= 0) { - // eslint-disable-next-line no-console - console.warn("\"virtual\" and \"panelsPerView\" option should be used together, ignoring virtual."); - } - return externalRenderer ? externalRenderer : this._renderExternal ? this._createExternalRenderer() : this._createVanillaRenderer(); - }; - __proto._createExternalRenderer = function () { - var _a = this._renderExternal, - renderer = _a.renderer, - rendererOptions = _a.rendererOptions; - return new renderer(__assign$2({ - align: this._align - }, rendererOptions)); - }; - __proto._createVanillaRenderer = function () { - var virtual = this.virtualEnabled; - return new VanillaRenderer({ - align: this._align, - strategy: virtual ? new VirtualRenderingStrategy() : new NormalRenderingStrategy({ - providerCtor: VanillaElementProvider - }) - }); - }; - __proto._moveToInitialPanel = function () { - var renderer = this._renderer; - var control = this._control; - var camera = this._camera; - var defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0); - if (!defaultPanel) return; - var nearestAnchor = camera.findNearestAnchor(defaultPanel.position); - var initialPanel = nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index ? nearestAnchor.panel : defaultPanel; - control.setActive(initialPanel, null, false); - if (!nearestAnchor) { - throw new FlickingError(MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), CODE.POSITION_NOT_REACHABLE); - } - var position = initialPanel.position; - if (!camera.canReach(initialPanel)) { - position = nearestAnchor.position; - } - camera.lookAt(position); - control.updateInput(); - camera.updateOffset(); - }; - __proto._initialResize = function () { - var viewport = this._viewport; - var renderer = this._renderer; - var camera = this._camera; - var control = this._control; - this.trigger(new ComponentEvent$1(EVENTS.BEFORE_RESIZE, { - width: 0, - height: 0, - element: viewport.element - })); - viewport.resize(); - renderer.updatePanelSize(); - camera.updateAlignPos(); - camera.updateRange(); - camera.updateAnchors(); - camera.updateOffset(); - control.updateInput(); - var newWidth = viewport.width; - var newHeight = viewport.height; - var sizeChanged = newWidth !== 0 || newHeight !== 0; - this.trigger(new ComponentEvent$1(EVENTS.AFTER_RESIZE, { - width: viewport.width, - height: viewport.height, - prev: { - width: 0, - height: 0 - }, - sizeChanged: sizeChanged, - element: viewport.element - })); - }; - /** - * Version info string - * @ko 버전정보 문자열 - * @type {string} - * @readonly - * @example - * ```ts - * Flicking.VERSION; // ex) 4.0.0 - * ``` - */ - Flicking.VERSION = "4.11.4"; - return Flicking; - }(Component); - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - - var Core = { - __proto__: null, - Viewport: Viewport, - FlickingError: FlickingError, - AnchorPoint: AnchorPoint, - VirtualManager: VirtualManager, - VanillaElementProvider: VanillaElementProvider, - VirtualElementProvider: VirtualElementProvider, - Panel: Panel, - VirtualPanel: VirtualPanel - }; - - /** - * Decorator that makes the method of flicking available in the framework. - * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터. - * @memberof eg.Flicking - * @private - * @example - * ```js - * import Flicking, { withFlickingMethods } from "@egjs/flicking"; - * - * class Flicking extends React.Component> { - * @withFlickingMethods - * private flicking: Flicking; - * } - * ``` - */ - var withFlickingMethods = function (prototype, flickingName) { - [Component.prototype, Flicking.prototype].forEach(function (proto) { - Object.getOwnPropertyNames(proto).filter(function (name) { - return !prototype[name] && name.indexOf("_") !== 0 && name !== "constructor"; - }).forEach(function (name) { - var descriptor = Object.getOwnPropertyDescriptor(proto, name); - if (descriptor.value) { - // Public Function - Object.defineProperty(prototype, name, { - value: function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.value).call.apply(_a, __spread$1([this[flickingName]], args)); - } - }); - } else { - var getterDescriptor = {}; - if (descriptor.get) { - getterDescriptor.get = function () { - var _a; - var flicking = this[flickingName]; - return flicking && ((_a = descriptor.get) === null || _a === void 0 ? void 0 : _a.call(flicking)); - }; - } - if (descriptor.set) { - getterDescriptor.set = function () { - var _a; - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return (_a = descriptor.set) === null || _a === void 0 ? void 0 : _a.call.apply(_a, __spread$1([this[flickingName]], args)); - }; - } - Object.defineProperty(prototype, name, getterDescriptor); - } - }); - }); - }; - - var sync = (function (flicking, diffResult, rendered) { - var renderer = flicking.renderer; - var panels = renderer.panels; - var prevList = __spread$1(diffResult.prevList); - var added = []; - var removed = []; - if (diffResult.removed.length > 0) { - var endIdx_1 = -1; - var prevIdx_1 = -1; - diffResult.removed.forEach(function (removedIdx) { - if (endIdx_1 < 0) { - endIdx_1 = removedIdx; - } - if (prevIdx_1 >= 0 && removedIdx !== prevIdx_1 - 1) { - removed.push.apply(removed, __spread$1(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - endIdx_1 = removedIdx; - prevIdx_1 = removedIdx; - } else { - prevIdx_1 = removedIdx; - } - prevList.splice(removedIdx, 1); - }); - removed.push.apply(removed, __spread$1(batchRemove(renderer, prevIdx_1, endIdx_1 + 1))); - } - diffResult.ordered.forEach(function (_a) { - var _b = __read$1(_a, 2), - from = _b[0], - to = _b[1]; - var prevPanel = panels.splice(from, 1)[0]; - panels.splice(to, 0, prevPanel); - }); - if (diffResult.ordered.length > 0) { - panels.forEach(function (panel, idx) { - var indexDiff = idx - panel.index; - if (indexDiff > 0) { - panel.increaseIndex(indexDiff); - } else { - panel.decreaseIndex(-indexDiff); - } - }); - panels.sort(function (panel1, panel2) { - return panel1.index - panel2.index; - }); - panels.forEach(function (panel) { - panel.updatePosition(); - }); - } - if (diffResult.added.length > 0) { - var startIdx_1 = -1; - var prevIdx_2 = -1; - var addedElements_1 = rendered.slice(prevList.length); - diffResult.added.forEach(function (addedIdx, idx) { - if (startIdx_1 < 0) { - startIdx_1 = idx; - } - if (prevIdx_2 >= 0 && addedIdx !== prevIdx_2 + 1) { - added.push.apply(added, __spread$1(batchInsert(renderer, diffResult, addedElements_1, startIdx_1, idx + 1))); - startIdx_1 = -1; - prevIdx_2 = -1; - } else { - prevIdx_2 = addedIdx; - } - }); - if (startIdx_1 >= 0) { - added.push.apply(added, __spread$1(batchInsert(renderer, diffResult, addedElements_1, startIdx_1))); - } - } - if (diffResult.added.length > 0 || diffResult.removed.length > 0) { - renderer.updateAfterPanelChange(added, removed); - } - }); - var batchInsert = function (renderer, diffResult, addedElements, startIdx, endIdx) { - return renderer.batchInsertDefer.apply(renderer, __spread$1(diffResult.added.slice(startIdx, endIdx).map(function (index, elIdx) { - return { - index: index, - elements: [addedElements[elIdx]], - hasDOMInElements: false - }; - }))); - }; - var batchRemove = function (renderer, startIdx, endIdx) { - var removed = renderer.panels.slice(startIdx, endIdx); - return renderer.batchRemoveDefer({ - index: startIdx, - deleteCount: removed.length, - hasDOMInElements: false - }); - }; - - var getRenderingPanels = (function (flicking, diffResult) { - var removedPanels = diffResult.removed.reduce(function (map, idx) { - map[idx] = true; - return map; - }, {}); - var maintainedMap = diffResult.maintained.reduce(function (map, _a) { - var _b = __read$1(_a, 2), - prev = _b[0], - current = _b[1]; - map[prev] = current; - return map; - }, {}); - return __spread$1(flicking.panels.filter(function (panel) { - return !removedPanels[panel.index]; - }) - // Sort panels by position - .sort(function (panel1, panel2) { - return panel1.position + panel1.offset - (panel2.position + panel2.offset); - }).map(function (panel) { - return diffResult.list[maintainedMap[panel.index]]; - }), diffResult.added.map(function (idx) { - return diffResult.list[idx]; - })); - }); - - var getDefaultCameraTransform = (function (align, horizontal, firstPanelSize) { - if (align === void 0) { - align = ALIGN.CENTER; - } - if (horizontal === void 0) { - horizontal = true; - } - var cameraAlign = getCameraAlign(align); - var panelAlign = getPanelAlign(align); - if (panelAlign == null) return ""; - var camPosition = "calc(" + cameraAlign + " - (" + (firstPanelSize || "0px") + " * " + panelAlign.percentage + ") - " + panelAlign.absolute + "px)"; - return horizontal ? "translate(" + camPosition + ")" : "translate(0, " + camPosition + ")"; - }); - var getCameraAlign = function (align) { - var alignVal = typeof align === "object" ? align.camera : align; - return parseAlign(alignVal); - }; - var getPanelAlign = function (align) { - var alignVal = typeof align === "object" ? align.panel : align; - return parseArithmeticExpression(parseAlign(alignVal)); - }; - var parseAlign = function (alignVal) { - if (typeof alignVal === "number") { - return alignVal + "px"; - } - switch (alignVal) { - case ALIGN.CENTER: - return "50%"; - case ALIGN.NEXT: - return "100%"; - case ALIGN.PREV: - return "0%"; - default: - return alignVal; - } - }; - - var CFC = { - __proto__: null, - withFlickingMethods: withFlickingMethods, - sync: sync, - getRenderingPanels: getRenderingPanels, - getDefaultCameraTransform: getDefaultCameraTransform - }; - - /* - * Copyright (c) 2015 NAVER Corp. - * egjs projects are licensed under the MIT license - */ - merge(Flicking, Core); - merge(Flicking, Camera); - merge(Flicking, Control); - merge(Flicking, Renderer); - merge(Flicking, Constants); - merge(Flicking, CFC); - merge(Flicking, Utils); - - return Flicking; - -})); -//# sourceMappingURL=flicking.pkgd.js.map diff --git a/dist/flicking.pkgd.js.map b/dist/flicking.pkgd.js.map deleted file mode 100644 index b49a3b1afc..0000000000 --- a/dist/flicking.pkgd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flicking.pkgd.js","sources":["../src/const/error.ts","../src/const/external.ts","../src/utils.ts","../src/core/FlickingError.ts","../src/core/Viewport.ts","../src/core/AutoResizer.ts","../src/core/panel/provider/VanillaElementProvider.ts","../src/core/panel/provider/VirtualElementProvider.ts","../src/core/VirtualManager.ts","../src/const/axes.ts","../src/control/states/State.ts","../src/control/states/IdleState.ts","../src/control/states/HoldingState.ts","../src/control/states/DraggingState.ts","../src/control/states/AnimatingState.ts","../src/control/states/DisabledState.ts","../src/control/StateMachine.ts","../src/control/AxesController.ts","../src/control/Control.ts","../src/core/AnchorPoint.ts","../src/control/SnapControl.ts","../src/control/FreeControl.ts","../src/control/StrictControl.ts","../src/control/index.ts","../src/camera/mode/CameraMode.ts","../src/camera/mode/LinearCameraMode.ts","../src/camera/mode/CircularCameraMode.ts","../src/camera/mode/BoundCameraMode.ts","../src/camera/Camera.ts","../src/camera/index.ts","../src/renderer/Renderer.ts","../src/renderer/VanillaRenderer.ts","../src/renderer/ExternalRenderer.ts","../src/core/panel/Panel.ts","../src/renderer/strategy/NormalRenderingStrategy.ts","../src/core/panel/VirtualPanel.ts","../src/renderer/strategy/VirtualRenderingStrategy.ts","../src/renderer/index.ts","../src/Flicking.ts","../src/core/index.ts","../src/cfc/withFlickingMethods.ts","../src/cfc/sync.ts","../src/cfc/getRenderingPanels.ts","../src/cfc/getDefaultCameraTransform.ts","../src/index.umd.ts"],"sourcesContent":["/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/restrict-template-expressions */\n\n/**\n * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.\n * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.\n * @name ERROR_CODE\n * @constant\n * @type object\n * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우\n * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우\n * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우\n * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)\n * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때\n * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우\n * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우\n * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)\n * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우\n * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우\n * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우\n * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)\n * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우\n * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우\n * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다\n * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우\n */\nexport const CODE = {\n WRONG_TYPE: 0,\n ELEMENT_NOT_FOUND: 1,\n VAL_MUST_NOT_NULL: 2,\n NOT_ATTACHED_TO_FLICKING: 3,\n WRONG_OPTION: 4,\n INDEX_OUT_OF_RANGE: 5,\n POSITION_NOT_REACHABLE: 6,\n TRANSFORM_NOT_SUPPORTED: 7,\n STOP_CALLED_BY_USER: 8,\n ANIMATION_INTERRUPTED: 9,\n ANIMATION_ALREADY_PLAYING: 10,\n NOT_ALLOWED_IN_FRAMEWORK: 11,\n NOT_INITIALIZED: 12,\n NO_ACTIVE: 13,\n NOT_ALLOWED_IN_VIRTUAL: 14\n} as const;\n\nexport const MESSAGE = {\n WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `\"${type}\"`).join(\" or \")}.`,\n ELEMENT_NOT_FOUND: (selector: string) => `Element with selector \"${selector}\" not found.`,\n VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,\n NOT_ATTACHED_TO_FLICKING: \"This module is not attached to the Flicking instance. \\\"init()\\\" should be called first.\",\n WRONG_OPTION: (optionName: string, val: any) => `Option \"${optionName}\" is not in correct format, given: ${val}`,\n INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index \"${val}\" is out of range: should be between ${min} and ${max}.`,\n POSITION_NOT_REACHABLE: (position: number) => `Position \"${position}\" is not reachable.`,\n TRANSFORM_NOT_SUPPORTED: \"Browser does not support CSS transform.\",\n STOP_CALLED_BY_USER: \"Event stop() is called by user.\",\n ANIMATION_INTERRUPTED: \"Animation is interrupted by user input.\",\n ANIMATION_ALREADY_PLAYING: \"Animation is already playing.\",\n NOT_ALLOWED_IN_FRAMEWORK: \"This behavior is not allowed in the frameworks like React, Vue, or Angular.\",\n NOT_INITIALIZED: \"Flicking is not initialized yet, call init() first.\",\n NO_ACTIVE: \"There's no active panel that Flicking has selected. This may be due to the absence of any panels.\",\n NOT_ALLOWED_IN_VIRTUAL: \"This behavior is not allowed when the virtual option is enabled\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nexport { CODE as ERROR_CODE } from \"./error\";\n\n/**\n * Event type object with event name strings of {@link Flicking}\n * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체\n * @type {object}\n * @property {\"holdStart\"} HOLD_START holdStart eventholdStart 이벤트\n * @property {\"holdEnd\"} HOLD_END holdEnd eventholdEnd 이벤트\n * @property {\"moveStart\"} MOVE_START moveStart eventmoveStart 이벤트\n * @property {\"move\"} MOVE move eventmove 이벤트\n * @property {\"moveEnd\"} MOVE_END moveEnd eventmoveEnd 이벤트\n * @property {\"willChange\"} WILL_CHANGE willChange eventwillChange 이벤트\n * @property {\"changed\"} CHANGED changed eventchanged 이벤트\n * @property {\"willRestore\"} WILL_RESTORE willRestore eventwillRestore 이벤트\n * @property {\"restored\"} RESTORED restored eventrestored 이벤트\n * @property {\"select\"} SELECT select eventselect 이벤트\n * @property {\"needPanel\"} NEED_PANEL needPanel eventneedPanel 이벤트\n * @property {\"panelChange\"} PANEL_CHANGE panelChange eventpanelChange 이벤트\n * @example\n * ```ts\n * import { EVENTS } from \"@egjs/flicking\";\n * EVENTS.MOVE_START; // \"moveStart\"\n * ```\n */\nexport const EVENTS = {\n READY: \"ready\",\n BEFORE_RESIZE: \"beforeResize\",\n AFTER_RESIZE: \"afterResize\",\n HOLD_START: \"holdStart\",\n HOLD_END: \"holdEnd\",\n MOVE_START: \"moveStart\",\n MOVE: \"move\",\n MOVE_END: \"moveEnd\",\n WILL_CHANGE: \"willChange\",\n CHANGED: \"changed\",\n WILL_RESTORE: \"willRestore\",\n RESTORED: \"restored\",\n SELECT: \"select\",\n NEED_PANEL: \"needPanel\",\n VISIBLE_CHANGE: \"visibleChange\",\n REACH_EDGE: \"reachEdge\",\n PANEL_CHANGE: \"panelChange\"\n} as const;\n\n/**\n * An object with all possible predefined literal string for the {@link Flicking#align align} option\n * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체\n * @type {object}\n * @property {\"prev\"} PREV left/top align좌/상 정렬\n * @property {\"center\"} CENTER center align중앙 정렬\n * @property {\"next\"} NEXT right/bottom align우/하 정렬\n */\nexport const ALIGN = {\n PREV: \"prev\",\n CENTER: \"center\",\n NEXT: \"next\"\n} as const;\n\n/**\n * An object of directions\n * @ko 방향을 나타내는 값들을 담고 있는 객체\n * @type {object}\n * @property {\"PREV\"} PREV \"left\" when {@link Flicking#horizontal horizontal} is true, and \"top\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다\n * @property {\"NEXT\"} NEXT \"right\" when {@link Flicking#horizontal horizontal} is true, and \"bottom\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다\n * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다\n */\nexport const DIRECTION = {\n PREV: \"PREV\",\n NEXT: \"NEXT\",\n NONE: null\n} as const;\n\n/**\n * An object with all possible {@link Flicking#moveType moveType}s\n * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체\n * @type {object}\n * @property {\"snap\"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"freeScroll\"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"strict\"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n */\nexport const MOVE_TYPE = {\n SNAP: \"snap\",\n FREE_SCROLL: \"freeScroll\",\n STRICT: \"strict\"\n} as const;\n\nexport const CLASS = {\n VERTICAL: \"vertical\",\n HIDDEN: \"flicking-hidden\",\n DEFAULT_VIRTUAL: \"flicking-panel\"\n};\n\n/**\n * An object with all possible {@link Flicking#circularFallback circularFallback}s\n * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체\n * @type {object}\n * @property {string} LINEAR \"linear\"\n * @property {string} BOUND \"bound\"\n */\nexport const CIRCULAR_FALLBACK = {\n LINEAR: \"linear\",\n BOUND: \"bound\"\n} as const;\n\n/**\n * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체\n * @type {object}\n * @property {string} LTR \"ltr\"\n * @property {string} RTL \"rtl\"\n */\nexport const ORDER = {\n LTR: \"ltr\",\n RTL: \"rtl\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking, { FlickingOptions } from \"./Flicking\";\nimport FlickingError from \"./core/FlickingError\";\nimport * as ERROR from \"./const/error\";\nimport { ALIGN, DIRECTION } from \"./const/external\";\nimport { LiteralUnion, Merged, ValueOf } from \"./type/internal\";\nimport { ElementLike } from \"./type/external\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const merge = (target: From, ...sources: To[]): Merged => {\n sources.forEach(source => {\n Object.keys(source).forEach(key => {\n target[key] = source[key] as unknown;\n });\n });\n\n return target as Merged;\n};\n\nexport const getElement = (el: HTMLElement | string | null, parent?: HTMLElement): HTMLElement => {\n let targetEl: HTMLElement | null = null;\n\n if (isString(el)) {\n const parentEl = parent ? parent : document;\n const queryResult = parentEl.querySelector(el);\n if (!queryResult) {\n throw new FlickingError(ERROR.MESSAGE.ELEMENT_NOT_FOUND(el), ERROR.CODE.ELEMENT_NOT_FOUND);\n }\n targetEl = queryResult as HTMLElement;\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n targetEl = el;\n }\n\n if (!targetEl) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n\n return targetEl;\n};\n\nexport const checkExistence = (value: any, nameOnErrMsg: string) => {\n if (value == null) {\n throw new FlickingError(ERROR.MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), ERROR.CODE.VAL_MUST_NOT_NULL);\n }\n};\n\nexport const clamp = (x: number, min: number, max: number) => Math.max(Math.min(x, max), min);\n\nexport const getFlickingAttached = (val: Flicking | null): Flicking => {\n if (!val) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING);\n }\n\n return val;\n};\n\nexport const toArray = (iterable: ArrayLike): T[] => [].slice.call(iterable) as T[];\n\nexport const parseAlign = (align: LiteralUnion> | number, size: number): number => {\n let alignPoint: number | null;\n if (isString(align)) {\n switch (align) {\n case ALIGN.PREV:\n alignPoint = 0;\n break;\n case ALIGN.CENTER:\n alignPoint = 0.5 * size;\n break;\n case ALIGN.NEXT:\n alignPoint = size;\n break;\n default:\n alignPoint = parseArithmeticSize(align, size);\n if (alignPoint == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"align\", align), ERROR.CODE.WRONG_OPTION);\n }\n }\n } else {\n alignPoint = align as number;\n }\n\n return alignPoint;\n};\n\nexport const parseBounce = (bounce: FlickingOptions[\"bounce\"], size: number): number[] => {\n let parsedBounce: Array;\n\n if (Array.isArray(bounce)) {\n parsedBounce = (bounce as string[]).map(val => parseArithmeticSize(val, size));\n } else {\n const parsedVal = parseArithmeticSize(bounce, size);\n\n parsedBounce = [parsedVal, parsedVal];\n }\n\n return parsedBounce.map(val => {\n if (val == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"bounce\", bounce), ERROR.CODE.WRONG_OPTION);\n }\n return val;\n });\n};\n\nexport const parseArithmeticSize = (cssValue: number | string, base: number): number | null => {\n const parsed = parseArithmeticExpression(cssValue);\n\n if (parsed == null) return null;\n\n return parsed.percentage * base + parsed.absolute;\n};\n\nexport const parseArithmeticExpression = (cssValue: number | string): { percentage: number; absolute: number } | null => {\n const cssRegex = /(?:(\\+|\\-)\\s*)?(\\d+(?:\\.\\d+)?(%|px)?)/g;\n\n if (typeof cssValue === \"number\") {\n return { percentage: 0, absolute: cssValue };\n }\n\n const parsed = {\n percentage: 0,\n absolute: 0\n };\n let idx = 0;\n let matchResult = cssRegex.exec(cssValue);\n while (matchResult != null) {\n let sign = matchResult[1];\n const value = matchResult[2];\n const unit = matchResult[3];\n const parsedValue = parseFloat(value);\n\n if (idx <= 0) {\n sign = sign || \"+\";\n }\n\n // Return default value for values not in good form\n if (!sign) {\n return null;\n }\n\n const signMultiplier = sign === \"+\" ? 1 : -1;\n\n if (unit === \"%\") {\n parsed.percentage += signMultiplier * (parsedValue / 100);\n } else {\n parsed.absolute += signMultiplier * parsedValue;\n }\n\n // Match next occurrence\n ++idx;\n matchResult = cssRegex.exec(cssValue);\n }\n\n // None-matched\n if (idx === 0) {\n return null;\n }\n\n return parsed;\n};\n\nexport const parseCSSSizeValue = (val: string | number): string => isString(val) ? val : `${val}px`;\n\nexport const parsePanelAlign = (align: FlickingOptions[\"align\"]) => typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\nexport const getDirection = (start: number, end: number): ValueOf => {\n if (start === end) return DIRECTION.NONE;\n return start < end ? DIRECTION.NEXT : DIRECTION.PREV;\n};\n\nexport const parseElement = (element: ElementLike | ElementLike[]): HTMLElement[] => {\n if (!Array.isArray(element)) {\n element = [element];\n }\n\n const elements: HTMLElement[] = [];\n element.forEach(el => {\n if (isString(el)) {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = el;\n\n elements.push(...toArray(tempDiv.children) as HTMLElement[]);\n while (tempDiv.firstChild) {\n tempDiv.removeChild(tempDiv.firstChild);\n }\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n elements.push(el);\n } else {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n });\n\n return elements;\n};\n\nexport const getMinusCompensatedIndex = (idx: number, max: number) => idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max);\n\nexport const includes = (array: T[], target: any): target is T => {\n for (const val of array) {\n if (val === target) return true;\n }\n return false;\n};\n\nexport const isString = (val: any): val is string => typeof val === \"string\";\n\nexport const circulatePosition = (pos: number, min: number, max: number) => {\n const size = max - min;\n\n if (pos < min) {\n const offset = (min - pos) % size;\n pos = max - offset;\n } else if (pos > max) {\n const offset = (pos - max) % size;\n pos = min + offset;\n }\n\n return pos;\n};\n\nexport const find = (array: T[], checker: (val: T) => boolean): T | null => {\n for (const val of array) {\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findRight = (array: T[], checker: (val: T) => boolean): T | null => {\n for (let idx = array.length - 1; idx >= 0; idx--) {\n const val = array[idx];\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findIndex = (array: T[], checker: (val: T) => boolean): number => {\n for (let idx = 0; idx < array.length; idx++) {\n if (checker(array[idx])) {\n return idx;\n }\n }\n\n return -1;\n};\n\nexport const getProgress = (pos: number, prev: number, next: number) => (pos - prev) / (next - prev);\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nexport const getStyle = (el: HTMLElement): CSSStyleDeclaration => window.getComputedStyle(el) || (el as any).currentStyle as CSSStyleDeclaration;\n\nexport const setSize = (el: HTMLElement, { width, height }: Partial<{\n width: number | string;\n height: number | string;\n}>) => {\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n el.style.width = `${width}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n el.style.height = `${height}px`;\n }\n }\n};\n\nexport const isBetween = (val: number, min: number, max: number) => val >= min && val <= max;\n\nexport const circulateIndex = (index: number, max: number): number => {\n if (index >= max) {\n return index % max;\n } else if (index < 0) {\n return getMinusCompensatedIndex((index + 1) % max - 1, max);\n } else {\n return index;\n }\n};\n\nexport const range = (end: number): number[] => {\n const arr = new Array(end);\n\n for (let i = 0; i < end; i++) {\n arr[i] = i;\n }\n\n return arr;\n};\n\nexport const getElementSize = ({\n el,\n horizontal,\n useFractionalSize,\n useOffset,\n style\n}: {\n el: HTMLElement;\n horizontal: boolean;\n useFractionalSize: boolean;\n useOffset: boolean;\n style: CSSStyleDeclaration;\n}): number => {\n let size = 0;\n if (useFractionalSize) {\n const baseSize = parseFloat(horizontal ? style.width : style.height) || 0;\n const isBorderBoxSizing = style.boxSizing === \"border-box\";\n const border = horizontal\n ? parseFloat(style.borderLeftWidth || \"0\") + parseFloat(style.borderRightWidth || \"0\")\n : parseFloat(style.borderTopWidth || \"0\") + parseFloat(style.borderBottomWidth || \"0\");\n\n if (isBorderBoxSizing) {\n size = useOffset\n ? baseSize\n : baseSize - border;\n } else {\n const padding = horizontal\n ? parseFloat(style.paddingLeft || \"0\") + parseFloat(style.paddingRight || \"0\")\n : parseFloat(style.paddingTop || \"0\") + parseFloat(style.paddingBottom || \"0\");\n\n size = useOffset\n ? baseSize + padding + border\n : baseSize + padding;\n }\n } else {\n const sizeStr = horizontal ? \"Width\" : \"Height\";\n\n size = useOffset\n ? el[`offset${sizeStr}`]\n : el[`client${sizeStr}`];\n }\n\n return Math.max(size, 0);\n};\n\nexport const setPrototypeOf = Object.setPrototypeOf || ((obj, proto) => {\n obj.__proto__ = proto;\n return obj;\n});\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport { setPrototypeOf } from \"../utils\";\n\n/**\n * Special type of known error that {@link Flicking} throws.\n * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러\n * @property {number} code Error code에러 코드\n * @property {string} message Error message에러 메시지\n * @see {@link ERROR_CODE ERROR_CODE}\n * @example\n * ```ts\n * import Flicking, { FlickingError, ERROR_CODES } from \"@egjs/flicking\";\n * try {\n * const flicking = new Flicking(\".flicking-viewport\")\n * } catch (e) {\n * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) {\n * console.error(\"Element not found\")\n * }\n * }\n * ```\n */\nclass FlickingError extends Error {\n public code: number;\n\n /**\n * @param message Error message에러 메시지\n * @param code Error code에러 코드\n */\n public constructor(message: string, code: number) {\n super(message);\n\n setPrototypeOf(this, FlickingError.prototype);\n this.name = \"FlickingError\";\n this.code = code;\n }\n}\n\nexport default FlickingError;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { getElementSize, getStyle, isString } from \"../utils\";\n\n/**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n */\nclass Viewport {\n private _flicking: Flicking;\n private _el: HTMLElement;\n private _width: number;\n private _height: number;\n private _isBorderBoxSizing: boolean;\n private _padding: {\n left: number;\n right: number;\n top: number;\n bottom: number;\n };\n\n /**\n * A viewport(root) element\n * @ko 뷰포트(root) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n\n /**\n * Viewport width, without paddings\n * @ko 뷰포트 너비\n * @type {number}\n * @readonly\n */\n public get width() { return this._width - this._padding.left - this._padding.right; }\n /**\n * Viewport height, without paddings\n * @ko 뷰포트 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height - this._padding.top - this._padding.bottom; }\n /**\n * Viewport paddings\n * @ko 뷰포트 CSS padding 값\n * @type {object}\n * @property {number} left CSS `padding-left`\n * @property {number} right CSS `padding-right`\n * @property {number} top CSS `padding-top`\n * @property {number} bottom CSS `padding-bottom`\n * @readonly\n */\n public get padding() { return this._padding; }\n\n /**\n * @param el A viewport element뷰포트 엘리먼트\n */\n public constructor(flicking: Flicking, el: HTMLElement) {\n this._flicking = flicking;\n this._el = el;\n this._width = 0;\n this._height = 0;\n this._padding = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this._isBorderBoxSizing = false;\n }\n\n /**\n * Change viewport's size.\n * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property\n * @ko 뷰포트 크기를 변경합니다.\n * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New viewport size새 뷰포트 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n */\n public setSize({\n width,\n height\n }: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n const el = this._el;\n const padding = this._padding;\n const isBorderBoxSizing = this._isBorderBoxSizing;\n\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n const newWidth = isBorderBoxSizing\n ? width + padding.left + padding.right\n : width;\n el.style.width = `${newWidth}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n const newHeight = isBorderBoxSizing\n ? height + padding.top + padding.bottom\n : height;\n el.style.height = `${newHeight}px`;\n }\n }\n this.resize();\n }\n\n /**\n * Update width/height to the current viewport element's size\n * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다\n */\n public resize() {\n const el = this._el;\n const elStyle = getStyle(el);\n const {\n useFractionalSize\n } = this._flicking;\n\n this._width = getElementSize({\n el,\n horizontal: true,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n this._height = getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n\n this._padding = {\n left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0,\n right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0,\n top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0,\n bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0\n };\n this._isBorderBoxSizing = elStyle.boxSizing === \"border-box\";\n }\n}\n\nexport default Viewport;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\n\nclass AutoResizer {\n private _flicking: Flicking;\n private _enabled: boolean;\n private _resizeObserver: ResizeObserver | null;\n private _resizeTimer: number;\n private _maxResizeDebounceTimer: number;\n\n public get enabled() { return this._enabled; }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n this._enabled = false;\n this._resizeObserver = null;\n this._resizeTimer = -1;\n this._maxResizeDebounceTimer = -1;\n }\n\n public enable(): this {\n const flicking = this._flicking;\n const viewport = flicking.viewport;\n\n if (this._enabled) {\n this.disable();\n }\n\n if (flicking.useResizeObserver && !!window.ResizeObserver) {\n const viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;\n\n const resizeObserver = viewportSizeNot0\n ? new ResizeObserver(this._skipFirstResize)\n : new ResizeObserver(this._onResize);\n\n resizeObserver.observe(flicking.viewport.element);\n\n this._resizeObserver = resizeObserver;\n } else {\n window.addEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = true;\n\n return this;\n }\n\n public disable(): this {\n if (!this._enabled) return this;\n\n const resizeObserver = this._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n this._resizeObserver = null;\n } else {\n window.removeEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = false;\n\n return this;\n }\n\n private _onResize = () => {\n const flicking = this._flicking;\n const resizeDebounce = flicking.resizeDebounce;\n const maxResizeDebounce = flicking.maxResizeDebounce;\n\n if (resizeDebounce <= 0) {\n void flicking.resize();\n } else {\n if (this._maxResizeDebounceTimer <= 0) {\n if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) {\n this._maxResizeDebounceTimer = window.setTimeout(this._doScheduledResize, maxResizeDebounce);\n }\n }\n\n if (this._resizeTimer > 0) {\n clearTimeout(this._resizeTimer);\n this._resizeTimer = 0;\n }\n\n this._resizeTimer = window.setTimeout(this._doScheduledResize, resizeDebounce);\n }\n };\n\n private _doScheduledResize = () => {\n clearTimeout(this._resizeTimer);\n clearTimeout(this._maxResizeDebounceTimer);\n\n this._maxResizeDebounceTimer = -1;\n this._resizeTimer = -1;\n\n void this._flicking.resize();\n };\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n private _skipFirstResize = (() => {\n let isFirstResize = true;\n\n return (() => {\n if (isFirstResize) {\n isFirstResize = false;\n return;\n }\n this._onResize();\n });\n })();\n}\n\nexport default AutoResizer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../../Flicking\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VanillaElementProvider implements ElementProvider {\n private _element: HTMLElement;\n private _rendered: boolean;\n\n public get element() { return this._element; }\n public get rendered() { return this._rendered; }\n\n public constructor(element: HTMLElement) {\n this._element = element;\n this._rendered = true;\n }\n\n public show(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement !== cameraEl) {\n cameraEl.appendChild(el);\n this._rendered = true;\n }\n }\n\n public hide(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement === cameraEl) {\n cameraEl.removeChild(el);\n this._rendered = false;\n }\n }\n}\n\nexport default VanillaElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport Flicking from \"../../../Flicking\";\nimport VirtualPanel from \"../VirtualPanel\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VirtualElementProvider implements ElementProvider {\n private _flicking: Flicking;\n private _panel: VirtualPanel;\n\n public get element() { return this._virtualElement.nativeElement; }\n public get rendered() { return this._virtualElement.visible; }\n\n private get _virtualElement() {\n const flicking = this._flicking;\n const elIndex = this._panel.elementIndex;\n const virtualElements = flicking.virtual.elements;\n\n return virtualElements[elIndex];\n }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public init(panel: VirtualPanel) {\n this._panel = panel;\n }\n\n public show(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n\n public hide(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n}\n\nexport default VirtualElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { range } from \"../utils\";\nimport { CLASS } from \"../const/external\";\n\nimport VirtualPanel from \"./panel/VirtualPanel\";\n\nexport interface VirtualOptions {\n renderPanel: (panel: VirtualPanel, index: number) => string;\n initialPanelCount: number;\n cache?: boolean;\n panelClass?: string;\n}\n\n/**\n * A manager class to add / remove virtual panels\n */\nclass VirtualManager {\n private _flicking: Flicking;\n\n private _renderPanel: (panel: VirtualPanel, index: number) => string;\n private _initialPanelCount: number;\n private _cache: boolean;\n private _panelClass: string;\n\n private _elements: Array<{ nativeElement: HTMLElement; visible: boolean }>;\n\n public get elements() { return this._elements; }\n\n // Options\n /**\n * A rendering function for the panel element's innerHTML\n * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @type {function}\n * @param {VirtualPanel} panel Instance of the panel패널 인스턴스\n * @param {number} index Index of the panel패널 인덱스\n * @default \"() => {}\"\n */\n public get renderPanel() { return this._renderPanel; }\n /**\n * Initial panel count to render\n * @ko 최초로 렌더링할 패널의 개수\n * @readonly\n * @type {number}\n * @default -1\n */\n public get initialPanelCount() { return this._initialPanelCount; }\n /**\n * Whether to cache rendered panel's innerHTML\n * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @type {boolean}\n * @default false\n */\n public get cache() { return this._cache; }\n /**\n * The class name that will be applied to rendered panel elements\n * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @type {string}\n * @default \"flicking-panel\"\n */\n public get panelClass() { return this._panelClass; }\n\n public set renderPanel(val: VirtualOptions[\"renderPanel\"]) {\n this._renderPanel = val;\n this._flicking.renderer.panels.forEach((panel: VirtualPanel) => panel.uncacheRenderResult());\n }\n\n public set cache(val: NonNullable) { this._cache = val; }\n public set panelClass(val: NonNullable) { this._panelClass = val; }\n\n public constructor(flicking: Flicking, options: VirtualOptions | null) {\n this._flicking = flicking;\n\n this._renderPanel = options?.renderPanel ?? (() => \"\");\n this._initialPanelCount = options?.initialPanelCount ?? -1;\n this._cache = options?.cache ?? false;\n this._panelClass = options?.panelClass ?? CLASS.DEFAULT_VIRTUAL;\n\n this._elements = [];\n }\n\n public init() {\n const flicking = this._flicking;\n\n if (!flicking.virtualEnabled) return;\n\n if (!flicking.externalRenderer && !flicking.renderExternal) {\n this._initVirtualElements();\n }\n\n const virtualElements = flicking.camera.children;\n this._elements = virtualElements.map(el => ({ nativeElement: el, visible: true }));\n }\n\n public show(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = true;\n\n if (nativeEl.style.display) {\n nativeEl.style.display = \"\";\n }\n }\n\n public hide(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = false;\n nativeEl.style.display = \"none\";\n }\n\n /**\n * Add new virtual panels at the end of the list\n * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public append(count: number = 1): VirtualPanel[] {\n const flicking = this._flicking;\n\n return this.insert(flicking.panels.length, count);\n }\n\n /**\n * Add new virtual panels at the start of the list\n * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public prepend(count: number = 1): VirtualPanel[] {\n return this.insert(0, count);\n }\n\n /**\n * Add new virtual panels at the given index\n * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public insert(index: number, count: number = 1): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchInsert({ index, elements: range(count), hasDOMInElements: false }) as VirtualPanel[];\n }\n\n /**\n * Remove panels at the given index\n * @ko 주어진 인덱스에서 패널들을 삭제합니다\n * @param {number} count The number of panels to remove삭제할 패널의 개수\n * @returns {Array} The panels removed삭제된 패널들\n */\n public remove(index: number, count: number): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchRemove({ index, deleteCount: count, hasDOMInElements: false }) as VirtualPanel[];\n }\n\n private _initVirtualElements() {\n const flicking = this._flicking;\n const cameraElement = flicking.camera.element;\n const panelsPerView = flicking.panelsPerView;\n const fragment = document.createDocumentFragment();\n\n const newElements = range(panelsPerView + 1).map(idx => {\n const panelEl = document.createElement(\"div\");\n panelEl.className = this._panelClass;\n panelEl.dataset.elementIndex = idx.toString();\n return panelEl;\n });\n\n newElements.forEach(el => {\n fragment.appendChild(el);\n });\n\n cameraElement.appendChild(fragment);\n }\n}\n\nexport default VirtualManager;\n","/**\n * All possible @egjs/axes event keys\n * @internal\n */\nexport const EVENT = {\n HOLD: \"hold\",\n CHANGE: \"change\",\n RELEASE: \"release\",\n ANIMATION_END: \"animationEnd\",\n FINISH: \"finish\"\n} as const;\n\n/**\n * An Axis key that Flicking uses\n * @internal\n */\nexport const POSITION_KEY = \"flick\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\nimport { circulatePosition, getDirection } from \"../../utils\";\n\nexport enum STATE_TYPE {\n IDLE,\n HOLDING,\n DRAGGING,\n ANIMATING,\n DISABLED\n}\n\n/**\n * A component that shows the current status of the user input or the animation\n * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트\n * @internal\n */\nabstract class State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly holding: boolean;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly animating: boolean;\n\n protected _delta: number = 0;\n protected _targetPanel: Panel | null = null;\n\n /**\n * A sum of delta values of change events from the last hold event of Axes\n * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산\n * @type {number}\n * @readonly\n */\n public get delta() { return this._delta; }\n\n /**\n * A panel to set as {@link Control#activePanel} after the animation is finished\n * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널\n * @type {number}\n * @readonly\n */\n public get targetPanel() { return this._targetPanel; }\n\n public set targetPanel(val: Panel | null) { this._targetPanel = val; }\n\n /**\n * An callback which is called when state has changed to this state\n * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수\n * @param {State} prevState An previous state이전 상태값\n * @return {void}\n */\n public onEnter(prevState: State): void {\n this._delta = prevState._delta;\n this._targetPanel = prevState._targetPanel;\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onHold(ctx: {\n flicking: Flicking;\n axesEvent: OnHold;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onChange(ctx: {\n flicking: Flicking;\n axesEvent: OnChange;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onRelease(ctx: {\n flicking: Flicking;\n axesEvent: OnRelease;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onAnimationEnd(ctx: {\n flicking: Flicking;\n axesEvent: OnAnimationEnd;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onFinish(ctx: {\n flicking: Flicking;\n axesEvent: OnFinish;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n protected _moveToChangedPosition(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const delta = axesEvent.delta[AXES.POSITION_KEY];\n\n if (!delta) {\n return;\n }\n\n this._delta += delta;\n\n const camera = flicking.camera;\n const prevPosition = camera.position;\n const position = axesEvent.pos[AXES.POSITION_KEY];\n const newPosition = flicking.circularEnabled\n ? circulatePosition(position, camera.range.min, camera.range.max)\n : position;\n\n camera.lookAt(newPosition);\n\n const moveEvent = new ComponentEvent(EVENTS.MOVE, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, axesEvent.delta[AXES.POSITION_KEY]),\n axesEvent\n });\n\n flicking.trigger(moveEvent);\n\n if (moveEvent.isCanceled()) {\n // Return to previous position\n camera.lookAt(prevPosition);\n transitTo(STATE_TYPE.DISABLED);\n }\n }\n}\n\nexport default State;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A default state when there's no user input and no animation's playing\n * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태\n * @internal\n */\nclass IdleState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n public onEnter() {\n this._delta = 0;\n this._targetPanel = null;\n }\n\n public onHold(ctx: Parameters[0]): void {\n // Shouldn't do any action until any panels on flicking area\n const { flicking, axesEvent, transitTo } = ctx;\n\n if (flicking.renderer.panelCount <= 0) {\n transitTo(STATE_TYPE.DISABLED);\n return;\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, {\n axesEvent\n });\n\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.HOLDING);\n }\n }\n\n // By methods call\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const controller = flicking.control.controller;\n const animatingContext = controller.animatingContext;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger AnimatingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.ANIMATING).onChange(ctx);\n }\n }\n}\n\nexport default IdleState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's holding the Flicking area, but not moved a single pixel yet\n * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태\n * @internal\n */\nclass HoldingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n private _releaseEvent: OnRelease | null = null;\n\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const inputEvent = axesEvent.inputEvent as { offsetX: number; offsetY: number };\n\n const offset = flicking.horizontal\n ? inputEvent.offsetX\n : inputEvent.offsetY;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, -offset),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger DraggingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.DRAGGING).onChange(ctx);\n }\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { axesEvent }));\n\n if (axesEvent.delta.flick !== 0) {\n // Sometimes \"release\" event on axes triggered before \"change\" event\n // Especially if user flicked panel fast in really short amount of time\n // if delta is not zero, that means above case happened.\n\n // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END\n // At least one move event should be included between holdStart and holdEnd\n axesEvent.setTo({ flick: flicking.camera.position }, 0);\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n // Can't handle select event here,\n // As \"finish\" axes event happens\n this._releaseEvent = axesEvent;\n }\n\n public onFinish(ctx: Parameters[0]): void {\n const { flicking, transitTo } = ctx;\n\n // Should transite to IDLE state before select event\n // As user expects hold is already finished\n transitTo(STATE_TYPE.IDLE);\n\n if (!this._releaseEvent) {\n return;\n }\n\n // Handle release event here\n // To prevent finish event called twice\n const releaseEvent = this._releaseEvent;\n\n // Static click\n /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */\n const srcEvent = releaseEvent.inputEvent.srcEvent;\n\n let clickedElement: HTMLElement;\n if (srcEvent.type === \"touchend\") {\n const touchEvent = srcEvent as TouchEvent;\n const touch = touchEvent.changedTouches[0];\n clickedElement = document.elementFromPoint(touch.clientX, touch.clientY) as HTMLElement;\n } else {\n clickedElement = srcEvent.target;\n }\n /* eslint-enable */\n\n const panels = flicking.renderer.panels;\n let clickedPanel: Panel | null = null;\n\n for (const panel of panels) {\n if (panel.contains(clickedElement)) {\n clickedPanel = panel;\n break;\n }\n }\n\n if (clickedPanel) {\n const cameraPosition = flicking.camera.position;\n const clickedPanelPosition = clickedPanel.position;\n\n flicking.trigger(new ComponentEvent(EVENTS.SELECT, {\n index: clickedPanel.index,\n panel: clickedPanel,\n // Direction to the clicked panel\n direction: getDirection(cameraPosition, clickedPanelPosition)\n }));\n }\n }\n}\n\nexport default HoldingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's dragging the Flicking area\n * @ko 사용자가 드래깅중인 상태\n * @internal\n */\nclass DraggingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onRelease(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n // Update last position to cope with Axes's animating behavior\n // Axes uses start position when animation start\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, {\n axesEvent\n }));\n\n if (flicking.renderer.panelCount <= 0) {\n // There're no panels\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n transitTo(STATE_TYPE.ANIMATING);\n\n const control = flicking.control;\n const position = axesEvent.destPos[AXES.POSITION_KEY];\n const duration = Math.max(axesEvent.duration, flicking.duration);\n\n try {\n void control.moveToPosition(position, duration, axesEvent);\n } catch (err) {\n transitTo(STATE_TYPE.IDLE);\n axesEvent.setTo({ [AXES.POSITION_KEY]: flicking.camera.position }, 0);\n }\n }\n}\n\nexport default DraggingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking's animating by user input or method call\n * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태\n * @internal\n */\nclass AnimatingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onHold(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const targetPanel = this._targetPanel;\n const control = flicking.control;\n\n this._delta = 0;\n flicking.control.updateInput();\n\n if (flicking.changeOnHold && targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { axesEvent });\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.DRAGGING);\n }\n }\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onFinish(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const control = flicking.control;\n const controller = control.controller;\n const animatingContext = controller.animatingContext;\n\n transitTo(STATE_TYPE.IDLE);\n\n flicking.trigger(new ComponentEvent(EVENTS.MOVE_END, {\n isTrusted: axesEvent.isTrusted,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n }));\n\n const targetPanel = this._targetPanel;\n if (targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n }\n}\n\nexport default AnimatingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking is stopped by event's `stop` method\n * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태\n * @internal\n */\nclass DisabledState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onAnimationEnd(ctx: Parameters[0]): void {\n const { transitTo } = ctx;\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onChange(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // Can stop Axes's change event\n axesEvent.stop();\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // This is needed when stopped hold start event\n if (axesEvent.delta.flick === 0) {\n transitTo(STATE_TYPE.IDLE);\n }\n }\n}\n\nexport default DisabledState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { AxesEvents } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport * as AXES from \"../const/axes\";\n\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport State, { STATE_TYPE } from \"./states/State\";\n\n/**\n * @internal\n */\nclass StateMachine {\n private _state: State;\n\n public get state(): State { return this._state; }\n\n public constructor() {\n this._state = new IdleState();\n }\n\n public fire(eventType: keyof AxesEvents, externalCtx: {\n flicking: Flicking;\n axesEvent: any;\n }) {\n const currentState = this._state;\n const ctx = { ...externalCtx, transitTo: this.transitTo };\n\n switch (eventType) {\n case AXES.EVENT.HOLD:\n currentState.onHold(ctx);\n break;\n case AXES.EVENT.CHANGE:\n currentState.onChange(ctx);\n break;\n case AXES.EVENT.RELEASE:\n currentState.onRelease(ctx);\n break;\n case AXES.EVENT.ANIMATION_END:\n currentState.onAnimationEnd(ctx);\n break;\n case AXES.EVENT.FINISH:\n currentState.onFinish(ctx);\n break;\n }\n }\n\n public transitTo = (nextStateType: STATE_TYPE): State => {\n let nextState: State;\n\n switch (nextStateType) {\n case STATE_TYPE.IDLE:\n nextState = new IdleState();\n break;\n case STATE_TYPE.HOLDING:\n nextState = new HoldingState();\n break;\n case STATE_TYPE.DRAGGING:\n nextState = new DraggingState();\n break;\n case STATE_TYPE.ANIMATING:\n nextState = new AnimatingState();\n break;\n case STATE_TYPE.DISABLED:\n nextState = new DisabledState();\n break;\n }\n\n nextState.onEnter(this._state);\n\n this._state = nextState;\n\n return this._state;\n };\n}\n\nexport default StateMachine;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Axes, { PanInput, AxesEvents, OnRelease } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\nimport { ORDER } from \"../const/external\";\nimport { getFlickingAttached, parseBounce } from \"../utils\";\nimport { ControlParams } from \"../type/external\";\n\nimport StateMachine from \"./StateMachine\";\n\n/**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @internal\n */\nclass AxesController {\n private _flicking: Flicking | null;\n private _axes: Axes | null;\n private _panInput: PanInput | null;\n private _stateMachine: StateMachine;\n\n private _animatingContext: { start: number; end: number; offset: number };\n private _dragged: boolean;\n\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스\n * @type {Axes | null}\n * @see https://naver.github.io/egjs-axes/docs/api/Axes\n * @readonly\n */\n public get axes() { return this._axes; }\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스\n * @type {PanInput | null}\n * @see https://naver.github.io/egjs-axes/docs/api/PanInput\n * @readonly\n */\n public get panInput() { return this._panInput; }\n /**\n * @internal\n */\n public get stateMachine() { return this._stateMachine; }\n /**\n * A activated {@link State} that shows the current status of the user input or the animation\n * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다\n * @type {State}\n */\n public get state() { return this._stateMachine.state; }\n /**\n * A context of the current animation playing\n * @ko 현재 재생중인 애니메이션 정보\n * @type {object}\n * @property {number} start A start position of the animation애니메이션 시작 지점\n * @property {number} end A end position of the animation애니메이션 끝 지점\n * @property {number} offset camera offset카메라 오프셋\n * @readonly\n */\n public get animatingContext() { return this._animatingContext; }\n /**\n * A current control parameters of the Axes instance\n * @ko 활성화된 현재 Axes 패러미터들\n * @type {ControlParams}\n */\n public get controlParams(): ControlParams {\n const axes = this._axes;\n\n if (!axes) {\n return {\n range: { min: 0, max: 0 },\n position: 0,\n circular: false\n };\n }\n\n const axis = axes.axis[AXES.POSITION_KEY];\n\n return {\n range: { min: axis.range![0], max: axis.range![1] },\n circular: (axis.circular as boolean[])[0],\n position: this.position\n };\n }\n\n /**\n * A Boolean indicating whether the user input is enabled\n * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get enabled() { return this._panInput?.isEnabled() ?? false; }\n /**\n * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값\n * @type {number}\n * @readonly\n */\n public get position() { return this._axes?.get([AXES.POSITION_KEY])[AXES.POSITION_KEY] ?? 0; }\n /**\n * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값\n * @type {number[]}\n * @readonly\n */\n public get range() { return this._axes?.axis[AXES.POSITION_KEY].range ?? [0, 0]; }\n /**\n * Actual bounce size(px)\n * @ko 적용된 bounce 크기(px 단위)\n * @type {number[]}\n * @readonly\n */\n public get bounce() { return this._axes?.axis[AXES.POSITION_KEY].bounce as number[] | undefined; }\n\n /** */\n public constructor() {\n this._resetInternalValues();\n this._stateMachine = new StateMachine();\n }\n\n /**\n * Initialize AxesController\n * @ko AxesController를 초기화합니다\n * @param {Flicking} flicking An instance of Flicking\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n\n this._axes = new Axes({\n [AXES.POSITION_KEY]: {\n range: [0, 0],\n circular: false,\n bounce: [0, 0]\n }\n }, {\n deceleration: flicking.deceleration,\n interruptable: flicking.interruptable,\n nested: flicking.nested,\n easing: flicking.easing\n });\n this._panInput = new PanInput(flicking.viewport.element, {\n inputType: flicking.inputType,\n threshold: 1,\n iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,\n preventDefaultOnDrag: flicking.preventDefaultOnDrag,\n scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],\n releaseOnScroll: true\n });\n\n const axes = this._axes;\n\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], this._panInput);\n\n for (const key in AXES.EVENT) {\n const eventType = AXES.EVENT[key] as keyof AxesEvents;\n\n axes.on(eventType, (e: AxesEvents[typeof eventType]) => {\n this._stateMachine.fire(eventType, {\n flicking,\n axesEvent: e\n });\n });\n }\n\n return this;\n }\n\n /**\n * Destroy AxesController and return to initial state\n * @ko AxesController를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n if (this._axes) {\n this.removePreventClickHandler();\n this._axes.destroy();\n }\n\n this._panInput?.destroy();\n\n this._resetInternalValues();\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._panInput?.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._panInput?.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._panInput?.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @chainable\n * @return {this}\n */\n public updateAnimation(position: number, duration?: number): this {\n this._animatingContext = {\n ...this._animatingContext,\n end: position\n };\n this._axes?.updateAnimation({\n destPos: { [AXES.POSITION_KEY]: position },\n duration\n });\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n this._axes?.stopAnimation();\n\n return this;\n }\n\n /**\n * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before\n * {@link AxesController#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public update(controlParams: ControlParams): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const axes = this._axes!;\n const axis = axes.axis[AXES.POSITION_KEY];\n\n axis.circular = [controlParams.circular, controlParams.circular];\n axis.range = [controlParams.range.min, controlParams.range.max];\n axis.bounce = parseBounce(flicking.bounce, camera.size);\n\n axes.axisManager.set({ [AXES.POSITION_KEY]: controlParams.position });\n\n return this;\n }\n\n /**\n * Attach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다\n * @return {this}\n */\n public addPreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.on(AXES.EVENT.HOLD, this._onAxesHold);\n axes.on(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.addEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Detach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다\n * @return {this}\n */\n public removePreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.off(AXES.EVENT.HOLD, this._onAxesHold);\n axes.off(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.removeEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다.\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise {\n const axes = this._axes;\n const state = this._stateMachine.state;\n\n if (!axes) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING));\n }\n\n const startPos = axes.get([AXES.POSITION_KEY])[AXES.POSITION_KEY];\n\n if (startPos === position) {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.lookAt(position);\n\n if (state.targetPanel) {\n flicking.control.setActive(state.targetPanel, flicking.control.activePanel, axesEvent?.isTrusted ?? false);\n }\n return Promise.resolve();\n }\n\n this._animatingContext = {\n start: startPos,\n end: position,\n offset: 0\n };\n\n const animate = () => {\n const resetContext = () => {\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n };\n\n axes.once(AXES.EVENT.FINISH, resetContext);\n\n if (axesEvent) {\n axesEvent.setTo({ [AXES.POSITION_KEY]: position }, duration);\n } else {\n axes.setTo({ [AXES.POSITION_KEY]: position }, duration);\n }\n };\n\n return new Promise((resolve, reject) => {\n const animationFinishHandler = () => {\n axes.off(AXES.EVENT.HOLD, interruptionHandler);\n resolve();\n };\n\n const interruptionHandler = () => {\n axes.off(AXES.EVENT.FINISH, animationFinishHandler);\n reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));\n };\n\n axes.once(AXES.EVENT.FINISH, animationFinishHandler);\n axes.once(AXES.EVENT.HOLD, interruptionHandler);\n\n animate();\n });\n }\n\n public updateDirection() {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const panInput = this._panInput!;\n\n axes.disconnect(panInput);\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], panInput);\n\n panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];\n }\n\n private _resetInternalValues() {\n this._flicking = null;\n this._axes = null;\n this._panInput = null;\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n this._dragged = false;\n }\n\n private _onAxesHold = () => {\n this._dragged = false;\n };\n\n private _onAxesChange = () => {\n this._dragged = !!this._panInput?.isEnabled();\n };\n\n private _preventClickWhenDragged = (e: MouseEvent) => {\n if (this._dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n this._dragged = false;\n };\n}\n\nexport default AxesController;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AxesController from \"../control/AxesController\";\nimport { DIRECTION, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getDirection, getFlickingAttached } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\n/**\n * A component that manages inputs and animation of Flicking\n * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트\n */\nabstract class Control {\n // Internal States\n protected _flicking: Flicking | null;\n protected _controller: AxesController;\n protected _activePanel: Panel | null;\n protected _nextPanel: Panel | null;\n\n /**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @type {AxesController}\n * @readonly\n */\n public get controller() { return this._controller; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get activeIndex() { return this._activePanel?.index ?? -1; }\n /**\n * An active panel\n * @ko 현재 선택된 패널\n * @type {Panel | null}\n * @readonly\n */\n public get activePanel() { return this._activePanel; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._controller.state.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._controller.state.holding; }\n\n /** */\n public constructor() {\n this._flicking = null;\n this._controller = new AxesController();\n this._activePanel = null;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @method\n * @abstract\n * @memberof Control\n * @instance\n * @name moveToPosition\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise;\n\n /**\n * Initialize Control\n * @ko Control을 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._controller.init(flicking);\n\n return this;\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._controller.destroy();\n\n this._flicking = null;\n this._activePanel = null;\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._controller.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._controller.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._controller.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우\n * @return {this}\n */\n public updateAnimation(panel: Panel, duration?: number, direction?: ValueOf): this {\n const state = this._controller.state;\n const position = this._getPosition(panel, direction ?? DIRECTION.NONE);\n\n state.targetPanel = panel;\n this._controller.updateAnimation(position, duration);\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n const state = this._controller.state;\n\n state.targetPanel = null;\n this._controller.stopAnimation();\n\n return this;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n camera.lookAt(camera.clampToReachablePosition(activePanel.position));\n }\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._controller.update(camera.controlParams);\n\n return this;\n }\n\n /**\n * Reset {@link Control#activePanel activePanel} to `null`\n * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다\n * @chainable\n * @return {this}\n */\n public resetActive(): this {\n this._activePanel = null;\n\n return this;\n }\n\n /**\n * Move {@link Camera} to the given panel\n * @ko {@link Camera}를 해당 패널 위로 이동합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {object} options An options object옵션 오브젝트\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public async moveToPanel(panel: Panel, {\n duration,\n direction = DIRECTION.NONE,\n axesEvent\n }: {\n duration: number;\n direction?: ValueOf;\n axesEvent?: OnRelease;\n }) {\n const position = this._getPosition(panel, direction);\n this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);\n\n return this._animateToPosition({ position, duration, newActivePanel: panel, axesEvent });\n }\n\n /**\n * @internal\n */\n public setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) {\n const flicking = getFlickingAttached(this._flicking);\n\n this._activePanel = newActivePanel;\n this._nextPanel = null;\n\n flicking.camera.updateAdaptiveHeight();\n\n if (newActivePanel !== prevActivePanel) {\n flicking.trigger(new ComponentEvent(EVENTS.CHANGED, {\n index: newActivePanel.index,\n panel: newActivePanel,\n prevIndex: prevActivePanel?.index ?? -1,\n prevPanel: prevActivePanel,\n isTrusted,\n direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE\n }));\n } else {\n flicking.trigger(new ComponentEvent(EVENTS.RESTORED, {\n isTrusted\n }));\n }\n }\n\n /**\n * @internal\n */\n public copy(control: Control) {\n this._flicking = control._flicking;\n this._activePanel = control._activePanel;\n this._controller = control._controller;\n }\n\n protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf) {\n const flicking = getFlickingAttached(this._flicking);\n const triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n const event = new ComponentEvent(triggeringEvent, {\n index: panel.index,\n panel,\n isTrusted: axesEvent?.isTrusted || false,\n direction: direction ?? getDirection(activePanel?.position ?? camera.position, position)\n });\n\n this._nextPanel = panel;\n flicking.trigger(event);\n\n if (event.isCanceled()) {\n throw new FlickingError(ERROR.MESSAGE.STOP_CALLED_BY_USER, ERROR.CODE.STOP_CALLED_BY_USER);\n }\n }\n\n protected async _animateToPosition({\n position,\n duration,\n newActivePanel,\n axesEvent\n }: {\n position: number;\n duration: number;\n newActivePanel: Panel;\n axesEvent?: OnRelease;\n }) {\n const flicking = getFlickingAttached(this._flicking);\n const animate = () => this._controller.animateTo(position, duration, axesEvent);\n const state = this._controller.state;\n\n state.targetPanel = newActivePanel;\n\n if (duration <= 0) {\n return animate();\n } else {\n return animate().then(async () => {\n await flicking.renderer.render();\n }).catch(err => {\n if (axesEvent && err instanceof FlickingError && err.code === ERROR.CODE.ANIMATION_INTERRUPTED) return;\n throw err;\n });\n }\n }\n\n private _getPosition(panel: Panel, direction: ValueOf = DIRECTION.NONE) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n let position = panel.position;\n const nearestAnchor = camera.findNearestAnchor(position);\n\n if (panel.removed || !nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(panel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n if (!camera.canReach(panel)) {\n // Override position & panel if that panel is not reachable\n position = nearestAnchor.position;\n panel = nearestAnchor.panel;\n } else if (flicking.circularEnabled) {\n // Circular mode is enabled, find nearest distance to panel\n const camPos = this._controller.position; // Actual position of the Axes\n const camRangeDiff = camera.rangeDiff;\n const possiblePositions = [position, position + camRangeDiff, position - camRangeDiff]\n .filter(pos => {\n if (direction === DIRECTION.NONE) return true;\n\n return direction === DIRECTION.PREV\n ? pos <= camPos\n : pos >= camPos;\n });\n\n position = possiblePositions.reduce((nearestPosition, pos) => {\n if (Math.abs(camPos - pos) < Math.abs(camPos - nearestPosition)) {\n return pos;\n } else {\n return nearestPosition;\n }\n }, Infinity);\n }\n\n return position;\n }\n}\n\nexport default Control;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"./panel/Panel\";\n\n/**\n * A data component that has actual position where the camera should be stopped at\n * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트\n */\nclass AnchorPoint {\n private _index: number;\n private _pos: number;\n private _panel: Panel;\n\n /**\n * Index of AnchorPoint\n * @ko AnchorPoint의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of AnchorPoint\n * @ko AnchorPoint의 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos; }\n /**\n * A {@link Panel} instance AnchorPoint is referencing to\n * @ko AnchorPoint가 참조하고 있는 {@link Panel}\n * @type {Panel}\n * @readonly\n */\n public get panel() { return this._panel; }\n\n /**\n * @param {object} options An options object옵션 객체\n * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스\n * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표\n * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel}\n */\n public constructor({\n index,\n position,\n panel\n }: {\n index: number;\n position: number;\n panel: Panel;\n }) {\n this._index = index;\n this._pos = position;\n this._panel = panel;\n }\n}\n\nexport default AnchorPoint;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport { circulateIndex, clamp, getFlickingAttached } from \"../utils\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link SnapControl}\n * @ko {@link SnapControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels can go after release입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n */\nexport interface SnapControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that uses a release momentum to choose destination panel\n * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control}\n */\nclass SnapControl extends Control {\n private _count: SnapControlOptions[\"count\"];\n\n /**\n * Maximum number of panels can go after release\n * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n * @type {number}\n * @default Infinity\n */\n public get count() { return this._count; }\n\n public set count(val: SnapControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = Infinity\n }: Partial = {}) {\n super();\n\n this._count = count;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activeAnchor = camera.findActiveAnchor();\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n const state = this._controller.state;\n\n if (!activeAnchor || !anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);\n\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n const absPosDelta = Math.abs(posDelta);\n const snapDelta = axesEvent && axesEvent.delta[AXES.POSITION_KEY] !== 0\n ? Math.abs(axesEvent.delta[AXES.POSITION_KEY])\n : absPosDelta;\n let targetAnchor: AnchorPoint;\n\n if (snapDelta >= snapThreshold && snapDelta > 0) {\n // Move to anchor at position\n targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);\n } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {\n // Move to the adjacent panel\n targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);\n } else {\n // Fallback to nearest panel from current camera\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent);\n\n return this._animateToPosition({\n position: camera.clampToReachablePosition(targetAnchor.position),\n duration,\n newActivePanel: targetAnchor.panel,\n axesEvent\n });\n }\n\n private _findSnappedAnchor(position: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const count = this._count;\n\n const currentPos = camera.position;\n\n const clampedPosition = camera.clampToReachablePosition(position);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtCamera || !anchorAtPosition) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n if (!isFinite(count)) {\n return anchorAtPosition;\n }\n\n const panelCount = flicking.panelCount;\n const anchors = camera.anchorPoints;\n\n let loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff);\n if ((position > currentPos && anchorAtPosition.index < anchorAtCamera.index)\n || (anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount += 1;\n } else if ((position < currentPos && anchorAtPosition.index > anchorAtCamera.index)\n || (anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount -= 1;\n }\n\n const circularIndexOffset = loopCount * panelCount;\n const anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset;\n\n if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) {\n const anchor = anchors[anchorAtPosition.index];\n\n return new AnchorPoint({\n index: anchor.index,\n position: anchor.position + loopCount * camera.rangeDiff,\n panel: anchor.panel\n });\n }\n\n if (flicking.circularEnabled) {\n const targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)];\n let loop = Math.floor(count / panelCount);\n\n if (position > currentPos && targetAnchor.index < anchorAtCamera.index) {\n loop += 1;\n } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) {\n loop -= 1;\n }\n\n return new AnchorPoint({\n index: targetAnchor.index,\n position: targetAnchor.position + loop * camera.rangeDiff,\n panel: targetAnchor.panel\n });\n } else {\n return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)];\n }\n }\n\n private _findAdjacentAnchor(position: number, posDelta: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n if (camera.circularEnabled) {\n const anchorIncludePosition = camera.findAnchorIncludePosition(position);\n\n if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) {\n return anchorIncludePosition;\n }\n }\n\n const adjacentAnchor = (posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) ?? anchorAtCamera;\n\n return adjacentAnchor;\n }\n\n private _calcSnapThreshold(threshold: number, position: number, activeAnchor: AnchorPoint): number {\n const isNextDirection = position > activeAnchor.position;\n const panel = activeAnchor.panel;\n const panelSize = panel.size;\n const alignPos = panel.alignPosition;\n\n // Minimum distance needed to decide prev/next panel as nearest\n /*\n * | Prev | Next |\n * |<------>|<------------>|\n * [ |<-Anchor ]\n */\n return Math.max(threshold, isNextDirection\n ? panelSize - alignPos + panel.margin.next\n : alignPos + panel.margin.prev);\n }\n}\n\nexport default SnapControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached } from \"../utils\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link FreeControl}\n * @ko {@link FreeControl} 생성시 사용되는 옵션\n * @interface\n * @property {boolean} stopAtEdge Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n */\nexport interface FreeControlOptions {\n stopAtEdge: boolean;\n}\n\n/**\n * A {@link Control} that can be scrolled freely without alignment\n * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control}\n */\nclass FreeControl extends Control {\n private _stopAtEdge: FreeControlOptions[\"stopAtEdge\"];\n\n /**\n * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n * @type {boolean}\n * @default true\n */\n public get stopAtEdge() { return this._stopAtEdge; }\n\n public set stopAtEdge(val: FreeControlOptions[\"stopAtEdge\"]) { this._stopAtEdge = val; }\n\n /** */\n public constructor({\n stopAtEdge = true\n }: Partial = {}) {\n super();\n\n this._stopAtEdge = stopAtEdge;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n const panelRange = activePanel.range;\n const newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n camera.lookAt(camera.clampToReachablePosition(newPosition));\n }\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n\n const camera = flicking.camera;\n const targetPos = camera.clampToReachablePosition(position);\n\n const anchorAtPosition = camera.findAnchorIncludePosition(targetPos);\n\n if (!anchorAtPosition) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const targetPanel = anchorAtPosition.panel;\n\n // Trigger only change event\n if (targetPanel !== this._activePanel) {\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n }\n\n return this._animateToPosition({ position: this._stopAtEdge ? targetPos : position, duration, newActivePanel: targetPanel, axesEvent });\n }\n}\n\nexport default FreeControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport Panel from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { clamp, getFlickingAttached, getMinusCompensatedIndex, isBetween } from \"../utils\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n/**\n * An options for the {@link StrictControl}\n * @ko {@link StrictControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels that can be moved at a time최대로 움직일 수 있는 패널의 개수\n */\nexport interface StrictControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that allow you to select the maximum number of panels to move at a time\n * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control}\n */\nclass StrictControl extends Control {\n private _count: number;\n private _indexRange: { min: number; max: number };\n\n /**\n * Maximum number of panels that can be moved at a time\n * @ko 최대로 움직일 수 있는 패널의 개수\n * @type {number}\n * @default 1\n */\n public get count() { return this._count; }\n\n public set count(val: StrictControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = 1\n }: Partial = {}) {\n super();\n\n this._count = count;\n this._resetIndexRange();\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy() {\n super.destroy();\n\n this._resetIndexRange();\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const renderer = flicking.renderer;\n const controller = this._controller;\n const controlParams = camera.controlParams;\n const count = this._count;\n\n const activePanel = controller.state.animating\n ? camera.findNearestAnchor(camera.position)?.panel\n : this._activePanel;\n\n if (!activePanel) {\n controller.update(controlParams);\n this._resetIndexRange();\n return this;\n }\n\n const cameraRange = controlParams.range;\n const currentPos = activePanel.position;\n const currentIndex = activePanel.index;\n const panelCount = renderer.panelCount;\n\n let prevPanelIndex = currentIndex - count;\n let nextPanelIndex = currentIndex + count;\n\n if (prevPanelIndex < 0) {\n prevPanelIndex = flicking.circularEnabled\n ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount)\n : clamp(prevPanelIndex, 0, panelCount - 1);\n }\n if (nextPanelIndex >= panelCount) {\n nextPanelIndex = flicking.circularEnabled\n ? nextPanelIndex % panelCount\n : clamp(nextPanelIndex, 0, panelCount - 1);\n }\n\n const prevPanel = renderer.panels[prevPanelIndex];\n const nextPanel = renderer.panels[nextPanelIndex];\n\n let prevPos = Math.max(prevPanel.position, cameraRange.min);\n let nextPos = Math.min(nextPanel.position, cameraRange.max);\n\n if (prevPos > currentPos) {\n prevPos -= camera.rangeDiff;\n }\n if (nextPos < currentPos) {\n nextPos += camera.rangeDiff;\n }\n\n controlParams.range = {\n min: prevPos,\n max: nextPos\n };\n\n if (controlParams.circular) {\n if (controlParams.position < prevPos) {\n controlParams.position += camera.rangeDiff;\n }\n\n if (controlParams.position > nextPos) {\n controlParams.position -= camera.rangeDiff;\n }\n }\n\n controlParams.circular = false;\n controller.update(controlParams);\n\n this._indexRange = {\n min: prevPanel.index,\n max: nextPanel.index\n };\n\n return this;\n }\n\n public async moveToPanel(panel: Panel, options: Parameters[1]): Promise {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const controller = this._controller;\n\n controller.update(camera.controlParams);\n\n return super.moveToPanel(panel, options);\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const currentPanel = this._nextPanel ?? this._activePanel;\n const axesRange = this._controller.range;\n const indexRange = this._indexRange;\n const cameraRange = camera.range;\n const state = this._controller.state;\n\n const clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtPosition || !currentPanel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const prevPos = currentPanel.position;\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n\n const isOverThreshold = Math.abs(posDelta) >= flicking.threshold;\n const adjacentAnchor = (position > prevPos)\n ? camera.getNextAnchor(anchorAtPosition)\n : camera.getPrevAnchor(anchorAtPosition);\n\n let targetPos: number;\n let targetPanel: Panel;\n\n const anchors = camera.anchorPoints;\n const firstAnchor = anchors[0];\n const lastAnchor = anchors[anchors.length - 1];\n\n const shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max);\n const shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max);\n\n const isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max\n ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max)\n : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max);\n\n if (shouldBounceToFirst || shouldBounceToLast) {\n // In bounce area\n const targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor;\n\n targetPanel = targetAnchor.panel;\n targetPos = targetAnchor.position;\n } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) {\n // Move to anchor at position\n targetPanel = anchorAtPosition.panel;\n targetPos = anchorAtPosition.position;\n } else if (isOverThreshold && isAdjacent) {\n // Move to adjacent anchor\n targetPanel = adjacentAnchor!.panel;\n targetPos = adjacentAnchor!.position;\n } else {\n // Fallback to nearest panel from current camera\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n if (!anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n\n return this._animateToPosition({\n position: targetPos,\n duration,\n newActivePanel: targetPanel,\n axesEvent\n });\n }\n\n public setActive = (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => {\n super.setActive(newActivePanel, prevActivePanel, isTrusted);\n this.updateInput();\n };\n\n private _resetIndexRange() {\n this._indexRange = { min: 0, max: 0 };\n }\n}\n\nexport default StrictControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Control from \"./Control\";\nimport SnapControl, { SnapControlOptions } from \"./SnapControl\";\nimport FreeControl, { FreeControlOptions } from \"./FreeControl\";\nimport StrictControl, { StrictControlOptions } from \"./StrictControl\";\nimport AxesController from \"./AxesController\";\nimport State from \"./states/State\";\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport StateMachine from \"./StateMachine\";\n\nexport {\n Control,\n SnapControl,\n FreeControl,\n StrictControl,\n AxesController,\n State,\n IdleState,\n HoldingState,\n DraggingState,\n AnimatingState,\n DisabledState,\n StateMachine\n};\n\nexport type {\n SnapControlOptions,\n FreeControlOptions,\n StrictControlOptions\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { clamp } from \"../../utils\";\n\n/**\n * A mode of camera\n */\nabstract class CameraMode {\n protected _flicking: Flicking;\n\n /** */\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public abstract checkAvailability(): boolean;\n public abstract getRange(): { min: number; max: number };\n\n public getAnchors(): AnchorPoint[] {\n const panels = this._flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n const anchorsIncludingPosition = anchors.filter(anchor => anchor.panel.includePosition(position, true));\n\n return anchorsIncludingPosition.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n let prevDist = Infinity;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.abs(anchor.position - position);\n\n if (dist > prevDist) {\n // Return previous anchor\n return anchors[anchorIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return anchors[anchors.length - 1];\n }\n\n public clampToReachablePosition(position: number): number {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n return clamp(position, range.min, range.max);\n }\n\n public getCircularOffset(): number {\n return 0;\n }\n\n public canReach(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n if (panel.removed) return false;\n\n const panelPos = panel.position;\n\n return panelPos >= range.min && panelPos <= range.max;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const visibleRange = camera.visibleRange;\n // Should not include margin, as we don't declare what the margin is visible as what the panel is visible.\n return panel.isVisibleOnRange(visibleRange.min, visibleRange.max);\n }\n}\n\nexport default CameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport CameraMode from \"./CameraMode\";\n\nclass LinearCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n // It's always available\n return true;\n }\n\n public getRange(): { min: number; max: number } {\n const renderer = this._flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n return { min: firstPanel?.position ?? 0, max: lastPanel?.position ?? 0 };\n }\n}\n\nexport default LinearCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { DIRECTION } from \"../../const/external\";\nimport { circulatePosition } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\n/**\n * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop\n * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드\n */\nclass CircularCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n if (panels.length <= 0) {\n return false;\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n const visibleSize = flicking.camera.size;\n const panelSizeSum = lastPanelNext - firstPanelPrev;\n\n const canSetCircularMode = panels\n .every(panel => panelSizeSum - panel.size >= visibleSize);\n\n return canSetCircularMode;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return { min: 0, max: 0 };\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n return { min: firstPanelPrev, max: lastPanelNext };\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n const camRange = camera.range;\n let minDist = Infinity;\n let minDistIndex = -1;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.min(\n Math.abs(anchor.position - position),\n Math.abs(anchor.position - camRange.min + camRange.max - position),\n Math.abs(position - camRange.min + camRange.max - anchor.position)\n );\n\n if (dist < minDist) {\n minDist = dist;\n minDistIndex = anchorIdx;\n }\n }\n\n // Return last anchor\n return anchors[minDistIndex];\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n const rangeDiff = camera.rangeDiff;\n const anchorCount = anchors.length;\n const positionInRange = circulatePosition(position, range.min, range.max);\n\n let anchorInRange: AnchorPoint | null = super.findAnchorIncludePosition(positionInRange);\n\n if (anchorCount > 0 && (position === range.min || position === range.max)) {\n const possibleAnchors = [\n anchorInRange,\n new AnchorPoint({\n index: 0,\n position: anchors[0].position + rangeDiff,\n panel: anchors[0].panel\n }),\n new AnchorPoint({\n index: anchorCount - 1,\n position: anchors[anchorCount - 1].position - rangeDiff,\n panel: anchors[anchorCount - 1].panel\n })\n ].filter(anchor => !!anchor) as AnchorPoint[];\n\n anchorInRange = possibleAnchors.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n if (!anchorInRange) return null;\n\n if (position < range.min) {\n const loopCount = -Math.floor((range.min - position) / rangeDiff) - 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n } else if (position > range.max) {\n const loopCount = Math.floor((position - range.max) / rangeDiff) + 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n }\n\n return anchorInRange;\n }\n\n public getCircularOffset(): number {\n const flicking = this._flicking;\n const camera = flicking.camera;\n\n if (!camera.circularEnabled) return 0;\n\n const toggled = flicking.panels.filter(panel => panel.toggled);\n const toggledPrev = toggled.filter(panel => panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = toggled.filter(panel => panel.toggleDirection === DIRECTION.NEXT);\n\n return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext);\n }\n\n public clampToReachablePosition(position: number): number {\n // Basically all position is reachable for circular camera\n return position;\n }\n\n public canReach(panel: Panel): boolean {\n if (panel.removed) return false;\n\n // Always reachable on circular mode\n return true;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n const rangeDiff = camera.rangeDiff;\n const visibleRange = camera.visibleRange;\n const visibleInCurrentRange = super.canSee(panel);\n\n // Check looped visible area for circular case\n if (visibleRange.min < range.min) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff);\n } else if (visibleRange.max > range.max) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff);\n }\n\n return visibleInCurrentRange;\n }\n\n private _calcPanelAreaSum(panels: Panel[]) {\n return panels.reduce((sum: number, panel: Panel) => sum + panel.sizeIncludingMargin, 0);\n }\n}\n\nexport default CircularCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport Panel from \"../../core/panel/Panel\";\nimport { parseAlign } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\nclass BoundCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return false;\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n return isBiggerThanViewport;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const alignPos = flicking.camera.alignPosition;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return { min: 0, max: 0 };\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n const firstPos = firstPanelPrev + alignPos;\n const lastPos = lastPanelNext - viewportSize + alignPos;\n\n if (isBiggerThanViewport) {\n return { min: firstPos, max: lastPos };\n } else {\n const align = flicking.camera.align;\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n const pos = firstPos + parseAlign(alignVal, lastPos - firstPos);\n\n return { min: pos, max: pos };\n }\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const camera = flicking.camera;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return [];\n }\n\n const range = flicking.camera.range;\n const reachablePanels = panels.filter(panel => camera.canReach(panel));\n\n if (reachablePanels.length > 0) {\n const shouldPrependBoundAnchor = reachablePanels[0].position !== range.min;\n const shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max;\n const indexOffset = shouldPrependBoundAnchor ? 1 : 0;\n\n const newAnchors = reachablePanels.map((panel, idx) => new AnchorPoint({\n index: idx + indexOffset,\n position: panel.position,\n panel\n }));\n\n if (shouldPrependBoundAnchor) {\n newAnchors.splice(0, 0, new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panels[reachablePanels[0].index - 1]\n }));\n }\n\n if (shouldAppendBoundAnchor) {\n newAnchors.push(new AnchorPoint({\n index: newAnchors.length,\n position: range.max,\n panel: panels[reachablePanels[reachablePanels.length - 1].index + 1]\n }));\n }\n\n return newAnchors;\n } else if (range.min !== range.max) {\n // There're more than 2 panels\n const nearestPanelAtMin = this._findNearestPanel(range.min, panels);\n const panelAtMin = nearestPanelAtMin.index === panels.length - 1\n ? nearestPanelAtMin.prev()!\n : nearestPanelAtMin;\n const panelAtMax = panelAtMin.next()!;\n\n return [\n new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panelAtMin\n }),\n new AnchorPoint({\n index: 1,\n position: range.max,\n panel: panelAtMax\n })\n ];\n } else {\n return [new AnchorPoint({\n index: 0,\n position: range.min,\n panel: this._findNearestPanel(range.min, panels)\n })];\n }\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n if (position <= range.min) {\n return anchors[0];\n } else if (position >= range.max) {\n return anchors[anchors.length - 1];\n } else {\n return super.findAnchorIncludePosition(position);\n }\n }\n\n private _findNearestPanel(pos: number, panels: Panel[]): Panel {\n let prevDist = Infinity;\n for (let panelIdx = 0; panelIdx < panels.length; panelIdx++) {\n const panel = panels[panelIdx];\n const dist = Math.abs(panel.position - pos);\n\n if (dist > prevDist) {\n // Return previous anchor\n return panels[panelIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return panels[panels.length - 1];\n }\n}\n\nexport default BoundCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport * as ERROR from \"../const/error\";\nimport { ALIGN, CIRCULAR_FALLBACK, DIRECTION, EVENTS, ORDER } from \"../const/external\";\nimport { checkExistence, find, getFlickingAttached, getProgress, getStyle, includes, parseAlign, toArray } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\nimport { CameraMode, BoundCameraMode, CircularCameraMode, LinearCameraMode } from \"./mode\";\n\nexport interface CameraOptions {\n align: FlickingOptions[\"align\"];\n}\n\n/**\n * A component that manages actual movement inside the viewport\n * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트\n */\nclass Camera {\n // Options\n private _align: FlickingOptions[\"align\"];\n\n // Internal states\n private _flicking: Flicking;\n private _mode: CameraMode;\n private _el: HTMLElement;\n private _transform: string;\n private _position: number;\n private _alignPos: number;\n private _offset: number;\n private _circularOffset: number;\n private _circularEnabled: boolean;\n private _range: { min: number; max: number };\n private _visiblePanels: Panel[];\n private _anchors: AnchorPoint[];\n private _needPanelTriggered: { prev: boolean; next: boolean };\n private _panelOrder: ValueOf;\n\n // Internal states getter\n /**\n * The camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n /**\n * An array of the child elements of the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열\n * @type {HTMLElement[]}\n * @readonly\n */\n public get children() { return toArray(this._el.children) as HTMLElement[]; }\n /**\n * Current position of the camera\n * @ko Camera의 현재 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._position; }\n /**\n * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at\n * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option\n * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다.\n * @type {number}\n * @default 0\n * @readonly\n */\n public get offset() { return this._offset - this._circularOffset; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._circularEnabled; }\n /**\n * A current camera mode\n * @type {CameraMode}\n * @readonly\n */\n public get mode() { return this._mode; }\n /**\n * A range that Camera's {@link Camera#position position} can reach\n * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} max A maximum position최대 위치\n * @readonly\n */\n public get range() { return this._range; }\n /**\n * A difference between Camera's minimum and maximum position that can reach\n * @ko Camera가 도달 가능한 최소/최대 좌표의 차이\n * @type {number}\n * @readonly\n */\n public get rangeDiff() { return this._range.max - this._range.min; }\n /**\n * An array of visible panels from the current position\n * @ko 현재 보이는 패널들의 배열\n * @type {Panel[]}\n * @readonly\n */\n public get visiblePanels() { return this._visiblePanels; }\n /**\n * A range of the visible area from the current position\n * @ko 현재 위치에서 보이는 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} min A maximum position최대 위치\n * @readonly\n */\n public get visibleRange() { return { min: this._position - this._alignPos, max: this._position - this._alignPos + this.size }; }\n /**\n * An array of {@link AnchorPoint}s that Camera can be stopped at\n * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록\n * @type {AnchorPoint[]}\n * @readonly\n */\n public get anchorPoints() { return this._anchors; }\n /**\n * A current parameters of the Camera for updating {@link AxesController}\n * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들\n * @type {ControlParams}\n * @readonly\n */\n public get controlParams() { return { range: this._range, position: this._position, circular: this._circularEnabled }; }\n /**\n * A Boolean value indicating whether Camera's over the minimum or maximum position reachable\n * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다\n * @type {boolean}\n * @readonly\n */\n public get atEdge() { return this._position <= this._range.min || this._position >= this._range.max; }\n /**\n * Return the size of the viewport\n * @ko 뷰포트 크기를 반환합니다\n * @type {number}\n * @readonly\n */\n public get size() {\n const flicking = this._flicking;\n return flicking\n ? flicking.horizontal\n ? flicking.viewport.width\n : flicking.viewport.height\n : 0;\n }\n\n /**\n * Return the camera's position progress from the first panel to last panel\n * Range is from 0 to last panel's index\n * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다\n * 범위는 0부터 마지막 패널의 인덱스까지입니다\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n const position = this._position + this._offset;\n const nearestAnchor = this.findNearestAnchor(this._position);\n\n if (!flicking || !nearestAnchor) {\n return NaN;\n }\n\n const nearestPanel = nearestAnchor.panel;\n const panelPos = nearestPanel.position + nearestPanel.offset;\n const bounceSize = flicking.control.controller.bounce!;\n\n const { min: prevRange, max: nextRange } = this.range;\n const rangeDiff = this.rangeDiff;\n\n if (position === panelPos) {\n return nearestPanel.index;\n }\n\n if (position < panelPos) {\n const prevPanel = nearestPanel.prev();\n let prevPosition = prevPanel\n ? prevPanel.position + prevPanel.offset\n : prevRange - bounceSize[0];\n\n // Looped\n if (prevPosition > panelPos) {\n prevPosition -= rangeDiff;\n }\n\n return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos);\n } else {\n const nextPanel = nearestPanel.next();\n let nextPosition = nextPanel\n ? nextPanel.position + nextPanel.offset\n : nextRange + bounceSize[1];\n\n // Looped\n if (nextPosition < panelPos) {\n nextPosition += rangeDiff;\n }\n\n return nearestPanel.index + getProgress(position, panelPos, nextPosition);\n }\n }\n\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성\n * @type {string}\n * @readonly\n */\n public get panelOrder() { return this._panelOrder; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element\n * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n }\n\n /** */\n public constructor(flicking: Flicking, {\n align = ALIGN.CENTER\n }: Partial = {}) {\n this._flicking = flicking;\n this._resetInternalValues();\n\n // Options\n this._align = align;\n }\n\n /**\n * Initialize Camera\n * @ko Camera를 초기화합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우\n * @return {this}\n */\n public init(): this {\n const viewportEl = this._flicking.viewport.element;\n\n checkExistence(viewportEl.firstElementChild, \"First element child of the viewport element\");\n this._el = viewportEl.firstElementChild as HTMLElement;\n this._checkTranslateSupport();\n\n this._updateMode();\n this.updatePanelOrder();\n\n return this;\n }\n\n /**\n * Destroy Camera and return to initial state\n * @ko Camera를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): this {\n this._resetInternalValues();\n return this;\n }\n\n /**\n * Move to the given position and apply CSS transform\n * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다\n * @param {number} pos A new position움직일 위치\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public lookAt(pos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const prevPos = this._position;\n\n this._position = pos;\n const toggled = this._togglePanels(prevPos, pos);\n this._refreshVisiblePanels();\n this._checkNeedPanel();\n this._checkReachEnd(prevPos, pos);\n\n if (toggled) {\n void flicking.renderer.render().then(() => {\n this.updateOffset();\n });\n } else {\n this.applyTransform();\n }\n }\n\n /**\n * Return a previous {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint}\n */\n public getPrevAnchor(anchor: AnchorPoint): AnchorPoint | null {\n if (!this._circularEnabled || anchor.index !== 0) {\n return this._anchors[anchor.index - 1] || null;\n } else {\n const anchors = this._anchors;\n const rangeDiff = this.rangeDiff;\n const lastAnchor = anchors[anchors.length - 1];\n\n return new AnchorPoint({\n index: lastAnchor.index,\n position: lastAnchor.position - rangeDiff,\n panel: lastAnchor.panel\n });\n }\n }\n\n /**\n * Return a next {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint}\n */\n public getNextAnchor(anchor: AnchorPoint): AnchorPoint | null {\n const anchors = this._anchors;\n\n if (!this._circularEnabled || anchor.index !== anchors.length - 1) {\n return anchors[anchor.index + 1] || null;\n } else {\n const rangeDiff = this.rangeDiff;\n const firstAnchor = anchors[0];\n\n return new AnchorPoint({\n index: firstAnchor.index,\n position: firstAnchor.position + rangeDiff,\n panel: firstAnchor.panel\n });\n }\n }\n\n /**\n * Return the camera's position progress in the panel below\n * Value is from 0 to 1 when the camera's inside panel\n * Value can be lower than 0 or bigger than 1 when it's in the margin area\n * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다\n * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다\n * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다\n */\n public getProgressInPanel(panel: Panel) {\n const panelRange = panel.range;\n\n return (this._position - panelRange.min) / (panelRange.max - panelRange.min);\n }\n\n /**\n * Return {@link AnchorPoint} that includes given position\n * If there's no {@link AnchorPoint} that includes the given position, return `null` instead\n * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다\n * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint}\n */\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n return this._mode.findAnchorIncludePosition(position);\n }\n\n /**\n * Return {@link AnchorPoint} nearest to given position\n * If there're no {@link AnchorPoint}s, return `null` instead\n * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다\n * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint}\n */\n public findNearestAnchor(position: number): AnchorPoint | null {\n return this._mode.findNearestAnchor(position);\n }\n\n /**\n * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel}\n * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다\n * @return {AnchorPoint | null}\n */\n public findActiveAnchor(): AnchorPoint | null {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!activePanel) return null;\n\n return find(this._anchors, anchor => anchor.panel.index === activePanel.index) ?? this.findNearestAnchor(activePanel.position);\n }\n\n /**\n * Clamp the given position between camera's range\n * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다\n * @param {number} position A position to clamp범위를 제한할 좌표\n * @return {number} A clamped position범위 제한된 좌표\n */\n public clampToReachablePosition(position: number): number {\n return this._mode.clampToReachablePosition(position);\n }\n\n /**\n * Check whether the given panel is inside of the Camera's range\n * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부\n */\n public canReach(panel: Panel): boolean {\n return this._mode.canReach(panel);\n }\n\n /**\n * Check whether the given panel element is visible at the current position\n * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부\n */\n public canSee(panel: Panel): boolean {\n return this._mode.canSee(panel);\n }\n\n /**\n * Update {@link Camera#range range} of Camera\n * @ko Camera의 {@link Camera#range range}를 업데이트합니다\n * @method\n * @abstract\n * @memberof Camera\n * @instance\n * @name updateRange\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public updateRange() {\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n this._updateMode();\n this._range = this._mode.getRange();\n\n panels.forEach(panel => panel.updateCircularToggleDirection());\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#alignPosition alignPosition}\n * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateAlignPos(): this {\n const align = this._align;\n\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n this._alignPos = parseAlign(alignVal, this.size);\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#anchorPoints anchorPoints}\n * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAnchors(): this {\n this._anchors = this._mode.getAnchors();\n\n return this;\n }\n\n /**\n * Update Viewport's height to active panel's height\n * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAdaptiveHeight() {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;\n\n flicking.viewport.setSize({\n height: activePanel.height\n });\n }\n\n /**\n * Update current offset of the camera\n * @ko 현재 카메라의 오프셋을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateOffset(): this {\n const flicking = getFlickingAttached(this._flicking);\n const position = this._position;\n const unRenderedPanels = flicking.panels.filter(panel => !panel.rendered);\n\n this._offset = unRenderedPanels\n .filter(panel => panel.position + panel.offset < position)\n .reduce((offset, panel) => offset + panel.sizeIncludingMargin, 0);\n\n this._circularOffset = this._mode.getCircularOffset();\n\n this.applyTransform();\n\n return this;\n }\n\n /**\n * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element\n * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다\n * @return {this}\n */\n public updatePanelOrder(): this {\n const flicking = getFlickingAttached(this._flicking);\n\n if (!flicking.horizontal) return this;\n\n const el = this._el;\n const direction = getStyle(el).direction;\n if (direction !== this._panelOrder) {\n this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR;\n if (flicking.initialized) {\n flicking.control.controller.updateDirection();\n }\n }\n\n return this;\n }\n\n /**\n * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again\n * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다\n * @chainable\n * @return {this}\n */\n public resetNeedPanelHistory(): this {\n this._needPanelTriggered = { prev: false, next: false };\n return this;\n }\n\n /**\n * Apply \"transform\" style with the current position to camera element\n * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다.\n * @return {this}\n */\n public applyTransform(): this {\n const el = this._el;\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n\n if (renderer.rendering || !flicking.initialized) return this;\n\n const actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;\n\n el.style[this._transform] = flicking.horizontal\n ? `translate(${this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition}px)`\n : `translate(0, ${-actualPosition}px)`;\n\n return this;\n }\n\n private _resetInternalValues() {\n this._position = 0;\n this._alignPos = 0;\n this._offset = 0;\n this._circularOffset = 0;\n this._circularEnabled = false;\n this._range = { min: 0, max: 0 };\n this._visiblePanels = [];\n this._anchors = [];\n this._needPanelTriggered = { prev: false, next: false };\n }\n\n private _refreshVisiblePanels() {\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n const newVisiblePanels = panels.filter(panel => this.canSee(panel));\n const prevVisiblePanels = this._visiblePanels;\n this._visiblePanels = newVisiblePanels;\n\n const added: Panel[] = newVisiblePanels.filter(panel => !includes(prevVisiblePanels, panel));\n const removed: Panel[] = prevVisiblePanels.filter(panel => !includes(newVisiblePanels, panel));\n\n if (added.length > 0 || removed.length > 0) {\n void flicking.renderer.render().then(() => {\n flicking.trigger(new ComponentEvent(EVENTS.VISIBLE_CHANGE, {\n added,\n removed,\n visiblePanels: newVisiblePanels\n }));\n });\n }\n }\n\n private _checkNeedPanel(): void {\n const needPanelTriggered = this._needPanelTriggered;\n\n if (needPanelTriggered.prev && needPanelTriggered.next) return;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n if (!needPanelTriggered.prev) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n if (!needPanelTriggered.next) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n\n return;\n }\n\n const cameraPosition = this._position;\n const cameraSize = this.size;\n const cameraRange = this._range;\n const needPanelThreshold = flicking.needPanelThreshold;\n\n const cameraPrev = cameraPosition - this._alignPos;\n const cameraNext = cameraPrev + cameraSize;\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n\n if (!needPanelTriggered.prev) {\n const firstPanelPrev = firstPanel.range.min;\n\n if (cameraPrev <= (firstPanelPrev + needPanelThreshold) || cameraPosition <= (cameraRange.min + needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n }\n\n if (!needPanelTriggered.next) {\n const lastPanelNext = lastPanel.range.max;\n\n if (cameraNext >= (lastPanelNext - needPanelThreshold) || cameraPosition >= (cameraRange.max - needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n }\n }\n\n private _checkReachEnd(prevPos: number, newPos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const range = this._range;\n\n const wasBetweenRange = prevPos > range.min && prevPos < range.max;\n const isBetweenRange = newPos > range.min && newPos < range.max;\n\n if (!wasBetweenRange || isBetweenRange) return;\n\n const direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT;\n\n flicking.trigger(new ComponentEvent(EVENTS.REACH_EDGE, {\n direction\n }));\n }\n\n private _checkTranslateSupport = () => {\n const transforms = [\"webkitTransform\", \"msTransform\", \"MozTransform\", \"OTransform\", \"transform\"];\n\n const supportedStyle = document.documentElement.style;\n let transformName = \"\";\n for (const prefixedTransform of transforms) {\n if (prefixedTransform in supportedStyle) {\n transformName = prefixedTransform;\n }\n }\n\n if (!transformName) {\n throw new FlickingError(ERROR.MESSAGE.TRANSFORM_NOT_SUPPORTED, ERROR.CODE.TRANSFORM_NOT_SUPPORTED);\n }\n\n this._transform = transformName;\n };\n\n private _updateMode() {\n const flicking = getFlickingAttached(this._flicking);\n\n if (flicking.circular) {\n const circularMode = new CircularCameraMode(flicking);\n const canSetCircularMode = circularMode.checkAvailability();\n\n if (canSetCircularMode) {\n this._mode = circularMode;\n } else {\n const fallbackMode = flicking.circularFallback;\n\n this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n }\n\n this._circularEnabled = canSetCircularMode;\n } else {\n this._mode = flicking.bound\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n this._circularEnabled = false;\n }\n }\n\n private _togglePanels(prevPos: number, pos: number): boolean {\n if (pos === prevPos) return false;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n const toggled = panels.map(panel => panel.toggle(prevPos, pos));\n\n return toggled.some(isToggled => isToggled);\n }\n}\n\nexport default Camera;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Camera, { CameraOptions } from \"./Camera\";\n\nexport {\n Camera\n};\n\nexport type {\n CameraOptions\n};\n\nexport * from \"./mode\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\nimport ImReady from \"@egjs/imready\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { ALIGN, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached, getMinusCompensatedIndex, includes, parsePanelAlign } from \"../utils\";\n\nimport RenderingStrategy from \"./strategy/RenderingStrategy\";\n\nexport interface RendererOptions {\n align?: FlickingOptions[\"align\"];\n strategy: RenderingStrategy;\n}\n\n/**\n * A component that manages {@link Panel} and its elements\n * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트\n */\nabstract class Renderer {\n // Internal States\n protected _flicking: Flicking | null;\n protected _panels: Panel[];\n protected _rendering: boolean;\n\n // Options\n protected _align: NonNullable;\n protected _strategy: RendererOptions[\"strategy\"];\n\n // Internal states Getter\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._panels; }\n /**\n * A boolean value indicating whether rendering is in progress\n * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부\n * @type {boolean}\n * @readonly\n * @internal\n */\n public get rendering() { return this._rendering; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._panels.length; }\n /**\n * @internal\n */\n public get strategy() { return this._strategy; }\n\n // Options Getter\n /**\n * A {@link Panel}'s {@link Panel#align align} value that applied to all panels\n * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: NonNullable) {\n this._align = val;\n\n const panelAlign = parsePanelAlign(val);\n this._panels.forEach(panel => { panel.align = panelAlign; });\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {Constants.ALIGN | string | number} [options.align=\"center\"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값\n * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈)\n */\n public constructor({\n align = ALIGN.CENTER,\n strategy\n }: RendererOptions) {\n this._flicking = null;\n this._panels = [];\n this._rendering = false;\n\n // Bind options\n this._align = align;\n this._strategy = strategy;\n }\n\n /**\n * Render panel elements inside the camera element\n * @ko 패널 엘리먼트들을 카메라 엘리먼트 내부에 렌더링합니다\n * @method\n * @abstract\n * @memberof Renderer\n * @instance\n * @name render\n * @chainable\n * @return {this}\n */\n public abstract render(): Promise;\n\n protected abstract _collectPanels(): void;\n protected abstract _createPanel(el: any, options: Omit): Panel;\n\n /**\n * Initialize Renderer\n * @ko Renderer를 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._collectPanels();\n\n return this;\n }\n\n /**\n * Destroy Renderer and return to initial state\n * @ko Renderer를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._flicking = null;\n this._panels = [];\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n */\n public getPanel(index: number): Panel | null {\n return this._panels[index] || null;\n }\n\n public forceRenderAllPanels(): Promise {\n this._panels.forEach(panel => panel.markForShow());\n\n return Promise.resolve();\n }\n\n /**\n * Update all panel sizes\n * @ko 모든 패널의 크기를 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updatePanelSize(): this {\n const flicking = getFlickingAttached(this._flicking);\n const panels = this._panels;\n\n if (panels.length <= 0) return this;\n\n if (flicking.panelsPerView > 0) {\n const firstPanel = panels[0];\n firstPanel.resize();\n\n this._updatePanelSizeByGrid(firstPanel, panels);\n } else {\n flicking.panels.forEach(panel => panel.resize());\n }\n\n return this;\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {Array} items An array of items to insert추가할 아이템들의 배열\n * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열\n * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n */\n public batchInsert(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsInserted = this.batchInsertDefer(...items);\n\n if (allPanelsInserted.length <= 0) return [];\n\n this.updateAfterPanelChange(allPanelsInserted, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchInsertDefer(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const prevFirstPanel = panels[0];\n const align = parsePanelAlign(this._align);\n\n const allPanelsInserted = items.reduce((addedPanels, item) => {\n const insertingIdx = getMinusCompensatedIndex(item.index, panels.length);\n const panelsPushed = panels.slice(insertingIdx);\n const panelsInserted = item.elements.map((el, idx) => this._createPanel(el, { index: insertingIdx + idx, align, flicking }));\n\n panels.splice(insertingIdx, 0, ...panelsInserted);\n\n if (item.hasDOMInElements) {\n // Insert the actual elements as camera element's children\n this._insertPanelElements(panelsInserted, panelsPushed[0] ?? null);\n }\n\n // Resize the newly added panels\n if (flicking.panelsPerView > 0) {\n const firstPanel = prevFirstPanel || panelsInserted[0].resize();\n\n this._updatePanelSizeByGrid(firstPanel, panelsInserted);\n } else {\n panelsInserted.forEach(panel => panel.resize());\n }\n\n // Update panel indexes & positions\n panelsPushed.forEach(panel => {\n panel.increaseIndex(panelsInserted.length);\n panel.updatePosition();\n });\n\n return [...addedPanels, ...panelsInserted];\n }, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {Array} items An array of items to remove제거할 아이템들의 배열\n * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스\n * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다\n * @return An array of removed panels제거된 패널들의 배열\n */\n public batchRemove(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsRemoved = this.batchRemoveDefer(...items);\n\n if (allPanelsRemoved.length <= 0) return [];\n\n this.updateAfterPanelChange([], allPanelsRemoved);\n\n return allPanelsRemoved;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchRemoveDefer(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const { control } = flicking;\n const activePanel = control.activePanel;\n\n const allPanelsRemoved = items.reduce((removed, item) => {\n const { index, deleteCount } = item;\n const removingIdx = getMinusCompensatedIndex(index, panels.length);\n\n const panelsPulled = panels.slice(removingIdx + deleteCount);\n const panelsRemoved = panels.splice(removingIdx, deleteCount);\n\n if (panelsRemoved.length <= 0) return [];\n\n // Update panel indexes & positions\n panelsPulled.forEach(panel => {\n panel.decreaseIndex(panelsRemoved.length);\n panel.updatePosition();\n });\n\n if (item.hasDOMInElements) {\n this._removePanelElements(panelsRemoved);\n }\n\n // Remove panel elements\n panelsRemoved.forEach(panel => panel.destroy());\n\n if (includes(panelsRemoved, activePanel)) {\n control.resetActive();\n }\n\n return [...removed, ...panelsRemoved];\n }, []);\n\n return allPanelsRemoved;\n }\n\n /**\n * @internal\n */\n public updateAfterPanelChange(panelsAdded: Panel[], panelsRemoved: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n const panels = this._panels;\n const activePanel = control.activePanel;\n\n // Update camera & control\n this._updateCameraAndControl();\n\n void this.render();\n\n if (!flicking.animating) {\n if (!activePanel || activePanel.removed) {\n if (panels.length <= 0) {\n // All panels removed\n camera.lookAt(0);\n } else {\n let targetIndex = activePanel?.index ?? 0;\n if (targetIndex > panels.length - 1) {\n targetIndex = panels.length - 1;\n }\n\n void control.moveToPanel(panels[targetIndex], {\n duration: 0\n }).catch(() => void 0);\n }\n } else {\n void control.moveToPanel(activePanel, {\n duration: 0\n }).catch(() => void 0);\n }\n }\n\n flicking.camera.updateOffset();\n\n if (panelsAdded.length > 0 || panelsRemoved.length > 0) {\n flicking.trigger(new ComponentEvent(EVENTS.PANEL_CHANGE, {\n added: panelsAdded,\n removed: panelsRemoved\n }));\n\n this.checkPanelContentsReady([\n ...panelsAdded,\n ...panelsRemoved\n ]);\n }\n }\n\n /**\n * @internal\n */\n public checkPanelContentsReady(checkingPanels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const resizeOnContentsReady = flicking.resizeOnContentsReady;\n const panels = this._panels;\n\n if (!resizeOnContentsReady || flicking.virtualEnabled) return;\n\n const hasContents = (panel: Panel) => panel.element && !!panel.element.querySelector(\"img, video\");\n checkingPanels = checkingPanels.filter(panel => hasContents(panel));\n\n if (checkingPanels.length <= 0) return;\n\n const contentsReadyChecker = new ImReady();\n\n checkingPanels.forEach(panel => {\n panel.loading = true;\n });\n\n contentsReadyChecker.on(\"readyElement\", e => {\n if (!this._flicking) {\n // Renderer's destroy() is called before\n contentsReadyChecker.destroy();\n return;\n }\n\n const panel = checkingPanels[e.index];\n const camera = flicking.camera;\n const control = flicking.control;\n const prevProgressInPanel = control.activePanel\n ? camera.getProgressInPanel(control.activePanel)\n : 0;\n\n panel.loading = false;\n panel.resize();\n panels.slice(panel.index + 1).forEach(panelBehind => panelBehind.updatePosition());\n\n if (!flicking.initialized) return;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n\n if (control.animating) {\n // TODO: Need Axes update\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n });\n\n contentsReadyChecker.on(\"preReady\", e => {\n if (this._flicking) {\n void this.render();\n }\n\n if (e.readyCount === e.totalCount) {\n contentsReadyChecker.destroy();\n }\n });\n\n contentsReadyChecker.on(\"ready\", () => {\n if (this._flicking) {\n void this.render();\n }\n contentsReadyChecker.destroy();\n });\n\n contentsReadyChecker.check(checkingPanels.map(panel => panel.element));\n }\n\n protected _updateCameraAndControl() {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n camera.resetNeedPanelHistory();\n control.updateInput();\n }\n\n protected _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n }\n\n protected _updatePanelSizeByGrid(referencePanel: Panel, panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const panelsPerView = flicking.panelsPerView;\n\n if (panelsPerView <= 0) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"panelsPerView\", panelsPerView), ERROR.CODE.WRONG_OPTION);\n }\n if (panels.length <= 0) return;\n\n const viewportSize = flicking.camera.size;\n const gap = referencePanel.margin.prev + referencePanel.margin.next;\n\n const panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView;\n const panelSizeObj = flicking.horizontal\n ? { width: panelSize }\n : { height: panelSize };\n const firstPanelSizeObj = {\n size: panelSize,\n margin: referencePanel.margin,\n ...(!flicking.horizontal && { height: referencePanel.height})\n };\n\n if (!flicking.noPanelStyleOverride) {\n this._strategy.updatePanelSizes(flicking, panelSizeObj);\n }\n\n flicking.panels.forEach(panel => panel.resize(firstPanelSizeObj));\n }\n\n protected _removeAllChildsFromCamera() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove other elements\n while (cameraElement.firstChild) {\n cameraElement.removeChild(cameraElement.firstChild);\n }\n }\n\n protected _insertPanelElements(panels: Panel[], nextSibling: Panel | null = null) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const cameraElement = camera.element;\n const nextSiblingElement = nextSibling?.element || null;\n const fragment = document.createDocumentFragment();\n\n panels.forEach(panel => fragment.appendChild(panel.element));\n cameraElement.insertBefore(fragment, nextSiblingElement);\n }\n\n protected _removePanelElements(panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n panels.forEach(panel => {\n cameraElement.removeChild(panel.element);\n });\n }\n\n protected _afterRender() {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.applyTransform();\n }\n}\n\nexport default Renderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { getFlickingAttached, toArray } from \"../utils\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n *\n */\nclass VanillaRenderer extends Renderer {\n // eslint-disable-next-line @typescript-eslint/require-await\n public async render() {\n const flicking = getFlickingAttached(this._flicking);\n const strategy = this._strategy;\n\n strategy.updateRenderingPanels(flicking);\n strategy.renderPanels(flicking);\n\n this._resetPanelElementOrder();\n this._afterRender();\n }\n\n protected _collectPanels() {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._removeAllTextNodes();\n this._panels = this._strategy.collectPanels(flicking, camera.children);\n }\n\n protected _createPanel(el: HTMLElement, options: Omit): Panel {\n return this._strategy.createPanel(el, options);\n }\n\n private _resetPanelElementOrder() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraEl = flicking.camera.element;\n\n // We're using reversed panels here as last panel should be the last element of camera element\n const reversedElements = this._strategy\n .getRenderingElementsByOrder(flicking)\n .reverse();\n\n reversedElements.forEach((el, idx) => {\n const nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null;\n\n if (el.nextElementSibling !== nextEl) {\n cameraEl.insertBefore(el, nextEl);\n }\n });\n }\n\n private _removeAllTextNodes() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove all text nodes in the camera element\n toArray(cameraElement.childNodes).forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n cameraElement.removeChild(node);\n }\n });\n }\n}\n\nexport default VanillaRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n * @internal\n */\nabstract class ExternalRenderer extends Renderer {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n protected _removePanelElements(panels: Panel[]): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n\n protected _removeAllChildsFromCamera(): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n /* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\nexport default ExternalRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { getElementSize, getProgress, getStyle, parseAlign, setSize } from \"../../utils\";\nimport { ALIGN, DIRECTION } from \"../../const/external\";\nimport { LiteralUnion, ValueOf } from \"../../type/internal\";\n\nimport ElementProvider from \"./provider/ElementProvider\";\n\nexport interface PanelOptions {\n index: number;\n align: LiteralUnion> | number;\n flicking: Flicking;\n elementProvider: ElementProvider;\n}\n\n/**\n * A slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass Panel {\n // Internal States\n protected _flicking: Flicking;\n protected _elProvider: ElementProvider;\n protected _index: number;\n protected _pos: number;\n protected _size: number;\n protected _height: number;\n protected _margin: { prev: number; next: number };\n protected _alignPos: number; // Actual align pos\n protected _rendered: boolean;\n protected _removed: boolean;\n protected _loading: boolean;\n protected _toggleDirection: ValueOf;\n protected _toggled: boolean;\n protected _togglePosition: number;\n\n // Options\n protected _align: PanelOptions[\"align\"];\n\n // Internal States Getter\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n /**\n * @internal\n * @readonly\n */\n public get elementProvider() { return this._elProvider; }\n /**\n * Index of the panel\n * @ko 패널의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of the panel, including {@link Panel#alignPosition alignPosition}\n * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos + this._alignPos; }\n /**\n * Cached size of the panel element\n * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else\n * @ko 패널 엘리먼트의 캐시된 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다\n * @type {number}\n * @readonly\n */\n public get size() { return this._size; }\n /**\n * Panel's size including CSS `margin`\n * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else\n * @ko CSS `margin`을 포함한 패널의 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다\n * @type {number}\n * @readonly\n */\n public get sizeIncludingMargin() { return this._size + this._margin.prev + this._margin.next; }\n /**\n * Height of the panel element\n * @ko 패널 엘리먼트의 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height; }\n /**\n * Cached CSS `margin` value of the panel element\n * @ko 패널 엘리먼트의 CSS `margin` 값\n * @type {object}\n * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값\n * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값\n * @readonly\n */\n public get margin() { return this._margin; }\n /**\n * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at\n * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * A value indicating whether the panel's {@link Flicking#remove remove}d\n * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get removed() { return this._removed; }\n /**\n * A value indicating whether the panel's element is being rendered on the screen\n * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get rendered() { return this._rendered; }\n /**\n * A value indicating whether the panel's image/video is not loaded and waiting for resize\n * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get loading() { return this._loading; }\n /**\n * Panel element's range of the bounding box\n * @ko 패널 엘리먼트의 Bounding box 범위\n * @type {object}\n * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false)\n * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false)\n * @readonly\n */\n public get range() { return { min: this._pos, max: this._pos + this._size }; }\n /**\n * A value indicating whether the panel's position is toggled by circular behavior\n * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get toggled() { return this._toggled; }\n /**\n * A direction where the panel's position is toggled\n * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향\n * @type {DIRECTION}\n * @readonly\n */\n public get toggleDirection() { return this._toggleDirection; }\n /**\n * Actual position offset determined by {@link Panel#order}\n * @ko {@link Panel#order}에 의한 실제 위치 변경값\n * @type {number}\n * @readonly\n */\n public get offset() {\n const toggleDirection = this._toggleDirection;\n const cameraRangeDiff = this._flicking.camera.rangeDiff;\n\n return toggleDirection === DIRECTION.NONE || !this._toggled\n ? 0\n : toggleDirection === DIRECTION.PREV\n ? -cameraRangeDiff\n : cameraRangeDiff;\n }\n\n /**\n * Progress of movement between previous or next panel relative to current panel\n * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n\n return this.index - flicking.camera.progress;\n }\n\n /**\n * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1)\n * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1)\n * @type {number}\n * @readonly\n */\n public get outsetProgress() {\n const position = this.position + this.offset;\n const alignPosition = this._alignPos;\n const camera = this._flicking.camera;\n const camPos = camera.position;\n\n if (camPos === position) {\n return 0;\n }\n\n if (camPos < position) {\n const disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition;\n\n return -getProgress(camPos, position, disappearPosNext);\n } else {\n const disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition);\n\n return 1 - getProgress(camPos, disappearPosPrev, position);\n }\n }\n\n /**\n * Percentage of area where panel is visible in the viewport\n * @ko 뷰포트 안에서 패널이 보이는 영역의 비율\n * @type {number}\n * @readonly\n */\n public get visibleRatio() {\n const range = this.range;\n const size = this._size;\n const offset = this.offset;\n const visibleRange = this._flicking.camera.visibleRange;\n\n const checkingRange = {\n min: range.min + offset,\n max: range.max + offset\n };\n\n if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) {\n return 0;\n }\n\n let visibleSize = size;\n\n if (visibleRange.min > checkingRange.min) {\n visibleSize -= visibleRange.min - checkingRange.min;\n }\n if (visibleRange.max < checkingRange.max) {\n visibleSize -= checkingRange.max - visibleRange.max;\n }\n\n return visibleSize / size;\n }\n\n public set loading(val: boolean) { this._loading = val; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element\n * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: PanelOptions[\"align\"]) {\n this._align = val;\n this._updateAlignPos();\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스\n */\n public constructor({\n index,\n align,\n flicking,\n elementProvider\n }: PanelOptions) {\n this._index = index;\n this._flicking = flicking;\n this._elProvider = elementProvider;\n\n this._align = align;\n\n this._removed = false;\n this._rendered = true;\n this._loading = false;\n this._resetInternalStates();\n }\n\n /**\n * Mark panel element to be appended on the camera element\n * @internal\n */\n public markForShow() {\n this._rendered = true;\n this._elProvider.show(this._flicking);\n }\n\n /**\n * Mark panel element to be removed from the camera element\n * @internal\n */\n public markForHide() {\n this._rendered = false;\n this._elProvider.hide(this._flicking);\n }\n\n /**\n * Update size of the panel\n * @ko 패널의 크기를 갱신합니다\n * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보\n * @chainable\n * @return {this}\n */\n public resize(cached?: {\n size: number;\n height?: number;\n margin: { prev: number; next: number };\n }): this {\n const el = this.element;\n const flicking = this._flicking;\n const {\n horizontal,\n useFractionalSize\n } = flicking;\n\n if (cached) {\n this._size = cached.size;\n this._margin = { ...cached.margin };\n this._height = cached.height ?? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: getStyle(el)\n });\n } else {\n const elStyle = getStyle(el);\n\n this._size = getElementSize({\n el,\n horizontal,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n });\n\n this._margin = horizontal\n ? {\n prev: parseFloat(elStyle.marginLeft || \"0\"),\n next: parseFloat(elStyle.marginRight || \"0\")\n } : {\n prev: parseFloat(elStyle.marginTop || \"0\"),\n next: parseFloat(elStyle.marginBottom || \"0\")\n };\n\n this._height = horizontal\n ? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n })\n : this._size;\n }\n\n this.updatePosition();\n this._updateAlignPos();\n\n return this;\n }\n\n /**\n * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property\n * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New panel size새 패널 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @chainable\n * @return {this}\n */\n public setSize(size: Partial<{\n width: number | string;\n height: number | string;\n }>): this {\n setSize(this.element, size);\n\n return this;\n }\n\n /**\n * Check whether the given element is inside of this panel's {@link Panel#element element}\n * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다\n * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement\n * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부\n */\n public contains(element: HTMLElement): boolean {\n return !!this.element?.contains(element);\n }\n\n /**\n * Reset internal state and set {@link Panel#removed removed} to `true`\n * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다.\n * @return {void}\n */\n public destroy(): void {\n this._resetInternalStates();\n this._removed = true;\n }\n\n /**\n * Check whether the given position is inside of this panel's {@link Panel#range range}\n * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다.\n * @param {number} pos A position to check확인하고자 하는 좌표\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부\n */\n public includePosition(pos: number, includeMargin: boolean = false): boolean {\n return this.includeRange(pos, pos, includeMargin);\n }\n\n /**\n * Check whether the given range is fully included in this panel's area (inclusive)\n * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부\n */\n public includeRange(min: number, max: number, includeMargin: boolean = false): boolean {\n const margin = this._margin;\n const panelRange = this.range;\n\n if (includeMargin) {\n panelRange.min -= margin.prev;\n panelRange.max += margin.next;\n }\n\n return max >= panelRange.min && min <= panelRange.max;\n }\n\n /**\n * Check whether the panel is visble in the given range (exclusive)\n * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부\n */\n public isVisibleOnRange(min: number, max: number): boolean {\n const panelRange = this.range;\n\n return max > panelRange.min && min < panelRange.max;\n }\n\n /**\n * Move {@link Camera} to this panel\n * @ko {@link Camera}를 이 패널로 이동합니다\n * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise\n */\n public focus(duration?: number) {\n return this._flicking.moveTo(this._index, duration);\n }\n\n /**\n * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel\n * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다\n * @returns {Panel | null} The previous panel이전 패널\n */\n public prev(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1)\n : renderer.getPanel(index - 1);\n }\n\n /**\n * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel\n * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다\n * @returns {Panel | null} The previous panel다음 패널\n */\n public next(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1)\n : renderer.getPanel(index + 1);\n }\n\n /**\n * Increase panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public increaseIndex(val: number): this {\n this._index += Math.max(val, 0);\n return this;\n }\n\n /**\n * Decrease panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public decreaseIndex(val: number): this {\n this._index -= Math.max(val, 0);\n return this;\n }\n\n /**\n * @internal\n */\n public updatePosition(): this {\n const prevPanel = this._flicking.renderer.panels[this._index - 1];\n\n this._pos = prevPanel\n ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev\n : this._margin.prev;\n\n return this;\n }\n\n /**\n * @internal\n * @return {boolean} toggled\n */\n public toggle(prevPos: number, newPos: number): boolean {\n const toggleDirection = this._toggleDirection;\n const togglePosition = this._togglePosition;\n\n if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false;\n\n const prevToggled = this._toggled;\n\n if (newPos > prevPos) {\n if (togglePosition >= prevPos && togglePosition <= newPos) {\n this._toggled = toggleDirection === DIRECTION.NEXT;\n }\n } else {\n if (togglePosition <= prevPos && togglePosition >= newPos) {\n this._toggled = toggleDirection !== DIRECTION.NEXT;\n }\n }\n\n return prevToggled !== this._toggled;\n }\n\n /**\n * @internal\n */\n public updateCircularToggleDirection(): this {\n const flicking = this._flicking;\n\n if (!flicking.circularEnabled) {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n this._toggled = false;\n return this;\n }\n\n const camera = flicking.camera;\n const camRange = camera.range;\n const camAlignPosition = camera.alignPosition;\n const camVisibleRange = camera.visibleRange;\n const camVisibleSize = camVisibleRange.max - camVisibleRange.min;\n\n const minimumVisible = camRange.min - camAlignPosition;\n const maximumVisible = camRange.max - camAlignPosition + camVisibleSize;\n\n const shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false);\n const shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false);\n\n this._toggled = false;\n if (shouldBeVisibleAtMin) {\n this._toggleDirection = DIRECTION.PREV;\n this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition;\n this.toggle(Infinity, camera.position);\n } else if (shouldBeVisibleAtMax) {\n this._toggleDirection = DIRECTION.NEXT;\n this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition;\n this.toggle(-Infinity, camera.position);\n } else {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n }\n\n return this;\n }\n\n private _updateAlignPos() {\n this._alignPos = parseAlign(this._align, this._size);\n }\n\n private _resetInternalStates() {\n this._size = 0;\n this._pos = 0;\n this._margin = { prev: 0, next: 0 };\n this._height = 0;\n this._alignPos = 0;\n this._toggled = false;\n this._togglePosition = 0;\n this._toggleDirection = DIRECTION.NONE;\n }\n}\n\nexport default Panel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel, { PanelOptions } from \"../../core/panel/Panel\";\nimport ElementProvider from \"../../core/panel/provider/ElementProvider\";\nimport { DIRECTION } from \"../../const/external\";\nimport { parsePanelAlign } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nexport interface NormalRenderingStrategyOptions {\n providerCtor: new (...args: any) => ElementProvider;\n}\n\n\nclass NormalRenderingStrategy implements RenderingStrategy {\n private _providerCtor: NormalRenderingStrategyOptions[\"providerCtor\"];\n\n public constructor({ providerCtor }: NormalRenderingStrategyOptions) {\n this._providerCtor = providerCtor;\n }\n\n public renderPanels() {\n // DO_NOTHING\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const renderedPanels = flicking.renderer.panels.filter(panel => panel.rendered);\n const toggledPrev = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.NEXT);\n const notToggled = renderedPanels.filter(panel => !panel.toggled);\n\n return [...toggledPrev, ...notToggled, ...toggledNext].map(panel => panel.index);\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const panels = flicking.panels;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => panels[index].element);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n if (flicking.renderOnlyVisible) {\n this._showOnlyVisiblePanels(flicking);\n } else {\n flicking.panels.forEach(panel => panel.markForShow());\n }\n }\n\n public collectPanels(\n flicking: Flicking,\n elements: any[]\n ) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return elements.map((el, index) => new Panel({\n index,\n elementProvider: new this._providerCtor(el),\n align,\n flicking\n }));\n }\n\n public createPanel(\n element: any,\n options: Omit\n ) {\n return new Panel({\n ...options,\n elementProvider: new this._providerCtor(element)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n\n private _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n}\n\nexport default NormalRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { DIRECTION } from \"../../const/external\";\nimport { circulateIndex } from \"../../utils\";\n\nimport Panel, { PanelOptions } from \"./Panel\";\nimport VirtualElementProvider from \"./provider/VirtualElementProvider\";\n\ninterface VirtualPanelOptions extends PanelOptions {\n elementProvider: VirtualElementProvider;\n}\n\n/**\n * An slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass VirtualPanel extends Panel {\n protected _elProvider: VirtualElementProvider;\n protected _cachedInnerHTML: string | null;\n\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n\n /**\n * Cached innerHTML by the previous render function\n * @ko 이전 렌더링에서 캐시된 innerHTML 정보\n * @type {string|null}\n * @readonly\n */\n public get cachedInnerHTML() { return this._cachedInnerHTML; }\n\n /**\n * An number for indexing which element it will be rendered on\n * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자\n * @type {number}\n * @readonly\n */\n public get elementIndex() {\n const flicking = this._flicking;\n const virtualElCount = flicking.panelsPerView + 1;\n const panelCount = flicking.panelCount;\n let index = this._index;\n\n if (this._toggled) {\n // To prevent element duplication\n index = this._toggleDirection === DIRECTION.NEXT\n ? index + panelCount\n : index - panelCount;\n }\n\n return circulateIndex(index, virtualElCount);\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n */\n public constructor(options: VirtualPanelOptions) {\n super(options);\n\n options.elementProvider.init(this);\n this._elProvider = options.elementProvider;\n this._cachedInnerHTML = null;\n }\n\n public cacheRenderResult(result: string) {\n this._cachedInnerHTML = result;\n }\n\n public uncacheRenderResult() {\n this._cachedInnerHTML = null;\n }\n\n public render() {\n const flicking = this._flicking;\n const { renderPanel, cache } = flicking.virtual;\n\n const element = this._elProvider.element;\n const newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index);\n\n if (newInnerHTML === element.innerHTML) return;\n\n element.innerHTML = newInnerHTML;\n\n if (cache) {\n this.cacheRenderResult(newInnerHTML);\n }\n }\n\n public increaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.increaseIndex(val);\n }\n\n public decreaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.decreaseIndex(val);\n }\n}\n\nexport default VirtualPanel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { PanelOptions } from \"../../core/panel/Panel\";\nimport VirtualPanel from \"../../core/panel/VirtualPanel\";\nimport VirtualElementProvider from \"../../core/panel/provider/VirtualElementProvider\";\nimport { parsePanelAlign, range, setSize } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nclass VirtualRenderingStrategy implements RenderingStrategy {\n public renderPanels(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = flicking.visiblePanels as VirtualPanel[];\n const invisibleIndexes = range(flicking.panelsPerView + 1);\n\n visiblePanels.forEach(panel => {\n const elementIndex = panel.elementIndex;\n\n panel.render();\n\n virtualManager.show(elementIndex);\n invisibleIndexes[elementIndex] = -1;\n });\n\n invisibleIndexes\n .filter(val => val >= 0)\n .forEach(idx => {\n virtualManager.hide(idx);\n });\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = [...flicking.visiblePanels]\n .filter(panel => panel.rendered)\n .sort((panel1, panel2) => {\n return (panel1.position + panel1.offset) - (panel2.position + panel2.offset);\n }) as VirtualPanel[];\n\n if (visiblePanels.length <= 0) return virtualManager.elements.map((_, idx) => idx);\n\n const visibleIndexes = visiblePanels.map(panel => panel.elementIndex);\n const invisibleIndexes = virtualManager.elements\n .map((el, idx) => ({ ...el, idx }))\n .filter(el => !el.visible)\n .map(el => el.idx);\n\n return [...visibleIndexes, ...invisibleIndexes];\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const elements = virtualManager.elements;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => elements[index].nativeElement);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else {\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n\n public collectPanels(flicking: Flicking) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return range(flicking.virtual.initialPanelCount).map(index => new VirtualPanel({\n index,\n elementProvider: new VirtualElementProvider(flicking),\n align,\n flicking\n }));\n }\n\n public createPanel(_el: any, options: PanelOptions) {\n return new VirtualPanel({\n ...options,\n elementProvider: new VirtualElementProvider(options.flicking)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.virtual.elements.forEach(el => {\n setSize(el.nativeElement, size);\n });\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n}\n\nexport default VirtualRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Renderer, { RendererOptions } from \"./Renderer\";\nimport VanillaRenderer from \"./VanillaRenderer\";\nimport ExternalRenderer from \"./ExternalRenderer\";\n\nexport * from \"./strategy\";\n\nexport {\n Renderer,\n VanillaRenderer,\n ExternalRenderer\n};\n\nexport type {\n RendererOptions\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Component, { ComponentEvent } from \"@egjs/component\";\n\nimport FlickingError from \"./core/FlickingError\";\nimport Viewport from \"./core/Viewport\";\nimport AutoResizer from \"./core/AutoResizer\";\nimport { Panel } from \"./core/panel\";\nimport { VanillaElementProvider } from \"./core/panel/provider\";\nimport VirtualManager, { VirtualOptions } from \"./core/VirtualManager\";\nimport { Control, SnapControl, SnapControlOptions, FreeControl, StrictControl, FreeControlOptions, StrictControlOptions } from \"./control\";\nimport { Camera } from \"./camera\";\nimport { Renderer, VanillaRenderer, ExternalRenderer, RendererOptions, NormalRenderingStrategy, VirtualRenderingStrategy } from \"./renderer\";\nimport { EVENTS, ALIGN, MOVE_TYPE, DIRECTION, CIRCULAR_FALLBACK } from \"./const/external\";\nimport * as ERROR from \"./const/error\";\nimport { findIndex, getElement, includes, parseElement } from \"./utils\";\nimport { HoldStartEvent, HoldEndEvent, MoveStartEvent, SelectEvent, MoveEvent, MoveEndEvent, WillChangeEvent, WillRestoreEvent, NeedPanelEvent, VisibleChangeEvent, ReachEdgeEvent, ReadyEvent, AfterResizeEvent, BeforeResizeEvent, ChangedEvent, RestoredEvent, PanelChangeEvent } from \"./type/event\";\nimport { LiteralUnion, ValueOf } from \"./type/internal\";\nimport { ElementLike, Plugin, Status, MoveTypeOptions } from \"./type/external\";\n\n/**\n * @interface\n */\nexport interface FlickingEvents {\n [EVENTS.READY]: ReadyEvent;\n [EVENTS.BEFORE_RESIZE]: BeforeResizeEvent;\n [EVENTS.AFTER_RESIZE]: AfterResizeEvent;\n [EVENTS.HOLD_START]: HoldStartEvent;\n [EVENTS.HOLD_END]: HoldEndEvent;\n [EVENTS.MOVE_START]: MoveStartEvent;\n [EVENTS.MOVE]: MoveEvent;\n [EVENTS.MOVE_END]: MoveEndEvent;\n [EVENTS.WILL_CHANGE]: WillChangeEvent;\n [EVENTS.CHANGED]: ChangedEvent;\n [EVENTS.WILL_RESTORE]: WillRestoreEvent;\n [EVENTS.RESTORED]: RestoredEvent;\n [EVENTS.SELECT]: SelectEvent;\n [EVENTS.NEED_PANEL]: NeedPanelEvent;\n [EVENTS.VISIBLE_CHANGE]: VisibleChangeEvent;\n [EVENTS.REACH_EDGE]: ReachEdgeEvent;\n [EVENTS.PANEL_CHANGE]: PanelChangeEvent;\n}\n\n/**\n * @interface\n */\nexport interface FlickingOptions {\n // UI / LAYOUT\n align: LiteralUnion> | number | { panel: number | string; camera: number | string };\n defaultIndex: number;\n horizontal: boolean;\n circular: boolean;\n circularFallback: LiteralUnion>;\n bound: boolean;\n adaptive: boolean;\n panelsPerView: number;\n noPanelStyleOverride: boolean;\n resizeOnContentsReady: boolean;\n nested: boolean;\n\n // EVENT\n needPanelThreshold: number;\n preventEventsBeforeInit: boolean;\n\n // ANIMATION\n deceleration: number;\n duration: number;\n easing: (x: number) => number;\n\n // INPUT\n inputType: string[];\n moveType: ValueOf | MoveTypeOptions>;\n threshold: number;\n interruptable: boolean;\n bounce: number | string | [number | string, number | string];\n iOSEdgeSwipeThreshold: number;\n preventClickOnDrag: boolean;\n preventDefaultOnDrag: boolean;\n disableOnInit: boolean;\n changeOnHold: boolean;\n\n // PERFORMANCE\n renderOnlyVisible: boolean;\n virtual: VirtualOptions | null;\n\n // OTHERS\n autoInit: boolean;\n autoResize: boolean;\n useResizeObserver: boolean;\n resizeDebounce: number;\n maxResizeDebounce: number;\n useFractionalSize: boolean;\n externalRenderer: ExternalRenderer | null;\n\n // @deprecated\n renderExternal: {\n renderer: new (options: RendererOptions) => ExternalRenderer;\n rendererOptions: RendererOptions;\n } | null;\n}\n\n/**\n * @extends Component\n * @support {\"ie\": \"9+(with polyfill)\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"4.X+\"}\n * @requires {@link https://github.com/naver/egjs-component|@egjs/component}\n * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}\n */\nclass Flicking extends Component {\n /**\n * Version info string\n * @ko 버전정보 문자열\n * @type {string}\n * @readonly\n * @example\n * ```ts\n * Flicking.VERSION; // ex) 4.0.0\n * ```\n */\n public static VERSION = \"#__VERSION__#\";\n\n // Core components\n private _viewport: Viewport;\n private _autoResizer: AutoResizer;\n private _camera: Camera;\n private _control: Control;\n private _renderer: Renderer;\n private _virtualManager: VirtualManager;\n\n // Options\n private _align: FlickingOptions[\"align\"];\n private _defaultIndex: FlickingOptions[\"defaultIndex\"];\n private _horizontal: FlickingOptions[\"horizontal\"];\n private _circular: FlickingOptions[\"circular\"];\n private _circularFallback: FlickingOptions[\"circularFallback\"];\n private _bound: FlickingOptions[\"bound\"];\n private _adaptive: FlickingOptions[\"adaptive\"];\n private _panelsPerView: FlickingOptions[\"panelsPerView\"];\n private _noPanelStyleOverride: FlickingOptions[\"noPanelStyleOverride\"];\n private _resizeOnContentsReady: FlickingOptions[\"resizeOnContentsReady\"];\n private _virtual: FlickingOptions[\"virtual\"];\n private _nested: FlickingOptions[\"nested\"];\n\n private _needPanelThreshold: FlickingOptions[\"needPanelThreshold\"];\n private _preventEventsBeforeInit: FlickingOptions[\"preventEventsBeforeInit\"];\n\n private _deceleration: FlickingOptions[\"deceleration\"];\n private _duration: FlickingOptions[\"duration\"];\n private _easing: FlickingOptions[\"easing\"];\n\n private _inputType: FlickingOptions[\"inputType\"];\n private _moveType: FlickingOptions[\"moveType\"];\n private _threshold: FlickingOptions[\"threshold\"];\n private _interruptable: FlickingOptions[\"interruptable\"];\n private _bounce: FlickingOptions[\"bounce\"];\n private _iOSEdgeSwipeThreshold: FlickingOptions[\"iOSEdgeSwipeThreshold\"];\n private _preventClickOnDrag: FlickingOptions[\"preventClickOnDrag\"];\n private _preventDefaultOnDrag: FlickingOptions[\"preventDefaultOnDrag\"];\n private _disableOnInit: FlickingOptions[\"disableOnInit\"];\n private _changeOnHold: FlickingOptions[\"changeOnHold\"];\n\n private _renderOnlyVisible: FlickingOptions[\"renderOnlyVisible\"];\n\n private _autoInit: FlickingOptions[\"autoInit\"];\n private _autoResize: FlickingOptions[\"autoResize\"];\n private _useResizeObserver: FlickingOptions[\"useResizeObserver\"];\n private _resizeDebounce: FlickingOptions[\"resizeDebounce\"];\n private _maxResizeDebounce: FlickingOptions[\"maxResizeDebounce\"];\n private _useFractionalSize: FlickingOptions[\"useFractionalSize\"];\n private _externalRenderer: FlickingOptions[\"externalRenderer\"];\n private _renderExternal: FlickingOptions[\"renderExternal\"];\n\n // Internal State\n private _initialized: boolean;\n private _plugins: Plugin[];\n\n // Components\n /**\n * {@link Control} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스\n * @type {Control}\n * @default SnapControl\n * @readonly\n * @see Control\n * @see SnapControl\n * @see FreeControl\n */\n public get control() { return this._control; }\n /**\n * {@link Camera} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스\n * @type {Camera}\n * @default LinearCamera\n * @readonly\n * @see Camera\n * @see LinearCamera\n * @see BoundCamera\n * @see CircularCamera\n */\n public get camera() { return this._camera; }\n /**\n * {@link Renderer} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스\n * @type {Renderer}\n * @default VanillaRenderer\n * @readonly\n * @see Renderer\n * @see VanillaRenderer\n * @see ExternalRenderer\n */\n public get renderer() { return this._renderer; }\n /**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n * @type {Viewport}\n * @readonly\n * @see Viewport\n */\n public get viewport() { return this._viewport; }\n // Internal States\n /**\n * Whether Flicking's {@link Flicking#init init()} is called.\n * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.\n * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.\n * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get initialized() { return this._initialized; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._camera.circularEnabled; }\n /**\n * Whether the `virtual` option is enabled.\n * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero.\n * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get virtualEnabled() { return this._panelsPerView > 0 && this._virtual != null; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get index() { return this._control.activeIndex; }\n /**\n * The root(`.flicking-viewport`) element\n * @ko root(`.flicking-viewport`) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._viewport.element; }\n /**\n * Currently active panel\n * @ko 현재 선택된 패널\n * @type {Panel}\n * @readonly\n * @see Panel\n */\n public get currentPanel() { return this._control.activePanel; }\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._renderer.panels; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._renderer.panelCount; }\n /**\n * Array of panels that is visible at the current position\n * @ko 현재 보이는 패널의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get visiblePanels() { return this._camera.visiblePanels; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._control.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._control.holding; }\n /**\n * A current list of activated plugins\n * @ko 현재 활성화된 플러그인 목록\n * @type {Plugin[]}\n * @readonly\n */\n public get activePlugins() { return this._plugins; }\n\n // Options Getter\n // UI / LAYOUT\n /**\n * Align position of the panels within viewport. You can set different values each for the panel and camera\n * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다\n * @type {ALIGN | string | number | { panel: string | number, camera: string | number }}\n * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값\n * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값\n * @default \"center\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // Literal strings\n * \"prev\", \"center\", \"next\",\n * // % values, applied to both panel & camera\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000,\n * // Setting a different value for panel & camera\n * { panel: \"10%\", camera: \"25%\" }\n * ];\n *\n * possibleOptions.forEach(align => {\n * new Flicking(\"#el\", { align });\n * });\n * ```\n */\n public get align() { return this._align; }\n /**\n * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer\n * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}\n */\n public get defaultIndex() { return this._defaultIndex; }\n /**\n * Direction of panel movement (true: horizontal, false: vertical)\n * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향)\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )}\n */\n public get horizontal() { return this._horizontal; }\n /**\n * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling.\n * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )}\n */\n public get circular() { return this._circular; }\n /**\n * Set panel control mode for the case when circular cannot be enabled.\n * \"linear\" will set the view's range from the top of the first panel to the top of the last panel.\n * \"bound\" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel.\n * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다.\n * \"linear\" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다.\n * \"bound\" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다.\n * @see CIRCULAR_FALLBACK\n * @type {string}\n * @default \"linear\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )}\n */\n public get circularFallback() { return this._circularFallback; }\n /**\n * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel\n * Only can be enabled when `circular=false`\n * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다\n * `circular=false`인 경우에만 사용할 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )}\n */\n public get bound() { return this._bound; }\n /**\n * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true`\n * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )}\n */\n public get adaptive() { return this._adaptive; }\n /**\n * A visible number of panels on viewport. Enabling this option will automatically resize panel size\n * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다\n * @type {number}\n * @default -1\n * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )}\n */\n public get panelsPerView() { return this._panelsPerView; }\n /**\n * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled.\n * This behavior can be useful in terms of performance when you're manually managing all panel sizes\n * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다.\n * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다\n * @type {boolean}\n * @default false\n */\n public get noPanelStyleOverride() { return this._noPanelStyleOverride; }\n /**\n * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded.\n * This can be useful when you have contents inside Flicking that changes its size when it's loaded\n * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다.\n * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )}\n */\n public get resizeOnContentsReady() { return this._resizeOnContentsReady; }\n /**\n * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.\n * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.\n * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.\n * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )}\n */\n public get nested() { return this._nested; }\n // EVENTS\n /**\n * A Threshold from viewport edge before triggering `needPanel` event\n * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )}\n */\n public get needPanelThreshold() { return this._needPanelThreshold; }\n /**\n * When enabled, events are not triggered before `ready` when initializing\n * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )}\n */\n public get preventEventsBeforeInit() { return this._preventEventsBeforeInit; }\n // ANIMATION\n /**\n * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time\n * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다\n * @type {number}\n * @default 0.0075\n * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )}\n */\n public get deceleration() { return this._deceleration; }\n /**\n * An easing function applied to the panel movement animation. Default value is `easeOutCubic`\n * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다\n * @type {function}\n * @default x => 1 - Math.pow(1 - x, 3)\n * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/}\n * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )}\n */\n public get easing() { return this._easing; }\n /**\n * Default duration of the animation (ms)\n * @ko 디폴트 애니메이션 재생 시간 (ms)\n * @type {number}\n * @default 500\n * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )}\n */\n public get duration() { return this._duration; }\n // INPUT\n /**\n * Types of input devices to enable\n * @ko 활성화할 입력 장치 종류\n * @type {string[]}\n * @default [\"touch\", \"mouse\"]\n * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)}\n * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)}\n * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )}\n */\n public get inputType() { return this._inputType; }\n /**\n * Movement style by user input. This will change instance type of {@link Flicking#control}\n * You can use the values of the constant {@link MOVE_TYPE}\n * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다\n * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다\n * @type {MOVE_TYPE | Pair}\n * @default \"snap\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )}\n * @example\n * |moveType|control|options|\n * |:---:|:---:|:---:|\n * |\"snap\"|{@link SnapControl}||\n * |\"freeScroll\"|{@link FreeControl}|{@link FreeControlOptions}|\n *\n * ```ts\n * import Flicking, { MOVE_TYPE } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking({\n * moveType: MOVE_TYPE.SNAP\n * });\n * ```\n *\n * ```ts\n * const flicking = new Flicking({\n * // If you want more specific settings for the moveType\n * // [moveType, options for that moveType]\n * // In this case, it's [\"freeScroll\", FreeControlOptions]\n * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }]\n * });\n * ```\n */\n public get moveType() { return this._moveType; }\n /**\n * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.\n * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.\n * @type {number}\n * @default 40\n * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}\n */\n public get threshold() { return this._threshold; }\n /**\n * Set animation to be interruptable by click/touch.\n * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )}\n */\n public get interruptable() { return this._interruptable; }\n /**\n * The size value of the bounce area. Only can be enabled when `circular=false`.\n * You can set different bounce value for prev/next direction by using array.\n * `number` for px value, and `string` for px, and % value relative to viewport size.\n * You have to call {@link Control#updateInput} after changing this to take effect.\n * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다.\n * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다.\n * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다.\n * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다.\n * @type {string | number | Array}\n * @default \"20%\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // % values, relative to viewport element(\".flicking-viewport\")'s size\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000\n * ];\n * ```\n *\n * @example\n * ```ts\n * const flicking = new Flicking(\"#el\", { bounce: \"20%\" });\n *\n * flicking.bounce = \"100%\";\n * flicking.control.updateInput(); // Call this to update!\n * ```\n */\n public get bounce() { return this._bounce; }\n /**\n * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward\n * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px)\n * @type {number}\n * @default 30\n * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )}\n */\n public get iOSEdgeSwipeThreshold() { return this._iOSEdgeSwipeThreshold; }\n /**\n * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element\n * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )}\n */\n public get preventClickOnDrag() { return this._preventClickOnDrag; }\n /**\n * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging\n * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )}\n */\n public get preventDefaultOnDrag() { return this._preventDefaultOnDrag; }\n /**\n * Automatically call {@link Flicking#disableInput disableInput()} on initialization\n * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )}\n */\n public get disableOnInit() { return this._disableOnInit; }\n /**\n * Change active panel index on mouse/touch hold while animating.\n * `index` of the `willChange`/`willRestore` event will be used as new index.\n * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.\n * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}\n */\n public get changeOnHold() { return this._changeOnHold; }\n // PERFORMANCE\n /**\n * Whether to render visible panels only. This can dramatically increase performance when there're many panels\n * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )}\n */\n public get renderOnlyVisible() { return this._renderOnlyVisible; }\n /**\n * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1`\n * Must be used with `panelsPerview`.\n * After Flicking's initialized, this property can be used to add/remove the panel count.\n * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다.\n * `panelsPerView` 옵션과 함께 사용되어야만 합니다.\n * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다.\n * @type {VirtualManager}\n * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수\n * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @property {string} [panelClass=\"flicking-panel\"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )}\n * @example\n * ```ts\n * import Flicking, { VirtualPanel } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking(\"#some_el\", {\n * panelsPerView: 3,\n * virtual: {\n * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`,\n * initialPanelCount: 100\n * }\n * });\n *\n * // Add 100 virtual panels (at the end)\n * flicking.virtual.append(100);\n *\n * // Remove 100 virtual panels from 0 to 100\n * flicking.virtual.remove(0, 100);\n * ```\n */\n public get virtual() { return this._virtualManager; }\n\n // OTHERS\n /**\n * Call {@link Flicking#init init()} automatically when creating Flicking's instance\n * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )}\n * @readonly\n */\n public get autoInit() { return this._autoInit; }\n /**\n * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed\n * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n */\n public get autoResize() { return this._autoResize; }\n /**\n * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option\n * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )}\n */\n public get useResizeObserver() { return this._useResizeObserver; }\n /**\n * Delays size recalculation from `autoResize` by the given time in milisecond.\n * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again.\n * This can increase performance by preventing `resize` being called too often.\n * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다.\n * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다.\n * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다.\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )}\n */\n public get resizeDebounce() { return this._resizeDebounce; }\n /**\n * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond.\n * This guarantees that size recalculation is performed at least once every (n)ms.\n * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms)\n * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다.\n * @type {number}\n * @default 100\n * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )}\n */\n public get maxResizeDebounce() { return this._maxResizeDebounce; }\n /**\n * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle.\n * This can prevent 1px offset issue in some cases where panel size has the fractional part.\n * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element.\n * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다.\n * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다.\n * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )}\n */\n public get useFractionalSize() { return this._useFractionalSize; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n */\n public get externalRenderer() { return this._externalRenderer; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n * @deprecated\n */\n public get renderExternal() { return this._renderExternal; }\n\n // Options Setter\n // UI / LAYOUT\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n this._renderer.align = val;\n this._camera.align = val;\n void this.resize();\n }\n\n public set defaultIndex(val: FlickingOptions[\"defaultIndex\"]) { this._defaultIndex = val; }\n public set horizontal(val: FlickingOptions[\"horizontal\"]) {\n this._horizontal = val;\n this._control.controller.updateDirection();\n void this.resize();\n }\n\n public set circular(val: FlickingOptions[\"circular\"]) {\n this._circular = val;\n void this.resize();\n }\n\n public set bound(val: FlickingOptions[\"bound\"]) {\n this._bound = val;\n void this.resize();\n }\n\n public set adaptive(val: FlickingOptions[\"adaptive\"]) {\n this._adaptive = val;\n void this.resize();\n }\n\n public set panelsPerView(val: FlickingOptions[\"panelsPerView\"]) {\n this._panelsPerView = val;\n void this.resize();\n }\n\n public set noPanelStyleOverride(val: FlickingOptions[\"noPanelStyleOverride\"]) {\n this._noPanelStyleOverride = val;\n void this.resize();\n }\n\n public set resizeOnContentsReady(val: FlickingOptions[\"resizeOnContentsReady\"]) {\n this._resizeOnContentsReady = val;\n if (val) {\n this._renderer.checkPanelContentsReady(this._renderer.panels);\n }\n }\n\n public set nested(val: FlickingOptions[\"nested\"]) {\n this._nested = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.nested = val;\n }\n }\n\n // EVENTS\n public set needPanelThreshold(val: FlickingOptions[\"needPanelThreshold\"]) { this._needPanelThreshold = val; }\n public set preventEventsBeforeInit(val: FlickingOptions[\"preventEventsBeforeInit\"]) { this._preventEventsBeforeInit = val; }\n // ANIMATION\n public set deceleration(val: FlickingOptions[\"deceleration\"]) {\n this._deceleration = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.deceleration = val;\n }\n }\n\n public set easing(val: FlickingOptions[\"easing\"]) {\n this._easing = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.easing = val;\n }\n }\n\n public set duration(val: FlickingOptions[\"duration\"]) { this._duration = val; }\n // INPUT\n public set inputType(val: FlickingOptions[\"inputType\"]) {\n this._inputType = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.inputType = val;\n }\n }\n\n public set moveType(val: FlickingOptions[\"moveType\"]) {\n this._moveType = val;\n\n const prevControl = this._control;\n const newControl = this._createControl();\n const activePanel = prevControl.activePanel;\n newControl.copy(prevControl);\n\n const prevProgressInPanel = activePanel\n ? this._camera.getProgressInPanel(activePanel)\n : 0;\n\n this._control = newControl;\n this._control.updatePosition(prevProgressInPanel);\n this._control.updateInput();\n }\n\n public set threshold(val: FlickingOptions[\"threshold\"]) { this._threshold = val; }\n public set interruptable(val: FlickingOptions[\"interruptable\"]) {\n this._interruptable = val;\n\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.interruptable = val;\n }\n }\n\n public set bounce(val: FlickingOptions[\"bounce\"]) {\n this._bounce = val;\n this._control.updateInput();\n }\n\n public set iOSEdgeSwipeThreshold(val: FlickingOptions[\"iOSEdgeSwipeThreshold\"]) {\n this._iOSEdgeSwipeThreshold = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.iOSEdgeSwipeThreshold = val;\n }\n }\n\n public set preventClickOnDrag(val: FlickingOptions[\"preventClickOnDrag\"]) {\n const prevVal = this._preventClickOnDrag;\n\n if (val === prevVal) return;\n\n const controller = this._control.controller;\n\n if (val) {\n controller.addPreventClickHandler();\n } else {\n controller.removePreventClickHandler();\n }\n\n this._preventClickOnDrag = val;\n }\n\n public set preventDefaultOnDrag(val: FlickingOptions[\"preventDefaultOnDrag\"]) {\n this._preventDefaultOnDrag = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.preventDefaultOnDrag = val;\n }\n }\n\n public set disableOnInit(val: FlickingOptions[\"disableOnInit\"]) { this._disableOnInit = val; }\n public set changeOnHold(val: FlickingOptions[\"changeOnHold\"]) { this._changeOnHold = val; }\n // PERFORMANCE\n public set renderOnlyVisible(val: FlickingOptions[\"renderOnlyVisible\"]) {\n this._renderOnlyVisible = val;\n void this._renderer.render();\n }\n\n // OTHERS\n public set autoResize(val: FlickingOptions[\"autoResize\"]) {\n this._autoResize = val;\n\n if (val) {\n this._autoResizer.enable();\n } else {\n this._autoResizer.disable();\n }\n }\n\n public set useResizeObserver(val: FlickingOptions[\"useResizeObserver\"]) {\n this._useResizeObserver = val;\n\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n }\n\n /**\n * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string\n * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다.\n * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist|\n * \n *\n * |code|조건|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우|\n *\n * \n * @example\n * ```ts\n * import Flicking from \"@egjs/flicking\";\n *\n * // Creating new instance of Flicking with HTMLElement\n * const flicking = new Flicking(document.querySelector(\".flicking-viewport\"), { circular: true });\n *\n * // Creating new instance of Flicking with CSS selector\n * const flicking2 = new Flicking(\".flicking-viewport\", { circular: true });\n * ```\n */\n public constructor(root: HTMLElement | string, {\n align = ALIGN.CENTER,\n defaultIndex = 0,\n horizontal = true,\n circular = false,\n circularFallback = CIRCULAR_FALLBACK.LINEAR,\n bound = false,\n adaptive = false,\n panelsPerView = -1,\n noPanelStyleOverride = false,\n resizeOnContentsReady = false,\n nested = false,\n needPanelThreshold = 0,\n preventEventsBeforeInit = true,\n deceleration = 0.0075,\n duration = 500,\n easing = x => 1 - Math.pow(1 - x, 3),\n inputType = [\"mouse\", \"touch\"],\n moveType = \"snap\",\n threshold = 40,\n interruptable = true,\n bounce = \"20%\",\n iOSEdgeSwipeThreshold = 30,\n preventClickOnDrag = true,\n preventDefaultOnDrag = false,\n disableOnInit = false,\n changeOnHold = false,\n renderOnlyVisible = false,\n virtual = null,\n autoInit = true,\n autoResize = true,\n useResizeObserver = true,\n resizeDebounce = 0,\n maxResizeDebounce = 100,\n useFractionalSize = false,\n externalRenderer = null,\n renderExternal = null\n }: Partial = {}) {\n super();\n\n // Internal states\n this._initialized = false;\n this._plugins = [];\n\n // Bind options\n this._align = align;\n this._defaultIndex = defaultIndex;\n this._horizontal = horizontal;\n this._circular = circular;\n this._circularFallback = circularFallback;\n this._bound = bound;\n this._adaptive = adaptive;\n this._panelsPerView = panelsPerView;\n this._noPanelStyleOverride = noPanelStyleOverride;\n this._resizeOnContentsReady = resizeOnContentsReady;\n this._nested = nested;\n this._virtual = virtual;\n this._needPanelThreshold = needPanelThreshold;\n this._preventEventsBeforeInit = preventEventsBeforeInit;\n this._deceleration = deceleration;\n this._duration = duration;\n this._easing = easing;\n this._inputType = inputType;\n this._moveType = moveType;\n this._threshold = threshold;\n this._interruptable = interruptable;\n this._bounce = bounce;\n this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;\n this._preventClickOnDrag = preventClickOnDrag;\n this._preventDefaultOnDrag = preventDefaultOnDrag;\n this._disableOnInit = disableOnInit;\n this._changeOnHold = changeOnHold;\n this._renderOnlyVisible = renderOnlyVisible;\n this._autoInit = autoInit;\n this._autoResize = autoResize;\n this._useResizeObserver = useResizeObserver;\n this._resizeDebounce = resizeDebounce;\n this._maxResizeDebounce = maxResizeDebounce;\n this._useFractionalSize = useFractionalSize;\n this._externalRenderer = externalRenderer;\n this._renderExternal = renderExternal;\n\n // Create core components\n this._viewport = new Viewport(this, getElement(root));\n this._autoResizer = new AutoResizer(this);\n this._renderer = this._createRenderer();\n this._camera = this._createCamera();\n this._control = this._createControl();\n this._virtualManager = new VirtualManager(this, virtual);\n\n if (this._autoInit) {\n void this.init();\n }\n }\n\n /**\n * Initialize Flicking and move to the default index\n * This is automatically called on Flicking's constructor when `autoInit` is true(default)\n * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다\n * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다\n * @fires Flicking#ready\n * @return {Promise}\n */\n public init(): Promise {\n if (this._initialized) return Promise.resolve();\n\n const camera = this._camera;\n const renderer = this._renderer;\n const control = this._control;\n const virtualManager = this._virtualManager;\n const originalTrigger = this.trigger;\n const preventEventsBeforeInit = this._preventEventsBeforeInit;\n\n camera.init();\n virtualManager.init();\n renderer.init(this);\n control.init(this);\n\n if (preventEventsBeforeInit) {\n this.trigger = () => this;\n }\n\n this._initialResize();\n\n // Look at initial panel\n this._moveToInitialPanel();\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n if (this._preventClickOnDrag) {\n control.controller.addPreventClickHandler();\n }\n if (this._disableOnInit) {\n this.disableInput();\n }\n renderer.checkPanelContentsReady(renderer.panels);\n this._initialized = true;\n\n return renderer.render().then(() => {\n // Done initializing & emit ready event\n this._plugins.forEach(plugin => plugin.init(this));\n\n if (preventEventsBeforeInit) {\n this.trigger = originalTrigger;\n }\n this.trigger(new ComponentEvent(EVENTS.READY));\n });\n }\n\n /**\n * Destroy Flicking and remove all event handlers\n * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다\n * @return {void}\n */\n public destroy(): void {\n this.off();\n\n this._autoResizer.disable();\n this._control.destroy();\n this._camera.destroy();\n this._renderer.destroy();\n\n this._plugins.forEach(plugin => plugin.destroy());\n\n this._initialized = false;\n }\n\n /**\n * Move to the previous panel (current index - 1)\n * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n * \n * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise\n */\n public prev(duration: number = this._duration): Promise {\n return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, duration, DIRECTION.PREV);\n }\n\n /**\n * Move to the next panel (current index + 1)\n * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise\n */\n public next(duration: number = this._duration) {\n return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, duration, DIRECTION.NEXT);\n }\n\n /**\n * Move to the panel with given index\n * @ko 주어진 인덱스에 해당하는 패널로 이동합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public moveTo(index: number, duration: number = this._duration, direction: ValueOf = DIRECTION.NONE) {\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE));\n }\n\n if (this._control.animating) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.ANIMATION_ALREADY_PLAYING, ERROR.CODE.ANIMATION_ALREADY_PLAYING));\n }\n\n if (this._control.holding) {\n this._control.controller.release();\n }\n\n return this._control.moveToPanel(panel, {\n duration,\n direction\n });\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우\n * @return {void}\n */\n public updateAnimation(index: number, duration?: number, direction?: ValueOf): void {\n if (!this._control.animating) {\n return;\n }\n\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n throw new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE);\n }\n\n this._control.updateAnimation(panel, duration, direction);\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @fires Flicking#moveEnd\n * @return {void}\n */\n public stopAnimation(): void {\n if (!this._control.animating) {\n return;\n }\n\n this._control.stopAnimation();\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n * @example\n * ```ts\n * const panel = flicking.getPanel(0);\n * // Which is a shorthand to...\n * const samePanel = flicking.panels[0];\n * ```\n */\n public getPanel(index: number): Panel | null {\n return this._renderer.getPanel(index);\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @return {this}\n */\n public enableInput(): this {\n this._control.enable();\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @return {this}\n */\n public disableInput(): this {\n this._control.disable();\n return this;\n }\n\n /**\n * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()}\n * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다\n * @param {object} options Status retrieving optionsStatus 반환 옵션\n * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다\n * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다\n * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다\n * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true\n * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다.\n * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체.\n */\n public getStatus({\n index = true,\n position = true,\n includePanelHTML = false,\n visiblePanelsOnly = false\n }: Partial<{\n index: boolean;\n position: boolean;\n includePanelHTML: boolean;\n visiblePanelsOnly: boolean;\n }> = {}): Status {\n const camera = this._camera;\n const panels = visiblePanelsOnly ? this.visiblePanels : this.panels;\n\n const status: Status = {\n panels: panels.map(panel => {\n const panelInfo: Status[\"panels\"][0] = { index: panel.index };\n\n if (includePanelHTML) {\n panelInfo.html = panel.element.outerHTML;\n }\n\n return panelInfo;\n })\n };\n\n if (index) {\n status.index = this.index;\n }\n if (position) {\n const nearestAnchor = camera.findNearestAnchor(camera.position);\n\n if (nearestAnchor) {\n status.position = {\n panel: nearestAnchor.panel.index,\n progressInPanel: camera.getProgressInPanel(nearestAnchor.panel)\n };\n }\n\n }\n\n if (visiblePanelsOnly) {\n const visiblePanels = this.visiblePanels;\n\n status.visibleOffset = visiblePanels[0]?.index ?? 0;\n }\n\n return status;\n }\n\n /**\n * Restore to the state of the given {@link Status}\n * @ko 주어진 {@link Status}의 상태로 복원합니다\n * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다\n * @return {void}\n */\n public setStatus(status: Status): void {\n if (!this._initialized) {\n throw new FlickingError(ERROR.MESSAGE.NOT_INITIALIZED, ERROR.CODE.NOT_INITIALIZED);\n }\n\n const {\n index,\n position,\n visibleOffset,\n panels\n } = status;\n\n const renderer = this._renderer;\n const control = this._control;\n\n // Can't add/remove panels on external rendering\n if (panels[0]?.html && !this._renderExternal) {\n renderer.batchRemove({ index: 0, deleteCount: this.panels.length, hasDOMInElements: true });\n renderer.batchInsert({ index: 0, elements: parseElement(panels.map(panel => panel.html!)), hasDOMInElements: true });\n }\n\n if (index != null) {\n const panelIndex = visibleOffset\n ? index - visibleOffset\n : index;\n\n void this.moveTo(panelIndex, 0).catch(() => void 0);\n }\n\n if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) {\n const { panel, progressInPanel } = position;\n const panelIndex = visibleOffset\n ? panel - visibleOffset\n : panel;\n const panelRange = renderer.panels[panelIndex].range;\n const newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n void control.moveToPosition(newCameraPos, 0).catch(() => void 0);\n }\n }\n\n /**\n * Add plugins that can have different effects on Flicking\n * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다\n * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들)\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public addPlugins(...plugins: Plugin[]) {\n if (this._initialized) {\n plugins.forEach(item => item.init(this));\n }\n\n this._plugins.push(...plugins);\n\n return this;\n }\n\n /**\n * Remove plugins from Flicking.\n * @ko 플리킹으로부터 플러그인들을 제거합니다.\n * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들).\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public removePlugins(...plugins: Plugin[]) {\n plugins.forEach(item => {\n const foundIndex = findIndex(this._plugins, val => val === item);\n\n if (foundIndex >= 0) {\n item.destroy();\n this._plugins.splice(foundIndex, 1);\n }\n });\n\n return this;\n }\n\n /**\n * Update viewport/panel sizes\n * @ko 패널 및 뷰포트의 크기를 갱신합니다\n * @method\n * @fires Flicking#beforeResize\n * @fires Flicking#afterResize\n * @return {this}\n */\n public async resize(): Promise {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n const activePanel = control.activePanel;\n const prevWidth = viewport.width;\n const prevHeight = viewport.height;\n const prevProgressInPanel = activePanel\n ? camera.getProgressInPanel(activePanel)\n : 0;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: prevWidth,\n height: prevHeight,\n element: viewport.element\n }));\n\n viewport.resize();\n await renderer.forceRenderAllPanels(); // Render all panel elements, to update sizes\n if (!this._initialized) {\n return;\n }\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateAdaptiveHeight();\n camera.updatePanelOrder();\n camera.updateOffset();\n await renderer.render();\n if (!this._initialized) {\n return;\n }\n\n if (control.animating) {\n // TODO:\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: prevWidth,\n height: prevHeight\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n\n /**\n * Add new panels after the last panel\n * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of appended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new Flicking(\"#flick\");\n * // These are possible parameters\n * flicking.append(document.createElement(\"div\"));\n * flicking.append(\"\\Panel\\\");\n * flicking.append([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.append(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public append(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(this._renderer.panelCount, element);\n }\n\n /**\n * Add new panels before the first panel\n * This will increase index of panels after by the number of panels added\n * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다\n * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다.\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.prepend(document.createElement(\"div\"));\n * flicking.prepend(\"\\Panel\\\");\n * flicking.prepend([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.prepend(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public prepend(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(0, element);\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.insert(0, document.createElement(\"div\"));\n * flicking.insert(2, \"\\Panel\\\");\n * flicking.insert(1, [\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.insert(3, \"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public insert(index: number, element: ElementLike | ElementLike[]): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchInsert({ index, elements: parseElement(element), hasDOMInElements: true });\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {number} index Index of panel to remove제거할 패널의 인덱스\n * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @return {Panel[]} An array of removed panels제거된 패널들의 배열\n */\n public remove(index: number, deleteCount: number = 1): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchRemove({ index, deleteCount, hasDOMInElements: true });\n }\n\n private _createControl(): Control {\n const moveType = this._moveType;\n const moveTypes = Object.keys(MOVE_TYPE).map(key => MOVE_TYPE[key] as ValueOf);\n\n const moveTypeStr = Array.isArray(moveType)\n ? moveType[0]\n : moveType;\n\n const moveTypeOptions = Array.isArray(moveType)\n ? moveType[1] ?? {}\n : {};\n\n if (!includes(moveTypes, moveTypeStr)) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"moveType\", JSON.stringify(moveType)), ERROR.CODE.WRONG_OPTION);\n }\n\n switch (moveTypeStr) {\n case MOVE_TYPE.SNAP:\n return new SnapControl(moveTypeOptions as SnapControlOptions);\n case MOVE_TYPE.FREE_SCROLL:\n return new FreeControl(moveTypeOptions as FreeControlOptions);\n case MOVE_TYPE.STRICT:\n return new StrictControl(moveTypeOptions as StrictControlOptions);\n }\n }\n\n private _createCamera(): Camera {\n if (this._circular && this._bound) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"circular\\\" and \\\"bound\\\" option cannot be used together, ignoring bound.\");\n }\n\n return new Camera(this, {\n align: this._align\n });\n }\n\n private _createRenderer(): Renderer {\n const externalRenderer = this._externalRenderer;\n if (this._virtual && this._panelsPerView <= 0) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"virtual\\\" and \\\"panelsPerView\\\" option should be used together, ignoring virtual.\");\n }\n\n return externalRenderer\n ? externalRenderer\n : this._renderExternal\n ? this._createExternalRenderer()\n : this._createVanillaRenderer();\n }\n\n private _createExternalRenderer(): ExternalRenderer {\n const {\n renderer,\n rendererOptions\n } = this._renderExternal!;\n\n return new (renderer)({ align: this._align, ...rendererOptions });\n }\n\n private _createVanillaRenderer(): VanillaRenderer {\n const virtual = this.virtualEnabled;\n\n return new VanillaRenderer({\n align: this._align,\n strategy: virtual\n ? new VirtualRenderingStrategy()\n : new NormalRenderingStrategy({\n providerCtor: VanillaElementProvider\n })\n });\n }\n\n private _moveToInitialPanel(): void {\n const renderer = this._renderer;\n const control = this._control;\n const camera = this._camera;\n const defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);\n\n if (!defaultPanel) return;\n\n const nearestAnchor = camera.findNearestAnchor(defaultPanel.position);\n const initialPanel = (nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index) ? nearestAnchor.panel : defaultPanel;\n control.setActive(initialPanel, null, false);\n\n if (!nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n let position = initialPanel.position;\n\n if (!camera.canReach(initialPanel)) {\n position = nearestAnchor.position;\n }\n\n camera.lookAt(position);\n control.updateInput();\n camera.updateOffset();\n }\n\n private _initialResize() {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: 0,\n height: 0,\n element: viewport.element\n }));\n\n viewport.resize();\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateOffset();\n control.updateInput();\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== 0 || newHeight !== 0;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: 0,\n height: 0\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n}\n\nexport default Flicking;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Viewport from \"./Viewport\";\nimport FlickingError from \"./FlickingError\";\nimport AnchorPoint from \"./AnchorPoint\";\nimport VirtualManager from \"./VirtualManager\";\n\nexport {\n Viewport,\n FlickingError,\n AnchorPoint,\n VirtualManager\n};\n\nexport * from \"./panel\";\n","import Component from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\n\n/**\n * Decorator that makes the method of flicking available in the framework.\n * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.\n * @memberof eg.Flicking\n * @private\n * @example\n * ```js\n * import Flicking, { withFlickingMethods } from \"@egjs/flicking\";\n *\n * class Flicking extends React.Component> {\n * @withFlickingMethods\n * private flicking: Flicking;\n * }\n * ```\n */\nconst withFlickingMethods = (prototype: any, flickingName: string) => {\n [Component.prototype, Flicking.prototype].forEach(proto => {\n Object.getOwnPropertyNames(proto).filter(name => !prototype[name] && name.indexOf(\"_\") !== 0 && name !== \"constructor\")\n .forEach((name: string) => {\n const descriptor = Object.getOwnPropertyDescriptor(proto, name)!;\n\n if (descriptor.value) {\n // Public Function\n Object.defineProperty(prototype, name, {\n value: function(...args) {\n return descriptor.value.call(this[flickingName], ...args);\n }\n });\n } else {\n const getterDescriptor: { get?: () => any; set?: (val: any) => void } = {};\n if (descriptor.get) {\n getterDescriptor.get = function() {\n const flicking = this[flickingName];\n return flicking && descriptor.get?.call(flicking);\n };\n }\n if (descriptor.set) {\n getterDescriptor.set = function(...args) {\n return descriptor.set?.call(this[flickingName], ...args);\n };\n }\n\n Object.defineProperty(prototype, name, getterDescriptor);\n }\n });\n });\n};\n\nexport default withFlickingMethods;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\nimport Renderer from \"../renderer/Renderer\";\nimport Panel from \"../core/panel/Panel\";\n\nexport default (flicking: Flicking, diffResult: DiffResult, rendered: any[]) => {\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n const prevList = [...diffResult.prevList];\n\n const added: Panel[] = [];\n const removed: Panel[] = [];\n\n if (diffResult.removed.length > 0) {\n let endIdx = -1;\n let prevIdx = -1;\n\n diffResult.removed.forEach(removedIdx => {\n if (endIdx < 0) {\n endIdx = removedIdx;\n }\n\n if (prevIdx >= 0 && removedIdx !== prevIdx - 1) {\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n\n endIdx = removedIdx;\n prevIdx = removedIdx;\n } else {\n prevIdx = removedIdx;\n }\n\n prevList.splice(removedIdx, 1);\n });\n\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n }\n\n diffResult.ordered.forEach(([from, to]) => {\n const prevPanel = panels.splice(from, 1)[0];\n panels.splice(to, 0, prevPanel);\n });\n\n if (diffResult.ordered.length > 0) {\n panels.forEach((panel, idx) => {\n const indexDiff = idx - panel.index;\n\n if (indexDiff > 0) {\n panel.increaseIndex(indexDiff);\n } else {\n panel.decreaseIndex(-indexDiff);\n }\n });\n\n panels.sort((panel1, panel2) => panel1.index - panel2.index);\n\n panels.forEach(panel => {\n panel.updatePosition();\n });\n }\n\n if (diffResult.added.length > 0) {\n let startIdx = -1;\n let prevIdx = -1;\n\n const addedElements = rendered.slice(prevList.length);\n\n diffResult.added.forEach((addedIdx, idx) => {\n if (startIdx < 0) {\n startIdx = idx;\n }\n\n if (prevIdx >= 0 && addedIdx !== prevIdx + 1) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx, idx + 1));\n\n startIdx = -1;\n prevIdx = -1;\n } else {\n prevIdx = addedIdx;\n }\n });\n\n if (startIdx >= 0) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx));\n }\n }\n\n if (diffResult.added.length > 0 || diffResult.removed.length > 0) {\n renderer.updateAfterPanelChange(added, removed);\n }\n};\n\nconst batchInsert = (renderer: Renderer, diffResult: DiffResult, addedElements: any[], startIdx: number, endIdx?: number) => {\n return renderer.batchInsertDefer(\n ...diffResult.added.slice(startIdx, endIdx).map((index, elIdx) => ({ index, elements: [addedElements[elIdx]], hasDOMInElements: false }))\n );\n};\n\nconst batchRemove = (renderer: Renderer, startIdx: number, endIdx?: number) => {\n const removed = renderer.panels.slice(startIdx, endIdx);\n\n return renderer.batchRemoveDefer({ index: startIdx, deleteCount: removed.length, hasDOMInElements: false });\n};\n\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\n\nexport default (flicking: Flicking, diffResult: DiffResult) => {\n const removedPanels = diffResult.removed.reduce((map, idx) => {\n map[idx] = true;\n return map;\n }, {});\n\n const maintainedMap = diffResult.maintained.reduce((map, [prev, current]) => {\n map[prev] = current;\n return map;\n }, {});\n\n return [\n ...flicking.panels\n .filter(panel => !removedPanels[panel.index])\n // Sort panels by position\n .sort((panel1, panel2) => (panel1.position + panel1.offset) - (panel2.position + panel2.offset))\n .map(panel => diffResult.list[maintainedMap[panel.index]]),\n ...diffResult.added.map(idx => diffResult.list[idx])\n ];\n};\n\n","import { FlickingOptions } from \"../Flicking\";\nimport { ALIGN } from \"../const/external\";\nimport { parseArithmeticExpression } from \"../utils\";\n\nexport default (align: FlickingOptions[\"align\"] = ALIGN.CENTER, horizontal: boolean = true, firstPanelSize?: string) => {\n const cameraAlign = getCameraAlign(align);\n const panelAlign = getPanelAlign(align);\n\n if (panelAlign == null) return \"\";\n\n const camPosition = `calc(${cameraAlign} - (${firstPanelSize || \"0px\"} * ${panelAlign.percentage}) - ${panelAlign.absolute}px)`;\n\n return horizontal\n ? `translate(${camPosition})`\n : `translate(0, ${camPosition})`;\n};\n\nconst getCameraAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n return parseAlign(alignVal);\n};\n\nconst getPanelAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\n return parseArithmeticExpression(parseAlign(alignVal));\n};\n\nconst parseAlign = (alignVal: number | string) => {\n if (typeof alignVal === \"number\") {\n return `${alignVal}px`;\n }\n\n switch (alignVal) {\n case ALIGN.CENTER:\n return \"50%\";\n case ALIGN.NEXT:\n return \"100%\";\n case ALIGN.PREV:\n return \"0%\";\n default:\n return alignVal;\n }\n};\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"./Flicking\";\nimport * as Core from \"./core\";\nimport * as Camera from \"./camera\";\nimport * as Control from \"./control\";\nimport * as Renderer from \"./renderer\";\nimport * as Constants from \"./const/external\";\nimport * as CFC from \"./cfc\";\nimport * as Utils from \"./utils\";\nimport { merge } from \"./utils\";\n\nmerge(Flicking, Core);\nmerge(Flicking, Camera);\nmerge(Flicking, Control);\nmerge(Flicking, Renderer);\nmerge(Flicking, Constants);\nmerge(Flicking, CFC);\nmerge(Flicking, Utils);\n\nexport default Flicking;\n"],"names":["CODE","WRONG_TYPE","ELEMENT_NOT_FOUND","VAL_MUST_NOT_NULL","NOT_ATTACHED_TO_FLICKING","WRONG_OPTION","INDEX_OUT_OF_RANGE","POSITION_NOT_REACHABLE","TRANSFORM_NOT_SUPPORTED","STOP_CALLED_BY_USER","ANIMATION_INTERRUPTED","ANIMATION_ALREADY_PLAYING","NOT_ALLOWED_IN_FRAMEWORK","NOT_INITIALIZED","NO_ACTIVE","NOT_ALLOWED_IN_VIRTUAL","MESSAGE","wrongVal","correctTypes","map","type","join","selector","val","name","optionName","min","max","position","EVENTS","READY","BEFORE_RESIZE","AFTER_RESIZE","HOLD_START","HOLD_END","MOVE_START","MOVE","MOVE_END","WILL_CHANGE","CHANGED","WILL_RESTORE","RESTORED","SELECT","NEED_PANEL","VISIBLE_CHANGE","REACH_EDGE","PANEL_CHANGE","ALIGN","PREV","CENTER","NEXT","DIRECTION","NONE","MOVE_TYPE","SNAP","FREE_SCROLL","STRICT","CLASS","VERTICAL","HIDDEN","DEFAULT_VIRTUAL","CIRCULAR_FALLBACK","LINEAR","BOUND","ORDER","LTR","RTL","merge","target","sources","_i","arguments","length","forEach","source","Object","keys","key","getElement","el","parent","targetEl","isString","parentEl","document","queryResult","querySelector","FlickingError","ERROR","nodeType","Node","ELEMENT_NODE","checkExistence","value","nameOnErrMsg","clamp","x","Math","getFlickingAttached","toArray","iterable","slice","call","parseAlign","align","size","alignPoint","parseArithmeticSize","parseBounce","bounce","parsedBounce","Array","isArray","parsedVal","cssValue","base","parsed","parseArithmeticExpression","percentage","absolute","cssRegex","idx","matchResult","exec","sign","unit","parsedValue","parseFloat","signMultiplier","parseCSSSizeValue","parsePanelAlign","panel","getDirection","start","end","parseElement","element","elements","tempDiv","createElement","innerHTML","push","apply","__spread","children","firstChild","removeChild","getMinusCompensatedIndex","includes","array","array_1","__values","array_1_1","done","next","circulatePosition","pos","offset","find","checker","array_2","array_2_1","findRight","findIndex","getProgress","prev","getStyle","window","getComputedStyle","currentStyle","setSize","_a","width","height","style","isBetween","circulateIndex","index","range","arr","i","getElementSize","horizontal","useFractionalSize","useOffset","baseSize","isBorderBoxSizing","boxSizing","border","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","sizeStr","setPrototypeOf","obj","proto","__proto__","_super","__extends","message","code","_this","prototype","Error","Viewport","flicking","_flicking","_el","_width","_height","_padding","left","right","top","bottom","_isBorderBoxSizing","__proto","defineProperty","get","newWidth","newHeight","resize","elStyle","AutoResizer","_onResize","resizeDebounce","maxResizeDebounce","_maxResizeDebounceTimer","setTimeout","_doScheduledResize","_resizeTimer","clearTimeout","_skipFirstResize","isFirstResize","_enabled","_resizeObserver","enable","viewport","disable","useResizeObserver","ResizeObserver","viewportSizeNot0","resizeObserver","observe","addEventListener","disconnect","removeEventListener","VanillaElementProvider","_element","_rendered","show","cameraEl","camera","parentElement","appendChild","hide","VirtualElementProvider","_virtualElement","nativeElement","visible","elIndex","_panel","elementIndex","virtualElements","virtual","init","VirtualManager","options","_renderPanel","renderPanel","_initialPanelCount","_b","initialPanelCount","_cache","_c","cache","_panelClass","_d","panelClass","_elements","set","renderer","panels","uncacheRenderResult","virtualEnabled","externalRenderer","renderExternal","_initVirtualElements","nativeEl","display","append","count","insert","prepend","batchInsert","hasDOMInElements","remove","batchRemove","deleteCount","cameraElement","panelsPerView","fragment","createDocumentFragment","newElements","panelEl","className","dataset","toString","EVENT","HOLD","CHANGE","RELEASE","ANIMATION_END","FINISH","POSITION_KEY","STATE_TYPE","State","_delta","_targetPanel","onEnter","prevState","onHold","ctx","onChange","onRelease","onAnimationEnd","onFinish","_moveToChangedPosition","axesEvent","transitTo","delta","AXES","prevPosition","newPosition","circularEnabled","lookAt","moveEvent","ComponentEvent","isTrusted","holding","direction","trigger","isCanceled","DISABLED","IdleState","animating","panelCount","holdStartEvent","HOLDING","controller","control","animatingContext","moveStartEvent","ANIMATING","HoldingState","_releaseEvent","inputEvent","offsetX","offsetY","DRAGGING","flick","setTo","IDLE","releaseEvent","srcEvent","clickedElement","touchEvent","touch","changedTouches","elementFromPoint","clientX","clientY","clickedPanel","panels_1","panels_1_1","contains","cameraPosition","clickedPanelPosition","DraggingState","destPos","duration","moveToPosition","err","AnimatingState","targetPanel","updateInput","changeOnHold","setActive","activePanel","DisabledState","stop","StateMachine","nextStateType","nextState","_state","fire","eventType","externalCtx","currentState","__assign","AxesController","_onAxesHold","_dragged","_onAxesChange","_panInput","isEnabled","_preventClickWhenDragged","e","preventDefault","stopPropagation","_resetInternalValues","_stateMachine","_axes","state","_animatingContext","axes","circular","axis","Axes","deceleration","interruptable","nested","easing","PanInput","inputType","threshold","iOSEdgeSwipeThreshold","preventDefaultOnDrag","scale","panelOrder","releaseOnScroll","connect","on","destroy","removePreventClickHandler","release","updateAnimation","stopAnimation","update","controlParams","axisManager","addPreventClickHandler","off","animateTo","Promise","reject","startPos","resolve","animate","resetContext","once","animationFinishHandler","interruptionHandler","updateDirection","panInput","Control","_controller","_activePanel","_getPosition","updatePosition","progressInPanel","clampToReachablePosition","resetActive","moveToPanel","_triggerIndexChangeEvent","_animateToPosition","newActivePanel","prevActivePanel","_nextPanel","updateAdaptiveHeight","prevIndex","prevPanel","copy","triggeringEvent","event","then","__awaiter","render","sent","catch","nearestAnchor","findNearestAnchor","removed","canReach","camPos_1","camRangeDiff","rangeDiff","possiblePositions","filter","reduce","nearestPosition","abs","Infinity","AnchorPoint","_index","_pos","SnapControl","_count","activeAnchor","findActiveAnchor","anchorAtCamera","snapThreshold","_calcSnapThreshold","posDelta","absPosDelta","snapDelta","targetAnchor","_findSnappedAnchor","_findAdjacentAnchor","currentPos","clampedPosition","anchorAtPosition","findAnchorIncludePosition","isFinite","anchors","anchorPoints","loopCount","floor","circularIndexOffset","anchorAtPositionIndex","anchor","loop","anchorIncludePosition","adjacentAnchor","getNextAnchor","getPrevAnchor","isNextDirection","panelSize","alignPos","alignPosition","margin","FreeControl","stopAtEdge","_stopAtEdge","panelRange","targetPos","StrictControl","_resetIndexRange","cameraRange","currentIndex","prevPanelIndex","nextPanelIndex","nextPanel","prevPos","nextPos","_indexRange","currentPanel","axesRange","indexRange","isOverThreshold","firstAnchor","lastAnchor","shouldBounceToFirst","shouldBounceToLast","isAdjacent","CameraMode","getAnchors","anchorsIncludingPosition","includePosition","nearest","prevDist","anchorIdx","dist","getCircularOffset","panelPos","canSee","visibleRange","isVisibleOnRange","LinearCameraMode","checkAvailability","getRange","firstPanel","getPanel","lastPanel","CircularCameraMode","firstPanelPrev","lastPanelNext","visibleSize","panelSizeSum","canSetCircularMode","every","camRange","minDist","minDistIndex","anchorCount","positionInRange","anchorInRange","possibleAnchors","toggled","toggledPrev","toggleDirection","toggledNext","_calcPanelAreaSum","visibleInCurrentRange","sum","sizeIncludingMargin","BoundCameraMode","viewportSize","panelAreaSize","isBiggerThanViewport","firstPos","lastPos","alignVal","reachablePanels","shouldPrependBoundAnchor","shouldAppendBoundAnchor","indexOffset_1","newAnchors","splice","nearestPanelAtMin","_findNearestPanel","panelAtMin","panelAtMax","panelIdx","Camera","_checkTranslateSupport","transforms","supportedStyle","documentElement","transformName","transforms_1","transforms_1_1","prefixedTransform","_transform","_align","_position","_alignPos","_offset","_circularOffset","_circularEnabled","_mode","_range","_visiblePanels","_anchors","NaN","nearestPanel","bounceSize","prevRange","nextRange","nextPosition","_panelOrder","viewportEl","firstElementChild","_updateMode","updatePanelOrder","_togglePanels","_refreshVisiblePanels","_checkNeedPanel","_checkReachEnd","updateOffset","applyTransform","getProgressInPanel","updateRange","updateCircularToggleDirection","updateAlignPos","updateAnchors","adaptive","unRenderedPanels","rendered","initialized","resetNeedPanelHistory","_needPanelTriggered","rendering","actualPosition","newVisiblePanels","prevVisiblePanels","added","visiblePanels","needPanelTriggered","cameraSize","needPanelThreshold","cameraPrev","cameraNext","newPos","wasBetweenRange","isBetweenRange","circularMode","fallbackMode","circularFallback","bound","toggle","some","isToggled","Renderer","strategy","_panels","_rendering","_strategy","panelAlign","_collectPanels","forceRenderAllPanels","markForShow","updatePanelSize","_updatePanelSizeByGrid","items","allPanelsInserted","batchInsertDefer","updateAfterPanelChange","prevFirstPanel","addedPanels","item","insertingIdx","panelsPushed","panelsInserted","_createPanel","_insertPanelElements","increaseIndex","allPanelsRemoved","batchRemoveDefer","removingIdx","panelsPulled","panelsRemoved","decreaseIndex","_removePanelElements","panelsAdded","_updateCameraAndControl","targetIndex","checkPanelContentsReady","checkingPanels","resizeOnContentsReady","hasContents","contentsReadyChecker","ImReady","loading","prevProgressInPanel","panelBehind","readyCount","totalCount","check","_showOnlyVisiblePanels","visibleIndexes","visibles","markForHide","referencePanel","gap","panelSizeObj","firstPanelSizeObj","noPanelStyleOverride","updatePanelSizes","_removeAllChildsFromCamera","nextSibling","nextSiblingElement","insertBefore","_afterRender","VanillaRenderer","updateRenderingPanels","renderPanels","_resetPanelElementOrder","_removeAllTextNodes","collectPanels","createPanel","reversedElements","getRenderingElementsByOrder","reverse","nextEl","nextElementSibling","childNodes","node","TEXT_NODE","ExternalRenderer","Panel","elementProvider","_elProvider","_removed","_loading","_resetInternalStates","_size","_margin","_toggled","_toggleDirection","cameraRangeDiff","progress","camPos","disappearPosNext","disappearPosPrev","checkingRange","_updateAlignPos","cached","marginLeft","marginRight","marginTop","marginBottom","includeMargin","includeRange","focus","moveTo","togglePosition","_togglePosition","prevToggled","camAlignPosition","camVisibleRange","camVisibleSize","minimumVisible","maximumVisible","shouldBeVisibleAtMin","shouldBeVisibleAtMax","NormalRenderingStrategy","providerCtor","_providerCtor","getRenderingIndexesByOrder","renderedPanels","notToggled","renderOnlyVisible","VirtualPanel","_cachedInnerHTML","virtualElCount","cacheRenderResult","result","newInnerHTML","VirtualRenderingStrategy","virtualManager","invisibleIndexes","sort","panel1","panel2","_","Flicking","root","defaultIndex","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","preventEventsBeforeInit","_r","_s","_t","pow","_u","_v","moveType","_w","_x","_y","_z","_0","preventClickOnDrag","_1","_2","disableOnInit","_3","_4","_5","_6","autoInit","_7","autoResize","_8","_9","_10","_11","_12","_13","_initialized","_plugins","_defaultIndex","_horizontal","_circular","_circularFallback","_bound","_adaptive","_panelsPerView","_noPanelStyleOverride","_resizeOnContentsReady","_nested","_virtual","_needPanelThreshold","_preventEventsBeforeInit","_deceleration","_duration","_easing","_inputType","_moveType","_threshold","_interruptable","_bounce","_iOSEdgeSwipeThreshold","_preventClickOnDrag","_preventDefaultOnDrag","_disableOnInit","_changeOnHold","_renderOnlyVisible","_autoInit","_autoResize","_useResizeObserver","_resizeDebounce","_maxResizeDebounce","_useFractionalSize","_externalRenderer","_renderExternal","_viewport","_autoResizer","_renderer","_createRenderer","_camera","_createCamera","_control","_createControl","_virtualManager","activeIndex","prevControl","newControl","prevVal","originalTrigger","_initialResize","_moveToInitialPanel","disableInput","plugin","enableInput","getStatus","includePanelHTML","visiblePanelsOnly","status","panelInfo","html","outerHTML","visibleOffset","setStatus","panelIndex","newCameraPos","addPlugins","plugins","removePlugins","foundIndex","prevWidth","prevHeight","sizeChanged","moveTypes","moveTypeStr","moveTypeOptions","JSON","stringify","console","warn","_createExternalRenderer","_createVanillaRenderer","rendererOptions","defaultPanel","initialPanel","VERSION","Component","withFlickingMethods","flickingName","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","args","getterDescriptor","diffResult","prevList","endIdx_1","prevIdx_1","removedIdx","ordered","__read","from","to","indexDiff","startIdx_1","prevIdx_2","addedElements_1","addedIdx","addedElements","startIdx","endIdx","elIdx","removedPanels","maintainedMap","maintained","current","list","firstPanelSize","cameraAlign","getCameraAlign","getPanelAlign","camPosition","Core","Constants","CFC","Utils"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;IAGG;IACH;IAEA;;;;;;;;;;;;;;;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} \ No newline at end of file diff --git a/dist/flicking.pkgd.min.js b/dist/flicking.pkgd.min.js deleted file mode 100644 index 7f80f91b83..0000000000 --- a/dist/flicking.pkgd.min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* -Copyright (c) 2015-present NAVER Corp. -name: @egjs/flicking -license: MIT -author: NAVER Corp. -repository: https://github.com/naver/egjs-flicking -version: 4.11.4 -*/ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n()}(this,(function(){"use strict";var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};function n(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var t=function(){return t=Object.assign||function(e){for(var n,t=1,i=arguments.length;t0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function s(){for(var e=[],n=0;n=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function c(){for(var e=[],n=0;nt){e=n+(e-t)%i}return e},ee=function(e,n){var t,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){var s=a.value;if(n(s))return s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null},ne=function(e,n){for(var t=0;t=n&&e<=t},ae=function(e,n){return e>=n?e%n:e<0?Z((e+1)%n-1,n):e},se=function(e){for(var n=new Array(e),t=0;t=0;t--){var i=e[t];if(n(i))return i}return null},findIndex:ne,getProgress:te,getStyle:ie,setSize:re,isBetween:oe,circulateIndex:ae,range:se,getElementSize:ue,setPrototypeOf:le},he=function(e){function t(n,i){var r=e.call(this,n)||this;return le(r,t.prototype),r.name="FlickingError",r.code=i,r}return n(t,e),t}(Error),fe=function(){function e(e,n){this._flicking=e,this._el=n,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(n,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),n.setSize=function(e){var n=e.width,t=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=n)if(J(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if(J(t))i.style.height=t;else{var s=o?t+r.top+r.bottom:t;i.style.height=s+"px"}this.resize()},n.resize=function(){var e=this._el,n=ie(e),t=this._flicking.useFractionalSize;this._width=ue({el:e,horizontal:!0,useFractionalSize:t,useOffset:!1,style:n}),this._height=ue({el:e,horizontal:!1,useFractionalSize:t,useOffset:!1,style:n}),this._padding={left:n.paddingLeft?parseFloat(n.paddingLeft):0,right:n.paddingRight?parseFloat(n.paddingRight):0,top:n.paddingTop?parseFloat(n.paddingTop):0,bottom:n.paddingBottom?parseFloat(n.paddingBottom):0},this._isBorderBoxSizing="border-box"===n.boxSizing},e}(),de=function(){function e(e){var n,t=this;this._onResize=function(){var e=t._flicking,n=e.resizeDebounce,i=e.maxResizeDebounce;n<=0?e.resize():(t._maxResizeDebounceTimer<=0&&i>0&&i>=n&&(t._maxResizeDebounceTimer=window.setTimeout(t._doScheduledResize,i)),t._resizeTimer>0&&(clearTimeout(t._resizeTimer),t._resizeTimer=0),t._resizeTimer=window.setTimeout(t._doScheduledResize,n))},this._doScheduledResize=function(){clearTimeout(t._resizeTimer),clearTimeout(t._maxResizeDebounceTimer),t._maxResizeDebounceTimer=-1,t._resizeTimer=-1,t._flicking.resize()},this._skipFirstResize=(n=!0,function(){n?n=!1:t._onResize()}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var n=e.prototype;return Object.defineProperty(n,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),n.enable=function(){var e=this._flicking,n=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var t=0!==n.width||0!==n.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);t.observe(e.viewport.element),this._resizeObserver=t}else window.addEventListener("resize",this._onResize);return this._enabled=!0,this},n.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResize),this._enabled=!1,this},e}(),ge=function(){function e(e){this._element=e,this._rendered=!0}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),n.show=function(e){var n=this.element,t=e.camera.element;n.parentElement!==t&&(t.appendChild(n),this._rendered=!0)},n.hide=function(e){var n=this.element,t=e.camera.element;n.parentElement===t&&(t.removeChild(n),this._rendered=!1)},e}(),pe=function(){function e(e){this._flicking=e}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(n,"_virtualElement",{get:function(){var e=this._flicking,n=this._panel.elementIndex;return e.virtual.elements[n]},enumerable:!1,configurable:!0}),n.init=function(e){this._panel=e},n.show=function(){},n.hide=function(){},e}(),ve=function(){function e(e,n){var t,i,r,o;this._flicking=e,this._renderPanel=null!==(t=null==n?void 0:n.renderPanel)&&void 0!==t?t:function(){return""},this._initialPanelCount=null!==(i=null==n?void 0:n.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==n?void 0:n.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==n?void 0:n.panelClass)&&void 0!==o?o:S.DEFAULT_VIRTUAL,this._elements=[]}var n=e.prototype;return Object.defineProperty(n,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach((function(e){return e.uncacheRenderResult()}))},enumerable:!1,configurable:!0}),Object.defineProperty(n,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var n=e.camera.children;this._elements=n.map((function(e){return{nativeElement:e,visible:!0}}))}},n.show=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!0,t.style.display&&(t.style.display="")},n.hide=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!1,t.style.display="none"},n.append=function(e){void 0===e&&(e=1);var n=this._flicking;return this.insert(n.panels.length,e)},n.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},n.insert=function(e,n){return void 0===n&&(n=1),n<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:se(n),hasDOMInElements:!1})},n.remove=function(e,n){return n<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!1})},n._initVirtualElements=function(){var e=this,n=this._flicking,t=n.camera.element,i=n.panelsPerView,r=document.createDocumentFragment();se(i+1).map((function(n){var t=document.createElement("div");return t.className=e._panelClass,t.dataset.elementIndex=n.toString(),t})).forEach((function(e){r.appendChild(e)})),t.appendChild(r)},e}();function _e(e,n){for(var t=e.length,i=0;i1?Ve(e[0],e[1]):function(n,t){return Ve(n,t,e[0])}}function He(e){e.subscribe=function(e,n){this[e],Xe(this,e).subscribe(n)},e.unsubscribe=function(e,n){var t,i=this;e?e in this&&Xe(this,e).unsubscribe(n):(t=Ge(this),Object.keys(t)).forEach((function(e){i.unsubscribe(e)}))}}function Be(e){He(e.prototype)}function Ge(e,n){var t,i;e[ke]||function(e){var n={};Object.defineProperty(e,ke,{get:function(){return n}})}(e);var r=e[ke];if(!n){var o=null===(i=null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.prototype)||void 0===i?void 0:i[De];o&&o.forEach((function(n){!(n in r)&&n in e&&e[n]}))}return r}function Xe(e,n,t){var i=Ge(e);return i[n]||(i[n]=function(e){return new ze(e)}(t)),i[n]}function We(e,n,t){var i=t.get;var r={configurable:!0,get:function(){var e,t=Ge(this,!0);return n in t||(t[n]=(e=i.bind(this),new Le(e))),Xe(this,n).current}};e[De]||(e[De]=[]);var o=e[De];return-1===o.indexOf(n)&&o.push(n),Object.defineProperty(e,n,r),r}var Ye=function(e,n){return Ye=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},Ye(e,n)};function Ue(e,n){function t(){this.constructor=e}Ye(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var qe,Ke=function(){return Ke=Object.assign||function(e){for(var n,t=1,i=arguments.length;t=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(n,t,a):r(n,t))||a);return o>3&&a&&Object.defineProperty(n,t,a),a}qe="undefined"==typeof window?{navigator:{userAgent:""}}:window;var Qe,Je=24,$e="left",en="right",nn="middle",tn={1:$e,2:nn,3:en},rn="ontouchstart"in qe&&"safari"===(void 0===Qe&&function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,n=e.brands||e.uaList;return!(!n||!n.length)}()?function(e){var n=navigator.userAgentData,t=(n.uaList||n.brands).slice(),i=e&&e.fullVersionList,r=n.mobile||!1,o=t[0],a=(e&&e.platform||n.platform||navigator.platform).toLowerCase(),s={name:o.brand,version:o.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!xe(Ae,t).brand||Ce(be())},u={name:"unknown",version:"-1",majorVersion:-1};s.webkit=!s.chromium&&_e(Re,(function(e){return Oe(t,e)}));var l=xe(Te,t);if(s.chromium=!!l.brand,s.chromiumVersion=l.version,!s.chromium){var c=xe(Re,t);s.webkit=!!c.brand,s.webkitVersion=c.version}var h=me(Ie,(function(e){return new RegExp(""+e.test,"g").exec(a)}));if(u.name=h?h.id:"",e&&(u.version=e.platformVersion),i&&i.length){var f=xe(we,i);s.name=f.brand||s.name,s.version=f.version||s.version}else{var d=xe(we,t);s.name=d.brand||s.name,s.version=d.brand&&e?e.uaFullVersion:d.version}return s.webkit&&(u.name=r?"ios":"mac"),"ios"===u.name&&s.webview&&(s.version="-1"),u.version=Ee(u.version),s.version=Ee(s.version),u.majorVersion=parseInt(u.version,10),s.majorVersion=parseInt(s.version,10),{browser:s,os:u,isMobile:r,isHints:!0}}():function(e){var n=be(e),t=!!/mobi/g.exec(n),i={name:"unknown",version:"-1",majorVersion:-1,webview:Ce(n),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=Pe(we,n),a=o.preset,s=o.version,u=Pe(Ie,n),l=u.preset,c=u.version,h=Pe(Te,n);if(i.chromium=!!h.preset,i.chromiumVersion=h.version,!i.chromium){var f=Pe(Re,n);i.webkit=!!f.preset,i.webkitVersion=f.version}return l&&(r.name=l.id,r.version=c,r.majorVersion=parseInt(c,10)),a&&(i.name=a.id,i.version=s,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:t,isHints:!1}}(Qe)).browser.name,on=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,n=["transform","webkitTransform","msTransform","mozTransform"],t=0,i=n.length;t]*)>/)){var i=document.createElement("div");i.innerHTML=e,t=sn(i.childNodes)}else t=sn(document.querySelectorAll(e));n||(t=t.length>=1?t[0]:void 0)}else e===qe?t=e:"value"in e||"current"in e?t=e.value||e.current:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in qe&&e instanceof jQuery||e.constructor.prototype.jquery?t=n?e.toArray():e.get(0):Array.isArray(e)&&(t=e.map((function(e){return un(e)})),n||(t=t.length>=1?t[0]:void 0)):t=e;return t},ln=qe.requestAnimationFrame||qe.webkitRequestAnimationFrame,cn=qe.cancelAnimationFrame||qe.webkitCancelAnimationFrame;if(ln&&!cn){var hn={},fn=ln;ln=function(e){var n=fn((function(t){hn[n]&&e(t)}));return hn[n]=!0,n},cn=function(e){delete hn[e]}}else ln&&cn||(ln=function(e){return qe.setTimeout((function(){e(qe.performance&&qe.performance.now&&qe.performance.now()||(new Date).getTime())}),16)},cn=qe.clearTimeout);var dn=function(e,n){var t={};for(var i in e)i&&(t[i]=n(e[i],i));return t},gn=function(e,n){var t={};for(var i in e)i&&n(e[i],i)&&(t[i]=e[i]);return t},pn=function(e,n){for(var t in e)if(t&&!n(e[t],t))return!1;return!0},vn=function(e,n){return pn(e,(function(e,t){return e===n[t]}))},_n={},mn=function(e,n){return _n[n]||(_n[n]=En(n)),_n[n](e)},bn=function(e,n){return e&&n?dn(e,(function(e,t){return mn(e,"number"==typeof n?n:n[t])})):e},yn=function(e){if(!isFinite(e))return 0;var n="".concat(e);if(n.indexOf("e")>=0){for(var t=0,i=1;Math.round(e*i)/i!==e;)i*=10,t++;return t}return n.indexOf(".")>=0?n.length-n.indexOf(".")-1:0},En=function(e){var n=e<1?Math.pow(10,yn(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},Pn=function(e,n,t){return t?!!(30===n||n&e&&t&e):!!(n&e)},xn=function(){function e(e){this._axes=e,this.holdingCount=0}var n=e.prototype;return n.hold=function(e,n){var t=this._getRoundPos(e).roundPos;this._axes.trigger(new g("hold",{pos:t,input:n.input||null,inputEvent:n.event||null,isTrusted:!0}))},n.triggerRelease=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration),this._axes.trigger(new g("release",Ke(Ke({},e),{bounceRatio:this._getBounceRatio(t)})))},n.triggerChange=function(e,n,t,i){var r=this;void 0===i&&(i=!1);var o=this.animationManager,a=o.axisManager,s=o.getEventInfo(),u=this._getRoundPos(e,n),l=u.roundPos,c=u.roundDepa,h=a.moveTo(l,c),f=(null==t?void 0:t.event)||(null==s?void 0:s.event)||null,d={pos:h.pos,delta:h.delta,bounceRatio:this._getBounceRatio(h.pos),holding:i,inputEvent:f,isTrusted:!!f,input:(null==t?void 0:t.input)||(null==s?void 0:s.input)||null,set:f?this._createUserControll(h.pos):function(){}},p=new g("change",d);return this._axes.trigger(p),Object.keys(h.pos).forEach((function(e){var n=h.pos[e];Xe(r._axes,e,n).current=n})),f&&a.set(d.set().destPos),!p.isCanceled()},n.triggerAnimationStart=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration);var r=new g("animationStart",e);return this._axes.trigger(r),!r.isCanceled()},n.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this._axes.trigger(new g("animationEnd",{isTrusted:e}))},n.triggerFinish=function(e){void 0===e&&(e=!1),this._axes.trigger(new g("finish",{isTrusted:e}))},n.setAnimationManager=function(e){this.animationManager=e},n.destroy=function(){this._axes.off()},n._createUserControll=function(e,n){void 0===n&&(n=0);var t={destPos:Ke({},e),duration:n};return function(e,n){return e&&(t.destPos=Ke({},e)),void 0!==n&&(t.duration=n),t}},n._getRoundPos=function(e,n){var t=this._axes.options.round;return{roundPos:bn(e,t),roundDepa:bn(n,t)}},n._getBounceRatio=function(e){return this._axes.axisManager.map(e,(function(e,n){return en.range[1]&&0!==n.bounce[1]?(e-n.range[1])/n.bounce[1]:0}))},Ze([Fe],e.prototype,"holdingCount",void 0),e}(),On=function(){function e(e){this._options=e,this._prevented=!1}var n=e.prototype;return n.isInterrupting=function(){return this._options.interruptable||this._prevented},n.isInterrupted=function(){return!this._options.interruptable&&this._prevented},n.setInterrupt=function(e){this._options.interruptable||(this._prevented=e)},e}(),wn=function(e,n,t,i){var r=e,o=[t[0]?n[0]:i?n[0]-i[0]:n[0],t[1]?n[1]:i?n[1]+i[1]:n[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r)},Tn=function(e,n){return en[1]},Rn=function(e,n,t){return t[1]&&e>n[1]||t[0]&&eo&&(i=(i-o)%a+r),t[0]&&e=16)&&(d&&(v=(n=[(l-d.deltaX)/p,(c-d.deltaY)/p])[0],_=n[1]),this._latestInterval={timestamp:g,deltaX:l,deltaY:c}),{srcEvent:e,scale:s,angle:u,center:o,deltaX:l,deltaY:c,offsetX:h,offsetY:f,velocityX:v,velocityY:_,preventSystemEvent:!0}},n._getDistance=function(e,n){var t=n.clientX-e.clientX,i=n.clientY-e.clientY;return Math.sqrt(t*t+i*i)},n._getButton=function(e){var n={1:$e,2:en,4:nn},t=this._isTouchEvent(e)?$e:n[e.buttons];return t||null},n._isTouchEvent=function(e){return e.type&&e.type.indexOf("touch")>-1},n._isValidButton=function(e,n){return n.indexOf(e)>-1},n._isValidEvent=function(e,n,t){return(!n||function(e,n){return!!(!n||n.indexOf("any")>-1||n.indexOf("none")>-1&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey||n.indexOf("shift")>-1&&e.shiftKey||n.indexOf("ctrl")>-1&&e.ctrlKey||n.indexOf("alt")>-1&&e.altKey||n.indexOf("meta")>-1&&e.metaKey)}(e,n))&&(!t||this._isValidButton(this._getButton(e),t))},n._preventMouseButton=function(e,n){n===en?qe.addEventListener("contextmenu",this._stopContextMenu):n===nn&&e.preventDefault()},e}(),Mn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown"],n.move=["mousemove"],n.end=["mouseup"],n}Ue(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?this.extendEvent(e):null},t.onEventEnd=function(){},t.onRelease=function(){this.prevEvent=null},t.getTouches=function(e,n){return n&&this._isValidButton(tn[e.which],n)&&-1===this.end.indexOf(e.type)?1:0},t._getScale=function(){return 1},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},n}(Sn),Nn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["touchstart"],n.move=["touchmove"],n.end=["touchend","touchcancel"],n}Ue(n,e);var t=n.prototype;return t.onEventStart=function(e,n){return this._baseTouches=e.touches,this._isValidEvent(e,n)?this.extendEvent(e):null},t.onEventMove=function(e,n){return this._isValidEvent(e,n)?this.extendEvent(e):null},t.onEventEnd=function(e){this._baseTouches=e.touches},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e){return e.touches.length},t._getScale=function(e){return 2!==e.touches.length||this._baseTouches.length<2?null:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1])},t._getCenter=function(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.touches[0].identifier!==n.touches[0].identifier?{x:0,y:0}:{x:e.touches[0].clientX-n.touches[0].clientX,y:e.touches[0].clientY-n.touches[0].clientY}},n}(Sn),jn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=kn?["pointerdown"]:["MSPointerDown"],n.move=kn?["pointermove"]:["MSPointerMove"],n.end=kn?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],n._firstInputs=[],n._recentInputs=[],n}Ue(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this._updatePointerEvent(e),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?(this._updatePointerEvent(e),this.extendEvent(e)):null},t.onEventEnd=function(e){this._removePointerEvent(e)},t.onRelease=function(){this.prevEvent=null,this._firstInputs=[],this._recentInputs=[]},t.getTouches=function(){return this._recentInputs.length},t._getScale=function(){return 2!==this._recentInputs.length?null:this._getDistance(this._recentInputs[0],this._recentInputs[1])/this._getDistance(this._firstInputs[0],this._firstInputs[1])},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.pointerId!==n.pointerId?{x:0,y:0}:{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},t._updatePointerEvent=function(e){var n=this,t=!1;this._recentInputs.forEach((function(i,r){i.pointerId===e.pointerId&&(t=!0,n._recentInputs[r]=e)})),t||(this._firstInputs.push(e),this._recentInputs.push(e))},t._removePointerEvent=function(e){this._firstInputs=this._firstInputs.filter((function(n){return n.pointerId!==e.pointerId})),this._recentInputs=this._recentInputs.filter((function(n){return n.pointerId!==e.pointerId}))},n}(Sn),zn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown","touchstart"],n.move=["mousemove","touchmove"],n.end=["mouseup","touchend","touchcancel"],n}Ue(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isTouchEvent(e)&&(this._baseTouches=e.touches),this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?this.extendEvent(e):null},t.onEventEnd=function(e){this._isTouchEvent(e)&&(this._baseTouches=e.touches)},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e,n){return this._isTouchEvent(e)?e.touches.length:this._isValidButton(tn[e.which],n)&&-1===this.end.indexOf(e.type)?1:0},t._getScale=function(e){return this._isTouchEvent(e)?2!==e.touches.length||this._baseTouches.length<2?1:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1]):this.prevEvent.scale},t._getCenter=function(e){return this._isTouchEvent(e)?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this,t=[e,this.prevEvent.srcEvent].map((function(e){return n._isTouchEvent(e)?{id:e.touches[0].identifier,x:e.touches[0].clientX,y:e.touches[0].clientY}:{id:null,x:e.clientX,y:e.clientY}})),i=t[0],r=t[1];return i.id===r.id?{x:i.x-r.x,y:i.y-r.y}:{x:0,y:0}},n}(Sn),Ln=function(e,n){return n.reduce((function(n,t,i){return e[i]&&(n[e[i]]=t),n}),{})};function Vn(e){return e.indexOf("touch")>-1&&{passive:!1}}var Fn,Hn=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager,o=e.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=n,this._interruptManager=t,this._eventManager=i,this._axisManager=r,this._animationManager=o}var n=e.prototype;return n.get=function(e){return this._axisManager.get(e.axes)},n.hold=function(e,n){if(!this._interruptManager.isInterrupted()&&e.axes.length){var t={input:e,event:n};this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(t),++this._eventManager.holdingCount,this._moveDistance||this._eventManager.hold(this._axisManager.get(),t),this._isOutside=this._axisManager.isOutside(e.axes),this._moveDistance=this._axisManager.get(e.axes)}},n.change=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&!this._axisManager.every(t,(function(e){return 0===e}))){var r=n.srcEvent?n.srcEvent:n;if(!r.__childrenAxesAlreadyChanged){var o,a=this._moveDistance||this._axisManager.get(e.axes);o=dn(a,(function(e,n){return e+(t[n]||0)})),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,(function(e,n){var t=n.circular,i=n.range;return t&&(t[0]||t[1])?An(e,i,t):e}))),this._isOutside&&this._axisManager.every(a,(function(e,n){return!Tn(e,n.range)}))&&(this._isOutside=!1),a=this._atOutside(a),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(t,a,o)||(r.__childrenAxesAlreadyChanged=!0);var s={input:e,event:n};if(i){var u=this._animationManager.getDuration(o,a);this._animationManager.animateTo(o,u,s)}else{!this._eventManager.triggerChange(o,a,s,!0)&&(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))}}}},n.release=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance){var r=n.srcEvent?n.srcEvent:n;r.__childrenAxesAlreadyReleased&&(t=t.map((function(){return 0})));var o=this._axisManager.get(e.axes),a=this._axisManager.get(),s=this._animationManager.getDisplacement(t),u=Ln(e.axes,s),l=this._axisManager.get(this._axisManager.map(u,(function(e,n,t){return n.circular&&(n.circular[0]||n.circular[1])?o[t]+e:wn(o[t]+e,n.range,n.circular,n.bounce)})));r.__childrenAxesAlreadyReleased=!0;var c=this._animationManager.getDuration(l,o,i);0===c&&(l=Ke({},a));var h={depaPos:a,destPos:l,duration:c,delta:this._axisManager.getDelta(a,l),inputEvent:n,input:e,isTrusted:!0};--this._eventManager.holdingCount,this._eventManager.triggerRelease(h),0===this._eventManager.holdingCount&&(this._moveDistance=null);var f=this._animationManager.getUserControl(h),d=vn(f.destPos,a),g={input:e,event:n};d||0===f.duration?(d||this._eventManager.triggerChange(f.destPos,a,g,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(g):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(f.destPos,f.duration,g)}},n._atOutside=function(e){var n=this;return this._isOutside?this._axisManager.map(e,(function(e,n){var t=n.range[0]-n.bounce[0],i=n.range[1]+n.bounce[1];return e>i?i:er?e:er?r+n._animationManager.interpolate(e-r,o[1]):e}))},n._isEndofAxis=function(e,n,t){return this._axisManager.every(n,(function(i,r,o){return 0===e[o]||n[o]===t[o]&&function(e,n,t,i){return!i[0]&&e===n[0]-t[0]||!i[1]&&e===n[1]+t[1]}(i,r.range,r.bounce,r.circular)}))},e}(),Bn=function(e,n,t){return Math.max(Math.min(e,t),n)},Gn=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager;this._options=n,this.interruptManager=t,this.eventManager=i,this.axisManager=r,this.animationEnd=this.animationEnd.bind(this)}var n=e.prototype;return n.getDuration=function(e,n,t){var i,r=this;if(void 0!==t)i=t;else{var o=dn(n,(function(n,t){return function(e,n){var t=Math.sqrt(e/n*2);return t<100?0:t}(Math.abs(n-e[t]),r._options.deceleration)}));i=Object.keys(o).reduce((function(e,n){return Math.max(e,o[n])}),-1/0)}return Bn(i,this._options.minimumDuration,this._options.maximumDuration)},n.getDisplacement=function(e){var n=Math.pow(e.reduce((function(e,n){return e+n*n}),0),1/e.length),t=Math.abs(n/-this._options.deceleration);return e.map((function(e){return e/2*t}))},n.stopAnimation=function(e){if(this._animateParam){var n=this.axisManager.get(),t=this.axisManager.map(n,(function(e,n){return An(e,n.range,n.circular)}));pn(t,(function(e,t){return n[t]===e}))||this.eventManager.triggerChange(t,n,e,!!e),this._animateParam=null,this._raf&&(i=this._raf,cn(i)),this._raf=null,this.eventManager.triggerAnimationEnd(!!(null==e?void 0:e.event))}var i},n.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},n.restore=function(e){var n=this.axisManager.get(),t=this.axisManager.map(n,(function(e,n){return Math.min(n.range[1],Math.max(n.range[0],e))}));this.stopAnimation(),this.animateTo(t,this.getDuration(n,t),e)},n.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var n=this.axisManager.filter(this.axisManager.get(),(function(e,n){return Rn(e,n.range,n.circular)}));Object.keys(n).length>0&&this.setTo(this.axisManager.map(n,(function(e,n){return An(e,n.range,n.circular)}))),this.interruptManager.setInterrupt(!1),this.eventManager.triggerAnimationEnd(!!e),this.axisManager.isOutside()?this.restore(e):this.finish(!!e)},n.finish=function(e){this._animateParam=null,this.interruptManager.setInterrupt(!1),this.eventManager.triggerFinish(e)},n.getUserControl=function(e){var n=e.setTo();return n.destPos=this.axisManager.get(n.destPos),n.duration=Bn(n.duration,this._options.minimumDuration,this._options.maximumDuration),n},n.animateTo=function(e,n,t){var i=this;this.stopAnimation();var r=this._createAnimationParam(e,n,t),o=Ke({},r.depaPos),a=this.eventManager.triggerAnimationStart(r),s=this.getUserControl(r);if(!a&&this.axisManager.every(s.destPos,(function(e,n){return Rn(e,n.range,n.circular)}))&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!vn(s.destPos,o)){var u=(null==t?void 0:t.event)||null;this._animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axisManager.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:(null==t?void 0:t.input)||null},(function(){return i.animationEnd()}))}},n.setTo=function(e,n){void 0===n&&(n=0);var t=Object.keys(e),i=this.axisManager.get(t);if(vn(e,i))return this;this.interruptManager.setInterrupt(!0);var r=gn(e,(function(e,n){return i[n]!==e}));return Object.keys(r).length?(r=this.axisManager.map(r,(function(e,n){var t=n.range,i=n.circular;return i&&(i[0]||i[1])?e:wn(e,t,i)})),vn(r,i)||(n>0?this.animateTo(r,n):(this.stopAnimation(),this.eventManager.triggerChange(r),this.finish(!1))),this):this},n.setBy=function(e,n){return void 0===n&&(n=0),this.setTo(dn(this.axisManager.get(Object.keys(e)),(function(n,t){return n+e[t]})),n)},n.setOptions=function(e){this._options=Ke(Ke({},this._options),e)},n._createAnimationParam=function(e,n,t){var i=this.axisManager.get(),r=e,o=(null==t?void 0:t.event)||null;return{depaPos:i,destPos:r,duration:Bn(n,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,r),inputEvent:o,input:(null==t?void 0:t.input)||null,isTrusted:!!o,done:this.animationEnd}},n._animateLoop=function(e,n){var t=this;if(e.duration){this._animateParam=Ke(Ke({},e),{startTime:(new Date).getTime()});var i=dn(e.destPos,(function(e){return e})),r=this._initState(this._animateParam),o=function(){t._raf=null;var e=t._animateParam,a=t._getNextState(r),s=!t.eventManager.triggerChange(a.pos,r.pos);if(r=a,a.finished)return e.destPos=t._getFinalPos(e.destPos,i),vn(e.destPos,t.axisManager.get(Object.keys(e.destPos)))||t.eventManager.triggerChange(e.destPos,a.pos),void n();s?t.finish(!1):t._raf=ln(o)};o()}else this.eventManager.triggerChange(e.destPos),n()},n._getFinalPos=function(e,n){var t=this,i=1e-6;return dn(e,(function(e,r){if(e>=n[r]-i&&e<=n[r]+i)return n[r];var o=t._getRoundUnit(e,r);return mn(e,o)}))},n._getRoundUnit=function(e,n){var t,i=this._options.round,r=null;if(!i){var o=this.axisManager.getAxisOptions(n);t=Math.max(yn(o.range[0]),yn(o.range[1]),yn(e)),r=1/Math.pow(10,t)}return r||i},e}(),Xn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._useDuration=!0,n}Ue(n,e);var t=n.prototype;return t.interpolate=function(e,n){var t=this._easing(1e-5)/1e-5;return this._easing(e/(n*t))*n},t.updateAnimation=function(e){var n,t=this._animateParam;if(t){var i=(new Date).getTime()-t.startTime,r=(null==e?void 0:e.destPos)||t.destPos,o=null!==(n=null==e?void 0:e.duration)&&void 0!==n?n:t.duration;if((null==e?void 0:e.restart)||o<=i)this.setTo(r,o-i);else{if(null==e?void 0:e.destPos){var a=this.axisManager.get();this._initialEasingPer=this._prevEasingPer,t.delta=this.axisManager.getDelta(a,r),t.destPos=r}if(null==e?void 0:e.duration){var s=(i+this._durationOffset)/t.duration;this._durationOffset=s*o-i,t.duration=o}}}},t._initState=function(e){return this._initialEasingPer=0,this._prevEasingPer=0,this._durationOffset=0,{pos:e.depaPos,easingPer:0,finished:!1}},t._getNextState=function(e){var n=this,t=this._animateParam,i=e.pos,r=t.destPos,o=dn(i,(function(e,n){return e<=r[n]?1:-1})),a=((new Date).getTime()-t.startTime+this._durationOffset)/t.duration,s=this._easing(a),u=this.axisManager.map(i,(function(e,u,l){var c=a>=1?r[l]:e+t.delta[l]*(s-n._prevEasingPer)/(1-n._initialEasingPer),h=An(c,u.range,u.circular);if(c!==h){var f=o[l]*(u.range[1]-u.range[0]);r[l]-=f,i[l]-=f}return h}));return this._prevEasingPer=s,{pos:u,easingPer:s,finished:s>=1}},t._easing=function(e){return e>1?1:this._options.easing(e)},n}(Gn),Wn=function(e){function n(n,t,i){void 0===n&&(n={}),void 0===t&&(t={}),void 0===i&&(i={});var r=e.call(this)||this;return r.axis=n,r._inputs=[],r.options=Ke({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null,nested:!1},t),Object.keys(i).forEach((function(e){r.axis[e].startPos=i[e]})),r.interruptManager=new On(r.options),r.axisManager=new In(r.axis),r.eventManager=new xn(r),r.animationManager=new Xn(r),r.inputObserver=new Hn(r),r.eventManager.setAnimationManager(r.animationManager),r.eventManager.triggerChange(r.axisManager.get()),r}Ue(n,e);var t=n.prototype;return Object.defineProperty(t,"holding",{get:function(){return this.eventManager.holdingCount>0},enumerable:!1,configurable:!0}),t.connect=function(e,n){var t;return t="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(n)&&this.disconnect(n),n.mapAxes(t),n.connect(this.inputObserver),this._inputs.push(n),this},t.disconnect=function(e){if(e){var n=this._inputs.indexOf(e);n>=0&&(this._inputs[n].disconnect(),this._inputs.splice(n,1))}else this._inputs.forEach((function(e){return e.disconnect()})),this._inputs=[];return this},t.get=function(e){return this.axisManager.get(e)},t.setTo=function(e,n){return void 0===n&&(n=0),this.animationManager.setTo(e,n),this},t.setBy=function(e,n){return void 0===n&&(n=0),this.animationManager.setBy(e,n),this},t.setOptions=function(e){return this.options=Ke(Ke({},this.options),e),this.animationManager.setOptions(e),this},t.setAxis=function(e){return this.axisManager.setAxis(e),this},t.stopAnimation=function(){return this.animationManager.stopAnimation(),this.animationManager.finish(!1),this},t.updateAnimation=function(e){return this.animationManager.updateAnimation(e),this},t.isBounceArea=function(e){return this.axisManager.isOutside(e)},t.destroy=function(){this.disconnect(),this.eventManager.destroy()},n.VERSION="3.9.1",n.TRANSFORM=on,n.DIRECTION_NONE=1,n.DIRECTION_LEFT=2,n.DIRECTION_RIGHT=4,n.DIRECTION_UP=8,n.DIRECTION_DOWN=16,n.DIRECTION_HORIZONTAL=6,n.DIRECTION_VERTICAL=Je,n.DIRECTION_ALL=30,Ze([We],n.prototype,"holding",null),n=Ze([Be],n)}(d),Yn=function(){function e(e,n){var t=this;this.axes=[],this.element=null,this._enabled=!1,this._activeEvent=null,this._atRightEdge=!1,this._rightEdgeTimer=0,this._dragged=!1,this._isOverThreshold=!1,this._preventClickWhenDragged=function(e){t._dragged&&(e.preventDefault(),e.stopPropagation()),t._dragged=!1},this._voidFunction=function(){},this.element=un(e),this.options=Ke({inputType:["touch","mouse","pointer"],inputKey:["any"],inputButton:[$e],scale:[1,1],thresholdAngle:45,threshold:0,preventClickOnDrag:!1,preventDefaultOnDrag:!1,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,touchAction:null},n),this._onPanstart=this._onPanstart.bind(this),this._onPanmove=this._onPanmove.bind(this),this._onPanend=this._onPanend.bind(this)}var n=e.prototype;return n.mapAxes=function(e){var n,t;this._direction=(n=!!e[0],t=!!e[1],n&&t?30:n?6:t?Je:1),this.axes=e},n.connect=function(e){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(e),this},n.disconnect=function(){return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),this._direction=1,this},n.destroy=function(){this.disconnect(),this.element=null},n.enable=function(){return this._enabled||(this._enabled=!0,this._originalCssProps=function(e,n,t){var i,r=((i={})[1]="auto",i[30]="none",i[24]="pan-x",i[6]="pan-y",i),o={};if(e&&e.style){var a=n.touchAction?n.touchAction:r[t],s=Ke(Ke({},an),{"touch-action":"none"===e.style["touch-action"]?"none":a});Object.keys(s).forEach((function(n){o[n]=e.style[n]})),Object.keys(s).forEach((function(n){e.style[n]=s[n]}))}return o}(this.element,this.options,this._direction)),this},n.disable=function(){var e,n;return this._enabled&&(this._enabled=!1,e=this._originalCssProps,n=!0,Object.keys(an).forEach((function(t){e&&e[t]===an[t]||(n=!1)})),n||function(e,n){e&&e.style&&n&&Object.keys(n).forEach((function(t){e.style[t]=n[t]}))}(this.element,this._originalCssProps)),this},n.isEnabled=function(){return this._enabled},n.release=function(){var e=this._activeEvent,n=e.prevEvent;return e.onRelease(),this._observer.release(this,n,[0,0]),this._detachWindowEvent(e),this},n._onPanstart=function(e){var n=this.options,t=n.inputKey,i=n.inputButton,r=n.preventDefaultOnDrag,o=this._activeEvent,a=o.onEventStart(e,t,i);if(a&&this._enabled&&!(o.getTouches(e,i)>1)&&!1!==a.srcEvent.cancelable){var s=this.options.iOSEdgeSwipeThreshold;this._dragged=!1,this._isOverThreshold=!1,this._observer.hold(this,a),this._atRightEdge=rn&&a.center.x>window.innerWidth-s,this._attachWindowEvent(o),r&&"touchstart"!==a.srcEvent.type&&a.srcEvent.preventDefault(),o.prevEvent=a}},n._onPanmove=function(e){var n=this,t=this.options,i=t.iOSEdgeSwipeThreshold,r=t.preventClickOnDrag,o=t.releaseOnScroll,a=t.inputKey,s=t.inputButton,u=t.threshold,l=t.thresholdAngle,c=this._activeEvent,h=c.onEventMove(e,a,s),f=c.getTouches(e,s);if(0===f||o&&h&&!h.srcEvent.cancelable)this._onPanend(e);else if(h&&this._enabled&&!(f>1)){var d=function(e,n){if(n<0||n>90)return 1;var t=Math.abs(e);return t>n&&t<180-n?Je:6}(h.angle,l),g=Pn(6,this._direction,d),p=Pn(Je,this._direction,d);if(c.prevEvent&&rn){if(h.center.x<0)return void this.release();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),h.deltaX<-i?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout((function(){return n.release()}),100))}var v=this._getDistance([h.deltaX,h.deltaY],[g,p]),_=this._getOffset([h.offsetX,h.offsetY],[g,p]),m=_.some((function(e){return 0!==e}));m&&(!1!==h.srcEvent.cancelable&&h.srcEvent.preventDefault(),h.srcEvent.stopPropagation()),h.preventSystemEvent=m,m&&(this._isOverThreshold||v>=u)&&(this._dragged=r,this._isOverThreshold=!0,this._observer.change(this,h,Ln(this.axes,_))),c.prevEvent=h}},n._onPanend=function(e){var n=this.options.inputButton,t=this._activeEvent;if(t.onEventEnd(e),this._enabled&&0===t.getTouches(e,n)){this._detachWindowEvent(t),clearTimeout(this._rightEdgeTimer);var i=t.prevEvent,r=this._isOverThreshold?this._getOffset([Math.abs(i.velocityX)*(i.offsetX<0?-1:1),Math.abs(i.velocityY)*(i.offsetY<0?-1:1)],[Pn(6,this._direction),Pn(Je,this._direction)]):[0,0];t.onRelease(),this._observer.release(this,i,r)}},n._attachWindowEvent=function(e){var n=this;null==e||e.move.forEach((function(e){window.addEventListener(e,n._onPanmove,Vn(e))})),null==e||e.end.forEach((function(e){window.addEventListener(e,n._onPanend,Vn(e))}))},n._detachWindowEvent=function(e){var n=this;null==e||e.move.forEach((function(e){window.removeEventListener(e,n._onPanmove)})),null==e||e.end.forEach((function(e){window.removeEventListener(e,n._onPanend)}))},n._getOffset=function(e,n){var t=this.options.scale;return[n[0]?e[0]*t[0]:0,n[1]?e[1]*t[1]:0]},n._getDistance=function(e,n){return Math.sqrt(Number(n[0])*Math.pow(e[0],2)+Number(n[1])*Math.pow(e[1],2))},n._attachElementEvent=function(e){var n=this,t=function(e){void 0===e&&(e=[]);var n=!1,t=!1,i=!1;return e.forEach((function(e){switch(e){case"mouse":t=!0;break;case"touch":n=Cn;break;case"pointer":i=Dn}})),i?new jn:n&&t?new zn:n?new Nn:t?new Mn:null}(this.options.inputType),i=this.element;if(t){if(!i)throw new Error("Element to connect input does not exist.");this._observer=e,this.enable(),this._activeEvent=t,i.addEventListener("click",this._preventClickWhenDragged,!0),t.start.forEach((function(e){i.addEventListener(e,n._onPanstart)})),t.move.forEach((function(e){i.addEventListener(e,n._voidFunction)}))}},n._detachElementEvent=function(){var e=this,n=this._activeEvent,t=this.element;t&&(t.removeEventListener("click",this._preventClickWhenDragged,!0),null==n||n.start.forEach((function(n){t.removeEventListener(n,e._onPanstart)})),null==n||n.move.forEach((function(n){t.removeEventListener(n,e._voidFunction)}))),this.disable(),this._observer=null},e}(),Un=Wn,qn={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},Kn="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(Fn||(Fn={}));var Zn=function(){function e(){this._delta=0,this._targetPanel=null}var n=e.prototype;return Object.defineProperty(n,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(n,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),n.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},n.onHold=function(e){},n.onChange=function(e){},n.onRelease=function(e){},n.onAnimationEnd=function(e){},n.onFinish=function(e){},n._moveToChangedPosition=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.delta[Kn];if(r){this._delta+=r;var o=n.camera,a=o.position,s=t.pos[Kn],u=n.circularEnabled?$(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new g(I.MOVE,{isTrusted:t.isTrusted,holding:this.holding,direction:q(0,t.delta[Kn]),axesEvent:t});n.trigger(l),l.isCanceled()&&(o.lookAt(a),i(Fn.DISABLED))}},e}(),Qn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!1,n}n(t,e);var i=t.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.renderer.panelCount<=0)i(Fn.DISABLED);else{var r=new g(I.HOLD_START,{axesEvent:t});n.trigger(r),r.isCanceled()?i(Fn.DISABLED):i(Fn.HOLDING)}},i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control.controller.animatingContext,o=new g(I.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:q(r.start,r.end),axesEvent:t});n.trigger(o),o.isCanceled()?i(Fn.DISABLED):i(Fn.ANIMATING).onChange(e)},t}(Zn),Jn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!1,n._releaseEvent=null,n}n(t,e);var i=t.prototype;return i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.inputEvent,o=n.horizontal?r.offsetX:r.offsetY,a=new g(I.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:q(0,-o),axesEvent:t});n.trigger(a),a.isCanceled()?i(Fn.DISABLED):i(Fn.DRAGGING).onChange(e)},i.onRelease=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.trigger(new g(I.HOLD_END,{axesEvent:t})),0!==t.delta.flick)return t.setTo({flick:n.camera.position},0),void i(Fn.IDLE);this._releaseEvent=t},i.onFinish=function(e){var n,t,i=e.flicking;if((0,e.transitTo)(Fn.IDLE),this._releaseEvent){var r,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var s=a.changedTouches[0];r=document.elementFromPoint(s.clientX,s.clientY)}else r=a.target;var u=i.renderer.panels,l=null;try{for(var c=o(u),h=c.next();!h.done;h=c.next()){var f=h.value;if(f.contains(r)){l=f;break}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(t=c.return)&&t.call(c)}finally{if(n)throw n.error}}if(l){var d=i.camera.position,p=l.position;i.trigger(new g(I.SELECT,{index:l.index,panel:l,direction:q(d,p)}))}}},t}(Zn),$n=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(e){var n,t=e.flicking,i=e.axesEvent,r=e.transitTo;if(t.trigger(new g(I.HOLD_END,{axesEvent:i})),t.renderer.panelCount<=0)r(Fn.IDLE);else{r(Fn.ANIMATING);var o=t.control,a=i.destPos[Kn],s=Math.max(i.duration,t.duration);try{o.moveToPosition(a,s,i)}catch(e){r(Fn.IDLE),i.setTo(((n={})[Kn]=t.camera.position,n),0)}}},t}(Zn),et=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=this._targetPanel,o=n.control;this._delta=0,n.control.updateInput(),n.changeOnHold&&r&&o.setActive(r,o.activePanel,t.isTrusted);var a=new g(I.HOLD_START,{axesEvent:t});n.trigger(a),a.isCanceled()?i(Fn.DISABLED):i(Fn.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control,o=r.controller.animatingContext;i(Fn.IDLE),n.trigger(new g(I.MOVE_END,{isTrusted:t.isTrusted,direction:q(o.start,o.end),axesEvent:t}));var a=this._targetPanel;a&&r.setActive(a,r.activePanel,t.isTrusted)},t}(Zn),nt=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onAnimationEnd=function(e){(0,e.transitTo)(Fn.IDLE)},i.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t(Fn.IDLE)},i.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t(Fn.IDLE)},t}(Zn),tt=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case Fn.IDLE:t=new Qn;break;case Fn.HOLDING:t=new Jn;break;case Fn.DRAGGING:t=new $n;break;case Fn.ANIMATING:t=new et;break;case Fn.DISABLED:t=new nt}return t.onEnter(e._state),e._state=t,e._state},this._state=new Qn}var n=e.prototype;return Object.defineProperty(n,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),n.fire=function(e,n){var i=this._state,r=t(t({},n),{transitTo:this.transitTo});switch(e){case qn.HOLD:i.onHold(r);break;case qn.CHANGE:i.onChange(r);break;case qn.RELEASE:i.onRelease(r);break;case qn.ANIMATION_END:i.onAnimationEnd(r);break;case qn.FINISH:i.onFinish(r)}},e}(),it=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var n;e._dragged=!!(null===(n=e._panInput)||void 0===n?void 0:n.isEnabled())},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new tt}var n=e.prototype;return Object.defineProperty(n,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panInput",{get:function(){return this._panInput},enumerable:!1,configurable:!0}),Object.defineProperty(n,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(n,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var n=e.axis[Kn];return{range:{min:n.range[0],max:n.range[1]},circular:n.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"enabled",{get:function(){var e,n;return null!==(n=null===(e=this._panInput)||void 0===e?void 0:e.isEnabled())&&void 0!==n&&n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([Kn])[Kn])&&void 0!==n?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.axis[Kn].range)&&void 0!==n?n:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis[Kn].bounce},enumerable:!1,configurable:!0}),n.init=function(e){var n,t=this;this._flicking=e,this._axes=new Un(((n={})[Kn]={range:[0,0],circular:!1,bounce:[0,0]},n),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new Yn(e.viewport.element,{inputType:e.inputType,threshold:1,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,preventDefaultOnDrag:e.preventDefaultOnDrag,scale:e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1],releaseOnScroll:!0});var i=this._axes;i.connect(e.horizontal?[Kn,""]:["",Kn],this._panInput);var r=function(n){var r=qn[n];i.on(r,(function(n){t._stateMachine.fire(r,{flicking:e,axesEvent:n})}))};for(var o in qn)r(o);return this},n.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},n.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},n.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},n.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},n.updateAnimation=function(e,n){var i,r;return this._animatingContext=t(t({},this._animatingContext),{end:e}),null===(r=this._axes)||void 0===r||r.updateAnimation({destPos:(i={},i[Kn]=e,i),duration:n}),this},n.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},n.update=function(e){var n,t=H(this._flicking),i=t.camera,r=this._axes,o=r.axis[Kn];return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=X(t.bounce,i.size),r.axisManager.set(((n={})[Kn]=e.position,n)),this},n.addPreventClickHandler=function(){var e=H(this._flicking),n=this._axes,t=e.camera.element;return n.on(qn.HOLD,this._onAxesHold),n.on(qn.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},n.removePreventClickHandler=function(){var e=H(this._flicking),n=this._axes,t=e.camera.element;return n.off(qn.HOLD,this._onAxesHold),n.off(qn.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},n.animateTo=function(e,n,t){var i,r=this,o=this._axes,a=this._stateMachine.state;if(!o)return Promise.reject(new he(b,p.NOT_ATTACHED_TO_FLICKING));var s=o.get([Kn])[Kn];if(s===e){var u=H(this._flicking);return u.camera.lookAt(e),a.targetPanel&&u.control.setActive(a.targetPanel,u.control.activePanel,null!==(i=null==t?void 0:t.isTrusted)&&void 0!==i&&i),Promise.resolve()}this._animatingContext={start:s,end:e,offset:0};return new Promise((function(i,a){var s=function(){o.off(qn.HOLD,u),i()},u=function(){o.off(qn.FINISH,s),a(new he(w,p.ANIMATION_INTERRUPTED))};o.once(qn.FINISH,s),o.once(qn.HOLD,u),function(){var i,a;o.once(qn.FINISH,(function(){r._animatingContext={start:0,end:0,offset:0}})),t?t.setTo(((i={})[Kn]=e,i),n):o.setTo(((a={})[Kn]=e,a),n)}()}))},n.updateDirection=function(){var e=H(this._flicking),n=this._axes,t=this._panInput;n.disconnect(t),n.connect(e.horizontal?[Kn,""]:["",Kn],t),t.options.scale=e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1]},n._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),rt=function(){function e(){this._flicking=null,this._controller=new it,this._activePanel=null}var n=e.prototype;return Object.defineProperty(n,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activeIndex",{get:function(){var e,n;return null!==(n=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==n?n:-1},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(n,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._controller.init(e),this},n.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},n.enable=function(){return this._controller.enable(),this},n.disable=function(){return this._controller.disable(),this},n.release=function(){return this._controller.release(),this},n.updateAnimation=function(e,n,t){var i=this._controller.state,r=this._getPosition(e,null!=t?t:k.NONE);return i.targetPanel=e,this._controller.updateAnimation(r,n),this},n.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},n.updatePosition=function(e){var n=H(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},n.updateInput=function(){var e=H(this._flicking).camera;return this._controller.update(e.controlParams),this},n.resetActive=function(){return this._activePanel=null,this},n.moveToPanel=function(e,n){var t=n.duration,o=n.direction,a=void 0===o?k.NONE:o,s=n.axesEvent;return i(this,void 0,void 0,(function(){var n;return r(this,(function(i){return n=this._getPosition(e,a),this._triggerIndexChangeEvent(e,e.position,s,a),[2,this._animateToPosition({position:n,duration:t,newActivePanel:e,axesEvent:s})]}))}))},n.setActive=function(e,n,t){var i,r=H(this._flicking);this._activePanel=e,this._nextPanel=null,r.camera.updateAdaptiveHeight(),e!==n?r.trigger(new g(I.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==n?void 0:n.index)&&void 0!==i?i:-1,prevPanel:n,isTrusted:t,direction:n?q(n.position,e.position):k.NONE})):r.trigger(new g(I.RESTORED,{isTrusted:t}))},n.copy=function(e){this._flicking=e._flicking,this._activePanel=e._activePanel,this._controller=e._controller},n._triggerIndexChangeEvent=function(e,n,t,i){var r,o=H(this._flicking),a=e!==this._activePanel?I.WILL_CHANGE:I.WILL_RESTORE,s=o.camera,u=this._activePanel,l=new g(a,{index:e.index,panel:e,isTrusted:(null==t?void 0:t.isTrusted)||!1,direction:null!=i?i:q(null!==(r=null==u?void 0:u.position)&&void 0!==r?r:s.position,n)});if(this._nextPanel=e,o.trigger(l),l.isCanceled())throw new he(O,p.STOP_CALLED_BY_USER)},n._animateToPosition=function(e){var n=e.position,t=e.duration,o=e.newActivePanel,a=e.axesEvent;return i(this,void 0,void 0,(function(){var e,s,u=this;return r(this,(function(l){return e=H(this._flicking),s=function(){return u._controller.animateTo(n,t,a)},this._controller.state.targetPanel=o,t<=0?[2,s()]:[2,s().then((function(){return i(u,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,e.renderer.render()];case 1:return n.sent(),[2]}}))}))})).catch((function(e){if(!(a&&e instanceof he&&e.code===p.ANIMATION_INTERRUPTED))throw e}))]}))}))},n._getPosition=function(e,n){void 0===n&&(n=k.NONE);var t=H(this._flicking),i=t.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new he(P(e.position),p.POSITION_NOT_REACHABLE);if(i.canReach(e)){if(t.circularEnabled){var a=this._controller.position,s=i.rangeDiff,u=[r,r+s,r-s].filter((function(e){return n===k.NONE||(n===k.PREV?e<=a:e>=a)}));r=u.reduce((function(e,n){return Math.abs(a-n)=l&&f>0)u=this._findSnappedAnchor(e,a);else{if(!(h>=i.threshold&&h>0))return this.moveToPanel(a.panel,{duration:n,axesEvent:t});u=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(u.panel,e,t),this._animateToPosition({position:r.clampToReachablePosition(u.position),duration:n,newActivePanel:u.panel,axesEvent:t})},i._findSnappedAnchor=function(e,n){var t=H(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new he(P(e),p.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=t.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.indexn.position&&s.index===n.index?c+=1:(en.index||s.positiono&&g.indexn.index&&(v-=1),new ot({index:g.index,position:g.position+v*i.rangeDiff,panel:g.panel})}return l[F(n.index+Math.sign(e-o)*r,0,l.length-1)]},i._findAdjacentAnchor=function(e,n,t){var i,r=H(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==t.position)return o}return null!==(i=n>0?r.getNextAnchor(t):r.getPrevAnchor(t))&&void 0!==i?i:t},i._calcSnapThreshold=function(e,n,t){var i=n>t.position,r=t.panel,o=r.size,a=r.alignPosition;return Math.max(e,i?o-a+r.margin.next:a+r.margin.prev)},t}(rt),st=function(e){function t(n){var t=(void 0===n?{}:n).stopAtEdge,i=void 0===t||t,r=e.call(this)||this;return r._stopAtEdge=i,r}n(t,e);var i=t.prototype;return Object.defineProperty(i,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),i.updatePosition=function(e){var n=H(this._flicking).camera,t=this._activePanel;if(t){var i=t.range,r=i.min+(i.max-i.min)*e;n.lookAt(n.clampToReachablePosition(r))}},i.moveToPosition=function(e,n,t){var i=H(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new he(P(e),p.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,t),this._animateToPosition({position:this._stopAtEdge?r:e,duration:n,newActivePanel:a,axesEvent:t})},t}(rt),ut=function(e){function t(n){var t=(void 0===n?{}:n).count,i=void 0===t?1:t,r=e.call(this)||this;return r.setActive=function(n,t,i){e.prototype.setActive.call(r,n,t,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}n(t,e);var o=t.prototype;return Object.defineProperty(o,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),o.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},o.updateInput=function(){var e,n=H(this._flicking),t=n.camera,i=n.renderer,r=this._controller,o=t.controlParams,a=this._count,s=r.state.animating?null===(e=t.findNearestAnchor(t.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var u=o.range,l=s.position,c=s.index,h=i.panelCount,f=c-a,d=c+a;f<0&&(f=n.circularEnabled?Z((f+1)%h-1,h):F(f,0,h-1)),d>=h&&(d=n.circularEnabled?d%h:F(d,0,h-1));var g=i.panels[f],p=i.panels[d],v=Math.max(g.position,u.min),_=Math.min(p.position,u.max);return v>l&&(v-=t.rangeDiff),__&&(o.position-=t.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:g.index,max:p.index},this},o.moveToPanel=function(n,t){return i(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){return i=H(this._flicking),o=i.camera,this._controller.update(o.controlParams),[2,e.prototype.moveToPanel.call(this,n,t)]}))}))},o.moveToPosition=function(e,n,t){var i,r=H(this._flicking),o=r.camera,a=null!==(i=this._nextPanel)&&void 0!==i?i:this._activePanel,s=this._controller.range,u=this._indexRange,l=o.range,c=this._controller.state,h=F(o.clampToReachablePosition(e),s[0],s[1]),f=o.findAnchorIncludePosition(h);if(!f||!a)return Promise.reject(new he(P(e),p.POSITION_NOT_REACHABLE));var d,g,v=a.position,_=r.animating?c.delta:e-o.position,m=Math.abs(_)>=r.threshold,b=e>v?o.getNextAnchor(f):o.getPrevAnchor(f),y=o.anchorPoints,E=y[0],x=y[y.length-1],O=e<=l.min&&oe(E.panel.index,u.min,u.max),w=e>=l.max&&oe(x.panel.index,u.min,u.max),T=b&&(u.min<=u.max?oe(b.index,u.min,u.max):b.index>=u.min||b.index<=u.max);if(O||w){var R=et)return n[i-1];t=o}return n[n.length-1]},n.clampToReachablePosition=function(e){var n=this._flicking.camera.range;return F(e,n.min,n.max)},n.getCircularOffset=function(){return 0},n.canReach=function(e){var n=this._flicking.camera.range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},n.canSee=function(e){var n=this._flicking.camera.visibleRange;return e.isVisibleOnRange(n.min,n.max)},e}(),ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){return!0},i.getRange=function(){var e,n,t=this._flicking.renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(n=null==r?void 0:r.position)&&void 0!==n?n:0}},t}(ct),ft=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer.panels;if(n.length<=0)return!1;var t=n[0],i=n[n.length-1],r=t.range.min-t.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return n.every((function(e){return s-e.size>=a}))},i.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var n=e[0],t=e[e.length-1];return{min:n.range.min-n.margin.prev,max:t.range.max+t.margin.next}},i.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new ot({index:n,position:e.position,panel:e})}))},i.findNearestAnchor=function(e){var n=this._flicking.camera,t=n.anchorPoints;if(t.length<=0)return null;for(var i=n.range,r=1/0,o=-1,a=0;a0&&(n===i.min||n===i.max)){var l=[u,new ot({index:0,position:r[0].position+o,panel:r[0].panel}),new ot({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));u=l.reduce((function(e,t){return e&&Math.abs(e.position-n)i.max){c=Math.floor((n-i.max)/o)+1;return new ot({index:u.index,position:u.position+o*c,panel:u.panel})}return u},i.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var n=e.panels.filter((function(e){return e.toggled})),t=n.filter((function(e){return e.toggleDirection===k.PREV})),i=n.filter((function(e){return e.toggleDirection===k.NEXT}));return this._calcPanelAreaSum(t)-this._calcPanelAreaSum(i)},i.clampToReachablePosition=function(e){return e},i.canReach=function(e){return!e.removed},i.canSee=function(n){var t=this._flicking.camera,i=t.range,r=t.rangeDiff,o=t.visibleRange,a=e.prototype.canSee.call(this,n);return o.mini.max?a||n.isVisibleOnRange(o.min-r,o.max-r):a},i._calcPanelAreaSum=function(e){return e.reduce((function(e,n){return e+n.sizeIncludingMargin}),0)},t}(ct),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer,t=n.getPanel(0),i=n.getPanel(n.panelCount-1);if(!t||!i)return!1;var r=e.camera.size,o=t.range.min;return r0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,u=r.map((function(e,n){return new ot({index:n+s,position:e.position,panel:e})}));return o&&u.splice(0,0,new ot({index:0,position:i.min,panel:t[r[0].index-1]})),a&&u.push(new ot({index:u.length,position:i.max,panel:t[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,t),c=l.index===t.length-1?l.prev():l,h=c.next();return[new ot({index:0,position:i.min,panel:c}),new ot({index:1,position:i.max,panel:h})]}return[new ot({index:0,position:i.min,panel:this._findNearestPanel(i.min,t)})]},i.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints;return r.length<=0?null:n<=i.min?r[0]:n>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,n)},i._findNearestPanel=function(e,n){for(var t=1/0,i=0;it)return n[i-1];t=o}return n[n.length-1]},t}(ct),gt=function(){function e(e,n){var t=this,i=(void 0===n?{}:n).align,r=void 0===i?C.CENTER:i;this._checkTranslateSupport=function(){var e,n,i=document.documentElement.style,r="";try{for(var a=o(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),s=a.next();!s.done;s=a.next()){var u=s.value;u in i&&(r=u)}}catch(n){e={error:n}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}if(!r)throw new he(x,p.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"children",{get:function(){return B(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking,n=this._position+this._offset,t=this.findNearestAnchor(this._position);if(!e||!t)return NaN;var i=t.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(n===r)return i.index;if(nr&&(h-=l),i.index-1+te(n,h,r)}var f=i.next(),d=f?f.position+f.offset:u+o[1];return d0||o.length>0)&&n.renderer.render().then((function(){n.trigger(new g(I.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:t}))}))},n._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var n=H(this._flicking),t=n.renderer.panels;if(t.length<=0)return e.prev||(n.trigger(new g(I.NEED_PANEL,{direction:k.PREV})),e.prev=!0),void(e.next||(n.trigger(new g(I.NEED_PANEL,{direction:k.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=n.needPanelThreshold,s=i-this._alignPos,u=s+r,l=t[0],c=t[t.length-1];if(!e.prev)(s<=l.range.min+a||i<=o.min+a)&&(n.trigger(new g(I.NEED_PANEL,{direction:k.PREV})),e.prev=!0);if(!e.next)(u>=c.range.max-a||i>=o.max-a)&&(n.trigger(new g(I.NEED_PANEL,{direction:k.NEXT})),e.next=!0)}},n._checkReachEnd=function(e,n){var t=H(this._flicking),i=this._range,r=e>i.min&&ei.min&&n0},t.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach((function(e){e.loader&&e.loader.destroy()})),this.elementInfos=[]},t.destroy=function(){this.clear(),this.off()},t.getLoader=function(e,n){var t=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=n.prefix,a=Object.keys(r);if(r[i])return new r[i](e,n);var s=new Lt(e,n),u=Rt(e.querySelectorAll(a.join(", ")));s.setHasLoading(u.some((function(e){return At(e,o)})));var l=!1,c=this.clone().on("error",(function(e){s.onError(e.target)})).on("ready",(function(){s.onReady(l)}));return s.on("requestChildren",(function(){var n=Dt(e,a,t.options.prefix);c.check(n).on("preReady",(function(e){(l=e.isReady)||s.onPreReady()}))})).on("reqeustReadyChildren",(function(){c.check(u)})).on("requestDestroy",(function(){c.destroy()})),s},t.clone=function(){return new n(mt({},this.options))},t.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount=1)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},n.EVENTS=["loadedmetadata","error"],n}(zt),Bt=function(e){function n(n){return void 0===n&&(n={}),e.call(this,mt({loaders:{img:Ft,video:Ht}},n))||this}return _t(n,e),n}(Vt),Gt=function(){function e(e){var n=e.align,t=void 0===n?C.CENTER:n,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,this._align=t,this._strategy=i}var n=e.prototype;return Object.defineProperty(n,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendering",{get:function(){return this._rendering},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e;var n=U(e);this._panels.forEach((function(e){e.align=n}))},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._collectPanels(),this},n.destroy=function(){this._flicking=null,this._panels=[]},n.getPanel=function(e){return this._panels[e]||null},n.forceRenderAllPanels=function(){return this._panels.forEach((function(e){return e.markForShow()})),Promise.resolve()},n.updatePanelSize=function(){var e=H(this._flicking),n=this._panels;if(n.length<=0)return this;if(e.panelsPerView>0){var t=n[0];t.resize(),this._updatePanelSizeByGrid(t,n)}else e.panels.forEach((function(e){return e.resize()}));return this},n.batchInsert=function(){for(var e=[],n=0;n0){var f=o||h[0].resize();e._updatePanelSizeByGrid(f,h)}else h.forEach((function(e){return e.resize()}));return c.forEach((function(e){e.increaseIndex(h.length),e.updatePosition()})),s(n,h)}),[])},n.batchRemove=function(){for(var e=[],n=0;na.length-1&&(l=a.length-1),o.moveToPanel(a[l],{duration:0}).catch((function(){}))}else o.moveToPanel(u,{duration:0}).catch((function(){}));i.camera.updateOffset(),(e.length>0||n.length>0)&&(i.trigger(new g(I.PANEL_CHANGE,{added:e,removed:n})),this.checkPanelContentsReady(s(e,n)))},n.checkPanelContentsReady=function(e){var n=this,t=H(this._flicking),i=t.resizeOnContentsReady,r=this._panels;if(i&&!t.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return e.element&&!!e.element.querySelector("img, video")}(e)}))).length<=0)){var o=new Bt;e.forEach((function(e){e.loading=!0})),o.on("readyElement",(function(i){if(n._flicking){var a=e[i.index],s=t.camera,u=t.control,l=u.activePanel?s.getProgressInPanel(u.activePanel):0;a.loading=!1,a.resize(),r.slice(a.index+1).forEach((function(e){return e.updatePosition()})),t.initialized&&(s.updateRange(),s.updateOffset(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()})),o.on("preReady",(function(e){n._flicking&&n.render(),e.readyCount===e.totalCount&&o.destroy()})),o.on("ready",(function(){n._flicking&&n.render(),o.destroy()})),o.check(e.map((function(e){return e.element})))}}},n._updateCameraAndControl=function(){var e=H(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateOffset(),n.updateAnchors(),n.resetNeedPanelHistory(),t.updateInput()},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in t||n.loading?n.markForShow():e.holding||n.markForHide()}))},n._updatePanelSizeByGrid=function(e,n){var i=H(this._flicking),r=i.panelsPerView;if(r<=0)throw new he(y("panelsPerView",r),p.WRONG_OPTION);if(!(n.length<=0)){var o=(i.camera.size-(e.margin.prev+e.margin.next)*(r-1))/r,a=i.horizontal?{width:o}:{height:o},s=t({size:o,margin:e.margin},!i.horizontal&&{height:e.height});i.noPanelStyleOverride||this._strategy.updatePanelSizes(i,a),i.panels.forEach((function(e){return e.resize(s)}))}},n._removeAllChildsFromCamera=function(){for(var e=H(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},n._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=H(this._flicking).camera.element,i=(null==n?void 0:n.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),t.insertBefore(r,i)},n._removePanelElements=function(e){var n=H(this._flicking).camera.element;e.forEach((function(e){n.removeChild(e.element)}))},n._afterRender=function(){H(this._flicking).camera.applyTransform()},e}(),Xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var o=t.prototype;return o.render=function(){return i(this,void 0,void 0,(function(){var e,n;return r(this,(function(t){return e=H(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),this._afterRender(),[2]}))}))},o._collectPanels=function(){var e=H(this._flicking),n=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,n.children)},o._createPanel=function(e,n){return this._strategy.createPanel(e,n)},o._resetPanelElementOrder=function(){var e=H(this._flicking),n=e.camera.element,t=this._strategy.getRenderingElementsByOrder(e).reverse();t.forEach((function(e,i){var r=t[i-1]?t[i-1]:null;e.nextElementSibling!==r&&n.insertBefore(e,r)}))},o._removeAllTextNodes=function(){var e=H(this._flicking).camera.element;B(e.childNodes).forEach((function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)}))},t}(Gt),Wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i._removePanelElements=function(e){},i._removeAllChildsFromCamera=function(){},t}(Gt),Yt=function(){function e(e){var n=e.index,t=e.align,i=e.flicking,r=e.elementProvider;this._index=n,this._flicking=i,this._elProvider=r,this._align=t,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(n,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(n,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){var e=this._toggleDirection,n=this._flicking.camera.rangeDiff;return e!==k.NONE&&this._toggled?e===k.PREV?-n:n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(n,"outsetProgress",{get:function(){var e=this.position+this.offset,n=this._alignPos,t=this._flicking.camera,i=t.position;if(i===e)return 0;if(i=i.max)return 0;var a=n;return i.min>r&&(a-=i.min-r),i.max=r.min&&e<=r.max},n.isVisibleOnRange=function(e,n){var t=this.range;return n>t.min&&ee?i>=e&&i<=n&&(this._toggled=t===k.NEXT):i<=e&&i>=n&&(this._toggled=t!==k.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=k.NONE,this._togglePosition=0,this._toggled=!1,this;var n=e.camera,t=n.range,i=n.alignPosition,r=n.visibleRange,o=r.max-r.min,a=t.min-i,s=t.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=k.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):l?(this._toggleDirection=k.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=k.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=G(this._align,this._size)},n._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=k.NONE},e}(),Ut=function(){function e(e){var n=e.providerCtor;this._providerCtor=n}var n=e.prototype;return n.renderPanels=function(){},n.getRenderingIndexesByOrder=function(e){var n=e.renderer.panels.filter((function(e){return e.rendered})),t=n.filter((function(e){return e.toggled&&e.toggleDirection===k.PREV})),i=n.filter((function(e){return e.toggled&&e.toggleDirection===k.NEXT}));return s(t,n.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},n.getRenderingElementsByOrder=function(e){var n=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].element}))},n.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},n.collectPanels=function(e,n){var t=this,i=U(e.renderer.align);return n.map((function(n,r){return new Yt({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})}))},n.createPanel=function(e,n){return new Yt(t(t({},n),{elementProvider:new this._providerCtor(e)}))},n.updatePanelSizes=function(e,n){e.panels.forEach((function(e){return e.setSize(n)}))},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in i||n.loading?n.markForShow():e.holding||n.markForHide()})),t.updateOffset()},e}(),qt=function(e){function t(n){var t=e.call(this,n)||this;return n.elementProvider.init(t),t._elProvider=n.elementProvider,t._cachedInnerHTML=null,t}n(t,e);var i=t.prototype;return Object.defineProperty(i,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(i,"elementIndex",{get:function(){var e=this._flicking,n=e.panelsPerView+1,t=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===k.NEXT?i+t:i-t),ae(i,n)},enumerable:!1,configurable:!0}),i.cacheRenderResult=function(e){this._cachedInnerHTML=e},i.uncacheRenderResult=function(){this._cachedInnerHTML=null},i.render=function(){var e=this._flicking.virtual,n=e.renderPanel,t=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||n(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,t&&this.cacheRenderResult(r))},i.increaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,n)},i.decreaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,n)},t}(Yt),Kt=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=se(e.panelsPerView+1);t.forEach((function(e){var t=e.elementIndex;e.render(),n.show(t),i[t]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){n.hide(e)}))},n.getRenderingIndexesByOrder=function(e){var n=e.virtual,i=s(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)}));return i.length<=0?n.elements.map((function(e,n){return n})):s(i.map((function(e){return e.elementIndex})),n.elements.map((function(e,n){return t(t({},e),{idx:n})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},n.getRenderingElementsByOrder=function(e){var n=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].nativeElement}))},n.updateRenderingPanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),t.updateOffset()},n.collectPanels=function(e){var n=U(e.renderer.align);return se(e.virtual.initialPanelCount).map((function(t){return new qt({index:t,elementProvider:new pe(e),align:n,flicking:e})}))},n.createPanel=function(e,n){return new qt(t(t({},n),{elementProvider:new pe(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach((function(e){re(e.nativeElement,n)})),e.panels.forEach((function(e){return e.setSize(n)}))},e}(),Zt={__proto__:null,Renderer:Gt,VanillaRenderer:Xt,ExternalRenderer:Wt,NormalRenderingStrategy:Ut,VirtualRenderingStrategy:Kt},Qt=function(e){function o(n,t){var i=void 0===t?{}:t,r=i.align,o=void 0===r?C.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,u=i.horizontal,l=void 0===u||u,c=i.circular,h=void 0!==c&&c,f=i.circularFallback,d=void 0===f?M.LINEAR:f,g=i.bound,p=void 0!==g&&g,v=i.adaptive,_=void 0!==v&&v,m=i.panelsPerView,b=void 0===m?-1:m,y=i.noPanelStyleOverride,E=void 0!==y&&y,P=i.resizeOnContentsReady,x=void 0!==P&&P,O=i.nested,w=void 0!==O&&O,T=i.needPanelThreshold,R=void 0===T?0:T,A=i.preventEventsBeforeInit,I=void 0===A||A,k=i.deceleration,D=void 0===k?.0075:k,S=i.duration,N=void 0===S?500:S,j=i.easing,z=void 0===j?function(e){return 1-Math.pow(1-e,3)}:j,V=i.inputType,F=void 0===V?["mouse","touch"]:V,H=i.moveType,B=void 0===H?"snap":H,G=i.threshold,X=void 0===G?40:G,W=i.interruptable,Y=void 0===W||W,U=i.bounce,q=void 0===U?"20%":U,K=i.iOSEdgeSwipeThreshold,Z=void 0===K?30:K,Q=i.preventClickOnDrag,J=void 0===Q||Q,$=i.preventDefaultOnDrag,ee=void 0!==$&&$,ne=i.disableOnInit,te=void 0!==ne&&ne,ie=i.changeOnHold,re=void 0!==ie&&ie,oe=i.renderOnlyVisible,ae=void 0!==oe&&oe,se=i.virtual,ue=void 0===se?null:se,le=i.autoInit,ce=void 0===le||le,he=i.autoResize,ge=void 0===he||he,pe=i.useResizeObserver,_e=void 0===pe||pe,me=i.resizeDebounce,be=void 0===me?0:me,ye=i.maxResizeDebounce,Ee=void 0===ye?100:ye,Pe=i.useFractionalSize,xe=void 0!==Pe&&Pe,Oe=i.externalRenderer,we=void 0===Oe?null:Oe,Te=i.renderExternal,Re=void 0===Te?null:Te,Ae=e.call(this)||this;return Ae._initialized=!1,Ae._plugins=[],Ae._align=o,Ae._defaultIndex=s,Ae._horizontal=l,Ae._circular=h,Ae._circularFallback=d,Ae._bound=p,Ae._adaptive=_,Ae._panelsPerView=b,Ae._noPanelStyleOverride=E,Ae._resizeOnContentsReady=x,Ae._nested=w,Ae._virtual=ue,Ae._needPanelThreshold=R,Ae._preventEventsBeforeInit=I,Ae._deceleration=D,Ae._duration=N,Ae._easing=z,Ae._inputType=F,Ae._moveType=B,Ae._threshold=X,Ae._interruptable=Y,Ae._bounce=q,Ae._iOSEdgeSwipeThreshold=Z,Ae._preventClickOnDrag=J,Ae._preventDefaultOnDrag=ee,Ae._disableOnInit=te,Ae._changeOnHold=re,Ae._renderOnlyVisible=ae,Ae._autoInit=ce,Ae._autoResize=ge,Ae._useResizeObserver=_e,Ae._resizeDebounce=be,Ae._maxResizeDebounce=Ee,Ae._useFractionalSize=xe,Ae._externalRenderer=we,Ae._renderExternal=Re,Ae._viewport=new fe(Ae,L(n)),Ae._autoResizer=new de(Ae),Ae._renderer=Ae._createRenderer(),Ae._camera=Ae._createCamera(),Ae._control=Ae._createControl(),Ae._virtualManager=new ve(Ae,ue),Ae._autoInit&&Ae.init(),Ae}n(o,e);var a=o.prototype;return Object.defineProperty(a,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(a,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(a,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(a,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(a,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(a,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(a,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(a,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(a,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(a,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e,this._control.controller.updateDirection(),this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circular",{get:function(){return this._circular},set:function(e){this._circular=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bound",{get:function(){return this._bound},set:function(e){this._bound=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e,e&&this._renderer.checkPanelContentsReady(this._renderer.panels)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"nested",{get:function(){return this._nested},set:function(e){this._nested=e;var n=this._control.controller.axes;n&&(n.options.nested=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e;var n=this._control.controller.axes;n&&(n.options.deceleration=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"easing",{get:function(){return this._easing},set:function(e){this._easing=e;var n=this._control.controller.axes;n&&(n.options.easing=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e;var n=this._control.controller.panInput;n&&(n.options.inputType=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e;var n=this._control,t=this._createControl(),i=n.activePanel;t.copy(n);var r=i?this._camera.getProgressInPanel(i):0;this._control=t,this._control.updatePosition(r),this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e;var n=this._control.controller.axes;n&&(n.options.interruptable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e,this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e;var n=this._control.controller.panInput;n&&(n.options.iOSEdgeSwipeThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var n=this._control.controller;e?n.addPreventClickHandler():n.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventDefaultOnDrag",{get:function(){return this._preventDefaultOnDrag},set:function(e){this._preventDefaultOnDrag=e;var n=this._control.controller.panInput;n&&(n.options.preventDefaultOnDrag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e,this._renderer.render()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,e?this._autoResizer.enable():this._autoResizer.disable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useFractionalSize",{get:function(){return this._useFractionalSize},enumerable:!1,configurable:!0}),Object.defineProperty(a,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),a.init=function(){var e=this;if(this._initialized)return Promise.resolve();var n=this._camera,t=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit;return n.init(),r.init(),t.init(this),i.init(this),a&&(this.trigger=function(){return e}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),t.checkPanelContentsReady(t.panels),this._initialized=!0,t.render().then((function(){e._plugins.forEach((function(n){return n.init(e)})),a&&(e.trigger=o),e.trigger(new g(I.READY))}))},a.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach((function(e){return e.destroy()})),this._initialized=!1},a.prev=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.prev())||void 0===t?void 0:t.index)&&void 0!==i?i:-1,e,k.PREV)},a.next=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.next())||void 0===t?void 0:t.index)&&void 0!==i?i:this._renderer.panelCount,e,k.NEXT)},a.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=k.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new he(T,p.ANIMATION_ALREADY_PLAYING)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:n,direction:t})):Promise.reject(new he(E(e,0,r-1),p.INDEX_OUT_OF_RANGE))},a.updateAnimation=function(e,n,t){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new he(E(e,0,r-1),p.INDEX_OUT_OF_RANGE);this._control.updateAnimation(o,n,t)}},a.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},a.getPanel=function(e){return this._renderer.getPanel(e)},a.enableInput=function(){return this._control.enable(),this},a.disableInput=function(){return this._control.disable(),this},a.getStatus=function(e){var n,t,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,u=i.includePanelHTML,l=void 0!==u&&u,c=i.visiblePanelsOnly,h=void 0!==c&&c,f=this._camera,d={panels:(h?this.visiblePanels:this.panels).map((function(e){var n={index:e.index};return l&&(n.html=e.element.outerHTML),n}))};if(o&&(d.index=this.index),s){var g=f.findNearestAnchor(f.position);g&&(d.position={panel:g.panel.index,progressInPanel:f.getProgressInPanel(g.panel)})}if(h){var p=this.visiblePanels;d.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return d},a.setStatus=function(e){var n;if(!this._initialized)throw new he(A,p.NOT_INITIALIZED);var t=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(n=o[0])||void 0===n?void 0:n.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:K(o.map((function(e){return e.html}))),hasDOMInElements:!0})),null!=t){var u=r?t-r:t;this.moveTo(u,0).catch((function(){}))}if(i&&this._moveType===D.FREE_SCROLL){var l=i.panel,c=i.progressInPanel,h=(u=r?l-r:l,a.panels[u].range),f=h.min+(h.max-h.min)*c;s.moveToPosition(f,0).catch((function(){}))}},a.addPlugins=function(){for(var e,n=this,t=[],i=0;i=0&&(n.destroy(),e._plugins.splice(t,1))})),this},a.resize=function(){return i(this,void 0,void 0,(function(){var e,n,t,i,o,a,s,u,l,c,h;return r(this,(function(r){switch(r.label){case 0:return e=this._viewport,n=this._renderer,t=this._camera,i=this._control,o=i.activePanel,a=e.width,s=e.height,u=o?t.getProgressInPanel(o):0,this.trigger(new g(I.BEFORE_RESIZE,{width:a,height:s,element:e.element})),e.resize(),[4,n.forceRenderAllPanels()];case 1:return r.sent(),this._initialized?(n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateAdaptiveHeight(),t.updatePanelOrder(),t.updateOffset(),[4,n.render()]):[2];case 2:return r.sent(),this._initialized?(i.animating||(i.updatePosition(u),i.updateInput()),l=e.width,c=e.height,h=l!==a||c!==s,this.trigger(new g(I.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:a,height:s},sizeChanged:h,element:e.element})),[2]):[2]}}))}))},a.append=function(e){return this.insert(this._renderer.panelCount,e)},a.prepend=function(e){return this.insert(0,e)},a.insert=function(e,n){if(this._renderExternal)throw new he(R,p.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:K(n),hasDOMInElements:!0})},a.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new he(R,p.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!0})},a._createControl=function(){var e,n=this._moveType,t=Object.keys(D).map((function(e){return D[e]})),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!Q(t,i))throw new he(y("moveType",JSON.stringify(n)),p.WRONG_OPTION);switch(i){case D.SNAP:return new at(r);case D.FREE_SCROLL:return new st(r);case D.STRICT:return new ut(r)}},a._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new gt(this,{align:this._align})},a._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},a._createExternalRenderer=function(){var e=this._renderExternal,n=e.renderer,i=e.rendererOptions;return new n(t({align:this._align},i))},a._createVanillaRenderer=function(){var e=this.virtualEnabled;return new Xt({align:this._align,strategy:e?new Kt:new Ut({providerCtor:ge})})},a._moveToInitialPanel=function(){var e=this._renderer,n=this._control,t=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=t.findNearestAnchor(i.position),o=r&&i.index!==r.panel.index?r.panel:i;if(n.setActive(o,null,!1),!r)throw new he(P(o.position),p.POSITION_NOT_REACHABLE);var a=o.position;t.canReach(o)||(a=r.position),t.lookAt(a),n.updateInput(),t.updateOffset()}},a._initialResize=function(){var e=this._viewport,n=this._renderer,t=this._camera,i=this._control;this.trigger(new g(I.BEFORE_RESIZE,{width:0,height:0,element:e.element})),e.resize(),n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateOffset(),i.updateInput();var r=e.width,o=e.height,a=0!==r||0!==o;this.trigger(new g(I.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:0,height:0},sizeChanged:a,element:e.element}))},o.VERSION="4.11.4",o}(d),Jt=function(e,n,t,i,r){return e.batchInsertDefer.apply(e,s(n.added.slice(i,r).map((function(e,n){return{index:e,elements:[t[n]],hasDOMInElements:!1}}))))},$t=function(e,n,t){var i=e.panels.slice(n,t);return e.batchRemoveDefer({index:n,deleteCount:i.length,hasDOMInElements:!1})},ei=function(e){var n="object"==typeof e?e.camera:e;return ti(n)},ni=function(e){var n="object"==typeof e?e.panel:e;return Y(ti(n))},ti=function(e){if("number"==typeof e)return e+"px";switch(e){case C.CENTER:return"50%";case C.NEXT:return"100%";case C.PREV:return"0%";default:return e}},ii={__proto__:null,withFlickingMethods:function(e,n){[d.prototype,Qt.prototype].forEach((function(t){Object.getOwnPropertyNames(t).filter((function(n){return!e[n]&&0!==n.indexOf("_")&&"constructor"!==n})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(t,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,t=[],i=0;i0){var c=-1,h=-1;n.removed.forEach((function(e){c<0&&(c=e),h>=0&&e!==h-1?(l.push.apply(l,s($t(i,h,c+1))),c=e,h=e):h=e,o.splice(e,1)})),l.push.apply(l,s($t(i,h,c+1)))}if(n.ordered.forEach((function(e){var n=a(e,2),t=n[0],i=n[1],o=r.splice(t,1)[0];r.splice(i,0,o)})),n.ordered.length>0&&(r.forEach((function(e,n){var t=n-e.index;t>0?e.increaseIndex(t):e.decreaseIndex(-t)})),r.sort((function(e,n){return e.index-n.index})),r.forEach((function(e){e.updatePosition()}))),n.added.length>0){var f=-1,d=-1,g=t.slice(o.length);n.added.forEach((function(e,t){f<0&&(f=t),d>=0&&e!==d+1?(u.push.apply(u,s(Jt(i,n,g,f,t+1))),f=-1,d=-1):d=e})),f>=0&&u.push.apply(u,s(Jt(i,n,g,f)))}(n.added.length>0||n.removed.length>0)&&i.updateAfterPanelChange(u,l)},getRenderingPanels:function(e,n){var t=n.removed.reduce((function(e,n){return e[n]=!0,e}),{}),i=n.maintained.reduce((function(e,n){var t=a(n,2),i=t[0],r=t[1];return e[i]=r,e}),{});return s(e.panels.filter((function(e){return!t[e.index]})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)})).map((function(e){return n.list[i[e.index]]})),n.added.map((function(e){return n.list[e]})))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=C.CENTER),void 0===n&&(n=!0);var i=ei(e),r=ni(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}};return z(Qt,{__proto__:null,Viewport:fe,FlickingError:he,AnchorPoint:ot,VirtualManager:ve,VanillaElementProvider:ge,VirtualElementProvider:pe,Panel:Yt,VirtualPanel:qt}),z(Qt,pt),z(Qt,lt),z(Qt,Zt),z(Qt,j),z(Qt,ii),z(Qt,ce),Qt})); -//# sourceMappingURL=flicking.pkgd.min.js.map diff --git a/dist/flicking.pkgd.min.js.map b/dist/flicking.pkgd.min.js.map deleted file mode 100644 index 11a1561214..0000000000 --- a/dist/flicking.pkgd.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"flicking.pkgd.min.js","sources":["../src/const/error.ts","../src/const/external.ts","../src/utils.ts","../src/core/FlickingError.ts","../src/core/Viewport.ts","../src/core/AutoResizer.ts","../src/core/panel/provider/VanillaElementProvider.ts","../src/core/panel/provider/VirtualElementProvider.ts","../src/core/VirtualManager.ts","../src/control/states/State.ts","../src/const/axes.ts","../src/control/states/IdleState.ts","../src/control/states/HoldingState.ts","../src/control/states/DraggingState.ts","../src/control/states/AnimatingState.ts","../src/control/states/DisabledState.ts","../src/control/StateMachine.ts","../src/control/AxesController.ts","../src/control/Control.ts","../src/core/AnchorPoint.ts","../src/control/SnapControl.ts","../src/control/FreeControl.ts","../src/control/StrictControl.ts","../src/camera/mode/CameraMode.ts","../src/camera/mode/LinearCameraMode.ts","../src/camera/mode/CircularCameraMode.ts","../src/camera/mode/BoundCameraMode.ts","../src/camera/Camera.ts","../src/renderer/Renderer.ts","../src/renderer/VanillaRenderer.ts","../src/renderer/ExternalRenderer.ts","../src/core/panel/Panel.ts","../src/renderer/strategy/NormalRenderingStrategy.ts","../src/core/panel/VirtualPanel.ts","../src/renderer/strategy/VirtualRenderingStrategy.ts","../src/Flicking.ts","../src/cfc/sync.ts","../src/cfc/getDefaultCameraTransform.ts","../src/cfc/withFlickingMethods.ts","../src/cfc/getRenderingPanels.ts","../src/index.umd.ts"],"sourcesContent":["/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/restrict-template-expressions */\n\n/**\n * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.\n * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.\n * @name ERROR_CODE\n * @constant\n * @type object\n * @property {number} WRONG_TYPE Parameter type is wrong패러미터의 타입이 잘못되었을 경우\n * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우\n * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`값을 기대했으나, `null`이나 `undefined`를 받은 경우\n * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)\n * @property {number} WRONG_OPTION One of the options is wrong옵션들 중 잘못된 값이 있을 때\n * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range인덱스가 주어진 범위를 벗어난 경우\n * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우\n * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)\n * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.사용자에 의해 이벤트의 `stop()`이 호출된 경우\n * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.사용자에 의해 애니메이션이 중단된 경우\n * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.현재 애니메이션이 이미 진행중인 경우\n * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)\n * 프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우\n * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우\n * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다\n * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabledvirtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우\n */\nexport const CODE = {\n WRONG_TYPE: 0,\n ELEMENT_NOT_FOUND: 1,\n VAL_MUST_NOT_NULL: 2,\n NOT_ATTACHED_TO_FLICKING: 3,\n WRONG_OPTION: 4,\n INDEX_OUT_OF_RANGE: 5,\n POSITION_NOT_REACHABLE: 6,\n TRANSFORM_NOT_SUPPORTED: 7,\n STOP_CALLED_BY_USER: 8,\n ANIMATION_INTERRUPTED: 9,\n ANIMATION_ALREADY_PLAYING: 10,\n NOT_ALLOWED_IN_FRAMEWORK: 11,\n NOT_INITIALIZED: 12,\n NO_ACTIVE: 13,\n NOT_ALLOWED_IN_VIRTUAL: 14\n} as const;\n\nexport const MESSAGE = {\n WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `\"${type}\"`).join(\" or \")}.`,\n ELEMENT_NOT_FOUND: (selector: string) => `Element with selector \"${selector}\" not found.`,\n VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,\n NOT_ATTACHED_TO_FLICKING: \"This module is not attached to the Flicking instance. \\\"init()\\\" should be called first.\",\n WRONG_OPTION: (optionName: string, val: any) => `Option \"${optionName}\" is not in correct format, given: ${val}`,\n INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index \"${val}\" is out of range: should be between ${min} and ${max}.`,\n POSITION_NOT_REACHABLE: (position: number) => `Position \"${position}\" is not reachable.`,\n TRANSFORM_NOT_SUPPORTED: \"Browser does not support CSS transform.\",\n STOP_CALLED_BY_USER: \"Event stop() is called by user.\",\n ANIMATION_INTERRUPTED: \"Animation is interrupted by user input.\",\n ANIMATION_ALREADY_PLAYING: \"Animation is already playing.\",\n NOT_ALLOWED_IN_FRAMEWORK: \"This behavior is not allowed in the frameworks like React, Vue, or Angular.\",\n NOT_INITIALIZED: \"Flicking is not initialized yet, call init() first.\",\n NO_ACTIVE: \"There's no active panel that Flicking has selected. This may be due to the absence of any panels.\",\n NOT_ALLOWED_IN_VIRTUAL: \"This behavior is not allowed when the virtual option is enabled\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nexport { CODE as ERROR_CODE } from \"./error\";\n\n/**\n * Event type object with event name strings of {@link Flicking}\n * @ko {@link Flicking}의 이벤트 이름 문자열들을 담은 객체\n * @type {object}\n * @property {\"holdStart\"} HOLD_START holdStart eventholdStart 이벤트\n * @property {\"holdEnd\"} HOLD_END holdEnd eventholdEnd 이벤트\n * @property {\"moveStart\"} MOVE_START moveStart eventmoveStart 이벤트\n * @property {\"move\"} MOVE move eventmove 이벤트\n * @property {\"moveEnd\"} MOVE_END moveEnd eventmoveEnd 이벤트\n * @property {\"willChange\"} WILL_CHANGE willChange eventwillChange 이벤트\n * @property {\"changed\"} CHANGED changed eventchanged 이벤트\n * @property {\"willRestore\"} WILL_RESTORE willRestore eventwillRestore 이벤트\n * @property {\"restored\"} RESTORED restored eventrestored 이벤트\n * @property {\"select\"} SELECT select eventselect 이벤트\n * @property {\"needPanel\"} NEED_PANEL needPanel eventneedPanel 이벤트\n * @property {\"panelChange\"} PANEL_CHANGE panelChange eventpanelChange 이벤트\n * @example\n * ```ts\n * import { EVENTS } from \"@egjs/flicking\";\n * EVENTS.MOVE_START; // \"moveStart\"\n * ```\n */\nexport const EVENTS = {\n READY: \"ready\",\n BEFORE_RESIZE: \"beforeResize\",\n AFTER_RESIZE: \"afterResize\",\n HOLD_START: \"holdStart\",\n HOLD_END: \"holdEnd\",\n MOVE_START: \"moveStart\",\n MOVE: \"move\",\n MOVE_END: \"moveEnd\",\n WILL_CHANGE: \"willChange\",\n CHANGED: \"changed\",\n WILL_RESTORE: \"willRestore\",\n RESTORED: \"restored\",\n SELECT: \"select\",\n NEED_PANEL: \"needPanel\",\n VISIBLE_CHANGE: \"visibleChange\",\n REACH_EDGE: \"reachEdge\",\n PANEL_CHANGE: \"panelChange\"\n} as const;\n\n/**\n * An object with all possible predefined literal string for the {@link Flicking#align align} option\n * @ko {@link Flicking#align align} 옵션에 사용되는 미리 정의된 리터럴 상수들을 담고 있는 객체\n * @type {object}\n * @property {\"prev\"} PREV left/top align좌/상 정렬\n * @property {\"center\"} CENTER center align중앙 정렬\n * @property {\"next\"} NEXT right/bottom align우/하 정렬\n */\nexport const ALIGN = {\n PREV: \"prev\",\n CENTER: \"center\",\n NEXT: \"next\"\n} as const;\n\n/**\n * An object of directions\n * @ko 방향을 나타내는 값들을 담고 있는 객체\n * @type {object}\n * @property {\"PREV\"} PREV \"left\" when {@link Flicking#horizontal horizontal} is true, and \"top\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 왼쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 위쪽을 의미합니다\n * @property {\"NEXT\"} NEXT \"right\" when {@link Flicking#horizontal horizontal} is true, and \"bottom\" when {@link Flicking#horizontal horizontal} is false\n * {@link Flicking#horizontal horizontal}가 `true`일 경우 오른쪽, {@link Flicking#horizontal horizontal}가 `false`일 경우 아래쪽을 의미합니다\n * @property {null} NONE This value usually means it's the same position주로 제자리인 경우를 의미합니다\n */\nexport const DIRECTION = {\n PREV: \"PREV\",\n NEXT: \"NEXT\",\n NONE: null\n} as const;\n\n/**\n * An object with all possible {@link Flicking#moveType moveType}s\n * @ko Flicking이 제공하는 {@link Flicking#moveType moveType}들을 담고 있는 객체\n * @type {object}\n * @property {\"snap\"} SNAP Flicking's {@link Flicking#moveType moveType} that enables {@link SnapControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link SnapControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"freeScroll\"} FREE_SCROLL Flicking's {@link Flicking#moveType moveType} that enables {@link FreeControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link FreeControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n * @property {\"strict\"} STRICT Flicking's {@link Flicking#moveType moveType} that enables {@link StrictControl} as a Flicking's {@link Flicking#control control}\n * Flicking의 {@link Flicking#control control}을 {@link StrictControl}로 설정하게 하는 {@link Flicking#moveType moveType}\n */\nexport const MOVE_TYPE = {\n SNAP: \"snap\",\n FREE_SCROLL: \"freeScroll\",\n STRICT: \"strict\"\n} as const;\n\nexport const CLASS = {\n VERTICAL: \"vertical\",\n HIDDEN: \"flicking-hidden\",\n DEFAULT_VIRTUAL: \"flicking-panel\"\n};\n\n/**\n * An object with all possible {@link Flicking#circularFallback circularFallback}s\n * @ko Flicking의 {@link Flicking#circularFallback circularFallback}에 설정 가능한 값들을 담고 있는 객체\n * @type {object}\n * @property {string} LINEAR \"linear\"\n * @property {string} BOUND \"bound\"\n */\nexport const CIRCULAR_FALLBACK = {\n LINEAR: \"linear\",\n BOUND: \"bound\"\n} as const;\n\n/**\n * An object for identifying {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성을 구분하기 위한 객체\n * @type {object}\n * @property {string} LTR \"ltr\"\n * @property {string} RTL \"rtl\"\n */\nexport const ORDER = {\n LTR: \"ltr\",\n RTL: \"rtl\"\n} as const;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking, { FlickingOptions } from \"./Flicking\";\nimport FlickingError from \"./core/FlickingError\";\nimport * as ERROR from \"./const/error\";\nimport { ALIGN, DIRECTION } from \"./const/external\";\nimport { LiteralUnion, Merged, ValueOf } from \"./type/internal\";\nimport { ElementLike } from \"./type/external\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport const merge = (target: From, ...sources: To[]): Merged => {\n sources.forEach(source => {\n Object.keys(source).forEach(key => {\n target[key] = source[key] as unknown;\n });\n });\n\n return target as Merged;\n};\n\nexport const getElement = (el: HTMLElement | string | null, parent?: HTMLElement): HTMLElement => {\n let targetEl: HTMLElement | null = null;\n\n if (isString(el)) {\n const parentEl = parent ? parent : document;\n const queryResult = parentEl.querySelector(el);\n if (!queryResult) {\n throw new FlickingError(ERROR.MESSAGE.ELEMENT_NOT_FOUND(el), ERROR.CODE.ELEMENT_NOT_FOUND);\n }\n targetEl = queryResult as HTMLElement;\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n targetEl = el;\n }\n\n if (!targetEl) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n\n return targetEl;\n};\n\nexport const checkExistence = (value: any, nameOnErrMsg: string) => {\n if (value == null) {\n throw new FlickingError(ERROR.MESSAGE.VAL_MUST_NOT_NULL(value, nameOnErrMsg), ERROR.CODE.VAL_MUST_NOT_NULL);\n }\n};\n\nexport const clamp = (x: number, min: number, max: number) => Math.max(Math.min(x, max), min);\n\nexport const getFlickingAttached = (val: Flicking | null): Flicking => {\n if (!val) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING);\n }\n\n return val;\n};\n\nexport const toArray = (iterable: ArrayLike): T[] => [].slice.call(iterable) as T[];\n\nexport const parseAlign = (align: LiteralUnion> | number, size: number): number => {\n let alignPoint: number | null;\n if (isString(align)) {\n switch (align) {\n case ALIGN.PREV:\n alignPoint = 0;\n break;\n case ALIGN.CENTER:\n alignPoint = 0.5 * size;\n break;\n case ALIGN.NEXT:\n alignPoint = size;\n break;\n default:\n alignPoint = parseArithmeticSize(align, size);\n if (alignPoint == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"align\", align), ERROR.CODE.WRONG_OPTION);\n }\n }\n } else {\n alignPoint = align as number;\n }\n\n return alignPoint;\n};\n\nexport const parseBounce = (bounce: FlickingOptions[\"bounce\"], size: number): number[] => {\n let parsedBounce: Array;\n\n if (Array.isArray(bounce)) {\n parsedBounce = (bounce as string[]).map(val => parseArithmeticSize(val, size));\n } else {\n const parsedVal = parseArithmeticSize(bounce, size);\n\n parsedBounce = [parsedVal, parsedVal];\n }\n\n return parsedBounce.map(val => {\n if (val == null) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"bounce\", bounce), ERROR.CODE.WRONG_OPTION);\n }\n return val;\n });\n};\n\nexport const parseArithmeticSize = (cssValue: number | string, base: number): number | null => {\n const parsed = parseArithmeticExpression(cssValue);\n\n if (parsed == null) return null;\n\n return parsed.percentage * base + parsed.absolute;\n};\n\nexport const parseArithmeticExpression = (cssValue: number | string): { percentage: number; absolute: number } | null => {\n const cssRegex = /(?:(\\+|\\-)\\s*)?(\\d+(?:\\.\\d+)?(%|px)?)/g;\n\n if (typeof cssValue === \"number\") {\n return { percentage: 0, absolute: cssValue };\n }\n\n const parsed = {\n percentage: 0,\n absolute: 0\n };\n let idx = 0;\n let matchResult = cssRegex.exec(cssValue);\n while (matchResult != null) {\n let sign = matchResult[1];\n const value = matchResult[2];\n const unit = matchResult[3];\n const parsedValue = parseFloat(value);\n\n if (idx <= 0) {\n sign = sign || \"+\";\n }\n\n // Return default value for values not in good form\n if (!sign) {\n return null;\n }\n\n const signMultiplier = sign === \"+\" ? 1 : -1;\n\n if (unit === \"%\") {\n parsed.percentage += signMultiplier * (parsedValue / 100);\n } else {\n parsed.absolute += signMultiplier * parsedValue;\n }\n\n // Match next occurrence\n ++idx;\n matchResult = cssRegex.exec(cssValue);\n }\n\n // None-matched\n if (idx === 0) {\n return null;\n }\n\n return parsed;\n};\n\nexport const parseCSSSizeValue = (val: string | number): string => isString(val) ? val : `${val}px`;\n\nexport const parsePanelAlign = (align: FlickingOptions[\"align\"]) => typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\nexport const getDirection = (start: number, end: number): ValueOf => {\n if (start === end) return DIRECTION.NONE;\n return start < end ? DIRECTION.NEXT : DIRECTION.PREV;\n};\n\nexport const parseElement = (element: ElementLike | ElementLike[]): HTMLElement[] => {\n if (!Array.isArray(element)) {\n element = [element];\n }\n\n const elements: HTMLElement[] = [];\n element.forEach(el => {\n if (isString(el)) {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = el;\n\n elements.push(...toArray(tempDiv.children) as HTMLElement[]);\n while (tempDiv.firstChild) {\n tempDiv.removeChild(tempDiv.firstChild);\n }\n } else if (el && el.nodeType === Node.ELEMENT_NODE) {\n elements.push(el);\n } else {\n throw new FlickingError(ERROR.MESSAGE.WRONG_TYPE(el, [\"HTMLElement\", \"string\"]), ERROR.CODE.WRONG_TYPE);\n }\n });\n\n return elements;\n};\n\nexport const getMinusCompensatedIndex = (idx: number, max: number) => idx < 0 ? clamp(idx + max, 0, max) : clamp(idx, 0, max);\n\nexport const includes = (array: T[], target: any): target is T => {\n for (const val of array) {\n if (val === target) return true;\n }\n return false;\n};\n\nexport const isString = (val: any): val is string => typeof val === \"string\";\n\nexport const circulatePosition = (pos: number, min: number, max: number) => {\n const size = max - min;\n\n if (pos < min) {\n const offset = (min - pos) % size;\n pos = max - offset;\n } else if (pos > max) {\n const offset = (pos - max) % size;\n pos = min + offset;\n }\n\n return pos;\n};\n\nexport const find = (array: T[], checker: (val: T) => boolean): T | null => {\n for (const val of array) {\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findRight = (array: T[], checker: (val: T) => boolean): T | null => {\n for (let idx = array.length - 1; idx >= 0; idx--) {\n const val = array[idx];\n if (checker(val)) {\n return val;\n }\n }\n\n return null;\n};\n\nexport const findIndex = (array: T[], checker: (val: T) => boolean): number => {\n for (let idx = 0; idx < array.length; idx++) {\n if (checker(array[idx])) {\n return idx;\n }\n }\n\n return -1;\n};\n\nexport const getProgress = (pos: number, prev: number, next: number) => (pos - prev) / (next - prev);\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\nexport const getStyle = (el: HTMLElement): CSSStyleDeclaration => window.getComputedStyle(el) || (el as any).currentStyle as CSSStyleDeclaration;\n\nexport const setSize = (el: HTMLElement, { width, height }: Partial<{\n width: number | string;\n height: number | string;\n}>) => {\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n el.style.width = `${width}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n el.style.height = `${height}px`;\n }\n }\n};\n\nexport const isBetween = (val: number, min: number, max: number) => val >= min && val <= max;\n\nexport const circulateIndex = (index: number, max: number): number => {\n if (index >= max) {\n return index % max;\n } else if (index < 0) {\n return getMinusCompensatedIndex((index + 1) % max - 1, max);\n } else {\n return index;\n }\n};\n\nexport const range = (end: number): number[] => {\n const arr = new Array(end);\n\n for (let i = 0; i < end; i++) {\n arr[i] = i;\n }\n\n return arr;\n};\n\nexport const getElementSize = ({\n el,\n horizontal,\n useFractionalSize,\n useOffset,\n style\n}: {\n el: HTMLElement;\n horizontal: boolean;\n useFractionalSize: boolean;\n useOffset: boolean;\n style: CSSStyleDeclaration;\n}): number => {\n let size = 0;\n if (useFractionalSize) {\n const baseSize = parseFloat(horizontal ? style.width : style.height) || 0;\n const isBorderBoxSizing = style.boxSizing === \"border-box\";\n const border = horizontal\n ? parseFloat(style.borderLeftWidth || \"0\") + parseFloat(style.borderRightWidth || \"0\")\n : parseFloat(style.borderTopWidth || \"0\") + parseFloat(style.borderBottomWidth || \"0\");\n\n if (isBorderBoxSizing) {\n size = useOffset\n ? baseSize\n : baseSize - border;\n } else {\n const padding = horizontal\n ? parseFloat(style.paddingLeft || \"0\") + parseFloat(style.paddingRight || \"0\")\n : parseFloat(style.paddingTop || \"0\") + parseFloat(style.paddingBottom || \"0\");\n\n size = useOffset\n ? baseSize + padding + border\n : baseSize + padding;\n }\n } else {\n const sizeStr = horizontal ? \"Width\" : \"Height\";\n\n size = useOffset\n ? el[`offset${sizeStr}`]\n : el[`client${sizeStr}`];\n }\n\n return Math.max(size, 0);\n};\n\nexport const setPrototypeOf = Object.setPrototypeOf || ((obj, proto) => {\n obj.__proto__ = proto;\n return obj;\n});\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport { setPrototypeOf } from \"../utils\";\n\n/**\n * Special type of known error that {@link Flicking} throws.\n * @ko Flicking 내부에서 알려진 오류 발생시 throw되는 에러\n * @property {number} code Error code에러 코드\n * @property {string} message Error message에러 메시지\n * @see {@link ERROR_CODE ERROR_CODE}\n * @example\n * ```ts\n * import Flicking, { FlickingError, ERROR_CODES } from \"@egjs/flicking\";\n * try {\n * const flicking = new Flicking(\".flicking-viewport\")\n * } catch (e) {\n * if (e instanceof FlickingError && e.code === ERROR_CODES.ELEMENT_NOT_FOUND) {\n * console.error(\"Element not found\")\n * }\n * }\n * ```\n */\nclass FlickingError extends Error {\n public code: number;\n\n /**\n * @param message Error message에러 메시지\n * @param code Error code에러 코드\n */\n public constructor(message: string, code: number) {\n super(message);\n\n setPrototypeOf(this, FlickingError.prototype);\n this.name = \"FlickingError\";\n this.code = code;\n }\n}\n\nexport default FlickingError;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { getElementSize, getStyle, isString } from \"../utils\";\n\n/**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n */\nclass Viewport {\n private _flicking: Flicking;\n private _el: HTMLElement;\n private _width: number;\n private _height: number;\n private _isBorderBoxSizing: boolean;\n private _padding: {\n left: number;\n right: number;\n top: number;\n bottom: number;\n };\n\n /**\n * A viewport(root) element\n * @ko 뷰포트(root) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n\n /**\n * Viewport width, without paddings\n * @ko 뷰포트 너비\n * @type {number}\n * @readonly\n */\n public get width() { return this._width - this._padding.left - this._padding.right; }\n /**\n * Viewport height, without paddings\n * @ko 뷰포트 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height - this._padding.top - this._padding.bottom; }\n /**\n * Viewport paddings\n * @ko 뷰포트 CSS padding 값\n * @type {object}\n * @property {number} left CSS `padding-left`\n * @property {number} right CSS `padding-right`\n * @property {number} top CSS `padding-top`\n * @property {number} bottom CSS `padding-bottom`\n * @readonly\n */\n public get padding() { return this._padding; }\n\n /**\n * @param el A viewport element뷰포트 엘리먼트\n */\n public constructor(flicking: Flicking, el: HTMLElement) {\n this._flicking = flicking;\n this._el = el;\n this._width = 0;\n this._height = 0;\n this._padding = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this._isBorderBoxSizing = false;\n }\n\n /**\n * Change viewport's size.\n * This will change the actual size of `.flicking-viewport` element by changing its CSS width/height property\n * @ko 뷰포트 크기를 변경합니다.\n * `.flicking-viewport` 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New viewport size새 뷰포트 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n */\n public setSize({\n width,\n height\n }: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n const el = this._el;\n const padding = this._padding;\n const isBorderBoxSizing = this._isBorderBoxSizing;\n\n if (width != null) {\n if (isString(width)) {\n el.style.width = width;\n } else {\n const newWidth = isBorderBoxSizing\n ? width + padding.left + padding.right\n : width;\n el.style.width = `${newWidth}px`;\n }\n }\n if (height != null) {\n if (isString(height)) {\n el.style.height = height;\n } else {\n const newHeight = isBorderBoxSizing\n ? height + padding.top + padding.bottom\n : height;\n el.style.height = `${newHeight}px`;\n }\n }\n this.resize();\n }\n\n /**\n * Update width/height to the current viewport element's size\n * @ko 현재 뷰포트 엘리먼트의 크기로 너비/높이를 업데이트합니다\n */\n public resize() {\n const el = this._el;\n const elStyle = getStyle(el);\n const {\n useFractionalSize\n } = this._flicking;\n\n this._width = getElementSize({\n el,\n horizontal: true,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n this._height = getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: false,\n style: elStyle\n });\n\n this._padding = {\n left: elStyle.paddingLeft ? parseFloat(elStyle.paddingLeft) : 0,\n right: elStyle.paddingRight ? parseFloat(elStyle.paddingRight) : 0,\n top: elStyle.paddingTop ? parseFloat(elStyle.paddingTop) : 0,\n bottom: elStyle.paddingBottom ? parseFloat(elStyle.paddingBottom) : 0\n };\n this._isBorderBoxSizing = elStyle.boxSizing === \"border-box\";\n }\n}\n\nexport default Viewport;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\n\nclass AutoResizer {\n private _flicking: Flicking;\n private _enabled: boolean;\n private _resizeObserver: ResizeObserver | null;\n private _resizeTimer: number;\n private _maxResizeDebounceTimer: number;\n\n public get enabled() { return this._enabled; }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n this._enabled = false;\n this._resizeObserver = null;\n this._resizeTimer = -1;\n this._maxResizeDebounceTimer = -1;\n }\n\n public enable(): this {\n const flicking = this._flicking;\n const viewport = flicking.viewport;\n\n if (this._enabled) {\n this.disable();\n }\n\n if (flicking.useResizeObserver && !!window.ResizeObserver) {\n const viewportSizeNot0 = viewport.width !== 0 || viewport.height !== 0;\n\n const resizeObserver = viewportSizeNot0\n ? new ResizeObserver(this._skipFirstResize)\n : new ResizeObserver(this._onResize);\n\n resizeObserver.observe(flicking.viewport.element);\n\n this._resizeObserver = resizeObserver;\n } else {\n window.addEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = true;\n\n return this;\n }\n\n public disable(): this {\n if (!this._enabled) return this;\n\n const resizeObserver = this._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n this._resizeObserver = null;\n } else {\n window.removeEventListener(\"resize\", this._onResize);\n }\n\n this._enabled = false;\n\n return this;\n }\n\n private _onResize = () => {\n const flicking = this._flicking;\n const resizeDebounce = flicking.resizeDebounce;\n const maxResizeDebounce = flicking.maxResizeDebounce;\n\n if (resizeDebounce <= 0) {\n void flicking.resize();\n } else {\n if (this._maxResizeDebounceTimer <= 0) {\n if (maxResizeDebounce > 0 && maxResizeDebounce >= resizeDebounce) {\n this._maxResizeDebounceTimer = window.setTimeout(this._doScheduledResize, maxResizeDebounce);\n }\n }\n\n if (this._resizeTimer > 0) {\n clearTimeout(this._resizeTimer);\n this._resizeTimer = 0;\n }\n\n this._resizeTimer = window.setTimeout(this._doScheduledResize, resizeDebounce);\n }\n };\n\n private _doScheduledResize = () => {\n clearTimeout(this._resizeTimer);\n clearTimeout(this._maxResizeDebounceTimer);\n\n this._maxResizeDebounceTimer = -1;\n this._resizeTimer = -1;\n\n void this._flicking.resize();\n };\n\n // eslint-disable-next-line @typescript-eslint/member-ordering\n private _skipFirstResize = (() => {\n let isFirstResize = true;\n\n return (() => {\n if (isFirstResize) {\n isFirstResize = false;\n return;\n }\n this._onResize();\n });\n })();\n}\n\nexport default AutoResizer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../../Flicking\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VanillaElementProvider implements ElementProvider {\n private _element: HTMLElement;\n private _rendered: boolean;\n\n public get element() { return this._element; }\n public get rendered() { return this._rendered; }\n\n public constructor(element: HTMLElement) {\n this._element = element;\n this._rendered = true;\n }\n\n public show(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement !== cameraEl) {\n cameraEl.appendChild(el);\n this._rendered = true;\n }\n }\n\n public hide(flicking: Flicking): void {\n const el = this.element;\n const cameraEl = flicking.camera.element;\n\n if (el.parentElement === cameraEl) {\n cameraEl.removeChild(el);\n this._rendered = false;\n }\n }\n}\n\nexport default VanillaElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n\nimport Flicking from \"../../../Flicking\";\nimport VirtualPanel from \"../VirtualPanel\";\n\nimport ElementProvider from \"./ElementProvider\";\n\n/**\n * @internal\n */\nclass VirtualElementProvider implements ElementProvider {\n private _flicking: Flicking;\n private _panel: VirtualPanel;\n\n public get element() { return this._virtualElement.nativeElement; }\n public get rendered() { return this._virtualElement.visible; }\n\n private get _virtualElement() {\n const flicking = this._flicking;\n const elIndex = this._panel.elementIndex;\n const virtualElements = flicking.virtual.elements;\n\n return virtualElements[elIndex];\n }\n\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public init(panel: VirtualPanel) {\n this._panel = panel;\n }\n\n public show(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n\n public hide(): void {\n // DO_NOTHING\n // Actual element visibility is controlled by VirtualManager\n }\n}\n\nexport default VirtualElementProvider;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../Flicking\";\nimport { range } from \"../utils\";\nimport { CLASS } from \"../const/external\";\n\nimport VirtualPanel from \"./panel/VirtualPanel\";\n\nexport interface VirtualOptions {\n renderPanel: (panel: VirtualPanel, index: number) => string;\n initialPanelCount: number;\n cache?: boolean;\n panelClass?: string;\n}\n\n/**\n * A manager class to add / remove virtual panels\n */\nclass VirtualManager {\n private _flicking: Flicking;\n\n private _renderPanel: (panel: VirtualPanel, index: number) => string;\n private _initialPanelCount: number;\n private _cache: boolean;\n private _panelClass: string;\n\n private _elements: Array<{ nativeElement: HTMLElement; visible: boolean }>;\n\n public get elements() { return this._elements; }\n\n // Options\n /**\n * A rendering function for the panel element's innerHTML\n * @ko 패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @type {function}\n * @param {VirtualPanel} panel Instance of the panel패널 인스턴스\n * @param {number} index Index of the panel패널 인덱스\n * @default \"() => {}\"\n */\n public get renderPanel() { return this._renderPanel; }\n /**\n * Initial panel count to render\n * @ko 최초로 렌더링할 패널의 개수\n * @readonly\n * @type {number}\n * @default -1\n */\n public get initialPanelCount() { return this._initialPanelCount; }\n /**\n * Whether to cache rendered panel's innerHTML\n * @ko 렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @type {boolean}\n * @default false\n */\n public get cache() { return this._cache; }\n /**\n * The class name that will be applied to rendered panel elements\n * @ko 렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @type {string}\n * @default \"flicking-panel\"\n */\n public get panelClass() { return this._panelClass; }\n\n public set renderPanel(val: VirtualOptions[\"renderPanel\"]) {\n this._renderPanel = val;\n this._flicking.renderer.panels.forEach((panel: VirtualPanel) => panel.uncacheRenderResult());\n }\n\n public set cache(val: NonNullable) { this._cache = val; }\n public set panelClass(val: NonNullable) { this._panelClass = val; }\n\n public constructor(flicking: Flicking, options: VirtualOptions | null) {\n this._flicking = flicking;\n\n this._renderPanel = options?.renderPanel ?? (() => \"\");\n this._initialPanelCount = options?.initialPanelCount ?? -1;\n this._cache = options?.cache ?? false;\n this._panelClass = options?.panelClass ?? CLASS.DEFAULT_VIRTUAL;\n\n this._elements = [];\n }\n\n public init() {\n const flicking = this._flicking;\n\n if (!flicking.virtualEnabled) return;\n\n if (!flicking.externalRenderer && !flicking.renderExternal) {\n this._initVirtualElements();\n }\n\n const virtualElements = flicking.camera.children;\n this._elements = virtualElements.map(el => ({ nativeElement: el, visible: true }));\n }\n\n public show(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = true;\n\n if (nativeEl.style.display) {\n nativeEl.style.display = \"\";\n }\n }\n\n public hide(index: number) {\n const el = this._elements[index];\n const nativeEl = el.nativeElement;\n\n el.visible = false;\n nativeEl.style.display = \"none\";\n }\n\n /**\n * Add new virtual panels at the end of the list\n * @ko 새로운 가상 패널들을 리스트의 끝에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public append(count: number = 1): VirtualPanel[] {\n const flicking = this._flicking;\n\n return this.insert(flicking.panels.length, count);\n }\n\n /**\n * Add new virtual panels at the start of the list\n * @ko 새로운 가상 패널들을 리스트의 시작에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public prepend(count: number = 1): VirtualPanel[] {\n return this.insert(0, count);\n }\n\n /**\n * Add new virtual panels at the given index\n * @ko 새로운 가상 패널들을 주어진 인덱스에 추가합니다\n * @param {number} count The number of panels to add추가할 패널의 개수\n * @returns {Array} The new panels added새롭게 추가된 패널들\n */\n public insert(index: number, count: number = 1): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchInsert({ index, elements: range(count), hasDOMInElements: false }) as VirtualPanel[];\n }\n\n /**\n * Remove panels at the given index\n * @ko 주어진 인덱스에서 패널들을 삭제합니다\n * @param {number} count The number of panels to remove삭제할 패널의 개수\n * @returns {Array} The panels removed삭제된 패널들\n */\n public remove(index: number, count: number): VirtualPanel[] {\n if (count <= 0) return [];\n\n const flicking = this._flicking;\n\n return flicking.renderer.batchRemove({ index, deleteCount: count, hasDOMInElements: false }) as VirtualPanel[];\n }\n\n private _initVirtualElements() {\n const flicking = this._flicking;\n const cameraElement = flicking.camera.element;\n const panelsPerView = flicking.panelsPerView;\n const fragment = document.createDocumentFragment();\n\n const newElements = range(panelsPerView + 1).map(idx => {\n const panelEl = document.createElement(\"div\");\n panelEl.className = this._panelClass;\n panelEl.dataset.elementIndex = idx.toString();\n return panelEl;\n });\n\n newElements.forEach(el => {\n fragment.appendChild(el);\n });\n\n cameraElement.appendChild(fragment);\n }\n}\n\nexport default VirtualManager;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { OnAnimationEnd, OnChange, OnFinish, OnHold, OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\nimport { circulatePosition, getDirection } from \"../../utils\";\n\nexport enum STATE_TYPE {\n IDLE,\n HOLDING,\n DRAGGING,\n ANIMATING,\n DISABLED\n}\n\n/**\n * A component that shows the current status of the user input or the animation\n * @ko 현재 사용자 입력 또는 애니메이션 상태를 나타내는 컴포넌트\n * @internal\n */\nabstract class State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly holding: boolean;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public abstract readonly animating: boolean;\n\n protected _delta: number = 0;\n protected _targetPanel: Panel | null = null;\n\n /**\n * A sum of delta values of change events from the last hold event of Axes\n * @ko 이전 hold이벤트부터 change에 의해 발생한 이동 delta값의 합산\n * @type {number}\n * @readonly\n */\n public get delta() { return this._delta; }\n\n /**\n * A panel to set as {@link Control#activePanel} after the animation is finished\n * @ko 애니메이션 종료시 {@link Control#activePanel}로 설정할 패널\n * @type {number}\n * @readonly\n */\n public get targetPanel() { return this._targetPanel; }\n\n public set targetPanel(val: Panel | null) { this._targetPanel = val; }\n\n /**\n * An callback which is called when state has changed to this state\n * @ko 현재 상태로 돌입했을때 호출되는 콜백 함수\n * @param {State} prevState An previous state이전 상태값\n * @return {void}\n */\n public onEnter(prevState: State): void {\n this._delta = prevState._delta;\n this._targetPanel = prevState._targetPanel;\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:hold hold} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onHold(ctx: {\n flicking: Flicking;\n axesEvent: OnHold;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:change change} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onChange(ctx: {\n flicking: Flicking;\n axesEvent: OnChange;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onRelease(ctx: {\n flicking: Flicking;\n axesEvent: OnRelease;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} event of Axes\n * Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:animationEnd animationEnd} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onAnimationEnd(ctx: {\n flicking: Flicking;\n axesEvent: OnAnimationEnd;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n /**\n * An event handler for Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트 핸들러\n * @param {object} [ctx] Event context이벤트 콘텍스트\n * @param {Flicking} [ctx.flicking] An instance of FlickingFlicking 인스턴스\n * @param {object} [ctx.axesEvent] A {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} event of AxesAxes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:finish finish} 이벤트\n * @param {function} [ctx.transitTo] A function for changing current state to other state다른 상태로 변경하기 위한 함수\n * @return {void}\n */\n public onFinish(ctx: {\n flicking: Flicking;\n axesEvent: OnFinish;\n transitTo: (nextState: STATE_TYPE) => State;\n }): void {\n // DO NOTHING\n }\n\n protected _moveToChangedPosition(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const delta = axesEvent.delta[AXES.POSITION_KEY];\n\n if (!delta) {\n return;\n }\n\n this._delta += delta;\n\n const camera = flicking.camera;\n const prevPosition = camera.position;\n const position = axesEvent.pos[AXES.POSITION_KEY];\n const newPosition = flicking.circularEnabled\n ? circulatePosition(position, camera.range.min, camera.range.max)\n : position;\n\n camera.lookAt(newPosition);\n\n const moveEvent = new ComponentEvent(EVENTS.MOVE, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, axesEvent.delta[AXES.POSITION_KEY]),\n axesEvent\n });\n\n flicking.trigger(moveEvent);\n\n if (moveEvent.isCanceled()) {\n // Return to previous position\n camera.lookAt(prevPosition);\n transitTo(STATE_TYPE.DISABLED);\n }\n }\n}\n\nexport default State;\n","/**\n * All possible @egjs/axes event keys\n * @internal\n */\nexport const EVENT = {\n HOLD: \"hold\",\n CHANGE: \"change\",\n RELEASE: \"release\",\n ANIMATION_END: \"animationEnd\",\n FINISH: \"finish\"\n} as const;\n\n/**\n * An Axis key that Flicking uses\n * @internal\n */\nexport const POSITION_KEY = \"flick\";\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A default state when there's no user input and no animation's playing\n * @ko 사용자의 입력이 없고, 애니메이션이 동작하고있지 않은 기본 상태\n * @internal\n */\nclass IdleState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n public onEnter() {\n this._delta = 0;\n this._targetPanel = null;\n }\n\n public onHold(ctx: Parameters[0]): void {\n // Shouldn't do any action until any panels on flicking area\n const { flicking, axesEvent, transitTo } = ctx;\n\n if (flicking.renderer.panelCount <= 0) {\n transitTo(STATE_TYPE.DISABLED);\n return;\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, {\n axesEvent\n });\n\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.HOLDING);\n }\n }\n\n // By methods call\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const controller = flicking.control.controller;\n const animatingContext = controller.animatingContext;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger AnimatingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.ANIMATING).onChange(ctx);\n }\n }\n}\n\nexport default IdleState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Panel from \"../../core/panel/Panel\";\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's holding the Flicking area, but not moved a single pixel yet\n * @ko 사용자의 입력이 시작되었으나, 아직 움직이지는 않은 상태\n * @internal\n */\nclass HoldingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {false}\n * @readonly\n */\n public readonly animating = false;\n\n private _releaseEvent: OnRelease | null = null;\n\n public onChange(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const inputEvent = axesEvent.inputEvent as { offsetX: number; offsetY: number };\n\n const offset = flicking.horizontal\n ? inputEvent.offsetX\n : inputEvent.offsetY;\n\n const moveStartEvent = new ComponentEvent(EVENTS.MOVE_START, {\n isTrusted: axesEvent.isTrusted,\n holding: this.holding,\n direction: getDirection(0, -offset),\n axesEvent\n });\n flicking.trigger(moveStartEvent);\n\n if (moveStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n // Trigger DraggingState's onChange, to trigger \"move\" event immediately\n transitTo(STATE_TYPE.DRAGGING).onChange(ctx);\n }\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, { axesEvent }));\n\n if (axesEvent.delta.flick !== 0) {\n // Sometimes \"release\" event on axes triggered before \"change\" event\n // Especially if user flicked panel fast in really short amount of time\n // if delta is not zero, that means above case happened.\n\n // Event flow should be HOLD_START -> MOVE_START -> MOVE -> HOLD_END\n // At least one move event should be included between holdStart and holdEnd\n axesEvent.setTo({ flick: flicking.camera.position }, 0);\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n // Can't handle select event here,\n // As \"finish\" axes event happens\n this._releaseEvent = axesEvent;\n }\n\n public onFinish(ctx: Parameters[0]): void {\n const { flicking, transitTo } = ctx;\n\n // Should transite to IDLE state before select event\n // As user expects hold is already finished\n transitTo(STATE_TYPE.IDLE);\n\n if (!this._releaseEvent) {\n return;\n }\n\n // Handle release event here\n // To prevent finish event called twice\n const releaseEvent = this._releaseEvent;\n\n // Static click\n /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */\n const srcEvent = releaseEvent.inputEvent.srcEvent;\n\n let clickedElement: HTMLElement;\n if (srcEvent.type === \"touchend\") {\n const touchEvent = srcEvent as TouchEvent;\n const touch = touchEvent.changedTouches[0];\n clickedElement = document.elementFromPoint(touch.clientX, touch.clientY) as HTMLElement;\n } else {\n clickedElement = srcEvent.target;\n }\n /* eslint-enable */\n\n const panels = flicking.renderer.panels;\n let clickedPanel: Panel | null = null;\n\n for (const panel of panels) {\n if (panel.contains(clickedElement)) {\n clickedPanel = panel;\n break;\n }\n }\n\n if (clickedPanel) {\n const cameraPosition = flicking.camera.position;\n const clickedPanelPosition = clickedPanel.position;\n\n flicking.trigger(new ComponentEvent(EVENTS.SELECT, {\n index: clickedPanel.index,\n panel: clickedPanel,\n // Direction to the clicked panel\n direction: getDirection(cameraPosition, clickedPanelPosition)\n }));\n }\n }\n}\n\nexport default HoldingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport * as AXES from \"../../const/axes\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when user's dragging the Flicking area\n * @ko 사용자가 드래깅중인 상태\n * @internal\n */\nclass DraggingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {true}\n * @readonly\n */\n public readonly holding = true;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onRelease(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n // Update last position to cope with Axes's animating behavior\n // Axes uses start position when animation start\n flicking.trigger(new ComponentEvent(EVENTS.HOLD_END, {\n axesEvent\n }));\n\n if (flicking.renderer.panelCount <= 0) {\n // There're no panels\n transitTo(STATE_TYPE.IDLE);\n return;\n }\n\n transitTo(STATE_TYPE.ANIMATING);\n\n const control = flicking.control;\n const position = axesEvent.destPos[AXES.POSITION_KEY];\n const duration = Math.max(axesEvent.duration, flicking.duration);\n\n try {\n void control.moveToPosition(position, duration, axesEvent);\n } catch (err) {\n transitTo(STATE_TYPE.IDLE);\n axesEvent.setTo({ [AXES.POSITION_KEY]: flicking.camera.position }, 0);\n }\n }\n}\n\nexport default DraggingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport { EVENTS } from \"../../const/external\";\nimport { getDirection } from \"../../utils\";\n\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking's animating by user input or method call\n * @ko 사용자 입력이나 메소드 호출에 의해 Flicking의 애니메이션이 동작중인 상태\n * @internal\n */\nclass AnimatingState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onHold(ctx: Parameters[0]): void {\n const { flicking, axesEvent, transitTo } = ctx;\n const targetPanel = this._targetPanel;\n const control = flicking.control;\n\n this._delta = 0;\n flicking.control.updateInput();\n\n if (flicking.changeOnHold && targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n\n const holdStartEvent = new ComponentEvent(EVENTS.HOLD_START, { axesEvent });\n flicking.trigger(holdStartEvent);\n\n if (holdStartEvent.isCanceled()) {\n transitTo(STATE_TYPE.DISABLED);\n } else {\n transitTo(STATE_TYPE.DRAGGING);\n }\n }\n\n public onChange(ctx: Parameters[0]): void {\n this._moveToChangedPosition(ctx);\n }\n\n public onFinish(ctx: Parameters[0]) {\n const { flicking, axesEvent, transitTo } = ctx;\n\n const control = flicking.control;\n const controller = control.controller;\n const animatingContext = controller.animatingContext;\n\n transitTo(STATE_TYPE.IDLE);\n\n flicking.trigger(new ComponentEvent(EVENTS.MOVE_END, {\n isTrusted: axesEvent.isTrusted,\n direction: getDirection(animatingContext.start, animatingContext.end),\n axesEvent\n }));\n\n const targetPanel = this._targetPanel;\n if (targetPanel) {\n control.setActive(targetPanel, control.activePanel, axesEvent.isTrusted);\n }\n }\n}\n\nexport default AnimatingState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport State, { STATE_TYPE } from \"./State\";\n\n/**\n * A state that activates when Flicking is stopped by event's `stop` method\n * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태\n * @internal\n */\nclass DisabledState extends State {\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {false}\n * @readonly\n */\n public readonly holding = false;\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {true}\n * @readonly\n */\n public readonly animating = true;\n\n public onAnimationEnd(ctx: Parameters[0]): void {\n const { transitTo } = ctx;\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onChange(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // Can stop Axes's change event\n axesEvent.stop();\n\n transitTo(STATE_TYPE.IDLE);\n }\n\n public onRelease(ctx: Parameters[0]): void {\n const { axesEvent, transitTo } = ctx;\n\n // This is needed when stopped hold start event\n if (axesEvent.delta.flick === 0) {\n transitTo(STATE_TYPE.IDLE);\n }\n }\n}\n\nexport default DisabledState;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { AxesEvents } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport * as AXES from \"../const/axes\";\n\nimport IdleState from \"./states/IdleState\";\nimport HoldingState from \"./states/HoldingState\";\nimport DraggingState from \"./states/DraggingState\";\nimport AnimatingState from \"./states/AnimatingState\";\nimport DisabledState from \"./states/DisabledState\";\nimport State, { STATE_TYPE } from \"./states/State\";\n\n/**\n * @internal\n */\nclass StateMachine {\n private _state: State;\n\n public get state(): State { return this._state; }\n\n public constructor() {\n this._state = new IdleState();\n }\n\n public fire(eventType: keyof AxesEvents, externalCtx: {\n flicking: Flicking;\n axesEvent: any;\n }) {\n const currentState = this._state;\n const ctx = { ...externalCtx, transitTo: this.transitTo };\n\n switch (eventType) {\n case AXES.EVENT.HOLD:\n currentState.onHold(ctx);\n break;\n case AXES.EVENT.CHANGE:\n currentState.onChange(ctx);\n break;\n case AXES.EVENT.RELEASE:\n currentState.onRelease(ctx);\n break;\n case AXES.EVENT.ANIMATION_END:\n currentState.onAnimationEnd(ctx);\n break;\n case AXES.EVENT.FINISH:\n currentState.onFinish(ctx);\n break;\n }\n }\n\n public transitTo = (nextStateType: STATE_TYPE): State => {\n let nextState: State;\n\n switch (nextStateType) {\n case STATE_TYPE.IDLE:\n nextState = new IdleState();\n break;\n case STATE_TYPE.HOLDING:\n nextState = new HoldingState();\n break;\n case STATE_TYPE.DRAGGING:\n nextState = new DraggingState();\n break;\n case STATE_TYPE.ANIMATING:\n nextState = new AnimatingState();\n break;\n case STATE_TYPE.DISABLED:\n nextState = new DisabledState();\n break;\n }\n\n nextState.onEnter(this._state);\n\n this._state = nextState;\n\n return this._state;\n };\n}\n\nexport default StateMachine;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Axes, { PanInput, AxesEvents, OnRelease } from \"@egjs/axes\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\nimport { ORDER } from \"../const/external\";\nimport { getFlickingAttached, parseBounce } from \"../utils\";\nimport { ControlParams } from \"../type/external\";\n\nimport StateMachine from \"./StateMachine\";\n\n/**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @internal\n */\nclass AxesController {\n private _flicking: Flicking | null;\n private _axes: Axes | null;\n private _panInput: PanInput | null;\n private _stateMachine: StateMachine;\n\n private _animatingContext: { start: number; end: number; offset: number };\n private _dragged: boolean;\n\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/Axes Axes}의 인스턴스\n * @type {Axes | null}\n * @see https://naver.github.io/egjs-axes/docs/api/Axes\n * @readonly\n */\n public get axes() { return this._axes; }\n /**\n * An {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput} instance\n * @ko {@link https://naver.github.io/egjs-axes/docs/api/PanInput PanInput}의 인스턴스\n * @type {PanInput | null}\n * @see https://naver.github.io/egjs-axes/docs/api/PanInput\n * @readonly\n */\n public get panInput() { return this._panInput; }\n /**\n * @internal\n */\n public get stateMachine() { return this._stateMachine; }\n /**\n * A activated {@link State} that shows the current status of the user input or the animation\n * @ko 현재 활성화된 {@link State} 인스턴스로 사용자 입력 또는 애니메이션 상태를 나타냅니다\n * @type {State}\n */\n public get state() { return this._stateMachine.state; }\n /**\n * A context of the current animation playing\n * @ko 현재 재생중인 애니메이션 정보\n * @type {object}\n * @property {number} start A start position of the animation애니메이션 시작 지점\n * @property {number} end A end position of the animation애니메이션 끝 지점\n * @property {number} offset camera offset카메라 오프셋\n * @readonly\n */\n public get animatingContext() { return this._animatingContext; }\n /**\n * A current control parameters of the Axes instance\n * @ko 활성화된 현재 Axes 패러미터들\n * @type {ControlParams}\n */\n public get controlParams(): ControlParams {\n const axes = this._axes;\n\n if (!axes) {\n return {\n range: { min: 0, max: 0 },\n position: 0,\n circular: false\n };\n }\n\n const axis = axes.axis[AXES.POSITION_KEY];\n\n return {\n range: { min: axis.range![0], max: axis.range![1] },\n circular: (axis.circular as boolean[])[0],\n position: this.position\n };\n }\n\n /**\n * A Boolean indicating whether the user input is enabled\n * @ko 현재 사용자 입력이 활성화되었는지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get enabled() { return this._panInput?.isEnabled() ?? false; }\n /**\n * Current position value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 좌표 값\n * @type {number}\n * @readonly\n */\n public get position() { return this._axes?.get([AXES.POSITION_KEY])[AXES.POSITION_KEY] ?? 0; }\n /**\n * Current range value in {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} instance\n * @ko {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html Axes} 인스턴스 내부의 현재 이동 범위 값\n * @type {number[]}\n * @readonly\n */\n public get range() { return this._axes?.axis[AXES.POSITION_KEY].range ?? [0, 0]; }\n /**\n * Actual bounce size(px)\n * @ko 적용된 bounce 크기(px 단위)\n * @type {number[]}\n * @readonly\n */\n public get bounce() { return this._axes?.axis[AXES.POSITION_KEY].bounce as number[] | undefined; }\n\n /** */\n public constructor() {\n this._resetInternalValues();\n this._stateMachine = new StateMachine();\n }\n\n /**\n * Initialize AxesController\n * @ko AxesController를 초기화합니다\n * @param {Flicking} flicking An instance of Flicking\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n\n this._axes = new Axes({\n [AXES.POSITION_KEY]: {\n range: [0, 0],\n circular: false,\n bounce: [0, 0]\n }\n }, {\n deceleration: flicking.deceleration,\n interruptable: flicking.interruptable,\n nested: flicking.nested,\n easing: flicking.easing\n });\n this._panInput = new PanInput(flicking.viewport.element, {\n inputType: flicking.inputType,\n threshold: 1,\n iOSEdgeSwipeThreshold: flicking.iOSEdgeSwipeThreshold,\n preventDefaultOnDrag: flicking.preventDefaultOnDrag,\n scale: flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1],\n releaseOnScroll: true\n });\n\n const axes = this._axes;\n\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], this._panInput);\n\n for (const key in AXES.EVENT) {\n const eventType = AXES.EVENT[key] as keyof AxesEvents;\n\n axes.on(eventType, (e: AxesEvents[typeof eventType]) => {\n this._stateMachine.fire(eventType, {\n flicking,\n axesEvent: e\n });\n });\n }\n\n return this;\n }\n\n /**\n * Destroy AxesController and return to initial state\n * @ko AxesController를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n if (this._axes) {\n this.removePreventClickHandler();\n this._axes.destroy();\n }\n\n this._panInput?.destroy();\n\n this._resetInternalValues();\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._panInput?.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._panInput?.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._panInput?.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @chainable\n * @return {this}\n */\n public updateAnimation(position: number, duration?: number): this {\n this._animatingContext = {\n ...this._animatingContext,\n end: position\n };\n this._axes?.updateAnimation({\n destPos: { [AXES.POSITION_KEY]: position },\n duration\n });\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n this._axes?.stopAnimation();\n\n return this;\n }\n\n /**\n * Update {@link https://naver.github.io/egjs-axes/ @egjs/axes}'s state\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 상태를 갱신합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link AxesController#init init} is not called before\n * {@link AxesController#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public update(controlParams: ControlParams): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const axes = this._axes!;\n const axis = axes.axis[AXES.POSITION_KEY];\n\n axis.circular = [controlParams.circular, controlParams.circular];\n axis.range = [controlParams.range.min, controlParams.range.max];\n axis.bounce = parseBounce(flicking.bounce, camera.size);\n\n axes.axisManager.set({ [AXES.POSITION_KEY]: controlParams.position });\n\n return this;\n }\n\n /**\n * Attach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 부착합니다\n * @return {this}\n */\n public addPreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.on(AXES.EVENT.HOLD, this._onAxesHold);\n axes.on(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.addEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Detach a handler to the camera element to prevent click events during animation\n * @ko 카메라 엘리먼트에 애니메이션 도중에 클릭 이벤트를 방지하는 핸들러를 탈착합니다\n * @return {this}\n */\n public removePreventClickHandler(): this {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const cameraEl = flicking.camera.element;\n\n axes.off(AXES.EVENT.HOLD, this._onAxesHold);\n axes.off(AXES.EVENT.CHANGE, this._onAxesChange);\n cameraEl.removeEventListener(\"click\", this._preventClickWhenDragged, true);\n\n return this;\n }\n\n /**\n * Run Axes's {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} using the given position\n * @ko Axes의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#setTo setTo} 메소드를 주어진 좌표를 이용하여 수행합니다\n * @param {number} position A position to move이동할 좌표\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {number} [axesEvent] If provided, it'll use its {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} method instead이 값이 주어졌을 경우, 해당 이벤트의 {@link https://naver#github#io/egjs-axes/release/latest/doc/eg#Axes#html#setTo setTo} 메소드를 대신해서 사용합니다.\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public animateTo(position: number, duration: number, axesEvent?: OnRelease): Promise {\n const axes = this._axes;\n const state = this._stateMachine.state;\n\n if (!axes) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.NOT_ATTACHED_TO_FLICKING, ERROR.CODE.NOT_ATTACHED_TO_FLICKING));\n }\n\n const startPos = axes.get([AXES.POSITION_KEY])[AXES.POSITION_KEY];\n\n if (startPos === position) {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.lookAt(position);\n\n if (state.targetPanel) {\n flicking.control.setActive(state.targetPanel, flicking.control.activePanel, axesEvent?.isTrusted ?? false);\n }\n return Promise.resolve();\n }\n\n this._animatingContext = {\n start: startPos,\n end: position,\n offset: 0\n };\n\n const animate = () => {\n const resetContext = () => {\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n };\n\n axes.once(AXES.EVENT.FINISH, resetContext);\n\n if (axesEvent) {\n axesEvent.setTo({ [AXES.POSITION_KEY]: position }, duration);\n } else {\n axes.setTo({ [AXES.POSITION_KEY]: position }, duration);\n }\n };\n\n return new Promise((resolve, reject) => {\n const animationFinishHandler = () => {\n axes.off(AXES.EVENT.HOLD, interruptionHandler);\n resolve();\n };\n\n const interruptionHandler = () => {\n axes.off(AXES.EVENT.FINISH, animationFinishHandler);\n reject(new FlickingError(ERROR.MESSAGE.ANIMATION_INTERRUPTED, ERROR.CODE.ANIMATION_INTERRUPTED));\n };\n\n axes.once(AXES.EVENT.FINISH, animationFinishHandler);\n axes.once(AXES.EVENT.HOLD, interruptionHandler);\n\n animate();\n });\n }\n\n public updateDirection() {\n const flicking = getFlickingAttached(this._flicking);\n const axes = this._axes!;\n const panInput = this._panInput!;\n\n axes.disconnect(panInput);\n axes.connect(flicking.horizontal ? [AXES.POSITION_KEY, \"\"] : [\"\", AXES.POSITION_KEY], panInput);\n\n panInput.options.scale = flicking.horizontal ? [flicking.camera.panelOrder === ORDER.RTL ? 1 : -1, 0] : [0, -1];\n }\n\n private _resetInternalValues() {\n this._flicking = null;\n this._axes = null;\n this._panInput = null;\n this._animatingContext = { start: 0, end: 0, offset: 0 };\n this._dragged = false;\n }\n\n private _onAxesHold = () => {\n this._dragged = false;\n };\n\n private _onAxesChange = () => {\n this._dragged = !!this._panInput?.isEnabled();\n };\n\n private _preventClickWhenDragged = (e: MouseEvent) => {\n if (this._dragged) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n this._dragged = false;\n };\n}\n\nexport default AxesController;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AxesController from \"../control/AxesController\";\nimport { DIRECTION, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getDirection, getFlickingAttached } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\n/**\n * A component that manages inputs and animation of Flicking\n * @ko Flicking의 입력 장치 & 애니메이션을 담당하는 컴포넌트\n */\nabstract class Control {\n // Internal States\n protected _flicking: Flicking | null;\n protected _controller: AxesController;\n protected _activePanel: Panel | null;\n protected _nextPanel: Panel | null;\n\n /**\n * A controller that handles the {@link https://naver.github.io/egjs-axes/ @egjs/axes} events\n * @ko {@link https://naver.github.io/egjs-axes/ @egjs/axes}의 이벤트를 처리하는 컨트롤러 컴포넌트\n * @type {AxesController}\n * @readonly\n */\n public get controller() { return this._controller; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get activeIndex() { return this._activePanel?.index ?? -1; }\n /**\n * An active panel\n * @ko 현재 선택된 패널\n * @type {Panel | null}\n * @readonly\n */\n public get activePanel() { return this._activePanel; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._controller.state.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._controller.state.holding; }\n\n /** */\n public constructor() {\n this._flicking = null;\n this._controller = new AxesController();\n this._activePanel = null;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @method\n * @abstract\n * @memberof Control\n * @instance\n * @name moveToPosition\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public abstract moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise;\n\n /**\n * Initialize Control\n * @ko Control을 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._controller.init(flicking);\n\n return this;\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._controller.destroy();\n\n this._flicking = null;\n this._activePanel = null;\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @chainable\n * @return {this}\n */\n public enable(): this {\n this._controller.enable();\n\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @chainable\n * @return {this}\n */\n public disable(): this {\n this._controller.disable();\n\n return this;\n }\n\n /**\n * Releases ongoing user input (mouse/touch)\n * @ko 사용자의 현재 입력(마우스/터치)를 중단시킵니다\n * @chainable\n * @return {this}\n */\n public release(): this {\n this._controller.release();\n\n return this;\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} When the given panel is already removed or not in the Camera's {@link Camera#range range}\n * {@link ERROR_CODE POSITION_NOT_REACHABLE} 주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우\n * @return {this}\n */\n public updateAnimation(panel: Panel, duration?: number, direction?: ValueOf): this {\n const state = this._controller.state;\n const position = this._getPosition(panel, direction ?? DIRECTION.NONE);\n\n state.targetPanel = panel;\n this._controller.updateAnimation(position, duration);\n\n return this;\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @chainable\n * @return {this}\n */\n public stopAnimation(): this {\n const state = this._controller.state;\n\n state.targetPanel = null;\n this._controller.stopAnimation();\n\n return this;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void { // eslint-disable-line @typescript-eslint/no-unused-vars\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n camera.lookAt(camera.clampToReachablePosition(activePanel.position));\n }\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._controller.update(camera.controlParams);\n\n return this;\n }\n\n /**\n * Reset {@link Control#activePanel activePanel} to `null`\n * @ko {@link Control#activePanel activePanel}을 `null`로 초기화합니다\n * @chainable\n * @return {this}\n */\n public resetActive(): this {\n this._activePanel = null;\n\n return this;\n }\n\n /**\n * Move {@link Camera} to the given panel\n * @ko {@link Camera}를 해당 패널 위로 이동합니다\n * @param {Panel} panel The target panel to move이동할 패널\n * @param {object} options An options object옵션 오브젝트\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public async moveToPanel(panel: Panel, {\n duration,\n direction = DIRECTION.NONE,\n axesEvent\n }: {\n duration: number;\n direction?: ValueOf;\n axesEvent?: OnRelease;\n }) {\n const position = this._getPosition(panel, direction);\n this._triggerIndexChangeEvent(panel, panel.position, axesEvent, direction);\n\n return this._animateToPosition({ position, duration, newActivePanel: panel, axesEvent });\n }\n\n /**\n * @internal\n */\n public setActive(newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) {\n const flicking = getFlickingAttached(this._flicking);\n\n this._activePanel = newActivePanel;\n this._nextPanel = null;\n\n flicking.camera.updateAdaptiveHeight();\n\n if (newActivePanel !== prevActivePanel) {\n flicking.trigger(new ComponentEvent(EVENTS.CHANGED, {\n index: newActivePanel.index,\n panel: newActivePanel,\n prevIndex: prevActivePanel?.index ?? -1,\n prevPanel: prevActivePanel,\n isTrusted,\n direction: prevActivePanel ? getDirection(prevActivePanel.position, newActivePanel.position) : DIRECTION.NONE\n }));\n } else {\n flicking.trigger(new ComponentEvent(EVENTS.RESTORED, {\n isTrusted\n }));\n }\n }\n\n /**\n * @internal\n */\n public copy(control: Control) {\n this._flicking = control._flicking;\n this._activePanel = control._activePanel;\n this._controller = control._controller;\n }\n\n protected _triggerIndexChangeEvent(panel: Panel, position: number, axesEvent?: OnRelease, direction?: ValueOf) {\n const flicking = getFlickingAttached(this._flicking);\n const triggeringEvent = panel !== this._activePanel ? EVENTS.WILL_CHANGE : EVENTS.WILL_RESTORE;\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n const event = new ComponentEvent(triggeringEvent, {\n index: panel.index,\n panel,\n isTrusted: axesEvent?.isTrusted || false,\n direction: direction ?? getDirection(activePanel?.position ?? camera.position, position)\n });\n\n this._nextPanel = panel;\n flicking.trigger(event);\n\n if (event.isCanceled()) {\n throw new FlickingError(ERROR.MESSAGE.STOP_CALLED_BY_USER, ERROR.CODE.STOP_CALLED_BY_USER);\n }\n }\n\n protected async _animateToPosition({\n position,\n duration,\n newActivePanel,\n axesEvent\n }: {\n position: number;\n duration: number;\n newActivePanel: Panel;\n axesEvent?: OnRelease;\n }) {\n const flicking = getFlickingAttached(this._flicking);\n const animate = () => this._controller.animateTo(position, duration, axesEvent);\n const state = this._controller.state;\n\n state.targetPanel = newActivePanel;\n\n if (duration <= 0) {\n return animate();\n } else {\n return animate().then(async () => {\n await flicking.renderer.render();\n }).catch(err => {\n if (axesEvent && err instanceof FlickingError && err.code === ERROR.CODE.ANIMATION_INTERRUPTED) return;\n throw err;\n });\n }\n }\n\n private _getPosition(panel: Panel, direction: ValueOf = DIRECTION.NONE) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n let position = panel.position;\n const nearestAnchor = camera.findNearestAnchor(position);\n\n if (panel.removed || !nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(panel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n if (!camera.canReach(panel)) {\n // Override position & panel if that panel is not reachable\n position = nearestAnchor.position;\n panel = nearestAnchor.panel;\n } else if (flicking.circularEnabled) {\n // Circular mode is enabled, find nearest distance to panel\n const camPos = this._controller.position; // Actual position of the Axes\n const camRangeDiff = camera.rangeDiff;\n const possiblePositions = [position, position + camRangeDiff, position - camRangeDiff]\n .filter(pos => {\n if (direction === DIRECTION.NONE) return true;\n\n return direction === DIRECTION.PREV\n ? pos <= camPos\n : pos >= camPos;\n });\n\n position = possiblePositions.reduce((nearestPosition, pos) => {\n if (Math.abs(camPos - pos) < Math.abs(camPos - nearestPosition)) {\n return pos;\n } else {\n return nearestPosition;\n }\n }, Infinity);\n }\n\n return position;\n }\n}\n\nexport default Control;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"./panel/Panel\";\n\n/**\n * A data component that has actual position where the camera should be stopped at\n * @ko 카메라가 정지해야하는 실제 위치를 담고 있는 데이터 컴포넌트\n */\nclass AnchorPoint {\n private _index: number;\n private _pos: number;\n private _panel: Panel;\n\n /**\n * Index of AnchorPoint\n * @ko AnchorPoint의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of AnchorPoint\n * @ko AnchorPoint의 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos; }\n /**\n * A {@link Panel} instance AnchorPoint is referencing to\n * @ko AnchorPoint가 참조하고 있는 {@link Panel}\n * @type {Panel}\n * @readonly\n */\n public get panel() { return this._panel; }\n\n /**\n * @param {object} options An options object옵션 객체\n * @param {number} [options.index] Index of AnchorPointAnchorPoint의 인덱스\n * @param {number} [options.position] Position of AnchorPointAnchorPoint의 좌표\n * @param {Panel} [options.panel] A {@link Panel} instance AnchorPoint is referencing toAnchorPoint가 참조하고 있는 {@link Panel}\n */\n public constructor({\n index,\n position,\n panel\n }: {\n index: number;\n position: number;\n panel: Panel;\n }) {\n this._index = index;\n this._pos = position;\n this._panel = panel;\n }\n}\n\nexport default AnchorPoint;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport { circulateIndex, clamp, getFlickingAttached } from \"../utils\";\nimport * as AXES from \"../const/axes\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link SnapControl}\n * @ko {@link SnapControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels can go after release입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n */\nexport interface SnapControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that uses a release momentum to choose destination panel\n * @ko 입력을 중단한 시점의 가속도에 영향받아 도달할 패널을 계산하는 이동 방식을 사용하는 {@link Control}\n */\nclass SnapControl extends Control {\n private _count: SnapControlOptions[\"count\"];\n\n /**\n * Maximum number of panels can go after release\n * @ko 입력 중단 이후 통과하여 이동할 수 있는 패널의 최대 갯수\n * @type {number}\n * @default Infinity\n */\n public get count() { return this._count; }\n\n public set count(val: SnapControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = Infinity\n }: Partial = {}) {\n super();\n\n this._count = count;\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activeAnchor = camera.findActiveAnchor();\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n const state = this._controller.state;\n\n if (!activeAnchor || !anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const snapThreshold = this._calcSnapThreshold(flicking.threshold, position, activeAnchor);\n\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n const absPosDelta = Math.abs(posDelta);\n const snapDelta = axesEvent && axesEvent.delta[AXES.POSITION_KEY] !== 0\n ? Math.abs(axesEvent.delta[AXES.POSITION_KEY])\n : absPosDelta;\n let targetAnchor: AnchorPoint;\n\n if (snapDelta >= snapThreshold && snapDelta > 0) {\n // Move to anchor at position\n targetAnchor = this._findSnappedAnchor(position, anchorAtCamera);\n } else if (absPosDelta >= flicking.threshold && absPosDelta > 0) {\n // Move to the adjacent panel\n targetAnchor = this._findAdjacentAnchor(position, posDelta, anchorAtCamera);\n } else {\n // Fallback to nearest panel from current camera\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetAnchor.panel, position, axesEvent);\n\n return this._animateToPosition({\n position: camera.clampToReachablePosition(targetAnchor.position),\n duration,\n newActivePanel: targetAnchor.panel,\n axesEvent\n });\n }\n\n private _findSnappedAnchor(position: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const count = this._count;\n\n const currentPos = camera.position;\n\n const clampedPosition = camera.clampToReachablePosition(position);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtCamera || !anchorAtPosition) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n if (!isFinite(count)) {\n return anchorAtPosition;\n }\n\n const panelCount = flicking.panelCount;\n const anchors = camera.anchorPoints;\n\n let loopCount = Math.sign(position - currentPos) * Math.floor(Math.abs(position - currentPos) / camera.rangeDiff);\n if ((position > currentPos && anchorAtPosition.index < anchorAtCamera.index)\n || (anchorAtPosition.position > anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount += 1;\n } else if ((position < currentPos && anchorAtPosition.index > anchorAtCamera.index)\n || (anchorAtPosition.position < anchorAtCamera.position && anchorAtPosition.index === anchorAtCamera.index)) {\n loopCount -= 1;\n }\n\n const circularIndexOffset = loopCount * panelCount;\n const anchorAtPositionIndex = anchorAtPosition.index + circularIndexOffset;\n\n if (Math.abs(anchorAtPositionIndex - anchorAtCamera.index) <= count) {\n const anchor = anchors[anchorAtPosition.index];\n\n return new AnchorPoint({\n index: anchor.index,\n position: anchor.position + loopCount * camera.rangeDiff,\n panel: anchor.panel\n });\n }\n\n if (flicking.circularEnabled) {\n const targetAnchor = anchors[circulateIndex(anchorAtCamera.index + Math.sign(position - currentPos) * count, panelCount)];\n let loop = Math.floor(count / panelCount);\n\n if (position > currentPos && targetAnchor.index < anchorAtCamera.index) {\n loop += 1;\n } else if (position < currentPos && targetAnchor.index > anchorAtCamera.index) {\n loop -= 1;\n }\n\n return new AnchorPoint({\n index: targetAnchor.index,\n position: targetAnchor.position + loop * camera.rangeDiff,\n panel: targetAnchor.panel\n });\n } else {\n return anchors[clamp(anchorAtCamera.index + Math.sign(position - currentPos) * count, 0, anchors.length - 1)];\n }\n }\n\n private _findAdjacentAnchor(position: number, posDelta: number, anchorAtCamera: AnchorPoint): AnchorPoint {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n if (camera.circularEnabled) {\n const anchorIncludePosition = camera.findAnchorIncludePosition(position);\n\n if (anchorIncludePosition && anchorIncludePosition.position !== anchorAtCamera.position) {\n return anchorIncludePosition;\n }\n }\n\n const adjacentAnchor = (posDelta > 0 ? camera.getNextAnchor(anchorAtCamera) : camera.getPrevAnchor(anchorAtCamera)) ?? anchorAtCamera;\n\n return adjacentAnchor;\n }\n\n private _calcSnapThreshold(threshold: number, position: number, activeAnchor: AnchorPoint): number {\n const isNextDirection = position > activeAnchor.position;\n const panel = activeAnchor.panel;\n const panelSize = panel.size;\n const alignPos = panel.alignPosition;\n\n // Minimum distance needed to decide prev/next panel as nearest\n /*\n * | Prev | Next |\n * |<------>|<------------>|\n * [ |<-Anchor ]\n */\n return Math.max(threshold, isNextDirection\n ? panelSize - alignPos + panel.margin.next\n : alignPos + panel.margin.prev);\n }\n}\n\nexport default SnapControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport FlickingError from \"../core/FlickingError\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached } from \"../utils\";\n\nimport Control from \"./Control\";\n\n/**\n * An options for the {@link FreeControl}\n * @ko {@link FreeControl} 생성시 사용되는 옵션\n * @interface\n * @property {boolean} stopAtEdge Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n */\nexport interface FreeControlOptions {\n stopAtEdge: boolean;\n}\n\n/**\n * A {@link Control} that can be scrolled freely without alignment\n * @ko 패널이 정해진 지점에 정렬되지 않고, 자유롭게 스크롤할 수 있는 이동 방식을 사용하는 {@link Control}\n */\nclass FreeControl extends Control {\n private _stopAtEdge: FreeControlOptions[\"stopAtEdge\"];\n\n /**\n * Make scroll animation to stop at the start/end of the scroll area, not going out the bounce area\n * @ko 스크롤 애니메이션을 스크롤 영역의 시작과 끝부분에서 멈추도록 하여, 바운스 영역을 넘어가지 않도록 합니다\n * @type {boolean}\n * @default true\n */\n public get stopAtEdge() { return this._stopAtEdge; }\n\n public set stopAtEdge(val: FreeControlOptions[\"stopAtEdge\"]) { this._stopAtEdge = val; }\n\n /** */\n public constructor({\n stopAtEdge = true\n }: Partial = {}) {\n super();\n\n this._stopAtEdge = stopAtEdge;\n }\n\n /**\n * Update position after resizing\n * @ko resize 이후에 position을 업데이트합니다\n * @param {number} progressInPanel Previous camera's progress in active panel before resizeResize 이전 현재 선택된 패널 내에서의 카메라 progress 값\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {Promise}\n */\n public updatePosition(progressInPanel: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const activePanel = this._activePanel;\n\n if (activePanel) {\n const panelRange = activePanel.range;\n const newPosition = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n camera.lookAt(camera.clampToReachablePosition(newPosition));\n }\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n\n const camera = flicking.camera;\n const targetPos = camera.clampToReachablePosition(position);\n\n const anchorAtPosition = camera.findAnchorIncludePosition(targetPos);\n\n if (!anchorAtPosition) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const targetPanel = anchorAtPosition.panel;\n\n // Trigger only change event\n if (targetPanel !== this._activePanel) {\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n }\n\n return this._animateToPosition({ position: this._stopAtEdge ? targetPos : position, duration, newActivePanel: targetPanel, axesEvent });\n }\n}\n\nexport default FreeControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { OnRelease } from \"@egjs/axes\";\n\nimport Panel from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { clamp, getFlickingAttached, getMinusCompensatedIndex, isBetween } from \"../utils\";\nimport * as ERROR from \"../const/error\";\n\nimport Control from \"./Control\";\n/**\n * An options for the {@link StrictControl}\n * @ko {@link StrictControl} 생성시 사용되는 옵션\n * @interface\n * @property {number} count Maximum number of panels that can be moved at a time최대로 움직일 수 있는 패널의 개수\n */\nexport interface StrictControlOptions {\n count: number;\n}\n\n/**\n * A {@link Control} that allow you to select the maximum number of panels to move at a time\n * @ko 한번에 최대로 이동할 패널의 개수를 선택 가능한 {@link Control}\n */\nclass StrictControl extends Control {\n private _count: number;\n private _indexRange: { min: number; max: number };\n\n /**\n * Maximum number of panels that can be moved at a time\n * @ko 최대로 움직일 수 있는 패널의 개수\n * @type {number}\n * @default 1\n */\n public get count() { return this._count; }\n\n public set count(val: StrictControlOptions[\"count\"]) { this._count = val; }\n\n /** */\n public constructor({\n count = 1\n }: Partial = {}) {\n super();\n\n this._count = count;\n this._resetIndexRange();\n }\n\n /**\n * Destroy Control and return to initial state\n * @ko Control을 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy() {\n super.destroy();\n\n this._resetIndexRange();\n }\n\n /**\n * Update {@link Control#controller controller}'s state\n * @ko {@link Control#controller controller}의 내부 상태를 갱신합니다\n * @chainable\n * @return {this}\n */\n public updateInput(): this {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const renderer = flicking.renderer;\n const controller = this._controller;\n const controlParams = camera.controlParams;\n const count = this._count;\n\n const activePanel = controller.state.animating\n ? camera.findNearestAnchor(camera.position)?.panel\n : this._activePanel;\n\n if (!activePanel) {\n controller.update(controlParams);\n this._resetIndexRange();\n return this;\n }\n\n const cameraRange = controlParams.range;\n const currentPos = activePanel.position;\n const currentIndex = activePanel.index;\n const panelCount = renderer.panelCount;\n\n let prevPanelIndex = currentIndex - count;\n let nextPanelIndex = currentIndex + count;\n\n if (prevPanelIndex < 0) {\n prevPanelIndex = flicking.circularEnabled\n ? getMinusCompensatedIndex((prevPanelIndex + 1) % panelCount - 1, panelCount)\n : clamp(prevPanelIndex, 0, panelCount - 1);\n }\n if (nextPanelIndex >= panelCount) {\n nextPanelIndex = flicking.circularEnabled\n ? nextPanelIndex % panelCount\n : clamp(nextPanelIndex, 0, panelCount - 1);\n }\n\n const prevPanel = renderer.panels[prevPanelIndex];\n const nextPanel = renderer.panels[nextPanelIndex];\n\n let prevPos = Math.max(prevPanel.position, cameraRange.min);\n let nextPos = Math.min(nextPanel.position, cameraRange.max);\n\n if (prevPos > currentPos) {\n prevPos -= camera.rangeDiff;\n }\n if (nextPos < currentPos) {\n nextPos += camera.rangeDiff;\n }\n\n controlParams.range = {\n min: prevPos,\n max: nextPos\n };\n\n if (controlParams.circular) {\n if (controlParams.position < prevPos) {\n controlParams.position += camera.rangeDiff;\n }\n\n if (controlParams.position > nextPos) {\n controlParams.position -= camera.rangeDiff;\n }\n }\n\n controlParams.circular = false;\n controller.update(controlParams);\n\n this._indexRange = {\n min: prevPanel.index,\n max: nextPanel.index\n };\n\n return this;\n }\n\n public async moveToPanel(panel: Panel, options: Parameters[1]): Promise {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const controller = this._controller;\n\n controller.update(camera.controlParams);\n\n return super.moveToPanel(panel, options);\n }\n\n /**\n * Move {@link Camera} to the given position\n * @ko {@link Camera}를 주어진 좌표로 이동합니다\n * @param {number} position The target position to move이동할 좌표\n * @param {number} duration Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @param {object} [axesEvent] {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} event of {@link https://naver.github.io/egjs-axes/ Axes}\n * {@link https://naver.github.io/egjs-axes/ Axes}의 {@link https://naver.github.io/egjs-axes/release/latest/doc/eg.Axes.html#event:release release} 이벤트\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|When the given panel is already removed or not in the Camera's {@link Camera#range range}|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|When {@link Control#init init} is not called before|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the animation is interrupted by user input|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE POSITION_NOT_REACHABLE}|주어진 패널이 제거되었거나, Camera의 {@link Camera#range range} 밖에 있을 경우|\n * |{@link ERROR_CODE NOT_ATTACHED_TO_FLICKING}|{@link Control#init init}이 이전에 호출되지 않은 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target position해당 좌표 도달시에 resolve되는 Promise\n */\n public moveToPosition(position: number, duration: number, axesEvent?: OnRelease) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const currentPanel = this._nextPanel ?? this._activePanel;\n const axesRange = this._controller.range;\n const indexRange = this._indexRange;\n const cameraRange = camera.range;\n const state = this._controller.state;\n\n const clampedPosition = clamp(camera.clampToReachablePosition(position), axesRange[0], axesRange[1]);\n const anchorAtPosition = camera.findAnchorIncludePosition(clampedPosition);\n\n if (!anchorAtPosition || !currentPanel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n\n const prevPos = currentPanel.position;\n const posDelta = flicking.animating\n ? state.delta\n : position - camera.position;\n\n const isOverThreshold = Math.abs(posDelta) >= flicking.threshold;\n const adjacentAnchor = (position > prevPos)\n ? camera.getNextAnchor(anchorAtPosition)\n : camera.getPrevAnchor(anchorAtPosition);\n\n let targetPos: number;\n let targetPanel: Panel;\n\n const anchors = camera.anchorPoints;\n const firstAnchor = anchors[0];\n const lastAnchor = anchors[anchors.length - 1];\n\n const shouldBounceToFirst = position <= cameraRange.min && isBetween(firstAnchor.panel.index, indexRange.min, indexRange.max);\n const shouldBounceToLast = position >= cameraRange.max && isBetween(lastAnchor.panel.index, indexRange.min, indexRange.max);\n\n const isAdjacent = adjacentAnchor && (indexRange.min <= indexRange.max\n ? isBetween(adjacentAnchor.index, indexRange.min, indexRange.max)\n : adjacentAnchor.index >= indexRange.min || adjacentAnchor.index <= indexRange.max);\n\n if (shouldBounceToFirst || shouldBounceToLast) {\n // In bounce area\n const targetAnchor = position < cameraRange.min ? firstAnchor : lastAnchor;\n\n targetPanel = targetAnchor.panel;\n targetPos = targetAnchor.position;\n } else if (isOverThreshold && anchorAtPosition.position !== currentPanel.position) {\n // Move to anchor at position\n targetPanel = anchorAtPosition.panel;\n targetPos = anchorAtPosition.position;\n } else if (isOverThreshold && isAdjacent) {\n // Move to adjacent anchor\n targetPanel = adjacentAnchor!.panel;\n targetPos = adjacentAnchor!.position;\n } else {\n // Fallback to nearest panel from current camera\n const anchorAtCamera = camera.findNearestAnchor(camera.position);\n if (!anchorAtCamera) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(position), ERROR.CODE.POSITION_NOT_REACHABLE));\n }\n return this.moveToPanel(anchorAtCamera.panel, {\n duration,\n axesEvent\n });\n }\n\n this._triggerIndexChangeEvent(targetPanel, position, axesEvent);\n\n return this._animateToPosition({\n position: targetPos,\n duration,\n newActivePanel: targetPanel,\n axesEvent\n });\n }\n\n public setActive = (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => {\n super.setActive(newActivePanel, prevActivePanel, isTrusted);\n this.updateInput();\n };\n\n private _resetIndexRange() {\n this._indexRange = { min: 0, max: 0 };\n }\n}\n\nexport default StrictControl;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { clamp } from \"../../utils\";\n\n/**\n * A mode of camera\n */\nabstract class CameraMode {\n protected _flicking: Flicking;\n\n /** */\n public constructor(flicking: Flicking) {\n this._flicking = flicking;\n }\n\n public abstract checkAvailability(): boolean;\n public abstract getRange(): { min: number; max: number };\n\n public getAnchors(): AnchorPoint[] {\n const panels = this._flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n const anchorsIncludingPosition = anchors.filter(anchor => anchor.panel.includePosition(position, true));\n\n return anchorsIncludingPosition.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const anchors = this._flicking.camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n let prevDist = Infinity;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.abs(anchor.position - position);\n\n if (dist > prevDist) {\n // Return previous anchor\n return anchors[anchorIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return anchors[anchors.length - 1];\n }\n\n public clampToReachablePosition(position: number): number {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n return clamp(position, range.min, range.max);\n }\n\n public getCircularOffset(): number {\n return 0;\n }\n\n public canReach(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n\n if (panel.removed) return false;\n\n const panelPos = panel.position;\n\n return panelPos >= range.min && panelPos <= range.max;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const visibleRange = camera.visibleRange;\n // Should not include margin, as we don't declare what the margin is visible as what the panel is visible.\n return panel.isVisibleOnRange(visibleRange.min, visibleRange.max);\n }\n}\n\nexport default CameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport CameraMode from \"./CameraMode\";\n\nclass LinearCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n // It's always available\n return true;\n }\n\n public getRange(): { min: number; max: number } {\n const renderer = this._flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n return { min: firstPanel?.position ?? 0, max: lastPanel?.position ?? 0 };\n }\n}\n\nexport default LinearCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../../core/panel/Panel\";\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport { DIRECTION } from \"../../const/external\";\nimport { circulatePosition } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\n/**\n * A {@link Camera} mode that connects the last panel and the first panel, enabling continuous loop\n * @ko 첫번째 패널과 마지막 패널이 이어진 상태로, 무한히 회전할 수 있는 종류의 {@link Camera} 모드\n */\nclass CircularCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n if (panels.length <= 0) {\n return false;\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n const visibleSize = flicking.camera.size;\n const panelSizeSum = lastPanelNext - firstPanelPrev;\n\n const canSetCircularMode = panels\n .every(panel => panelSizeSum - panel.size >= visibleSize);\n\n return canSetCircularMode;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return { min: 0, max: 0 };\n }\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n const firstPanelPrev = firstPanel.range.min - firstPanel.margin.prev;\n const lastPanelNext = lastPanel.range.max + lastPanel.margin.next;\n\n return { min: firstPanelPrev, max: lastPanelNext };\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const panels = flicking.renderer.panels;\n\n return panels.map((panel, index) => new AnchorPoint({\n index,\n position: panel.position,\n panel\n }));\n }\n\n public findNearestAnchor(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n const camRange = camera.range;\n let minDist = Infinity;\n let minDistIndex = -1;\n for (let anchorIdx = 0; anchorIdx < anchors.length; anchorIdx++) {\n const anchor = anchors[anchorIdx];\n const dist = Math.min(\n Math.abs(anchor.position - position),\n Math.abs(anchor.position - camRange.min + camRange.max - position),\n Math.abs(position - camRange.min + camRange.max - anchor.position)\n );\n\n if (dist < minDist) {\n minDist = dist;\n minDistIndex = anchorIdx;\n }\n }\n\n // Return last anchor\n return anchors[minDistIndex];\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n const rangeDiff = camera.rangeDiff;\n const anchorCount = anchors.length;\n const positionInRange = circulatePosition(position, range.min, range.max);\n\n let anchorInRange: AnchorPoint | null = super.findAnchorIncludePosition(positionInRange);\n\n if (anchorCount > 0 && (position === range.min || position === range.max)) {\n const possibleAnchors = [\n anchorInRange,\n new AnchorPoint({\n index: 0,\n position: anchors[0].position + rangeDiff,\n panel: anchors[0].panel\n }),\n new AnchorPoint({\n index: anchorCount - 1,\n position: anchors[anchorCount - 1].position - rangeDiff,\n panel: anchors[anchorCount - 1].panel\n })\n ].filter(anchor => !!anchor) as AnchorPoint[];\n\n anchorInRange = possibleAnchors.reduce((nearest: AnchorPoint | null, anchor) => {\n if (!nearest) return anchor;\n\n return Math.abs(nearest.position - position) < Math.abs(anchor.position - position)\n ? nearest\n : anchor;\n }, null);\n }\n\n if (!anchorInRange) return null;\n\n if (position < range.min) {\n const loopCount = -Math.floor((range.min - position) / rangeDiff) - 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n } else if (position > range.max) {\n const loopCount = Math.floor((position - range.max) / rangeDiff) + 1;\n\n return new AnchorPoint({\n index: anchorInRange.index,\n position: anchorInRange.position + rangeDiff * loopCount,\n panel: anchorInRange.panel\n });\n }\n\n return anchorInRange;\n }\n\n public getCircularOffset(): number {\n const flicking = this._flicking;\n const camera = flicking.camera;\n\n if (!camera.circularEnabled) return 0;\n\n const toggled = flicking.panels.filter(panel => panel.toggled);\n const toggledPrev = toggled.filter(panel => panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = toggled.filter(panel => panel.toggleDirection === DIRECTION.NEXT);\n\n return this._calcPanelAreaSum(toggledPrev) - this._calcPanelAreaSum(toggledNext);\n }\n\n public clampToReachablePosition(position: number): number {\n // Basically all position is reachable for circular camera\n return position;\n }\n\n public canReach(panel: Panel): boolean {\n if (panel.removed) return false;\n\n // Always reachable on circular mode\n return true;\n }\n\n public canSee(panel: Panel): boolean {\n const camera = this._flicking.camera;\n const range = camera.range;\n const rangeDiff = camera.rangeDiff;\n const visibleRange = camera.visibleRange;\n const visibleInCurrentRange = super.canSee(panel);\n\n // Check looped visible area for circular case\n if (visibleRange.min < range.min) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min + rangeDiff, visibleRange.max + rangeDiff);\n } else if (visibleRange.max > range.max) {\n return visibleInCurrentRange || panel.isVisibleOnRange(visibleRange.min - rangeDiff, visibleRange.max - rangeDiff);\n }\n\n return visibleInCurrentRange;\n }\n\n private _calcPanelAreaSum(panels: Panel[]) {\n return panels.reduce((sum: number, panel: Panel) => sum + panel.sizeIncludingMargin, 0);\n }\n}\n\nexport default CircularCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport AnchorPoint from \"../../core/AnchorPoint\";\nimport Panel from \"../../core/panel/Panel\";\nimport { parseAlign } from \"../../utils\";\n\nimport CameraMode from \"./CameraMode\";\n\nclass BoundCameraMode extends CameraMode {\n public checkAvailability(): boolean {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return false;\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n return isBiggerThanViewport;\n }\n\n public getRange(): { min: number; max: number } {\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const alignPos = flicking.camera.alignPosition;\n\n const firstPanel = renderer.getPanel(0);\n const lastPanel = renderer.getPanel(renderer.panelCount - 1);\n\n if (!firstPanel || !lastPanel) {\n return { min: 0, max: 0 };\n }\n\n const viewportSize = flicking.camera.size;\n const firstPanelPrev = firstPanel.range.min;\n const lastPanelNext = lastPanel.range.max;\n const panelAreaSize = lastPanelNext - firstPanelPrev;\n const isBiggerThanViewport = viewportSize < panelAreaSize;\n\n const firstPos = firstPanelPrev + alignPos;\n const lastPos = lastPanelNext - viewportSize + alignPos;\n\n if (isBiggerThanViewport) {\n return { min: firstPos, max: lastPos };\n } else {\n const align = flicking.camera.align;\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n const pos = firstPos + parseAlign(alignVal, lastPos - firstPos);\n\n return { min: pos, max: pos };\n }\n }\n\n public getAnchors(): AnchorPoint[] {\n const flicking = this._flicking;\n const camera = flicking.camera;\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n return [];\n }\n\n const range = flicking.camera.range;\n const reachablePanels = panels.filter(panel => camera.canReach(panel));\n\n if (reachablePanels.length > 0) {\n const shouldPrependBoundAnchor = reachablePanels[0].position !== range.min;\n const shouldAppendBoundAnchor = reachablePanels[reachablePanels.length - 1].position !== range.max;\n const indexOffset = shouldPrependBoundAnchor ? 1 : 0;\n\n const newAnchors = reachablePanels.map((panel, idx) => new AnchorPoint({\n index: idx + indexOffset,\n position: panel.position,\n panel\n }));\n\n if (shouldPrependBoundAnchor) {\n newAnchors.splice(0, 0, new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panels[reachablePanels[0].index - 1]\n }));\n }\n\n if (shouldAppendBoundAnchor) {\n newAnchors.push(new AnchorPoint({\n index: newAnchors.length,\n position: range.max,\n panel: panels[reachablePanels[reachablePanels.length - 1].index + 1]\n }));\n }\n\n return newAnchors;\n } else if (range.min !== range.max) {\n // There're more than 2 panels\n const nearestPanelAtMin = this._findNearestPanel(range.min, panels);\n const panelAtMin = nearestPanelAtMin.index === panels.length - 1\n ? nearestPanelAtMin.prev()!\n : nearestPanelAtMin;\n const panelAtMax = panelAtMin.next()!;\n\n return [\n new AnchorPoint({\n index: 0,\n position: range.min,\n panel: panelAtMin\n }),\n new AnchorPoint({\n index: 1,\n position: range.max,\n panel: panelAtMax\n })\n ];\n } else {\n return [new AnchorPoint({\n index: 0,\n position: range.min,\n panel: this._findNearestPanel(range.min, panels)\n })];\n }\n }\n\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n const camera = this._flicking.camera;\n const range = camera.range;\n const anchors = camera.anchorPoints;\n\n if (anchors.length <= 0) return null;\n\n if (position <= range.min) {\n return anchors[0];\n } else if (position >= range.max) {\n return anchors[anchors.length - 1];\n } else {\n return super.findAnchorIncludePosition(position);\n }\n }\n\n private _findNearestPanel(pos: number, panels: Panel[]): Panel {\n let prevDist = Infinity;\n for (let panelIdx = 0; panelIdx < panels.length; panelIdx++) {\n const panel = panels[panelIdx];\n const dist = Math.abs(panel.position - pos);\n\n if (dist > prevDist) {\n // Return previous anchor\n return panels[panelIdx - 1];\n }\n\n prevDist = dist;\n }\n\n // Return last anchor\n return panels[panels.length - 1];\n }\n}\n\nexport default BoundCameraMode;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport FlickingError from \"../core/FlickingError\";\nimport Panel from \"../core/panel/Panel\";\nimport AnchorPoint from \"../core/AnchorPoint\";\nimport * as ERROR from \"../const/error\";\nimport { ALIGN, CIRCULAR_FALLBACK, DIRECTION, EVENTS, ORDER } from \"../const/external\";\nimport { checkExistence, find, getFlickingAttached, getProgress, getStyle, includes, parseAlign, toArray } from \"../utils\";\nimport { ValueOf } from \"../type/internal\";\n\nimport { CameraMode, BoundCameraMode, CircularCameraMode, LinearCameraMode } from \"./mode\";\n\nexport interface CameraOptions {\n align: FlickingOptions[\"align\"];\n}\n\n/**\n * A component that manages actual movement inside the viewport\n * @ko 뷰포트 내에서의 실제 움직임을 담당하는 컴포넌트\n */\nclass Camera {\n // Options\n private _align: FlickingOptions[\"align\"];\n\n // Internal states\n private _flicking: Flicking;\n private _mode: CameraMode;\n private _el: HTMLElement;\n private _transform: string;\n private _position: number;\n private _alignPos: number;\n private _offset: number;\n private _circularOffset: number;\n private _circularEnabled: boolean;\n private _range: { min: number; max: number };\n private _visiblePanels: Panel[];\n private _anchors: AnchorPoint[];\n private _needPanelTriggered: { prev: boolean; next: boolean };\n private _panelOrder: ValueOf;\n\n // Internal states getter\n /**\n * The camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._el; }\n /**\n * An array of the child elements of the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)의 자식 엘리먼트 배열\n * @type {HTMLElement[]}\n * @readonly\n */\n public get children() { return toArray(this._el.children) as HTMLElement[]; }\n /**\n * Current position of the camera\n * @ko Camera의 현재 좌표\n * @type {number}\n * @readonly\n */\n public get position() { return this._position; }\n /**\n * Align position inside the viewport where {@link Panel}'s {@link Panel#alignPosition alignPosition} should be located at\n * @ko 패널의 정렬 기준 위치. 뷰포트 내에서 {@link Panel}의 {@link Panel#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * Position offset, used for the {@link Flicking#renderOnlyVisible renderOnlyVisible} option\n * @ko Camera의 좌표 오프셋. {@link Flicking#renderOnlyVisible renderOnlyVisible} 옵션을 위해 사용됩니다.\n * @type {number}\n * @default 0\n * @readonly\n */\n public get offset() { return this._offset - this._circularOffset; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._circularEnabled; }\n /**\n * A current camera mode\n * @type {CameraMode}\n * @readonly\n */\n public get mode() { return this._mode; }\n /**\n * A range that Camera's {@link Camera#position position} can reach\n * @ko Camera의 {@link Camera#position position}이 도달 가능한 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} max A maximum position최대 위치\n * @readonly\n */\n public get range() { return this._range; }\n /**\n * A difference between Camera's minimum and maximum position that can reach\n * @ko Camera가 도달 가능한 최소/최대 좌표의 차이\n * @type {number}\n * @readonly\n */\n public get rangeDiff() { return this._range.max - this._range.min; }\n /**\n * An array of visible panels from the current position\n * @ko 현재 보이는 패널들의 배열\n * @type {Panel[]}\n * @readonly\n */\n public get visiblePanels() { return this._visiblePanels; }\n /**\n * A range of the visible area from the current position\n * @ko 현재 위치에서 보이는 범위\n * @type {object}\n * @property {number} min A minimum position최소 위치\n * @property {number} min A maximum position최대 위치\n * @readonly\n */\n public get visibleRange() { return { min: this._position - this._alignPos, max: this._position - this._alignPos + this.size }; }\n /**\n * An array of {@link AnchorPoint}s that Camera can be stopped at\n * @ko 카메라가 도달 가능한 {@link AnchorPoint}의 목록\n * @type {AnchorPoint[]}\n * @readonly\n */\n public get anchorPoints() { return this._anchors; }\n /**\n * A current parameters of the Camera for updating {@link AxesController}\n * @ko {@link AxesController}를 업데이트하기 위한 현재 Camera 패러미터들\n * @type {ControlParams}\n * @readonly\n */\n public get controlParams() { return { range: this._range, position: this._position, circular: this._circularEnabled }; }\n /**\n * A Boolean value indicating whether Camera's over the minimum or maximum position reachable\n * @ko 현재 카메라가 도달 가능한 범위의 최소 혹은 최대점을 넘어섰는지를 나타냅니다\n * @type {boolean}\n * @readonly\n */\n public get atEdge() { return this._position <= this._range.min || this._position >= this._range.max; }\n /**\n * Return the size of the viewport\n * @ko 뷰포트 크기를 반환합니다\n * @type {number}\n * @readonly\n */\n public get size() {\n const flicking = this._flicking;\n return flicking\n ? flicking.horizontal\n ? flicking.viewport.width\n : flicking.viewport.height\n : 0;\n }\n\n /**\n * Return the camera's position progress from the first panel to last panel\n * Range is from 0 to last panel's index\n * @ko 첫번째 패널로부터 마지막 패널까지의 카메라 위치의 진행도를 반환합니다\n * 범위는 0부터 마지막 패널의 인덱스까지입니다\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n const position = this._position + this._offset;\n const nearestAnchor = this.findNearestAnchor(this._position);\n\n if (!flicking || !nearestAnchor) {\n return NaN;\n }\n\n const nearestPanel = nearestAnchor.panel;\n const panelPos = nearestPanel.position + nearestPanel.offset;\n const bounceSize = flicking.control.controller.bounce!;\n\n const { min: prevRange, max: nextRange } = this.range;\n const rangeDiff = this.rangeDiff;\n\n if (position === panelPos) {\n return nearestPanel.index;\n }\n\n if (position < panelPos) {\n const prevPanel = nearestPanel.prev();\n let prevPosition = prevPanel\n ? prevPanel.position + prevPanel.offset\n : prevRange - bounceSize[0];\n\n // Looped\n if (prevPosition > panelPos) {\n prevPosition -= rangeDiff;\n }\n\n return nearestPanel.index - 1 + getProgress(position, prevPosition, panelPos);\n } else {\n const nextPanel = nearestPanel.next();\n let nextPosition = nextPanel\n ? nextPanel.position + nextPanel.offset\n : nextRange + bounceSize[1];\n\n // Looped\n if (nextPosition < panelPos) {\n nextPosition += rangeDiff;\n }\n\n return nearestPanel.index + getProgress(position, panelPos, nextPosition);\n }\n }\n\n /**\n * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element(`.flicking-camera`)\n * @ko 카메라 엘리먼트(`.flicking-camera`)에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성\n * @type {string}\n * @readonly\n */\n public get panelOrder() { return this._panelOrder; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Camera#alignPosition alignPosition} should be located at inside the viewport element\n * @ko {@link Camera#alignPosition alignPosition}이 뷰포트 엘리먼트 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n }\n\n /** */\n public constructor(flicking: Flicking, {\n align = ALIGN.CENTER\n }: Partial = {}) {\n this._flicking = flicking;\n this._resetInternalValues();\n\n // Options\n this._align = align;\n }\n\n /**\n * Initialize Camera\n * @ko Camera를 초기화합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} If the camera element(`.flicking-camera`) does not exist inside viewport element\n * {@link ERROR_CODE VAL_MUST_NOT_NULL} 뷰포트 엘리먼트 내부에 카메라 엘리먼트(`.flicking-camera`)가 존재하지 않을 경우\n * @return {this}\n */\n public init(): this {\n const viewportEl = this._flicking.viewport.element;\n\n checkExistence(viewportEl.firstElementChild, \"First element child of the viewport element\");\n this._el = viewportEl.firstElementChild as HTMLElement;\n this._checkTranslateSupport();\n\n this._updateMode();\n this.updatePanelOrder();\n\n return this;\n }\n\n /**\n * Destroy Camera and return to initial state\n * @ko Camera를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): this {\n this._resetInternalValues();\n return this;\n }\n\n /**\n * Move to the given position and apply CSS transform\n * @ko 해당 좌표로 이동하고, CSS transform을 적용합니다\n * @param {number} pos A new position움직일 위치\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public lookAt(pos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const prevPos = this._position;\n\n this._position = pos;\n const toggled = this._togglePanels(prevPos, pos);\n this._refreshVisiblePanels();\n this._checkNeedPanel();\n this._checkReachEnd(prevPos, pos);\n\n if (toggled) {\n void flicking.renderer.render().then(() => {\n this.updateOffset();\n });\n } else {\n this.applyTransform();\n }\n }\n\n /**\n * Return a previous {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 이전 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The previous {@link AnchorPoint}이전 {@link AnchorPoint}\n */\n public getPrevAnchor(anchor: AnchorPoint): AnchorPoint | null {\n if (!this._circularEnabled || anchor.index !== 0) {\n return this._anchors[anchor.index - 1] || null;\n } else {\n const anchors = this._anchors;\n const rangeDiff = this.rangeDiff;\n const lastAnchor = anchors[anchors.length - 1];\n\n return new AnchorPoint({\n index: lastAnchor.index,\n position: lastAnchor.position - rangeDiff,\n panel: lastAnchor.panel\n });\n }\n }\n\n /**\n * Return a next {@link AnchorPoint} of given {@link AnchorPoint}\n * If it does not exist, return `null` instead\n * @ko 주어진 {@link AnchorPoint}의 다음 {@link AnchorPoint}를 반환합니다\n * 존재하지 않을 경우 `null`을 반환합니다\n * @param {AnchorPoint} anchor A reference {@link AnchorPoint}기준 {@link AnchorPoint}\n * @return {AnchorPoint | null} The next {@link AnchorPoint}다음 {@link AnchorPoint}\n */\n public getNextAnchor(anchor: AnchorPoint): AnchorPoint | null {\n const anchors = this._anchors;\n\n if (!this._circularEnabled || anchor.index !== anchors.length - 1) {\n return anchors[anchor.index + 1] || null;\n } else {\n const rangeDiff = this.rangeDiff;\n const firstAnchor = anchors[0];\n\n return new AnchorPoint({\n index: firstAnchor.index,\n position: firstAnchor.position + rangeDiff,\n panel: firstAnchor.panel\n });\n }\n }\n\n /**\n * Return the camera's position progress in the panel below\n * Value is from 0 to 1 when the camera's inside panel\n * Value can be lower than 0 or bigger than 1 when it's in the margin area\n * @ko 현재 카메라 아래 패널에서의 위치 진행도를 반환합니다\n * 반환값은 카메라가 패널 내부에 있을 경우 0부터 1까지의 값을 갖습니다\n * 패널의 margin 영역에 있을 경우 0보다 작거나 1보다 큰 값을 반환할 수 있습니다\n */\n public getProgressInPanel(panel: Panel) {\n const panelRange = panel.range;\n\n return (this._position - panelRange.min) / (panelRange.max - panelRange.min);\n }\n\n /**\n * Return {@link AnchorPoint} that includes given position\n * If there's no {@link AnchorPoint} that includes the given position, return `null` instead\n * @ko 주어진 좌표를 포함하는 {@link AnchorPoint}를 반환합니다\n * 주어진 좌표를 포함하는 {@link AnchorPoint}가 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} that includes the given position해당 좌표를 포함하는 {@link AnchorPoint}\n */\n public findAnchorIncludePosition(position: number): AnchorPoint | null {\n return this._mode.findAnchorIncludePosition(position);\n }\n\n /**\n * Return {@link AnchorPoint} nearest to given position\n * If there're no {@link AnchorPoint}s, return `null` instead\n * @ko 해당 좌표에서 가장 가까운 {@link AnchorPoint}를 반환합니다\n * {@link AnchorPoint}가 하나도 없을 경우 `null`을 반환합니다\n * @param {number} position A position to check확인할 좌표\n * @return {AnchorPoint | null} The {@link AnchorPoint} nearest to the given position해당 좌표에 가장 인접한 {@link AnchorPoint}\n */\n public findNearestAnchor(position: number): AnchorPoint | null {\n return this._mode.findNearestAnchor(position);\n }\n\n /**\n * Return {@link AnchorPoint} that matches {@link Flicking#currentPanel}\n * @ko 현재 {@link Flicking#currentPanel}에 해당하는 {@link AnchorPoint}를 반환합니다\n * @return {AnchorPoint | null}\n */\n public findActiveAnchor(): AnchorPoint | null {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!activePanel) return null;\n\n return find(this._anchors, anchor => anchor.panel.index === activePanel.index) ?? this.findNearestAnchor(activePanel.position);\n }\n\n /**\n * Clamp the given position between camera's range\n * @ko 주어진 좌표를 Camera가 도달 가능한 범위 사이의 값으로 만듭니다\n * @param {number} position A position to clamp범위를 제한할 좌표\n * @return {number} A clamped position범위 제한된 좌표\n */\n public clampToReachablePosition(position: number): number {\n return this._mode.clampToReachablePosition(position);\n }\n\n /**\n * Check whether the given panel is inside of the Camera's range\n * @ko 해당 {@link Panel}이 Camera가 도달 가능한 범위 내에 있는지를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return {boolean} Whether the panel's inside Camera's range도달 가능한 범위 내에 해당 패널이 존재하는지 여부\n */\n public canReach(panel: Panel): boolean {\n return this._mode.canReach(panel);\n }\n\n /**\n * Check whether the given panel element is visible at the current position\n * @ko 현재 좌표에서 해당 패널 엘리먼트를 볼 수 있는지 여부를 반환합니다\n * @param panel An instance of {@link Panel} to check확인할 {@link Panel}의 인스턴스\n * @return Whether the panel element is visible at the current position현재 위치에서 해당 패널 엘리먼트가 보이는지 여부\n */\n public canSee(panel: Panel): boolean {\n return this._mode.canSee(panel);\n }\n\n /**\n * Update {@link Camera#range range} of Camera\n * @ko Camera의 {@link Camera#range range}를 업데이트합니다\n * @method\n * @abstract\n * @memberof Camera\n * @instance\n * @name updateRange\n * @chainable\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @return {this}\n */\n public updateRange() {\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n\n this._updateMode();\n this._range = this._mode.getRange();\n\n panels.forEach(panel => panel.updateCircularToggleDirection());\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#alignPosition alignPosition}\n * @ko Camera의 {@link Camera#alignPosition alignPosition}을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateAlignPos(): this {\n const align = this._align;\n\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n this._alignPos = parseAlign(alignVal, this.size);\n\n return this;\n }\n\n /**\n * Update Camera's {@link Camera#anchorPoints anchorPoints}\n * @ko Camera의 {@link Camera#anchorPoints anchorPoints}를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAnchors(): this {\n this._anchors = this._mode.getAnchors();\n\n return this;\n }\n\n /**\n * Update Viewport's height to active panel's height\n * @ko 현재 선택된 패널의 높이와 동일하도록 뷰포트의 높이를 업데이트합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} When {@link Camera#init init} is not called before\n * {@link ERROR_CODE NOT_ATTACHED_TO_FLICKING} {@link Camera#init init}이 이전에 호출되지 않은 경우\n * @chainable\n * @return {this}\n */\n public updateAdaptiveHeight() {\n const flicking = getFlickingAttached(this._flicking);\n const activePanel = flicking.control.activePanel;\n\n if (!flicking.horizontal || !flicking.adaptive || !activePanel) return;\n\n flicking.viewport.setSize({\n height: activePanel.height\n });\n }\n\n /**\n * Update current offset of the camera\n * @ko 현재 카메라의 오프셋을 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updateOffset(): this {\n const flicking = getFlickingAttached(this._flicking);\n const position = this._position;\n const unRenderedPanels = flicking.panels.filter(panel => !panel.rendered);\n\n this._offset = unRenderedPanels\n .filter(panel => panel.position + panel.offset < position)\n .reduce((offset, panel) => offset + panel.sizeIncludingMargin, 0);\n\n this._circularOffset = this._mode.getCircularOffset();\n\n this.applyTransform();\n\n return this;\n }\n\n /**\n * Update direction to match the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS property applied to the camera element\n * @ko 카메라 엘리먼트에 적용된 {@link https://developer.mozilla.org/en-US/docs/Web/CSS/direction direction} CSS 속성에 맞게 방향을 업데이트합니다\n * @return {this}\n */\n public updatePanelOrder(): this {\n const flicking = getFlickingAttached(this._flicking);\n\n if (!flicking.horizontal) return this;\n\n const el = this._el;\n const direction = getStyle(el).direction;\n if (direction !== this._panelOrder) {\n this._panelOrder = direction === ORDER.RTL ? ORDER.RTL : ORDER.LTR;\n if (flicking.initialized) {\n flicking.control.controller.updateDirection();\n }\n }\n\n return this;\n }\n\n /**\n * Reset the history of {@link Flicking#event:needPanel needPanel} events so it can be triggered again\n * @ko 발생한 {@link Flicking#event:needPanel needPanel} 이벤트들을 초기화하여 다시 발생할 수 있도록 합니다\n * @chainable\n * @return {this}\n */\n public resetNeedPanelHistory(): this {\n this._needPanelTriggered = { prev: false, next: false };\n return this;\n }\n\n /**\n * Apply \"transform\" style with the current position to camera element\n * @ko 현재 위치를 기준으로한 transform 스타일을 카메라 엘리먼트에 적용합니다.\n * @return {this}\n */\n public applyTransform(): this {\n const el = this._el;\n const flicking = getFlickingAttached(this._flicking);\n const renderer = flicking.renderer;\n\n if (renderer.rendering || !flicking.initialized) return this;\n\n const actualPosition = this._position - this._alignPos - this._offset + this._circularOffset;\n\n el.style[this._transform] = flicking.horizontal\n ? `translate(${this._panelOrder === ORDER.RTL ? actualPosition : -actualPosition}px)`\n : `translate(0, ${-actualPosition}px)`;\n\n return this;\n }\n\n private _resetInternalValues() {\n this._position = 0;\n this._alignPos = 0;\n this._offset = 0;\n this._circularOffset = 0;\n this._circularEnabled = false;\n this._range = { min: 0, max: 0 };\n this._visiblePanels = [];\n this._anchors = [];\n this._needPanelTriggered = { prev: false, next: false };\n }\n\n private _refreshVisiblePanels() {\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n const newVisiblePanels = panels.filter(panel => this.canSee(panel));\n const prevVisiblePanels = this._visiblePanels;\n this._visiblePanels = newVisiblePanels;\n\n const added: Panel[] = newVisiblePanels.filter(panel => !includes(prevVisiblePanels, panel));\n const removed: Panel[] = prevVisiblePanels.filter(panel => !includes(newVisiblePanels, panel));\n\n if (added.length > 0 || removed.length > 0) {\n void flicking.renderer.render().then(() => {\n flicking.trigger(new ComponentEvent(EVENTS.VISIBLE_CHANGE, {\n added,\n removed,\n visiblePanels: newVisiblePanels\n }));\n });\n }\n }\n\n private _checkNeedPanel(): void {\n const needPanelTriggered = this._needPanelTriggered;\n\n if (needPanelTriggered.prev && needPanelTriggered.next) return;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n\n if (panels.length <= 0) {\n if (!needPanelTriggered.prev) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n if (!needPanelTriggered.next) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n\n return;\n }\n\n const cameraPosition = this._position;\n const cameraSize = this.size;\n const cameraRange = this._range;\n const needPanelThreshold = flicking.needPanelThreshold;\n\n const cameraPrev = cameraPosition - this._alignPos;\n const cameraNext = cameraPrev + cameraSize;\n\n const firstPanel = panels[0];\n const lastPanel = panels[panels.length - 1];\n\n if (!needPanelTriggered.prev) {\n const firstPanelPrev = firstPanel.range.min;\n\n if (cameraPrev <= (firstPanelPrev + needPanelThreshold) || cameraPosition <= (cameraRange.min + needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.PREV }));\n needPanelTriggered.prev = true;\n }\n }\n\n if (!needPanelTriggered.next) {\n const lastPanelNext = lastPanel.range.max;\n\n if (cameraNext >= (lastPanelNext - needPanelThreshold) || cameraPosition >= (cameraRange.max - needPanelThreshold)) {\n flicking.trigger(new ComponentEvent(EVENTS.NEED_PANEL, { direction: DIRECTION.NEXT }));\n needPanelTriggered.next = true;\n }\n }\n }\n\n private _checkReachEnd(prevPos: number, newPos: number): void {\n const flicking = getFlickingAttached(this._flicking);\n const range = this._range;\n\n const wasBetweenRange = prevPos > range.min && prevPos < range.max;\n const isBetweenRange = newPos > range.min && newPos < range.max;\n\n if (!wasBetweenRange || isBetweenRange) return;\n\n const direction = newPos <= range.min ? DIRECTION.PREV : DIRECTION.NEXT;\n\n flicking.trigger(new ComponentEvent(EVENTS.REACH_EDGE, {\n direction\n }));\n }\n\n private _checkTranslateSupport = () => {\n const transforms = [\"webkitTransform\", \"msTransform\", \"MozTransform\", \"OTransform\", \"transform\"];\n\n const supportedStyle = document.documentElement.style;\n let transformName = \"\";\n for (const prefixedTransform of transforms) {\n if (prefixedTransform in supportedStyle) {\n transformName = prefixedTransform;\n }\n }\n\n if (!transformName) {\n throw new FlickingError(ERROR.MESSAGE.TRANSFORM_NOT_SUPPORTED, ERROR.CODE.TRANSFORM_NOT_SUPPORTED);\n }\n\n this._transform = transformName;\n };\n\n private _updateMode() {\n const flicking = getFlickingAttached(this._flicking);\n\n if (flicking.circular) {\n const circularMode = new CircularCameraMode(flicking);\n const canSetCircularMode = circularMode.checkAvailability();\n\n if (canSetCircularMode) {\n this._mode = circularMode;\n } else {\n const fallbackMode = flicking.circularFallback;\n\n this._mode = fallbackMode === CIRCULAR_FALLBACK.BOUND\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n }\n\n this._circularEnabled = canSetCircularMode;\n } else {\n this._mode = flicking.bound\n ? new BoundCameraMode(flicking)\n : new LinearCameraMode(flicking);\n this._circularEnabled = false;\n }\n }\n\n private _togglePanels(prevPos: number, pos: number): boolean {\n if (pos === prevPos) return false;\n\n const flicking = getFlickingAttached(this._flicking);\n const panels = flicking.renderer.panels;\n const toggled = panels.map(panel => panel.toggle(prevPos, pos));\n\n return toggled.some(isToggled => isToggled);\n }\n}\n\nexport default Camera;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { ComponentEvent } from \"@egjs/component\";\nimport ImReady from \"@egjs/imready\";\n\nimport Flicking, { FlickingOptions } from \"../Flicking\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\nimport FlickingError from \"../core/FlickingError\";\nimport { ALIGN, EVENTS } from \"../const/external\";\nimport * as ERROR from \"../const/error\";\nimport { getFlickingAttached, getMinusCompensatedIndex, includes, parsePanelAlign } from \"../utils\";\n\nimport RenderingStrategy from \"./strategy/RenderingStrategy\";\n\nexport interface RendererOptions {\n align?: FlickingOptions[\"align\"];\n strategy: RenderingStrategy;\n}\n\n/**\n * A component that manages {@link Panel} and its elements\n * @ko {@link Panel}과 그 엘리먼트들을 관리하는 컴포넌트\n */\nabstract class Renderer {\n // Internal States\n protected _flicking: Flicking | null;\n protected _panels: Panel[];\n protected _rendering: boolean;\n\n // Options\n protected _align: NonNullable;\n protected _strategy: RendererOptions[\"strategy\"];\n\n // Internal states Getter\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._panels; }\n /**\n * A boolean value indicating whether rendering is in progress\n * @ko 현재 렌더링이 시작되어 끝나기 전까지의 상태인지의 여부\n * @type {boolean}\n * @readonly\n * @internal\n */\n public get rendering() { return this._rendering; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._panels.length; }\n /**\n * @internal\n */\n public get strategy() { return this._strategy; }\n\n // Options Getter\n /**\n * A {@link Panel}'s {@link Panel#align align} value that applied to all panels\n * @ko {@link Panel}에 공통적으로 적용할 {@link Panel#align align} 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: NonNullable) {\n this._align = val;\n\n const panelAlign = parsePanelAlign(val);\n this._panels.forEach(panel => { panel.align = panelAlign; });\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {Constants.ALIGN | string | number} [options.align=\"center\"] An {@link Flicking#align align} value that will be applied to all panels전체 패널에 적용될 {@link Flicking#align align} 값\n * @param {object} [options.strategy] An instance of RenderingStrategy(internal module)RenderingStrategy의 인스턴스(내부 모듈)\n */\n public constructor({\n align = ALIGN.CENTER,\n strategy\n }: RendererOptions) {\n this._flicking = null;\n this._panels = [];\n this._rendering = false;\n\n // Bind options\n this._align = align;\n this._strategy = strategy;\n }\n\n /**\n * Render panel elements inside the camera element\n * @ko 패널 엘리먼트들을 카메라 엘리먼트 내부에 렌더링합니다\n * @method\n * @abstract\n * @memberof Renderer\n * @instance\n * @name render\n * @chainable\n * @return {this}\n */\n public abstract render(): Promise;\n\n protected abstract _collectPanels(): void;\n protected abstract _createPanel(el: any, options: Omit): Panel;\n\n /**\n * Initialize Renderer\n * @ko Renderer를 초기화합니다\n * @param {Flicking} flicking An instance of {@link Flicking}Flicking의 인스턴스\n * @chainable\n * @return {this}\n */\n public init(flicking: Flicking): this {\n this._flicking = flicking;\n this._collectPanels();\n\n return this;\n }\n\n /**\n * Destroy Renderer and return to initial state\n * @ko Renderer를 초기 상태로 되돌립니다\n * @return {void}\n */\n public destroy(): void {\n this._flicking = null;\n this._panels = [];\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n */\n public getPanel(index: number): Panel | null {\n return this._panels[index] || null;\n }\n\n public forceRenderAllPanels(): Promise {\n this._panels.forEach(panel => panel.markForShow());\n\n return Promise.resolve();\n }\n\n /**\n * Update all panel sizes\n * @ko 모든 패널의 크기를 업데이트합니다\n * @chainable\n * @return {this}\n */\n public updatePanelSize(): this {\n const flicking = getFlickingAttached(this._flicking);\n const panels = this._panels;\n\n if (panels.length <= 0) return this;\n\n if (flicking.panelsPerView > 0) {\n const firstPanel = panels[0];\n firstPanel.resize();\n\n this._updatePanelSizeByGrid(firstPanel, panels);\n } else {\n flicking.panels.forEach(panel => panel.resize());\n }\n\n return this;\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {Array} items An array of items to insert추가할 아이템들의 배열\n * @param {number} [items.index] Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {any[]} [items.elements] An array of element or framework component with element in it엘리먼트의 배열 혹은 프레임워크에서 엘리먼트를 포함한 컴포넌트들의 배열\n * @param {boolean} [items.hasDOMInElements] Whether it contains actual DOM elements. If set to true, renderer will add them to the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에 추가합니다\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n */\n public batchInsert(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsInserted = this.batchInsertDefer(...items);\n\n if (allPanelsInserted.length <= 0) return [];\n\n this.updateAfterPanelChange(allPanelsInserted, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchInsertDefer(...items: Array<{\n index: number;\n elements: any[];\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const prevFirstPanel = panels[0];\n const align = parsePanelAlign(this._align);\n\n const allPanelsInserted = items.reduce((addedPanels, item) => {\n const insertingIdx = getMinusCompensatedIndex(item.index, panels.length);\n const panelsPushed = panels.slice(insertingIdx);\n const panelsInserted = item.elements.map((el, idx) => this._createPanel(el, { index: insertingIdx + idx, align, flicking }));\n\n panels.splice(insertingIdx, 0, ...panelsInserted);\n\n if (item.hasDOMInElements) {\n // Insert the actual elements as camera element's children\n this._insertPanelElements(panelsInserted, panelsPushed[0] ?? null);\n }\n\n // Resize the newly added panels\n if (flicking.panelsPerView > 0) {\n const firstPanel = prevFirstPanel || panelsInserted[0].resize();\n\n this._updatePanelSizeByGrid(firstPanel, panelsInserted);\n } else {\n panelsInserted.forEach(panel => panel.resize());\n }\n\n // Update panel indexes & positions\n panelsPushed.forEach(panel => {\n panel.increaseIndex(panelsInserted.length);\n panel.updatePosition();\n });\n\n return [...addedPanels, ...panelsInserted];\n }, []);\n\n return allPanelsInserted;\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {Array} items An array of items to remove제거할 아이템들의 배열\n * @param {number} [items.index] Index of panel to remove제거할 패널의 인덱스\n * @param {number} [items.deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @param {boolean} [items.hasDOMInElements=1] Whether it contains actual DOM elements. If set to true, renderer will remove them from the camera element내부에 실제 DOM 엘리먼트들을 포함하고 있는지 여부. true로 설정할 경우, 렌더러는 해당 엘리먼트들을 카메라 엘리먼트 내부에서 제거합니다\n * @return An array of removed panels제거된 패널들의 배열\n */\n public batchRemove(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>): Panel[] {\n const allPanelsRemoved = this.batchRemoveDefer(...items);\n\n if (allPanelsRemoved.length <= 0) return [];\n\n this.updateAfterPanelChange([], allPanelsRemoved);\n\n return allPanelsRemoved;\n }\n\n /**\n * Defers update\n * camera position & others will be updated after calling updateAfterPanelChange\n * @internal\n */\n public batchRemoveDefer(...items: Array<{\n index: number;\n deleteCount: number;\n hasDOMInElements: boolean;\n }>) {\n const panels = this._panels;\n const flicking = getFlickingAttached(this._flicking);\n\n const { control } = flicking;\n const activePanel = control.activePanel;\n\n const allPanelsRemoved = items.reduce((removed, item) => {\n const { index, deleteCount } = item;\n const removingIdx = getMinusCompensatedIndex(index, panels.length);\n\n const panelsPulled = panels.slice(removingIdx + deleteCount);\n const panelsRemoved = panels.splice(removingIdx, deleteCount);\n\n if (panelsRemoved.length <= 0) return [];\n\n // Update panel indexes & positions\n panelsPulled.forEach(panel => {\n panel.decreaseIndex(panelsRemoved.length);\n panel.updatePosition();\n });\n\n if (item.hasDOMInElements) {\n this._removePanelElements(panelsRemoved);\n }\n\n // Remove panel elements\n panelsRemoved.forEach(panel => panel.destroy());\n\n if (includes(panelsRemoved, activePanel)) {\n control.resetActive();\n }\n\n return [...removed, ...panelsRemoved];\n }, []);\n\n return allPanelsRemoved;\n }\n\n /**\n * @internal\n */\n public updateAfterPanelChange(panelsAdded: Panel[], panelsRemoved: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n const panels = this._panels;\n const activePanel = control.activePanel;\n\n // Update camera & control\n this._updateCameraAndControl();\n\n void this.render();\n\n if (!flicking.animating) {\n if (!activePanel || activePanel.removed) {\n if (panels.length <= 0) {\n // All panels removed\n camera.lookAt(0);\n } else {\n let targetIndex = activePanel?.index ?? 0;\n if (targetIndex > panels.length - 1) {\n targetIndex = panels.length - 1;\n }\n\n void control.moveToPanel(panels[targetIndex], {\n duration: 0\n }).catch(() => void 0);\n }\n } else {\n void control.moveToPanel(activePanel, {\n duration: 0\n }).catch(() => void 0);\n }\n }\n\n flicking.camera.updateOffset();\n\n if (panelsAdded.length > 0 || panelsRemoved.length > 0) {\n flicking.trigger(new ComponentEvent(EVENTS.PANEL_CHANGE, {\n added: panelsAdded,\n removed: panelsRemoved\n }));\n\n this.checkPanelContentsReady([\n ...panelsAdded,\n ...panelsRemoved\n ]);\n }\n }\n\n /**\n * @internal\n */\n public checkPanelContentsReady(checkingPanels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const resizeOnContentsReady = flicking.resizeOnContentsReady;\n const panels = this._panels;\n\n if (!resizeOnContentsReady || flicking.virtualEnabled) return;\n\n const hasContents = (panel: Panel) => panel.element && !!panel.element.querySelector(\"img, video\");\n checkingPanels = checkingPanels.filter(panel => hasContents(panel));\n\n if (checkingPanels.length <= 0) return;\n\n const contentsReadyChecker = new ImReady();\n\n checkingPanels.forEach(panel => {\n panel.loading = true;\n });\n\n contentsReadyChecker.on(\"readyElement\", e => {\n if (!this._flicking) {\n // Renderer's destroy() is called before\n contentsReadyChecker.destroy();\n return;\n }\n\n const panel = checkingPanels[e.index];\n const camera = flicking.camera;\n const control = flicking.control;\n const prevProgressInPanel = control.activePanel\n ? camera.getProgressInPanel(control.activePanel)\n : 0;\n\n panel.loading = false;\n panel.resize();\n panels.slice(panel.index + 1).forEach(panelBehind => panelBehind.updatePosition());\n\n if (!flicking.initialized) return;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n\n if (control.animating) {\n // TODO: Need Axes update\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n });\n\n contentsReadyChecker.on(\"preReady\", e => {\n if (this._flicking) {\n void this.render();\n }\n\n if (e.readyCount === e.totalCount) {\n contentsReadyChecker.destroy();\n }\n });\n\n contentsReadyChecker.on(\"ready\", () => {\n if (this._flicking) {\n void this.render();\n }\n contentsReadyChecker.destroy();\n });\n\n contentsReadyChecker.check(checkingPanels.map(panel => panel.element));\n }\n\n protected _updateCameraAndControl() {\n const flicking = getFlickingAttached(this._flicking);\n const { camera, control } = flicking;\n\n camera.updateRange();\n camera.updateOffset();\n camera.updateAnchors();\n camera.resetNeedPanelHistory();\n control.updateInput();\n }\n\n protected _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n }\n\n protected _updatePanelSizeByGrid(referencePanel: Panel, panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const panelsPerView = flicking.panelsPerView;\n\n if (panelsPerView <= 0) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"panelsPerView\", panelsPerView), ERROR.CODE.WRONG_OPTION);\n }\n if (panels.length <= 0) return;\n\n const viewportSize = flicking.camera.size;\n const gap = referencePanel.margin.prev + referencePanel.margin.next;\n\n const panelSize = (viewportSize - gap * (panelsPerView - 1)) / panelsPerView;\n const panelSizeObj = flicking.horizontal\n ? { width: panelSize }\n : { height: panelSize };\n const firstPanelSizeObj = {\n size: panelSize,\n margin: referencePanel.margin,\n ...(!flicking.horizontal && { height: referencePanel.height})\n };\n\n if (!flicking.noPanelStyleOverride) {\n this._strategy.updatePanelSizes(flicking, panelSizeObj);\n }\n\n flicking.panels.forEach(panel => panel.resize(firstPanelSizeObj));\n }\n\n protected _removeAllChildsFromCamera() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove other elements\n while (cameraElement.firstChild) {\n cameraElement.removeChild(cameraElement.firstChild);\n }\n }\n\n protected _insertPanelElements(panels: Panel[], nextSibling: Panel | null = null) {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n const cameraElement = camera.element;\n const nextSiblingElement = nextSibling?.element || null;\n const fragment = document.createDocumentFragment();\n\n panels.forEach(panel => fragment.appendChild(panel.element));\n cameraElement.insertBefore(fragment, nextSiblingElement);\n }\n\n protected _removePanelElements(panels: Panel[]) {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n panels.forEach(panel => {\n cameraElement.removeChild(panel.element);\n });\n }\n\n protected _afterRender() {\n const flicking = getFlickingAttached(this._flicking);\n\n flicking.camera.applyTransform();\n }\n}\n\nexport default Renderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { getFlickingAttached, toArray } from \"../utils\";\nimport Panel, { PanelOptions } from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n *\n */\nclass VanillaRenderer extends Renderer {\n // eslint-disable-next-line @typescript-eslint/require-await\n public async render() {\n const flicking = getFlickingAttached(this._flicking);\n const strategy = this._strategy;\n\n strategy.updateRenderingPanels(flicking);\n strategy.renderPanels(flicking);\n\n this._resetPanelElementOrder();\n this._afterRender();\n }\n\n protected _collectPanels() {\n const flicking = getFlickingAttached(this._flicking);\n const camera = flicking.camera;\n\n this._removeAllTextNodes();\n this._panels = this._strategy.collectPanels(flicking, camera.children);\n }\n\n protected _createPanel(el: HTMLElement, options: Omit): Panel {\n return this._strategy.createPanel(el, options);\n }\n\n private _resetPanelElementOrder() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraEl = flicking.camera.element;\n\n // We're using reversed panels here as last panel should be the last element of camera element\n const reversedElements = this._strategy\n .getRenderingElementsByOrder(flicking)\n .reverse();\n\n reversedElements.forEach((el, idx) => {\n const nextEl = reversedElements[idx - 1] ? reversedElements[idx - 1] : null;\n\n if (el.nextElementSibling !== nextEl) {\n cameraEl.insertBefore(el, nextEl);\n }\n });\n }\n\n private _removeAllTextNodes() {\n const flicking = getFlickingAttached(this._flicking);\n const cameraElement = flicking.camera.element;\n\n // Remove all text nodes in the camera element\n toArray(cameraElement.childNodes).forEach(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n cameraElement.removeChild(node);\n }\n });\n }\n}\n\nexport default VanillaRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Panel from \"../core/panel/Panel\";\n\nimport Renderer from \"./Renderer\";\n\n/**\n * @internal\n */\nabstract class ExternalRenderer extends Renderer {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n protected _removePanelElements(panels: Panel[]): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n\n protected _removeAllChildsFromCamera(): void {\n // DO NOTHING, overrided to prevent an unexpected error\n }\n /* eslint-enable @typescript-eslint/no-unused-vars */\n}\n\nexport default ExternalRenderer;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { getElementSize, getProgress, getStyle, parseAlign, setSize } from \"../../utils\";\nimport { ALIGN, DIRECTION } from \"../../const/external\";\nimport { LiteralUnion, ValueOf } from \"../../type/internal\";\n\nimport ElementProvider from \"./provider/ElementProvider\";\n\nexport interface PanelOptions {\n index: number;\n align: LiteralUnion> | number;\n flicking: Flicking;\n elementProvider: ElementProvider;\n}\n\n/**\n * A slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass Panel {\n // Internal States\n protected _flicking: Flicking;\n protected _elProvider: ElementProvider;\n protected _index: number;\n protected _pos: number;\n protected _size: number;\n protected _height: number;\n protected _margin: { prev: number; next: number };\n protected _alignPos: number; // Actual align pos\n protected _rendered: boolean;\n protected _removed: boolean;\n protected _loading: boolean;\n protected _toggleDirection: ValueOf;\n protected _toggled: boolean;\n protected _togglePosition: number;\n\n // Options\n protected _align: PanelOptions[\"align\"];\n\n // Internal States Getter\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n /**\n * @internal\n * @readonly\n */\n public get elementProvider() { return this._elProvider; }\n /**\n * Index of the panel\n * @ko 패널의 인덱스\n * @type {number}\n * @readonly\n */\n public get index() { return this._index; }\n /**\n * Position of the panel, including {@link Panel#alignPosition alignPosition}\n * @ko 패널의 현재 좌표, {@link Panel#alignPosition alignPosition}을 포함하고 있습니다\n * @type {number}\n * @readonly\n */\n public get position() { return this._pos + this._alignPos; }\n /**\n * Cached size of the panel element\n * This is equal to {@link Panel#element element}'s `offsetWidth` if {@link Flicking#horizontal horizontal} is `true`, and `offsetHeight` else\n * @ko 패널 엘리먼트의 캐시된 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 {@link Panel#element element}의 `offsetWidth`와 동일하고, `false`일 경우 `offsetHeight`와 동일합니다\n * @type {number}\n * @readonly\n */\n public get size() { return this._size; }\n /**\n * Panel's size including CSS `margin`\n * This value includes {@link Panel#element element}'s margin left/right if {@link Flicking#horizontal horizontal} is `true`, and margin top/bottom else\n * @ko CSS `margin`을 포함한 패널의 크기\n * 이 값은 {@link Flicking#horizontal horizontal}이 `true`일 경우 margin left/right을 포함하고, `false`일 경우 margin top/bottom을 포함합니다\n * @type {number}\n * @readonly\n */\n public get sizeIncludingMargin() { return this._size + this._margin.prev + this._margin.next; }\n /**\n * Height of the panel element\n * @ko 패널 엘리먼트의 높이\n * @type {number}\n * @readonly\n */\n public get height() { return this._height; }\n /**\n * Cached CSS `margin` value of the panel element\n * @ko 패널 엘리먼트의 CSS `margin` 값\n * @type {object}\n * @property {number} prev CSS `margin-left` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-top` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-left`, `false`일 경우 `margin-top`에 해당하는 값\n * @property {number} next CSS `margin-right` when the {@link Flicking#horizontal horizontal} is `true`, and `margin-bottom` else\n * {@link Flicking#horizontal horizontal}이 `true`일 경우 `margin-right`, `false`일 경우 `margin-bottom`에 해당하는 값\n * @readonly\n */\n public get margin() { return this._margin; }\n /**\n * Align position inside the panel where {@link Camera}'s {@link Camera#alignPosition alignPosition} inside viewport should be located at\n * @ko 패널의 정렬 기준 위치. {@link Camera}의 뷰포트 내에서의 {@link Camera#alignPosition alignPosition}이 위치해야 하는 곳입니다\n * @type {number}\n * @readonly\n */\n public get alignPosition() { return this._alignPos; }\n /**\n * A value indicating whether the panel's {@link Flicking#remove remove}d\n * @ko 패널이 {@link Flicking#remove remove}되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get removed() { return this._removed; }\n /**\n * A value indicating whether the panel's element is being rendered on the screen\n * @ko 패널의 엘리먼트가 화면상에 렌더링되고있는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get rendered() { return this._rendered; }\n /**\n * A value indicating whether the panel's image/video is not loaded and waiting for resize\n * @ko 패널 내부의 이미지/비디오가 아직 로드되지 않아 {@link Panel#resize resize}될 것인지를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get loading() { return this._loading; }\n /**\n * Panel element's range of the bounding box\n * @ko 패널 엘리먼트의 Bounding box 범위\n * @type {object}\n * @property {number} [min] Bounding box's left({@link Flicking#horizontal horizontal}: true) / top({@link Flicking#horizontal horizontal}: false)\n * @property {number} [max] Bounding box's right({@link Flicking#horizontal horizontal}: true) / bottom({@link Flicking#horizontal horizontal}: false)\n * @readonly\n */\n public get range() { return { min: this._pos, max: this._pos + this._size }; }\n /**\n * A value indicating whether the panel's position is toggled by circular behavior\n * @ko 패널의 위치가 circular 동작에 의해 토글되었는지 여부를 나타내는 값\n * @type {boolean}\n * @readonly\n */\n public get toggled() { return this._toggled; }\n /**\n * A direction where the panel's position is toggled\n * @ko 패널의 위치가 circular 동작에 의해 토글되는 방향\n * @type {DIRECTION}\n * @readonly\n */\n public get toggleDirection() { return this._toggleDirection; }\n /**\n * Actual position offset determined by {@link Panel#order}\n * @ko {@link Panel#order}에 의한 실제 위치 변경값\n * @type {number}\n * @readonly\n */\n public get offset() {\n const toggleDirection = this._toggleDirection;\n const cameraRangeDiff = this._flicking.camera.rangeDiff;\n\n return toggleDirection === DIRECTION.NONE || !this._toggled\n ? 0\n : toggleDirection === DIRECTION.PREV\n ? -cameraRangeDiff\n : cameraRangeDiff;\n }\n\n /**\n * Progress of movement between previous or next panel relative to current panel\n * @ko 이 패널로부터 이전/다음 패널으로의 이동 진행률\n * @type {number}\n * @readonly\n */\n public get progress() {\n const flicking = this._flicking;\n\n return this.index - flicking.camera.progress;\n }\n\n /**\n * Progress of movement between points that panel is completely invisible outside of viewport(prev direction: -1, selected point: 0, next direction: 1)\n * @ko 현재 패널이 뷰포트 영역 밖으로 완전히 사라지는 지점을 기준으로 하는 진행도(prev방향: -1, 선택 지점: 0, next방향: 1)\n * @type {number}\n * @readonly\n */\n public get outsetProgress() {\n const position = this.position + this.offset;\n const alignPosition = this._alignPos;\n const camera = this._flicking.camera;\n const camPos = camera.position;\n\n if (camPos === position) {\n return 0;\n }\n\n if (camPos < position) {\n const disappearPosNext = position + (camera.size - camera.alignPosition) + alignPosition;\n\n return -getProgress(camPos, position, disappearPosNext);\n } else {\n const disappearPosPrev = position - (camera.alignPosition + this._size - alignPosition);\n\n return 1 - getProgress(camPos, disappearPosPrev, position);\n }\n }\n\n /**\n * Percentage of area where panel is visible in the viewport\n * @ko 뷰포트 안에서 패널이 보이는 영역의 비율\n * @type {number}\n * @readonly\n */\n public get visibleRatio() {\n const range = this.range;\n const size = this._size;\n const offset = this.offset;\n const visibleRange = this._flicking.camera.visibleRange;\n\n const checkingRange = {\n min: range.min + offset,\n max: range.max + offset\n };\n\n if (checkingRange.max <= visibleRange.min || checkingRange.min >= visibleRange.max) {\n return 0;\n }\n\n let visibleSize = size;\n\n if (visibleRange.min > checkingRange.min) {\n visibleSize -= visibleRange.min - checkingRange.min;\n }\n if (visibleRange.max < checkingRange.max) {\n visibleSize -= checkingRange.max - visibleRange.max;\n }\n\n return visibleSize / size;\n }\n\n public set loading(val: boolean) { this._loading = val; }\n\n // Options Getter\n /**\n * A value indicating where the {@link Panel#alignPosition alignPosition} should be located at inside the panel element\n * @ko {@link Panel#alignPosition alignPosition}이 패널 내의 어디에 위치해야 하는지를 나타내는 값\n * @type {Constants.ALIGN | string | number}\n */\n public get align() { return this._align; }\n\n // Options Setter\n public set align(val: PanelOptions[\"align\"]) {\n this._align = val;\n this._updateAlignPos();\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n * @param {Flicking} [options.elementProvider] A provider instance that redirects elements실제 엘리먼트를 반환하는 엘리먼트 공급자의 인스턴스\n */\n public constructor({\n index,\n align,\n flicking,\n elementProvider\n }: PanelOptions) {\n this._index = index;\n this._flicking = flicking;\n this._elProvider = elementProvider;\n\n this._align = align;\n\n this._removed = false;\n this._rendered = true;\n this._loading = false;\n this._resetInternalStates();\n }\n\n /**\n * Mark panel element to be appended on the camera element\n * @internal\n */\n public markForShow() {\n this._rendered = true;\n this._elProvider.show(this._flicking);\n }\n\n /**\n * Mark panel element to be removed from the camera element\n * @internal\n */\n public markForHide() {\n this._rendered = false;\n this._elProvider.hide(this._flicking);\n }\n\n /**\n * Update size of the panel\n * @ko 패널의 크기를 갱신합니다\n * @param {object} cached Predefined cached size of the panel사전에 캐시된 패널의 크기 정보\n * @chainable\n * @return {this}\n */\n public resize(cached?: {\n size: number;\n height?: number;\n margin: { prev: number; next: number };\n }): this {\n const el = this.element;\n const flicking = this._flicking;\n const {\n horizontal,\n useFractionalSize\n } = flicking;\n\n if (cached) {\n this._size = cached.size;\n this._margin = { ...cached.margin };\n this._height = cached.height ?? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: getStyle(el)\n });\n } else {\n const elStyle = getStyle(el);\n\n this._size = getElementSize({\n el,\n horizontal,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n });\n\n this._margin = horizontal\n ? {\n prev: parseFloat(elStyle.marginLeft || \"0\"),\n next: parseFloat(elStyle.marginRight || \"0\")\n } : {\n prev: parseFloat(elStyle.marginTop || \"0\"),\n next: parseFloat(elStyle.marginBottom || \"0\")\n };\n\n this._height = horizontal\n ? getElementSize({\n el,\n horizontal: false,\n useFractionalSize,\n useOffset: true,\n style: elStyle\n })\n : this._size;\n }\n\n this.updatePosition();\n this._updateAlignPos();\n\n return this;\n }\n\n /**\n * Change panel's size. This will change the actual size of the panel element by changing its CSS width/height property\n * @ko 패널 크기를 변경합니다. 패널 엘리먼트에 해당 크기의 CSS width/height를 적용합니다\n * @param {object} [size] New panel size새 패널 크기\n * @param {number|string} [size.width] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @param {number|string} [size.height] CSS string or number(in px)CSS 문자열 또는 숫자(px)\n * @chainable\n * @return {this}\n */\n public setSize(size: Partial<{\n width: number | string;\n height: number | string;\n }>): this {\n setSize(this.element, size);\n\n return this;\n }\n\n /**\n * Check whether the given element is inside of this panel's {@link Panel#element element}\n * @ko 해당 엘리먼트가 이 패널의 {@link Panel#element element} 내에 포함되어 있는지를 반환합니다\n * @param {HTMLElement} element The HTMLElement to check확인하고자 하는 HTMLElement\n * @return {boolean} A Boolean value indicating the element is inside of this panel {@link Panel#element element}패널의 {@link Panel#element element}내에 해당 엘리먼트 포함 여부\n */\n public contains(element: HTMLElement): boolean {\n return !!this.element?.contains(element);\n }\n\n /**\n * Reset internal state and set {@link Panel#removed removed} to `true`\n * @ko 내부 상태를 초기화하고 {@link Panel#removed removed}를 `true`로 설정합니다.\n * @return {void}\n */\n public destroy(): void {\n this._resetInternalStates();\n this._removed = true;\n }\n\n /**\n * Check whether the given position is inside of this panel's {@link Panel#range range}\n * @ko 주어진 좌표가 현재 패널의 {@link Panel#range range}내에 속해있는지를 반환합니다.\n * @param {number} pos A position to check확인하고자 하는 좌표\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @return {boolean} A Boolean value indicating whether the given position is included in the panel range해당 좌표가 패널 영역 내에 속해있는지 여부\n */\n public includePosition(pos: number, includeMargin: boolean = false): boolean {\n return this.includeRange(pos, pos, includeMargin);\n }\n\n /**\n * Check whether the given range is fully included in this panel's area (inclusive)\n * @ko 주어진 범위가 이 패널 내부에 완전히 포함되는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @param {boolean} [includeMargin=false] Include {@link Panel#margin margin} to the range패널 영역에 {@link Panel#margin margin}값을 포함시킵니다\n * @returns {boolean} A Boolean value indicating whether the given range is fully included in the panel range해당 범위가 패널 영역 내에 완전히 속해있는지 여부\n */\n public includeRange(min: number, max: number, includeMargin: boolean = false): boolean {\n const margin = this._margin;\n const panelRange = this.range;\n\n if (includeMargin) {\n panelRange.min -= margin.prev;\n panelRange.max += margin.next;\n }\n\n return max >= panelRange.min && min <= panelRange.max;\n }\n\n /**\n * Check whether the panel is visble in the given range (exclusive)\n * @ko 주어진 범위 내에서 이 패널의 일부가 보여지는지를 반환합니다\n * @param {number} min Minimum value of the range to check확인하고자 하는 최소 범위\n * @param {number} max Maximum value of the range to check확인하고자 하는 최대 범위\n * @returns {boolean} A Boolean value indicating whether the panel is visible해당 범위 내에서 패널을 볼 수 있는지 여부\n */\n public isVisibleOnRange(min: number, max: number): boolean {\n const panelRange = this.range;\n\n return max > panelRange.min && min < panelRange.max;\n }\n\n /**\n * Move {@link Camera} to this panel\n * @ko {@link Camera}를 이 패널로 이동합니다\n * @param {number} [duration] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @returns {Promise} A Promise which will be resolved after reaching the panel패널 도달시에 resolve되는 Promise\n */\n public focus(duration?: number) {\n return this._flicking.moveTo(this._index, duration);\n }\n\n /**\n * Get previous(`index - 1`) panel. When the previous panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the last panel if called from the first panel\n * @ko 이전(`index - 1`) 패널을 반환합니다. 이전 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 첫번째 패널에서 이 메소드를 호출할 경우 마지막 패널을 반환합니다\n * @returns {Panel | null} The previous panel이전 패널\n */\n public prev(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === 0 ? panelCount - 1 : index - 1)\n : renderer.getPanel(index - 1);\n }\n\n /**\n * Get next(`index + 1`) panel. When the next panel does not exist, this will return `null` instead\n * If the {@link Flicking#circularEnabled circular} is enabled, this will return the first panel if called from the last panel\n * @ko 다음(`index + 1`) 패널을 반환합니다. 다음 패널이 없을 경우 `null`을 반환합니다\n * {@link Flicking#circularEnabled circular} 모드가 활성화되었을 때 마지막 패널에서 이 메소드를 호출할 경우 첫번째 패널을 반환합니다\n * @returns {Panel | null} The previous panel다음 패널\n */\n public next(): Panel | null {\n const index = this._index;\n const flicking = this._flicking;\n const renderer = flicking.renderer;\n const panelCount = renderer.panelCount;\n\n if (panelCount === 1) return null;\n\n return flicking.circularEnabled\n ? renderer.getPanel(index === panelCount - 1 ? 0 : index + 1)\n : renderer.getPanel(index + 1);\n }\n\n /**\n * Increase panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 증가시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public increaseIndex(val: number): this {\n this._index += Math.max(val, 0);\n return this;\n }\n\n /**\n * Decrease panel's index by the given value\n * @ko 패널의 인덱스를 주어진 값만큼 감소시킵니다\n * @internal\n * @chainable\n * @param val An integer greater than or equal to 00보다 같거나 큰 정수\n * @returns {this}\n */\n public decreaseIndex(val: number): this {\n this._index -= Math.max(val, 0);\n return this;\n }\n\n /**\n * @internal\n */\n public updatePosition(): this {\n const prevPanel = this._flicking.renderer.panels[this._index - 1];\n\n this._pos = prevPanel\n ? prevPanel.range.max + prevPanel.margin.next + this._margin.prev\n : this._margin.prev;\n\n return this;\n }\n\n /**\n * @internal\n * @return {boolean} toggled\n */\n public toggle(prevPos: number, newPos: number): boolean {\n const toggleDirection = this._toggleDirection;\n const togglePosition = this._togglePosition;\n\n if (toggleDirection === DIRECTION.NONE || newPos === prevPos) return false;\n\n const prevToggled = this._toggled;\n\n if (newPos > prevPos) {\n if (togglePosition >= prevPos && togglePosition <= newPos) {\n this._toggled = toggleDirection === DIRECTION.NEXT;\n }\n } else {\n if (togglePosition <= prevPos && togglePosition >= newPos) {\n this._toggled = toggleDirection !== DIRECTION.NEXT;\n }\n }\n\n return prevToggled !== this._toggled;\n }\n\n /**\n * @internal\n */\n public updateCircularToggleDirection(): this {\n const flicking = this._flicking;\n\n if (!flicking.circularEnabled) {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n this._toggled = false;\n return this;\n }\n\n const camera = flicking.camera;\n const camRange = camera.range;\n const camAlignPosition = camera.alignPosition;\n const camVisibleRange = camera.visibleRange;\n const camVisibleSize = camVisibleRange.max - camVisibleRange.min;\n\n const minimumVisible = camRange.min - camAlignPosition;\n const maximumVisible = camRange.max - camAlignPosition + camVisibleSize;\n\n const shouldBeVisibleAtMin = this.includeRange(maximumVisible - camVisibleSize, maximumVisible, false);\n const shouldBeVisibleAtMax = this.includeRange(minimumVisible, minimumVisible + camVisibleSize, false);\n\n this._toggled = false;\n if (shouldBeVisibleAtMin) {\n this._toggleDirection = DIRECTION.PREV;\n this._togglePosition = this.range.max + camRange.min - camRange.max + camAlignPosition;\n this.toggle(Infinity, camera.position);\n } else if (shouldBeVisibleAtMax) {\n this._toggleDirection = DIRECTION.NEXT;\n this._togglePosition = this.range.min + camRange.max - camVisibleSize + camAlignPosition;\n this.toggle(-Infinity, camera.position);\n } else {\n this._toggleDirection = DIRECTION.NONE;\n this._togglePosition = 0;\n }\n\n return this;\n }\n\n private _updateAlignPos() {\n this._alignPos = parseAlign(this._align, this._size);\n }\n\n private _resetInternalStates() {\n this._size = 0;\n this._pos = 0;\n this._margin = { prev: 0, next: 0 };\n this._height = 0;\n this._alignPos = 0;\n this._toggled = false;\n this._togglePosition = 0;\n this._toggleDirection = DIRECTION.NONE;\n }\n}\n\nexport default Panel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport Panel, { PanelOptions } from \"../../core/panel/Panel\";\nimport ElementProvider from \"../../core/panel/provider/ElementProvider\";\nimport { DIRECTION } from \"../../const/external\";\nimport { parsePanelAlign } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nexport interface NormalRenderingStrategyOptions {\n providerCtor: new (...args: any) => ElementProvider;\n}\n\n\nclass NormalRenderingStrategy implements RenderingStrategy {\n private _providerCtor: NormalRenderingStrategyOptions[\"providerCtor\"];\n\n public constructor({ providerCtor }: NormalRenderingStrategyOptions) {\n this._providerCtor = providerCtor;\n }\n\n public renderPanels() {\n // DO_NOTHING\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const renderedPanels = flicking.renderer.panels.filter(panel => panel.rendered);\n const toggledPrev = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.PREV);\n const toggledNext = renderedPanels.filter(panel => panel.toggled && panel.toggleDirection === DIRECTION.NEXT);\n const notToggled = renderedPanels.filter(panel => !panel.toggled);\n\n return [...toggledPrev, ...notToggled, ...toggledNext].map(panel => panel.index);\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const panels = flicking.panels;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => panels[index].element);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n if (flicking.renderOnlyVisible) {\n this._showOnlyVisiblePanels(flicking);\n } else {\n flicking.panels.forEach(panel => panel.markForShow());\n }\n }\n\n public collectPanels(\n flicking: Flicking,\n elements: any[]\n ) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return elements.map((el, index) => new Panel({\n index,\n elementProvider: new this._providerCtor(el),\n align,\n flicking\n }));\n }\n\n public createPanel(\n element: any,\n options: Omit\n ) {\n return new Panel({\n ...options,\n elementProvider: new this._providerCtor(element)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n\n private _showOnlyVisiblePanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else if (!flicking.holding) {\n // During the input sequence,\n // Do not remove panel elements as it won't trigger touchend event.\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n}\n\nexport default NormalRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport { DIRECTION } from \"../../const/external\";\nimport { circulateIndex } from \"../../utils\";\n\nimport Panel, { PanelOptions } from \"./Panel\";\nimport VirtualElementProvider from \"./provider/VirtualElementProvider\";\n\ninterface VirtualPanelOptions extends PanelOptions {\n elementProvider: VirtualElementProvider;\n}\n\n/**\n * An slide data component that holds information of a single HTMLElement\n * @ko 슬라이드 데이터 컴포넌트로, 단일 HTMLElement의 정보를 갖고 있습니다\n */\nclass VirtualPanel extends Panel {\n protected _elProvider: VirtualElementProvider;\n protected _cachedInnerHTML: string | null;\n\n /**\n * `HTMLElement` that panel's referencing\n * @ko 패널이 참조하고 있는 `HTMLElement`\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._elProvider.element; }\n\n /**\n * Cached innerHTML by the previous render function\n * @ko 이전 렌더링에서 캐시된 innerHTML 정보\n * @type {string|null}\n * @readonly\n */\n public get cachedInnerHTML() { return this._cachedInnerHTML; }\n\n /**\n * An number for indexing which element it will be rendered on\n * @ko 몇 번째 엘리먼트에 렌더링될 것인지를 나타내는 숫자\n * @type {number}\n * @readonly\n */\n public get elementIndex() {\n const flicking = this._flicking;\n const virtualElCount = flicking.panelsPerView + 1;\n const panelCount = flicking.panelCount;\n let index = this._index;\n\n if (this._toggled) {\n // To prevent element duplication\n index = this._toggleDirection === DIRECTION.NEXT\n ? index + panelCount\n : index - panelCount;\n }\n\n return circulateIndex(index, virtualElCount);\n }\n\n /**\n * @param {object} options An options object옵션 오브젝트\n * @param {number} [options.index] An initial index of the panel패널의 초기 인덱스\n * @param {Constants.ALIGN | string | number} [options.align] An initial {@link Flicking#align align} value of the panel패널의 초기 {@link Flicking#align align}값\n * @param {Flicking} [options.flicking] A Flicking instance panel's referencing패널이 참조하는 {@link Flicking} 인스턴스\n */\n public constructor(options: VirtualPanelOptions) {\n super(options);\n\n options.elementProvider.init(this);\n this._elProvider = options.elementProvider;\n this._cachedInnerHTML = null;\n }\n\n public cacheRenderResult(result: string) {\n this._cachedInnerHTML = result;\n }\n\n public uncacheRenderResult() {\n this._cachedInnerHTML = null;\n }\n\n public render() {\n const flicking = this._flicking;\n const { renderPanel, cache } = flicking.virtual;\n\n const element = this._elProvider.element;\n const newInnerHTML = this._cachedInnerHTML || renderPanel(this, this._index);\n\n if (newInnerHTML === element.innerHTML) return;\n\n element.innerHTML = newInnerHTML;\n\n if (cache) {\n this.cacheRenderResult(newInnerHTML);\n }\n }\n\n public increaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.increaseIndex(val);\n }\n\n public decreaseIndex(val: number) {\n this.uncacheRenderResult();\n return super.decreaseIndex(val);\n }\n}\n\nexport default VirtualPanel;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"../../Flicking\";\nimport { PanelOptions } from \"../../core/panel/Panel\";\nimport VirtualPanel from \"../../core/panel/VirtualPanel\";\nimport VirtualElementProvider from \"../../core/panel/provider/VirtualElementProvider\";\nimport { parsePanelAlign, range, setSize } from \"../../utils\";\n\nimport RenderingStrategy from \"./RenderingStrategy\";\n\nclass VirtualRenderingStrategy implements RenderingStrategy {\n public renderPanels(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = flicking.visiblePanels as VirtualPanel[];\n const invisibleIndexes = range(flicking.panelsPerView + 1);\n\n visiblePanels.forEach(panel => {\n const elementIndex = panel.elementIndex;\n\n panel.render();\n\n virtualManager.show(elementIndex);\n invisibleIndexes[elementIndex] = -1;\n });\n\n invisibleIndexes\n .filter(val => val >= 0)\n .forEach(idx => {\n virtualManager.hide(idx);\n });\n }\n\n public getRenderingIndexesByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const visiblePanels = [...flicking.visiblePanels]\n .filter(panel => panel.rendered)\n .sort((panel1, panel2) => {\n return (panel1.position + panel1.offset) - (panel2.position + panel2.offset);\n }) as VirtualPanel[];\n\n if (visiblePanels.length <= 0) return virtualManager.elements.map((_, idx) => idx);\n\n const visibleIndexes = visiblePanels.map(panel => panel.elementIndex);\n const invisibleIndexes = virtualManager.elements\n .map((el, idx) => ({ ...el, idx }))\n .filter(el => !el.visible)\n .map(el => el.idx);\n\n return [...visibleIndexes, ...invisibleIndexes];\n }\n\n public getRenderingElementsByOrder(flicking: Flicking) {\n const virtualManager = flicking.virtual;\n const elements = virtualManager.elements;\n\n return this.getRenderingIndexesByOrder(flicking).map(index => elements[index].nativeElement);\n }\n\n public updateRenderingPanels(flicking: Flicking) {\n const panels = flicking.renderer.panels;\n const camera = flicking.camera;\n\n const visibleIndexes = camera.visiblePanels.reduce((visibles, panel) => {\n visibles[panel.index] = true;\n return visibles;\n }, {});\n\n panels.forEach(panel => {\n if (panel.index in visibleIndexes || panel.loading) {\n panel.markForShow();\n } else {\n panel.markForHide();\n }\n });\n\n camera.updateOffset();\n }\n\n public collectPanels(flicking: Flicking) {\n const align = parsePanelAlign(flicking.renderer.align);\n\n return range(flicking.virtual.initialPanelCount).map(index => new VirtualPanel({\n index,\n elementProvider: new VirtualElementProvider(flicking),\n align,\n flicking\n }));\n }\n\n public createPanel(_el: any, options: PanelOptions) {\n return new VirtualPanel({\n ...options,\n elementProvider: new VirtualElementProvider(options.flicking)\n });\n }\n\n public updatePanelSizes(flicking: Flicking, size: Partial<{\n width: number | string;\n height: number | string;\n }>) {\n flicking.virtual.elements.forEach(el => {\n setSize(el.nativeElement, size);\n });\n flicking.panels.forEach(panel => panel.setSize(size));\n }\n}\n\nexport default VirtualRenderingStrategy;\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Component, { ComponentEvent } from \"@egjs/component\";\n\nimport FlickingError from \"./core/FlickingError\";\nimport Viewport from \"./core/Viewport\";\nimport AutoResizer from \"./core/AutoResizer\";\nimport { Panel } from \"./core/panel\";\nimport { VanillaElementProvider } from \"./core/panel/provider\";\nimport VirtualManager, { VirtualOptions } from \"./core/VirtualManager\";\nimport { Control, SnapControl, SnapControlOptions, FreeControl, StrictControl, FreeControlOptions, StrictControlOptions } from \"./control\";\nimport { Camera } from \"./camera\";\nimport { Renderer, VanillaRenderer, ExternalRenderer, RendererOptions, NormalRenderingStrategy, VirtualRenderingStrategy } from \"./renderer\";\nimport { EVENTS, ALIGN, MOVE_TYPE, DIRECTION, CIRCULAR_FALLBACK } from \"./const/external\";\nimport * as ERROR from \"./const/error\";\nimport { findIndex, getElement, includes, parseElement } from \"./utils\";\nimport { HoldStartEvent, HoldEndEvent, MoveStartEvent, SelectEvent, MoveEvent, MoveEndEvent, WillChangeEvent, WillRestoreEvent, NeedPanelEvent, VisibleChangeEvent, ReachEdgeEvent, ReadyEvent, AfterResizeEvent, BeforeResizeEvent, ChangedEvent, RestoredEvent, PanelChangeEvent } from \"./type/event\";\nimport { LiteralUnion, ValueOf } from \"./type/internal\";\nimport { ElementLike, Plugin, Status, MoveTypeOptions } from \"./type/external\";\n\n/**\n * @interface\n */\nexport interface FlickingEvents {\n [EVENTS.READY]: ReadyEvent;\n [EVENTS.BEFORE_RESIZE]: BeforeResizeEvent;\n [EVENTS.AFTER_RESIZE]: AfterResizeEvent;\n [EVENTS.HOLD_START]: HoldStartEvent;\n [EVENTS.HOLD_END]: HoldEndEvent;\n [EVENTS.MOVE_START]: MoveStartEvent;\n [EVENTS.MOVE]: MoveEvent;\n [EVENTS.MOVE_END]: MoveEndEvent;\n [EVENTS.WILL_CHANGE]: WillChangeEvent;\n [EVENTS.CHANGED]: ChangedEvent;\n [EVENTS.WILL_RESTORE]: WillRestoreEvent;\n [EVENTS.RESTORED]: RestoredEvent;\n [EVENTS.SELECT]: SelectEvent;\n [EVENTS.NEED_PANEL]: NeedPanelEvent;\n [EVENTS.VISIBLE_CHANGE]: VisibleChangeEvent;\n [EVENTS.REACH_EDGE]: ReachEdgeEvent;\n [EVENTS.PANEL_CHANGE]: PanelChangeEvent;\n}\n\n/**\n * @interface\n */\nexport interface FlickingOptions {\n // UI / LAYOUT\n align: LiteralUnion> | number | { panel: number | string; camera: number | string };\n defaultIndex: number;\n horizontal: boolean;\n circular: boolean;\n circularFallback: LiteralUnion>;\n bound: boolean;\n adaptive: boolean;\n panelsPerView: number;\n noPanelStyleOverride: boolean;\n resizeOnContentsReady: boolean;\n nested: boolean;\n\n // EVENT\n needPanelThreshold: number;\n preventEventsBeforeInit: boolean;\n\n // ANIMATION\n deceleration: number;\n duration: number;\n easing: (x: number) => number;\n\n // INPUT\n inputType: string[];\n moveType: ValueOf | MoveTypeOptions>;\n threshold: number;\n interruptable: boolean;\n bounce: number | string | [number | string, number | string];\n iOSEdgeSwipeThreshold: number;\n preventClickOnDrag: boolean;\n preventDefaultOnDrag: boolean;\n disableOnInit: boolean;\n changeOnHold: boolean;\n\n // PERFORMANCE\n renderOnlyVisible: boolean;\n virtual: VirtualOptions | null;\n\n // OTHERS\n autoInit: boolean;\n autoResize: boolean;\n useResizeObserver: boolean;\n resizeDebounce: number;\n maxResizeDebounce: number;\n useFractionalSize: boolean;\n externalRenderer: ExternalRenderer | null;\n\n // @deprecated\n renderExternal: {\n renderer: new (options: RendererOptions) => ExternalRenderer;\n rendererOptions: RendererOptions;\n } | null;\n}\n\n/**\n * @extends Component\n * @support {\"ie\": \"9+(with polyfill)\", \"ch\" : \"latest\", \"ff\" : \"latest\", \"sf\" : \"latest\", \"edge\" : \"latest\", \"ios\" : \"7+\", \"an\" : \"4.X+\"}\n * @requires {@link https://github.com/naver/egjs-component|@egjs/component}\n * @requires {@link https://github.com/naver/egjs-axes|@egjs/axes}\n */\nclass Flicking extends Component {\n /**\n * Version info string\n * @ko 버전정보 문자열\n * @type {string}\n * @readonly\n * @example\n * ```ts\n * Flicking.VERSION; // ex) 4.0.0\n * ```\n */\n public static VERSION = \"#__VERSION__#\";\n\n // Core components\n private _viewport: Viewport;\n private _autoResizer: AutoResizer;\n private _camera: Camera;\n private _control: Control;\n private _renderer: Renderer;\n private _virtualManager: VirtualManager;\n\n // Options\n private _align: FlickingOptions[\"align\"];\n private _defaultIndex: FlickingOptions[\"defaultIndex\"];\n private _horizontal: FlickingOptions[\"horizontal\"];\n private _circular: FlickingOptions[\"circular\"];\n private _circularFallback: FlickingOptions[\"circularFallback\"];\n private _bound: FlickingOptions[\"bound\"];\n private _adaptive: FlickingOptions[\"adaptive\"];\n private _panelsPerView: FlickingOptions[\"panelsPerView\"];\n private _noPanelStyleOverride: FlickingOptions[\"noPanelStyleOverride\"];\n private _resizeOnContentsReady: FlickingOptions[\"resizeOnContentsReady\"];\n private _virtual: FlickingOptions[\"virtual\"];\n private _nested: FlickingOptions[\"nested\"];\n\n private _needPanelThreshold: FlickingOptions[\"needPanelThreshold\"];\n private _preventEventsBeforeInit: FlickingOptions[\"preventEventsBeforeInit\"];\n\n private _deceleration: FlickingOptions[\"deceleration\"];\n private _duration: FlickingOptions[\"duration\"];\n private _easing: FlickingOptions[\"easing\"];\n\n private _inputType: FlickingOptions[\"inputType\"];\n private _moveType: FlickingOptions[\"moveType\"];\n private _threshold: FlickingOptions[\"threshold\"];\n private _interruptable: FlickingOptions[\"interruptable\"];\n private _bounce: FlickingOptions[\"bounce\"];\n private _iOSEdgeSwipeThreshold: FlickingOptions[\"iOSEdgeSwipeThreshold\"];\n private _preventClickOnDrag: FlickingOptions[\"preventClickOnDrag\"];\n private _preventDefaultOnDrag: FlickingOptions[\"preventDefaultOnDrag\"];\n private _disableOnInit: FlickingOptions[\"disableOnInit\"];\n private _changeOnHold: FlickingOptions[\"changeOnHold\"];\n\n private _renderOnlyVisible: FlickingOptions[\"renderOnlyVisible\"];\n\n private _autoInit: FlickingOptions[\"autoInit\"];\n private _autoResize: FlickingOptions[\"autoResize\"];\n private _useResizeObserver: FlickingOptions[\"useResizeObserver\"];\n private _resizeDebounce: FlickingOptions[\"resizeDebounce\"];\n private _maxResizeDebounce: FlickingOptions[\"maxResizeDebounce\"];\n private _useFractionalSize: FlickingOptions[\"useFractionalSize\"];\n private _externalRenderer: FlickingOptions[\"externalRenderer\"];\n private _renderExternal: FlickingOptions[\"renderExternal\"];\n\n // Internal State\n private _initialized: boolean;\n private _plugins: Plugin[];\n\n // Components\n /**\n * {@link Control} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Control} 인스턴스\n * @type {Control}\n * @default SnapControl\n * @readonly\n * @see Control\n * @see SnapControl\n * @see FreeControl\n */\n public get control() { return this._control; }\n /**\n * {@link Camera} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Camera} 인스턴스\n * @type {Camera}\n * @default LinearCamera\n * @readonly\n * @see Camera\n * @see LinearCamera\n * @see BoundCamera\n * @see CircularCamera\n */\n public get camera() { return this._camera; }\n /**\n * {@link Renderer} instance of the Flicking\n * @ko 현재 Flicking에 활성화된 {@link Renderer} 인스턴스\n * @type {Renderer}\n * @default VanillaRenderer\n * @readonly\n * @see Renderer\n * @see VanillaRenderer\n * @see ExternalRenderer\n */\n public get renderer() { return this._renderer; }\n /**\n * A component that manages viewport size\n * @ko 뷰포트 크기 정보를 담당하는 컴포넌트\n * @type {Viewport}\n * @readonly\n * @see Viewport\n */\n public get viewport() { return this._viewport; }\n // Internal States\n /**\n * Whether Flicking's {@link Flicking#init init()} is called.\n * This is `true` when {@link Flicking#init init()} is called, and is `false` after calling {@link Flicking#destroy destroy()}.\n * @ko Flicking의 {@link Flicking#init init()}이 호출되었는지를 나타내는 멤버 변수.\n * 이 값은 {@link Flicking#init init()}이 호출되었으면 `true`로 변하고, {@link Flicking#destroy destroy()}호출 이후에 다시 `false`로 변경됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get initialized() { return this._initialized; }\n /**\n * Whether the `circular` option is enabled.\n * The {@link Flicking#circular circular} option can't be enabled when sum of the panel sizes are too small.\n * @ko {@link Flicking#circular circular} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#circular circular} 옵션은 패널의 크기의 합이 충분하지 않을 경우 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get circularEnabled() { return this._camera.circularEnabled; }\n /**\n * Whether the `virtual` option is enabled.\n * The {@link Flicking#virtual virtual} option can't be enabled when {@link Flicking#panelsPerView panelsPerView} is less or equal than zero.\n * @ko {@link Flicking#virtual virtual} 옵션이 활성화되었는지 여부를 나타내는 멤버 변수.\n * {@link Flicking#virtual virtual} 옵션은 {@link Flicking#panelsPerView panelsPerView} 옵션의 값이 0보다 같거나 작으면 비활성화됩니다.\n * @type {boolean}\n * @default false\n * @readonly\n */\n public get virtualEnabled() { return this._panelsPerView > 0 && this._virtual != null; }\n /**\n * Index number of the {@link Flicking#currentPanel currentPanel}\n * @ko {@link Flicking#currentPanel currentPanel}의 인덱스 번호\n * @type {number}\n * @default 0\n * @readonly\n */\n public get index() { return this._control.activeIndex; }\n /**\n * The root(`.flicking-viewport`) element\n * @ko root(`.flicking-viewport`) 엘리먼트\n * @type {HTMLElement}\n * @readonly\n */\n public get element() { return this._viewport.element; }\n /**\n * Currently active panel\n * @ko 현재 선택된 패널\n * @type {Panel}\n * @readonly\n * @see Panel\n */\n public get currentPanel() { return this._control.activePanel; }\n /**\n * Array of panels\n * @ko 전체 패널들의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get panels() { return this._renderer.panels; }\n /**\n * Count of panels\n * @ko 전체 패널의 개수\n * @type {number}\n * @readonly\n */\n public get panelCount() { return this._renderer.panelCount; }\n /**\n * Array of panels that is visible at the current position\n * @ko 현재 보이는 패널의 배열\n * @type {Panel[]}\n * @readonly\n * @see Panel\n */\n public get visiblePanels() { return this._camera.visiblePanels; }\n /**\n * Whether Flicking's animating\n * @ko 현재 애니메이션 동작 여부\n * @type {boolean}\n * @readonly\n */\n public get animating() { return this._control.animating; }\n /**\n * Whether user is clicking or touching\n * @ko 현재 사용자가 클릭/터치중인지 여부\n * @type {boolean}\n * @readonly\n */\n public get holding() { return this._control.holding; }\n /**\n * A current list of activated plugins\n * @ko 현재 활성화된 플러그인 목록\n * @type {Plugin[]}\n * @readonly\n */\n public get activePlugins() { return this._plugins; }\n\n // Options Getter\n // UI / LAYOUT\n /**\n * Align position of the panels within viewport. You can set different values each for the panel and camera\n * @ko 뷰포트 내에서 패널 정렬방식을 설정하는 옵션. 카메라와 패널 개별로 옵션을 설정할 수도 있습니다\n * @type {ALIGN | string | number | { panel: string | number, camera: string | number }}\n * @property {ALIGN | string | number} panel The align value for each {@link Panel}s개개의 {@link Panel}에 적용할 값\n * @property {ALIGN | string | number} camera The align value for {@link Camera}{@link Camera}에 적용할 값\n * @default \"center\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#align align ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // Literal strings\n * \"prev\", \"center\", \"next\",\n * // % values, applied to both panel & camera\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000,\n * // Setting a different value for panel & camera\n * { panel: \"10%\", camera: \"25%\" }\n * ];\n *\n * possibleOptions.forEach(align => {\n * new Flicking(\"#el\", { align });\n * });\n * ```\n */\n public get align() { return this._align; }\n /**\n * Index of the panel to move when Flicking's {@link Flicking#init init()} is called. A zero-based integer\n * @ko Flicking의 {@link Flicking#init init()}이 호출될 때 이동할 디폴트 패널의 인덱스로, 0부터 시작하는 정수입니다\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#defaultindex defaultIndex ( Options )}\n */\n public get defaultIndex() { return this._defaultIndex; }\n /**\n * Direction of panel movement (true: horizontal, false: vertical)\n * @ko 패널 이동 방향 (true: 가로방향, false: 세로방향)\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#horizontal horizontal ( Options )}\n */\n public get horizontal() { return this._horizontal; }\n /**\n * Enables circular(continuous loop) mode, which connects first/last panel for continuous scrolling.\n * @ko 순환 모드를 활성화합니다. 순환 모드에서는 양 끝의 패널이 서로 연결되어 끊김없는 스크롤이 가능합니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#circular circular ( Options )}\n */\n public get circular() { return this._circular; }\n /**\n * Set panel control mode for the case when circular cannot be enabled.\n * \"linear\" will set the view's range from the top of the first panel to the top of the last panel.\n * \"bound\" will prevent the view from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel.\n * @ko 순환 모드 사용 불가능시 사용할 패널 조작 범위 설정 방식을 변경합니다.\n * \"linear\" 사용시 시점이 첫번째 엘리먼트 위에서부터 마지막 엘리먼트 위까지 움직일 수 있도록 설정합니다.\n * \"bound\" 사용시 시점이 첫번째 엘리먼트와 마지막 엘리먼트의 끝과 끝 사이에서 움직일 수 있도록 설정합니다.\n * @see CIRCULAR_FALLBACK\n * @type {string}\n * @default \"linear\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#circularfallback circularFallback ( Options )}\n */\n public get circularFallback() { return this._circularFallback; }\n /**\n * Prevent the view(camera element) from going out of the first/last panel, so it won't show empty spaces before/after the first/last panel\n * Only can be enabled when `circular=false`\n * @ko 뷰(카메라 엘리먼트)가 첫번째와 마지막 패널 밖으로 넘어가지 못하게 하여, 첫번째/마지막 패널 전/후의 빈 공간을 보이지 않도록 하는 옵션입니다\n * `circular=false`인 경우에만 사용할 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#bound bound ( Options )}\n */\n public get bound() { return this._bound; }\n /**\n * Update height of the viewport element after movement same to the height of the panel below. This can be only enabled when `horizontal=true`\n * @ko 이동한 후 뷰포트 엘리먼트의 크기를 현재 패널의 높이와 동일하게 설정합니다. `horizontal=true`인 경우에만 사용할 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#adaptive adaptive ( Options )}\n */\n public get adaptive() { return this._adaptive; }\n /**\n * A visible number of panels on viewport. Enabling this option will automatically resize panel size\n * @ko 한 화면에 보이는 패널의 개수. 이 옵션을 활성화할 경우 패널의 크기를 강제로 재조정합니다\n * @type {number}\n * @default -1\n * @see {@link https://naver.github.io/egjs-flicking/Options#panelsperview panelsPerView ( Options )}\n */\n public get panelsPerView() { return this._panelsPerView; }\n /**\n * Enabling this option will not change `width/height` style of the panels if {@link Flicking#panelsPerView} is enabled.\n * This behavior can be useful in terms of performance when you're manually managing all panel sizes\n * @ko 이 옵션을 활성화할 경우, {@link Flicking#panelsPerView} 옵션이 활성화되었을 때 패널의 `width/height` 스타일을 변경하지 않도록 설정합니다.\n * 모든 패널들의 크기를 직접 관리하고 있을 경우, 이 옵션을 활성화하면 성능면에서 유리할 수 있습니다\n * @type {boolean}\n * @default false\n */\n public get noPanelStyleOverride() { return this._noPanelStyleOverride; }\n /**\n * Enabling this option will automatically call {@link Flicking#resize} when all image/video inside panels are loaded.\n * This can be useful when you have contents inside Flicking that changes its size when it's loaded\n * @ko 이 옵션을 활성화할 경우, Flicking 패널 내부의 이미지/비디오들이 로드되었을 때 자동으로 {@link Flicking#resize}를 호출합니다.\n * 이 동작은 Flicking 내부에 로드 전/후로 크기가 변하는 콘텐츠를 포함하고 있을 때 유용하게 사용하실 수 있습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizeOnContentsReady resizeOnContentsReady ( Options )}\n */\n public get resizeOnContentsReady() { return this._resizeOnContentsReady; }\n /**\n * If you enable this option on child Flicking when the Flicking is placed inside the Flicking, the parent Flicking will move in the same direction after the child Flicking reaches the first/last panel.\n * If the parent Flicking and child Flicking have different horizontal option, you do not need to set this option.\n * @ko Flicking 내부에 Flicking이 배치될 때 하위 Flicking에서 이 옵션을 활성화하면 하위 Flicking이 첫/마지막 패널에 도달한 뒤부터 같은 방향으로 상위 Flicking이 움직입니다.\n * 만약 상위 Flicking과 하위 Flicking이 서로 다른 horizontal 옵션을 가지고 있다면 이 옵션을 설정할 필요가 없습니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#nested nested ( Options )}\n */\n public get nested() { return this._nested; }\n // EVENTS\n /**\n * A Threshold from viewport edge before triggering `needPanel` event\n * @ko `needPanel`이벤트가 발생하기 위한 뷰포트 끝으로부터의 최대 거리\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#needpanelthreshold needPanelThreshold ( Options )}\n */\n public get needPanelThreshold() { return this._needPanelThreshold; }\n /**\n * When enabled, events are not triggered before `ready` when initializing\n * @ko 활성화할 경우 초기화시 `ready` 이벤트 이전의 이벤트가 발생하지 않습니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventeventsbeforeinit preventEventsBeforeInit ( Options )}\n */\n public get preventEventsBeforeInit() { return this._preventEventsBeforeInit; }\n // ANIMATION\n /**\n * Deceleration value for panel movement animation which is triggered by user input. A higher value means a shorter animation time\n * @ko 사용자의 동작으로 가속도가 적용된 패널 이동 애니메이션의 감속도. 값이 높을수록 애니메이션 실행 시간이 짧아집니다\n * @type {number}\n * @default 0.0075\n * @see {@link https://naver.github.io/egjs-flicking/Options#deceleration deceleration ( Options )}\n */\n public get deceleration() { return this._deceleration; }\n /**\n * An easing function applied to the panel movement animation. Default value is `easeOutCubic`\n * @ko 패널 이동 애니메이션에 적용할 easing 함수. 기본값은 `easeOutCubic`이다\n * @type {function}\n * @default x => 1 - Math.pow(1 - x, 3)\n * @see Easing Functions Cheat Sheet {@link http://easings.net/} 이징 함수 Cheat Sheet {@link http://easings.net/}\n * @see {@link https://naver.github.io/egjs-flicking/Options#easing Easing ( Options )}\n */\n public get easing() { return this._easing; }\n /**\n * Default duration of the animation (ms)\n * @ko 디폴트 애니메이션 재생 시간 (ms)\n * @type {number}\n * @default 500\n * @see {@link https://naver.github.io/egjs-flicking/Options#duration duration ( Options )}\n */\n public get duration() { return this._duration; }\n // INPUT\n /**\n * Types of input devices to enable\n * @ko 활성화할 입력 장치 종류\n * @type {string[]}\n * @default [\"touch\", \"mouse\"]\n * @see {@link https://naver.github.io/egjs-axes/Options#paninput-options Possible values (PanInputOption#inputType)}\n * {@link https://naver.github.io/egjs-axes/Options#paninput-options 가능한 값들 (PanInputOption#inputType)}\n * @see {@link https://naver.github.io/egjs-flicking/Options#inputtype inputType ( Options )}\n */\n public get inputType() { return this._inputType; }\n /**\n * Movement style by user input. This will change instance type of {@link Flicking#control}\n * You can use the values of the constant {@link MOVE_TYPE}\n * @ko 사용자 입력에 의한 이동 방식. 이 값에 따라 {@link Flicking#control}의 인스턴스 타입이 결정됩니다\n * 상수 {@link MOVE_TYPE}에 정의된 값들을 이용할 수 있습니다\n * @type {MOVE_TYPE | Pair}\n * @default \"snap\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#movetype moveType ( Options )}\n * @example\n * |moveType|control|options|\n * |:---:|:---:|:---:|\n * |\"snap\"|{@link SnapControl}||\n * |\"freeScroll\"|{@link FreeControl}|{@link FreeControlOptions}|\n *\n * ```ts\n * import Flicking, { MOVE_TYPE } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking({\n * moveType: MOVE_TYPE.SNAP\n * });\n * ```\n *\n * ```ts\n * const flicking = new Flicking({\n * // If you want more specific settings for the moveType\n * // [moveType, options for that moveType]\n * // In this case, it's [\"freeScroll\", FreeControlOptions]\n * moveType: [MOVE_TYPE.FREE_SCROLL, { stopAtEdge: true }]\n * });\n * ```\n */\n public get moveType() { return this._moveType; }\n /**\n * Movement threshold to change panel (unit: px). It should be dragged above the threshold to change the current panel.\n * @ko 패널 변경을 위한 이동 임계값 (단위: px). 주어진 값 이상으로 스크롤해야만 패널 변경이 가능하다.\n * @type {number}\n * @default 40\n * @see {@link https://naver.github.io/egjs-flicking/Options#threshold Threshold ( Options )}\n */\n public get threshold() { return this._threshold; }\n /**\n * Set animation to be interruptable by click/touch.\n * @ko 사용자의 클릭/터치로 인해 애니메이션을 도중에 멈출 수 있도록 설정합니다.\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#interruptable Interruptable ( Options )}\n */\n public get interruptable() { return this._interruptable; }\n /**\n * The size value of the bounce area. Only can be enabled when `circular=false`.\n * You can set different bounce value for prev/next direction by using array.\n * `number` for px value, and `string` for px, and % value relative to viewport size.\n * You have to call {@link Control#updateInput} after changing this to take effect.\n * @ko Flicking이 최대 영역을 넘어서 갈 수 있는 최대 크기. `circular=false`인 경우에만 사용할 수 있습니다.\n * 배열을 통해 prev/next 방향에 대해 서로 다른 바운스 값을 지정할 수 있습니다.\n * `number`를 통해 px값을, `stirng`을 통해 px 혹은 뷰포트 크기 대비 %값을 사용할 수 있습니다.\n * 이 값을 변경시 {@link Control#updateInput}를 호출해야 합니다.\n * @type {string | number | Array}\n * @default \"20%\"\n * @see {@link https://naver.github.io/egjs-flicking/Options#bounce bounce ( Options )}\n * @example\n * ```ts\n * const possibleOptions = [\n * // % values, relative to viewport element(\".flicking-viewport\")'s size\n * \"0%\", \"25%\", \"42%\",\n * // px values, arithmetic calculation with (+/-) is also allowed.\n * \"0px\", \"100px\", \"50% - 25px\",\n * // numbers, same to number + px (\"0px\", \"100px\")\n * 0, 100, 1000\n * ];\n * ```\n *\n * @example\n * ```ts\n * const flicking = new Flicking(\"#el\", { bounce: \"20%\" });\n *\n * flicking.bounce = \"100%\";\n * flicking.control.updateInput(); // Call this to update!\n * ```\n */\n public get bounce() { return this._bounce; }\n /**\n * Size of the area from the right edge in iOS safari (in px) which enables swipe-back or swipe-forward\n * @ko iOS Safari에서 swipe를 통한 뒤로가기/앞으로가기를 활성화하는 오른쪽 끝으로부터의 영역의 크기 (px)\n * @type {number}\n * @default 30\n * @see {@link https://naver.github.io/egjs-flicking/Options#iosedgeswipethreshold iOSEdgeSwipeThreshold ( Options )}\n */\n public get iOSEdgeSwipeThreshold() { return this._iOSEdgeSwipeThreshold; }\n /**\n * Automatically prevent `click` event if the user has dragged at least a single pixel on the viewport element\n * @ko 사용자가 뷰포트 영역을 1픽셀이라도 드래그했을 경우 자동으로 {@link https://developer.mozilla.org/ko/docs/Web/API/Element/click_event click} 이벤트를 취소합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventclickondrag preventClickOnDrag ( Options )}\n */\n public get preventClickOnDrag() { return this._preventClickOnDrag; }\n /**\n * Whether to use the {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} when the user starts dragging\n * @ko 사용자가 드래그를 시작할 때 {@link https://developer.mozilla.org/ko/docs/Web/API/Event/preventDefault preventDefault} 실행 여부\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#preventDefaultOnDrag preventDefaultOnDrag ( Options )}\n */\n public get preventDefaultOnDrag() { return this._preventDefaultOnDrag; }\n /**\n * Automatically call {@link Flicking#disableInput disableInput()} on initialization\n * @ko Flicking init시에 {@link Flicking#disableInput disableInput()}을 바로 호출합니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#disableoninit disableOnInit ( Options )}\n */\n public get disableOnInit() { return this._disableOnInit; }\n /**\n * Change active panel index on mouse/touch hold while animating.\n * `index` of the `willChange`/`willRestore` event will be used as new index.\n * @ko 애니메이션 도중 마우스/터치 입력시 현재 활성화된 패널의 인덱스를 변경합니다.\n * `willChange`/`willRestore` 이벤트의 `index`값이 새로운 인덱스로 사용될 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#changeonhold changeOnHold ( Options )}\n */\n public get changeOnHold() { return this._changeOnHold; }\n // PERFORMANCE\n /**\n * Whether to render visible panels only. This can dramatically increase performance when there're many panels\n * @ko 보이는 패널만 렌더링할지 여부를 설정합니다. 패널이 많을 경우에 퍼포먼스를 크게 향상시킬 수 있습니다\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#renderonlyvisible renderOnlyVisible ( Options )}\n */\n public get renderOnlyVisible() { return this._renderOnlyVisible; }\n /**\n * By enabling this option, it will reduce memory consumption by restricting the number of DOM elements to `panelsPerView + 1`\n * Must be used with `panelsPerview`.\n * After Flicking's initialized, this property can be used to add/remove the panel count.\n * @ko 이 옵션을 활성화할 경우 패널 엘리먼트의 개수를 `panelsPerView + 1` 개로 고정함으로써, 메모리 사용량을 줄일 수 있습니다.\n * `panelsPerView` 옵션과 함께 사용되어야만 합니다.\n * Flicking 초기화 이후에, 이 프로퍼티는 렌더링하는 패널의 개수를 추가/제거하기 위해 사용될 수 있습니다.\n * @type {VirtualManager}\n * @property {function} renderPanel A rendering function for the panel element's innerHTML패널 엘리먼트의 innerHTML을 렌더링하는 함수\n * @property {number} initialPanelCount Initial panel count to render최초로 렌더링할 패널의 개수\n * @property {boolean} [cache=false] Whether to cache rendered panel's innerHTML렌더링된 패널의 innerHTML 정보를 캐시할지 여부\n * @property {string} [panelClass=\"flicking-panel\"] The class name that will be applied to rendered panel elements렌더링되는 패널 엘리먼트에 적용될 클래스 이름\n * @see {@link https://naver.github.io/egjs-flicking/Options#virtual virtual ( Options )}\n * @example\n * ```ts\n * import Flicking, { VirtualPanel } from \"@egjs/flicking\";\n *\n * const flicking = new Flicking(\"#some_el\", {\n * panelsPerView: 3,\n * virtual: {\n * renderPanel: (panel: VirtualPanel, index: number) => `Panel ${index}`,\n * initialPanelCount: 100\n * }\n * });\n *\n * // Add 100 virtual panels (at the end)\n * flicking.virtual.append(100);\n *\n * // Remove 100 virtual panels from 0 to 100\n * flicking.virtual.remove(0, 100);\n * ```\n */\n public get virtual() { return this._virtualManager; }\n\n // OTHERS\n /**\n * Call {@link Flicking#init init()} automatically when creating Flicking's instance\n * @ko Flicking 인스턴스를 생성할 때 자동으로 {@link Flicking#init init()}를 호출합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#autoinit autoInit ( Options )}\n * @readonly\n */\n public get autoInit() { return this._autoInit; }\n /**\n * Whether to automatically call {@link Flicking#resize resize()} when the viewport element(.flicking-viewport)'s size is changed\n * @ko 뷰포트 엘리먼트(.flicking-viewport)의 크기 변경시 {@link Flicking#resize resize()} 메소드를 자동으로 호출할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n */\n public get autoResize() { return this._autoResize; }\n /**\n * Whether to listen {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}'s event instead of Window's {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} event when using the `autoResize` option\n * @ko autoResize 옵션 사용시 {@link https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver ResizeObserver}의 이벤트를 Window객체의 {@link https://developer.mozilla.org/ko/docs/Web/API/Window/resize_event resize} 이벤트 대신 수신할지 여부를 설정합니다\n * @type {boolean}\n * @default true\n * @see {@link https://naver.github.io/egjs-flicking/Options#useresizeobserver useResizeObserver ( Options )}\n */\n public get useResizeObserver() { return this._useResizeObserver; }\n /**\n * Delays size recalculation from `autoResize` by the given time in milisecond.\n * If the size is changed again while being delayed, it cancels the previous one and delays from the beginning again.\n * This can increase performance by preventing `resize` being called too often.\n * @ko `autoResize` 설정시에 호출되는 크기 재계산을 주어진 시간(단위: ms)만큼 지연시킵니다.\n * 지연시키는 도중 크기가 다시 변경되었을 경우, 이전 것을 취소하고 주어진 시간만큼 다시 지연시킵니다.\n * 이를 통해 `resize`가 너무 많이 호출되는 것을 방지하여 성능을 향상시킬 수 있습니다.\n * @type {number}\n * @default 0\n * @see {@link https://naver.github.io/egjs-flicking/Options#resizedebounce resizeDebounce ( Options )}\n */\n public get resizeDebounce() { return this._resizeDebounce; }\n /**\n * The maximum time for size recalculation delay when using `resizeDebounce`, in milisecond.\n * This guarantees that size recalculation is performed at least once every (n)ms.\n * @ko `resizeDebounce` 사용시에 크기 재계산이 지연되는 최대 시간을 지정합니다. (단위: ms)\n * 이를 통해, 적어도 (n)ms에 한번은 크기 재계산을 수행하는 것을 보장할 수 있습니다.\n * @type {number}\n * @default 100\n * @see {@link https://naver.github.io/egjs-flicking/Options#maxresizedebounce maxResizeDebounce ( Options )}\n */\n public get maxResizeDebounce() { return this._maxResizeDebounce; }\n /**\n * By enabling this, Flicking will calculate all internal size with CSS width computed with getComputedStyle.\n * This can prevent 1px offset issue in some cases where panel size has the fractional part.\n * All sizes will have the original size before CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform} is applied on the element.\n * @ko 이 옵션을 활성화할 경우, Flicking은 내부의 모든 크기를 {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect getBoundingClientRect}를 이용하여 계산합니다.\n * 이를 통해, 패널 크기에 소수점을 포함할 경우에 발생할 수 있는 일부 1px 오프셋 이슈를 해결 가능합니다.\n * 모든 크기는 CSS {@link https://developer.mozilla.org/en-US/docs/Web/CSS/transform transform}이 엘리먼트에 적용되기 이전의 크기를 사용할 것입니다.\n * @type {boolean}\n * @default false\n * @see {@link https://naver.github.io/egjs-flicking/Options#usefractionalsize useFractionalSize ( Options )}\n */\n public get useFractionalSize() { return this._useFractionalSize; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n */\n public get externalRenderer() { return this._externalRenderer; }\n /**\n * This is an option for the frameworks(React, Vue, Angular, ...). Don't set it as it's automatically managed by Flicking.\n * @ko 프레임워크(React, Vue, Angular, ...)에서만 사용하는 옵션으로, 자동으로 설정되므로 따로 사용하실 필요 없습니다!\n * @default null\n * @internal\n * @readonly\n * @deprecated\n */\n public get renderExternal() { return this._renderExternal; }\n\n // Options Setter\n // UI / LAYOUT\n public set align(val: FlickingOptions[\"align\"]) {\n this._align = val;\n this._renderer.align = val;\n this._camera.align = val;\n void this.resize();\n }\n\n public set defaultIndex(val: FlickingOptions[\"defaultIndex\"]) { this._defaultIndex = val; }\n public set horizontal(val: FlickingOptions[\"horizontal\"]) {\n this._horizontal = val;\n this._control.controller.updateDirection();\n void this.resize();\n }\n\n public set circular(val: FlickingOptions[\"circular\"]) {\n this._circular = val;\n void this.resize();\n }\n\n public set bound(val: FlickingOptions[\"bound\"]) {\n this._bound = val;\n void this.resize();\n }\n\n public set adaptive(val: FlickingOptions[\"adaptive\"]) {\n this._adaptive = val;\n void this.resize();\n }\n\n public set panelsPerView(val: FlickingOptions[\"panelsPerView\"]) {\n this._panelsPerView = val;\n void this.resize();\n }\n\n public set noPanelStyleOverride(val: FlickingOptions[\"noPanelStyleOverride\"]) {\n this._noPanelStyleOverride = val;\n void this.resize();\n }\n\n public set resizeOnContentsReady(val: FlickingOptions[\"resizeOnContentsReady\"]) {\n this._resizeOnContentsReady = val;\n if (val) {\n this._renderer.checkPanelContentsReady(this._renderer.panels);\n }\n }\n\n public set nested(val: FlickingOptions[\"nested\"]) {\n this._nested = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.nested = val;\n }\n }\n\n // EVENTS\n public set needPanelThreshold(val: FlickingOptions[\"needPanelThreshold\"]) { this._needPanelThreshold = val; }\n public set preventEventsBeforeInit(val: FlickingOptions[\"preventEventsBeforeInit\"]) { this._preventEventsBeforeInit = val; }\n // ANIMATION\n public set deceleration(val: FlickingOptions[\"deceleration\"]) {\n this._deceleration = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.deceleration = val;\n }\n }\n\n public set easing(val: FlickingOptions[\"easing\"]) {\n this._easing = val;\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.easing = val;\n }\n }\n\n public set duration(val: FlickingOptions[\"duration\"]) { this._duration = val; }\n // INPUT\n public set inputType(val: FlickingOptions[\"inputType\"]) {\n this._inputType = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.inputType = val;\n }\n }\n\n public set moveType(val: FlickingOptions[\"moveType\"]) {\n this._moveType = val;\n\n const prevControl = this._control;\n const newControl = this._createControl();\n const activePanel = prevControl.activePanel;\n newControl.copy(prevControl);\n\n const prevProgressInPanel = activePanel\n ? this._camera.getProgressInPanel(activePanel)\n : 0;\n\n this._control = newControl;\n this._control.updatePosition(prevProgressInPanel);\n this._control.updateInput();\n }\n\n public set threshold(val: FlickingOptions[\"threshold\"]) { this._threshold = val; }\n public set interruptable(val: FlickingOptions[\"interruptable\"]) {\n this._interruptable = val;\n\n const axes = this._control.controller.axes;\n\n if (axes) {\n axes.options.interruptable = val;\n }\n }\n\n public set bounce(val: FlickingOptions[\"bounce\"]) {\n this._bounce = val;\n this._control.updateInput();\n }\n\n public set iOSEdgeSwipeThreshold(val: FlickingOptions[\"iOSEdgeSwipeThreshold\"]) {\n this._iOSEdgeSwipeThreshold = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.iOSEdgeSwipeThreshold = val;\n }\n }\n\n public set preventClickOnDrag(val: FlickingOptions[\"preventClickOnDrag\"]) {\n const prevVal = this._preventClickOnDrag;\n\n if (val === prevVal) return;\n\n const controller = this._control.controller;\n\n if (val) {\n controller.addPreventClickHandler();\n } else {\n controller.removePreventClickHandler();\n }\n\n this._preventClickOnDrag = val;\n }\n\n public set preventDefaultOnDrag(val: FlickingOptions[\"preventDefaultOnDrag\"]) {\n this._preventDefaultOnDrag = val;\n const panInput = this._control.controller.panInput;\n\n if (panInput) {\n panInput.options.preventDefaultOnDrag = val;\n }\n }\n\n public set disableOnInit(val: FlickingOptions[\"disableOnInit\"]) { this._disableOnInit = val; }\n public set changeOnHold(val: FlickingOptions[\"changeOnHold\"]) { this._changeOnHold = val; }\n // PERFORMANCE\n public set renderOnlyVisible(val: FlickingOptions[\"renderOnlyVisible\"]) {\n this._renderOnlyVisible = val;\n void this._renderer.render();\n }\n\n // OTHERS\n public set autoResize(val: FlickingOptions[\"autoResize\"]) {\n this._autoResize = val;\n\n if (val) {\n this._autoResizer.enable();\n } else {\n this._autoResizer.disable();\n }\n }\n\n public set useResizeObserver(val: FlickingOptions[\"useResizeObserver\"]) {\n this._useResizeObserver = val;\n\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n }\n\n /**\n * @param root A root HTMLElement to initialize Flicking on it. When it's a typeof `string`, it should be a css selector string\n * Flicking을 초기화할 HTMLElement로, `string` 타입으로 지정시 css 선택자 문자열을 지정해야 합니다.\n * @param {object} [options={}] An options object for Flicking.Flicking에 적용할 옵션 오브젝트\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|When the element with given CSS selector does not exist|\n * \n *\n * |code|조건|\n * |---|---|\n * |{@link ERROR_CODE WRONG_TYPE}|루트 엘리먼트가 string이나 HTMLElement가 아닐 경우|\n * |{@link ERROR_CODE ELEMENT_NOT_FOUND}|주어진 CSS selector로 엘리먼트를 찾지 못했을 경우|\n *\n * \n * @example\n * ```ts\n * import Flicking from \"@egjs/flicking\";\n *\n * // Creating new instance of Flicking with HTMLElement\n * const flicking = new Flicking(document.querySelector(\".flicking-viewport\"), { circular: true });\n *\n * // Creating new instance of Flicking with CSS selector\n * const flicking2 = new Flicking(\".flicking-viewport\", { circular: true });\n * ```\n */\n public constructor(root: HTMLElement | string, {\n align = ALIGN.CENTER,\n defaultIndex = 0,\n horizontal = true,\n circular = false,\n circularFallback = CIRCULAR_FALLBACK.LINEAR,\n bound = false,\n adaptive = false,\n panelsPerView = -1,\n noPanelStyleOverride = false,\n resizeOnContentsReady = false,\n nested = false,\n needPanelThreshold = 0,\n preventEventsBeforeInit = true,\n deceleration = 0.0075,\n duration = 500,\n easing = x => 1 - Math.pow(1 - x, 3),\n inputType = [\"mouse\", \"touch\"],\n moveType = \"snap\",\n threshold = 40,\n interruptable = true,\n bounce = \"20%\",\n iOSEdgeSwipeThreshold = 30,\n preventClickOnDrag = true,\n preventDefaultOnDrag = false,\n disableOnInit = false,\n changeOnHold = false,\n renderOnlyVisible = false,\n virtual = null,\n autoInit = true,\n autoResize = true,\n useResizeObserver = true,\n resizeDebounce = 0,\n maxResizeDebounce = 100,\n useFractionalSize = false,\n externalRenderer = null,\n renderExternal = null\n }: Partial = {}) {\n super();\n\n // Internal states\n this._initialized = false;\n this._plugins = [];\n\n // Bind options\n this._align = align;\n this._defaultIndex = defaultIndex;\n this._horizontal = horizontal;\n this._circular = circular;\n this._circularFallback = circularFallback;\n this._bound = bound;\n this._adaptive = adaptive;\n this._panelsPerView = panelsPerView;\n this._noPanelStyleOverride = noPanelStyleOverride;\n this._resizeOnContentsReady = resizeOnContentsReady;\n this._nested = nested;\n this._virtual = virtual;\n this._needPanelThreshold = needPanelThreshold;\n this._preventEventsBeforeInit = preventEventsBeforeInit;\n this._deceleration = deceleration;\n this._duration = duration;\n this._easing = easing;\n this._inputType = inputType;\n this._moveType = moveType;\n this._threshold = threshold;\n this._interruptable = interruptable;\n this._bounce = bounce;\n this._iOSEdgeSwipeThreshold = iOSEdgeSwipeThreshold;\n this._preventClickOnDrag = preventClickOnDrag;\n this._preventDefaultOnDrag = preventDefaultOnDrag;\n this._disableOnInit = disableOnInit;\n this._changeOnHold = changeOnHold;\n this._renderOnlyVisible = renderOnlyVisible;\n this._autoInit = autoInit;\n this._autoResize = autoResize;\n this._useResizeObserver = useResizeObserver;\n this._resizeDebounce = resizeDebounce;\n this._maxResizeDebounce = maxResizeDebounce;\n this._useFractionalSize = useFractionalSize;\n this._externalRenderer = externalRenderer;\n this._renderExternal = renderExternal;\n\n // Create core components\n this._viewport = new Viewport(this, getElement(root));\n this._autoResizer = new AutoResizer(this);\n this._renderer = this._createRenderer();\n this._camera = this._createCamera();\n this._control = this._createControl();\n this._virtualManager = new VirtualManager(this, virtual);\n\n if (this._autoInit) {\n void this.init();\n }\n }\n\n /**\n * Initialize Flicking and move to the default index\n * This is automatically called on Flicking's constructor when `autoInit` is true(default)\n * @ko Flicking을 초기화하고, 디폴트 인덱스로 이동합니다\n * 이 메소드는 `autoInit` 옵션이 true(default)일 경우 Flicking이 생성될 때 자동으로 호출됩니다\n * @fires Flicking#ready\n * @return {Promise}\n */\n public init(): Promise {\n if (this._initialized) return Promise.resolve();\n\n const camera = this._camera;\n const renderer = this._renderer;\n const control = this._control;\n const virtualManager = this._virtualManager;\n const originalTrigger = this.trigger;\n const preventEventsBeforeInit = this._preventEventsBeforeInit;\n\n camera.init();\n virtualManager.init();\n renderer.init(this);\n control.init(this);\n\n if (preventEventsBeforeInit) {\n this.trigger = () => this;\n }\n\n this._initialResize();\n\n // Look at initial panel\n this._moveToInitialPanel();\n if (this._autoResize) {\n this._autoResizer.enable();\n }\n if (this._preventClickOnDrag) {\n control.controller.addPreventClickHandler();\n }\n if (this._disableOnInit) {\n this.disableInput();\n }\n renderer.checkPanelContentsReady(renderer.panels);\n this._initialized = true;\n\n return renderer.render().then(() => {\n // Done initializing & emit ready event\n this._plugins.forEach(plugin => plugin.init(this));\n\n if (preventEventsBeforeInit) {\n this.trigger = originalTrigger;\n }\n this.trigger(new ComponentEvent(EVENTS.READY));\n });\n }\n\n /**\n * Destroy Flicking and remove all event handlers\n * @ko Flicking과 하위 컴포넌트들을 초기 상태로 되돌리고, 부착된 모든 이벤트 핸들러를 제거합니다\n * @return {void}\n */\n public destroy(): void {\n this.off();\n\n this._autoResizer.disable();\n this._control.destroy();\n this._camera.destroy();\n this._renderer.destroy();\n\n this._plugins.forEach(plugin => plugin.destroy());\n\n this._initialized = false;\n }\n\n /**\n * Move to the previous panel (current index - 1)\n * @ko 이전 패널로 이동합니다 (현재 인덱스 - 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms)패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the previous panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|이전 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n * \n * @return {Promise} A Promise which will be resolved after reaching the previous panel이전 패널 도달시에 resolve되는 Promise\n */\n public prev(duration: number = this._duration): Promise {\n return this.moveTo(this._control.activePanel?.prev()?.index ?? -1, duration, DIRECTION.PREV);\n }\n\n /**\n * Move to the next panel (current index + 1)\n * @ko 다음 패널로 이동합니다 (현재 인덱스 + 1)\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the panel movement animation (unit: ms).패널 이동 애니메이션 진행 시간 (단위: ms)\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the next panel does not exist|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|다음 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the next panel다음 패널 도달시에 resolve되는 Promise\n */\n public next(duration: number = this._duration) {\n return this.moveTo(this._control.activePanel?.next()?.index ?? this._renderer.panelCount, duration, DIRECTION.NEXT);\n }\n\n /**\n * Move to the panel with given index\n * @ko 주어진 인덱스에 해당하는 패널로 이동합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} [duration={@link Flicking#duration options.duration}] Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} [direction=DIRECTION.NONE] Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @async\n * @fires Flicking#moveStart\n * @fires Flicking#move\n * @fires Flicking#moveEnd\n * @fires Flicking#willChange\n * @fires Flicking#changed\n * @fires Flicking#willRestore\n * @fires Flicking#restored\n * @fires Flicking#needPanel\n * @fires Flicking#visibleChange\n * @fires Flicking#reachEdge\n * @throws {FlickingError}\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|When the root is not either string or HTMLElement|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|When the animation is already playing|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|When the animation is interrupted by user input|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|When the any of the event's `stop()` is called|\n * \n *\n * |code|condition|\n * |---|---|\n * |{@link ERROR_CODE INDEX_OUT_OF_RANGE}|해당 인덱스를 가진 패널이 존재하지 않을 경우|\n * |{@link ERROR_CODE ANIMATION_ALREADY_PLAYING}|애니메이션이 이미 진행중인 경우|\n * |{@link ERROR_CODE ANIMATION_INTERRUPTED}|사용자 입력에 의해 애니메이션이 중단된 경우|\n * |{@link ERROR_CODE STOP_CALLED_BY_USER}|발생된 이벤트들 중 하나라도 `stop()`이 호출된 경우|\n *\n * \n * @return {Promise} A Promise which will be resolved after reaching the target panel해당 패널 도달시에 resolve되는 Promise\n */\n public moveTo(index: number, duration: number = this._duration, direction: ValueOf = DIRECTION.NONE) {\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE));\n }\n\n if (this._control.animating) {\n return Promise.reject(new FlickingError(ERROR.MESSAGE.ANIMATION_ALREADY_PLAYING, ERROR.CODE.ANIMATION_ALREADY_PLAYING));\n }\n\n if (this._control.holding) {\n this._control.controller.release();\n }\n\n return this._control.moveToPanel(panel, {\n duration,\n direction\n });\n }\n\n /**\n * Change the destination and duration of the animation currently playing\n * @ko 재생 중인 애니메이션의 목적지와 재생 시간을 변경합니다\n * @param {number} index The index of the panel to move이동할 패널의 인덱스\n * @param {number} duration Duration of the animation (unit: ms)애니메이션 진행 시간 (단위: ms)\n * @param {DIRECTION} direction Direction to move, only available in the {@link Flicking#circular circular} mode이동할 방향. {@link Flicking#circular circular} 옵션 활성화시에만 사용 가능합니다\n * @throws {FlickingError}\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} When the root is not either string or HTMLElement\n * {@link ERROR_CODE INDEX_OUT_OF_RANGE} 해당 인덱스를 가진 패널이 존재하지 않을 경우\n * @return {void}\n */\n public updateAnimation(index: number, duration?: number, direction?: ValueOf): void {\n if (!this._control.animating) {\n return;\n }\n\n const renderer = this._renderer;\n const panelCount = renderer.panelCount;\n\n const panel = renderer.getPanel(index);\n\n if (!panel) {\n throw new FlickingError(ERROR.MESSAGE.INDEX_OUT_OF_RANGE(index, 0, panelCount - 1), ERROR.CODE.INDEX_OUT_OF_RANGE);\n }\n\n this._control.updateAnimation(panel, duration, direction);\n }\n\n /**\n * Stops the animation currently playing\n * @ko 재생 중인 애니메이션을 중단시킵니다\n * @fires Flicking#moveEnd\n * @return {void}\n */\n public stopAnimation(): void {\n if (!this._control.animating) {\n return;\n }\n\n this._control.stopAnimation();\n }\n\n /**\n * Return the {@link Panel} at the given index. `null` if it doesn't exists.\n * @ko 주어진 인덱스에 해당하는 {@link Panel}을 반환합니다. 주어진 인덱스에 해당하는 패널이 존재하지 않을 경우 `null`을 반환합니다.\n * @return {Panel | null} Panel at the given index주어진 인덱스에 해당하는 패널\n * @see Panel\n * @example\n * ```ts\n * const panel = flicking.getPanel(0);\n * // Which is a shorthand to...\n * const samePanel = flicking.panels[0];\n * ```\n */\n public getPanel(index: number): Panel | null {\n return this._renderer.getPanel(index);\n }\n\n /**\n * Enable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 활성화합니다\n * @return {this}\n */\n public enableInput(): this {\n this._control.enable();\n return this;\n }\n\n /**\n * Disable input from the user (mouse/touch)\n * @ko 사용자의 입력(마우스/터치)를 막습니다\n * @return {this}\n */\n public disableInput(): this {\n this._control.disable();\n return this;\n }\n\n /**\n * Get current flicking status. You can restore current state by giving returned value to {@link Flicking#setStatus setStatus()}\n * @ko 현재 상태를 반환합니다. 반환받은 값을 {@link Flicking#setStatus setStatus()} 메소드의 인자로 지정하면 현재 상태를 복원할 수 있습니다\n * @param {object} options Status retrieving optionsStatus 반환 옵션\n * @param {boolean} [options.index=true] Include current panel index to the returning status. Camera will automatically move to the given index when the {@link Flicking#setStatus setStatus} is called현재 패널 인덱스를 반환값에 포함시킵니다. {@link Flicking#setStatus setStatus} 호출시 자동으로 해당 인덱스로 카메라를 움직입니다\n * @param {boolean} [options.position=true] Include camera position to the returning status. This works only when the {@link Flicking#moveType moveType} is `freeScroll`카메라의 현재 위치를 반환값에 포함시킵니다. 이 옵션은 {@link Flicking#moveType moveType}이 `freeScroll`일 경우에만 동작합니다\n * @param {boolean} [options.includePanelHTML=false] Include panel's `outerHTML` to the returning status패널의 `outerHTML`을 반환값에 포함시킵니다\n * @param {boolean} [options.visiblePanelsOnly=false] Include only {@link Flicking#visiblePanel visiblePanel}'s HTML. This option is available only when the `includePanelHTML` is true\n * 현재 보이는 패널({@link Flicking#visiblePanel visiblePanel})의 HTML만 반환합니다. `includePanelHTML`이 `true`일 경우에만 동작합니다.\n * @return {Status} An object with current status value information현재 상태값 정보를 가진 객체.\n */\n public getStatus({\n index = true,\n position = true,\n includePanelHTML = false,\n visiblePanelsOnly = false\n }: Partial<{\n index: boolean;\n position: boolean;\n includePanelHTML: boolean;\n visiblePanelsOnly: boolean;\n }> = {}): Status {\n const camera = this._camera;\n const panels = visiblePanelsOnly ? this.visiblePanels : this.panels;\n\n const status: Status = {\n panels: panels.map(panel => {\n const panelInfo: Status[\"panels\"][0] = { index: panel.index };\n\n if (includePanelHTML) {\n panelInfo.html = panel.element.outerHTML;\n }\n\n return panelInfo;\n })\n };\n\n if (index) {\n status.index = this.index;\n }\n if (position) {\n const nearestAnchor = camera.findNearestAnchor(camera.position);\n\n if (nearestAnchor) {\n status.position = {\n panel: nearestAnchor.panel.index,\n progressInPanel: camera.getProgressInPanel(nearestAnchor.panel)\n };\n }\n\n }\n\n if (visiblePanelsOnly) {\n const visiblePanels = this.visiblePanels;\n\n status.visibleOffset = visiblePanels[0]?.index ?? 0;\n }\n\n return status;\n }\n\n /**\n * Restore to the state of the given {@link Status}\n * @ko 주어진 {@link Status}의 상태로 복원합니다\n * @param {Partial} status Status value to be restored. You should use the return value of the {@link Flicking#getStatus getStatus()} method복원할 상태 값. {@link Flicking#getStatus getStatus()} 메서드의 반환값을 지정하면 됩니다\n * @return {void}\n */\n public setStatus(status: Status): void {\n if (!this._initialized) {\n throw new FlickingError(ERROR.MESSAGE.NOT_INITIALIZED, ERROR.CODE.NOT_INITIALIZED);\n }\n\n const {\n index,\n position,\n visibleOffset,\n panels\n } = status;\n\n const renderer = this._renderer;\n const control = this._control;\n\n // Can't add/remove panels on external rendering\n if (panels[0]?.html && !this._renderExternal) {\n renderer.batchRemove({ index: 0, deleteCount: this.panels.length, hasDOMInElements: true });\n renderer.batchInsert({ index: 0, elements: parseElement(panels.map(panel => panel.html!)), hasDOMInElements: true });\n }\n\n if (index != null) {\n const panelIndex = visibleOffset\n ? index - visibleOffset\n : index;\n\n void this.moveTo(panelIndex, 0).catch(() => void 0);\n }\n\n if (position && this._moveType === MOVE_TYPE.FREE_SCROLL) {\n const { panel, progressInPanel } = position;\n const panelIndex = visibleOffset\n ? panel - visibleOffset\n : panel;\n const panelRange = renderer.panels[panelIndex].range;\n const newCameraPos = panelRange.min + (panelRange.max - panelRange.min) * progressInPanel;\n\n void control.moveToPosition(newCameraPos, 0).catch(() => void 0);\n }\n }\n\n /**\n * Add plugins that can have different effects on Flicking\n * @ko 플리킹에 다양한 효과를 부여할 수 있는 플러그인을 추가합니다\n * @param {...Plugin} plugins The plugin(s) to add추가할 플러그인(들)\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public addPlugins(...plugins: Plugin[]) {\n if (this._initialized) {\n plugins.forEach(item => item.init(this));\n }\n\n this._plugins.push(...plugins);\n\n return this;\n }\n\n /**\n * Remove plugins from Flicking.\n * @ko 플리킹으로부터 플러그인들을 제거합니다.\n * @param {...Plugin} plugin The plugin(s) to remove.제거 플러그인(들).\n * @return {this}\n * @see https://github.com/naver/egjs-flicking-plugins\n */\n public removePlugins(...plugins: Plugin[]) {\n plugins.forEach(item => {\n const foundIndex = findIndex(this._plugins, val => val === item);\n\n if (foundIndex >= 0) {\n item.destroy();\n this._plugins.splice(foundIndex, 1);\n }\n });\n\n return this;\n }\n\n /**\n * Update viewport/panel sizes\n * @ko 패널 및 뷰포트의 크기를 갱신합니다\n * @method\n * @fires Flicking#beforeResize\n * @fires Flicking#afterResize\n * @return {this}\n */\n public async resize(): Promise {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n const activePanel = control.activePanel;\n const prevWidth = viewport.width;\n const prevHeight = viewport.height;\n const prevProgressInPanel = activePanel\n ? camera.getProgressInPanel(activePanel)\n : 0;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: prevWidth,\n height: prevHeight,\n element: viewport.element\n }));\n\n viewport.resize();\n await renderer.forceRenderAllPanels(); // Render all panel elements, to update sizes\n if (!this._initialized) {\n return;\n }\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateAdaptiveHeight();\n camera.updatePanelOrder();\n camera.updateOffset();\n await renderer.render();\n if (!this._initialized) {\n return;\n }\n\n if (control.animating) {\n // TODO:\n } else {\n control.updatePosition(prevProgressInPanel);\n control.updateInput();\n }\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== prevWidth || newHeight !== prevHeight;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: prevWidth,\n height: prevHeight\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n\n /**\n * Add new panels after the last panel\n * @ko 패널 목록의 제일 끝에 새로운 패널들을 추가합니다\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of appended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new Flicking(\"#flick\");\n * // These are possible parameters\n * flicking.append(document.createElement(\"div\"));\n * flicking.append(\"\\Panel\\\");\n * flicking.append([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.append(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public append(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(this._renderer.panelCount, element);\n }\n\n /**\n * Add new panels before the first panel\n * This will increase index of panels after by the number of panels added\n * @ko 패널 목록의 제일 앞(index 0)에 새로운 패널들을 추가합니다\n * 추가한 패널의 개수만큼 기존 패널들의 인덱스가 증가합니다.\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @see Panel\n * @see ElementLike\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.prepend(document.createElement(\"div\"));\n * flicking.prepend(\"\\Panel\\\");\n * flicking.prepend([\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.prepend(\"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public prepend(element: ElementLike | ElementLike[]): Panel[] {\n return this.insert(0, element);\n }\n\n /**\n * Insert new panels at given index\n * This will increase index of panels after by the number of panels added\n * @ko 주어진 인덱스에 새로운 패널들을 추가합니다\n * 해당 인덱스보다 같거나 큰 인덱스를 가진 기존 패널들은 추가한 패널의 개수만큼 인덱스가 증가합니다.\n * @param {number} index Index to insert new panels at새로 패널들을 추가할 인덱스\n * @param {ElementLike | ElementLike[]} element A new HTMLElement, a outerHTML of element, or an array of both\n * 새로운 HTMLElement, 혹은 엘리먼트의 outerHTML, 혹은 그것들의 배열\n * @return {Panel[]} An array of prepended panels추가된 패널들의 배열\n * @throws {FlickingError} {@link ERROR_CODE ERROR_CODE.NOT_ALLOWED_IN_FRAMEWORK} if called on frameworks (React, Angular, Vue...)\n * @example\n * ```ts\n * const flicking = new eg.Flicking(\"#flick\");\n * flicking.insert(0, document.createElement(\"div\"));\n * flicking.insert(2, \"\\Panel\\\");\n * flicking.insert(1, [\"\\Panel\\\", document.createElement(\"div\")]);\n * // Even this is possible\n * flicking.insert(3, \"\\Panel 1\\\\Panel 2\\\");\n * ```\n */\n public insert(index: number, element: ElementLike | ElementLike[]): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchInsert({ index, elements: parseElement(element), hasDOMInElements: true });\n }\n\n /**\n * Remove the panel at the given index\n * This will decrease index of panels after by the number of panels removed\n * @ko 주어진 인덱스의 패널을 제거합니다\n * 해당 인덱스보다 큰 인덱스를 가진 기존 패널들은 제거한 패널의 개수만큼 인덱스가 감소합니다\n * @param {number} index Index of panel to remove제거할 패널의 인덱스\n * @param {number} [deleteCount=1] Number of panels to remove from index`index` 이후로 제거할 패널의 개수\n * @return {Panel[]} An array of removed panels제거된 패널들의 배열\n */\n public remove(index: number, deleteCount: number = 1): Panel[] {\n if (this._renderExternal) {\n throw new FlickingError(ERROR.MESSAGE.NOT_ALLOWED_IN_FRAMEWORK, ERROR.CODE.NOT_ALLOWED_IN_FRAMEWORK);\n }\n\n return this._renderer.batchRemove({ index, deleteCount, hasDOMInElements: true });\n }\n\n private _createControl(): Control {\n const moveType = this._moveType;\n const moveTypes = Object.keys(MOVE_TYPE).map(key => MOVE_TYPE[key] as ValueOf);\n\n const moveTypeStr = Array.isArray(moveType)\n ? moveType[0]\n : moveType;\n\n const moveTypeOptions = Array.isArray(moveType)\n ? moveType[1] ?? {}\n : {};\n\n if (!includes(moveTypes, moveTypeStr)) {\n throw new FlickingError(ERROR.MESSAGE.WRONG_OPTION(\"moveType\", JSON.stringify(moveType)), ERROR.CODE.WRONG_OPTION);\n }\n\n switch (moveTypeStr) {\n case MOVE_TYPE.SNAP:\n return new SnapControl(moveTypeOptions as SnapControlOptions);\n case MOVE_TYPE.FREE_SCROLL:\n return new FreeControl(moveTypeOptions as FreeControlOptions);\n case MOVE_TYPE.STRICT:\n return new StrictControl(moveTypeOptions as StrictControlOptions);\n }\n }\n\n private _createCamera(): Camera {\n if (this._circular && this._bound) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"circular\\\" and \\\"bound\\\" option cannot be used together, ignoring bound.\");\n }\n\n return new Camera(this, {\n align: this._align\n });\n }\n\n private _createRenderer(): Renderer {\n const externalRenderer = this._externalRenderer;\n if (this._virtual && this._panelsPerView <= 0) {\n // eslint-disable-next-line no-console\n console.warn(\"\\\"virtual\\\" and \\\"panelsPerView\\\" option should be used together, ignoring virtual.\");\n }\n\n return externalRenderer\n ? externalRenderer\n : this._renderExternal\n ? this._createExternalRenderer()\n : this._createVanillaRenderer();\n }\n\n private _createExternalRenderer(): ExternalRenderer {\n const {\n renderer,\n rendererOptions\n } = this._renderExternal!;\n\n return new (renderer)({ align: this._align, ...rendererOptions });\n }\n\n private _createVanillaRenderer(): VanillaRenderer {\n const virtual = this.virtualEnabled;\n\n return new VanillaRenderer({\n align: this._align,\n strategy: virtual\n ? new VirtualRenderingStrategy()\n : new NormalRenderingStrategy({\n providerCtor: VanillaElementProvider\n })\n });\n }\n\n private _moveToInitialPanel(): void {\n const renderer = this._renderer;\n const control = this._control;\n const camera = this._camera;\n const defaultPanel = renderer.getPanel(this._defaultIndex) || renderer.getPanel(0);\n\n if (!defaultPanel) return;\n\n const nearestAnchor = camera.findNearestAnchor(defaultPanel.position);\n const initialPanel = (nearestAnchor && defaultPanel.index !== nearestAnchor.panel.index) ? nearestAnchor.panel : defaultPanel;\n control.setActive(initialPanel, null, false);\n\n if (!nearestAnchor) {\n throw new FlickingError(ERROR.MESSAGE.POSITION_NOT_REACHABLE(initialPanel.position), ERROR.CODE.POSITION_NOT_REACHABLE);\n }\n\n let position = initialPanel.position;\n\n if (!camera.canReach(initialPanel)) {\n position = nearestAnchor.position;\n }\n\n camera.lookAt(position);\n control.updateInput();\n camera.updateOffset();\n }\n\n private _initialResize() {\n const viewport = this._viewport;\n const renderer = this._renderer;\n const camera = this._camera;\n const control = this._control;\n\n this.trigger(new ComponentEvent(EVENTS.BEFORE_RESIZE, {\n width: 0,\n height: 0,\n element: viewport.element\n }));\n\n viewport.resize();\n renderer.updatePanelSize();\n camera.updateAlignPos();\n camera.updateRange();\n camera.updateAnchors();\n camera.updateOffset();\n control.updateInput();\n\n const newWidth = viewport.width;\n const newHeight = viewport.height;\n const sizeChanged = newWidth !== 0 || newHeight !== 0;\n\n this.trigger(new ComponentEvent(EVENTS.AFTER_RESIZE, {\n width: viewport.width,\n height: viewport.height,\n prev: {\n width: 0,\n height: 0\n },\n sizeChanged,\n element: viewport.element\n }));\n }\n}\n\nexport default Flicking;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\nimport Renderer from \"../renderer/Renderer\";\nimport Panel from \"../core/panel/Panel\";\n\nexport default (flicking: Flicking, diffResult: DiffResult, rendered: any[]) => {\n const renderer = flicking.renderer;\n const panels = renderer.panels;\n const prevList = [...diffResult.prevList];\n\n const added: Panel[] = [];\n const removed: Panel[] = [];\n\n if (diffResult.removed.length > 0) {\n let endIdx = -1;\n let prevIdx = -1;\n\n diffResult.removed.forEach(removedIdx => {\n if (endIdx < 0) {\n endIdx = removedIdx;\n }\n\n if (prevIdx >= 0 && removedIdx !== prevIdx - 1) {\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n\n endIdx = removedIdx;\n prevIdx = removedIdx;\n } else {\n prevIdx = removedIdx;\n }\n\n prevList.splice(removedIdx, 1);\n });\n\n removed.push(...batchRemove(renderer, prevIdx, endIdx + 1));\n }\n\n diffResult.ordered.forEach(([from, to]) => {\n const prevPanel = panels.splice(from, 1)[0];\n panels.splice(to, 0, prevPanel);\n });\n\n if (diffResult.ordered.length > 0) {\n panels.forEach((panel, idx) => {\n const indexDiff = idx - panel.index;\n\n if (indexDiff > 0) {\n panel.increaseIndex(indexDiff);\n } else {\n panel.decreaseIndex(-indexDiff);\n }\n });\n\n panels.sort((panel1, panel2) => panel1.index - panel2.index);\n\n panels.forEach(panel => {\n panel.updatePosition();\n });\n }\n\n if (diffResult.added.length > 0) {\n let startIdx = -1;\n let prevIdx = -1;\n\n const addedElements = rendered.slice(prevList.length);\n\n diffResult.added.forEach((addedIdx, idx) => {\n if (startIdx < 0) {\n startIdx = idx;\n }\n\n if (prevIdx >= 0 && addedIdx !== prevIdx + 1) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx, idx + 1));\n\n startIdx = -1;\n prevIdx = -1;\n } else {\n prevIdx = addedIdx;\n }\n });\n\n if (startIdx >= 0) {\n added.push(...batchInsert(renderer, diffResult, addedElements, startIdx));\n }\n }\n\n if (diffResult.added.length > 0 || diffResult.removed.length > 0) {\n renderer.updateAfterPanelChange(added, removed);\n }\n};\n\nconst batchInsert = (renderer: Renderer, diffResult: DiffResult, addedElements: any[], startIdx: number, endIdx?: number) => {\n return renderer.batchInsertDefer(\n ...diffResult.added.slice(startIdx, endIdx).map((index, elIdx) => ({ index, elements: [addedElements[elIdx]], hasDOMInElements: false }))\n );\n};\n\nconst batchRemove = (renderer: Renderer, startIdx: number, endIdx?: number) => {\n const removed = renderer.panels.slice(startIdx, endIdx);\n\n return renderer.batchRemoveDefer({ index: startIdx, deleteCount: removed.length, hasDOMInElements: false });\n};\n\n","import { FlickingOptions } from \"../Flicking\";\nimport { ALIGN } from \"../const/external\";\nimport { parseArithmeticExpression } from \"../utils\";\n\nexport default (align: FlickingOptions[\"align\"] = ALIGN.CENTER, horizontal: boolean = true, firstPanelSize?: string) => {\n const cameraAlign = getCameraAlign(align);\n const panelAlign = getPanelAlign(align);\n\n if (panelAlign == null) return \"\";\n\n const camPosition = `calc(${cameraAlign} - (${firstPanelSize || \"0px\"} * ${panelAlign.percentage}) - ${panelAlign.absolute}px)`;\n\n return horizontal\n ? `translate(${camPosition})`\n : `translate(0, ${camPosition})`;\n};\n\nconst getCameraAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { camera: string | number }).camera\n : align;\n\n return parseAlign(alignVal);\n};\n\nconst getPanelAlign = (align: FlickingOptions[\"align\"]) => {\n const alignVal = typeof align === \"object\"\n ? (align as { panel: string | number }).panel\n : align;\n\n return parseArithmeticExpression(parseAlign(alignVal));\n};\n\nconst parseAlign = (alignVal: number | string) => {\n if (typeof alignVal === \"number\") {\n return `${alignVal}px`;\n }\n\n switch (alignVal) {\n case ALIGN.CENTER:\n return \"50%\";\n case ALIGN.NEXT:\n return \"100%\";\n case ALIGN.PREV:\n return \"0%\";\n default:\n return alignVal;\n }\n};\n","import Component from \"@egjs/component\";\n\nimport Flicking from \"../Flicking\";\n\n/**\n * Decorator that makes the method of flicking available in the framework.\n * @ko 프레임워크에서 플리킹의 메소드를 사용할 수 있게 하는 데코레이터.\n * @memberof eg.Flicking\n * @private\n * @example\n * ```js\n * import Flicking, { withFlickingMethods } from \"@egjs/flicking\";\n *\n * class Flicking extends React.Component> {\n * @withFlickingMethods\n * private flicking: Flicking;\n * }\n * ```\n */\nconst withFlickingMethods = (prototype: any, flickingName: string) => {\n [Component.prototype, Flicking.prototype].forEach(proto => {\n Object.getOwnPropertyNames(proto).filter(name => !prototype[name] && name.indexOf(\"_\") !== 0 && name !== \"constructor\")\n .forEach((name: string) => {\n const descriptor = Object.getOwnPropertyDescriptor(proto, name)!;\n\n if (descriptor.value) {\n // Public Function\n Object.defineProperty(prototype, name, {\n value: function(...args) {\n return descriptor.value.call(this[flickingName], ...args);\n }\n });\n } else {\n const getterDescriptor: { get?: () => any; set?: (val: any) => void } = {};\n if (descriptor.get) {\n getterDescriptor.get = function() {\n const flicking = this[flickingName];\n return flicking && descriptor.get?.call(flicking);\n };\n }\n if (descriptor.set) {\n getterDescriptor.set = function(...args) {\n return descriptor.set?.call(this[flickingName], ...args);\n };\n }\n\n Object.defineProperty(prototype, name, getterDescriptor);\n }\n });\n });\n};\n\nexport default withFlickingMethods;\n","import { DiffResult } from \"@egjs/list-differ\";\n\nimport Flicking from \"../Flicking\";\n\nexport default (flicking: Flicking, diffResult: DiffResult) => {\n const removedPanels = diffResult.removed.reduce((map, idx) => {\n map[idx] = true;\n return map;\n }, {});\n\n const maintainedMap = diffResult.maintained.reduce((map, [prev, current]) => {\n map[prev] = current;\n return map;\n }, {});\n\n return [\n ...flicking.panels\n .filter(panel => !removedPanels[panel.index])\n // Sort panels by position\n .sort((panel1, panel2) => (panel1.position + panel1.offset) - (panel2.position + panel2.offset))\n .map(panel => diffResult.list[maintainedMap[panel.index]]),\n ...diffResult.added.map(idx => diffResult.list[idx])\n ];\n};\n\n","/*\n * Copyright (c) 2015 NAVER Corp.\n * egjs projects are licensed under the MIT license\n */\nimport Flicking from \"./Flicking\";\nimport * as Core from \"./core\";\nimport * as Camera from \"./camera\";\nimport * as Control from \"./control\";\nimport * as Renderer from \"./renderer\";\nimport * as Constants from \"./const/external\";\nimport * as CFC from \"./cfc\";\nimport * as Utils from \"./utils\";\nimport { merge } from \"./utils\";\n\nmerge(Flicking, Core);\nmerge(Flicking, Camera);\nmerge(Flicking, Control);\nmerge(Flicking, Renderer);\nmerge(Flicking, Constants);\nmerge(Flicking, CFC);\nmerge(Flicking, Utils);\n\nexport default Flicking;\n"],"names":["CODE","WRONG_TYPE","ELEMENT_NOT_FOUND","VAL_MUST_NOT_NULL","NOT_ATTACHED_TO_FLICKING","WRONG_OPTION","INDEX_OUT_OF_RANGE","POSITION_NOT_REACHABLE","TRANSFORM_NOT_SUPPORTED","STOP_CALLED_BY_USER","ANIMATION_INTERRUPTED","ANIMATION_ALREADY_PLAYING","NOT_ALLOWED_IN_FRAMEWORK","NOT_INITIALIZED","NO_ACTIVE","NOT_ALLOWED_IN_VIRTUAL","MESSAGE","wrongVal","correctTypes","map","type","join","selector","val","name","optionName","min","max","position","EVENTS","READY","BEFORE_RESIZE","AFTER_RESIZE","HOLD_START","HOLD_END","MOVE_START","MOVE","MOVE_END","WILL_CHANGE","CHANGED","WILL_RESTORE","RESTORED","SELECT","NEED_PANEL","VISIBLE_CHANGE","REACH_EDGE","PANEL_CHANGE","ALIGN","PREV","CENTER","NEXT","DIRECTION","NONE","MOVE_TYPE","SNAP","FREE_SCROLL","STRICT","CLASS","VERTICAL","HIDDEN","DEFAULT_VIRTUAL","CIRCULAR_FALLBACK","LINEAR","BOUND","ORDER","LTR","RTL","merge","target","sources","_i","arguments","length","forEach","source","Object","keys","key","getElement","el","parent","targetEl","isString","queryResult","document","querySelector","FlickingError","ERROR","nodeType","Node","ELEMENT_NODE","checkExistence","value","nameOnErrMsg","clamp","x","Math","getFlickingAttached","toArray","iterable","slice","call","parseAlign","align","size","alignPoint","parseArithmeticSize","parseBounce","bounce","parsedBounce","Array","isArray","parsedVal","cssValue","base","parsed","parseArithmeticExpression","percentage","absolute","cssRegex","idx","matchResult","exec","sign","unit","parsedValue","parseFloat","signMultiplier","parsePanelAlign","panel","getDirection","start","end","parseElement","element","elements","tempDiv","createElement","innerHTML","push","apply","__spread","children","firstChild","removeChild","getMinusCompensatedIndex","includes","array","array_1","__values","array_1_1","done","next","circulatePosition","pos","find","checker","array_2","array_2_1","findIndex","getProgress","prev","getStyle","window","getComputedStyle","currentStyle","setSize","_a","width","height","style","isBetween","circulateIndex","index","range","arr","i","getElementSize","horizontal","useFractionalSize","useOffset","baseSize","isBorderBoxSizing","boxSizing","border","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","sizeStr","setPrototypeOf","obj","proto","__proto__","_super","message","code","_this","this","prototype","__extends","Error","Viewport","flicking","_flicking","_el","_width","_height","_padding","left","right","top","bottom","_isBorderBoxSizing","__proto","defineProperty","get","newWidth","newHeight","resize","elStyle","AutoResizer","isFirstResize","_onResize","resizeDebounce","maxResizeDebounce","_maxResizeDebounceTimer","setTimeout","_doScheduledResize","_resizeTimer","clearTimeout","_skipFirstResize","_enabled","_resizeObserver","enable","viewport","disable","useResizeObserver","ResizeObserver","resizeObserver","observe","addEventListener","disconnect","removeEventListener","VanillaElementProvider","_element","_rendered","show","cameraEl","camera","parentElement","appendChild","hide","VirtualElementProvider","_virtualElement","nativeElement","visible","elIndex","_panel","elementIndex","virtual","init","VirtualManager","options","_renderPanel","renderPanel","_initialPanelCount","_b","initialPanelCount","_cache","_c","cache","_panelClass","_d","panelClass","_elements","set","renderer","panels","uncacheRenderResult","virtualEnabled","externalRenderer","renderExternal","_initVirtualElements","virtualElements","nativeEl","display","append","count","insert","prepend","batchInsert","hasDOMInElements","remove","batchRemove","deleteCount","cameraElement","panelsPerView","fragment","createDocumentFragment","panelEl","className","dataset","toString","STATE_TYPE","EVENT","HOLD","CHANGE","RELEASE","ANIMATION_END","FINISH","POSITION_KEY","State","_delta","_targetPanel","onEnter","prevState","onHold","ctx","onChange","onRelease","onAnimationEnd","onFinish","_moveToChangedPosition","axesEvent","transitTo","delta","AXES","prevPosition","newPosition","circularEnabled","lookAt","moveEvent","ComponentEvent","isTrusted","holding","direction","trigger","isCanceled","DISABLED","IdleState","animating","panelCount","holdStartEvent","HOLDING","animatingContext","control","controller","moveStartEvent","ANIMATING","HoldingState","_releaseEvent","inputEvent","offset","offsetX","offsetY","DRAGGING","flick","setTo","IDLE","clickedElement","srcEvent","touch","changedTouches","elementFromPoint","clientX","clientY","clickedPanel","panels_1","panels_1_1","contains","cameraPosition","clickedPanelPosition","DraggingState","destPos","duration","moveToPosition","err","AnimatingState","targetPanel","updateInput","changeOnHold","setActive","activePanel","DisabledState","stop","StateMachine","nextStateType","nextState","_state","fire","eventType","externalCtx","currentState","__assign","AxesController","_onAxesHold","_dragged","_onAxesChange","_panInput","isEnabled","_preventClickWhenDragged","e","preventDefault","stopPropagation","_resetInternalValues","_stateMachine","_axes","state","_animatingContext","axes","circular","axis","Axes","deceleration","interruptable","nested","easing","PanInput","inputType","threshold","iOSEdgeSwipeThreshold","preventDefaultOnDrag","scale","panelOrder","releaseOnScroll","connect","on","destroy","removePreventClickHandler","release","updateAnimation","stopAnimation","update","controlParams","axisManager","addPreventClickHandler","off","animateTo","Promise","reject","startPos","resolve","animationFinishHandler","interruptionHandler","once","animate","updateDirection","panInput","Control","_controller","_activePanel","_getPosition","updatePosition","progressInPanel","clampToReachablePosition","resetActive","moveToPanel","_triggerIndexChangeEvent","_animateToPosition","newActivePanel","prevActivePanel","_nextPanel","updateAdaptiveHeight","prevIndex","prevPanel","copy","triggeringEvent","event","then","__awaiter","render","sent","catch","nearestAnchor","findNearestAnchor","removed","canReach","camPos_1","camRangeDiff","rangeDiff","possiblePositions","filter","reduce","nearestPosition","abs","Infinity","AnchorPoint","_index","_pos","SnapControl","_count","activeAnchor","findActiveAnchor","anchorAtCamera","targetAnchor","snapThreshold","_calcSnapThreshold","posDelta","absPosDelta","snapDelta","_findSnappedAnchor","_findAdjacentAnchor","currentPos","clampedPosition","anchorAtPosition","findAnchorIncludePosition","isFinite","anchors","anchorPoints","loopCount","floor","circularIndexOffset","anchorAtPositionIndex","anchor","loop","anchorIncludePosition","getNextAnchor","getPrevAnchor","isNextDirection","panelSize","alignPos","alignPosition","margin","FreeControl","stopAtEdge","_stopAtEdge","panelRange","targetPos","StrictControl","_resetIndexRange","cameraRange","currentIndex","prevPanelIndex","nextPanelIndex","nextPanel","prevPos","nextPos","_indexRange","currentPanel","axesRange","indexRange","isOverThreshold","adjacentAnchor","firstAnchor","lastAnchor","shouldBounceToFirst","shouldBounceToLast","isAdjacent","CameraMode","getAnchors","includePosition","nearest","prevDist","anchorIdx","dist","getCircularOffset","panelPos","canSee","visibleRange","isVisibleOnRange","LinearCameraMode","checkAvailability","getRange","firstPanel","getPanel","lastPanel","CircularCameraMode","firstPanelPrev","lastPanelNext","visibleSize","panelSizeSum","every","camRange","minDist","minDistIndex","anchorCount","positionInRange","anchorInRange","possibleAnchors","toggled","toggledPrev","toggleDirection","toggledNext","_calcPanelAreaSum","visibleInCurrentRange","sum","sizeIncludingMargin","BoundCameraMode","viewportSize","firstPos","lastPos","alignVal","reachablePanels","shouldPrependBoundAnchor","shouldAppendBoundAnchor","indexOffset_1","newAnchors","splice","nearestPanelAtMin","_findNearestPanel","panelAtMin","panelAtMax","panelIdx","Camera","_checkTranslateSupport","supportedStyle","documentElement","transformName","transforms_1","transforms_1_1","prefixedTransform","_transform","_align","_position","_alignPos","_offset","_circularOffset","_circularEnabled","_mode","_range","_visiblePanels","_anchors","NaN","nearestPanel","bounceSize","prevRange","nextRange","nextPosition","_panelOrder","viewportEl","firstElementChild","_updateMode","updatePanelOrder","_togglePanels","_refreshVisiblePanels","_checkNeedPanel","_checkReachEnd","updateOffset","applyTransform","getProgressInPanel","updateRange","updateCircularToggleDirection","updateAlignPos","updateAnchors","adaptive","unRenderedPanels","rendered","initialized","resetNeedPanelHistory","_needPanelTriggered","rendering","actualPosition","newVisiblePanels","prevVisiblePanels","added","visiblePanels","needPanelTriggered","cameraSize","needPanelThreshold","cameraPrev","cameraNext","newPos","wasBetweenRange","isBetweenRange","circularMode","canSetCircularMode","fallbackMode","circularFallback","bound","toggle","some","isToggled","Renderer","strategy","_panels","_rendering","_strategy","panelAlign","_collectPanels","forceRenderAllPanels","markForShow","updatePanelSize","_updatePanelSizeByGrid","items","allPanelsInserted","batchInsertDefer","updateAfterPanelChange","prevFirstPanel","addedPanels","item","insertingIdx","panelsPushed","panelsInserted","_createPanel","_insertPanelElements","increaseIndex","allPanelsRemoved","batchRemoveDefer","removingIdx","panelsPulled","panelsRemoved","decreaseIndex","_removePanelElements","panelsAdded","_updateCameraAndControl","targetIndex","checkPanelContentsReady","checkingPanels","resizeOnContentsReady","hasContents","contentsReadyChecker","ImReady","loading","prevProgressInPanel","panelBehind","readyCount","totalCount","check","_showOnlyVisiblePanels","visibleIndexes","visibles","markForHide","referencePanel","panelSizeObj","firstPanelSizeObj","noPanelStyleOverride","updatePanelSizes","_removeAllChildsFromCamera","nextSibling","nextSiblingElement","insertBefore","_afterRender","VanillaRenderer","updateRenderingPanels","renderPanels","_resetPanelElementOrder","_removeAllTextNodes","collectPanels","createPanel","reversedElements","getRenderingElementsByOrder","reverse","nextEl","nextElementSibling","childNodes","node","TEXT_NODE","ExternalRenderer","Panel","elementProvider","_elProvider","_removed","_loading","_resetInternalStates","_size","_margin","_toggled","_toggleDirection","cameraRangeDiff","progress","camPos","disappearPosNext","disappearPosPrev","checkingRange","_updateAlignPos","cached","marginLeft","marginRight","marginTop","marginBottom","includeMargin","includeRange","focus","moveTo","togglePosition","_togglePosition","prevToggled","camAlignPosition","camVisibleRange","camVisibleSize","minimumVisible","maximumVisible","shouldBeVisibleAtMin","shouldBeVisibleAtMax","NormalRenderingStrategy","providerCtor","_providerCtor","getRenderingIndexesByOrder","renderedPanels","renderOnlyVisible","VirtualPanel","_cachedInnerHTML","virtualElCount","cacheRenderResult","result","newInnerHTML","VirtualRenderingStrategy","virtualManager","invisibleIndexes","sort","panel1","panel2","_","Flicking","root","defaultIndex","_e","_f","_g","_h","_j","_k","_l","_m","_o","_p","_q","preventEventsBeforeInit","_r","_s","_t","pow","_u","_v","moveType","_w","_x","_y","_z","_0","preventClickOnDrag","_1","_2","disableOnInit","_3","_4","_5","_6","autoInit","_7","autoResize","_8","_9","_10","_11","_12","_13","_initialized","_plugins","_defaultIndex","_horizontal","_circular","_circularFallback","_bound","_adaptive","_panelsPerView","_noPanelStyleOverride","_resizeOnContentsReady","_nested","_virtual","_needPanelThreshold","_preventEventsBeforeInit","_deceleration","_duration","_easing","_inputType","_moveType","_threshold","_interruptable","_bounce","_iOSEdgeSwipeThreshold","_preventClickOnDrag","_preventDefaultOnDrag","_disableOnInit","_changeOnHold","_renderOnlyVisible","_autoInit","_autoResize","_useResizeObserver","_resizeDebounce","_maxResizeDebounce","_useFractionalSize","_externalRenderer","_renderExternal","_viewport","_autoResizer","_renderer","_createRenderer","_camera","_createCamera","_control","_createControl","_virtualManager","activeIndex","prevControl","newControl","originalTrigger","_initialResize","_moveToInitialPanel","disableInput","plugin","enableInput","getStatus","includePanelHTML","visiblePanelsOnly","status","panelInfo","html","outerHTML","visibleOffset","setStatus","panelIndex","newCameraPos","addPlugins","plugins","removePlugins","foundIndex","prevWidth","prevHeight","sizeChanged","moveTypes","moveTypeStr","moveTypeOptions","JSON","stringify","console","warn","_createExternalRenderer","_createVanillaRenderer","rendererOptions","defaultPanel","initialPanel","VERSION","Component","diffResult","addedElements","startIdx","endIdx","elIdx","getCameraAlign","getPanelAlign","flickingName","getOwnPropertyNames","indexOf","descriptor","getOwnPropertyDescriptor","args","getterDescriptor","prevList","endIdx_1","prevIdx_1","removedIdx","ordered","__read","from","to","indexDiff","startIdx_1","prevIdx_2","addedElements_1","addedIdx","removedPanels","maintainedMap","maintained","current","list","firstPanelSize","cameraAlign","camPosition","Constants","CFC","Utils"],"mappings":";;;;;;;;66KA6BaA,EAAO,CAClBC,WAAY,EACZC,kBAAmB,EACnBC,kBAAmB,EACnBC,yBAA0B,EAC1BC,aAAc,EACdC,mBAAoB,EACpBC,uBAAwB,EACxBC,wBAAyB,EACzBC,oBAAqB,EACrBC,sBAAuB,EACvBC,0BAA2B,GAC3BC,yBAA0B,GAC1BC,gBAAiB,GACjBC,UAAW,GACXC,uBAAwB,IAGbC,EACC,SAACC,EAAeC,GAA2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,EAAWxR,MAAMjoB,KAAI,SAAAqG,GAAO,OAAAozB,EAAW+B,KAAKn1B,EAAI,IAEtD,4BFnBD,SAAgBjB,EAAgD2E,EAA4B0xB,QAA5E,IAAAr2B,IAAAA,EAAkCxD,EAAME,aAAQ,IAAAiI,IAAAA,GAA0B,GACxF,IAAM2xB,EAAc5B,GAAe10B,GAC7BokB,EAAauQ,GAAc30B,GAEjC,GAAkB,MAAdokB,EAAoB,MAAO,GAE/B,IAAMmS,EAAc,QAAQD,EAAW,QAAOD,GAAkB,OAAW,MAAAjS,EAAWtjB,WAAU,OAAOsjB,EAAWrjB,eAElH,OAAO4D,EACH,aAAa4xB,EAAc,IAC3B,gBAAgBA,EAAW,GAChC,UGDD34B,EAAMsuB,gKACNtuB,EAAMsuB,GAAUxM,IAChB9hB,EAAMsuB,GAAUnW,IAChBnY,EAAMsuB,GAAUnI,IAChBnmB,EAAMsuB,GAAUsK,GAChB54B,EAAMsuB,GAAUuK,IAChB74B,EAAMsuB,GAAUwK"} \ No newline at end of file diff --git a/package.json b/package.json index 65c217885a..bdb4329059 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@egjs/flicking", - "version": "4.11.4", + "version": "4.11.4-snapshot", "description": "Everyday 30 million people experience. It's reliable, flexible and extendable carousel.", "main": "dist/flicking.cjs.js", "module": "dist/flicking.esm.js",