@egjs/axes
Advanced tools
Comparing version 3.4.0 to 3.5.0-beta.0
import Component from "@egjs/component"; | ||
import { ReactiveSubscribe } from "./cfcs"; | ||
import { EventManager } from "./EventManager"; | ||
@@ -7,3 +8,3 @@ import { InterruptManager } from "./InterruptManager"; | ||
import { InputType } from "./inputType/InputType"; | ||
import { AxesEvents, ObjectInterface, UpdateAnimationOption } from "./types"; | ||
import { AxesEvents, AxesReactiveState, ObjectInterface, UpdateAnimationOption } from "./types"; | ||
import { AnimationManager } from "./animation/AnimationManager"; | ||
@@ -54,2 +55,4 @@ export interface AxesOption { | ||
} | ||
interface Axes extends AxesReactiveState, ReactiveSubscribe<AxesReactiveState> { | ||
} | ||
export default Axes; |
@@ -9,2 +9,3 @@ import { ObjectInterface } from "./types"; | ||
circular?: boolean | boolean[]; | ||
startPos?: number; | ||
} | ||
@@ -23,3 +24,3 @@ export declare class AxisManager { | ||
filter(pos: Axis, callback: (value: number, options: AxisOption, key: string) => boolean): Axis; | ||
map<U>(pos: Axis, callback: (value: number, options: AxisOption, key: string) => U): Record<string | number, U>; | ||
map<U>(pos: Axis, callback: (value: number, options: AxisOption, key: string) => U): ObjectInterface<U>; | ||
isOutside(axes?: string[]): boolean; | ||
@@ -26,0 +27,0 @@ getAxisOptions(key: string): AxisOption; |
@@ -13,2 +13,4 @@ export declare const DIRECTION_NONE = 1; | ||
export declare const VELOCITY_INTERVAL = 16; | ||
export declare const AXES_METHODS: readonly ["connect", "disconnect", "get", "setTo", "setBy", "stopAnimation", "updateAnimation", "isBounceArea"]; | ||
export declare const AXES_EVENTS: readonly ["hold", "release", "change", "animationStart", "animationEnd", "finish"]; | ||
export declare const IOS_EDGE_THRESHOLD = 30; | ||
@@ -15,0 +17,0 @@ export declare const IS_IOS_SAFARI: boolean; |
@@ -8,2 +8,6 @@ import Axes from "./Axes"; | ||
export default Axes; | ||
export { AXES_METHODS, AXES_EVENTS } from "./const"; | ||
export { getInitialPos } from "./utils"; | ||
export * from "./types"; | ||
export * from "./reactive"; | ||
export * from "./cfcs"; |
@@ -0,1 +1,2 @@ | ||
import { ElementType } from "../types"; | ||
import { InputType, InputTypeObserver } from "./InputType"; | ||
@@ -21,3 +22,3 @@ export declare const KEY_LEFT_ARROW = 37; | ||
private _timer; | ||
constructor(el: any, options?: MoveKeyInputOption); | ||
constructor(el: ElementType, options?: MoveKeyInputOption); | ||
mapAxes(axes: string[]): void; | ||
@@ -24,0 +25,0 @@ connect(observer: InputTypeObserver): InputType; |
@@ -1,2 +0,2 @@ | ||
import { ActiveEvent, InputEventType } from "../types"; | ||
import { ActiveEvent, ElementType, InputEventType } from "../types"; | ||
import { InputType, InputTypeObserver } from "./InputType"; | ||
@@ -25,3 +25,3 @@ export interface PanInputOption { | ||
private _rightEdgeTimer; | ||
constructor(el: string | HTMLElement, options?: PanInputOption); | ||
constructor(el: ElementType, options?: PanInputOption); | ||
mapAxes(axes: string[]): void; | ||
@@ -28,0 +28,0 @@ connect(observer: InputTypeObserver): InputType; |
@@ -0,1 +1,2 @@ | ||
import { ElementType } from "../types"; | ||
import { InputType, InputTypeObserver } from "./InputType"; | ||
@@ -18,3 +19,3 @@ export interface PinchInputOption { | ||
private _baseValue; | ||
constructor(el: string | HTMLElement, options?: PinchInputOption); | ||
constructor(el: ElementType, options?: PinchInputOption); | ||
mapAxes(axes: string[]): void; | ||
@@ -21,0 +22,0 @@ connect(observer: InputTypeObserver): InputType; |
@@ -0,1 +1,2 @@ | ||
import { ElementType } from "../types"; | ||
import { PanInput, PanInputOption } from "./PanInput"; | ||
@@ -8,3 +9,3 @@ export declare class RotatePanInput extends PanInput { | ||
private _coefficientForDistanceToAngle; | ||
constructor(el: string | HTMLElement, options?: PanInputOption); | ||
constructor(el: ElementType, options?: PanInputOption); | ||
mapAxes(axes: string[]): void; | ||
@@ -11,0 +12,0 @@ protected _onPanstart(event: MouseEvent): void; |
@@ -0,1 +1,2 @@ | ||
import { ElementType } from "../types"; | ||
import { InputType, InputTypeObserver } from "./InputType"; | ||
@@ -17,3 +18,3 @@ export interface WheelInputOption { | ||
private _timer; | ||
constructor(el: any, options?: WheelInputOption); | ||
constructor(el: ElementType, options?: WheelInputOption); | ||
mapAxes(axes: string[]): void; | ||
@@ -20,0 +21,0 @@ connect(observer: InputTypeObserver): InputType; |
@@ -7,4 +7,8 @@ import { Axis } from "./AxisManager"; | ||
import { InputType } from "./inputType/InputType"; | ||
import { AXES_METHODS } from "./const"; | ||
import Axes from "./Axes"; | ||
import { Ref } from "./cfcs"; | ||
export declare type ObjectInterface<T = any> = Record<string | number, T>; | ||
export declare type InputEventType = PointerEvent | MouseEvent | TouchEvent; | ||
export declare type ElementType = string | HTMLElement | Ref<HTMLElement>; | ||
export declare type ActiveEvent = MouseEventInput | TouchEventInput | TouchMouseEventInput | PointerEventInput; | ||
@@ -19,2 +23,8 @@ export interface AxesEvents { | ||
} | ||
export interface AxesReactiveState { | ||
[key: string]: any; | ||
} | ||
export declare type AxesMethods = { | ||
[key in typeof AXES_METHODS[number]]: Axes[key]; | ||
}; | ||
export interface AnimationParam { | ||
@@ -21,0 +31,0 @@ depaPos: Axis; |
@@ -0,1 +1,2 @@ | ||
import { Axis, AxisOption } from "./AxisManager"; | ||
import { PanInputOption } from "./inputType/PanInput"; | ||
@@ -8,5 +9,5 @@ import { PinchInputOption } from "./inputType/PinchInput"; | ||
export declare const cancelAnimationFrame: (key: any) => void; | ||
export declare const map: <T, U>(obj: Record<string | number, T>, callback: (value: T, key: string) => U) => Record<string | number, U>; | ||
export declare const filter: <T>(obj: Record<string | number, T>, callback: (value: T, key: string) => boolean) => Record<string | number, T>; | ||
export declare const every: <T>(obj: Record<string | number, T>, callback: (value: T, key: string) => boolean) => boolean; | ||
export declare const map: <T, U>(obj: ObjectInterface<T>, callback: (value: T, key: string) => U) => ObjectInterface<U>; | ||
export declare const filter: <T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean) => ObjectInterface<T>; | ||
export declare const every: <T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean) => boolean; | ||
export declare const equal: (target: ObjectInterface, base: ObjectInterface) => boolean; | ||
@@ -23,2 +24,3 @@ export declare const roundNumber: (num: number, roundUnit: number) => any; | ||
export declare const getDirection: (useHorizontal: boolean, useVertical: boolean) => number; | ||
export declare const getInitialPos: (axis: ObjectInterface<AxisOption>, startPos: Axis) => Axis; | ||
export declare const useDirection: (checkType: number, direction: number, userDirection?: number) => boolean; | ||
@@ -25,0 +27,0 @@ export declare const setCssProps: (element: HTMLElement, option: PanInputOption | PinchInputOption, direction: number) => { |
/* | ||
Copyright (c) 2015 NAVER Corp. | ||
Copyright (c) NAVER Corp. | ||
name: @egjs/axes | ||
@@ -7,5 +7,5 @@ license: MIT | ||
repository: https://github.com/naver/egjs-axes | ||
version: 3.4.0 | ||
version: 3.4.0-beta.0 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@egjs/agent"),require("@egjs/component")):"function"==typeof define&&define.amd?define(["@egjs/agent","@egjs/component"],e):(t.eg=t.eg||{},t.eg.Axes=e(t.eg.agent,t.eg.Component))}(this,function(t,d){"use strict";var i=function(t,e){return(i=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 r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function s(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var o,a,f=function(){return(f=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},u="undefined"==typeof window?{navigator:{userAgent:""}}:window,c=24,h="left",l="right",v="middle",_="ontouchstart"in u&&"safari"===t().browser.name,n=function(){if("undefined"==typeof document)return"";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""}(),g={"user-select":"none","-webkit-user-drag":"none"},p=function(t,e){var n,i;return void 0===e&&(e=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((n=document.createElement("div")).innerHTML=t,s(n.childNodes)):s(document.querySelectorAll(t)),e||(i=1<=i.length?i[0]:void 0)):t!==u&&(!t.nodeName||1!==t.nodeType&&9!==t.nodeType)?"jQuery"in u&&t instanceof jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return p(t)}),e||(i=1<=i.length?i[0]:void 0)):i=t,i},m=u.requestAnimationFrame||u.webkitRequestAnimationFrame,E=u.cancelAnimationFrame||u.webkitCancelAnimationFrame;m&&!E?(o={},a=m,m=function(e){var n=a(function(t){o[n]&&e(t)});return o[n]=!0,n},E=function(t){delete o[t]}):m&&E||(m=function(t){return u.setTimeout(function(){t(u.performance&&u.performance.now&&u.performance.now()||(new Date).getTime())},16)},E=u.clearTimeout);function x(t,e){var n={};for(var i in t)i&&(n[i]=e(t[i],i));return n}function M(t,e){var n={};for(var i in t)i&&e(t[i],i)&&(n[i]=t[i]);return n}function b(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function y(t,n){return b(t,function(t,e){return t===n[e]})}function P(t,e){return j[e]||(j[e]=N(e)),j[e](t)}function T(t,n){return t&&n?x(t,function(t,e){return P(t,"number"==typeof n?n:n[e])}):t}function w(t){if(!isFinite(t))return 0;var e=""+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 O(t,e){return 180*Math.atan2(e,t)/Math.PI}function A(e){var n=!0;return Object.keys(g).forEach(function(t){e&&e[t]===g[t]||(n=!1)}),n}function D(t,e){return t&&e?30:t?6:e?c:1}function I(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}function C(e,t,n){var i,s,r,o=((i={})[1]="auto",i[30]="none",i[c]="pan-x",i[6]="pan-y",i),a={};return e&&e.style&&(s=t.touchAction?t.touchAction:o[n],r=f(f({},g),{"touch-action":"none"===e.style["touch-action"]?"none":s}),Object.keys(r).forEach(function(t){a[t]=e.style[t],e.style[t]=r[t]})),a}function R(e,n){e&&e.style&&n&&Object.keys(n).forEach(function(t){e.style[t]=n[t]})}function S(t,e,n,i){var s=t,r=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],s=Math.max(r[0],s);return Math.min(r[1],s)}function L(t,e){return t<e[0]||t>e[1]}function B(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function k(t,e,n){var i=t,s=e[0],r=e[1],o=r-s;return n[1]&&r<t&&(i=(i-r)%o+s),n[0]&&t<s&&(i=(i-s)%o+r),i}function X(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function Y(t){void 0===t&&(t=[]);var e=!1,n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=U;break;case"pointer":i=Q}}),i?new Z:e&&n?new J:e?new G:n?new H:null}function F(t,e,n){return Math.max(Math.min(t,n),e)}var j={},N=function(e){var n=e<1?Math.pow(10,w(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},W=function(){function t(t){this._axes=t}var e=t.prototype;return e.hold=function(t,e){var n=this._getRoundPos(t).roundPos;this._axes.trigger(new d.ComponentEvent("hold",{pos:n,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,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration),this._axes.trigger(new d.ComponentEvent("release",f(f({},t),{bounceRatio:this._getBounceRatio(n)})))},e.triggerChange=function(t,e,n,i){void 0===i&&(i=!1);var s=this.animationManager,r=s.axisManager,o=s.getEventInfo(),a=this._getRoundPos(t,e),u=a.roundPos,h=a.roundDepa,c=r.moveTo(u,h),l=(null==n?void 0:n.event)||(null==o?void 0:o.event)||null,v={pos:c.pos,delta:c.delta,bounceRatio:this._getBounceRatio(c.pos),holding:i,inputEvent:l,isTrusted:!!l,input:(null==n?void 0:n.input)||(null==o?void 0:o.input)||null,set:l?this._createUserControll(c.pos):function(){}},_=new d.ComponentEvent("change",v);return this._axes.trigger(_),l&&r.set(v.set().destPos),!_.isCanceled()},e.triggerAnimationStart=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration);var s=new d.ComponentEvent("animationStart",t);return this._axes.trigger(s),!s.isCanceled()},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this._axes.trigger(new d.ComponentEvent("animationEnd",{isTrusted:t}))},e.triggerFinish=function(t){void 0===t&&(t=!1),this._axes.trigger(new d.ComponentEvent("finish",{isTrusted: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:f({},t),duration:e};return function(t,e){return t&&(n.destPos=f({},t)),void 0!==e&&(n.duration=e),n}},e._getRoundPos=function(t,e){var n=this._axes.options.round;return{roundPos:T(t,n),roundDepa:T(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})},t}(),K=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}(),V=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].range[0],t},{})}var e=t.prototype;return e.getDelta=function(t,e){var n=this.get(t);return x(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},{}):f(f({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=x(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?k(t,e.range,e.circular):0})),{pos:f({},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 b(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this._axis;return M(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this._axis;return x(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!L(t,e.range)})},e.getAxisOptions=function(t){return this._axis[t]},e._complementOptions=function(){var s=this;Object.keys(this._axis).forEach(function(i){s._axis[i]=f({range:[0,100],bounce:[0,0],circular:[!1,!1]},s._axis[i]),["bounce","circular"].forEach(function(t){var e=s._axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},t}(),U="ontouchstart"in u,q="PointerEvent"in u,e="MSPointerEvent"in u,Q=q||e,z=function(){function t(){var e=this;this._stopContextMenu=function(t){t.preventDefault(),u.removeEventListener("contextmenu",e._stopContextMenu)}}var e=t.prototype;return e.extendEvent=function(t){var e,n=this.prevEvent,i=this._getCenter(t),s=n?this._getMovement(t):{x:0,y:0},r=n?this._getScale(t):1,o=n?O(i.x-n.center.x,i.y-n.center.y):0,a=n?n.deltaX+s.x:s.x,u=n?n.deltaY+s.y:s.y,h=s.x,c=s.y,l=this._latestInterval,v=Date.now(),_=l?v-l.timestamp:0,d=n?n.velocityX:0,f=n?n.velocityY:0;return(!l||16<=_)&&(l&&(d=(e=[(a-l.deltaX)/_,(u-l.deltaY)/_])[0],f=e[1]),this._latestInterval={timestamp:v,deltaX:a,deltaY:u}),{srcEvent:t,scale:r,angle:o,center:i,deltaX:a,deltaY:u,offsetX:h,offsetY:c,velocityX:d,velocityY:f,preventSystemEvent:!0}},e._getDistance=function(t,e){var n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.sqrt(n*n+i*i)},e._getButton=function(t){var e={1:h,2:l,4:v},n=this._isTouchEvent(t)?h:e[t.buttons];return n||null},e._isTouchEvent=function(t){return-1<t.type.indexOf("touch")},e._isValidButton=function(t,e){return-1<e.indexOf(t)},e._preventMouseButton=function(t,e){e===l?u.addEventListener("contextmenu",this._stopContextMenu):e===v&&t.preventDefault()},t}(),H=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown"],t.move=["mousemove"],t.end=["mouseup"],t}r(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(){},n.onRelease=function(){this.prevEvent=null},n.getTouches=function(){return 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}(z),G=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}r(t,e);var n=t.prototype;return n.onEventStart=function(t){return this._baseTouches=t.touches,this.extendEvent(t)},n.onEventMove=function(t){return this.extendEvent(t)},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}(z),Z=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=q?["pointerdown"]:["MSPointerDown"],t.move=q?["pointermove"]:["MSPointerMove"],t.end=q?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],t._firstInputs=[],t._recentInputs=[],t}r(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this._updatePointerEvent(t),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:(this._updatePointerEvent(t),this.extendEvent(t))},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,s=!1;this._recentInputs.forEach(function(t,e){t.pointerId===n.pointerId&&(s=!0,i._recentInputs[e]=n)}),s||(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}(z),J=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}r(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return this._isTouchEvent(t)&&(this._baseTouches=t.touches),e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(t){this._isTouchEvent(t)&&(this._baseTouches=t.touches)},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t){return this._isTouchEvent(t)?t.touches.length: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,n=[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}}),i=n[0],s=n[1];return i.id===s.id?{x:i.x-s.x,y:i.y-s.y}:{x:0,y:0}},t}(z),$=function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,s=t.axisManager,r=t.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=e,this._interruptManager=n,this._eventManager=i,this._axisManager=s,this._animationManager=r}var e=t.prototype;return e.get=function(t){return this._axisManager.get(t.axes)},e.hold=function(t,e){var n;!this._interruptManager.isInterrupted()&&t.axes.length&&(n={input:t,event:e},this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(n),this._moveDistance||this._eventManager.hold(this._axisManager.get(),n),this._isOutside=this._axisManager.isOutside(t.axes),this._moveDistance=this._axisManager.get(t.axes))},e.change=function(t,e,n,i){var s,r,o,a,u;this._isStopped||!this._interruptManager.isInterrupting()||this._axisManager.every(n,function(t){return 0===t})||((s=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyChanged||(r=this._moveDistance||this._axisManager.get(t.axes),o=x(r,function(t,e){return t+(n[e]||0)}),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,function(t,e){var n=e.circular,i=e.range;return n&&(n[0]||n[1])?k(t,i,n):t})),this._isOutside&&this._axisManager.every(r,function(t,e){return!L(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),a={input:t,event:e},i?(u=this._animationManager.getDuration(o,r),this._animationManager.animateTo(o,u,a)):this._eventManager.triggerChange(o,r,a,!0)||(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))))},e.release=function(t,e,n,i){var s,r,o,a,u,h,c,l,v,_,d;!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance&&((s=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyReleased&&(n=n.map(function(){return 0})),r=this._axisManager.get(t.axes),o=this._axisManager.get(),a=this._animationManager.getDisplacement(n),u=X(t.axes,a),h=this._axisManager.get(this._axisManager.map(u,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?r[n]+t:S(r[n]+t,e.range,e.circular,e.bounce)})),s.__childrenAxesAlreadyReleased=!0,0===(c=this._animationManager.getDuration(h,r,i))&&(h=f({},o)),l={depaPos:o,destPos:h,duration:c,delta:this._axisManager.getDelta(o,h),inputEvent:e,input:t,isTrusted:!0},this._eventManager.triggerRelease(l),this._moveDistance=null,v=this._animationManager.getUserControl(l),d={input:t,event:e},(_=y(v.destPos,o))||0===v.duration?(_||this._eventManager.triggerChange(v.destPos,o,d,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(d):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(v.destPos,v.duration,d))},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],i=e.range[1]+e.bounce[1];return i<t?i:t<n?n:t}):this._axisManager.map(t,function(t,e){var n=e.range[0],i=e.range[1],s=e.bounce,r=e.circular;return r&&(r[0]||r[1])?t:t<n?n-o._animationManager.interpolate(n-t,s[0]):i<t?i+o._animationManager.interpolate(t-i,s[1]):t})},e._isEndofAxis=function(a,u,h){return this._axisManager.every(u,function(t,e,n){return 0===a[n]||u[n]===h[n]&&(i=t,s=e.range,r=e.bounce,!(o=e.circular)[0]&&i===s[0]-r[0]||!o[1]&&i===s[1]+r[1]);var i,s,r,o})},t}(),tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._useDuration=!0,t}r(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,s,r,o=this._animateParam;o&&(e=(new Date).getTime()-o.startTime,n=(null==t?void 0:t.destPos)||o.destPos,i=(null==t?void 0:t.duration)||o.duration,null!=t&&t.restart||i<=e?this.setTo(n,i-e):(null!=t&&t.destPos&&(s=this.axisManager.get(),this._initialEasingPer=this._prevEasingPer,o.delta=this.axisManager.getDelta(s,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 o=this,a=this._animateParam,u=t.pos,h=a.destPos,c=x(u,function(t,e){return t<=h[e]?1:-1}),l=((new Date).getTime()-a.startTime+this._durationOffset)/a.duration,v=this._easing(l);return{pos:this.axisManager.map(u,function(t,e,n){var i,s=1<=l?h[n]:t+a.delta[n]*(v-o._prevEasingPer)/(1-o._initialEasingPer),r=k(s,e.range,e.circular);return s!==r&&(i=c[n]*(e.range[1]-e.range[0]),h[n]-=i,u[n]-=i),r}),easingPer:this._prevEasingPer=v,finished:1<=v}},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,s=t.axisManager;this._options=e,this.interruptManager=n,this.eventManager=i,this.axisManager=s,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(r,t,e){var n,i,o=this;return i=void 0!==e?e:(n=x(t,function(t,e){return n=Math.abs(t-r[e]),i=o._options.deceleration,(s=Math.sqrt(n/i*2))<100?0:s;var n,i,s}),Object.keys(n).reduce(function(t,e){return Math.max(t,n[e])},-1/0)),F(i,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,i;this._animateParam&&(n=this.axisManager.get(),e=this.axisManager.map(n,function(t,e){return k(t,e.range,e.circular)}),b(e,function(t,e){return n[e]===t})||this.eventManager.triggerChange(e,n,t,!!t),this._animateParam=null,this._raf&&(i=this._raf,E(i)),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();this._animateParam=null;var e=this.axisManager.filter(this.axisManager.get(),function(t,e){return B(t,e.range,e.circular)});0<Object.keys(e).length&&this.setTo(this.axisManager.map(e,function(t,e){return k(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){var e=t.setTo();return e.destPos=this.axisManager.get(e.destPos),e.duration=F(e.duration,this._options.minimumDuration,this._options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this;this.stopAnimation();var s,r=this._createAnimationParam(t,e,n),o=f({},r.depaPos),a=this.eventManager.triggerAnimationStart(r),u=this.getUserControl(r);!a&&this.axisManager.every(u.destPos,function(t,e){return B(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!y(u.destPos,o)&&(s=(null==n?void 0:n.event)||null,this._animateLoop({depaPos:o,destPos:u.destPos,duration:u.duration,delta:this.axisManager.getDelta(o,u.destPos),isTrusted:!!s,inputEvent:s,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);if(y(t,i))return this;this.interruptManager.setInterrupt(!0);var s=M(t,function(t,e){return i[e]!==t});return Object.keys(s).length?(s=this.axisManager.map(s,function(t,e){var n=e.range,i=e.circular;return i&&(i[0]||i[1])?t:S(t,n,i)}),y(s,i)||(0<e?this.animateTo(s,e):(this.stopAnimation(),this.eventManager.triggerChange(s),this.finish(!1))),this):this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(x(this.axisManager.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},e._createAnimationParam=function(t,e,n){var i=this.axisManager.get(),s=t,r=(null==n?void 0:n.event)||null;return{depaPos:i,destPos:s,duration:F(e,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,s),inputEvent:r,input:(null==n?void 0:n.input)||null,isTrusted:!!r,done:this.animationEnd}},e._animateLoop=function(t,i){var s,r,o,a=this;t.duration?(this._animateParam=f(f({},t),{startTime:(new Date).getTime()}),s=x(t.destPos,function(t){return t}),r=this._initState(this._animateParam),(o=function(){a._raf=null;var t=a._animateParam,e=a._getNextState(r),n=!a.eventManager.triggerChange(e.pos,r.pos);if((r=e).finished)return t.destPos=a._getFinalPos(t.destPos,s),y(t.destPos,a.axisManager.get(Object.keys(t.destPos)))||a.eventManager.triggerChange(t.destPos,e.pos),void i();n?a.finish(!1):a._raf=m(o)})()):(this.eventManager.triggerChange(t.destPos),i())},e._getFinalPos=function(t,i){var s=this;return x(t,function(t,e){if(t>=i[e]-1e-6&&t<=i[e]+1e-6)return i[e];var n=s._getRoundUnit(t,e);return P(t,n)})},e._getRoundUnit=function(t,e){var n,i,s=this._options.round,r=null;return s||(n=this.axisManager.getAxisOptions(e),i=Math.max(w(n.range[0]),w(n.range[1]),w(t)),r=1/Math.pow(10,i)),r||s},t}()),et=function(s){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),void 0===n&&(n=null);var i=s.call(this)||this;return i.axis=t,i._inputs=[],i.options=f({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),i.interruptManager=new K(i.options),i.axisManager=new V(i.axis),i.eventManager=new W(i),i.animationManager=new tt(i),i.inputObserver=new $(i),i.eventManager.setAnimationManager(i.animationManager),n&&i.eventManager.triggerChange(n),i}r(t,s);var e=t.prototype;return e.connect=function(t,e){var n="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),e.mapAxes(n),e.connect(this.inputObserver),this._inputs.push(e),this},e.disconnect=function(t){var e;return t?0<=(e=this._inputs.indexOf(t))&&(this._inputs[e].disconnect(),this._inputs.splice(e,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 void 0===e&&(e=0),this.animationManager.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.animationManager.setBy(t,e),this},e.stopAnimation=function(){return this.animationManager.stopAnimation(),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.4.0",t.TRANSFORM=n,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=c,t.DIRECTION_ALL=30,t}(d),nt=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._forceRelease=function(){var t=n._activeEvent,e=t.prevEvent;t.onRelease(),n._observer.release(n,e,[0,0]),n._detachWindowEvent(t)},this._voidFunction=function(){},this.element=p(t),this.options=f({inputType:["touch","mouse","pointer"],inputButton:[h],scale:[1,1],thresholdAngle:45,threshold:0,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=D(!!t[0],!!t[1]),this.axes=t},e.connect=function(t){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(t),this._originalCssProps=C(this.element,this.options,this._direction),this},e.disconnect=function(){return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),A(this._originalCssProps)||R(this.element,this._originalCssProps),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._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);!i||!this._enabled||1<n.getTouches(t)||!1!==i.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this._observer.hold(this,i),this._atRightEdge=_&&i.center.x>window.innerWidth-e,this._attachWindowEvent(n),n.prevEvent=i)},e._onPanmove=function(t){var e=this,n=this._activeEvent,i=n.onEventMove(t,this.options.inputButton);if(i&&this._enabled&&!(1<n.getTouches(t))){var s=this.options,r=s.iOSEdgeSwipeThreshold,o=s.releaseOnScroll,a=function(t,e){if(e<0||90<e)return 1;var n=Math.abs(t);return e<n&&n<180-e?c:6}(i.angle,this.options.thresholdAngle);if(!o||i.srcEvent.cancelable){if(n.prevEvent&&_){if(i.center.x<0)return void this._forceRelease();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),i.deltaX<-r?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout(function(){return e._forceRelease()},100))}var u=this._getOffset([i.offsetX,i.offsetY],[I(6,this._direction,a),I(c,this._direction,a)]),h=u.some(function(t){return 0!==t});h&&(!1!==i.srcEvent.cancelable&&i.srcEvent.preventDefault(),i.srcEvent.stopPropagation()),(i.preventSystemEvent=h)&&this._observer.change(this,i,X(this.axes,u)),n.prevEvent=i}else this._onPanend(t)}},e._onPanend=function(t){var e,n,i=this._activeEvent;i.onEventEnd(t),this._enabled&&0===i.getTouches(t)&&(this._detachWindowEvent(i),clearTimeout(this._rightEdgeTimer),e=i.prevEvent,n=this._getOffset([Math.abs(e.velocityX)*(e.offsetX<0?-1:1),Math.abs(e.velocityY)*(e.offsetY<0?-1:1)],[I(6,this._direction),I(c,this._direction)]),i.onRelease(),this._observer.release(this,e,n))},e._attachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.addEventListener(t,e._onPanmove,{passive:!1})}),null!=t&&t.end.forEach(function(t){window.addEventListener(t,e._onPanend,{passive:!1})})},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._attachElementEvent=function(t){var n=this,e=Y(this.options.inputType);e&&(this._observer=t,this._enabled=!0,(this._activeEvent=e).start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._onPanstart)}),e.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._voidFunction)}))},e._detachElementEvent=function(){var n=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._onPanstart)}),null!=t&&t.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._voidFunction)}),this._enabled=!1,this._observer=null},t}(),it=function(i){function t(t,e){var n=i.call(this,t,e)||this;return n._prevQuadrant=null,n._lastDiff=0,n}r(t,i);var e=t.prototype;return e.mapAxes=function(t){this._direction=et.DIRECTION_ALL,this.axes=t},e._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);i&&this.isEnabled()&&(e=this.element.getBoundingClientRect(),this._observer.hold(this,i),this._attachWindowEvent(n),this._coefficientForDistanceToAngle=360/(e.width*Math.PI),this._rotateOrigin=[e.left+(e.width-1)/2,e.top+(e.height-1)/2],this._prevAngle=null,this._triggerChange(i),n.prevEvent=i)},e._onPanmove=function(t){var e=this._activeEvent,n=e.onEventMove(t,this.options.inputButton);n&&this.isEnabled()&&(!1!==n.srcEvent.cancelable&&n.srcEvent.preventDefault(),n.srcEvent.stopPropagation(),this._triggerChange(n),e.prevEvent=n)},e._onPanend=function(t){var e,n,i,s,r=this._activeEvent;r.onEventEnd(t),this.isEnabled()&&(e=r.prevEvent,this._triggerChange(e),n=e.velocityX,i=e.velocityY,s=Math.sqrt(n*n+i*i)*(0<this._lastDiff?-1:1),r.onRelease(),this._observer.release(this,e,[s*this._coefficientForDistanceToAngle]),this._detachWindowEvent(r))},e._triggerChange=function(t){var e=this._getPosFromOrigin(t.center.x,t.center.y),n=e.x,i=e.y,s=O(n,i),r=s<0?360+s:s,o=this._getQuadrant(t.center.x,t.center.y),a=this._getDifference(this._prevAngle,r,this._prevQuadrant,o);this._prevAngle=r,this._prevQuadrant=o,0!==a&&(this._lastDiff=a,this._observer.change(this,t,X(this.axes,[-a])))},e._getDifference=function(t,e,n,i){var s=null===t?0:1===n&&4===i?-t-(360-e):4===n&&1===i?360-t+e:e-t;return s},e._getPosFromOrigin=function(t,e){return{x:t-this._rotateOrigin[0],y:this._rotateOrigin[1]-e}},e._getQuadrant=function(t,e){var n=this._getPosFromOrigin(t,e),i=n.x,s=n.y,r=0;return 0<=i&&0<=s?r=1:i<0&&0<=s?r=2:i<0&&s<0?r=3:0<=i&&s<0&&(r=4),r},t}(nt),st=function(){function t(t,e){this.axes=[],this.element=null,this._pinchFlag=!1,this._enabled=!1,this._activeEvent=null,this.element=p(t),this.options=f({scale:1,threshold:0,inputType:["touch","pointer"],touchAction:"none"},e),this._onPinchStart=this._onPinchStart.bind(this),this._onPinchMove=this._onPinchMove.bind(this),this._onPinchEnd=this._onPinchEnd.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._activeEvent&&this._detachEvent(),this._attachEvent(t),this._originalCssProps=C(this.element,this.options,30),this},e.disconnect=function(){return this._detachEvent(),A(this._originalCssProps)||R(this.element,this._originalCssProps),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._onPinchStart=function(t){var e=this._activeEvent,n=e.onEventStart(t);n&&this._enabled&&2===e.getTouches(t)&&(this._baseValue=this._observer.get(this)[this.axes[0]],this._observer.hold(this,t),this._pinchFlag=!0,e.prevEvent=n)},e._onPinchMove=function(t){var e,n=this._activeEvent,i=n.onEventMove(t);i&&this._pinchFlag&&this._enabled&&2===n.getTouches(t)&&(e=this._getOffset(i.scale,n.prevEvent.scale),this._observer.change(this,t,X(this.axes,[e])),n.prevEvent=i)},e._onPinchEnd=function(t){var e=this._activeEvent;e.onEventEnd(t),!this._pinchFlag||!this._enabled||2<=e.getTouches(t)||(e.onRelease(),this._observer.release(this,t,[0],0),this._baseValue=null,this._pinchFlag=!1)},e._attachEvent=function(t){var e=this,n=Y(this.options.inputType);n&&(this._observer=t,this._enabled=!0,(this._activeEvent=n).start.forEach(function(t){e.element.addEventListener(t,e._onPinchStart,!1)}),n.move.forEach(function(t){e.element.addEventListener(t,e._onPinchMove,!1)}),n.end.forEach(function(t){e.element.addEventListener(t,e._onPinchEnd,!1)}))},e._detachEvent=function(){var e=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){e.element.removeEventListener(t,e._onPinchStart,!1)}),null!=t&&t.move.forEach(function(t){e.element.removeEventListener(t,e._onPinchMove,!1)}),null!=t&&t.end.forEach(function(t){e.element.removeEventListener(t,e._onPinchEnd,!1)}),this._enabled=!1,this._observer=null},e._getOffset=function(t,e){return void 0===e&&(e=1),this._baseValue*(t-e)*this.options.scale},t}(),rt=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=p(t),this.options=f({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=D(!!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&&(0===(e=this._getOffset([t.deltaY,t.deltaX],[I(c,this._direction),I(6,this._direction)]))[0]&&0===e[1]||(t.preventDefault(),this._holding||(this._observer.hold(this,t),this._holding=!0),this._observer.change(this,t,X(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){this._observer=t,this.element.addEventListener("wheel",this._onWheel),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("wheel",this._onWheel),this._enabled=!1,this._observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},t}(),ot=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=p(t),this.options=f({scale:[1,1]},e),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._detachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),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._onKeydown=function(t){if(this._enabled){var e,n=!0,i=1,s=-1;switch(t.keyCode){case 37:case 65:i=-1;break;case 39:case 68:break;case 40:case 83:i=-1,s=1;break;case 38:case 87:s=1;break;default:n=!1}(-1===s&&!this.axes[0]||1===s&&!this.axes[1])&&(n=!1),n&&(t.preventDefault(),e=-1===s?[this.options.scale[0]*i,0]:[0,this.options.scale[1]*i],this._holding||(this._observer.hold(this,t),this._holding=!0),clearTimeout(this._timer),this._observer.change(this,t,X(this.axes,e)))}},e._onKeyup=function(t){var e=this;this._holding&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e._observer.release(e,t,[0,0]),e._holding=!1},80))},e._attachEvent=function(t){this._observer=t,this.element.addEventListener("keydown",this._onKeydown,!1),this.element.addEventListener("keypress",this._onKeydown,!1),this.element.addEventListener("keyup",this._onKeyup,!1),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("keydown",this._onKeydown,!1),this.element.removeEventListener("keypress",this._onKeydown,!1),this.element.removeEventListener("keyup",this._onKeyup,!1),this._enabled=!1,this._observer=null},t}();return et.PanInput=nt,et.RotatePanInput=it,et.PinchInput=st,et.WheelInput=rt,et.MoveKeyInput=ot,et}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@egjs/component"),require("@egjs/agent")):"function"==typeof define&&define.amd?define(["@egjs/component","@egjs/agent"],e):(t.eg=t.eg||{},t.eg.Axes=e(t.eg.Component,t.eg.agent))}(this,function(f,t){"use strict";var i=function(t,e){return(i=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 s(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var g=function(){return(g=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)};var r,e="__observers__",o=function(){function t(t){this._emitter=new f,this._current=t}var e=t.prototype;return Object.defineProperty(e,"current",{get:function(){return this._current},set:function(t){var e=t!==this._current;this._current=t,e&&this._emitter.trigger("update",t)},enumerable:!1,configurable:!0}),e.subscribe=function(t){this._emitter.on("update",t)},e.unsubscribe=function(t){this._emitter.off("update",t)},t}();function a(t){return t[e]||(t[e]={}),t[e]}function p(t,e,n){var i=a(t);return i[e]||(i[e]=new o(n)),i[e]}function n(t){var e=t.prototype;e.subscribe=function(t,e){p(this,t).subscribe(e)},e.unsubscribe=function(t,e){var n,i=this;if(!t)return n=a(this),void Object.keys(n).forEach(function(t){i.unsubscribe(t)});t in this&&p(this,t).unsubscribe(e)}}r="undefined"==typeof window?{navigator:{userAgent:""}}:window;function u(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var h,c,l=24,v="left",_="right",d="middle",m="ontouchstart"in r&&"safari"===t().browser.name,E=function(){if("undefined"==typeof document)return"";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""}(),b={"user-select":"none","-webkit-user-drag":"none"},x=function(t,e){var n,i;return void 0===e&&(e=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((n=document.createElement("div")).innerHTML=t,u(n.childNodes)):u(document.querySelectorAll(t)),e||(i=1<=i.length?i[0]:void 0)):t===r?i=t:"value"in t||"current"in t?i=t.value||t.current:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in r&&t instanceof jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return x(t)}),e||(i=1<=i.length?i[0]:void 0)):i=t,i},y=r.requestAnimationFrame||r.webkitRequestAnimationFrame,M=r.cancelAnimationFrame||r.webkitCancelAnimationFrame;y&&!M?(h={},c=y,y=function(e){var n=c(function(t){h[n]&&e(t)});return h[n]=!0,n},M=function(t){delete h[t]}):y&&M||(y=function(t){return r.setTimeout(function(){t(r.performance&&r.performance.now&&r.performance.now()||(new Date).getTime())},16)},M=r.clearTimeout);function P(t,e){var n={};for(var i in t)i&&(n[i]=e(t[i],i));return n}function T(t,e){var n={};for(var i in t)i&&e(t[i],i)&&(n[i]=t[i]);return n}function O(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function w(t,n){return O(t,function(t,e){return t===n[e]})}function D(t,e){return V[e]||(V[e]=U(e)),V[e](t)}function A(t,n){return t&&n?P(t,function(t,e){return D(t,"number"==typeof n?n:n[e])}):t}function I(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 C(t,e){return 180*Math.atan2(e,t)/Math.PI}function R(e){var n=!0;return Object.keys(b).forEach(function(t){e&&e[t]===b[t]||(n=!1)}),n}function S(t,e){return t&&e?30:t?6:e?l:1}function L(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}function B(e,t,n){var i,s,r,o=((i={})[1]="auto",i[30]="none",i[l]="pan-x",i[6]="pan-y",i),a={};return e&&e.style&&(s=t.touchAction?t.touchAction:o[n],r=g(g({},b),{"touch-action":"none"===e.style["touch-action"]?"none":s}),Object.keys(r).forEach(function(t){a[t]=e.style[t],e.style[t]=r[t]})),a}function j(e,n){e&&e.style&&n&&Object.keys(n).forEach(function(t){e.style[t]=n[t]})}function k(t,e,n,i){var s=t,r=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],s=Math.max(r[0],s);return Math.min(r[1],s)}function X(t,e){return t<e[0]||t>e[1]}function Y(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function F(t,e,n){var i=t,s=e[0],r=e[1],o=r-s;return n[1]&&r<t&&(i=(i-r)%o+s),n[0]&&t<s&&(i=(i-s)%o+r),i}function N(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function W(t){void 0===t&&(t=[]);var e=!1,n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=H;break;case"pointer":i=J}}),i?new nt:e&&n?new it:e?new et:n?new tt:null}function K(t,e,n){return Math.max(Math.min(t,n),e)}var V={},U=function(e){var n=e<1?Math.pow(10,I(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},q=function(){function t(t){this._axes=t}var e=t.prototype;return e.hold=function(t,e){var n=this._getRoundPos(t).roundPos;this._axes.trigger(new f.ComponentEvent("hold",{pos:n,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,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration),this._axes.trigger(new f.ComponentEvent("release",g(g({},t),{bounceRatio:this._getBounceRatio(n)})))},e.triggerChange=function(t,e,n,i){var s=this;void 0===i&&(i=!1);var r=this.animationManager,o=r.axisManager,a=r.getEventInfo(),u=this._getRoundPos(t,e),h=u.roundPos,c=u.roundDepa,l=o.moveTo(h,c),v=(null==n?void 0:n.event)||(null==a?void 0:a.event)||null,_={pos:l.pos,delta:l.delta,bounceRatio:this._getBounceRatio(l.pos),holding:i,inputEvent:v,isTrusted:!!v,input:(null==n?void 0:n.input)||(null==a?void 0:a.input)||null,set:v?this._createUserControll(l.pos):function(){}},d=new f.ComponentEvent("change",_);return this._axes.trigger(d),Object.keys(l.pos).forEach(function(t){var e=l.pos[t];p(s._axes,t,e).current=e}),v&&o.set(_.set().destPos),!d.isCanceled()},e.triggerAnimationStart=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration);var s=new f.ComponentEvent("animationStart",t);return this._axes.trigger(s),!s.isCanceled()},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this._axes.trigger(new f.ComponentEvent("animationEnd",{isTrusted:t}))},e.triggerFinish=function(t){void 0===t&&(t=!1),this._axes.trigger(new f.ComponentEvent("finish",{isTrusted: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:g({},t),duration:e};return function(t,e){return t&&(n.destPos=g({},t)),void 0!==e&&(n.duration=e),n}},e._getRoundPos=function(t,e){var n=this._axes.options.round;return{roundPos:A(t,n),roundDepa:A(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})},t}(),Q=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}(),z=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].range[0],t},{})}var e=t.prototype;return e.getDelta=function(t,e){var n=this.get(t);return P(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},{}):g(g({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=P(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?F(t,e.range,e.circular):0})),{pos:g({},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 O(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this._axis;return T(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this._axis;return P(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!X(t,e.range)})},e.getAxisOptions=function(t){return this._axis[t]},e._complementOptions=function(){var s=this;Object.keys(this._axis).forEach(function(i){s._axis[i]=g({range:[0,100],bounce:[0,0],circular:[!1,!1],startPos:s._axis[i].range[0]},s._axis[i]),["bounce","circular"].forEach(function(t){var e=s._axis,n=e[i][t];/string|number|boolean/.test(typeof n)&&(e[i][t]=[n,n])})})},t}(),H="ontouchstart"in r,G="PointerEvent"in r,Z="MSPointerEvent"in r,J=G||Z,$=function(){function t(){var e=this;this._stopContextMenu=function(t){t.preventDefault(),r.removeEventListener("contextmenu",e._stopContextMenu)}}var e=t.prototype;return e.extendEvent=function(t){var e,n=this.prevEvent,i=this._getCenter(t),s=n?this._getMovement(t):{x:0,y:0},r=n?this._getScale(t):1,o=n?C(i.x-n.center.x,i.y-n.center.y):0,a=n?n.deltaX+s.x:s.x,u=n?n.deltaY+s.y:s.y,h=s.x,c=s.y,l=this._latestInterval,v=Date.now(),_=l?v-l.timestamp:0,d=n?n.velocityX:0,f=n?n.velocityY:0;return(!l||16<=_)&&(l&&(d=(e=[(a-l.deltaX)/_,(u-l.deltaY)/_])[0],f=e[1]),this._latestInterval={timestamp:v,deltaX:a,deltaY:u}),{srcEvent:t,scale:r,angle:o,center:i,deltaX:a,deltaY:u,offsetX:h,offsetY:c,velocityX:d,velocityY:f,preventSystemEvent:!0}},e._getDistance=function(t,e){var n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.sqrt(n*n+i*i)},e._getButton=function(t){var e={1:v,2:_,4:d},n=this._isTouchEvent(t)?v:e[t.buttons];return n||null},e._isTouchEvent=function(t){return-1<t.type.indexOf("touch")},e._isValidButton=function(t,e){return-1<e.indexOf(t)},e._preventMouseButton=function(t,e){e===_?r.addEventListener("contextmenu",this._stopContextMenu):e===d&&t.preventDefault()},t}(),tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown"],t.move=["mousemove"],t.end=["mouseup"],t}s(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(){},n.onRelease=function(){this.prevEvent=null},n.getTouches=function(){return 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}($),et=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}s(t,e);var n=t.prototype;return n.onEventStart=function(t){return this._baseTouches=t.touches,this.extendEvent(t)},n.onEventMove=function(t){return this.extendEvent(t)},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}($),nt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=G?["pointerdown"]:["MSPointerDown"],t.move=G?["pointermove"]:["MSPointerMove"],t.end=G?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],t._firstInputs=[],t._recentInputs=[],t}s(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this._updatePointerEvent(t),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:(this._updatePointerEvent(t),this.extendEvent(t))},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,s=!1;this._recentInputs.forEach(function(t,e){t.pointerId===n.pointerId&&(s=!0,i._recentInputs[e]=n)}),s||(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}($),it=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}s(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return this._isTouchEvent(t)&&(this._baseTouches=t.touches),e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(t){this._isTouchEvent(t)&&(this._baseTouches=t.touches)},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t){return this._isTouchEvent(t)?t.touches.length: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,n=[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}}),i=n[0],s=n[1];return i.id===s.id?{x:i.x-s.x,y:i.y-s.y}:{x:0,y:0}},t}($),st=function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,s=t.axisManager,r=t.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=e,this._interruptManager=n,this._eventManager=i,this._axisManager=s,this._animationManager=r}var e=t.prototype;return e.get=function(t){return this._axisManager.get(t.axes)},e.hold=function(t,e){var n;!this._interruptManager.isInterrupted()&&t.axes.length&&(n={input:t,event:e},this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(n),this._moveDistance||this._eventManager.hold(this._axisManager.get(),n),this._isOutside=this._axisManager.isOutside(t.axes),this._moveDistance=this._axisManager.get(t.axes))},e.change=function(t,e,n,i){var s,r,o,a,u;this._isStopped||!this._interruptManager.isInterrupting()||this._axisManager.every(n,function(t){return 0===t})||((s=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyChanged||(r=this._moveDistance||this._axisManager.get(t.axes),o=P(r,function(t,e){return t+(n[e]||0)}),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,function(t,e){var n=e.circular,i=e.range;return n&&(n[0]||n[1])?F(t,i,n):t})),this._isOutside&&this._axisManager.every(r,function(t,e){return!X(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),a={input:t,event:e},i?(u=this._animationManager.getDuration(o,r),this._animationManager.animateTo(o,u,a)):this._eventManager.triggerChange(o,r,a,!0)||(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))))},e.release=function(t,e,n,i){var s,r,o,a,u,h,c,l,v,_,d;!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance&&((s=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyReleased&&(n=n.map(function(){return 0})),r=this._axisManager.get(t.axes),o=this._axisManager.get(),a=this._animationManager.getDisplacement(n),u=N(t.axes,a),h=this._axisManager.get(this._axisManager.map(u,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?r[n]+t:k(r[n]+t,e.range,e.circular,e.bounce)})),s.__childrenAxesAlreadyReleased=!0,0===(c=this._animationManager.getDuration(h,r,i))&&(h=g({},o)),l={depaPos:o,destPos:h,duration:c,delta:this._axisManager.getDelta(o,h),inputEvent:e,input:t,isTrusted:!0},this._eventManager.triggerRelease(l),this._moveDistance=null,v=this._animationManager.getUserControl(l),d={input:t,event:e},(_=w(v.destPos,o))||0===v.duration?(_||this._eventManager.triggerChange(v.destPos,o,d,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(d):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(v.destPos,v.duration,d))},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],i=e.range[1]+e.bounce[1];return i<t?i:t<n?n:t}):this._axisManager.map(t,function(t,e){var n=e.range[0],i=e.range[1],s=e.bounce,r=e.circular;return r&&(r[0]||r[1])?t:t<n?n-o._animationManager.interpolate(n-t,s[0]):i<t?i+o._animationManager.interpolate(t-i,s[1]):t})},e._isEndofAxis=function(a,u,h){return this._axisManager.every(u,function(t,e,n){return 0===a[n]||u[n]===h[n]&&(i=t,s=e.range,r=e.bounce,!(o=e.circular)[0]&&i===s[0]-r[0]||!o[1]&&i===s[1]+r[1]);var i,s,r,o})},t}(),rt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._useDuration=!0,t}s(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,s,r,o=this._animateParam;o&&(e=(new Date).getTime()-o.startTime,n=(null==t?void 0:t.destPos)||o.destPos,i=(null==t?void 0:t.duration)||o.duration,null!=t&&t.restart||i<=e?this.setTo(n,i-e):(null!=t&&t.destPos&&(s=this.axisManager.get(),this._initialEasingPer=this._prevEasingPer,o.delta=this.axisManager.getDelta(s,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 o=this,a=this._animateParam,u=t.pos,h=a.destPos,c=P(u,function(t,e){return t<=h[e]?1:-1}),l=((new Date).getTime()-a.startTime+this._durationOffset)/a.duration,v=this._easing(l);return{pos:this.axisManager.map(u,function(t,e,n){var i,s=1<=l?h[n]:t+a.delta[n]*(v-o._prevEasingPer)/(1-o._initialEasingPer),r=F(s,e.range,e.circular);return s!==r&&(i=c[n]*(e.range[1]-e.range[0]),h[n]-=i,u[n]-=i),r}),easingPer:this._prevEasingPer=v,finished:1<=v}},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,s=t.axisManager;this._options=e,this.interruptManager=n,this.eventManager=i,this.axisManager=s,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(r,t,e){var n,i,o=this;return i=void 0!==e?e:(n=P(t,function(t,e){return n=Math.abs(t-r[e]),i=o._options.deceleration,(s=Math.sqrt(n/i*2))<100?0:s;var n,i,s}),Object.keys(n).reduce(function(t,e){return Math.max(t,n[e])},-1/0)),K(i,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,i;this._animateParam&&(n=this.axisManager.get(),e=this.axisManager.map(n,function(t,e){return F(t,e.range,e.circular)}),O(e,function(t,e){return n[e]===t})||this.eventManager.triggerChange(e,n,t,!!t),this._animateParam=null,this._raf&&(i=this._raf,M(i)),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();this._animateParam=null;var e=this.axisManager.filter(this.axisManager.get(),function(t,e){return Y(t,e.range,e.circular)});0<Object.keys(e).length&&this.setTo(this.axisManager.map(e,function(t,e){return F(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){var e=t.setTo();return e.destPos=this.axisManager.get(e.destPos),e.duration=K(e.duration,this._options.minimumDuration,this._options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this;this.stopAnimation();var s,r=this._createAnimationParam(t,e,n),o=g({},r.depaPos),a=this.eventManager.triggerAnimationStart(r),u=this.getUserControl(r);!a&&this.axisManager.every(u.destPos,function(t,e){return Y(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!w(u.destPos,o)&&(s=(null==n?void 0:n.event)||null,this._animateLoop({depaPos:o,destPos:u.destPos,duration:u.duration,delta:this.axisManager.getDelta(o,u.destPos),isTrusted:!!s,inputEvent:s,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);if(w(t,i))return this;this.interruptManager.setInterrupt(!0);var s=T(t,function(t,e){return i[e]!==t});return Object.keys(s).length?(s=this.axisManager.map(s,function(t,e){var n=e.range,i=e.circular;return i&&(i[0]||i[1])?t:k(t,n,i)}),w(s,i)||(0<e?this.animateTo(s,e):(this.stopAnimation(),this.eventManager.triggerChange(s),this.finish(!1))),this):this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(P(this.axisManager.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},e._createAnimationParam=function(t,e,n){var i=this.axisManager.get(),s=t,r=(null==n?void 0:n.event)||null;return{depaPos:i,destPos:s,duration:K(e,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,s),inputEvent:r,input:(null==n?void 0:n.input)||null,isTrusted:!!r,done:this.animationEnd}},e._animateLoop=function(t,i){var s,r,o,a=this;t.duration?(this._animateParam=g(g({},t),{startTime:(new Date).getTime()}),s=P(t.destPos,function(t){return t}),r=this._initState(this._animateParam),(o=function(){a._raf=null;var t=a._animateParam,e=a._getNextState(r),n=!a.eventManager.triggerChange(e.pos,r.pos);if((r=e).finished)return t.destPos=a._getFinalPos(t.destPos,s),w(t.destPos,a.axisManager.get(Object.keys(t.destPos)))||a.eventManager.triggerChange(t.destPos,e.pos),void i();n?a.finish(!1):a._raf=y(o)})()):(this.eventManager.triggerChange(t.destPos),i())},e._getFinalPos=function(t,i){var s=this;return P(t,function(t,e){if(t>=i[e]-1e-6&&t<=i[e]+1e-6)return i[e];var n=s._getRoundUnit(t,e);return D(t,n)})},e._getRoundUnit=function(t,e){var n,i,s=this._options.round,r=null;return s||(n=this.axisManager.getAxisOptions(e),i=Math.max(I(n.range[0]),I(n.range[1]),I(t)),r=1/Math.pow(10,i)),r||s},t}()),ot=function(o){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),void 0===n&&(n=null);var r,i,s=o.call(this)||this;return s.axis=t,s._inputs=[],s.options=g({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),s.interruptManager=new Q(s.options),s.axisManager=new z(s.axis),s.eventManager=new q(s),s.animationManager=new rt(s),s.inputObserver=new st(s),s.eventManager.setAnimationManager(s.animationManager),s.eventManager.triggerChange((r=t,i=n,g(g({},Object.keys(r).reduce(function(t,e){var n,i,s;return Object.assign(t,((n={})[e]=null!==(s=null!==(i=r[e].startPos)&&void 0!==i?i:r[e].range[0])&&void 0!==s?s:0,n))},{})),i))),s}s(t,o);var e=t.prototype;return e.connect=function(t,e){var n="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),e.mapAxes(n),e.connect(this.inputObserver),this._inputs.push(e),this},e.disconnect=function(t){var e;return t?0<=(e=this._inputs.indexOf(t))&&(this._inputs[e].disconnect(),this._inputs.splice(e,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 void 0===e&&(e=0),this.animationManager.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.animationManager.setBy(t,e),this},e.stopAnimation=function(){return this.animationManager.stopAnimation(),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.4.0-beta.0",t.TRANSFORM=E,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=l,t.DIRECTION_ALL=30,function(t,e,n,i){var s,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(s=t[a])&&(o=(r<3?s(o):3<r?s(e,n,o):s(e,n))||o);return 3<r&&o&&Object.defineProperty(e,n,o),o}([n],t)}(f),at=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._forceRelease=function(){var t=n._activeEvent,e=t.prevEvent;t.onRelease(),n._observer.release(n,e,[0,0]),n._detachWindowEvent(t)},this._voidFunction=function(){},this.element=x(t),this.options=g({inputType:["touch","mouse","pointer"],inputButton:[v],scale:[1,1],thresholdAngle:45,threshold:0,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=S(!!t[0],!!t[1]),this.axes=t},e.connect=function(t){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(t),this._originalCssProps=B(this.element,this.options,this._direction),this},e.disconnect=function(){return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),R(this._originalCssProps)||j(this.element,this._originalCssProps),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._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);!i||!this._enabled||1<n.getTouches(t)||!1!==i.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this._observer.hold(this,i),this._atRightEdge=m&&i.center.x>window.innerWidth-e,this._attachWindowEvent(n),n.prevEvent=i)},e._onPanmove=function(t){var e=this,n=this._activeEvent,i=n.onEventMove(t,this.options.inputButton);if(i&&this._enabled&&!(1<n.getTouches(t))){var s=this.options,r=s.iOSEdgeSwipeThreshold,o=s.releaseOnScroll,a=function(t,e){if(e<0||90<e)return 1;var n=Math.abs(t);return e<n&&n<180-e?l:6}(i.angle,this.options.thresholdAngle);if(!o||i.srcEvent.cancelable){if(n.prevEvent&&m){if(i.center.x<0)return void this._forceRelease();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),i.deltaX<-r?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout(function(){return e._forceRelease()},100))}var u=this._getOffset([i.offsetX,i.offsetY],[L(6,this._direction,a),L(l,this._direction,a)]),h=u.some(function(t){return 0!==t});h&&(!1!==i.srcEvent.cancelable&&i.srcEvent.preventDefault(),i.srcEvent.stopPropagation()),(i.preventSystemEvent=h)&&this._observer.change(this,i,N(this.axes,u)),n.prevEvent=i}else this._onPanend(t)}},e._onPanend=function(t){var e,n,i=this._activeEvent;i.onEventEnd(t),this._enabled&&0===i.getTouches(t)&&(this._detachWindowEvent(i),clearTimeout(this._rightEdgeTimer),e=i.prevEvent,n=this._getOffset([Math.abs(e.velocityX)*(e.offsetX<0?-1:1),Math.abs(e.velocityY)*(e.offsetY<0?-1:1)],[L(6,this._direction),L(l,this._direction)]),i.onRelease(),this._observer.release(this,e,n))},e._attachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.addEventListener(t,e._onPanmove,{passive:!1})}),null!=t&&t.end.forEach(function(t){window.addEventListener(t,e._onPanend,{passive:!1})})},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._attachElementEvent=function(t){var n=this,e=W(this.options.inputType);e&&(this._observer=t,this._enabled=!0,(this._activeEvent=e).start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._onPanstart)}),e.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._voidFunction)}))},e._detachElementEvent=function(){var n=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._onPanstart)}),null!=t&&t.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._voidFunction)}),this._enabled=!1,this._observer=null},t}(),ut=function(i){function t(t,e){var n=i.call(this,t,e)||this;return n._prevQuadrant=null,n._lastDiff=0,n}s(t,i);var e=t.prototype;return e.mapAxes=function(t){this._direction=ot.DIRECTION_ALL,this.axes=t},e._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);i&&this.isEnabled()&&(e=this.element.getBoundingClientRect(),this._observer.hold(this,i),this._attachWindowEvent(n),this._coefficientForDistanceToAngle=360/(e.width*Math.PI),this._rotateOrigin=[e.left+(e.width-1)/2,e.top+(e.height-1)/2],this._prevAngle=null,this._triggerChange(i),n.prevEvent=i)},e._onPanmove=function(t){var e=this._activeEvent,n=e.onEventMove(t,this.options.inputButton);n&&this.isEnabled()&&(!1!==n.srcEvent.cancelable&&n.srcEvent.preventDefault(),n.srcEvent.stopPropagation(),this._triggerChange(n),e.prevEvent=n)},e._onPanend=function(t){var e,n,i,s,r=this._activeEvent;r.onEventEnd(t),this.isEnabled()&&(e=r.prevEvent,this._triggerChange(e),n=e.velocityX,i=e.velocityY,s=Math.sqrt(n*n+i*i)*(0<this._lastDiff?-1:1),r.onRelease(),this._observer.release(this,e,[s*this._coefficientForDistanceToAngle]),this._detachWindowEvent(r))},e._triggerChange=function(t){var e=this._getPosFromOrigin(t.center.x,t.center.y),n=e.x,i=e.y,s=C(n,i),r=s<0?360+s:s,o=this._getQuadrant(t.center.x,t.center.y),a=this._getDifference(this._prevAngle,r,this._prevQuadrant,o);this._prevAngle=r,this._prevQuadrant=o,0!==a&&(this._lastDiff=a,this._observer.change(this,t,N(this.axes,[-a])))},e._getDifference=function(t,e,n,i){var s=null===t?0:1===n&&4===i?-t-(360-e):4===n&&1===i?360-t+e:e-t;return s},e._getPosFromOrigin=function(t,e){return{x:t-this._rotateOrigin[0],y:this._rotateOrigin[1]-e}},e._getQuadrant=function(t,e){var n=this._getPosFromOrigin(t,e),i=n.x,s=n.y,r=0;return 0<=i&&0<=s?r=1:i<0&&0<=s?r=2:i<0&&s<0?r=3:0<=i&&s<0&&(r=4),r},t}(at),ht=function(){function t(t,e){this.axes=[],this.element=null,this._pinchFlag=!1,this._enabled=!1,this._activeEvent=null,this.element=x(t),this.options=g({scale:1,threshold:0,inputType:["touch","pointer"],touchAction:"none"},e),this._onPinchStart=this._onPinchStart.bind(this),this._onPinchMove=this._onPinchMove.bind(this),this._onPinchEnd=this._onPinchEnd.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._activeEvent&&this._detachEvent(),this._attachEvent(t),this._originalCssProps=B(this.element,this.options,30),this},e.disconnect=function(){return this._detachEvent(),R(this._originalCssProps)||j(this.element,this._originalCssProps),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._onPinchStart=function(t){var e=this._activeEvent,n=e.onEventStart(t);n&&this._enabled&&2===e.getTouches(t)&&(this._baseValue=this._observer.get(this)[this.axes[0]],this._observer.hold(this,t),this._pinchFlag=!0,e.prevEvent=n)},e._onPinchMove=function(t){var e,n=this._activeEvent,i=n.onEventMove(t);i&&this._pinchFlag&&this._enabled&&2===n.getTouches(t)&&(e=this._getOffset(i.scale,n.prevEvent.scale),this._observer.change(this,t,N(this.axes,[e])),n.prevEvent=i)},e._onPinchEnd=function(t){var e=this._activeEvent;e.onEventEnd(t),!this._pinchFlag||!this._enabled||2<=e.getTouches(t)||(e.onRelease(),this._observer.release(this,t,[0],0),this._baseValue=null,this._pinchFlag=!1)},e._attachEvent=function(t){var e=this,n=W(this.options.inputType);n&&(this._observer=t,this._enabled=!0,(this._activeEvent=n).start.forEach(function(t){e.element.addEventListener(t,e._onPinchStart,!1)}),n.move.forEach(function(t){e.element.addEventListener(t,e._onPinchMove,!1)}),n.end.forEach(function(t){e.element.addEventListener(t,e._onPinchEnd,!1)}))},e._detachEvent=function(){var e=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){e.element.removeEventListener(t,e._onPinchStart,!1)}),null!=t&&t.move.forEach(function(t){e.element.removeEventListener(t,e._onPinchMove,!1)}),null!=t&&t.end.forEach(function(t){e.element.removeEventListener(t,e._onPinchEnd,!1)}),this._enabled=!1,this._observer=null},e._getOffset=function(t,e){return void 0===e&&(e=1),this._baseValue*(t-e)*this.options.scale},t}(),ct=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=x(t),this.options=g({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=S(!!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&&(0===(e=this._getOffset([t.deltaY,t.deltaX],[L(l,this._direction),L(6,this._direction)]))[0]&&0===e[1]||(t.preventDefault(),this._holding||(this._observer.hold(this,t),this._holding=!0),this._observer.change(this,t,N(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){this._observer=t,this.element.addEventListener("wheel",this._onWheel),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("wheel",this._onWheel),this._enabled=!1,this._observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},t}(),lt=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=x(t),this.options=g({scale:[1,1]},e),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._detachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),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._onKeydown=function(t){if(this._enabled){var e,n=!0,i=1,s=-1;switch(t.keyCode){case 37:case 65:i=-1;break;case 39:case 68:break;case 40:case 83:i=-1,s=1;break;case 38:case 87:s=1;break;default:n=!1}(-1===s&&!this.axes[0]||1===s&&!this.axes[1])&&(n=!1),n&&(t.preventDefault(),e=-1===s?[this.options.scale[0]*i,0]:[0,this.options.scale[1]*i],this._holding||(this._observer.hold(this,t),this._holding=!0),clearTimeout(this._timer),this._observer.change(this,t,N(this.axes,e)))}},e._onKeyup=function(t){var e=this;this._holding&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e._observer.release(e,t,[0,0]),e._holding=!1},80))},e._attachEvent=function(t){this._observer=t,this.element.addEventListener("keydown",this._onKeydown,!1),this.element.addEventListener("keypress",this._onKeydown,!1),this.element.addEventListener("keyup",this._onKeyup,!1),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("keydown",this._onKeydown,!1),this.element.removeEventListener("keypress",this._onKeydown,!1),this.element.removeEventListener("keyup",this._onKeyup,!1),this._enabled=!1,this._observer=null},t}();return ot.PanInput=at,ot.RotatePanInput=ut,ot.PinchInput=ht,ot.WheelInput=ct,ot.MoveKeyInput=lt,ot}); | ||
//# sourceMappingURL=axes.min.js.map |
/* | ||
Copyright (c) 2015 NAVER Corp. | ||
Copyright (c) NAVER Corp. | ||
name: @egjs/axes | ||
@@ -7,5 +7,5 @@ license: MIT | ||
repository: https://github.com/naver/egjs-axes | ||
version: 3.4.0 | ||
version: 3.4.0-beta.0 | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.eg=t.eg||{},t.eg.Axes=e())}(this,function(){"use strict";var i=function(t,e){return(i=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 s(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var _=function(){return(_=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 c(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 t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(){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,s=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(i=s.next()).done;)o.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}(arguments[e]));return t}function l(t){return void 0===t}var r,a=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=c(Object.keys(e)),s=r.next();!s.done;s=r.next()){var o=s.value;this[o]=e[o]}}catch(t){n={error:t}}finally{try{s&&!s.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}(),t=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 a?e.eventType:e,r=o(this._eventHandler[i]||[]);return r.length<=0||(e instanceof a?(e.currentTarget=this,r.forEach(function(t){t(e)})):r.forEach(function(t){t.apply(void 0,o(n))})),this},e.once=function(n,i){var r,s=this;if("object"==typeof n&&l(i)){var t=n;for(var e in t)this.once(e,t[e]);return this}return"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,o(t)),s.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&l(e)){var n=t;for(var i in n)this.on(i,n[i]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],l(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),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=t;for(var s in r)this.off(s,r[s]);return this}var o=this._eventHandler[t];if(o){var a=0;try{for(var u=c(o),h=u.next();!h.done;h=u.next()){if(h.value===e){o.splice(a,1),o.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="3.0.2",t}(),f=a;function e(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function u(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function h(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function v(t){return t.replace(/_/g,".")}function d(t,r){var s=null,o="-1";return e(t,function(t){var e,n,i=h("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",r);return i&&!t.brand&&(s=t,o=i[3]||"-1",t.versionAlias?o=t.versionAlias:t.versionTest&&(e=t.versionTest.toLowerCase(),n=h("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",r),o=(n?n[3]:"")||o),o=v(o),1)}),{preset:s,version:o}}function n(t,n){return u(t,function(t){var e=t.brand;return h(""+n.test,e.toLowerCase())})}r="undefined"==typeof window?{navigator:{userAgent:""}}:window;var p=[{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"}],g=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",brand:!0}],m=[{test:"applewebkit",id:"webkit"}],E=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],b=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function y(t){var e=function(t){var e=t;if(void 0===e){if("undefined"==typeof navigator||!navigator)return"";e=navigator.userAgent||""}return e.toLowerCase()}(t),n=!!/mobi/g.exec(e),i={name:"unknown",version:"-1",majorVersion:-1,webview:!!d(E,e).preset,chromium:!!d(g,e).preset,webkit:!1},r={name:"unknown",version:"-1",majorVersion:-1},s=d(p,e),o=s.preset,a=s.version,u=d(b,e),h=u.preset,c=u.version;return i.webkit=!i.chromium&&!!d(m,e).preset,h&&(r.name=h.id,r.version=c,r.majorVersion=parseInt(c,10)),o&&(i.name=o.id,i.version=a,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!1}}function x(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var M,w,P,T,O,A,I,D,C,S,R,k,L=24,j="left",B="right",X="middle",Y="ontouchstart"in r&&"safari"===(void 0===M&&function(){if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData){var t=navigator.userAgentData,e=t.brands||t.uaList;return e&&e.length}}()?(O=navigator.userAgentData,A=(O.uaList||O.brands).slice(),I=O.mobile||!1,D=A[0],C={name:D.brand,version:D.version,majorVersion:-1,webkit:!1,webview:e(E,function(t){return n(A,t)}),chromium:e(g,function(t){return n(A,t)})},S={name:"unknown",version:"-1",majorVersion:-1},C.webkit=!C.chromium&&e(m,function(t){return n(A,t)}),w&&(P=w.platform.toLowerCase(),T=u(b,function(t){return new RegExp(""+t.test,"g").exec(P)}),S.name=T?T.id:P,S.version=w.platformVersion),e(p,function(t){var e=n(A,t);return e&&(C.name=t.id,C.version=w?w.uaFullVersion:e.version,1)}),"Linux armv8l"===navigator.platform?S.name="android":C.webkit&&(S.name=I?"ios":"mac"),"ios"===S.name&&C.webview&&(C.version="-1"),S.version=v(S.version),C.version=v(C.version),S.majorVersion=parseInt(S.version,10),C.majorVersion=parseInt(C.version,10),{browser:C,os:S,isMobile:I,isHints:!0}):y(M)).browser.name,F=function(){if("undefined"==typeof document)return"";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""}(),N={"user-select":"none","-webkit-user-drag":"none"},V=function(t,e){var n,i;return void 0===e&&(e=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((n=document.createElement("div")).innerHTML=t,x(n.childNodes)):x(document.querySelectorAll(t)),e||(i=1<=i.length?i[0]:void 0)):t!==r&&(!t.nodeName||1!==t.nodeType&&9!==t.nodeType)?"jQuery"in r&&t instanceof jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return V(t)}),e||(i=1<=i.length?i[0]:void 0)):i=t,i},W=r.requestAnimationFrame||r.webkitRequestAnimationFrame,H=r.cancelAnimationFrame||r.webkitCancelAnimationFrame;W&&!H?(R={},k=W,W=function(e){var n=k(function(t){R[n]&&e(t)});return R[n]=!0,n},H=function(t){delete R[t]}):W&&H||(W=function(t){return r.setTimeout(function(){t(r.performance&&r.performance.now&&r.performance.now()||(new Date).getTime())},16)},H=r.clearTimeout);function K(t,e){var n={};for(var i in t)i&&(n[i]=e(t[i],i));return n}function U(t,e){var n={};for(var i in t)i&&e(t[i],i)&&(n[i]=t[i]);return n}function q(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function Q(t,n){return q(t,function(t,e){return t===n[e]})}function z(t,e){return lt[e]||(lt[e]=vt(e)),lt[e](t)}function G(t,n){return t&&n?K(t,function(t,e){return z(t,"number"==typeof n?n:n[e])}):t}function Z(t){if(!isFinite(t))return 0;var e=""+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 J(t,e){return 180*Math.atan2(e,t)/Math.PI}function $(e){var n=!0;return Object.keys(N).forEach(function(t){e&&e[t]===N[t]||(n=!1)}),n}function tt(t,e){return t&&e?30:t?6:e?L:1}function et(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}function nt(e,t,n){var i,r,s,o=((i={})[1]="auto",i[30]="none",i[L]="pan-x",i[6]="pan-y",i),a={};return e&&e.style&&(r=t.touchAction?t.touchAction:o[n],s=_(_({},N),{"touch-action":"none"===e.style["touch-action"]?"none":r}),Object.keys(s).forEach(function(t){a[t]=e.style[t],e.style[t]=s[t]})),a}function it(e,n){e&&e.style&&n&&Object.keys(n).forEach(function(t){e.style[t]=n[t]})}function rt(t,e,n,i){var r=t,s=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],r=Math.max(s[0],r);return Math.min(s[1],r)}function st(t,e){return t<e[0]||t>e[1]}function ot(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function at(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&s<t&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),i}function ut(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function ht(t){void 0===t&&(t=[]);var e=!1,n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=pt;break;case"pointer":i=Et}}),i?new Mt:e&&n?new wt:e?new xt:n?new yt:null}function ct(t,e,n){return Math.max(Math.min(t,n),e)}var lt={},vt=function(e){var n=e<1?Math.pow(10,Z(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},dt=function(){function t(t){this._axes=t}var e=t.prototype;return e.hold=function(t,e){var n=this._getRoundPos(t).roundPos;this._axes.trigger(new f("hold",{pos:n,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,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration),this._axes.trigger(new f("release",_(_({},t),{bounceRatio:this._getBounceRatio(n)})))},e.triggerChange=function(t,e,n,i){void 0===i&&(i=!1);var r=this.animationManager,s=r.axisManager,o=r.getEventInfo(),a=this._getRoundPos(t,e),u=a.roundPos,h=a.roundDepa,c=s.moveTo(u,h),l=(null==n?void 0:n.event)||(null==o?void 0:o.event)||null,v={pos:c.pos,delta:c.delta,bounceRatio:this._getBounceRatio(c.pos),holding:i,inputEvent:l,isTrusted:!!l,input:(null==n?void 0:n.input)||(null==o?void 0:o.input)||null,set:l?this._createUserControll(c.pos):function(){}},d=new f("change",v);return this._axes.trigger(d),l&&s.set(v.set().destPos),!d.isCanceled()},e.triggerAnimationStart=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration);var r=new f("animationStart",t);return this._axes.trigger(r),!r.isCanceled()},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this._axes.trigger(new f("animationEnd",{isTrusted:t}))},e.triggerFinish=function(t){void 0===t&&(t=!1),this._axes.trigger(new f("finish",{isTrusted: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:_({},t),duration:e};return function(t,e){return t&&(n.destPos=_({},t)),void 0!==e&&(n.duration=e),n}},e._getRoundPos=function(t,e){var n=this._axes.options.round;return{roundPos:G(t,n),roundDepa:G(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})},t}(),ft=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}(),_t=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].range[0],t},{})}var e=t.prototype;return e.getDelta=function(t,e){var n=this.get(t);return K(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},{}):_(_({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=K(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?at(t,e.range,e.circular):0})),{pos:_({},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 q(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this._axis;return U(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this._axis;return K(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!st(t,e.range)})},e.getAxisOptions=function(t){return this._axis[t]},e._complementOptions=function(){var r=this;Object.keys(this._axis).forEach(function(i){r._axis[i]=_({range:[0,100],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}(),pt="ontouchstart"in r,gt="PointerEvent"in r,mt="MSPointerEvent"in r,Et=gt||mt,bt=function(){function t(){var e=this;this._stopContextMenu=function(t){t.preventDefault(),r.removeEventListener("contextmenu",e._stopContextMenu)}}var e=t.prototype;return e.extendEvent=function(t){var e,n=this.prevEvent,i=this._getCenter(t),r=n?this._getMovement(t):{x:0,y:0},s=n?this._getScale(t):1,o=n?J(i.x-n.center.x,i.y-n.center.y):0,a=n?n.deltaX+r.x:r.x,u=n?n.deltaY+r.y:r.y,h=r.x,c=r.y,l=this._latestInterval,v=Date.now(),d=l?v-l.timestamp:0,f=n?n.velocityX:0,_=n?n.velocityY:0;return(!l||16<=d)&&(l&&(f=(e=[(a-l.deltaX)/d,(u-l.deltaY)/d])[0],_=e[1]),this._latestInterval={timestamp:v,deltaX:a,deltaY:u}),{srcEvent:t,scale:s,angle:o,center:i,deltaX:a,deltaY:u,offsetX:h,offsetY:c,velocityX:f,velocityY:_,preventSystemEvent:!0}},e._getDistance=function(t,e){var n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.sqrt(n*n+i*i)},e._getButton=function(t){var e={1:j,2:B,4:X},n=this._isTouchEvent(t)?j:e[t.buttons];return n||null},e._isTouchEvent=function(t){return-1<t.type.indexOf("touch")},e._isValidButton=function(t,e){return-1<e.indexOf(t)},e._preventMouseButton=function(t,e){e===B?r.addEventListener("contextmenu",this._stopContextMenu):e===X&&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}s(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(){},n.onRelease=function(){this.prevEvent=null},n.getTouches=function(){return 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}(bt),xt=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}s(t,e);var n=t.prototype;return n.onEventStart=function(t){return this._baseTouches=t.touches,this.extendEvent(t)},n.onEventMove=function(t){return this.extendEvent(t)},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}(bt),Mt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=gt?["pointerdown"]:["MSPointerDown"],t.move=gt?["pointermove"]:["MSPointerMove"],t.end=gt?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],t._firstInputs=[],t._recentInputs=[],t}s(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this._updatePointerEvent(t),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:(this._updatePointerEvent(t),this.extendEvent(t))},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}(bt),wt=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}s(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return this._isTouchEvent(t)&&(this._baseTouches=t.touches),e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(t){this._isTouchEvent(t)&&(this._baseTouches=t.touches)},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t){return this._isTouchEvent(t)?t.touches.length: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,n=[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}}),i=n[0],r=n[1];return i.id===r.id?{x:i.x-r.x,y:i.y-r.y}:{x:0,y:0}},t}(bt),Pt=function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,r=t.axisManager,s=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=s}var e=t.prototype;return e.get=function(t){return this._axisManager.get(t.axes)},e.hold=function(t,e){var n;!this._interruptManager.isInterrupted()&&t.axes.length&&(n={input:t,event:e},this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(n),this._moveDistance||this._eventManager.hold(this._axisManager.get(),n),this._isOutside=this._axisManager.isOutside(t.axes),this._moveDistance=this._axisManager.get(t.axes))},e.change=function(t,e,n,i){var r,s,o,a,u;this._isStopped||!this._interruptManager.isInterrupting()||this._axisManager.every(n,function(t){return 0===t})||((r=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyChanged||(s=this._moveDistance||this._axisManager.get(t.axes),o=K(s,function(t,e){return t+(n[e]||0)}),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,function(t,e){var n=e.circular,i=e.range;return n&&(n[0]||n[1])?at(t,i,n):t})),this._isOutside&&this._axisManager.every(s,function(t,e){return!st(t,e.range)})&&(this._isOutside=!1),s=this._atOutside(s),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(n,s,o)||(r.__childrenAxesAlreadyChanged=!0),a={input:t,event:e},i?(u=this._animationManager.getDuration(o,s),this._animationManager.animateTo(o,u,a)):this._eventManager.triggerChange(o,s,a,!0)||(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))))},e.release=function(t,e,n,i){var r,s,o,a,u,h,c,l,v,d,f;!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance&&((r=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyReleased&&(n=n.map(function(){return 0})),s=this._axisManager.get(t.axes),o=this._axisManager.get(),a=this._animationManager.getDisplacement(n),u=ut(t.axes,a),h=this._axisManager.get(this._axisManager.map(u,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?s[n]+t:rt(s[n]+t,e.range,e.circular,e.bounce)})),r.__childrenAxesAlreadyReleased=!0,0===(c=this._animationManager.getDuration(h,s,i))&&(h=_({},o)),l={depaPos:o,destPos:h,duration:c,delta:this._axisManager.getDelta(o,h),inputEvent:e,input:t,isTrusted:!0},this._eventManager.triggerRelease(l),this._moveDistance=null,v=this._animationManager.getUserControl(l),f={input:t,event:e},(d=Q(v.destPos,o))||0===v.duration?(d||this._eventManager.triggerChange(v.destPos,o,f,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(f):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(v.destPos,v.duration,f))},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],i=e.range[1]+e.bounce[1];return i<t?i:t<n?n:t}):this._axisManager.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,s=e.circular;return s&&(s[0]||s[1])?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(a,u,h){return this._axisManager.every(u,function(t,e,n){return 0===a[n]||u[n]===h[n]&&(i=t,r=e.range,s=e.bounce,!(o=e.circular)[0]&&i===r[0]-s[0]||!o[1]&&i===r[1]+s[1]);var i,r,s,o})},t}(),Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._useDuration=!0,t}s(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,s,o=this._animateParam;o&&(e=(new Date).getTime()-o.startTime,n=(null==t?void 0:t.destPos)||o.destPos,i=(null==t?void 0:t.duration)||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&&(s=(e+this._durationOffset)/o.duration,this._durationOffset=s*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 o=this,a=this._animateParam,u=t.pos,h=a.destPos,c=K(u,function(t,e){return t<=h[e]?1:-1}),l=((new Date).getTime()-a.startTime+this._durationOffset)/a.duration,v=this._easing(l);return{pos:this.axisManager.map(u,function(t,e,n){var i,r=1<=l?h[n]:t+a.delta[n]*(v-o._prevEasingPer)/(1-o._initialEasingPer),s=at(r,e.range,e.circular);return r!==s&&(i=c[n]*(e.range[1]-e.range[0]),h[n]-=i,u[n]-=i),s}),easingPer:this._prevEasingPer=v,finished:1<=v}},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,r=t.axisManager;this._options=e,this.interruptManager=n,this.eventManager=i,this.axisManager=r,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(s,t,e){var n,i,o=this;return i=void 0!==e?e:(n=K(t,function(t,e){return n=Math.abs(t-s[e]),i=o._options.deceleration,(r=Math.sqrt(n/i*2))<100?0:r;var n,i,r}),Object.keys(n).reduce(function(t,e){return Math.max(t,n[e])},-1/0)),ct(i,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,i;this._animateParam&&(n=this.axisManager.get(),e=this.axisManager.map(n,function(t,e){return at(t,e.range,e.circular)}),q(e,function(t,e){return n[e]===t})||this.eventManager.triggerChange(e,n,t,!!t),this._animateParam=null,this._raf&&(i=this._raf,H(i)),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();this._animateParam=null;var e=this.axisManager.filter(this.axisManager.get(),function(t,e){return ot(t,e.range,e.circular)});0<Object.keys(e).length&&this.setTo(this.axisManager.map(e,function(t,e){return at(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){var e=t.setTo();return e.destPos=this.axisManager.get(e.destPos),e.duration=ct(e.duration,this._options.minimumDuration,this._options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this;this.stopAnimation();var r,s=this._createAnimationParam(t,e,n),o=_({},s.depaPos),a=this.eventManager.triggerAnimationStart(s),u=this.getUserControl(s);!a&&this.axisManager.every(u.destPos,function(t,e){return ot(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!Q(u.destPos,o)&&(r=(null==n?void 0:n.event)||null,this._animateLoop({depaPos:o,destPos:u.destPos,duration:u.duration,delta:this.axisManager.getDelta(o,u.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);if(Q(t,i))return this;this.interruptManager.setInterrupt(!0);var r=U(t,function(t,e){return i[e]!==t});return Object.keys(r).length?(r=this.axisManager.map(r,function(t,e){var n=e.range,i=e.circular;return i&&(i[0]||i[1])?t:rt(t,n,i)}),Q(r,i)||(0<e?this.animateTo(r,e):(this.stopAnimation(),this.eventManager.triggerChange(r),this.finish(!1))),this):this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(K(this.axisManager.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},e._createAnimationParam=function(t,e,n){var i=this.axisManager.get(),r=t,s=(null==n?void 0:n.event)||null;return{depaPos:i,destPos:r,duration:ct(e,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,r),inputEvent:s,input:(null==n?void 0:n.input)||null,isTrusted:!!s,done:this.animationEnd}},e._animateLoop=function(t,i){var r,s,o,a=this;t.duration?(this._animateParam=_(_({},t),{startTime:(new Date).getTime()}),r=K(t.destPos,function(t){return t}),s=this._initState(this._animateParam),(o=function(){a._raf=null;var t=a._animateParam,e=a._getNextState(s),n=!a.eventManager.triggerChange(e.pos,s.pos);if((s=e).finished)return t.destPos=a._getFinalPos(t.destPos,r),Q(t.destPos,a.axisManager.get(Object.keys(t.destPos)))||a.eventManager.triggerChange(t.destPos,e.pos),void i();n?a.finish(!1):a._raf=W(o)})()):(this.eventManager.triggerChange(t.destPos),i())},e._getFinalPos=function(t,i){var r=this;return K(t,function(t,e){if(t>=i[e]-1e-6&&t<=i[e]+1e-6)return i[e];var n=r._getRoundUnit(t,e);return z(t,n)})},e._getRoundUnit=function(t,e){var n,i,r=this._options.round,s=null;return r||(n=this.axisManager.getAxisOptions(e),i=Math.max(Z(n.range[0]),Z(n.range[1]),Z(t)),s=1/Math.pow(10,i)),s||r},t}()),Ot=function(r){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),void 0===n&&(n=null);var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=_({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),i.interruptManager=new ft(i.options),i.axisManager=new _t(i.axis),i.eventManager=new dt(i),i.animationManager=new Tt(i),i.inputObserver=new Pt(i),i.eventManager.setAnimationManager(i.animationManager),n&&i.eventManager.triggerChange(n),i}s(t,r);var e=t.prototype;return e.connect=function(t,e){var n="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),e.mapAxes(n),e.connect(this.inputObserver),this._inputs.push(e),this},e.disconnect=function(t){var e;return t?0<=(e=this._inputs.indexOf(t))&&(this._inputs[e].disconnect(),this._inputs.splice(e,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 void 0===e&&(e=0),this.animationManager.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.animationManager.setBy(t,e),this},e.stopAnimation=function(){return this.animationManager.stopAnimation(),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.4.0",t.TRANSFORM=F,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=L,t.DIRECTION_ALL=30,t}(t),At=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._forceRelease=function(){var t=n._activeEvent,e=t.prevEvent;t.onRelease(),n._observer.release(n,e,[0,0]),n._detachWindowEvent(t)},this._voidFunction=function(){},this.element=V(t),this.options=_({inputType:["touch","mouse","pointer"],inputButton:[j],scale:[1,1],thresholdAngle:45,threshold:0,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=tt(!!t[0],!!t[1]),this.axes=t},e.connect=function(t){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(t),this._originalCssProps=nt(this.element,this.options,this._direction),this},e.disconnect=function(){return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),$(this._originalCssProps)||it(this.element,this._originalCssProps),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._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);!i||!this._enabled||1<n.getTouches(t)||!1!==i.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this._observer.hold(this,i),this._atRightEdge=Y&&i.center.x>window.innerWidth-e,this._attachWindowEvent(n),n.prevEvent=i)},e._onPanmove=function(t){var e=this,n=this._activeEvent,i=n.onEventMove(t,this.options.inputButton);if(i&&this._enabled&&!(1<n.getTouches(t))){var r=this.options,s=r.iOSEdgeSwipeThreshold,o=r.releaseOnScroll,a=function(t,e){if(e<0||90<e)return 1;var n=Math.abs(t);return e<n&&n<180-e?L:6}(i.angle,this.options.thresholdAngle);if(!o||i.srcEvent.cancelable){if(n.prevEvent&&Y){if(i.center.x<0)return void this._forceRelease();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),i.deltaX<-s?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout(function(){return e._forceRelease()},100))}var u=this._getOffset([i.offsetX,i.offsetY],[et(6,this._direction,a),et(L,this._direction,a)]),h=u.some(function(t){return 0!==t});h&&(!1!==i.srcEvent.cancelable&&i.srcEvent.preventDefault(),i.srcEvent.stopPropagation()),(i.preventSystemEvent=h)&&this._observer.change(this,i,ut(this.axes,u)),n.prevEvent=i}else this._onPanend(t)}},e._onPanend=function(t){var e,n,i=this._activeEvent;i.onEventEnd(t),this._enabled&&0===i.getTouches(t)&&(this._detachWindowEvent(i),clearTimeout(this._rightEdgeTimer),e=i.prevEvent,n=this._getOffset([Math.abs(e.velocityX)*(e.offsetX<0?-1:1),Math.abs(e.velocityY)*(e.offsetY<0?-1:1)],[et(6,this._direction),et(L,this._direction)]),i.onRelease(),this._observer.release(this,e,n))},e._attachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.addEventListener(t,e._onPanmove,{passive:!1})}),null!=t&&t.end.forEach(function(t){window.addEventListener(t,e._onPanend,{passive:!1})})},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._attachElementEvent=function(t){var n=this,e=ht(this.options.inputType);e&&(this._observer=t,this._enabled=!0,(this._activeEvent=e).start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._onPanstart)}),e.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._voidFunction)}))},e._detachElementEvent=function(){var n=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._onPanstart)}),null!=t&&t.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._voidFunction)}),this._enabled=!1,this._observer=null},t}(),It=function(i){function t(t,e){var n=i.call(this,t,e)||this;return n._prevQuadrant=null,n._lastDiff=0,n}s(t,i);var e=t.prototype;return e.mapAxes=function(t){this._direction=Ot.DIRECTION_ALL,this.axes=t},e._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);i&&this.isEnabled()&&(e=this.element.getBoundingClientRect(),this._observer.hold(this,i),this._attachWindowEvent(n),this._coefficientForDistanceToAngle=360/(e.width*Math.PI),this._rotateOrigin=[e.left+(e.width-1)/2,e.top+(e.height-1)/2],this._prevAngle=null,this._triggerChange(i),n.prevEvent=i)},e._onPanmove=function(t){var e=this._activeEvent,n=e.onEventMove(t,this.options.inputButton);n&&this.isEnabled()&&(!1!==n.srcEvent.cancelable&&n.srcEvent.preventDefault(),n.srcEvent.stopPropagation(),this._triggerChange(n),e.prevEvent=n)},e._onPanend=function(t){var e,n,i,r,s=this._activeEvent;s.onEventEnd(t),this.isEnabled()&&(e=s.prevEvent,this._triggerChange(e),n=e.velocityX,i=e.velocityY,r=Math.sqrt(n*n+i*i)*(0<this._lastDiff?-1:1),s.onRelease(),this._observer.release(this,e,[r*this._coefficientForDistanceToAngle]),this._detachWindowEvent(s))},e._triggerChange=function(t){var e=this._getPosFromOrigin(t.center.x,t.center.y),n=e.x,i=e.y,r=J(n,i),s=r<0?360+r:r,o=this._getQuadrant(t.center.x,t.center.y),a=this._getDifference(this._prevAngle,s,this._prevQuadrant,o);this._prevAngle=s,this._prevQuadrant=o,0!==a&&(this._lastDiff=a,this._observer.change(this,t,ut(this.axes,[-a])))},e._getDifference=function(t,e,n,i){var r=null===t?0:1===n&&4===i?-t-(360-e):4===n&&1===i?360-t+e:e-t;return r},e._getPosFromOrigin=function(t,e){return{x:t-this._rotateOrigin[0],y:this._rotateOrigin[1]-e}},e._getQuadrant=function(t,e){var n=this._getPosFromOrigin(t,e),i=n.x,r=n.y,s=0;return 0<=i&&0<=r?s=1:i<0&&0<=r?s=2:i<0&&r<0?s=3:0<=i&&r<0&&(s=4),s},t}(At),Dt=function(){function t(t,e){this.axes=[],this.element=null,this._pinchFlag=!1,this._enabled=!1,this._activeEvent=null,this.element=V(t),this.options=_({scale:1,threshold:0,inputType:["touch","pointer"],touchAction:"none"},e),this._onPinchStart=this._onPinchStart.bind(this),this._onPinchMove=this._onPinchMove.bind(this),this._onPinchEnd=this._onPinchEnd.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._activeEvent&&this._detachEvent(),this._attachEvent(t),this._originalCssProps=nt(this.element,this.options,30),this},e.disconnect=function(){return this._detachEvent(),$(this._originalCssProps)||it(this.element,this._originalCssProps),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._onPinchStart=function(t){var e=this._activeEvent,n=e.onEventStart(t);n&&this._enabled&&2===e.getTouches(t)&&(this._baseValue=this._observer.get(this)[this.axes[0]],this._observer.hold(this,t),this._pinchFlag=!0,e.prevEvent=n)},e._onPinchMove=function(t){var e,n=this._activeEvent,i=n.onEventMove(t);i&&this._pinchFlag&&this._enabled&&2===n.getTouches(t)&&(e=this._getOffset(i.scale,n.prevEvent.scale),this._observer.change(this,t,ut(this.axes,[e])),n.prevEvent=i)},e._onPinchEnd=function(t){var e=this._activeEvent;e.onEventEnd(t),!this._pinchFlag||!this._enabled||2<=e.getTouches(t)||(e.onRelease(),this._observer.release(this,t,[0],0),this._baseValue=null,this._pinchFlag=!1)},e._attachEvent=function(t){var e=this,n=ht(this.options.inputType);n&&(this._observer=t,this._enabled=!0,(this._activeEvent=n).start.forEach(function(t){e.element.addEventListener(t,e._onPinchStart,!1)}),n.move.forEach(function(t){e.element.addEventListener(t,e._onPinchMove,!1)}),n.end.forEach(function(t){e.element.addEventListener(t,e._onPinchEnd,!1)}))},e._detachEvent=function(){var e=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){e.element.removeEventListener(t,e._onPinchStart,!1)}),null!=t&&t.move.forEach(function(t){e.element.removeEventListener(t,e._onPinchMove,!1)}),null!=t&&t.end.forEach(function(t){e.element.removeEventListener(t,e._onPinchEnd,!1)}),this._enabled=!1,this._observer=null},e._getOffset=function(t,e){return void 0===e&&(e=1),this._baseValue*(t-e)*this.options.scale},t}(),Ct=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=V(t),this.options=_({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=tt(!!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&&(0===(e=this._getOffset([t.deltaY,t.deltaX],[et(L,this._direction),et(6,this._direction)]))[0]&&0===e[1]||(t.preventDefault(),this._holding||(this._observer.hold(this,t),this._holding=!0),this._observer.change(this,t,ut(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){this._observer=t,this.element.addEventListener("wheel",this._onWheel),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("wheel",this._onWheel),this._enabled=!1,this._observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},t}(),St=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=V(t),this.options=_({scale:[1,1]},e),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._detachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),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._onKeydown=function(t){if(this._enabled){var e,n=!0,i=1,r=-1;switch(t.keyCode){case 37:case 65:i=-1;break;case 39:case 68:break;case 40:case 83:i=-1,r=1;break;case 38:case 87:r=1;break;default:n=!1}(-1===r&&!this.axes[0]||1===r&&!this.axes[1])&&(n=!1),n&&(t.preventDefault(),e=-1===r?[this.options.scale[0]*i,0]:[0,this.options.scale[1]*i],this._holding||(this._observer.hold(this,t),this._holding=!0),clearTimeout(this._timer),this._observer.change(this,t,ut(this.axes,e)))}},e._onKeyup=function(t){var e=this;this._holding&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e._observer.release(e,t,[0,0]),e._holding=!1},80))},e._attachEvent=function(t){this._observer=t,this.element.addEventListener("keydown",this._onKeydown,!1),this.element.addEventListener("keypress",this._onKeydown,!1),this.element.addEventListener("keyup",this._onKeyup,!1),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("keydown",this._onKeydown,!1),this.element.removeEventListener("keypress",this._onKeydown,!1),this.element.removeEventListener("keyup",this._onKeyup,!1),this._enabled=!1,this._observer=null},t}();return Ot.PanInput=At,Ot.RotatePanInput=It,Ot.PinchInput=Dt,Ot.WheelInput=Ct,Ot.MoveKeyInput=St,Ot}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.eg=t.eg||{},t.eg.Axes=e())}(this,function(){"use strict";var i=function(t,e){return(i=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 r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var _=function(){return(_=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 c(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 t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(){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,s=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(i=s.next()).done;)o.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}(arguments[e]));return t}function l(t){return void 0===t}var s,a=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=c(Object.keys(e)),s=r.next();!s.done;s=r.next()){var o=s.value;this[o]=e[o]}}catch(t){n={error:t}}finally{try{s&&!s.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}(),n=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 a?e.eventType:e,r=o(this._eventHandler[i]||[]);return r.length<=0||(e instanceof a?(e.currentTarget=this,r.forEach(function(t){t(e)})):r.forEach(function(t){t.apply(void 0,o(n))})),this},e.once=function(n,i){var r,s=this;if("object"==typeof n&&l(i)){var t=n;for(var e in t)this.once(e,t[e]);return this}return"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,o(t)),s.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&l(e)){var n=t;for(var i in n)this.on(i,n[i]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],l(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),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=t;for(var s in r)this.off(s,r[s]);return this}var o=this._eventHandler[t];if(o){var a=0;try{for(var u=c(o),h=u.next();!h.done;h=u.next()){if(h.value===e){o.splice(a,1),o.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="3.0.2",t}(),p=a,e="__observers__",u=function(){function t(t){this._emitter=new n,this._current=t}var e=t.prototype;return Object.defineProperty(e,"current",{get:function(){return this._current},set:function(t){var e=t!==this._current;this._current=t,e&&this._emitter.trigger("update",t)},enumerable:!1,configurable:!0}),e.subscribe=function(t){this._emitter.on("update",t)},e.unsubscribe=function(t){this._emitter.off("update",t)},t}();function h(t){return t[e]||(t[e]={}),t[e]}function g(t,e,n){var i=h(t);return i[e]||(i[e]=new u(n)),i[e]}function v(t){var e=t.prototype;e.subscribe=function(t,e){g(this,t).subscribe(e)},e.unsubscribe=function(t,e){var n,i=this;if(!t)return n=h(this),void Object.keys(n).forEach(function(t){i.unsubscribe(t)});t in this&&g(this,t).unsubscribe(e)}}function d(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function f(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function m(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function E(t){return t.replace(/_/g,".")}function b(t,r){var s=null,o="-1";return d(t,function(t){var e,n,i=m("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",r);return i&&!t.brand&&(s=t,o=i[3]||"-1",t.versionAlias?o=t.versionAlias:t.versionTest&&(e=t.versionTest.toLowerCase(),n=m("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",r),o=(n?n[3]:"")||o),o=E(o),1)}),{preset:s,version:o}}function y(t,n){return f(t,function(t){var e=t.brand;return m(""+n.test,e.toLowerCase())})}s="undefined"==typeof window?{navigator:{userAgent:""}}:window;var x=[{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"}],M=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",brand:!0}],w=[{test:"applewebkit",id:"webkit"}],P=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],T=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function t(t){var e=function(t){var e=t;if(void 0===e){if("undefined"==typeof navigator||!navigator)return"";e=navigator.userAgent||""}return e.toLowerCase()}(t),n=!!/mobi/g.exec(e),i={name:"unknown",version:"-1",majorVersion:-1,webview:!!b(P,e).preset,chromium:!!b(M,e).preset,webkit:!1},r={name:"unknown",version:"-1",majorVersion:-1},s=b(x,e),o=s.preset,a=s.version,u=b(T,e),h=u.preset,c=u.version;return i.webkit=!i.chromium&&!!b(w,e).preset,h&&(r.name=h.id,r.version=c,r.majorVersion=parseInt(c,10)),o&&(i.name=o.id,i.version=a,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:n,isHints:!1}}function O(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var A,I,D,C,R,S,k,j,L,B,X,Y,F=24,N="left",V="right",W="middle",H="ontouchstart"in s&&"safari"===(void 0===A&&function(){if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData){var t=navigator.userAgentData,e=t.brands||t.uaList;return e&&e.length}}()?(R=navigator.userAgentData,S=(R.uaList||R.brands).slice(),k=R.mobile||!1,j=S[0],L={name:j.brand,version:j.version,majorVersion:-1,webkit:!1,webview:d(P,function(t){return y(S,t)}),chromium:d(M,function(t){return y(S,t)})},B={name:"unknown",version:"-1",majorVersion:-1},L.webkit=!L.chromium&&d(w,function(t){return y(S,t)}),I&&(D=I.platform.toLowerCase(),C=f(T,function(t){return new RegExp(""+t.test,"g").exec(D)}),B.name=C?C.id:D,B.version=I.platformVersion),d(x,function(t){var e=y(S,t);return e&&(L.name=t.id,L.version=I?I.uaFullVersion:e.version,1)}),"Linux armv8l"===navigator.platform?B.name="android":L.webkit&&(B.name=k?"ios":"mac"),"ios"===B.name&&L.webview&&(L.version="-1"),B.version=E(B.version),L.version=E(L.version),B.majorVersion=parseInt(B.version,10),L.majorVersion=parseInt(L.version,10),{browser:L,os:B,isMobile:k,isHints:!0}):t(A)).browser.name,K=function(){if("undefined"==typeof document)return"";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""}(),U={"user-select":"none","-webkit-user-drag":"none"},q=function(t,e){var n,i;return void 0===e&&(e=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((n=document.createElement("div")).innerHTML=t,O(n.childNodes)):O(document.querySelectorAll(t)),e||(i=1<=i.length?i[0]:void 0)):t===s?i=t:"value"in t||"current"in t?i=t.value||t.current:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in s&&t instanceof jQuery||t.constructor.prototype.jquery?i=e?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return q(t)}),e||(i=1<=i.length?i[0]:void 0)):i=t,i},Q=s.requestAnimationFrame||s.webkitRequestAnimationFrame,z=s.cancelAnimationFrame||s.webkitCancelAnimationFrame;Q&&!z?(X={},Y=Q,Q=function(e){var n=Y(function(t){X[n]&&e(t)});return X[n]=!0,n},z=function(t){delete X[t]}):Q&&z||(Q=function(t){return s.setTimeout(function(){t(s.performance&&s.performance.now&&s.performance.now()||(new Date).getTime())},16)},z=s.clearTimeout);function G(t,e){var n={};for(var i in t)i&&(n[i]=e(t[i],i));return n}function Z(t,e){var n={};for(var i in t)i&&e(t[i],i)&&(n[i]=t[i]);return n}function J(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function $(t,n){return J(t,function(t,e){return t===n[e]})}function tt(t,e){return pt[e]||(pt[e]=gt(e)),pt[e](t)}function et(t,n){return t&&n?G(t,function(t,e){return tt(t,"number"==typeof n?n:n[e])}):t}function nt(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 it(t,e){return 180*Math.atan2(e,t)/Math.PI}function rt(e){var n=!0;return Object.keys(U).forEach(function(t){e&&e[t]===U[t]||(n=!1)}),n}function st(t,e){return t&&e?30:t?6:e?F:1}function ot(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}function at(e,t,n){var i,r,s,o=((i={})[1]="auto",i[30]="none",i[F]="pan-x",i[6]="pan-y",i),a={};return e&&e.style&&(r=t.touchAction?t.touchAction:o[n],s=_(_({},U),{"touch-action":"none"===e.style["touch-action"]?"none":r}),Object.keys(s).forEach(function(t){a[t]=e.style[t],e.style[t]=s[t]})),a}function ut(e,n){e&&e.style&&n&&Object.keys(n).forEach(function(t){e.style[t]=n[t]})}function ht(t,e,n,i){var r=t,s=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],r=Math.max(s[0],r);return Math.min(s[1],r)}function ct(t,e){return t<e[0]||t>e[1]}function lt(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function vt(t,e,n){var i=t,r=e[0],s=e[1],o=s-r;return n[1]&&s<t&&(i=(i-s)%o+r),n[0]&&t<r&&(i=(i-r)%o+s),i}function dt(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function ft(t){void 0===t&&(t=[]);var e=!1,n=!1,i=!1;return t.forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=yt;break;case"pointer":i=wt}}),i?new At:e&&n?new It:e?new Ot:n?new Tt:null}function _t(t,e,n){return Math.max(Math.min(t,n),e)}var pt={},gt=function(e){var n=e<1?Math.pow(10,nt(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},mt=function(){function t(t){this._axes=t}var e=t.prototype;return e.hold=function(t,e){var n=this._getRoundPos(t).roundPos;this._axes.trigger(new p("hold",{pos:n,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,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration),this._axes.trigger(new p("release",_(_({},t),{bounceRatio:this._getBounceRatio(n)})))},e.triggerChange=function(t,e,n,i){var r=this;void 0===i&&(i=!1);var s=this.animationManager,o=s.axisManager,a=s.getEventInfo(),u=this._getRoundPos(t,e),h=u.roundPos,c=u.roundDepa,l=o.moveTo(h,c),v=(null==n?void 0:n.event)||(null==a?void 0:a.event)||null,d={pos:l.pos,delta:l.delta,bounceRatio:this._getBounceRatio(l.pos),holding:i,inputEvent:v,isTrusted:!!v,input:(null==n?void 0:n.input)||(null==a?void 0:a.input)||null,set:v?this._createUserControll(l.pos):function(){}},f=new p("change",d);return this._axes.trigger(f),Object.keys(l.pos).forEach(function(t){var e=l.pos[t];g(r._axes,t,e).current=e}),v&&o.set(d.set().destPos),!f.isCanceled()},e.triggerAnimationStart=function(t){var e=this._getRoundPos(t.destPos,t.depaPos),n=e.roundPos,i=e.roundDepa;t.destPos=n,t.depaPos=i,t.setTo=this._createUserControll(t.destPos,t.duration);var r=new p("animationStart",t);return this._axes.trigger(r),!r.isCanceled()},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this._axes.trigger(new p("animationEnd",{isTrusted:t}))},e.triggerFinish=function(t){void 0===t&&(t=!1),this._axes.trigger(new p("finish",{isTrusted: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:_({},t),duration:e};return function(t,e){return t&&(n.destPos=_({},t)),void 0!==e&&(n.duration=e),n}},e._getRoundPos=function(t,e){var n=this._axes.options.round;return{roundPos:et(t,n),roundDepa:et(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})},t}(),Et=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}(),bt=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].range[0],t},{})}var e=t.prototype;return e.getDelta=function(t,e){var n=this.get(t);return G(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},{}):_(_({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=G(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?vt(t,e.range,e.circular):0})),{pos:_({},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 J(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this._axis;return Z(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this._axis;return G(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!ct(t,e.range)})},e.getAxisOptions=function(t){return this._axis[t]},e._complementOptions=function(){var r=this;Object.keys(this._axis).forEach(function(i){r._axis[i]=_({range:[0,100],bounce:[0,0],circular:[!1,!1],startPos:r._axis[i].range[0]},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}(),yt="ontouchstart"in s,xt="PointerEvent"in s,Mt="MSPointerEvent"in s,wt=xt||Mt,Pt=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,n=this.prevEvent,i=this._getCenter(t),r=n?this._getMovement(t):{x:0,y:0},s=n?this._getScale(t):1,o=n?it(i.x-n.center.x,i.y-n.center.y):0,a=n?n.deltaX+r.x:r.x,u=n?n.deltaY+r.y:r.y,h=r.x,c=r.y,l=this._latestInterval,v=Date.now(),d=l?v-l.timestamp:0,f=n?n.velocityX:0,_=n?n.velocityY:0;return(!l||16<=d)&&(l&&(f=(e=[(a-l.deltaX)/d,(u-l.deltaY)/d])[0],_=e[1]),this._latestInterval={timestamp:v,deltaX:a,deltaY:u}),{srcEvent:t,scale:s,angle:o,center:i,deltaX:a,deltaY:u,offsetX:h,offsetY:c,velocityX:f,velocityY:_,preventSystemEvent:!0}},e._getDistance=function(t,e){var n=e.clientX-t.clientX,i=e.clientY-t.clientY;return Math.sqrt(n*n+i*i)},e._getButton=function(t){var e={1:N,2:V,4:W},n=this._isTouchEvent(t)?N:e[t.buttons];return n||null},e._isTouchEvent=function(t){return-1<t.type.indexOf("touch")},e._isValidButton=function(t,e){return-1<e.indexOf(t)},e._preventMouseButton=function(t,e){e===V?s.addEventListener("contextmenu",this._stopContextMenu):e===W&&t.preventDefault()},t}(),Tt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=["mousedown"],t.move=["mousemove"],t.end=["mouseup"],t}r(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(){},n.onRelease=function(){this.prevEvent=null},n.getTouches=function(){return 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}(Pt),Ot=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}r(t,e);var n=t.prototype;return n.onEventStart=function(t){return this._baseTouches=t.touches,this.extendEvent(t)},n.onEventMove=function(t){return this.extendEvent(t)},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}(Pt),At=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=xt?["pointerdown"]:["MSPointerDown"],t.move=xt?["pointermove"]:["MSPointerMove"],t.end=xt?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],t._firstInputs=[],t._recentInputs=[],t}r(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this._updatePointerEvent(t),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:(this._updatePointerEvent(t),this.extendEvent(t))},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}(Pt),It=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}r(t,e);var n=t.prototype;return n.onEventStart=function(t,e){var n=this._getButton(t);return this._isTouchEvent(t)&&(this._baseTouches=t.touches),e&&!this._isValidButton(n,e)?null:(this._preventMouseButton(t,n),this.extendEvent(t))},n.onEventMove=function(t,e){return e&&!this._isValidButton(this._getButton(t),e)?null:this.extendEvent(t)},n.onEventEnd=function(t){this._isTouchEvent(t)&&(this._baseTouches=t.touches)},n.onRelease=function(){this.prevEvent=null,this._baseTouches=null},n.getTouches=function(t){return this._isTouchEvent(t)?t.touches.length: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,n=[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}}),i=n[0],r=n[1];return i.id===r.id?{x:i.x-r.x,y:i.y-r.y}:{x:0,y:0}},t}(Pt),Dt=function(){function t(t){var e=t.options,n=t.interruptManager,i=t.eventManager,r=t.axisManager,s=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=s}var e=t.prototype;return e.get=function(t){return this._axisManager.get(t.axes)},e.hold=function(t,e){var n;!this._interruptManager.isInterrupted()&&t.axes.length&&(n={input:t,event:e},this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(n),this._moveDistance||this._eventManager.hold(this._axisManager.get(),n),this._isOutside=this._axisManager.isOutside(t.axes),this._moveDistance=this._axisManager.get(t.axes))},e.change=function(t,e,n,i){var r,s,o,a,u;this._isStopped||!this._interruptManager.isInterrupting()||this._axisManager.every(n,function(t){return 0===t})||((r=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyChanged||(s=this._moveDistance||this._axisManager.get(t.axes),o=G(s,function(t,e){return t+(n[e]||0)}),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,function(t,e){var n=e.circular,i=e.range;return n&&(n[0]||n[1])?vt(t,i,n):t})),this._isOutside&&this._axisManager.every(s,function(t,e){return!ct(t,e.range)})&&(this._isOutside=!1),s=this._atOutside(s),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(n,s,o)||(r.__childrenAxesAlreadyChanged=!0),a={input:t,event:e},i?(u=this._animationManager.getDuration(o,s),this._animationManager.animateTo(o,u,a)):this._eventManager.triggerChange(o,s,a,!0)||(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))))},e.release=function(t,e,n,i){var r,s,o,a,u,h,c,l,v,d,f;!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance&&((r=e.srcEvent?e.srcEvent:e).__childrenAxesAlreadyReleased&&(n=n.map(function(){return 0})),s=this._axisManager.get(t.axes),o=this._axisManager.get(),a=this._animationManager.getDisplacement(n),u=dt(t.axes,a),h=this._axisManager.get(this._axisManager.map(u,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?s[n]+t:ht(s[n]+t,e.range,e.circular,e.bounce)})),r.__childrenAxesAlreadyReleased=!0,0===(c=this._animationManager.getDuration(h,s,i))&&(h=_({},o)),l={depaPos:o,destPos:h,duration:c,delta:this._axisManager.getDelta(o,h),inputEvent:e,input:t,isTrusted:!0},this._eventManager.triggerRelease(l),this._moveDistance=null,v=this._animationManager.getUserControl(l),f={input:t,event:e},(d=$(v.destPos,o))||0===v.duration?(d||this._eventManager.triggerChange(v.destPos,o,f,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(f):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(v.destPos,v.duration,f))},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],i=e.range[1]+e.bounce[1];return i<t?i:t<n?n:t}):this._axisManager.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,s=e.circular;return s&&(s[0]||s[1])?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(a,u,h){return this._axisManager.every(u,function(t,e,n){return 0===a[n]||u[n]===h[n]&&(i=t,r=e.range,s=e.bounce,!(o=e.circular)[0]&&i===r[0]-s[0]||!o[1]&&i===r[1]+s[1]);var i,r,s,o})},t}(),Ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._useDuration=!0,t}r(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,s,o=this._animateParam;o&&(e=(new Date).getTime()-o.startTime,n=(null==t?void 0:t.destPos)||o.destPos,i=(null==t?void 0:t.duration)||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&&(s=(e+this._durationOffset)/o.duration,this._durationOffset=s*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 o=this,a=this._animateParam,u=t.pos,h=a.destPos,c=G(u,function(t,e){return t<=h[e]?1:-1}),l=((new Date).getTime()-a.startTime+this._durationOffset)/a.duration,v=this._easing(l);return{pos:this.axisManager.map(u,function(t,e,n){var i,r=1<=l?h[n]:t+a.delta[n]*(v-o._prevEasingPer)/(1-o._initialEasingPer),s=vt(r,e.range,e.circular);return r!==s&&(i=c[n]*(e.range[1]-e.range[0]),h[n]-=i,u[n]-=i),s}),easingPer:this._prevEasingPer=v,finished:1<=v}},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,r=t.axisManager;this._options=e,this.interruptManager=n,this.eventManager=i,this.axisManager=r,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(s,t,e){var n,i,o=this;return i=void 0!==e?e:(n=G(t,function(t,e){return n=Math.abs(t-s[e]),i=o._options.deceleration,(r=Math.sqrt(n/i*2))<100?0:r;var n,i,r}),Object.keys(n).reduce(function(t,e){return Math.max(t,n[e])},-1/0)),_t(i,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,i;this._animateParam&&(n=this.axisManager.get(),e=this.axisManager.map(n,function(t,e){return vt(t,e.range,e.circular)}),J(e,function(t,e){return n[e]===t})||this.eventManager.triggerChange(e,n,t,!!t),this._animateParam=null,this._raf&&(i=this._raf,z(i)),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();this._animateParam=null;var e=this.axisManager.filter(this.axisManager.get(),function(t,e){return lt(t,e.range,e.circular)});0<Object.keys(e).length&&this.setTo(this.axisManager.map(e,function(t,e){return vt(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){var e=t.setTo();return e.destPos=this.axisManager.get(e.destPos),e.duration=_t(e.duration,this._options.minimumDuration,this._options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this;this.stopAnimation();var r,s=this._createAnimationParam(t,e,n),o=_({},s.depaPos),a=this.eventManager.triggerAnimationStart(s),u=this.getUserControl(s);!a&&this.axisManager.every(u.destPos,function(t,e){return lt(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!$(u.destPos,o)&&(r=(null==n?void 0:n.event)||null,this._animateLoop({depaPos:o,destPos:u.destPos,duration:u.duration,delta:this.axisManager.getDelta(o,u.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);if($(t,i))return this;this.interruptManager.setInterrupt(!0);var r=Z(t,function(t,e){return i[e]!==t});return Object.keys(r).length?(r=this.axisManager.map(r,function(t,e){var n=e.range,i=e.circular;return i&&(i[0]||i[1])?t:ht(t,n,i)}),$(r,i)||(0<e?this.animateTo(r,e):(this.stopAnimation(),this.eventManager.triggerChange(r),this.finish(!1))),this):this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(G(this.axisManager.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},e._createAnimationParam=function(t,e,n){var i=this.axisManager.get(),r=t,s=(null==n?void 0:n.event)||null;return{depaPos:i,destPos:r,duration:_t(e,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,r),inputEvent:s,input:(null==n?void 0:n.input)||null,isTrusted:!!s,done:this.animationEnd}},e._animateLoop=function(t,i){var r,s,o,a=this;t.duration?(this._animateParam=_(_({},t),{startTime:(new Date).getTime()}),r=G(t.destPos,function(t){return t}),s=this._initState(this._animateParam),(o=function(){a._raf=null;var t=a._animateParam,e=a._getNextState(s),n=!a.eventManager.triggerChange(e.pos,s.pos);if((s=e).finished)return t.destPos=a._getFinalPos(t.destPos,r),$(t.destPos,a.axisManager.get(Object.keys(t.destPos)))||a.eventManager.triggerChange(t.destPos,e.pos),void i();n?a.finish(!1):a._raf=Q(o)})()):(this.eventManager.triggerChange(t.destPos),i())},e._getFinalPos=function(t,i){var r=this;return G(t,function(t,e){if(t>=i[e]-1e-6&&t<=i[e]+1e-6)return i[e];var n=r._getRoundUnit(t,e);return tt(t,n)})},e._getRoundUnit=function(t,e){var n,i,r=this._options.round,s=null;return r||(n=this.axisManager.getAxisOptions(e),i=Math.max(nt(n.range[0]),nt(n.range[1]),nt(t)),s=1/Math.pow(10,i)),s||r},t}()),Rt=function(o){function t(t,e,n){void 0===t&&(t={}),void 0===e&&(e={}),void 0===n&&(n=null);var s,i,r=o.call(this)||this;return r.axis=t,r._inputs=[],r.options=_({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),r.interruptManager=new Et(r.options),r.axisManager=new bt(r.axis),r.eventManager=new mt(r),r.animationManager=new Ct(r),r.inputObserver=new Dt(r),r.eventManager.setAnimationManager(r.animationManager),r.eventManager.triggerChange((s=t,i=n,_(_({},Object.keys(s).reduce(function(t,e){var n,i,r;return Object.assign(t,((n={})[e]=null!==(r=null!==(i=s[e].startPos)&&void 0!==i?i:s[e].range[0])&&void 0!==r?r:0,n))},{})),i))),r}r(t,o);var e=t.prototype;return e.connect=function(t,e){var n="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),e.mapAxes(n),e.connect(this.inputObserver),this._inputs.push(e),this},e.disconnect=function(t){var e;return t?0<=(e=this._inputs.indexOf(t))&&(this._inputs[e].disconnect(),this._inputs.splice(e,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 void 0===e&&(e=0),this.animationManager.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.animationManager.setBy(t,e),this},e.stopAnimation=function(){return this.animationManager.stopAnimation(),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.4.0-beta.0",t.TRANSFORM=K,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=F,t.DIRECTION_ALL=30,function(t,e,n,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(o=(s<3?r(o):3<s?r(e,n,o):r(e,n))||o);return 3<s&&o&&Object.defineProperty(e,n,o),o}([v],t)}(n),St=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._forceRelease=function(){var t=n._activeEvent,e=t.prevEvent;t.onRelease(),n._observer.release(n,e,[0,0]),n._detachWindowEvent(t)},this._voidFunction=function(){},this.element=q(t),this.options=_({inputType:["touch","mouse","pointer"],inputButton:[N],scale:[1,1],thresholdAngle:45,threshold:0,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=st(!!t[0],!!t[1]),this.axes=t},e.connect=function(t){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(t),this._originalCssProps=at(this.element,this.options,this._direction),this},e.disconnect=function(){return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),rt(this._originalCssProps)||ut(this.element,this._originalCssProps),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._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);!i||!this._enabled||1<n.getTouches(t)||!1!==i.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this._observer.hold(this,i),this._atRightEdge=H&&i.center.x>window.innerWidth-e,this._attachWindowEvent(n),n.prevEvent=i)},e._onPanmove=function(t){var e=this,n=this._activeEvent,i=n.onEventMove(t,this.options.inputButton);if(i&&this._enabled&&!(1<n.getTouches(t))){var r=this.options,s=r.iOSEdgeSwipeThreshold,o=r.releaseOnScroll,a=function(t,e){if(e<0||90<e)return 1;var n=Math.abs(t);return e<n&&n<180-e?F:6}(i.angle,this.options.thresholdAngle);if(!o||i.srcEvent.cancelable){if(n.prevEvent&&H){if(i.center.x<0)return void this._forceRelease();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),i.deltaX<-s?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout(function(){return e._forceRelease()},100))}var u=this._getOffset([i.offsetX,i.offsetY],[ot(6,this._direction,a),ot(F,this._direction,a)]),h=u.some(function(t){return 0!==t});h&&(!1!==i.srcEvent.cancelable&&i.srcEvent.preventDefault(),i.srcEvent.stopPropagation()),(i.preventSystemEvent=h)&&this._observer.change(this,i,dt(this.axes,u)),n.prevEvent=i}else this._onPanend(t)}},e._onPanend=function(t){var e,n,i=this._activeEvent;i.onEventEnd(t),this._enabled&&0===i.getTouches(t)&&(this._detachWindowEvent(i),clearTimeout(this._rightEdgeTimer),e=i.prevEvent,n=this._getOffset([Math.abs(e.velocityX)*(e.offsetX<0?-1:1),Math.abs(e.velocityY)*(e.offsetY<0?-1:1)],[ot(6,this._direction),ot(F,this._direction)]),i.onRelease(),this._observer.release(this,e,n))},e._attachWindowEvent=function(t){var e=this;null!=t&&t.move.forEach(function(t){window.addEventListener(t,e._onPanmove,{passive:!1})}),null!=t&&t.end.forEach(function(t){window.addEventListener(t,e._onPanend,{passive:!1})})},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._attachElementEvent=function(t){var n=this,e=ft(this.options.inputType);e&&(this._observer=t,this._enabled=!0,(this._activeEvent=e).start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._onPanstart)}),e.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.addEventListener(t,n._voidFunction)}))},e._detachElementEvent=function(){var n=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._onPanstart)}),null!=t&&t.move.forEach(function(t){var e;null!==(e=n.element)&&void 0!==e&&e.removeEventListener(t,n._voidFunction)}),this._enabled=!1,this._observer=null},t}(),kt=function(i){function t(t,e){var n=i.call(this,t,e)||this;return n._prevQuadrant=null,n._lastDiff=0,n}r(t,i);var e=t.prototype;return e.mapAxes=function(t){this._direction=Rt.DIRECTION_ALL,this.axes=t},e._onPanstart=function(t){var e,n=this._activeEvent,i=n.onEventStart(t,this.options.inputButton);i&&this.isEnabled()&&(e=this.element.getBoundingClientRect(),this._observer.hold(this,i),this._attachWindowEvent(n),this._coefficientForDistanceToAngle=360/(e.width*Math.PI),this._rotateOrigin=[e.left+(e.width-1)/2,e.top+(e.height-1)/2],this._prevAngle=null,this._triggerChange(i),n.prevEvent=i)},e._onPanmove=function(t){var e=this._activeEvent,n=e.onEventMove(t,this.options.inputButton);n&&this.isEnabled()&&(!1!==n.srcEvent.cancelable&&n.srcEvent.preventDefault(),n.srcEvent.stopPropagation(),this._triggerChange(n),e.prevEvent=n)},e._onPanend=function(t){var e,n,i,r,s=this._activeEvent;s.onEventEnd(t),this.isEnabled()&&(e=s.prevEvent,this._triggerChange(e),n=e.velocityX,i=e.velocityY,r=Math.sqrt(n*n+i*i)*(0<this._lastDiff?-1:1),s.onRelease(),this._observer.release(this,e,[r*this._coefficientForDistanceToAngle]),this._detachWindowEvent(s))},e._triggerChange=function(t){var e=this._getPosFromOrigin(t.center.x,t.center.y),n=e.x,i=e.y,r=it(n,i),s=r<0?360+r:r,o=this._getQuadrant(t.center.x,t.center.y),a=this._getDifference(this._prevAngle,s,this._prevQuadrant,o);this._prevAngle=s,this._prevQuadrant=o,0!==a&&(this._lastDiff=a,this._observer.change(this,t,dt(this.axes,[-a])))},e._getDifference=function(t,e,n,i){var r=null===t?0:1===n&&4===i?-t-(360-e):4===n&&1===i?360-t+e:e-t;return r},e._getPosFromOrigin=function(t,e){return{x:t-this._rotateOrigin[0],y:this._rotateOrigin[1]-e}},e._getQuadrant=function(t,e){var n=this._getPosFromOrigin(t,e),i=n.x,r=n.y,s=0;return 0<=i&&0<=r?s=1:i<0&&0<=r?s=2:i<0&&r<0?s=3:0<=i&&r<0&&(s=4),s},t}(St),jt=function(){function t(t,e){this.axes=[],this.element=null,this._pinchFlag=!1,this._enabled=!1,this._activeEvent=null,this.element=q(t),this.options=_({scale:1,threshold:0,inputType:["touch","pointer"],touchAction:"none"},e),this._onPinchStart=this._onPinchStart.bind(this),this._onPinchMove=this._onPinchMove.bind(this),this._onPinchEnd=this._onPinchEnd.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._activeEvent&&this._detachEvent(),this._attachEvent(t),this._originalCssProps=at(this.element,this.options,30),this},e.disconnect=function(){return this._detachEvent(),rt(this._originalCssProps)||ut(this.element,this._originalCssProps),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._onPinchStart=function(t){var e=this._activeEvent,n=e.onEventStart(t);n&&this._enabled&&2===e.getTouches(t)&&(this._baseValue=this._observer.get(this)[this.axes[0]],this._observer.hold(this,t),this._pinchFlag=!0,e.prevEvent=n)},e._onPinchMove=function(t){var e,n=this._activeEvent,i=n.onEventMove(t);i&&this._pinchFlag&&this._enabled&&2===n.getTouches(t)&&(e=this._getOffset(i.scale,n.prevEvent.scale),this._observer.change(this,t,dt(this.axes,[e])),n.prevEvent=i)},e._onPinchEnd=function(t){var e=this._activeEvent;e.onEventEnd(t),!this._pinchFlag||!this._enabled||2<=e.getTouches(t)||(e.onRelease(),this._observer.release(this,t,[0],0),this._baseValue=null,this._pinchFlag=!1)},e._attachEvent=function(t){var e=this,n=ft(this.options.inputType);n&&(this._observer=t,this._enabled=!0,(this._activeEvent=n).start.forEach(function(t){e.element.addEventListener(t,e._onPinchStart,!1)}),n.move.forEach(function(t){e.element.addEventListener(t,e._onPinchMove,!1)}),n.end.forEach(function(t){e.element.addEventListener(t,e._onPinchEnd,!1)}))},e._detachEvent=function(){var e=this,t=this._activeEvent;null!=t&&t.start.forEach(function(t){e.element.removeEventListener(t,e._onPinchStart,!1)}),null!=t&&t.move.forEach(function(t){e.element.removeEventListener(t,e._onPinchMove,!1)}),null!=t&&t.end.forEach(function(t){e.element.removeEventListener(t,e._onPinchEnd,!1)}),this._enabled=!1,this._observer=null},e._getOffset=function(t,e){return void 0===e&&(e=1),this._baseValue*(t-e)*this.options.scale},t}(),Lt=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=q(t),this.options=_({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=st(!!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&&(0===(e=this._getOffset([t.deltaY,t.deltaX],[ot(F,this._direction),ot(6,this._direction)]))[0]&&0===e[1]||(t.preventDefault(),this._holding||(this._observer.hold(this,t),this._holding=!0),this._observer.change(this,t,dt(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){this._observer=t,this.element.addEventListener("wheel",this._onWheel),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("wheel",this._onWheel),this._enabled=!1,this._observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},t}(),Bt=function(){function t(t,e){this.axes=[],this.element=null,this._enabled=!1,this._holding=!1,this._timer=null,this.element=q(t),this.options=_({scale:[1,1]},e),this._onKeydown=this._onKeydown.bind(this),this._onKeyup=this._onKeyup.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this._detachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),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._onKeydown=function(t){if(this._enabled){var e,n=!0,i=1,r=-1;switch(t.keyCode){case 37:case 65:i=-1;break;case 39:case 68:break;case 40:case 83:i=-1,r=1;break;case 38:case 87:r=1;break;default:n=!1}(-1===r&&!this.axes[0]||1===r&&!this.axes[1])&&(n=!1),n&&(t.preventDefault(),e=-1===r?[this.options.scale[0]*i,0]:[0,this.options.scale[1]*i],this._holding||(this._observer.hold(this,t),this._holding=!0),clearTimeout(this._timer),this._observer.change(this,t,dt(this.axes,e)))}},e._onKeyup=function(t){var e=this;this._holding&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e._observer.release(e,t,[0,0]),e._holding=!1},80))},e._attachEvent=function(t){this._observer=t,this.element.addEventListener("keydown",this._onKeydown,!1),this.element.addEventListener("keypress",this._onKeydown,!1),this.element.addEventListener("keyup",this._onKeyup,!1),this._enabled=!0},e._detachEvent=function(){this.element.removeEventListener("keydown",this._onKeydown,!1),this.element.removeEventListener("keypress",this._onKeydown,!1),this.element.removeEventListener("keyup",this._onKeyup,!1),this._enabled=!1,this._observer=null},t}();return Rt.PanInput=St,Rt.RotatePanInput=kt,Rt.PinchInput=jt,Rt.WheelInput=Lt,Rt.MoveKeyInput=Bt,Rt}); | ||
//# sourceMappingURL=axes.pkgd.min.js.map |
@@ -5,6 +5,8 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -11,0 +13,0 @@ function __() { this.constructor = d; } |
@@ -5,6 +5,8 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -26,3 +28,10 @@ function __() { this.constructor = d; } | ||
}; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import Component from "@egjs/component"; | ||
import { ReactiveSubscribe } from "./cfcs"; | ||
import { EventManager } from "./EventManager"; | ||
@@ -33,2 +42,3 @@ import { InterruptManager } from "./InterruptManager"; | ||
import { TRANSFORM, DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, } from "./const"; | ||
import { getInitialPos } from "./utils"; | ||
import { EasingManager } from "./animation/EasingManager"; | ||
@@ -61,5 +71,3 @@ var Axes = (function (_super) { | ||
_this.eventManager.setAnimationManager(_this.animationManager); | ||
if (startPos) { | ||
_this.eventManager.triggerChange(startPos); | ||
} | ||
_this.eventManager.triggerChange(getInitialPos(axis, startPos)); | ||
return _this; | ||
@@ -135,2 +143,5 @@ } | ||
Axes.DIRECTION_ALL = DIRECTION_ALL; | ||
Axes = __decorate([ | ||
ReactiveSubscribe | ||
], Axes); | ||
return Axes; | ||
@@ -137,0 +148,0 @@ }(Component)); |
@@ -89,2 +89,3 @@ var __assign = (this && this.__assign) || function () { | ||
circular: [false, false], | ||
startPos: _this._axis[axis].range[0], | ||
}, _this._axis[axis]); | ||
@@ -91,0 +92,0 @@ ["bounce", "circular"].forEach(function (v) { |
@@ -13,2 +13,20 @@ export var DIRECTION_NONE = 1; | ||
export var VELOCITY_INTERVAL = 16; | ||
export var AXES_METHODS = [ | ||
"connect", | ||
"disconnect", | ||
"get", | ||
"setTo", | ||
"setBy", | ||
"stopAnimation", | ||
"updateAnimation", | ||
"isBounceArea", | ||
]; | ||
export var AXES_EVENTS = [ | ||
"hold", | ||
"release", | ||
"change", | ||
"animationStart", | ||
"animationEnd", | ||
"finish", | ||
]; | ||
import getAgent from "@egjs/agent"; | ||
@@ -15,0 +33,0 @@ import { window } from "./browser"; |
@@ -5,6 +5,8 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -11,0 +13,0 @@ function __() { this.constructor = d; } |
@@ -5,6 +5,8 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -11,0 +13,0 @@ function __() { this.constructor = d; } |
@@ -5,6 +5,8 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -11,0 +13,0 @@ function __() { this.constructor = d; } |
@@ -5,6 +5,8 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -11,0 +13,0 @@ function __() { this.constructor = d; } |
@@ -14,2 +14,3 @@ var __assign = (this && this.__assign) || function () { | ||
import { roundNumbers } from "./utils"; | ||
import { getObserver } from "./cfcs"; | ||
var EventManager = (function () { | ||
@@ -36,2 +37,3 @@ function EventManager(_axes) { | ||
EventManager.prototype.triggerChange = function (pos, depaPos, option, holding) { | ||
var _this = this; | ||
if (holding === void 0) { holding = false; } | ||
@@ -56,2 +58,6 @@ var animationManager = this.animationManager; | ||
this._axes.trigger(event); | ||
Object.keys(moveTo.pos).forEach(function (axis) { | ||
var p = moveTo.pos[axis]; | ||
getObserver(_this._axes, axis, p).current = p; | ||
}); | ||
if (inputEvent) { | ||
@@ -58,0 +64,0 @@ axisManager.set(param.set().destPos); |
@@ -8,3 +8,7 @@ import Axes from "./Axes"; | ||
export default Axes; | ||
export { AXES_METHODS, AXES_EVENTS } from "./const"; | ||
export { getInitialPos } from "./utils"; | ||
export * from "./types"; | ||
export * from "./reactive"; | ||
export * from "./cfcs"; | ||
//# sourceMappingURL=index.js.map |
@@ -5,6 +5,8 @@ var __extends = (this && this.__extends) || (function () { | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
@@ -11,0 +13,0 @@ function __() { this.constructor = d; } |
@@ -0,1 +1,2 @@ | ||
export {}; | ||
//# sourceMappingURL=types.js.map |
@@ -42,2 +42,5 @@ var __assign = (this && this.__assign) || function () { | ||
} | ||
else if ("value" in param || "current" in param) { | ||
el = param.value || param.current; | ||
} | ||
else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) { | ||
@@ -141,3 +144,3 @@ el = param; | ||
} | ||
var v = "" + val; | ||
var v = "".concat(val); | ||
if (v.indexOf("e") >= 0) { | ||
@@ -193,2 +196,11 @@ var p = 0; | ||
}; | ||
export var getInitialPos = function (axis, startPos) { | ||
return __assign(__assign({}, Object.keys(axis).reduce(function (result, key) { | ||
var _a; | ||
var _b, _c; | ||
return Object.assign(result, (_a = {}, | ||
_a[key] = (_c = (_b = axis[key].startPos) !== null && _b !== void 0 ? _b : axis[key].range[0]) !== null && _c !== void 0 ? _c : 0, | ||
_a)); | ||
}, {})), startPos); | ||
}; | ||
export var useDirection = function (checkType, direction, userDirection) { | ||
@@ -195,0 +207,0 @@ if (userDirection) { |
{ | ||
"name": "@egjs/axes", | ||
"version": "3.4.0", | ||
"version": "3.5.0-beta.0", | ||
"description": "A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates. You can easily create a UI that responds to user actions.", | ||
@@ -15,21 +15,4 @@ "sideEffects": false, | ||
"test:chrome": "karma start --chrome", | ||
"lint": "eslint ./src/**/*.ts", | ||
"jsdoc": "rm -rf ./doc && rm -rf outjs && tsc -p tsconfig.json && jsdoc -c jsdoc.json", | ||
"declaration": "rm -rf declaration && tsc -p tsconfig.declaration.json", | ||
"coverage": "karma start --coverage", | ||
"docs:build": "rm -rf ./demo/docs/api && jsdoc-to-mdx -c ./jsdoc-to-mdx.json", | ||
"demo:build": "run-s build demo:copy-lib docs:build && npm run demo:build-docusaurus", | ||
"demo:build-docusaurus": "npm run build --prefix demo", | ||
"demo:copy-lib": "run-s demo:copy-lib-version demo:copy-lib-latest", | ||
"demo:copy-lib-version": "cpx 'dist/**/*' demo/static/release/$npm_package_version --clean && cpx 'css/**/*' demo/static/release/$npm_package_version/css --clean", | ||
"demo:copy-lib-latest": "cpx 'dist/**/*' demo/static/release/latest --clean && cpx 'dist/**/*' demo/static/release/latest/css --clean", | ||
"gh-pages:upstream": "gh-pages -d demo/build/ --remote upstream", | ||
"gh-pages:origin": "gh-pages -d demo/build/", | ||
"demo:deploy": "run-s demo:build gh-pages:upstream", | ||
"demo:deploy-origin": "run-s demo:build gh-pages:origin", | ||
"release": "release-helper upstream", | ||
"coveralls": "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", | ||
"changelog": "node ./config/changelog.js", | ||
"prepush": "npm run lint", | ||
"commitmsg": "node config/validate-commit-msg.js" | ||
"coverage": "karma start --coverage" | ||
}, | ||
@@ -57,5 +40,2 @@ "repository": { | ||
"@egjs/release-helper": "0.0.3", | ||
"@typescript-eslint/eslint-plugin": "^5.11.0", | ||
"@typescript-eslint/eslint-plugin-tslint": "^5.11.0", | ||
"@typescript-eslint/parser": "^5.11.0", | ||
"babel-core": "^6.26.0", | ||
@@ -70,8 +50,2 @@ "babel-loader": "^7.1.2", | ||
"egjs-jsdoc-template": "^1.4.4", | ||
"eslint": "^8.8.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-jsdoc": "^37.8.0", | ||
"eslint-plugin-prefer-arrow": "^1.2.3", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"fs-extra": "^5.0.0", | ||
@@ -110,3 +84,3 @@ "gh-pages": "^1.1.0", | ||
"ts-loader": "^8.0.6", | ||
"typescript": "^3.9.7", | ||
"typescript": "^4.6.2", | ||
"uglifyjs-webpack-plugin": "^1.1.6", | ||
@@ -113,0 +87,0 @@ "webpack": "^3.10.0", |
<h1 align="center" style="max-width: 100%;"> | ||
<img width="256" alt="Axes Logo" src="https://raw.githubusercontent.com/naver/egjs-axes/master/demo/static/img/axes.svg" style="max-width: 256px;" /><br/> | ||
<img width="256" alt="Axes Logo" src="https://raw.githubusercontent.com/naver/egjs-axes/master/packages/demo/static/img/axes.svg" style="max-width: 256px;" /><br/> | ||
<a href="https://naver.github.io/egjs-axes/">@egjs/axes</a> | ||
@@ -26,3 +26,3 @@ </h1> | ||
<img src="https://github.com/naver/egjs-axes/raw/master/demo/static/img/demos/structure.png" style="width:100%"> | ||
<img src="https://github.com/naver/egjs-axes/raw/master/packages/demo/static/img/demos/structure.png" style="width:100%"> | ||
@@ -29,0 +29,0 @@ ## ✨ Features |
@@ -0,3 +1,8 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import Component from "@egjs/component"; | ||
import { ReactiveSubscribe } from "./cfcs"; | ||
import { EventManager } from "./EventManager"; | ||
@@ -19,3 +24,9 @@ import { InterruptManager } from "./InterruptManager"; | ||
import { InputType } from "./inputType/InputType"; | ||
import { AxesEvents, ObjectInterface, UpdateAnimationOption } from "./types"; | ||
import { | ||
AxesEvents, | ||
AxesReactiveState, | ||
ObjectInterface, | ||
UpdateAnimationOption, | ||
} from "./types"; | ||
import { getInitialPos } from "./utils"; | ||
import { EasingManager } from "./animation/EasingManager"; | ||
@@ -46,2 +57,3 @@ import { AnimationManager } from "./animation/AnimationManager"; | ||
* @param {Boolean} [circular[1]=false] Indicates whether to circulate to the coordinate of the maximum <ko>최대 좌표 방향의 순환 여부</ko> | ||
* @param {Number} [startPos=range[0]] The coordinates to be moved when creating an instance <ko>인스턴스 생성시 이동할 좌표</ko> | ||
**/ | ||
@@ -75,3 +87,3 @@ | ||
* @param {AxesOption} [options={}] The option object of the eg.Axes module<ko>eg.Axes 모듈의 옵션 객체</ko> | ||
* @param {Object.<string, number>} [startPos=null] The coordinates to be moved when creating an instance. not triggering change event.<ko>인스턴스 생성시 이동할 좌표, change 이벤트는 발생하지 않음.</ko> | ||
* @param {Object.<string, number>} [startPos=null] The coordinates to be moved when creating an instance. It is applied with higher priority than startPos of axisOption.<ko>인스턴스 생성시 이동할 좌표, axisOption의 startPos보다 높은 우선순위로 적용된다.</ko> | ||
* | ||
@@ -83,13 +95,13 @@ * @support {"ie": "10+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.3+ (except 3.x)"} | ||
* const axes = new eg.Axes({ | ||
* something1: { | ||
* range: [0, 150], | ||
* bounce: 50 | ||
* }, | ||
* something2: { | ||
* range: [0, 200], | ||
* bounce: 100 | ||
* }, | ||
* somethingN: { | ||
* range: [1, 10], | ||
* } | ||
* something1: { | ||
* range: [0, 150], | ||
* bounce: 50 | ||
* }, | ||
* something2: { | ||
* range: [0, 200], | ||
* bounce: 100 | ||
* }, | ||
* somethingN: { | ||
* range: [1, 10], | ||
* } | ||
* }, { | ||
@@ -101,12 +113,12 @@ * deceleration : 0.0024 | ||
* axes.on({ | ||
* "hold" : function(evt) { | ||
* }, | ||
* "release" : function(evt) { | ||
* }, | ||
* "animationStart" : function(evt) { | ||
* }, | ||
* "animationEnd" : function(evt) { | ||
* }, | ||
* "change" : function(evt) { | ||
* } | ||
* "hold" : function(evt) { | ||
* }, | ||
* "release" : function(evt) { | ||
* }, | ||
* "animationStart" : function(evt) { | ||
* }, | ||
* "animationEnd" : function(evt) { | ||
* }, | ||
* "change" : function(evt) { | ||
* } | ||
* }); | ||
@@ -116,3 +128,3 @@ * | ||
* const panInputArea = new eg.Axes.PanInput("#area", { | ||
* scale: [0.5, 1] | ||
* scale: [0.5, 1] | ||
* }); | ||
@@ -122,3 +134,3 @@ * const panInputHmove = new eg.Axes.PanInput("#hmove"); | ||
* const pinchInputArea = new eg.Axes.PinchInput("#area", { | ||
* scale: 1.5 | ||
* scale: 1.5 | ||
* }); | ||
@@ -142,2 +154,3 @@ * | ||
*/ | ||
@ReactiveSubscribe | ||
class Axes extends Component<AxesEvents> { | ||
@@ -266,5 +279,3 @@ /** | ||
this.eventManager.setAnimationManager(this.animationManager); | ||
if (startPos) { | ||
this.eventManager.triggerChange(startPos); | ||
} | ||
this.eventManager.triggerChange(getInitialPos(axis, startPos)); | ||
} | ||
@@ -373,3 +384,3 @@ | ||
* }, | ||
* "zoom": { | ||
* "zoom": { | ||
* range: [50, 30] | ||
@@ -402,3 +413,3 @@ * } | ||
* }, | ||
* "zoom": { | ||
* "zoom": { | ||
* range: [50, 30] | ||
@@ -437,3 +448,3 @@ * } | ||
* }, | ||
* "zoom": { | ||
* "zoom": { | ||
* range: [50, 30] | ||
@@ -527,3 +538,3 @@ * } | ||
* }, | ||
* "zoom": { | ||
* "zoom": { | ||
* range: [50, 30] | ||
@@ -552,2 +563,6 @@ * } | ||
interface Axes | ||
extends AxesReactiveState, | ||
ReactiveSubscribe<AxesReactiveState> {} | ||
export default Axes; |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { isOutside, getCirculatedPos } from "./Coordinate"; | ||
@@ -13,2 +17,3 @@ import { map, filter, every } from "./utils"; | ||
circular?: boolean | boolean[]; | ||
startPos?: number; | ||
} | ||
@@ -119,2 +124,3 @@ | ||
circular: [false, false], | ||
startPos: this._axis[axis].range[0], | ||
}, | ||
@@ -121,0 +127,0 @@ ...this._axis[axis], |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
/* eslint-disable no-new-func, no-nested-ternary */ | ||
@@ -2,0 +6,0 @@ |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
export const DIRECTION_NONE = 1; | ||
@@ -16,2 +20,22 @@ export const DIRECTION_LEFT = 2; | ||
export const AXES_METHODS = [ | ||
"connect", | ||
"disconnect", | ||
"get", | ||
"setTo", | ||
"setBy", | ||
"stopAnimation", | ||
"updateAnimation", | ||
"isBounceArea", | ||
] as const; | ||
export const AXES_EVENTS = [ | ||
"hold", | ||
"release", | ||
"change", | ||
"animationStart", | ||
"animationEnd", | ||
"finish", | ||
] as const; | ||
import getAgent from "@egjs/agent"; | ||
@@ -18,0 +42,0 @@ |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
export const getInsidePosition = ( | ||
@@ -2,0 +6,0 @@ destPos: number, |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { ExtendedEvent, InputEventType, LatestInterval } from "../types"; | ||
@@ -2,0 +6,0 @@ import { getAngle } from "../utils"; |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { InputEventType, ExtendedEvent } from "../types"; | ||
@@ -2,0 +6,0 @@ |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { InputEventType, ExtendedEvent } from "../types"; | ||
@@ -2,0 +6,0 @@ |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { InputEventType, ExtendedEvent } from "../types"; | ||
@@ -2,0 +6,0 @@ |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { InputEventType, ExtendedEvent } from "../types"; | ||
@@ -2,0 +6,0 @@ |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { ComponentEvent } from "@egjs/component"; | ||
@@ -9,2 +13,3 @@ | ||
import { AnimationManager } from "./animation/AnimationManager"; | ||
import { getObserver } from "./cfcs"; | ||
@@ -210,2 +215,6 @@ export interface ChangeEventOption { | ||
this._axes.trigger(event); | ||
Object.keys(moveTo.pos).forEach((axis) => { | ||
const p = moveTo.pos[axis]; | ||
getObserver(this._axes, axis, p).current = p; | ||
}); | ||
@@ -212,0 +221,0 @@ if (inputEvent) { |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import Axes from "./Axes"; | ||
@@ -7,3 +11,9 @@ export { PanInput } from "./inputType/PanInput"; | ||
export { MoveKeyInput } from "./inputType/MoveKeyInput"; | ||
export default Axes; | ||
export { AXES_METHODS, AXES_EVENTS } from "./const"; | ||
export { getInitialPos } from "./utils"; | ||
export * from "./types"; | ||
export * from "./reactive"; | ||
export * from "./cfcs"; |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import Axes from "./Axes"; | ||
@@ -2,0 +6,0 @@ import { PanInput } from "./inputType/PanInput"; |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { InterruptManager } from "./InterruptManager"; | ||
@@ -2,0 +6,0 @@ import { InputType, InputTypeObserver, toAxis } from "./inputType/InputType"; |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { Axis } from "../AxisManager"; | ||
@@ -2,0 +6,0 @@ import { AxesOption } from "../Axes"; |
@@ -0,1 +1,6 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { ElementType } from "../types"; | ||
import { $ } from "../utils"; | ||
@@ -62,3 +67,3 @@ | ||
*/ | ||
public constructor(el, options?: MoveKeyInputOption) { | ||
public constructor(el: ElementType, options?: MoveKeyInputOption) { | ||
this.element = $(el); | ||
@@ -65,0 +70,0 @@ this.options = { |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
/* eslint-disable @typescript-eslint/no-empty-function */ | ||
@@ -19,3 +23,3 @@ | ||
} from "../const"; | ||
import { ActiveEvent, InputEventType } from "../types"; | ||
import { ActiveEvent, ElementType, InputEventType } from "../types"; | ||
@@ -101,3 +105,3 @@ import { | ||
* ``` | ||
* @param {HTMLElement|String|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko> | ||
* @param {String|HTMLElement|Ref<HTMLElement>|jQuery} element An element to use the eg.Axes.PanInput module <ko>eg.Axes.PanInput 모듈을 사용할 엘리먼트</ko> | ||
* @param {PanInputOption} [options={}] The option object of the eg.Axes.PanInput module<ko>eg.Axes.PanInput 모듈의 옵션 객체</ko> | ||
@@ -120,3 +124,3 @@ */ | ||
*/ | ||
public constructor(el: string | HTMLElement, options?: PanInputOption) { | ||
public constructor(el: ElementType, options?: PanInputOption) { | ||
this.element = $(el); | ||
@@ -123,0 +127,0 @@ this.options = { |
@@ -0,3 +1,7 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { $, isCssPropsFromAxes, setCssProps, revertCssProps } from "../utils"; | ||
import { ActiveEvent, InputEventType } from "../types"; | ||
import { ActiveEvent, ElementType, InputEventType } from "../types"; | ||
import { DIRECTION_ALL } from "../const"; | ||
@@ -61,3 +65,3 @@ | ||
*/ | ||
public constructor(el: string | HTMLElement, options?: PinchInputOption) { | ||
public constructor(el: ElementType, options?: PinchInputOption) { | ||
this.element = $(el); | ||
@@ -64,0 +68,0 @@ this.options = { |
@@ -1,3 +0,7 @@ | ||
import { ExtendedEvent } from "../types"; | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import Axes from "../Axes"; | ||
import { ElementType, ExtendedEvent } from "../types"; | ||
import { getAngle } from "../utils"; | ||
@@ -41,3 +45,3 @@ | ||
*/ | ||
public constructor(el: string | HTMLElement, options?: PanInputOption) { | ||
public constructor(el: ElementType, options?: PanInputOption) { | ||
super(el, options); | ||
@@ -44,0 +48,0 @@ } |
@@ -0,3 +1,8 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { $, getDirection, useDirection } from "../utils"; | ||
import { DIRECTION_HORIZONTAL, DIRECTION_VERTICAL } from "../const"; | ||
import { ElementType } from "../types"; | ||
@@ -58,3 +63,3 @@ import { toAxis, InputType, InputTypeObserver } from "./InputType"; | ||
*/ | ||
public constructor(el, options?: WheelInputOption) { | ||
public constructor(el: ElementType, options?: WheelInputOption) { | ||
this.element = $(el); | ||
@@ -61,0 +66,0 @@ this.options = { |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { AxesOption } from "./Axes"; | ||
@@ -2,0 +6,0 @@ export class InterruptManager { |
@@ -0,1 +1,5 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { Axis } from "./AxisManager"; | ||
@@ -7,2 +11,5 @@ import { MouseEventInput } from "./eventInput/MouseEventInput"; | ||
import { InputType } from "./inputType/InputType"; | ||
import { AXES_METHODS } from "./const"; | ||
import Axes from "./Axes"; | ||
import { Ref } from "./cfcs"; | ||
@@ -13,2 +20,4 @@ export type ObjectInterface<T = any> = Record<string | number, T>; | ||
export type ElementType = string | HTMLElement | Ref<HTMLElement>; | ||
export type ActiveEvent = | ||
@@ -29,2 +38,10 @@ | MouseEventInput | ||
export interface AxesReactiveState { | ||
[key: string]: any; | ||
} | ||
export type AxesMethods = { | ||
[key in typeof AXES_METHODS[number]]: Axes[key]; | ||
}; | ||
export interface AnimationParam { | ||
@@ -31,0 +48,0 @@ depaPos: Axis; |
@@ -0,3 +1,8 @@ | ||
/* | ||
* Copyright (c) 2015 NAVER Corp. | ||
* egjs projects are licensed under the MIT license | ||
*/ | ||
import { window } from "./browser"; | ||
import { PREVENT_DRAG_CSSPROPS } from "./const"; | ||
import { Axis, AxisOption } from "./AxisManager"; | ||
import { PanInputOption } from "./inputType/PanInput"; | ||
@@ -27,3 +32,2 @@ import { PinchInputOption } from "./inputType/PinchInput"; | ||
let el; | ||
if (typeof param === "string") { | ||
@@ -51,2 +55,4 @@ // String (HTML, Selector) | ||
el = param; | ||
} else if ("value" in param || "current" in param) { | ||
el = param.value! || param.current!; | ||
} else if (param.nodeName && (param.nodeType === 1 || param.nodeType === 9)) { | ||
@@ -111,3 +117,3 @@ // HTMLElement, Document | ||
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method. | ||
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko> | ||
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko> | ||
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame | ||
@@ -269,2 +275,18 @@ * @private | ||
export const getInitialPos = ( | ||
axis: ObjectInterface<AxisOption>, | ||
startPos: Axis | ||
): Axis => { | ||
return { | ||
...Object.keys(axis).reduce( | ||
(result, key) => | ||
Object.assign(result, { | ||
[key]: axis[key].startPos ?? axis[key].range[0] ?? 0, | ||
}), | ||
{} | ||
), | ||
...startPos, | ||
}; | ||
}; | ||
export const useDirection = ( | ||
@@ -271,0 +293,0 @@ checkType: number, |
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 too big to display
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
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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 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
1921471
53
163
18839
2