UNPKG

img-viewer-react

Version:

image viewer for react

47 lines (43 loc) 154 kB
(function(et,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],E):(et=typeof globalThis<"u"?globalThis:et||self,E(et["image-viewer-react"]={},et.React,et.ReactDOM))})(this,function(et,E,we){"use strict";var Jt={exports:{}},Mt={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var xe;function co(){if(xe)return Mt;xe=1;var r=E,t=Symbol.for("react.element"),e=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function n(a,c,l){var u,p={},g=null,y=null;l!==void 0&&(g=""+l),c.key!==void 0&&(g=""+c.key),c.ref!==void 0&&(y=c.ref);for(u in c)o.call(c,u)&&!s.hasOwnProperty(u)&&(p[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)p[u]===void 0&&(p[u]=c[u]);return{$$typeof:t,type:a,key:g,ref:y,props:p,_owner:i.current}}return Mt.Fragment=e,Mt.jsx=n,Mt.jsxs=n,Mt}var Yt={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ee;function uo(){return Ee||(Ee=1,process.env.NODE_ENV!=="production"&&function(){var r=E,t=Symbol.for("react.element"),e=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),n=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),m=Symbol.iterator,A="@@iterator";function x(h){if(h===null||typeof h!="object")return null;var f=m&&h[m]||h[A];return typeof f=="function"?f:null}var V=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(h){{for(var f=arguments.length,v=new Array(f>1?f-1:0),T=1;T<f;T++)v[T-1]=arguments[T];ct("error",h,v)}}function ct(h,f,v){{var T=V.ReactDebugCurrentFrame,P=T.getStackAddendum();P!==""&&(f+="%s",v=v.concat([P]));var w=v.map(function(b){return String(b)});w.unshift("Warning: "+f),Function.prototype.apply.call(console[h],console,w)}}var Xt=!1,_e=!1,fe=!1,de=!1,Z=!1,Bt;Bt=Symbol.for("react.module.reference");function K(h){return!!(typeof h=="string"||typeof h=="function"||h===o||h===s||Z||h===i||h===l||h===u||de||h===y||Xt||_e||fe||typeof h=="object"&&h!==null&&(h.$$typeof===g||h.$$typeof===p||h.$$typeof===n||h.$$typeof===a||h.$$typeof===c||h.$$typeof===Bt||h.getModuleId!==void 0))}function ve(h,f,v){var T=h.displayName;if(T)return T;var P=f.displayName||f.name||"";return P!==""?v+"("+P+")":v}function Dt(h){return h.displayName||"Context"}function J(h){if(h==null)return null;if(typeof h.tag=="number"&&Y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case o:return"Fragment";case e:return"Portal";case s:return"Profiler";case i:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case a:var f=h;return Dt(f)+".Consumer";case n:var v=h;return Dt(v._context)+".Provider";case c:return ve(h,h.render,"ForwardRef");case p:var T=h.displayName||null;return T!==null?T:J(h.type)||"Memo";case g:{var P=h,w=P._payload,b=P._init;try{return J(b(w))}catch{return null}}}return null}var it=Object.assign,ut=0,Zt,pt,Kt,Ct,Gt,$,ft;function dt(){}dt.__reactDisabledLog=!0;function ge(){{if(ut===0){Zt=console.log,pt=console.info,Kt=console.warn,Ct=console.error,Gt=console.group,$=console.groupCollapsed,ft=console.groupEnd;var h={configurable:!0,enumerable:!0,value:dt,writable:!0};Object.defineProperties(console,{info:h,log:h,warn:h,error:h,group:h,groupCollapsed:h,groupEnd:h})}ut++}}function X(){{if(ut--,ut===0){var h={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:it({},h,{value:Zt}),info:it({},h,{value:pt}),warn:it({},h,{value:Kt}),error:it({},h,{value:Ct}),group:it({},h,{value:Gt}),groupCollapsed:it({},h,{value:$}),groupEnd:it({},h,{value:ft})})}ut<0&&Y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var tt=V.ReactCurrentDispatcher,Pt;function vt(h,f,v){{if(Pt===void 0)try{throw Error()}catch(P){var T=P.stack.trim().match(/\n( *(at )?)/);Pt=T&&T[1]||""}return` `+Pt+h}}var gt=!1,wt;{var ye=typeof WeakMap=="function"?WeakMap:Map;wt=new ye}function qt(h,f){if(!h||gt)return"";{var v=wt.get(h);if(v!==void 0)return v}var T;gt=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var w;w=tt.current,tt.current=null,ge();try{if(f){var b=function(){throw Error()};if(Object.defineProperty(b.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(b,[])}catch(j){T=j}Reflect.construct(h,[],b)}else{try{b.call()}catch(j){T=j}h.call(b.prototype)}}else{try{throw Error()}catch(j){T=j}h()}}catch(j){if(j&&T&&typeof j.stack=="string"){for(var S=j.stack.split(` `),L=T.stack.split(` `),B=S.length-1,I=L.length-1;B>=1&&I>=0&&S[B]!==L[I];)I--;for(;B>=1&&I>=0;B--,I--)if(S[B]!==L[I]){if(B!==1||I!==1)do if(B--,I--,I<0||S[B]!==L[I]){var G=` `+S[B].replace(" at new "," at ");return h.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",h.displayName)),typeof h=="function"&&wt.set(h,G),G}while(B>=1&&I>=0);break}}}finally{gt=!1,tt.current=w,X(),Error.prepareStackTrace=P}var Et=h?h.displayName||h.name:"",mt=Et?vt(Et):"";return typeof h=="function"&&wt.set(h,mt),mt}function me(h,f,v){return qt(h,!1)}function Te(h){var f=h.prototype;return!!(f&&f.isReactComponent)}function yt(h,f,v){if(h==null)return"";if(typeof h=="function")return qt(h,Te(h));if(typeof h=="string")return vt(h);switch(h){case l:return vt("Suspense");case u:return vt("SuspenseList")}if(typeof h=="object")switch(h.$$typeof){case c:return me(h.render);case p:return yt(h.type,f,v);case g:{var T=h,P=T._payload,w=T._init;try{return yt(w(P),f,v)}catch{}}}return""}var at=Object.prototype.hasOwnProperty,d={},k=V.ReactDebugCurrentFrame;function O(h){if(h){var f=h._owner,v=yt(h.type,h._source,f?f.type:null);k.setExtraStackFrame(v)}else k.setExtraStackFrame(null)}function H(h,f,v,T,P){{var w=Function.call.bind(at);for(var b in h)if(w(h,b)){var S=void 0;try{if(typeof h[b]!="function"){var L=Error((T||"React class")+": "+v+" type `"+b+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[b]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L.name="Invariant Violation",L}S=h[b](f,b,T,v,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(B){S=B}S&&!(S instanceof Error)&&(O(P),Y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",v,b,typeof S),O(null)),S instanceof Error&&!(S.message in d)&&(d[S.message]=!0,O(P),Y("Failed %s type: %s",v,S.message),O(null))}}}var W=Array.isArray;function R(h){return W(h)}function Qt(h){{var f=typeof Symbol=="function"&&Symbol.toStringTag,v=f&&h[Symbol.toStringTag]||h.constructor.name||"Object";return v}}function _t(h){try{return Je(h),!1}catch{return!0}}function Je(h){return""+h}function $e(h){if(_t(h))return Y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qt(h)),Je(h)}var to=V.ReactCurrentOwner,li={key:!0,ref:!0,__self:!0,__source:!0},eo,oo;function hi(h){if(at.call(h,"ref")){var f=Object.getOwnPropertyDescriptor(h,"ref").get;if(f&&f.isReactWarning)return!1}return h.ref!==void 0}function ci(h){if(at.call(h,"key")){var f=Object.getOwnPropertyDescriptor(h,"key").get;if(f&&f.isReactWarning)return!1}return h.key!==void 0}function ui(h,f){typeof h.ref=="string"&&to.current}function pi(h,f){{var v=function(){eo||(eo=!0,Y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};v.isReactWarning=!0,Object.defineProperty(h,"key",{get:v,configurable:!0})}}function fi(h,f){{var v=function(){oo||(oo=!0,Y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",f))};v.isReactWarning=!0,Object.defineProperty(h,"ref",{get:v,configurable:!0})}}var di=function(h,f,v,T,P,w,b){var S={$$typeof:t,type:h,key:f,ref:v,props:b,_owner:w};return S._store={},Object.defineProperty(S._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(S,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(S,"_source",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.freeze&&(Object.freeze(S.props),Object.freeze(S)),S};function vi(h,f,v,T,P){{var w,b={},S=null,L=null;v!==void 0&&($e(v),S=""+v),ci(f)&&($e(f.key),S=""+f.key),hi(f)&&(L=f.ref,ui(f,P));for(w in f)at.call(f,w)&&!li.hasOwnProperty(w)&&(b[w]=f[w]);if(h&&h.defaultProps){var B=h.defaultProps;for(w in B)b[w]===void 0&&(b[w]=B[w])}if(S||L){var I=typeof h=="function"?h.displayName||h.name||"Unknown":h;S&&pi(b,I),L&&fi(b,I)}return di(h,S,L,P,T,to.current,b)}}var ke=V.ReactCurrentOwner,ro=V.ReactDebugCurrentFrame;function xt(h){if(h){var f=h._owner,v=yt(h.type,h._source,f?f.type:null);ro.setExtraStackFrame(v)}else ro.setExtraStackFrame(null)}var Se;Se=!1;function be(h){return typeof h=="object"&&h!==null&&h.$$typeof===t}function io(){{if(ke.current){var h=J(ke.current.type);if(h)return` Check the render method of \``+h+"`."}return""}}function gi(h){return""}var so={};function yi(h){{var f=io();if(!f){var v=typeof h=="string"?h:h.displayName||h.name;v&&(f=` Check the top-level render call using <`+v+">.")}return f}}function no(h,f){{if(!h._store||h._store.validated||h.key!=null)return;h._store.validated=!0;var v=yi(f);if(so[v])return;so[v]=!0;var T="";h&&h._owner&&h._owner!==ke.current&&(T=" It was passed a child from "+J(h._owner.type)+"."),xt(h),Y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',v,T),xt(null)}}function ao(h,f){{if(typeof h!="object")return;if(R(h))for(var v=0;v<h.length;v++){var T=h[v];be(T)&&no(T,f)}else if(be(h))h._store&&(h._store.validated=!0);else if(h){var P=x(h);if(typeof P=="function"&&P!==h.entries)for(var w=P.call(h),b;!(b=w.next()).done;)be(b.value)&&no(b.value,f)}}}function mi(h){{var f=h.type;if(f==null||typeof f=="string")return;var v;if(typeof f=="function")v=f.propTypes;else if(typeof f=="object"&&(f.$$typeof===c||f.$$typeof===p))v=f.propTypes;else return;if(v){var T=J(f);H(v,h.props,"prop",T,h)}else if(f.PropTypes!==void 0&&!Se){Se=!0;var P=J(f);Y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof f.getDefaultProps=="function"&&!f.getDefaultProps.isReactClassApproved&&Y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ti(h){{for(var f=Object.keys(h.props),v=0;v<f.length;v++){var T=f[v];if(T!=="children"&&T!=="key"){xt(h),Y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),xt(null);break}}h.ref!==null&&(xt(h),Y("Invalid attribute `ref` supplied to `React.Fragment`."),xt(null))}}var lo={};function ho(h,f,v,T,P,w){{var b=K(h);if(!b){var S="";(h===void 0||typeof h=="object"&&h!==null&&Object.keys(h).length===0)&&(S+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var L=gi();L?S+=L:S+=io();var B;h===null?B="null":R(h)?B="array":h!==void 0&&h.$$typeof===t?(B="<"+(J(h.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):B=typeof h,Y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",B,S)}var I=vi(h,f,v,P,w);if(I==null)return I;if(b){var G=f.children;if(G!==void 0)if(T)if(R(G)){for(var Et=0;Et<G.length;Et++)ao(G[Et],h);Object.freeze&&Object.freeze(G)}else Y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ao(G,h)}if(at.call(f,"key")){var mt=J(h),j=Object.keys(f).filter(function(xi){return xi!=="key"}),Pe=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!lo[mt+Pe]){var wi=j.length>0?"{"+j.join(": ..., ")+": ...}":"{}";Y(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,Pe,mt,wi,mt),lo[mt+Pe]=!0}}return h===o?Ti(I):mi(I),I}}function ki(h,f,v){return ho(h,f,v,!0)}function Si(h,f,v){return ho(h,f,v,!1)}var bi=Si,Pi=ki;Yt.Fragment=o,Yt.jsx=bi,Yt.jsxs=Pi}()),Yt}process.env.NODE_ENV==="production"?Jt.exports=co():Jt.exports=uo();var D=Jt.exports;/*! * better-scroll / better-scroll * (c) 2016-2023 ustbhuangyi * Released under the MIT License. *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var $t=function(r,t){return $t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])},$t(r,t)};function Ot(r,t){$t(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var q=function(){return q=Object.assign||function(t){for(var e,o=1,i=arguments.length;o<i;o++){e=arguments[o];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}return t},q.apply(this,arguments)};function te(r,t,e,o){function i(s){return s instanceof e?s:new e(function(n){n(s)})}return new(e||(e=Promise))(function(s,n){function a(u){try{l(o.next(u))}catch(p){n(p)}}function c(u){try{l(o.throw(u))}catch(p){n(p)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((o=o.apply(r,[])).next())})}function ee(r,t){var e={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,i,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(l){return function(u){return c([l,u])}}function c(l){if(o)throw new TypeError("Generator is already executing.");for(;e;)try{if(o=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,i=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(s=e.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){e.label=l[1];break}if(l[0]===6&&e.label<s[1]){e.label=s[1],s=l;break}if(s&&e.label<s[2]){e.label=s[2],e.ops.push(l);break}s[2]&&e.ops.pop(),e.trys.pop();continue}l=t.call(r,e)}catch(u){l=[6,u],i=0}finally{o=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Ht(){for(var r=0,t=0,e=arguments.length;t<e;t++)r+=arguments[t].length;for(var o=Array(r),i=0,t=0;t<e;t++)for(var s=arguments[t],n=0,a=s.length;n<a;n++,i++)o[i]=s[n];return o}var po=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function Q(r){console.error("[BScroll warn]: "+r)}function Me(r,t){if(!r)throw new Error("[BScroll] "+t)}var _=typeof window<"u",Tt=_&&navigator.userAgent.toLowerCase(),fo=!!(Tt&&/wechatdevtools/.test(Tt)),vo=Tt&&Tt.indexOf("android")>0,go=function(){if(typeof Tt=="string"){var r=/os (\d\d?_\d(_\d)?)/,t=r.exec(Tt);if(!t)return!1;var e=t[1].split("_").map(function(o){return parseInt(o,10)});return e[0]===13&&e[1]>=4}return!1}(),Ye=!1;if(_){var yo="test-passive";try{var Xe={};Object.defineProperty(Xe,"passive",{get:function(){Ye=!0}}),window.addEventListener(yo,function(){},Xe)}catch{}}function U(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var z=function(r,t){for(var e in t)r[e]=t[e];return r};function oe(r){return r==null}function mo(r,t){return Math.sqrt(r*r+t*t)}function C(r,t,e){return r<t?t:r>e?e:r}function kt(r,t){if(r.findIndex)return r.findIndex(t);var e=-1;return r.some(function(o,i,s){var n=t(o,i,s);if(n)return e=i,n}),e}var re=_&&document.createElement("div").style,St=function(){if(!_)return!1;for(var r=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}],t=0,e=r;t<e.length;t++){var o=e[t];if(re[o.value]!==void 0)return o.key}return!1}();function ot(r){return St===!1?r:St==="standard"?r==="transitionEnd"?"transitionend":r:St+r.charAt(0).toUpperCase()+r.substr(1)}function Be(r){return typeof r=="string"?document.querySelector(r):r}function To(r,t,e,o){var i=Ye?{passive:!1,capture:!!o}:!!o;r.addEventListener(t,e,i)}function ko(r,t,e,o){r.removeEventListener(t,e,{capture:!!o})}function lt(r){r.cancelable&&r.preventDefault()}function De(r){for(var t=0,e=0;r;)t-=r.offsetLeft,e-=r.offsetTop,r=r.offsetParent;return{left:t,top:e}}function So(r){var t=r.getBoundingClientRect();return{left:-(t.left+window.pageXOffset),top:-(t.top+window.pageYOffset)}}var bo=St&&St!=="standard"?"-"+St.toLowerCase()+"-":"",Po=ot("transform"),Ce=ot("transition"),wo=_&&ot("perspective")in re,Oe=_&&("ontouchstart"in window||fo),xo=_&&Ce in re,M={transform:Po,transition:Ce,transitionTimingFunction:ot("transitionTimingFunction"),transitionDuration:ot("transitionDuration"),transitionDelay:ot("transitionDelay"),transformOrigin:ot("transformOrigin"),transitionEnd:ot("transitionEnd"),transitionProperty:ot("transitionProperty")},ie={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function ht(r){if(r instanceof window.SVGElement){var t=r.getBoundingClientRect();return{top:t.top,left:t.left,width:t.width,height:t.height}}else return{top:r.offsetTop,left:r.offsetLeft,width:r.offsetWidth,height:r.offsetHeight}}function bt(r,t){for(var e in t)if(t[e].test(r[e]))return!0;return!1}var Eo=bt;function Mo(r,t){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.pageX=r.pageX,e.pageY=r.pageY,r.target.dispatchEvent(e)}function He(r,t){t===void 0&&(t="click");var e;r.type==="mouseup"?e=r:(r.type==="touchend"||r.type==="touchcancel")&&(e=r.changedTouches[0]);var o={};e&&(o.screenX=e.screenX||0,o.screenY=e.screenY||0,o.clientX=e.clientX||0,o.clientY=e.clientY||0);var i,s=!0,n=!0,a=r.ctrlKey,c=r.shiftKey,l=r.altKey,u=r.metaKey,p={ctrlKey:a,shiftKey:c,altKey:l,metaKey:u};if(typeof MouseEvent<"u")try{i=new MouseEvent(t,z(q({bubbles:s,cancelable:n},p),o))}catch{g()}else g();function g(){i=document.createEvent("Event"),i.initEvent(t,s,n),z(i,o)}i.forwardedTouchEvent=!0,i._constructed=!0,r.target.dispatchEvent(i)}function Yo(r){He(r,"dblclick")}function Xo(r,t){var e=t.firstChild;e?Bo(r,e):t.appendChild(r)}function Bo(r,t){var e=t.parentNode;e.insertBefore(r,t)}function Do(r,t){r.removeChild(t)}function Rt(r,t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return e.test(r.className)}function Co(r){return Array.prototype.slice.call(r,0)}function Oo(r){return{width:r.clientWidth,height:r.clientHeight}}var F={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(r){return 1+--r*r*r*r*r}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(r){return r*(2-r)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(r){return 1- --r*r*r*r}}},Ho=1e3/60,st=_&&window;function Re(){}var se=function(){return _?st.requestAnimationFrame||st.webkitRequestAnimationFrame||st.mozRequestAnimationFrame||st.oRequestAnimationFrame||function(r){return window.setTimeout(r,r.interval||Ho)}:Re}(),nt=function(){return _?st.cancelAnimationFrame||st.webkitCancelAnimationFrame||st.mozCancelAnimationFrame||st.oCancelAnimationFrame||function(r){window.clearTimeout(r)}:Re}(),Ie=function(r){},ne={enumerable:!0,configurable:!0,get:Ie,set:Ie},Ro=function(r,t){for(var e=t.split("."),o=0;o<e.length-1;o++)if(r=r[e[o]],typeof r!="object"||!r)return;var i=e.pop();return typeof r[i]=="function"?function(){return r[i].apply(r,arguments)}:r[i]},Io=function(r,t,e){for(var o=t.split("."),i,s=0;s<o.length-1;s++)i=o[s],r[i]||(r[i]={}),r=r[i];r[o.pop()]=e};function Ao(r,t,e){ne.get=function(){return Ro(this,t)},ne.set=function(i){Io(this,t,i)},Object.defineProperty(r,e,ne)}var rt=function(){function r(t){this.events={},this.eventTypes={},this.registerType(t)}return r.prototype.on=function(t,e,o){return o===void 0&&(o=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([e,o]),this},r.prototype.once=function(t,e,o){var i=this;o===void 0&&(o=this),this.hasType(t);var s=function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];i.off(t,s);var c=e.apply(o,n);if(c===!0)return c};return s.fn=e,this.on(t,s),this},r.prototype.off=function(t,e){if(!t&&!e)return this.events={},this;if(t){if(this.hasType(t),!e)return this.events[t]=[],this;var o=this.events[t];if(!o)return this;for(var i=o.length;i--;)(o[i][0]===e||o[i][0]&&o[i][0].fn===e)&&o.splice(i,1);return this}},r.prototype.trigger=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];this.hasType(t);var i=this.events[t];if(i)for(var s=i.length,n=Ht(i),a,c=0;c<s;c++){var l=n[c],u=l[0],p=l[1];if(u&&(a=u.apply(p,e),a===!0))return a}},r.prototype.registerType=function(t){var e=this;t.forEach(function(o){e.eventTypes[o]=o})},r.prototype.destroy=function(){this.events={},this.eventTypes={}},r.prototype.hasType=function(t){var e=this.eventTypes,o=e[t]===t;o||Q('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+(""+Object.keys(e).map(function(i){return JSON.stringify(i)}))+"]")},r}(),N=function(){function r(t,e){this.wrapper=t,this.events=e,this.addDOMEvents()}return r.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},r.prototype.addDOMEvents=function(){this.handleDOMEvents(To)},r.prototype.removeDOMEvents=function(){this.handleDOMEvents(ko)},r.prototype.handleDOMEvents=function(t){var e=this,o=this.wrapper;this.events.forEach(function(i){t(o,i.name,e,!!i.capture)})},r.prototype.handleEvent=function(t){var e=t.type;this.events.some(function(o){return o.name===e?(o.handler(t),!0):!1})},r}(),Fo=function(){function r(){}return r}(),zo=function(r){Ot(t,r);function t(){var e=r.call(this)||this;return e.startX=0,e.startY=0,e.scrollX=!1,e.scrollY=!0,e.freeScroll=!1,e.directionLockThreshold=0,e.eventPassthrough="",e.click=!1,e.dblclick=!1,e.tap="",e.bounce={top:!0,bottom:!0,left:!0,right:!0},e.bounceTime=800,e.momentum=!0,e.momentumLimitTime=300,e.momentumLimitDistance=15,e.swipeTime=2500,e.swipeBounceTime=500,e.deceleration=.0015,e.flickLimitTime=200,e.flickLimitDistance=100,e.resizePolling=60,e.probeType=0,e.stopPropagation=!1,e.preventDefault=!0,e.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},e.tagException={tagName:/^TEXTAREA$/},e.HWCompositing=!0,e.useTransition=!0,e.bindToWrapper=!1,e.bindToTarget=!1,e.disableMouse=Oe,e.disableTouch=!Oe,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=1,e}return t.prototype.merge=function(e){if(!e)return this;for(var o in e){if(o==="bounce"){this.bounce=this.resolveBounce(e[o]);continue}this[o]=e[o]}return this},t.prototype.process=function(){return this.translateZ=this.HWCompositing&&wo?" translateZ(1px)":"",this.useTransition=this.useTransition&&xo,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX=this.eventPassthrough==="horizontal"?!1:this.scrollX,this.scrollY=this.eventPassthrough==="vertical"?!1:this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=this.freeScroll?!0:this.scrollX,this.scrollY=this.freeScroll?!0:this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},t.prototype.resolveBounce=function(e){var o={top:!0,right:!0,bottom:!0,left:!0},i={top:!1,right:!1,bottom:!1,left:!1},s;return typeof e=="object"?s=z(o,e):s=e?o:i,s},t}(Fo),Lo=function(){function r(t,e){this.wrapper=t,this.options=e,this.hooks=new rt(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return r.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,o=t.disableMouse,i=t.disableTouch,s=t.click,n=this.wrapper,a=e?n:window,c=[],l=[],u=!i,p=!o;s&&c.push({name:"click",handler:this.click.bind(this),capture:!0}),u&&(c.push({name:"touchstart",handler:this.start.bind(this)}),l.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),p&&(c.push({name:"mousedown",handler:this.start.bind(this)}),l.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new N(n,c),this.targetEventRegister=new N(a,l)},r.prototype.beforeHandler=function(t,e){var o=this.options,i=o.preventDefault,s=o.stopPropagation,n=o.preventDefaultException,a={start:function(){return i&&!bt(t.target,n)},end:function(){return i&&!bt(t.target,n)},move:function(){return i}};a[e]()&&t.preventDefault(),s&&t.stopPropagation()},r.prototype.setInitiated=function(t){t===void 0&&(t=0),this.initiated=t},r.prototype.start=function(t){var e=ie[t.type];if(!(this.initiated&&this.initiated!==e)){if(this.setInitiated(e),Eo(t.target,this.options.tagException)){this.setInitiated();return}if(!(e===2&&t.button!==0)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var o=t.touches?t.touches[0]:t;this.pointX=o.pageX,this.pointY=o.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}}},r.prototype.move=function(t){if(ie[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,o=e.pageX-this.pointX,i=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:o,deltaY:i,e:t})){var s=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,n=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,a=this.pointX-s,c=this.pointY-n,l=this.options.autoEndDistance;(a>document.documentElement.clientWidth-l||c>document.documentElement.clientHeight-l||a<l||c<l)&&this.end(t)}}},r.prototype.end=function(t){ie[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},r.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},r.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},r.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},r.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},r}(),ae={x:["translateX","px"],y:["translateY","px"]},No=function(){function r(t){this.setContent(t),this.hooks=new rt(["beforeTranslate","translate"])}return r.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null),e=t[M.transform].split(")")[0].split(", "),o=+(e[12]||e[4])||0,i=+(e[13]||e[5])||0;return{x:o,y:i}},r.prototype.translate=function(t){var e=[];Object.keys(t).forEach(function(o){if(ae[o]){var i=ae[o][0];if(i){var s=ae[o][1],n=t[o];e.push(i+"("+n+s+")")}}}),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[M.transform]=e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},r.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},r.prototype.destroy=function(){this.hooks.destroy()},r}(),Ae=function(){function r(t,e,o){this.translater=e,this.options=o,this.timer=0,this.hooks=new rt(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return r.prototype.translate=function(t){this.translater.translate(t)},r.prototype.setPending=function(t){this.pending=t},r.prototype.setForceStopped=function(t){this.forceStopped=t},r.prototype.setCallStop=function(t){this.callStopWhenPending=t},r.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},r.prototype.clearTimer=function(){this.timer&&(nt(this.timer),this.timer=0)},r.prototype.destroy=function(){this.hooks.destroy(),nt(this.timer)},r}(),Wo=function(r,t,e,o){var i=function(l,u){var p=l-u,g=p>0?-1:p<0?1:0;return g},s=i(t.x,r.x),n=i(t.y,r.y),a=e.x-o.x,c=e.y-o.y;return s*a<=0&&n*c<=0},jo=function(r){Ot(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.startProbe=function(e,o){var i=this,s=e,n=function(){var a=i.translater.getComputedPosition();Wo(e,o,a,s)&&i.hooks.trigger(i.hooks.eventTypes.move,a),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,a)),s=a,i.pending&&(i.timer=se(n))};this.callStopWhenPending&&this.setCallStop(!1),nt(this.timer),n()},t.prototype.transitionTime=function(e){e===void 0&&(e=0),this.style[M.transitionDuration]=e+"ms",this.hooks.trigger(this.hooks.eventTypes.time,e)},t.prototype.transitionTimingFunction=function(e){this.style[M.transitionTimingFunction]=e,this.hooks.trigger(this.hooks.eventTypes.timeFunction,e)},t.prototype.transitionProperty=function(){this.style[M.transitionProperty]=M.transform},t.prototype.move=function(e,o,i,s){this.setPending(i>0),this.transitionTimingFunction(s),this.transitionProperty(),this.transitionTime(i),this.translate(o);var n=this.options.probeType===3;i&&n&&this.startProbe(e,o),i||(this._reflow=this.content.offsetHeight,n&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o))},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),nt(this.timer);var o=this.translater.getComputedPosition(),i=o.x,s=o.y;this.transitionTime(),this.translate({x:i,y:s}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:i,y:s})}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(Ae),Uo=function(r){Ot(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.move=function(e,o,i,s){if(!i){this.translate(o),this.options.probeType===3&&this.hooks.trigger(this.hooks.eventTypes.move,o),this.hooks.trigger(this.hooks.eventTypes.end,o);return}this.animate(e,o,i,s)},t.prototype.animate=function(e,o,i,s){var n=this,a=U(),c=a+i,l=this.options.probeType===3,u=function(){var p=U();if(p>=c){n.translate(o),l&&n.hooks.trigger(n.hooks.eventTypes.move,o),n.hooks.trigger(n.hooks.eventTypes.end,o);return}p=(p-a)/i;var g=s(p),y={};Object.keys(o).forEach(function(m){var A=e[m],x=o[m];y[m]=(x-A)*g+A}),n.translate(y),l&&n.hooks.trigger(n.hooks.eventTypes.move,y),n.pending&&(n.timer=se(u)),n.pending||(n.callStopWhenPending?n.callStopWhenPending=!1:n.hooks.trigger(n.hooks.eventTypes.end,o))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),nt(this.timer),u()},t.prototype.doStop=function(){var e=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),e){this.setPending(!1),nt(this.timer);var o=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,o)}return e},t.prototype.stop=function(){var e=this.doStop();e&&this.hooks.trigger(this.hooks.eventTypes.callStop)},t}(Ae);function Vo(r,t,e){var o=e.useTransition,i={};return Object.defineProperty(i,"probeType",{enumerable:!0,configurable:!1,get:function(){return e.probeType}}),o?new jo(r,t,i):new Uo(r,t,i)}var Fe=function(){function r(t,e,o){this.wrapper=t,this.options=o,this.hooks=new rt(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return r.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},r.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},r.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},r.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},r.prototype.performDampingAlgorithm=function(t,e){var o=this.currentPos+t;return(o>this.minScrollPos||o<this.maxScrollPos)&&(o>this.minScrollPos&&this.options.bounces[0]||o<this.maxScrollPos&&this.options.bounces[1]?o=this.currentPos+t*e:o=o>this.minScrollPos?this.minScrollPos:this.maxScrollPos),o},r.prototype.end=function(t){var e={duration:0},o=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&o>this.options.momentumLimitDistance){var i=this.direction===-1&&this.options.bounces[0]||this.direction===1&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,i,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},r.prototype.momentum=function(t,e,o,i,s,n,a){a===void 0&&(a=this.options);var c=t-e,l=Math.abs(c)/o,u=a.deceleration,p=a.swipeBounceTime,g=a.swipeTime,y=Math.min(g,l*2/u),m={destination:t+l*l/u*(c<0?-1:1),duration:y,rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,m,c),m.destination<i?(m.destination=n?Math.max(i-n/4,i-n/m.rate*l):i,m.duration=p):m.destination>s&&(m.destination=n?Math.min(s+n/4,s+n/m.rate*l):s,m.duration=p),m.destination=Math.round(m.destination),m},r.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},r.prototype.refresh=function(t){var e=this.options.rect,o=e.size,i=e.position,s=window.getComputedStyle(this.wrapper,null).position==="static",n=ht(this.wrapper);this.wrapperSize=this.wrapper[o==="width"?"clientWidth":"clientHeight"],this.setContent(t);var a=ht(this.content);this.contentSize=a[o],this.relativeOffset=a[i],s&&(this.relativeOffset-=n[i]),this.computeBoundary(),this.setDirection(0)},r.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},r.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},r.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,this.options.specifiedIndexAsContent===0&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},r.prototype.updatePosition=function(t){this.currentPos=t},r.prototype.getCurrentPos=function(){return this.currentPos},r.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos),e=t===this.getCurrentPos();return{position:t,inBoundary:e}},r.prototype.adjustPosition=function(t){return!this.hasScroll&&!this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t=this.minScrollPos:t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos),t},r.prototype.updateStartPos=function(){this.startPos=this.currentPos},r.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},r.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},r.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},r.prototype.destroy=function(){this.hooks.destroy()},r}(),It,At,Ft,zt,ze=(It={},It.yes=function(r){return!0},It.no=function(r){return lt(r),!1},It),Zo=(At={},At.horizontal=(Ft={},Ft.yes="horizontal",Ft.no="vertical",Ft),At.vertical=(zt={},zt.yes="vertical",zt.no="horizontal",zt),At),Ko=function(){function r(t,e,o){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=o,this.reset()}return r.prototype.reset=function(){this.directionLocked=""},r.prototype.checkMovingDirection=function(t,e,o){return this.computeDirectionLock(t,e),this.handleEventPassthrough(o)},r.prototype.adjustDelta=function(t,e){return this.directionLocked==="horizontal"?e=0:this.directionLocked==="vertical"&&(t=0),{deltaX:t,deltaY:e}},r.prototype.computeDirectionLock=function(t,e){this.directionLocked===""&&!this.freeScroll&&(t>e+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},r.prototype.handleEventPassthrough=function(t){var e=Zo[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return ze.yes(t);if(this.eventPassthrough===e.no)return ze.no(t)}return!1},r}(),Go=function(r,t,e){return e===2?[t,-r]:e===3?[-r,-t]:e===4?[-t,r]:[r,t]},qo=function(){function r(t,e,o,i,s){this.hooks=new rt(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=o,this.animater=i,this.options=s,this.directionLockAction=new Ko(s.directionLockThreshold,s.freeScroll,s.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return r.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,function(e){return t.enabled?t.handleStart(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,function(e){var o=e.deltaX,i=e.deltaY,s=e.e;if(!t.enabled)return!0;var n=Go(o,i,t.options.quadrant),a=n[0],c=n[1],l={deltaX:a,deltaY:c};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,l),t.handleMove(l.deltaX,l.deltaY,s)}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,function(e){return t.enabled?t.handleEnd(e):!0}),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,function(e){t.enabled&&!e._constructed&&t.handleClick(e)})},r.prototype.handleStart=function(t){var e=U();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},r.prototype.handleMove=function(t,e,o){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,o)){var i=this.scrollBehaviorX.getAbsDist(t),s=this.scrollBehaviorY.getAbsDist(e),n=U();if(this.checkMomentum(i,s,n))return!0;if(this.directionLockAction.checkMovingDirection(i,s,o))return this.actionsHandler.setInitiated(),!0;var a=this.directionLockAction.adjustDelta(t,e),c=this.scrollBehaviorX.getCurrentPos(),l=this.scrollBehaviorX.move(a.deltaX),u=this.scrollBehaviorY.getCurrentPos(),p=this.scrollBehaviorY.move(a.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var g=l!==c||p!==u;!this.contentMoved&&!g&&this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&g&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&g&&(this.animater.translate({x:l,y:p}),this.dispatchScroll(n))}}},r.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),this.options.probeType===1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},r.prototype.checkMomentum=function(t,e,o){return o-this.endTime>this.options.momentumLimitTime&&e<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},r.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var e=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,e))return!0;e=this.ensureIntegerPos(e),this.animater.translate(e),this.endTime=U();var o=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,e,o)}},r.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var e=t.x,o=t.y,i=this.scrollBehaviorX,s=i.minScrollPos,n=i.maxScrollPos,a=this.scrollBehaviorY,c=a.minScrollPos,l=a.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),o=o>0?Math.ceil(o):Math.floor(o),e=C(e,n,s),o=C(o,l,c),{x:e,y:o}},r.prototype.handleClick=function(t){bt(t.target,this.options.preventDefaultException)||(lt(t),t.stopPropagation())},r.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},r.prototype.refresh=function(){this.endTime=0},r.prototype.destroy=function(){this.hooks.destroy()},r}();function Qo(r){var t=["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce(function(e,o){return e[o]=r[o],e},{});return t}function Le(r,t,e,o){var i=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce(function(s,n){return s[n]=r[n],s},{});return i.scrollable=!!r[t],i.bounces=e,i.rect=o,i}function le(r,t,e){e.forEach(function(o){var i,s;typeof o=="string"?i=s=o:(i=o.source,s=o.target),r.on(i,function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];return t.trigger.apply(t,Ht([s],n))})})}function _o(r,t){for(var e=Object.keys(r),o=0,i=e;o<i.length;o++){var s=i[o];if(r[s]!==t[s])return!1}return!0}var Ne=1,Jo=function(){function r(t,e,o){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new rt(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=o;var i=this.options.bounce,s=i.left,n=i.right,a=i.top,c=i.bottom;this.scrollBehaviorX=new Fe(t,e,Le(o,"scrollX",[s,n],{size:"width",position:"left"})),this.scrollBehaviorY=new Fe(t,e,Le(o,"scrollY",[a,c],{size:"height",position:"top"})),this.translater=new No(this.content),this.animater=Vo(this.content,this.translater,this.options),this.actionsHandler=new Lo(this.options.bindToTarget?this.content:t,Qo(this.options)),this.actions=new qo(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var l=this.resize.bind(this);this.resizeRegister=new N(window,[{name:"orientationchange",handler:l},{name:"resize",handler:l}]),this.registerTransitionEnd(),this.init()}return r.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,function(){t.togglePointerEvents(!0)})},r.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new N(this.content,[{name:M.transitionEnd,handler:this.transitionEnd.bind(this)}])},r.prototype.bindTranslater=function(){var t=this,e=this.translater.hooks;e.on(e.eventTypes.beforeTranslate,function(o){t.options.translateZ&&o.push(t.options.translateZ)}),e.on(e.eventTypes.translate,function(o){var i=t.getCurrentPos();if(t.updatePositions(o),t.actions.ensuringInteger===!0){t.actions.ensuringInteger=!1;return}(o.x!==i.x||o.y!==i.y)&&t.togglePointerEvents(!1)})},r.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,function(e){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,e))}),le(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},r.prototype.bindActions=function(){var t=this,e=this.actions;le(e.hooks,this.hooks,[{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:e.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:e.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:e.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:e.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),e.hooks.on(e.hooks.eventTypes.end,function(o,i){if(t.hooks.trigger(t.hooks.eventTypes.touchEnd,i),t.hooks.trigger(t.hooks.eventTypes.end,i)||!e.fingerMoved&&(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),t.checkClick(o)))return!0;if(t.resetPosition(t.options.bounceTime,F.bounce))return t.animater.setForceStopped(!1),!0}),e.hooks.on(e.hooks.eventTypes.scrollEnd,function(o,i){var s=Math.abs(o.x-t.scrollBehaviorX.startPos),n=Math.abs(o.y-t.scrollBehaviorY.startPos);if(t.checkFlick(i,s,n)){t.animater.setForceStopped(!1),t.hooks.trigger(t.hooks.eventTypes.flick);return}if(t.momentum(o,i)){t.animater.setForceStopped(!1);return}e.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,o),t.animater.forceStopped&&t.animater.setForceStopped(!1)})},r.prototype.checkFlick=function(t,e,o){var i=1;if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&e<this.options.flickLimitDistance&&o<this.options.flickLimitDistance&&(o>i||e>i))return!0},r.prototype.momentum=function(t,e){var o={time:0,easing:F.swiper,newX:t.x,newY:t.y},i=this.scrollBehaviorX.end(e),s=this.scrollBehaviorY.end(e);if(o.newX=oe(i.destination)?o.newX:i.destination,o.newY=oe(s.destination)?o.newY:s.destination,o.time=Math.max(i.duration,s.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,o,this),o.newX!==t.x||o.newY!==t.y)return(o.newX>this.scrollBehaviorX.minScrollPos||o.newX<this.scrollBehaviorX.maxScrollPos||o.newY>this.scrollBehaviorY.minScrollPos||o.newY<this.scrollBehaviorY.maxScrollPos)&&(o.easing=F.swipeBounce),this.scrollTo(o.newX,o.newY,o.time,o.easing),!0},r.prototype.checkClick=function(t){var e={preventClick:this.animater.forceStopped};if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!e.preventClick){var o=this.options.dblclick,i=!1;if(o&&this.lastClickTime){var s=o.delay,n=s===void 0?300:s;U()-this.lastClickTime<n&&(i=!0,Yo(t))}return this.options.tap&&Mo(t,this.options.tap),this.options.click&&!bt(t.target,this.options.preventDefaultException)&&He(t),this.lastClickTime=i?null:U(),!0}return!1},r.prototype.resize=function(){var t=this;this.actions.enabled&&(vo&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout(function(){t.hooks.trigger(t.hooks.eventTypes.resize)},this.options.resizePolling))},r.proto