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

@egjs/conveyer

Package Overview
Dependencies
Maintainers
8
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egjs/conveyer - npm Package Compare versions

Comparing version 1.0.2-beta.0 to 1.0.2-beta.1

declaration/browser.d.ts

16

dist/conveyer.cjs.js

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/egjs-conveyer
version: 1.0.2-beta.0
version: 1.0.2-beta.1
*/

@@ -83,2 +83,6 @@ 'use strict';

var _a, _b;
var IS_IE = /msie|trident/g.test(typeof window !== "undefined" && ((_b = (_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || "");
var OBSERVERS_PATH = "__observers__";

@@ -669,10 +673,10 @@

var size = horizontal ? scrollAreaElement.clientWidth : scrollAreaElement.clientHeight;
var scrollSize = horizontal ? scrollAreaElement.scrollWidth : scrollAreaElement.scrollHeight; // check 0.5px
var scrollSize = horizontal ? scrollAreaElement.scrollWidth : scrollAreaElement.scrollHeight; // check decimal point
if (scrollSize === size + 1) {
if (IS_IE && scrollSize === size + 1) {
var offsetSize = horizontal ? scrollAreaElement.offsetWidth : scrollAreaElement.offsetHeight;
var rect = scrollAreaElement.getBoundingClientRect();
var boundingSize = horizontal ? rect.width : rect.height; // maybe transform: none;
// 0 < 0.5 && 0.5 < 1
var boundingSize = horizontal ? rect.width : rect.height; // 0 < 0.5 && 0.5 < 1
if (size < boundingSize && boundingSize < scrollSize) {
if (offsetSize < boundingSize && boundingSize < offsetSize + 1) {
scrollSize = size;

@@ -679,0 +683,0 @@ }

@@ -7,3 +7,3 @@ /*

repository: https://github.com/naver/egjs-conveyer
version: 1.0.2-beta.0
version: 1.0.2-beta.1
*/

@@ -81,2 +81,6 @@ import Axes, { PanInput } from '@egjs/axes';

var _a, _b;
var IS_IE = /msie|trident/g.test(typeof window !== "undefined" && ((_b = (_a = window === null || window === void 0 ? void 0 : window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || "");
var OBSERVERS_PATH = "__observers__";

@@ -667,10 +671,10 @@

var size = horizontal ? scrollAreaElement.clientWidth : scrollAreaElement.clientHeight;
var scrollSize = horizontal ? scrollAreaElement.scrollWidth : scrollAreaElement.scrollHeight; // check 0.5px
var scrollSize = horizontal ? scrollAreaElement.scrollWidth : scrollAreaElement.scrollHeight; // check decimal point
if (scrollSize === size + 1) {
if (IS_IE && scrollSize === size + 1) {
var offsetSize = horizontal ? scrollAreaElement.offsetWidth : scrollAreaElement.offsetHeight;
var rect = scrollAreaElement.getBoundingClientRect();
var boundingSize = horizontal ? rect.width : rect.height; // maybe transform: none;
// 0 < 0.5 && 0.5 < 1
var boundingSize = horizontal ? rect.width : rect.height; // 0 < 0.5 && 0.5 < 1
if (size < boundingSize && boundingSize < scrollSize) {
if (offsetSize < boundingSize && boundingSize < offsetSize + 1) {
scrollSize = size;

@@ -677,0 +681,0 @@ }

@@ -7,5 +7,5 @@ /*

repository: https://github.com/naver/egjs-conveyer
version: 1.0.2-beta.0
version: 1.0.2-beta.1
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Conveyer=e()}(this,function(){"use strict";var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var u=function(){return(u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function c(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function p(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function h(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var f="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,d=["","webkit","Moz","MS","ms","o"],b="undefined"==typeof document?{style:{}}:document.createElement("div"),w=Math.round,_=Math.abs,E=Date.now;function x(t,e){for(var n,i=e[0].toUpperCase()+e.slice(1),r=0;r<d.length;){if((n=(n=d[r])?n+i:e)in t)return n;r++}}var T="undefined"==typeof window?{}:window,P=x(b.style,"touchAction"),O=void 0!==P;var S="compute",I="manipulation",A="none",R="pan-x",D="pan-y",C=function(){if(!O)return!1;var e={},n=T.CSS&&T.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||T.CSS.supports("touch-action",t)}),e}(),z="ontouchstart"in T,M=void 0!==x(T,"PointerEvent"),j=z&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),k="touch",H="mouse",v=1,m=4,g=8,Y=24,X=["x","y"],F=["clientX","clientY"];function s(t,e,n){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(var i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function V(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function N(t,e){return-1<t.indexOf(e)}var L=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===S&&(t=this.compute()),O&&this.manager.element.style&&C[t]&&(this.manager.element.style[P]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[],t=(s(this.manager.recognizers,function(t){V(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),e.join(" "));if(N(t,A))return A;var n=N(t,R),i=N(t,D);return n&&i?A:n||i?n?R:D:N(t,I)?I:"auto"},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=N(i,A)&&!C[A],o=N(i,D)&&!C[D],i=N(i,R)&&!C[R];if(r){var s=1===t.pointers.length,a=t.distance<2,t=t.deltaTime<250;if(s&&a&&t)return}if(!i||!o)return r||o&&6&n||i&&n&Y?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function q(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function W(t){var e=t.length;if(1===e)return{x:w(t[0].clientX),y:w(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:w(n/e),y:w(i/e)}}function U(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:w(t.pointers[n].clientX),clientY:w(t.pointers[n].clientY)},n++;return{timeStamp:E(),pointers:e,center:W(e),deltaX:t.deltaX,deltaY:t.deltaY}}function B(t,e,n){var i=e[(n=n||X)[0]]-t[n[0]],e=e[n[1]]-t[n[1]];return Math.sqrt(i*i+e*e)}function G(t,e,n){var i=e[(n=n||X)[0]]-t[n[0]],e=e[n[1]]-t[n[1]];return 180*Math.atan2(e,i)/Math.PI}function Q(t,e){return t===e?1:_(t)>=_(e)?t<0?2:4:e<0?8:16}function Z(t,e,n){return{x:e/t||0,y:n/t||0}}function J(h,t){var e,l,f,n,p,i,r=h.session,d=t.pointers,o=d.length,o=(r.firstInput||(r.firstInput=U(t)),1<o&&!r.firstMultiple?r.firstMultiple=U(t):1===o&&(r.firstMultiple=!1),r.firstInput),s=r.firstMultiple,a=(s||o).center,u=t.center=W(d),c=(t.timeStamp=E(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=G(a,u),t.distance=B(a,u),o=r,u=(a=t).center,i=o.offsetDelta||{},e=o.prevDelta||{},c=o.prevInput||{},a.eventType!==v&&c.eventType!==m||(e=o.prevDelta={x:c.deltaX||0,y:c.deltaY||0},i=o.offsetDelta={x:u.x,y:u.y}),a.deltaX=e.x+(u.x-i.x),a.deltaY=e.y+(u.y-i.y),t.offsetDirection=Q(t.deltaX,t.deltaY),Z(t.deltaTime,t.deltaX,t.deltaY)),o=(t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=_(c.x)>_(c.y)?c.x:c.y,t.scale=s?(o=s.pointers,B(d[0],d[1],F)/B(o[0],o[1],F)):1,t.rotation=s?(a=s.pointers,G(d[1],d[0],F)+G(a[1],a[0],F)):0,t.maxPointers=!r.prevInput||t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers,e=t,i=(u=r).lastInterval||e,c=e.timeStamp-i.timeStamp,e.eventType!==g&&(25<c||void 0===i.velocity)?(l=(n=Z(c,c=e.deltaX-i.deltaX,p=e.deltaY-i.deltaY)).x,f=n.y,n=_(n.x)>_(n.y)?n.x:n.y,p=Q(c,p),u.lastInterval=e):(n=i.velocity,l=i.velocityX,f=i.velocityY,p=i.direction),e.velocity=n,e.velocityX=l,e.velocityY=f,e.direction=p,h.element),s=t.srcEvent,d=s.composedPath?s.composedPath()[0]:s.path?s.path[0]:s.target;q(d,o)&&(o=d),t.target=o}function K(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&v&&i-r==0,i=e&(m|g)&&i-r==0;n.isFirst=!!o,n.isFinal=!!i,o&&(t.session={}),n.eventType=e,J(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function $(t){return t.trim().split(/\s+/g)}function tt(e,t,n){s($(t),function(t){e.addEventListener(t,n,!1)})}function et(e,t,n){s($(t),function(t){e.removeEventListener(t,n,!1)})}function nt(t){t=t.ownerDocument||t;return t.defaultView||t.parentWindow||window}var it=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){V(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&tt(this.element,this.evEl,this.domHandler),this.evTarget&&tt(this.target,this.evTarget,this.domHandler),this.evWin&&tt(nt(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&et(this.element,this.evEl,this.domHandler),this.evTarget&&et(this.target,this.evTarget,this.domHandler),this.evWin&&et(nt(this.element),this.evWin,this.domHandler)},t}();function rt(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 ot={pointerdown:v,pointermove:2,pointerup:m,pointercancel:g,pointerout:g},st={2:k,3:"pen",4:H,5:"kinect"},at="pointerdown",ut="pointermove pointerup pointercancel",ct=(T.MSPointerEvent&&!T.PointerEvent&&(at="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),function(e){function n(){var t=n.prototype;return t.evEl=at,t.evWin=ut,(t=e.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return h(n,e),n.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),i=ot[i],r=st[t.pointerType]||t.pointerType,o=r===k,s=rt(e,t.pointerId,"pointerId");i&v&&(0===t.button||o)?s<0&&(e.push(t),s=e.length-1):i&(m|g)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(s,1))},n}(it));function ht(t){return Array.prototype.slice.call(t,0)}var lt={touchstart:v,touchmove:2,touchend:m,touchcancel:g},ft=function(e){function n(){var t;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(t=e.apply(this,arguments)||this).targetIds={},t}return h(n,e),n.prototype.handler=function(t){var e=lt[t.type],n=function(t,e){var n,i,r=ht(t.touches),o=this.targetIds;if(e&(2|v)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var s=ht(t.changedTouches),a=[],u=this.target;if(i=r.filter(function(t){return q(t.target,u)}),e===v)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;n=0;for(;n<s.length;)o[s[n].identifier]&&a.push(s[n]),e&(m|g)&&delete o[s[n].identifier],n++;if(a.length)return[function(t,n,e){for(var i=[],r=[],o=0;o<t.length;){var s=n?t[o][n]:t[o];rt(r,s)<0&&i.push(t[o]),r[o]=s,o++}return i=e?n?i.sort(function(t,e){return t[n]>e[n]}):i.sort():i}(i.concat(a),"identifier",!0),a]}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:k,srcEvent:t})},n}(it);var pt={mousedown:v,mousemove:2,mouseup:m},dt=function(e){function n(){var t=n.prototype;return t.evEl="mousedown",t.evWin="mousemove mouseup",(t=e.apply(this,arguments)||this).pressed=!1,t}return h(n,e),n.prototype.handler=function(t){var e=pt[t.type];e&v&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=m),this.pressed&&(e&m&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:H,srcEvent:t}))},n}(it),vt=2500,mt=25;function gt(t){var e,n,t=t.changedPointers[0];t.identifier===this.primaryTouch&&(e={x:t.clientX,y:t.clientY},n=this.lastTouches,this.lastTouches.push(e),setTimeout(function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)},vt))}var yt=function(){return function(n){function t(t,e){var o=n.call(this,t,e)||this;return o.handler=function(t,e,n){var i=n.pointerType===k,r=n.pointerType===H;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)!function(t,e){t&v?(this.primaryTouch=e.changedPointers[0].identifier,gt.call(this,e)):t&(m|g)&&gt.call(this,e)}.call(l(l(o)),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],o=Math.abs(e-r.x),r=Math.abs(n-r.y);if(o<=mt&&r<=mt)return!0}return!1}.call(l(l(o)),n))return;o.callback(t,e,n)}},o.touch=new ft(o.manager,o.handler),o.mouse=new dt(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return h(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(it)}();function bt(t,e,n){return Array.isArray(t)&&(s(t,n[e],n),1)}var wt=1;function _t(t,e){e=e.manager;return e?e.get(t):t}function Et(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var xt=function(){function t(t){this.options=i({enable:!0},t=void 0===t?{}:t),this.id=wt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return f(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(bt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=_t(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return bt(t,"dropRecognizeWith",this)||(t=_t(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(bt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===rt(e,t=_t(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(bt(t,"dropRequireFailure",this))return this;t=_t(t,this);t=rt(this.requireFail,t);return-1<t&&this.requireFail.splice(t,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+Et(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+Et(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){t=f({},t);if(!V(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Tt=function(e){function t(t){return e.call(this,i({pointers:1},t=void 0===t?{}:t))||this}h(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,t=this.attrTest(t);return i&&(n&g||!t)?16|e:i||t?n&m?8|e:2&e?4|e:2:32},t}(xt);var Pt=function(n){function t(t){return(t=n.call(this,i({event:"pan",threshold:10,pointers:1,direction:30},t=void 0===t?{}:t))||this).pX=null,t.pY=null,t}h(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(D),t&Y&&e.push(R),e},e.directionTest=function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(i=6&e.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,Math.abs(t.deltaX)):(r=0===s?1:s<0?8:16,n=s!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return Tt.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=16===(e=t.direction)?"down":8===e?"up":2===e?"left":4===e?"right":"";e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Tt),Ot={domEvents:!1,touchAction:S,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function St(n,i){var r,o=n.element;o.style&&(s(n.options.cssProps,function(t,e){r=x(o.style,e),i?(n.oldCssProps[r]=o.style[r],o.style[r]=t):o.style[r]=n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var It=function(){function t(t,e){var n=this;this.options=f({},Ot,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((e=this).options.inputClass||(M?ct:j?ft:z?yt:dt))(e,K),this.touchAction=new L(this,this.options.touchAction),St(this,!0),s(this.options.recognizers,function(t){var e=n.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 f(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){this.touchAction.preventDefaults(t);for(var n,i=this.recognizers,r=e.curRecognizer,o=((!r||8&r.state)&&(r=e.curRecognizer=null),0);o<i.length;)n=i[o],2===e.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),o++}},e.get=function(t){if(t instanceof xt)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(bt(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(bt(t,"remove",this))return this;var e=this.get(t);return!t||-1!==(e=rt(t=this.recognizers,e))&&(t.splice(e,1),this.touchAction.update()),this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return s($(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 s($(t),function(t){e?n[t]&&n[t].splice(rt(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var n,i,r,o=this.handlers[t]&&this.handlers[t].slice();if(o&&o.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var s=0;s<o.length;)o[s](e),s++}},e.destroy=function(){this.element&&St(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}();function At(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function Rt(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function Dt(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function Ct(t){return t.replace(/_/g,".")}function zt(t,n){var i=null,r="-1";return At(t,function(t){var e=Dt("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return e&&!t.brand&&(i=t,r=e[3]||"-1",t.versionAlias?r=t.versionAlias:t.versionTest&&(e=t.versionTest.toLowerCase(),r=((e=Dt("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n))?e[3]:"")||r),r=Ct(r),1)}),{preset:i,version:r}}function Mt(t,n){var i={brand:"",version:"-1"};return At(t,function(t){var e=jt(n,t);return e&&(i.brand=t.id,i.version=t.versionAlias||e.version,"-1"!==i.version)}),i}function jt(t,e){return Rt(t,function(t){t=t.brand;return Dt(""+e.test,t.toLowerCase())})}var kt=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],Ht=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],Yt=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Xt=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Ft=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function Vt(t){var t=function(t){if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}(t),e=!!/mobi/g.exec(t),n={name:"unknown",version:"-1",majorVersion:-1,webview:!!zt(Xt,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},i={name:"unknown",version:"-1",majorVersion:-1},r=zt(kt,t),o=r.preset,r=r.version,s=zt(Ft,t),a=s.preset,s=s.version,u=zt(Ht,t);return n.chromium=!!u.preset,n.chromiumVersion=u.version,n.chromium||(u=zt(Yt,t),n.webkit=!!u.preset,n.webkitVersion=u.version),a&&(i.name=a.id,i.version=s,i.majorVersion=parseInt(s,10)),o&&(n.name=o.id,n.version=r,n.webview&&"ios"===i.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:i,isMobile:e,isHints:!1}}function Nt(t){return void 0===t}var b=function(){function t(){this.options={},this._eventHandler={}}var e=t.prototype;return e.trigger=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!(0<(s=this._eventHandler[t]||[]).length))return!0;var r=n[0]||{},o=n.slice(1),s=s.concat(),a=!1,u=(r.eventType=t,r.stop=function(){a=!0},r.currentTarget=this,[r]);return 1<=o.length&&(u=u.concat(o)),s.forEach(function(t){t.apply(e,u)}),!a},e.once=function(n,i){var r,o=this;if("object"==typeof n&&Nt(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(o,t),o.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&Nt(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(Nt(r=this._eventHandler[t])&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(Nt(t))return this._eventHandler={},this;if(Nt(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1);break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="2.2.2",t}(),Lt=function(t,e){return(Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var y=function(){return(y=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function qt(t,e,n,i){n=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],i=Math.max(n[0],t);return Math.min(n[1],i)}function Wt(t,e){return t<e[0]||t>e[1]}function Ut(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function Bt(t,e,n){var i=t,r=e[0],e=e[1],o=e-r;return n[1]&&e<t&&(i=(i-e)%o+r),i=n[0]&&t<r?(i-r)%o+e:i}function Gt(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var r,Qt,Zt,Jt=(r="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||r.webkitRequestAnimationFrame,Kt=r.cancelAnimationFrame||r.webkitCancelAnimationFrame;function o(t,e){var n,i={};for(n in t)n&&(i[n]=e(t[n],n));return i}function $t(t,e){var n,i={};for(n in t)n&&e(t[n],n)&&(i[n]=t[n]);return i}function te(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function ee(t,n){return te(t,function(t,e){return t===n[e]})}Jt&&!Kt?(Qt={},Zt=Jt,Jt=function(e){var n=Zt(function(t){Qt[n]&&e(t)});return Qt[n]=!0,n},Kt=function(t){delete Qt[t]}):Jt&&Kt||(Jt=function(t){return r.setTimeout(function(){t(r.performance&&r.performance.now&&r.performance.now()||(new Date).getTime())},16)},Kt=r.clearTimeout);var ne={};function ie(t,e){var n,i;return ne[e]||(ne[e]=(i=(n=e)<1?Math.pow(10,oe(n)):1,function(t){return 0===n?0:Math.round(Math.round(t/n)*n*i)/i})),ne[e](t)}function re(t,n){if(!t||!n)return t;var i="number"==typeof n;return o(t,function(t,e){return ie(t,i?n:n[e])})}function oe(t){if(!isFinite(t))return 0;var e=t+"";if(0<=e.indexOf("e")){for(var n=0,i=1;Math.round(t*i)/i!==t;)i*=10,n++;return n}return 0<=e.indexOf(".")?e.length-e.indexOf(".")-1:0}function se(t,e,n){return Math.max(Math.min(t,n),e)}var ae,ue,ce,he,t,le=function(){function t(t){var e=t.options,n=t.itm,i=t.em,t=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=t,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(n,t,e){var i,r=this;return se(void 0!==e?e:(i=o(t,function(t,e){return t=Math.abs(t-n[e]),e=r.options.deceleration,(t=Math.sqrt(t/e*2))<100?0:t}),Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)),this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=n&&n.event||null;return{depaPos:i,destPos:t,duration:se(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,t),inputEvent:r,input:n&&n.input||null,isTrusted:!!r,done:this.animationEnd}},e.grab=function(t,e){var n;this._animateParam&&t.length&&(n=this.axm.get(t),te(t=this.axm.map(n,function(t,e){return Bt(t,e.range,e.circular)}),function(t,e){return n[e]===t})||this.em.triggerChange(t,!1,n,e,!!e),this._animateParam=null,this._raf&&(t=this._raf,Kt(t)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event)))},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.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(),e=(this._animateParam=null,this.axm.filter(this.axm.get(),function(t,e){return Ut(t,e.range,e.circular)}));0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e){return Bt(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,a){var u,c,h,l,f,p,d,v;s.duration?(this._animateParam=y({},s),u=this._animateParam,c=this,h=u.destPos,l=u.depaPos,f=0,p=o(l,function(t,e){return t<=h[e]?1:-1}),d=o(h,function(t){return t}),v=(new Date).getTime(),u.startTime=v,function t(){c._raf=null;var e=(new Date).getTime(),r=(e-u.startTime)/s.duration,o=c.easing(r),n=c.axm.map(l,function(t,e,n){var t=1<=r?h[n]:t+u.delta[n]*(o-f),i=Bt(t,e.range,e.circular);return t!==i&&(t=p[n]*(e.range[1]-e.range[0]),h[n]-=t,l[n]-=t),i}),i=!c.em.triggerChange(n,!1,l);l=n,v=e,1<=(f=o)?(ee(h=c.getFinalPos(h,d),c.axm.get(Object.keys(h)))||c.em.triggerChange(h,!0,l),a()):i?c.finish(!1):c._raf=Jt(t)}()):(this.em.triggerChange(s.destPos,!0),a())},e.getFinalPos=function(t,n){var i=this;return o(t,function(t,e){return t>=n[e]-1e-6&&t<=n[e]+1e-6?n[e]:ie(t,i.getRoundUnit(t,e))})},e.getRoundUnit=function(t,e){var n=this.options.round,i=null;return n||(e=this.axm.getAxisOptions(e),e=Math.max(oe(e.range[0]),oe(e.range[1]),oe(t)),i=1/Math.pow(10,e)),i||n},e.getUserControll=function(t){t=t.setTo();return t.destPos=this.axm.get(t.destPos),t.duration=se(t.duration,this.options.minimumDuration,this.options.maximumDuration),t},e.animateTo=function(t,e,n){var i=this,t=this.createAnimationParam(t,e,n),e=y({},t.depaPos),r=this.em.triggerAnimationStart(t),t=this.getUserControll(t);!r&&this.axm.every(t.destPos,function(t,e){return Ut(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),r&&!ee(t.destPos,e)&&(r=n&&n.event||null,this.animateLoop({depaPos:e,destPos:t.destPos,duration:t.duration,delta:this.axm.getDelta(e,t.destPos),isTrusted:!!r,inputEvent:r,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),i=(this.grab(n),this.axm.get(n));if(ee(t,i))return this;this.itm.setInterrupt(!0);n=$t(t,function(t,e){return i[e]!==t});return Object.keys(n).length&&(ee(n=this.axm.map(n,function(t,e){var n=e.range,e=e.circular;return e&&(e[0]||e[1])?t:qt(t,n,e)}),i)||(0<e?this.animateTo(n,e):(this.em.triggerChange(n),this.finish(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(o(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),fe=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){t=this.getRoundPos(t).roundPos;this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n,i,r){void 0===r&&(r=!1);var o=this.am,s=o.axm,o=o.getEventInfo(),t=this.getRoundPos(t,n),n=t.roundPos,t=t.roundDepa,n=s.moveTo(n,t),t=i&&i.event||o&&o.event||null,r={pos:n.pos,delta:n.delta,holding:r,inputEvent:t,isTrusted:!!t,input:i&&i.input||o&&o.input||null,set:t?this.createUserControll(n.pos):function(){}},i=this.axes.trigger("change",r);return t&&s.set(r.set().destPos),i},e.triggerAnimationStart=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;return t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){this.axes.trigger("animationEnd",{isTrusted:t=void 0===t?!1:t})},e.triggerFinish=function(t){this.axes.trigger("finish",{isTrusted:t=void 0===t?!1:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:y({},t),duration:e};return function(t,e){return t&&(n.destPos=y({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},e.getRoundPos=function(t,e){var n=this.axes.options.round;return{roundPos:re(t,n),roundDepa:re(e,n)}},t}(),pe=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}(),de=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]=y({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 o(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},{}):y(y({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=o(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?Bt(t,e.range,e.circular):0})),{pos:y({},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 te(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this.axis;return $t(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this.axis;return o(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!Wt(t,e.range)})},e.getAxisOptions=function(t){return this.axis[t]},t}(),ve=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,t=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=t}var e=t.prototype;return e.atOutside=function(t){var o,s=this;return this.isOutside?this.axm.map(t,function(t,e){var n=e.range[0]-e.bounce[0],e=e.range[1]+e.bounce[1];return e<t?e:t<n?n:t}):(o=this.am.easing(1e-5)/1e-5,this.axm.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,e=e.circular;return e&&(e[0]||e[1])?t: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){!this.itm.isInterrupted()&&t.axes.length&&(this.isStopped=!(e={input:t,event:e}),this.itm.setInterrupt(!0),this.am.grab(t.axes,e),this.moveDistance||this.em.triggerHold(this.axm.get(),e),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes))},e.change=function(t,e,n){var i,r;this.isStopped||!this.itm.isInterrupting()||this.axm.every(n,function(t){return 0===t})||(r=o(i=this.moveDistance||this.axm.get(t.axes),function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=r),this.isOutside&&this.axm.every(i,function(t,e){return!Wt(t,e.range)})&&(this.isOutside=!1),i=this.atOutside(i),r=this.atOutside(r),this.em.triggerChange(r,!1,i,{input:t,event:e},!0)||(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1)))},e.release=function(t,e,n,i){var r,o;!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance&&(r=this.axm.get(t.axes),o=this.axm.get(),n=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)})),i={depaPos:o,destPos:n=0===(i=this.am.getDuration(n,r,i))?y({},o):n,duration:i,delta:this.axm.getDelta(o,n),inputEvent:e,input:t,isTrusted:!0},this.em.triggerRelease(i),this.moveDistance=null,n={input:t,event:e},(e=ee((t=this.am.getUserControll(i)).destPos,o))||0===t.duration?(e||this.em.triggerChange(t.destPos,!1,o,n,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(n):this.em.triggerFinish(!0)):this.am.animateTo(t.destPos,t.duration,n))},t}(),me="ontouchstart"in r&&"safari"===(void 0===ae&&function(){var t;if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData)return(t=(t=navigator.userAgentData).brands||t.uaList)&&t.length}()?(ce=((he=navigator.userAgentData).uaList||he.brands).slice(),he=he.mobile||!1,n={name:(n=ce[0]).brand,version:n.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Mt(Xt,ce).brand},t={name:"unknown",version:"-1",majorVersion:-1},n.webkit=!n.chromium&&At(Yt,function(t){return jt(ce,t)}),e=Mt(Ht,ce),n.chromium=!!e.brand,n.chromiumVersion=e.version,n.chromium||(e=Mt(Yt,ce),n.webkit=!!e.brand,n.webkitVersion=e.version),Fe&&(ue=Fe.platform.toLowerCase(),e=Rt(Ft,function(t){return new RegExp(""+t.test,"g").exec(ue)}),t.name=e?e.id:ue,t.version=Fe.platformVersion),(e=Mt(kt,ce)).brand&&(n.name=e.brand,n.version=Fe?Fe.uaFullVersion:e.version),"Linux armv8l"===navigator.platform?t.name="android":n.webkit&&(t.name=he?"ios":"mac"),"ios"===t.name&&n.webview&&(n.version="-1"),t.version=Ct(t.version),n.version=Ct(n.version),t.majorVersion=parseInt(t.version,10),n.majorVersion=parseInt(n.version,10),{browser:n,os:t,isMobile:he,isHints:!0}):Vt(ae)).browser.name,ge=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""}(),ye=function(r){function t(){this.constructor=e}var e;function n(t,e,n){void 0===t&&(t={}),void 0===e&&(e={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=y({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},e),i.itm=new pe(i.options),i.axm=new de(i.axis,i.options),i.em=new fe(i),i.am=new le(i),i.io=new ve(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}Lt(e=n,i=r),e.prototype=null===i?Object.create(i):(t.prototype=i.prototype,new t);var i=n.prototype;return i.connect=function(t,e){var n,t="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e&&((n=this._inputs.filter(function(t){return t.hammer&&t.element===e.element})).length&&(e.hammer=n[0].hammer)),e.mapAxes(t),e.connect(this.io),this._inputs.push(e),this},i.disconnect=function(t){return t?0<=(t=this._inputs.indexOf(t))&&(this._inputs[t].disconnect(),this._inputs.splice(t,1)):(this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[]),this},i.get=function(t){return this.axm.get(t)},i.setTo=function(t,e){return this.am.setTo(t,e=void 0===e?0:e),this},i.setBy=function(t,e){return this.am.setBy(t,e=void 0===e?0:e),this},i.isBounceArea=function(t){return this.axm.isOutside(t)},i.destroy=function(){this.disconnect(),this.em.destroy()},n.VERSION="2.8.0",n.TRANSFORM=ge,n.DIRECTION_NONE=1,n.DIRECTION_LEFT=2,n.DIRECTION_RIGHT=4,n.DIRECTION_UP=8,n.DIRECTION_DOWN=16,n.DIRECTION_HORIZONTAL=6,n.DIRECTION_VERTICAL=Y,n.DIRECTION_ALL=30,n}(b),be="PointerEvent"in r||"MSPointerEvent"in r,we="ontouchstart"in r,_e="_EGJS_AXES_INPUTTYPE_";function Ee(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function xe(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}var Te=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===It)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=function e(t,n){var i;return void 0===n&&(n=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((i=document.createElement("div")).innerHTML=t,Gt(i.childNodes)):Gt(document.querySelectorAll(t)),n||(i=1<=i.length?i[0]:void 0)):t===r||t.nodeName&&(1===t.nodeType||9===t.nodeType)?i=t:"jQuery"in r&&t instanceof jQuery||t.constructor.prototype.jquery?i=n?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return e(t)}),n||(i=1<=i.length?i[0]:void 0)),i}(t),this.options=y({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,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?30:e?6:n?Y:1,this.axes=t},e.connect=function(t){var e,n,i,r={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var o=(o=this.element[_e])||String(Math.round(Math.random()*(new Date).getTime())),s=(s=this.options.inputType,i=n=e=!1,(s=void 0===s?[]:s).forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=we;break;case"pointer":i=be}}),i?ct:e&&n?yt:e?ft:n?dt:null);if(!s)throw new Error("Wrong inputType parameter!");this.hammer=function(t,e){try{return new It(t,y({},e))}catch(t){return null}}(this.element,y({inputClass:s},this.options.hammerManagerOptions)),this.element[_e]=o}return this.panRecognizer=new Pt(r),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[_e],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){var e;this.isEnable()&&(t.isFirst?(this.panFlag=!1)!==t.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this.observer.hold(this,t),this.isRightEdge=me&&t.center.x>window.innerWidth-e,this.panFlag=!0):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=this;if(this.panFlag){var n=this.options,i=n.iOSEdgeSwipeThreshold,n=n.releaseOnScroll,r=(r=t.angle,(s=this.options.thresholdAngle)<0||90<s?1:(r=Math.abs(r),s<r&&r<180-s?Y:6)),o=this.hammer.session.prevInput;if(!n||t.srcEvent.cancelable){if(o&&me){if(t.center.x<0)return void this.onPanend(y(y({},o),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),t.deltaX<-i?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout(function(){e.onPanend(y(y({},o),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))},100))}o?(t.offsetX=t.deltaX-o.deltaX,t.offsetY=t.deltaY-o.deltaY):(t.offsetX=0,t.offsetY=0);var s=this.getOffset([t.offsetX,t.offsetY],[xe(6,this._direction,r),xe(Y,this._direction,r)]),n=s.some(function(t){return 0!==t});n&&(!1!==(i=t.srcEvent).cancelable&&i.preventDefault(),i.stopPropagation()),(t.preventSystemEvent=n)&&this.observer.change(this,t,Ee(this.axes,s))}else this.onPanend(y(y({},t),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},e.onPanend=function(t){var e,n,i,r;this.panFlag&&(clearTimeout(this.rightEdgeTimer),this.panFlag=!1,e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[xe(6,this._direction),xe(Y,this._direction)]),n=e,i=this.observer.options.deceleration,r=Math.sqrt(n[0]*n[0]+n[1]*n[1]),r=Math.abs(r/-i),e=[n[0]/2*r,n[1]/2*r],this.observer.release(this,t,Ee(this.axes,e)))},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}();function Pe(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Oe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function Se(t){return void 0===t}var Ie=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=Pe(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=t}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),Ae=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof Ie?e.eventType:e,i=Oe(this._eventHandler[i]||[]);return i.length<=0||(e instanceof Ie?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,Oe(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&Se(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,Oe(t)),o.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&Se(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],Se(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(Se(t))return this._eventHandler={},this;if(Se(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=Pe(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="3.0.2",t}(),Re="__observers__",De=function(){function t(t){this._emitter=new Ae,this._current=t}var e=t.prototype;return Object.defineProperty(e,"current",{get:function(){return this._current},set:function(t){var e=t!==this._current;this._current=t,e&&this._emitter.trigger("update",t)},enumerable:!1,configurable:!0}),e.subscribe=function(t){this._emitter.on("update",t)},e.unsubscribe=function(t){this._emitter.off("update",t)},t}();function Ce(t){return Object.keys(t)}function ze(t){return t[Re]||(t[Re]={}),t[Re]}function Me(t,e,n){t=ze(t);return t[e]||(t[e]=new De(n)),t[e]}function je(i){return function(t,e){var n=i||e;Object.defineProperty(t,e,{get:function(){return Me(this,n).current},set:function(t){Me(this,n,t).current=t}}),n!==e&&Object.defineProperty(t,n,{get:function(){return Me(this,n).current}})}}function ke(t){t=t.prototype;t.subscribe=function(t,e){t in this&&Me(this,t).subscribe(e)},t.unsubscribe=function(t,e){var n=this;t?t in this&&Me(this,t).unsubscribe(e):Ce(ze(this)).forEach(function(t){n.unsubscribe(t)})}}function He(t){return"string"==typeof t}var Ye,Xe=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t,e){void 0===e&&(e={});var i=n.call(this)||this;return i.items=[],i.pos=0,i.size=0,i.scrollSize=0,i._scrollTimer=0,i._isDragScroll=!1,i._isAnimation=!1,i._isReachStart=!1,i._isReachEnd=!1,i.update=function(){i.updateItems(),i.updateContainer()},i._onScroll=function(t){t&&i._debounceScroll(),i._refreshScroll();var t=i.size,e=i.scrollSize,n=i.pos;n<=0&&!0!==i.isReachStart?(i._isReachStart=!0,i.trigger("reachStart")):0<n&&!1!==i.isReachStart&&(i._isReachStart=!1,i.trigger("leaveStart")),e-t<=n&&!0!==i.isReachEnd?(i._isReachEnd=!0,i.trigger("reachEnd")):n<e-t&&!1!==i.isReachEnd&&(i._isReachEnd=!1,i.trigger("leaveEnd"))},i._onPreventClick=function(t){t.stopPropagation(),t.preventDefault(),i._enableClick()},i.options=u({horizontal:!0,useDrag:!0,autoInit:!0,scrollDebounce:100},e),i._scrollArea=t,i.options.autoInit&&i.init(),i}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i);e=r.prototype;return e.findElement=function(t,e){return(null===(t=this.findItem(t,e=void 0===e?{}:e))||void 0===t?void 0:t.element)||null},e.findItem=function(t,e){var i=this.pos,n=this.scrollSize,r=this.size,o=null!==(s=null==(e=void 0===e?{}:e)?void 0:e.hitTest)&&void 0!==s?s:1,s=p([],this.items,!0),a=s.length,h=i+r,e=e.sibling,l={pos:0,size:0},f={pos:n,size:0};if(0<s[0].pos&&s.unshift(l),a&&s[a-1].pos+s[a-1].size<n&&s.push(f),"start"===t){if(i<0)return null;var u,c=(u=p([],s,!0).reverse().filter(function(t){var e=t.size,t=t.pos-i,n=t+e;return 0<=t||0<=n&&(!e||Math.abs(n)/e>=o)}).reverse())[0]===l&&u[1]||u[0]}else if("end"===t){if(n-r<i)return null;c=(u=s.filter(function(t){var e=t.size,t=t.pos+e-h,n=t-e;return t<=0||n<=0&&(!e||Math.abs(n)/e>=o)}).reverse())[0]===f&&u[1]||u[0]}else if("prev"===t)c=s.filter(function(t){var e=t.size,t=t.pos+e-i,n=t-e;return t<=0||n<=0&&(!e||Math.abs(n)/e>=o)}).reverse()[0];else{if("next"!==t)return this._getItem(t);c=s.reverse().filter(function(t){var e=t.size,t=t.pos-h,n=t+e;return 0<=t||0<=n&&(!e||Math.abs(n)/e>=o)}).reverse()[0]}return e&&c&&(-1<(a=s.indexOf(c))&&(c=s[a+e])),c||null},e.scrollIntoView=function(t,e){if(r=this.findItem(t,e=void 0===e?{}:e)){var n=e.duration||0,i=this._getNextScrollPos(r,e);if(He(t)&&e.excludeStand&&i===this.pos){var r,o=this.items.indexOf(r);if(-1===o)return;if(!(r=this.items[o+("start"===t||"prev"===t?-1:1)]))return;i=this._getNextScrollPos(r,e)}this.scrollBy(i-this.pos,n)}},e.scrollBy=function(t,e){this.axes.setBy({scroll:-t},e=void 0===e?0:e)},e.scrollTo=function(t,e){this.axes.setBy({scroll:this.pos-t},e=void 0===e?0:e)},e.setItems=function(t){this.items=t},e.updateItems=function(){var e=this,t=this.scrollAreaElement,n=this.options.itemSelector,n=[].slice.call(n?t.querySelectorAll(n):t.children);this.setItems(n.map(function(t){return e._getItem(t)}))},e.updateContainer=function(){var t=this.scrollAreaElement,e=this.options.horizontal,n=e?t.clientWidth:t.clientHeight,i=e?t.scrollWidth:t.scrollHeight;i===n+1&&(t=t.getBoundingClientRect(),n<(e=e?t.width:t.height)&&e<i&&(i=n)),this.size=n,this.scrollSize=i,this._refreshScroll(),this._onScroll()},e.init=function(){var t,n,e,i,r,o=this;this.axes||(He(i=this._scrollArea)?t=document.querySelector(i):i instanceof Element?t=i:("value"in i||"current"in i)&&(t=i.value||i.current),this.scrollAreaElement=t,n=!1,e=this.scrollAreaElement,i=new ye({scroll:{circular:!0,range:[-1e3,1e3]}},{deceleration:.005,round:1}),r=!1,i.on({hold:function(t){n=!(r=!0);var e,t=t.inputEvent.srcEvent;t&&((e=o.options).preventDefault&&t.preventDefault(),e.preventClickOnDrag&&o._disableClick())},change:function(t){t.inputEvent&&!r||(o._isDragScroll=!!t.inputEvent,o._isAnimation=!!r,n=!0,t=t.delta.scroll,o.options.horizontal?e.scrollLeft-=t:e.scrollTop-=t)},release:function(t){n||(t.setTo(u({},t.depaPos),0),o._enableClick()),n=!1}}),this.axes=i,this.options.useDrag&&i.connect(this.options.horizontal?["scroll",""]:["","scroll"],new Te(e,{inputType:["mouse"],hammerManagerOptions:{touchAction:"auto"}})),e.addEventListener("scroll",this._onScroll),window.addEventListener("resize",this.update),this.update())},e.destroy=function(){var t;null!==(t=this.axes)&&void 0!==t&&t.destroy(),this.unsubscribe(),null!==(t=this.scrollAreaElement)&&void 0!==t&&t.removeEventListener("scroll",this._onScroll),window.removeEventListener("resize",this.update),this.off()},e._refreshScroll=function(){var t=this.options.horizontal,e=this.scrollAreaElement;this.pos=Math.min(this.scrollSize-this.size,t?e.scrollLeft:e.scrollTop)},e._getItem=function(t){var e=this.options.horizontal;return{element:t,pos:e?t.offsetLeft:t.offsetTop,size:e?t.offsetWidth:t.offsetHeight}},e._getNextScrollPos=function(t,e){var n=this.size,i=e.align||"start",e=e.offset||0,r=t.pos,t=t.size,o=0;return"start"===i?o=r-e:"end"===i?o=r+t-n+e:"center"===i&&(o=r+t/2-n/2+e),o},e._enableClick=function(){window.removeEventListener("click",this._onPreventClick,!0)},e._disableClick=function(){window.addEventListener("click",this._onPreventClick,!0)},e._debounceScroll=function(){var t=this;this._scrollTimer||this.trigger("beginScroll"),window.clearTimeout(this._scrollTimer),this._scrollTimer=window.setTimeout(function(){t._scrollTimer=0,t.trigger("finishScroll",{isDragScroll:t._isDragScroll,isTrusted:t._isDragScroll||!t._isAnimation}),t._isDragScroll=!1,t._isAnimation=!1},this.options.scrollDebounce)},c([je("isReachStart")],r.prototype,"_isReachStart",void 0),c([je("isReachEnd")],r.prototype,"_isReachEnd",void 0),c([ke],r)}(Ae),Fe=["update","findElement","findItem","scrollBy","scrollTo","scrollIntoView","setItems","updateContainer","updateItems","init"],e=["reachStart","reachEnd","leaveStart","leaveEnd","beginScroll","finishScroll"],n={isReachStart:!1,isReachEnd:!1},Ve={__proto__:null,default:Xe,CONVEYER_METHODS:Fe,CONVEYER_EVENTS:e,CONVEYER_REACTIVE_STATE:n,REACTIVE_CONVEYER:{state:n,methods:Fe,events:e,instance:function(t){return new Xe(t.container,u(u({},t.props),{autoInit:!1}))},init:function(t,e){!1!==e.props.autoInit&&t.init()},on:function(t,e,n){t.on(e,n)},off:function(t,e,n){t.off(e,n)},destroy:function(t){t.destroy()}},withReactiveMethods:function(r,t){var e={};return t.forEach(function(i){e[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.current||r.value;return n[i].apply(n,t)}}),e},getObservers:ze,getObserver:Me,Reactive:je,ReactiveSubscribe:ke,Observer:De,withClassMethods:function(e){return function(t,r){e.forEach(function(i){i in t||(t[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(n=this[r])[i].apply(n,t);return n===this[r]?this:n})})}},keys:Ce,camelize:function(t){return t.replace(/[\s-_]([a-z])/g,function(t,e){return e.toUpperCase()})}};for(Ye in Ve)Xe[Ye]=Ve[Ye];return Xe});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Conveyer=e()}(this,function(){"use strict";var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var u=function(){return(u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function c(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(s=(o<3?r(s):3<o?r(e,n,s):r(e,n))||s);return 3<o&&s&&Object.defineProperty(e,n,s),s}function p(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||((i=i||Array.prototype.slice.call(e,0,r))[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function h(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var f="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,d=["","webkit","Moz","MS","ms","o"],b="undefined"==typeof document?{style:{}}:document.createElement("div"),w=Math.round,_=Math.abs,E=Date.now;function x(t,e){for(var n,i=e[0].toUpperCase()+e.slice(1),r=0;r<d.length;){if((n=(n=d[r])?n+i:e)in t)return n;r++}}var T="undefined"==typeof window?{}:window,P=x(b.style,"touchAction"),O=void 0!==P;var S="compute",I="manipulation",A="none",R="pan-x",D="pan-y",C=function(){if(!O)return!1;var e={},n=T.CSS&&T.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return e[t]=!n||T.CSS.supports("touch-action",t)}),e}(),z="ontouchstart"in T,M=void 0!==x(T,"PointerEvent"),j=z&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),k="touch",H="mouse",v=1,m=4,g=8,Y=24,X=["x","y"],F=["clientX","clientY"];function s(t,e,n){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(var i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function V(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function L(t,e){return-1<t.indexOf(e)}var N=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===S&&(t=this.compute()),O&&this.manager.element.style&&C[t]&&(this.manager.element.style[P]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var e=[],t=(s(this.manager.recognizers,function(t){V(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),e.join(" "));if(L(t,A))return A;var n=L(t,R),i=L(t,D);return n&&i?A:n||i?n?R:D:L(t,I)?I:"auto"},e.preventDefaults=function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=L(i,A)&&!C[A],o=L(i,D)&&!C[D],i=L(i,R)&&!C[R];if(r){var s=1===t.pointers.length,a=t.distance<2,t=t.deltaTime<250;if(s&&a&&t)return}if(!i||!o)return r||o&&6&n||i&&n&Y?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function q(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function W(t){var e=t.length;if(1===e)return{x:w(t[0].clientX),y:w(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:w(n/e),y:w(i/e)}}function U(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:w(t.pointers[n].clientX),clientY:w(t.pointers[n].clientY)},n++;return{timeStamp:E(),pointers:e,center:W(e),deltaX:t.deltaX,deltaY:t.deltaY}}function B(t,e,n){var i=e[(n=n||X)[0]]-t[n[0]],e=e[n[1]]-t[n[1]];return Math.sqrt(i*i+e*e)}function G(t,e,n){var i=e[(n=n||X)[0]]-t[n[0]],e=e[n[1]]-t[n[1]];return 180*Math.atan2(e,i)/Math.PI}function Q(t,e){return t===e?1:_(t)>=_(e)?t<0?2:4:e<0?8:16}function Z(t,e,n){return{x:e/t||0,y:n/t||0}}function J(h,t){var e,l,f,n,p,i,r=h.session,d=t.pointers,o=d.length,o=(r.firstInput||(r.firstInput=U(t)),1<o&&!r.firstMultiple?r.firstMultiple=U(t):1===o&&(r.firstMultiple=!1),r.firstInput),s=r.firstMultiple,a=(s||o).center,u=t.center=W(d),c=(t.timeStamp=E(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=G(a,u),t.distance=B(a,u),o=r,u=(a=t).center,i=o.offsetDelta||{},e=o.prevDelta||{},c=o.prevInput||{},a.eventType!==v&&c.eventType!==m||(e=o.prevDelta={x:c.deltaX||0,y:c.deltaY||0},i=o.offsetDelta={x:u.x,y:u.y}),a.deltaX=e.x+(u.x-i.x),a.deltaY=e.y+(u.y-i.y),t.offsetDirection=Q(t.deltaX,t.deltaY),Z(t.deltaTime,t.deltaX,t.deltaY)),o=(t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=_(c.x)>_(c.y)?c.x:c.y,t.scale=s?(o=s.pointers,B(d[0],d[1],F)/B(o[0],o[1],F)):1,t.rotation=s?(a=s.pointers,G(d[1],d[0],F)+G(a[1],a[0],F)):0,t.maxPointers=!r.prevInput||t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers,e=t,i=(u=r).lastInterval||e,c=e.timeStamp-i.timeStamp,e.eventType!==g&&(25<c||void 0===i.velocity)?(l=(n=Z(c,c=e.deltaX-i.deltaX,p=e.deltaY-i.deltaY)).x,f=n.y,n=_(n.x)>_(n.y)?n.x:n.y,p=Q(c,p),u.lastInterval=e):(n=i.velocity,l=i.velocityX,f=i.velocityY,p=i.direction),e.velocity=n,e.velocityX=l,e.velocityY=f,e.direction=p,h.element),s=t.srcEvent,d=s.composedPath?s.composedPath()[0]:s.path?s.path[0]:s.target;q(d,o)&&(o=d),t.target=o}function K(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&v&&i-r==0,i=e&(m|g)&&i-r==0;n.isFirst=!!o,n.isFinal=!!i,o&&(t.session={}),n.eventType=e,J(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function $(t){return t.trim().split(/\s+/g)}function tt(e,t,n){s($(t),function(t){e.addEventListener(t,n,!1)})}function et(e,t,n){s($(t),function(t){e.removeEventListener(t,n,!1)})}function nt(t){t=t.ownerDocument||t;return t.defaultView||t.parentWindow||window}var it=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){V(e.options.enable,[e])&&n.handler(t)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&tt(this.element,this.evEl,this.domHandler),this.evTarget&&tt(this.target,this.evTarget,this.domHandler),this.evWin&&tt(nt(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&et(this.element,this.evEl,this.domHandler),this.evTarget&&et(this.target,this.evTarget,this.domHandler),this.evWin&&et(nt(this.element),this.evWin,this.domHandler)},t}();function rt(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 ot={pointerdown:v,pointermove:2,pointerup:m,pointercancel:g,pointerout:g},st={2:k,3:"pen",4:H,5:"kinect"},at="pointerdown",ut="pointermove pointerup pointercancel",ct=(T.MSPointerEvent&&!T.PointerEvent&&(at="MSPointerDown",ut="MSPointerMove MSPointerUp MSPointerCancel"),function(e){function n(){var t=n.prototype;return t.evEl=at,t.evWin=ut,(t=e.apply(this,arguments)||this).store=t.manager.session.pointerEvents=[],t}return h(n,e),n.prototype.handler=function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),i=ot[i],r=st[t.pointerType]||t.pointerType,o=r===k,s=rt(e,t.pointerId,"pointerId");i&v&&(0===t.button||o)?s<0&&(e.push(t),s=e.length-1):i&(m|g)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:r,srcEvent:t}),n&&e.splice(s,1))},n}(it));function ht(t){return Array.prototype.slice.call(t,0)}var lt={touchstart:v,touchmove:2,touchend:m,touchcancel:g},ft=function(e){function n(){var t;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(t=e.apply(this,arguments)||this).targetIds={},t}return h(n,e),n.prototype.handler=function(t){var e=lt[t.type],n=function(t,e){var n,i,r=ht(t.touches),o=this.targetIds;if(e&(2|v)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var s=ht(t.changedTouches),a=[],u=this.target;if(i=r.filter(function(t){return q(t.target,u)}),e===v)for(n=0;n<i.length;)o[i[n].identifier]=!0,n++;n=0;for(;n<s.length;)o[s[n].identifier]&&a.push(s[n]),e&(m|g)&&delete o[s[n].identifier],n++;if(a.length)return[function(t,n,e){for(var i=[],r=[],o=0;o<t.length;){var s=n?t[o][n]:t[o];rt(r,s)<0&&i.push(t[o]),r[o]=s,o++}return i=e?n?i.sort(function(t,e){return t[n]>e[n]}):i.sort():i}(i.concat(a),"identifier",!0),a]}.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:k,srcEvent:t})},n}(it);var pt={mousedown:v,mousemove:2,mouseup:m},dt=function(e){function n(){var t=n.prototype;return t.evEl="mousedown",t.evWin="mousemove mouseup",(t=e.apply(this,arguments)||this).pressed=!1,t}return h(n,e),n.prototype.handler=function(t){var e=pt[t.type];e&v&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=m),this.pressed&&(e&m&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:H,srcEvent:t}))},n}(it),vt=2500,mt=25;function gt(t){var e,n,t=t.changedPointers[0];t.identifier===this.primaryTouch&&(e={x:t.clientX,y:t.clientY},n=this.lastTouches,this.lastTouches.push(e),setTimeout(function(){var t=n.indexOf(e);-1<t&&n.splice(t,1)},vt))}var yt=function(){return function(n){function t(t,e){var o=n.call(this,t,e)||this;return o.handler=function(t,e,n){var i=n.pointerType===k,r=n.pointerType===H;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)!function(t,e){t&v?(this.primaryTouch=e.changedPointers[0].identifier,gt.call(this,e)):t&(m|g)&&gt.call(this,e)}.call(l(l(o)),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],o=Math.abs(e-r.x),r=Math.abs(n-r.y);if(o<=mt&&r<=mt)return!0}return!1}.call(l(l(o)),n))return;o.callback(t,e,n)}},o.touch=new ft(o.manager,o.handler),o.mouse=new dt(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return h(t,n),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(it)}();function bt(t,e,n){return Array.isArray(t)&&(s(t,n[e],n),1)}var wt=1;function _t(t,e){e=e.manager;return e?e.get(t):t}function Et(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var xt=function(){function t(t){this.options=i({enable:!0},t=void 0===t?{}:t),this.id=wt++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return f(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(bt(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=_t(t,this)).id]||(e[t.id]=t).recognizeWith(this),this},e.dropRecognizeWith=function(t){return bt(t,"dropRecognizeWith",this)||(t=_t(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(bt(t,"requireFailure",this))return this;var e=this.requireFail;return-1===rt(e,t=_t(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(bt(t,"dropRequireFailure",this))return this;t=_t(t,this);t=rt(this.requireFail,t);return-1<t&&this.requireFail.splice(t,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+Et(t)),i(n.options.event),e.additionalEvent&&i(e.additionalEvent),8<=t&&i(n.options.event+Et(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){t=f({},t);if(!V(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),Tt=function(e){function t(t){return e.call(this,i({pointers:1},t=void 0===t?{}:t))||this}h(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,t=this.attrTest(t);return i&&(n&g||!t)?16|e:i||t?n&m?8|e:2&e?4|e:2:32},t}(xt);var Pt=function(n){function t(t){return(t=n.call(this,i({event:"pan",threshold:10,pointers:1,direction:30},t=void 0===t?{}:t))||this).pX=null,t.pY=null,t}h(t,n);var e=t.prototype;return e.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(D),t&Y&&e.push(R),e},e.directionTest=function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(i=6&e.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,Math.abs(t.deltaX)):(r=0===s?1:s<0?8:16,n=s!==this.pY,Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},e.attrTest=function(t){return Tt.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=16===(e=t.direction)?"down":8===e?"up":2===e?"left":4===e?"right":"";e&&(t.additionalEvent=this.options.event+e),n.prototype.emit.call(this,t)},t}(Tt),Ot={domEvents:!1,touchAction:S,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function St(n,i){var r,o=n.element;o.style&&(s(n.options.cssProps,function(t,e){r=x(o.style,e),i?(n.oldCssProps[r]=o.style[r],o.style[r]=t):o.style[r]=n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}var It=function(){function t(t,e){var n=this;this.options=f({},Ot,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((e=this).options.inputClass||(M?ct:j?ft:z?yt:dt))(e,K),this.touchAction=new N(this,this.options.touchAction),St(this,!0),s(this.options.recognizers,function(t){var e=n.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 f(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){this.touchAction.preventDefaults(t);for(var n,i=this.recognizers,r=e.curRecognizer,o=((!r||8&r.state)&&(r=e.curRecognizer=null),0);o<i.length;)n=i[o],2===e.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),o++}},e.get=function(t){if(t instanceof xt)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(bt(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(bt(t,"remove",this))return this;var e=this.get(t);return!t||-1!==(e=rt(t=this.recognizers,e))&&(t.splice(e,1),this.touchAction.update()),this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var n=this.handlers;return s($(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 s($(t),function(t){e?n[t]&&n[t].splice(rt(n[t],e),1):delete n[t]}),this},e.emit=function(t,e){this.options.domEvents&&(n=t,i=e,(r=document.createEvent("Event")).initEvent(n,!0,!0),(r.gesture=i).target.dispatchEvent(r));var n,i,r,o=this.handlers[t]&&this.handlers[t].slice();if(o&&o.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var s=0;s<o.length;)o[s](e),s++}},e.destroy=function(){this.element&&St(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}();function At(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return!0;return!1}function Rt(t,e){for(var n=t.length,i=0;i<n;++i)if(e(t[i],i))return t[i];return null}function Dt(t,e){try{return new RegExp(t,"g").exec(e)}catch(t){return null}}function Ct(t){return t.replace(/_/g,".")}function zt(t,n){var i=null,r="-1";return At(t,function(t){var e=Dt("("+t.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return e&&!t.brand&&(i=t,r=e[3]||"-1",t.versionAlias?r=t.versionAlias:t.versionTest&&(e=t.versionTest.toLowerCase(),r=((e=Dt("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n))?e[3]:"")||r),r=Ct(r),1)}),{preset:i,version:r}}function Mt(t,n){var i={brand:"",version:"-1"};return At(t,function(t){var e=jt(n,t);return e&&(i.brand=t.id,i.version=t.versionAlias||e.version,"-1"!==i.version)}),i}function jt(t,e){return Rt(t,function(t){t=t.brand;return Dt(""+e.test,t.toLowerCase())})}var kt=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],Ht=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],Yt=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Xt=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Ft=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"mac os x",id:"mac"},{test:"android",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function Vt(t){var t=function(t){if(void 0===t){if("undefined"==typeof navigator||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}(t),e=!!/mobi/g.exec(t),n={name:"unknown",version:"-1",majorVersion:-1,webview:!!zt(Xt,t).preset,chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},i={name:"unknown",version:"-1",majorVersion:-1},r=zt(kt,t),o=r.preset,r=r.version,s=zt(Ft,t),a=s.preset,s=s.version,u=zt(Ht,t);return n.chromium=!!u.preset,n.chromiumVersion=u.version,n.chromium||(u=zt(Yt,t),n.webkit=!!u.preset,n.webkitVersion=u.version),a&&(i.name=a.id,i.version=s,i.majorVersion=parseInt(s,10)),o&&(n.name=o.id,n.version=r,n.webview&&"ios"===i.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:i,isMobile:e,isHints:!1}}function Lt(t){return void 0===t}var b=function(){function t(){this.options={},this._eventHandler={}}var e=t.prototype;return e.trigger=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!(0<(s=this._eventHandler[t]||[]).length))return!0;var r=n[0]||{},o=n.slice(1),s=s.concat(),a=!1,u=(r.eventType=t,r.stop=function(){a=!0},r.currentTarget=this,[r]);return 1<=o.length&&(u=u.concat(o)),s.forEach(function(t){t.apply(e,u)}),!a},e.once=function(n,i){var r,o=this;if("object"==typeof n&&Lt(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(o,t),o.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&Lt(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(Lt(r=this._eventHandler[t])&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(Lt(t))return this._eventHandler={},this;if(Lt(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1);break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="2.2.2",t}(),Nt=function(t,e){return(Nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var y=function(){return(y=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function qt(t,e,n,i){n=[!n[0]&&i?e[0]-i[0]:e[0],!n[1]&&i?e[1]+i[1]:e[1]],i=Math.max(n[0],t);return Math.min(n[1],i)}function Wt(t,e){return t<e[0]||t>e[1]}function Ut(t,e,n){return n[1]&&t>e[1]||n[0]&&t<e[0]}function Bt(t,e,n){var i=t,r=e[0],e=e[1],o=e-r;return n[1]&&e<t&&(i=(i-e)%o+r),i=n[0]&&t<r?(i-r)%o+e:i}function Gt(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}var r,Qt,Zt,Jt=(r="undefined"==typeof window?{navigator:{userAgent:""}}:window).requestAnimationFrame||r.webkitRequestAnimationFrame,Kt=r.cancelAnimationFrame||r.webkitCancelAnimationFrame;function o(t,e){var n,i={};for(n in t)n&&(i[n]=e(t[n],n));return i}function $t(t,e){var n,i={};for(n in t)n&&e(t[n],n)&&(i[n]=t[n]);return i}function te(t,e){for(var n in t)if(n&&!e(t[n],n))return!1;return!0}function ee(t,n){return te(t,function(t,e){return t===n[e]})}Jt&&!Kt?(Qt={},Zt=Jt,Jt=function(e){var n=Zt(function(t){Qt[n]&&e(t)});return Qt[n]=!0,n},Kt=function(t){delete Qt[t]}):Jt&&Kt||(Jt=function(t){return r.setTimeout(function(){t(r.performance&&r.performance.now&&r.performance.now()||(new Date).getTime())},16)},Kt=r.clearTimeout);var ne={};function ie(t,e){var n,i;return ne[e]||(ne[e]=(i=(n=e)<1?Math.pow(10,oe(n)):1,function(t){return 0===n?0:Math.round(Math.round(t/n)*n*i)/i})),ne[e](t)}function re(t,n){if(!t||!n)return t;var i="number"==typeof n;return o(t,function(t,e){return ie(t,i?n:n[e])})}function oe(t){if(!isFinite(t))return 0;var e=t+"";if(0<=e.indexOf("e")){for(var n=0,i=1;Math.round(t*i)/i!==t;)i*=10,n++;return n}return 0<=e.indexOf(".")?e.length-e.indexOf(".")-1:0}function se(t,e,n){return Math.max(Math.min(t,n),e)}var ae,ue,ce,he=function(){function t(t){var e=t.options,n=t.itm,i=t.em,t=t.axm;this.options=e,this.itm=n,this.em=i,this.axm=t,this.animationEnd=this.animationEnd.bind(this)}var e=t.prototype;return e.getDuration=function(n,t,e){var i,r=this;return se(void 0!==e?e:(i=o(t,function(t,e){return t=Math.abs(t-n[e]),e=r.options.deceleration,(t=Math.sqrt(t/e*2))<100?0:t}),Object.keys(i).reduce(function(t,e){return Math.max(t,i[e])},-1/0)),this.options.minimumDuration,this.options.maximumDuration)},e.createAnimationParam=function(t,e,n){var i=this.axm.get(),r=n&&n.event||null;return{depaPos:i,destPos:t,duration:se(e,this.options.minimumDuration,this.options.maximumDuration),delta:this.axm.getDelta(i,t),inputEvent:r,input:n&&n.input||null,isTrusted:!!r,done:this.animationEnd}},e.grab=function(t,e){var n;this._animateParam&&t.length&&(n=this.axm.get(t),te(t=this.axm.map(n,function(t,e){return Bt(t,e.range,e.circular)}),function(t,e){return n[e]===t})||this.em.triggerChange(t,!1,n,e,!!e),this._animateParam=null,this._raf&&(t=this._raf,Kt(t)),this._raf=null,this.em.triggerAnimationEnd(!(!e||!e.event)))},e.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},e.restore=function(t){var e=this.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(),e=(this._animateParam=null,this.axm.filter(this.axm.get(),function(t,e){return Ut(t,e.range,e.circular)}));0<Object.keys(e).length&&this.setTo(this.axm.map(e,function(t,e){return Bt(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,a){var u,c,h,l,f,p,d,v;s.duration?(this._animateParam=y({},s),u=this._animateParam,c=this,h=u.destPos,l=u.depaPos,f=0,p=o(l,function(t,e){return t<=h[e]?1:-1}),d=o(h,function(t){return t}),v=(new Date).getTime(),u.startTime=v,function t(){c._raf=null;var e=(new Date).getTime(),r=(e-u.startTime)/s.duration,o=c.easing(r),n=c.axm.map(l,function(t,e,n){var t=1<=r?h[n]:t+u.delta[n]*(o-f),i=Bt(t,e.range,e.circular);return t!==i&&(t=p[n]*(e.range[1]-e.range[0]),h[n]-=t,l[n]-=t),i}),i=!c.em.triggerChange(n,!1,l);l=n,v=e,1<=(f=o)?(ee(h=c.getFinalPos(h,d),c.axm.get(Object.keys(h)))||c.em.triggerChange(h,!0,l),a()):i?c.finish(!1):c._raf=Jt(t)}()):(this.em.triggerChange(s.destPos,!0),a())},e.getFinalPos=function(t,n){var i=this;return o(t,function(t,e){return t>=n[e]-1e-6&&t<=n[e]+1e-6?n[e]:ie(t,i.getRoundUnit(t,e))})},e.getRoundUnit=function(t,e){var n=this.options.round,i=null;return n||(e=this.axm.getAxisOptions(e),e=Math.max(oe(e.range[0]),oe(e.range[1]),oe(t)),i=1/Math.pow(10,e)),i||n},e.getUserControll=function(t){t=t.setTo();return t.destPos=this.axm.get(t.destPos),t.duration=se(t.duration,this.options.minimumDuration,this.options.maximumDuration),t},e.animateTo=function(t,e,n){var i=this,t=this.createAnimationParam(t,e,n),e=y({},t.depaPos),r=this.em.triggerAnimationStart(t),t=this.getUserControll(t);!r&&this.axm.every(t.destPos,function(t,e){return Ut(t,e.range,e.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),r&&!ee(t.destPos,e)&&(r=n&&n.event||null,this.animateLoop({depaPos:e,destPos:t.destPos,duration:t.duration,delta:this.axm.getDelta(e,t.destPos),isTrusted:!!r,inputEvent:r,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),i=(this.grab(n),this.axm.get(n));if(ee(t,i))return this;this.itm.setInterrupt(!0);n=$t(t,function(t,e){return i[e]!==t});return Object.keys(n).length&&(ee(n=this.axm.map(n,function(t,e){var n=e.range,e=e.circular;return e&&(e[0]||e[1])?t:qt(t,n,e)}),i)||(0<e?this.animateTo(n,e):(this.em.triggerChange(n),this.finish(!1)))),this},e.setBy=function(n,t){return void 0===t&&(t=0),this.setTo(o(this.axm.get(Object.keys(n)),function(t,e){return t+n[e]}),t)},t}(),le=function(){function t(t){this.axes=t}var e=t.prototype;return e.triggerHold=function(t,e){t=this.getRoundPos(t).roundPos;this.axes.trigger("hold",{pos:t,input:e.input||null,inputEvent:e.event||null,isTrusted:!0})},e.triggerRelease=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("release",t)},e.triggerChange=function(t,e,n,i,r){void 0===r&&(r=!1);var o=this.am,s=o.axm,o=o.getEventInfo(),t=this.getRoundPos(t,n),n=t.roundPos,t=t.roundDepa,n=s.moveTo(n,t),t=i&&i.event||o&&o.event||null,r={pos:n.pos,delta:n.delta,holding:r,inputEvent:t,isTrusted:!!t,input:i&&i.input||o&&o.input||null,set:t?this.createUserControll(n.pos):function(){}},i=this.axes.trigger("change",r);return t&&s.set(r.set().destPos),i},e.triggerAnimationStart=function(t){var e=this.getRoundPos(t.destPos,t.depaPos),n=e.roundPos,e=e.roundDepa;return t.destPos=n,t.depaPos=e,t.setTo=this.createUserControll(t.destPos,t.duration),this.axes.trigger("animationStart",t)},e.triggerAnimationEnd=function(t){this.axes.trigger("animationEnd",{isTrusted:t=void 0===t?!1:t})},e.triggerFinish=function(t){this.axes.trigger("finish",{isTrusted:t=void 0===t?!1:t})},e.createUserControll=function(t,e){void 0===e&&(e=0);var n={destPos:y({},t),duration:e};return function(t,e){return t&&(n.destPos=y({},t)),void 0!==e&&(n.duration=e),n}},e.setAnimationManager=function(t){this.am=t},e.destroy=function(){this.axes.off()},e.getRoundPos=function(t,e){var n=this.axes.options.round;return{roundPos:re(t,n),roundDepa:re(e,n)}},t}(),fe=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}(),pe=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]=y({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 o(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},{}):y(y({},this._pos),t||{})},e.moveTo=function(n,i){void 0===i&&(i=this._pos);var t=o(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?Bt(t,e.range,e.circular):0})),{pos:y({},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 te(t,function(t,e){return n(t,i[e],e)})},e.filter=function(t,n){var i=this.axis;return $t(t,function(t,e){return n(t,i[e],e)})},e.map=function(t,n){var i=this.axis;return o(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!Wt(t,e.range)})},e.getAxisOptions=function(t){return this.axis[t]},t}(),de=function(){function t(t){var e=t.options,n=t.itm,i=t.em,r=t.axm,t=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=t}var e=t.prototype;return e.atOutside=function(t){var o,s=this;return this.isOutside?this.axm.map(t,function(t,e){var n=e.range[0]-e.bounce[0],e=e.range[1]+e.bounce[1];return e<t?e:t<n?n:t}):(o=this.am.easing(1e-5)/1e-5,this.axm.map(t,function(t,e){var n=e.range[0],i=e.range[1],r=e.bounce,e=e.circular;return e&&(e[0]||e[1])?t: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){!this.itm.isInterrupted()&&t.axes.length&&(this.isStopped=!(e={input:t,event:e}),this.itm.setInterrupt(!0),this.am.grab(t.axes,e),this.moveDistance||this.em.triggerHold(this.axm.get(),e),this.isOutside=this.axm.isOutside(t.axes),this.moveDistance=this.axm.get(t.axes))},e.change=function(t,e,n){var i,r;this.isStopped||!this.itm.isInterrupting()||this.axm.every(n,function(t){return 0===t})||(r=o(i=this.moveDistance||this.axm.get(t.axes),function(t,e){return t+(n[e]||0)}),this.moveDistance&&(this.moveDistance=r),this.isOutside&&this.axm.every(i,function(t,e){return!Wt(t,e.range)})&&(this.isOutside=!1),i=this.atOutside(i),r=this.atOutside(r),this.em.triggerChange(r,!1,i,{input:t,event:e},!0)||(this.isStopped=!0,this.moveDistance=null,this.am.finish(!1)))},e.release=function(t,e,n,i){var r,o;!this.isStopped&&this.itm.isInterrupting()&&this.moveDistance&&(r=this.axm.get(t.axes),o=this.axm.get(),n=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)})),i={depaPos:o,destPos:n=0===(i=this.am.getDuration(n,r,i))?y({},o):n,duration:i,delta:this.axm.getDelta(o,n),inputEvent:e,input:t,isTrusted:!0},this.em.triggerRelease(i),this.moveDistance=null,n={input:t,event:e},(e=ee((t=this.am.getUserControll(i)).destPos,o))||0===t.duration?(e||this.em.triggerChange(t.destPos,!1,o,n,!0),this.itm.setInterrupt(!1),this.axm.isOutside()?this.am.restore(n):this.em.triggerFinish(!0)):this.am.animateTo(t.destPos,t.duration,n))},t}(),ve="ontouchstart"in r&&"safari"===(void 0===ae&&function(){var t;if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData)return(t=(t=navigator.userAgentData).brands||t.uaList)&&t.length}()?(ce=((Ve=navigator.userAgentData).uaList||Ve.brands).slice(),Ve=Ve.mobile||!1,e={name:(e=ce[0]).brand,version:e.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Mt(Xt,ce).brand},n={name:"unknown",version:"-1",majorVersion:-1},e.webkit=!e.chromium&&At(Yt,function(t){return jt(ce,t)}),t=Mt(Ht,ce),e.chromium=!!t.brand,e.chromiumVersion=t.version,e.chromium||(t=Mt(Yt,ce),e.webkit=!!t.brand,e.webkitVersion=t.version),Se&&(ue=Se.platform.toLowerCase(),t=Rt(Ft,function(t){return new RegExp(""+t.test,"g").exec(ue)}),n.name=t?t.id:ue,n.version=Se.platformVersion),(t=Mt(kt,ce)).brand&&(e.name=t.brand,e.version=Se?Se.uaFullVersion:t.version),"Linux armv8l"===navigator.platform?n.name="android":e.webkit&&(n.name=Ve?"ios":"mac"),"ios"===n.name&&e.webview&&(e.version="-1"),n.version=Ct(n.version),e.version=Ct(e.version),n.majorVersion=parseInt(n.version,10),e.majorVersion=parseInt(e.version,10),{browser:e,os:n,isMobile:Ve,isHints:!0}):Vt(ae)).browser.name,me=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""}(),ge=function(r){function t(){this.constructor=e}var e;function n(t,e,n){void 0===t&&(t={}),void 0===e&&(e={});var i=r.call(this)||this;return i.axis=t,i._inputs=[],i.options=y({easing:function(t){return 1-Math.pow(1-t,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null},e),i.itm=new fe(i.options),i.axm=new pe(i.axis,i.options),i.em=new le(i),i.am=new he(i),i.io=new de(i),i.em.setAnimationManager(i.am),n&&i.em.triggerChange(n),i}Nt(e=n,i=r),e.prototype=null===i?Object.create(i):(t.prototype=i.prototype,new t);var i=n.prototype;return i.connect=function(t,e){var n,t="string"==typeof t?t.split(" "):t.concat();return~this._inputs.indexOf(e)&&this.disconnect(e),"hammer"in e&&((n=this._inputs.filter(function(t){return t.hammer&&t.element===e.element})).length&&(e.hammer=n[0].hammer)),e.mapAxes(t),e.connect(this.io),this._inputs.push(e),this},i.disconnect=function(t){return t?0<=(t=this._inputs.indexOf(t))&&(this._inputs[t].disconnect(),this._inputs.splice(t,1)):(this._inputs.forEach(function(t){return t.disconnect()}),this._inputs=[]),this},i.get=function(t){return this.axm.get(t)},i.setTo=function(t,e){return this.am.setTo(t,e=void 0===e?0:e),this},i.setBy=function(t,e){return this.am.setBy(t,e=void 0===e?0:e),this},i.isBounceArea=function(t){return this.axm.isOutside(t)},i.destroy=function(){this.disconnect(),this.em.destroy()},n.VERSION="2.8.0",n.TRANSFORM=me,n.DIRECTION_NONE=1,n.DIRECTION_LEFT=2,n.DIRECTION_RIGHT=4,n.DIRECTION_UP=8,n.DIRECTION_DOWN=16,n.DIRECTION_HORIZONTAL=6,n.DIRECTION_VERTICAL=Y,n.DIRECTION_ALL=30,n}(b),ye="PointerEvent"in r||"MSPointerEvent"in r,be="ontouchstart"in r,we="_EGJS_AXES_INPUTTYPE_";function _e(i,t){return t.reduce(function(t,e,n){return i[n]&&(t[i[n]]=e),t},{})}function Ee(t,e,n){return n?!!(30===e||e&t&&n&t):!!(e&t)}var xe=function(){function t(t,e){if(this.axes=[],this.hammer=null,this.element=null,this.panRecognizer=null,this.isRightEdge=!1,this.rightEdgeTimer=0,this.panFlag=!1,void 0===It)throw new Error("The Hammerjs must be loaded before eg.Axes.PanInput.\nhttp://hammerjs.github.io/");this.element=function e(t,n){var i;return void 0===n&&(n=!1),"string"==typeof t?(i=t.match(/^<([a-z]+)\s*([^>]*)>/)?((i=document.createElement("div")).innerHTML=t,Gt(i.childNodes)):Gt(document.querySelectorAll(t)),n||(i=1<=i.length?i[0]:void 0)):t===r||t.nodeName&&(1===t.nodeType||9===t.nodeType)?i=t:"jQuery"in r&&t instanceof jQuery||t.constructor.prototype.jquery?i=n?t.toArray():t.get(0):Array.isArray(t)&&(i=t.map(function(t){return e(t)}),n||(i=1<=i.length?i[0]:void 0)),i}(t),this.options=y({inputType:["touch","mouse","pointer"],scale:[1,1],thresholdAngle:45,threshold:0,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,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?30:e?6:n?Y:1,this.axes=t},e.connect=function(t){var e,n,i,r={direction:this._direction,threshold:this.options.threshold};if(this.hammer)this.removeRecognizer(),this.dettachEvent();else{var o=(o=this.element[we])||String(Math.round(Math.random()*(new Date).getTime())),s=(s=this.options.inputType,i=n=e=!1,(s=void 0===s?[]:s).forEach(function(t){switch(t){case"mouse":n=!0;break;case"touch":e=be;break;case"pointer":i=ye}}),i?ct:e&&n?yt:e?ft:n?dt:null);if(!s)throw new Error("Wrong inputType parameter!");this.hammer=function(t,e){try{return new It(t,y({},e))}catch(t){return null}}(this.element,y({inputClass:s},this.options.hammerManagerOptions)),this.element[we]=o}return this.panRecognizer=new Pt(r),this.hammer.add(this.panRecognizer),this.attachEvent(t),this},e.disconnect=function(){return this.removeRecognizer(),this.hammer&&this.dettachEvent(),this._direction=1,this},e.destroy=function(){this.disconnect(),this.hammer&&0===this.hammer.recognizers.length&&this.hammer.destroy(),delete this.element[we],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){var e;this.isEnable()&&(t.isFirst?(this.panFlag=!1)!==t.srcEvent.cancelable&&(e=this.options.iOSEdgeSwipeThreshold,this.observer.hold(this,t),this.isRightEdge=ve&&t.center.x>window.innerWidth-e,this.panFlag=!0):t.isFinal&&this.onPanend(t))},e.onPanmove=function(t){var e=this;if(this.panFlag){var n=this.options,i=n.iOSEdgeSwipeThreshold,n=n.releaseOnScroll,r=(r=t.angle,(s=this.options.thresholdAngle)<0||90<s?1:(r=Math.abs(r),s<r&&r<180-s?Y:6)),o=this.hammer.session.prevInput;if(!n||t.srcEvent.cancelable){if(o&&ve){if(t.center.x<0)return void this.onPanend(y(y({},o),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}));this.isRightEdge&&(clearTimeout(this.rightEdgeTimer),t.deltaX<-i?this.isRightEdge=!1:this.rightEdgeTimer=window.setTimeout(function(){e.onPanend(y(y({},o),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))},100))}o?(t.offsetX=t.deltaX-o.deltaX,t.offsetY=t.deltaY-o.deltaY):(t.offsetX=0,t.offsetY=0);var s=this.getOffset([t.offsetX,t.offsetY],[Ee(6,this._direction,r),Ee(Y,this._direction,r)]),n=s.some(function(t){return 0!==t});n&&(!1!==(i=t.srcEvent).cancelable&&i.preventDefault(),i.stopPropagation()),(t.preventSystemEvent=n)&&this.observer.change(this,t,_e(this.axes,s))}else this.onPanend(y(y({},t),{velocityX:0,velocityY:0,offsetX:0,offsetY:0}))}},e.onPanend=function(t){var e,n,i,r;this.panFlag&&(clearTimeout(this.rightEdgeTimer),this.panFlag=!1,e=this.getOffset([Math.abs(t.velocityX)*(t.deltaX<0?-1:1),Math.abs(t.velocityY)*(t.deltaY<0?-1:1)],[Ee(6,this._direction),Ee(Y,this._direction)]),n=e,i=this.observer.options.deceleration,r=Math.sqrt(n[0]*n[0]+n[1]*n[1]),r=Math.abs(r/-i),e=[n[0]/2*r,n[1]/2*r],this.observer.release(this,t,_e(this.axes,e)))},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}();function Te(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&i>=t.length?void 0:t)&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pe(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(i=o.next()).done;)s.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[e]));return t}function Oe(t){return void 0===t}var Se,t,Ie=function(){function t(t,e){var n,i;if(this._canceled=!1,e)try{for(var r=Te(Object.keys(e)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=e[s]}}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}this.eventType=t}var e=t.prototype;return e.stop=function(){this._canceled=!0},e.isCanceled=function(){return this._canceled},t}(),Ae=function(){function t(){this._eventHandler={}}var e=t.prototype;return e.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof Ie?e.eventType:e,i=Pe(this._eventHandler[i]||[]);return i.length<=0||(e instanceof Ie?(e.currentTarget=this,i.forEach(function(t){t(e)})):i.forEach(function(t){t.apply(void 0,Pe(n))})),this},e.once=function(n,i){var r,o=this;if("object"==typeof n&&Oe(i)){var t,e=n;for(t in e)this.once(t,e[t]);return this}return"string"==typeof n&&"function"==typeof i&&(r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.apply(void 0,Pe(t)),o.off(n,r)},this.on(n,r)),this},e.hasOn=function(t){return!!this._eventHandler[t]},e.on=function(t,e){if("object"==typeof t&&Oe(e)){var n,i=t;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof t&&"function"==typeof e&&(r=this._eventHandler[t],Oe(r)&&(this._eventHandler[t]=[],r=this._eventHandler[t]),r.push(e)),this},e.off=function(t,e){var n,i;if(Oe(t))return this._eventHandler={},this;if(Oe(e)){if("string"==typeof t)return delete this._eventHandler[t],this;var r,o=t;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[t];if(s){var a=0;try{for(var u=Te(s),c=u.next();!c.done;c=u.next()){if(c.value===e){s.splice(a,1),s.length<=0&&delete this._eventHandler[t];break}a++}}catch(t){n={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},t.VERSION="3.0.2",t}(),Re=/msie|trident/g.test("undefined"!=typeof window&&(null===(t=null===(Se=null===window||void 0===window?void 0:window.navigator)||void 0===Se?void 0:Se.userAgent)||void 0===t?void 0:t.toLowerCase())||""),De="__observers__",Ce=function(){function t(t){this._emitter=new Ae,this._current=t}var e=t.prototype;return Object.defineProperty(e,"current",{get:function(){return this._current},set:function(t){var e=t!==this._current;this._current=t,e&&this._emitter.trigger("update",t)},enumerable:!1,configurable:!0}),e.subscribe=function(t){this._emitter.on("update",t)},e.unsubscribe=function(t){this._emitter.off("update",t)},t}();function ze(t){return Object.keys(t)}function Me(t){return t[De]||(t[De]={}),t[De]}function je(t,e,n){t=Me(t);return t[e]||(t[e]=new Ce(n)),t[e]}function ke(i){return function(t,e){var n=i||e;Object.defineProperty(t,e,{get:function(){return je(this,n).current},set:function(t){je(this,n,t).current=t}}),n!==e&&Object.defineProperty(t,n,{get:function(){return je(this,n).current}})}}function He(t){t=t.prototype;t.subscribe=function(t,e){t in this&&je(this,t).subscribe(e)},t.unsubscribe=function(t,e){var n=this;t?t in this&&je(this,t).unsubscribe(e):ze(Me(this)).forEach(function(t){n.unsubscribe(t)})}}function Ye(t){return"string"==typeof t}var Xe,Fe=function(n){var t=r,e=n;if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}function r(t,e){void 0===e&&(e={});var i=n.call(this)||this;return i.items=[],i.pos=0,i.size=0,i.scrollSize=0,i._scrollTimer=0,i._isDragScroll=!1,i._isAnimation=!1,i._isReachStart=!1,i._isReachEnd=!1,i.update=function(){i.updateItems(),i.updateContainer()},i._onScroll=function(t){t&&i._debounceScroll(),i._refreshScroll();var t=i.size,e=i.scrollSize,n=i.pos;n<=0&&!0!==i.isReachStart?(i._isReachStart=!0,i.trigger("reachStart")):0<n&&!1!==i.isReachStart&&(i._isReachStart=!1,i.trigger("leaveStart")),e-t<=n&&!0!==i.isReachEnd?(i._isReachEnd=!0,i.trigger("reachEnd")):n<e-t&&!1!==i.isReachEnd&&(i._isReachEnd=!1,i.trigger("leaveEnd"))},i._onPreventClick=function(t){t.stopPropagation(),t.preventDefault(),i._enableClick()},i.options=u({horizontal:!0,useDrag:!0,autoInit:!0,scrollDebounce:100},e),i._scrollArea=t,i.options.autoInit&&i.init(),i}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i);e=r.prototype;return e.findElement=function(t,e){return(null===(t=this.findItem(t,e=void 0===e?{}:e))||void 0===t?void 0:t.element)||null},e.findItem=function(t,e){var i=this.pos,n=this.scrollSize,r=this.size,o=null!==(s=null==(e=void 0===e?{}:e)?void 0:e.hitTest)&&void 0!==s?s:1,s=p([],this.items,!0),a=s.length,h=i+r,e=e.sibling,l={pos:0,size:0},f={pos:n,size:0};if(0<s[0].pos&&s.unshift(l),a&&s[a-1].pos+s[a-1].size<n&&s.push(f),"start"===t){if(i<0)return null;var u,c=(u=p([],s,!0).reverse().filter(function(t){var e=t.size,t=t.pos-i,n=t+e;return 0<=t||0<=n&&(!e||Math.abs(n)/e>=o)}).reverse())[0]===l&&u[1]||u[0]}else if("end"===t){if(n-r<i)return null;c=(u=s.filter(function(t){var e=t.size,t=t.pos+e-h,n=t-e;return t<=0||n<=0&&(!e||Math.abs(n)/e>=o)}).reverse())[0]===f&&u[1]||u[0]}else if("prev"===t)c=s.filter(function(t){var e=t.size,t=t.pos+e-i,n=t-e;return t<=0||n<=0&&(!e||Math.abs(n)/e>=o)}).reverse()[0];else{if("next"!==t)return this._getItem(t);c=s.reverse().filter(function(t){var e=t.size,t=t.pos-h,n=t+e;return 0<=t||0<=n&&(!e||Math.abs(n)/e>=o)}).reverse()[0]}return e&&c&&(-1<(a=s.indexOf(c))&&(c=s[a+e])),c||null},e.scrollIntoView=function(t,e){if(r=this.findItem(t,e=void 0===e?{}:e)){var n=e.duration||0,i=this._getNextScrollPos(r,e);if(Ye(t)&&e.excludeStand&&i===this.pos){var r,o=this.items.indexOf(r);if(-1===o)return;if(!(r=this.items[o+("start"===t||"prev"===t?-1:1)]))return;i=this._getNextScrollPos(r,e)}this.scrollBy(i-this.pos,n)}},e.scrollBy=function(t,e){this.axes.setBy({scroll:-t},e=void 0===e?0:e)},e.scrollTo=function(t,e){this.axes.setBy({scroll:this.pos-t},e=void 0===e?0:e)},e.setItems=function(t){this.items=t},e.updateItems=function(){var e=this,t=this.scrollAreaElement,n=this.options.itemSelector,n=[].slice.call(n?t.querySelectorAll(n):t.children);this.setItems(n.map(function(t){return e._getItem(t)}))},e.updateContainer=function(){var t,e=this.scrollAreaElement,n=this.options.horizontal,i=n?e.clientWidth:e.clientHeight,r=n?e.scrollWidth:e.scrollHeight;Re&&r===i+1&&(t=n?e.offsetWidth:e.offsetHeight,e=e.getBoundingClientRect(),t<(n=n?e.width:e.height)&&n<t+1&&(r=i)),this.size=i,this.scrollSize=r,this._refreshScroll(),this._onScroll()},e.init=function(){var t,n,e,i,r,o=this;this.axes||(Ye(i=this._scrollArea)?t=document.querySelector(i):i instanceof Element?t=i:("value"in i||"current"in i)&&(t=i.value||i.current),this.scrollAreaElement=t,n=!1,e=this.scrollAreaElement,i=new ge({scroll:{circular:!0,range:[-1e3,1e3]}},{deceleration:.005,round:1}),r=!1,i.on({hold:function(t){n=!(r=!0);var e,t=t.inputEvent.srcEvent;t&&((e=o.options).preventDefault&&t.preventDefault(),e.preventClickOnDrag&&o._disableClick())},change:function(t){t.inputEvent&&!r||(o._isDragScroll=!!t.inputEvent,o._isAnimation=!!r,n=!0,t=t.delta.scroll,o.options.horizontal?e.scrollLeft-=t:e.scrollTop-=t)},release:function(t){n||(t.setTo(u({},t.depaPos),0),o._enableClick()),n=!1}}),this.axes=i,this.options.useDrag&&i.connect(this.options.horizontal?["scroll",""]:["","scroll"],new xe(e,{inputType:["mouse"],hammerManagerOptions:{touchAction:"auto"}})),e.addEventListener("scroll",this._onScroll),window.addEventListener("resize",this.update),this.update())},e.destroy=function(){var t;null!==(t=this.axes)&&void 0!==t&&t.destroy(),this.unsubscribe(),null!==(t=this.scrollAreaElement)&&void 0!==t&&t.removeEventListener("scroll",this._onScroll),window.removeEventListener("resize",this.update),this.off()},e._refreshScroll=function(){var t=this.options.horizontal,e=this.scrollAreaElement;this.pos=Math.min(this.scrollSize-this.size,t?e.scrollLeft:e.scrollTop)},e._getItem=function(t){var e=this.options.horizontal;return{element:t,pos:e?t.offsetLeft:t.offsetTop,size:e?t.offsetWidth:t.offsetHeight}},e._getNextScrollPos=function(t,e){var n=this.size,i=e.align||"start",e=e.offset||0,r=t.pos,t=t.size,o=0;return"start"===i?o=r-e:"end"===i?o=r+t-n+e:"center"===i&&(o=r+t/2-n/2+e),o},e._enableClick=function(){window.removeEventListener("click",this._onPreventClick,!0)},e._disableClick=function(){window.addEventListener("click",this._onPreventClick,!0)},e._debounceScroll=function(){var t=this;this._scrollTimer||this.trigger("beginScroll"),window.clearTimeout(this._scrollTimer),this._scrollTimer=window.setTimeout(function(){t._scrollTimer=0,t.trigger("finishScroll",{isDragScroll:t._isDragScroll,isTrusted:t._isDragScroll||!t._isAnimation}),t._isDragScroll=!1,t._isAnimation=!1},this.options.scrollDebounce)},c([ke("isReachStart")],r.prototype,"_isReachStart",void 0),c([ke("isReachEnd")],r.prototype,"_isReachEnd",void 0),c([He],r)}(Ae),e=["update","findElement","findItem","scrollBy","scrollTo","scrollIntoView","setItems","updateContainer","updateItems","init"],n=["reachStart","reachEnd","leaveStart","leaveEnd","beginScroll","finishScroll"],Ve={isReachStart:!1,isReachEnd:!1},Le={__proto__:null,default:Fe,CONVEYER_METHODS:e,CONVEYER_EVENTS:n,CONVEYER_REACTIVE_STATE:Ve,REACTIVE_CONVEYER:{state:Ve,methods:e,events:n,instance:function(t){return new Fe(t.container,u(u({},t.props),{autoInit:!1}))},init:function(t,e){!1!==e.props.autoInit&&t.init()},on:function(t,e,n){t.on(e,n)},off:function(t,e,n){t.off(e,n)},destroy:function(t){t.destroy()}},withReactiveMethods:function(r,t){var e={};return t.forEach(function(i){e[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.current||r.value;return n[i].apply(n,t)}}),e},getObservers:Me,getObserver:je,Reactive:ke,ReactiveSubscribe:He,Observer:Ce,withClassMethods:function(e){return function(t,r){e.forEach(function(i){i in t||(t[i]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(n=this[r])[i].apply(n,t);return n===this[r]?this:n})})}},keys:ze,camelize:function(t){return t.replace(/[\s-_]([a-z])/g,function(t,e){return e.toUpperCase()})}};for(Xe in Le)Fe[Xe]=Le[Xe];return Fe});
//# sourceMappingURL=conveyer.min.js.map
{
"name": "@egjs/conveyer",
"version": "1.0.2-beta.0",
"version": "1.0.2-beta.1",
"description": "Conveyer adds Drag gestures to your Native Scroll.",

@@ -65,2 +65,3 @@ "main": "./dist/conveyer.cjs.js",

"@types/mocha": "^5.2.6",
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^3.9.1",

@@ -86,2 +87,3 @@ "@typescript-eslint/parser": "^3.9.1",

"sinon": "^7.5.0",
"ts-mock-imports": "^1.3.8",
"tslib": "^2.3.1",

@@ -88,0 +90,0 @@ "typescript": "^4.3.5"

@@ -32,1 +32,2 @@ /**

} as const;

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

import Component from "@egjs/component";
import { IS_IE } from "./browser";
import { ReactiveSubscribe, Reactive, Ref } from "./cfcs";

@@ -304,10 +305,10 @@ import {

// check 0.5px
if (scrollSize === size + 1) {
// check decimal point
if (IS_IE && scrollSize === size + 1) {
const offsetSize = horizontal ? scrollAreaElement.offsetWidth : scrollAreaElement.offsetHeight;
const rect = scrollAreaElement.getBoundingClientRect();
const boundingSize = horizontal ? rect.width : rect.height;
// maybe transform: none;
// 0 < 0.5 && 0.5 < 1
if (size < boundingSize && boundingSize < scrollSize) {
if (offsetSize < boundingSize && boundingSize < offsetSize + 1) {
scrollSize = size;

@@ -314,0 +315,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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