@egjs/conveyer
Advanced tools
Comparing version 1.6.1 to 1.6.2-beta.0
@@ -6,2 +6,16 @@ # Change Log | ||
## [1.6.1](https://github.com/naver/egjs-conveyer/compare/@egjs/conveyer@1.5.1...@egjs/conveyer@1.6.1) (2023-08-03) | ||
### :rocket: New Features | ||
* add intersection option (#46) ([091fda5](https://github.com/naver/egjs-conveyer/commit/091fda54a5a669d8db26d6829a3d1b2b6b9a211d)) | ||
### :mega: Other | ||
* update packages versions ([b1a0858](https://github.com/naver/egjs-conveyer/commit/b1a0858fa3a3cd94d6c0ab1abed505d106e75d14)) | ||
## [1.5.1](https://github.com/naver/egjs-conveyer/compare/@egjs/conveyer@1.5.0...@egjs/conveyer@1.5.1) (2023-07-27) | ||
@@ -8,0 +22,0 @@ |
@@ -10,26 +10,69 @@ /** | ||
* @typedef | ||
* @property - scroll direction. (true: Horizontal Scroll, false: Vertical Scroll) (default: true) <ko>스크롤 방향. (true: 가로 스크롤, false: 세로 스크롤) (default: true)</ko> | ||
* @property - selector to find items inside. (default: "") <ko>내부의 아이템들을 찾기 위한 selector. (default: "")</ko> | ||
* @property - Whether to use drag (default: true) <ko> 드래그를 사용할지 여부. (default: true)</ko> | ||
* @property - Whether to use the mouse wheel in a direction aside from the scroll direction (default: false) <ko>스크롤 방향과 다른 방향의 마우스 휠 입력을 사용할지 여부. (default: false)</ko> | ||
* @property - The minimum margin space for {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, and {@link Conveyer#event-leaveEnd leaveEnd} events to be triggered at the beginning and end of the scroll area. (default: 0) | ||
* <ko> 스크롤 영역의 시작과 끝에서 {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, {@link Conveyer#event-leaveEnd leaveEnd} 이벤트들이 발생하기 위한 최소 여백. (default: 0)</ko> | ||
* @property - The maximum amount of time the scroll event does not fire for the finishScroll event to be triggered. (default: 100) <ko> finishScroll 이벤트가 발생되기 위한 scroll 이벤트가 발생하지 않는 최대 시간. (default: 100)</ko> | ||
* @property - Whether to prevent being selected. (default: true) <ko>셀렉트가 되는 것을 막을지 여부. (default: true) </ko> | ||
* @property - Whether to prevent click event when dragging. (default: false) <ko>드래그하면 클릭이벤트를 막을지 여부. (default: true)</ko> | ||
* @property - 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} 실행 여부</ko> | ||
* @property - Whether to automatically initialize when an instance is created. If set to false, initialization is possible while calling the init method. (default: true) <ko>인스턴스를 생성할 때 자동으로 초기화할지 여부. false로 설정하면 init 메서드를 호출하면서 초기화가 가능하다. (default: true)</ko> | ||
* @property - If this option is enabled on a Conveyer placed inside an egjs component that has the same scroll direction including the Conveyer itself. The parent component moves in the same direction after the Conveyer reaches the first/last scroll position. <ko>Conveyer 자신을 포함해서 동일한 스크롤 방향을 가진 egjs 컴포넌트 내부에 배치된 Conveyer에서 이 옵션을 활성화하면 Conveyer가 첫/마지막 스크롤 위치에 도달한 뒤부터 같은 방향으로 상위 컴포넌트가 움직인다.</ko> | ||
*/ | ||
export interface ConveyerOptions { | ||
/** | ||
* scroll direction. (true: Horizontal Scroll, false: Vertical Scroll) | ||
* <ko>스크롤 방향. (true: 가로 스크롤, false: 세로 스크롤)</ko> | ||
* @default true | ||
*/ | ||
horizontal?: boolean; | ||
/** | ||
* selector to find items inside. | ||
* <ko>내부의 아이템들을 찾기 위한 selector.</ko> | ||
* @default "" | ||
*/ | ||
itemSelector?: string; | ||
/** | ||
* Whether to use drag. | ||
* <ko> 드래그를 사용할지 여부.</ko> | ||
* @default true | ||
*/ | ||
useDrag?: boolean; | ||
/** | ||
* Whether to use the mouse wheel in a direction aside from the scroll direction. | ||
* <ko>스크롤 방향과 다른 방향의 마우스 휠 입력을 사용할지 여부.</ko> | ||
* @default false | ||
*/ | ||
useSideWheel?: boolean; | ||
/** | ||
* The minimum margin space for {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, and {@link Conveyer#event-leaveEnd leaveEnd} events to be triggered at the beginning and end of the scroll area. | ||
* <ko> 스크롤 영역의 시작과 끝에서 {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, {@link Conveyer#event-leaveEnd leaveEnd} 이벤트들이 발생하기 위한 최소 여백.</ko> | ||
* @default 0 | ||
*/ | ||
boundaryMargin?: number; | ||
/** | ||
* The maximum amount of time the scroll event does not fire for the finishScroll event to be triggered. | ||
* <ko> finishScroll 이벤트가 발생되기 위한 scroll 이벤트가 발생하지 않는 최대 시간.</ko> | ||
* @default 100 | ||
*/ | ||
scrollDebounce?: number; | ||
/** | ||
* Whether to prevent being selected. | ||
* <ko>셀렉트가 되는 것을 막을지 여부.</ko> | ||
* @default true | ||
*/ | ||
preventDefault?: boolean; | ||
/** | ||
* Whether to prevent click event when dragging. | ||
* <ko>드래그하면 클릭이벤트를 막을지 여부.</ko> | ||
* @default false | ||
*/ | ||
preventClickOnDrag?: boolean; | ||
/** | ||
* 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} 실행 여부</ko> | ||
* @default false | ||
*/ | ||
preventDefaultOnDrag?: boolean; | ||
/** | ||
* Whether to automatically initialize when an instance is created. If set to false, initialization is possible while calling the init method. | ||
* <ko>인스턴스를 생성할 때 자동으로 초기화할지 여부. false로 설정하면 init 메서드를 호출하면서 초기화가 가능하다.</ko> | ||
* @default true | ||
*/ | ||
autoInit?: boolean; | ||
/** | ||
* If this option is enabled on a Conveyer placed inside an egjs component that has the same scroll direction including the Conveyer itself. The parent component moves in the same direction after the Conveyer reaches the first/last scroll position. | ||
* <ko>Conveyer 자신을 포함해서 동일한 스크롤 방향을 가진 egjs 컴포넌트 내부에 배치된 Conveyer에서 이 옵션을 활성화하면 Conveyer가 첫/마지막 스크롤 위치에 도달한 뒤부터 같은 방향으로 상위 컴포넌트가 움직인다.</ko> | ||
* @default false | ||
*/ | ||
nested?: boolean; | ||
@@ -64,4 +107,4 @@ } | ||
/** | ||
* size ratio to find items. | ||
* <ko>아이템을 찾기 위한 사이즈 비율.</ko> | ||
* size ratio to find items. Use it if `padding` inside the item plays the same role as `margin` or `gap`. | ||
* <ko>아이템을 찾기 위한 사이즈 비율. 아이템 내부에 `padding`이 `margin`, `gap`과 같은 역할을 한다면 사용해라.</ko> | ||
* @default 1 | ||
@@ -86,11 +129,26 @@ */ | ||
* @extends FindItemOptions | ||
* @property - Where to arrange the items in the container. (default: "start") <ko>아이템을 container안에서 정렬할 위치. (default: "start")</ko> | ||
* @property - Whether to find the next item except sorting it in place. (default: false) <ko>아이템을 제자리에 정렬하는 것을 제외하고 다음 아이템을 찾을지 여부. (default: false)</ko> | ||
* @property - The value to scroll further from the sort position. (default: 0) <ko>정렬하는 위치에서 얼만큼 더 스크롤할 값. (default: 0)</ko> | ||
* @property - How long to scroll animation time. (default: 0) <ko>얼마동한 스크롤할 할지 애니메이션 시간. (default: 0)</ko> | ||
*/ | ||
export interface ScrollIntoViewOptions extends FindItemOptions { | ||
/** | ||
* The position to align the target to. | ||
* <ko>target을 정렬할 위치.</ko> | ||
*/ | ||
align?: "start" | "end" | "center"; | ||
/** | ||
* Whether to find the next item except sorting it in place. | ||
* <ko>아이템을 제자리에 정렬하는 것을 제외하고 다음 아이템을 찾을지 여부.</ko> | ||
* @default false | ||
*/ | ||
excludeStand?: boolean; | ||
/** | ||
* The value to scroll further from the sort position. | ||
* <ko>정렬하는 위치에서 얼만큼 더 스크롤할 값.</ko> | ||
* @default 0 | ||
*/ | ||
offset?: number; | ||
/** | ||
* How long to scroll animation time. | ||
* <ko>얼마동한 스크롤할 할지 애니메이션 시간.</ko> | ||
* @default 0 | ||
*/ | ||
duration?: number; | ||
@@ -97,0 +155,0 @@ } |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/egjs-conveyer | ||
version: 1.6.1 | ||
version: 1.6.2 | ||
*/ | ||
@@ -378,3 +378,3 @@ 'use strict'; | ||
var dist2 = dist + itemSize; | ||
return dist >= 0 || dist2 >= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist >= 0 || dist2 > 0 && intersection || dist2 >= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
}); | ||
@@ -391,3 +391,3 @@ selectedItem = selectedItems[0] === startVirtualItem && selectedItems[1] || selectedItems[0]; | ||
var dist2 = dist - itemSize; | ||
return dist <= 0 || dist2 <= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist <= 0 || dist2 < 0 && intersection || dist2 <= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
}).reverse(); | ||
@@ -400,3 +400,3 @@ selectedItem = selectedItems[0] === endVirtualItem && selectedItems[1] || selectedItems[0]; | ||
var dist2 = dist - itemSize; | ||
return dist <= 0 || dist2 <= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist <= 0 || dist2 < 0 && intersection || dist2 <= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
}).reverse()[0]; | ||
@@ -408,3 +408,3 @@ } else if (target === "next") { | ||
var dist2 = dist + itemSize; | ||
return dist >= 0 || dist2 >= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist >= 0 || dist2 > 0 && intersection || dist2 >= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
})[0]; | ||
@@ -411,0 +411,0 @@ } else { |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/egjs-conveyer | ||
version: 1.6.1 | ||
version: 1.6.2 | ||
*/ | ||
@@ -376,3 +376,3 @@ import Axes, { PanInput, WheelInput } from '@egjs/axes'; | ||
var dist2 = dist + itemSize; | ||
return dist >= 0 || dist2 >= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist >= 0 || dist2 > 0 && intersection || dist2 >= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
}); | ||
@@ -389,3 +389,3 @@ selectedItem = selectedItems[0] === startVirtualItem && selectedItems[1] || selectedItems[0]; | ||
var dist2 = dist - itemSize; | ||
return dist <= 0 || dist2 <= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist <= 0 || dist2 < 0 && intersection || dist2 <= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
}).reverse(); | ||
@@ -398,3 +398,3 @@ selectedItem = selectedItems[0] === endVirtualItem && selectedItems[1] || selectedItems[0]; | ||
var dist2 = dist - itemSize; | ||
return dist <= 0 || dist2 <= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist <= 0 || dist2 < 0 && intersection || dist2 <= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
}).reverse()[0]; | ||
@@ -406,3 +406,3 @@ } else if (target === "next") { | ||
var dist2 = dist + itemSize; | ||
return dist >= 0 || dist2 >= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
return dist >= 0 || dist2 > 0 && intersection || dist2 >= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest); | ||
})[0]; | ||
@@ -409,0 +409,0 @@ } else { |
@@ -7,5 +7,5 @@ /* | ||
repository: https://github.com/naver/egjs-conveyer | ||
version: 1.6.1 | ||
version: 1.6.2 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Conveyer=e()}(this,function(){"use strict";var V=function(t,e){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var u=function(){return(u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function o(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function e(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function N(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function z(t){if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}function s(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function L(t){return t.replace(/_/g,".")}function n(t,n){var i=null,r="-1";return e(t,function(t){var e=s("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);if(e&&!t.brand)return i=t,r=e[3]||"-1",t.versionAlias?r=t.versionAlias:t.versionTest&&(e=t.versionTest.toLowerCase(),r=((e=s("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n))?e[3]:"")||r),r=L(r),1}),{preset:i,version:r}}function t(t,n){var i={brand:"",version:"-1"};return e(t,function(t){var e=W(n,t);return e&&(i.brand=t.id,i.version=t.versionAlias||e.version,"-1"!==i.version)}),i}function W(t,e){return N(t,function(t){t=t.brand;return s(""+e.test,t.toLowerCase())})}var i=[{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"}],Y=[{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:!0}],r=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],B=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],a=[{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 H(t){return!!n(B,t).preset}function X(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function h(t){return void 0===t}var U=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=X(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=t}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),K=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof U?e.eventType:e,i=F(this._eventHandler[i]||[]);return i.length<=0||(e instanceof U?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,F(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&h(i)){var t,e=n;for(t in e)this.once(t,e[t])}else"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,F(t)),o.off(n,r)},this.on(n,r));return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&h(e)){var n,i=t;for(n in i)this.on(n,i[n])}else{var r;"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],h(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e))}return this},e.off=function(t,e){var n,i;if(h(t))return this._eventHandler={},this;if(h(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r])}else{var s=this._eventHandler[t];if(s){var a=0;try{for(var u=X(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}return this},t.VERSION="3.0.2",t}(),c=U;function q(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Q(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function l(t){return void 0===t}var G=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=q(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=t}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),Z=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof G?e.eventType:e,i=Q(this._eventHandler[i]||[]);return i.length<=0||(e instanceof G?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,Q(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&l(i)){var t,e=n;for(t in e)this.once(t,e[t])}else"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,Q(t)),o.off(n,r)},this.on(n,r));return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&l(e)){var n,i=t;for(n in i)this.on(n,i[n])}else{var r;"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],l(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e))}return this},e.off=function(t,e){var n,i;if(l(t))return this._eventHandler={},this;if(l(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r])}else{var s=this._eventHandler[t];if(s){var a=0;try{for(var u=q(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}return this},t.VERSION="3.0.4",t}();var J="__observers__",f="__computed__",$=1,tt="__CFCS_DETECTED_DEPENDENCIES__",et=function(t,e){return(et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function nt(){Object[tt]=Object[tt]||{};var t=Object[tt];return t[$]=t[$]||[],t[$]}var it=function(){function t(t){this._emitter=new Z,this._current=t}var e=t.prototype;return Object.defineProperty(e,"current",{get:function(){var t=(t=nt())[t.length-1];return null!=t&&t.push(this),this._current},set:function(t){this._setCurrent(t)},enumerable:!1,configurable:!0}),e.subscribe=function(t){return this.current,this._emitter.on("update",t),this},e.unsubscribe=function(t){return this._emitter.off("update",t),this},e._setCurrent=function(t){var e=this._current,n=t!==e;this._current=t,n&&this._emitter.trigger("update",t,e)},e.toString=function(){return"".concat(this.current)},e.valueOf=function(){return this.current},t}(),rt=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t){var e=n.call(this)||this;return e._computedCallback=t,e._registered=[],e._onCheckUpdate=function(){e._setCurrent(e.current)},e._current=e.current,e}return et(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i),Object.defineProperty(r.prototype,"current",{get:function(){var e,n,i=this,t=(e=this,t=nt(),r={host:e,observers:n=[],push:function(t){e!==t&&-1===n.indexOf(t)&&n.push(t)}},t.push(r),this._computedCallback()),r=nt().pop();return this._registered.forEach(function(t){t.unsubscribe(i._onCheckUpdate)}),r.observers.forEach(function(t){t.subscribe(i._onCheckUpdate)}),this._registered=r.observers,t},enumerable:!1,configurable:!0}),r}(it);function ot(t,e,n){void 0===n&&(n=e),Object.defineProperty(t,e,{configurable:!0,get:function(){return d(this,n).current},set:function(t){d(this,n,t).current=t}}),n!==e&&Object.defineProperty(t,n,{configurable:!0,get:function(){return d(this,n).current}})}function st(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 1<n.length?ot(n[0],n[1]):function(t,e){return ot(t,e,n[0])}}function at(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return st.apply(void 0,t)}function ut(t){t.subscribe=function(t,e){this[t],d(this,t).subscribe(e)},t.unsubscribe=function(t,e){var n,i=this;if(!t)return n=ht(this),void Object.keys(n).forEach(function(t){i.unsubscribe(t)});t in this&&d(this,t).unsubscribe(e)}}function ct(t){ut(t.prototype)}function ht(e,t){e[J]||(n={},Object.defineProperty(e,J,{get:function(){return n}}));var n,i=e[J];return t||(t=null==(t=null==(t=null==e?void 0:e.constructor)?void 0:t.prototype)?void 0:t[f])&&t.forEach(function(t){!(t in i)&&t in e&&e[t]}),i}function d(t,e,n){t=ht(t);return t[e]||(t[e]=new it(n)),t[e]}function lt(t,e,n){var i=n.get;var n={configurable:!0,get:function(){var t=ht(this,!0);return e in t||(t[e]=(t=i.bind(this),new rt(t))),d(this,e).current}},r=(t[f]||(t[f]=[]),t[f]);return-1===r.indexOf(e)&&r.push(e),Object.defineProperty(t,e,n),n}var ft=function(t,e){return(ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function v(t,e){function n(){this.constructor=t}ft(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p=function(){return(p=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function dt(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function _(t,e){var n,i={};for(n in t)n&&(i[n]=e(t[n],n));return i}function vt(t,e){var n,i={};for(n in t)n&&e(t[n],n)&&(i[n]=t[n]);return i}function pt(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function g(t,n){return pt(t,function(t,e){return t===n[e]})}function _t(t,e){return jt[e]||(jt[e]=kt(e)),jt[e](t)}function gt(t,n){return t&&n?_(t,function(t,e){return _t(t,"number"==typeof n?n:n[e])}):t}function m(t){if(!isFinite(t))return 0;var e="".concat(t);if(0<=e.indexOf("e")){for(var n=0,i=1;Math.round(t*i)/i!==t;)i*=10,n++;return n}return 0<=e.indexOf(".")?e.length-e.indexOf(".")-1:0}function mt(t,e){return t&&e?30:t?6:e?24:1}function y(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}function yt(t,e,n,i){return n=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],i=Math.max(n[0],t),Math.min(n[1],i)}function Et(t,e){return t<e[0]||t>e[1]}function bt(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function E(t,e,n){var i=t,r=e[0],o=(e=e[1])-r;return n[1]&&e<t&&(i=(i-e)%o+r),i=n[0]&&t<r?(i-r)%o+e:i}function xt(t,e){return!!(!e||-1<e.indexOf("any")||-1<e.indexOf("none")&&!t.shiftKey&&!t.ctrlKey&&!t.altKey&&!t.metaKey||-1<e.indexOf("shift")&&t.shiftKey||-1<e.indexOf("ctrl")&&t.ctrlKey||-1<e.indexOf("alt")&&t.altKey||-1<e.indexOf("meta")&&t.metaKey)}function wt(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}var b,x,w,M,Mt,O,P,T,Ot,S="undefined"==typeof window?{navigator:{userAgent:""}}:window,D="left",Pt="right",Tt="middle",St={1:D,2:Tt,3:Pt},Dt="ontouchstart"in S&&"safari"===(void 0===j&&function(){var t;if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData)return(t=(t=navigator.userAgentData).brands||t.uaList)&&t.length}()?(b=((O=navigator.userAgentData).uaList||O.brands).slice(),x=k&&k.fullVersionList,w=O.mobile||!1,M=b[0],Mt=(k&&k.platform||O.platform||navigator.platform).toLowerCase(),O={name:M.brand,version:M.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!t(B,b).brand||H(z())},M={name:"unknown",version:"-1",majorVersion:-1},O.webkit=!O.chromium&&e(r,function(t){return W(b,t)}),P=t(Y,b),O.chromium=!!P.brand,O.chromiumVersion=P.version,O.chromium||(P=t(r,b),O.webkit=!!P.brand,O.webkitVersion=P.version),P=N(a,function(t){return new RegExp(""+t.test,"g").exec(Mt)}),M.name=P?P.id:"",k&&(M.version=k.platformVersion),x&&x.length?(P=t(i,x),O.name=P.brand||O.name,O.version=P.version||O.version):(x=t(i,b),O.name=x.brand||O.name,O.version=x.brand&&k?k.uaFullVersion:x.version),O.webkit&&(M.name=w?"ios":"mac"),"ios"===M.name&&O.webview&&(O.version="-1"),M.version=L(M.version),O.version=L(O.version),M.majorVersion=parseInt(M.version,10),O.majorVersion=parseInt(O.version,10),{browser:O,os:M,isMobile:w,isHints:!0}):(P=z(P=j),k=!!/mobi/g.exec(P),x={name:"unknown",version:"-1",majorVersion:-1,webview:H(P),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},O={name:"unknown",version:"-1",majorVersion:-1},w=(M=n(i,P)).preset,M=M.version,i=(j=n(a,P)).preset,j=j.version,a=n(Y,P),x.chromium=!!a.preset,x.chromiumVersion=a.version,x.chromium||(a=n(r,P),x.webkit=!!a.preset,x.webkitVersion=a.version),i&&(O.name=i.id,O.version=j,O.majorVersion=parseInt(j,10)),w&&(x.name=w.id,x.version=M,x.webview&&"ios"===O.name&&"safari"!==x.name&&(x.webview=!1)),x.majorVersion=parseInt(x.version,10),{browser:x,os:O,isMobile:k,isHints:!1})).browser.name,At=function(){if("undefined"!=typeof document)for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}(),It={"-webkit-user-select":"none","-ms-user-select":"none","-moz-user-select":"none","user-select":"none","-webkit-user-drag":"none"},Ct=function(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e},Rt=function(t,e){var n;return void 0===e&&(e=!1),"string"==typeof t?(n=t.match(/^<([a-z]+)\s*([^>]*)>/)?((n=document.createElement("div")).innerHTML=t,Ct(n.childNodes)):Ct(document.querySelectorAll(t)),e||(n=1<=n.length?n[0]:void 0)):t===S?n=t:"value"in t||"current"in t?n=t.value||t.current:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in S&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return Rt(t)}),e||(n=1<=n.length?n[0]:void 0)):n=t,n},A=S.requestAnimationFrame||S.webkitRequestAnimationFrame,I=S.cancelAnimationFrame||S.webkitCancelAnimationFrame,jt=(A&&!I?(T={},Ot=A,A=function(e){var n=Ot(function(t){T[n]&&e(t)});return T[n]=!0,n},I=function(t){delete T[t]}):A&&I||(A=function(t){return S.setTimeout(function(){t(S.performance&&S.performance.now&&S.performance.now()||(new Date).getTime())},16)},I=S.clearTimeout),{}),kt=function(e){var n=e<1?Math.pow(10,m(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},Vt=function(){function t(t){this._axes=t,this.holdingCount=0}var e=t.prototype;return e.hold=function(t,e){t=this._getRoundPos(t).roundPos;this._axes.trigger(new c("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0}))},e.triggerRelease=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;t.destPos=n,t.depaPos=e,t.setTo=this._createUserControll(t.destPos,t.duration),this._axes.trigger(new c("release",p(p({},t),{bounceRatio:this._getBounceRatio(n)})))},e.triggerChange=function(t,e,n,i){var r=this,o=(void 0===i&&(i=!1),this.animationManager),s=o.axisManager,o=o.getEventInfo(),t=this._getRoundPos(t,e),e=t.roundPos,t=t.roundDepa,a=s.moveTo(e,t),e=(null==n?void 0:n.event)||(null==o?void 0:o.event)||null,t={pos:a.pos,delta:a.delta,bounceRatio:this._getBounceRatio(a.pos),holding:i,inputEvent:e,isTrusted:!!e,input:(null==n?void 0:n.input)||(null==o?void 0:o.input)||null,set:e?this._createUserControll(a.pos):function(){}},i=new c("change",t);return this._axes.trigger(i),Object.keys(a.pos).forEach(function(t){var e=a.pos[t];d(r._axes,t,e).current=e}),e&&s.set(t.set().destPos),!i.isCanceled()},e.triggerAnimationStart=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa,n=(t.destPos=n,t.depaPos=e,t.setTo=this._createUserControll(t.destPos,t.duration),new c("animationStart",t));return this._axes.trigger(n),!n.isCanceled()},e.triggerAnimationEnd=function(t){this._axes.trigger(new c("animationEnd",{isTrusted:t=void 0===t?!1:t}))},e.triggerFinish=function(t){this._axes.trigger(new c("finish",{isTrusted:t=void 0===t?!1:t}))},e.setAnimationManager=function(t){this.animationManager=t},e.destroy=function(){this._axes.off()},e._createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:p({},t),duration:e};return function(t,e){return t&&(n.destPos=p({},t)),void 0!==e&&(n.duration=e),n}},e._getRoundPos=function(t,e){var n=this._axes.options.round;return{roundPos:gt(t,n),roundDepa:gt(e,n)}},e._getBounceRatio=function(t){return this._axes.axisManager.map(t,function(t,e){return t<e.range[0]&&0!==e.bounce[0]?(e.range[0]-t)/e.bounce[0]:t>e.range[1]&&0!==e.bounce[1]?(t-e.range[1])/e.bounce[1]:0})},dt([st],t.prototype,"holdingCount",void 0),t}(),Nt=function(){function t(t){this._options=t,this._prevented=!1}var e=t.prototype;return e.isInterrupting=function(){return this._options.interruptable||this._prevented},e.isInterrupted=function(){return!this._options.interruptable&&this._prevented},e.setInterrupt=function(t){this._options.interruptable||(this._prevented=t)},t}(),zt=function(){function t(t){var n=this;this._axis=t,this._complementOptions(),this._pos=Object.keys(this._axis).reduce(function(t,e){return t[e]=n._axis[e].startPos,t},{})}var e=t.prototype;return e.getDelta=function(t,e){var n=this.get(t);return _(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):p(p({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=_(this._pos,function(t,e){return e in n&&e in i?n[e]-i[e]:0});return this.set(this.map(n,function(t,e){return e?E(t,e.range,e.circular):0})),{pos:p({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,n){var i=this._axis;return pt(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this._axis;return vt(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this._axis;return _(t,function(t,e){return n(t,i[e],e)})},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e){return!Et(t,e.range)})},e.getAxisOptions=function(t){return this._axis[t]},e.setAxis=function(e){var n=this;Object.keys(e).forEach(function(t){if(!n._axis[t])throw new Error("Axis ".concat(t," does not exist in Axes instance"));n._axis[t]=p(p({},n._axis[t]),e[t])}),this._complementOptions()},e._complementOptions=function(){var r=this;Object.keys(this._axis).forEach(function(i){r._axis[i]=p({range:[0,100],startPos:r._axis[i].range[0],bounce:[0,0],circular:[!1,!1]},r._axis[i]),["bounce","circular"].forEach(function(t){var e=r._axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},t}(),Lt="ontouchstart"in S,C="PointerEvent"in S,Y="MSPointerEvent"in S,Wt=C||Y,r=function(){function t(){var e=this;this._stopContextMenu=function(t){t.preventDefault(),S.removeEventListener("contextmenu",e._stopContextMenu)}}var e=t.prototype;return e.extendEvent=function(t){var e=this.prevEvent,n=this._getCenter(t),i=e?this._getMovement(t):{x:0,y:0},r=e?this._getScale(t):1,o=e?(s=n.x-e.center.x,o=n.y-e.center.y,180*Math.atan2(o,s)/Math.PI):0,s=e?e.deltaX+i.x:i.x,a=e?e.deltaY+i.y:i.y,u=i.x,i=i.y,c=this._latestInterval,h=Date.now(),l=c?h-c.timestamp:0,f=e?e.velocityX:0,e=e?e.velocityY:0;return(!c||16<=l)&&(c&&(f=(c=[(s-c.deltaX)/l,(a-c.deltaY)/l])[0],e=c[1]),this._latestInterval={timestamp:h,deltaX:s,deltaY:a}),{srcEvent:t,scale:r,angle:o,center:n,deltaX:s,deltaY:a,offsetX:u,offsetY:i,velocityX:f,velocityY:e,preventSystemEvent:!0}},e._getDistance=function(t,e){var n=e.clientX-t.clientX,e=e.clientY-t.clientY;return Math.sqrt(n*n+e*e)},e._getButton=function(t){var e={1:D,2:Pt,4:Tt},e=this._isTouchEvent(t)?D:e[t.buttons];return e||null},e._isTouchEvent=function(t){return t.type&&-1<t.type.indexOf("touch")},e._isValidButton=function(t,e){return-1<e.indexOf(t)},e._isValidEvent=function(t,e,n){return(!e||xt(t,e))&&(!n||this._isValidButton(this._getButton(t),n))},e._preventMouseButton=function(t,e){e===Pt?S.addEventListener("contextmenu",this._stopContextMenu):e===Tt&&t.preventDefault()},t}(),Yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown"],t.move=["mousemove"],t.end=["mouseup"],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e,n){var i=this._getButton(t);return this._isValidEvent(t,e,n)?(this._preventMouseButton(t,i),this.extendEvent(t)):null},n.onEventMove=function(t,e,n){return this._isValidEvent(t,e,n)?this.extendEvent(t):null},n.onEventEnd=function(){},n.onRelease=function(){this.prevEvent=null},n.getTouches=function(t,e){return e&&this._isValidButton(St[t.which],e)&&-1===this.end.indexOf(t.type)?1:0},n._getScale=function(){return 1},n._getCenter=function(t){return{x:t.clientX,y:t.clientY}},n._getMovement=function(t){var e=this.prevEvent.srcEvent;return{x:t.clientX-e.clientX,y:t.clientY-e.clientY}},t}(r),Bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["touchstart"],t.move=["touchmove"],t.end=["touchend","touchcancel"],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e){return this._baseTouches=t.touches,this._isValidEvent(t,e)?this.extendEvent(t):null},n.onEventMove=function(t,e){return this._isValidEvent(t,e)?this.extendEvent(t):null},n.onEventEnd=function(t){this._baseTouches=t.touches},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t){return t.touches.length},n._getScale=function(t){return 2!==t.touches.length||this._baseTouches.length<2?null:this._getDistance(t.touches[0],t.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1])},n._getCenter=function(t){return{x:t.touches[0].clientX,y:t.touches[0].clientY}},n._getMovement=function(t){var e=this.prevEvent.srcEvent;return t.touches[0].identifier!==e.touches[0].identifier?{x:0,y:0}:{x:t.touches[0].clientX-e.touches[0].clientX,y:t.touches[0].clientY-e.touches[0].clientY}},t}(r),Ht=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=C?["pointerdown"]:["MSPointerDown"],t.move=C?["pointermove"]:["MSPointerMove"],t.end=C?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],t._firstInputs=[],t._recentInputs=[],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e,n){var i=this._getButton(t);return this._isValidEvent(t,e,n)?(this._preventMouseButton(t,i),this._updatePointerEvent(t),this.extendEvent(t)):null},n.onEventMove=function(t,e,n){return this._isValidEvent(t,e,n)?(this._updatePointerEvent(t),this.extendEvent(t)):null},n.onEventEnd=function(t){this._removePointerEvent(t)},n.onRelease=function(){this.prevEvent=null,this._firstInputs=[],this._recentInputs=[]},n.getTouches=function(){return this._recentInputs.length},n._getScale=function(){return 2!==this._recentInputs.length?null:this._getDistance(this._recentInputs[0],this._recentInputs[1])/this._getDistance(this._firstInputs[0],this._firstInputs[1])},n._getCenter=function(t){return{x:t.clientX,y:t.clientY}},n._getMovement=function(t){var e=this.prevEvent.srcEvent;return t.pointerId!==e.pointerId?{x:0,y:0}:{x:t.clientX-e.clientX,y:t.clientY-e.clientY}},n._updatePointerEvent=function(n){var i=this,r=!1;this._recentInputs.forEach(function(t,e){t.pointerId===n.pointerId&&(r=!0,i._recentInputs[e]=n)}),r||(this._firstInputs.push(n),this._recentInputs.push(n))},n._removePointerEvent=function(e){this._firstInputs=this._firstInputs.filter(function(t){return t.pointerId!==e.pointerId}),this._recentInputs=this._recentInputs.filter(function(t){return t.pointerId!==e.pointerId})},t}(r),Xt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown","touchstart"],t.move=["mousemove","touchmove"],t.end=["mouseup","touchend","touchcancel"],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e,n){var i=this._getButton(t);return this._isTouchEvent(t)&&(this._baseTouches=t.touches),this._isValidEvent(t,e,n)?(this._preventMouseButton(t,i),this.extendEvent(t)):null},n.onEventMove=function(t,e,n){return this._isValidEvent(t,e,n)?this.extendEvent(t):null},n.onEventEnd=function(t){this._isTouchEvent(t)&&(this._baseTouches=t.touches)},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t,e){return this._isTouchEvent(t)?t.touches.length:this._isValidButton(St[t.which],e)&&-1===this.end.indexOf(t.type)?1:0},n._getScale=function(t){return this._isTouchEvent(t)?2!==t.touches.length||this._baseTouches.length<2?1:this._getDistance(t.touches[0],t.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1]):this.prevEvent.scale},n._getCenter=function(t){return this._isTouchEvent(t)?{x:t.touches[0].clientX,y:t.touches[0].clientY}:{x:t.clientX,y:t.clientY}},n._getMovement=function(t){var e=this,t=[t,this.prevEvent.srcEvent].map(function(t){return e._isTouchEvent(t)?{id:t.touches[0].identifier,x:t.touches[0].clientX,y:t.touches[0].clientY}:{id:null,x:t.clientX,y:t.clientY}}),n=t[0],t=t[1];return n.id===t.id?{x:n.x-t.x,y:n.y-t.y}:{x:0,y:0}},t}(r);function Ft(t){return-1<t.indexOf("touch")&&{passive:!1}}function Ut(t,e,n){return Math.max(Math.min(t,n),e)}var Kt=function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,r=t.axisManager,t=t.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=e,this._interruptManager=n,this._eventManager=i,this._axisManager=r,this._animationManager=t}var e=t.prototype;return e.get=function(t){return this._axisManager.get(t.axes)},e.hold=function(t,e){!this._interruptManager.isInterrupted()&&t.axes.length&&(this._isStopped=!(e={input:t,event:e}),this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(e),++this._eventManager.holdingCount,this._moveDistance||this._eventManager.hold(this._axisManager.get(),e),this._isOutside=this._axisManager.isOutside(t.axes),this._moveDistance=this._axisManager.get(t.axes))},e.change=function(t,e,n,i){var r,o,s;this._isStopped||!this._interruptManager.isInterrupting()||this._axisManager.every(n,function(t){return 0===t})||((s=e.srcEvent||e).__childrenAxesAlreadyChanged||(r=this._moveDistance||this._axisManager.get(t.axes),o=_(r,function(t,e){return t+(n[e]||0)}),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,function(t,e){var n=e.circular,e=e.range;return n&&(n[0]||n[1])?E(t,e,n):t})),this._isOutside&&this._axisManager.every(r,function(t,e){return!Et(t,e.range)})&&(this._isOutside=!1),r=this._atOutside(r),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(n,r,o)||(s.__childrenAxesAlreadyChanged=!0),s={input:t,event:e},i?(t=this._animationManager.getDuration(o,r),this._animationManager.animateTo(o,t,s)):this._eventManager.triggerChange(o,r,s,!0)||(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))))},e.release=function(t,e,n,i){var r,o,s;!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance&&((s=e.srcEvent||e).__childrenAxesAlreadyReleased&&(n=n.map(function(){return 0})),r=this._axisManager.get(t.axes),o=this._axisManager.get(),n=this._animationManager.getDisplacement(n),n=wt(t.axes,n),n=this._axisManager.get(this._axisManager.map(n,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?r[n]+t:yt(r[n]+t,e.range,e.circular,e.bounce)})),s.__childrenAxesAlreadyReleased=!0,i={depaPos:o,destPos:n=0===(s=this._animationManager.getDuration(n,r,i))?p({},o):n,duration:s,delta:this._axisManager.getDelta(o,n),inputEvent:e,input:t,isTrusted:!0},--this._eventManager.holdingCount,this._eventManager.triggerRelease(i),0===this._eventManager.holdingCount&&(this._moveDistance=null),s=this._animationManager.getUserControl(i),n={input:t,event:e},(i=g(s.destPos,o))||0===s.duration?(i||this._eventManager.triggerChange(s.destPos,o,n,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(n):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(s.destPos,s.duration,n))},e._atOutside=function(t){var o=this;return this._isOutside?this._axisManager.map(t,function(t,e){var n=e.range[0]-e.bounce[0],e=e.range[1]+e.bounce[1];return e<t?e:t<n?n:t}):this._axisManager.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,e=e.circular;return e[0]&&t<n||e[1]&&i<t?t:t<n?n-o._animationManager.interpolate(n-t,r[0]):i<t?i+o._animationManager.interpolate(t-i,r[1]):t})},e._isEndofAxis=function(r,o,s){return this._axisManager.every(o,function(t,e,n){return 0===r[n]||o[n]===s[n]&&(n=t,t=e.range,i=e.bounce,!(e=e.circular)[0]&&n===t[0]-i[0]||!e[1]&&n===t[1]+i[1]);var i})},t}(),qt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._useDuration=!0,t}v(t,e);var n=t.prototype;return n.interpolate=function(t,e){var n=this._easing(1e-5)/1e-5;return this._easing(t/(e*n))*e},n.updateAnimation=function(t){var e,n,i,r,o=this._animateParam;o&&(e=(new Date).getTime()-o.startTime,n=(null==t?void 0:t.destPos)||o.destPos,i=null!=(i=null==t?void 0:t.duration)?i:o.duration,null!=t&&t.restart||i<=e?this.setTo(n,i-e):(null!=t&&t.destPos&&(r=this.axisManager.get(),this._initialEasingPer=this._prevEasingPer,o.delta=this.axisManager.getDelta(r,n),o.destPos=n),null!=t&&t.duration&&(r=(e+this._durationOffset)/o.duration,this._durationOffset=r*i-e,o.duration=i)))},n._initState=function(t){return this._initialEasingPer=0,this._prevEasingPer=0,this._durationOffset=0,{pos:t.depaPos,easingPer:0,finished:!1}},n._getNextState=function(t){var r=this,o=this._animateParam,s=t.pos,a=o.destPos,u=_(s,function(t,e){return t<=a[e]?1:-1}),c=((new Date).getTime()-o.startTime+this._durationOffset)/o.duration,h=this._easing(c);return{pos:this.axisManager.map(s,function(t,e,n){var t=1<=c?a[n]:t+o.delta[n]*(h-r._prevEasingPer)/(1-r._initialEasingPer),i=E(t,e.range,e.circular);return t!==i&&(t=u[n]*(e.range[1]-e.range[0]),a[n]-=t,s[n]-=t),i}),easingPer:this._prevEasingPer=h,finished:1<=h}},n._easing=function(t){return 1<t?1:this._options.easing(t)},t}(function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,t=t.axisManager;this._options=e,this.interruptManager=n,this.eventManager=i,this.axisManager=t,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(n,t,e){var i,r=this;return e=void 0!==e?e:(i=_(t,function(t,e){t=Math.abs(t-n[e]),e=r._options.deceleration;return(t=Math.sqrt(t/e*2))<100?0:t}),Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)),Ut(e,this._options.minimumDuration,this._options.maximumDuration)},e.getDisplacement=function(t){var e=Math.pow(t.reduce(function(t,e){return t+e*e},0),1/t.length),n=Math.abs(e/-this._options.deceleration);return t.map(function(t){return t/2*n})},e.stopAnimation=function(t){var n,e;this._animateParam&&(n=this.axisManager.get(),e=this.axisManager.map(n,function(t,e){return E(t,e.range,e.circular)}),pt(e,function(t,e){return n[e]===t})||this.eventManager.triggerChange(e,n,t,!!t),this._animateParam=null,this._raf&&(e=this._raf,I(e)),this._raf=null,this.eventManager.triggerAnimationEnd(!(null==t||!t.event)))},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.axisManager.get(),n=this.axisManager.map(e,function(t,e){return Math.min(e.range[1],Math.max(e.range[0],t))});this.stopAnimation(),this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo(),e=(this._animateParam=null,this.axisManager.filter(this.axisManager.get(),function(t,e){return bt(t,e.range,e.circular)}));0<Object.keys(e).length&&this.setTo(this.axisManager.map(e,function(t,e){return E(t,e.range,e.circular)})),this.interruptManager.setInterrupt(!1),this.eventManager.triggerAnimationEnd(!!t),this.axisManager.isOutside()?this.restore(t):this.finish(!!t)},e.finish=function(t){this._animateParam=null,this.interruptManager.setInterrupt(!1),this.eventManager.triggerFinish(t)},e.getUserControl=function(t){t=t.setTo();return t.destPos=this.axisManager.get(t.destPos),t.duration=Ut(t.duration,this._options.minimumDuration,this._options.maximumDuration),t},e.animateTo=function(t,e,n){var i=this,t=(this.stopAnimation(),this._createAnimationParam(t,e,n)),e=p({},t.depaPos),r=this.eventManager.triggerAnimationStart(t),t=this.getUserControl(t);!r&&this.axisManager.every(t.destPos,function(t,e){return bt(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),r&&!g(t.destPos,e)&&(r=(null==n?void 0:n.event)||null,this._animateLoop({depaPos:e,destPos:t.destPos,duration:t.duration,delta:this.axisManager.getDelta(e,t.destPos),isTrusted:!!r,inputEvent:r,input:(null==n?void 0:n.input)||null},function(){return i.animationEnd()}))},e.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t),i=this.axisManager.get(n);return g(t,i)||(this.interruptManager.setInterrupt(!0),n=vt(t,function(t,e){return i[e]!==t}),Object.keys(n).length&&(n=this.axisManager.map(n,function(t,e){var n=e.range,e=e.circular;return e&&(e[0]||e[1])?t:yt(t,n,e)}),g(n,i)||(0<e?this.animateTo(n,e):(this.stopAnimation(),this.eventManager.triggerChange(n),this.finish(!1))))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(_(this.axisManager.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},e.setOptions=function(t){this._options=p(p({},this._options),t)},e._createAnimationParam=function(t,e,n){var i=this.axisManager.get(),r=(null==n?void 0:n.event)||null;return{depaPos:i,destPos:t,duration:Ut(e,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,t),inputEvent:r,input:(null==n?void 0:n.input)||null,isTrusted:!!r,done:this.animationEnd}},e._animateLoop=function(t,i){var r,o,s,a=this;t.duration?(this._animateParam=p(p({},t),{startTime:(new Date).getTime()}),r=_(t.destPos,function(t){return t}),o=this._initState(this._animateParam),(s=function(){a._raf=null;var t=a._animateParam,e=a._getNextState(o),n=!a.eventManager.triggerChange(e.pos,o.pos);(o=e).finished?(t.destPos=a._getFinalPos(t.destPos,r),g(t.destPos,a.axisManager.get(Object.keys(t.destPos)))||a.eventManager.triggerChange(t.destPos,e.pos),i()):n?a.finish(!1):a._raf=A(s)})()):(this.eventManager.triggerChange(t.destPos),i())},e._getFinalPos=function(t,n){var i=this;return _(t,function(t,e){return t>=n[e]-1e-6&&t<=n[e]+1e-6?n[e]:(e=i._getRoundUnit(t,e),_t(t,e))})},e._getRoundUnit=function(t,e){var n=this._options.round,i=null;return n||(e=this.axisManager.getAxisOptions(e),e=Math.max(m(e.range[0]),m(e.range[1]),m(t)),i=1/Math.pow(10,e)),i||n},t}()),Qt=function(r){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),void 0===n&&(n={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=p({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null,nested:!1},e),Object.keys(n).forEach(function(t){i.axis[t].startPos=n[t]}),i.interruptManager=new Nt(i.options),i.axisManager=new zt(i.axis),i.eventManager=new Vt(i),i.animationManager=new qt(i),i.inputObserver=new Kt(i),i.eventManager.setAnimationManager(i.animationManager),i.eventManager.triggerChange(i.axisManager.get()),i}v(t,r);var e=t.prototype;return Object.defineProperty(e,"holding",{get:function(){return 0<this.eventManager.holdingCount},enumerable:!1,configurable:!0}),e.connect=function(t,e){t="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),e.mapAxes(t),e.connect(this.inputObserver),this._inputs.push(e),this},e.disconnect=function(t){return t?0<=(t=this._inputs.indexOf(t))&&(this._inputs[t].disconnect(),this._inputs.splice(t,1)):(this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[]),this},e.get=function(t){return this.axisManager.get(t)},e.setTo=function(t,e){return this.animationManager.setTo(t,e=void 0===e?0:e),this},e.setBy=function(t,e){return this.animationManager.setBy(t,e=void 0===e?0:e),this},e.setOptions=function(t){return this.options=p(p({},this.options),t),this.animationManager.setOptions(t),this},e.setAxis=function(t){return this.axisManager.setAxis(t),this},e.stopAnimation=function(){return this.animationManager.stopAnimation(),this.animationManager.finish(!1),this},e.updateAnimation=function(t){return this.animationManager.updateAnimation(t),this},e.isBounceArea=function(t){return this.axisManager.isOutside(t)},e.destroy=function(){this.disconnect(),this.eventManager.destroy()},t.VERSION="3.9.0",t.TRANSFORM=At,t.DIRECTION_NONE=1,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_DOWN=16,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=24,t.DIRECTION_ALL=30,dt([lt],t.prototype,"holding",null),dt([ct],t)}(K),Gt=function(){function t(t,e){var n=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(t){n._dragged&&(t.preventDefault(),t.stopPropagation()),n._dragged=!1},this._voidFunction=function(){},this.element=Rt(t),this.options=p({inputType:["touch","mouse","pointer"],inputKey:["any"],inputButton:[D],scale:[1,1],thresholdAngle:45,threshold:0,preventClickOnDrag:!1,preventDefaultOnDrag:!1,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,touchAction:null},e),this._onPanstart=this._onPanstart.bind(this),this._onPanmove=this._onPanmove.bind(this),this._onPanend=this._onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this._direction=mt(!!t[0],!!t[1]),this.axes=t},e.connect=function(t){var e,n,i,r,o;return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(t),this._originalCssProps=(e=this.element,t=this.options,n=this._direction,r={1:"auto",30:"none",24:"pan-x",6:"pan-y"},o={},e&&e.style&&(t=t.touchAction||r[n],i=p(p({},It),{"touch-action":"none"===e.style["touch-action"]?"none":t}),Object.keys(i).forEach(function(t){o[t]=e.style[t],e.style[t]=i[t]})),o),this},e.disconnect=function(){var e,n,i,r;return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),i=this._originalCssProps,r=!0,Object.keys(It).forEach(function(t){i&&i[t]===It[t]||(r=!1)}),r||(e=this.element,n=this._originalCssProps,e&&e.style&&n&&Object.keys(n).forEach(function(t){e.style[t]=n[t]})),this._direction=1,this},e.destroy=function(){this.disconnect(),this.element=null},e.enable=function(){return this._enabled=!0,this},e.disable=function(){return this._enabled=!1,this},e.isEnabled=function(){return this._enabled},e.release=function(){var t=this._activeEvent,e=t.prevEvent;return t.onRelease(),this._observer.release(this,e,[0,0]),this._detachWindowEvent(t),this},e._onPanstart=function(t){var e=this.options,n=e.inputKey,i=e.inputButton,e=e.preventDefaultOnDrag,r=this._activeEvent,n=r.onEventStart(t,n,i);!n||!this._enabled||1<r.getTouches(t,i)||!1!==n.srcEvent.cancelable&&(t=this.options.iOSEdgeSwipeThreshold,this._dragged=!1,this._isOverThreshold=!1,this._observer.hold(this,n),this._atRightEdge=Dt&&n.center.x>window.innerWidth-t,this._attachWindowEvent(r),e&&"touchstart"!==n.srcEvent.type&&n.srcEvent.preventDefault(),r.prevEvent=n)},e._onPanmove=function(t){var e=this,n=this.options,i=n.iOSEdgeSwipeThreshold,r=n.preventClickOnDrag,o=n.releaseOnScroll,s=n.inputKey,a=n.inputButton,u=n.threshold,n=n.thresholdAngle,c=this._activeEvent,s=c.onEventMove(t,s,a),a=c.getTouches(t,a);if(0===a||o&&s&&!s.srcEvent.cancelable)this._onPanend(t);else if(s&&this._enabled&&!(1<a)){o=function(t,e){if(e<0||90<e)return 1;t=Math.abs(t);return e<t&&t<180-e?24:6}(s.angle,n),t=y(6,this._direction,o),a=y(24,this._direction,o);if(c.prevEvent&&Dt){if(s.center.x<0)return void this.release();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),s.deltaX<-i?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout(function(){return e.release()},100))}n=this._getDistance([s.deltaX,s.deltaY],[t,a]),o=this._getOffset([s.offsetX,s.offsetY],[t,a]),i=o.some(function(t){return 0!==t});i&&(!1!==s.srcEvent.cancelable&&s.srcEvent.preventDefault(),s.srcEvent.stopPropagation()),(s.preventSystemEvent=i)&&(this._isOverThreshold||u<=n)&&(this._dragged=r,this._isOverThreshold=!0,this._observer.change(this,s,wt(this.axes,o))),c.prevEvent=s}},e._onPanend=function(t){var e=this.options.inputButton,n=this._activeEvent;n.onEventEnd(t),this._enabled&&0===n.getTouches(t,e)&&(this._detachWindowEvent(n),clearTimeout(this._rightEdgeTimer),t=n.prevEvent,e=this._isOverThreshold?this._getOffset([Math.abs(t.velocityX)*(t.offsetX<0?-1:1),Math.abs(t.velocityY)*(t.offsetY<0?-1:1)],[y(6,this._direction),y(24,this._direction)]):[0,0],n.onRelease(),this._observer.release(this,t,e))},e._attachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.addEventListener(t,e._onPanmove,Ft(t))}),null!=t&&t.end.forEach(function(t){window.addEventListener(t,e._onPanend,Ft(t))})},e._detachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.removeEventListener(t,e._onPanmove)}),null!=t&&t.end.forEach(function(t){window.removeEventListener(t,e._onPanend)})},e._getOffset=function(t,e){var n=this.options.scale;return[e[0]?t[0]*n[0]:0,e[1]?t[1]*n[1]:0]},e._getDistance=function(t,e){return Math.sqrt(Number(e[0])*Math.pow(t[0],2)+Number(e[1])*Math.pow(t[1],2))},e._attachElementEvent=function(t){var e,n,i,r=this,o=(o=this.options.inputType,i=n=e=!1,(o=void 0===o?[]:o).forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=Lt;break;case"pointer":i=Wt}}),i?new Ht:e&&n?new Xt:e?new Bt:n?new Yt:null),s=this.element;if(o){if(!s)throw new Error("Element to connect input does not exist.");this._observer=t,this._enabled=!0,this._activeEvent=o,s.addEventListener("click",this._preventClickWhenDragged,!0),o.start.forEach(function(t){s.addEventListener(t,r._onPanstart)}),o.move.forEach(function(t){s.addEventListener(t,r._voidFunction)})}},e._detachElementEvent=function(){var e=this,t=this._activeEvent,n=this.element;n&&(n.removeEventListener("click",this._preventClickWhenDragged,!0),null!=t&&t.start.forEach(function(t){n.removeEventListener(t,e._onPanstart)}),null!=t&&t.move.forEach(function(t){n.removeEventListener(t,e._voidFunction)})),this._enabled=!1,this._observer=null},t}(),Zt=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=Rt(t),this.options=p({inputKey:["any"],scale:1,releaseDelay:300,useNormalized:!0,useAnimation:!1},e),this._onWheel=this._onWheel.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this._direction=mt(!!t[1],!!t[0]),this.axes=t},e.connect=function(t){return this._detachEvent(),this._attachEvent(t),this},e.disconnect=function(){return this._detachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.enable=function(){return this._enabled=!0,this},e.disable=function(){return this._enabled=!1,this},e.isEnabled=function(){return this._enabled},e._onWheel=function(t){var e,n=this;this._enabled&&xt(t,this.options.inputKey)&&(0===(e=this._getOffset([t.deltaY,t.deltaX],[y(24,this._direction),y(6,this._direction)]))[0]&&0===e[1]||(t.preventDefault(),this._holding||(this._observer.hold(this,t),this._holding=!0),this._observer.change(this,t,wt(this.axes,e),this.options.useAnimation),clearTimeout(this._timer),this._timer=setTimeout(function(){n._holding&&(n._holding=!1,n._observer.release(n,t,[0]))},this.options.releaseDelay)))},e._getOffset=function(t,e){var n=this.options.scale,i=this.options.useNormalized;return[e[0]&&t[0]?(0<t[0]?-1:1)*(i?1:Math.abs(t[0]))*n:0,e[1]&&t[1]?(0<t[1]?-1:1)*(i?1:Math.abs(t[1]))*n:0]},e._attachEvent=function(t){var e=this.element;if(!e)throw new Error("Element to connect input does not exist.");this._observer=t,e.addEventListener("wheel",this._onWheel),this._enabled=!0},e._detachEvent=function(){this.element&&this.element.removeEventListener("wheel",this._onWheel),this._enabled=!1,this._observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},t}(),Jt=/msie|trident/g.test("undefined"!=typeof window&&(null==(i=null==(a=null===window||void 0===window?void 0:window.navigator)?void 0:a.userAgent)?void 0:i.toLowerCase())||"");function $t(t){return"string"==typeof t}var te,R=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t,e){void 0===e&&(e={});var r=n.call(this)||this;return r._axes=null,r._items=[],r._size=0,r._scrollSize=0,r._scrollTimer=0,r._isWheelScroll=!1,r._isDragScroll=!1,r._isAnimationScroll=!1,r._isReachStart=!0,r._isReachEnd=!1,r._pos=0,r.update=function(){r.updateItems(),r.updateContainer()},r._onScroll=function(t){t&&r._debounceScroll(),r._refreshScroll();var t=r._size,e=r._scrollSize,n=r._pos,i=null!=(i=r._options.boundaryMargin)?i:0;n<=i&&!0!==r.isReachStart?(r._isReachStart=!0,r.trigger("reachStart")):i<n&&!1!==r.isReachStart&&(r._isReachStart=!1,r.trigger("leaveStart")),e-t-n<1+i&&!0!==r.isReachEnd?(r._isReachEnd=!0,r.trigger("reachEnd")):e-t-n<1+i||!1===r.isReachEnd||(r._isReachEnd=!1,r.trigger("leaveEnd"))},r._options=u({horizontal:!0,useDrag:!0,useSideWheel:!1,autoInit:!0,boundaryMargin:0,scrollDebounce:100},e),r._scrollArea=t,r._options.autoInit&&r.init(),r}V(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i);e=r.prototype;return e.findElement=function(t,e){return(null==(t=this.findItem(t,e=void 0===e?{}:e))?void 0:t.element)||null},e.findItem=function(t,e){var i=this._pos,n=this._scrollSize,r=this._size,o=null!=(s=null==(e=void 0===e?{}:e)?void 0:e.hitTest)?s:1,s=function(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}([],this._items,!0),a=s.length,u=i+r,c=e.sibling,h=e.intersection,e={pos:0,size:0},l={pos:n,size:0};if(0<s[0].pos&&s.unshift(e),a&&s[a-1].pos+s[a-1].size<n&&s.push(l),"start"===t){if(i<0)return null;var f,d=(f=s.filter(function(t){var e=t.size,t=t.pos-i,n=t+e;return 0<=t||0<=n&&(h||!e||Math.abs(n)/e>=o)}))[0]===e&&f[1]||f[0]}else if("end"===t){if(n-r<i)return null;d=(f=s.filter(function(t){var e=t.size,t=t.pos+e-u,n=t-e;return t<=0||n<=0&&(h||!e||Math.abs(n)/e>=o)}).reverse())[0]===l&&f[1]||f[0]}else if("prev"===t)d=s.filter(function(t){var e=t.size,t=t.pos+e-i,n=t-e;return t<=0||n<=0&&(h||!e||Math.abs(n)/e>=o)}).reverse()[0];else{if("next"!==t)return this._getItem(t);d=s.filter(function(t){var e=t.size,t=t.pos-u,n=t+e;return 0<=t||0<=n&&(h||!e||Math.abs(n)/e>=o)})[0]}return c&&d&&(-1<(a=s.indexOf(d))&&(d=s[a+c])),d||null},e.scrollIntoView=function(t,e){if(r=this.findItem(t,e=void 0===e?{}:e)){var n=e.duration||0,i=this._getNextScrollPos(r,e);if($t(t)&&e.excludeStand&&i===this._pos){var r,o=this._items.indexOf(r);if(-1===o)return;if(!(r=this._items[o+("start"===t||"prev"===t?-1:1)]))return;i=this._getNextScrollPos(r,e)}this.scrollBy(i-this._pos,n)}},e.scrollBy=function(t,e){this._axes.setBy({scroll:-t},e=void 0===e?0:e)},e.scrollTo=function(t,e){this._axes.setBy({scroll:this._pos-t},e=void 0===e?0:e)},e.setItems=function(t){this._items=t},e.updateItems=function(){var e=this,t=this._scrollAreaElement,n=this._options.itemSelector,n=[].slice.call(n?t.querySelectorAll(n):t.children);this.setItems(n.map(function(t){return e._getItem(t)}))},e.updateContainer=function(){var t,e,n=this._scrollAreaElement,i=this._options.horizontal,r=i?n.clientWidth:n.clientHeight,o=i?n.scrollWidth:n.scrollHeight;Jt&&o===r+1&&(t=(n=getComputedStyle(n)).boxSizing,e=i?(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0):(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),r<(i=(parseFloat(i?n.width:n.height)||0)-("border-box"===t?e:0))&&i<r+1&&(o=r)),this._size=r,this._scrollSize=o,this._refreshScroll(),this._onScroll()},e.init=function(){var t,e,n,i,r,o,s,a=this;this._axes||($t(t=this._scrollArea)?e=document.querySelector(t):(o=t)instanceof Element||o instanceof Node?e=t:("value"in t||"current"in t)&&(e=t.value||t.current),e&&(this._scrollAreaElement=e,n=!1,i=this._scrollAreaElement,r=this._options,o=new Qt({scroll:{range:[-1/0,1/0]}},{deceleration:.005,round:1,nested:r.nested},{scroll:0}),s=!1,o.on({hold:function(t){n=!(s=!0);t=a._getNativeEvent(t);t&&r.preventDefault&&t.preventDefault()},change:function(t){var e=a._getNativeEvent(t);r.useSideWheel&&a._isMixedWheel(e)||(a._isWheelScroll=!!e&&"wheel"===e.type,a._isDragScroll=!!e&&!a._isWheelScroll,a._isAnimationScroll=!a._isWheelScroll&&!s,n=!0,t=t.delta.scroll,r.horizontal?i.scrollLeft-=t:i.scrollTop-=t,r.nested&&a._checkNestedMove(e))},release:function(t){n||t.setTo(u({},t.depaPos),0),n=s=!1}}),this._axes=o,r.useDrag&&o.connect(r.horizontal?["scroll",""]:["","scroll"],new Gt(i,{preventClickOnDrag:r.preventClickOnDrag,preventDefaultOnDrag:r.preventDefaultOnDrag,inputType:["mouse"],touchAction:"auto"})),r.useSideWheel&&o.connect(r.horizontal?["scroll",""]:["","scroll"],new Zt(i,{useNormalized:!1})),i.addEventListener("scroll",this._onScroll),window.addEventListener("resize",this.update),this.update()))},e.destroy=function(){var t;null!=(t=this._axes)&&t.destroy(),this.unsubscribe(),null!=(t=this._scrollAreaElement)&&t.removeEventListener("scroll",this._onScroll),"undefined"!=typeof window&&window.removeEventListener("resize",this.update),this.off(),this._axes=null},e._refreshScroll=function(){var t=this._options.horizontal,e=this._scrollAreaElement;this._pos=Math.min(this._scrollSize-this._size,t?e.scrollLeft:e.scrollTop)},e._getItem=function(t){var e=this._options.horizontal;return{element:t,pos:e?t.offsetLeft:t.offsetTop,size:e?t.offsetWidth:t.offsetHeight}},e._getNativeEvent=function(t){var e;return null!=(e=null==t?void 0:t.inputEvent)&&e.srcEvent?null==(e=t.inputEvent)?void 0:e.srcEvent:null==t?void 0:t.inputEvent},e._getNextScrollPos=function(t,e){var n=this._size,i=this._scrollSize,r=e.align||"start",e=e.offset||0,o=t.pos,t=t.size,s=0;return"start"===r?s=o-e:"end"===r?s=o+t-n+e:"center"===r&&(s=o+t/2-n/2+e),s=Math.max(0,Math.min(s,i-n))},e._isMixedWheel=function(t){return!!t&&"wheel"===(null==t?void 0:t.type)&&(null==t?void 0:t.deltaX)&&(null==t?void 0:t.deltaY)},e._checkNestedMove=function(t){(this.isReachStart||this.isReachEnd)&&(t.__childrenAxesAlreadyChanged=!1)},e._debounceScroll=function(){var i=this;this._scrollTimer||this.trigger("beginScroll"),window.clearTimeout(this._scrollTimer),this._scrollTimer=window.setTimeout(function(){var t=i._isWheelScroll,e=i._isDragScroll,n=i._isAnimationScroll;i._scrollTimer=0,i.trigger("finishScroll",{isWheelScroll:t,isDragScroll:e,isAnimationScroll:n,isTrusted:t||e||!n}),i._isWheelScroll=!1,i._isDragScroll=!1,i._isAnimationScroll=!1},this._options.scrollDebounce)},o([at("isReachStart")],r.prototype,"_isReachStart",void 0),o([at("isReachEnd")],r.prototype,"_isReachEnd",void 0),o([at("scrollPos")],r.prototype,"_pos",void 0),o([ct],r)}(K),j=["update","findElement","findItem","scrollBy","scrollTo","scrollIntoView","setItems","updateContainer","updateItems","init"],k=["reachStart","reachEnd","leaveStart","leaveEnd","beginScroll","finishScroll"],ee={__proto__:null,default:R,CONVEYER_METHODS:j,CONVEYER_EVENTS:k,REACTIVE_CONVEYER:{methods:j,events:k,created:function(t){return new R(t.container,u(u({},t.props),{autoInit:!1}))},init:function(t,e){!1!==e.props.autoInit&&t.init()},on:function(t,e,n){t.on(e,n)},off:function(t,e,n){t.off(e,n)},destroy:function(t){t.destroy()}}};for(te in ee)R[te]=ee[te];return R}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Conveyer=e()}(this,function(){"use strict";var V=function(t,e){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var u=function(){return(u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function o(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function e(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function N(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function z(t){if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}function s(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function L(t){return t.replace(/_/g,".")}function n(t,n){var i=null,r="-1";return e(t,function(t){var e=s("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);if(e&&!t.brand)return i=t,r=e[3]||"-1",t.versionAlias?r=t.versionAlias:t.versionTest&&(e=t.versionTest.toLowerCase(),r=((e=s("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n))?e[3]:"")||r),r=L(r),1}),{preset:i,version:r}}function t(t,n){var i={brand:"",version:"-1"};return e(t,function(t){var e=W(n,t);return e&&(i.brand=t.id,i.version=t.versionAlias||e.version,"-1"!==i.version)}),i}function W(t,e){return N(t,function(t){t=t.brand;return s(""+e.test,t.toLowerCase())})}var i=[{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"}],Y=[{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:!0}],r=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],B=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],a=[{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 H(t){return!!n(B,t).preset}function X(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function F(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function h(t){return void 0===t}var U=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=X(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=t}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),K=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof U?e.eventType:e,i=F(this._eventHandler[i]||[]);return i.length<=0||(e instanceof U?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,F(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&h(i)){var t,e=n;for(t in e)this.once(t,e[t])}else"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,F(t)),o.off(n,r)},this.on(n,r));return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&h(e)){var n,i=t;for(n in i)this.on(n,i[n])}else{var r;"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],h(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e))}return this},e.off=function(t,e){var n,i;if(h(t))return this._eventHandler={},this;if(h(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r])}else{var s=this._eventHandler[t];if(s){var a=0;try{for(var u=X(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}return this},t.VERSION="3.0.2",t}(),c=U;function q(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Q(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function l(t){return void 0===t}var G=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=q(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=t}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),Z=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof G?e.eventType:e,i=Q(this._eventHandler[i]||[]);return i.length<=0||(e instanceof G?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,Q(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&l(i)){var t,e=n;for(t in e)this.once(t,e[t])}else"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,Q(t)),o.off(n,r)},this.on(n,r));return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&l(e)){var n,i=t;for(n in i)this.on(n,i[n])}else{var r;"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],l(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e))}return this},e.off=function(t,e){var n,i;if(l(t))return this._eventHandler={},this;if(l(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r])}else{var s=this._eventHandler[t];if(s){var a=0;try{for(var u=q(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}}return this},t.VERSION="3.0.4",t}();var J="__observers__",f="__computed__",$=1,tt="__CFCS_DETECTED_DEPENDENCIES__",et=function(t,e){return(et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function nt(){Object[tt]=Object[tt]||{};var t=Object[tt];return t[$]=t[$]||[],t[$]}var it=function(){function t(t){this._emitter=new Z,this._current=t}var e=t.prototype;return Object.defineProperty(e,"current",{get:function(){var t=(t=nt())[t.length-1];return null!=t&&t.push(this),this._current},set:function(t){this._setCurrent(t)},enumerable:!1,configurable:!0}),e.subscribe=function(t){return this.current,this._emitter.on("update",t),this},e.unsubscribe=function(t){return this._emitter.off("update",t),this},e._setCurrent=function(t){var e=this._current,n=t!==e;this._current=t,n&&this._emitter.trigger("update",t,e)},e.toString=function(){return"".concat(this.current)},e.valueOf=function(){return this.current},t}(),rt=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t){var e=n.call(this)||this;return e._computedCallback=t,e._registered=[],e._onCheckUpdate=function(){e._setCurrent(e.current)},e._current=e.current,e}return et(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i),Object.defineProperty(r.prototype,"current",{get:function(){var e,n,i=this,t=(e=this,t=nt(),r={host:e,observers:n=[],push:function(t){e!==t&&-1===n.indexOf(t)&&n.push(t)}},t.push(r),this._computedCallback()),r=nt().pop();return this._registered.forEach(function(t){t.unsubscribe(i._onCheckUpdate)}),r.observers.forEach(function(t){t.subscribe(i._onCheckUpdate)}),this._registered=r.observers,t},enumerable:!1,configurable:!0}),r}(it);function ot(t,e,n){void 0===n&&(n=e),Object.defineProperty(t,e,{configurable:!0,get:function(){return d(this,n).current},set:function(t){d(this,n,t).current=t}}),n!==e&&Object.defineProperty(t,n,{configurable:!0,get:function(){return d(this,n).current}})}function st(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return 1<n.length?ot(n[0],n[1]):function(t,e){return ot(t,e,n[0])}}function at(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return st.apply(void 0,t)}function ut(t){t.subscribe=function(t,e){this[t],d(this,t).subscribe(e)},t.unsubscribe=function(t,e){var n,i=this;if(!t)return n=ht(this),void Object.keys(n).forEach(function(t){i.unsubscribe(t)});t in this&&d(this,t).unsubscribe(e)}}function ct(t){ut(t.prototype)}function ht(e,t){e[J]||(n={},Object.defineProperty(e,J,{get:function(){return n}}));var n,i=e[J];return t||(t=null==(t=null==(t=null==e?void 0:e.constructor)?void 0:t.prototype)?void 0:t[f])&&t.forEach(function(t){!(t in i)&&t in e&&e[t]}),i}function d(t,e,n){t=ht(t);return t[e]||(t[e]=new it(n)),t[e]}function lt(t,e,n){var i=n.get;var n={configurable:!0,get:function(){var t=ht(this,!0);return e in t||(t[e]=(t=i.bind(this),new rt(t))),d(this,e).current}},r=(t[f]||(t[f]=[]),t[f]);return-1===r.indexOf(e)&&r.push(e),Object.defineProperty(t,e,n),n}var ft=function(t,e){return(ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function v(t,e){function n(){this.constructor=t}ft(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p=function(){return(p=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function dt(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function _(t,e){var n,i={};for(n in t)n&&(i[n]=e(t[n],n));return i}function vt(t,e){var n,i={};for(n in t)n&&e(t[n],n)&&(i[n]=t[n]);return i}function pt(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function g(t,n){return pt(t,function(t,e){return t===n[e]})}function _t(t,e){return jt[e]||(jt[e]=kt(e)),jt[e](t)}function gt(t,n){return t&&n?_(t,function(t,e){return _t(t,"number"==typeof n?n:n[e])}):t}function m(t){if(!isFinite(t))return 0;var e="".concat(t);if(0<=e.indexOf("e")){for(var n=0,i=1;Math.round(t*i)/i!==t;)i*=10,n++;return n}return 0<=e.indexOf(".")?e.length-e.indexOf(".")-1:0}function mt(t,e){return t&&e?30:t?6:e?24:1}function y(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}function yt(t,e,n,i){return n=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],i=Math.max(n[0],t),Math.min(n[1],i)}function Et(t,e){return t<e[0]||t>e[1]}function bt(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function E(t,e,n){var i=t,r=e[0],o=(e=e[1])-r;return n[1]&&e<t&&(i=(i-e)%o+r),i=n[0]&&t<r?(i-r)%o+e:i}function xt(t,e){return!!(!e||-1<e.indexOf("any")||-1<e.indexOf("none")&&!t.shiftKey&&!t.ctrlKey&&!t.altKey&&!t.metaKey||-1<e.indexOf("shift")&&t.shiftKey||-1<e.indexOf("ctrl")&&t.ctrlKey||-1<e.indexOf("alt")&&t.altKey||-1<e.indexOf("meta")&&t.metaKey)}function wt(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}var b,x,w,M,Mt,O,P,T,Ot,S="undefined"==typeof window?{navigator:{userAgent:""}}:window,D="left",Pt="right",Tt="middle",St={1:D,2:Tt,3:Pt},Dt="ontouchstart"in S&&"safari"===(void 0===j&&function(){var t;if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData)return(t=(t=navigator.userAgentData).brands||t.uaList)&&t.length}()?(b=((O=navigator.userAgentData).uaList||O.brands).slice(),x=k&&k.fullVersionList,w=O.mobile||!1,M=b[0],Mt=(k&&k.platform||O.platform||navigator.platform).toLowerCase(),O={name:M.brand,version:M.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!t(B,b).brand||H(z())},M={name:"unknown",version:"-1",majorVersion:-1},O.webkit=!O.chromium&&e(r,function(t){return W(b,t)}),P=t(Y,b),O.chromium=!!P.brand,O.chromiumVersion=P.version,O.chromium||(P=t(r,b),O.webkit=!!P.brand,O.webkitVersion=P.version),P=N(a,function(t){return new RegExp(""+t.test,"g").exec(Mt)}),M.name=P?P.id:"",k&&(M.version=k.platformVersion),x&&x.length?(P=t(i,x),O.name=P.brand||O.name,O.version=P.version||O.version):(x=t(i,b),O.name=x.brand||O.name,O.version=x.brand&&k?k.uaFullVersion:x.version),O.webkit&&(M.name=w?"ios":"mac"),"ios"===M.name&&O.webview&&(O.version="-1"),M.version=L(M.version),O.version=L(O.version),M.majorVersion=parseInt(M.version,10),O.majorVersion=parseInt(O.version,10),{browser:O,os:M,isMobile:w,isHints:!0}):(P=z(P=j),k=!!/mobi/g.exec(P),x={name:"unknown",version:"-1",majorVersion:-1,webview:H(P),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},O={name:"unknown",version:"-1",majorVersion:-1},w=(M=n(i,P)).preset,M=M.version,i=(j=n(a,P)).preset,j=j.version,a=n(Y,P),x.chromium=!!a.preset,x.chromiumVersion=a.version,x.chromium||(a=n(r,P),x.webkit=!!a.preset,x.webkitVersion=a.version),i&&(O.name=i.id,O.version=j,O.majorVersion=parseInt(j,10)),w&&(x.name=w.id,x.version=M,x.webview&&"ios"===O.name&&"safari"!==x.name&&(x.webview=!1)),x.majorVersion=parseInt(x.version,10),{browser:x,os:O,isMobile:k,isHints:!1})).browser.name,At=function(){if("undefined"!=typeof document)for(var t=(document.head||document.getElementsByTagName("head")[0]).style,e=["transform","webkitTransform","msTransform","mozTransform"],n=0,i=e.length;n<i;n++)if(e[n]in t)return e[n];return""}(),It={"-webkit-user-select":"none","-ms-user-select":"none","-moz-user-select":"none","user-select":"none","-webkit-user-drag":"none"},Ct=function(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e},Rt=function(t,e){var n;return void 0===e&&(e=!1),"string"==typeof t?(n=t.match(/^<([a-z]+)\s*([^>]*)>/)?((n=document.createElement("div")).innerHTML=t,Ct(n.childNodes)):Ct(document.querySelectorAll(t)),e||(n=1<=n.length?n[0]:void 0)):t===S?n=t:"value"in t||"current"in t?n=t.value||t.current:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in S&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return Rt(t)}),e||(n=1<=n.length?n[0]:void 0)):n=t,n},A=S.requestAnimationFrame||S.webkitRequestAnimationFrame,I=S.cancelAnimationFrame||S.webkitCancelAnimationFrame,jt=(A&&!I?(T={},Ot=A,A=function(e){var n=Ot(function(t){T[n]&&e(t)});return T[n]=!0,n},I=function(t){delete T[t]}):A&&I||(A=function(t){return S.setTimeout(function(){t(S.performance&&S.performance.now&&S.performance.now()||(new Date).getTime())},16)},I=S.clearTimeout),{}),kt=function(e){var n=e<1?Math.pow(10,m(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},Vt=function(){function t(t){this._axes=t,this.holdingCount=0}var e=t.prototype;return e.hold=function(t,e){t=this._getRoundPos(t).roundPos;this._axes.trigger(new c("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0}))},e.triggerRelease=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;t.destPos=n,t.depaPos=e,t.setTo=this._createUserControll(t.destPos,t.duration),this._axes.trigger(new c("release",p(p({},t),{bounceRatio:this._getBounceRatio(n)})))},e.triggerChange=function(t,e,n,i){var r=this,o=(void 0===i&&(i=!1),this.animationManager),s=o.axisManager,o=o.getEventInfo(),t=this._getRoundPos(t,e),e=t.roundPos,t=t.roundDepa,a=s.moveTo(e,t),e=(null==n?void 0:n.event)||(null==o?void 0:o.event)||null,t={pos:a.pos,delta:a.delta,bounceRatio:this._getBounceRatio(a.pos),holding:i,inputEvent:e,isTrusted:!!e,input:(null==n?void 0:n.input)||(null==o?void 0:o.input)||null,set:e?this._createUserControll(a.pos):function(){}},i=new c("change",t);return this._axes.trigger(i),Object.keys(a.pos).forEach(function(t){var e=a.pos[t];d(r._axes,t,e).current=e}),e&&s.set(t.set().destPos),!i.isCanceled()},e.triggerAnimationStart=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa,n=(t.destPos=n,t.depaPos=e,t.setTo=this._createUserControll(t.destPos,t.duration),new c("animationStart",t));return this._axes.trigger(n),!n.isCanceled()},e.triggerAnimationEnd=function(t){this._axes.trigger(new c("animationEnd",{isTrusted:t=void 0===t?!1:t}))},e.triggerFinish=function(t){this._axes.trigger(new c("finish",{isTrusted:t=void 0===t?!1:t}))},e.setAnimationManager=function(t){this.animationManager=t},e.destroy=function(){this._axes.off()},e._createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:p({},t),duration:e};return function(t,e){return t&&(n.destPos=p({},t)),void 0!==e&&(n.duration=e),n}},e._getRoundPos=function(t,e){var n=this._axes.options.round;return{roundPos:gt(t,n),roundDepa:gt(e,n)}},e._getBounceRatio=function(t){return this._axes.axisManager.map(t,function(t,e){return t<e.range[0]&&0!==e.bounce[0]?(e.range[0]-t)/e.bounce[0]:t>e.range[1]&&0!==e.bounce[1]?(t-e.range[1])/e.bounce[1]:0})},dt([st],t.prototype,"holdingCount",void 0),t}(),Nt=function(){function t(t){this._options=t,this._prevented=!1}var e=t.prototype;return e.isInterrupting=function(){return this._options.interruptable||this._prevented},e.isInterrupted=function(){return!this._options.interruptable&&this._prevented},e.setInterrupt=function(t){this._options.interruptable||(this._prevented=t)},t}(),zt=function(){function t(t){var n=this;this._axis=t,this._complementOptions(),this._pos=Object.keys(this._axis).reduce(function(t,e){return t[e]=n._axis[e].startPos,t},{})}var e=t.prototype;return e.getDelta=function(t,e){var n=this.get(t);return _(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):p(p({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=_(this._pos,function(t,e){return e in n&&e in i?n[e]-i[e]:0});return this.set(this.map(n,function(t,e){return e?E(t,e.range,e.circular):0})),{pos:p({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,n){var i=this._axis;return pt(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this._axis;return vt(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this._axis;return _(t,function(t,e){return n(t,i[e],e)})},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e){return!Et(t,e.range)})},e.getAxisOptions=function(t){return this._axis[t]},e.setAxis=function(e){var n=this;Object.keys(e).forEach(function(t){if(!n._axis[t])throw new Error("Axis ".concat(t," does not exist in Axes instance"));n._axis[t]=p(p({},n._axis[t]),e[t])}),this._complementOptions()},e._complementOptions=function(){var r=this;Object.keys(this._axis).forEach(function(i){r._axis[i]=p({range:[0,100],startPos:r._axis[i].range[0],bounce:[0,0],circular:[!1,!1]},r._axis[i]),["bounce","circular"].forEach(function(t){var e=r._axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},t}(),Lt="ontouchstart"in S,C="PointerEvent"in S,Y="MSPointerEvent"in S,Wt=C||Y,r=function(){function t(){var e=this;this._stopContextMenu=function(t){t.preventDefault(),S.removeEventListener("contextmenu",e._stopContextMenu)}}var e=t.prototype;return e.extendEvent=function(t){var e=this.prevEvent,n=this._getCenter(t),i=e?this._getMovement(t):{x:0,y:0},r=e?this._getScale(t):1,o=e?(s=n.x-e.center.x,o=n.y-e.center.y,180*Math.atan2(o,s)/Math.PI):0,s=e?e.deltaX+i.x:i.x,a=e?e.deltaY+i.y:i.y,u=i.x,i=i.y,c=this._latestInterval,h=Date.now(),l=c?h-c.timestamp:0,f=e?e.velocityX:0,e=e?e.velocityY:0;return(!c||16<=l)&&(c&&(f=(c=[(s-c.deltaX)/l,(a-c.deltaY)/l])[0],e=c[1]),this._latestInterval={timestamp:h,deltaX:s,deltaY:a}),{srcEvent:t,scale:r,angle:o,center:n,deltaX:s,deltaY:a,offsetX:u,offsetY:i,velocityX:f,velocityY:e,preventSystemEvent:!0}},e._getDistance=function(t,e){var n=e.clientX-t.clientX,e=e.clientY-t.clientY;return Math.sqrt(n*n+e*e)},e._getButton=function(t){var e={1:D,2:Pt,4:Tt},e=this._isTouchEvent(t)?D:e[t.buttons];return e||null},e._isTouchEvent=function(t){return t.type&&-1<t.type.indexOf("touch")},e._isValidButton=function(t,e){return-1<e.indexOf(t)},e._isValidEvent=function(t,e,n){return(!e||xt(t,e))&&(!n||this._isValidButton(this._getButton(t),n))},e._preventMouseButton=function(t,e){e===Pt?S.addEventListener("contextmenu",this._stopContextMenu):e===Tt&&t.preventDefault()},t}(),Yt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown"],t.move=["mousemove"],t.end=["mouseup"],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e,n){var i=this._getButton(t);return this._isValidEvent(t,e,n)?(this._preventMouseButton(t,i),this.extendEvent(t)):null},n.onEventMove=function(t,e,n){return this._isValidEvent(t,e,n)?this.extendEvent(t):null},n.onEventEnd=function(){},n.onRelease=function(){this.prevEvent=null},n.getTouches=function(t,e){return e&&this._isValidButton(St[t.which],e)&&-1===this.end.indexOf(t.type)?1:0},n._getScale=function(){return 1},n._getCenter=function(t){return{x:t.clientX,y:t.clientY}},n._getMovement=function(t){var e=this.prevEvent.srcEvent;return{x:t.clientX-e.clientX,y:t.clientY-e.clientY}},t}(r),Bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["touchstart"],t.move=["touchmove"],t.end=["touchend","touchcancel"],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e){return this._baseTouches=t.touches,this._isValidEvent(t,e)?this.extendEvent(t):null},n.onEventMove=function(t,e){return this._isValidEvent(t,e)?this.extendEvent(t):null},n.onEventEnd=function(t){this._baseTouches=t.touches},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t){return t.touches.length},n._getScale=function(t){return 2!==t.touches.length||this._baseTouches.length<2?null:this._getDistance(t.touches[0],t.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1])},n._getCenter=function(t){return{x:t.touches[0].clientX,y:t.touches[0].clientY}},n._getMovement=function(t){var e=this.prevEvent.srcEvent;return t.touches[0].identifier!==e.touches[0].identifier?{x:0,y:0}:{x:t.touches[0].clientX-e.touches[0].clientX,y:t.touches[0].clientY-e.touches[0].clientY}},t}(r),Ht=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=C?["pointerdown"]:["MSPointerDown"],t.move=C?["pointermove"]:["MSPointerMove"],t.end=C?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],t._firstInputs=[],t._recentInputs=[],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e,n){var i=this._getButton(t);return this._isValidEvent(t,e,n)?(this._preventMouseButton(t,i),this._updatePointerEvent(t),this.extendEvent(t)):null},n.onEventMove=function(t,e,n){return this._isValidEvent(t,e,n)?(this._updatePointerEvent(t),this.extendEvent(t)):null},n.onEventEnd=function(t){this._removePointerEvent(t)},n.onRelease=function(){this.prevEvent=null,this._firstInputs=[],this._recentInputs=[]},n.getTouches=function(){return this._recentInputs.length},n._getScale=function(){return 2!==this._recentInputs.length?null:this._getDistance(this._recentInputs[0],this._recentInputs[1])/this._getDistance(this._firstInputs[0],this._firstInputs[1])},n._getCenter=function(t){return{x:t.clientX,y:t.clientY}},n._getMovement=function(t){var e=this.prevEvent.srcEvent;return t.pointerId!==e.pointerId?{x:0,y:0}:{x:t.clientX-e.clientX,y:t.clientY-e.clientY}},n._updatePointerEvent=function(n){var i=this,r=!1;this._recentInputs.forEach(function(t,e){t.pointerId===n.pointerId&&(r=!0,i._recentInputs[e]=n)}),r||(this._firstInputs.push(n),this._recentInputs.push(n))},n._removePointerEvent=function(e){this._firstInputs=this._firstInputs.filter(function(t){return t.pointerId!==e.pointerId}),this._recentInputs=this._recentInputs.filter(function(t){return t.pointerId!==e.pointerId})},t}(r),Xt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown","touchstart"],t.move=["mousemove","touchmove"],t.end=["mouseup","touchend","touchcancel"],t}v(t,e);var n=t.prototype;return n.onEventStart=function(t,e,n){var i=this._getButton(t);return this._isTouchEvent(t)&&(this._baseTouches=t.touches),this._isValidEvent(t,e,n)?(this._preventMouseButton(t,i),this.extendEvent(t)):null},n.onEventMove=function(t,e,n){return this._isValidEvent(t,e,n)?this.extendEvent(t):null},n.onEventEnd=function(t){this._isTouchEvent(t)&&(this._baseTouches=t.touches)},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t,e){return this._isTouchEvent(t)?t.touches.length:this._isValidButton(St[t.which],e)&&-1===this.end.indexOf(t.type)?1:0},n._getScale=function(t){return this._isTouchEvent(t)?2!==t.touches.length||this._baseTouches.length<2?1:this._getDistance(t.touches[0],t.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1]):this.prevEvent.scale},n._getCenter=function(t){return this._isTouchEvent(t)?{x:t.touches[0].clientX,y:t.touches[0].clientY}:{x:t.clientX,y:t.clientY}},n._getMovement=function(t){var e=this,t=[t,this.prevEvent.srcEvent].map(function(t){return e._isTouchEvent(t)?{id:t.touches[0].identifier,x:t.touches[0].clientX,y:t.touches[0].clientY}:{id:null,x:t.clientX,y:t.clientY}}),n=t[0],t=t[1];return n.id===t.id?{x:n.x-t.x,y:n.y-t.y}:{x:0,y:0}},t}(r);function Ft(t){return-1<t.indexOf("touch")&&{passive:!1}}function Ut(t,e,n){return Math.max(Math.min(t,n),e)}var Kt=function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,r=t.axisManager,t=t.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=e,this._interruptManager=n,this._eventManager=i,this._axisManager=r,this._animationManager=t}var e=t.prototype;return e.get=function(t){return this._axisManager.get(t.axes)},e.hold=function(t,e){!this._interruptManager.isInterrupted()&&t.axes.length&&(this._isStopped=!(e={input:t,event:e}),this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(e),++this._eventManager.holdingCount,this._moveDistance||this._eventManager.hold(this._axisManager.get(),e),this._isOutside=this._axisManager.isOutside(t.axes),this._moveDistance=this._axisManager.get(t.axes))},e.change=function(t,e,n,i){var r,o,s;this._isStopped||!this._interruptManager.isInterrupting()||this._axisManager.every(n,function(t){return 0===t})||((s=e.srcEvent||e).__childrenAxesAlreadyChanged||(r=this._moveDistance||this._axisManager.get(t.axes),o=_(r,function(t,e){return t+(n[e]||0)}),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,function(t,e){var n=e.circular,e=e.range;return n&&(n[0]||n[1])?E(t,e,n):t})),this._isOutside&&this._axisManager.every(r,function(t,e){return!Et(t,e.range)})&&(this._isOutside=!1),r=this._atOutside(r),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(n,r,o)||(s.__childrenAxesAlreadyChanged=!0),s={input:t,event:e},i?(t=this._animationManager.getDuration(o,r),this._animationManager.animateTo(o,t,s)):this._eventManager.triggerChange(o,r,s,!0)||(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))))},e.release=function(t,e,n,i){var r,o,s;!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance&&((s=e.srcEvent||e).__childrenAxesAlreadyReleased&&(n=n.map(function(){return 0})),r=this._axisManager.get(t.axes),o=this._axisManager.get(),n=this._animationManager.getDisplacement(n),n=wt(t.axes,n),n=this._axisManager.get(this._axisManager.map(n,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?r[n]+t:yt(r[n]+t,e.range,e.circular,e.bounce)})),s.__childrenAxesAlreadyReleased=!0,i={depaPos:o,destPos:n=0===(s=this._animationManager.getDuration(n,r,i))?p({},o):n,duration:s,delta:this._axisManager.getDelta(o,n),inputEvent:e,input:t,isTrusted:!0},--this._eventManager.holdingCount,this._eventManager.triggerRelease(i),0===this._eventManager.holdingCount&&(this._moveDistance=null),s=this._animationManager.getUserControl(i),n={input:t,event:e},(i=g(s.destPos,o))||0===s.duration?(i||this._eventManager.triggerChange(s.destPos,o,n,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(n):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(s.destPos,s.duration,n))},e._atOutside=function(t){var o=this;return this._isOutside?this._axisManager.map(t,function(t,e){var n=e.range[0]-e.bounce[0],e=e.range[1]+e.bounce[1];return e<t?e:t<n?n:t}):this._axisManager.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,e=e.circular;return e[0]&&t<n||e[1]&&i<t?t:t<n?n-o._animationManager.interpolate(n-t,r[0]):i<t?i+o._animationManager.interpolate(t-i,r[1]):t})},e._isEndofAxis=function(r,o,s){return this._axisManager.every(o,function(t,e,n){return 0===r[n]||o[n]===s[n]&&(n=t,t=e.range,i=e.bounce,!(e=e.circular)[0]&&n===t[0]-i[0]||!e[1]&&n===t[1]+i[1]);var i})},t}(),qt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._useDuration=!0,t}v(t,e);var n=t.prototype;return n.interpolate=function(t,e){var n=this._easing(1e-5)/1e-5;return this._easing(t/(e*n))*e},n.updateAnimation=function(t){var e,n,i,r,o=this._animateParam;o&&(e=(new Date).getTime()-o.startTime,n=(null==t?void 0:t.destPos)||o.destPos,i=null!=(i=null==t?void 0:t.duration)?i:o.duration,null!=t&&t.restart||i<=e?this.setTo(n,i-e):(null!=t&&t.destPos&&(r=this.axisManager.get(),this._initialEasingPer=this._prevEasingPer,o.delta=this.axisManager.getDelta(r,n),o.destPos=n),null!=t&&t.duration&&(r=(e+this._durationOffset)/o.duration,this._durationOffset=r*i-e,o.duration=i)))},n._initState=function(t){return this._initialEasingPer=0,this._prevEasingPer=0,this._durationOffset=0,{pos:t.depaPos,easingPer:0,finished:!1}},n._getNextState=function(t){var r=this,o=this._animateParam,s=t.pos,a=o.destPos,u=_(s,function(t,e){return t<=a[e]?1:-1}),c=((new Date).getTime()-o.startTime+this._durationOffset)/o.duration,h=this._easing(c);return{pos:this.axisManager.map(s,function(t,e,n){var t=1<=c?a[n]:t+o.delta[n]*(h-r._prevEasingPer)/(1-r._initialEasingPer),i=E(t,e.range,e.circular);return t!==i&&(t=u[n]*(e.range[1]-e.range[0]),a[n]-=t,s[n]-=t),i}),easingPer:this._prevEasingPer=h,finished:1<=h}},n._easing=function(t){return 1<t?1:this._options.easing(t)},t}(function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,t=t.axisManager;this._options=e,this.interruptManager=n,this.eventManager=i,this.axisManager=t,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(n,t,e){var i,r=this;return e=void 0!==e?e:(i=_(t,function(t,e){t=Math.abs(t-n[e]),e=r._options.deceleration;return(t=Math.sqrt(t/e*2))<100?0:t}),Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)),Ut(e,this._options.minimumDuration,this._options.maximumDuration)},e.getDisplacement=function(t){var e=Math.pow(t.reduce(function(t,e){return t+e*e},0),1/t.length),n=Math.abs(e/-this._options.deceleration);return t.map(function(t){return t/2*n})},e.stopAnimation=function(t){var n,e;this._animateParam&&(n=this.axisManager.get(),e=this.axisManager.map(n,function(t,e){return E(t,e.range,e.circular)}),pt(e,function(t,e){return n[e]===t})||this.eventManager.triggerChange(e,n,t,!!t),this._animateParam=null,this._raf&&(e=this._raf,I(e)),this._raf=null,this.eventManager.triggerAnimationEnd(!(null==t||!t.event)))},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.axisManager.get(),n=this.axisManager.map(e,function(t,e){return Math.min(e.range[1],Math.max(e.range[0],t))});this.stopAnimation(),this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo(),e=(this._animateParam=null,this.axisManager.filter(this.axisManager.get(),function(t,e){return bt(t,e.range,e.circular)}));0<Object.keys(e).length&&this.setTo(this.axisManager.map(e,function(t,e){return E(t,e.range,e.circular)})),this.interruptManager.setInterrupt(!1),this.eventManager.triggerAnimationEnd(!!t),this.axisManager.isOutside()?this.restore(t):this.finish(!!t)},e.finish=function(t){this._animateParam=null,this.interruptManager.setInterrupt(!1),this.eventManager.triggerFinish(t)},e.getUserControl=function(t){t=t.setTo();return t.destPos=this.axisManager.get(t.destPos),t.duration=Ut(t.duration,this._options.minimumDuration,this._options.maximumDuration),t},e.animateTo=function(t,e,n){var i=this,t=(this.stopAnimation(),this._createAnimationParam(t,e,n)),e=p({},t.depaPos),r=this.eventManager.triggerAnimationStart(t),t=this.getUserControl(t);!r&&this.axisManager.every(t.destPos,function(t,e){return bt(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),r&&!g(t.destPos,e)&&(r=(null==n?void 0:n.event)||null,this._animateLoop({depaPos:e,destPos:t.destPos,duration:t.duration,delta:this.axisManager.getDelta(e,t.destPos),isTrusted:!!r,inputEvent:r,input:(null==n?void 0:n.input)||null},function(){return i.animationEnd()}))},e.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t),i=this.axisManager.get(n);return g(t,i)||(this.interruptManager.setInterrupt(!0),n=vt(t,function(t,e){return i[e]!==t}),Object.keys(n).length&&(n=this.axisManager.map(n,function(t,e){var n=e.range,e=e.circular;return e&&(e[0]||e[1])?t:yt(t,n,e)}),g(n,i)||(0<e?this.animateTo(n,e):(this.stopAnimation(),this.eventManager.triggerChange(n),this.finish(!1))))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(_(this.axisManager.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},e.setOptions=function(t){this._options=p(p({},this._options),t)},e._createAnimationParam=function(t,e,n){var i=this.axisManager.get(),r=(null==n?void 0:n.event)||null;return{depaPos:i,destPos:t,duration:Ut(e,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,t),inputEvent:r,input:(null==n?void 0:n.input)||null,isTrusted:!!r,done:this.animationEnd}},e._animateLoop=function(t,i){var r,o,s,a=this;t.duration?(this._animateParam=p(p({},t),{startTime:(new Date).getTime()}),r=_(t.destPos,function(t){return t}),o=this._initState(this._animateParam),(s=function(){a._raf=null;var t=a._animateParam,e=a._getNextState(o),n=!a.eventManager.triggerChange(e.pos,o.pos);(o=e).finished?(t.destPos=a._getFinalPos(t.destPos,r),g(t.destPos,a.axisManager.get(Object.keys(t.destPos)))||a.eventManager.triggerChange(t.destPos,e.pos),i()):n?a.finish(!1):a._raf=A(s)})()):(this.eventManager.triggerChange(t.destPos),i())},e._getFinalPos=function(t,n){var i=this;return _(t,function(t,e){return t>=n[e]-1e-6&&t<=n[e]+1e-6?n[e]:(e=i._getRoundUnit(t,e),_t(t,e))})},e._getRoundUnit=function(t,e){var n=this._options.round,i=null;return n||(e=this.axisManager.getAxisOptions(e),e=Math.max(m(e.range[0]),m(e.range[1]),m(t)),i=1/Math.pow(10,e)),i||n},t}()),Qt=function(r){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),void 0===n&&(n={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=p({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null,nested:!1},e),Object.keys(n).forEach(function(t){i.axis[t].startPos=n[t]}),i.interruptManager=new Nt(i.options),i.axisManager=new zt(i.axis),i.eventManager=new Vt(i),i.animationManager=new qt(i),i.inputObserver=new Kt(i),i.eventManager.setAnimationManager(i.animationManager),i.eventManager.triggerChange(i.axisManager.get()),i}v(t,r);var e=t.prototype;return Object.defineProperty(e,"holding",{get:function(){return 0<this.eventManager.holdingCount},enumerable:!1,configurable:!0}),e.connect=function(t,e){t="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),e.mapAxes(t),e.connect(this.inputObserver),this._inputs.push(e),this},e.disconnect=function(t){return t?0<=(t=this._inputs.indexOf(t))&&(this._inputs[t].disconnect(),this._inputs.splice(t,1)):(this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[]),this},e.get=function(t){return this.axisManager.get(t)},e.setTo=function(t,e){return this.animationManager.setTo(t,e=void 0===e?0:e),this},e.setBy=function(t,e){return this.animationManager.setBy(t,e=void 0===e?0:e),this},e.setOptions=function(t){return this.options=p(p({},this.options),t),this.animationManager.setOptions(t),this},e.setAxis=function(t){return this.axisManager.setAxis(t),this},e.stopAnimation=function(){return this.animationManager.stopAnimation(),this.animationManager.finish(!1),this},e.updateAnimation=function(t){return this.animationManager.updateAnimation(t),this},e.isBounceArea=function(t){return this.axisManager.isOutside(t)},e.destroy=function(){this.disconnect(),this.eventManager.destroy()},t.VERSION="3.9.0",t.TRANSFORM=At,t.DIRECTION_NONE=1,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_DOWN=16,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=24,t.DIRECTION_ALL=30,dt([lt],t.prototype,"holding",null),dt([ct],t)}(K),Gt=function(){function t(t,e){var n=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(t){n._dragged&&(t.preventDefault(),t.stopPropagation()),n._dragged=!1},this._voidFunction=function(){},this.element=Rt(t),this.options=p({inputType:["touch","mouse","pointer"],inputKey:["any"],inputButton:[D],scale:[1,1],thresholdAngle:45,threshold:0,preventClickOnDrag:!1,preventDefaultOnDrag:!1,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,touchAction:null},e),this._onPanstart=this._onPanstart.bind(this),this._onPanmove=this._onPanmove.bind(this),this._onPanend=this._onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this._direction=mt(!!t[0],!!t[1]),this.axes=t},e.connect=function(t){var e,n,i,r,o;return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(t),this._originalCssProps=(e=this.element,t=this.options,n=this._direction,r={1:"auto",30:"none",24:"pan-x",6:"pan-y"},o={},e&&e.style&&(t=t.touchAction||r[n],i=p(p({},It),{"touch-action":"none"===e.style["touch-action"]?"none":t}),Object.keys(i).forEach(function(t){o[t]=e.style[t],e.style[t]=i[t]})),o),this},e.disconnect=function(){var e,n,i,r;return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),i=this._originalCssProps,r=!0,Object.keys(It).forEach(function(t){i&&i[t]===It[t]||(r=!1)}),r||(e=this.element,n=this._originalCssProps,e&&e.style&&n&&Object.keys(n).forEach(function(t){e.style[t]=n[t]})),this._direction=1,this},e.destroy=function(){this.disconnect(),this.element=null},e.enable=function(){return this._enabled=!0,this},e.disable=function(){return this._enabled=!1,this},e.isEnabled=function(){return this._enabled},e.release=function(){var t=this._activeEvent,e=t.prevEvent;return t.onRelease(),this._observer.release(this,e,[0,0]),this._detachWindowEvent(t),this},e._onPanstart=function(t){var e=this.options,n=e.inputKey,i=e.inputButton,e=e.preventDefaultOnDrag,r=this._activeEvent,n=r.onEventStart(t,n,i);!n||!this._enabled||1<r.getTouches(t,i)||!1!==n.srcEvent.cancelable&&(t=this.options.iOSEdgeSwipeThreshold,this._dragged=!1,this._isOverThreshold=!1,this._observer.hold(this,n),this._atRightEdge=Dt&&n.center.x>window.innerWidth-t,this._attachWindowEvent(r),e&&"touchstart"!==n.srcEvent.type&&n.srcEvent.preventDefault(),r.prevEvent=n)},e._onPanmove=function(t){var e=this,n=this.options,i=n.iOSEdgeSwipeThreshold,r=n.preventClickOnDrag,o=n.releaseOnScroll,s=n.inputKey,a=n.inputButton,u=n.threshold,n=n.thresholdAngle,c=this._activeEvent,s=c.onEventMove(t,s,a),a=c.getTouches(t,a);if(0===a||o&&s&&!s.srcEvent.cancelable)this._onPanend(t);else if(s&&this._enabled&&!(1<a)){o=function(t,e){if(e<0||90<e)return 1;t=Math.abs(t);return e<t&&t<180-e?24:6}(s.angle,n),t=y(6,this._direction,o),a=y(24,this._direction,o);if(c.prevEvent&&Dt){if(s.center.x<0)return void this.release();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),s.deltaX<-i?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout(function(){return e.release()},100))}n=this._getDistance([s.deltaX,s.deltaY],[t,a]),o=this._getOffset([s.offsetX,s.offsetY],[t,a]),i=o.some(function(t){return 0!==t});i&&(!1!==s.srcEvent.cancelable&&s.srcEvent.preventDefault(),s.srcEvent.stopPropagation()),(s.preventSystemEvent=i)&&(this._isOverThreshold||u<=n)&&(this._dragged=r,this._isOverThreshold=!0,this._observer.change(this,s,wt(this.axes,o))),c.prevEvent=s}},e._onPanend=function(t){var e=this.options.inputButton,n=this._activeEvent;n.onEventEnd(t),this._enabled&&0===n.getTouches(t,e)&&(this._detachWindowEvent(n),clearTimeout(this._rightEdgeTimer),t=n.prevEvent,e=this._isOverThreshold?this._getOffset([Math.abs(t.velocityX)*(t.offsetX<0?-1:1),Math.abs(t.velocityY)*(t.offsetY<0?-1:1)],[y(6,this._direction),y(24,this._direction)]):[0,0],n.onRelease(),this._observer.release(this,t,e))},e._attachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.addEventListener(t,e._onPanmove,Ft(t))}),null!=t&&t.end.forEach(function(t){window.addEventListener(t,e._onPanend,Ft(t))})},e._detachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.removeEventListener(t,e._onPanmove)}),null!=t&&t.end.forEach(function(t){window.removeEventListener(t,e._onPanend)})},e._getOffset=function(t,e){var n=this.options.scale;return[e[0]?t[0]*n[0]:0,e[1]?t[1]*n[1]:0]},e._getDistance=function(t,e){return Math.sqrt(Number(e[0])*Math.pow(t[0],2)+Number(e[1])*Math.pow(t[1],2))},e._attachElementEvent=function(t){var e,n,i,r=this,o=(o=this.options.inputType,i=n=e=!1,(o=void 0===o?[]:o).forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=Lt;break;case"pointer":i=Wt}}),i?new Ht:e&&n?new Xt:e?new Bt:n?new Yt:null),s=this.element;if(o){if(!s)throw new Error("Element to connect input does not exist.");this._observer=t,this._enabled=!0,this._activeEvent=o,s.addEventListener("click",this._preventClickWhenDragged,!0),o.start.forEach(function(t){s.addEventListener(t,r._onPanstart)}),o.move.forEach(function(t){s.addEventListener(t,r._voidFunction)})}},e._detachElementEvent=function(){var e=this,t=this._activeEvent,n=this.element;n&&(n.removeEventListener("click",this._preventClickWhenDragged,!0),null!=t&&t.start.forEach(function(t){n.removeEventListener(t,e._onPanstart)}),null!=t&&t.move.forEach(function(t){n.removeEventListener(t,e._voidFunction)})),this._enabled=!1,this._observer=null},t}(),Zt=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=Rt(t),this.options=p({inputKey:["any"],scale:1,releaseDelay:300,useNormalized:!0,useAnimation:!1},e),this._onWheel=this._onWheel.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this._direction=mt(!!t[1],!!t[0]),this.axes=t},e.connect=function(t){return this._detachEvent(),this._attachEvent(t),this},e.disconnect=function(){return this._detachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.enable=function(){return this._enabled=!0,this},e.disable=function(){return this._enabled=!1,this},e.isEnabled=function(){return this._enabled},e._onWheel=function(t){var e,n=this;this._enabled&&xt(t,this.options.inputKey)&&(0===(e=this._getOffset([t.deltaY,t.deltaX],[y(24,this._direction),y(6,this._direction)]))[0]&&0===e[1]||(t.preventDefault(),this._holding||(this._observer.hold(this,t),this._holding=!0),this._observer.change(this,t,wt(this.axes,e),this.options.useAnimation),clearTimeout(this._timer),this._timer=setTimeout(function(){n._holding&&(n._holding=!1,n._observer.release(n,t,[0]))},this.options.releaseDelay)))},e._getOffset=function(t,e){var n=this.options.scale,i=this.options.useNormalized;return[e[0]&&t[0]?(0<t[0]?-1:1)*(i?1:Math.abs(t[0]))*n:0,e[1]&&t[1]?(0<t[1]?-1:1)*(i?1:Math.abs(t[1]))*n:0]},e._attachEvent=function(t){var e=this.element;if(!e)throw new Error("Element to connect input does not exist.");this._observer=t,e.addEventListener("wheel",this._onWheel),this._enabled=!0},e._detachEvent=function(){this.element&&this.element.removeEventListener("wheel",this._onWheel),this._enabled=!1,this._observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},t}(),Jt=/msie|trident/g.test("undefined"!=typeof window&&(null==(i=null==(a=null===window||void 0===window?void 0:window.navigator)?void 0:a.userAgent)?void 0:i.toLowerCase())||"");function $t(t){return"string"==typeof t}var te,R=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t,e){void 0===e&&(e={});var r=n.call(this)||this;return r._axes=null,r._items=[],r._size=0,r._scrollSize=0,r._scrollTimer=0,r._isWheelScroll=!1,r._isDragScroll=!1,r._isAnimationScroll=!1,r._isReachStart=!0,r._isReachEnd=!1,r._pos=0,r.update=function(){r.updateItems(),r.updateContainer()},r._onScroll=function(t){t&&r._debounceScroll(),r._refreshScroll();var t=r._size,e=r._scrollSize,n=r._pos,i=null!=(i=r._options.boundaryMargin)?i:0;n<=i&&!0!==r.isReachStart?(r._isReachStart=!0,r.trigger("reachStart")):i<n&&!1!==r.isReachStart&&(r._isReachStart=!1,r.trigger("leaveStart")),e-t-n<1+i&&!0!==r.isReachEnd?(r._isReachEnd=!0,r.trigger("reachEnd")):e-t-n<1+i||!1===r.isReachEnd||(r._isReachEnd=!1,r.trigger("leaveEnd"))},r._options=u({horizontal:!0,useDrag:!0,useSideWheel:!1,autoInit:!0,boundaryMargin:0,scrollDebounce:100},e),r._scrollArea=t,r._options.autoInit&&r.init(),r}V(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i);e=r.prototype;return e.findElement=function(t,e){return(null==(t=this.findItem(t,e=void 0===e?{}:e))?void 0:t.element)||null},e.findItem=function(t,e){var i=this._pos,n=this._scrollSize,r=this._size,o=null!=(s=null==(e=void 0===e?{}:e)?void 0:e.hitTest)?s:1,s=function(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}([],this._items,!0),a=s.length,u=i+r,c=e.sibling,h=e.intersection,e={pos:0,size:0},l={pos:n,size:0};if(0<s[0].pos&&s.unshift(e),a&&s[a-1].pos+s[a-1].size<n&&s.push(l),"start"===t){if(i<0)return null;var f,d=(f=s.filter(function(t){var e=t.size,t=t.pos-i,n=t+e;return 0<=t||0<n&&h||0<=n&&(!e||Math.abs(n)/e>=o)}))[0]===e&&f[1]||f[0]}else if("end"===t){if(n-r<i)return null;d=(f=s.filter(function(t){var e=t.size,t=t.pos+e-u,n=t-e;return t<=0||n<0&&h||n<=0&&(!e||Math.abs(n)/e>=o)}).reverse())[0]===l&&f[1]||f[0]}else if("prev"===t)d=s.filter(function(t){var e=t.size,t=t.pos+e-i,n=t-e;return t<=0||n<0&&h||n<=0&&(!e||Math.abs(n)/e>=o)}).reverse()[0];else{if("next"!==t)return this._getItem(t);d=s.filter(function(t){var e=t.size,t=t.pos-u,n=t+e;return 0<=t||0<n&&h||0<=n&&(!e||Math.abs(n)/e>=o)})[0]}return c&&d&&(-1<(a=s.indexOf(d))&&(d=s[a+c])),d||null},e.scrollIntoView=function(t,e){if(r=this.findItem(t,e=void 0===e?{}:e)){var n=e.duration||0,i=this._getNextScrollPos(r,e);if($t(t)&&e.excludeStand&&i===this._pos){var r,o=this._items.indexOf(r);if(-1===o)return;if(!(r=this._items[o+("start"===t||"prev"===t?-1:1)]))return;i=this._getNextScrollPos(r,e)}this.scrollBy(i-this._pos,n)}},e.scrollBy=function(t,e){this._axes.setBy({scroll:-t},e=void 0===e?0:e)},e.scrollTo=function(t,e){this._axes.setBy({scroll:this._pos-t},e=void 0===e?0:e)},e.setItems=function(t){this._items=t},e.updateItems=function(){var e=this,t=this._scrollAreaElement,n=this._options.itemSelector,n=[].slice.call(n?t.querySelectorAll(n):t.children);this.setItems(n.map(function(t){return e._getItem(t)}))},e.updateContainer=function(){var t,e,n=this._scrollAreaElement,i=this._options.horizontal,r=i?n.clientWidth:n.clientHeight,o=i?n.scrollWidth:n.scrollHeight;Jt&&o===r+1&&(t=(n=getComputedStyle(n)).boxSizing,e=i?(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0):(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0),r<(i=(parseFloat(i?n.width:n.height)||0)-("border-box"===t?e:0))&&i<r+1&&(o=r)),this._size=r,this._scrollSize=o,this._refreshScroll(),this._onScroll()},e.init=function(){var t,e,n,i,r,o,s,a=this;this._axes||($t(t=this._scrollArea)?e=document.querySelector(t):(o=t)instanceof Element||o instanceof Node?e=t:("value"in t||"current"in t)&&(e=t.value||t.current),e&&(this._scrollAreaElement=e,n=!1,i=this._scrollAreaElement,r=this._options,o=new Qt({scroll:{range:[-1/0,1/0]}},{deceleration:.005,round:1,nested:r.nested},{scroll:0}),s=!1,o.on({hold:function(t){n=!(s=!0);t=a._getNativeEvent(t);t&&r.preventDefault&&t.preventDefault()},change:function(t){var e=a._getNativeEvent(t);r.useSideWheel&&a._isMixedWheel(e)||(a._isWheelScroll=!!e&&"wheel"===e.type,a._isDragScroll=!!e&&!a._isWheelScroll,a._isAnimationScroll=!a._isWheelScroll&&!s,n=!0,t=t.delta.scroll,r.horizontal?i.scrollLeft-=t:i.scrollTop-=t,r.nested&&a._checkNestedMove(e))},release:function(t){n||t.setTo(u({},t.depaPos),0),n=s=!1}}),this._axes=o,r.useDrag&&o.connect(r.horizontal?["scroll",""]:["","scroll"],new Gt(i,{preventClickOnDrag:r.preventClickOnDrag,preventDefaultOnDrag:r.preventDefaultOnDrag,inputType:["mouse"],touchAction:"auto"})),r.useSideWheel&&o.connect(r.horizontal?["scroll",""]:["","scroll"],new Zt(i,{useNormalized:!1})),i.addEventListener("scroll",this._onScroll),window.addEventListener("resize",this.update),this.update()))},e.destroy=function(){var t;null!=(t=this._axes)&&t.destroy(),this.unsubscribe(),null!=(t=this._scrollAreaElement)&&t.removeEventListener("scroll",this._onScroll),"undefined"!=typeof window&&window.removeEventListener("resize",this.update),this.off(),this._axes=null},e._refreshScroll=function(){var t=this._options.horizontal,e=this._scrollAreaElement;this._pos=Math.min(this._scrollSize-this._size,t?e.scrollLeft:e.scrollTop)},e._getItem=function(t){var e=this._options.horizontal;return{element:t,pos:e?t.offsetLeft:t.offsetTop,size:e?t.offsetWidth:t.offsetHeight}},e._getNativeEvent=function(t){var e;return null!=(e=null==t?void 0:t.inputEvent)&&e.srcEvent?null==(e=t.inputEvent)?void 0:e.srcEvent:null==t?void 0:t.inputEvent},e._getNextScrollPos=function(t,e){var n=this._size,i=this._scrollSize,r=e.align||"start",e=e.offset||0,o=t.pos,t=t.size,s=0;return"start"===r?s=o-e:"end"===r?s=o+t-n+e:"center"===r&&(s=o+t/2-n/2+e),s=Math.max(0,Math.min(s,i-n))},e._isMixedWheel=function(t){return!!t&&"wheel"===(null==t?void 0:t.type)&&(null==t?void 0:t.deltaX)&&(null==t?void 0:t.deltaY)},e._checkNestedMove=function(t){(this.isReachStart||this.isReachEnd)&&(t.__childrenAxesAlreadyChanged=!1)},e._debounceScroll=function(){var i=this;this._scrollTimer||this.trigger("beginScroll"),window.clearTimeout(this._scrollTimer),this._scrollTimer=window.setTimeout(function(){var t=i._isWheelScroll,e=i._isDragScroll,n=i._isAnimationScroll;i._scrollTimer=0,i.trigger("finishScroll",{isWheelScroll:t,isDragScroll:e,isAnimationScroll:n,isTrusted:t||e||!n}),i._isWheelScroll=!1,i._isDragScroll=!1,i._isAnimationScroll=!1},this._options.scrollDebounce)},o([at("isReachStart")],r.prototype,"_isReachStart",void 0),o([at("isReachEnd")],r.prototype,"_isReachEnd",void 0),o([at("scrollPos")],r.prototype,"_pos",void 0),o([ct],r)}(K),j=["update","findElement","findItem","scrollBy","scrollTo","scrollIntoView","setItems","updateContainer","updateItems","init"],k=["reachStart","reachEnd","leaveStart","leaveEnd","beginScroll","finishScroll"],ee={__proto__:null,default:R,CONVEYER_METHODS:j,CONVEYER_EVENTS:k,REACTIVE_CONVEYER:{methods:j,events:k,created:function(t){return new R(t.container,u(u({},t.props),{autoInit:!1}))},init:function(t,e){!1!==e.props.autoInit&&t.init()},on:function(t,e,n){t.on(e,n)},off:function(t,e,n){t.off(e,n)},destroy:function(t){t.destroy()}}};for(te in ee)R[te]=ee[te];return R}); | ||
//# sourceMappingURL=conveyer.min.js.map |
{ | ||
"name": "@egjs/conveyer", | ||
"version": "1.6.1", | ||
"version": "1.6.2-beta.0", | ||
"description": "Conveyer adds Drag gestures to your Native Scroll.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/conveyer.cjs.js", |
@@ -189,3 +189,5 @@ /** | ||
return (dist >= 0) || (dist2 >= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
return (dist >= 0) | ||
|| (dist2 > 0 && intersection) | ||
|| (dist2 >= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
}); | ||
@@ -203,3 +205,5 @@ | ||
return dist <= 0 || (dist2 <= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
return dist <= 0 | ||
|| (dist2 < 0 && intersection) | ||
|| (dist2 <= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
}).reverse(); | ||
@@ -214,3 +218,5 @@ | ||
return dist <= 0 || (dist2 <= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
return dist <= 0 | ||
|| (dist2 < 0 && intersection) | ||
|| (dist2 <= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
}).reverse()[0]; | ||
@@ -223,3 +229,5 @@ } else if (target === "next") { | ||
return dist >= 0 || (dist2 >= 0 && (intersection || !itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
return dist >= 0 | ||
|| (dist2 > 0 && intersection) | ||
|| (dist2 >= 0 && (!itemSize || Math.abs(dist2) / itemSize >= hitTest)); | ||
})[0]; | ||
@@ -226,0 +234,0 @@ } else { |
@@ -8,28 +8,73 @@ /** | ||
import Conveyer from "./Conveyer"; | ||
/** | ||
* @typedef | ||
* @property - scroll direction. (true: Horizontal Scroll, false: Vertical Scroll) (default: true) <ko>스크롤 방향. (true: 가로 스크롤, false: 세로 스크롤) (default: true)</ko> | ||
* @property - selector to find items inside. (default: "") <ko>내부의 아이템들을 찾기 위한 selector. (default: "")</ko> | ||
* @property - Whether to use drag (default: true) <ko> 드래그를 사용할지 여부. (default: true)</ko> | ||
* @property - Whether to use the mouse wheel in a direction aside from the scroll direction (default: false) <ko>스크롤 방향과 다른 방향의 마우스 휠 입력을 사용할지 여부. (default: false)</ko> | ||
* @property - The minimum margin space for {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, and {@link Conveyer#event-leaveEnd leaveEnd} events to be triggered at the beginning and end of the scroll area. (default: 0) | ||
* <ko> 스크롤 영역의 시작과 끝에서 {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, {@link Conveyer#event-leaveEnd leaveEnd} 이벤트들이 발생하기 위한 최소 여백. (default: 0)</ko> | ||
* @property - The maximum amount of time the scroll event does not fire for the finishScroll event to be triggered. (default: 100) <ko> finishScroll 이벤트가 발생되기 위한 scroll 이벤트가 발생하지 않는 최대 시간. (default: 100)</ko> | ||
* @property - Whether to prevent being selected. (default: true) <ko>셀렉트가 되는 것을 막을지 여부. (default: true) </ko> | ||
* @property - Whether to prevent click event when dragging. (default: false) <ko>드래그하면 클릭이벤트를 막을지 여부. (default: true)</ko> | ||
* @property - 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} 실행 여부</ko> | ||
* @property - Whether to automatically initialize when an instance is created. If set to false, initialization is possible while calling the init method. (default: true) <ko>인스턴스를 생성할 때 자동으로 초기화할지 여부. false로 설정하면 init 메서드를 호출하면서 초기화가 가능하다. (default: true)</ko> | ||
* @property - If this option is enabled on a Conveyer placed inside an egjs component that has the same scroll direction including the Conveyer itself. The parent component moves in the same direction after the Conveyer reaches the first/last scroll position. <ko>Conveyer 자신을 포함해서 동일한 스크롤 방향을 가진 egjs 컴포넌트 내부에 배치된 Conveyer에서 이 옵션을 활성화하면 Conveyer가 첫/마지막 스크롤 위치에 도달한 뒤부터 같은 방향으로 상위 컴포넌트가 움직인다.</ko> | ||
*/ | ||
export interface ConveyerOptions { | ||
/** | ||
* scroll direction. (true: Horizontal Scroll, false: Vertical Scroll) | ||
* <ko>스크롤 방향. (true: 가로 스크롤, false: 세로 스크롤)</ko> | ||
* @default true | ||
*/ | ||
horizontal?: boolean; | ||
/** | ||
* selector to find items inside. | ||
* <ko>내부의 아이템들을 찾기 위한 selector.</ko> | ||
* @default "" | ||
*/ | ||
itemSelector?: string; | ||
/** | ||
* Whether to use drag. | ||
* <ko> 드래그를 사용할지 여부.</ko> | ||
* @default true | ||
*/ | ||
useDrag?: boolean; | ||
/** | ||
* Whether to use the mouse wheel in a direction aside from the scroll direction. | ||
* <ko>스크롤 방향과 다른 방향의 마우스 휠 입력을 사용할지 여부.</ko> | ||
* @default false | ||
*/ | ||
useSideWheel?: boolean; | ||
/** | ||
* The minimum margin space for {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, and {@link Conveyer#event-leaveEnd leaveEnd} events to be triggered at the beginning and end of the scroll area. | ||
* <ko> 스크롤 영역의 시작과 끝에서 {@link Conveyer#event-reachStart reachStart}, {@link Conveyer#event-leaveStart leaveStart}, {@link Conveyer#event-reachEnd reachEnd}, {@link Conveyer#event-leaveEnd leaveEnd} 이벤트들이 발생하기 위한 최소 여백.</ko> | ||
* @default 0 | ||
*/ | ||
boundaryMargin?: number; | ||
/** | ||
* The maximum amount of time the scroll event does not fire for the finishScroll event to be triggered. | ||
* <ko> finishScroll 이벤트가 발생되기 위한 scroll 이벤트가 발생하지 않는 최대 시간.</ko> | ||
* @default 100 | ||
*/ | ||
scrollDebounce?: number; | ||
/** | ||
* Whether to prevent being selected. | ||
* <ko>셀렉트가 되는 것을 막을지 여부.</ko> | ||
* @default true | ||
*/ | ||
preventDefault?: boolean; | ||
/** | ||
* Whether to prevent click event when dragging. | ||
* <ko>드래그하면 클릭이벤트를 막을지 여부.</ko> | ||
* @default false | ||
*/ | ||
preventClickOnDrag?: boolean; | ||
/** | ||
* 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} 실행 여부</ko> | ||
* @default false | ||
*/ | ||
preventDefaultOnDrag?: boolean; | ||
/** | ||
* Whether to automatically initialize when an instance is created. If set to false, initialization is possible while calling the init method. | ||
* <ko>인스턴스를 생성할 때 자동으로 초기화할지 여부. false로 설정하면 init 메서드를 호출하면서 초기화가 가능하다.</ko> | ||
* @default true | ||
*/ | ||
autoInit?: boolean; | ||
/** | ||
* If this option is enabled on a Conveyer placed inside an egjs component that has the same scroll direction including the Conveyer itself. The parent component moves in the same direction after the Conveyer reaches the first/last scroll position. | ||
* <ko>Conveyer 자신을 포함해서 동일한 스크롤 방향을 가진 egjs 컴포넌트 내부에 배치된 Conveyer에서 이 옵션을 활성화하면 Conveyer가 첫/마지막 스크롤 위치에 도달한 뒤부터 같은 방향으로 상위 컴포넌트가 움직인다.</ko> | ||
* @default false | ||
*/ | ||
nested?: boolean; | ||
@@ -69,4 +114,4 @@ } | ||
/** | ||
* size ratio to find items. | ||
* <ko>아이템을 찾기 위한 사이즈 비율.</ko> | ||
* size ratio to find items. Use it if `padding` inside the item plays the same role as `margin` or `gap`. | ||
* <ko>아이템을 찾기 위한 사이즈 비율. 아이템 내부에 `padding`이 `margin`, `gap`과 같은 역할을 한다면 사용해라.</ko> | ||
* @default 1 | ||
@@ -93,11 +138,26 @@ */ | ||
* @extends FindItemOptions | ||
* @property - Where to arrange the items in the container. (default: "start") <ko>아이템을 container안에서 정렬할 위치. (default: "start")</ko> | ||
* @property - Whether to find the next item except sorting it in place. (default: false) <ko>아이템을 제자리에 정렬하는 것을 제외하고 다음 아이템을 찾을지 여부. (default: false)</ko> | ||
* @property - The value to scroll further from the sort position. (default: 0) <ko>정렬하는 위치에서 얼만큼 더 스크롤할 값. (default: 0)</ko> | ||
* @property - How long to scroll animation time. (default: 0) <ko>얼마동한 스크롤할 할지 애니메이션 시간. (default: 0)</ko> | ||
*/ | ||
export interface ScrollIntoViewOptions extends FindItemOptions { | ||
/** | ||
* The position to align the target to. | ||
* <ko>target을 정렬할 위치.</ko> | ||
*/ | ||
align?: "start" | "end" | "center"; | ||
/** | ||
* Whether to find the next item except sorting it in place. | ||
* <ko>아이템을 제자리에 정렬하는 것을 제외하고 다음 아이템을 찾을지 여부.</ko> | ||
* @default false | ||
*/ | ||
excludeStand?: boolean; | ||
/** | ||
* The value to scroll further from the sort position. | ||
* <ko>정렬하는 위치에서 얼만큼 더 스크롤할 값.</ko> | ||
* @default 0 | ||
*/ | ||
offset?: number; | ||
/** | ||
* How long to scroll animation time. | ||
* <ko>얼마동한 스크롤할 할지 애니메이션 시간.</ko> | ||
* @default 0 | ||
*/ | ||
duration?: number; | ||
@@ -104,0 +164,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
552737
8281
2