@egjs/flicking 4.14.0 → 4.14.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flicking.cjs.js +18 -13
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.esm.js +18 -13
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.js +18 -13
- package/dist/flicking.js.map +1 -1
- package/dist/flicking.min.js +2 -2
- package/dist/flicking.min.js.map +1 -1
- package/dist/flicking.pkgd.js +69 -64
- package/dist/flicking.pkgd.js.map +1 -1
- package/dist/flicking.pkgd.min.js +2 -2
- package/dist/flicking.pkgd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/cfc/sync.ts +10 -0
- package/src/control/Control.ts +3 -1
|
@@ -4,7 +4,7 @@ name: @egjs/flicking
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-flicking
|
|
7
|
-
version: 4.14.
|
|
7
|
+
version: 4.14.1-beta.3
|
|
8
8
|
*/
|
|
9
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n()}(this,(function(){"use strict";var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};function n(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var t=function(){return t=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},t.apply(this,arguments)};function i(e,n,t,i){return new(t||(t=Promise))((function(r,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}u((i=i.apply(e,n||[])).next())}))}function r(e,n){var t,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(t=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=n.call(e,a)}catch(e){s=[6,e],i=0}finally{t=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function o(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function s(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(a(arguments[n]));return e}function u(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function c(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(l(arguments[n]));return e}"function"==typeof SuppressedError&&SuppressedError;var h=function(e){return void 0===e},f=function(){function e(e,n){var t,i;if(this._canceled=!1,n)try{for(var r=u(Object.keys(n)),o=r.next();!o.done;o=r.next()){var a=o.value;this[a]=n[a]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}this.eventType=e}var n=e.prototype;return n.stop=function(){this._canceled=!0},n.isCanceled=function(){return this._canceled},e}(),d=function(){function e(){this._eventHandler={}}var n=e.prototype;return n.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof f?e.eventType:e,r=c(this._eventHandler[i]||[]);return r.length<=0||(e instanceof f?(e.currentTarget=this,r.forEach((function(n){n(e)}))):r.forEach((function(e){e.apply(void 0,c(n))}))),this},n.once=function(e,n){var t=this;if("object"==typeof e&&h(n)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof n){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];n.apply(void 0,c(i)),t.off(e,o)};this.on(e,o)}return this},n.hasOn=function(e){return!!this._eventHandler[e]},n.on=function(e,n){if("object"==typeof e&&h(n)){var t=e;for(var i in t)this.on(i,t[i]);return this}if("string"==typeof e&&"function"==typeof n){var r=this._eventHandler[e];h(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(n)}return this},n.off=function(e,n){var t,i;if(h(e))return this._eventHandler={},this;if(h(n)){if("string"==typeof e)return delete this._eventHandler[e],this;var r=e;for(var o in r)this.off(o,r[o]);return this}var a=this._eventHandler[e];if(a){var s=0;try{for(var l=u(a),c=l.next();!c.done;c=l.next()){if(c.value===n){a.splice(s,1),a.length<=0&&delete this._eventHandler[e];break}s++}}catch(e){t={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}}return this},e.VERSION="3.0.4",e}(),g=f,p={WRONG_TYPE:0,ELEMENT_NOT_FOUND:1,VAL_MUST_NOT_NULL:2,NOT_ATTACHED_TO_FLICKING:3,WRONG_OPTION:4,INDEX_OUT_OF_RANGE:5,POSITION_NOT_REACHABLE:6,TRANSFORM_NOT_SUPPORTED:7,STOP_CALLED_BY_USER:8,ANIMATION_INTERRUPTED:9,ANIMATION_ALREADY_PLAYING:10,NOT_ALLOWED_IN_FRAMEWORK:11,NOT_INITIALIZED:12,NO_ACTIVE:13,NOT_ALLOWED_IN_VIRTUAL:14},v=function(e,n){return e+"("+typeof e+") is not a "+n.map((function(e){return'"'+e+'"'})).join(" or ")+"."},_=function(e){return'Element with selector "'+e+'" not found.'},m=function(e,n){return n+" should be provided. Given: "+e},b='This module is not attached to the Flicking instance. "init()" should be called first.',E=function(e,n){return'Option "'+e+'" is not in correct format, given: '+n},y=function(e,n,t){return'Index "'+e+'" is out of range: should be between '+n+" and "+t+"."},P=function(e){return'Position "'+e+'" is not reachable.'},x="Browser does not support CSS transform.",O="Event stop() is called by user.",T="Animation is interrupted by user input.",R="Animation is already playing.",w="This behavior is not allowed in the frameworks like React, Vue, or Angular.",I="Flicking is not initialized yet, call init() first.",A={READY:"ready",BEFORE_RESIZE:"beforeResize",AFTER_RESIZE:"afterResize",HOLD_START:"holdStart",HOLD_END:"holdEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",WILL_CHANGE:"willChange",CHANGED:"changed",WILL_RESTORE:"willRestore",RESTORED:"restored",SELECT:"select",NEED_PANEL:"needPanel",VISIBLE_CHANGE:"visibleChange",REACH_EDGE:"reachEdge",PANEL_CHANGE:"panelChange"},C={PREV:"prev",CENTER:"center",NEXT:"next"},S={PREV:"PREV",NEXT:"NEXT",NONE:null},k={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},D={VIEWPORT:"flicking-viewport",CAMERA:"flicking-camera",VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},M={LINEAR:"linear",BOUND:"bound"},N={LTR:"ltr",RTL:"rtl"},z={HORIZONTAL:"horizontal",VERTICAL:"vertical"},j={__proto__:null,EVENTS:A,ALIGN:C,DIRECTION:S,MOVE_TYPE:k,CLASS:D,CIRCULAR_FALLBACK:M,ORDER:N,MOVE_DIRECTION:z,ERROR_CODE:p},L=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return n.forEach((function(n){Object.keys(n).forEach((function(t){e[t]=n[t]}))})),e},F=function(e,n){var t=null;if($(e)){var i=(n||document).querySelector(e);if(!i)throw new ge(_(e),p.ELEMENT_NOT_FOUND);t=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(t=e);if(!t)throw new ge(v(e,["HTMLElement","string"]),p.WRONG_TYPE);return t},H=function(e,n){if(null==e)throw new ge(m(e,n),p.VAL_MUST_NOT_NULL)},V=function(e,n,t){return Math.max(Math.min(e,t),n)},B=function(e){if(!e)throw new ge(b,p.NOT_ATTACHED_TO_FLICKING);return e},G=function(e){return[].slice.call(e)},X=function(e,n){var t;if($(e))switch(e){case C.PREV:t=0;break;case C.CENTER:t=.5*n;break;case C.NEXT:t=n;break;default:if(null==(t=U(e,n)))throw new ge(E("align",e),p.WRONG_OPTION)}else t=e;return t},W=function(e,n){var t;if(Array.isArray(e))t=e.map((function(e){return U(e,n)}));else{var i=U(e,n);t=[i,i]}return t.map((function(n){if(null==n)throw new ge(E("bounce",e),p.WRONG_OPTION);return n}))},U=function(e,n){var t=Y(e);return null==t?null:t.percentage*n+t.absolute},Y=function(e){var n=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var t={percentage:0,absolute:0},i=0,r=n.exec(e);null!=r;){var o=r[1],a=r[2],s=r[3],u=parseFloat(a);if(i<=0&&(o=o||"+"),!o)return null;var l="+"===o?1:-1;"%"===s?t.percentage+=l*(u/100):t.absolute+=l*u,++i,r=n.exec(e)}return 0===i?null:t},q=function(e){return"object"==typeof e?e.panel:e},K=function(e,n){return e===n?S.NONE:e<n?S.NEXT:S.PREV},Z=function(e){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){if($(e)){var t=document.createElement("div");for(t.innerHTML=e,n.push.apply(n,s(G(t.children)));t.firstChild;)t.removeChild(t.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new ge(v(e,["HTMLElement","string"]),p.WRONG_TYPE);n.push(e)}})),n},Q=function(e,n){return V(e<0?e+n:e,0,n)},J=function(e,n){var t,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){if(a.value===n)return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return!1},$=function(e){return"string"==typeof e},ee=function(e,n,t){var i=t-n;if(e<n)e=t-(n-e)%i;else if(e>t){e=n+(e-t)%i}return e},ne=function(e,n){var t,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){var s=a.value;if(n(s))return s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null},te=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1},ie=function(e,n,t){return(e-n)/(t-n)},re=function(e){return e?window.getComputedStyle(e)||e.currentStyle:{}},oe=function(e,n){var t=n.width,i=n.height;e&&(null!=t&&($(t)?e.style.width=t:e.style.width=t+"px"),null!=i&&($(i)?e.style.height=i:e.style.height=i+"px"))},ae=function(e,n,t){return e>=n&&e<=t},se=function(e,n){return e>=n?e%n:e<0?Q((e+1)%n-1,n):e},ue=function(e){for(var n=new Array(e),t=0;t<e;t++)n[t]=t;return n},le=function(e){var n=e.el,t=e.horizontal,i=e.useFractionalSize,r=e.useOffset,o=e.style,a=0;if(i){var s=parseFloat(t?o.width:o.height)||0,u="border-box"===o.boxSizing,l=t?parseFloat(o.borderLeftWidth||"0")+parseFloat(o.borderRightWidth||"0"):parseFloat(o.borderTopWidth||"0")+parseFloat(o.borderBottomWidth||"0");if(u)a=r?s:s-l;else{var c=t?parseFloat(o.paddingLeft||"0")+parseFloat(o.paddingRight||"0"):parseFloat(o.paddingTop||"0")+parseFloat(o.paddingBottom||"0");a=r?s+c+l:s+c}}else{var h=t?"Width":"Height";a=r?n["offset"+h]:n["client"+h]}return Math.max(a,0)},ce=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},he=function(e){return e.replace(/[\s-_]([a-z])/g,(function(e,n){return n.toUpperCase()}))},fe=function(e,n){for(var t={},i=e.attributes,r=i.length,o=0;o<r;++o){var a=i[o],s=a.name,u=a.value;-1!==s.indexOf(n)&&(t[he(s.replace(n,""))]=u)}return t},de={__proto__:null,merge:L,getElement:F,checkExistence:H,clamp:V,getFlickingAttached:B,toArray:G,parseAlign:X,parseBounce:W,parseArithmeticSize:U,parseArithmeticExpression:Y,parseCSSSizeValue:function(e){return $(e)?e:e+"px"},parsePanelAlign:q,getDirection:K,parseElement:Z,getMinusCompensatedIndex:Q,includes:J,isString:$,circulatePosition:ee,find:ne,findRight:function(e,n){for(var t=e.length-1;t>=0;t--){var i=e[t];if(n(i))return i}return null},findIndex:te,getProgress:ie,getStyle:re,setSize:oe,isBetween:ae,circulateIndex:se,range:ue,getElementSize:le,setPrototypeOf:ce,camelize:he,getDataAttributes:fe},ge=function(e){function t(n,i){var r=e.call(this,n)||this;return ce(r,t.prototype),r.name="FlickingError",r.code=i,r}return n(t,e),t}(Error),pe=function(){function e(e,n){this._flicking=e,this._el=n,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(n,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),n.setSize=function(e){var n=e.width,t=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=n)if($(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if($(t))i.style.height=t;else{var s=o?t+r.top+r.bottom:t;i.style.height=s+"px"}this.resize()},n.resize=function(){var e=this._el,n=re(e),t=this._flicking.useFractionalSize;this._width=le({el:e,horizontal:!0,useFractionalSize:t,useOffset:!1,style:n}),this._height=le({el:e,horizontal:!1,useFractionalSize:t,useOffset:!1,style:n}),this._padding={left:n.paddingLeft?parseFloat(n.paddingLeft):0,right:n.paddingRight?parseFloat(n.paddingRight):0,top:n.paddingTop?parseFloat(n.paddingTop):0,bottom:n.paddingBottom?parseFloat(n.paddingBottom):0},this._isBorderBoxSizing="border-box"===n.boxSizing},e}(),ve=function(){function e(e){var n,t=this;this._onResizeWrapper=function(){t._onResize([])},this._onResize=function(e){var n=t._flicking,i=n.resizeDebounce,r=n.maxResizeDebounce,o=n.element;if(e.find((function(e){return e.target===n.element}))&&1===e.length){var a={width:n.viewport.width,height:n.viewport.height},s={width:le({el:o,horizontal:!0,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:re(o)}),height:le({el:o,horizontal:!1,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:re(o)})};if(a.height===s.height&&a.width===s.width)return}i<=0?n.resize():(t._maxResizeDebounceTimer<=0&&r>0&&r>=i&&(t._maxResizeDebounceTimer=window.setTimeout(t._doScheduledResize,r)),t._resizeTimer>0&&(clearTimeout(t._resizeTimer),t._resizeTimer=0),t._resizeTimer=window.setTimeout(t._doScheduledResize,i))},this._doScheduledResize=function(){clearTimeout(t._resizeTimer),clearTimeout(t._maxResizeDebounceTimer),t._maxResizeDebounceTimer=-1,t._resizeTimer=-1,t._flicking.resize()},this._skipFirstResize=(n=!0,function(e){n?n=!1:t._onResize(e)}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var n=e.prototype;return Object.defineProperty(n,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),n.enable=function(){var e=this._flicking,n=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var t=0!==n.width||0!==n.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);this._resizeObserver=t,this.observe(e.viewport.element),e.observePanelResize&&this.observePanels()}else window.addEventListener("resize",this._onResizeWrapper);return this._enabled=!0,this},n.observePanels=function(){var e=this;return this._flicking.panels.forEach((function(n){e.observe(n.element)})),this},n.unobservePanels=function(){var e=this;return this._flicking.panels.forEach((function(n){e.unobserve(n.element)})),this},n.observe=function(e){var n=this._resizeObserver;return n?(n.observe(e),this):this},n.unobserve=function(e){var n=this._resizeObserver;return n?(n.unobserve(e),this._flicking.observePanelResize&&this.unobservePanels(),this):this},n.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResizeWrapper),this._enabled=!1,this},e}(),_e=function(){function e(e){this._element=e,this._rendered=!0}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),n.show=function(e){var n=this.element,t=e.camera.element;n.parentElement!==t&&(t.appendChild(n),this._rendered=!0)},n.hide=function(e){var n=this.element,t=e.camera.element;n.parentElement===t&&(t.removeChild(n),this._rendered=!1)},e}(),me=function(){function e(e){this._flicking=e}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(n,"_virtualElement",{get:function(){var e=this._flicking,n=this._panel.elementIndex;return e.virtual.elements[n]},enumerable:!1,configurable:!0}),n.init=function(e){this._panel=e},n.show=function(){},n.hide=function(){},e}(),be=function(){function e(e,n){var t,i,r,o;this._flicking=e,this._renderPanel=null!==(t=null==n?void 0:n.renderPanel)&&void 0!==t?t:function(){return""},this._initialPanelCount=null!==(i=null==n?void 0:n.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==n?void 0:n.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==n?void 0:n.panelClass)&&void 0!==o?o:D.DEFAULT_VIRTUAL,this._elements=[]}var n=e.prototype;return Object.defineProperty(n,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach((function(e){return e.uncacheRenderResult()}))},enumerable:!1,configurable:!0}),Object.defineProperty(n,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var n=e.camera.children;this._elements=n.map((function(e){return{nativeElement:e,visible:!0}}))}},n.show=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!0,t.style.display&&(t.style.display="")},n.hide=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!1,t.style.display="none"},n.append=function(e){void 0===e&&(e=1);var n=this._flicking;return this.insert(n.panels.length,e)},n.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},n.insert=function(e,n){return void 0===n&&(n=1),n<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:ue(n),hasDOMInElements:!1})},n.remove=function(e,n){return n<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!1})},n._initVirtualElements=function(){var e=this,n=this._flicking,t=n.camera.element,i=n.panelsPerView,r=document.createDocumentFragment();ue(i+1).map((function(n){var t=document.createElement("div");return t.className=e._panelClass,t.dataset.elementIndex=n.toString(),t})).forEach((function(e){r.appendChild(e)})),t.appendChild(r)},e}();function Ee(e,n){for(var t=e.length,i=0;i<t;++i)if(n(e[i],i))return!0;return!1}function ye(e,n){for(var t=e.length,i=0;i<t;++i)if(n(e[i],i))return e[i];return null}function Pe(e){var n=e;if(void 0===n){if("undefined"==typeof navigator||!navigator)return"";n=navigator.userAgent||""}return n.toLowerCase()}function xe(e,n){try{return new RegExp(e,"g").exec(n)}catch(e){return null}}function Oe(e){return e.replace(/_/g,".")}function Te(e,n){var t=null,i="-1";return Ee(e,(function(e){var r=xe("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return!(!r||e.brand)&&(t=e,i=r[3]||"-1",e.versionAlias?i=e.versionAlias:e.versionTest&&(i=function(e,n){var t=xe("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n);return t?t[3]:""}(e.versionTest.toLowerCase(),n)||i),i=Oe(i),!0)})),{preset:t,version:i}}function Re(e,n){var t={brand:"",version:"-1"};return Ee(e,(function(e){var i=we(n,e);return!!i&&(t.brand=e.id,t.version=e.versionAlias||i.version,"-1"!==t.version)})),t}function we(e,n){return ye(e,(function(e){var t=e.brand;return xe(""+n.test,t.toLowerCase())}))}var Ie=[{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"}],Ae=[{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}],Ce=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Se=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],ke=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function De(e){return!!Te(Se,e).preset}function Me(e){return Object.keys(e)}function Ne(e){return"function"==typeof e}var ze="__observers__",je="__computed__",Le=1,Fe="__CFCS_DETECTED_DEPENDENCIES__",He=function(e,n){return He=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},He(e,n)};function Ve(e,n,t){if(t||2===arguments.length)for(var i,r=0,o=n.length;r<o;r++)!i&&r in n||(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))}function Be(){Object[Fe]=Object[Fe]||{};var e=Object[Fe];return e[Le]=e[Le]||[],e[Le]}var Ge=function(){function e(e){this._emitter=new d,this._current=e}var n=e.prototype;return Object.defineProperty(n,"current",{get:function(){var e,n=(e=Be())[e.length-1];return null==n||n.push(this),this._current},set:function(e){this._setCurrent(e)},enumerable:!1,configurable:!0}),n.subscribe=function(e){return this.current,this._emitter.on("update",e),this},n.unsubscribe=function(e){return this._emitter.off("update",e),this},n._setCurrent=function(e){var n=this._current,t=e!==n;this._current=e,t&&this._emitter.trigger("update",e,n)},n.toString=function(){return"".concat(this.current)},n.valueOf=function(){return this.current},e}(),Xe=function(e){function n(n){var t=e.call(this)||this;return t._computedCallback=n,t._registered=[],t._onCheckUpdate=function(){t._setCurrent(t.current)},t._current=t.current,t}!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}He(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(n,e);var t=n.prototype;return Object.defineProperty(t,"current",{get:function(){var e,n,t,i,r=this;e=this,n=Be(),i={host:e,observers:t=[],push:function(n){e!==n&&-1===t.indexOf(n)&&t.push(n)}},n.push(i);var o=this._computedCallback(),a=Be().pop();return this._registered.forEach((function(e){e.unsubscribe(r._onCheckUpdate)})),a.observers.forEach((function(e){e.subscribe(r._onCheckUpdate)})),this._registered=a.observers,o},enumerable:!1,configurable:!0}),n}(Ge);function We(e,n,t){void 0===t&&(t=n);var i={configurable:!0,get:function(){return $e(this,t).current},set:function(e){$e(this,t,e).current=e}};Object.defineProperty(e,n,i),t!==n&&Object.defineProperty(e,t,{configurable:!0,get:function(){return $e(this,t).current}})}function Ue(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length>1?We(e[0],e[1]):function(n,t){return We(n,t,e[0])}}function Ye(e){e.subscribe=function(e,n){this[e],$e(this,e).subscribe(n)},e.unsubscribe=function(e,n){var t=this;e?e in this&&$e(this,e).unsubscribe(n):Me(Je(this)).forEach((function(e){t.unsubscribe(e)}))}}function qe(e){Ye(e.prototype)}function Ke(e,n){var t=Ne(e)?e():e,i={};return Qe(i),Me(t).forEach((function(e){var n,r=t[e];(n=r)&&function(e){return"object"==typeof e}(n)&&"current"in n&&"subscribe"in n&&"unsubscribe"in n?en(i,e,r):en(i,e,Ze(r)),Ue(e)(i,e)})),Ye(i),i}function Ze(e){return new Ge(e)}function Qe(e){var n={};return Object.defineProperty(e,ze,{get:function(){return n}}),n}function Je(e,n){var t,i;e[ze]||Qe(e);var r=e[ze];if(!n){var o=null===(i=null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.prototype)||void 0===i?void 0:i[je];o&&o.forEach((function(n){!(n in r)&&n in e&&e[n]}))}return r}function $e(e,n,t){var i=Je(e);return i[n]||(i[n]=Ze(t)),i[n]}function en(e,n,t){Je(e)[n]=t}function nn(e,n,t){var i=t.get;var r={configurable:!0,get:function(){var e,t=Je(this,!0);return n in t||(t[n]=(e=i.bind(this),new Xe(e))),$e(this,n).current}};e[je]||(e[je]=[]);var o=e[je];return-1===o.indexOf(n)&&o.push(n),Object.defineProperty(e,n,r),r}var tn=function(e,n){return tn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},tn(e,n)};function rn(e,n){function t(){this.constructor=e}tn(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var on,an=function(){return an=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},an.apply(this,arguments)};function sn(e,n,t,i){var r,o=arguments.length,a=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,t,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(n,t,a):r(n,t))||a);return o>3&&a&&Object.defineProperty(n,t,a),a}on="undefined"==typeof window?{navigator:{userAgent:""}}:window;var un,ln=24,cn="left",hn="right",fn="middle",dn={1:cn,2:fn,3:hn},gn="ontouchstart"in on&&"safari"===(void 0===un&&function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,n=e.brands||e.uaList;return!(!n||!n.length)}()?function(e){var n=navigator.userAgentData,t=(n.uaList||n.brands).slice(),i=e&&e.fullVersionList,r=n.mobile||!1,o=t[0],a=(e&&e.platform||n.platform||navigator.platform).toLowerCase(),s={name:o.brand,version:o.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Re(Se,t).brand||De(Pe())},u={name:"unknown",version:"-1",majorVersion:-1};s.webkit=!s.chromium&&Ee(Ce,(function(e){return we(t,e)}));var l=Re(Ae,t);if(s.chromium=!!l.brand,s.chromiumVersion=l.version,!s.chromium){var c=Re(Ce,t);s.webkit=!!c.brand,s.webkitVersion=c.version}var h=ye(ke,(function(e){return new RegExp(""+e.test,"g").exec(a)}));if(u.name=h?h.id:"",e&&(u.version=e.platformVersion),i&&i.length){var f=Re(Ie,i);s.name=f.brand||s.name,s.version=f.version||s.version}else{var d=Re(Ie,t);s.name=d.brand||s.name,s.version=d.brand&&e?e.uaFullVersion:d.version}return s.webkit&&(u.name=r?"ios":"mac"),"ios"===u.name&&s.webview&&(s.version="-1"),u.version=Oe(u.version),s.version=Oe(s.version),u.majorVersion=parseInt(u.version,10),s.majorVersion=parseInt(s.version,10),{browser:s,os:u,isMobile:r,isHints:!0}}():function(e){var n=Pe(e),t=!!/mobi/g.exec(n),i={name:"unknown",version:"-1",majorVersion:-1,webview:De(n),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=Te(Ie,n),a=o.preset,s=o.version,u=Te(ke,n),l=u.preset,c=u.version,h=Te(Ae,n);if(i.chromium=!!h.preset,i.chromiumVersion=h.version,!i.chromium){var f=Te(Ce,n);i.webkit=!!f.preset,i.webkitVersion=f.version}return l&&(r.name=l.id,r.version=c,r.majorVersion=parseInt(c,10)),a&&(i.name=a.id,i.version=s,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:t,isHints:!1}}(un)).browser.name,pn=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,n=["transform","webkitTransform","msTransform","mozTransform"],t=0,i=n.length;t<i;t++)if(n[t]in e)return n[t];return""}(),vn={"-webkit-user-select":"none","-ms-user-select":"none","-moz-user-select":"none","user-select":"none","-webkit-user-drag":"none"},_n=function(e){for(var n=[],t=0,i=e.length;t<i;t++)n.push(e[t]);return n},mn=function(e,n){var t;if(void 0===n&&(n=!1),"string"==typeof e){if(e.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=e,t=_n(i.childNodes)}else t=_n(document.querySelectorAll(e));n||(t=t.length>=1?t[0]:void 0)}else e===on?t=e:"value"in e||"current"in e?t=e.value||e.current:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in on&&e instanceof jQuery||e.constructor.prototype.jquery?t=n?e.toArray():e.get(0):Array.isArray(e)&&(t=e.map((function(e){return mn(e)})),n||(t=t.length>=1?t[0]:void 0)):t=e;return t},bn=on.requestAnimationFrame||on.webkitRequestAnimationFrame,En=on.cancelAnimationFrame||on.webkitCancelAnimationFrame;if(bn&&!En){var yn={},Pn=bn;bn=function(e){var n=Pn((function(t){yn[n]&&e(t)}));return yn[n]=!0,n},En=function(e){delete yn[e]}}else bn&&En||(bn=function(e){return on.setTimeout((function(){e(on.performance&&on.performance.now&&on.performance.now()||(new Date).getTime())}),16)},En=on.clearTimeout);var xn=function(e,n){var t={};for(var i in e)i&&(t[i]=n(e[i],i));return t},On=function(e,n){var t={};for(var i in e)i&&n(e[i],i)&&(t[i]=e[i]);return t},Tn=function(e,n){for(var t in e)if(t&&!n(e[t],t))return!1;return!0},Rn=function(e,n){return Tn(e,(function(e,t){return e===n[t]}))},wn={},In=function(e,n){return wn[n]||(wn[n]=Sn(n)),wn[n](e)},An=function(e,n){return e&&n?xn(e,(function(e,t){return In(e,"number"==typeof n?n:n[t])})):e},Cn=function(e){if(!isFinite(e))return 0;var n="".concat(e);if(n.indexOf("e")>=0){for(var t=0,i=1;Math.round(e*i)/i!==e;)i*=10,t++;return t}return n.indexOf(".")>=0?n.length-n.indexOf(".")-1:0},Sn=function(e){var n=e<1?Math.pow(10,Cn(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},kn=function(e,n,t){return t?!!(30===n||n&e&&t&e):!!(n&e)},Dn=function(){function e(e){this._axes=e,this.holdingCount=0}var n=e.prototype;return n.hold=function(e,n){var t=this._getRoundPos(e).roundPos;this._axes.trigger(new g("hold",{pos:t,input:n.input||null,inputEvent:n.event||null,isTrusted:!0}))},n.triggerRelease=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration),this._axes.trigger(new g("release",an(an({},e),{bounceRatio:this._getBounceRatio(t)})))},n.triggerChange=function(e,n,t,i){var r=this;void 0===i&&(i=!1);var o=this.animationManager,a=o.axisManager,s=o.getEventInfo(),u=this._getRoundPos(e,n),l=u.roundPos,c=u.roundDepa,h=a.moveTo(l,c),f=(null==t?void 0:t.event)||(null==s?void 0:s.event)||null,d={pos:h.pos,delta:h.delta,bounceRatio:this._getBounceRatio(h.pos),holding:i,inputEvent:f,isTrusted:!!f,input:(null==t?void 0:t.input)||(null==s?void 0:s.input)||null,set:f?this._createUserControll(h.pos):function(){}},p=new g("change",d);return this._axes.trigger(p),Object.keys(h.pos).forEach((function(e){var n=h.pos[e];$e(r._axes,e,n).current=n})),f&&a.set(d.set().destPos),!p.isCanceled()},n.triggerAnimationStart=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration);var r=new g("animationStart",e);return this._axes.trigger(r),!r.isCanceled()},n.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this._axes.trigger(new g("animationEnd",{isTrusted:e}))},n.triggerFinish=function(e){void 0===e&&(e=!1),this._axes.trigger(new g("finish",{isTrusted:e}))},n.setAnimationManager=function(e){this.animationManager=e},n.destroy=function(){this._axes.off()},n._createUserControll=function(e,n){void 0===n&&(n=0);var t={destPos:an({},e),duration:n};return function(e,n){return e&&(t.destPos=an({},e)),void 0!==n&&(t.duration=n),t}},n._getRoundPos=function(e,n){var t=this._axes.options.round;return{roundPos:An(e,t),roundDepa:An(n,t)}},n._getBounceRatio=function(e){return this._axes.axisManager.map(e,(function(e,n){return e<n.range[0]&&0!==n.bounce[0]?(n.range[0]-e)/n.bounce[0]:e>n.range[1]&&0!==n.bounce[1]?(e-n.range[1])/n.bounce[1]:0}))},sn([Ue],e.prototype,"holdingCount",void 0),e}(),Mn=function(){function e(e){this._options=e,this._prevented=!1}var n=e.prototype;return n.isInterrupting=function(){return this._options.interruptable||this._prevented},n.isInterrupted=function(){return!this._options.interruptable&&this._prevented},n.setInterrupt=function(e){this._options.interruptable||(this._prevented=e)},e}(),Nn=function(e,n,t,i){var r=e,o=[t[0]?n[0]:i?n[0]-i[0]:n[0],t[1]?n[1]:i?n[1]+i[1]:n[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r)},zn=function(e,n){return e<n[0]||e>n[1]},jn=function(e,n,t){return t[1]&&e>n[1]||t[0]&&e<n[0]},Ln=function(e,n,t){var i=e,r=n[0],o=n[1],a=o-r;return t[1]&&e>o&&(i=(i-o)%a+r),t[0]&&e<r&&(i=(i-r)%a+o),i},Fn=function(){function e(e){var n=this;this._axis=e,this._complementOptions(),this._pos=Object.keys(this._axis).reduce((function(e,t){return e[t]=n._axis[t].startPos,e}),{})}var n=e.prototype;return n.getDelta=function(e,n){var t=this.get(e);return xn(this.get(n),(function(e,n){return e-t[n]}))},n.get=function(e){var n=this;return e&&Array.isArray(e)?e.reduce((function(e,t){return t&&t in n._pos&&(e[t]=n._pos[t]),e}),{}):an(an({},this._pos),e||{})},n.moveTo=function(e,n){void 0===n&&(n=this._pos);var t=xn(this._pos,(function(t,i){return i in e&&i in n?e[i]-n[i]:0}));return this.set(this.map(e,(function(e,n){return n?Ln(e,n.range,n.circular):0}))),{pos:an({},this._pos),delta:t}},n.set=function(e){for(var n in e)n&&n in this._pos&&(this._pos[n]=e[n])},n.every=function(e,n){var t=this._axis;return Tn(e,(function(e,i){return n(e,t[i],i)}))},n.filter=function(e,n){var t=this._axis;return On(e,(function(e,i){return n(e,t[i],i)}))},n.map=function(e,n){var t=this._axis;return xn(e,(function(e,i){return n(e,t[i],i)}))},n.isOutside=function(e){return!this.every(e?this.get(e):this._pos,(function(e,n){return!zn(e,n.range)}))},n.getAxisOptions=function(e){return this._axis[e]},n.setAxis=function(e){var n=this;Object.keys(e).forEach((function(t){if(!n._axis[t])throw new Error("Axis ".concat(t," does not exist in Axes instance"));n._axis[t]=an(an({},n._axis[t]),e[t])})),this._complementOptions()},n._complementOptions=function(){var e=this;Object.keys(this._axis).forEach((function(n){e._axis[n]=an({range:[0,100],startPos:e._axis[n].range[0],bounce:[0,0],circular:[!1,!1]},e._axis[n]),["bounce","circular"].forEach((function(t){var i=e._axis,r=i[n][t];/string|number|boolean/.test(typeof r)&&(i[n][t]=[r,r])}))}))},e}(),Hn="ontouchstart"in on,Vn="PointerEvent"in on,Bn=Vn||"MSPointerEvent"in on,Gn=function(){function e(){var e=this;this._stopContextMenu=function(n){n.preventDefault(),on.removeEventListener("contextmenu",e._stopContextMenu)}}var n=e.prototype;return n.extendEvent=function(e){var n,t,i,r=this.prevEvent,o=this._getCenter(e),a=r?this._getMovement(e):{x:0,y:0},s=r?this._getScale(e):1,u=r?(t=o.x-r.center.x,i=o.y-r.center.y,180*Math.atan2(i,t)/Math.PI):0,l=r?r.deltaX+a.x:a.x,c=r?r.deltaY+a.y:a.y,h=a.x,f=a.y,d=this._latestInterval,g=Date.now(),p=d?g-d.timestamp:0,v=r?r.velocityX:0,_=r?r.velocityY:0;return(!d||p>=16)&&(d&&(v=(n=[(l-d.deltaX)/p,(c-d.deltaY)/p])[0],_=n[1]),this._latestInterval={timestamp:g,deltaX:l,deltaY:c}),{srcEvent:e,scale:s,angle:u,center:o,deltaX:l,deltaY:c,offsetX:h,offsetY:f,velocityX:v,velocityY:_,preventSystemEvent:!0}},n._getDistance=function(e,n){var t=n.clientX-e.clientX,i=n.clientY-e.clientY;return Math.sqrt(t*t+i*i)},n._getButton=function(e){var n={1:cn,2:hn,4:fn},t=this._isTouchEvent(e)?cn:n[e.buttons];return t||null},n._isTouchEvent=function(e){return e.type&&e.type.indexOf("touch")>-1},n._isValidButton=function(e,n){return n.indexOf(e)>-1},n._isValidEvent=function(e,n,t){return(!n||function(e,n){return!!(!n||n.indexOf("any")>-1||n.indexOf("none")>-1&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey||n.indexOf("shift")>-1&&e.shiftKey||n.indexOf("ctrl")>-1&&e.ctrlKey||n.indexOf("alt")>-1&&e.altKey||n.indexOf("meta")>-1&&e.metaKey)}(e,n))&&(!t||this._isValidButton(this._getButton(e),t))},n._preventMouseButton=function(e,n){n===hn?on.addEventListener("contextmenu",this._stopContextMenu):n===fn&&e.preventDefault()},e}(),Xn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown"],n.move=["mousemove"],n.end=["mouseup"],n}rn(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?this.extendEvent(e):null},t.onEventEnd=function(){},t.onRelease=function(){this.prevEvent=null},t.getTouches=function(e,n){return n&&this._isValidButton(dn[e.which],n)&&-1===this.end.indexOf(e.type)?1:0},t._getScale=function(){return 1},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},n}(Gn),Wn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["touchstart"],n.move=["touchmove"],n.end=["touchend","touchcancel"],n}rn(n,e);var t=n.prototype;return t.onEventStart=function(e,n){return this._baseTouches=e.touches,this._isValidEvent(e,n)?this.extendEvent(e):null},t.onEventMove=function(e,n){return this._isValidEvent(e,n)?this.extendEvent(e):null},t.onEventEnd=function(e){this._baseTouches=e.touches},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e){return e.touches.length},t._getScale=function(e){return 2!==e.touches.length||this._baseTouches.length<2?null:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1])},t._getCenter=function(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.touches[0].identifier!==n.touches[0].identifier?{x:0,y:0}:{x:e.touches[0].clientX-n.touches[0].clientX,y:e.touches[0].clientY-n.touches[0].clientY}},n}(Gn),Un=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=Vn?["pointerdown"]:["MSPointerDown"],n.move=Vn?["pointermove"]:["MSPointerMove"],n.end=Vn?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],n._firstInputs=[],n._recentInputs=[],n}rn(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this._updatePointerEvent(e),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?(this._updatePointerEvent(e),this.extendEvent(e)):null},t.onEventEnd=function(e){this._removePointerEvent(e)},t.onRelease=function(){this.prevEvent=null,this._firstInputs=[],this._recentInputs=[]},t.getTouches=function(){return this._recentInputs.length},t._getScale=function(){return 2!==this._recentInputs.length?null:this._getDistance(this._recentInputs[0],this._recentInputs[1])/this._getDistance(this._firstInputs[0],this._firstInputs[1])},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.pointerId!==n.pointerId?{x:0,y:0}:{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},t._updatePointerEvent=function(e){var n=this,t=!1;this._recentInputs.forEach((function(i,r){i.pointerId===e.pointerId&&(t=!0,n._recentInputs[r]=e)})),t||(this._firstInputs.push(e),this._recentInputs.push(e))},t._removePointerEvent=function(e){this._firstInputs=this._firstInputs.filter((function(n){return n.pointerId!==e.pointerId})),this._recentInputs=this._recentInputs.filter((function(n){return n.pointerId!==e.pointerId}))},n}(Gn),Yn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown","touchstart"],n.move=["mousemove","touchmove"],n.end=["mouseup","touchend","touchcancel"],n}rn(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isTouchEvent(e)&&(this._baseTouches=e.touches),this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?this.extendEvent(e):null},t.onEventEnd=function(e){this._isTouchEvent(e)&&(this._baseTouches=e.touches)},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e,n){return this._isTouchEvent(e)?e.touches.length:this._isValidButton(dn[e.which],n)&&-1===this.end.indexOf(e.type)?1:0},t._getScale=function(e){return this._isTouchEvent(e)?2!==e.touches.length||this._baseTouches.length<2?1:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1]):this.prevEvent.scale},t._getCenter=function(e){return this._isTouchEvent(e)?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this,t=[e,this.prevEvent.srcEvent].map((function(e){return n._isTouchEvent(e)?{id:e.touches[0].identifier,x:e.touches[0].clientX,y:e.touches[0].clientY}:{id:null,x:e.clientX,y:e.clientY}})),i=t[0],r=t[1];return i.id===r.id?{x:i.x-r.x,y:i.y-r.y}:{x:0,y:0}},n}(Gn),qn=function(e,n){return n.reduce((function(n,t,i){return e[i]&&(n[e[i]]=t),n}),{})};function Kn(e){return e.indexOf("touch")>-1&&{passive:!1}}var Zn,Qn=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager,o=e.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=n,this._interruptManager=t,this._eventManager=i,this._axisManager=r,this._animationManager=o}var n=e.prototype;return n.get=function(e){return this._axisManager.get(e.axes)},n.hold=function(e,n){if(!this._interruptManager.isInterrupted()&&e.axes.length){var t={input:e,event:n};this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(t),++this._eventManager.holdingCount,this._moveDistance||this._eventManager.hold(this._axisManager.get(),t),this._isOutside=this._axisManager.isOutside(e.axes),this._moveDistance=this._axisManager.get(e.axes)}},n.change=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&!this._axisManager.every(t,(function(e){return 0===e}))){var r=n.srcEvent?n.srcEvent:n;if(!r.__childrenAxesAlreadyChanged){var o,a=this._moveDistance||this._axisManager.get(e.axes);o=xn(a,(function(e,n){return e+(t[n]||0)})),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,(function(e,n){var t=n.circular,i=n.range;return t&&(t[0]||t[1])?Ln(e,i,t):e}))),this._isOutside&&this._axisManager.every(a,(function(e,n){return!zn(e,n.range)}))&&(this._isOutside=!1),a=this._atOutside(a),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(t,a,o)||(r.__childrenAxesAlreadyChanged=!0);var s={input:e,event:n};if(i){var u=this._animationManager.getDuration(o,a);this._animationManager.animateTo(o,u,s)}else{!this._eventManager.triggerChange(o,a,s,!0)&&(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))}}}},n.release=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance){var r=n.srcEvent?n.srcEvent:n;r.__childrenAxesAlreadyReleased&&(t=t.map((function(){return 0})));var o=this._axisManager.get(e.axes),a=this._axisManager.get(),s=this._animationManager.getDisplacement(t),u=qn(e.axes,s),l=this._axisManager.get(this._axisManager.map(u,(function(e,n,t){return n.circular&&(n.circular[0]||n.circular[1])?o[t]+e:Nn(o[t]+e,n.range,n.circular,n.bounce)})));r.__childrenAxesAlreadyReleased=!0;var c=this._animationManager.getDuration(l,o,i);0===c&&(l=an({},a));var h={depaPos:a,destPos:l,duration:c,delta:this._axisManager.getDelta(a,l),inputEvent:n,input:e,isTrusted:!0};--this._eventManager.holdingCount,this._eventManager.triggerRelease(h),0===this._eventManager.holdingCount&&(this._moveDistance=null);var f=this._animationManager.getUserControl(h),d=Rn(f.destPos,a),g={input:e,event:n};d||0===f.duration?(d||this._eventManager.triggerChange(f.destPos,a,g,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(g):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(f.destPos,f.duration,g)}},n._atOutside=function(e){var n=this;return this._isOutside?this._axisManager.map(e,(function(e,n){var t=n.range[0]-n.bounce[0],i=n.range[1]+n.bounce[1];return e>i?i:e<t?t:e})):this._axisManager.map(e,(function(e,t){var i=t.range[0],r=t.range[1],o=t.bounce,a=t.circular;return a[0]&&e<i||a[1]&&e>r?e:e<i?i-n._animationManager.interpolate(i-e,o[0]):e>r?r+n._animationManager.interpolate(e-r,o[1]):e}))},n._isEndofAxis=function(e,n,t){return this._axisManager.every(n,(function(i,r,o){return 0===e[o]||n[o]===t[o]&&function(e,n,t,i){return!i[0]&&e===n[0]-t[0]||!i[1]&&e===n[1]+t[1]}(i,r.range,r.bounce,r.circular)}))},e}(),Jn=function(e,n,t){return Math.max(Math.min(e,t),n)},$n=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager;this._options=n,this.interruptManager=t,this.eventManager=i,this.axisManager=r,this.animationEnd=this.animationEnd.bind(this)}var n=e.prototype;return n.getDuration=function(e,n,t){var i,r=this;if(void 0!==t)i=t;else{var o=xn(n,(function(n,t){return function(e,n){var t=Math.sqrt(e/n*2);return t<100?0:t}(Math.abs(n-e[t]),r._options.deceleration)}));i=Object.keys(o).reduce((function(e,n){return Math.max(e,o[n])}),-1/0)}return Jn(i,this._options.minimumDuration,this._options.maximumDuration)},n.getDisplacement=function(e){var n=Math.pow(e.reduce((function(e,n){return e+n*n}),0),1/e.length),t=Math.abs(n/-this._options.deceleration);return e.map((function(e){return e/2*t}))},n.stopAnimation=function(e){if(this._animateParam){var n=this.axisManager.get(),t=this.axisManager.map(n,(function(e,n){return Ln(e,n.range,n.circular)}));Tn(t,(function(e,t){return n[t]===e}))||this.eventManager.triggerChange(t,n,e,!!e),this._animateParam=null,this._raf&&(i=this._raf,En(i)),this._raf=null,this.eventManager.triggerAnimationEnd(!!(null==e?void 0:e.event))}var i},n.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},n.restore=function(e){var n=this.axisManager.get(),t=this.axisManager.map(n,(function(e,n){return Math.min(n.range[1],Math.max(n.range[0],e))}));this.stopAnimation(),this.animateTo(t,this.getDuration(n,t),e)},n.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var n=this.axisManager.filter(this.axisManager.get(),(function(e,n){return jn(e,n.range,n.circular)}));Object.keys(n).length>0&&this.setTo(this.axisManager.map(n,(function(e,n){return Ln(e,n.range,n.circular)}))),this.interruptManager.setInterrupt(!1),this.eventManager.triggerAnimationEnd(!!e),this.axisManager.isOutside()?this.restore(e):this.finish(!!e)},n.finish=function(e){this._animateParam=null,this.interruptManager.setInterrupt(!1),this.eventManager.triggerFinish(e)},n.getUserControl=function(e){var n=e.setTo();return n.destPos=this.axisManager.get(n.destPos),n.duration=Jn(n.duration,this._options.minimumDuration,this._options.maximumDuration),n},n.animateTo=function(e,n,t){var i=this;this.stopAnimation();var r=this._createAnimationParam(e,n,t),o=an({},r.depaPos),a=this.eventManager.triggerAnimationStart(r),s=this.getUserControl(r);if(!a&&this.axisManager.every(s.destPos,(function(e,n){return jn(e,n.range,n.circular)}))&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!Rn(s.destPos,o)){var u=(null==t?void 0:t.event)||null;this._animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axisManager.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:(null==t?void 0:t.input)||null},(function(){return i.animationEnd()}))}},n.setTo=function(e,n){void 0===n&&(n=0);var t=Object.keys(e),i=this.axisManager.get(t);if(Rn(e,i))return this;this.interruptManager.setInterrupt(!0);var r=On(e,(function(e,n){return i[n]!==e}));return Object.keys(r).length?(r=this.axisManager.map(r,(function(e,n){var t=n.range,i=n.circular;return i&&(i[0]||i[1])?e:Nn(e,t,i)})),Rn(r,i)||(n>0?this.animateTo(r,n):(this.stopAnimation(),this.eventManager.triggerChange(r),this.finish(!1))),this):this},n.setBy=function(e,n){return void 0===n&&(n=0),this.setTo(xn(this.axisManager.get(Object.keys(e)),(function(n,t){return n+e[t]})),n)},n.setOptions=function(e){this._options=an(an({},this._options),e)},n._createAnimationParam=function(e,n,t){var i=this.axisManager.get(),r=e,o=(null==t?void 0:t.event)||null;return{depaPos:i,destPos:r,duration:Jn(n,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,r),inputEvent:o,input:(null==t?void 0:t.input)||null,isTrusted:!!o,done:this.animationEnd}},n._animateLoop=function(e,n){var t=this;if(e.duration){this._animateParam=an(an({},e),{startTime:(new Date).getTime()});var i=xn(e.destPos,(function(e){return e})),r=this._initState(this._animateParam),o=function(){t._raf=null;var e=t._animateParam,a=t._getNextState(r),s=!t.eventManager.triggerChange(a.pos,r.pos);if(r=a,a.finished)return e.destPos=t._getFinalPos(e.destPos,i),Rn(e.destPos,t.axisManager.get(Object.keys(e.destPos)))||t.eventManager.triggerChange(e.destPos,a.pos),void n();s?t.finish(!1):t._raf=bn(o)};o()}else this.eventManager.triggerChange(e.destPos),n()},n._getFinalPos=function(e,n){var t=this,i=1e-6;return xn(e,(function(e,r){if(e>=n[r]-i&&e<=n[r]+i)return n[r];var o=t._getRoundUnit(e,r);return In(e,o)}))},n._getRoundUnit=function(e,n){var t,i=this._options.round,r=null;if(!i){var o=this.axisManager.getAxisOptions(n);t=Math.max(Cn(o.range[0]),Cn(o.range[1]),Cn(e)),r=1/Math.pow(10,t)}return r||i},e}(),et=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._useDuration=!0,n}rn(n,e);var t=n.prototype;return t.interpolate=function(e,n){var t=this._easing(1e-5)/1e-5;return this._easing(e/(n*t))*n},t.updateAnimation=function(e){var n,t=this._animateParam;if(t){var i=(new Date).getTime()-t.startTime,r=(null==e?void 0:e.destPos)||t.destPos,o=null!==(n=null==e?void 0:e.duration)&&void 0!==n?n:t.duration;if((null==e?void 0:e.restart)||o<=i)this.setTo(r,o-i);else{if(null==e?void 0:e.destPos){var a=this.axisManager.get();this._initialEasingPer=this._prevEasingPer,t.delta=this.axisManager.getDelta(a,r),t.destPos=r}if(null==e?void 0:e.duration){var s=(i+this._durationOffset)/t.duration;this._durationOffset=s*o-i,t.duration=o}}}},t._initState=function(e){return this._initialEasingPer=0,this._prevEasingPer=0,this._durationOffset=0,{pos:e.depaPos,easingPer:0,finished:!1}},t._getNextState=function(e){var n=this,t=this._animateParam,i=e.pos,r=t.destPos,o=xn(i,(function(e,n){return e<=r[n]?1:-1})),a=((new Date).getTime()-t.startTime+this._durationOffset)/t.duration,s=this._easing(a),u=this.axisManager.map(i,(function(e,u,l){var c=a>=1?r[l]:e+t.delta[l]*(s-n._prevEasingPer)/(1-n._initialEasingPer),h=Ln(c,u.range,u.circular);if(c!==h){var f=o[l]*(u.range[1]-u.range[0]);r[l]-=f,i[l]-=f}return h}));return this._prevEasingPer=s,{pos:u,easingPer:s,finished:s>=1}},t._easing=function(e){return e>1?1:this._options.easing(e)},n}($n),nt=function(e){function n(n,t,i){void 0===n&&(n={}),void 0===t&&(t={}),void 0===i&&(i={});var r=e.call(this)||this;return r.axis=n,r._inputs=[],r.options=an({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null,nested:!1},t),Object.keys(i).forEach((function(e){r.axis[e].startPos=i[e]})),r.interruptManager=new Mn(r.options),r.axisManager=new Fn(r.axis),r.eventManager=new Dn(r),r.animationManager=new et(r),r.inputObserver=new Qn(r),r.eventManager.setAnimationManager(r.animationManager),r.eventManager.triggerChange(r.axisManager.get()),r}rn(n,e);var t=n.prototype;return Object.defineProperty(t,"holding",{get:function(){return this.eventManager.holdingCount>0},enumerable:!1,configurable:!0}),t.connect=function(e,n){var t;return t="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(n)&&this.disconnect(n),n.mapAxes(t),n.connect(this.inputObserver),this._inputs.push(n),this},t.disconnect=function(e){if(e){var n=this._inputs.indexOf(e);n>=0&&(this._inputs[n].disconnect(),this._inputs.splice(n,1))}else this._inputs.forEach((function(e){return e.disconnect()})),this._inputs=[];return this},t.get=function(e){return this.axisManager.get(e)},t.setTo=function(e,n){return void 0===n&&(n=0),this.animationManager.setTo(e,n),this},t.setBy=function(e,n){return void 0===n&&(n=0),this.animationManager.setBy(e,n),this},t.setOptions=function(e){return this.options=an(an({},this.options),e),this.animationManager.setOptions(e),this},t.setAxis=function(e){return this.axisManager.setAxis(e),this},t.stopAnimation=function(){return this.animationManager.stopAnimation(),this.animationManager.finish(!1),this},t.updateAnimation=function(e){return this.animationManager.updateAnimation(e),this},t.isBounceArea=function(e){return this.axisManager.isOutside(e)},t.destroy=function(){this.disconnect(),this.eventManager.destroy()},n.VERSION="3.9.1",n.TRANSFORM=pn,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=ln,n.DIRECTION_ALL=30,sn([nn],n.prototype,"holding",null),n=sn([qe],n)}(d),tt=function(){function e(e,n){var t=this;this.axes=[],this.element=null,this._enabled=!1,this._activeEvent=null,this._atRightEdge=!1,this._rightEdgeTimer=0,this._dragged=!1,this._isOverThreshold=!1,this._preventClickWhenDragged=function(e){t._dragged&&(e.preventDefault(),e.stopPropagation()),t._dragged=!1},this._voidFunction=function(){},this.element=mn(e),this.options=an({inputType:["touch","mouse","pointer"],inputKey:["any"],inputButton:[cn],scale:[1,1],thresholdAngle:45,threshold:0,preventClickOnDrag:!1,preventDefaultOnDrag:!1,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,touchAction:null},n),this._onPanstart=this._onPanstart.bind(this),this._onPanmove=this._onPanmove.bind(this),this._onPanend=this._onPanend.bind(this)}var n=e.prototype;return n.mapAxes=function(e){var n,t;this._direction=(n=!!e[0],t=!!e[1],n&&t?30:n?6:t?ln:1),this.axes=e},n.connect=function(e){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(e),this},n.disconnect=function(){return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),this._direction=1,this},n.destroy=function(){this.disconnect(),this.element=null},n.enable=function(){return this._enabled||(this._enabled=!0,this._originalCssProps=function(e,n,t){var i,r=((i={})[1]="auto",i[30]="none",i[24]="pan-x",i[6]="pan-y",i),o={};if(e&&e.style){var a=n.touchAction?n.touchAction:r[t],s=an(an({},vn),{"touch-action":"none"===e.style["touch-action"]?"none":a});Object.keys(s).forEach((function(n){o[n]=e.style[n]})),Object.keys(s).forEach((function(n){e.style[n]=s[n]}))}return o}(this.element,this.options,this._direction)),this},n.disable=function(){var e,n;return this._enabled&&(this._enabled=!1,e=this._originalCssProps,n=!0,Object.keys(vn).forEach((function(t){e&&e[t]===vn[t]||(n=!1)})),n||function(e,n){e&&e.style&&n&&Object.keys(n).forEach((function(t){e.style[t]=n[t]}))}(this.element,this._originalCssProps)),this},n.isEnabled=function(){return this._enabled},n.release=function(){var e=this._activeEvent,n=e.prevEvent;return e.onRelease(),this._observer.release(this,n,[0,0]),this._detachWindowEvent(e),this},n._onPanstart=function(e){var n=this.options,t=n.inputKey,i=n.inputButton,r=n.preventDefaultOnDrag,o=this._activeEvent,a=o.onEventStart(e,t,i);if(a&&this._enabled&&!(o.getTouches(e,i)>1)&&!1!==a.srcEvent.cancelable){var s=this.options.iOSEdgeSwipeThreshold;this._dragged=!1,this._isOverThreshold=!1,this._observer.hold(this,a),this._atRightEdge=gn&&a.center.x>window.innerWidth-s,this._attachWindowEvent(o),r&&"touchstart"!==a.srcEvent.type&&a.srcEvent.preventDefault(),o.prevEvent=a}},n._onPanmove=function(e){var n=this,t=this.options,i=t.iOSEdgeSwipeThreshold,r=t.preventClickOnDrag,o=t.releaseOnScroll,a=t.inputKey,s=t.inputButton,u=t.threshold,l=t.thresholdAngle,c=this._activeEvent,h=c.onEventMove(e,a,s),f=c.getTouches(e,s);if(0===f||o&&h&&!h.srcEvent.cancelable)this._onPanend(e);else if(h&&this._enabled&&!(f>1)){var d=function(e,n){if(n<0||n>90)return 1;var t=Math.abs(e);return t>n&&t<180-n?ln:6}(h.angle,l),g=kn(6,this._direction,d),p=kn(ln,this._direction,d);if(c.prevEvent&&gn){if(h.center.x<0)return void this.release();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),h.deltaX<-i?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout((function(){return n.release()}),100))}var v=this._getDistance([h.deltaX,h.deltaY],[g,p]),_=this._getOffset([h.offsetX,h.offsetY],[g,p]),m=_.some((function(e){return 0!==e}));m&&(!1!==h.srcEvent.cancelable&&h.srcEvent.preventDefault(),h.srcEvent.stopPropagation()),h.preventSystemEvent=m,m&&(this._isOverThreshold||v>=u)&&(this._dragged=r,this._isOverThreshold=!0,this._observer.change(this,h,qn(this.axes,_))),c.prevEvent=h}},n._onPanend=function(e){var n=this.options.inputButton,t=this._activeEvent;if(t.onEventEnd(e),this._enabled&&0===t.getTouches(e,n)){this._detachWindowEvent(t),clearTimeout(this._rightEdgeTimer);var i=t.prevEvent,r=this._isOverThreshold?this._getOffset([Math.abs(i.velocityX)*(i.offsetX<0?-1:1),Math.abs(i.velocityY)*(i.offsetY<0?-1:1)],[kn(6,this._direction),kn(ln,this._direction)]):[0,0];t.onRelease(),this._observer.release(this,i,r)}},n._attachWindowEvent=function(e){var n=this;null==e||e.move.forEach((function(e){window.addEventListener(e,n._onPanmove,Kn(e))})),null==e||e.end.forEach((function(e){window.addEventListener(e,n._onPanend,Kn(e))}))},n._detachWindowEvent=function(e){var n=this;null==e||e.move.forEach((function(e){window.removeEventListener(e,n._onPanmove)})),null==e||e.end.forEach((function(e){window.removeEventListener(e,n._onPanend)}))},n._getOffset=function(e,n){var t=this.options.scale;return[n[0]?e[0]*t[0]:0,n[1]?e[1]*t[1]:0]},n._getDistance=function(e,n){return Math.sqrt(Number(n[0])*Math.pow(e[0],2)+Number(n[1])*Math.pow(e[1],2))},n._attachElementEvent=function(e){var n=this,t=function(e){void 0===e&&(e=[]);var n=!1,t=!1,i=!1;return e.forEach((function(e){switch(e){case"mouse":t=!0;break;case"touch":n=Hn;break;case"pointer":i=Bn}})),i?new Un:n&&t?new Yn:n?new Wn:t?new Xn:null}(this.options.inputType),i=this.element;if(t){if(!i)throw new Error("Element to connect input does not exist.");this._observer=e,this.enable(),this._activeEvent=t,i.addEventListener("click",this._preventClickWhenDragged,!0),t.start.forEach((function(e){i.addEventListener(e,n._onPanstart)})),t.move.forEach((function(e){i.addEventListener(e,n._voidFunction)}))}},n._detachElementEvent=function(){var e=this,n=this._activeEvent,t=this.element;t&&(t.removeEventListener("click",this._preventClickWhenDragged,!0),null==n||n.start.forEach((function(n){t.removeEventListener(n,e._onPanstart)})),null==n||n.move.forEach((function(n){t.removeEventListener(n,e._voidFunction)}))),this.disable(),this._observer=null},e}(),it=nt,rt={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},ot="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(Zn||(Zn={}));var at=function(){function e(){this._delta=0,this._targetPanel=null}var n=e.prototype;return Object.defineProperty(n,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(n,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),n.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},n.onHold=function(e){},n.onChange=function(e){},n.onRelease=function(e){},n.onAnimationEnd=function(e){},n.onFinish=function(e){},n._moveToChangedPosition=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.delta[ot];if(r){this._delta+=r;var o=n.camera,a=o.position,s=t.pos[ot],u=n.circularEnabled?ee(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new g(A.MOVE,{isTrusted:t.isTrusted,holding:this.holding,direction:K(0,t.delta[ot]),axesEvent:t});n.trigger(l),l.isCanceled()&&(o.lookAt(a),i(Zn.DISABLED))}},e}(),st=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!1,n}n(t,e);var i=t.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.renderer.panelCount<=0)i(Zn.DISABLED);else{var r=new g(A.HOLD_START,{axesEvent:t});n.trigger(r),r.isCanceled()?i(Zn.DISABLED):i(Zn.HOLDING)}},i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control.controller.animatingContext,o=new g(A.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:K(r.start,r.end),axesEvent:t});n.trigger(o),o.isCanceled()?i(Zn.DISABLED):i(Zn.ANIMATING).onChange(e)},t}(at),ut=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!1,n._releaseEvent=null,n}n(t,e);var i=t.prototype;return i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.inputEvent;if(r){var o=n.horizontal?r.offsetX:r.offsetY,a=new g(A.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:K(0,-o),axesEvent:t});n.trigger(a),a.isCanceled()?i(Zn.DISABLED):i(Zn.DRAGGING).onChange(e)}},i.onRelease=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.trigger(new g(A.HOLD_END,{axesEvent:t})),0!==t.delta.flick)return t.setTo({flick:n.camera.position},0),void i(Zn.IDLE);this._releaseEvent=t},i.onFinish=function(e){var n,t,i=e.flicking;if((0,e.transitTo)(Zn.IDLE),this._releaseEvent){var r,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var s=a.changedTouches[0];r=document.elementFromPoint(s.clientX,s.clientY)}else r=a.target;var u=i.renderer.panels,l=null;try{for(var c=o(u),h=c.next();!h.done;h=c.next()){var f=h.value;if(f.contains(r)){l=f;break}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(t=c.return)&&t.call(c)}finally{if(n)throw n.error}}if(l){var d=i.camera.position,p=l.position;i.trigger(new g(A.SELECT,{index:l.index,panel:l,direction:K(d,p)}))}}},t}(at),lt=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(e){var n,t=e.flicking,i=e.axesEvent,r=e.transitTo;if(t.trigger(new g(A.HOLD_END,{axesEvent:i})),t.renderer.panelCount<=0)r(Zn.IDLE);else{r(Zn.ANIMATING);var o=t.control,a=i.destPos[ot],s=Math.max(i.duration,t.duration);try{o.moveToPosition(a,s,i)}catch(e){r(Zn.IDLE),i.setTo(((n={})[ot]=t.camera.position,n),0)}}},t}(at),ct=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=this._targetPanel,o=n.control;this._delta=0,n.control.updateInput(),n.changeOnHold&&r&&o.setActive(r,o.activePanel,t.isTrusted);var a=new g(A.HOLD_START,{axesEvent:t});n.trigger(a),a.isCanceled()?i(Zn.DISABLED):i(Zn.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control,o=r.controller.animatingContext;i(Zn.IDLE),n.trigger(new g(A.MOVE_END,{isTrusted:t.isTrusted,direction:K(o.start,o.end),axesEvent:t}));var a=this._targetPanel;a&&r.setActive(a,r.activePanel,t.isTrusted)},t}(at),ht=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onAnimationEnd=function(e){(0,e.transitTo)(Zn.IDLE)},i.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t(Zn.IDLE)},i.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t(Zn.IDLE)},t}(at),ft=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case Zn.IDLE:t=new st;break;case Zn.HOLDING:t=new ut;break;case Zn.DRAGGING:t=new lt;break;case Zn.ANIMATING:t=new ct;break;case Zn.DISABLED:t=new ht}return t.onEnter(e._state),e._state=t,e._state},this._state=new st}var n=e.prototype;return Object.defineProperty(n,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),n.fire=function(e,n){var i=this._state,r=t(t({},n),{transitTo:this.transitTo});switch(e){case rt.HOLD:i.onHold(r);break;case rt.CHANGE:i.onChange(r);break;case rt.RELEASE:i.onRelease(r);break;case rt.ANIMATION_END:i.onAnimationEnd(r);break;case rt.FINISH:i.onFinish(r)}},e}(),dt=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var n;e._dragged=!!(null===(n=e._panInput)||void 0===n?void 0:n.isEnabled())},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new ft}var n=e.prototype;return Object.defineProperty(n,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panInput",{get:function(){return this._panInput},enumerable:!1,configurable:!0}),Object.defineProperty(n,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(n,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var n=e.axis[ot];return{range:{min:n.range[0],max:n.range[1]},circular:n.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"enabled",{get:function(){var e,n;return null!==(n=null===(e=this._panInput)||void 0===e?void 0:e.isEnabled())&&void 0!==n&&n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([ot])[ot])&&void 0!==n?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.axis[ot].range)&&void 0!==n?n:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis[ot].bounce},enumerable:!1,configurable:!0}),n.init=function(e){var n,t=this;this._flicking=e,this._axes=new it(((n={})[ot]={range:[0,0],circular:!1,bounce:[0,0]},n),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new tt(e.viewport.element,{inputType:e.inputType,threshold:e.dragThreshold,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,preventDefaultOnDrag:e.preventDefaultOnDrag,scale:e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1],releaseOnScroll:!0});var i=this._axes;i.connect(e.horizontal?[ot,""]:["",ot],this._panInput);var r=function(n){var r=rt[n];i.on(r,(function(n){t._stateMachine.fire(r,{flicking:e,axesEvent:n})}))};for(var o in rt)r(o);return this},n.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},n.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},n.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},n.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},n.updateAnimation=function(e,n){var i,r;return this._animatingContext=t(t({},this._animatingContext),{end:e}),null===(r=this._axes)||void 0===r||r.updateAnimation({destPos:(i={},i[ot]=e,i),duration:n}),this},n.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},n.update=function(e){var n,t=B(this._flicking),i=t.camera,r=this._axes,o=r.axis[ot];return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=W(t.bounce,i.size),r.axisManager.set(((n={})[ot]=e.position,n)),this},n.addPreventClickHandler=function(){var e=B(this._flicking),n=this._axes,t=e.camera.element;return n.on(rt.HOLD,this._onAxesHold),n.on(rt.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},n.removePreventClickHandler=function(){var e=B(this._flicking),n=this._axes,t=e.camera.element;return n.off(rt.HOLD,this._onAxesHold),n.off(rt.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},n.animateTo=function(e,n,t){var i,r=this,o=this._axes,a=this._stateMachine.state;if(!o)return Promise.reject(new ge(b,p.NOT_ATTACHED_TO_FLICKING));var s=o.get([ot])[ot];if(s===e){var u=B(this._flicking);return u.camera.lookAt(e),a.targetPanel&&u.control.setActive(a.targetPanel,u.control.activePanel,null!==(i=null==t?void 0:t.isTrusted)&&void 0!==i&&i),Promise.resolve()}this._animatingContext={start:s,end:e,offset:0};return new Promise((function(i,a){var s=function(){o.off(rt.HOLD,u),i()},u=function(){o.off(rt.FINISH,s),a(new ge(T,p.ANIMATION_INTERRUPTED))};o.once(rt.FINISH,s),o.once(rt.HOLD,u),function(){var i,a;o.once(rt.FINISH,(function(){r._animatingContext={start:0,end:0,offset:0}})),t?t.setTo(((i={})[ot]=e,i),n):o.setTo(((a={})[ot]=e,a),n)}()}))},n.updateDirection=function(){var e=B(this._flicking),n=this._axes,t=this._panInput;n.disconnect(t),n.connect(e.horizontal?[ot,""]:["",ot],t),t.options.scale=e.horizontal?[e.camera.panelOrder===N.RTL?1:-1,0]:[0,-1]},n._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),gt=function(){function e(){this._flicking=null,this._controller=new dt,this._activePanel=null}var n=e.prototype;return Object.defineProperty(n,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activeIndex",{get:function(){var e,n;return null!==(n=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==n?n:-1},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(n,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._controller.init(e),this},n.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},n.enable=function(){return this._controller.enable(),this},n.disable=function(){return this._controller.disable(),this},n.release=function(){return this._controller.release(),this},n.updateAnimation=function(e,n,t){var i=this._controller.state,r=this._getPosition(e,null!=t?t:S.NONE);return i.targetPanel=e,this._controller.updateAnimation(r,n),this},n.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},n.updatePosition=function(e){var n=B(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},n.updateInput=function(){var e=B(this._flicking).camera;return this._controller.update(e.controlParams),this},n.resetActive=function(){return this._activePanel=null,this},n.moveToPanel=function(e,n){var t=n.duration,o=n.direction,a=void 0===o?S.NONE:o,s=n.axesEvent;return i(this,void 0,void 0,(function(){var n;return r(this,(function(i){return n=this._getPosition(e,a),this._triggerIndexChangeEvent(e,e.position,s,a),[2,this._animateToPosition({position:n,duration:t,newActivePanel:e,axesEvent:s})]}))}))},n.setActive=function(e,n,t){var i,r=B(this._flicking);this._activePanel=e,this._nextPanel=null,r.camera.updateAdaptiveHeight(),e!==n?r.trigger(new g(A.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==n?void 0:n.index)&&void 0!==i?i:-1,prevPanel:n,isTrusted:t,direction:n?K(n.position,e.position):S.NONE})):r.trigger(new g(A.RESTORED,{isTrusted:t}))},n.copy=function(e){this._flicking=e._flicking,this._activePanel=e._activePanel,this._controller=e._controller},n._triggerIndexChangeEvent=function(e,n,t,i){var r,o=B(this._flicking),a=e!==this._activePanel?A.WILL_CHANGE:A.WILL_RESTORE,s=o.camera,u=this._activePanel,l=new g(a,{index:e.index,panel:e,isTrusted:(null==t?void 0:t.isTrusted)||!1,direction:null!=i?i:K(null!==(r=null==u?void 0:u.position)&&void 0!==r?r:s.position,n)});if(this._nextPanel=e,o.trigger(l),l.isCanceled())throw new ge(O,p.STOP_CALLED_BY_USER)},n._animateToPosition=function(e){var n=e.position,t=e.duration,o=e.newActivePanel,a=e.axesEvent;return i(this,void 0,void 0,(function(){var e,s,u=this;return r(this,(function(l){return e=B(this._flicking),s=function(){return u._controller.animateTo(n,t,a)},this._controller.state.targetPanel=o,t<=0?[2,s()]:[2,s().then((function(){return i(u,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,e.renderer.render()];case 1:return n.sent(),[2]}}))}))})).catch((function(e){if(!(a&&e instanceof ge&&e.code===p.ANIMATION_INTERRUPTED))throw e}))]}))}))},n._getPosition=function(e,n){void 0===n&&(n=S.NONE);var t=B(this._flicking),i=t.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new ge(P(e.position),p.POSITION_NOT_REACHABLE);if(i.canReach(e)){if(t.circularEnabled){var a=this._controller.position,s=i.rangeDiff,u=[r,r+s,r-s].filter((function(e){return n===S.NONE||(n===S.PREV?e<=a:e>=a)}));r=u.reduce((function(e,n){return Math.abs(a-n)<Math.abs(a-e)?n:e}),1/0)}}else r=o.position,e=o.panel;return r},e}(),pt=function(){function e(e){var n=e.index,t=e.position,i=e.panel;this._index=n,this._pos=t,this._panel=i}var n=e.prototype;return Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),e}(),vt=function(e){function t(n){var t=(void 0===n?{}:n).count,i=void 0===t?1/0:t,r=e.call(this)||this;return r._count=i,r}n(t,e);var i=t.prototype;return Object.defineProperty(i,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),i.moveToPosition=function(e,n,t){var i=B(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),s=this._controller.state;if(!o||!a)return Promise.reject(new ge(P(e),p.POSITION_NOT_REACHABLE));var u,l=this._calcSnapThreshold(i.threshold,e,o),c=i.animating?s.delta:e-r.position,h=Math.abs(c),f=t&&0!==t.delta[ot]?Math.abs(t.delta[ot]):h;if(f>=l&&f>0)u=this._findSnappedAnchor(e,a);else{if(!(h>=i.threshold&&h>0))return this.moveToPanel(a.panel,{duration:n,axesEvent:t});u=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(u.panel,e,t),this._animateToPosition({position:r.clampToReachablePosition(u.position),duration:n,newActivePanel:u.panel,axesEvent:t})},i._findSnappedAnchor=function(e,n){var t=B(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new ge(P(e),p.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=t.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.index<n.index||s.position>n.position&&s.index===n.index?c+=1:(e<o&&s.index>n.index||s.position<n.position&&s.index===n.index)&&(c-=1);var h=c*u,f=s.index+h;if(Math.abs(f-n.index)<=r){var d=l[s.index];return new pt({index:d.index,position:d.position+c*i.rangeDiff,panel:d.panel})}if(t.circularEnabled){var g=l[se(n.index+Math.sign(e-o)*r,u)],v=Math.floor(r/u);return e>o&&g.index<n.index?v+=1:e<o&&g.index>n.index&&(v-=1),new pt({index:g.index,position:g.position+v*i.rangeDiff,panel:g.panel})}return l[V(n.index+Math.sign(e-o)*r,0,l.length-1)]},i._findAdjacentAnchor=function(e,n,t){var i,r=B(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==t.position)return o}return null!==(i=n>0?r.getNextAnchor(t):r.getPrevAnchor(t))&&void 0!==i?i:t},i._calcSnapThreshold=function(e,n,t){var i=n>t.position,r=t.panel,o=r.size,a=r.alignPosition;return Math.max(e,i?o-a+r.margin.next:a+r.margin.prev)},t}(gt),_t=function(e){function t(n){var t=(void 0===n?{}:n).stopAtEdge,i=void 0===t||t,r=e.call(this)||this;return r._stopAtEdge=i,r}n(t,e);var i=t.prototype;return Object.defineProperty(i,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),i.updatePosition=function(e){var n=B(this._flicking).camera,t=this._activePanel;if(t){var i=t.range,r=i.min+(i.max-i.min)*e;n.lookAt(n.clampToReachablePosition(r))}},i.moveToPosition=function(e,n,t){var i=B(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new ge(P(e),p.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,t),this._animateToPosition({position:this._stopAtEdge?r:e,duration:n,newActivePanel:a,axesEvent:t})},t}(gt),mt=function(e){function t(n){var t=(void 0===n?{}:n).count,i=void 0===t?1:t,r=e.call(this)||this;return r.setActive=function(n,t,i){e.prototype.setActive.call(r,n,t,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}n(t,e);var o=t.prototype;return Object.defineProperty(o,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),o.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},o.updateInput=function(){var e,n=B(this._flicking),t=n.camera,i=n.renderer,r=this._controller,o=t.controlParams,a=this._count,s=r.state.animating?null===(e=t.findNearestAnchor(t.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var u=o.range,l=s.position,c=s.index,h=i.panelCount,f=c-a,d=c+a;f<0&&(f=n.circularEnabled?Q((f+1)%h-1,h):V(f,0,h-1)),d>=h&&(d=n.circularEnabled?d%h:V(d,0,h-1));var g=i.panels[f],p=i.panels[d],v=Math.max(g.position,u.min),_=Math.min(p.position,u.max);return v>l&&(v-=t.rangeDiff),_<l&&(_+=t.rangeDiff),o.range={min:v,max:_},o.circular&&(o.position<v&&(o.position+=t.rangeDiff),o.position>_&&(o.position-=t.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:g.index,max:p.index},this},o.moveToPanel=function(n,t){return i(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){return i=B(this._flicking),o=i.camera,this._controller.update(o.controlParams),[2,e.prototype.moveToPanel.call(this,n,t)]}))}))},o.moveToPosition=function(e,n,t){var i,r=B(this._flicking),o=r.camera,a=null!==(i=this._nextPanel)&&void 0!==i?i:this._activePanel,s=this._controller.range,u=this._indexRange,l=o.range,c=this._controller.state,h=V(o.clampToReachablePosition(e),s[0],s[1]),f=o.findAnchorIncludePosition(h);if(!f||!a)return Promise.reject(new ge(P(e),p.POSITION_NOT_REACHABLE));var d,g,v=a.position,_=r.animating?c.delta:e-o.position,m=Math.abs(_)>=r.threshold,b=e>v?o.getNextAnchor(f):o.getPrevAnchor(f),E=o.anchorPoints,y=E[0],x=E[E.length-1],O=e<=l.min&&ae(y.panel.index,u.min,u.max),T=e>=l.max&&ae(x.panel.index,u.min,u.max),R=b&&(u.min<=u.max?ae(b.index,u.min,u.max):b.index>=u.min||b.index<=u.max);if(O||T){var w=e<l.min?y:x;g=w.panel,d=w.position}else if(m&&f.position!==a.position)g=f.panel,d=f.position;else{if(!m||!R){var I=o.findNearestAnchor(o.position);return I?this.moveToPanel(I.panel,{duration:n,axesEvent:t}):Promise.reject(new ge(P(e),p.POSITION_NOT_REACHABLE))}g=b.panel,d=b.position}return this._triggerIndexChangeEvent(g,e,t),this._animateToPosition({position:d,duration:n,newActivePanel:g,axesEvent:t})},o._resetIndexRange=function(){this._indexRange={min:0,max:0}},t}(gt),bt={__proto__:null,Control:gt,SnapControl:vt,FreeControl:_t,StrictControl:mt,AxesController:dt,State:at,IdleState:st,HoldingState:ut,DraggingState:lt,AnimatingState:ct,DisabledState:ht,StateMachine:ft},Et=function(){function e(e){this._flicking=e}var n=e.prototype;return n.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new pt({index:n,position:e.position,panel:e})}))},n.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.filter((function(n){return n.panel.includePosition(e,!0)})).reduce((function(n,t){return n&&Math.abs(n.position-e)<Math.abs(t.position-e)?n:t}),null)},n.findNearestAnchor=function(e){var n=this._flicking.camera.anchorPoints;if(n.length<=0)return null;for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},n.clampToReachablePosition=function(e){var n=this._flicking.camera.range;return V(e,n.min,n.max)},n.getCircularOffset=function(){return 0},n.canReach=function(e){var n=this._flicking.camera.range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},n.canSee=function(e){var n=this._flicking.camera.visibleRange;return e.isVisibleOnRange(n.min,n.max)},e}(),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){return!0},i.getRange=function(){var e,n,t=this._flicking.renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(n=null==r?void 0:r.position)&&void 0!==n?n:0}},t}(Et),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer.panels;if(n.length<=0)return!1;var t=n[0],i=n[n.length-1],r=t.range.min-t.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return n.every((function(e){return s-e.size>=a}))},i.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var n=e[0],t=e[e.length-1];return{min:n.range.min-n.margin.prev,max:t.range.max+t.margin.next}},i.getAnchors=function(){return this._flicking.renderer.panels.map((function(e,n){return new pt({index:n,position:e.position,panel:e})}))},i.findNearestAnchor=function(e){var n=this._flicking.camera,t=n.anchorPoints;if(t.length<=0)return null;for(var i=n.range,r=1/0,o=-1,a=0;a<t.length;a++){var s=t[a],u=Math.min(Math.abs(s.position-e),Math.abs(s.position-i.min+i.max-e),Math.abs(e-i.min+i.max-s.position));u<r&&(r=u,o=a)}return t[o]},i.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints,o=t.rangeDiff,a=r.length,s=ee(n,i.min,i.max),u=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(n===i.min||n===i.max)){var l=[u,new pt({index:0,position:r[0].position+o,panel:r[0].panel}),new pt({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter((function(e){return!!e}));u=l.reduce((function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t}),null)}if(!u)return null;if(n<i.min){var c=-Math.floor((i.min-n)/o)-1;return new pt({index:u.index,position:u.position+o*c,panel:u.panel})}if(n>i.max){c=Math.floor((n-i.max)/o)+1;return new pt({index:u.index,position:u.position+o*c,panel:u.panel})}return u},i.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var n=e.panels.filter((function(e){return e.toggled})),t=n.filter((function(e){return e.toggleDirection===S.PREV})),i=n.filter((function(e){return e.toggleDirection===S.NEXT}));return this._calcPanelAreaSum(t)-this._calcPanelAreaSum(i)},i.clampToReachablePosition=function(e){return e},i.canReach=function(e){return!e.removed},i.canSee=function(n){var t=this._flicking.camera,i=t.range,r=t.rangeDiff,o=t.visibleRange,a=e.prototype.canSee.call(this,n);return o.min<i.min?a||n.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||n.isVisibleOnRange(o.min-r,o.max-r):a},i._calcPanelAreaSum=function(e){return e.reduce((function(e,n){return e+n.sizeIncludingMargin}),0)},t}(Et),xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer,t=n.getPanel(0),i=n.getPanel(n.panelCount-1);if(!t||!i)return!1;var r=e.camera.size,o=t.range.min;return r<i.range.max-o},i.getRange=function(){var e=this._flicking,n=e.renderer,t=e.camera.alignPosition,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);if(!i||!r)return{min:0,max:0};var o=e.camera.size,a=i.range.min,s=r.range.max,u=a+t,l=s-o+t;if(o<s-a)return{min:u,max:l};var c=e.camera.align,h="object"==typeof c?c.camera:c,f=u+X(h,l-u);return{min:f,max:f}},i.getAnchors=function(){var e=this._flicking,n=e.camera,t=e.renderer.panels;if(t.length<=0)return[];var i=e.camera.range,r=t.filter((function(e){return n.canReach(e)}));if(r.length>0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,u=r.map((function(e,n){return new pt({index:n+s,position:e.position,panel:e})}));return o&&u.splice(0,0,new pt({index:0,position:i.min,panel:t[r[0].index-1]})),a&&u.push(new pt({index:u.length,position:i.max,panel:t[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,t),c=l.index===t.length-1?l.prev():l,h=c.next();return[new pt({index:0,position:i.min,panel:c}),new pt({index:1,position:i.max,panel:h})]}return[new pt({index:0,position:i.min,panel:this._findNearestPanel(i.min,t)})]},i.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints;return r.length<=0?null:n<=i.min?r[0]:n>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,n)},i._findNearestPanel=function(e,n){for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},t}(Et),Ot=function(){function e(e,n){var t=this,i=(void 0===n?{}:n).align,r=void 0===i?C.CENTER:i;this._lookedOffset=0,this._checkTranslateSupport=function(){var e,n,i=document.documentElement.style,r="";try{for(var a=o(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),s=a.next();!s.done;s=a.next()){var u=s.value;u in i&&(r=u)}}catch(n){e={error:n}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}if(!r)throw new ge(x,p.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"children",{get:function(){return G(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking,n=this._position+this._offset,t=this.findNearestAnchor(this._position);if(!e||!t)return NaN;var i=t.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(n===r)return i.index;if(n<r){var c=i.prev(),h=c?c.position+c.offset:s-o[0];return h>r&&(h-=l),i.index-1+ie(n,h,r)}var f=i.next(),d=f?f.position+f.offset:u+o[1];return d<r&&(d+=l),i.index+ie(n,r,d)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelOrder",{get:function(){return this._panelOrder},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking.viewport.element;return H(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this.updatePanelOrder(),this},n.destroy=function(){return this._resetInternalValues(),this},n.lookAt=function(e){var n=this,t=this._offset,i=this._lookedOffset!==t,r=B(this._flicking),o=this._position;this._position=e;var a=this._togglePanels(o,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(o,e),a?r.renderer.render().then((function(){n.updateOffset(),n._lookedOffset=n._offset})):i?(this.updateOffset(),this._lookedOffset=this._offset):this.applyTransform()},n.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var n=this._anchors,t=this.rangeDiff,i=n[n.length-1];return new pt({index:i.index,position:i.position-t,panel:i.panel})}return this._anchors[e.index-1]||null},n.getNextAnchor=function(e){var n=this._anchors;if(this._circularEnabled&&e.index===n.length-1){var t=this.rangeDiff,i=n[0];return new pt({index:i.index,position:i.position+t,panel:i.panel})}return n[e.index+1]||null},n.getProgressInPanel=function(e){var n=e.range;return(this._position-n.min)/(n.max-n.min)},n.findAnchorIncludePosition=function(e){return this._mode.findAnchorIncludePosition(e)},n.findNearestAnchor=function(e){return this._mode.findNearestAnchor(e)},n.findActiveAnchor=function(){var e,n=B(this._flicking).control.activePanel;return n?null!==(e=ne(this._anchors,(function(e){return e.panel.index===n.index})))&&void 0!==e?e:this.findNearestAnchor(n.position):null},n.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},n.canReach=function(e){return this._mode.canReach(e)},n.canSee=function(e){return this._mode.canSee(e)},n.updateRange=function(){var e=B(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),e.forEach((function(e){return e.updateCircularToggleDirection()})),this},n.updateAlignPos=function(){var e=this._align,n="object"==typeof e?e.camera:e;return this._alignPos=X(n,this.size),this},n.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},n.updateAdaptiveHeight=function(){var e=B(this._flicking),n=e.control.activePanel,t=s(e.visiblePanels);if(n&&t.push(n),e.horizontal&&e.adaptive&&t.length){var i=Math.max.apply(Math,s(t.map((function(e){return e.height}))));e.viewport.setSize({height:i})}},n.updateOffset=function(){var e=B(this._flicking),n=this._position,t=e.panels.filter((function(e){return!e.rendered}));return this._offset=t.filter((function(e){return e.position+e.offset<n})).reduce((function(e,n){return e+n.sizeIncludingMargin}),0),this._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},n.updatePanelOrder=function(){var e=B(this._flicking);if(!e.horizontal)return this;var n=this._el,t=re(n).direction;return t!==this._panelOrder&&(this._panelOrder=t===N.RTL?N.RTL:N.LTR,e.initialized&&e.control.controller.updateDirection()),this},n.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},n.applyTransform=function(){var e=this._el,n=B(this._flicking);if(n.renderer.rendering||!n.initialized)return this;var t=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=n.horizontal?"translate("+(this._panelOrder===N.RTL?t:-t)+"px)":"translate(0, "+-t+"px)",this},n._resetInternalValues=function(){this._position=0,this._lookedOffset=0,this._alignPos=0,this._offset=0,this._circularOffset=0,this._circularEnabled=!1,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},n._refreshVisiblePanels=function(){var e=this,n=B(this._flicking),t=n.renderer.panels.filter((function(n){return e.canSee(n)})),i=this._visiblePanels;this._visiblePanels=t;var r=t.filter((function(e){return!J(i,e)})),o=i.filter((function(e){return!J(t,e)}));(r.length>0||o.length>0)&&n.renderer.render().then((function(){n.trigger(new g(A.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:t}))}))},n._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var n=B(this._flicking),t=n.renderer.panels;if(t.length<=0)return e.prev||(n.trigger(new g(A.NEED_PANEL,{direction:S.PREV})),e.prev=!0),void(e.next||(n.trigger(new g(A.NEED_PANEL,{direction:S.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=n.needPanelThreshold,s=i-this._alignPos,u=s+r,l=t[0],c=t[t.length-1];if(!e.prev)(s<=l.range.min+a||i<=o.min+a)&&(n.trigger(new g(A.NEED_PANEL,{direction:S.PREV})),e.prev=!0);if(!e.next)(u>=c.range.max-a||i>=o.max-a)&&(n.trigger(new g(A.NEED_PANEL,{direction:S.NEXT})),e.next=!0)}},n._checkReachEnd=function(e,n){var t=B(this._flicking),i=this._range,r=e>i.min&&e<i.max,o=n>i.min&&n<i.max;if(r&&!o){var a=n<=i.min?S.PREV:S.NEXT;t.trigger(new g(A.REACH_EDGE,{direction:a}))}},n._updateMode=function(){var e=B(this._flicking);if(e.circular){var n=new Pt(e),t=n.checkAvailability();if(t)this._mode=n;else{var i=e.circularFallback;this._mode=i===M.BOUND?new xt(e):new yt(e)}this._circularEnabled=t}else this._mode=e.bound?new xt(e):new yt(e),this._circularEnabled=!1},n._togglePanels=function(e,n){return n!==e&&B(this._flicking).renderer.panels.map((function(t){return t.toggle(e,n)})).some((function(e){return e}))},e}(),Tt={__proto__:null,Camera:Ot,LinearCameraMode:yt,CircularCameraMode:Pt,BoundCameraMode:xt},Rt=function(e,n){return Rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},Rt(e,n)};function wt(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}Rt(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var It=function(){return It=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},It.apply(this,arguments)};var At="undefined"!=typeof window,Ct=At?window.navigator.userAgent:"",St=!!At&&!!("getComputedStyle"in window),kt=/MSIE|Trident|Windows Phone|Edge/.test(Ct),Dt=!!At&&!!("addEventListener"in document),Mt="width",Nt="height";function zt(e,n){return e.getAttribute(n)||""}function jt(e){return[].slice.call(e)}function Lt(e,n){return void 0===n&&(n="data-"),"loading"in e&&"lazy"===e.getAttribute("loading")||!!e.getAttribute(n+"lazy")}function Ft(e,n,t){Dt?e.addEventListener(n,t,!1):e.attachEvent?e.attachEvent("on"+n,t):e["on"+n]=t}function Ht(e,n,t){e.removeEventListener?e.removeEventListener(n,t,!1):e.detachEvent?e.detachEvent("on"+n,t):e["on"+n]=null}function Vt(e,n){var t=e["client"+n]||e["offset"+n];return parseFloat(t||function(e){return(St?window.getComputedStyle(e):e.currentStyle)||{}}(e)[n.toLowerCase()])||0}function Bt(e,n,t){var i=jt(e.querySelectorAll(function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var i=Array(e),r=0;for(n=0;n<t;n++)for(var o=arguments[n],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(["["+t+"skip] ["+t+"width]"],n.map((function(e){return["["+t+"skip] "+e,e+"["+t+"skip]","["+t+"width] "+e].join(", ")}))).join(", ")));return jt(e.querySelectorAll("["+t+"width], "+n.join(", "))).filter((function(e){return-1===i.indexOf(e)}))}var Gt=[];function Xt(e,n){!Gt.length&&Ft(window,"resize",Ut),e.__PREFIX__=n,Gt.push(e),Wt(e)}function Wt(e,n){void 0===n&&(n="data-");var t=e.__PREFIX__||n,i=parseInt(zt(e,""+t+Mt),10)||0,r=parseInt(zt(e,""+t+Nt),10)||0;if(zt(e,t+"fixed")===Nt){var o=Vt(e,"Height")||r;e.style[Mt]=i/r*o+"px"}else{o=function(e){return Vt(e,"Width")}(e)||i;e.style[Nt]=r/i*o+"px"}}function Ut(){Gt.forEach((function(e){Wt(e)}))}var Yt=function(e){function n(n,t){void 0===t&&(t={});var i=e.call(this)||this;i.isReady=!1,i.isPreReady=!1,i.hasDataSize=!1,i.hasLoading=!1,i.isSkip=!1,i.onCheck=function(e){if(i.clear(),e&&"error"===e.type&&i.onError(i.element),!i.hasLoading||!i.checkElement()){var n=!i.hasDataSize&&!i.hasLoading;i.onReady(n)}},i.options=It({prefix:"data-"},t),i.element=n;var r=i.options.prefix;return i.hasDataSize=function(e,n){return void 0===n&&(n="data-"),!!e.getAttribute(n+"width")}(n,r),i.isSkip=function(e,n){return void 0===n&&(n="data-"),!!e.getAttribute(n+"skip")}(n,r),i.hasLoading=Lt(n,r),i}wt(n,e);var t=n.prototype;return t.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&Xt(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},t.addEvents=function(){var e=this,n=this.element;this.constructor.EVENTS.forEach((function(t){Ft(n,t,e.onCheck)}))},t.clear=function(){var e=this,n=this.element;this.constructor.EVENTS.forEach((function(t){Ht(n,t,e.onCheck)})),this.removeAutoSizer()},t.destroy=function(){this.clear(),this.off()},t.removeAutoSizer=function(){if(this.hasDataSize){var e=this.options.prefix;!function(e,n){var t=Gt.indexOf(e);if(!(t<0)){var i=zt(e,n+"fixed");delete e.__PREFIX__,e.style[i===Nt?Mt:Nt]="",Gt.splice(t,1),!Gt.length&&Ht(window,"resize",Ut)}}(this.element,e)}},t.onError=function(e){this.trigger("error",{element:this.element,target:e})},t.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onReady=function(e){this.isReady||((e=!this.isPreReady&&e)&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onAlreadyError=function(e){var n=this;setTimeout((function(){n.onError(e)}))},t.onAlreadyPreReady=function(){var e=this;setTimeout((function(){e.onPreReady()}))},t.onAlreadyReady=function(e){var n=this;setTimeout((function(){n.onReady(e)}))},n.EVENTS=[],n}(d),qt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}wt(n,e);var t=n.prototype;return t.setHasLoading=function(e){this.hasLoading=e},t.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(Xt(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},t.checkElement=function(){return!0},t.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},t.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},n.EVENTS=[],n}(Yt),Kt=function(e){function n(n){void 0===n&&(n={});var t=e.call(this)||this;return t.readyCount=0,t.preReadyCount=0,t.totalCount=0,t.totalErrorCount=0,t.isPreReadyOver=!0,t.elementInfos=[],t.options=It({loaders:{},prefix:"data-"},n),t}wt(n,e);var t=n.prototype;return t.check=function(e){var n=this,t=this.options.prefix;this.clear(),this.elementInfos=jt(e).map((function(e,i){var r=n.getLoader(e,{prefix:t});return r.check(),r.on("error",(function(e){n.onError(i,e.target)})).on("preReady",(function(e){var t=n.elementInfos[i];t.hasLoading=e.hasLoading,t.isSkip=e.isSkip;var r=n.checkPreReady(i);n.onPreReadyElement(i),r&&n.onPreReady()})).on("ready",(function(e){var t=e.withPreReady,r=e.hasLoading,o=e.isSkip,a=n.elementInfos[i];a.hasLoading=r,a.isSkip=o;var s=t&&n.checkPreReady(i),u=n.checkReady(i);t&&n.onPreReadyElement(i),n.onReadyElement(i),s&&n.onPreReady(),u&&n.onReady()})),{loader:r,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}}));var i=this.elementInfos.length;return this.totalCount=i,i||setTimeout((function(){n.onPreReady(),n.onReady()})),this},t.getTotalCount=function(){return this.totalCount},t.isPreReady=function(){return this.elementInfos.every((function(e){return e.isPreReady}))},t.isReady=function(){return this.elementInfos.every((function(e){return e.isReady}))},t.hasError=function(){return this.totalErrorCount>0},t.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach((function(e){e.loader&&e.loader.destroy()})),this.elementInfos=[]},t.destroy=function(){this.clear(),this.off()},t.getLoader=function(e,n){var t=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=n.prefix,a=Object.keys(r);if(r[i])return new r[i](e,n);var s=new qt(e,n),u=jt(e.querySelectorAll(a.join(", ")));s.setHasLoading(u.some((function(e){return Lt(e,o)})));var l=!1,c=this.clone().on("error",(function(e){s.onError(e.target)})).on("ready",(function(){s.onReady(l)}));return s.on("requestChildren",(function(){var n=Bt(e,a,t.options.prefix);c.check(n).on("preReady",(function(e){(l=e.isReady)||s.onPreReady()}))})).on("reqeustReadyChildren",(function(){c.check(u)})).on("requestDestroy",(function(){c.destroy()})),s},t.clone=function(){return new n(It({},this.options))},t.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},t.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},t.onError=function(e,n){var t=this.elementInfos[e];t.hasError=!0,this.trigger(new g("error",{element:t.element,index:e,target:n,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount}))},t.onPreReadyElement=function(e){var n=this.elementInfos[e];this.trigger(new g("preReadyElement",{element:n.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isSkip:n.isSkip}))},t.onPreReady=function(){this.isPreReadyOver=!0,this.trigger(new g("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()}))},t.onReadyElement=function(e){var n=this.elementInfos[e];this.trigger(new g("readyElement",{index:e,element:n.element,hasError:n.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:n.isSkip}))},t.onReady=function(){this.trigger(new g("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount}))},t.getErrorCount=function(){return this.elementInfos.filter((function(e){return e.hasError})).length},t.hasLoading=function(){return this.elementInfos.some((function(e){return e.hasLoading}))},n}(d),Zt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return wt(n,e),n.prototype.checkElement=function(){var e=this.element,n=e.getAttribute("src");if(e.complete){if(n)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),kt&&e.setAttribute("src",n),!0},n.EVENTS=["load","error"],n}(Yt),Qt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return wt(n,e),n.prototype.checkElement=function(){var e=this.element;return!(e.readyState>=1)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},n.EVENTS=["loadedmetadata","error"],n}(Yt),Jt=function(e){function n(n){return void 0===n&&(n={}),e.call(this,It({loaders:{img:Zt,video:Qt}},n))||this}return wt(n,e),n}(Kt),$t=function(){function e(e){var n=e.align,t=void 0===n?C.CENTER:n,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,this._align=t,this._strategy=i}var n=e.prototype;return Object.defineProperty(n,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendering",{get:function(){return this._rendering},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e;var n=q(e);this._panels.forEach((function(e){e.align=n}))},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._collectPanels(),this},n.destroy=function(){this._flicking=null,this._panels=[]},n.getPanel=function(e){return this._panels[e]||null},n.forceRenderAllPanels=function(){return this._panels.forEach((function(e){return e.markForShow()})),Promise.resolve()},n.updatePanelSize=function(){var e=B(this._flicking),n=this._panels;if(n.length<=0)return this;if(e.panelsPerView>0){var t=n[0];t.resize(),this._updatePanelSizeByGrid(t,n)}else e.panels.forEach((function(e){return e.resize()}));return this},n.batchInsert=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchInsertDefer.apply(this,s(e));return t.length<=0?[]:(this.updateAfterPanelChange(t,[]),t)},n.batchInsertDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=B(this._flicking),o=i[0],a=q(this._align);return n.reduce((function(n,t){var u,l=Q(t.index,i.length),c=i.slice(l),h=t.elements.map((function(n,t){return e._createPanel(n,{index:l+t,align:a,flicking:r})}));if(i.splice.apply(i,s([l,0],h)),t.hasDOMInElements&&e._insertPanelElements(h,null!==(u=c[0])&&void 0!==u?u:null),r.panelsPerView>0){var f=o||h[0].resize();e._updatePanelSizeByGrid(f,h)}else h.forEach((function(e){return e.resize()}));return c.forEach((function(e){e.increaseIndex(h.length),e.updatePosition()})),s(n,h)}),[])},n.batchRemove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchRemoveDefer.apply(this,s(e));return t.length<=0?[]:(this.updateAfterPanelChange([],t),t)},n.batchRemoveDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=B(this._flicking).control,o=r.activePanel;return n.reduce((function(n,t){var a=t.index,u=t.deleteCount,l=Q(a,i.length),c=i.slice(l+u),h=i.splice(l,u);return h.length<=0?[]:(c.forEach((function(e){e.decreaseIndex(h.length),e.updatePosition()})),t.hasDOMInElements&&e._removePanelElements(h),h.forEach((function(e){return e.destroy()})),J(h,o)&&r.resetActive(),s(n,h))}),[])},n.updateAfterPanelChange=function(e,n){var t,i=B(this._flicking),r=i.camera,o=i.control,a=this._panels,u=o.activePanel;if(this._updateCameraAndControl(),i.autoResize&&i.useResizeObserver&&(e.forEach((function(e){e.element&&i.autoResizer.observe(e.element)})),n.forEach((function(e){e.element&&i.autoResizer.unobserve(e.element)}))),this.render(),!i.animating)if(!u||u.removed)if(a.length<=0)r.lookAt(0);else{var l=null!==(t=null==u?void 0:u.index)&&void 0!==t?t:0;l>a.length-1&&(l=a.length-1),o.moveToPanel(a[l],{duration:0}).catch((function(){}))}else o.moveToPanel(u,{duration:0}).catch((function(){}));i.camera.updateOffset(),(e.length>0||n.length>0)&&(i.trigger(new g(A.PANEL_CHANGE,{added:e,removed:n})),this.checkPanelContentsReady(s(e,n)))},n.checkPanelContentsReady=function(e){var n=this,t=B(this._flicking),i=t.resizeOnContentsReady,r=this._panels;if(i&&!t.virtualEnabled){if(!((e=e.filter((function(e){return function(e){return e.element&&!!e.element.querySelector("img, video")}(e)}))).length<=0)){var o=new Jt;e.forEach((function(e){e.loading=!0})),o.on("readyElement",(function(i){if(n._flicking){var a=e[i.index],s=t.camera,u=t.control,l=u.activePanel?s.getProgressInPanel(u.activePanel):0;a.loading=!1,a.resize(),r.slice(a.index+1).forEach((function(e){return e.updatePosition()})),t.initialized&&(s.updateRange(),s.updateOffset(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()})),o.on("preReady",(function(e){n._flicking&&n.render(),e.readyCount===e.totalCount&&o.destroy()})),o.on("ready",(function(){n._flicking&&n.render(),o.destroy()})),o.check(e.map((function(e){return e.element})))}}},n._updateCameraAndControl=function(){var e=B(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateOffset(),n.updateAnchors(),n.resetNeedPanelHistory(),t.updateInput()},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in t||n.loading?n.markForShow():e.holding||n.markForHide()}))},n._updatePanelSizeByGrid=function(e,n){var i=B(this._flicking),r=i.panelsPerView;if(r<=0)throw new ge(E("panelsPerView",r),p.WRONG_OPTION);if(!(n.length<=0)){var o=(i.camera.size-(e.margin.prev+e.margin.next)*(r-1))/r,a=i.horizontal?{width:o}:{height:o},s=t({size:o,margin:e.margin},!i.horizontal&&{height:e.height});i.noPanelStyleOverride||this._strategy.updatePanelSizes(i,a),i.panels.forEach((function(e){return e.resize(s)}))}},n._removeAllChildsFromCamera=function(){for(var e=B(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},n._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=B(this._flicking).camera.element,i=(null==n?void 0:n.element)||null,r=document.createDocumentFragment();e.forEach((function(e){return r.appendChild(e.element)})),t.insertBefore(r,i)},n._removePanelElements=function(e){var n=B(this._flicking).camera.element;e.forEach((function(e){n.removeChild(e.element)}))},n._afterRender=function(){B(this._flicking).camera.applyTransform()},e}(),ei=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var o=t.prototype;return o.render=function(){return i(this,void 0,void 0,(function(){var e,n;return r(this,(function(t){return e=B(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),this._afterRender(),[2]}))}))},o._collectPanels=function(){var e=B(this._flicking),n=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,n.children)},o._createPanel=function(e,n){return this._strategy.createPanel(e,n)},o._resetPanelElementOrder=function(){var e=B(this._flicking),n=e.camera.element,t=this._strategy.getRenderingElementsByOrder(e).reverse();t.forEach((function(e,i){var r=t[i-1]?t[i-1]:null;e.nextElementSibling!==r&&n.insertBefore(e,r)}))},o._removeAllTextNodes=function(){var e=B(this._flicking).camera.element;G(e.childNodes).forEach((function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)}))},t}($t),ni=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i._removePanelElements=function(e){},i._removeAllChildsFromCamera=function(){},t}($t),ti=function(){function e(e){var n=e.index,t=e.align,i=e.flicking,r=e.elementProvider;this._index=n,this._flicking=i,this._elProvider=r,this._align=t,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(n,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(n,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){var e=this._toggleDirection,n=this._flicking.camera.rangeDiff;return e!==S.NONE&&this._toggled?e===S.PREV?-n:n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(n,"outsetProgress",{get:function(){var e=this.position+this.offset,n=this._alignPos,t=this._flicking.camera,i=t.position;if(i===e)return 0;if(i<e){var r=e+(t.size-t.alignPosition)+n;return-ie(i,e,r)}var o=e-(t.alignPosition+this._size-n);return 1-ie(i,o,e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRatio",{get:function(){var e=this.range,n=this._size,t=this.offset,i=this._flicking.camera.visibleRange,r=e.min+t,o=e.max+t;if(o<=i.min||r>=i.max)return 0;var a=n;return i.min>r&&(a-=i.min-r),i.max<o&&(a-=o-i.max),a/n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e,this._updateAlignPos()},enumerable:!1,configurable:!0}),n.markForShow=function(){this._rendered=!0,this._elProvider.show(this._flicking)},n.markForHide=function(){this._rendered=!1,this._elProvider.hide(this._flicking)},n.resize=function(e){var n,i=this.element,r=this._flicking,o=r.horizontal,a=r.useFractionalSize;if(!i)return this;if(e)this._size=e.size,this._margin=t({},e.margin),this._height=null!==(n=e.height)&&void 0!==n?n:le({el:i,horizontal:!1,useFractionalSize:a,useOffset:!0,style:re(i)});else{var s=re(i);this._size=le({el:i,horizontal:o,useFractionalSize:a,useOffset:!0,style:s}),this._margin=o?{prev:parseFloat(s.marginLeft||"0"),next:parseFloat(s.marginRight||"0")}:{prev:parseFloat(s.marginTop||"0"),next:parseFloat(s.marginBottom||"0")},this._height=o?le({el:i,horizontal:!1,useFractionalSize:a,useOffset:!0,style:s}):this._size}return this.updatePosition(),this._updateAlignPos(),this},n.setSize=function(e){return oe(this.element,e),this},n.contains=function(e){var n;return!!(null===(n=this.element)||void 0===n?void 0:n.contains(e))},n.destroy=function(){this._resetInternalStates(),this._removed=!0},n.includePosition=function(e,n){return void 0===n&&(n=!1),this.includeRange(e,e,n)},n.includeRange=function(e,n,t){void 0===t&&(t=!1);var i=this._margin,r=this.range;return t&&(r.min-=i.prev,r.max+=i.next),n>=r.min&&e<=r.max},n.isVisibleOnRange=function(e,n){var t=this.range;return n>t.min&&e<t.max},n.focus=function(e){return this._flicking.moveTo(this._index,e)},n.prev=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(0===e?i-1:e-1):t.getPanel(e-1)},n.next=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(e===i-1?0:e+1):t.getPanel(e+1)},n.increaseIndex=function(e){return this._index+=Math.max(e,0),this},n.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},n.updatePosition=function(){var e=this._flicking.renderer.panels[this._index-1];return this._pos=e?e.range.max+e.margin.next+this._margin.prev:this._margin.prev,this},n.toggle=function(e,n){var t=this._toggleDirection,i=this._togglePosition;if(t===S.NONE||n===e)return!1;var r=this._toggled;return n>e?i>=e&&i<=n&&(this._toggled=t===S.NEXT):i<=e&&i>=n&&(this._toggled=t!==S.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=S.NONE,this._togglePosition=0,this._toggled=!1,this;var n=e.camera,t=n.range,i=n.alignPosition,r=n.visibleRange,o=r.max-r.min,a=t.min-i,s=t.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=S.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):l?(this._toggleDirection=S.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=S.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=X(this._align,this._size)},n._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=S.NONE},e}(),ii=function(){function e(e){var n=e.providerCtor;this._providerCtor=n}var n=e.prototype;return n.renderPanels=function(){},n.getRenderingIndexesByOrder=function(e){var n=e.renderer.panels.filter((function(e){return e.rendered})),t=n.filter((function(e){return e.toggled&&e.toggleDirection===S.PREV})),i=n.filter((function(e){return e.toggled&&e.toggleDirection===S.NEXT}));return s(t,n.filter((function(e){return!e.toggled})),i).map((function(e){return e.index}))},n.getRenderingElementsByOrder=function(e){var n=e.panels;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].element}))},n.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach((function(e){return e.markForShow()}))},n.collectPanels=function(e,n){var t=this,i=q(e.renderer.align);return n.map((function(n,r){return new ti({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})}))},n.createPanel=function(e,n){return new ti(t(t({},n),{elementProvider:new this._providerCtor(e)}))},n.updatePanelSizes=function(e,n){e.panels.forEach((function(e){return e.setSize(n)}))},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(n){n.index in i||n.loading?n.markForShow():e.holding||n.markForHide()})),t.updateOffset()},e}(),ri=function(e){function t(n){var t=e.call(this,n)||this;return n.elementProvider.init(t),t._elProvider=n.elementProvider,t._cachedInnerHTML=null,t}n(t,e);var i=t.prototype;return Object.defineProperty(i,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(i,"elementIndex",{get:function(){var e=this._flicking,n=e.panelsPerView+1,t=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===S.NEXT?i+t:i-t),se(i,n)},enumerable:!1,configurable:!0}),i.cacheRenderResult=function(e){this._cachedInnerHTML=e},i.uncacheRenderResult=function(){this._cachedInnerHTML=null},i.render=function(){var e=this._flicking.virtual,n=e.renderPanel,t=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||n(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,t&&this.cacheRenderResult(r))},i.increaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,n)},i.decreaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,n)},t}(ti),oi=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=ue(e.panelsPerView+1);t.forEach((function(e){var t=e.elementIndex;e.render(),n.show(t),i[t]=-1})),i.filter((function(e){return e>=0})).forEach((function(e){n.hide(e)}))},n.getRenderingIndexesByOrder=function(e){var n=e.virtual,i=s(e.visiblePanels).filter((function(e){return e.rendered})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)}));return i.length<=0?n.elements.map((function(e,n){return n})):s(i.map((function(e){return e.elementIndex})),n.elements.map((function(e,n){return t(t({},e),{idx:n})})).filter((function(e){return!e.visible})).map((function(e){return e.idx})))},n.getRenderingElementsByOrder=function(e){var n=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map((function(e){return n[e].nativeElement}))},n.updateRenderingPanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce((function(e,n){return e[n.index]=!0,e}),{});n.forEach((function(e){e.index in i||e.loading?e.markForShow():e.markForHide()})),t.updateOffset()},n.collectPanels=function(e){var n=q(e.renderer.align);return ue(e.virtual.initialPanelCount).map((function(t){return new ri({index:t,elementProvider:new me(e),align:n,flicking:e})}))},n.createPanel=function(e,n){return new ri(t(t({},n),{elementProvider:new me(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach((function(e){oe(e.nativeElement,n)})),e.panels.forEach((function(e){return e.setSize(n)}))},e}(),ai={__proto__:null,Renderer:$t,VanillaRenderer:ei,ExternalRenderer:ni,NormalRenderingStrategy:ii,VirtualRenderingStrategy:oi},si=function(e){function o(n,t){var i=void 0===t?{}:t,r=i.align,o=void 0===r?C.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,u=i.horizontal,l=void 0===u||u,c=i.circular,h=void 0!==c&&c,f=i.circularFallback,d=void 0===f?M.LINEAR:f,g=i.bound,p=void 0!==g&&g,v=i.adaptive,_=void 0!==v&&v,m=i.panelsPerView,b=void 0===m?-1:m,E=i.noPanelStyleOverride,y=void 0!==E&&E,P=i.resizeOnContentsReady,x=void 0!==P&&P,O=i.nested,T=void 0!==O&&O,R=i.needPanelThreshold,w=void 0===R?0:R,I=i.preventEventsBeforeInit,A=void 0===I||I,S=i.deceleration,k=void 0===S?.0075:S,D=i.duration,N=void 0===D?500:D,z=i.easing,j=void 0===z?function(e){return 1-Math.pow(1-e,3)}:z,L=i.inputType,H=void 0===L?["mouse","touch"]:L,V=i.moveType,B=void 0===V?"snap":V,G=i.threshold,X=void 0===G?40:G,W=i.dragThreshold,U=void 0===W?1:W,Y=i.interruptable,q=void 0===Y||Y,K=i.bounce,Z=void 0===K?"20%":K,Q=i.iOSEdgeSwipeThreshold,J=void 0===Q?30:Q,$=i.preventClickOnDrag,ee=void 0===$||$,ne=i.preventDefaultOnDrag,te=void 0!==ne&&ne,ie=i.disableOnInit,re=void 0!==ie&&ie,oe=i.changeOnHold,ae=void 0!==oe&&oe,se=i.renderOnlyVisible,ue=void 0!==se&&se,le=i.virtual,ce=void 0===le?null:le,he=i.autoInit,fe=void 0===he||he,de=i.autoResize,ge=void 0===de||de,_e=i.useResizeObserver,me=void 0===_e||_e,Ee=i.resizeDebounce,ye=void 0===Ee?0:Ee,Pe=i.observePanelResize,xe=void 0!==Pe&&Pe,Oe=i.maxResizeDebounce,Te=void 0===Oe?100:Oe,Re=i.useFractionalSize,we=void 0!==Re&&Re,Ie=i.externalRenderer,Ae=void 0===Ie?null:Ie,Ce=i.renderExternal,Se=void 0===Ce?null:Ce,ke=i.optimizeSizeUpdate,De=void 0!==ke&&ke,Me=e.call(this)||this;return Me._initialized=!1,Me._plugins=[],Me._isResizing=!1,Me._align=o,Me._defaultIndex=s,Me._horizontal=l,Me._circular=h,Me._circularFallback=d,Me._bound=p,Me._adaptive=_,Me._panelsPerView=b,Me._noPanelStyleOverride=y,Me._resizeOnContentsReady=x,Me._nested=T,Me._virtual=ce,Me._needPanelThreshold=w,Me._preventEventsBeforeInit=A,Me._deceleration=k,Me._duration=N,Me._easing=j,Me._inputType=H,Me._moveType=B,Me._threshold=X,Me._dragThreshold=U,Me._interruptable=q,Me._bounce=Z,Me._iOSEdgeSwipeThreshold=J,Me._preventClickOnDrag=ee,Me._preventDefaultOnDrag=te,Me._disableOnInit=re,Me._changeOnHold=ae,Me._renderOnlyVisible=ue,Me._autoInit=fe,Me._autoResize=ge,Me._useResizeObserver=me,Me._resizeDebounce=ye,Me._maxResizeDebounce=Te,Me._observePanelResize=xe,Me._useFractionalSize=we,Me._externalRenderer=Ae,Me._renderExternal=Se,Me._optimizeSizeUpdate=De,Me._viewport=new pe(Me,F(n)),Me._autoResizer=new ve(Me),Me._renderer=Me._createRenderer(),Me._camera=Me._createCamera(),Me._control=Me._createControl(),Me._virtualManager=new be(Me,ce),Me._autoInit&&Me.init(),Me}n(o,e);var a=o.prototype;return Object.defineProperty(a,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(a,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResizer",{get:function(){return this._autoResizer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(a,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(a,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(a,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(a,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(a,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(a,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(a,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e,this._control.controller.updateDirection(),this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circular",{get:function(){return this._circular},set:function(e){this._circular=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bound",{get:function(){return this._bound},set:function(e){this._bound=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e,e&&this._renderer.checkPanelContentsReady(this._renderer.panels)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"nested",{get:function(){return this._nested},set:function(e){this._nested=e;var n=this._control.controller.axes;n&&(n.options.nested=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e;var n=this._control.controller.axes;n&&(n.options.deceleration=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"easing",{get:function(){return this._easing},set:function(e){this._easing=e;var n=this._control.controller.axes;n&&(n.options.easing=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e;var n=this._control.controller.panInput;n&&(n.options.inputType=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e;var n=this._control,t=this._createControl(),i=n.activePanel;t.copy(n);var r=i?this._camera.getProgressInPanel(i):0;this._control=t,this._control.updatePosition(r),this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"dragThreshold",{get:function(){return this._dragThreshold},set:function(e){this._dragThreshold=e;var n=this._control.controller.panInput;n&&(n.options.threshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e;var n=this._control.controller.axes;n&&(n.options.interruptable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e,this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e;var n=this._control.controller.panInput;n&&(n.options.iOSEdgeSwipeThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var n=this._control.controller;e?n.addPreventClickHandler():n.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventDefaultOnDrag",{get:function(){return this._preventDefaultOnDrag},set:function(e){this._preventDefaultOnDrag=e;var n=this._control.controller.panInput;n&&(n.options.preventDefaultOnDrag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e,this._renderer.render()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,this._initialized&&(e?this._autoResizer.enable():this._autoResizer.disable())},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._initialized&&this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"observePanelResize",{get:function(){return this._observePanelResize},set:function(e){this._observePanelResize=e,this._initialized&&this._autoResize&&(e?this._autoResizer.observePanels():this._autoResizer.unobservePanels())},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useFractionalSize",{get:function(){return this._useFractionalSize},enumerable:!1,configurable:!0}),Object.defineProperty(a,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),Object.defineProperty(a,"optimizeSizeUpdate",{get:function(){return this._optimizeSizeUpdate},set:function(e){this._optimizeSizeUpdate=e},enumerable:!1,configurable:!0}),a.init=function(){var e=this;if(this._initialized)return Promise.resolve();var n=this._camera,t=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit;return n.init(),r.init(),t.init(this),i.init(this),a&&(this.trigger=function(){return e}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),t.checkPanelContentsReady(t.panels),this._initialized=!0,t.render().then((function(){e._plugins.forEach((function(n){return n.init(e)})),a&&(e.trigger=o),e.trigger(new g(A.READY))}))},a.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach((function(e){return e.destroy()})),this._initialized=!1},a.prev=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.prev())||void 0===t?void 0:t.index)&&void 0!==i?i:-1,e,S.PREV)},a.next=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.next())||void 0===t?void 0:t.index)&&void 0!==i?i:this._renderer.panelCount,e,S.NEXT)},a.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=S.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new ge(R,p.ANIMATION_ALREADY_PLAYING)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:n,direction:t})):Promise.reject(new ge(y(e,0,r-1),p.INDEX_OUT_OF_RANGE))},a.updateAnimation=function(e,n,t){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new ge(y(e,0,r-1),p.INDEX_OUT_OF_RANGE);this._control.updateAnimation(o,n,t)}},a.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},a.getPanel=function(e){return this._renderer.getPanel(e)},a.enableInput=function(){return this._control.enable(),this},a.disableInput=function(){return this._control.disable(),this},a.getStatus=function(e){var n,t,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,u=i.includePanelHTML,l=void 0!==u&&u,c=i.visiblePanelsOnly,h=void 0!==c&&c,f=this._camera,d={panels:(h?this.visiblePanels:this.panels).map((function(e){var n={index:e.index};return l&&(n.html=e.element.outerHTML),n}))};if(o&&(d.index=this.index),s){var g=f.findNearestAnchor(f.position);g&&(d.position={panel:g.panel.index,progressInPanel:f.getProgressInPanel(g.panel)})}if(h){var p=this.visiblePanels;d.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return d},a.setStatus=function(e){var n;if(!this._initialized)throw new ge(I,p.NOT_INITIALIZED);var t=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(n=o[0])||void 0===n?void 0:n.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:Z(o.map((function(e){return e.html}))),hasDOMInElements:!0})),null!=t){var u=r?t-r:t;this.moveTo(u,0).catch((function(){}))}if(i&&this._moveType===k.FREE_SCROLL){var l=i.panel,c=i.progressInPanel,h=(u=r?l-r:l,a.panels[u].range),f=h.min+(h.max-h.min)*c;s.moveToPosition(f,0).catch((function(){}))}},a.addPlugins=function(){for(var e,n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return this._initialized&&t.forEach((function(e){return e.init(n)})),(e=this._plugins).push.apply(e,s(t)),this},a.removePlugins=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.forEach((function(n){var t=te(e._plugins,(function(e){return e===n}));t>=0&&(n.destroy(),e._plugins.splice(t,1))})),this},a.resize=function(){return i(this,void 0,void 0,(function(){var e,n,t,i,o,a,s,u,l,c,h;return r(this,(function(r){switch(r.label){case 0:return this._isResizing?[2]:(this._isResizing=!0,e=this._viewport,n=this._renderer,t=this._camera,i=this._control,o=i.activePanel,a=e.width,s=e.height,u=o?t.getProgressInPanel(o):0,this.trigger(new g(A.BEFORE_RESIZE,{width:a,height:s,element:e.element})),e.resize(),this._optimizeSizeUpdate?this.horizontal&&e.width!==a||!this.horizontal&&e.height!==s?[4,n.forceRenderAllPanels()]:[3,2]:[3,3]);case 1:r.sent(),r.label=2;case 2:return[3,5];case 3:return[4,n.forceRenderAllPanels()];case 4:r.sent(),r.label=5;case 5:return this._initialized?(n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateAdaptiveHeight(),t.updatePanelOrder(),t.updateOffset(),[4,n.render()]):[2];case 6:return r.sent(),this._initialized?(i.animating||(i.updatePosition(u),i.updateInput()),l=e.width,c=e.height,h=l!==a||c!==s,this.trigger(new g(A.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:a,height:s},sizeChanged:h,element:e.element})),this._isResizing=!1,[2]):[2]}}))}))},a.append=function(e){return this.insert(this._renderer.panelCount,e)},a.prepend=function(e){return this.insert(0,e)},a.insert=function(e,n){if(this._renderExternal)throw new ge(w,p.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:Z(n),hasDOMInElements:!0})},a.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new ge(w,p.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!0})},a._createControl=function(){var e,n=this._moveType,t=Object.keys(k).map((function(e){return k[e]})),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!J(t,i))throw new ge(E("moveType",JSON.stringify(n)),p.WRONG_OPTION);switch(i){case k.SNAP:return new vt(r);case k.FREE_SCROLL:return new _t(r);case k.STRICT:return new mt(r)}},a._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new Ot(this,{align:this._align})},a._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},a._createExternalRenderer=function(){var e=this._renderExternal,n=e.renderer,i=e.rendererOptions;return new n(t({align:this._align},i))},a._createVanillaRenderer=function(){var e=this.virtualEnabled;return new ei({align:this._align,strategy:e?new oi:new ii({providerCtor:_e})})},a._moveToInitialPanel=function(){var e=this._renderer,n=this._control,t=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=t.findNearestAnchor(i.position),o=r&&i.position!==r.panel.position&&i.index!==r.panel.index?r.panel:i;if(n.setActive(o,null,!1),!r)throw new ge(P(o.position),p.POSITION_NOT_REACHABLE);var a=o.position;t.canReach(o)||(a=r.position),t.lookAt(a),n.updateInput(),t.updateOffset()}},a._initialResize=function(){var e=this._viewport,n=this._renderer,t=this._camera,i=this._control;this.trigger(new g(A.BEFORE_RESIZE,{width:0,height:0,element:e.element})),e.resize(),n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateOffset(),i.updateInput();var r=e.width,o=e.height,a=0!==r||0!==o;this.trigger(new g(A.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:0,height:0},sizeChanged:a,element:e.element}))},o.VERSION="4.14.0",o}(d),ui={HOLD_START:"sideHoldStart",HOLD_END:"sideHoldEnd",MOVE_START:"sideMoveStart",MOVE:"sideMove",MOVE_END:"sideMoveEnd",WILL_CHANGE:"sideWillChange",CHANGED:"sideChanged",WILL_RESTORE:"sideWillRestore",RESTORED:"sideRestored"},li={__proto__:null,SIDE_EVENTS:ui,CrossFlicking:function(e){function i(n,t){var i=e.call(this,n,t)||this;i._syncToCategory=function(e,n){i._disableIndexSync||(i.stopAnimation(),i._sideFlicking.forEach((function(t,r){var o=i._sideState[r],a=o.start,s=o.end;a<=e&&s>=e&&n!==r&&(t.stopAnimation(),t.moveTo(e,0),i.moveTo(r,0))})))},i._setDraggable=function(e,n){if(i._disableSlideOnHold){var t=i._originalDragThreshold,r=n?t&&t>=10?t:10:1/0;e===z.HORIZONTAL===i.horizontal?i.dragThreshold=r:e===z.VERTICAL===i.horizontal&&i._sideFlicking.forEach((function(e){e.dragThreshold=r}))}},i._setPreviousSideIndex=function(){i._sideFlicking.forEach((function(e,n){var t=i._sideState[n],r=t.start,o=t.end;i._preserveIndex?i._nextIndex!==n&&(e.index<r?(e.stopAnimation(),e.moveTo(r,0)):e.index>o&&(e.stopAnimation(),e.moveTo(o,0))):i._nextIndex!==n&&e.moveTo(r,0)}))},i._addSideIndex=function(e){e.sideIndex=i._sideFlicking[e.index].index},i._onHorizontalHoldStart=function(){i._setDraggable(z.HORIZONTAL,!0),i._moveDirection=null},i._onHorizontalMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(z.VERTICAL,!1),i._moveDirection=z.HORIZONTAL)},i._onHorizontalMoveEnd=function(e){var n=i.visiblePanels;n.length>1?i._nextIndex="NEXT"===e.direction?n[1].index:n[0].index:i._nextIndex=n[0].index,i._setDraggable(z.VERTICAL,!0),i._moveDirection=null,requestAnimationFrame((function(){return i._setPreviousSideIndex()})),e.isTrusted&&i._syncToCategory(i._sideFlicking[i._nextIndex].index,i._nextIndex)},i._onSideHoldStart=function(){i._setDraggable(z.VERTICAL,!0),i._moveDirection=null},i._onSideMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(z.HORIZONTAL,!1),i._moveDirection=z.VERTICAL)},i._onSideMoveEnd=function(){i._setDraggable(z.HORIZONTAL,!0),i._moveDirection=null},i._onSideChanged=function(e){i.visiblePanels.length<2&&i._sideFlicking[i.index]===e.currentTarget&&i._syncToCategory(e.index,i.index)};var r=t.sideOptions,o=void 0===r?{}:r,a=t.preserveIndex,s=void 0===a||a,u=t.disableSlideOnHold,l=void 0===u||u,c=t.disableIndexSync,h=void 0!==c&&c;return i._moveDirection=null,i._nextIndex=0,i._originalDragThreshold=i.dragThreshold,i._sideOptions=o,i._preserveIndex=s,i._disableSlideOnHold=l,i._disableIndexSync=h,i}n(i,e);var r=i.prototype;return Object.defineProperty(r,"sideFlicking",{get:function(){return this._sideFlicking},enumerable:!1,configurable:!0}),Object.defineProperty(r,"sideIndex",{get:function(){return this._sideFlicking.map((function(e){return e.index}))},enumerable:!1,configurable:!0}),Object.defineProperty(r,"sideState",{get:function(){return this._sideState},enumerable:!1,configurable:!0}),Object.defineProperty(r,"sideOptions",{get:function(){return this._sideOptions},set:function(e){this._sideOptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"preserveIndex",{get:function(){return this._preserveIndex},set:function(e){this._preserveIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"disableSlideOnHold",{get:function(){return this._disableSlideOnHold},set:function(e){this._disableSlideOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"disableIndexSync",{get:function(){return this._disableIndexSync},set:function(e){this._disableIndexSync=e},enumerable:!1,configurable:!0}),r.init=function(){var n=this;return e.prototype.init.call(this).then((function(){n._sideState=n._createSideState(),n._sideFlicking=n._createSideFlicking(),n._addComponentEvents()}))},r.destroy=function(){this._sideFlicking.forEach((function(e){e.destroy()})),e.prototype.destroy.call(this)},r._addComponentEvents=function(){var e=this;this.on(A.HOLD_START,this._onHorizontalHoldStart),this.on(A.MOVE,this._onHorizontalMove),this.on(A.MOVE_END,this._onHorizontalMoveEnd),[A.CHANGED,A.WILL_CHANGE].forEach((function(n){e.on(n,e._addSideIndex)})),this._sideFlicking.forEach((function(n,i){n.on(A.HOLD_START,e._onSideHoldStart),n.on(A.MOVE,e._onSideMove),n.on(A.MOVE_END,e._onSideMoveEnd),n.on(A.CHANGED,e._onSideChanged),Object.keys(ui).forEach((function(r){n.on(A[r],(function(n){e.trigger(new g(ui[r],t({mainIndex:i},n)))}))}))}))},r._createSideState=function(){var e=this.element,n=this.camera.element,t=G(n.children),i=[];if(fe(e,"data-cross-").structure)i=this._getSideStateFromCrossStructure(t);else{var r=this._getGroupFromAttribute(t),o=Object.keys(r);o.length?(i=this._getSideStateFromGroup(r),this.remove(0,this.panelCount-o.length)):i=this._getSideStateFromPanels(t),this._createCrossStructure(i)}return this.resize(),i},r._createCrossStructure=function(e){var n=this,t=document.createElement("div"),i="";t.classList.add(D.CAMERA),e.forEach((function(e,t){var r=n.camera.children[t];i+=e.element.innerHTML,Array.from(r.attributes).forEach((function(e){return r.removeAttribute(e.name)}))})),t.innerHTML=i,e.forEach((function(e,i){var r=n.camera.children[i];[D.VIEWPORT,D.VERTICAL].forEach((function(e){r.classList.contains(e)||r.classList.add(e)})),r.innerHTML=t.outerHTML})),this.element.setAttribute("data-cross-structure","true")},r._getGroupFromAttribute=function(e){var n=[],t={};return e.forEach((function(e){var i=fe(e,"data-cross-").groupkey;i&&!J(n,i)?(n.push(i),t[i]=[e]):i&&t[i].push(e)})),t},r._getSideStateFromGroup=function(e){return Object.keys(e).reduce((function(n,t){var i=n.length?+n[n.length-1].end+1:0,r=e[t].reduce((function(e,n){return e.innerHTML+=n.outerHTML,e}),document.createElement("div"));return s(n,[{key:t,start:i,end:i+e[t].length-1,element:r}])}),[])},r._getSideStateFromPanels=function(e){return e.reduce((function(e,n,t){var i=e.length?+e[e.length-1].end+1:0;return s(e,[{key:t.toString(),start:i,end:i+n.children.length-1,element:n}])}),[])},r._getSideStateFromCrossStructure=function(e){var n=this._getGroupFromAttribute(e);return this._getSideStateFromGroup(n)},r._createSideFlicking=function(){var e=this;return this.sideState.map((function(n,i){return new si(e.camera.children[i],t(t({},e.sideOptions),{horizontal:!1,panelsPerView:1,defaultIndex:n.start}))}))},i}(si)},ci=function(e,n,t,i,r){return e.batchInsertDefer.apply(e,s(n.added.slice(i,r).map((function(e,n){return{index:e,elements:[t[n]],hasDOMInElements:!1}}))))},hi=function(e,n,t){var i=e.panels.slice(n,t);return e.batchRemoveDefer({index:n,deleteCount:i.length,hasDOMInElements:!1})},fi=function(e){var n="object"==typeof e?e.camera:e;return gi(n)},di=function(e){var n="object"==typeof e?e.panel:e;return Y(gi(n))},gi=function(e){if("number"==typeof e)return e+"px";switch(e){case C.CENTER:return"50%";case C.NEXT:return"100%";case C.PREV:return"0%";default:return e}},pi={__proto__:null,withFlickingMethods:function(e,n){[d.prototype,si.prototype].forEach((function(t){Object.getOwnPropertyNames(t).filter((function(n){return!e[n]&&0!==n.indexOf("_")&&"constructor"!==n})).forEach((function(i){var r=Object.getOwnPropertyDescriptor(t,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return(e=r.value).call.apply(e,s([this[n]],t))}});else{var o={};r.get&&(o.get=function(){var e,t=this[n];return t&&(null===(e=r.get)||void 0===e?void 0:e.call(t))}),r.set&&(o.set=function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return null===(e=r.set)||void 0===e?void 0:e.call.apply(e,s([this[n]],t))}),Object.defineProperty(e,i,o)}}))}))},sync:function(e,n,t){var i=e.renderer,r=i.panels,o=s(n.prevList),u=[],l=[];if(n.removed.length>0){var c=-1,h=-1;n.removed.forEach((function(e){c<0&&(c=e),h>=0&&e!==h-1?(l.push.apply(l,s(hi(i,h,c+1))),c=e,h=e):h=e,o.splice(e,1)})),l.push.apply(l,s(hi(i,h,c+1)))}if(n.ordered.forEach((function(e){var n=a(e,2),t=n[0],i=n[1],o=r.splice(t,1)[0];r.splice(i,0,o)})),n.ordered.length>0&&(r.forEach((function(e,n){var t=n-e.index;t>0?e.increaseIndex(t):e.decreaseIndex(-t)})),r.sort((function(e,n){return e.index-n.index})),r.forEach((function(e){e.updatePosition()}))),n.added.length>0){var f=-1,d=-1,g=t.slice(o.length);n.added.forEach((function(e,t){f<0&&(f=t),d>=0&&e!==d+1?(u.push.apply(u,s(ci(i,n,g,f,t+1))),f=-1,d=-1):d=e})),f>=0&&u.push.apply(u,s(ci(i,n,g,f)))}(n.added.length>0||n.removed.length>0)&&i.updateAfterPanelChange(u,l)},getRenderingPanels:function(e,n){var t=n.removed.reduce((function(e,n){return e[n]=!0,e}),{}),i=n.maintained.reduce((function(e,n){var t=a(n,2),i=t[0],r=t[1];return e[i]=r,e}),{});return s(e.panels.filter((function(e){return!t[e.index]})).sort((function(e,n){return e.position+e.offset-(n.position+n.offset)})).map((function(e){return n.list[i[e.index]]})),n.added.map((function(e){return n.list[e]})))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=C.CENTER),void 0===n&&(n=!0);var i=fi(e),r=di(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}},vi=function(e){return!e.circular&&0===e.index},_i=function(e){return!e.circular&&e.index===e.panelCount-1},mi=function(e){return e.panelCount},bi=function(e){return e.index},Ei=function(e){var n=e.camera,t=(n.position-n.range.min)/(n.range.max-n.range.min);return 100*Math.min(Math.max(t,0),1)},yi=function(e){var n,t,i,r,o=e.onInit,a=e.onDestroy,s=e.setMethods,u=e.getProps;s(["moveTo"]);var l=u().options,c=Ke({isReachStart:!(null==l?void 0:l.defaultIndex)||0===(null==l?void 0:l.defaultIndex),isReachEnd:!(!(null==l?void 0:l.totalPanelCount)||!(null==l?void 0:l.defaultIndex))&&l.defaultIndex===l.totalPanelCount-1,totalPanelCount:null!==(n=null==l?void 0:l.totalPanelCount)&&void 0!==n?n:0,currentPanelIndex:null!==(t=null==l?void 0:l.defaultIndex)&&void 0!==t?t:0,progress:0,indexProgress:null!==(i=null==l?void 0:l.defaultIndex)&&void 0!==i?i:0,moveTo:function(e){return null==r?Promise.reject(new Error("Flicking instance is not available")):(null==r?void 0:r.animating)?Promise.resolve():r.moveTo(e)}}),h=function(){void 0!==r&&(c.isReachStart=vi(r),c.isReachEnd=_i(r),c.currentPanelIndex=bi(r))},f=function(){void 0!==r&&(h(),c.totalPanelCount=mi(r))},d=function(){void 0!==r&&(c.progress=Ei(r),c.indexProgress=function(e){var n=e.camera,t=n.anchorPoints,i=t.length,r=n.position,o=e.circularEnabled,a=0,s=n.range,u=s.min,l=s.max,c=t[0],h=l-t[i-1].position+(c.position-u);return t.some((function(e,n){var s=e.position,u=t[n+1];if(0===n&&r<=s)a=o?(r-s)/h:(r-s)/e.panel.size;else if(n===i-1&&r>=s)a=o?n+(r-s)/h:n+(r-s)/e.panel.size;else{if(!(u&&s<=r&&r<=u.position))return!1;a=n+(r-s)/(u.position-s)}return!0})),a}(r))};return o((function(e,n){void 0!==(r=n.flicking)&&(c.isReachStart=vi(r),c.isReachEnd=_i(r),c.currentPanelIndex=bi(r),c.progress=Ei(r),c.totalPanelCount=mi(r),null==r||r.on("changed",h),null==r||r.on("panelChange",f),null==r||r.on("move",d))})),a((function(){null==r||r.off("changed",h),null==r||r.off("panelChange",f),null==r||r.off("move",d)})),c},Pi={__proto__:null,flickingReactiveAPIAdapter:yi,connectFlickingReactiveAPI:function(e,n){var t=function(e,n){var t=Ne(e)?{setup:e}:e;function i(){var e,i,r,o,a;return null!==(a=null!==(r=null!==(e=null==n?void 0:n())&&void 0!==e?e:null===(i=t.props)||void 0===i?void 0:i.call(t))&&void 0!==r?r:null===(o=t.data)||void 0===o?void 0:o.call(t))&&void 0!==a?a:{}}var r=new d,o=[],a=[],s=[],u=[],l={current:null},c=[],h=null,f=[],g=[],p=function(e){o.push(e)},v=function(e){h=e},_=function(e){f=e},m=function(e){g=e};return t.setup&&(l.current=t.setup({getProps:i,setInitialState:v,setEvents:_,setMethods:m,onMounted:p,onDestroy:function(e){s.push(e)},onInit:function(e){a.push(e)},emit:function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];r.trigger.apply(r,Ve([e],n,!1))},on:function(e){u.push(e)}})||null),t.created&&(l.current=t.created(i())||null),t.events&&_(t.events),t.state&&v(t.state),t.methods&&m(t.methods),t.mounted&&p(t.mounted),t.destroy&&s.push(t.destroy),t.init&&a.push(t.init),t.on&&u.push((function(e,n,i){var r=t.on(e,n,i);return function(){var o;r&&r(),null===(o=t.off)||void 0===o||o.call(t,e,n,i)}})),{events:function(){return f},state:function(){var e=l.current;if(h)return h;if(e){var n=Je(e);v(Me(n).reduce((function(e,t){return e[t]=n[t].current,e}),{}))}return h||{}},instance:function(){return l.current},mounted:function(){var e=i();o.forEach((function(n){l.current=n(e,l.current)||l.current}))},init:function(){var e=l.current,n=i();c=f.map((function(e){var n=function(){for(var n,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];(n=r).trigger.apply(n,Ve([e],t,!1))},t=l.current;return u.map((function(i){return i(t,e,n)})).filter(Boolean)})),a.forEach((function(t){t(e,n)}))},destroy:function(){c.forEach((function(e){e.forEach((function(e){e()}))})),r.off();var e=l.current,n=i();s.forEach((function(t){t(e,n)}))},methods:function(){return e=l,t={},(n=g)?(n.forEach((function(n){t[n]=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=e.current||e.value;return r[n].apply(r,t)}})),t):t;var e,n,t},on:function(e,n){r.on(e,n)},off:function(e,n){r.off(e,n)}}}(yi,(function(){return{flicking:e,options:n}}));t.mounted();var i=t.instance();return t.init(),i}};return L(si,{__proto__:null,Viewport:pe,FlickingError:ge,AnchorPoint:pt,VirtualManager:be,VanillaElementProvider:_e,VirtualElementProvider:me,Panel:ti,VirtualPanel:ri}),L(si,Tt),L(si,bt),L(si,ai),L(si,j),L(si,pi),L(si,de),L(si,li),L(si,Pi),si}));
|
|
9
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).Flicking=n()}(this,function(){"use strict";var e=function(n,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},e(n,t)};function n(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var t=function(){return t=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},t.apply(this,arguments)};function i(e,n,t,i){return new(t||(t=Promise))(function(r,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,s)}u((i=i.apply(e,n||[])).next())})}function r(e,n){var t,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(t=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(e,o)}catch(e){s=[6,e],i=0}finally{t=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function o(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function s(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(a(arguments[n]));return e}function u(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,r,o=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return a}function l(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(u(arguments[n]));return e}"function"==typeof SuppressedError&&SuppressedError;var c=function(e){return void 0===e},h=function(){function e(e,n){var t,i;if(this._canceled=!1,n)try{for(var r=function(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.keys(n)),o=r.next();!o.done;o=r.next()){var a=o.value;this[a]=n[a]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}this.eventType=e}var n=e.prototype;return n.stop=function(){this._canceled=!0},n.isCanceled=function(){return this._canceled},e}(),f=function(){function e(){this._eventHandler={}}var n=e.prototype;return n.trigger=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var i=e instanceof h?e.eventType:e,r=l(this._eventHandler[i]||[]);return r.length<=0||(e instanceof h?(e.currentTarget=this,r.forEach(function(n){n(e)})):r.forEach(function(e){e.apply(void 0,l(n))})),this},n.once=function(e,n){var t=this;if("object"==typeof e&&c(n)){var i=e;for(var r in i)this.once(r,i[r]);return this}if("string"==typeof e&&"function"==typeof n){var o=function(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];n.apply(void 0,l(i)),t.off(e,o)};this.on(e,o)}return this},n.hasOn=function(e){return!!this._eventHandler[e]},n.on=function(e,n){if("object"==typeof e&&c(n)){var t=e;for(var i in t)this.on(i,t[i]);return this}if("string"==typeof e&&"function"==typeof n){var r=this._eventHandler[e];c(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(n)}return this},n.off=function(e,n){if(c(e))return this._eventHandler={},this;if(c(n)){if("string"==typeof e)return delete this._eventHandler[e],this;var t=e;for(var i in t)this.off(i,t[i]);return this}var r=this._eventHandler[e];if(r)for(var o=r.length,a=0;a<o;++a)if(r[a]===n){r.splice(a,1),o<=1&&delete this._eventHandler[e];break}return this},e.VERSION="3.0.5",e}(),d=h,g={WRONG_TYPE:0,ELEMENT_NOT_FOUND:1,VAL_MUST_NOT_NULL:2,NOT_ATTACHED_TO_FLICKING:3,WRONG_OPTION:4,INDEX_OUT_OF_RANGE:5,POSITION_NOT_REACHABLE:6,TRANSFORM_NOT_SUPPORTED:7,STOP_CALLED_BY_USER:8,ANIMATION_INTERRUPTED:9,ANIMATION_ALREADY_PLAYING:10,NOT_ALLOWED_IN_FRAMEWORK:11,NOT_INITIALIZED:12,NO_ACTIVE:13,NOT_ALLOWED_IN_VIRTUAL:14},p=function(e,n){return e+"("+typeof e+") is not a "+n.map(function(e){return'"'+e+'"'}).join(" or ")+"."},v=function(e){return'Element with selector "'+e+'" not found.'},_=function(e,n){return n+" should be provided. Given: "+e},m='This module is not attached to the Flicking instance. "init()" should be called first.',b=function(e,n){return'Option "'+e+'" is not in correct format, given: '+n},E=function(e,n,t){return'Index "'+e+'" is out of range: should be between '+n+" and "+t+"."},y=function(e){return'Position "'+e+'" is not reachable.'},P="Browser does not support CSS transform.",x="Event stop() is called by user.",O="Animation is interrupted by user input.",T="Animation is already playing.",R="This behavior is not allowed in the frameworks like React, Vue, or Angular.",w="Flicking is not initialized yet, call init() first.",I={READY:"ready",BEFORE_RESIZE:"beforeResize",AFTER_RESIZE:"afterResize",HOLD_START:"holdStart",HOLD_END:"holdEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",WILL_CHANGE:"willChange",CHANGED:"changed",WILL_RESTORE:"willRestore",RESTORED:"restored",SELECT:"select",NEED_PANEL:"needPanel",VISIBLE_CHANGE:"visibleChange",REACH_EDGE:"reachEdge",PANEL_CHANGE:"panelChange"},A={PREV:"prev",CENTER:"center",NEXT:"next"},C={PREV:"PREV",NEXT:"NEXT",NONE:null},S={SNAP:"snap",FREE_SCROLL:"freeScroll",STRICT:"strict"},k={VIEWPORT:"flicking-viewport",CAMERA:"flicking-camera",VERTICAL:"vertical",HIDDEN:"flicking-hidden",DEFAULT_VIRTUAL:"flicking-panel"},D={LINEAR:"linear",BOUND:"bound"},M={LTR:"ltr",RTL:"rtl"},N={HORIZONTAL:"horizontal",VERTICAL:"vertical"},z={__proto__:null,EVENTS:I,ALIGN:A,DIRECTION:C,MOVE_TYPE:S,CLASS:k,CIRCULAR_FALLBACK:D,ORDER:M,MOVE_DIRECTION:N,ERROR_CODE:g},j=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return n.forEach(function(n){Object.keys(n).forEach(function(t){e[t]=n[t]})}),e},L=function(e,n){var t=null;if(J(e)){var i=(n||document).querySelector(e);if(!i)throw new de(v(e),g.ELEMENT_NOT_FOUND);t=i}else e&&e.nodeType===Node.ELEMENT_NODE&&(t=e);if(!t)throw new de(p(e,["HTMLElement","string"]),g.WRONG_TYPE);return t},F=function(e,n){if(null==e)throw new de(_(e,n),g.VAL_MUST_NOT_NULL)},H=function(e,n,t){return Math.max(Math.min(e,t),n)},V=function(e){if(!e)throw new de(m,g.NOT_ATTACHED_TO_FLICKING);return e},B=function(e){return[].slice.call(e)},G=function(e,n){var t;if(J(e))switch(e){case A.PREV:t=0;break;case A.CENTER:t=.5*n;break;case A.NEXT:t=n;break;default:if(null==(t=W(e,n)))throw new de(b("align",e),g.WRONG_OPTION)}else t=e;return t},X=function(e,n){var t;if(Array.isArray(e))t=e.map(function(e){return W(e,n)});else{var i=W(e,n);t=[i,i]}return t.map(function(n){if(null==n)throw new de(b("bounce",e),g.WRONG_OPTION);return n})},W=function(e,n){var t=U(e);return null==t?null:t.percentage*n+t.absolute},U=function(e){var n=/(?:(\+|\-)\s*)?(\d+(?:\.\d+)?(%|px)?)/g;if("number"==typeof e)return{percentage:0,absolute:e};for(var t={percentage:0,absolute:0},i=0,r=n.exec(e);null!=r;){var o=r[1],a=r[2],s=r[3],u=parseFloat(a);if(i<=0&&(o=o||"+"),!o)return null;var l="+"===o?1:-1;"%"===s?t.percentage+=l*(u/100):t.absolute+=l*u,++i,r=n.exec(e)}return 0===i?null:t},Y=function(e){return"object"==typeof e?e.panel:e},q=function(e,n){return e===n?C.NONE:e<n?C.NEXT:C.PREV},K=function(e){Array.isArray(e)||(e=[e]);var n=[];return e.forEach(function(e){if(J(e)){var t=document.createElement("div");for(t.innerHTML=e,n.push.apply(n,s(B(t.children)));t.firstChild;)t.removeChild(t.firstChild)}else{if(!e||e.nodeType!==Node.ELEMENT_NODE)throw new de(p(e,["HTMLElement","string"]),g.WRONG_TYPE);n.push(e)}}),n},Z=function(e,n){return H(e<0?e+n:e,0,n)},Q=function(e,n){var t,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){if(a.value===n)return!0}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return!1},J=function(e){return"string"==typeof e},$=function(e,n,t){var i=t-n;if(e<n)e=t-(n-e)%i;else if(e>t){e=n+(e-t)%i}return e},ee=function(e,n){var t,i;try{for(var r=o(e),a=r.next();!a.done;a=r.next()){var s=a.value;if(n(s))return s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}return null},ne=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1},te=function(e,n,t){return(e-n)/(t-n)},ie=function(e){return e?window.getComputedStyle(e)||e.currentStyle:{}},re=function(e,n){var t=n.width,i=n.height;e&&(null!=t&&(J(t)?e.style.width=t:e.style.width=t+"px"),null!=i&&(J(i)?e.style.height=i:e.style.height=i+"px"))},oe=function(e,n,t){return e>=n&&e<=t},ae=function(e,n){return e>=n?e%n:e<0?Z((e+1)%n-1,n):e},se=function(e){for(var n=new Array(e),t=0;t<e;t++)n[t]=t;return n},ue=function(e){var n=e.el,t=e.horizontal,i=e.useFractionalSize,r=e.useOffset,o=e.style,a=0;if(i){var s=parseFloat(t?o.width:o.height)||0,u="border-box"===o.boxSizing,l=t?parseFloat(o.borderLeftWidth||"0")+parseFloat(o.borderRightWidth||"0"):parseFloat(o.borderTopWidth||"0")+parseFloat(o.borderBottomWidth||"0");if(u)a=r?s:s-l;else{var c=t?parseFloat(o.paddingLeft||"0")+parseFloat(o.paddingRight||"0"):parseFloat(o.paddingTop||"0")+parseFloat(o.paddingBottom||"0");a=r?s+c+l:s+c}}else{var h=t?"Width":"Height";a=r?n["offset"+h]:n["client"+h]}return Math.max(a,0)},le=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},ce=function(e){return e.replace(/[\s-_]([a-z])/g,function(e,n){return n.toUpperCase()})},he=function(e,n){for(var t={},i=e.attributes,r=i.length,o=0;o<r;++o){var a=i[o],s=a.name,u=a.value;-1!==s.indexOf(n)&&(t[ce(s.replace(n,""))]=u)}return t},fe={__proto__:null,merge:j,getElement:L,checkExistence:F,clamp:H,getFlickingAttached:V,toArray:B,parseAlign:G,parseBounce:X,parseArithmeticSize:W,parseArithmeticExpression:U,parseCSSSizeValue:function(e){return J(e)?e:e+"px"},parsePanelAlign:Y,getDirection:q,parseElement:K,getMinusCompensatedIndex:Z,includes:Q,isString:J,circulatePosition:$,find:ee,findRight:function(e,n){for(var t=e.length-1;t>=0;t--){var i=e[t];if(n(i))return i}return null},findIndex:ne,getProgress:te,getStyle:ie,setSize:re,isBetween:oe,circulateIndex:ae,range:se,getElementSize:ue,setPrototypeOf:le,camelize:ce,getDataAttributes:he},de=function(e){function t(n,i){var r=e.call(this,n)||this;return le(r,t.prototype),r.name="FlickingError",r.code=i,r}return n(t,e),t}(Error),ge=function(){function e(e,n){this._flicking=e,this._el=n,this._width=0,this._height=0,this._padding={left:0,right:0,top:0,bottom:0},this._isBorderBoxSizing=!1}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"width",{get:function(){return this._width-this._padding.left-this._padding.right},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height-this._padding.top-this._padding.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(n,"padding",{get:function(){return this._padding},enumerable:!1,configurable:!0}),n.setSize=function(e){var n=e.width,t=e.height,i=this._el,r=this._padding,o=this._isBorderBoxSizing;if(null!=n)if(J(n))i.style.width=n;else{var a=o?n+r.left+r.right:n;i.style.width=a+"px"}if(null!=t)if(J(t))i.style.height=t;else{var s=o?t+r.top+r.bottom:t;i.style.height=s+"px"}this.resize()},n.resize=function(){var e=this._el,n=ie(e),t=this._flicking.useFractionalSize;this._width=ue({el:e,horizontal:!0,useFractionalSize:t,useOffset:!1,style:n}),this._height=ue({el:e,horizontal:!1,useFractionalSize:t,useOffset:!1,style:n}),this._padding={left:n.paddingLeft?parseFloat(n.paddingLeft):0,right:n.paddingRight?parseFloat(n.paddingRight):0,top:n.paddingTop?parseFloat(n.paddingTop):0,bottom:n.paddingBottom?parseFloat(n.paddingBottom):0},this._isBorderBoxSizing="border-box"===n.boxSizing},e}(),pe=function(){function e(e){var n,t=this;this._onResizeWrapper=function(){t._onResize([])},this._onResize=function(e){var n=t._flicking,i=n.resizeDebounce,r=n.maxResizeDebounce,o=n.element;if(e.find(function(e){return e.target===n.element})&&1===e.length){var a={width:n.viewport.width,height:n.viewport.height},s={width:ue({el:o,horizontal:!0,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:ie(o)}),height:ue({el:o,horizontal:!1,useFractionalSize:t._flicking.useFractionalSize,useOffset:!1,style:ie(o)})};if(a.height===s.height&&a.width===s.width)return}i<=0?n.resize():(t._maxResizeDebounceTimer<=0&&r>0&&r>=i&&(t._maxResizeDebounceTimer=window.setTimeout(t._doScheduledResize,r)),t._resizeTimer>0&&(clearTimeout(t._resizeTimer),t._resizeTimer=0),t._resizeTimer=window.setTimeout(t._doScheduledResize,i))},this._doScheduledResize=function(){clearTimeout(t._resizeTimer),clearTimeout(t._maxResizeDebounceTimer),t._maxResizeDebounceTimer=-1,t._resizeTimer=-1,t._flicking.resize()},this._skipFirstResize=(n=!0,function(e){n?n=!1:t._onResize(e)}),this._flicking=e,this._enabled=!1,this._resizeObserver=null,this._resizeTimer=-1,this._maxResizeDebounceTimer=-1}var n=e.prototype;return Object.defineProperty(n,"enabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),n.enable=function(){var e=this._flicking,n=e.viewport;if(this._enabled&&this.disable(),e.useResizeObserver&&window.ResizeObserver){var t=0!==n.width||0!==n.height?new ResizeObserver(this._skipFirstResize):new ResizeObserver(this._onResize);this._resizeObserver=t,this.observe(e.viewport.element),e.observePanelResize&&this.observePanels()}else window.addEventListener("resize",this._onResizeWrapper);return this._enabled=!0,this},n.observePanels=function(){var e=this;return this._flicking.panels.forEach(function(n){e.observe(n.element)}),this},n.unobservePanels=function(){var e=this;return this._flicking.panels.forEach(function(n){e.unobserve(n.element)}),this},n.observe=function(e){var n=this._resizeObserver;return n?(n.observe(e),this):this},n.unobserve=function(e){var n=this._resizeObserver;return n?(n.unobserve(e),this._flicking.observePanelResize&&this.unobservePanels(),this):this},n.disable=function(){if(!this._enabled)return this;var e=this._resizeObserver;return e?(e.disconnect(),this._resizeObserver=null):window.removeEventListener("resize",this._onResizeWrapper),this._enabled=!1,this},e}(),ve=function(){function e(e){this._element=e,this._rendered=!0}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),n.show=function(e){var n=this.element,t=e.camera.element;n.parentElement!==t&&(t.appendChild(n),this._rendered=!0)},n.hide=function(e){var n=this.element,t=e.camera.element;n.parentElement===t&&(t.removeChild(n),this._rendered=!1)},e}(),_e=function(){function e(e){this._flicking=e}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._virtualElement.nativeElement},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._virtualElement.visible},enumerable:!1,configurable:!0}),Object.defineProperty(n,"_virtualElement",{get:function(){var e=this._flicking,n=this._panel.elementIndex;return e.virtual.elements[n]},enumerable:!1,configurable:!0}),n.init=function(e){this._panel=e},n.show=function(){},n.hide=function(){},e}(),me=function(){function e(e,n){var t,i,r,o;this._flicking=e,this._renderPanel=null!==(t=null==n?void 0:n.renderPanel)&&void 0!==t?t:function(){return""},this._initialPanelCount=null!==(i=null==n?void 0:n.initialPanelCount)&&void 0!==i?i:-1,this._cache=null!==(r=null==n?void 0:n.cache)&&void 0!==r&&r,this._panelClass=null!==(o=null==n?void 0:n.panelClass)&&void 0!==o?o:k.DEFAULT_VIRTUAL,this._elements=[]}var n=e.prototype;return Object.defineProperty(n,"elements",{get:function(){return this._elements},enumerable:!1,configurable:!0}),Object.defineProperty(n,"renderPanel",{get:function(){return this._renderPanel},set:function(e){this._renderPanel=e,this._flicking.renderer.panels.forEach(function(e){return e.uncacheRenderResult()})},enumerable:!1,configurable:!0}),Object.defineProperty(n,"initialPanelCount",{get:function(){return this._initialPanelCount},enumerable:!1,configurable:!0}),Object.defineProperty(n,"cache",{get:function(){return this._cache},set:function(e){this._cache=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelClass",{get:function(){return this._panelClass},set:function(e){this._panelClass=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking;if(e.virtualEnabled){e.externalRenderer||e.renderExternal||this._initVirtualElements();var n=e.camera.children;this._elements=n.map(function(e){return{nativeElement:e,visible:!0}})}},n.show=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!0,t.style.display&&(t.style.display="")},n.hide=function(e){var n=this._elements[e],t=n.nativeElement;n.visible=!1,t.style.display="none"},n.append=function(e){void 0===e&&(e=1);var n=this._flicking;return this.insert(n.panels.length,e)},n.prepend=function(e){return void 0===e&&(e=1),this.insert(0,e)},n.insert=function(e,n){return void 0===n&&(n=1),n<=0?[]:this._flicking.renderer.batchInsert({index:e,elements:se(n),hasDOMInElements:!1})},n.remove=function(e,n){return n<=0?[]:this._flicking.renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!1})},n._initVirtualElements=function(){var e=this,n=this._flicking,t=n.camera.element,i=n.panelsPerView,r=document.createDocumentFragment();se(i+1).map(function(n){var t=document.createElement("div");return t.className=e._panelClass,t.dataset.elementIndex=n.toString(),t}).forEach(function(e){r.appendChild(e)}),t.appendChild(r)},e}();function be(e,n){for(var t=e.length,i=0;i<t;++i)if(n(e[i],i))return!0;return!1}function Ee(e,n){for(var t=e.length,i=0;i<t;++i)if(n(e[i],i))return e[i];return null}function ye(e){var n=e;if(void 0===n){if("undefined"==typeof navigator||!navigator)return"";n=navigator.userAgent||""}return n.toLowerCase()}function Pe(e,n){try{return new RegExp(e,"g").exec(n)}catch(e){return null}}function xe(e){return e.replace(/_/g,".")}function Oe(e,n){var t=null,i="-1";return be(e,function(e){var r=Pe("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",n);return!(!r||e.brand)&&(t=e,i=r[3]||"-1",e.versionAlias?i=e.versionAlias:e.versionTest&&(i=function(e,n){var t=Pe("("+e+")((?:\\/|\\s|:)([0-9|\\.|_]+))",n);return t?t[3]:""}(e.versionTest.toLowerCase(),n)||i),i=xe(i),!0)}),{preset:t,version:i}}function Te(e,n){var t={brand:"",version:"-1"};return be(e,function(e){var i=Re(n,e);return!!i&&(t.brand=e.id,t.version=e.versionAlias||i.version,"-1"!==t.version)}),t}function Re(e,n){return Ee(e,function(e){var t=e.brand;return Pe(""+n.test,t.toLowerCase())})}var we=[{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"}],Ie=[{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}],Ae=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Ce=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Se=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function ke(e){return!!Oe(Ce,e).preset}function De(e){return Object.keys(e)}function Me(e){return"function"==typeof e}var Ne="__observers__",ze="__computed__",je="__CFCS_DETECTED_DEPENDENCIES__",Le=function(e,n){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},Le(e,n)};function Fe(e,n,t){if(t||2===arguments.length)for(var i,r=0,o=n.length;r<o;r++)!i&&r in n||(i||(i=Array.prototype.slice.call(n,0,r)),i[r]=n[r]);return e.concat(i||Array.prototype.slice.call(n))}function He(){Object[je]=Object[je]||{};var e=Object[je];return e[1]=e[1]||[],e[1]}var Ve=function(){function e(e){this._emitter=new f,this._current=e}var n=e.prototype;return Object.defineProperty(n,"current",{get:function(){var e,n=(e=He())[e.length-1];return null==n||n.push(this),this._current},set:function(e){this._setCurrent(e)},enumerable:!1,configurable:!0}),n.subscribe=function(e){return this.current,this._emitter.on("update",e),this},n.unsubscribe=function(e){return this._emitter.off("update",e),this},n._setCurrent=function(e){var n=this._current,t=e!==n;this._current=e,t&&this._emitter.trigger("update",e,n)},n.toString=function(){return"".concat(this.current)},n.valueOf=function(){return this.current},e}(),Be=function(e){function n(n){var t=e.call(this)||this;return t._computedCallback=n,t._registered=[],t._onCheckUpdate=function(){t._setCurrent(t.current)},t._current=t.current,t}!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}Le(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(n,e);var t=n.prototype;return Object.defineProperty(t,"current",{get:function(){var e,n,t,i,r=this;e=this,n=He(),i={host:e,observers:t=[],push:function(n){e!==n&&-1===t.indexOf(n)&&t.push(n)}},n.push(i);var o=this._computedCallback(),a=He().pop();return this._registered.forEach(function(e){e.unsubscribe(r._onCheckUpdate)}),a.observers.forEach(function(e){e.subscribe(r._onCheckUpdate)}),this._registered=a.observers,o},enumerable:!1,configurable:!0}),n}(Ve);function Ge(e,n,t){void 0===t&&(t=n);var i={configurable:!0,get:function(){return Qe(this,t).current},set:function(e){Qe(this,t,e).current=e}};Object.defineProperty(e,n,i),t!==n&&Object.defineProperty(e,t,{configurable:!0,get:function(){return Qe(this,t).current}})}function Xe(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length>1?Ge(e[0],e[1]):function(n,t){return Ge(n,t,e[0])}}function We(e){e.subscribe=function(e,n){this[e],Qe(this,e).subscribe(n)},e.unsubscribe=function(e,n){var t=this;e?e in this&&Qe(this,e).unsubscribe(n):De(Ze(this)).forEach(function(e){t.unsubscribe(e)})}}function Ue(e){We(e.prototype)}function Ye(e,n){var t=Me(e)?e():e,i={};return Ke(i),De(t).forEach(function(e){var n,r=t[e];(n=r)&&function(e){return"object"==typeof e}(n)&&"current"in n&&"subscribe"in n&&"unsubscribe"in n?Je(i,e,r):Je(i,e,qe(r)),Xe(e)(i,e)}),We(i),i}function qe(e){return new Ve(e)}function Ke(e){var n={};return Object.defineProperty(e,Ne,{get:function(){return n}}),n}function Ze(e,n){var t,i;e[Ne]||Ke(e);var r=e[Ne];if(!n){var o=null===(i=null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.prototype)||void 0===i?void 0:i[ze];o&&o.forEach(function(n){!(n in r)&&n in e&&e[n]})}return r}function Qe(e,n,t){var i=Ze(e);return i[n]||(i[n]=qe(t)),i[n]}function Je(e,n,t){Ze(e)[n]=t}function $e(e,n,t){var i=t.get;var r={configurable:!0,get:function(){var e,t=Ze(this,!0);return n in t||(t[n]=(e=i.bind(this),new Be(e))),Qe(this,n).current}};e[ze]||(e[ze]=[]);var o=e[ze];return-1===o.indexOf(n)&&o.push(n),Object.defineProperty(e,n,r),r}var en=function(e,n){return en=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},en(e,n)};function nn(e,n){function t(){this.constructor=e}en(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var tn,rn=function(){return rn=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},rn.apply(this,arguments)};function on(e,n,t,i){var r,o=arguments.length,a=o<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,t,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(n,t,a):r(n,t))||a);return o>3&&a&&Object.defineProperty(n,t,a),a}tn="undefined"==typeof window?{navigator:{userAgent:""}}:window;var an,sn=24,un="left",ln="right",cn="middle",hn={1:un,2:cn,3:ln},fn="ontouchstart"in tn&&"safari"===(void 0===an&&function(){if("undefined"==typeof navigator||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,n=e.brands||e.uaList;return!(!n||!n.length)}()?function(e){var n=navigator.userAgentData,t=(n.uaList||n.brands).slice(),i=e&&e.fullVersionList,r=n.mobile||!1,o=t[0],a=(e&&e.platform||n.platform||navigator.platform).toLowerCase(),s={name:o.brand,version:o.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Te(Ce,t).brand||ke(ye())},u={name:"unknown",version:"-1",majorVersion:-1};s.webkit=!s.chromium&&be(Ae,function(e){return Re(t,e)});var l=Te(Ie,t);if(s.chromium=!!l.brand,s.chromiumVersion=l.version||"-1",!s.chromium){var c=Te(Ae,t);s.webkit=!!c.brand,s.webkitVersion=c.version||"-1"}var h=Ee(Se,function(e){return new RegExp(""+e.test,"g").exec(a)});if(u.name=h?h.id:"",e&&(u.version=e.platformVersion||"-1"),i&&i.length){var f=Te(we,i);s.name=f.brand||s.name,s.version=f.version||s.version}else{var d=Te(we,t);s.name=d.brand||s.name,s.version=d.brand&&e?e.uaFullVersion:d.version}return s.webkit&&(u.name=r?"ios":"mac"),"ios"===u.name&&s.webview&&(s.version="-1"),u.version=xe(u.version),s.version=xe(s.version),u.majorVersion=parseInt(u.version,10),s.majorVersion=parseInt(s.version,10),{browser:s,os:u,isMobile:r,isHints:!0}}():function(e){var n=ye(e),t=!!/mobi/g.exec(n),i={name:"unknown",version:"-1",majorVersion:-1,webview:ke(n),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},o=Oe(we,n),a=o.preset,s=o.version,u=Oe(Se,n),l=u.preset,c=u.version,h=Oe(Ie,n);if(i.chromium=!!h.preset,i.chromiumVersion=h.version,!i.chromium){var f=Oe(Ae,n);i.webkit=!!f.preset,i.webkitVersion=f.version}return l&&(r.name=l.id,r.version=c,r.majorVersion=parseInt(c,10)),a&&(i.name=a.id,i.version=s,i.webview&&"ios"===r.name&&"safari"!==i.name&&(i.webview=!1)),i.majorVersion=parseInt(i.version,10),{browser:i,os:r,isMobile:t,isHints:!1}}(an)).browser.name,dn=function(){if("undefined"==typeof document)return"";for(var e=(document.head||document.getElementsByTagName("head")[0]).style,n=["transform","webkitTransform","msTransform","mozTransform"],t=0,i=n.length;t<i;t++)if(n[t]in e)return n[t];return""}(),gn={"-webkit-user-select":"none","-ms-user-select":"none","-moz-user-select":"none","user-select":"none","-webkit-user-drag":"none"},pn=function(e){for(var n=[],t=0,i=e.length;t<i;t++)n.push(e[t]);return n},vn=function(e,n){var t;if(void 0===n&&(n=!1),"string"==typeof e){if(e.match(/^<([a-z]+)\s*([^>]*)>/)){var i=document.createElement("div");i.innerHTML=e,t=pn(i.childNodes)}else t=pn(document.querySelectorAll(e));n||(t=t.length>=1?t[0]:void 0)}else e===tn?t=e:"value"in e||"current"in e?t=e.value||e.current:!e.nodeName||1!==e.nodeType&&9!==e.nodeType?"jQuery"in tn&&e instanceof jQuery||e.constructor.prototype.jquery?t=n?e.toArray():e.get(0):Array.isArray(e)&&(t=e.map(function(e){return vn(e)}),n||(t=t.length>=1?t[0]:void 0)):t=e;return t},_n=tn.requestAnimationFrame||tn.webkitRequestAnimationFrame,mn=tn.cancelAnimationFrame||tn.webkitCancelAnimationFrame;if(_n&&!mn){var bn={},En=_n;_n=function(e){var n=En(function(t){bn[n]&&e(t)});return bn[n]=!0,n},mn=function(e){delete bn[e]}}else _n&&mn||(_n=function(e){return tn.setTimeout(function(){e(tn.performance&&tn.performance.now&&tn.performance.now()||(new Date).getTime())},16)},mn=tn.clearTimeout);var yn=function(e,n){var t={};for(var i in e)i&&(t[i]=n(e[i],i));return t},Pn=function(e,n){var t={};for(var i in e)i&&n(e[i],i)&&(t[i]=e[i]);return t},xn=function(e,n){for(var t in e)if(t&&!n(e[t],t))return!1;return!0},On=function(e,n){return xn(e,function(e,t){return e===n[t]})},Tn={},Rn=function(e,n){return Tn[n]||(Tn[n]=An(n)),Tn[n](e)},wn=function(e,n){return e&&n?yn(e,function(e,t){return Rn(e,"number"==typeof n?n:n[t])}):e},In=function(e){if(!isFinite(e))return 0;var n="".concat(e);if(n.indexOf("e")>=0){for(var t=0,i=1;Math.round(e*i)/i!==e;)i*=10,t++;return t}return n.indexOf(".")>=0?n.length-n.indexOf(".")-1:0},An=function(e){var n=e<1?Math.pow(10,In(e)):1;return function(t){return 0===e?0:Math.round(Math.round(t/e)*e*n)/n}},Cn=function(e,n,t){return t?!!(30===n||n&e&&t&e):!!(n&e)},Sn=function(){function e(e){this._axes=e,this.holdingCount=0}var n=e.prototype;return n.hold=function(e,n){var t=this._getRoundPos(e).roundPos;this._axes.trigger(new d("hold",{pos:t,input:n.input||null,inputEvent:n.event||null,isTrusted:!0}))},n.triggerRelease=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration),this._axes.trigger(new d("release",rn(rn({},e),{bounceRatio:this._getBounceRatio(t)})))},n.triggerChange=function(e,n,t,i){var r=this;void 0===i&&(i=!1);var o=this.animationManager,a=o.axisManager,s=o.getEventInfo(),u=this._getRoundPos(e,n),l=u.roundPos,c=u.roundDepa,h=a.moveTo(l,c),f=(null==t?void 0:t.event)||(null==s?void 0:s.event)||null,g={pos:h.pos,delta:h.delta,bounceRatio:this._getBounceRatio(h.pos),holding:i,inputEvent:f,isTrusted:!!f,input:(null==t?void 0:t.input)||(null==s?void 0:s.input)||null,set:f?this._createUserControll(h.pos):function(){}},p=new d("change",g);return this._axes.trigger(p),Object.keys(h.pos).forEach(function(e){var n=h.pos[e];Qe(r._axes,e,n).current=n}),f&&a.set(g.set().destPos),!p.isCanceled()},n.triggerAnimationStart=function(e){var n=this._getRoundPos(e.destPos,e.depaPos),t=n.roundPos,i=n.roundDepa;e.destPos=t,e.depaPos=i,e.setTo=this._createUserControll(e.destPos,e.duration);var r=new d("animationStart",e);return this._axes.trigger(r),!r.isCanceled()},n.triggerAnimationEnd=function(e){void 0===e&&(e=!1),this._axes.trigger(new d("animationEnd",{isTrusted:e}))},n.triggerFinish=function(e){void 0===e&&(e=!1),this._axes.trigger(new d("finish",{isTrusted:e}))},n.setAnimationManager=function(e){this.animationManager=e},n.destroy=function(){this._axes.off()},n._createUserControll=function(e,n){void 0===n&&(n=0);var t={destPos:rn({},e),duration:n};return function(e,n){return e&&(t.destPos=rn({},e)),void 0!==n&&(t.duration=n),t}},n._getRoundPos=function(e,n){var t=this._axes.options.round;return{roundPos:wn(e,t),roundDepa:wn(n,t)}},n._getBounceRatio=function(e){return this._axes.axisManager.map(e,function(e,n){return e<n.range[0]&&0!==n.bounce[0]?(n.range[0]-e)/n.bounce[0]:e>n.range[1]&&0!==n.bounce[1]?(e-n.range[1])/n.bounce[1]:0})},on([Xe],e.prototype,"holdingCount",void 0),e}(),kn=function(){function e(e){this._options=e,this._prevented=!1}var n=e.prototype;return n.isInterrupting=function(){return this._options.interruptable||this._prevented},n.isInterrupted=function(){return!this._options.interruptable&&this._prevented},n.setInterrupt=function(e){this._options.interruptable||(this._prevented=e)},e}(),Dn=function(e,n,t,i){var r=e,o=[t[0]?n[0]:i?n[0]-i[0]:n[0],t[1]?n[1]:i?n[1]+i[1]:n[1]];return r=Math.max(o[0],r),r=Math.min(o[1],r)},Mn=function(e,n){return e<n[0]||e>n[1]},Nn=function(e,n,t){return t[1]&&e>n[1]||t[0]&&e<n[0]},zn=function(e,n,t){var i=e,r=n[0],o=n[1],a=o-r;return t[1]&&e>o&&(i=(i-o)%a+r),t[0]&&e<r&&(i=(i-r)%a+o),i},jn=function(){function e(e){var n=this;this._axis=e,this._complementOptions(),this._pos=Object.keys(this._axis).reduce(function(e,t){return e[t]=n._axis[t].startPos,e},{})}var n=e.prototype;return n.getDelta=function(e,n){var t=this.get(e);return yn(this.get(n),function(e,n){return e-t[n]})},n.get=function(e){var n=this;return e&&Array.isArray(e)?e.reduce(function(e,t){return t&&t in n._pos&&(e[t]=n._pos[t]),e},{}):rn(rn({},this._pos),e||{})},n.moveTo=function(e,n){void 0===n&&(n=this._pos);var t=yn(this._pos,function(t,i){return i in e&&i in n?e[i]-n[i]:0});return this.set(this.map(e,function(e,n){return n?zn(e,n.range,n.circular):0})),{pos:rn({},this._pos),delta:t}},n.set=function(e){for(var n in e)n&&n in this._pos&&(this._pos[n]=e[n])},n.every=function(e,n){var t=this._axis;return xn(e,function(e,i){return n(e,t[i],i)})},n.filter=function(e,n){var t=this._axis;return Pn(e,function(e,i){return n(e,t[i],i)})},n.map=function(e,n){var t=this._axis;return yn(e,function(e,i){return n(e,t[i],i)})},n.isOutside=function(e){return!this.every(e?this.get(e):this._pos,function(e,n){return!Mn(e,n.range)})},n.getAxisOptions=function(e){return this._axis[e]},n.setAxis=function(e){var n=this;Object.keys(e).forEach(function(t){if(!n._axis[t])throw new Error("Axis ".concat(t," does not exist in Axes instance"));n._axis[t]=rn(rn({},n._axis[t]),e[t])}),this._complementOptions()},n._complementOptions=function(){var e=this;Object.keys(this._axis).forEach(function(n){e._axis[n]=rn({range:[0,100],startPos:e._axis[n].range[0],bounce:[0,0],circular:[!1,!1]},e._axis[n]),["bounce","circular"].forEach(function(t){var i=e._axis,r=i[n][t];/string|number|boolean/.test(typeof r)&&(i[n][t]=[r,r])})})},e}(),Ln="ontouchstart"in tn,Fn="PointerEvent"in tn,Hn=Fn||"MSPointerEvent"in tn,Vn=function(){function e(){var e=this;this._stopContextMenu=function(n){n.preventDefault(),tn.removeEventListener("contextmenu",e._stopContextMenu)}}var n=e.prototype;return n.extendEvent=function(e){var n,t,i,r=this.prevEvent,o=this._getCenter(e),a=r?this._getMovement(e):{x:0,y:0},s=r?this._getScale(e):1,u=r?(t=o.x-r.center.x,i=o.y-r.center.y,180*Math.atan2(i,t)/Math.PI):0,l=r?r.deltaX+a.x:a.x,c=r?r.deltaY+a.y:a.y,h=a.x,f=a.y,d=this._latestInterval,g=Date.now(),p=d?g-d.timestamp:0,v=r?r.velocityX:0,_=r?r.velocityY:0,m=r?r.directionX:1,b=r?r.directionY:1;return h>0?m=1:h<0&&(m=-1),f>0?b=1:f<0&&(b=-1),(!d||p>=16)&&(d&&(v=(n=[(l-d.deltaX)/p,(c-d.deltaY)/p])[0],_=n[1]),this._latestInterval={timestamp:g,deltaX:l,deltaY:c}),{srcEvent:e,scale:s,angle:u,center:o,deltaX:l,deltaY:c,offsetX:h,offsetY:f,directionX:m,directionY:b,velocityX:v,velocityY:_,preventSystemEvent:!0}},n._getDistance=function(e,n){var t=n.clientX-e.clientX,i=n.clientY-e.clientY;return Math.sqrt(t*t+i*i)},n._getButton=function(e){var n={1:un,2:ln,4:cn},t=this._isTouchEvent(e)?un:n[e.buttons];return t||null},n._isTouchEvent=function(e){return e.type&&e.type.indexOf("touch")>-1},n._isValidButton=function(e,n){return n.indexOf(e)>-1},n._isValidEvent=function(e,n,t){return(!n||function(e,n){return!!(!n||n.indexOf("any")>-1||n.indexOf("none")>-1&&!e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey||n.indexOf("shift")>-1&&e.shiftKey||n.indexOf("ctrl")>-1&&e.ctrlKey||n.indexOf("alt")>-1&&e.altKey||n.indexOf("meta")>-1&&e.metaKey)}(e,n))&&(!t||this._isValidButton(this._getButton(e),t))},n._preventMouseButton=function(e,n){n===ln?tn.addEventListener("contextmenu",this._stopContextMenu):n===cn&&e.preventDefault()},e}(),Bn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown"],n.move=["mousemove"],n.end=["mouseup"],n}nn(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?this.extendEvent(e):null},t.onEventEnd=function(){},t.onRelease=function(){this.prevEvent=null},t.getTouches=function(e,n){return n&&this._isValidButton(hn[e.which],n)&&-1===this.end.indexOf(e.type)?1:0},t._getScale=function(){return 1},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},n}(Vn),Gn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["touchstart"],n.move=["touchmove"],n.end=["touchend","touchcancel"],n}nn(n,e);var t=n.prototype;return t.onEventStart=function(e,n){return this._baseTouches=e.touches,this._isValidEvent(e,n)?this.extendEvent(e):null},t.onEventMove=function(e,n){return this._isValidEvent(e,n)?this.extendEvent(e):null},t.onEventEnd=function(e){this._baseTouches=e.touches},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e){return e.touches.length},t._getScale=function(e){return 2!==e.touches.length||this._baseTouches.length<2?null:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1])},t._getCenter=function(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.touches[0].identifier!==n.touches[0].identifier?{x:0,y:0}:{x:e.touches[0].clientX-n.touches[0].clientX,y:e.touches[0].clientY-n.touches[0].clientY}},n}(Vn),Xn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=Fn?["pointerdown"]:["MSPointerDown"],n.move=Fn?["pointermove"]:["MSPointerMove"],n.end=Fn?["pointerup","pointercancel"]:["MSPointerUp","MSPointerCancel"],n._firstInputs=[],n._recentInputs=[],n}nn(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this._updatePointerEvent(e),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?(this._updatePointerEvent(e),this.extendEvent(e)):null},t.onEventEnd=function(e){this._removePointerEvent(e)},t.onRelease=function(){this.prevEvent=null,this._firstInputs=[],this._recentInputs=[]},t.getTouches=function(){return this._recentInputs.length},t._getScale=function(){return 2!==this._recentInputs.length?null:this._getDistance(this._recentInputs[0],this._recentInputs[1])/this._getDistance(this._firstInputs[0],this._firstInputs[1])},t._getCenter=function(e){return{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this.prevEvent.srcEvent;return e.pointerId!==n.pointerId?{x:0,y:0}:{x:e.clientX-n.clientX,y:e.clientY-n.clientY}},t._updatePointerEvent=function(e){var n=this,t=!1;this._recentInputs.forEach(function(i,r){i.pointerId===e.pointerId&&(t=!0,n._recentInputs[r]=e)}),t||(this._firstInputs.push(e),this._recentInputs.push(e))},t._removePointerEvent=function(e){this._firstInputs=this._firstInputs.filter(function(n){return n.pointerId!==e.pointerId}),this._recentInputs=this._recentInputs.filter(function(n){return n.pointerId!==e.pointerId})},n}(Vn),Wn=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.start=["mousedown","touchstart"],n.move=["mousemove","touchmove"],n.end=["mouseup","touchend","touchcancel"],n}nn(n,e);var t=n.prototype;return t.onEventStart=function(e,n,t){var i=this._getButton(e);return this._isTouchEvent(e)&&(this._baseTouches=e.touches),this._isValidEvent(e,n,t)?(this._preventMouseButton(e,i),this.extendEvent(e)):null},t.onEventMove=function(e,n,t){return this._isValidEvent(e,n,t)?this.extendEvent(e):null},t.onEventEnd=function(e){this._isTouchEvent(e)&&(this._baseTouches=e.touches)},t.onRelease=function(){this.prevEvent=null,this._baseTouches=null},t.getTouches=function(e,n){return this._isTouchEvent(e)?e.touches.length:this._isValidButton(hn[e.which],n)&&-1===this.end.indexOf(e.type)?1:0},t._getScale=function(e){return this._isTouchEvent(e)?2!==e.touches.length||this._baseTouches.length<2?1:this._getDistance(e.touches[0],e.touches[1])/this._getDistance(this._baseTouches[0],this._baseTouches[1]):this.prevEvent.scale},t._getCenter=function(e){return this._isTouchEvent(e)?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}},t._getMovement=function(e){var n=this,t=[e,this.prevEvent.srcEvent].map(function(e){return n._isTouchEvent(e)?{id:e.touches[0].identifier,x:e.touches[0].clientX,y:e.touches[0].clientY}:{id:null,x:e.clientX,y:e.clientY}}),i=t[0],r=t[1];return i.id===r.id?{x:i.x-r.x,y:i.y-r.y}:{x:0,y:0}},n}(Vn),Un=function(e,n){return n.reduce(function(n,t,i){return e[i]&&(n[e[i]]=t),n},{})},Yn=function(e){void 0===e&&(e=[]);var n=!1,t=!1,i=!1;return e.forEach(function(e){switch(e){case"mouse":t=!0;break;case"touch":n=Ln;break;case"pointer":i=Hn}}),i?new Xn:n&&t?new Wn:n?new Gn:t?new Bn:null};function qn(e){return e.indexOf("touch")>-1&&{passive:!1}}var Kn,Zn=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager,o=e.animationManager;this._isOutside=!1,this._moveDistance=null,this._isStopped=!1,this.options=n,this._interruptManager=t,this._eventManager=i,this._axisManager=r,this._animationManager=o}var n=e.prototype;return n.get=function(e){return this._axisManager.get(e.axes)},n.hold=function(e,n){if(!this._interruptManager.isInterrupted()&&e.axes.length){var t={input:e,event:n};this._isStopped=!1,this._interruptManager.setInterrupt(!0),this._animationManager.stopAnimation(t),++this._eventManager.holdingCount,this._moveDistance||this._eventManager.hold(this._axisManager.get(),t),this._isOutside=this._axisManager.isOutside(e.axes),this._moveDistance=this._axisManager.get(e.axes)}},n.change=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&!this._axisManager.every(t,function(e){return 0===e})){var r=n.srcEvent?n.srcEvent:n;if(!r.__childrenAxesAlreadyChanged){var o,a=this._moveDistance||this._axisManager.get(e.axes);o=yn(a,function(e,n){return e+(t[n]||0)}),this._moveDistance&&(this._moveDistance=this._axisManager.map(o,function(e,n){var t=n.circular,i=n.range;return t&&(t[0]||t[1])?zn(e,i,t):e})),this._isOutside&&this._axisManager.every(a,function(e,n){return!Mn(e,n.range)})&&(this._isOutside=!1),a=this._atOutside(a),o=this._atOutside(o),this.options.nested&&this._isEndofAxis(t,a,o)||(r.__childrenAxesAlreadyChanged=!0);var s={input:e,event:n};if(i){var u=this._animationManager.getDuration(o,a);this._animationManager.animateTo(o,u,s)}else{!this._eventManager.triggerChange(o,a,s,!0)&&(this._isStopped=!0,this._moveDistance=null,this._animationManager.finish(!1))}}}},n.release=function(e,n,t,i){if(!this._isStopped&&this._interruptManager.isInterrupting()&&this._moveDistance){var r=n.srcEvent?n.srcEvent:n;r.__childrenAxesAlreadyReleased&&(t=t.map(function(){return 0}));var o=this._axisManager.get(e.axes),a=this._axisManager.get(),s=this._animationManager.getDisplacement(t),u=Un(e.axes,s),l=this._axisManager.get(this._axisManager.map(u,function(e,n,t){return n.circular&&(n.circular[0]||n.circular[1])?o[t]+e:Dn(o[t]+e,n.range,n.circular,n.bounce)}));r.__childrenAxesAlreadyReleased=!0;var c=this._animationManager.getDuration(l,o,i);0===c&&(l=rn({},a));var h={depaPos:a,destPos:l,duration:c,delta:this._axisManager.getDelta(a,l),inputEvent:n,input:e,isTrusted:!0};--this._eventManager.holdingCount,this._eventManager.triggerRelease(h),0===this._eventManager.holdingCount&&(this._moveDistance=null);var f=this._animationManager.getUserControl(h),d=On(f.destPos,a),g={input:e,event:n};d||0===f.duration?(d||this._eventManager.triggerChange(f.destPos,a,g,!0),this._interruptManager.setInterrupt(!1),this._axisManager.isOutside()?this._animationManager.restore(g):this._eventManager.triggerFinish(!0)):this._animationManager.animateTo(f.destPos,f.duration,g)}},n._atOutside=function(e){var n=this;return this._isOutside?this._axisManager.map(e,function(e,n){var t=n.range[0]-n.bounce[0],i=n.range[1]+n.bounce[1];return e>i?i:e<t?t:e}):this._axisManager.map(e,function(e,t){var i=t.range[0],r=t.range[1],o=t.bounce,a=t.circular;return a[0]&&e<i||a[1]&&e>r?e:e<i?i-n._animationManager.interpolate(i-e,o[0]):e>r?r+n._animationManager.interpolate(e-r,o[1]):e})},n._isEndofAxis=function(e,n,t){return this._axisManager.every(n,function(i,r,o){return 0===e[o]||n[o]===t[o]&&function(e,n,t,i){return!i[0]&&e===n[0]-t[0]||!i[1]&&e===n[1]+t[1]}(i,r.range,r.bounce,r.circular)})},e}(),Qn=function(e,n,t){return Math.max(Math.min(e,t),n)},Jn=function(){function e(e){var n=e.options,t=e.interruptManager,i=e.eventManager,r=e.axisManager;this._options=n,this.interruptManager=t,this.eventManager=i,this.axisManager=r,this.animationEnd=this.animationEnd.bind(this)}var n=e.prototype;return n.getDuration=function(e,n,t){var i,r=this;if(void 0!==t)i=t;else{var o=yn(n,function(n,t){return function(e,n){var t=Math.sqrt(e/n*2);return t<100?0:t}(Math.abs(n-e[t]),r._options.deceleration)});i=Object.keys(o).reduce(function(e,n){return Math.max(e,o[n])},-1/0)}return Qn(i,this._options.minimumDuration,this._options.maximumDuration)},n.getDisplacement=function(e){var n=Math.pow(e.reduce(function(e,n){return e+n*n},0),1/e.length),t=Math.abs(n/-this._options.deceleration);return e.map(function(e){return e/2*t})},n.stopAnimation=function(e){if(this._animateParam){var n=this.axisManager.get(),t=this.axisManager.map(n,function(e,n){return zn(e,n.range,n.circular)});xn(t,function(e,t){return n[t]===e})||this.eventManager.triggerChange(t,n,e,!!e),this._animateParam=null,this._raf&&(i=this._raf,mn(i)),this._raf=null,this.eventManager.triggerAnimationEnd(!!(null==e?void 0:e.event))}var i},n.getEventInfo=function(){return this._animateParam&&this._animateParam.input&&this._animateParam.inputEvent?{input:this._animateParam.input,event:this._animateParam.inputEvent}:null},n.restore=function(e){var n=this.axisManager.get(),t=this.axisManager.map(n,function(e,n){return Math.min(n.range[1],Math.max(n.range[0],e))});this.stopAnimation(),this.animateTo(t,this.getDuration(n,t),e)},n.animationEnd=function(){var e=this.getEventInfo();this._animateParam=null;var n=this.axisManager.filter(this.axisManager.get(),function(e,n){return Nn(e,n.range,n.circular)});Object.keys(n).length>0&&this.setTo(this.axisManager.map(n,function(e,n){return zn(e,n.range,n.circular)})),this.interruptManager.setInterrupt(!1),this.eventManager.triggerAnimationEnd(!!e),this.axisManager.isOutside()?this.restore(e):this.finish(!!e)},n.finish=function(e){this._animateParam=null,this.interruptManager.setInterrupt(!1),this.eventManager.triggerFinish(e)},n.getUserControl=function(e){var n=e.setTo();return n.destPos=this.axisManager.get(n.destPos),n.duration=Qn(n.duration,this._options.minimumDuration,this._options.maximumDuration),n},n.animateTo=function(e,n,t){var i=this;this.stopAnimation();var r=this._createAnimationParam(e,n,t),o=rn({},r.depaPos),a=this.eventManager.triggerAnimationStart(r),s=this.getUserControl(r);if(!a&&this.axisManager.every(s.destPos,function(e,n){return Nn(e,n.range,n.circular)})&&console.warn("You can't stop the 'animation' event when 'circular' is true."),a&&!On(s.destPos,o)){var u=(null==t?void 0:t.event)||null;this._animateLoop({depaPos:o,destPos:s.destPos,duration:s.duration,delta:this.axisManager.getDelta(o,s.destPos),isTrusted:!!u,inputEvent:u,input:(null==t?void 0:t.input)||null},function(){return i.animationEnd()})}},n.setTo=function(e,n){void 0===n&&(n=0);var t=Object.keys(e),i=this.axisManager.get(t);if(On(e,i))return this;this.interruptManager.setInterrupt(!0);var r=Pn(e,function(e,n){return i[n]!==e});return Object.keys(r).length?(r=this.axisManager.map(r,function(e,n){var t=n.range,i=n.circular;return i&&(i[0]||i[1])?e:Dn(e,t,i)}),On(r,i)||(n>0?this.animateTo(r,n):(this.stopAnimation(),this.eventManager.triggerChange(r),this.finish(!1))),this):this},n.setBy=function(e,n){return void 0===n&&(n=0),this.setTo(yn(this.axisManager.get(Object.keys(e)),function(n,t){return n+e[t]}),n)},n.setOptions=function(e){this._options=rn(rn({},this._options),e)},n._createAnimationParam=function(e,n,t){var i=this.axisManager.get(),r=e,o=(null==t?void 0:t.event)||null;return{depaPos:i,destPos:r,duration:Qn(n,this._options.minimumDuration,this._options.maximumDuration),delta:this.axisManager.getDelta(i,r),inputEvent:o,input:(null==t?void 0:t.input)||null,isTrusted:!!o,done:this.animationEnd}},n._animateLoop=function(e,n){var t=this;if(e.duration){this._animateParam=rn(rn({},e),{startTime:(new Date).getTime()});var i=yn(e.destPos,function(e){return e}),r=this._initState(this._animateParam),o=function(){t._raf=null;var e=t._animateParam,a=t._getNextState(r),s=!t.eventManager.triggerChange(a.pos,r.pos);if(r=a,a.finished)return e.destPos=t._getFinalPos(e.destPos,i),On(e.destPos,t.axisManager.get(Object.keys(e.destPos)))||t.eventManager.triggerChange(e.destPos,a.pos),void n();s?t.finish(!1):t._raf=_n(o)};o()}else this.eventManager.triggerChange(e.destPos),n()},n._getFinalPos=function(e,n){var t=this,i=1e-6;return yn(e,function(e,r){if(e>=n[r]-i&&e<=n[r]+i)return n[r];var o=t._getRoundUnit(e,r);return Rn(e,o)})},n._getRoundUnit=function(e,n){var t,i=this._options.round,r=null;if(!i){var o=this.axisManager.getAxisOptions(n);t=Math.max(In(o.range[0]),In(o.range[1]),In(e)),r=1/Math.pow(10,t)}return r||i},e}(),$n=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n._useDuration=!0,n}nn(n,e);var t=n.prototype;return t.interpolate=function(e,n){var t=this._easing(1e-5)/1e-5;return this._easing(e/(n*t))*n},t.updateAnimation=function(e){var n,t=this._animateParam;if(t){var i=(new Date).getTime()-t.startTime,r=(null==e?void 0:e.destPos)||t.destPos,o=null!==(n=null==e?void 0:e.duration)&&void 0!==n?n:t.duration;if((null==e?void 0:e.restart)||o<=i)this.setTo(r,o-i);else{if(null==e?void 0:e.destPos){var a=this.axisManager.get();this._initialEasingPer=this._prevEasingPer,t.delta=this.axisManager.getDelta(a,r),t.destPos=r}if(null==e?void 0:e.duration){var s=(i+this._durationOffset)/t.duration;this._durationOffset=s*o-i,t.duration=o}}}},t._initState=function(e){return this._initialEasingPer=0,this._prevEasingPer=0,this._durationOffset=0,{pos:e.depaPos,easingPer:0,finished:!1}},t._getNextState=function(e){var n=this,t=this._animateParam,i=e.pos,r=t.destPos,o=yn(i,function(e,n){return e<=r[n]?1:-1}),a=((new Date).getTime()-t.startTime+this._durationOffset)/t.duration,s=this._easing(a),u=this.axisManager.map(i,function(e,u,l){var c=a>=1?r[l]:e+t.delta[l]*(s-n._prevEasingPer)/(1-n._initialEasingPer),h=zn(c,u.range,u.circular);if(c!==h){var f=o[l]*(u.range[1]-u.range[0]);r[l]-=f,i[l]-=f}return h});return this._prevEasingPer=s,{pos:u,easingPer:s,finished:s>=1}},t._easing=function(e){return e>1?1:this._options.easing(e)},n}(Jn),et=function(e){function n(n,t,i){void 0===n&&(n={}),void 0===t&&(t={}),void 0===i&&(i={});var r=e.call(this)||this;return r.axis=n,r._inputs=[],r.options=rn({easing:function(e){return 1-Math.pow(1-e,3)},interruptable:!0,maximumDuration:1/0,minimumDuration:0,deceleration:6e-4,round:null,nested:!1},t),Object.keys(i).forEach(function(e){r.axis[e].startPos=i[e]}),r.interruptManager=new kn(r.options),r.axisManager=new jn(r.axis),r.eventManager=new Sn(r),r.animationManager=new $n(r),r.inputObserver=new Zn(r),r.eventManager.setAnimationManager(r.animationManager),r.eventManager.triggerChange(r.axisManager.get()),r}nn(n,e);var t=n.prototype;return Object.defineProperty(t,"holding",{get:function(){return this.eventManager.holdingCount>0},enumerable:!1,configurable:!0}),t.connect=function(e,n){var t;return t="string"==typeof e?e.split(" "):e.concat(),~this._inputs.indexOf(n)&&this.disconnect(n),n.mapAxes(t),n.connect(this.inputObserver),this._inputs.push(n),this},t.disconnect=function(e){if(e){var n=this._inputs.indexOf(e);n>=0&&(this._inputs[n].disconnect(),this._inputs.splice(n,1))}else this._inputs.forEach(function(e){return e.disconnect()}),this._inputs=[];return this},t.get=function(e){return this.axisManager.get(e)},t.setTo=function(e,n){return void 0===n&&(n=0),this.animationManager.setTo(e,n),this},t.setBy=function(e,n){return void 0===n&&(n=0),this.animationManager.setBy(e,n),this},t.setOptions=function(e){return this.options=rn(rn({},this.options),e),this.animationManager.setOptions(e),this},t.setAxis=function(e){return this.axisManager.setAxis(e),this},t.stopAnimation=function(){return this.animationManager.stopAnimation(),this.animationManager.finish(!1),this},t.updateAnimation=function(e){return this.animationManager.updateAnimation(e),this},t.isBounceArea=function(e){return this.axisManager.isOutside(e)},t.destroy=function(){this.disconnect(),this.eventManager.destroy()},n.VERSION="3.9.2",n.TRANSFORM=dn,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=sn,n.DIRECTION_ALL=30,on([$e],n.prototype,"holding",null),n=on([Ue],n)}(f),nt=function(){function e(e,n){var t=this;this.axes=[],this.element=null,this._enabled=!1,this._activeEvent=null,this._atRightEdge=!1,this._rightEdgeTimer=0,this._dragged=!1,this._isOverThreshold=!1,this._preventClickWhenDragged=function(e){t._dragged&&(e.preventDefault(),e.stopPropagation()),t._dragged=!1},this._voidFunction=function(){},this.element=vn(e),this.options=rn({inputType:["touch","mouse","pointer"],inputKey:["any"],inputButton:[un],scale:[1,1],thresholdAngle:45,threshold:0,preventClickOnDrag:!1,preventDefaultOnDrag:!1,iOSEdgeSwipeThreshold:30,releaseOnScroll:!1,touchAction:null},n),this._onPanstart=this._onPanstart.bind(this),this._onPanmove=this._onPanmove.bind(this),this._onPanend=this._onPanend.bind(this)}var n=e.prototype;return n.mapAxes=function(e){var n,t;this._direction=(n=!!e[0],t=!!e[1],n&&t?30:n?6:t?sn:1),this.axes=e},n.connect=function(e){return this._activeEvent&&(this._detachElementEvent(),this._detachWindowEvent(this._activeEvent)),this._attachElementEvent(e),this},n.disconnect=function(){return this._detachElementEvent(),this._detachWindowEvent(this._activeEvent),this._direction=1,this},n.destroy=function(){this.disconnect(),this.element=null},n.enable=function(){if(!Yn(this.options.inputType))throw new Error("PanInput cannot be enabled if there is no available input event.");return this._enabled||(this._enabled=!0,this._originalCssProps=function(e,n,t){var i,r=((i={})[1]="auto",i[30]="none",i[24]="pan-x",i[6]="pan-y",i),o={};if(e&&e.style){var a=n.touchAction?n.touchAction:r[t],s=rn(rn({},gn),{"touch-action":"none"===e.style["touch-action"]?"none":a});Object.keys(s).forEach(function(n){o[n]=e.style[n]}),Object.keys(s).forEach(function(n){e.style[n]=s[n]})}return o}(this.element,this.options,this._direction)),this},n.disable=function(){var e,n;return this._enabled&&(this._enabled=!1,e=this._originalCssProps,n=!0,Object.keys(gn).forEach(function(t){e&&e[t]===gn[t]||(n=!1)}),n||function(e,n){e&&e.style&&n&&Object.keys(n).forEach(function(t){e.style[t]=n[t]})}(this.element,this._originalCssProps)),this},n.isEnabled=function(){return this._enabled},n.release=function(){var e=this._activeEvent,n=e.prevEvent;return e.onRelease(),this._observer.release(this,n,[0,0]),this._detachWindowEvent(e),this},n._onPanstart=function(e){var n=this.options,t=n.inputKey,i=n.inputButton,r=n.preventDefaultOnDrag,o=this._activeEvent,a=o.onEventStart(e,t,i);if(a&&this._enabled&&!(o.getTouches(e,i)>1)&&!1!==a.srcEvent.cancelable){var s=this.options.iOSEdgeSwipeThreshold;this._dragged=!1,this._isOverThreshold=!1,this._observer.hold(this,a),this._atRightEdge=fn&&a.center.x>window.innerWidth-s,this._attachWindowEvent(o),r&&"touchstart"!==a.srcEvent.type&&a.srcEvent.preventDefault(),o.prevEvent=a}},n._onPanmove=function(e){var n=this,t=this.options,i=t.iOSEdgeSwipeThreshold,r=t.preventClickOnDrag,o=t.releaseOnScroll,a=t.inputKey,s=t.inputButton,u=t.threshold,l=t.thresholdAngle,c=this._activeEvent,h=c.onEventMove(e,a,s),f=c.getTouches(e,s);if(0===f||o&&h&&!h.srcEvent.cancelable)this._onPanend(e);else if(h&&this._enabled&&!(f>1)){var d=function(e,n){if(n<0||n>90)return 1;var t=Math.abs(e);return t>n&&t<180-n?sn:6}(h.angle,l),g=Cn(6,this._direction,d),p=Cn(sn,this._direction,d);if(c.prevEvent&&fn){if(h.center.x<0)return void this.release();this._atRightEdge&&(clearTimeout(this._rightEdgeTimer),h.deltaX<-i?this._atRightEdge=!1:this._rightEdgeTimer=window.setTimeout(function(){return n.release()},100))}var v=this._getDistance([h.deltaX,h.deltaY],[g,p]),_=this._getOffset([h.offsetX,h.offsetY],[g,p]),m=_.some(function(e){return 0!==e});m&&(!1!==h.srcEvent.cancelable&&h.srcEvent.preventDefault(),h.srcEvent.stopPropagation()),h.preventSystemEvent=m,m&&(this._isOverThreshold||v>=u)&&(this._dragged=r,this._isOverThreshold=!0,this._observer.change(this,h,Un(this.axes,_))),c.prevEvent=h}},n._onPanend=function(e){var n=this.options.inputButton,t=this._activeEvent;if(t.onEventEnd(e),this._enabled&&0===t.getTouches(e,n)){this._detachWindowEvent(t),clearTimeout(this._rightEdgeTimer);var i=t.prevEvent,r=this._isOverThreshold?this._getOffset([Math.abs(i.velocityX)*i.directionX,Math.abs(i.velocityY)*i.directionY],[Cn(6,this._direction),Cn(sn,this._direction)]):[0,0];t.onRelease(),this._observer.release(this,i,r)}},n._attachWindowEvent=function(e){var n=this;null==e||e.move.forEach(function(e){window.addEventListener(e,n._onPanmove,qn(e))}),null==e||e.end.forEach(function(e){window.addEventListener(e,n._onPanend,qn(e))})},n._detachWindowEvent=function(e){var n=this;null==e||e.move.forEach(function(e){window.removeEventListener(e,n._onPanmove)}),null==e||e.end.forEach(function(e){window.removeEventListener(e,n._onPanend)})},n._getOffset=function(e,n){var t=this.options.scale;return[n[0]?e[0]*t[0]:0,n[1]?e[1]*t[1]:0]},n._getDistance=function(e,n){return Math.sqrt(Number(n[0])*Math.pow(e[0],2)+Number(n[1])*Math.pow(e[1],2))},n._attachElementEvent=function(e){var n=this,t=Yn(this.options.inputType),i=this.element;if(t){if(!i)throw new Error("Element to connect input does not exist.");this._observer=e,this.enable(),this._activeEvent=t,i.addEventListener("click",this._preventClickWhenDragged,!0),t.start.forEach(function(e){i.addEventListener(e,n._onPanstart)}),t.move.forEach(function(e){i.addEventListener(e,n._voidFunction)})}},n._detachElementEvent=function(){var e=this,n=this._activeEvent,t=this.element;t&&(t.removeEventListener("click",this._preventClickWhenDragged,!0),null==n||n.start.forEach(function(n){t.removeEventListener(n,e._onPanstart)}),null==n||n.move.forEach(function(n){t.removeEventListener(n,e._voidFunction)})),this.disable(),this._observer=null},e}(),tt=et,it={HOLD:"hold",CHANGE:"change",RELEASE:"release",ANIMATION_END:"animationEnd",FINISH:"finish"},rt="flick";!function(e){e[e.IDLE=0]="IDLE",e[e.HOLDING=1]="HOLDING",e[e.DRAGGING=2]="DRAGGING",e[e.ANIMATING=3]="ANIMATING",e[e.DISABLED=4]="DISABLED"}(Kn||(Kn={}));var ot=function(){function e(){this._delta=0,this._targetPanel=null}var n=e.prototype;return Object.defineProperty(n,"delta",{get:function(){return this._delta},enumerable:!1,configurable:!0}),Object.defineProperty(n,"targetPanel",{get:function(){return this._targetPanel},set:function(e){this._targetPanel=e},enumerable:!1,configurable:!0}),n.onEnter=function(e){this._delta=e._delta,this._targetPanel=e._targetPanel},n.onHold=function(e){},n.onChange=function(e){},n.onRelease=function(e){},n.onAnimationEnd=function(e){},n.onFinish=function(e){},n._moveToChangedPosition=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.delta[rt];if(r){this._delta+=r;var o=n.camera,a=o.position,s=t.pos[rt],u=n.circularEnabled?$(s,o.range.min,o.range.max):s;o.lookAt(u);var l=new d(I.MOVE,{isTrusted:t.isTrusted,holding:this.holding,direction:q(0,t.delta[rt]),axesEvent:t});n.trigger(l),l.isCanceled()&&(o.lookAt(a),i(Kn.DISABLED))}},e}(),at=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!1,n}n(t,e);var i=t.prototype;return i.onEnter=function(){this._delta=0,this._targetPanel=null},i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.renderer.panelCount<=0)i(Kn.DISABLED);else{var r=new d(I.HOLD_START,{axesEvent:t});n.trigger(r),r.isCanceled()?i(Kn.DISABLED):i(Kn.HOLDING)}},i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control.controller.animatingContext,o=new d(I.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:q(r.start,r.end),axesEvent:t});n.trigger(o),o.isCanceled()?i(Kn.DISABLED):i(Kn.ANIMATING).onChange(e)},t}(ot),st=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!1,n._releaseEvent=null,n}n(t,e);var i=t.prototype;return i.onChange=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=t.inputEvent;if(r){var o=n.horizontal?r.offsetX:r.offsetY,a=new d(I.MOVE_START,{isTrusted:t.isTrusted,holding:this.holding,direction:q(0,-o),axesEvent:t});n.trigger(a),a.isCanceled()?i(Kn.DISABLED):i(Kn.DRAGGING).onChange(e)}},i.onRelease=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo;if(n.trigger(new d(I.HOLD_END,{axesEvent:t})),0!==t.delta.flick)return t.setTo({flick:n.camera.position},0),void i(Kn.IDLE);this._releaseEvent=t},i.onFinish=function(e){var n,t,i=e.flicking;if((0,e.transitTo)(Kn.IDLE),this._releaseEvent){var r,a=this._releaseEvent.inputEvent.srcEvent;if("touchend"===a.type){var s=a.changedTouches[0];r=document.elementFromPoint(s.clientX,s.clientY)}else r=a.target;var u=i.renderer.panels,l=null;try{for(var c=o(u),h=c.next();!h.done;h=c.next()){var f=h.value;if(f.contains(r)){l=f;break}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(t=c.return)&&t.call(c)}finally{if(n)throw n.error}}if(l){var g=i.camera.position,p=l.position;i.trigger(new d(I.SELECT,{index:l.index,panel:l,direction:q(g,p)}))}}},t}(ot),ut=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!0,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onChange=function(e){this._moveToChangedPosition(e)},i.onRelease=function(e){var n,t=e.flicking,i=e.axesEvent,r=e.transitTo;if(t.trigger(new d(I.HOLD_END,{axesEvent:i})),t.renderer.panelCount<=0)r(Kn.IDLE);else{r(Kn.ANIMATING);var o=t.control,a=i.destPos[rt],s=Math.max(i.duration,t.duration);try{o.moveToPosition(a,s,i)}catch(e){r(Kn.IDLE),i.setTo(((n={})[rt]=t.camera.position,n),0)}}},t}(ot),lt=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onHold=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=this._targetPanel,o=n.control;this._delta=0,n.control.updateInput(),n.changeOnHold&&r&&o.setActive(r,o.activePanel,t.isTrusted);var a=new d(I.HOLD_START,{axesEvent:t});n.trigger(a),a.isCanceled()?i(Kn.DISABLED):i(Kn.DRAGGING)},i.onChange=function(e){this._moveToChangedPosition(e)},i.onFinish=function(e){var n=e.flicking,t=e.axesEvent,i=e.transitTo,r=n.control,o=r.controller.animatingContext;i(Kn.IDLE),n.trigger(new d(I.MOVE_END,{isTrusted:t.isTrusted,direction:q(o.start,o.end),axesEvent:t}));var a=this._targetPanel;a&&r.setActive(a,r.activePanel,t.isTrusted)},t}(ot),ct=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.holding=!1,n.animating=!0,n}n(t,e);var i=t.prototype;return i.onAnimationEnd=function(e){(0,e.transitTo)(Kn.IDLE)},i.onChange=function(e){var n=e.axesEvent,t=e.transitTo;n.stop(),t(Kn.IDLE)},i.onRelease=function(e){var n=e.axesEvent,t=e.transitTo;0===n.delta.flick&&t(Kn.IDLE)},t}(ot),ht=function(){function e(){var e=this;this.transitTo=function(n){var t;switch(n){case Kn.IDLE:t=new at;break;case Kn.HOLDING:t=new st;break;case Kn.DRAGGING:t=new ut;break;case Kn.ANIMATING:t=new lt;break;case Kn.DISABLED:t=new ct}return t.onEnter(e._state),e._state=t,e._state},this._state=new at}var n=e.prototype;return Object.defineProperty(n,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),n.fire=function(e,n){var i=this._state,r=t(t({},n),{transitTo:this.transitTo});switch(e){case it.HOLD:i.onHold(r);break;case it.CHANGE:i.onChange(r);break;case it.RELEASE:i.onRelease(r);break;case it.ANIMATION_END:i.onAnimationEnd(r);break;case it.FINISH:i.onFinish(r)}},e}(),ft=function(){function e(){var e=this;this._onAxesHold=function(){e._dragged=!1},this._onAxesChange=function(){var n;e._dragged=!!(null===(n=e._panInput)||void 0===n?void 0:n.isEnabled())},this._preventClickWhenDragged=function(n){e._dragged&&(n.preventDefault(),n.stopPropagation()),e._dragged=!1},this._resetInternalValues(),this._stateMachine=new ht}var n=e.prototype;return Object.defineProperty(n,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panInput",{get:function(){return this._panInput},enumerable:!1,configurable:!0}),Object.defineProperty(n,"stateMachine",{get:function(){return this._stateMachine},enumerable:!1,configurable:!0}),Object.defineProperty(n,"state",{get:function(){return this._stateMachine.state},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animatingContext",{get:function(){return this._animatingContext},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){var e=this._axes;if(!e)return{range:{min:0,max:0},position:0,circular:!1};var n=e.axis[rt];return{range:{min:n.range[0],max:n.range[1]},circular:n.circular[0],position:this.position}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"enabled",{get:function(){var e,n;return null!==(n=null===(e=this._panInput)||void 0===e?void 0:e.isEnabled())&&void 0!==n&&n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.get([rt])[rt])&&void 0!==n?n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){var e,n;return null!==(n=null===(e=this._axes)||void 0===e?void 0:e.axis[rt].range)&&void 0!==n?n:[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(n,"bounce",{get:function(){var e;return null===(e=this._axes)||void 0===e?void 0:e.axis[rt].bounce},enumerable:!1,configurable:!0}),n.init=function(e){var n,t=this;this._flicking=e,this._axes=new tt(((n={})[rt]={range:[0,0],circular:!1,bounce:[0,0]},n),{deceleration:e.deceleration,interruptable:e.interruptable,nested:e.nested,easing:e.easing}),this._panInput=new nt(e.viewport.element,{inputType:e.inputType,threshold:e.dragThreshold,iOSEdgeSwipeThreshold:e.iOSEdgeSwipeThreshold,preventDefaultOnDrag:e.preventDefaultOnDrag,scale:e.horizontal?[e.camera.panelOrder===M.RTL?1:-1,0]:[0,-1],releaseOnScroll:!0});var i=this._axes;i.connect(e.horizontal?[rt,""]:["",rt],this._panInput);var r=function(n){var r=it[n];i.on(r,function(n){t._stateMachine.fire(r,{flicking:e,axesEvent:n})})};for(var o in it)r(o);return this},n.destroy=function(){var e;this._axes&&(this.removePreventClickHandler(),this._axes.destroy()),null===(e=this._panInput)||void 0===e||e.destroy(),this._resetInternalValues()},n.enable=function(){var e;return null===(e=this._panInput)||void 0===e||e.enable(),this},n.disable=function(){var e;return null===(e=this._panInput)||void 0===e||e.disable(),this},n.release=function(){var e;return null===(e=this._panInput)||void 0===e||e.release(),this},n.updateAnimation=function(e,n){var i,r;return this._animatingContext=t(t({},this._animatingContext),{end:e}),null===(r=this._axes)||void 0===r||r.updateAnimation({destPos:(i={},i[rt]=e,i),duration:n}),this},n.stopAnimation=function(){var e;return null===(e=this._axes)||void 0===e||e.stopAnimation(),this},n.update=function(e){var n,t=V(this._flicking),i=t.camera,r=this._axes,o=r.axis[rt];return o.circular=[e.circular,e.circular],o.range=[e.range.min,e.range.max],o.bounce=X(t.bounce,i.size),r.axisManager.set(((n={})[rt]=e.position,n)),this},n.addPreventClickHandler=function(){var e=V(this._flicking),n=this._axes,t=e.camera.element;return n.on(it.HOLD,this._onAxesHold),n.on(it.CHANGE,this._onAxesChange),t.addEventListener("click",this._preventClickWhenDragged,!0),this},n.removePreventClickHandler=function(){var e=V(this._flicking),n=this._axes,t=e.camera.element;return n.off(it.HOLD,this._onAxesHold),n.off(it.CHANGE,this._onAxesChange),t.removeEventListener("click",this._preventClickWhenDragged,!0),this},n.animateTo=function(e,n,t){var i,r=this,o=this._axes,a=this._stateMachine.state;if(!o)return Promise.reject(new de(m,g.NOT_ATTACHED_TO_FLICKING));var s=o.get([rt])[rt];if(s===e){var u=V(this._flicking);return u.camera.lookAt(e),a.targetPanel&&u.control.setActive(a.targetPanel,u.control.activePanel,null!==(i=null==t?void 0:t.isTrusted)&&void 0!==i&&i),Promise.resolve()}this._animatingContext={start:s,end:e,offset:0};return new Promise(function(i,a){var s=function(){o.off(it.HOLD,u),i()},u=function(){o.off(it.FINISH,s),a(new de(O,g.ANIMATION_INTERRUPTED))};o.once(it.FINISH,s),o.once(it.HOLD,u),function(){var i,a;o.once(it.FINISH,function(){r._animatingContext={start:0,end:0,offset:0}}),t?t.setTo(((i={})[rt]=e,i),n):o.setTo(((a={})[rt]=e,a),n)}()})},n.updateDirection=function(){var e=V(this._flicking),n=this._axes,t=this._panInput;n.disconnect(t),n.connect(e.horizontal?[rt,""]:["",rt],t),t.options.scale=e.horizontal?[e.camera.panelOrder===M.RTL?1:-1,0]:[0,-1]},n._resetInternalValues=function(){this._flicking=null,this._axes=null,this._panInput=null,this._animatingContext={start:0,end:0,offset:0},this._dragged=!1},e}(),dt=function(){function e(){this._flicking=null,this._controller=new ft,this._activePanel=null}var n=e.prototype;return Object.defineProperty(n,"controller",{get:function(){return this._controller},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activeIndex",{get:function(){var e,n;return null!==(n=null===(e=this._activePanel)||void 0===e?void 0:e.index)&&void 0!==n?n:-1},enumerable:!1,configurable:!0}),Object.defineProperty(n,"activePanel",{get:function(){return this._activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(n,"animating",{get:function(){return this._controller.state.animating},enumerable:!1,configurable:!0}),Object.defineProperty(n,"holding",{get:function(){return this._controller.state.holding},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._controller.init(e),this},n.destroy=function(){this._controller.destroy(),this._flicking=null,this._activePanel=null},n.enable=function(){return this._controller.enable(),this},n.disable=function(){return this._controller.disable(),this},n.release=function(){return this._controller.release(),this},n.updateAnimation=function(e,n,t){var i=this._controller.state,r=this._getPosition(e,null!=t?t:C.NONE);return i.targetPanel=e,this._controller.updateAnimation(r,n),this},n.stopAnimation=function(){return this._controller.state.targetPanel=null,this._controller.stopAnimation(),this},n.updatePosition=function(e){var n=V(this._flicking).camera,t=this._activePanel;t&&n.lookAt(n.clampToReachablePosition(t.position))},n.updateInput=function(){var e=V(this._flicking).camera;return this._controller.update(e.controlParams),this},n.resetActive=function(){return this._activePanel=null,this},n.moveToPanel=function(e,n){var t=n.duration,o=n.direction,a=void 0===o?C.NONE:o,s=n.axesEvent;return i(this,void 0,void 0,function(){var n;return r(this,function(i){return n=this._getPosition(e,a),this._triggerIndexChangeEvent(e,e.position,s,a),[2,this._animateToPosition({position:n,duration:t,newActivePanel:e,axesEvent:s})]})})},n.setActive=function(e,n,t){var i,r=V(this._flicking);this._activePanel=e,this._nextPanel=null,r.camera.updateAdaptiveHeight(),e!==n?r.trigger(new d(I.CHANGED,{index:e.index,panel:e,prevIndex:null!==(i=null==n?void 0:n.index)&&void 0!==i?i:-1,prevPanel:n,isTrusted:t,direction:n?q(n.position,e.position):C.NONE})):r.trigger(new d(I.RESTORED,{isTrusted:t}))},n.copy=function(e){this._flicking=e._flicking,this._activePanel=e._activePanel,this._controller=e._controller},n._triggerIndexChangeEvent=function(e,n,t,i){var r,o=V(this._flicking),a=e!==this._activePanel?I.WILL_CHANGE:I.WILL_RESTORE,s=o.camera,u=this._activePanel,l=new d(a,{index:e.index,panel:e,isTrusted:(null==t?void 0:t.isTrusted)||!1,direction:null!=i?i:q(null!==(r=null==u?void 0:u.position)&&void 0!==r?r:s.position,n)});if(this._nextPanel=e,o.trigger(l),l.isCanceled())throw new de(x,g.STOP_CALLED_BY_USER)},n._animateToPosition=function(e){var n=e.position,t=e.duration,o=e.newActivePanel,a=e.axesEvent;return i(this,void 0,void 0,function(){var e,s,u=this;return r(this,function(l){return e=V(this._flicking),s=function(){return u._controller.animateTo(n,t,a)},this._controller.state.targetPanel=o,t<=0?[2,s()]:[2,s().then(function(){return i(u,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return e.initialized?[4,e.renderer.render()]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})}).catch(function(e){if(!(a&&e instanceof de&&e.code===g.ANIMATION_INTERRUPTED))throw e})]})})},n._getPosition=function(e,n){void 0===n&&(n=C.NONE);var t=V(this._flicking),i=t.camera,r=e.position,o=i.findNearestAnchor(r);if(e.removed||!o)throw new de(y(e.position),g.POSITION_NOT_REACHABLE);if(i.canReach(e)){if(t.circularEnabled){var a=this._controller.position,s=i.rangeDiff,u=[r,r+s,r-s].filter(function(e){return n===C.NONE||(n===C.PREV?e<=a:e>=a)});r=u.reduce(function(e,n){return Math.abs(a-n)<Math.abs(a-e)?n:e},1/0)}}else r=o.position,e=o.panel;return r},e}(),gt=function(){function e(e){var n=e.index,t=e.position,i=e.panel;this._index=n,this._pos=t,this._panel=i}var n=e.prototype;return Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panel",{get:function(){return this._panel},enumerable:!1,configurable:!0}),e}(),pt=function(e){function t(n){var t=(void 0===n?{}:n).count,i=void 0===t?1/0:t,r=e.call(this)||this;return r._count=i,r}n(t,e);var i=t.prototype;return Object.defineProperty(i,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),i.moveToPosition=function(e,n,t){var i=V(this._flicking),r=i.camera,o=r.findActiveAnchor(),a=r.findNearestAnchor(r.position),s=this._controller.state;if(!o||!a)return Promise.reject(new de(y(e),g.POSITION_NOT_REACHABLE));var u,l=this._calcSnapThreshold(i.threshold,e,o),c=i.animating?s.delta:e-r.position,h=Math.abs(c),f=t&&0!==t.delta[rt]?Math.abs(t.delta[rt]):h;if(f>=l&&f>0)u=this._findSnappedAnchor(e,a);else{if(!(h>=i.threshold&&h>0))return this.moveToPanel(a.panel,{duration:n,axesEvent:t});u=this._findAdjacentAnchor(e,c,a)}return this._triggerIndexChangeEvent(u.panel,e,t),this._animateToPosition({position:r.clampToReachablePosition(u.position),duration:n,newActivePanel:u.panel,axesEvent:t})},i._findSnappedAnchor=function(e,n){var t=V(this._flicking),i=t.camera,r=this._count,o=i.position,a=i.clampToReachablePosition(e),s=i.findAnchorIncludePosition(a);if(!n||!s)throw new de(y(e),g.POSITION_NOT_REACHABLE);if(!isFinite(r))return s;var u=t.panelCount,l=i.anchorPoints,c=Math.sign(e-o)*Math.floor(Math.abs(e-o)/i.rangeDiff);e>o&&s.index<n.index||s.position>n.position&&s.index===n.index?c+=1:(e<o&&s.index>n.index||s.position<n.position&&s.index===n.index)&&(c-=1);var h=c*u,f=s.index+h;if(Math.abs(f-n.index)<=r){var d=l[s.index];return new gt({index:d.index,position:d.position+c*i.rangeDiff,panel:d.panel})}if(t.circularEnabled){var p=l[ae(n.index+Math.sign(e-o)*r,u)],v=Math.floor(r/u);return e>o&&p.index<n.index?v+=1:e<o&&p.index>n.index&&(v-=1),new gt({index:p.index,position:p.position+v*i.rangeDiff,panel:p.panel})}return l[H(n.index+Math.sign(e-o)*r,0,l.length-1)]},i._findAdjacentAnchor=function(e,n,t){var i,r=V(this._flicking).camera;if(r.circularEnabled){var o=r.findAnchorIncludePosition(e);if(o&&o.position!==t.position)return o}return null!==(i=n>0?r.getNextAnchor(t):r.getPrevAnchor(t))&&void 0!==i?i:t},i._calcSnapThreshold=function(e,n,t){var i=n>t.position,r=t.panel,o=r.size,a=r.alignPosition;return Math.max(e,i?o-a+r.margin.next:a+r.margin.prev)},t}(dt),vt=function(e){function t(n){var t=(void 0===n?{}:n).stopAtEdge,i=void 0===t||t,r=e.call(this)||this;return r._stopAtEdge=i,r}n(t,e);var i=t.prototype;return Object.defineProperty(i,"stopAtEdge",{get:function(){return this._stopAtEdge},set:function(e){this._stopAtEdge=e},enumerable:!1,configurable:!0}),i.updatePosition=function(e){var n=V(this._flicking).camera,t=this._activePanel;if(t){var i=t.range,r=i.min+(i.max-i.min)*e;n.lookAt(n.clampToReachablePosition(r))}},i.moveToPosition=function(e,n,t){var i=V(this._flicking).camera,r=i.clampToReachablePosition(e),o=i.findAnchorIncludePosition(r);if(!o)return Promise.reject(new de(y(e),g.POSITION_NOT_REACHABLE));var a=o.panel;return a!==this._activePanel&&this._triggerIndexChangeEvent(a,e,t),this._animateToPosition({position:this._stopAtEdge?r:e,duration:n,newActivePanel:a,axesEvent:t})},t}(dt),_t=function(e){function t(n){var t=(void 0===n?{}:n).count,i=void 0===t?1:t,r=e.call(this)||this;return r.setActive=function(n,t,i){e.prototype.setActive.call(r,n,t,i),r.updateInput()},r._count=i,r._resetIndexRange(),r}n(t,e);var o=t.prototype;return Object.defineProperty(o,"count",{get:function(){return this._count},set:function(e){this._count=e},enumerable:!1,configurable:!0}),o.destroy=function(){e.prototype.destroy.call(this),this._resetIndexRange()},o.updateInput=function(){var e,n=V(this._flicking),t=n.camera,i=n.renderer,r=this._controller,o=t.controlParams,a=this._count,s=r.state.animating?null===(e=t.findNearestAnchor(t.position))||void 0===e?void 0:e.panel:this._activePanel;if(!s)return r.update(o),this._resetIndexRange(),this;var u=o.range,l=s.position,c=s.index,h=i.panelCount,f=c-a,d=c+a;f<0&&(f=n.circularEnabled?Z((f+1)%h-1,h):H(f,0,h-1)),d>=h&&(d=n.circularEnabled?d%h:H(d,0,h-1));var g=i.panels[f],p=i.panels[d],v=Math.max(g.position,u.min),_=Math.min(p.position,u.max);return v>l&&(v-=t.rangeDiff),_<l&&(_+=t.rangeDiff),o.range={min:v,max:_},o.circular&&(o.position<v&&(o.position+=t.rangeDiff),o.position>_&&(o.position-=t.rangeDiff)),o.circular=!1,r.update(o),this._indexRange={min:g.index,max:p.index},this},o.moveToPanel=function(n,t){return i(this,void 0,void 0,function(){var i,o;return r(this,function(r){return i=V(this._flicking),o=i.camera,this._controller.update(o.controlParams),[2,e.prototype.moveToPanel.call(this,n,t)]})})},o.moveToPosition=function(e,n,t){var i,r=V(this._flicking),o=r.camera,a=null!==(i=this._nextPanel)&&void 0!==i?i:this._activePanel,s=this._controller.range,u=this._indexRange,l=o.range,c=this._controller.state,h=H(o.clampToReachablePosition(e),s[0],s[1]),f=o.findAnchorIncludePosition(h);if(!f||!a)return Promise.reject(new de(y(e),g.POSITION_NOT_REACHABLE));var d,p,v=a.position,_=r.animating?c.delta:e-o.position,m=Math.abs(_)>=r.threshold,b=e>v?o.getNextAnchor(f):o.getPrevAnchor(f),E=o.anchorPoints,P=E[0],x=E[E.length-1],O=e<=l.min&&oe(P.panel.index,u.min,u.max),T=e>=l.max&&oe(x.panel.index,u.min,u.max),R=b&&(u.min<=u.max?oe(b.index,u.min,u.max):b.index>=u.min||b.index<=u.max);if(O||T){var w=e<l.min?P:x;p=w.panel,d=w.position}else if(m&&f.position!==a.position)p=f.panel,d=f.position;else{if(!m||!R){var I=o.findNearestAnchor(o.position);return I?this.moveToPanel(I.panel,{duration:n,axesEvent:t}):Promise.reject(new de(y(e),g.POSITION_NOT_REACHABLE))}p=b.panel,d=b.position}return this._triggerIndexChangeEvent(p,e,t),this._animateToPosition({position:d,duration:n,newActivePanel:p,axesEvent:t})},o._resetIndexRange=function(){this._indexRange={min:0,max:0}},t}(dt),mt={__proto__:null,Control:dt,SnapControl:pt,FreeControl:vt,StrictControl:_t,AxesController:ft,State:ot,IdleState:at,HoldingState:st,DraggingState:ut,AnimatingState:lt,DisabledState:ct,StateMachine:ht},bt=function(){function e(e){this._flicking=e}var n=e.prototype;return n.getAnchors=function(){return this._flicking.renderer.panels.map(function(e,n){return new gt({index:n,position:e.position,panel:e})})},n.findAnchorIncludePosition=function(e){return this._flicking.camera.anchorPoints.filter(function(n){return n.panel.includePosition(e,!0)}).reduce(function(n,t){return n&&Math.abs(n.position-e)<Math.abs(t.position-e)?n:t},null)},n.findNearestAnchor=function(e){var n=this._flicking.camera.anchorPoints;if(n.length<=0)return null;for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},n.clampToReachablePosition=function(e){var n=this._flicking.camera.range;return H(e,n.min,n.max)},n.getCircularOffset=function(){return 0},n.canReach=function(e){var n=this._flicking.camera.range;if(e.removed)return!1;var t=e.position;return t>=n.min&&t<=n.max},n.canSee=function(e){var n=this._flicking.camera.visibleRange;return e.isVisibleOnRange(n.min,n.max)},e}(),Et=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){return!0},i.getRange=function(){var e,n,t=this._flicking.renderer,i=t.getPanel(0),r=t.getPanel(t.panelCount-1);return{min:null!==(e=null==i?void 0:i.position)&&void 0!==e?e:0,max:null!==(n=null==r?void 0:r.position)&&void 0!==n?n:0}},t}(bt),yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer.panels;if(n.length<=0)return!1;var t=n[0],i=n[n.length-1],r=t.range.min-t.margin.prev,o=i.range.max+i.margin.next,a=e.camera.size,s=o-r;return n.every(function(e){return s-e.size>=a})},i.getRange=function(){var e=this._flicking.renderer.panels;if(e.length<=0)return{min:0,max:0};var n=e[0],t=e[e.length-1];return{min:n.range.min-n.margin.prev,max:t.range.max+t.margin.next}},i.getAnchors=function(){return this._flicking.renderer.panels.map(function(e,n){return new gt({index:n,position:e.position,panel:e})})},i.findNearestAnchor=function(e){var n=this._flicking.camera,t=n.anchorPoints;if(t.length<=0)return null;for(var i=n.range,r=1/0,o=-1,a=0;a<t.length;a++){var s=t[a],u=Math.min(Math.abs(s.position-e),Math.abs(s.position-i.min+i.max-e),Math.abs(e-i.min+i.max-s.position));u<r&&(r=u,o=a)}return t[o]},i.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints,o=t.rangeDiff,a=r.length,s=$(n,i.min,i.max),u=e.prototype.findAnchorIncludePosition.call(this,s);if(a>0&&(n===i.min||n===i.max)){var l=[u,new gt({index:0,position:r[0].position+o,panel:r[0].panel}),new gt({index:a-1,position:r[a-1].position-o,panel:r[a-1].panel})].filter(function(e){return!!e});u=l.reduce(function(e,t){return e&&Math.abs(e.position-n)<Math.abs(t.position-n)?e:t},null)}if(!u)return null;if(n<i.min){var c=-Math.floor((i.min-n)/o)-1;return new gt({index:u.index,position:u.position+o*c,panel:u.panel})}if(n>i.max){c=Math.floor((n-i.max)/o)+1;return new gt({index:u.index,position:u.position+o*c,panel:u.panel})}return u},i.getCircularOffset=function(){var e=this._flicking;if(!e.camera.circularEnabled)return 0;var n=e.panels.filter(function(e){return e.toggled}),t=n.filter(function(e){return e.toggleDirection===C.PREV}),i=n.filter(function(e){return e.toggleDirection===C.NEXT});return this._calcPanelAreaSum(t)-this._calcPanelAreaSum(i)},i.clampToReachablePosition=function(e){return e},i.canReach=function(e){return!e.removed},i.canSee=function(n){var t=this._flicking.camera,i=t.range,r=t.rangeDiff,o=t.visibleRange,a=e.prototype.canSee.call(this,n);return o.min<i.min?a||n.isVisibleOnRange(o.min+r,o.max+r):o.max>i.max?a||n.isVisibleOnRange(o.min-r,o.max-r):a},i._calcPanelAreaSum=function(e){return e.reduce(function(e,n){return e+n.sizeIncludingMargin},0)},t}(bt),Pt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i.checkAvailability=function(){var e=this._flicking,n=e.renderer,t=n.getPanel(0),i=n.getPanel(n.panelCount-1);if(!t||!i)return!1;var r=e.camera.size,o=t.range.min;return r<i.range.max-o},i.getRange=function(){var e=this._flicking,n=e.renderer,t=e.camera.alignPosition,i=n.getPanel(0),r=n.getPanel(n.panelCount-1);if(!i||!r)return{min:0,max:0};var o=e.camera.size,a=i.range.min,s=r.range.max,u=a+t,l=s-o+t;if(o<s-a)return{min:u,max:l};var c=e.camera.align,h="object"==typeof c?c.camera:c,f=u+G(h,l-u);return{min:f,max:f}},i.getAnchors=function(){var e=this._flicking,n=e.camera,t=e.renderer.panels;if(t.length<=0)return[];var i=e.camera.range,r=t.filter(function(e){return n.canReach(e)});if(r.length>0){var o=r[0].position!==i.min,a=r[r.length-1].position!==i.max,s=o?1:0,u=r.map(function(e,n){return new gt({index:n+s,position:e.position,panel:e})});return o&&u.splice(0,0,new gt({index:0,position:i.min,panel:t[r[0].index-1]})),a&&u.push(new gt({index:u.length,position:i.max,panel:t[r[r.length-1].index+1]})),u}if(i.min!==i.max){var l=this._findNearestPanel(i.min,t),c=l.index===t.length-1?l.prev():l,h=c.next();return[new gt({index:0,position:i.min,panel:c}),new gt({index:1,position:i.max,panel:h})]}return[new gt({index:0,position:i.min,panel:this._findNearestPanel(i.min,t)})]},i.findAnchorIncludePosition=function(n){var t=this._flicking.camera,i=t.range,r=t.anchorPoints;return r.length<=0?null:n<=i.min?r[0]:n>=i.max?r[r.length-1]:e.prototype.findAnchorIncludePosition.call(this,n)},i._findNearestPanel=function(e,n){for(var t=1/0,i=0;i<n.length;i++){var r=n[i],o=Math.abs(r.position-e);if(o>t)return n[i-1];t=o}return n[n.length-1]},t}(bt),xt=function(){function e(e,n){var t=this,i=(void 0===n?{}:n).align,r=void 0===i?A.CENTER:i;this._lookedOffset=0,this._checkTranslateSupport=function(){var e,n,i=document.documentElement.style,r="";try{for(var a=o(["webkitTransform","msTransform","MozTransform","OTransform","transform"]),s=a.next();!s.done;s=a.next()){var u=s.value;u in i&&(r=u)}}catch(n){e={error:n}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}if(!r)throw new de(P,g.TRANSFORM_NOT_SUPPORTED);t._transform=r},this._flicking=e,this._resetInternalValues(),this._align=r}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._el},enumerable:!1,configurable:!0}),Object.defineProperty(n,"children",{get:function(){return B(this._el.children)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._position},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){return this._offset-this._circularOffset},enumerable:!1,configurable:!0}),Object.defineProperty(n,"circularEnabled",{get:function(){return this._circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return this._range},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rangeDiff",{get:function(){return this._range.max-this._range.min},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visiblePanels",{get:function(){return this._visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRange",{get:function(){return{min:this._position-this._alignPos,max:this._position-this._alignPos+this.size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"anchorPoints",{get:function(){return this._anchors},enumerable:!1,configurable:!0}),Object.defineProperty(n,"controlParams",{get:function(){return{range:this._range,position:this._position,circular:this._circularEnabled}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"atEdge",{get:function(){return this._position<=this._range.min||this._position>=this._range.max},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){var e=this._flicking;return e?e.horizontal?e.viewport.width:e.viewport.height:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking,n=this._position+this._offset,t=this.findNearestAnchor(this._position);if(!e||!t)return NaN;var i=t.panel,r=i.position+i.offset,o=e.control.controller.bounce,a=this.range,s=a.min,u=a.max,l=this.rangeDiff;if(n===r)return i.index;if(n<r){var c=i.prev(),h=c?c.position+c.offset:s-o[0];return h>r&&(h-=l),i.index-1+te(n,h,r)}var f=i.next(),d=f?f.position+f.offset:u+o[1];return d<r&&(d+=l),i.index+te(n,r,d)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelOrder",{get:function(){return this._panelOrder},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e},enumerable:!1,configurable:!0}),n.init=function(){var e=this._flicking.viewport.element;return F(e.firstElementChild,"First element child of the viewport element"),this._el=e.firstElementChild,this._checkTranslateSupport(),this._updateMode(),this.updatePanelOrder(),this},n.destroy=function(){return this._resetInternalValues(),this},n.lookAt=function(e){var n=this,t=this._offset,i=this._lookedOffset!==t,r=V(this._flicking),o=this._position;this._position=e;var a=this._togglePanels(o,e);this._refreshVisiblePanels(),this._checkNeedPanel(),this._checkReachEnd(o,e),a?r.renderer.render().then(function(){n.updateOffset(),n._lookedOffset=n._offset}):i?(this.updateOffset(),this._lookedOffset=this._offset):this.applyTransform()},n.getPrevAnchor=function(e){if(this._circularEnabled&&0===e.index){var n=this._anchors,t=this.rangeDiff,i=n[n.length-1];return new gt({index:i.index,position:i.position-t,panel:i.panel})}return this._anchors[e.index-1]||null},n.getNextAnchor=function(e){var n=this._anchors;if(this._circularEnabled&&e.index===n.length-1){var t=this.rangeDiff,i=n[0];return new gt({index:i.index,position:i.position+t,panel:i.panel})}return n[e.index+1]||null},n.getProgressInPanel=function(e){var n=e.range;return(this._position-n.min)/(n.max-n.min)},n.findAnchorIncludePosition=function(e){return this._mode.findAnchorIncludePosition(e)},n.findNearestAnchor=function(e){return this._mode.findNearestAnchor(e)},n.findActiveAnchor=function(){var e,n=V(this._flicking).control.activePanel;return n?null!==(e=ee(this._anchors,function(e){return e.panel.index===n.index}))&&void 0!==e?e:this.findNearestAnchor(n.position):null},n.clampToReachablePosition=function(e){return this._mode.clampToReachablePosition(e)},n.canReach=function(e){return this._mode.canReach(e)},n.canSee=function(e){return this._mode.canSee(e)},n.updateRange=function(){var e=V(this._flicking).renderer.panels;return this._updateMode(),this._range=this._mode.getRange(),e.forEach(function(e){return e.updateCircularToggleDirection()}),this},n.updateAlignPos=function(){var e=this._align,n="object"==typeof e?e.camera:e;return this._alignPos=G(n,this.size),this},n.updateAnchors=function(){return this._anchors=this._mode.getAnchors(),this},n.updateAdaptiveHeight=function(){var e=V(this._flicking),n=e.control.activePanel,t=s(e.visiblePanels);if(n&&t.push(n),e.horizontal&&e.adaptive&&t.length){var i=Math.max.apply(Math,s(t.map(function(e){return e.height})));e.viewport.setSize({height:i})}},n.updateOffset=function(){var e=V(this._flicking),n=this._position,t=e.panels.filter(function(e){return!e.rendered});return this._offset=t.filter(function(e){return e.position+e.offset<n}).reduce(function(e,n){return e+n.sizeIncludingMargin},0),this._circularOffset=this._mode.getCircularOffset(),this.applyTransform(),this},n.updatePanelOrder=function(){var e=V(this._flicking);if(!e.horizontal)return this;var n=this._el,t=ie(n).direction;return t!==this._panelOrder&&(this._panelOrder=t===M.RTL?M.RTL:M.LTR,e.initialized&&e.control.controller.updateDirection()),this},n.resetNeedPanelHistory=function(){return this._needPanelTriggered={prev:!1,next:!1},this},n.applyTransform=function(){var e=this._el,n=V(this._flicking);if(n.renderer.rendering||!n.initialized)return this;var t=this._position-this._alignPos-this._offset+this._circularOffset;return e.style[this._transform]=n.horizontal?"translate("+(this._panelOrder===M.RTL?t:-t)+"px)":"translate(0, "+-t+"px)",this},n._resetInternalValues=function(){this._position=0,this._lookedOffset=0,this._alignPos=0,this._offset=0,this._circularOffset=0,this._circularEnabled=!1,this._range={min:0,max:0},this._visiblePanels=[],this._anchors=[],this._needPanelTriggered={prev:!1,next:!1}},n._refreshVisiblePanels=function(){var e=this,n=V(this._flicking),t=n.renderer.panels.filter(function(n){return e.canSee(n)}),i=this._visiblePanels;this._visiblePanels=t;var r=t.filter(function(e){return!Q(i,e)}),o=i.filter(function(e){return!Q(t,e)});(r.length>0||o.length>0)&&n.renderer.render().then(function(){n.trigger(new d(I.VISIBLE_CHANGE,{added:r,removed:o,visiblePanels:t}))})},n._checkNeedPanel=function(){var e=this._needPanelTriggered;if(!e.prev||!e.next){var n=V(this._flicking),t=n.renderer.panels;if(t.length<=0)return e.prev||(n.trigger(new d(I.NEED_PANEL,{direction:C.PREV})),e.prev=!0),void(e.next||(n.trigger(new d(I.NEED_PANEL,{direction:C.NEXT})),e.next=!0));var i=this._position,r=this.size,o=this._range,a=n.needPanelThreshold,s=i-this._alignPos,u=s+r,l=t[0],c=t[t.length-1];if(!e.prev)(s<=l.range.min+a||i<=o.min+a)&&(n.trigger(new d(I.NEED_PANEL,{direction:C.PREV})),e.prev=!0);if(!e.next)(u>=c.range.max-a||i>=o.max-a)&&(n.trigger(new d(I.NEED_PANEL,{direction:C.NEXT})),e.next=!0)}},n._checkReachEnd=function(e,n){var t=V(this._flicking),i=this._range,r=e>i.min&&e<i.max,o=n>i.min&&n<i.max;if(r&&!o){var a=n<=i.min?C.PREV:C.NEXT;t.trigger(new d(I.REACH_EDGE,{direction:a}))}},n._updateMode=function(){var e=V(this._flicking);if(e.circular){var n=new yt(e),t=n.checkAvailability();if(t)this._mode=n;else{var i=e.circularFallback;this._mode=i===D.BOUND?new Pt(e):new Et(e)}this._circularEnabled=t}else this._mode=e.bound?new Pt(e):new Et(e),this._circularEnabled=!1},n._togglePanels=function(e,n){return n!==e&&V(this._flicking).renderer.panels.map(function(t){return t.toggle(e,n)}).some(function(e){return e})},e}(),Ot={__proto__:null,Camera:xt,LinearCameraMode:Et,CircularCameraMode:yt,BoundCameraMode:Pt},Tt=function(e,n){return Tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])},Tt(e,n)};function Rt(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}Tt(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var wt=function(){return wt=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e},wt.apply(this,arguments)};var It="undefined"!=typeof window,At=It?window.navigator.userAgent:"",Ct=!!It&&!!("getComputedStyle"in window),St=/MSIE|Trident|Windows Phone|Edge/.test(At),kt=!!It&&!!("addEventListener"in document),Dt="width",Mt="height";function Nt(e,n){return e.getAttribute(n)||""}function zt(e){return[].slice.call(e)}function jt(e,n){return void 0===n&&(n="data-"),"loading"in e&&"lazy"===e.getAttribute("loading")||!!e.getAttribute(n+"lazy")}function Lt(e,n,t){kt?e.addEventListener(n,t,!1):e.attachEvent?e.attachEvent("on"+n,t):e["on"+n]=t}function Ft(e,n,t){e.removeEventListener?e.removeEventListener(n,t,!1):e.detachEvent?e.detachEvent("on"+n,t):e["on"+n]=null}function Ht(e,n){var t=e["client"+n]||e["offset"+n];return parseFloat(t||function(e){return(Ct?window.getComputedStyle(e):e.currentStyle)||{}}(e)[n.toLowerCase()])||0}function Vt(e,n,t){var i=zt(e.querySelectorAll(function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var i=Array(e),r=0;for(n=0;n<t;n++)for(var o=arguments[n],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}(["["+t+"skip] ["+t+"width]"],n.map(function(e){return["["+t+"skip] "+e,e+"["+t+"skip]","["+t+"width] "+e].join(", ")})).join(", ")));return zt(e.querySelectorAll("["+t+"width], "+n.join(", "))).filter(function(e){return-1===i.indexOf(e)})}var Bt=[];function Gt(e,n){!Bt.length&&Lt(window,"resize",Wt),e.__PREFIX__=n,Bt.push(e),Xt(e)}function Xt(e,n){void 0===n&&(n="data-");var t=e.__PREFIX__||n,i=parseInt(Nt(e,""+t+Dt),10)||0,r=parseInt(Nt(e,""+t+Mt),10)||0;if(Nt(e,t+"fixed")===Mt){var o=Ht(e,"Height")||r;e.style[Dt]=i/r*o+"px"}else{o=function(e){return Ht(e,"Width")}(e)||i;e.style[Mt]=r/i*o+"px"}}function Wt(){Bt.forEach(function(e){Xt(e)})}var Ut=function(e){function n(n,t){void 0===t&&(t={});var i=e.call(this)||this;i.isReady=!1,i.isPreReady=!1,i.hasDataSize=!1,i.hasLoading=!1,i.isSkip=!1,i.onCheck=function(e){i.clear(),e&&"error"===e.type&&i.onError(i.element),i.hasLoading&&i.checkElement()||i.onReady()},i.options=wt({prefix:"data-"},t),i.element=n;var r=i.options.prefix;return i.hasDataSize=function(e,n){return void 0===n&&(n="data-"),!!e.getAttribute(n+"width")}(n,r),i.isSkip=function(e,n){return void 0===n&&(n="data-"),!!e.getAttribute(n+"skip")}(n,r),i.hasLoading=jt(n,r),i}Rt(n,e);var t=n.prototype;return t.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(),!1):(this.hasDataSize&&Gt(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},t.addEvents=function(){var e=this,n=this.element;this.constructor.EVENTS.forEach(function(t){Lt(n,t,e.onCheck)})},t.clear=function(){var e=this,n=this.element;this.constructor.EVENTS.forEach(function(t){Ft(n,t,e.onCheck)}),this.removeAutoSizer()},t.destroy=function(){this.clear(),this.off()},t.removeAutoSizer=function(){if(this.hasDataSize){var e=this.options.prefix;!function(e,n){var t=Bt.indexOf(e);if(!(t<0)){var i=Nt(e,n+"fixed");delete e.__PREFIX__,e.style[i===Mt?Dt:Mt]="",Bt.splice(t,1),!Bt.length&&Ft(window,"resize",Wt)}}(this.element,e)}},t.onError=function(e){this.trigger("error",{element:this.element,target:e})},t.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onReady=function(){var e=this.isPreReady;this.isPreReady=!0,this.isReady||(this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:!e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onAlreadyError=function(e){var n=this;setTimeout(function(){n.onError(e)})},t.onAlreadyPreReady=function(){var e=this;setTimeout(function(){e.onPreReady()})},t.onAlreadyReady=function(){var e=this;setTimeout(function(){e.onReady()})},n.EVENTS=[],n}(f),Yt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}Rt(n,e);var t=n.prototype;return t.setHasLoading=function(e){this.hasLoading=e},t.check=function(){return this.isSkip?(this.onAlreadyReady(),!1):(this.hasDataSize?(Gt(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},t.checkElement=function(){return!0},t.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},t.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},n.EVENTS=[],n}(Ut),qt=function(e){function n(n){void 0===n&&(n={});var t=e.call(this)||this;return t.readyCount=0,t.preReadyCount=0,t.totalCount=0,t.totalErrorCount=0,t.isPreReadyOver=!0,t.elementInfos=[],t.options=wt({loaders:{},prefix:"data-"},n),t}Rt(n,e);var t=n.prototype;return t.check=function(e){var n=this,t=this.options.prefix;this.clear(),this.elementInfos=zt(e).map(function(e,i){var r=n.getLoader(e,{prefix:t});return r.check(),r.on("error",function(e){n.onError(i,e.target)}).on("preReady",function(e){var t=n.elementInfos[i];t.hasLoading=e.hasLoading,t.isSkip=e.isSkip;var r=n.checkPreReady(i);n.onPreReadyElement(i),r&&n.onPreReady()}).on("ready",function(e){var t=e.withPreReady,r=e.hasLoading,o=e.isSkip,a=n.elementInfos[i];a.hasLoading=r,a.isSkip=o;var s=t&&n.checkPreReady(i),u=n.checkReady(i);t&&n.onPreReadyElement(i),n.onReadyElement(i),s&&n.onPreReady(),u&&n.onReady()}),{loader:r,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}});var i=this.elementInfos.length;return this.totalCount=i,i||setTimeout(function(){n.onPreReady(),n.onReady()}),this},t.getTotalCount=function(){return this.totalCount},t.isPreReady=function(){return this.elementInfos.every(function(e){return e.isPreReady})},t.isReady=function(){return this.elementInfos.every(function(e){return e.isReady})},t.hasError=function(){return this.totalErrorCount>0},t.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach(function(e){e.loader&&e.loader.destroy()}),this.elementInfos=[]},t.destroy=function(){this.clear(),this.off()},t.getLoader=function(e,n){var t=this,i=e.tagName.toLowerCase(),r=this.options.loaders,o=n.prefix,a=Object.keys(r);if(r[i])return new r[i](e,n);var s=new Yt(e,n),u=zt(e.querySelectorAll(a.join(", ")));s.setHasLoading(u.some(function(e){return jt(e,o)}));var l=this.clone().on("error",function(e){s.onError(e.target)}).on("ready",function(){s.onReady()});return s.on("requestChildren",function(){var n=Vt(e,a,t.options.prefix);l.check(n).on("preReady",function(e){e.isReady||s.onPreReady()})}).on("reqeustReadyChildren",function(){l.check(u)}).on("requestDestroy",function(){l.destroy()}),s},t.clone=function(){return new n(wt({},this.options))},t.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},t.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},t.onError=function(e,n){var t=this.elementInfos[e];t.hasError=!0,this.trigger(new d("error",{element:t.element,index:e,target:n,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount}))},t.onPreReadyElement=function(e){var n=this.elementInfos[e];this.trigger(new d("preReadyElement",{element:n.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isSkip:n.isSkip}))},t.onPreReady=function(){this.isPreReadyOver=!0,this.trigger(new d("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()}))},t.onReadyElement=function(e){var n=this.elementInfos[e];this.trigger(new d("readyElement",{index:e,element:n.element,hasError:n.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:n.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:n.isSkip}))},t.onReady=function(){this.trigger(new d("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount}))},t.getErrorCount=function(){return this.elementInfos.filter(function(e){return e.hasError}).length},t.hasLoading=function(){return this.elementInfos.some(function(e){return e.hasLoading})},n}(f),Kt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Rt(n,e),n.prototype.checkElement=function(){var e=this.element,n=e.getAttribute("src");if(e.complete){if(n)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),St&&e.setAttribute("src",n),!0},n.EVENTS=["load","error"],n}(Ut),Zt=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Rt(n,e),n.prototype.checkElement=function(){var e=this.element;return!(e.readyState>=1)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},n.EVENTS=["loadedmetadata","error"],n}(Ut),Qt=function(e){function n(n){return void 0===n&&(n={}),e.call(this,wt({loaders:{img:Kt,video:Zt}},n))||this}return Rt(n,e),n}(qt),Jt=function(){function e(e){var n=e.align,t=void 0===n?A.CENTER:n,i=e.strategy;this._flicking=null,this._panels=[],this._rendering=!1,this._align=t,this._strategy=i}var n=e.prototype;return Object.defineProperty(n,"panels",{get:function(){return this._panels},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendering",{get:function(){return this._rendering},enumerable:!1,configurable:!0}),Object.defineProperty(n,"panelCount",{get:function(){return this._panels.length},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strategy",{get:function(){return this._strategy},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e;var n=Y(e);this._panels.forEach(function(e){e.align=n})},enumerable:!1,configurable:!0}),n.init=function(e){return this._flicking=e,this._collectPanels(),this},n.destroy=function(){this._flicking=null,this._panels=[]},n.getPanel=function(e){return this._panels[e]||null},n.forceRenderAllPanels=function(){return this._panels.forEach(function(e){return e.markForShow()}),Promise.resolve()},n.updatePanelSize=function(){var e=V(this._flicking),n=this._panels;if(n.length<=0)return this;if(e.panelsPerView>0){var t=n[0];t.resize(),this._updatePanelSizeByGrid(t,n)}else e.panels.forEach(function(e){return e.resize()});return this},n.batchInsert=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchInsertDefer.apply(this,s(e));return t.length<=0?[]:(this.updateAfterPanelChange(t,[]),t)},n.batchInsertDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=V(this._flicking),o=i[0],a=Y(this._align);return n.reduce(function(n,t){var u,l=Z(t.index,i.length),c=i.slice(l),h=t.elements.map(function(n,t){return e._createPanel(n,{index:l+t,align:a,flicking:r})});if(i.splice.apply(i,s([l,0],h)),t.hasDOMInElements&&e._insertPanelElements(h,null!==(u=c[0])&&void 0!==u?u:null),r.panelsPerView>0){var f=o||h[0].resize();e._updatePanelSizeByGrid(f,h)}else h.forEach(function(e){return e.resize()});return c.forEach(function(e){e.increaseIndex(h.length),e.updatePosition()}),s(n,h)},[])},n.batchRemove=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this.batchRemoveDefer.apply(this,s(e));return t.length<=0?[]:(this.updateAfterPanelChange([],t),t)},n.batchRemoveDefer=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var i=this._panels,r=V(this._flicking).control,o=r.activePanel;return n.reduce(function(n,t){var a=t.index,u=t.deleteCount,l=Z(a,i.length),c=i.slice(l+u),h=i.splice(l,u);return h.length<=0?[]:(c.forEach(function(e){e.decreaseIndex(h.length),e.updatePosition()}),t.hasDOMInElements&&e._removePanelElements(h),h.forEach(function(e){return e.destroy()}),Q(h,o)&&r.resetActive(),s(n,h))},[])},n.updateAfterPanelChange=function(e,n){var t,i=V(this._flicking),r=i.camera,o=i.control,a=this._panels,u=o.activePanel;if(this._updateCameraAndControl(),i.autoResize&&i.useResizeObserver&&(e.forEach(function(e){e.element&&i.autoResizer.observe(e.element)}),n.forEach(function(e){e.element&&i.autoResizer.unobserve(e.element)})),this.render(),!i.animating)if(!u||u.removed)if(a.length<=0)r.lookAt(0);else{var l=null!==(t=null==u?void 0:u.index)&&void 0!==t?t:0;l>a.length-1&&(l=a.length-1),o.moveToPanel(a[l],{duration:0}).catch(function(){})}else o.moveToPanel(u,{duration:0}).catch(function(){});i.camera.updateOffset(),(e.length>0||n.length>0)&&(i.trigger(new d(I.PANEL_CHANGE,{added:e,removed:n})),this.checkPanelContentsReady(s(e,n)))},n.checkPanelContentsReady=function(e){var n=this,t=V(this._flicking),i=t.resizeOnContentsReady,r=this._panels;if(i&&!t.virtualEnabled){if(!((e=e.filter(function(e){return function(e){return e.element&&!!e.element.querySelector("img, video")}(e)})).length<=0)){var o=new Qt;e.forEach(function(e){e.loading=!0}),o.on("readyElement",function(i){if(n._flicking){var a=e[i.index],s=t.camera,u=t.control,l=u.activePanel?s.getProgressInPanel(u.activePanel):0;a.loading=!1,a.resize(),r.slice(a.index+1).forEach(function(e){return e.updatePosition()}),t.initialized&&(s.updateRange(),s.updateOffset(),s.updateAnchors(),u.animating||(u.updatePosition(l),u.updateInput()))}else o.destroy()}),o.on("preReady",function(e){n._flicking&&n.render(),e.readyCount===e.totalCount&&o.destroy()}),o.on("ready",function(){n._flicking&&n.render(),o.destroy()}),o.check(e.map(function(e){return e.element}))}}},n._updateCameraAndControl=function(){var e=V(this._flicking),n=e.camera,t=e.control;n.updateRange(),n.updateOffset(),n.updateAnchors(),n.resetNeedPanelHistory(),t.updateInput()},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera.visiblePanels.reduce(function(e,n){return e[n.index]=!0,e},{});n.forEach(function(n){n.index in t||n.loading?n.markForShow():e.holding||n.markForHide()})},n._updatePanelSizeByGrid=function(e,n){var i=V(this._flicking),r=i.panelsPerView;if(r<=0)throw new de(b("panelsPerView",r),g.WRONG_OPTION);if(!(n.length<=0)){var o=(i.camera.size-(e.margin.prev+e.margin.next)*(r-1))/r,a=i.horizontal?{width:o}:{height:o},s=t({size:o,margin:e.margin},!i.horizontal&&{height:e.height});i.noPanelStyleOverride||this._strategy.updatePanelSizes(i,a),i.panels.forEach(function(e){return e.resize(s)})}},n._removeAllChildsFromCamera=function(){for(var e=V(this._flicking).camera.element;e.firstChild;)e.removeChild(e.firstChild)},n._insertPanelElements=function(e,n){void 0===n&&(n=null);var t=V(this._flicking).camera.element,i=(null==n?void 0:n.element)||null,r=document.createDocumentFragment();e.forEach(function(e){return r.appendChild(e.element)}),t.insertBefore(r,i)},n._removePanelElements=function(e){var n=V(this._flicking).camera.element;e.forEach(function(e){n.removeChild(e.element)})},n._afterRender=function(){V(this._flicking).camera.applyTransform()},e}(),$t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var o=t.prototype;return o.render=function(){return i(this,void 0,void 0,function(){var e,n;return r(this,function(t){return e=V(this._flicking),(n=this._strategy).updateRenderingPanels(e),n.renderPanels(e),this._resetPanelElementOrder(),this._afterRender(),[2]})})},o._collectPanels=function(){var e=V(this._flicking),n=e.camera;this._removeAllTextNodes(),this._panels=this._strategy.collectPanels(e,n.children)},o._createPanel=function(e,n){return this._strategy.createPanel(e,n)},o._resetPanelElementOrder=function(){var e=V(this._flicking),n=e.camera.element,t=this._strategy.getRenderingElementsByOrder(e).reverse();t.forEach(function(e,i){var r=t[i-1]?t[i-1]:null;e.nextElementSibling!==r&&n.insertBefore(e,r)})},o._removeAllTextNodes=function(){var e=V(this._flicking).camera.element;B(e.childNodes).forEach(function(n){n.nodeType===Node.TEXT_NODE&&e.removeChild(n)})},t}(Jt),ei=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}n(t,e);var i=t.prototype;return i._removePanelElements=function(e){},i._removeAllChildsFromCamera=function(){},t}(Jt),ni=function(){function e(e){var n=e.index,t=e.align,i=e.flicking,r=e.elementProvider;this._index=n,this._flicking=i,this._elProvider=r,this._align=t,this._removed=!1,this._rendered=!0,this._loading=!1,this._resetInternalStates()}var n=e.prototype;return Object.defineProperty(n,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(n,"elementProvider",{get:function(){return this._elProvider},enumerable:!1,configurable:!0}),Object.defineProperty(n,"index",{get:function(){return this._index},enumerable:!1,configurable:!0}),Object.defineProperty(n,"position",{get:function(){return this._pos+this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),Object.defineProperty(n,"sizeIncludingMargin",{get:function(){return this._size+this._margin.prev+this._margin.next},enumerable:!1,configurable:!0}),Object.defineProperty(n,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(n,"margin",{get:function(){return this._margin},enumerable:!1,configurable:!0}),Object.defineProperty(n,"alignPosition",{get:function(){return this._alignPos},enumerable:!1,configurable:!0}),Object.defineProperty(n,"removed",{get:function(){return this._removed},enumerable:!1,configurable:!0}),Object.defineProperty(n,"rendered",{get:function(){return this._rendered},enumerable:!1,configurable:!0}),Object.defineProperty(n,"loading",{get:function(){return this._loading},set:function(e){this._loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(n,"range",{get:function(){return{min:this._pos,max:this._pos+this._size}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggled",{get:function(){return this._toggled},enumerable:!1,configurable:!0}),Object.defineProperty(n,"toggleDirection",{get:function(){return this._toggleDirection},enumerable:!1,configurable:!0}),Object.defineProperty(n,"offset",{get:function(){var e=this._toggleDirection,n=this._flicking.camera.rangeDiff;return e!==C.NONE&&this._toggled?e===C.PREV?-n:n:0},enumerable:!1,configurable:!0}),Object.defineProperty(n,"progress",{get:function(){var e=this._flicking;return this.index-e.camera.progress},enumerable:!1,configurable:!0}),Object.defineProperty(n,"outsetProgress",{get:function(){var e=this.position+this.offset,n=this._alignPos,t=this._flicking.camera,i=t.position;if(i===e)return 0;if(i<e){var r=e+(t.size-t.alignPosition)+n;return-te(i,e,r)}var o=e-(t.alignPosition+this._size-n);return 1-te(i,o,e)},enumerable:!1,configurable:!0}),Object.defineProperty(n,"visibleRatio",{get:function(){var e=this.range,n=this._size,t=this.offset,i=this._flicking.camera.visibleRange,r=e.min+t,o=e.max+t;if(o<=i.min||r>=i.max)return 0;var a=n;return i.min>r&&(a-=i.min-r),i.max<o&&(a-=o-i.max),a/n},enumerable:!1,configurable:!0}),Object.defineProperty(n,"align",{get:function(){return this._align},set:function(e){this._align=e,this._updateAlignPos()},enumerable:!1,configurable:!0}),n.markForShow=function(){this._rendered=!0,this._elProvider.show(this._flicking)},n.markForHide=function(){this._rendered=!1,this._elProvider.hide(this._flicking)},n.resize=function(e){var n,i=this.element,r=this._flicking,o=r.horizontal,a=r.useFractionalSize;if(!i)return this;if(e)this._size=e.size,this._margin=t({},e.margin),this._height=null!==(n=e.height)&&void 0!==n?n:ue({el:i,horizontal:!1,useFractionalSize:a,useOffset:!0,style:ie(i)});else{var s=ie(i);this._size=ue({el:i,horizontal:o,useFractionalSize:a,useOffset:!0,style:s}),this._margin=o?{prev:parseFloat(s.marginLeft||"0"),next:parseFloat(s.marginRight||"0")}:{prev:parseFloat(s.marginTop||"0"),next:parseFloat(s.marginBottom||"0")},this._height=o?ue({el:i,horizontal:!1,useFractionalSize:a,useOffset:!0,style:s}):this._size}return this.updatePosition(),this._updateAlignPos(),this},n.setSize=function(e){return re(this.element,e),this},n.contains=function(e){var n;return!!(null===(n=this.element)||void 0===n?void 0:n.contains(e))},n.destroy=function(){this._resetInternalStates(),this._removed=!0},n.includePosition=function(e,n){return void 0===n&&(n=!1),this.includeRange(e,e,n)},n.includeRange=function(e,n,t){void 0===t&&(t=!1);var i=this._margin,r=this.range;return t&&(r.min-=i.prev,r.max+=i.next),n>=r.min&&e<=r.max},n.isVisibleOnRange=function(e,n){var t=this.range;return n>t.min&&e<t.max},n.focus=function(e){return this._flicking.moveTo(this._index,e)},n.prev=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(0===e?i-1:e-1):t.getPanel(e-1)},n.next=function(){var e=this._index,n=this._flicking,t=n.renderer,i=t.panelCount;return 1===i?null:n.circularEnabled?t.getPanel(e===i-1?0:e+1):t.getPanel(e+1)},n.increaseIndex=function(e){return this._index+=Math.max(e,0),this},n.decreaseIndex=function(e){return this._index-=Math.max(e,0),this},n.updatePosition=function(){var e=this._flicking.renderer.panels[this._index-1];return this._pos=e?e.range.max+e.margin.next+this._margin.prev:this._margin.prev,this},n.toggle=function(e,n){var t=this._toggleDirection,i=this._togglePosition;if(t===C.NONE||n===e)return!1;var r=this._toggled;return n>e?i>=e&&i<=n&&(this._toggled=t===C.NEXT):i<=e&&i>=n&&(this._toggled=t!==C.NEXT),r!==this._toggled},n.updateCircularToggleDirection=function(){var e=this._flicking;if(!e.circularEnabled)return this._toggleDirection=C.NONE,this._togglePosition=0,this._toggled=!1,this;var n=e.camera,t=n.range,i=n.alignPosition,r=n.visibleRange,o=r.max-r.min,a=t.min-i,s=t.max-i+o,u=this.includeRange(s-o,s,!1),l=this.includeRange(a,a+o,!1);return this._toggled=!1,u?(this._toggleDirection=C.PREV,this._togglePosition=this.range.max+t.min-t.max+i,this.toggle(1/0,n.position)):l?(this._toggleDirection=C.NEXT,this._togglePosition=this.range.min+t.max-o+i,this.toggle(-1/0,n.position)):(this._toggleDirection=C.NONE,this._togglePosition=0),this},n._updateAlignPos=function(){this._alignPos=G(this._align,this._size)},n._resetInternalStates=function(){this._size=0,this._pos=0,this._margin={prev:0,next:0},this._height=0,this._alignPos=0,this._toggled=!1,this._togglePosition=0,this._toggleDirection=C.NONE},e}(),ti=function(){function e(e){var n=e.providerCtor;this._providerCtor=n}var n=e.prototype;return n.renderPanels=function(){},n.getRenderingIndexesByOrder=function(e){var n=e.renderer.panels.filter(function(e){return e.rendered}),t=n.filter(function(e){return e.toggled&&e.toggleDirection===C.PREV}),i=n.filter(function(e){return e.toggled&&e.toggleDirection===C.NEXT});return s(t,n.filter(function(e){return!e.toggled}),i).map(function(e){return e.index})},n.getRenderingElementsByOrder=function(e){var n=e.panels;return this.getRenderingIndexesByOrder(e).map(function(e){return n[e].element})},n.updateRenderingPanels=function(e){e.renderOnlyVisible?this._showOnlyVisiblePanels(e):e.panels.forEach(function(e){return e.markForShow()})},n.collectPanels=function(e,n){var t=this,i=Y(e.renderer.align);return n.map(function(n,r){return new ni({index:r,elementProvider:new t._providerCtor(n),align:i,flicking:e})})},n.createPanel=function(e,n){return new ni(t(t({},n),{elementProvider:new this._providerCtor(e)}))},n.updatePanelSizes=function(e,n){e.panels.forEach(function(e){return e.setSize(n)})},n._showOnlyVisiblePanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce(function(e,n){return e[n.index]=!0,e},{});n.forEach(function(n){n.index in i||n.loading?n.markForShow():e.holding||n.markForHide()}),t.updateOffset()},e}(),ii=function(e){function t(n){var t=e.call(this,n)||this;return n.elementProvider.init(t),t._elProvider=n.elementProvider,t._cachedInnerHTML=null,t}n(t,e);var i=t.prototype;return Object.defineProperty(i,"element",{get:function(){return this._elProvider.element},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cachedInnerHTML",{get:function(){return this._cachedInnerHTML},enumerable:!1,configurable:!0}),Object.defineProperty(i,"elementIndex",{get:function(){var e=this._flicking,n=e.panelsPerView+1,t=e.panelCount,i=this._index;return this._toggled&&(i=this._toggleDirection===C.NEXT?i+t:i-t),ae(i,n)},enumerable:!1,configurable:!0}),i.cacheRenderResult=function(e){this._cachedInnerHTML=e},i.uncacheRenderResult=function(){this._cachedInnerHTML=null},i.render=function(){var e=this._flicking.virtual,n=e.renderPanel,t=e.cache,i=this._elProvider.element,r=this._cachedInnerHTML||n(this,this._index);r!==i.innerHTML&&(i.innerHTML=r,t&&this.cacheRenderResult(r))},i.increaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.increaseIndex.call(this,n)},i.decreaseIndex=function(n){return this.uncacheRenderResult(),e.prototype.decreaseIndex.call(this,n)},t}(ni),ri=function(){function e(){}var n=e.prototype;return n.renderPanels=function(e){var n=e.virtual,t=e.visiblePanels,i=se(e.panelsPerView+1);t.forEach(function(e){var t=e.elementIndex;e.render(),n.show(t),i[t]=-1}),i.filter(function(e){return e>=0}).forEach(function(e){n.hide(e)})},n.getRenderingIndexesByOrder=function(e){var n=e.virtual,i=s(e.visiblePanels).filter(function(e){return e.rendered}).sort(function(e,n){return e.position+e.offset-(n.position+n.offset)});return i.length<=0?n.elements.map(function(e,n){return n}):s(i.map(function(e){return e.elementIndex}),n.elements.map(function(e,n){return t(t({},e),{idx:n})}).filter(function(e){return!e.visible}).map(function(e){return e.idx}))},n.getRenderingElementsByOrder=function(e){var n=e.virtual.elements;return this.getRenderingIndexesByOrder(e).map(function(e){return n[e].nativeElement})},n.updateRenderingPanels=function(e){var n=e.renderer.panels,t=e.camera,i=t.visiblePanels.reduce(function(e,n){return e[n.index]=!0,e},{});n.forEach(function(e){e.index in i||e.loading?e.markForShow():e.markForHide()}),t.updateOffset()},n.collectPanels=function(e){var n=Y(e.renderer.align);return se(e.virtual.initialPanelCount).map(function(t){return new ii({index:t,elementProvider:new _e(e),align:n,flicking:e})})},n.createPanel=function(e,n){return new ii(t(t({},n),{elementProvider:new _e(n.flicking)}))},n.updatePanelSizes=function(e,n){e.virtual.elements.forEach(function(e){re(e.nativeElement,n)}),e.panels.forEach(function(e){return e.setSize(n)})},e}(),oi={__proto__:null,Renderer:Jt,VanillaRenderer:$t,ExternalRenderer:ei,NormalRenderingStrategy:ti,VirtualRenderingStrategy:ri},ai=function(e){function o(n,t){var i=void 0===t?{}:t,r=i.align,o=void 0===r?A.CENTER:r,a=i.defaultIndex,s=void 0===a?0:a,u=i.horizontal,l=void 0===u||u,c=i.circular,h=void 0!==c&&c,f=i.circularFallback,d=void 0===f?D.LINEAR:f,g=i.bound,p=void 0!==g&&g,v=i.adaptive,_=void 0!==v&&v,m=i.panelsPerView,b=void 0===m?-1:m,E=i.noPanelStyleOverride,y=void 0!==E&&E,P=i.resizeOnContentsReady,x=void 0!==P&&P,O=i.nested,T=void 0!==O&&O,R=i.needPanelThreshold,w=void 0===R?0:R,I=i.preventEventsBeforeInit,C=void 0===I||I,S=i.deceleration,k=void 0===S?.0075:S,M=i.duration,N=void 0===M?500:M,z=i.easing,j=void 0===z?function(e){return 1-Math.pow(1-e,3)}:z,F=i.inputType,H=void 0===F?["mouse","touch"]:F,V=i.moveType,B=void 0===V?"snap":V,G=i.threshold,X=void 0===G?40:G,W=i.dragThreshold,U=void 0===W?1:W,Y=i.interruptable,q=void 0===Y||Y,K=i.bounce,Z=void 0===K?"20%":K,Q=i.iOSEdgeSwipeThreshold,J=void 0===Q?30:Q,$=i.preventClickOnDrag,ee=void 0===$||$,ne=i.preventDefaultOnDrag,te=void 0!==ne&&ne,ie=i.disableOnInit,re=void 0!==ie&&ie,oe=i.changeOnHold,ae=void 0!==oe&&oe,se=i.renderOnlyVisible,ue=void 0!==se&&se,le=i.virtual,ce=void 0===le?null:le,he=i.autoInit,fe=void 0===he||he,de=i.autoResize,ve=void 0===de||de,_e=i.useResizeObserver,be=void 0===_e||_e,Ee=i.resizeDebounce,ye=void 0===Ee?0:Ee,Pe=i.observePanelResize,xe=void 0!==Pe&&Pe,Oe=i.maxResizeDebounce,Te=void 0===Oe?100:Oe,Re=i.useFractionalSize,we=void 0!==Re&&Re,Ie=i.externalRenderer,Ae=void 0===Ie?null:Ie,Ce=i.renderExternal,Se=void 0===Ce?null:Ce,ke=i.optimizeSizeUpdate,De=void 0!==ke&&ke,Me=e.call(this)||this;return Me._initialized=!1,Me._plugins=[],Me._isResizing=!1,Me._align=o,Me._defaultIndex=s,Me._horizontal=l,Me._circular=h,Me._circularFallback=d,Me._bound=p,Me._adaptive=_,Me._panelsPerView=b,Me._noPanelStyleOverride=y,Me._resizeOnContentsReady=x,Me._nested=T,Me._virtual=ce,Me._needPanelThreshold=w,Me._preventEventsBeforeInit=C,Me._deceleration=k,Me._duration=N,Me._easing=j,Me._inputType=H,Me._moveType=B,Me._threshold=X,Me._dragThreshold=U,Me._interruptable=q,Me._bounce=Z,Me._iOSEdgeSwipeThreshold=J,Me._preventClickOnDrag=ee,Me._preventDefaultOnDrag=te,Me._disableOnInit=re,Me._changeOnHold=ae,Me._renderOnlyVisible=ue,Me._autoInit=fe,Me._autoResize=ve,Me._useResizeObserver=be,Me._resizeDebounce=ye,Me._maxResizeDebounce=Te,Me._observePanelResize=xe,Me._useFractionalSize=we,Me._externalRenderer=Ae,Me._renderExternal=Se,Me._optimizeSizeUpdate=De,Me._viewport=new ge(Me,L(n)),Me._autoResizer=new pe(Me),Me._renderer=Me._createRenderer(),Me._camera=Me._createCamera(),Me._control=Me._createControl(),Me._virtualManager=new me(Me,ce),Me._autoInit&&Me.init(),Me}n(o,e);var a=o.prototype;return Object.defineProperty(a,"control",{get:function(){return this._control},enumerable:!1,configurable:!0}),Object.defineProperty(a,"camera",{get:function(){return this._camera},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderer",{get:function(){return this._renderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"viewport",{get:function(){return this._viewport},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResizer",{get:function(){return this._autoResizer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularEnabled",{get:function(){return this._camera.circularEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtualEnabled",{get:function(){return this._panelsPerView>0&&null!=this._virtual},enumerable:!1,configurable:!0}),Object.defineProperty(a,"index",{get:function(){return this._control.activeIndex},enumerable:!1,configurable:!0}),Object.defineProperty(a,"element",{get:function(){return this._viewport.element},enumerable:!1,configurable:!0}),Object.defineProperty(a,"currentPanel",{get:function(){return this._control.activePanel},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panels",{get:function(){return this._renderer.panels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelCount",{get:function(){return this._renderer.panelCount},enumerable:!1,configurable:!0}),Object.defineProperty(a,"visiblePanels",{get:function(){return this._camera.visiblePanels},enumerable:!1,configurable:!0}),Object.defineProperty(a,"animating",{get:function(){return this._control.animating},enumerable:!1,configurable:!0}),Object.defineProperty(a,"holding",{get:function(){return this._control.holding},enumerable:!1,configurable:!0}),Object.defineProperty(a,"activePlugins",{get:function(){return this._plugins},enumerable:!1,configurable:!0}),Object.defineProperty(a,"align",{get:function(){return this._align},set:function(e){this._align=e,this._renderer.align=e,this._camera.align=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"defaultIndex",{get:function(){return this._defaultIndex},set:function(e){this._defaultIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"horizontal",{get:function(){return this._horizontal},set:function(e){this._horizontal=e,this._control.controller.updateDirection(),this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circular",{get:function(){return this._circular},set:function(e){this._circular=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"circularFallback",{get:function(){return this._circularFallback},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bound",{get:function(){return this._bound},set:function(e){this._bound=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"adaptive",{get:function(){return this._adaptive},set:function(e){this._adaptive=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"panelsPerView",{get:function(){return this._panelsPerView},set:function(e){this._panelsPerView=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"noPanelStyleOverride",{get:function(){return this._noPanelStyleOverride},set:function(e){this._noPanelStyleOverride=e,this.resize()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeOnContentsReady",{get:function(){return this._resizeOnContentsReady},set:function(e){this._resizeOnContentsReady=e,e&&this._renderer.checkPanelContentsReady(this._renderer.panels)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"nested",{get:function(){return this._nested},set:function(e){this._nested=e;var n=this._control.controller.axes;n&&(n.options.nested=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"needPanelThreshold",{get:function(){return this._needPanelThreshold},set:function(e){this._needPanelThreshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventEventsBeforeInit",{get:function(){return this._preventEventsBeforeInit},set:function(e){this._preventEventsBeforeInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"deceleration",{get:function(){return this._deceleration},set:function(e){this._deceleration=e;var n=this._control.controller.axes;n&&(n.options.deceleration=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"easing",{get:function(){return this._easing},set:function(e){this._easing=e;var n=this._control.controller.axes;n&&(n.options.easing=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"duration",{get:function(){return this._duration},set:function(e){this._duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"inputType",{get:function(){return this._inputType},set:function(e){this._inputType=e;var n=this._control.controller.panInput;n&&(n.options.inputType=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"moveType",{get:function(){return this._moveType},set:function(e){this._moveType=e;var n=this._control,t=this._createControl(),i=n.activePanel;t.copy(n);var r=i?this._camera.getProgressInPanel(i):0;this._control=t,this._control.updatePosition(r),this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"threshold",{get:function(){return this._threshold},set:function(e){this._threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"dragThreshold",{get:function(){return this._dragThreshold},set:function(e){this._dragThreshold=e;var n=this._control.controller.panInput;n&&(n.options.threshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"interruptable",{get:function(){return this._interruptable},set:function(e){this._interruptable=e;var n=this._control.controller.axes;n&&(n.options.interruptable=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"bounce",{get:function(){return this._bounce},set:function(e){this._bounce=e,this._control.updateInput()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"iOSEdgeSwipeThreshold",{get:function(){return this._iOSEdgeSwipeThreshold},set:function(e){this._iOSEdgeSwipeThreshold=e;var n=this._control.controller.panInput;n&&(n.options.iOSEdgeSwipeThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventClickOnDrag",{get:function(){return this._preventClickOnDrag},set:function(e){if(e!==this._preventClickOnDrag){var n=this._control.controller;e?n.addPreventClickHandler():n.removePreventClickHandler(),this._preventClickOnDrag=e}},enumerable:!1,configurable:!0}),Object.defineProperty(a,"preventDefaultOnDrag",{get:function(){return this._preventDefaultOnDrag},set:function(e){this._preventDefaultOnDrag=e;var n=this._control.controller.panInput;n&&(n.options.preventDefaultOnDrag=e)},enumerable:!1,configurable:!0}),Object.defineProperty(a,"disableOnInit",{get:function(){return this._disableOnInit},set:function(e){this._disableOnInit=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"changeOnHold",{get:function(){return this._changeOnHold},set:function(e){this._changeOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderOnlyVisible",{get:function(){return this._renderOnlyVisible},set:function(e){this._renderOnlyVisible=e,this._renderer.render()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"virtual",{get:function(){return this._virtualManager},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoInit",{get:function(){return this._autoInit},enumerable:!1,configurable:!0}),Object.defineProperty(a,"autoResize",{get:function(){return this._autoResize},set:function(e){this._autoResize=e,this._initialized&&(e?this._autoResizer.enable():this._autoResizer.disable())},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useResizeObserver",{get:function(){return this._useResizeObserver},set:function(e){this._useResizeObserver=e,this._initialized&&this._autoResize&&this._autoResizer.enable()},enumerable:!1,configurable:!0}),Object.defineProperty(a,"observePanelResize",{get:function(){return this._observePanelResize},set:function(e){this._observePanelResize=e,this._initialized&&this._autoResize&&(e?this._autoResizer.observePanels():this._autoResizer.unobservePanels())},enumerable:!1,configurable:!0}),Object.defineProperty(a,"resizeDebounce",{get:function(){return this._resizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"maxResizeDebounce",{get:function(){return this._maxResizeDebounce},enumerable:!1,configurable:!0}),Object.defineProperty(a,"useFractionalSize",{get:function(){return this._useFractionalSize},enumerable:!1,configurable:!0}),Object.defineProperty(a,"externalRenderer",{get:function(){return this._externalRenderer},enumerable:!1,configurable:!0}),Object.defineProperty(a,"renderExternal",{get:function(){return this._renderExternal},enumerable:!1,configurable:!0}),Object.defineProperty(a,"optimizeSizeUpdate",{get:function(){return this._optimizeSizeUpdate},set:function(e){this._optimizeSizeUpdate=e},enumerable:!1,configurable:!0}),a.init=function(){var e=this;if(this._initialized)return Promise.resolve();var n=this._camera,t=this._renderer,i=this._control,r=this._virtualManager,o=this.trigger,a=this._preventEventsBeforeInit;return n.init(),r.init(),t.init(this),i.init(this),a&&(this.trigger=function(){return e}),this._initialResize(),this._moveToInitialPanel(),this._autoResize&&this._autoResizer.enable(),this._preventClickOnDrag&&i.controller.addPreventClickHandler(),this._disableOnInit&&this.disableInput(),t.checkPanelContentsReady(t.panels),this._initialized=!0,t.render().then(function(){e._plugins.forEach(function(n){return n.init(e)}),a&&(e.trigger=o),e.trigger(new d(I.READY))})},a.destroy=function(){this.off(),this._autoResizer.disable(),this._control.destroy(),this._camera.destroy(),this._renderer.destroy(),this._plugins.forEach(function(e){return e.destroy()}),this._initialized=!1},a.prev=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.prev())||void 0===t?void 0:t.index)&&void 0!==i?i:-1,e,C.PREV)},a.next=function(e){var n,t,i;return void 0===e&&(e=this._duration),this.moveTo(null!==(i=null===(t=null===(n=this._control.activePanel)||void 0===n?void 0:n.next())||void 0===t?void 0:t.index)&&void 0!==i?i:this._renderer.panelCount,e,C.NEXT)},a.moveTo=function(e,n,t){void 0===n&&(n=this._duration),void 0===t&&(t=C.NONE);var i=this._renderer,r=i.panelCount,o=i.getPanel(e);return o?this._control.animating?Promise.reject(new de(T,g.ANIMATION_ALREADY_PLAYING)):(this._control.holding&&this._control.controller.release(),this._control.moveToPanel(o,{duration:n,direction:t})):Promise.reject(new de(E(e,0,r-1),g.INDEX_OUT_OF_RANGE))},a.updateAnimation=function(e,n,t){if(this._control.animating){var i=this._renderer,r=i.panelCount,o=i.getPanel(e);if(!o)throw new de(E(e,0,r-1),g.INDEX_OUT_OF_RANGE);this._control.updateAnimation(o,n,t)}},a.stopAnimation=function(){this._control.animating&&this._control.stopAnimation()},a.getPanel=function(e){return this._renderer.getPanel(e)},a.enableInput=function(){return this._control.enable(),this},a.disableInput=function(){return this._control.disable(),this},a.getStatus=function(e){var n,t,i=void 0===e?{}:e,r=i.index,o=void 0===r||r,a=i.position,s=void 0===a||a,u=i.includePanelHTML,l=void 0!==u&&u,c=i.visiblePanelsOnly,h=void 0!==c&&c,f=this._camera,d={panels:(h?this.visiblePanels:this.panels).map(function(e){var n={index:e.index};return l&&(n.html=e.element.outerHTML),n})};if(o&&(d.index=this.index),s){var g=f.findNearestAnchor(f.position);g&&(d.position={panel:g.panel.index,progressInPanel:f.getProgressInPanel(g.panel)})}if(h){var p=this.visiblePanels;d.visibleOffset=null!==(t=null===(n=p[0])||void 0===n?void 0:n.index)&&void 0!==t?t:0}return d},a.setStatus=function(e){var n;if(!this._initialized)throw new de(w,g.NOT_INITIALIZED);var t=e.index,i=e.position,r=e.visibleOffset,o=e.panels,a=this._renderer,s=this._control;if((null===(n=o[0])||void 0===n?void 0:n.html)&&!this._renderExternal&&(a.batchRemove({index:0,deleteCount:this.panels.length,hasDOMInElements:!0}),a.batchInsert({index:0,elements:K(o.map(function(e){return e.html})),hasDOMInElements:!0})),null!=t){var u=r?t-r:t;this.moveTo(u,0).catch(function(){})}if(i&&this._moveType===S.FREE_SCROLL){var l=i.panel,c=i.progressInPanel,h=(u=r?l-r:l,a.panels[u].range),f=h.min+(h.max-h.min)*c;s.moveToPosition(f,0).catch(function(){})}},a.addPlugins=function(){for(var e,n=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return this._initialized&&t.forEach(function(e){return e.init(n)}),(e=this._plugins).push.apply(e,s(t)),this},a.removePlugins=function(){for(var e=this,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return n.forEach(function(n){var t=ne(e._plugins,function(e){return e===n});t>=0&&(n.destroy(),e._plugins.splice(t,1))}),this},a.resize=function(){return i(this,void 0,void 0,function(){var e,n,t,i,o,a,s,u,l,c,h;return r(this,function(r){switch(r.label){case 0:return this._isResizing?[2]:(this._isResizing=!0,e=this._viewport,n=this._renderer,t=this._camera,i=this._control,o=i.activePanel,a=e.width,s=e.height,u=o?t.getProgressInPanel(o):0,this.trigger(new d(I.BEFORE_RESIZE,{width:a,height:s,element:e.element})),e.resize(),this._optimizeSizeUpdate?this.horizontal&&e.width!==a||!this.horizontal&&e.height!==s?[4,n.forceRenderAllPanels()]:[3,2]:[3,3]);case 1:r.sent(),r.label=2;case 2:return[3,5];case 3:return[4,n.forceRenderAllPanels()];case 4:r.sent(),r.label=5;case 5:return this._initialized?(n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateAdaptiveHeight(),t.updatePanelOrder(),t.updateOffset(),[4,n.render()]):[2];case 6:return r.sent(),this._initialized?(i.animating||(i.updatePosition(u),i.updateInput()),l=e.width,c=e.height,h=l!==a||c!==s,this.trigger(new d(I.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:a,height:s},sizeChanged:h,element:e.element})),this._isResizing=!1,[2]):[2]}})})},a.append=function(e){return this.insert(this._renderer.panelCount,e)},a.prepend=function(e){return this.insert(0,e)},a.insert=function(e,n){if(this._renderExternal)throw new de(R,g.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchInsert({index:e,elements:K(n),hasDOMInElements:!0})},a.remove=function(e,n){if(void 0===n&&(n=1),this._renderExternal)throw new de(R,g.NOT_ALLOWED_IN_FRAMEWORK);return this._renderer.batchRemove({index:e,deleteCount:n,hasDOMInElements:!0})},a._createControl=function(){var e,n=this._moveType,t=Object.keys(S).map(function(e){return S[e]}),i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)&&null!==(e=n[1])&&void 0!==e?e:{};if(!Q(t,i))throw new de(b("moveType",JSON.stringify(n)),g.WRONG_OPTION);switch(i){case S.SNAP:return new pt(r);case S.FREE_SCROLL:return new vt(r);case S.STRICT:return new _t(r)}},a._createCamera=function(){return this._circular&&this._bound&&console.warn('"circular" and "bound" option cannot be used together, ignoring bound.'),new xt(this,{align:this._align})},a._createRenderer=function(){var e=this._externalRenderer;return this._virtual&&this._panelsPerView<=0&&console.warn('"virtual" and "panelsPerView" option should be used together, ignoring virtual.'),e||(this._renderExternal?this._createExternalRenderer():this._createVanillaRenderer())},a._createExternalRenderer=function(){var e=this._renderExternal,n=e.renderer,i=e.rendererOptions;return new n(t({align:this._align},i))},a._createVanillaRenderer=function(){var e=this.virtualEnabled;return new $t({align:this._align,strategy:e?new ri:new ti({providerCtor:ve})})},a._moveToInitialPanel=function(){var e=this._renderer,n=this._control,t=this._camera,i=e.getPanel(this._defaultIndex)||e.getPanel(0);if(i){var r=t.findNearestAnchor(i.position),o=r&&i.position!==r.panel.position&&i.index!==r.panel.index?r.panel:i;if(n.setActive(o,null,!1),!r)throw new de(y(o.position),g.POSITION_NOT_REACHABLE);var a=o.position;t.canReach(o)||(a=r.position),t.lookAt(a),n.updateInput(),t.updateOffset()}},a._initialResize=function(){var e=this._viewport,n=this._renderer,t=this._camera,i=this._control;this.trigger(new d(I.BEFORE_RESIZE,{width:0,height:0,element:e.element})),e.resize(),n.updatePanelSize(),t.updateAlignPos(),t.updateRange(),t.updateAnchors(),t.updateOffset(),i.updateInput();var r=e.width,o=e.height,a=0!==r||0!==o;this.trigger(new d(I.AFTER_RESIZE,{width:e.width,height:e.height,prev:{width:0,height:0},sizeChanged:a,element:e.element}))},o.VERSION="4.14.1-beta.3",o}(f),si={HOLD_START:"sideHoldStart",HOLD_END:"sideHoldEnd",MOVE_START:"sideMoveStart",MOVE:"sideMove",MOVE_END:"sideMoveEnd",WILL_CHANGE:"sideWillChange",CHANGED:"sideChanged",WILL_RESTORE:"sideWillRestore",RESTORED:"sideRestored"},ui={__proto__:null,SIDE_EVENTS:si,CrossFlicking:function(e){function i(n,t){var i=e.call(this,n,t)||this;i._syncToCategory=function(e,n){i._disableIndexSync||(i.stopAnimation(),i._sideFlicking.forEach(function(t,r){var o=i._sideState[r],a=o.start,s=o.end;a<=e&&s>=e&&n!==r&&(t.stopAnimation(),t.moveTo(e,0),i.moveTo(r,0))}))},i._setDraggable=function(e,n){if(i._disableSlideOnHold){var t=i._originalDragThreshold,r=n?t&&t>=10?t:10:1/0;e===N.HORIZONTAL===i.horizontal?i.dragThreshold=r:e===N.VERTICAL===i.horizontal&&i._sideFlicking.forEach(function(e){e.dragThreshold=r})}},i._setPreviousSideIndex=function(){i._sideFlicking.forEach(function(e,n){var t=i._sideState[n],r=t.start,o=t.end;i._preserveIndex?i._nextIndex!==n&&(e.index<r?(e.stopAnimation(),e.moveTo(r,0)):e.index>o&&(e.stopAnimation(),e.moveTo(o,0))):i._nextIndex!==n&&e.moveTo(r,0)})},i._addSideIndex=function(e){e.sideIndex=i._sideFlicking[e.index].index},i._onHorizontalHoldStart=function(){i._setDraggable(N.HORIZONTAL,!0),i._moveDirection=null},i._onHorizontalMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(N.VERTICAL,!1),i._moveDirection=N.HORIZONTAL)},i._onHorizontalMoveEnd=function(e){var n=i.visiblePanels;n.length>1?i._nextIndex="NEXT"===e.direction?n[1].index:n[0].index:i._nextIndex=n[0].index,i._setDraggable(N.VERTICAL,!0),i._moveDirection=null,requestAnimationFrame(function(){return i._setPreviousSideIndex()}),e.isTrusted&&i._syncToCategory(i._sideFlicking[i._nextIndex].index,i._nextIndex)},i._onSideHoldStart=function(){i._setDraggable(N.VERTICAL,!0),i._moveDirection=null},i._onSideMove=function(e){e.isTrusted&&!i._moveDirection&&(i._setDraggable(N.HORIZONTAL,!1),i._moveDirection=N.VERTICAL)},i._onSideMoveEnd=function(){i._setDraggable(N.HORIZONTAL,!0),i._moveDirection=null},i._onSideChanged=function(e){i.visiblePanels.length<2&&i._sideFlicking[i.index]===e.currentTarget&&i._syncToCategory(e.index,i.index)};var r=t.sideOptions,o=void 0===r?{}:r,a=t.preserveIndex,s=void 0===a||a,u=t.disableSlideOnHold,l=void 0===u||u,c=t.disableIndexSync,h=void 0!==c&&c;return i._moveDirection=null,i._nextIndex=0,i._originalDragThreshold=i.dragThreshold,i._sideOptions=o,i._preserveIndex=s,i._disableSlideOnHold=l,i._disableIndexSync=h,i}n(i,e);var r=i.prototype;return Object.defineProperty(r,"sideFlicking",{get:function(){return this._sideFlicking},enumerable:!1,configurable:!0}),Object.defineProperty(r,"sideIndex",{get:function(){return this._sideFlicking.map(function(e){return e.index})},enumerable:!1,configurable:!0}),Object.defineProperty(r,"sideState",{get:function(){return this._sideState},enumerable:!1,configurable:!0}),Object.defineProperty(r,"sideOptions",{get:function(){return this._sideOptions},set:function(e){this._sideOptions=e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"preserveIndex",{get:function(){return this._preserveIndex},set:function(e){this._preserveIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"disableSlideOnHold",{get:function(){return this._disableSlideOnHold},set:function(e){this._disableSlideOnHold=e},enumerable:!1,configurable:!0}),Object.defineProperty(r,"disableIndexSync",{get:function(){return this._disableIndexSync},set:function(e){this._disableIndexSync=e},enumerable:!1,configurable:!0}),r.init=function(){var n=this;return e.prototype.init.call(this).then(function(){n._sideState=n._createSideState(),n._sideFlicking=n._createSideFlicking(),n._addComponentEvents()})},r.destroy=function(){this._sideFlicking.forEach(function(e){e.destroy()}),e.prototype.destroy.call(this)},r._addComponentEvents=function(){var e=this;this.on(I.HOLD_START,this._onHorizontalHoldStart),this.on(I.MOVE,this._onHorizontalMove),this.on(I.MOVE_END,this._onHorizontalMoveEnd),[I.CHANGED,I.WILL_CHANGE].forEach(function(n){e.on(n,e._addSideIndex)}),this._sideFlicking.forEach(function(n,i){n.on(I.HOLD_START,e._onSideHoldStart),n.on(I.MOVE,e._onSideMove),n.on(I.MOVE_END,e._onSideMoveEnd),n.on(I.CHANGED,e._onSideChanged),Object.keys(si).forEach(function(r){n.on(I[r],function(n){e.trigger(new d(si[r],t({mainIndex:i},n)))})})})},r._createSideState=function(){var e=this.element,n=this.camera.element,t=B(n.children),i=[];if(he(e,"data-cross-").structure)i=this._getSideStateFromCrossStructure(t);else{var r=this._getGroupFromAttribute(t),o=Object.keys(r);o.length?(i=this._getSideStateFromGroup(r),this.remove(0,this.panelCount-o.length)):i=this._getSideStateFromPanels(t),this._createCrossStructure(i)}return this.resize(),i},r._createCrossStructure=function(e){var n=this,t=document.createElement("div"),i="";t.classList.add(k.CAMERA),e.forEach(function(e,t){var r=n.camera.children[t];i+=e.element.innerHTML,Array.from(r.attributes).forEach(function(e){return r.removeAttribute(e.name)})}),t.innerHTML=i,e.forEach(function(e,i){var r=n.camera.children[i];[k.VIEWPORT,k.VERTICAL].forEach(function(e){r.classList.contains(e)||r.classList.add(e)}),r.innerHTML=t.outerHTML}),this.element.setAttribute("data-cross-structure","true")},r._getGroupFromAttribute=function(e){var n=[],t={};return e.forEach(function(e){var i=he(e,"data-cross-").groupkey;i&&!Q(n,i)?(n.push(i),t[i]=[e]):i&&t[i].push(e)}),t},r._getSideStateFromGroup=function(e){return Object.keys(e).reduce(function(n,t){var i=n.length?+n[n.length-1].end+1:0,r=e[t].reduce(function(e,n){return e.innerHTML+=n.outerHTML,e},document.createElement("div"));return s(n,[{key:t,start:i,end:i+e[t].length-1,element:r}])},[])},r._getSideStateFromPanels=function(e){return e.reduce(function(e,n,t){var i=e.length?+e[e.length-1].end+1:0;return s(e,[{key:t.toString(),start:i,end:i+n.children.length-1,element:n}])},[])},r._getSideStateFromCrossStructure=function(e){var n=this._getGroupFromAttribute(e);return this._getSideStateFromGroup(n)},r._createSideFlicking=function(){var e=this;return this.sideState.map(function(n,i){return new ai(e.camera.children[i],t(t({},e.sideOptions),{horizontal:!1,panelsPerView:1,defaultIndex:n.start}))})},i}(ai)},li=function(e,n,t,i,r){return e.batchInsertDefer.apply(e,s(n.added.slice(i,r).map(function(e,n){return{index:e,elements:[t[n]],hasDOMInElements:!1}})))},ci=function(e,n,t){var i=e.panels.slice(n,t);return e.batchRemoveDefer({index:n,deleteCount:i.length,hasDOMInElements:!1})},hi=function(e){var n="object"==typeof e?e.camera:e;return di(n)},fi=function(e){var n="object"==typeof e?e.panel:e;return U(di(n))},di=function(e){if("number"==typeof e)return e+"px";switch(e){case A.CENTER:return"50%";case A.NEXT:return"100%";case A.PREV:return"0%";default:return e}},gi={__proto__:null,withFlickingMethods:function(e,n){[f.prototype,ai.prototype].forEach(function(t){Object.getOwnPropertyNames(t).filter(function(n){return!e[n]&&0!==n.indexOf("_")&&"constructor"!==n}).forEach(function(i){var r=Object.getOwnPropertyDescriptor(t,i);if(r.value)Object.defineProperty(e,i,{value:function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return(e=r.value).call.apply(e,s([this[n]],t))}});else{var o={};r.get&&(o.get=function(){var e,t=this[n];return t&&(null===(e=r.get)||void 0===e?void 0:e.call(t))}),r.set&&(o.set=function(){for(var e,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return null===(e=r.set)||void 0===e?void 0:e.call.apply(e,s([this[n]],t))}),Object.defineProperty(e,i,o)}})})},sync:function(e,n,t){var i=e.renderer,r=i.panels,o=s(n.prevList),u=[],l=[];if(n.removed.length>0){var c=-1,h=-1;n.removed.forEach(function(e){c<0&&(c=e),h>=0&&e!==h-1?(l.push.apply(l,s(ci(i,h,c+1))),c=e,h=e):h=e,o.splice(e,1)}),l.push.apply(l,s(ci(i,h,c+1)))}if(n.ordered.forEach(function(e){var n=a(e,2),t=n[0],i=n[1],o=r.splice(t,1)[0];r.splice(i,0,o)}),n.ordered.length>0&&(r.forEach(function(e,n){var t=n-e.index;t>0?e.increaseIndex(t):e.decreaseIndex(-t)}),r.sort(function(e,n){return e.index-n.index}),r.forEach(function(e){e.updatePosition()})),n.added.length>0){var f=-1,d=-1,g=t.slice(o.length);n.added.forEach(function(e,t){f<0&&(f=t),d>=0&&e!==d+1?(u.push.apply(u,s(li(i,n,g,f,t+1))),f=-1,d=-1):d=e}),f>=0&&u.push.apply(u,s(li(i,n,g,f)))}if(n.added.length>0||n.removed.length>0)i.updateAfterPanelChange(u,l);else if(n.ordered.length>0){var p=e.camera;p.updateRange(),p.updateOffset(),p.updateAnchors(),p.resetNeedPanelHistory()}},getRenderingPanels:function(e,n){var t=n.removed.reduce(function(e,n){return e[n]=!0,e},{}),i=n.maintained.reduce(function(e,n){var t=a(n,2),i=t[0],r=t[1];return e[i]=r,e},{});return s(e.panels.filter(function(e){return!t[e.index]}).sort(function(e,n){return e.position+e.offset-(n.position+n.offset)}).map(function(e){return n.list[i[e.index]]}),n.added.map(function(e){return n.list[e]}))},getDefaultCameraTransform:function(e,n,t){void 0===e&&(e=A.CENTER),void 0===n&&(n=!0);var i=hi(e),r=fi(e);if(null==r)return"";var o="calc("+i+" - ("+(t||"0px")+" * "+r.percentage+") - "+r.absolute+"px)";return n?"translate("+o+")":"translate(0, "+o+")"}},pi=function(e){return!e.circular&&0===e.index},vi=function(e){return!e.circular&&e.index===e.panelCount-1},_i=function(e){return e.panelCount},mi=function(e){return e.index},bi=function(e){var n=e.camera,t=(n.position-n.range.min)/(n.range.max-n.range.min);return 100*Math.min(Math.max(t,0),1)},Ei=function(e){var n,t,i,r,o=e.onInit,a=e.onDestroy,s=e.setMethods,u=e.getProps;s(["moveTo"]);var l=u().options,c=Ye({isReachStart:!(null==l?void 0:l.defaultIndex)||0===(null==l?void 0:l.defaultIndex),isReachEnd:!(!(null==l?void 0:l.totalPanelCount)||!(null==l?void 0:l.defaultIndex))&&l.defaultIndex===l.totalPanelCount-1,totalPanelCount:null!==(n=null==l?void 0:l.totalPanelCount)&&void 0!==n?n:0,currentPanelIndex:null!==(t=null==l?void 0:l.defaultIndex)&&void 0!==t?t:0,progress:0,indexProgress:null!==(i=null==l?void 0:l.defaultIndex)&&void 0!==i?i:0,moveTo:function(e){return null==r?Promise.reject(new Error("Flicking instance is not available")):(null==r?void 0:r.animating)?Promise.resolve():r.moveTo(e)}}),h=function(){void 0!==r&&(c.isReachStart=pi(r),c.isReachEnd=vi(r),c.currentPanelIndex=mi(r))},f=function(){void 0!==r&&(h(),c.totalPanelCount=_i(r))},d=function(){void 0!==r&&(c.progress=bi(r),c.indexProgress=function(e){var n=e.camera,t=n.anchorPoints,i=t.length,r=n.position,o=e.circularEnabled,a=0,s=n.range,u=s.min,l=s.max,c=t[0],h=l-t[i-1].position+(c.position-u);return t.some(function(e,n){var s=e.position,u=t[n+1];if(0===n&&r<=s)a=o?(r-s)/h:(r-s)/e.panel.size;else if(n===i-1&&r>=s)a=o?n+(r-s)/h:n+(r-s)/e.panel.size;else{if(!(u&&s<=r&&r<=u.position))return!1;a=n+(r-s)/(u.position-s)}return!0}),a}(r))};return o(function(e,n){void 0!==(r=n.flicking)&&(c.isReachStart=pi(r),c.isReachEnd=vi(r),c.currentPanelIndex=mi(r),c.progress=bi(r),c.totalPanelCount=_i(r),null==r||r.on("changed",h),null==r||r.on("panelChange",f),null==r||r.on("move",d))}),a(function(){null==r||r.off("changed",h),null==r||r.off("panelChange",f),null==r||r.off("move",d)}),c},yi={__proto__:null,flickingReactiveAPIAdapter:Ei,connectFlickingReactiveAPI:function(e,n){var t=function(e,n){var t=Me(e)?{setup:e}:e;function i(){var e,i,r,o,a;return null!==(a=null!==(r=null!==(e=null==n?void 0:n())&&void 0!==e?e:null===(i=t.props)||void 0===i?void 0:i.call(t))&&void 0!==r?r:null===(o=t.data)||void 0===o?void 0:o.call(t))&&void 0!==a?a:{}}var r=new f,o=[],a=[],s=[],u=[],l={current:null},c=[],h=null,d=[],g=[],p=function(e){o.push(e)},v=function(e){h=e},_=function(e){d=e},m=function(e){g=e};return t.setup&&(l.current=t.setup({getProps:i,setInitialState:v,setEvents:_,setMethods:m,onMounted:p,onDestroy:function(e){s.push(e)},onInit:function(e){a.push(e)},emit:function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];r.trigger.apply(r,Fe([e],n,!1))},on:function(e){u.push(e)}})||null),t.created&&(l.current=t.created(i())||null),t.events&&_(t.events),t.state&&v(t.state),t.methods&&m(t.methods),t.mounted&&p(t.mounted),t.destroy&&s.push(t.destroy),t.init&&a.push(t.init),t.on&&u.push(function(e,n,i){var r=t.on(e,n,i);return function(){var o;r&&r(),null===(o=t.off)||void 0===o||o.call(t,e,n,i)}}),{events:function(){return d},state:function(){var e=l.current;if(h)return h;if(e){var n=Ze(e);v(De(n).reduce(function(e,t){return e[t]=n[t].current,e},{}))}return h||{}},instance:function(){return l.current},mounted:function(){var e=i();o.forEach(function(n){l.current=n(e,l.current)||l.current})},init:function(){var e=l.current,n=i();c=d.map(function(e){var n=function(){for(var n,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];(n=r).trigger.apply(n,Fe([e],t,!1))},t=l.current;return u.map(function(i){return i(t,e,n)}).filter(Boolean)}),a.forEach(function(t){t(e,n)})},destroy:function(){c.forEach(function(e){e.forEach(function(e){e()})}),r.off();var e=l.current,n=i();s.forEach(function(t){t(e,n)})},methods:function(){return e=l,t={},(n=g)?(n.forEach(function(n){t[n]=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var r=e.current||e.value;return r[n].apply(r,t)}}),t):t;var e,n,t},on:function(e,n){r.on(e,n)},off:function(e,n){r.off(e,n)}}}(Ei,function(){return{flicking:e,options:n}});t.mounted();var i=t.instance();return t.init(),i}};return j(ai,{__proto__:null,Viewport:ge,FlickingError:de,AnchorPoint:gt,VirtualManager:me,VanillaElementProvider:ve,VirtualElementProvider:_e,Panel:ni,VirtualPanel:ii}),j(ai,Ot),j(ai,mt),j(ai,oi),j(ai,z),j(ai,gi),j(ai,fe),j(ai,ui),j(ai,yi),ai});
|
|
10
10
|
//# sourceMappingURL=flicking.pkgd.min.js.map
|