Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@egjs/axes

Package Overview
Dependencies
Maintainers
7
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egjs/axes - npm Package Compare versions

Comparing version 2.5.9 to 2.5.10-rc

2

declaration/AnimationManager.d.ts

@@ -39,2 +39,3 @@ import { IInputType } from "./inputType/InputType";

animationEnd(): void;
finish(isTrusted: any): void;
private animateLoop;

@@ -46,3 +47,2 @@ getUserControll(param: AnimationParam): {

animateTo(destPos: Axis, duration: number, option?: ChangeEventOption): void;
private frame;
easing(p: any): number;

@@ -49,0 +49,0 @@ setTo(pos: Axis, duration?: number): this;

@@ -1,6 +0,5 @@

import { AxesOption } from "./Axes";
import { ObjectInterface } from "./const";
export interface Axis {
[key: string]: number;
}
export declare function equal(target: Axis, base: Axis): boolean;
export interface AxisOption {

@@ -15,14 +14,14 @@ range?: number[];

private _pos;
constructor(axis: any, options: AxesOption);
constructor(axis: ObjectInterface<AxisOption>, options: any);
private _complementOptions;
getDelta(depaPos: Axis, destPos: Axis): Axis;
get(axes?: string[] | Axis): Axis;
moveTo(pos: Axis): {
moveTo(pos: Axis, depaPos?: Axis): {
[key: string]: Axis;
};
set(pos: Axis): void;
every(pos: Axis, callback: (value: number, key: string, options: AxisOption) => boolean): boolean;
filter(pos: Axis, callback: (value: number, key: string, options: AxisOption) => boolean): Axis;
map(pos: Axis, callback: (value: number, key: string, options: AxisOption) => number): Axis;
every(pos: Axis, callback: (value: number, options: AxisOption, key: string) => boolean): boolean;
filter(pos: Axis, callback: (value: number, options: AxisOption, key: string) => boolean): Axis;
map(pos: Axis, callback: (value: number, options: AxisOption, key: string) => number): Axis;
isOutside(axes?: string[]): boolean;
}

@@ -1,5 +0,6 @@

export interface ObjectInterface {
[key: string]: any;
export interface ObjectInterface<T = any> {
[key: string]: T;
}
export { DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, } from "@egjs/hammerjs";
export declare const FIXED_DIGIT = 100000;
export declare const TRANSFORM: string;
import { IInputType } from "./inputType/InputType";
import { Axis } from "./AxisManager";
import { AnimationParam, AnimationManager } from "./AnimationManager";
import Axes from "./Axes";
export interface ChangeEventOption {

@@ -11,6 +12,6 @@ input: IInputType;

am: AnimationManager;
constructor(axes: any);
constructor(axes: Axes);
triggerHold(pos: Axis, option: ChangeEventOption): void;
triggerRelease(param: AnimationParam): void;
triggerChange(pos: Axis, option?: ChangeEventOption, holding?: boolean): void;
triggerChange(pos: Axis, depaPos?: Axis, option?: ChangeEventOption, holding?: boolean): boolean;
triggerAnimationStart(param: AnimationParam): boolean;

@@ -17,0 +18,0 @@ triggerAnimationEnd(isTrusted?: boolean): void;

@@ -5,4 +5,2 @@ import { IInputType, IInputTypeObserver } from "./inputType/InputType";

export declare class InputObserver implements IInputTypeObserver {
isOutside: boolean;
moveDistance: Axis;
options: AxesOption;

@@ -13,2 +11,5 @@ private itm;

private am;
private isOutside;
private moveDistance;
private isStopped;
constructor({ options, itm, em, axm, am }: {

@@ -15,0 +16,0 @@ options: any;

@@ -0,1 +1,2 @@

import { ObjectInterface } from "./const";
export declare function toArray(nodes: NodeList): HTMLElement[];

@@ -5,1 +6,6 @@ export declare function $(param: any, multi?: boolean): any;

export declare function cancelAnimationFrame(key: any): void;
export declare function map<T, U>(obj: ObjectInterface<T>, callback: (value: T, key: string) => U): ObjectInterface<U>;
export declare function filter<T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean): ObjectInterface<T>;
export declare function every<T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean): boolean;
export declare function equal(target: ObjectInterface, base: ObjectInterface): boolean;
export declare function toFixed(num: number): number;

@@ -8,5 +8,5 @@ /*

@version 2.5.9
@version 2.5.10
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@egjs/hammerjs"),require("@egjs/component")):"function"==typeof define&&define.amd?define(["@egjs/hammerjs","@egjs/component"],e):(t.eg=t.eg||{},t.eg.Axes=e(t.Hammer,t.eg.Component))}(this,function(o,t){"use strict";var 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])};var l=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};function f(t,e,n,i){var s=t,r=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return s=Math.max(r[0],s),+(s=Math.min(r[1],s)).toFixed(5)}function r(t,e){return t<e[0]||t>e[1]}function u(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function a(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.toFixed(5)}function d(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0}var s,h=function(){function t(t,e){var n=this;this.axis=t,this.options=e,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._complementOptions=function(){var s=this;Object.keys(this.axis).forEach(function(i){s.axis[i]=l({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])})})},e.getDelta=function(t,e){var n=this.get(t);return this.map(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},{}):l({},this._pos,t||{})},e.moveTo=function(n){var i=this,t=this.map(this._pos,function(t,e){return e in n?n[e]-i._pos[e]:0});return this.set(n),{pos:l({},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,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},e.filter=function(t,e){var n={},i=this.axis;for(var s in t)s&&e(t[s],s,i[s])&&(n[s]=t[s]);return n},e.map=function(t,e){var n={},i=this.axis;for(var s in t)s&&(n[s]=e(t[s],s,i[s]));return n},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!r(t,n.range)})},t}();function c(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function m(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=c(i.childNodes)}else n=c(document.querySelectorAll(t));e||(n=1<=n.length?n[0]:void 0)}else t===s?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in s&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return m(t)}),e||(n=1<=n.length?n[0]:void 0)):n=t;return n}var p=(s="undefined"==typeof window?{}:window).requestAnimationFrame||s.webkitRequestAnimationFrame,v=s.cancelAnimationFrame||s.webkitCancelAnimationFrame;if(p&&!v){var g={},_=p;p=function(e){var n=_(function(t){g[n]&&e(t)});return g[n]=!0,n},v=function(t){delete g[t]}}else p&&v||(p=function(t){return s.setTimeout(function(){t(s.performance&&s.performance.now&&s.performance.now()||(new Date).getTime())},16)},v=s.clearTimeout);function E(t,e,n){return Math.max(Math.min(t,n),e)}var b=function(){function t(t){var e=t.options,n=t.itm,i=t.em,s=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=s,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(r,t,e){var n,o=this;if(void 0!==e)n=e;else{var i=this.axm.map(t,function(t,e){return n=Math.abs(Math.abs(t)-Math.abs(r[e])),i=o.options.deceleration,(s=Math.sqrt(n/i*2))<100?0:s;var n,i,s});n=Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)}return E(n,this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),s=t,r=n&&n.event||null;return{depaPos:i,destPos:s,duration:E(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,s),inputEvent:r,input:n&&n.input||null,isTrusted:!!r,done:this.animationEnd}},e.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return a(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&(s=this._raf,v(s)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}var s},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.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return u(t,n.range,n.circular)});0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e,n){return a(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},e.animateLoop=function(e,n){if(this._animateParam=l({},e),this._animateParam.startTime=(new Date).getTime(),e.duration){var i=this._animateParam,s=this;!function t(){if(s._raf=null,1<=s.frame(i))return d(e.destPos,s.axm.get(Object.keys(e.destPos)))||s.em.triggerChange(e.destPos),void n();s._raf=p(t)}()}else this.em.triggerChange(e.destPos),n()},e.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=E(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this,s=this.createAnimationParam(t,e,n),r=l({},s.depaPos),o=this.em.triggerAnimationStart(s),a=this.getUserControll(s);if(!o&&this.axm.every(a.destPos,function(t,e,n){return u(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),o&&!d(a.destPos,r)){var h=n&&n.event||null;this.animateLoop({depaPos:r,destPos:a.destPos,duration:a.duration,delta:this.axm.getDelta(r,a.destPos),isTrusted:!!h,inputEvent:h,input:n&&n.input||null},function(){return i.animationEnd()})}},e.frame=function(i){var t=(new Date).getTime()-i.startTime,s=this.easing(t/i.duration),e=i.depaPos;return e=this.axm.map(e,function(t,e,n){return a(t+=i.delta[e]*s,n.range,n.circular)}),this.em.triggerChange(e),s},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,i){void 0===i&&(i=0);var e=Object.keys(t);this.grab(e);var n=this.axm.get(e);if(d(t,n))return this;this.itm.setInterrupt(!0);var s=this.axm.filter(t,function(t,e){return n[e]!==t});return Object.keys(s).length&&(d(s=this.axm.map(s,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?0<i?t:a(t,n.range,n.circular):f(t,n.range,n.circular)}),n)||(0<i?this.animateTo(s,i):(this.em.triggerChange(s),this.itm.setInterrupt(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(this.axm.map(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),x=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),s=this.am.axm.moveTo(t),r=e&&e.event||i&&i.event||null,o={pos:s.pos,delta:s.delta,holding:n,inputEvent:r,isTrusted:!!r,input:e&&e.input||i&&i.input||null,set:r?this.createUserControll(s.pos):function(){}};this.axes.trigger("change",o),r&&this.am.axm.set(o.set().destPos)},e.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},e.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:l({},t),duration:e};return function(t,e){return t&&(n.destPos=l({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},t}(),I=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 e=t.options,n=t.itm,i=t.em,s=t.axm,r=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=s,this.am=r}var e=t.prototype;return e.atOutside=function(t){var o=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],s=n.range[1]+n.bounce[1];return s<t?s:t<i?i:t});var a=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,e,n){var i=n.range[0],s=n.range[1],r=n.bounce;return t<i?i-o.am.easing((i-t)/(r[0]*a))*r[0]:s<t?s+o.am.easing((t-s)/(r[1]*a))*r[1]:t})},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},e.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,s=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||s,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return a(t,n.range,n.circular)}),this.isOutside&&this.axm.every(s,function(t,e,n){return!r(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},e.release=function(t,e,n,i){if(this.itm.isInterrupting()&&this.moveDistance){var s=this.axm.get(t.axes),r=this.axm.get(),o=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?s[e]+t:f(s[e]+t,n.range,n.circular,n.bounce)})),a=this.am.getDuration(o,s,i);0===a&&(o=l({},r));var h={depaPos:r,destPos:o,duration:a,delta:this.axm.getDelta(r,o),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(h),this.moveDistance=null;var u=this.am.getUserControll(h),c=d(u.destPos,r),m={input:t,event:e};c||0===u.duration?(!c&&this.em.triggerChange(u.destPos,m,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(m):this.em.triggerFinish(!0)):this.am.animateTo(u.destPos,u.duration,m)}},t}(),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""}(),e=function(s){function t(t,e,n){void 0===t&&(t={});var i=s.call(this)||this;return i.axis=t,i._inputs=[],i.options=l({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4},e),i.itm=new I(i.options),i.axm=new h(i.axis,i.options),i.em=new x(i),i.am=new b(i),i.io=new T(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}!function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,s);var e=t.prototype;return e.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},e.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);0<=e&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},e.get=function(t){return this.axm.get(t)},e.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},e.isBounceArea=function(t){return this.axm.isOutside(t)},e.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.5.9",t.TRANSFORM=n,t.DIRECTION_NONE=o.DIRECTION_NONE,t.DIRECTION_LEFT=o.DIRECTION_LEFT,t.DIRECTION_RIGHT=o.DIRECTION_RIGHT,t.DIRECTION_UP=o.DIRECTION_UP,t.DIRECTION_DOWN=o.DIRECTION_DOWN,t.DIRECTION_HORIZONTAL=o.DIRECTION_HORIZONTAL,t.DIRECTION_VERTICAL=o.DIRECTION_VERTICAL,t.DIRECTION_ALL=o.DIRECTION_ALL,t}(t),y="PointerEvent"in s||"MSPointerEvent"in s,O="ontouchstart"in s,P="_EGJS_AXES_INPUTTYPE_";function R(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function D(t,e){try{return new o.Manager(t,l({},e))}catch(t){return null}}function C(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=O;break;case"pointer":i=y}}),i?o.PointerEventInput:e&&n?o.TouchMouseInput:e?o.TouchInput:n?o.MouseInput:null}function N(t,e,n){return n?!!(e===o.DIRECTION_ALL||e&t&&n&t):!!(e&t)}var A=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===o.Manager)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=m(t),this.options=l({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?o.DIRECTION_ALL:e?o.DIRECTION_HORIZONTAL:n?o.DIRECTION_VERTICAL:o.DIRECTION_NONE,this.axes=t},e.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[P];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=C(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=D(this.element,l({inputClass:i},this.options.hammerManagerOptions)),this.element[P]=n}return this.panRecognizer=new o.Pan(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION_NONE,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[P],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=function(t,e){if(e<0||90<e)return o.DIRECTION_NONE;var n=Math.abs(t);return e<n&&n<180-e?o.DIRECTION_VERTICAL:o.DIRECTION_HORIZONTAL}(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;t.offsetY=n?(t.offsetX=t.deltaX-n.deltaX,t.deltaY-n.deltaY):t.offsetX=0;var i=this.getOffset([t.offsetX,t.offsetY],[N(o.DIRECTION_HORIZONTAL,this._direction,e),N(o.DIRECTION_VERTICAL,this._direction,e)]),s=i.some(function(t){return 0!==t});s&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),(t.preventSystemEvent=s)&&this.observer.change(this,t,R(this.axes,i))},e.onPanend=function(t){var e,n,i,s,r=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[N(o.DIRECTION_HORIZONTAL,this._direction),N(o.DIRECTION_VERTICAL,this._direction)]);e=r,n=this.observer.options.deceleration,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),s=Math.abs(i/-n),r=[e[0]/2*s,e[1]/2*s],this.observer.release(this,t,R(this.axes,r))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},t}(),w=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===o.Manager)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=m(t),this.options=l({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"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){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[P];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=C(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=D(this.element,l({inputClass:i},this.options.hammerManagerOptions)),this.element[P]=n}return this.pinchRecognizer=new o.Pinch(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[P],this.element=null,this.hammer=null},e.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},e.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,R(this.axes,[e])),this._prev=t.scale},e.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,R(this.axes,[e])),this._prev=t.scale},e.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,R(this.axes,[e])),this.observer.release(this,t,R(this.axes,[0]),0),this._base=null,this._prev=null},e.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},e.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},e.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},e.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},t}(),M=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=m(t),this.options=l({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(0<t.deltaY?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,R(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,R(e.axes,[0])))},50)}},e.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}(),L=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=m(t),this.options=l({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.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onKeydown=function(t){if(this._isEnabled){var e=!0,n=1,i=-1;switch(t.keyCode){case 37:case 65:n=-1;break;case 39:case 68:break;case 40:case 83:n=-1,i=1;break;case 38:case 87:i=1;break;default:e=!1}if((-1===i&&!this.axes[0]||1===i&&!this.axes[1])&&(e=!1),e){var s=-1===i?[+this.options.scale[0]*n,0]:[0,+this.options.scale[1]*n];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,R(this.axes,s))}}},e.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,R(e.axes,[0,0])),e._isHolded=!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._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}();return e.PanInput=A,e.PinchInput=w,e.WheelInput=M,e.MoveKeyInput=L,e});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@egjs/hammerjs"),require("@egjs/component")):"function"==typeof define&&define.amd?define(["@egjs/hammerjs","@egjs/component"],e):(t.eg=t.eg||{},t.eg.Axes=e(t.Hammer,t.eg.Component))}(this,function(o,t){"use strict";var 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])};var s,l=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};s="undefined"==typeof window?{}:window;var e=1e5,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""}();function r(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function a(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=r(i.childNodes)}else n=r(document.querySelectorAll(t));e||(n=1<=n.length?n[0]:void 0)}else t===s?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in s&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return a(t)}),e||(n=1<=n.length?n[0]:void 0)):n=t;return n}var c=s.requestAnimationFrame||s.webkitRequestAnimationFrame,h=s.cancelAnimationFrame||s.webkitCancelAnimationFrame;if(c&&!h){var u={},m=c;c=function(e){var n=m(function(t){u[n]&&e(t)});return u[n]=!0,n},h=function(t){delete u[t]}}else c&&h||(c=function(t){return s.setTimeout(function(){t(s.performance&&s.performance.now&&s.performance.now()||(new Date).getTime())},16)},h=s.clearTimeout);function f(t,e){var n={};for(var i in t)i&&(n[i]=e(t[i],i));return n}function d(t,e){var n={};for(var i in t)i&&e(t[i],i)&&(n[i]=t[i]);return n}function p(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function v(t,n){return p(t,function(t,e){return t===n[e]})}function g(t){return Math.round(t*e)/e}function _(t,e,n,i){var s=t,r=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return s=Math.max(r[0],s),+g(s=Math.min(r[1],s))}function E(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 x(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),+g(i)}function I(t,e,n){return Math.max(Math.min(t,n),e)}var T=function(){function t(t){var e=t.options,n=t.itm,i=t.em,s=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=s,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(r,t,e){var n,o=this;if(void 0!==e)n=e;else{var i=f(t,function(t,e){return n=Math.abs(Math.abs(t)-Math.abs(r[e])),i=o.options.deceleration,(s=Math.sqrt(n/i*2))<100?0:s;var n,i,s});n=Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)}return I(n,this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),s=t,r=n&&n.event||null;return{depaPos:i,destPos:s,duration:I(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,s),inputEvent:r,input:n&&n.input||null,isTrusted:!!r,done:this.animationEnd}},e.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e){return x(t,e.range,e.circular)});p(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,n,e,!!e),this._animateParam=null,this._raf&&(s=this._raf,h(s)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}var s},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.axm.get(),n=this.axm.map(e,function(t,e){return Math.min(e.range[1],Math.max(e.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e){return b(t,e.range,e.circular)});0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e){return x(t,e.range,e.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.finish(!!t)},e.finish=function(t){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(t)},e.animateLoop=function(r,o){if(r.duration){this._animateParam=l({},r);var a=this._animateParam,h=this,u=a.depaPos;a.startTime=(new Date).getTime(),function t(){h._raf=null;var n=h.easing(((new Date).getTime()-a.startTime)/r.duration),e=f(a.depaPos,function(t,e){return t+a.delta[e]*n}),i=!h.em.triggerChange(e,u);if(u=f(e,function(t){return g(t)}),1<=n){var s=r.destPos;return v(s,h.axm.get(Object.keys(s)))||h.em.triggerChange(s,u),void o()}i?h.finish(!1):h._raf=c(t)}()}else this.em.triggerChange(r.destPos),o()},e.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=I(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this,s=this.createAnimationParam(t,e,n),r=l({},s.depaPos),o=this.em.triggerAnimationStart(s),a=this.getUserControll(s);if(!o&&this.axm.every(a.destPos,function(t,e){return b(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),o&&!v(a.destPos,r)){var h=n&&n.event||null;this.animateLoop({depaPos:r,destPos:a.destPos,duration:a.duration,delta:this.axm.getDelta(r,a.destPos),isTrusted:!!h,inputEvent:h,input:n&&n.input||null},function(){return i.animationEnd()})}},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(v(t,i))return this;this.itm.setInterrupt(!0);var s=d(t,function(t,e){return i[e]!==t});return Object.keys(s).length&&(v(s=this.axm.map(s,function(t,e){var n=e.range,i=e.circular;return i&&(i[0]||i[1])?t:_(t,n,i)}),i)||(0<e?this.animateTo(s,e):(this.em.triggerChange(s),this.finish(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(f(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),y=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n,i){void 0===i&&(i=!1);var s=this.am,r=s.axm,o=s.getEventInfo(),a=r.moveTo(t,e),h=n&&n.event||o&&o.event||null,u={pos:a.pos,delta:a.delta,holding:i,inputEvent:h,isTrusted:!!h,input:n&&n.input||o&&o.input||null,set:h?this.createUserControll(a.pos):function(){}},c=this.axes.trigger("change",u);return h&&r.set(u.set().destPos),c},e.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},e.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:l({},t),duration:e};return function(t,e){return t&&(n.destPos=l({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},t}(),O=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}(),P=function(){function t(t,e){var n=this;this.axis=t,this.options=e,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._complementOptions=function(){var s=this;Object.keys(this.axis).forEach(function(i){s.axis[i]=l({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])})})},e.getDelta=function(t,e){var n=this.get(t);return f(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},{}):l({},this._pos,t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=f(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?x(t,e.range,e.circular):0})),{pos:l({},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 p(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this.axis;return d(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this.axis;return f(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!E(t,e.range)})},t}(),R=function(){function t(t){var e=t.options,n=t.itm,i=t.em,s=t.axm,r=t.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=e,this.itm=n,this.em=i,this.axm=s,this.am=r}var e=t.prototype;return e.atOutside=function(t){var r=this;if(this.isOutside)return this.axm.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});var o=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,e){var n=e.range[0],i=e.range[1],s=e.bounce;return t<n?n-r.am.easing((n-t)/(s[0]*o))*s[0]:i<t?i+r.am.easing((t-i)/(s[1]*o))*s[1]:t})},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.isStopped=!1,this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},e.change=function(t,e,n){if(!this.isStopped&&this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,s=this.axm.get(t.axes);i=f(this.moveDistance||s,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),this.isOutside&&this.axm.every(s,function(t,e){return!E(t,e.range)})&&(this.isOutside=!1),i=this.atOutside(i),!this.em.triggerChange(i,s,{input:t,event:e},!0)&&(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1))}},e.release=function(t,e,n,i){if(!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance){var s=this.axm.get(t.axes),r=this.axm.get(),o=this.axm.get(this.axm.map(n,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?s[n]+t:_(s[n]+t,e.range,e.circular,e.bounce)})),a=this.am.getDuration(o,s,i);0===a&&(o=l({},r));var h={depaPos:r,destPos:o,duration:a,delta:this.axm.getDelta(r,o),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(h),this.moveDistance=null;var u=this.am.getUserControll(h),c=v(u.destPos,r),m={input:t,event:e};c||0===u.duration?(!c&&this.em.triggerChange(u.destPos,r,m,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(m):this.em.triggerFinish(!0)):this.am.animateTo(u.destPos,u.duration,m)}},t}(),D=function(s){function t(t,e,n){void 0===t&&(t={});var i=s.call(this)||this;return i.axis=t,i._inputs=[],i.options=l({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4},e),i.itm=new O(i.options),i.axm=new P(i.axis,i.options),i.em=new y(i),i.am=new T(i),i.io=new R(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}!function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,s);var e=t.prototype;return e.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},e.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);0<=e&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},e.get=function(t){return this.axm.get(t)},e.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},e.isBounceArea=function(t){return this.axm.isOutside(t)},e.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.5.10",t.TRANSFORM=n,t.DIRECTION_NONE=o.DIRECTION_NONE,t.DIRECTION_LEFT=o.DIRECTION_LEFT,t.DIRECTION_RIGHT=o.DIRECTION_RIGHT,t.DIRECTION_UP=o.DIRECTION_UP,t.DIRECTION_DOWN=o.DIRECTION_DOWN,t.DIRECTION_HORIZONTAL=o.DIRECTION_HORIZONTAL,t.DIRECTION_VERTICAL=o.DIRECTION_VERTICAL,t.DIRECTION_ALL=o.DIRECTION_ALL,t}(t),C="PointerEvent"in s||"MSPointerEvent"in s,N="ontouchstart"in s,A="_EGJS_AXES_INPUTTYPE_";function w(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function M(t,e){try{return new o.Manager(t,l({},e))}catch(t){return null}}function L(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=N;break;case"pointer":i=C}}),i?o.PointerEventInput:e&&n?o.TouchMouseInput:e?o.TouchInput:n?o.MouseInput:null}function H(t,e,n){return n?!!(e===o.DIRECTION_ALL||e&t&&n&t):!!(e&t)}var j=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===o.Manager)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=a(t),this.options=l({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?o.DIRECTION_ALL:e?o.DIRECTION_HORIZONTAL:n?o.DIRECTION_VERTICAL:o.DIRECTION_NONE,this.axes=t},e.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[A];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=L(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=M(this.element,l({inputClass:i},this.options.hammerManagerOptions)),this.element[A]=n}return this.panRecognizer=new o.Pan(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=o.DIRECTION_NONE,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[A],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=function(t,e){if(e<0||90<e)return o.DIRECTION_NONE;var n=Math.abs(t);return e<n&&n<180-e?o.DIRECTION_VERTICAL:o.DIRECTION_HORIZONTAL}(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;t.offsetY=n?(t.offsetX=t.deltaX-n.deltaX,t.deltaY-n.deltaY):t.offsetX=0;var i=this.getOffset([t.offsetX,t.offsetY],[H(o.DIRECTION_HORIZONTAL,this._direction,e),H(o.DIRECTION_VERTICAL,this._direction,e)]),s=i.some(function(t){return 0!==t});s&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),(t.preventSystemEvent=s)&&this.observer.change(this,t,w(this.axes,i))},e.onPanend=function(t){var e,n,i,s,r=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[H(o.DIRECTION_HORIZONTAL,this._direction),H(o.DIRECTION_VERTICAL,this._direction)]);e=r,n=this.observer.options.deceleration,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),s=Math.abs(i/-n),r=[e[0]/2*s,e[1]/2*s],this.observer.release(this,t,w(this.axes,r))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},t}(),z=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===o.Manager)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=a(t),this.options=l({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"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){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[A];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=L(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=M(this.element,l({inputClass:i},this.options.hammerManagerOptions)),this.element[A]=n}return this.pinchRecognizer=new o.Pinch(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[A],this.element=null,this.hammer=null},e.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},e.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,w(this.axes,[e])),this._prev=t.scale},e.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,w(this.axes,[e])),this._prev=t.scale},e.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,w(this.axes,[e])),this.observer.release(this,t,w(this.axes,[0]),0),this._base=null,this._prev=null},e.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},e.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},e.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},e.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},t}(),S=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=a(t),this.options=l({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(0<t.deltaY?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,w(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,w(e.axes,[0])))},50)}},e.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}(),k=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=a(t),this.options=l({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.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onKeydown=function(t){if(this._isEnabled){var e=!0,n=1,i=-1;switch(t.keyCode){case 37:case 65:n=-1;break;case 39:case 68:break;case 40:case 83:n=-1,i=1;break;case 38:case 87:i=1;break;default:e=!1}if((-1===i&&!this.axes[0]||1===i&&!this.axes[1])&&(e=!1),e){var s=-1===i?[+this.options.scale[0]*n,0]:[0,+this.options.scale[1]*n];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,w(this.axes,s))}}},e.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,w(e.axes,[0,0])),e._isHolded=!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._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}();return D.PanInput=j,D.PinchInput=z,D.WheelInput=S,D.MoveKeyInput=k,D});
//# sourceMappingURL=axes.min.js.map

@@ -8,3 +8,3 @@ /*

@version 2.5.9
@version 2.5.10

@@ -14,3 +14,3 @@ All-in-one packaged file for ease use of '@egjs/axes' with below dependencies.

*/
!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=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])};var p=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};function a(t){return void 0===t}var t=function(){var t=function(){function t(){this._eventHandler={},this.options={}}var e=t.prototype;return e.trigger=function(t,e){void 0===e&&(e={});var n=this._eventHandler[t]||[];if(!(0<n.length))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],s=0;e.stop=function(){i=!0},e.currentTarget=this;for(var o=arguments.length,a=new Array(2<o?o-2:0),h=2;h<o;h++)a[h-2]=arguments[h];for(1<=a.length&&(r=r.concat(a)),s=0;n[s];s++)n[s].apply(this,r);return!i},e.once=function(r,s){if("object"==typeof r&&a(s)){var t,e=r;for(t in e)this.once(t,e[t]);return this}if("string"==typeof r&&"function"==typeof s){var o=this;this.on(r,function t(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];s.apply(o,n),o.off(r,t)})}return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&a(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}if("string"==typeof t&&"function"==typeof e){var r=this._eventHandler[t];a(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)}return this},e.off=function(t,e){if(a(t))return this._eventHandler={},this;if(a(e)){if("string"==typeof t)return this._eventHandler[t]=void 0,this;var n,i=t;for(n in i)this.off(n,i[n]);return this}var r,s,o=this._eventHandler[t];if(o)for(r=0;void 0!==(s=o[r]);r++)if(s===e){o=o.splice(r,1);break}return this},t}();return t.VERSION="2.1.2",t}();function f(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),+(r=Math.min(s[1],r)).toFixed(5)}function s(t,e){return t<e[0]||t>e[1]}function u(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function o(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.toFixed(5)}function m(t,e){for(var n in t)if(t[n]!==e[n])return!1;return!0}var r,h=function(){function t(t,e){var n=this;this.axis=t,this.options=e,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._complementOptions=function(){var r=this;Object.keys(this.axis).forEach(function(i){r.axis[i]=p({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])})})},e.getDelta=function(t,e){var n=this.get(t);return this.map(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):p({},this._pos,t||{})},e.moveTo=function(n){var i=this,t=this.map(this._pos,function(t,e){return e in n?n[e]-i._pos[e]:0});return this.set(n),{pos:p({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,e){var n=this.axis;for(var i in t)if(i&&!e(t[i],i,n[i]))return!1;return!0},e.filter=function(t,e){var n={},i=this.axis;for(var r in t)r&&e(t[r],r,i[r])&&(n[r]=t[r]);return n},e.map=function(t,e){var n={},i=this.axis;for(var r in t)r&&(n[r]=e(t[r],r,i[r]));return n},e.isOutside=function(t){return!this.every(t?this.get(t):this._pos,function(t,e,n){return!s(t,n.range)})},t}();function c(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function l(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=c(i.childNodes)}else n=c(document.querySelectorAll(t));e||(n=1<=n.length?n[0]:void 0)}else t===r?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in r&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return l(t)}),e||(n=1<=n.length?n[0]:void 0)):n=t;return n}var d=(r="undefined"==typeof window?{}:window).requestAnimationFrame||r.webkitRequestAnimationFrame,v=r.cancelAnimationFrame||r.webkitCancelAnimationFrame;if(d&&!v){var g={},y=d;d=function(e){var n=y(function(t){g[n]&&e(t)});return g[n]=!0,n},v=function(t){delete g[t]}}else d&&v||(d=function(t){return r.setTimeout(function(){t(r.performance&&r.performance.now&&r.performance.now()||(new Date).getTime())},16)},v=r.clearTimeout);function b(t,e,n){return Math.max(Math.min(t,n),e)}var x=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(s,t,e){var n,o=this;if(void 0!==e)n=e;else{var i=this.axm.map(t,function(t,e){return n=Math.abs(Math.abs(t)-Math.abs(s[e])),i=o.options.deceleration,(r=Math.sqrt(n/i*2))<100?0:r;var n,i,r});n=Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)}return b(n,this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:b(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},e.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e,n){return o(t,n.range,n.circular)});this.axm.every(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,e,!!e),this._animateParam=null,this._raf&&(r=this._raf,v(r)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}var r},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.axm.get(),n=this.axm.map(e,function(t,e,n){return Math.min(n.range[1],Math.max(n.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e,n){return u(t,n.range,n.circular)});0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e,n){return o(t,n.range,n.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.em.triggerFinish(!!t)},e.animateLoop=function(e,n){if(this._animateParam=p({},e),this._animateParam.startTime=(new Date).getTime(),e.duration){var i=this._animateParam,r=this;!function t(){if(r._raf=null,1<=r.frame(i))return m(e.destPos,r.axm.get(Object.keys(e.destPos)))||r.em.triggerChange(e.destPos),void n();r._raf=d(t)}()}else this.em.triggerChange(e.destPos),n()},e.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=b(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this,r=this.createAnimationParam(t,e,n),s=p({},r.depaPos),o=this.em.triggerAnimationStart(r),a=this.getUserControll(r);if(!o&&this.axm.every(a.destPos,function(t,e,n){return u(t,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),o&&!m(a.destPos,s)){var h=n&&n.event||null;this.animateLoop({depaPos:s,destPos:a.destPos,duration:a.duration,delta:this.axm.getDelta(s,a.destPos),isTrusted:!!h,inputEvent:h,input:n&&n.input||null},function(){return i.animationEnd()})}},e.frame=function(i){var t=(new Date).getTime()-i.startTime,r=this.easing(t/i.duration),e=i.depaPos;return e=this.axm.map(e,function(t,e,n){return o(t+=i.delta[e]*r,n.range,n.circular)}),this.em.triggerChange(e),r},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,i){void 0===i&&(i=0);var e=Object.keys(t);this.grab(e);var n=this.axm.get(e);if(m(t,n))return this;this.itm.setInterrupt(!0);var r=this.axm.filter(t,function(t,e){return n[e]!==t});return Object.keys(r).length&&(m(r=this.axm.map(r,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?0<i?t:o(t,n.range,n.circular):f(t,n.range,n.circular)}),n)||(0<i?this.animateTo(r,i):(this.em.triggerChange(r),this.itm.setInterrupt(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(this.axm.map(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),E=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=!1);var i=this.am.getEventInfo(),r=this.am.axm.moveTo(t),s=e&&e.event||i&&i.event||null,o={pos:r.pos,delta:r.delta,holding:n,inputEvent:s,isTrusted:!!s,input:e&&e.input||i&&i.input||null,set:s?this.createUserControll(r.pos):function(){}};this.axes.trigger("change",o),s&&this.am.axm.set(o.set().destPos)},e.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},e.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:p({},t),duration:e};return function(t,e){return t&&(n.destPos=p({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},t}(),_=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 e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}var e=t.prototype;return e.atOutside=function(t){var o=this;if(this.isOutside)return this.axm.map(t,function(t,e,n){var i=n.range[0]-n.bounce[0],r=n.range[1]+n.bounce[1];return r<t?r:t<i?i:t});var a=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,e,n){var i=n.range[0],r=n.range[1],s=n.bounce;return t<i?i-o.am.easing((i-t)/(s[0]*a))*s[0]:r<t?r+o.am.easing((t-r)/(s[1]*a))*s[1]:t})},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},e.change=function(t,e,n){if(this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=this.axm.map(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),i=this.axm.map(i,function(t,e,n){return o(t,n.range,n.circular)}),this.isOutside&&this.axm.every(r,function(t,e,n){return!s(t,n.range)})&&(this.isOutside=!1),i=this.atOutside(i),this.em.triggerChange(i,{input:t,event:e},!0)}},e.release=function(t,e,n,i){if(this.itm.isInterrupting()&&this.moveDistance){var r=this.axm.get(t.axes),s=this.axm.get(),o=this.axm.get(this.axm.map(n,function(t,e,n){return n.circular&&(n.circular[0]||n.circular[1])?r[e]+t:f(r[e]+t,n.range,n.circular,n.bounce)})),a=this.am.getDuration(o,r,i);0===a&&(o=p({},s));var h={depaPos:s,destPos:o,duration:a,delta:this.axm.getDelta(s,o),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(h),this.moveDistance=null;var u=this.am.getUserControll(h),c=m(u.destPos,s),l={input:t,event:e};c||0===u.duration?(!c&&this.em.triggerChange(u.destPos,l,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(l):this.em.triggerFinish(!0)):this.am.animateTo(u.destPos,u.duration,l)}},t}();function P(){return(P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function w(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function O(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var I,A="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign,M=["","webkit","Moz","MS","ms","o"],e="undefined"==typeof document?{style:{}}:document.createElement("div"),n="function",D=Math.round,z=Math.abs,C=Date.now;function R(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),s=0;s<M.length;){if((i=(n=M[s])?n+r:e)in t)return i;s++}}I="undefined"==typeof window?{}:window;var S=R(e.style,"touchAction"),H=void 0!==S;var Y="compute",k="auto",X="manipulation",j="none",F="pan-x",W="pan-y",N=function(){if(!H)return!1;var e={},n=I.CSS&&I.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||I.CSS.supports("touch-action",t)}),e}(),q="ontouchstart"in I,L=void 0!==R(I,"PointerEvent"),K=q&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),U="touch",V="mouse",B=25,G=1,Q=4,Z=8,J=1,$=2,tt=4,et=8,nt=16,it=$|tt,rt=et|nt,st=it|rt,ot=["x","y"],at=["clientX","clientY"];function ht(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function ut(t,e){return typeof t===n?t.apply(e&&e[0]||void 0,e):t}function ct(t,e){return-1<t.indexOf(e)}var lt=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===Y&&(t=this.compute()),H&&this.manager.element.style&&N[t]&&(this.manager.element.style[S]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[];return ht(this.manager.recognizers,function(t){ut(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(ct(t,j))return j;var e=ct(t,F),n=ct(t,W);return e&&n?j:e||n?e?F:W:ct(t,X)?X:k}(e.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=ct(i,j)&&!N[j],s=ct(i,W)&&!N[W],o=ct(i,F)&&!N[F];if(r){var a=1===t.pointers.length,h=t.distance<2,u=t.deltaTime<250;if(a&&h&&u)return}if(!o||!s)return r||s&&n&it||o&&n&rt?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function pt(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function ft(t){var e=t.length;if(1===e)return{x:D(t[0].clientX),y:D(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:D(n/e),y:D(i/e)}}function mt(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:D(t.pointers[n].clientX),clientY:D(t.pointers[n].clientY)},n++;return{timeStamp:C(),pointers:e,center:ft(e),deltaX:t.deltaX,deltaY:t.deltaY}}function dt(t,e,n){n||(n=ot);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function vt(t,e,n){n||(n=ot);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function gt(t,e){return t===e?J:z(t)>=z(e)?t<0?$:tt:e<0?et:nt}function yt(t,e,n){return{x:e/t||0,y:n/t||0}}function bt(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=mt(e)),1<r&&!n.firstMultiple?n.firstMultiple=mt(e):1===r&&(n.firstMultiple=!1);var s,o,a,h,u,c,l=n.firstInput,p=n.firstMultiple,f=p?p.center:l.center,m=e.center=ft(i);e.timeStamp=C(),e.deltaTime=e.timeStamp-l.timeStamp,e.angle=vt(f,m),e.distance=dt(f,m),s=n,a=(o=e).center,h=s.offsetDelta||{},u=s.prevDelta||{},c=s.prevInput||{},o.eventType!==G&&c.eventType!==Q||(u=s.prevDelta={x:c.deltaX||0,y:c.deltaY||0},h=s.offsetDelta={x:a.x,y:a.y}),o.deltaX=u.x+(a.x-h.x),o.deltaY=u.y+(a.y-h.y),e.offsetDirection=gt(e.deltaX,e.deltaY);var d,v,g,y,b=yt(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=b.x,e.overallVelocityY=b.y,e.overallVelocity=z(b.x)>z(b.y)?b.x:b.y,e.scale=p?(d=p.pointers,dt((v=i)[0],v[1],at)/dt(d[0],d[1],at)):1,e.rotation=p?(g=p.pointers,vt((y=i)[1],y[0],at)+vt(g[1],g[0],at)):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(e.eventType!==Z&&(B<a||void 0===o.velocity)){var h=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,c=yt(a,h,u);i=c.x,r=c.y,n=z(c.x)>z(c.y)?c.x:c.y,s=gt(h,u),t.lastInterval=e}else n=o.velocity,i=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var x=t.element;pt(e.srcEvent.target,x)&&(x=e.srcEvent.target),e.target=x}function xt(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,s=e&G&&i-r==0,o=e&(Q|Z)&&i-r==0;n.isFirst=!!s,n.isFinal=!!o,s&&(t.session={}),n.eventType=e,bt(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function Et(t){return t.trim().split(/\s+/g)}function _t(e,t,n){ht(Et(t),function(t){e.addEventListener(t,n,!1)})}function Tt(e,t,n){ht(Et(t),function(t){e.removeEventListener(t,n,!1)})}function Pt(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var wt=function(){function t(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){ut(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&_t(this.element,this.evEl,this.domHandler),this.evTarget&&_t(this.target,this.evTarget,this.domHandler),this.evWin&&_t(Pt(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Tt(this.element,this.evEl,this.domHandler),this.evTarget&&Tt(this.target,this.evTarget,this.domHandler),this.evWin&&Tt(Pt(this.element),this.evWin,this.domHandler)},t}();function Ot(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}var It={pointerdown:G,pointermove:2,pointerup:Q,pointercancel:Z,pointerout:Z},At={2:U,3:"pen",4:V,5:"kinect"},Mt="pointerdown",Dt="pointermove pointerup pointercancel";I.MSPointerEvent&&!I.PointerEvent&&(Mt="MSPointerDown",Dt="MSPointerMove MSPointerUp MSPointerCancel");var zt=function(n){function i(){var t,e=i.prototype;return e.evEl=Mt,e.evWin=Dt,(t=n.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return w(i,n),i.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=It[i],s=At[t.pointerType]||t.pointerType,o=s===U,a=Ot(e,t.pointerId,"pointerId");r&G&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):r&(Q|Z)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),n&&e.splice(a,1))},i}(wt);function Ct(t){return Array.prototype.slice.call(t,0)}function Rt(t,n,e){for(var i=[],r=[],s=0;s<t.length;){var o=n?t[s][n]:t[s];Ot(r,o)<0&&i.push(t[s]),r[s]=o,s++}return e&&(i=n?i.sort(function(t,e){return t[n]>e[n]}):i.sort()),i}var St={touchstart:G,touchmove:2,touchend:Q,touchcancel:Z},Ht=function(t){function e(){return e.prototype.evTarget="touchstart touchmove touchend touchcancel",e.prototype.targetIds={},t.apply(this,arguments)||this}return w(e,t),e.prototype.handler=function(t){var e=St[t.type],n=function(t,e){var n,i,r=Ct(t.touches),s=this.targetIds;if(e&(2|G)&&1===r.length)return s[r[0].identifier]=!0,[r,r];var o=Ct(t.changedTouches),a=[],h=this.target;if(i=r.filter(function(t){return pt(t.target,h)}),e===G)for(n=0;n<i.length;)s[i[n].identifier]=!0,n++;n=0;for(;n<o.length;)s[o[n].identifier]&&a.push(o[n]),e&(Q|Z)&&delete s[o[n].identifier],n++;return a.length?[Rt(i.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:U,srcEvent:t})},e}(wt);var Yt={mousedown:G,mousemove:2,mouseup:Q},kt=function(n){function i(){var t,e=i.prototype;return e.evEl="mousedown",e.evWin="mousemove mouseup",(t=n.apply(this,arguments)||this).pressed=!1,t}return w(i,n),i.prototype.handler=function(t){var e=Yt[t.type];e&G&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=Q),this.pressed&&(e&Q&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:V,srcEvent:t}))},i}(wt),Xt=2500,jt=25;function Ft(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(n);setTimeout(function(){var t=i.indexOf(n);-1<t&&i.splice(t,1)},Xt)}}var Wt=function(){return function(n){function t(t,e){var s;return(s=n.call(this,t,e)||this).handler=function(t,e,n){var i=n.pointerType===U,r=n.pointerType===V;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&G?(this.primaryTouch=e.changedPointers[0].identifier,Ft.call(this,e)):t&(Q|Z)&&Ft.call(this,e)}).call(O(O(s)),e,n);else if(r&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],s=Math.abs(e-r.x),o=Math.abs(n-r.y);if(s<=jt&&o<=jt)return!0}return!1}.call(O(O(s)),n))return;s.callback(t,e,n)}},s.touch=new Ht(s.manager,s.handler),s.mouse=new kt(s.manager,s.handler),s.primaryTouch=null,s.lastTouches=[],s}return w(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(wt)}();function Nt(t,e,n){return!!Array.isArray(t)&&(ht(t,n[e],n),!0)}var qt=1;function Lt(t,e){var n=e.manager;return n?n.get(t):t}function Kt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var Ut=function(){function t(t){void 0===t&&(t={}),this.options=P({enable:!0},t),this.id=qt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return A(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(Nt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Lt(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return Nt(t,"dropRecognizeWith",this)||(t=Lt(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(Nt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Ot(e,t=Lt(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(Nt(t,"dropRequireFailure",this))return this;t=Lt(t,this);var e=Ot(this.requireFail,t);return-1<e&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return 0<this.requireFail.length},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(e){var n=this,t=this.state;function i(t){n.manager.emit(t,e)}t<8&&i(n.options.event+Kt(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+Kt(t))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=A({},t);if(!ut(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Vt={domEvents:!1,touchAction:Y,enable:!0,inputTarget:null,inputClass:null,preset:[],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Bt(n,i){var r,s=n.element;s.style&&(ht(n.options.cssProps,function(t,e){r=R(s.style,e),s.style[r]=i?(n.oldCssProps[r]=s.style[r],t):n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var Gt=function(){function t(t,e){var n,i=this;this.options=A({},Vt,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(L?zt:K?Ht:q?Wt:kt))(n,xt),this.touchAction=new lt(this,this.options.touchAction),Bt(this,!0),ht(this.options.recognizers,function(t){var e=i.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return A(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<i.length;)n=i[s],2===e.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),s++}},e.get=function(t){if(t instanceof Ut)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(Nt(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},e.remove=function(t){if(Nt(t,"remove",this))return this;var e=this.get(t);if(t){var n=this.recognizers,i=Ot(n,e);-1!==i&&(n.splice(i,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return ht(Et(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return ht(Et(t),function(t){e?n[t]&&n[t].splice(Ot(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){var n,i,r;this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var s=this.handlers[t]&&this.handlers[t].slice();if(s&&s.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<s.length;)s[o](e),o++}},e.destroy=function(){this.element&&Bt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}();var Qt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,P({pointers:1},t))||this}w(t,e);var n=t.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(n&Z||!r)?16|e:i||r?n&Q?8|e:2&e?4|e:2:32},t}(Ut);function Zt(t){return t===nt?"down":t===et?"up":t===$?"left":t===tt?"right":""}var Jt=function(n){function t(t){var e;return void 0===t&&(t={}),(e=n.call(this,P({event:"pan",threshold:10,pointers:1,direction:st},t))||this).pX=null,e.pY=null,e}w(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return t&it&&e.push(W),t&rt&&e.push(F),e},e.directionTest=function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(i=e.direction&it?(r=0===s?J:s<0?$:tt,n=s!==this.pX,Math.abs(t.deltaX)):(r=0===o?J:o<0?et:nt,n=o!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return Qt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Zt(t.direction);e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Qt),$t=function(n){function t(t){return void 0===t&&(t={}),n.call(this,P({event:"pinch",threshold:0,pointers:2},t))||this}w(t,n);var e=t.prototype;return e.getTouchAction=function(){return[j]},e.attrTest=function(t){return n.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},e.emit=function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}n.prototype.emit.call(this,t)},t}(Qt),te=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""}(),ee=function(r){function t(t,e,n){void 0===t&&(t={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=p({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4},e),i.itm=new _(i.options),i.axm=new h(i.axis,i.options),i.em=new E(i),i.am=new x(i),i.io=new T(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}!function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,r);var e=t.prototype;return e.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},e.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);0<=e&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},e.get=function(t){return this.axm.get(t)},e.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},e.isBounceArea=function(t){return this.axm.isOutside(t)},e.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.5.9",t.TRANSFORM=te,t.DIRECTION_NONE=J,t.DIRECTION_LEFT=$,t.DIRECTION_RIGHT=tt,t.DIRECTION_UP=et,t.DIRECTION_DOWN=nt,t.DIRECTION_HORIZONTAL=it,t.DIRECTION_VERTICAL=rt,t.DIRECTION_ALL=st,t}(t),ne="PointerEvent"in r||"MSPointerEvent"in r,ie="ontouchstart"in r,re="_EGJS_AXES_INPUTTYPE_";function se(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function oe(t,e){try{return new Gt(t,p({},e))}catch(t){return null}}function ae(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=ie;break;case"pointer":i=ne}}),i?zt:e&&n?Wt:e?Ht:n?kt:null}function he(t,e,n){return n?!!(e===st||e&t&&n&t):!!(e&t)}var ue=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===Gt)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=l(t),this.options=p({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?st:e?it:n?rt:J,this.axes=t},e.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[re];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=ae(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=oe(this.element,p({inputClass:i},this.options.hammerManagerOptions)),this.element[re]=n}return this.panRecognizer=new Jt(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=J,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[re],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=function(t,e){if(e<0||90<e)return J;var n=Math.abs(t);return e<n&&n<180-e?rt:it}(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;t.offsetY=n?(t.offsetX=t.deltaX-n.deltaX,t.deltaY-n.deltaY):t.offsetX=0;var i=this.getOffset([t.offsetX,t.offsetY],[he(it,this._direction,e),he(rt,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),(t.preventSystemEvent=r)&&this.observer.change(this,t,se(this.axes,i))},e.onPanend=function(t){var e,n,i,r,s=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[he(it,this._direction),he(rt,this._direction)]);e=s,n=this.observer.options.deceleration,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=Math.abs(i/-n),s=[e[0]/2*r,e[1]/2*r],this.observer.release(this,t,se(this.axes,s))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},t}(),ce=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===Gt)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=l(t),this.options=p({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"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){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[re];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=ae(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=oe(this.element,p({inputClass:i},this.options.hammerManagerOptions)),this.element[re]=n}return this.pinchRecognizer=new $t(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[re],this.element=null,this.hammer=null},e.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},e.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,se(this.axes,[e])),this._prev=t.scale},e.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,se(this.axes,[e])),this._prev=t.scale},e.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,se(this.axes,[e])),this.observer.release(this,t,se(this.axes,[0]),0),this._base=null,this._prev=null},e.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},e.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},e.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},e.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},t}(),le=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=l(t),this.options=p({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(0<t.deltaY?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,se(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,se(e.axes,[0])))},50)}},e.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}(),pe=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=l(t),this.options=p({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.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onKeydown=function(t){if(this._isEnabled){var e=!0,n=1,i=-1;switch(t.keyCode){case 37:case 65:n=-1;break;case 39:case 68:break;case 40:case 83:n=-1,i=1;break;case 38:case 87:i=1;break;default:e=!1}if((-1===i&&!this.axes[0]||1===i&&!this.axes[1])&&(e=!1),e){var r=-1===i?[+this.options.scale[0]*n,0]:[0,+this.options.scale[1]*n];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,se(this.axes,r))}}},e.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,se(e.axes,[0,0])),e._isHolded=!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._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}();return ee.PanInput=ue,ee.PinchInput=ce,ee.WheelInput=le,ee.MoveKeyInput=pe,ee});
!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=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])};var p=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t};function a(t){return void 0===t}var r,t=function(){var t=function(){function t(){this._eventHandler={},this.options={}}var e=t.prototype;return e.trigger=function(t,e){void 0===e&&(e={});var n=this._eventHandler[t]||[];if(!(0<n.length))return!0;n=n.concat(),e.eventType=t;var i=!1,r=[e],s=0;e.stop=function(){i=!0},e.currentTarget=this;for(var o=arguments.length,a=new Array(2<o?o-2:0),h=2;h<o;h++)a[h-2]=arguments[h];for(1<=a.length&&(r=r.concat(a)),s=0;n[s];s++)n[s].apply(this,r);return!i},e.once=function(r,s){if("object"==typeof r&&a(s)){var t,e=r;for(t in e)this.once(t,e[t]);return this}if("string"==typeof r&&"function"==typeof s){var o=this;this.on(r,function t(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];s.apply(o,n),o.off(r,t)})}return this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&a(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}if("string"==typeof t&&"function"==typeof e){var r=this._eventHandler[t];a(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)}return this},e.off=function(t,e){if(a(t))return this._eventHandler={},this;if(a(e)){if("string"==typeof t)return this._eventHandler[t]=void 0,this;var n,i=t;for(n in i)this.off(n,i[n]);return this}var r,s,o=this._eventHandler[t];if(o)for(r=0;void 0!==(s=o[r]);r++)if(s===e){o=o.splice(r,1);break}return this},t}();return t.VERSION="2.1.2",t}();function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function o(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r="undefined"==typeof window?{}:window;var u,c="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign,l=["","webkit","Moz","MS","ms","o"],e="undefined"==typeof document?{style:{}}:document.createElement("div"),n="function",f=Math.round,x=Math.abs,_=Date.now;function m(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),s=0;s<l.length;){if((i=(n=l[s])?n+r:e)in t)return i;s++}}u="undefined"==typeof window?{}:window;var d=m(e.style,"touchAction"),v=void 0!==d;var g="compute",y="auto",b="manipulation",E="none",T="pan-x",P="pan-y",w=function(){if(!v)return!1;var e={},n=u.CSS&&u.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||u.CSS.supports("touch-action",t)}),e}(),O="ontouchstart"in u,I=void 0!==m(u,"PointerEvent"),M=O&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),A="touch",D="mouse",z=25,C=1,R=4,S=8,H=1,Y=2,k=4,X=8,j=16,F=Y|k,W=X|j,N=F|W,q=["x","y"],L=["clientX","clientY"];function K(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(void 0!==t.length)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function U(t,e){return typeof t===n?t.apply(e&&e[0]||void 0,e):t}function V(t,e){return-1<t.indexOf(e)}var B=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===g&&(t=this.compute()),v&&this.manager.element.style&&w[t]&&(this.manager.element.style[d]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[];return K(this.manager.recognizers,function(t){U(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(t){if(V(t,E))return E;var e=V(t,T),n=V(t,P);return e&&n?E:e||n?e?T:P:V(t,b)?b:y}(e.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=V(i,E)&&!w[E],s=V(i,P)&&!w[P],o=V(i,T)&&!w[T];if(r){var a=1===t.pointers.length,h=t.distance<2,u=t.deltaTime<250;if(a&&h&&u)return}if(!o||!s)return r||s&&n&F||o&&n&W?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function G(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Q(t){var e=t.length;if(1===e)return{x:f(t[0].clientX),y:f(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:f(n/e),y:f(i/e)}}function Z(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:f(t.pointers[n].clientX),clientY:f(t.pointers[n].clientY)},n++;return{timeStamp:_(),pointers:e,center:Q(e),deltaX:t.deltaX,deltaY:t.deltaY}}function J(t,e,n){n||(n=q);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function $(t,e,n){n||(n=q);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function tt(t,e){return t===e?H:x(t)>=x(e)?t<0?Y:k:e<0?X:j}function et(t,e,n){return{x:e/t||0,y:n/t||0}}function nt(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=Z(e)),1<r&&!n.firstMultiple?n.firstMultiple=Z(e):1===r&&(n.firstMultiple=!1);var s,o,a,h,u,c,l=n.firstInput,p=n.firstMultiple,f=p?p.center:l.center,m=e.center=Q(i);e.timeStamp=_(),e.deltaTime=e.timeStamp-l.timeStamp,e.angle=$(f,m),e.distance=J(f,m),s=n,a=(o=e).center,h=s.offsetDelta||{},u=s.prevDelta||{},c=s.prevInput||{},o.eventType!==C&&c.eventType!==R||(u=s.prevDelta={x:c.deltaX||0,y:c.deltaY||0},h=s.offsetDelta={x:a.x,y:a.y}),o.deltaX=u.x+(a.x-h.x),o.deltaY=u.y+(a.y-h.y),e.offsetDirection=tt(e.deltaX,e.deltaY);var d,v,g,y,b=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=b.x,e.overallVelocityY=b.y,e.overallVelocity=x(b.x)>x(b.y)?b.x:b.y,e.scale=p?(d=p.pointers,J((v=i)[0],v[1],L)/J(d[0],d[1],L)):1,e.rotation=p?(g=p.pointers,$((y=i)[1],y[0],L)+$(g[1],g[0],L)):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,s,o=t.lastInterval||e,a=e.timeStamp-o.timeStamp;if(e.eventType!==S&&(z<a||void 0===o.velocity)){var h=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,c=et(a,h,u);i=c.x,r=c.y,n=x(c.x)>x(c.y)?c.x:c.y,s=tt(h,u),t.lastInterval=e}else n=o.velocity,i=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=s}(n,e);var E=t.element;G(e.srcEvent.target,E)&&(E=e.srcEvent.target),e.target=E}function it(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,s=e&C&&i-r==0,o=e&(R|S)&&i-r==0;n.isFirst=!!s,n.isFinal=!!o,s&&(t.session={}),n.eventType=e,nt(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function rt(t){return t.trim().split(/\s+/g)}function st(e,t,n){K(rt(t),function(t){e.addEventListener(t,n,!1)})}function ot(e,t,n){K(rt(t),function(t){e.removeEventListener(t,n,!1)})}function at(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var ht=function(){function t(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){U(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&st(this.element,this.evEl,this.domHandler),this.evTarget&&st(this.target,this.evTarget,this.domHandler),this.evWin&&st(at(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&ot(this.element,this.evEl,this.domHandler),this.evTarget&&ot(this.target,this.evTarget,this.domHandler),this.evWin&&ot(at(this.element),this.evWin,this.domHandler)},t}();function ut(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}var ct={pointerdown:C,pointermove:2,pointerup:R,pointercancel:S,pointerout:S},lt={2:A,3:"pen",4:D,5:"kinect"},pt="pointerdown",ft="pointermove pointerup pointercancel";u.MSPointerEvent&&!u.PointerEvent&&(pt="MSPointerDown",ft="MSPointerMove MSPointerUp MSPointerCancel");var mt=function(n){function i(){var t,e=i.prototype;return e.evEl=pt,e.evWin=ft,(t=n.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return o(i,n),i.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=ct[i],s=lt[t.pointerType]||t.pointerType,o=s===A,a=ut(e,t.pointerId,"pointerId");r&C&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):r&(R|S)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),n&&e.splice(a,1))},i}(ht);function dt(t){return Array.prototype.slice.call(t,0)}function vt(t,n,e){for(var i=[],r=[],s=0;s<t.length;){var o=n?t[s][n]:t[s];ut(r,o)<0&&i.push(t[s]),r[s]=o,s++}return e&&(i=n?i.sort(function(t,e){return t[n]>e[n]}):i.sort()),i}var gt={touchstart:C,touchmove:2,touchend:R,touchcancel:S},yt=function(t){function e(){return e.prototype.evTarget="touchstart touchmove touchend touchcancel",e.prototype.targetIds={},t.apply(this,arguments)||this}return o(e,t),e.prototype.handler=function(t){var e=gt[t.type],n=function(t,e){var n,i,r=dt(t.touches),s=this.targetIds;if(e&(2|C)&&1===r.length)return s[r[0].identifier]=!0,[r,r];var o=dt(t.changedTouches),a=[],h=this.target;if(i=r.filter(function(t){return G(t.target,h)}),e===C)for(n=0;n<i.length;)s[i[n].identifier]=!0,n++;n=0;for(;n<o.length;)s[o[n].identifier]&&a.push(o[n]),e&(R|S)&&delete s[o[n].identifier],n++;return a.length?[vt(i.concat(a),"identifier",!0),a]:void 0}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:A,srcEvent:t})},e}(ht);var bt={mousedown:C,mousemove:2,mouseup:R},Et=function(n){function i(){var t,e=i.prototype;return e.evEl="mousedown",e.evWin="mousemove mouseup",(t=n.apply(this,arguments)||this).pressed=!1,t}return o(i,n),i.prototype.handler=function(t){var e=bt[t.type];e&C&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=R),this.pressed&&(e&R&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:D,srcEvent:t}))},i}(ht),xt=2500,_t=25;function Tt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY},i=this.lastTouches;this.lastTouches.push(n);setTimeout(function(){var t=i.indexOf(n);-1<t&&i.splice(t,1)},xt)}}var Pt=function(){return function(n){function t(t,e){var s;return(s=n.call(this,t,e)||this).handler=function(t,e,n){var i=n.pointerType===A,r=n.pointerType===D;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(t,e){t&C?(this.primaryTouch=e.changedPointers[0].identifier,Tt.call(this,e)):t&(R|S)&&Tt.call(this,e)}).call(h(h(s)),e,n);else if(r&&function(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],s=Math.abs(e-r.x),o=Math.abs(n-r.y);if(s<=_t&&o<=_t)return!0}return!1}.call(h(h(s)),n))return;s.callback(t,e,n)}},s.touch=new yt(s.manager,s.handler),s.mouse=new Et(s.manager,s.handler),s.primaryTouch=null,s.lastTouches=[],s}return o(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(ht)}();function wt(t,e,n){return!!Array.isArray(t)&&(K(t,n[e],n),!0)}var Ot=1;function It(t,e){var n=e.manager;return n?n.get(t):t}function Mt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var At=function(){function t(t){void 0===t&&(t={}),this.options=s({enable:!0},t),this.id=Ot++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return c(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(wt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=It(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return wt(t,"dropRecognizeWith",this)||(t=It(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(wt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===ut(e,t=It(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(wt(t,"dropRequireFailure",this))return this;t=It(t,this);var e=ut(this.requireFail,t);return-1<e&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return 0<this.requireFail.length},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(e){var n=this,t=this.state;function i(t){n.manager.emit(t,e)}t<8&&i(n.options.event+Mt(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+Mt(t))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=32},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=c({},t);if(!U(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Dt={domEvents:!1,touchAction:g,enable:!0,inputTarget:null,inputClass:null,preset:[],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function zt(n,i){var r,s=n.element;s.style&&(K(n.options.cssProps,function(t,e){r=m(s.style,e),s.style[r]=i?(n.oldCssProps[r]=s.style[r],t):n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var Ct=function(){function t(t,e){var n,i=this;this.options=c({},Dt,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(I?mt:M?yt:O?Pt:Et))(n,it),this.touchAction=new B(this,this.options.touchAction),zt(this,!0),K(this.options.recognizers,function(t){var e=i.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var s=0;s<i.length;)n=i[s],2===e.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),s++}},e.get=function(t){if(t instanceof At)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event===t)return e[n];return null},e.add=function(t){if(wt(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),(t.manager=this).touchAction.update(),t},e.remove=function(t){if(wt(t,"remove",this))return this;var e=this.get(t);if(t){var n=this.recognizers,i=ut(n,e);-1!==i&&(n.splice(i,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return K(rt(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var n=this.handlers;return K(rt(t),function(t){e?n[t]&&n[t].splice(ut(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){var n,i,r;this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var s=this.handlers[t]&&this.handlers[t].slice();if(s&&s.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<s.length;)s[o](e),o++}},e.destroy=function(){this.element&&zt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}();var Rt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,s({pointers:1},t))||this}o(t,e);var n=t.prototype;return n.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},n.process=function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(n&S||!r)?16|e:i||r?n&R?8|e:2&e?4|e:2:32},t}(At);function St(t){return t===j?"down":t===X?"up":t===Y?"left":t===k?"right":""}var Ht=function(n){function t(t){var e;return void 0===t&&(t={}),(e=n.call(this,s({event:"pan",threshold:10,pointers:1,direction:N},t))||this).pX=null,e.pY=null,e}o(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return t&F&&e.push(P),t&W&&e.push(T),e},e.directionTest=function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(i=e.direction&F?(r=0===s?H:s<0?Y:k,n=s!==this.pX,Math.abs(t.deltaX)):(r=0===o?H:o<0?X:j,n=o!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return Rt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},e.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=St(t.direction);e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Rt),Yt=function(n){function t(t){return void 0===t&&(t={}),n.call(this,s({event:"pinch",threshold:0,pointers:2},t))||this}o(t,n);var e=t.prototype;return e.getTouchAction=function(){return[E]},e.attrTest=function(t){return n.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},e.emit=function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}n.prototype.emit.call(this,t)},t}(Rt),kt=1e5,Xt=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""}();function jt(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function Ft(t,e){var n;if(void 0===e&&(e=!1),"string"==typeof t){if(t.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=t,n=jt(i.childNodes)}else n=jt(document.querySelectorAll(t));e||(n=1<=n.length?n[0]:void 0)}else t===r?n=t:!t.nodeName||1!==t.nodeType&&9!==t.nodeType?"jQuery"in r&&t instanceof jQuery||t.constructor.prototype.jquery?n=e?t.toArray():t.get(0):Array.isArray(t)&&(n=t.map(function(t){return Ft(t)}),e||(n=1<=n.length?n[0]:void 0)):n=t;return n}var Wt=r.requestAnimationFrame||r.webkitRequestAnimationFrame,Nt=r.cancelAnimationFrame||r.webkitCancelAnimationFrame;if(Wt&&!Nt){var qt={},Lt=Wt;Wt=function(e){var n=Lt(function(t){qt[n]&&e(t)});return qt[n]=!0,n},Nt=function(t){delete qt[t]}}else Wt&&Nt||(Wt=function(t){return r.setTimeout(function(){t(r.performance&&r.performance.now&&r.performance.now()||(new Date).getTime())},16)},Nt=r.clearTimeout);function Kt(t,e){var n={};for(var i in t)i&&(n[i]=e(t[i],i));return n}function Ut(t,e){var n={};for(var i in t)i&&e(t[i],i)&&(n[i]=t[i]);return n}function Vt(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function Bt(t,n){return Vt(t,function(t,e){return t===n[e]})}function Gt(t){return Math.round(t*kt)/kt}function Qt(t,e,n,i){var r=t,s=[n[0]?e[0]:i?e[0]-i[0]:e[0],n[1]?e[1]:i?e[1]+i[1]:e[1]];return r=Math.max(s[0],r),+Gt(r=Math.min(s[1],r))}function Zt(t,e){return t<e[0]||t>e[1]}function Jt(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function $t(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),+Gt(i)}function te(t,e,n){return Math.max(Math.min(t,n),e)}var ee=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=r,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(s,t,e){var n,o=this;if(void 0!==e)n=e;else{var i=Kt(t,function(t,e){return n=Math.abs(Math.abs(t)-Math.abs(s[e])),i=o.options.deceleration,(r=Math.sqrt(n/i*2))<100?0:r;var n,i,r});n=Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)}return te(n,this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=t,s=n&&n.event||null;return{depaPos:i,destPos:r,duration:te(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,r),inputEvent:s,input:n&&n.input||null,isTrusted:!!s,done:this.animationEnd}},e.grab=function(t,e){if(this._animateParam&&t.length){var n=this.axm.get(t),i=this.axm.map(n,function(t,e){return $t(t,e.range,e.circular)});Vt(i,function(t,e){return n[e]===t})||this.em.triggerChange(i,n,e,!!e),this._animateParam=null,this._raf&&(r=this._raf,Nt(r)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event))}var r},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.axm.get(),n=this.axm.map(e,function(t,e){return Math.min(e.range[1],Math.max(e.range[0],t))});this.animateTo(n,this.getDuration(e,n),t)},e.animationEnd=function(){var t=this.getEventInfo();this._animateParam=null;var e=this.axm.filter(this.axm.get(),function(t,e){return Jt(t,e.range,e.circular)});0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e){return $t(t,e.range,e.circular)})),this.itm.setInterrupt(!1),this.em.triggerAnimationEnd(!!t),this.axm.isOutside()?this.restore(t):this.finish(!!t)},e.finish=function(t){this._animateParam=null,this.itm.setInterrupt(!1),this.em.triggerFinish(t)},e.animateLoop=function(s,o){if(s.duration){this._animateParam=p({},s);var a=this._animateParam,h=this,u=a.depaPos;a.startTime=(new Date).getTime(),function t(){h._raf=null;var n=h.easing(((new Date).getTime()-a.startTime)/s.duration),e=Kt(a.depaPos,function(t,e){return t+a.delta[e]*n}),i=!h.em.triggerChange(e,u);if(u=Kt(e,function(t){return Gt(t)}),1<=n){var r=s.destPos;return Bt(r,h.axm.get(Object.keys(r)))||h.em.triggerChange(r,u),void o()}i?h.finish(!1):h._raf=Wt(t)}()}else this.em.triggerChange(s.destPos),o()},e.getUserControll=function(t){var e=t.setTo();return e.destPos=this.axm.get(e.destPos),e.duration=te(e.duration,this.options.minimumDuration,this.options.maximumDuration),e},e.animateTo=function(t,e,n){var i=this,r=this.createAnimationParam(t,e,n),s=p({},r.depaPos),o=this.em.triggerAnimationStart(r),a=this.getUserControll(r);if(!o&&this.axm.every(a.destPos,function(t,e){return Jt(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),o&&!Bt(a.destPos,s)){var h=n&&n.event||null;this.animateLoop({depaPos:s,destPos:a.destPos,duration:a.duration,delta:this.axm.getDelta(s,a.destPos),isTrusted:!!h,inputEvent:h,input:n&&n.input||null},function(){return i.animationEnd()})}},e.easing=function(t){return 1<t?1:this.options.easing(t)},e.setTo=function(t,e){void 0===e&&(e=0);var n=Object.keys(t);this.grab(n);var i=this.axm.get(n);if(Bt(t,i))return this;this.itm.setInterrupt(!0);var r=Ut(t,function(t,e){return i[e]!==t});return Object.keys(r).length&&(Bt(r=this.axm.map(r,function(t,e){var n=e.range,i=e.circular;return i&&(i[0]||i[1])?t:Qt(t,n,i)}),i)||(0<e?this.animateTo(r,e):(this.em.triggerChange(r),this.finish(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(Kt(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),ne=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n,i){void 0===i&&(i=!1);var r=this.am,s=r.axm,o=r.getEventInfo(),a=s.moveTo(t,e),h=n&&n.event||o&&o.event||null,u={pos:a.pos,delta:a.delta,holding:i,inputEvent:h,isTrusted:!!h,input:n&&n.input||o&&o.input||null,set:h?this.createUserControll(a.pos):function(){}},c=this.axes.trigger("change",u);return h&&s.set(u.set().destPos),c},e.triggerAnimationStart=function(t){return t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){void 0===t&&(t=!1),this.axes.trigger("animationEnd",{isTrusted:t})},e.triggerFinish=function(t){void 0===t&&(t=!1),this.axes.trigger("finish",{isTrusted:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:p({},t),duration:e};return function(t,e){return t&&(n.destPos=p({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},t}(),ie=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}(),re=function(){function t(t,e){var n=this;this.axis=t,this.options=e,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._complementOptions=function(){var r=this;Object.keys(this.axis).forEach(function(i){r.axis[i]=p({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])})})},e.getDelta=function(t,e){var n=this.get(t);return Kt(this.get(e),function(t,e){return t-n[e]})},e.get=function(t){var n=this;return t&&Array.isArray(t)?t.reduce(function(t,e){return e&&e in n._pos&&(t[e]=n._pos[e]),t},{}):p({},this._pos,t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=Kt(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?$t(t,e.range,e.circular):0})),{pos:p({},this._pos),delta:t}},e.set=function(t){for(var e in t)e&&e in this._pos&&(this._pos[e]=t[e])},e.every=function(t,n){var i=this.axis;return Vt(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this.axis;return Ut(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this.axis;return Kt(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!Zt(t,e.range)})},t}(),se=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,s=t.am;this.isOutside=!1,this.moveDistance=null,this.isStopped=!1,this.options=e,this.itm=n,this.em=i,this.axm=r,this.am=s}var e=t.prototype;return e.atOutside=function(t){var s=this;if(this.isOutside)return this.axm.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});var o=this.am.easing(1e-5)/1e-5;return this.axm.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce;return t<n?n-s.am.easing((n-t)/(r[0]*o))*r[0]:i<t?i+s.am.easing((t-i)/(r[1]*o))*r[1]:t})},e.get=function(t){return this.axm.get(t.axes)},e.hold=function(t,e){if(!this.itm.isInterrupted()&&t.axes.length){var n={input:t,event:e};this.isStopped=!1,this.itm.setInterrupt(!0),this.am.grab(t.axes,n),!this.moveDistance&&this.em.triggerHold(this.axm.get(),n),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes)}},e.change=function(t,e,n){if(!this.isStopped&&this.itm.isInterrupting()&&!this.axm.every(n,function(t){return 0===t})){var i,r=this.axm.get(t.axes);i=Kt(this.moveDistance||r,function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=i),this.isOutside&&this.axm.every(r,function(t,e){return!Zt(t,e.range)})&&(this.isOutside=!1),i=this.atOutside(i),!this.em.triggerChange(i,r,{input:t,event:e},!0)&&(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1))}},e.release=function(t,e,n,i){if(!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance){var r=this.axm.get(t.axes),s=this.axm.get(),o=this.axm.get(this.axm.map(n,function(t,e,n){return e.circular&&(e.circular[0]||e.circular[1])?r[n]+t:Qt(r[n]+t,e.range,e.circular,e.bounce)})),a=this.am.getDuration(o,r,i);0===a&&(o=p({},s));var h={depaPos:s,destPos:o,duration:a,delta:this.axm.getDelta(s,o),inputEvent:e,input:t,isTrusted:!0};this.em.triggerRelease(h),this.moveDistance=null;var u=this.am.getUserControll(h),c=Bt(u.destPos,s),l={input:t,event:e};c||0===u.duration?(!c&&this.em.triggerChange(u.destPos,s,l,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(l):this.em.triggerFinish(!0)):this.am.animateTo(u.destPos,u.duration,l)}},t}(),oe=function(r){function t(t,e,n){void 0===t&&(t={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=p({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4},e),i.itm=new ie(i.options),i.axm=new re(i.axis,i.options),i.em=new ne(i),i.am=new ee(i),i.io=new se(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}!function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(t,r);var e=t.prototype;return e.connect=function(t,e){var n;if(n="string"==typeof t?t.split(" "):t.concat(),~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e){var i=this._inputs.filter(function(t){return t.hammer&&t.element===e.element});i.length&&(e.hammer=i[0].hammer)}return e.mapAxes(n),e.connect(this.io),this._inputs.push(e),this},e.disconnect=function(t){if(t){var e=this._inputs.indexOf(t);0<=e&&(this._inputs[e].disconnect(),this._inputs.splice(e,1))}else this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[];return this},e.get=function(t){return this.axm.get(t)},e.setTo=function(t,e){return void 0===e&&(e=0),this.am.setTo(t,e),this},e.setBy=function(t,e){return void 0===e&&(e=0),this.am.setBy(t,e),this},e.isBounceArea=function(t){return this.axm.isOutside(t)},e.destroy=function(){this.disconnect(),this.em.destroy()},t.VERSION="2.5.10",t.TRANSFORM=Xt,t.DIRECTION_NONE=H,t.DIRECTION_LEFT=Y,t.DIRECTION_RIGHT=k,t.DIRECTION_UP=X,t.DIRECTION_DOWN=j,t.DIRECTION_HORIZONTAL=F,t.DIRECTION_VERTICAL=W,t.DIRECTION_ALL=N,t}(t),ae="PointerEvent"in r||"MSPointerEvent"in r,he="ontouchstart"in r,ue="_EGJS_AXES_INPUTTYPE_";function ce(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function le(t,e){try{return new Ct(t,p({},e))}catch(t){return null}}function pe(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=he;break;case"pointer":i=ae}}),i?mt:e&&n?Pt:e?yt:n?Et:null}function fe(t,e,n){return n?!!(e===N||e&t&&n&t):!!(e&t)}var me=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,void 0===Ct)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=Ft(t),this.options=p({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"none"}}},e),this.onHammerInput=this.onHammerInput.bind(this),this.onPanmove=this.onPanmove.bind(this),this.onPanend=this.onPanend.bind(this)}var e=t.prototype;return e.mapAxes=function(t){var e=!!t[0],n=!!t[1];this._direction=e&&n?N:e?F:n?W:H,this.axes=t},e.connect=function(t){var e={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[ue];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=pe(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=le(this.element,p({inputClass:i},this.options.hammerManagerOptions)),this.element[ue]=n}return this.panRecognizer=new Ht(e),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=H,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[ue],this.element=null,this.hammer=null},e.enable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pan").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pan").options.enable)},e.removeRecognizer=function(){this.hammer&&this.panRecognizer&&(this.hammer.remove(this.panRecognizer),this.panRecognizer=null)},e.onHammerInput=function(t){this.isEnable()&&(t.isFirst?this.observer.hold(this,t):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=function(t,e){if(e<0||90<e)return H;var n=Math.abs(t);return e<n&&n<180-e?W:F}(t.angle,this.options.thresholdAngle),n=this.hammer.session.prevInput;t.offsetY=n?(t.offsetX=t.deltaX-n.deltaX,t.deltaY-n.deltaY):t.offsetX=0;var i=this.getOffset([t.offsetX,t.offsetY],[fe(F,this._direction,e),fe(W,this._direction,e)]),r=i.some(function(t){return 0!==t});r&&(t.srcEvent.preventDefault(),t.srcEvent.stopPropagation()),(t.preventSystemEvent=r)&&this.observer.change(this,t,ce(this.axes,i))},e.onPanend=function(t){var e,n,i,r,s=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[fe(F,this._direction),fe(W,this._direction)]);e=s,n=this.observer.options.deceleration,i=Math.sqrt(e[0]*e[0]+e[1]*e[1]),r=Math.abs(i/-n),s=[e[0]/2*r,e[1]/2*r],this.observer.release(this,t,ce(this.axes,s))},e.attachEvent=function(t){this.observer=t,this.hammer.on("hammer.input",this.onHammerInput).on("panstart panmove",this.onPanmove)},e.dettachEvent=function(){this.hammer.off("hammer.input",this.onHammerInput).off("panstart panmove",this.onPanmove),this.observer=null},e.getOffset=function(t,e){var n=[0,0],i=this.options.scale;return e[0]&&(n[0]=t[0]*i[0]),e[1]&&(n[1]=t[1]*i[1]),n},t}(),de=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this._base=null,this._prev=null,this.pinchRecognizer=null,void 0===Ct)throw new Error("The Hammerjs must be loaded before eg.Axes.PinchInput.\nhttp://hammerjs.github.io/");this.element=Ft(t),this.options=p({scale:1,threshold:0,inputType:["touch","pointer"],hammerManagerOptions:{cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",userDrag:"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){var e={threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var n=this.element[ue];n||(n=String(Math.round(Math.random()*(new Date).getTime())));var i=pe(this.options.inputType);if(!i)throw new Error("Wrong inputType parameter!");this.hammer=le(this.element,p({inputClass:i},this.options.hammerManagerOptions)),this.element[ue]=n}return this.pinchRecognizer=new Yt(e),this.hammer.add(this.pinchRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null,this.dettachEvent()),this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[ue],this.element=null,this.hammer=null},e.removeRecognizer=function(){this.hammer&&this.pinchRecognizer&&(this.hammer.remove(this.pinchRecognizer),this.pinchRecognizer=null)},e.onPinchStart=function(t){this._base=this.observer.get(this)[this.axes[0]];var e=this.getOffset(t.scale);this.observer.hold(this,t),this.observer.change(this,t,ce(this.axes,[e])),this._prev=t.scale},e.onPinchMove=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,ce(this.axes,[e])),this._prev=t.scale},e.onPinchEnd=function(t){var e=this.getOffset(t.scale,this._prev);this.observer.change(this,t,ce(this.axes,[e])),this.observer.release(this,t,ce(this.axes,[0]),0),this._base=null,this._prev=null},e.getOffset=function(t,e){return void 0===e&&(e=1),this._base*(t-e)*this.options.scale},e.attachEvent=function(t){this.observer=t,this.hammer.on("pinchstart",this.onPinchStart).on("pinchmove",this.onPinchMove).on("pinchend",this.onPinchEnd)},e.dettachEvent=function(){this.hammer.off("pinchstart",this.onPinchStart).off("pinchmove",this.onPinchMove).off("pinchend",this.onPinchEnd),this.observer=null,this._prev=null},e.enable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!0),this},e.disable=function(){return this.hammer&&(this.hammer.get("pinch").options.enable=!1),this},e.isEnable=function(){return!(!this.hammer||!this.hammer.get("pinch").options.enable)},t}(),ve=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=Ft(t),this.options=p({scale:1,useNormalized:!0},e),this.onWheel=this.onWheel.bind(this)}var e=t.prototype;return e.mapAxes=function(t){this.axes=t},e.connect=function(t){return this.dettachEvent(),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onWheel=function(t){var e=this;if(this._isEnabled&&(t.preventDefault(),0!==t.deltaY)){this._isHolded||(this.observer.hold(this,t),this._isHolded=!0);var n=(0<t.deltaY?-1:1)*this.options.scale*(this.options.useNormalized?1:Math.abs(t.deltaY));this.observer.change(this,t,ce(this.axes,[n])),clearTimeout(this._timer),this._timer=setTimeout(function(){e._isHolded&&(e._isHolded=!1,e.observer.release(e,t,ce(e.axes,[0])))},50)}},e.attachEvent=function(t){this.observer=t,this.element.addEventListener("wheel",this.onWheel),this._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("wheel",this.onWheel),this._isEnabled=!1,this.observer=null,this._timer&&(clearTimeout(this._timer),this._timer=null)},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}(),ge=function(){function t(t,e){this.axes=[],this.element=null,this._isEnabled=!1,this._isHolded=!1,this._timer=null,this.element=Ft(t),this.options=p({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.dettachEvent(),"0"!==this.element.getAttribute("tabindex")&&this.element.setAttribute("tabindex","0"),this.attachEvent(t),this},e.disconnect=function(){return this.dettachEvent(),this},e.destroy=function(){this.disconnect(),this.element=null},e.onKeydown=function(t){if(this._isEnabled){var e=!0,n=1,i=-1;switch(t.keyCode){case 37:case 65:n=-1;break;case 39:case 68:break;case 40:case 83:n=-1,i=1;break;case 38:case 87:i=1;break;default:e=!1}if((-1===i&&!this.axes[0]||1===i&&!this.axes[1])&&(e=!1),e){var r=-1===i?[+this.options.scale[0]*n,0]:[0,+this.options.scale[1]*n];this._isHolded||(this.observer.hold(this,event),this._isHolded=!0),clearTimeout(this._timer),this.observer.change(this,event,ce(this.axes,r))}}},e.onKeyup=function(t){var e=this;this._isHolded&&(clearTimeout(this._timer),this._timer=setTimeout(function(){e.observer.release(e,t,ce(e.axes,[0,0])),e._isHolded=!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._isEnabled=!0},e.dettachEvent=function(){this.element.removeEventListener("keydown",this.onKeydown,!1),this.element.removeEventListener("keypress",this.onKeydown,!1),this.element.removeEventListener("keyup",this.onKeyup,!1),this._isEnabled=!1,this.observer=null},e.enable=function(){return this._isEnabled=!0,this},e.disable=function(){return this._isEnabled=!1,this},e.isEnable=function(){return this._isEnabled},t}();return oe.PanInput=me,oe.PinchInput=de,oe.WheelInput=ve,oe.MoveKeyInput=ge,oe});
//# sourceMappingURL=axes.pkgd.min.js.map

@@ -10,4 +10,3 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {

import { getInsidePosition, isCircularable, getCirculatedPos, getDuration } from "./Coordinate";
import { equal } from "./AxisManager";
import { requestAnimationFrame, cancelAnimationFrame } from "./utils";
import { requestAnimationFrame, cancelAnimationFrame, map, every, filter, equal, toFixed } from "./utils";
function minMax(value, min, max) {

@@ -32,3 +31,3 @@ return Math.max(Math.min(value, max), min);

else {
var durations_1 = this.axm.map(destPos, function (v, k) { return getDuration(Math.abs(Math.abs(v) - Math.abs(depaPos[k])), _this.options.deceleration); });
var durations_1 = map(destPos, function (v, k) { return getDuration(Math.abs(Math.abs(v) - Math.abs(depaPos[k])), _this.options.deceleration); });
duration = Object.keys(durations_1).reduce(function (max, v) { return Math.max(max, durations_1[v]); }, -Infinity);

@@ -56,5 +55,5 @@ }

var orgPos_1 = this.axm.get(axes);
var pos = this.axm.map(orgPos_1, function (v, k, opt) { return getCirculatedPos(v, opt.range, opt.circular); });
if (!this.axm.every(pos, function (v, k) { return orgPos_1[k] === v; })) {
this.em.triggerChange(pos, option, !!option);
var pos = this.axm.map(orgPos_1, function (v, opt) { return getCirculatedPos(v, opt.range, opt.circular); });
if (!every(pos, function (v, k) { return orgPos_1[k] === v; })) {
this.em.triggerChange(pos, orgPos_1, option, !!option);
}

@@ -80,3 +79,3 @@ this._animateParam = null;

var pos = this.axm.get();
var destPos = this.axm.map(pos, function (v, k, opt) { return Math.min(opt.range[1], Math.max(opt.range[0], v)); });
var destPos = this.axm.map(pos, function (v, opt) { return Math.min(opt.range[1], Math.max(opt.range[0], v)); });
this.animateTo(destPos, this.getDuration(pos, destPos), option);

@@ -88,4 +87,4 @@ };

// for Circular
var circularTargets = this.axm.filter(this.axm.get(), function (v, k, opt) { return isCircularable(v, opt.range, opt.circular); });
Object.keys(circularTargets).length > 0 && this.setTo(this.axm.map(circularTargets, function (v, k, opt) { return getCirculatedPos(v, opt.range, opt.circular); }));
var circularTargets = this.axm.filter(this.axm.get(), function (v, opt) { return isCircularable(v, opt.range, opt.circular); });
Object.keys(circularTargets).length > 0 && this.setTo(this.axm.map(circularTargets, function (v, opt) { return getCirculatedPos(v, opt.range, opt.circular); }));
this.itm.setInterrupt(false);

@@ -97,21 +96,38 @@ this.em.triggerAnimationEnd(!!beforeParam);

else {
this.em.triggerFinish(!!beforeParam);
this.finish(!!beforeParam);
}
};
AnimationManager.prototype.finish = function (isTrusted) {
this._animateParam = null;
this.itm.setInterrupt(false);
this.em.triggerFinish(isTrusted);
};
AnimationManager.prototype.animateLoop = function (param, complete) {
this._animateParam = __assign({}, param);
this._animateParam.startTime = new Date().getTime();
if (param.duration) {
this._animateParam = __assign({}, param);
var info_1 = this._animateParam;
var self_1 = this;
var prevPos_1 = info_1.depaPos;
info_1.startTime = new Date().getTime();
(function loop() {
self_1._raf = null;
if (self_1.frame(info_1) >= 1) {
if (!equal(param.destPos, self_1.axm.get(Object.keys(param.destPos)))) {
self_1.em.triggerChange(param.destPos);
var easingPer = self_1.easing((new Date().getTime() - info_1.startTime) / param.duration);
var toPos = map(info_1.depaPos, function (pos, key) { return pos + info_1.delta[key] * easingPer; });
var isCanceled = !self_1.em.triggerChange(toPos, prevPos_1);
prevPos_1 = map(toPos, function (v) { return toFixed(v); });
if (easingPer >= 1) {
var destPos = param.destPos;
if (!equal(destPos, self_1.axm.get(Object.keys(destPos)))) {
self_1.em.triggerChange(destPos, prevPos_1);
}
complete();
return;
} // animationEnd
self_1._raf = requestAnimationFrame(loop);
}
else if (isCanceled) {
self_1.finish(false);
}
else {
// animationEnd
self_1._raf = requestAnimationFrame(loop);
}
})();

@@ -138,3 +154,3 @@ }

// You can't stop the 'animationStart' event when 'circular' is true.
if (!retTrigger && this.axm.every(userWish.destPos, function (v, k, opt) { return isCircularable(v, opt.range, opt.circular); })) {
if (!retTrigger && this.axm.every(userWish.destPos, function (v, opt) { return isCircularable(v, opt.range, opt.circular); })) {
console.warn("You can't stop the 'animation' event when 'circular' is true.");

@@ -155,14 +171,2 @@ }

};
// animation frame (0~1)
AnimationManager.prototype.frame = function (param) {
var curTime = new Date().getTime() - param.startTime;
var easingPer = this.easing(curTime / param.duration);
var toPos = param.depaPos;
toPos = this.axm.map(toPos, function (v, k, opt) {
v += param.delta[k] * easingPer;
return getCirculatedPos(v, opt.range, opt.circular);
});
this.em.triggerChange(toPos);
return easingPer;
};
AnimationManager.prototype.easing = function (p) {

@@ -180,12 +184,13 @@ return p > 1 ? 1 : this.options.easing(p);

this.itm.setInterrupt(true);
var movedPos = this.axm.filter(pos, function (v, k) { return orgPos[k] !== v; });
var movedPos = filter(pos, function (v, k) { return orgPos[k] !== v; });
if (!Object.keys(movedPos).length) {
return this;
}
movedPos = this.axm.map(movedPos, function (v, k, opt) {
if (opt.circular && (opt.circular[0] || opt.circular[1])) {
return duration > 0 ? v : getCirculatedPos(v, opt.range, opt.circular);
movedPos = this.axm.map(movedPos, function (v, opt) {
var range = opt.range, circular = opt.circular;
if (circular && (circular[0] || circular[1])) {
return v;
}
else {
return getInsidePosition(v, opt.range, opt.circular);
return getInsidePosition(v, range, circular);
}

@@ -201,3 +206,3 @@ });

this.em.triggerChange(movedPos);
this.itm.setInterrupt(false);
this.finish(false);
}

@@ -208,3 +213,3 @@ return this;

if (duration === void 0) { duration = 0; }
return this.setTo(this.axm.map(this.axm.get(Object.keys(pos)), function (v, k) { return v + pos[k]; }), duration);
return this.setTo(map(this.axm.get(Object.keys(pos)), function (v, k) { return v + pos[k]; }), duration);
};

@@ -211,0 +216,0 @@ return AnimationManager;

@@ -9,11 +9,4 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {

};
import { isOutside } from "./Coordinate";
export function equal(target, base) {
for (var k in target) {
if (target[k] !== base[k]) {
return false;
}
}
return true;
}
import { isOutside, getCirculatedPos } from "./Coordinate";
import { map, filter, every } from "./utils";
var AxisManager = /** @class */ (function () {

@@ -53,3 +46,3 @@ function AxisManager(axis, options) {

var fullDepaPos = this.get(depaPos);
return this.map(this.get(destPos), function (v, k) { return v - fullDepaPos[k]; });
return map(this.get(destPos), function (v, k) { return v - fullDepaPos[k]; });
};

@@ -70,8 +63,8 @@ AxisManager.prototype.get = function (axes) {

};
AxisManager.prototype.moveTo = function (pos) {
var _this = this;
var delta = this.map(this._pos, function (v, key) {
return key in pos ? pos[key] - _this._pos[key] : 0;
AxisManager.prototype.moveTo = function (pos, depaPos) {
if (depaPos === void 0) { depaPos = this._pos; }
var delta = map(this._pos, function (v, key) {
return key in pos && key in depaPos ? pos[key] - depaPos[key] : 0;
});
this.set(pos);
this.set(this.map(pos, function (v, opt) { return opt ? getCirculatedPos(v, opt.range, opt.circular) : 0; }));
return {

@@ -91,33 +84,14 @@ pos: __assign({}, this._pos),

var axisOptions = this.axis;
for (var k in pos) {
if (k) {
if (!callback(pos[k], k, axisOptions[k])) {
return false;
}
}
}
return true;
return every(pos, function (value, key) { return callback(value, axisOptions[key], key); });
};
AxisManager.prototype.filter = function (pos, callback) {
var filtered = {};
var axisOptions = this.axis;
for (var k in pos) {
if (k) {
callback(pos[k], k, axisOptions[k]) && (filtered[k] = pos[k]);
}
}
return filtered;
return filter(pos, function (value, key) { return callback(value, axisOptions[key], key); });
};
AxisManager.prototype.map = function (pos, callback) {
var tranformed = {};
var axisOptions = this.axis;
for (var k in pos) {
if (k) {
tranformed[k] = callback(pos[k], k, axisOptions[k]);
}
}
return tranformed;
return map(pos, function (value, key) { return callback(value, axisOptions[key], key); });
};
AxisManager.prototype.isOutside = function (axes) {
return !this.every(axes ? this.get(axes) : this._pos, function (v, k, opt) { return !isOutside(v, opt.range); });
return !this.every(axes ? this.get(axes) : this._pos, function (v, opt) { return !isOutside(v, opt.range); });
};

@@ -124,0 +98,0 @@ return AxisManager;

@@ -10,2 +10,3 @@ // export const DIRECTION_NONE = 1;

export { DIRECTION_NONE, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, DIRECTION_ALL, } from "@egjs/hammerjs";
export var FIXED_DIGIT = 100000;
export var TRANSFORM = (function () {

@@ -12,0 +13,0 @@ if (typeof document === "undefined") {

@@ -0,1 +1,2 @@

import { toFixed } from "./utils";
export function getInsidePosition(destPos, range, circular, bounce) {

@@ -9,3 +10,3 @@ var toDestPos = destPos;

toDestPos = Math.min(targetRange[1], toDestPos);
return +toDestPos.toFixed(5);
return +toFixed(toDestPos);
}

@@ -36,4 +37,4 @@ // determine outside

}
return +toPos.toFixed(5);
return +toFixed(toPos);
}
//# sourceMappingURL=Coordinate.js.map

@@ -158,7 +158,8 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {

*/
EventManager.prototype.triggerChange = function (pos, option, holding) {
if (option === void 0) { option = null; }
EventManager.prototype.triggerChange = function (pos, depaPos, option, holding) {
if (holding === void 0) { holding = false; }
var eventInfo = this.am.getEventInfo();
var moveTo = this.am.axm.moveTo(pos);
var am = this.am;
var axm = am.axm;
var eventInfo = am.getEventInfo();
var moveTo = axm.moveTo(pos, depaPos);
var inputEvent = option && option.event || eventInfo && eventInfo.event || null;

@@ -174,4 +175,5 @@ var param = {

};
this.axes.trigger("change", param);
inputEvent && this.am.axm.set(param.set()["destPos"]);
var result = this.axes.trigger("change", param);
inputEvent && axm.set(param.set()["destPos"]);
return result;
};

@@ -178,0 +180,0 @@ /**

@@ -9,4 +9,4 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {

};
import { equal } from "./AxisManager";
import { getCirculatedPos, isOutside, getInsidePosition } from "./Coordinate";
import { isOutside, getInsidePosition } from "./Coordinate";
import { map, equal } from "./utils";
var InputObserver = /** @class */ (function () {

@@ -17,2 +17,3 @@ function InputObserver(_a) {

this.moveDistance = null;
this.isStopped = false;
this.options = options;

@@ -28,3 +29,3 @@ this.itm = itm;

if (this.isOutside) {
return this.axm.map(pos, function (v, k, opt) {
return this.axm.map(pos, function (v, opt) {
var tn = opt.range[0] - opt.bounce[0];

@@ -39,3 +40,3 @@ var tx = opt.range[1] + opt.bounce[1];

var initSlope_1 = this.am.easing(0.00001) / 0.00001;
return this.axm.map(pos, function (v, k, opt) {
return this.axm.map(pos, function (v, opt) {
var min = opt.range[0];

@@ -65,2 +66,3 @@ var max = opt.range[1];

};
this.isStopped = false;
this.itm.setInterrupt(true);

@@ -73,3 +75,3 @@ this.am.grab(input.axes, changeOption);

InputObserver.prototype.change = function (input, event, offset) {
if (!this.itm.isInterrupting() || this.axm.every(offset, function (v) { return v === 0; })) {
if (this.isStopped || !this.itm.isInterrupting() || this.axm.every(offset, function (v) { return v === 0; })) {
return;

@@ -80,26 +82,27 @@ }

// for outside logic
destPos = this.axm.map(this.moveDistance || depaPos, function (v, k) { return v + (offset[k] || 0); });
destPos = map(this.moveDistance || depaPos, function (v, k) { return v + (offset[k] || 0); });
this.moveDistance && (this.moveDistance = destPos);
destPos = this.axm.map(destPos, function (v, k, opt) { return getCirculatedPos(v, opt.range, opt.circular); });
// from outside to inside
if (this.isOutside &&
this.axm.every(depaPos, function (v, k, opt) { return !isOutside(v, opt.range); })) {
this.axm.every(depaPos, function (v, opt) { return !isOutside(v, opt.range); })) {
this.isOutside = false;
}
destPos = this.atOutside(destPos);
this.em.triggerChange(destPos, {
var isCanceled = !this.em.triggerChange(destPos, depaPos, {
input: input,
event: event,
}, true);
if (isCanceled) {
this.isStopped = true;
this.moveDistance = null;
this.am.finish(false);
}
};
InputObserver.prototype.release = function (input, event, offset, inputDuration) {
if (!this.itm.isInterrupting()) {
if (this.isStopped || !this.itm.isInterrupting() || !this.moveDistance) {
return;
}
if (!this.moveDistance) {
return;
}
var pos = this.axm.get(input.axes);
var depaPos = this.axm.get();
var destPos = this.axm.get(this.axm.map(offset, function (v, k, opt) {
var destPos = this.axm.get(this.axm.map(offset, function (v, opt, k) {
if (opt.circular && (opt.circular[0] || opt.circular[1])) {

@@ -136,3 +139,3 @@ return pos[k] + v;

if (isEqual || userWish.duration === 0) {
!isEqual && this.em.triggerChange(userWish.destPos, changeOption, true);
!isEqual && this.em.triggerChange(userWish.destPos, depaPos, changeOption, true);
this.itm.setInterrupt(false);

@@ -139,0 +142,0 @@ if (this.axm.isOutside()) {

import { window } from "./browser";
import { FIXED_DIGIT } from "./const";
export function toArray(nodes) {

@@ -93,2 +94,30 @@ // const el = Array.prototype.slice.call(nodes);

}
export function map(obj, callback) {
var tranformed = {};
for (var k in obj) {
k && (tranformed[k] = callback(obj[k], k));
}
return tranformed;
}
export function filter(obj, callback) {
var filtered = {};
for (var k in obj) {
k && callback(obj[k], k) && (filtered[k] = obj[k]);
}
return filtered;
}
export function every(obj, callback) {
for (var k in obj) {
if (k && !callback(obj[k], k)) {
return false;
}
}
return true;
}
export function equal(target, base) {
return every(target, function (v, k) { return v === base[k]; });
}
export function toFixed(num) {
return Math.round(num * FIXED_DIGIT) / FIXED_DIGIT;
}
//# sourceMappingURL=utils.js.map
{
"name": "@egjs/axes",
"version": "2.5.9",
"version": "2.5.10-rc",
"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.",

@@ -5,0 +5,0 @@ "sideEffects": false,

import { IInputType } from "./inputType/InputType";
import { getInsidePosition, isCircularable, getCirculatedPos, getDuration } from "./Coordinate";
import { Axis, AxisManager, equal } from "./AxisManager";
import { Axis, AxisManager } from "./AxisManager";
import { InterruptManager } from "./InterruptManager";
import { EventManager, ChangeEventOption } from "./EventManager";
import { requestAnimationFrame, cancelAnimationFrame } from "./utils";
import { requestAnimationFrame, cancelAnimationFrame, map, every, filter, equal, toFixed } from "./utils";
import { AxesOption } from "./Axes";

@@ -46,3 +46,3 @@

} else {
const durations: Axis = this.axm.map(
const durations: Axis = map(
destPos,

@@ -84,5 +84,5 @@ (v, k) => getDuration(

const pos: Axis = this.axm.map(orgPos,
(v, k, opt) => getCirculatedPos(v, opt.range, opt.circular as boolean[]));
if (!this.axm.every(pos, (v, k) => orgPos[k] === v)) {
this.em.triggerChange(pos, option, !!option);
(v, opt) => getCirculatedPos(v, opt.range, opt.circular as boolean[]));
if (!every(pos, (v, k) => orgPos[k] === v)) {
this.em.triggerChange(pos, orgPos, option, !!option);
}

@@ -110,3 +110,3 @@ this._animateParam = null;

const destPos: Axis = this.axm.map(pos,
(v, k, opt) => Math.min(opt.range[1], Math.max(opt.range[0], v)));
(v, opt) => Math.min(opt.range[1], Math.max(opt.range[0], v)));
this.animateTo(destPos, this.getDuration(pos, destPos), option);

@@ -122,7 +122,7 @@ }

this.axm.get(),
(v, k, opt) => isCircularable(v, opt.range, opt.circular as boolean[]),
(v, opt) => isCircularable(v, opt.range, opt.circular as boolean[]),
);
Object.keys(circularTargets).length > 0 && this.setTo(this.axm.map(
circularTargets,
(v, k, opt) => getCirculatedPos(v, opt.range, opt.circular as boolean[]),
(v, opt) => getCirculatedPos(v, opt.range, opt.circular as boolean[]),
));

@@ -134,23 +134,39 @@ this.itm.setInterrupt(false);

} else {
this.em.triggerFinish(!!beforeParam);
this.finish(!!beforeParam);
}
}
finish(isTrusted) {
this._animateParam = null;
this.itm.setInterrupt(false);
this.em.triggerFinish(isTrusted);
}
private animateLoop(param: AnimationParam, complete: () => void) {
this._animateParam = { ...param };
this._animateParam.startTime = new Date().getTime();
if (param.duration) {
this._animateParam = { ...param };
const info: AnimationParam = this._animateParam;
const self = this;
let prevPos = info.depaPos;
info.startTime = new Date().getTime();
(function loop() {
self._raf = null;
if (self.frame(info) >= 1) {
if (!equal(param.destPos, self.axm.get(Object.keys(param.destPos)))) {
self.em.triggerChange(param.destPos);
const easingPer = self.easing((new Date().getTime() - info.startTime) / param.duration);
const toPos: Axis = map(info.depaPos, (pos, key) => pos + info.delta[key] * easingPer);
const isCanceled = !self.em.triggerChange(toPos, prevPos);
prevPos = map(toPos, v => toFixed(v));
if (easingPer >= 1) {
const destPos = param.destPos;
if (!equal(destPos, self.axm.get(Object.keys(destPos)))) {
self.em.triggerChange(destPos, prevPos);
}
complete();
return;
} // animationEnd
self._raf = requestAnimationFrame(loop);
} else if (isCanceled) {
self.finish(false);
} else {
// animationEnd
self._raf = requestAnimationFrame(loop);
}
})();

@@ -184,3 +200,3 @@ } else {

userWish.destPos,
(v, k, opt) => isCircularable(v, opt.range, opt.circular as boolean[]))) {
(v, opt) => isCircularable(v, opt.range, opt.circular as boolean[]))) {
console.warn("You can't stop the 'animation' event when 'circular' is true.");

@@ -203,15 +219,2 @@ }

// animation frame (0~1)
private frame(param: AnimationParam) {
const curTime = new Date().getTime() - param.startTime;
const easingPer = this.easing(curTime / param.duration);
let toPos: Axis = param.depaPos;
toPos = this.axm.map(toPos, (v, k, opt) => {
v += param.delta[k] * easingPer;
return getCirculatedPos(v, opt.range, opt.circular as boolean[]);
});
this.em.triggerChange(toPos);
return easingPer;
}
easing(p) {

@@ -230,3 +233,3 @@ return p > 1 ? 1 : this.options.easing(p);

this.itm.setInterrupt(true);
let movedPos = this.axm.filter(pos, (v, k) => orgPos[k] !== v);
let movedPos = filter(pos, (v, k) => orgPos[k] !== v);
if (!Object.keys(movedPos).length) {

@@ -236,7 +239,9 @@ return this;

movedPos = this.axm.map(movedPos, (v, k, opt) => {
if (opt.circular && (opt.circular[0] || opt.circular[1])) {
return duration > 0 ? v : getCirculatedPos(v, opt.range, opt.circular as boolean[]);
movedPos = this.axm.map(movedPos, (v, opt) => {
const {range, circular} = opt;
if (circular && (circular[0] || circular[1])) {
return v;
} else {
return getInsidePosition(v, opt.range, opt.circular as boolean[]);
return getInsidePosition(v, range, circular as boolean[]);
}

@@ -253,3 +258,3 @@ });

this.em.triggerChange(movedPos);
this.itm.setInterrupt(false);
this.finish(false);
}

@@ -262,3 +267,3 @@

return this.setTo(
this.axm.map(this.axm.get(Object.keys(pos)), (v, k) => v + pos[k]),
map(this.axm.get(Object.keys(pos)), (v, k) => v + pos[k]),
duration,

@@ -265,0 +270,0 @@ );

@@ -1,3 +0,4 @@

import { isOutside } from "./Coordinate";
import { AxesOption } from "./Axes";
import { isOutside, getCirculatedPos } from "./Coordinate";
import { map, filter, every } from "./utils";
import { ObjectInterface } from "./const";

@@ -8,11 +9,2 @@ export interface Axis {

export function equal(target: Axis, base: Axis): boolean {
for (const k in target) {
if (target[k] !== base[k]) {
return false;
}
}
return true;
}
export interface AxisOption {

@@ -26,3 +18,3 @@ range?: number[];

private _pos: Axis;
constructor(private axis, private options: AxesOption) {
constructor(private axis: ObjectInterface<AxisOption>, private options) {
this._complementOptions();

@@ -60,3 +52,3 @@ this._pos = Object.keys(this.axis).reduce((acc, v) => {

const fullDepaPos = this.get(depaPos);
return this.map(this.get(destPos), (v, k) => v - fullDepaPos[k]);
return map(this.get(destPos), (v, k) => v - fullDepaPos[k]);
}

@@ -75,8 +67,8 @@ get(axes?: string[] | Axis): Axis {

}
moveTo(pos: Axis): { [key: string]: Axis } {
const delta = this.map(this._pos, (v, key) => {
return key in pos ? pos[key] - this._pos[key] : 0;
moveTo(pos: Axis, depaPos: Axis = this._pos): { [key: string]: Axis } {
const delta = map(this._pos, (v, key) => {
return key in pos && key in depaPos ? pos[key] - depaPos[key] : 0;
});
this.set(pos);
this.set(this.map(pos, (v, opt) => opt ? getCirculatedPos(v, opt.range, opt.circular as boolean[]) : 0));
return {

@@ -96,36 +88,21 @@ pos: { ...this._pos },

pos: Axis,
callback: (value: number, key: string, options: AxisOption) => boolean): boolean {
callback: (value: number, options: AxisOption, key: string) => boolean): boolean {
const axisOptions = this.axis;
for (const k in pos) {
if (k) {
if (!callback(pos[k], k, axisOptions[k])) {
return false;
}
}
}
return true;
return every(pos, (value, key) => callback(value, axisOptions[key], key));
}
filter(
pos: Axis,
callback: (value: number, key: string, options: AxisOption) => boolean): Axis {
const filtered: Axis = {};
callback: (value: number, options: AxisOption, key: string) => boolean): Axis {
const axisOptions = this.axis;
for (const k in pos) {
if (k) {
callback(pos[k], k, axisOptions[k]) && (filtered[k] = pos[k]);
}
}
return filtered;
return filter(pos, (value, key) => callback(value, axisOptions[key], key));
}
map(
pos: Axis,
callback: (value: number, key: string, options: AxisOption) => number): Axis {
const tranformed: Axis = {};
callback: (value: number, options: AxisOption, key: string) => number): Axis {
const axisOptions = this.axis;
for (const k in pos) {
if (k) {
tranformed[k] = callback(pos[k], k, axisOptions[k]);
}
}
return tranformed;
return map(pos, (value, key) => callback(value, axisOptions[key], key));
}

@@ -135,5 +112,5 @@ isOutside(axes?: string[]) {

axes ? this.get(axes) : this._pos,
(v, k, opt) => !isOutside(v, opt.range),
(v, opt) => !isOutside(v, opt.range),
);
}
}

@@ -10,4 +10,4 @@ // export const DIRECTION_NONE = 1;

export interface ObjectInterface {
[key: string]: any;
export interface ObjectInterface<T = any> {
[key: string]: T;
}

@@ -26,2 +26,3 @@

export const FIXED_DIGIT = 100000;
export const TRANSFORM = (() => {

@@ -28,0 +29,0 @@ if (typeof document === "undefined") {

import { Axis } from "./AxisManager";
import { toFixed } from "./utils";

@@ -18,3 +19,3 @@ export function getInsidePosition(

return +toDestPos.toFixed(5);
return +toFixed(toDestPos);
}

@@ -49,3 +50,3 @@

}
return +toPos.toFixed(5);
return +toFixed(toPos);
}
import { IInputType } from "./inputType/InputType";
import { Axis } from "./AxisManager";
import { AnimationParam, AnimationManager } from "./AnimationManager";
import Axes from "./Axes";

@@ -12,3 +13,3 @@ export interface ChangeEventOption {

public am: AnimationManager;
constructor(private axes) {}
constructor(private axes: Axes) {}
/**

@@ -161,5 +162,7 @@ * This event is fired when a user holds an element on the screen of the device.

*/
triggerChange(pos: Axis, option: ChangeEventOption = null, holding: boolean = false) {
const eventInfo = this.am.getEventInfo();
const moveTo = this.am.axm.moveTo(pos);
triggerChange(pos: Axis, depaPos?: Axis, option?: ChangeEventOption, holding: boolean = false) {
const am = this.am;
const axm = am.axm;
const eventInfo = am.getEventInfo();
const moveTo = axm.moveTo(pos, depaPos);
const inputEvent = option && option.event || eventInfo && eventInfo.event || null;

@@ -175,5 +178,7 @@ const param = {

};
this.axes.trigger("change", param);
const result = this.axes.trigger("change", param);
inputEvent && this.am.axm.set(param.set()["destPos"]);
inputEvent && axm.set(param.set()["destPos"]);
return result;
}

@@ -180,0 +185,0 @@

@@ -1,13 +0,11 @@

import Axes from "./Axes";
import { InterruptManager } from "./InterruptManager";
import { IInputType, IInputTypeObserver } from "./inputType/InputType";
import { EventManager, ChangeEventOption } from "./EventManager";
import { AxisManager, equal, Axis } from "./AxisManager";
import { AxisManager, Axis } from "./AxisManager";
import { AnimationParam, AnimationManager } from "./AnimationManager";
import { AxesOption } from "./Axes";
import { getCirculatedPos, isOutside, getInsidePosition } from "./Coordinate";
import { isOutside, getInsidePosition } from "./Coordinate";
import { map, equal } from "./utils";
export class InputObserver implements IInputTypeObserver {
isOutside = false;
moveDistance: Axis = null;
public options: AxesOption;

@@ -18,2 +16,5 @@ private itm: InterruptManager;

private am: AnimationManager;
private isOutside = false;
private moveDistance: Axis = null;
private isStopped = false;
constructor({ options, itm, em, axm, am }) {

@@ -30,3 +31,3 @@ this.options = options;

if (this.isOutside) {
return this.axm.map(pos, (v, k, opt) => {
return this.axm.map(pos, (v, opt) => {
const tn = opt.range[0] - opt.bounce[0];

@@ -40,3 +41,3 @@ const tx = opt.range[1] + opt.bounce[1];

const initSlope = this.am.easing(0.00001) / 0.00001;
return this.axm.map(pos, (v, k, opt) => {
return this.axm.map(pos, (v, opt) => {
const min = opt.range[0];

@@ -65,2 +66,3 @@ const max = opt.range[1];

};
this.isStopped = false;
this.itm.setInterrupt(true);

@@ -73,3 +75,3 @@ this.am.grab(input.axes, changeOption);

change(input: IInputType, event, offset: Axis) {
if (!this.itm.isInterrupting() || this.axm.every(offset, v => v === 0)) {
if (this.isStopped || !this.itm.isInterrupting() || this.axm.every(offset, v => v === 0)) {
return;

@@ -81,9 +83,8 @@ }

// for outside logic
destPos = this.axm.map(this.moveDistance || depaPos, (v, k) => v + (offset[k] || 0));
destPos = map(this.moveDistance || depaPos, (v, k) => v + (offset[k] || 0));
this.moveDistance && (this.moveDistance = destPos);
destPos = this.axm.map(destPos, (v, k, opt) => getCirculatedPos(v, opt.range, opt.circular as boolean[]));
// from outside to inside
if (this.isOutside &&
this.axm.every(depaPos, (v, k, opt) => !isOutside(v, opt.range))) {
this.axm.every(depaPos, (v, opt) => !isOutside(v, opt.range))) {
this.isOutside = false;

@@ -93,17 +94,20 @@ }

this.em.triggerChange(destPos, {
const isCanceled = !this.em.triggerChange(destPos, depaPos, {
input,
event,
}, true);
if (isCanceled) {
this.isStopped = true;
this.moveDistance = null;
this.am.finish(false);
}
}
release(input: IInputType, event, offset: Axis, inputDuration?: number) {
if (!this.itm.isInterrupting()) {
if (this.isStopped || !this.itm.isInterrupting() || !this.moveDistance) {
return;
}
if (!this.moveDistance) {
return;
}
const pos: Axis = this.axm.get(input.axes);
const depaPos: Axis = this.axm.get();
let destPos: Axis = this.axm.get(this.axm.map(offset, (v, k, opt) => {
let destPos: Axis = this.axm.get(this.axm.map(offset, (v, opt, k) => {
if (opt.circular && (opt.circular[0] || opt.circular[1])) {

@@ -146,3 +150,3 @@ return pos[k] + v;

if (isEqual || userWish.duration === 0) {
!isEqual && this.em.triggerChange(userWish.destPos, changeOption, true);
!isEqual && this.em.triggerChange(userWish.destPos, depaPos, changeOption, true);
this.itm.setInterrupt(false);

@@ -149,0 +153,0 @@ if (this.axm.isOutside()) {

import {window} from "./browser";
import { ObjectInterface, FIXED_DIGIT } from "./const";

@@ -96,1 +97,34 @@ declare var jQuery: any;

}
export function map<T, U>(obj: ObjectInterface<T>, callback: (value: T, key: string) => U): ObjectInterface<U> {
const tranformed: ObjectInterface<U> = {};
for (const k in obj) {
k && (tranformed[k] = callback(obj[k], k));
}
return tranformed;
}
export function filter<T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean): ObjectInterface<T> {
const filtered: ObjectInterface<T> = {};
for (const k in obj) {
k && callback(obj[k], k) && (filtered[k] = obj[k]);
}
return filtered;
}
export function every<T>(obj: ObjectInterface<T>, callback: (value: T, key: string) => boolean) {
for (const k in obj) {
if (k && !callback(obj[k], k)) {
return false;
}
}
return true;
}
export function equal(target: ObjectInterface, base: ObjectInterface): boolean {
return every(target, (v, k) => v === base[k]);
}
export function toFixed(num: number) {
return Math.round(num * FIXED_DIGIT) / FIXED_DIGIT;
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc