boka-human-cliend-v3 0.0.2
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/.nvmrc +1 -0
- package/dist/boka-human-cliend-v3.css +9 -0
- package/dist/boka-human-v3.umd.js +9 -0
- package/index.html +12 -0
- package/package.json +21 -0
- package/src/demo/App.vue +30 -0
- package/src/demo/main.js +4 -0
- package/src/index.js +4 -0
- package/vite.config.js +27 -0
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20.18.1
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Viewer.js v1.11.7
|
|
3
|
+
* https://fengyuanchen.github.io/viewerjs
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2015-present Chen Fengyuan
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
*
|
|
8
|
+
* Date: 2024-11-24T04:32:14.526Z
|
|
9
|
+
*/.viewer-zoom-in:before,.viewer-zoom-out:before,.viewer-one-to-one:before,.viewer-reset:before,.viewer-prev:before,.viewer-play:before,.viewer-next:before,.viewer-rotate-left:before,.viewer-rotate-right:before,.viewer-flip-horizontal:before,.viewer-flip-vertical:before,.viewer-fullscreen:before,.viewer-fullscreen-exit:before,.viewer-close:before{background-image:url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 viewBox%3D%220 0 560 40%22%3E%3Cpath fill%3D%22%23fff%22 d%3D%22M49.6 17.9h20.2v3.9H49.6zm123.1 2 10.9-11 2.7 2.8-8.2 8.2 8.2 8.2-2.7 2.7-10.9-10.9zm94 0-10.8-11-2.7 2.8 8.1 8.2-8.1 8.2 2.7 2.7 10.8-10.9zM212 9.3l20.1 10.6L212 30.5V9.3zm161.5 4.6-7.2 6 7.2 5.9v-4h12.4v4l7.3-5.9-7.3-6v4h-12.4v-4zm40.2 12.3 5.9 7.2 5.9-7.2h-4V13.6h4l-5.9-7.3-5.9 7.3h4v12.6h-4zm35.9-16.5h6.3v2h-4.3V16h-2V9.7Zm14 0h6.2V16h-2v-4.3h-4.2v-2Zm6.2 14V30h-6.2v-2h4.2v-4.3h2Zm-14 6.3h-6.2v-6.3h2v4.4h4.3v2Zm-438 .1v-8.3H9.6v-3.9h8.2V9.7h3.9v8.2h8.1v3.9h-8.1v8.3h-3.9zM93.6 9.7h-5.8v3.9h2V30h3.8V9.7zm16.1 0h-5.8v3.9h1.9V30h3.9V9.7zm-11.9 4.1h3.9v3.9h-3.9zm0 8.2h3.9v3.9h-3.9zm244.6-11.7 7.2 5.9-7.2 6v-3.6c-5.4-.4-7.8.8-8.7 2.8-.8 1.7-1.8 4.9 2.8 8.2-6.3-2-7.5-6.9-6-11.3 1.6-4.4 8-5 11.9-4.9v-3.1Zm147.2 13.4h6.3V30h-2v-4.3h-4.3v-2zm14 6.3v-6.3h6.2v2h-4.3V30h-1.9zm6.2-14h-6.2V9.7h1.9V14h4.3v2zm-13.9 0h-6.3v-2h4.3V9.7h2V16zm33.3 12.5 8.6-8.6-8.6-8.7 1.9-1.9 8.6 8.7 8.6-8.7 1.9 1.9-8.6 8.7 8.6 8.6-1.9 2-8.6-8.7-8.6 8.7-1.9-2zM297 10.3l-7.1 5.9 7.2 6v-3.6c5.3-.4 7.7.8 8.7 2.8.8 1.7 1.7 4.9-2.9 8.2 6.3-2 7.5-6.9 6-11.3-1.6-4.4-7.9-5-11.8-4.9v-3.1Zm-157.3-.6c2.3 0 4.4.7 6 2l2.5-3 1.9 9.2h-9.3l2.6-3.1a6.2 6.2 0 0 0-9.9 5.1c0 3.4 2.8 6.3 6.2 6.3 2.8 0 5.1-1.9 6-4.4h4c-1 4.7-5 8.3-10 8.3a10 10 0 0 1-10-10.2 10 10 0 0 1 10-10.2Z%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-size:280px;color:transparent;display:block;font-size:0;height:20px;line-height:0;width:20px}.viewer-zoom-in:before{background-position:0 0;content:"Zoom In"}.viewer-zoom-out:before{background-position:-20px 0;content:"Zoom Out"}.viewer-one-to-one:before{background-position:-40px 0;content:"One to One"}.viewer-reset:before{background-position:-60px 0;content:"Reset"}.viewer-prev:before{background-position:-80px 0;content:"Previous"}.viewer-play:before{background-position:-100px 0;content:"Play"}.viewer-next:before{background-position:-120px 0;content:"Next"}.viewer-rotate-left:before{background-position:-140px 0;content:"Rotate Left"}.viewer-rotate-right:before{background-position:-160px 0;content:"Rotate Right"}.viewer-flip-horizontal:before{background-position:-180px 0;content:"Flip Horizontal"}.viewer-flip-vertical:before{background-position:-200px 0;content:"Flip Vertical"}.viewer-fullscreen:before{background-position:-220px 0;content:"Enter Full Screen"}.viewer-fullscreen-exit:before{background-position:-240px 0;content:"Exit Full Screen"}.viewer-close:before{background-position:-260px 0;content:"Close"}.viewer-container{direction:ltr;font-size:0;inset:0;line-height:0;overflow:hidden;position:absolute;-webkit-tap-highlight-color:transparent;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.viewer-container::-moz-selection,.viewer-container *::-moz-selection{background-color:transparent}.viewer-container::selection,.viewer-container *::selection{background-color:transparent}.viewer-container:focus{outline:0}.viewer-container img{display:block;height:auto;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.viewer-canvas{inset:0;overflow:hidden;position:absolute}.viewer-canvas>img{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:#00000080;overflow:hidden}.viewer-list{box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;transition:opacity .15s;width:30px}.viewer-list>li:focus,.viewer-list>li:hover{opacity:.75}.viewer-list>li:focus{outline:0}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:focus,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;cursor:none;display:none;inset:0;position:absolute;z-index:1}.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:6px 3px}.viewer-toolbar>ul>li{background-color:#00000080;border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:focus,.viewer-toolbar>ul>li:hover{background-color:#000c}.viewer-toolbar>ul>li:focus{box-shadow:0 0 3px #fff;outline:0;position:relative;z-index:1}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:#000c;border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1.2;margin:5px 5%;max-width:90%;min-height:14px;opacity:.8;overflow:hidden;text-overflow:ellipsis;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{-webkit-app-region:no-drag;background-color:#00000080;border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:#000c}.viewer-button:focus{box-shadow:0 0 3px #fff;outline:0}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:#00000080}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{transition:all .3s}@keyframes viewer-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.viewer-loading:after{animation:viewer-spinner 1s linear infinite;border:4px solid rgba(255,255,255,.1);border-left-color:#ffffff80;border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width: 767px){.viewer-hide-xs-down{display:none}}@media (max-width: 991px){.viewer-hide-sm-down{display:none}}@media (max-width: 1199px){.viewer-hide-md-down{display:none}}.boka-human-v2[data-v-6ed69e6f]{overflow:hidden;position:fixed;top:0;left:0;z-index:999}.humanEnterIcon[data-v-6ed69e6f]{position:fixed;z-index:999;background-color:#0074ff;border-radius:50%;width:40px;height:40px;text-align:center;padding:8px;box-sizing:border-box;transform:translate(100vw,100vh)}.humanEnterIcon>svg[data-v-6ed69e6f]{width:100%;height:100%;fill:#fff}.humanMainView[data-v-6ed69e6f]{position:fixed;min-width:420px;min-height:400px;height:80vh;border:1px solid #ccc}.humanMainView .humanMainHeader[data-v-6ed69e6f]{width:100%;height:40px;text-align:center;cursor:move;font-size:0;box-sizing:border-box;border-bottom:1px solid #f5f5f5;position:relative;z-index:999;background:#fff}.humanMainView .humanMainHeader .humanMainHeaderRight[data-v-6ed69e6f]{text-align:right}.humanMainView .humanMainHeader .humanMainHeaderLeft[data-v-6ed69e6f],.humanMainView .humanMainHeader .humanMainHeaderRight[data-v-6ed69e6f]{width:20%;display:inline-block;vertical-align:middle;padding:0 10px;line-height:40px;font-size:14px;box-sizing:border-box}.humanMainView .humanMainHeader .humanMainHeaderCenter[data-v-6ed69e6f]{width:60%;display:inline-block;vertical-align:middle;font-size:16px;box-sizing:border-box}.humanMainView>iframe[data-v-6ed69e6f]{width:100%;height:calc(100% - 40px)}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(function(te,Ze){typeof exports=="object"&&typeof module<"u"?module.exports=Ze(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ze):(te=typeof globalThis<"u"?globalThis:te||self,te["boka-human-v3"]=Ze(te.Vue))})(this,(function(te){"use strict";function Ze(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}var Je={exports:{}},ir=Je.exports,Si;function nr(){return Si||(Si=1,(function(d,a){(function(u,c){d.exports=c()})(ir,(function(){function u(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),i.push.apply(i,n)}return i}function c(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?u(Object(i),!0).forEach((function(n){D(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function p(t){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,G(n.key),n)}}function x(t,e,i){return e&&y(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function D(t,e,i){return(e=G(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function O(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&k(t,e)}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(t)}function k(t,e){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},k(t,e)}function j(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function q(t){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,n=_(t);if(e){var r=_(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return(function(o,s){if(s&&(typeof s=="object"||typeof s=="function"))return s;if(s!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(o)})(this,i)}}function B(){return B=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(t,e,i){var n=(function(o,s){for(;!Object.prototype.hasOwnProperty.call(o,s)&&(o=_(o))!==null;);return o})(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(arguments.length<3?t:i):r.value}},B.apply(this,arguments)}function G(t){var e=(function(i,n){if(typeof i!="object"||i===null)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var o=r.call(i,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)})(t,"string");return typeof e=="symbol"?e:e+""}var ie=function(t){return!(!t||!t.Window)&&t instanceof t.Window},re=void 0,Q=void 0;function U(t){re=t;var e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),Q=t}function ne(t){return ie(t)?t:(t.ownerDocument||t).defaultView||Q.window}typeof window<"u"&&window&&U(window);var pe=function(t){return!!t&&p(t)==="object"},ue=function(t){return typeof t=="function"},w={window:function(t){return t===Q||ie(t)},docFrag:function(t){return pe(t)&&t.nodeType===11},object:pe,func:ue,number:function(t){return typeof t=="number"},bool:function(t){return typeof t=="boolean"},string:function(t){return typeof t=="string"},element:function(t){if(!t||p(t)!=="object")return!1;var e=ne(t)||Q;return/object|function/.test(typeof Element>"u"?"undefined":p(Element))?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},plainObject:function(t){return pe(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString())},array:function(t){return pe(t)&&t.length!==void 0&&ue(t.splice)}};function Ee(t){var e=t.interaction;if(e.prepared.name==="drag"){var i=e.prepared.axis;i==="x"?(e.coords.cur.page.y=e.coords.start.page.y,e.coords.cur.client.y=e.coords.start.client.y,e.coords.velocity.client.y=0,e.coords.velocity.page.y=0):i==="y"&&(e.coords.cur.page.x=e.coords.start.page.x,e.coords.cur.client.x=e.coords.start.client.x,e.coords.velocity.client.x=0,e.coords.velocity.page.x=0)}}function Te(t){var e=t.iEvent,i=t.interaction;if(i.prepared.name==="drag"){var n=i.prepared.axis;if(n==="x"||n==="y"){var r=n==="x"?"y":"x";e.page[r]=i.coords.start.page[r],e.client[r]=i.coords.start.client[r],e.delta[r]=0}}}var le={id:"actions/drag",install:function(t){var e=t.actions,i=t.Interactable,n=t.defaults;i.prototype.draggable=le.draggable,e.map.drag=le,e.methodDict.drag="draggable",n.actions.drag=le.defaults},listeners:{"interactions:before-action-move":Ee,"interactions:action-resume":Ee,"interactions:action-move":Te,"auto-start:check":function(t){var e=t.interaction,i=t.interactable,n=t.buttons,r=i.options.drag;if(r&&r.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(n&i.options.drag.mouseButtons)!=0))return t.action={name:"drag",axis:r.lockAxis==="start"?r.startAxis:r.lockAxis},!1}},draggable:function(t){return w.object(t)?(this.options.drag.enabled=t.enabled!==!1,this.setPerAction("drag",t),this.setOnEvents("drag",t),/^(xy|x|y|start)$/.test(t.lockAxis)&&(this.options.drag.lockAxis=t.lockAxis),/^(xy|x|y)$/.test(t.startAxis)&&(this.options.drag.startAxis=t.startAxis),this):w.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:Ee,move:Te,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(t){return t.search("drag")===0}},on=le,ve={init:function(t){var e=t;ve.document=e.document,ve.DocumentFragment=e.DocumentFragment||$e,ve.SVGElement=e.SVGElement||$e,ve.SVGSVGElement=e.SVGSVGElement||$e,ve.SVGElementInstance=e.SVGElementInstance||$e,ve.Element=e.Element||$e,ve.HTMLElement=e.HTMLElement||ve.Element,ve.Event=e.Event,ve.Touch=e.Touch||$e,ve.PointerEvent=e.PointerEvent||e.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function $e(){}var oe=ve,ge={init:function(t){var e=oe.Element,i=t.navigator||{};ge.supportsTouch="ontouchstart"in t||w.func(t.DocumentTouch)&&oe.document instanceof t.DocumentTouch,ge.supportsPointerEvent=i.pointerEnabled!==!1&&!!oe.PointerEvent,ge.isIOS=/iP(hone|od|ad)/.test(i.platform),ge.isIOS7=/iP(hone|od|ad)/.test(i.platform)&&/OS 7[^\d]/.test(i.appVersion),ge.isIe9=/MSIE 9/.test(i.userAgent),ge.isOperaMobile=i.appName==="Opera"&&ge.supportsTouch&&/Presto/.test(i.userAgent),ge.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",ge.pEventTypes=ge.supportsPointerEvent?oe.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ge.wheelEvent=oe.document&&"onmousewheel"in oe.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},be=ge;function Re(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function an(t,e){for(;w.element(t);){if(ke(t,e))return t;t=Se(t)}return null}function Se(t){var e=t.parentNode;if(w.docFrag(e)){for(;(e=e.host)&&w.docFrag(e););return e}return e}function ke(t,e){return Q!==re&&(e=e.replace(/\/deep\//g," ")),t[be.prefixedMatchesSelector](e)}var Zt=function(t){return t.parentNode||t.host};function sn(t,e){for(var i,n=[],r=t;(i=Zt(r))&&r!==e&&i!==r.ownerDocument;)n.unshift(r),r=i;return n}function Jt(t,e,i){for(;w.element(t);){if(ke(t,e))return!0;if((t=Se(t))===i)return ke(t,e)}return!1}function ln(t){return t.correspondingUseElement||t}function Qt(t){var e=t instanceof oe.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function ei(t){var e,i=Qt(t);if(!be.isIOS7&&i){var n={x:(e=(e=ne(t))||Q).scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop};i.left+=n.x,i.right+=n.x,i.top+=n.y,i.bottom+=n.y}return i}function cn(t){for(var e=[];t;)e.push(t),t=Se(t);return e}function un(t){return!!w.string(t)&&(oe.document.querySelector(t),!0)}function z(t,e){for(var i in e)t[i]=e[i];return t}function fn(t,e,i){return t==="parent"?Se(i):t==="self"?e.getRect(i):an(i,t)}function rt(t,e,i,n){var r=t;return w.string(r)?r=fn(r,e,i):w.func(r)&&(r=r.apply(void 0,n)),w.element(r)&&(r=ei(r)),r}function Ot(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function ti(t){return!t||"x"in t&&"y"in t||((t=z({},t)).x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function Dt(t,e,i){t.left&&(e.left+=i.x),t.right&&(e.right+=i.x),t.top&&(e.top+=i.y),t.bottom&&(e.bottom+=i.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function ot(t,e,i){var n=i&&t.options[i];return Ot(rt(n&&n.origin||t.options.origin,t,e,[t&&e]))||{x:0,y:0}}function Ne(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(f){return!0},n=arguments.length>3?arguments[3]:void 0;if(n=n||{},w.string(t)&&t.search(" ")!==-1&&(t=hn(t)),w.array(t))return t.forEach((function(f){return Ne(f,e,i,n)})),n;if(w.object(t)&&(e=t,t=""),w.func(e)&&i(t))n[t]=n[t]||[],n[t].push(e);else if(w.array(e))for(var r=0,o=e;r<o.length;r++){var s=o[r];Ne(t,s,i,n)}else if(w.object(e))for(var l in e)Ne(hn(l).map((function(f){return"".concat(t).concat(f)})),e[l],i,n);return n}function hn(t){return t.trim().split(/ +/)}var at=function(t,e){return Math.sqrt(t*t+e*e)},Wr=["webkit","moz"];function kt(t,e){t.__set||(t.__set={});var i=function(r){if(Wr.some((function(o){return r.indexOf(o)===0})))return 1;typeof t[r]!="function"&&r!=="__set"&&Object.defineProperty(t,r,{get:function(){return r in t.__set?t.__set[r]:t.__set[r]=e[r]},set:function(o){t.__set[r]=o},configurable:!0})};for(var n in e)i(n);return t}function It(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function dn(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function pn(t){return t instanceof oe.Event||t instanceof oe.Touch}function Pt(t,e,i){return t=t||"page",(i=i||{}).x=e[t+"X"],i.y=e[t+"Y"],i}function vn(t,e){return e=e||{x:0,y:0},be.isOperaMobile&&pn(t)?(Pt("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):Pt("page",t,e),e}function st(t){return w.number(t.pointerId)?t.pointerId:t.identifier}function Hr(t,e,i){var n=e.length>1?gn(e):e[0];vn(n,t.page),(function(r,o){o=o||{},be.isOperaMobile&&pn(r)?Pt("screen",r,o):Pt("client",r,o)})(n,t.client),t.timeStamp=i}function ii(t){var e=[];return w.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function gn(t){for(var e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},i=0;i<t.length;i++){var n=t[i];for(var r in e)e[r]+=n[r]}for(var o in e)e[o]/=t.length;return e}function ni(t){if(!t.length)return null;var e=ii(t),i=Math.min(e[0].pageX,e[1].pageX),n=Math.min(e[0].pageY,e[1].pageY),r=Math.max(e[0].pageX,e[1].pageX),o=Math.max(e[0].pageY,e[1].pageY);return{x:i,y:n,left:i,top:n,right:r,bottom:o,width:r-i,height:o-n}}function ri(t,e){var i=e+"X",n=e+"Y",r=ii(t),o=r[0][i]-r[1][i],s=r[0][n]-r[1][n];return at(o,s)}function oi(t,e){var i=e+"X",n=e+"Y",r=ii(t),o=r[1][i]-r[0][i],s=r[1][n]-r[0][n];return 180*Math.atan2(s,o)/Math.PI}function mn(t){return w.string(t.pointerType)?t.pointerType:w.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof oe.Touch?"touch":"mouse"}function yn(t){var e=w.func(t.composedPath)?t.composedPath():t.path;return[ln(e?e[0]:t.target),ln(t.currentTarget)]}var At=(function(){function t(e){g(this,t),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=e}return x(t,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),t})();Object.defineProperty(At.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var bn=function(t,e){for(var i=0;i<e.length;i++){var n=e[i];t.push(n)}return t},wn=function(t){return bn([],t)},lt=function(t,e){for(var i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1},ct=function(t,e){return t[lt(t,e)]},Ge=(function(t){O(i,t);var e=q(i);function i(n,r,o){var s;g(this,i),(s=e.call(this,r._interaction)).dropzone=void 0,s.dragEvent=void 0,s.relatedTarget=void 0,s.draggable=void 0,s.propagationStopped=!1,s.immediatePropagationStopped=!1;var l=o==="dragleave"?n.prev:n.cur,f=l.element,v=l.dropzone;return s.type=o,s.target=f,s.currentTarget=f,s.dropzone=v,s.dragEvent=r,s.relatedTarget=r.target,s.draggable=r.interactable,s.timeStamp=r.timeStamp,s}return x(i,[{key:"reject",value:function(){var n=this,r=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&r.cur.dropzone===this.dropzone&&r.cur.element===this.target)if(r.prev.dropzone=this.dropzone,r.prev.element=this.target,r.rejected=!0,r.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var o=r.activeDrops,s=lt(o,(function(f){var v=f.dropzone,h=f.element;return v===n.dropzone&&h===n.target}));r.activeDrops.splice(s,1);var l=new i(r,this.dragEvent,"dropdeactivate");l.dropzone=this.dropzone,l.target=this.target,this.dropzone.fire(l)}else this.dropzone.fire(new i(r,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),i})(At);function xn(t,e){for(var i=0,n=t.slice();i<n.length;i++){var r=n[i],o=r.dropzone,s=r.element;e.dropzone=o,e.target=s,o.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}}function ai(t,e){for(var i=(function(o,s){for(var l=[],f=0,v=o.interactables.list;f<v.length;f++){var h=v[f];if(h.options.drop.enabled){var m=h.options.drop.accept;if(!(w.element(m)&&m!==s||w.string(m)&&!ke(s,m)||w.func(m)&&!m({dropzone:h,draggableElement:s})))for(var b=0,T=h.getAllElements();b<T.length;b++){var E=T[b];E!==s&&l.push({dropzone:h,element:E,rect:h.getRect(E)})}}}return l})(t,e),n=0;n<i.length;n++){var r=i[n];r.rect=r.dropzone.getRect(r.element)}return i}function En(t,e,i){for(var n=t.dropState,r=t.interactable,o=t.element,s=[],l=0,f=n.activeDrops;l<f.length;l++){var v=f[l],h=v.dropzone,m=v.element,b=v.rect,T=h.dropCheck(e,i,r,o,m,b);s.push(T?m:null)}var E=(function(S){for(var P,I,A,F=[],Y=0;Y<S.length;Y++){var M=S[Y],L=S[P];if(M&&Y!==P)if(L){var se=Zt(M),K=Zt(L);if(se!==M.ownerDocument)if(K!==M.ownerDocument)if(se!==K){F=F.length?F:sn(L);var fe=void 0;if(L instanceof oe.HTMLElement&&M instanceof oe.SVGElement&&!(M instanceof oe.SVGSVGElement)){if(M===K)continue;fe=M.ownerSVGElement}else fe=M;for(var we=sn(fe,L.ownerDocument),De=0;we[De]&&we[De]===F[De];)De++;var jt=[we[De-1],we[De],F[De]];if(jt[0])for(var vt=jt[0].lastChild;vt;){if(vt===jt[1]){P=Y,F=we;break}if(vt===jt[2])break;vt=vt.previousSibling}}else A=L,(parseInt(ne(I=M).getComputedStyle(I).zIndex,10)||0)>=(parseInt(ne(A).getComputedStyle(A).zIndex,10)||0)&&(P=Y);else P=Y}else P=Y}return P})(s);return n.activeDrops[E]||null}function si(t,e,i){var n=t.dropState,r={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return i.type==="dragstart"&&(r.activate=new Ge(n,i,"dropactivate"),r.activate.target=null,r.activate.dropzone=null),i.type==="dragend"&&(r.deactivate=new Ge(n,i,"dropdeactivate"),r.deactivate.target=null,r.deactivate.dropzone=null),n.rejected||(n.cur.element!==n.prev.element&&(n.prev.dropzone&&(r.leave=new Ge(n,i,"dragleave"),i.dragLeave=r.leave.target=n.prev.element,i.prevDropzone=r.leave.dropzone=n.prev.dropzone),n.cur.dropzone&&(r.enter=new Ge(n,i,"dragenter"),i.dragEnter=n.cur.element,i.dropzone=n.cur.dropzone)),i.type==="dragend"&&n.cur.dropzone&&(r.drop=new Ge(n,i,"drop"),i.dropzone=n.cur.dropzone,i.relatedTarget=n.cur.element),i.type==="dragmove"&&n.cur.dropzone&&(r.move=new Ge(n,i,"dropmove"),i.dropzone=n.cur.dropzone)),r}function li(t,e){var i=t.dropState,n=i.activeDrops,r=i.cur,o=i.prev;e.leave&&o.dropzone.fire(e.leave),e.enter&&r.dropzone.fire(e.enter),e.move&&r.dropzone.fire(e.move),e.drop&&r.dropzone.fire(e.drop),e.deactivate&&xn(n,e.deactivate),i.prev.dropzone=r.dropzone,i.prev.element=r.element}function Tn(t,e){var i=t.interaction,n=t.iEvent,r=t.event;if(n.type==="dragmove"||n.type==="dragend"){var o=i.dropState;e.dynamicDrop&&(o.activeDrops=ai(e,i.element));var s=n,l=En(i,s,r);o.rejected=o.rejected&&!!l&&l.dropzone===o.cur.dropzone&&l.element===o.cur.element,o.cur.dropzone=l&&l.dropzone,o.cur.element=l&&l.element,o.events=si(i,0,s)}}var Sn={id:"actions/drop",install:function(t){var e=t.actions,i=t.interactStatic,n=t.Interactable,r=t.defaults;t.usePlugin(on),n.prototype.dropzone=function(o){return(function(s,l){if(w.object(l)){if(s.options.drop.enabled=l.enabled!==!1,l.listeners){var f=Ne(l.listeners),v=Object.keys(f).reduce((function(m,b){return m[/^(enter|leave)/.test(b)?"drag".concat(b):/^(activate|deactivate|move)/.test(b)?"drop".concat(b):b]=f[b],m}),{}),h=s.options.drop.listeners;h&&s.off(h),s.on(v),s.options.drop.listeners=v}return w.func(l.ondrop)&&s.on("drop",l.ondrop),w.func(l.ondropactivate)&&s.on("dropactivate",l.ondropactivate),w.func(l.ondropdeactivate)&&s.on("dropdeactivate",l.ondropdeactivate),w.func(l.ondragenter)&&s.on("dragenter",l.ondragenter),w.func(l.ondragleave)&&s.on("dragleave",l.ondragleave),w.func(l.ondropmove)&&s.on("dropmove",l.ondropmove),/^(pointer|center)$/.test(l.overlap)?s.options.drop.overlap=l.overlap:w.number(l.overlap)&&(s.options.drop.overlap=Math.max(Math.min(1,l.overlap),0)),"accept"in l&&(s.options.drop.accept=l.accept),"checker"in l&&(s.options.drop.checker=l.checker),s}return w.bool(l)?(s.options.drop.enabled=l,s):s.options.drop})(this,o)},n.prototype.dropCheck=function(o,s,l,f,v,h){return(function(m,b,T,E,S,P,I){var A=!1;if(!(I=I||m.getRect(P)))return!!m.options.drop.checker&&m.options.drop.checker(b,T,A,m,P,E,S);var F=m.options.drop.overlap;if(F==="pointer"){var Y=ot(E,S,"drag"),M=vn(b);M.x+=Y.x,M.y+=Y.y;var L=M.x>I.left&&M.x<I.right,se=M.y>I.top&&M.y<I.bottom;A=L&&se}var K=E.getRect(S);if(K&&F==="center"){var fe=K.left+K.width/2,we=K.top+K.height/2;A=fe>=I.left&&fe<=I.right&&we>=I.top&&we<=I.bottom}return K&&w.number(F)&&(A=Math.max(0,Math.min(I.right,K.right)-Math.max(I.left,K.left))*Math.max(0,Math.min(I.bottom,K.bottom)-Math.max(I.top,K.top))/(K.width*K.height)>=F),m.options.drop.checker&&(A=m.options.drop.checker(b,T,A,m,P,E,S)),A})(this,o,s,l,f,v,h)},i.dynamicDrop=function(o){return w.bool(o)?(t.dynamicDrop=o,i):t.dynamicDrop},z(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,r.actions.drop=Sn.defaults},listeners:{"interactions:before-action-start":function(t){var e=t.interaction;e.prepared.name==="drag"&&(e.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(t,e){var i=t.interaction,n=(t.event,t.iEvent);if(i.prepared.name==="drag"){var r=i.dropState;r.activeDrops=[],r.events={},r.activeDrops=ai(e,i.element),r.events=si(i,0,n),r.events.activate&&(xn(r.activeDrops,r.events.activate),e.fire("actions/drop:start",{interaction:i,dragEvent:n}))}},"interactions:action-move":Tn,"interactions:after-action-move":function(t,e){var i=t.interaction,n=t.iEvent;if(i.prepared.name==="drag"){var r=i.dropState;li(i,r.events),e.fire("actions/drop:move",{interaction:i,dragEvent:n}),r.events={}}},"interactions:action-end":function(t,e){if(t.interaction.prepared.name==="drag"){var i=t.interaction,n=t.iEvent;Tn(t,e),li(i,i.dropState.events),e.fire("actions/drop:end",{interaction:i,dragEvent:n})}},"interactions:stop":function(t){var e=t.interaction;if(e.prepared.name==="drag"){var i=e.dropState;i&&(i.activeDrops=null,i.events=null,i.cur.dropzone=null,i.cur.element=null,i.prev.dropzone=null,i.prev.element=null,i.rejected=!1)}}},getActiveDrops:ai,getDrop:En,getDropEvents:si,fireDropEvents:li,filterEventType:function(t){return t.search("drag")===0||t.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},qr=Sn;function ci(t){var e=t.interaction,i=t.iEvent,n=t.phase;if(e.prepared.name==="gesture"){var r=e.pointers.map((function(v){return v.pointer})),o=n==="start",s=n==="end",l=e.interactable.options.deltaSource;if(i.touches=[r[0],r[1]],o)i.distance=ri(r,l),i.box=ni(r),i.scale=1,i.ds=0,i.angle=oi(r,l),i.da=0,e.gesture.startDistance=i.distance,e.gesture.startAngle=i.angle;else if(s||e.pointers.length<2){var f=e.prevEvent;i.distance=f.distance,i.box=f.box,i.scale=f.scale,i.ds=0,i.angle=f.angle,i.da=0}else i.distance=ri(r,l),i.box=ni(r),i.scale=i.distance/e.gesture.startDistance,i.angle=oi(r,l),i.ds=i.scale-e.gesture.scale,i.da=i.angle-e.gesture.angle;e.gesture.distance=i.distance,e.gesture.angle=i.angle,w.number(i.scale)&&i.scale!==1/0&&!isNaN(i.scale)&&(e.gesture.scale=i.scale)}}var ui={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(t){var e=t.actions,i=t.Interactable,n=t.defaults;i.prototype.gesturable=function(r){return w.object(r)?(this.options.gesture.enabled=r.enabled!==!1,this.setPerAction("gesture",r),this.setOnEvents("gesture",r),this):w.bool(r)?(this.options.gesture.enabled=r,this):this.options.gesture},e.map.gesture=ui,e.methodDict.gesture="gesturable",n.actions.gesture=ui.defaults},listeners:{"interactions:action-start":ci,"interactions:action-move":ci,"interactions:action-end":ci,"interactions:new":function(t){t.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(t){if(!(t.interaction.pointers.length<2)){var e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(t){return t.search("gesture")===0}},Br=ui;function Ur(t,e,i,n,r,o,s){if(!e)return!1;if(e===!0){var l=w.number(o.width)?o.width:o.right-o.left,f=w.number(o.height)?o.height:o.bottom-o.top;if(s=Math.min(s,Math.abs((t==="left"||t==="right"?l:f)/2)),l<0&&(t==="left"?t="right":t==="right"&&(t="left")),f<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){var v=l>=0?o.left:o.right;return i.x<v+s}if(t==="top"){var h=f>=0?o.top:o.bottom;return i.y<h+s}if(t==="right")return i.x>(l>=0?o.right:o.left)-s;if(t==="bottom")return i.y>(f>=0?o.bottom:o.top)-s}return!!w.element(n)&&(w.element(e)?e===n:Jt(n,e,r))}function _n(t){var e=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.resizeAxes){var n=e;i.interactable.options.resize.square?(i.resizeAxes==="y"?n.delta.x=n.delta.y:n.delta.y=n.delta.x,n.axes="xy"):(n.axes=i.resizeAxes,i.resizeAxes==="x"?n.delta.y=0:i.resizeAxes==="y"&&(n.delta.x=0))}}var _e,Fe,Oe={id:"actions/resize",before:["actions/drag"],install:function(t){var e=t.actions,i=t.browser,n=t.Interactable,r=t.defaults;Oe.cursors=(function(o){return o.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}})(i),Oe.defaultMargin=i.supportsTouch||i.supportsPointerEvent?20:10,n.prototype.resizable=function(o){return(function(s,l,f){return w.object(l)?(s.options.resize.enabled=l.enabled!==!1,s.setPerAction("resize",l),s.setOnEvents("resize",l),w.string(l.axis)&&/^x$|^y$|^xy$/.test(l.axis)?s.options.resize.axis=l.axis:l.axis===null&&(s.options.resize.axis=f.defaults.actions.resize.axis),w.bool(l.preserveAspectRatio)?s.options.resize.preserveAspectRatio=l.preserveAspectRatio:w.bool(l.square)&&(s.options.resize.square=l.square),s):w.bool(l)?(s.options.resize.enabled=l,s):s.options.resize})(this,o,t)},e.map.resize=Oe,e.methodDict.resize="resizable",r.actions.resize=Oe.defaults},listeners:{"interactions:new":function(t){t.interaction.resizeAxes="xy"},"interactions:action-start":function(t){(function(e){var i=e.iEvent,n=e.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var r=i,o=n.rect;n._rects={start:z({},o),corrected:z({},o),previous:z({},o),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},r.edges=n.prepared.edges,r.rect=n._rects.corrected,r.deltaRect=n._rects.delta}})(t),_n(t)},"interactions:action-move":function(t){(function(e){var i=e.iEvent,n=e.interaction;if(n.prepared.name==="resize"&&n.prepared.edges){var r=i,o=n.interactable.options.resize.invert,s=o==="reposition"||o==="negate",l=n.rect,f=n._rects,v=f.start,h=f.corrected,m=f.delta,b=f.previous;if(z(b,h),s){if(z(h,l),o==="reposition"){if(h.top>h.bottom){var T=h.top;h.top=h.bottom,h.bottom=T}if(h.left>h.right){var E=h.left;h.left=h.right,h.right=E}}}else h.top=Math.min(l.top,v.bottom),h.bottom=Math.max(l.bottom,v.top),h.left=Math.min(l.left,v.right),h.right=Math.max(l.right,v.left);for(var S in h.width=h.right-h.left,h.height=h.bottom-h.top,h)m[S]=h[S]-b[S];r.edges=n.prepared.edges,r.rect=h,r.deltaRect=m}})(t),_n(t)},"interactions:action-end":function(t){var e=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var n=e;n.edges=i.prepared.edges,n.rect=i._rects.corrected,n.deltaRect=i._rects.delta}},"auto-start:check":function(t){var e=t.interaction,i=t.interactable,n=t.element,r=t.rect,o=t.buttons;if(r){var s=z({},e.coords.cur.page),l=i.options.resize;if(l&&l.enabled&&(!e.pointerIsDown||!/mouse|pointer/.test(e.pointerType)||(o&l.mouseButtons)!=0)){if(w.object(l.edges)){var f={left:!1,right:!1,top:!1,bottom:!1};for(var v in f)f[v]=Ur(v,l.edges[v],s,e._latestPointer.eventTarget,n,r,l.margin||Oe.defaultMargin);f.left=f.left&&!f.right,f.top=f.top&&!f.bottom,(f.left||f.right||f.top||f.bottom)&&(t.action={name:"resize",edges:f})}else{var h=l.axis!=="y"&&s.x>r.right-Oe.defaultMargin,m=l.axis!=="x"&&s.y>r.bottom-Oe.defaultMargin;(h||m)&&(t.action={name:"resize",axes:(h?"x":"")+(m?"y":"")})}return!t.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(t){var e=t.edges,i=t.axis,n=t.name,r=Oe.cursors,o=null;if(i)o=r[n+i];else if(e){for(var s="",l=0,f=["top","bottom","left","right"];l<f.length;l++){var v=f[l];e[v]&&(s+=v)}o=r[s]}return o},filterEventType:function(t){return t.search("resize")===0},defaultMargin:null},$r=Oe,Gr={id:"actions",install:function(t){t.usePlugin(Br),t.usePlugin($r),t.usePlugin(on),t.usePlugin(qr)}},On=0,Ie={request:function(t){return _e(t)},cancel:function(t){return Fe(t)},init:function(t){if(_e=t.requestAnimationFrame,Fe=t.cancelAnimationFrame,!_e)for(var e=["ms","moz","webkit","o"],i=0;i<e.length;i++){var n=e[i];_e=t["".concat(n,"RequestAnimationFrame")],Fe=t["".concat(n,"CancelAnimationFrame")]||t["".concat(n,"CancelRequestAnimationFrame")]}_e=_e&&_e.bind(t),Fe=Fe&&Fe.bind(t),_e||(_e=function(r){var o=Date.now(),s=Math.max(0,16-(o-On)),l=t.setTimeout((function(){r(o+s)}),s);return On=o+s,l},Fe=function(r){return clearTimeout(r)})}},C={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(t){C.isScrolling=!0,Ie.cancel(C.i),t.autoScroll=C,C.interaction=t,C.prevTime=C.now(),C.i=Ie.request(C.scroll)},stop:function(){C.isScrolling=!1,C.interaction&&(C.interaction.autoScroll=null),Ie.cancel(C.i)},scroll:function(){var t=C.interaction,e=t.interactable,i=t.element,n=t.prepared.name,r=e.options[n].autoScroll,o=Dn(r.container,e,i),s=C.now(),l=(s-C.prevTime)/1e3,f=r.speed*l;if(f>=1){var v={x:C.x*f,y:C.y*f};if(v.x||v.y){var h=kn(o);w.window(o)?o.scrollBy(v.x,v.y):o&&(o.scrollLeft+=v.x,o.scrollTop+=v.y);var m=kn(o),b={x:m.x-h.x,y:m.y-h.y};(b.x||b.y)&&e.fire({type:"autoscroll",target:i,interactable:e,delta:b,interaction:t,container:o})}C.prevTime=s}C.isScrolling&&(Ie.cancel(C.i),C.i=Ie.request(C.scroll))},check:function(t,e){var i;return(i=t.options[e].autoScroll)==null?void 0:i.enabled},onInteractionMove:function(t){var e=t.interaction,i=t.pointer;if(e.interacting()&&C.check(e.interactable,e.prepared.name))if(e.simulation)C.x=C.y=0;else{var n,r,o,s,l=e.interactable,f=e.element,v=e.prepared.name,h=l.options[v].autoScroll,m=Dn(h.container,l,f);if(w.window(m))s=i.clientX<C.margin,n=i.clientY<C.margin,r=i.clientX>m.innerWidth-C.margin,o=i.clientY>m.innerHeight-C.margin;else{var b=Qt(m);s=i.clientX<b.left+C.margin,n=i.clientY<b.top+C.margin,r=i.clientX>b.right-C.margin,o=i.clientY>b.bottom-C.margin}C.x=r?1:s?-1:0,C.y=o?1:n?-1:0,C.isScrolling||(C.margin=h.margin,C.speed=h.speed,C.start(e))}}};function Dn(t,e,i){return(w.string(t)?fn(t,e,i):t)||ne(i)}function kn(t){return w.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Kr={id:"auto-scroll",install:function(t){var e=t.defaults,i=t.actions;t.autoScroll=C,C.now=function(){return t.now()},i.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=C.defaults},listeners:{"interactions:new":function(t){t.interaction.autoScroll=null},"interactions:destroy":function(t){t.interaction.autoScroll=null,C.stop(),C.interaction&&(C.interaction=null)},"interactions:stop":C.stop,"interactions:action-move":function(t){return C.onInteractionMove(t)}}},Zr=Kr;function ut(t,e){var i=!1;return function(){return i||(Q.console.warn(e),i=!0),t.apply(this,arguments)}}function fi(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function Jr(t){return w.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Qr(t){return w.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var eo={id:"auto-start/interactableMethods",install:function(t){var e=t.Interactable;e.prototype.getAction=function(i,n,r,o){var s=(function(l,f,v,h,m){var b=l.getRect(h),T=f.buttons||{0:1,1:4,3:8,4:16}[f.button],E={action:null,interactable:l,interaction:v,element:h,rect:b,buttons:T};return m.fire("auto-start:check",E),E.action})(this,n,r,o,t);return this.options.actionChecker?this.options.actionChecker(i,n,s,this,o,r):s},e.prototype.ignoreFrom=ut((function(i){return this._backCompatOption("ignoreFrom",i)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=ut((function(i){return this._backCompatOption("allowFrom",i)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Qr,e.prototype.styleCursor=Jr}};function In(t,e,i,n,r){return e.testIgnoreAllow(e.options[t.name],i,n)&&e.options[t.name].enabled&&zt(e,i,t,r)?t:null}function to(t,e,i,n,r,o,s){for(var l=0,f=n.length;l<f;l++){var v=n[l],h=r[l],m=v.getAction(e,i,t,h);if(m){var b=In(m,v,h,o,s);if(b)return{action:b,interactable:v,element:h}}}return{action:null,interactable:null,element:null}}function Pn(t,e,i,n,r){var o=[],s=[],l=n;function f(h){o.push(h),s.push(l)}for(;w.element(l);){o=[],s=[],r.interactables.forEachMatch(l,f);var v=to(t,e,i,o,s,n,r);if(v.action&&!v.interactable.options[v.action.name].manualStart)return v;l=Se(l)}return{action:null,interactable:null,element:null}}function An(t,e,i){var n=e.action,r=e.interactable,o=e.element;n=n||{name:null},t.interactable=r,t.element=o,fi(t.prepared,n),t.rect=r&&n.name?r.getRect(o):null,Mn(t,i),i.fire("autoStart:prepared",{interaction:t})}function zt(t,e,i,n){var r=t.options,o=r[i.name].max,s=r[i.name].maxPerElement,l=n.autoStart.maxInteractions,f=0,v=0,h=0;if(!(o&&s&&l))return!1;for(var m=0,b=n.interactions.list;m<b.length;m++){var T=b[m],E=T.prepared.name;if(T.interacting()&&(++f>=l||T.interactable===t&&((v+=E===i.name?1:0)>=o||T.element===e&&(h++,E===i.name&&h>=s))))return!1}return l>0}function zn(t,e){return w.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function hi(t,e,i){var n=i.autoStart.cursorElement;n&&n!==t&&(n.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,i.autoStart.cursorElement=e?t:null}function Mn(t,e){var i=t.interactable,n=t.element,r=t.prepared;if(t.pointerType==="mouse"&&i&&i.options.styleCursor){var o="";if(r.name){var s=i.options[r.name].cursorChecker;o=w.func(s)?s(r,i,n,t._interacting):e.actions.map[r.name].getCursor(r)}hi(t.element,o||"",e)}else e.autoStart.cursorElement&&hi(e.autoStart.cursorElement,"",e)}var io={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,i=t.defaults;t.usePlugin(eo),i.base.actionChecker=null,i.base.styleCursor=!0,z(i.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=function(n){return zn(n,t)},t.autoStart={maxInteractions:1/0,withinInteractionLimit:zt,cursorElement:null}},listeners:{"interactions:down":function(t,e){var i=t.interaction,n=t.pointer,r=t.event,o=t.eventTarget;i.interacting()||An(i,Pn(i,n,r,o,e),e)},"interactions:move":function(t,e){(function(i,n){var r=i.interaction,o=i.pointer,s=i.event,l=i.eventTarget;r.pointerType!=="mouse"||r.pointerIsDown||r.interacting()||An(r,Pn(r,o,s,l,n),n)})(t,e),(function(i,n){var r=i.interaction;if(r.pointerIsDown&&!r.interacting()&&r.pointerWasMoved&&r.prepared.name){n.fire("autoStart:before-start",i);var o=r.interactable,s=r.prepared.name;s&&o&&(o.options[s].manualStart||!zt(o,r.element,r.prepared,n)?r.stop():(r.start(r.prepared,o,r.element),Mn(r,n)))}})(t,e)},"interactions:stop":function(t,e){var i=t.interaction,n=i.interactable;n&&n.options.styleCursor&&hi(i.element,"",e)}},maxInteractions:zn,withinInteractionLimit:zt,validateAction:In},di=io,no={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(t,e){var i=t.interaction,n=t.eventTarget,r=t.dx,o=t.dy;if(i.prepared.name==="drag"){var s=Math.abs(r),l=Math.abs(o),f=i.interactable.options.drag,v=f.startAxis,h=s>l?"x":s<l?"y":"xy";if(i.prepared.axis=f.lockAxis==="start"?h[0]:f.lockAxis,h!=="xy"&&v!=="xy"&&v!==h){i.prepared.name=null;for(var m=n,b=function(E){if(E!==i.interactable){var S=i.interactable.options.drag;if(!S.manualStart&&E.testIgnoreAllow(S,m,n)){var P=E.getAction(i.downPointer,i.downEvent,i,m);if(P&&P.name==="drag"&&(function(I,A){if(!A)return!1;var F=A.options.drag.startAxis;return I==="xy"||F==="xy"||F===I})(h,E)&&di.validateAction(P,E,m,n,e))return E}}};w.element(m);){var T=e.interactables.forEachMatch(m,b);if(T){i.prepared.name="drag",i.interactable=T,i.element=m;break}m=Se(m)}}}}}};function pi(t){var e=t.prepared&&t.prepared.name;if(!e)return null;var i=t.interactable.options;return i[e].hold||i[e].delay}var ro={id:"auto-start/hold",install:function(t){var e=t.defaults;t.usePlugin(di),e.perAction.hold=0,e.perAction.delay=0},listeners:{"interactions:new":function(t){t.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(t){var e=t.interaction,i=pi(e);i>0&&(e.autoStartHoldTimer=setTimeout((function(){e.start(e.prepared,e.interactable,e.element)}),i))},"interactions:move":function(t){var e=t.interaction,i=t.duplicate;e.autoStartHoldTimer&&e.pointerWasMoved&&!i&&(clearTimeout(e.autoStartHoldTimer),e.autoStartHoldTimer=null)},"autoStart:before-start":function(t){var e=t.interaction;pi(e)>0&&(e.prepared.name=null)}},getHoldDuration:pi},oo=ro,ao={id:"auto-start",install:function(t){t.usePlugin(di),t.usePlugin(oo),t.usePlugin(no)}},so=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):w.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function lo(t){var e=t.interaction,i=t.event;e.interactable&&e.interactable.checkAndPreventDefault(i)}var Cn={id:"core/interactablePreventDefault",install:function(t){var e=t.Interactable;e.prototype.preventDefault=so,e.prototype.checkAndPreventDefault=function(i){return(function(n,r,o){var s=n.options.preventDefault;if(s!=="never")if(s!=="always"){if(r.events.supportsPassive&&/^touch(start|move)$/.test(o.type)){var l=ne(o.target).document,f=r.getDocOptions(l);if(!f||!f.events||f.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(o.type)||w.element(o.target)&&ke(o.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||o.preventDefault()}else o.preventDefault()})(this,t,i)},t.interactions.docEvents.push({type:"dragstart",listener:function(i){for(var n=0,r=t.interactions.list;n<r.length;n++){var o=r[n];if(o.element&&(o.element===i.target||Re(o.element,i.target)))return void o.interactable.checkAndPreventDefault(i)}}})},listeners:["down","move","up","cancel"].reduce((function(t,e){return t["interactions:".concat(e)]=lo,t}),{})};function Mt(t,e){if(e.phaselessTypes[t])return!0;for(var i in e.map)if(t.indexOf(i)===0&&t.substr(i.length)in e.phases)return!0;return!1}function Ke(t){var e={};for(var i in t){var n=t[i];w.plainObject(n)?e[i]=Ke(n):w.array(n)?e[i]=wn(n):e[i]=n}return e}var vi=(function(){function t(e){g(this,t),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=e,this.result=Ct(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return x(t,[{key:"start",value:function(e,i){var n,r,o=e.phase,s=this.interaction,l=(function(v){var h=v.interactable.options[v.prepared.name],m=h.modifiers;return m&&m.length?m:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(b){var T=h[b];return T&&T.enabled&&{options:T,methods:T._methods}})).filter((function(b){return!!b}))})(s);this.prepareStates(l),this.startEdges=z({},s.edges),this.edges=z({},this.startEdges),this.startOffset=(n=s.rect,r=i,n?{left:r.x-n.left,top:r.y-n.top,right:n.right-r.x,bottom:n.bottom-r.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var f=this.fillArg({phase:o,pageCoords:i,preEnd:!1});return this.result=Ct(),this.startAll(f),this.result=this.setAll(f)}},{key:"fillArg",value:function(e){var i=this.interaction;return e.interaction=i,e.interactable=i.interactable,e.element=i.element,e.rect||(e.rect=i.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}},{key:"startAll",value:function(e){for(var i=0,n=this.states;i<n.length;i++){var r=n[i];r.methods.start&&(e.state=r,r.methods.start(e))}}},{key:"setAll",value:function(e){var i=e.phase,n=e.preEnd,r=e.skipModifiers,o=e.rect,s=e.edges;e.coords=z({},e.pageCoords),e.rect=z({},o),e.edges=z({},s);for(var l=r?this.states.slice(r):this.states,f=Ct(e.coords,e.rect),v=0;v<l.length;v++){var h,m=l[v],b=m.options,T=z({},e.coords),E=null;(h=m.methods)!=null&&h.set&&this.shouldDo(b,n,i)&&(e.state=m,E=m.methods.set(e),Dt(e.edges,e.rect,{x:e.coords.x-T.x,y:e.coords.y-T.y})),f.eventProps.push(E)}z(this.edges,e.edges),f.delta.x=e.coords.x-e.pageCoords.x,f.delta.y=e.coords.y-e.pageCoords.y,f.rectDelta.left=e.rect.left-o.left,f.rectDelta.right=e.rect.right-o.right,f.rectDelta.top=e.rect.top-o.top,f.rectDelta.bottom=e.rect.bottom-o.bottom;var S=this.result.coords,P=this.result.rect;if(S&&P){var I=f.rect.left!==P.left||f.rect.right!==P.right||f.rect.top!==P.top||f.rect.bottom!==P.bottom;f.changed=I||S.x!==f.coords.x||S.y!==f.coords.y}return f}},{key:"applyToInteraction",value:function(e){var i=this.interaction,n=e.phase,r=i.coords.cur,o=i.coords.start,s=this.result,l=this.startDelta,f=s.delta;n==="start"&&z(this.startDelta,s.delta);for(var v=0,h=[[o,l],[r,f]];v<h.length;v++){var m=h[v],b=m[0],T=m[1];b.page.x+=T.x,b.page.y+=T.y,b.client.x+=T.x,b.client.y+=T.y}var E=this.result.rectDelta,S=e.rect||i.rect;S.left+=E.left,S.right+=E.right,S.top+=E.top,S.bottom+=E.bottom,S.width=S.right-S.left,S.height=S.bottom-S.top}},{key:"setAndApply",value:function(e){var i=this.interaction,n=e.phase,r=e.preEnd,o=e.skipModifiers,s=this.setAll(this.fillArg({preEnd:r,phase:n,pageCoords:e.modifiedCoords||i.coords.cur.page}));if(this.result=s,!s.changed&&(!o||o<this.states.length)&&i.interacting())return!1;if(e.modifiedCoords){var l=i.coords.cur.page,f={x:e.modifiedCoords.x-l.x,y:e.modifiedCoords.y-l.y};s.coords.x+=f.x,s.coords.y+=f.y,s.delta.x+=f.x,s.delta.y+=f.y}this.applyToInteraction(e)}},{key:"beforeEnd",value:function(e){var i=e.interaction,n=e.event,r=this.states;if(r&&r.length){for(var o=!1,s=0;s<r.length;s++){var l=r[s];e.state=l;var f=l.options,v=l.methods,h=v.beforeEnd&&v.beforeEnd(e);if(h)return this.endResult=h,!1;o=o||!o&&this.shouldDo(f,!0,e.phase,!0)}o&&i.move({event:n,preEnd:!0})}}},{key:"stop",value:function(e){var i=e.interaction;if(this.states&&this.states.length){var n=z({states:this.states,interactable:i.interactable,element:i.element,rect:null},e);this.fillArg(n);for(var r=0,o=this.states;r<o.length;r++){var s=o[r];n.state=s,s.methods.stop&&s.methods.stop(n)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(e){this.states=[];for(var i=0;i<e.length;i++){var n=e[i],r=n.options,o=n.methods,s=n.name;this.states.push({options:r,methods:o,index:i,name:s})}return this.states}},{key:"restoreInteractionCoords",value:function(e){var i=e.interaction,n=i.coords,r=i.rect,o=i.modification;if(o.result){for(var s=o.startDelta,l=o.result,f=l.delta,v=l.rectDelta,h=0,m=[[n.start,s],[n.cur,f]];h<m.length;h++){var b=m[h],T=b[0],E=b[1];T.page.x-=E.x,T.page.y-=E.y,T.client.x-=E.x,T.client.y-=E.y}r.left-=v.left,r.right-=v.right,r.top-=v.top,r.bottom-=v.bottom}}},{key:"shouldDo",value:function(e,i,n,r){return!(!e||e.enabled===!1||r&&!e.endOnly||e.endOnly&&!i||n==="start"&&!e.setStart)}},{key:"copyFrom",value:function(e){this.startOffset=e.startOffset,this.startDelta=e.startDelta,this.startEdges=e.startEdges,this.edges=e.edges,this.states=e.states.map((function(i){return Ke(i)})),this.result=Ct(z({},e.result.coords),z({},e.result.rect))}},{key:"destroy",value:function(){for(var e in this)this[e]=null}}]),t})();function Ct(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Pe(t,e){var i=t.defaults,n={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},r=function(o){var s=o||{};for(var l in s.enabled=s.enabled!==!1,i)l in s||(s[l]=i[l]);var f={options:s,methods:n,name:e,enable:function(){return s.enabled=!0,f},disable:function(){return s.enabled=!1,f}};return f};return e&&typeof e=="string"&&(r._defaults=i,r._methods=n),r}function ft(t){var e=t.iEvent,i=t.interaction.modification.result;i&&(e.modifiers=i.eventProps)}var co={id:"modifiers/base",before:["actions"],install:function(t){t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(t){var e=t.interaction;e.modification=new vi(e)},"interactions:before-action-start":function(t){var e=t.interaction,i=t.interaction.modification;i.start(t,e.coords.start.page),e.edges=i.edges,i.applyToInteraction(t)},"interactions:before-action-move":function(t){var e=t.interaction,i=e.modification,n=i.setAndApply(t);return e.edges=i.edges,n},"interactions:before-action-end":function(t){var e=t.interaction,i=e.modification,n=i.beforeEnd(t);return e.edges=i.startEdges,n},"interactions:action-start":ft,"interactions:action-move":ft,"interactions:action-end":ft,"interactions:after-action-start":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-move":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:stop":function(t){return t.interaction.modification.stop(t)}}},Rn=co,Nn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},gi=(function(t){O(i,t);var e=q(i);function i(n,r,o,s,l,f,v){var h;g(this,i),(h=e.call(this,n)).relatedTarget=null,h.screenX=void 0,h.screenY=void 0,h.button=void 0,h.buttons=void 0,h.ctrlKey=void 0,h.shiftKey=void 0,h.altKey=void 0,h.metaKey=void 0,h.page=void 0,h.client=void 0,h.delta=void 0,h.rect=void 0,h.x0=void 0,h.y0=void 0,h.t0=void 0,h.dt=void 0,h.duration=void 0,h.clientX0=void 0,h.clientY0=void 0,h.velocity=void 0,h.speed=void 0,h.swipe=void 0,h.axes=void 0,h.preEnd=void 0,l=l||n.element;var m=n.interactable,b=(m&&m.options||Nn).deltaSource,T=ot(m,l,o),E=s==="start",S=s==="end",P=E?j(h):n.prevEvent,I=E?n.coords.start:S?{page:P.page,client:P.client,timeStamp:n.coords.cur.timeStamp}:n.coords.cur;return h.page=z({},I.page),h.client=z({},I.client),h.rect=z({},n.rect),h.timeStamp=I.timeStamp,S||(h.page.x-=T.x,h.page.y-=T.y,h.client.x-=T.x,h.client.y-=T.y),h.ctrlKey=r.ctrlKey,h.altKey=r.altKey,h.shiftKey=r.shiftKey,h.metaKey=r.metaKey,h.button=r.button,h.buttons=r.buttons,h.target=l,h.currentTarget=l,h.preEnd=f,h.type=v||o+(s||""),h.interactable=m,h.t0=E?n.pointers[n.pointers.length-1].downTime:P.t0,h.x0=n.coords.start.page.x-T.x,h.y0=n.coords.start.page.y-T.y,h.clientX0=n.coords.start.client.x-T.x,h.clientY0=n.coords.start.client.y-T.y,h.delta=E||S?{x:0,y:0}:{x:h[b].x-P[b].x,y:h[b].y-P[b].y},h.dt=n.coords.delta.timeStamp,h.duration=h.timeStamp-h.t0,h.velocity=z({},n.coords.velocity[b]),h.speed=at(h.velocity.x,h.velocity.y),h.swipe=S||s==="inertiastart"?h.getSwipe():null,h}return x(i,[{key:"getSwipe",value:function(){var n=this._interaction;if(n.prevEvent.speed<600||this.timeStamp-n.prevEvent.timeStamp>150)return null;var r=180*Math.atan2(n.prevEvent.velocityY,n.prevEvent.velocityX)/Math.PI;r<0&&(r+=360);var o=112.5<=r&&r<247.5,s=202.5<=r&&r<337.5;return{up:s,down:!s&&22.5<=r&&r<157.5,left:o,right:!o&&(292.5<=r||r<67.5),angle:r,speed:n.prevEvent.speed,velocity:{x:n.prevEvent.velocityX,y:n.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),i})(At);Object.defineProperties(gi.prototype,{pageX:{get:function(){return this.page.x},set:function(t){this.page.x=t}},pageY:{get:function(){return this.page.y},set:function(t){this.page.y=t}},clientX:{get:function(){return this.client.x},set:function(t){this.client.x=t}},clientY:{get:function(){return this.client.y},set:function(t){this.client.y=t}},dx:{get:function(){return this.delta.x},set:function(t){this.delta.x=t}},dy:{get:function(){return this.delta.y},set:function(t){this.delta.y=t}},velocityX:{get:function(){return this.velocity.x},set:function(t){this.velocity.x=t}},velocityY:{get:function(){return this.velocity.y},set:function(t){this.velocity.y=t}}});var uo=x((function t(e,i,n,r,o){g(this,t),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=e,this.pointer=i,this.event=n,this.downTime=r,this.downTarget=o})),fo=(function(t){return t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy="",t})({}),Fn=(function(t){return t.start="",t.move="",t.end="",t.stop="",t.interacting="",t})({}),ho=0,po=(function(){function t(e){var i=this,n=e.pointerType,r=e.scopeFire;g(this,t),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ut((function(h){this.move(h)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=ho++,this._scopeFire=r,this.pointerType=n;var o=this;this._proxy={};var s=function(h){Object.defineProperty(i._proxy,h,{get:function(){return o[h]}})};for(var l in fo)s(l);var f=function(h){Object.defineProperty(i._proxy,h,{value:function(){return o[h].apply(o,arguments)}})};for(var v in Fn)f(v);this._scopeFire("interactions:new",{interaction:this})}return x(t,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(e,i,n){var r=this.updatePointer(e,i,n,!0),o=this.pointers[r];this._scopeFire("interactions:down",{pointer:e,event:i,eventTarget:n,pointerIndex:r,pointerInfo:o,type:"down",interaction:this})}},{key:"start",value:function(e,i,n){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!i.options[e.name].enabled)&&(fi(this.prepared,e),this.interactable=i,this.element=n,this.rect=i.getRect(n),this.edges=this.prepared.edges?z({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(e,i,n){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(e,i,n,!1);var r,o,s=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(r=this.coords.cur.client.x-this.coords.start.client.x,o=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=at(r,o)>this.pointerMoveTolerance);var l,f,v,h=this.getPointerIndex(e),m={pointer:e,pointerIndex:h,pointerInfo:this.pointers[h],event:i,type:"move",eventTarget:n,dx:r,dy:o,duplicate:s,interaction:this};s||(l=this.coords.velocity,f=this.coords.delta,v=Math.max(f.timeStamp/1e3,.001),l.page.x=f.page.x/v,l.page.y=f.page.y/v,l.client.x=f.client.x/v,l.client.y=f.client.y/v,l.timeStamp=v),this._scopeFire("interactions:move",m),s||this.simulation||(this.interacting()&&(m.type=null,this.move(m)),this.pointerWasMoved&&It(this.coords.prev,this.coords.cur))}},{key:"move",value:function(e){e&&e.event||dn(this.coords.delta),(e=z({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{})).phase="move",this._doPhase(e)}},{key:"pointerUp",value:function(e,i,n,r){var o=this.getPointerIndex(e);o===-1&&(o=this.updatePointer(e,i,n,!1));var s=/cancel$/i.test(i.type)?"cancel":"up";this._scopeFire("interactions:".concat(s),{pointer:e,pointerIndex:o,pointerInfo:this.pointers[o],event:i,eventTarget:n,type:s,curEventTarget:r,interaction:this}),this.simulation||this.end(i),this.removePointer(e,i)}},{key:"documentBlur",value:function(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}},{key:"end",value:function(e){var i;this._ending=!0,e=e||this._latestPointer.event,this.interacting()&&(i=this._doPhase({event:e,interaction:this,phase:"end"})),this._ending=!1,i===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(e){var i=st(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:lt(this.pointers,(function(n){return n.id===i}))}},{key:"getPointerInfo",value:function(e){return this.pointers[this.getPointerIndex(e)]}},{key:"updatePointer",value:function(e,i,n,r){var o,s,l,f=st(e),v=this.getPointerIndex(e),h=this.pointers[v];return r=r!==!1&&(r||/(down|start)$/i.test(i.type)),h?h.pointer=e:(h=new uo(f,e,i,null,null),v=this.pointers.length,this.pointers.push(h)),Hr(this.coords.cur,this.pointers.map((function(m){return m.pointer})),this._now()),o=this.coords.delta,s=this.coords.prev,l=this.coords.cur,o.page.x=l.page.x-s.page.x,o.page.y=l.page.y-s.page.y,o.client.x=l.client.x-s.client.x,o.client.y=l.client.y-s.client.y,o.timeStamp=l.timeStamp-s.timeStamp,r&&(this.pointerIsDown=!0,h.downTime=this.coords.cur.timeStamp,h.downTarget=n,kt(this.downPointer,e),this.interacting()||(It(this.coords.start,this.coords.cur),It(this.coords.prev,this.coords.cur),this.downEvent=i,this.pointerWasMoved=!1)),this._updateLatestPointer(e,i,n),this._scopeFire("interactions:update-pointer",{pointer:e,event:i,eventTarget:n,down:r,pointerInfo:h,pointerIndex:v,interaction:this}),v}},{key:"removePointer",value:function(e,i){var n=this.getPointerIndex(e);if(n!==-1){var r=this.pointers[n];this._scopeFire("interactions:remove-pointer",{pointer:e,event:i,eventTarget:null,pointerIndex:n,pointerInfo:r,interaction:this}),this.pointers.splice(n,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(e,i,n){this._latestPointer.pointer=e,this._latestPointer.event=i,this._latestPointer.eventTarget=n}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(e,i,n,r){return new gi(this,e,this.prepared.name,i,this.element,n,r)}},{key:"_fireEvent",value:function(e){var i;(i=this.interactable)==null||i.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}},{key:"_doPhase",value:function(e){var i=e.event,n=e.phase,r=e.preEnd,o=e.type,s=this.rect;if(s&&n==="move"&&(Dt(this.edges,s,this.coords.delta[this.interactable.options.deltaSource]),s.width=s.right-s.left,s.height=s.bottom-s.top),this._scopeFire("interactions:before-action-".concat(n),e)===!1)return!1;var l=e.iEvent=this._createPreparedEvent(i,n,r,o);return this._scopeFire("interactions:action-".concat(n),e),n==="start"&&(this.prevEvent=l),this._fireEvent(l),this._scopeFire("interactions:after-action-".concat(n),e),!0}},{key:"_now",value:function(){return Date.now()}}]),t})();function Ln(t){Vn(t.interaction)}function Vn(t){if(!(function(i){return!(!i.offset.pending.x&&!i.offset.pending.y)})(t))return!1;var e=t.offset.pending;return mi(t.coords.cur,e),mi(t.coords.delta,e),Dt(t.edges,t.rect,e),e.x=0,e.y=0,!0}function vo(t){var e=t.x,i=t.y;this.offset.pending.x+=e,this.offset.pending.y+=i,this.offset.total.x+=e,this.offset.total.y+=i}function mi(t,e){var i=t.page,n=t.client,r=e.x,o=e.y;i.x+=r,i.y+=o,n.x+=r,n.y+=o}Fn.offsetBy="";var go={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=vo},listeners:{"interactions:new":function(t){t.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(t){return(function(e){e.pointerIsDown&&(mi(e.coords.cur,e.offset.total),e.offset.pending.x=0,e.offset.pending.y=0)})(t.interaction)},"interactions:before-action-start":Ln,"interactions:before-action-move":Ln,"interactions:before-action-end":function(t){var e=t.interaction;if(Vn(e))return e.move({offset:!0}),e.end(),!1},"interactions:stop":function(t){var e=t.interaction;e.offset.total.x=0,e.offset.total.y=0,e.offset.pending.x=0,e.offset.pending.y=0}}},jn=go,mo=(function(){function t(e){g(this,t),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=e}return x(t,[{key:"start",value:function(e){var i=this.interaction,n=Rt(i);if(!n||!n.enabled)return!1;var r=i.coords.velocity.client,o=at(r.x,r.y),s=this.modification||(this.modification=new vi(i));if(s.copyFrom(i.modification),this.t0=i._now(),this.allowResume=n.allowResume,this.v0=o,this.currentOffset={x:0,y:0},this.startCoords=i.coords.cur.page,this.modifierArg=s.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-i.coords.cur.timeStamp<50&&o>n.minSpeed&&o>n.endSpeed)this.startInertia();else{if(s.result=s.setAll(this.modifierArg),!s.result.changed)return!1;this.startSmoothEnd()}return i.modification.result.rect=null,i.offsetBy(this.targetOffset),i._doPhase({interaction:i,event:e,phase:"inertiastart"}),i.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),i.modification.result.rect=null,this.active=!0,i.simulation=this,!0}},{key:"startInertia",value:function(){var e=this,i=this.interaction.coords.velocity.client,n=Rt(this.interaction),r=n.resistance,o=-Math.log(n.endSpeed/this.v0)/r;this.targetOffset={x:(i.x-o)/r,y:(i.y-o)/r},this.te=o,this.lambda_v0=r/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;var s=this.modification,l=this.modifierArg;l.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},s.result=s.setAll(l),s.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+s.result.delta.x,y:this.targetOffset.y+s.result.delta.y}),this.onNextFrame((function(){return e.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var e=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return e.smoothEndTick()}))}},{key:"onNextFrame",value:function(e){var i=this;this.timeout=Ie.request((function(){i.active&&e()}))}},{key:"inertiaTick",value:function(){var e,i,n,r,o,s,l,f=this,v=this.interaction,h=Rt(v).resistance,m=(v._now()-this.t0)/1e3;if(m<this.te){var b,T=1-(Math.exp(-h*m)-this.lambda_v0)/this.one_ve_v0;this.isModified?(e=0,i=0,n=this.targetOffset.x,r=this.targetOffset.y,o=this.modifiedOffset.x,s=this.modifiedOffset.y,b={x:Yn(l=T,e,n,o),y:Yn(l,i,r,s)}):b={x:this.targetOffset.x*T,y:this.targetOffset.y*T};var E={x:b.x-this.currentOffset.x,y:b.y-this.currentOffset.y};this.currentOffset.x+=E.x,this.currentOffset.y+=E.y,v.offsetBy(E),v.move(),this.onNextFrame((function(){return f.inertiaTick()}))}else v.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var e=this,i=this.interaction,n=i._now()-this.t0,r=Rt(i).smoothEndDuration;if(n<r){var o={x:Xn(n,0,this.targetOffset.x,r),y:Xn(n,0,this.targetOffset.y,r)},s={x:o.x-this.currentOffset.x,y:o.y-this.currentOffset.y};this.currentOffset.x+=s.x,this.currentOffset.y+=s.y,i.offsetBy(s),i.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return e.smoothEndTick()}))}else i.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(e){var i=e.pointer,n=e.event,r=e.eventTarget,o=this.interaction;o.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),o.updatePointer(i,n,r,!0),o._doPhase({interaction:o,event:n,phase:"resume"}),It(o.coords.prev,o.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ie.cancel(this.timeout)}}]),t})();function Rt(t){var e=t.interactable,i=t.prepared;return e&&e.options&&i.name&&e.options[i.name].inertia}var yo={id:"inertia",before:["modifiers","actions"],install:function(t){var e=t.defaults;t.usePlugin(jn),t.usePlugin(Rn),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(t){var e=t.interaction;e.inertia=new mo(e)},"interactions:before-action-end":function(t){var e=t.interaction,i=t.event;return(!e._interacting||e.simulation||!e.inertia.start(i))&&null},"interactions:down":function(t){var e=t.interaction,i=t.eventTarget,n=e.inertia;if(n.active)for(var r=i;w.element(r);){if(r===e.element){n.resume(t);break}r=Se(r)}},"interactions:stop":function(t){var e=t.interaction.inertia;e.active&&e.stop()},"interactions:before-action-resume":function(t){var e=t.interaction.modification;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":function(t){return t.interaction.modification.setAndApply(t)},"interactions:action-resume":ft,"interactions:action-inertiastart":ft,"interactions:after-action-inertiastart":function(t){return t.interaction.modification.restoreInteractionCoords(t)},"interactions:after-action-resume":function(t){return t.interaction.modification.restoreInteractionCoords(t)}}};function Yn(t,e,i,n){var r=1-t;return r*r*e+2*r*t*i+t*t*n}function Xn(t,e,i,n){return-i*(t/=n)*(t-2)+e}var bo=yo;function Wn(t,e){for(var i=0;i<e.length;i++){var n=e[i];if(t.immediatePropagationStopped)break;n(t)}}var Hn=(function(){function t(e){g(this,t),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=z({},e||{})}return x(t,[{key:"fire",value:function(e){var i,n=this.global;(i=this.types[e.type])&&Wn(e,i),!e.propagationStopped&&n&&(i=n[e.type])&&Wn(e,i)}},{key:"on",value:function(e,i){var n=Ne(e,i);for(e in n)this.types[e]=bn(this.types[e]||[],n[e])}},{key:"off",value:function(e,i){var n=Ne(e,i);for(e in n){var r=this.types[e];if(r&&r.length)for(var o=0,s=n[e];o<s.length;o++){var l=s[o],f=r.indexOf(l);f!==-1&&r.splice(f,1)}}}},{key:"getRect",value:function(e){return null}}]),t})(),wo=(function(){function t(e){g(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,kt(this,e)}return x(t,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),t})();function ht(t){return w.object(t)?{capture:!!t.capture,passive:!!t.passive}:{capture:!!t,passive:!1}}function Nt(t,e){return t===e||(typeof t=="boolean"?!!e.capture===t&&!e.passive:!!t.capture==!!e.capture&&!!t.passive==!!e.passive)}var xo={id:"events",install:function(t){var e,i=[],n={},r=[],o={add:s,remove:l,addDelegate:function(h,m,b,T,E){var S=ht(E);if(!n[b]){n[b]=[];for(var P=0;P<r.length;P++){var I=r[P];s(I,b,f),s(I,b,v,!0)}}var A=n[b],F=ct(A,(function(Y){return Y.selector===h&&Y.context===m}));F||(F={selector:h,context:m,listeners:[]},A.push(F)),F.listeners.push({func:T,options:S})},removeDelegate:function(h,m,b,T,E){var S,P=ht(E),I=n[b],A=!1;if(I)for(S=I.length-1;S>=0;S--){var F=I[S];if(F.selector===h&&F.context===m){for(var Y=F.listeners,M=Y.length-1;M>=0;M--){var L=Y[M];if(L.func===T&&Nt(L.options,P)){Y.splice(M,1),Y.length||(I.splice(S,1),l(m,b,f),l(m,b,v,!0)),A=!0;break}}if(A)break}}},delegateListener:f,delegateUseCapture:v,delegatedEvents:n,documents:r,targets:i,supportsOptions:!1,supportsPassive:!1};function s(h,m,b,T){if(h.addEventListener){var E=ht(T),S=ct(i,(function(P){return P.eventTarget===h}));S||(S={eventTarget:h,events:{}},i.push(S)),S.events[m]||(S.events[m]=[]),ct(S.events[m],(function(P){return P.func===b&&Nt(P.options,E)}))||(h.addEventListener(m,b,o.supportsOptions?E:E.capture),S.events[m].push({func:b,options:E}))}}function l(h,m,b,T){if(h.addEventListener&&h.removeEventListener){var E=lt(i,(function(se){return se.eventTarget===h})),S=i[E];if(S&&S.events)if(m!=="all"){var P=!1,I=S.events[m];if(I){if(b==="all"){for(var A=I.length-1;A>=0;A--){var F=I[A];l(h,m,F.func,F.options)}return}for(var Y=ht(T),M=0;M<I.length;M++){var L=I[M];if(L.func===b&&Nt(L.options,Y)){h.removeEventListener(m,b,o.supportsOptions?Y:Y.capture),I.splice(M,1),I.length===0&&(delete S.events[m],P=!0);break}}}P&&!Object.keys(S.events).length&&i.splice(E,1)}else for(m in S.events)S.events.hasOwnProperty(m)&&l(h,m,"all")}}function f(h,m){for(var b=ht(m),T=new wo(h),E=n[h.type],S=yn(h)[0],P=S;w.element(P);){for(var I=0;I<E.length;I++){var A=E[I],F=A.selector,Y=A.context;if(ke(P,F)&&Re(Y,S)&&Re(Y,P)){var M=A.listeners;T.currentTarget=P;for(var L=0;L<M.length;L++){var se=M[L];Nt(se.options,b)&&se.func(T)}}}P=Se(P)}}function v(h){return f(h,!0)}return(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return o.supportsOptions=!0},get passive(){return o.supportsPassive=!0}}),t.events=o,o}},yi={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(t){for(var e=0,i=yi.methodOrder;e<i.length;e++){var n=i[e],r=yi[n](t);if(r)return r}return null},simulationResume:function(t){var e=t.pointerType,i=t.eventType,n=t.eventTarget,r=t.scope;if(!/down|start/i.test(i))return null;for(var o=0,s=r.interactions.list;o<s.length;o++){var l=s[o],f=n;if(l.simulation&&l.simulation.allowResume&&l.pointerType===e)for(;f;){if(f===l.element)return l;f=Se(f)}}return null},mouseOrPen:function(t){var e,i=t.pointerId,n=t.pointerType,r=t.eventType,o=t.scope;if(n!=="mouse"&&n!=="pen")return null;for(var s=0,l=o.interactions.list;s<l.length;s++){var f=l[s];if(f.pointerType===n){if(f.simulation&&!qn(f,i))continue;if(f.interacting())return f;e||(e=f)}}if(e)return e;for(var v=0,h=o.interactions.list;v<h.length;v++){var m=h[v];if(!(m.pointerType!==n||/down/i.test(r)&&m.simulation))return m}return null},hasPointer:function(t){for(var e=t.pointerId,i=0,n=t.scope.interactions.list;i<n.length;i++){var r=n[i];if(qn(r,e))return r}return null},idle:function(t){for(var e=t.pointerType,i=0,n=t.scope.interactions.list;i<n.length;i++){var r=n[i];if(r.pointers.length===1){var o=r.interactable;if(o&&(!o.options.gesture||!o.options.gesture.enabled))continue}else if(r.pointers.length>=2)continue;if(!r.interacting()&&e===r.pointerType)return r}return null}};function qn(t,e){return t.pointers.some((function(i){return i.id===e}))}var Eo=yi,bi=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Bn(t,e){return function(i){var n=e.interactions.list,r=mn(i),o=yn(i),s=o[0],l=o[1],f=[];if(/^touch/.test(i.type)){e.prevTouchTime=e.now();for(var v=0,h=i.changedTouches;v<h.length;v++){var m=h[v],b={pointer:m,pointerId:st(m),pointerType:r,eventType:i.type,eventTarget:s,curEventTarget:l,scope:e},T=Un(b);f.push([b.pointer,b.eventTarget,b.curEventTarget,T])}}else{var E=!1;if(!be.supportsPointerEvent&&/mouse/.test(i.type)){for(var S=0;S<n.length&&!E;S++)E=n[S].pointerType!=="mouse"&&n[S].pointerIsDown;E=E||e.now()-e.prevTouchTime<500||i.timeStamp===0}if(!E){var P={pointer:i,pointerId:st(i),pointerType:r,eventType:i.type,curEventTarget:l,eventTarget:s,scope:e},I=Un(P);f.push([P.pointer,P.eventTarget,P.curEventTarget,I])}}for(var A=0;A<f.length;A++){var F=f[A],Y=F[0],M=F[1],L=F[2];F[3][t](Y,i,M,L)}}}function Un(t){var e=t.pointerType,i=t.scope,n={interaction:Eo.search(t),searchDetails:t};return i.fire("interactions:find",n),n.interaction||i.interactions.new({pointerType:e})}function wi(t,e){var i=t.doc,n=t.scope,r=t.options,o=n.interactions.docEvents,s=n.events,l=s[e];for(var f in n.browser.isIOS&&!r.events&&(r.events={passive:!1}),s.delegatedEvents)l(i,f,s.delegateListener),l(i,f,s.delegateUseCapture,!0);for(var v=r&&r.events,h=0;h<o.length;h++){var m=o[h];l(i,m.type,m.listener,v)}}var To={id:"core/interactions",install:function(t){for(var e={},i=0;i<bi.length;i++){var n=bi[i];e[n]=Bn(n,t)}var r,o=be.pEventTypes;function s(){for(var l=0,f=t.interactions.list;l<f.length;l++){var v=f[l];if(v.pointerIsDown&&v.pointerType==="touch"&&!v._interacting)for(var h=function(){var T=b[m];t.documents.some((function(E){return Re(E.doc,T.downTarget)}))||v.removePointer(T.pointer,T.event)},m=0,b=v.pointers;m<b.length;m++)h()}}(r=oe.PointerEvent?[{type:o.down,listener:s},{type:o.down,listener:e.pointerDown},{type:o.move,listener:e.pointerMove},{type:o.up,listener:e.pointerUp},{type:o.cancel,listener:e.pointerUp}]:[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:s},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}]).push({type:"blur",listener:function(l){for(var f=0,v=t.interactions.list;f<v.length;f++)v[f].documentBlur(l)}}),t.prevTouchTime=0,t.Interaction=(function(l){O(v,l);var f=q(v);function v(){return g(this,v),f.apply(this,arguments)}return x(v,[{key:"pointerMoveTolerance",get:function(){return t.interactions.pointerMoveTolerance},set:function(h){t.interactions.pointerMoveTolerance=h}},{key:"_now",value:function(){return t.now()}}]),v})(po),t.interactions={list:[],new:function(l){l.scopeFire=function(v,h){return t.fire(v,h)};var f=new t.Interaction(l);return t.interactions.list.push(f),f},listeners:e,docEvents:r,pointerMoveTolerance:1},t.usePlugin(Cn)},listeners:{"scope:add-document":function(t){return wi(t,"add")},"scope:remove-document":function(t){return wi(t,"remove")},"interactable:unset":function(t,e){for(var i=t.interactable,n=e.interactions.list.length-1;n>=0;n--){var r=e.interactions.list[n];r.interactable===i&&(r.stop(),e.fire("interactions:destroy",{interaction:r}),r.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(n,1))}}},onDocSignal:wi,doOnInteractions:Bn,methodNames:bi},So=To,Ae=(function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t})(Ae||{}),_o=(function(){function t(e,i,n,r){g(this,t),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Hn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=i.actions,this.target=e,this._context=i.context||n,this._win=ne(un(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=r,this.set(i)}return x(t,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(e,i){return w.func(i.onstart)&&this.on("".concat(e,"start"),i.onstart),w.func(i.onmove)&&this.on("".concat(e,"move"),i.onmove),w.func(i.onend)&&this.on("".concat(e,"end"),i.onend),w.func(i.oninertiastart)&&this.on("".concat(e,"inertiastart"),i.oninertiastart),this}},{key:"updatePerActionListeners",value:function(e,i,n){var r,o=this,s=(r=this._actions.map[e])==null?void 0:r.filterEventType,l=function(f){return(s==null||s(f))&&Mt(f,o._actions)};(w.array(i)||w.object(i))&&this._onOff(Ae.Off,e,i,void 0,l),(w.array(n)||w.object(n))&&this._onOff(Ae.On,e,n,void 0,l)}},{key:"setPerAction",value:function(e,i){var n=this._defaults;for(var r in i){var o=r,s=this.options[e],l=i[o];o==="listeners"&&this.updatePerActionListeners(e,s.listeners,l),w.array(l)?s[o]=wn(l):w.plainObject(l)?(s[o]=z(s[o]||{},Ke(l)),w.object(n.perAction[o])&&"enabled"in n.perAction[o]&&(s[o].enabled=l.enabled!==!1)):w.bool(l)&&w.object(n.perAction[o])?s[o].enabled=l:s[o]=l}}},{key:"getRect",value:function(e){return e=e||(w.element(this.target)?this.target:null),w.string(this.target)&&(e=e||this._context.querySelector(this.target)),ei(e)}},{key:"rectChecker",value:function(e){var i=this;return w.func(e)?(this.getRect=function(n){var r=z({},e.apply(i,n));return"width"in r||(r.width=r.right-r.left,r.height=r.bottom-r.top),r},this):e===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(e,i){if(un(i)||w.object(i)){for(var n in this.options[e]=i,this._actions.map)this.options[n][e]=i;return this}return this.options[e]}},{key:"origin",value:function(e){return this._backCompatOption("origin",e)}},{key:"deltaSource",value:function(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var e=this.target;return w.string(e)?Array.from(this._context.querySelectorAll(e)):w.func(e)&&e.getAllElements?e.getAllElements():w.element(e)?[e]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(e){return this._context===e.ownerDocument||Re(this._context,e)}},{key:"testIgnoreAllow",value:function(e,i,n){return!this.testIgnore(e.ignoreFrom,i,n)&&this.testAllow(e.allowFrom,i,n)}},{key:"testAllow",value:function(e,i,n){return!e||!!w.element(n)&&(w.string(e)?Jt(n,e,i):!!w.element(e)&&Re(e,n))}},{key:"testIgnore",value:function(e,i,n){return!(!e||!w.element(n))&&(w.string(e)?Jt(n,e,i):!!w.element(e)&&Re(e,n))}},{key:"fire",value:function(e){return this.events.fire(e),this}},{key:"_onOff",value:function(e,i,n,r,o){w.object(i)&&!w.array(i)&&(r=n,n=null);var s=Ne(i,n,o);for(var l in s){l==="wheel"&&(l=be.wheelEvent);for(var f=0,v=s[l];f<v.length;f++){var h=v[f];Mt(l,this._actions)?this.events[e===Ae.On?"on":"off"](l,h):w.string(this.target)?this._scopeEvents[e===Ae.On?"addDelegate":"removeDelegate"](this.target,this._context,l,h,r):this._scopeEvents[e===Ae.On?"add":"remove"](this.target,l,h,r)}}return this}},{key:"on",value:function(e,i,n){return this._onOff(Ae.On,e,i,n)}},{key:"off",value:function(e,i,n){return this._onOff(Ae.Off,e,i,n)}},{key:"set",value:function(e){var i=this._defaults;for(var n in w.object(e)||(e={}),this.options=Ke(i.base),this._actions.methodDict){var r=n,o=this._actions.methodDict[r];this.options[r]={},this.setPerAction(r,z(z({},i.perAction),i.actions[r])),this[o](e[r])}for(var s in e)s!=="getRect"?w.func(this[s])&&this[s](e[s]):this.rectChecker(e.getRect);return this}},{key:"unset",value:function(){if(w.string(this.target))for(var e in this._scopeEvents.delegatedEvents)for(var i=this._scopeEvents.delegatedEvents[e],n=i.length-1;n>=0;n--){var r=i[n],o=r.selector,s=r.context,l=r.listeners;o===this.target&&s===this._context&&i.splice(n,1);for(var f=l.length-1;f>=0;f--)this._scopeEvents.removeDelegate(this.target,this._context,e,l[f][0],l[f][1])}else this._scopeEvents.remove(this.target,"all")}}]),t})(),Oo=(function(){function t(e){var i=this;g(this,t),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=e,e.addListeners({"interactable:unset":function(n){var r=n.interactable,o=r.target,s=w.string(o)?i.selectorMap[o]:o[i.scope.id],l=lt(s,(function(f){return f===r}));s.splice(l,1)}})}return x(t,[{key:"new",value:function(e,i){i=z(i||{},{actions:this.scope.actions});var n=new this.scope.Interactable(e,i,this.scope.document,this.scope.events);return this.scope.addDocument(n._doc),this.list.push(n),w.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(n)):(n.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(n)),this.scope.fire("interactable:new",{target:e,options:i,interactable:n,win:this.scope._win}),n}},{key:"getExisting",value:function(e,i){var n=i&&i.context||this.scope.document,r=w.string(e),o=r?this.selectorMap[e]:e[this.scope.id];if(o)return ct(o,(function(s){return s._context===n&&(r||s.inContext(e))}))}},{key:"forEachMatch",value:function(e,i){for(var n=0,r=this.list;n<r.length;n++){var o=r[n],s=void 0;if((w.string(o.target)?w.element(e)&&ke(e,o.target):e===o.target)&&o.inContext(e)&&(s=i(o)),s!==void 0)return s}}}]),t})(),Do=(function(){function t(){var e=this;g(this,t),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=be,this.defaults=Ke(Nn),this.Eventable=Hn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=(function(n){var r=function o(s,l){var f=n.interactables.getExisting(s,l);return f||((f=n.interactables.new(s,l)).events.global=o.globalEvents),f};return r.getPointerAverage=gn,r.getTouchBBox=ni,r.getTouchDistance=ri,r.getTouchAngle=oi,r.getElementRect=ei,r.getElementClientRect=Qt,r.matchesSelector=ke,r.closest=an,r.globalEvents={},r.version="1.10.27",r.scope=n,r.use=function(o,s){return this.scope.usePlugin(o,s),this},r.isSet=function(o,s){return!!this.scope.interactables.get(o,s&&s.context)},r.on=ut((function(o,s,l){if(w.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),w.array(o)){for(var f=0,v=o;f<v.length;f++){var h=v[f];this.on(h,s,l)}return this}if(w.object(o)){for(var m in o)this.on(m,o[m],s);return this}return Mt(o,this.scope.actions)?this.globalEvents[o]?this.globalEvents[o].push(s):this.globalEvents[o]=[s]:this.scope.events.add(this.scope.document,o,s,{options:l}),this}),"The interact.on() method is being deprecated"),r.off=ut((function(o,s,l){if(w.string(o)&&o.search(" ")!==-1&&(o=o.trim().split(/ +/)),w.array(o)){for(var f=0,v=o;f<v.length;f++){var h=v[f];this.off(h,s,l)}return this}if(w.object(o)){for(var m in o)this.off(m,o[m],s);return this}var b;return Mt(o,this.scope.actions)?o in this.globalEvents&&(b=this.globalEvents[o].indexOf(s))!==-1&&this.globalEvents[o].splice(b,1):this.scope.events.remove(this.scope.document,o,s,l),this}),"The interact.off() method is being deprecated"),r.debug=function(){return this.scope},r.supportsTouch=function(){return be.supportsTouch},r.supportsPointerEvent=function(){return be.supportsPointerEvent},r.stop=function(){for(var o=0,s=this.scope.interactions.list;o<s.length;o++)s[o].stop();return this},r.pointerMoveTolerance=function(o){return w.number(o)?(this.scope.interactions.pointerMoveTolerance=o,this):this.scope.interactions.pointerMoveTolerance},r.addDocument=function(o,s){this.scope.addDocument(o,s)},r.removeDocument=function(o){this.scope.removeDocument(o)},r})(this),this.InteractEvent=gi,this.Interactable=void 0,this.interactables=new Oo(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(n){return e.removeDocument(n.target)};var i=this;this.Interactable=(function(n){O(o,n);var r=q(o);function o(){return g(this,o),r.apply(this,arguments)}return x(o,[{key:"_defaults",get:function(){return i.defaults}},{key:"set",value:function(s){return B(_(o.prototype),"set",this).call(this,s),i.fire("interactable:set",{options:s,interactable:this}),this}},{key:"unset",value:function(){B(_(o.prototype),"unset",this).call(this);var s=i.interactables.list.indexOf(this);s<0||(i.interactables.list.splice(s,1),i.fire("interactable:unset",{interactable:this}))}}]),o})(_o)}return x(t,[{key:"addListeners",value:function(e,i){this.listenerMaps.push({id:i,map:e})}},{key:"fire",value:function(e,i){for(var n=0,r=this.listenerMaps;n<r.length;n++){var o=r[n].map[e];if(o&&o(i,this,e)===!1)return!1}}},{key:"init",value:function(e){return this.isInitialized?this:(function(i,n){return i.isInitialized=!0,w.window(n)&&U(n),oe.init(n),be.init(n),Ie.init(n),i.window=n,i.document=n.document,i.usePlugin(So),i.usePlugin(xo),i})(this,e)}},{key:"pluginIsInstalled",value:function(e){var i=e.id;return i?!!this._plugins.map[i]:this._plugins.list.indexOf(e)!==-1}},{key:"usePlugin",value:function(e,i){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,i),e.listeners&&e.before){for(var n=0,r=this.listenerMaps.length,o=e.before.reduce((function(l,f){return l[f]=!0,l[$n(f)]=!0,l}),{});n<r;n++){var s=this.listenerMaps[n].id;if(s&&(o[s]||o[$n(s)]))break}this.listenerMaps.splice(n,0,{id:e.id,map:e.listeners})}else e.listeners&&this.listenerMaps.push({id:e.id,map:e.listeners});return this}},{key:"addDocument",value:function(e,i){if(this.getDocIndex(e)!==-1)return!1;var n=ne(e);i=i?z({},i):{},this.documents.push({doc:e,options:i}),this.events.documents.push(e),e!==this.document&&this.events.add(n,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:e,window:n,scope:this,options:i})}},{key:"removeDocument",value:function(e){var i=this.getDocIndex(e),n=ne(e),r=this.documents[i].options;this.events.remove(n,"unload",this.onWindowUnload),this.documents.splice(i,1),this.events.documents.splice(i,1),this.fire("scope:remove-document",{doc:e,window:n,scope:this,options:r})}},{key:"getDocIndex",value:function(e){for(var i=0;i<this.documents.length;i++)if(this.documents[i].doc===e)return i;return-1}},{key:"getDocOptions",value:function(e){var i=this.getDocIndex(e);return i===-1?null:this.documents[i].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),t})();function $n(t){return t&&t.replace(/\/.*$/,"")}var Gn=new Do,ae=Gn.interactStatic,ko=typeof globalThis<"u"?globalThis:window;Gn.init(ko);var Io=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(t){var e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(n){var r=n[0],o=n[1];return r in t||o in t})),i=function(n,r){for(var o=t.range,s=t.limits,l=s===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:s,f=t.offset,v=f===void 0?{x:0,y:0}:f,h={range:o,grid:t,x:null,y:null},m=0;m<e.length;m++){var b=e[m],T=b[0],E=b[1],S=Math.round((n-v.x)/t[T]),P=Math.round((r-v.y)/t[E]);h[T]=Math.max(l.left,Math.min(l.right,S*t[T]+v.x)),h[E]=Math.max(l.top,Math.min(l.bottom,P*t[E]+v.y))}return h};return i.grid=t,i.coordFields=e,i}}),Po={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=z(e.snappers||{},Io),e.createSnapGrid=e.snappers.grid}},Ao=Po,zo={start:function(t){var e=t.state,i=t.rect,n=t.edges,r=t.pageCoords,o=e.options,s=o.ratio,l=o.enabled,f=e.options,v=f.equalDelta,h=f.modifiers;s==="preserve"&&(s=i.width/i.height),e.startCoords=z({},r),e.startRect=z({},i),e.ratio=s,e.equalDelta=v;var m=e.linkedEdges={top:n.top||n.left&&!n.bottom,left:n.left||n.top&&!n.right,bottom:n.bottom||n.right&&!n.top,right:n.right||n.bottom&&!n.left};if(e.xIsPrimaryAxis=!(!n.left&&!n.right),e.equalDelta){var b=(m.left?1:-1)*(m.top?1:-1);e.edgeSign={x:b,y:b}}else e.edgeSign={x:m.left?-1:1,y:m.top?-1:1};if(l!==!1&&z(n,m),h!=null&&h.length){var T=new vi(t.interaction);T.copyFrom(t.interaction.modification),T.prepareStates(h),e.subModification=T,T.startAll(c({},t))}},set:function(t){var e=t.state,i=t.rect,n=t.coords,r=e.linkedEdges,o=z({},n),s=e.equalDelta?Mo:Co;if(z(t.edges,r),s(e,e.xIsPrimaryAxis,n,i),!e.subModification)return null;var l=z({},i);Dt(r,l,{x:n.x-o.x,y:n.y-o.y});var f=e.subModification.setAll(c(c({},t),{},{rect:l,edges:r,pageCoords:n,prevCoords:n,prevRect:l})),v=f.delta;return f.changed&&(s(e,Math.abs(v.x)>Math.abs(v.y),f.coords,f.rect),z(n,f.coords)),f.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Mo(t,e,i){var n=t.startCoords,r=t.edgeSign;e?i.y=n.y+(i.x-n.x)*r.y:i.x=n.x+(i.y-n.y)*r.x}function Co(t,e,i,n){var r=t.startRect,o=t.startCoords,s=t.ratio,l=t.edgeSign;if(e){var f=n.width/s;i.y=o.y+(f-r.height)*l.y}else{var v=n.height*s;i.x=o.x+(v-r.width)*l.x}}var Ro=Pe(zo,"aspectRatio"),Kn=function(){};Kn._defaults={};var Ft=Kn;function Le(t,e,i){return w.func(t)?rt(t,e.interactable,e.element,[i.x,i.y,e]):rt(t,e.interactable,e.element)}var Lt={start:function(t){var e=t.rect,i=t.startOffset,n=t.state,r=t.interaction,o=t.pageCoords,s=n.options,l=s.elementRect,f=z({left:0,top:0,right:0,bottom:0},s.offset||{});if(e&&l){var v=Le(s.restriction,r,o);if(v){var h=v.right-v.left-e.width,m=v.bottom-v.top-e.height;h<0&&(f.left+=h,f.right+=h),m<0&&(f.top+=m,f.bottom+=m)}f.left+=i.left-e.width*l.left,f.top+=i.top-e.height*l.top,f.right+=i.right-e.width*(1-l.right),f.bottom+=i.bottom-e.height*(1-l.bottom)}n.offset=f},set:function(t){var e=t.coords,i=t.interaction,n=t.state,r=n.options,o=n.offset,s=Le(r.restriction,i,e);if(s){var l=(function(f){return!f||"left"in f&&"top"in f||((f=z({},f)).left=f.x||0,f.top=f.y||0,f.right=f.right||f.left+f.width,f.bottom=f.bottom||f.top+f.height),f})(s);e.x=Math.max(Math.min(l.right-o.right,e.x),l.left+o.left),e.y=Math.max(Math.min(l.bottom-o.bottom,e.y),l.top+o.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},No=Pe(Lt,"restrict"),Zn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Jn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Qn(t,e){for(var i=0,n=["top","left","bottom","right"];i<n.length;i++){var r=n[i];r in t||(t[r]=e[r])}return t}var dt={noInner:Zn,noOuter:Jn,start:function(t){var e,i=t.interaction,n=t.startOffset,r=t.state,o=r.options;o&&(e=Ot(Le(o.offset,i,i.coords.start.page))),e=e||{x:0,y:0},r.offset={top:e.y+n.top,left:e.x+n.left,bottom:e.y-n.bottom,right:e.x-n.right}},set:function(t){var e=t.coords,i=t.edges,n=t.interaction,r=t.state,o=r.offset,s=r.options;if(i){var l=z({},e),f=Le(s.inner,n,l)||{},v=Le(s.outer,n,l)||{};Qn(f,Zn),Qn(v,Jn),i.top?e.y=Math.min(Math.max(v.top+o.top,l.y),f.top+o.top):i.bottom&&(e.y=Math.max(Math.min(v.bottom+o.bottom,l.y),f.bottom+o.bottom)),i.left?e.x=Math.min(Math.max(v.left+o.left,l.x),f.left+o.left):i.right&&(e.x=Math.max(Math.min(v.right+o.right,l.x),f.right+o.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Fo=Pe(dt,"restrictEdges"),Lo=z({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Lt.defaults),Vo=Pe({start:Lt.start,set:Lt.set,defaults:Lo},"restrictRect"),jo={width:-1/0,height:-1/0},Yo={width:1/0,height:1/0},Xo=Pe({start:function(t){return dt.start(t)},set:function(t){var e=t.interaction,i=t.state,n=t.rect,r=t.edges,o=i.options;if(r){var s=ti(Le(o.min,e,t.coords))||jo,l=ti(Le(o.max,e,t.coords))||Yo;i.options={endOnly:o.endOnly,inner:z({},dt.noInner),outer:z({},dt.noOuter)},r.top?(i.options.inner.top=n.bottom-s.height,i.options.outer.top=n.bottom-l.height):r.bottom&&(i.options.inner.bottom=n.top+s.height,i.options.outer.bottom=n.top+l.height),r.left?(i.options.inner.left=n.right-s.width,i.options.outer.left=n.right-l.width):r.right&&(i.options.inner.right=n.left+s.width,i.options.outer.right=n.left+l.width),dt.set(t),i.options=o}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),xi={start:function(t){var e,i=t.interaction,n=t.interactable,r=t.element,o=t.rect,s=t.state,l=t.startOffset,f=s.options,v=f.offsetWithOrigin?(function(b){var T=b.interaction.element,E=Ot(rt(b.state.options.origin,null,null,[T])),S=E||ot(b.interactable,T,b.interaction.prepared.name);return S})(t):{x:0,y:0};if(f.offset==="startCoords")e={x:i.coords.start.page.x,y:i.coords.start.page.y};else{var h=rt(f.offset,n,r,[i]);(e=Ot(h)||{x:0,y:0}).x+=v.x,e.y+=v.y}var m=f.relativePoints;s.offsets=o&&m&&m.length?m.map((function(b,T){return{index:T,relativePoint:b,x:l.left-o.width*b.x+e.x,y:l.top-o.height*b.y+e.y}})):[{index:0,relativePoint:null,x:e.x,y:e.y}]},set:function(t){var e=t.interaction,i=t.coords,n=t.state,r=n.options,o=n.offsets,s=ot(e.interactable,e.element,e.prepared.name),l=z({},i),f=[];r.offsetWithOrigin||(l.x-=s.x,l.y-=s.y);for(var v=0,h=o;v<h.length;v++)for(var m=h[v],b=l.x-m.x,T=l.y-m.y,E=0,S=r.targets.length;E<S;E++){var P=r.targets[E],I=void 0;(I=w.func(P)?P(b,T,e._proxy,m,E):P)&&f.push({x:(w.number(I.x)?I.x:b)+m.x,y:(w.number(I.y)?I.y:T)+m.y,range:w.number(I.range)?I.range:r.range,source:P,index:E,offset:m})}for(var A={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},F=0;F<f.length;F++){var Y=f[F],M=Y.range,L=Y.x-l.x,se=Y.y-l.y,K=at(L,se),fe=K<=M;M===1/0&&A.inRange&&A.range!==1/0&&(fe=!1),A.target&&!(fe?A.inRange&&M!==1/0?K/M<A.distance/A.range:M===1/0&&A.range!==1/0||K<A.distance:!A.inRange&&K<A.distance)||(A.target=Y,A.distance=K,A.range=M,A.inRange=fe,A.delta.x=L,A.delta.y=se)}return A.inRange&&(i.x=A.target.x,i.y=A.target.y),n.closest=A,A},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Wo=Pe(xi,"snap"),Vt={start:function(t){var e=t.state,i=t.edges,n=e.options;if(!i)return null;t.state={options:{targets:null,relativePoints:[{x:i.left?0:1,y:i.top?0:1}],offset:n.offset||"self",origin:{x:0,y:0},range:n.range}},e.targetFields=e.targetFields||[["width","height"],["x","y"]],xi.start(t),e.offsets=t.state.offsets,t.state=e},set:function(t){var e=t.interaction,i=t.state,n=t.coords,r=i.options,o=i.offsets,s={x:n.x-o[0].x,y:n.y-o[0].y};i.options=z({},r),i.options.targets=[];for(var l=0,f=r.targets||[];l<f.length;l++){var v=f[l],h=void 0;if(h=w.func(v)?v(s.x,s.y,e):v){for(var m=0,b=i.targetFields;m<b.length;m++){var T=b[m],E=T[0],S=T[1];if(E in h||S in h){h.x=h[E],h.y=h[S];break}}i.options.targets.push(h)}}var P=xi.set(t);return i.options=r,P},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ho=Pe(Vt,"snapSize"),Ei={aspectRatio:Ro,restrictEdges:Fo,restrict:No,restrictRect:Vo,restrictSize:Xo,snapEdges:Pe({start:function(t){var e=t.edges;return e?(t.state.targetFields=t.state.targetFields||[[e.left?"left":"right",e.top?"top":"bottom"]],Vt.start(t)):null},set:Vt.set,defaults:z(Ke(Vt.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Wo,snapSize:Ho,spring:Ft,avoid:Ft,transform:Ft,rubberband:Ft},qo={id:"modifiers",install:function(t){var e=t.interactStatic;for(var i in t.usePlugin(Rn),t.usePlugin(Ao),e.modifiers=Ei,Ei){var n=Ei[i],r=n._defaults,o=n._methods;r._methods=o,t.defaults.perAction[i]=r}}},Bo=qo,er=(function(t){O(i,t);var e=q(i);function i(n,r,o,s,l,f){var v;if(g(this,i),kt(j(v=e.call(this,l)),o),o!==r&&kt(j(v),r),v.timeStamp=f,v.originalEvent=o,v.type=n,v.pointerId=st(r),v.pointerType=mn(r),v.target=s,v.currentTarget=null,n==="tap"){var h=l.getPointerIndex(r);v.dt=v.timeStamp-l.pointers[h].downTime;var m=v.timeStamp-l.tapTime;v.double=!!l.prevTap&&l.prevTap.type!=="doubletap"&&l.prevTap.target===v.target&&m<500}else n==="doubletap"&&(v.dt=r.timeStamp-l.tapTime,v.double=!0);return v}return x(i,[{key:"_subtractOrigin",value:function(n){var r=n.x,o=n.y;return this.pageX-=r,this.pageY-=o,this.clientX-=r,this.clientY-=o,this}},{key:"_addOrigin",value:function(n){var r=n.x,o=n.y;return this.pageX+=r,this.pageY+=o,this.clientX+=r,this.clientY+=o,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),i})(At),pt={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(t){t.pointerEvents=pt,t.defaults.actions.pointerEvents=pt.defaults,z(t.actions.phaselessTypes,pt.types)},listeners:{"interactions:new":function(t){var e=t.interaction;e.prevTap=null,e.tapTime=0},"interactions:update-pointer":function(t){var e=t.down,i=t.pointerInfo;!e&&i.hold||(i.hold={duration:1/0,timeout:null})},"interactions:move":function(t,e){var i=t.interaction,n=t.pointer,r=t.event,o=t.eventTarget;t.duplicate||i.pointerIsDown&&!i.pointerWasMoved||(i.pointerIsDown&&Ti(t),ze({interaction:i,pointer:n,event:r,eventTarget:o,type:"move"},e))},"interactions:down":function(t,e){(function(i,n){for(var r=i.interaction,o=i.pointer,s=i.event,l=i.eventTarget,f=i.pointerIndex,v=r.pointers[f].hold,h=cn(l),m={interaction:r,pointer:o,event:s,eventTarget:l,type:"hold",targets:[],path:h,node:null},b=0;b<h.length;b++){var T=h[b];m.node=T,n.fire("pointerEvents:collect-targets",m)}if(m.targets.length){for(var E=1/0,S=0,P=m.targets;S<P.length;S++){var I=P[S].eventable.options.holdDuration;I<E&&(E=I)}v.duration=E,v.timeout=setTimeout((function(){ze({interaction:r,eventTarget:l,pointer:o,event:s,type:"hold"},n)}),E)}})(t,e),ze(t,e)},"interactions:up":function(t,e){Ti(t),ze(t,e),(function(i,n){var r=i.interaction,o=i.pointer,s=i.event,l=i.eventTarget;r.pointerWasMoved||ze({interaction:r,eventTarget:l,pointer:o,event:s,type:"tap"},n)})(t,e)},"interactions:cancel":function(t,e){Ti(t),ze(t,e)}},PointerEvent:er,fire:ze,collectEventTargets:tr,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function ze(t,e){var i=t.interaction,n=t.pointer,r=t.event,o=t.eventTarget,s=t.type,l=t.targets,f=l===void 0?tr(t,e):l,v=new er(s,n,r,o,i,e.now());e.fire("pointerEvents:new",{pointerEvent:v});for(var h={interaction:i,pointer:n,event:r,eventTarget:o,targets:f,type:s,pointerEvent:v},m=0;m<f.length;m++){var b=f[m];for(var T in b.props||{})v[T]=b.props[T];var E=ot(b.eventable,b.node);if(v._subtractOrigin(E),v.eventable=b.eventable,v.currentTarget=b.node,b.eventable.fire(v),v._addOrigin(E),v.immediatePropagationStopped||v.propagationStopped&&m+1<f.length&&f[m+1].node!==v.currentTarget)break}if(e.fire("pointerEvents:fired",h),s==="tap"){var S=v.double?ze({interaction:i,pointer:n,event:r,eventTarget:o,type:"doubletap"},e):v;i.prevTap=S,i.tapTime=S.timeStamp}return v}function tr(t,e){var i=t.interaction,n=t.pointer,r=t.event,o=t.eventTarget,s=t.type,l=i.getPointerIndex(n),f=i.pointers[l];if(s==="tap"&&(i.pointerWasMoved||!f||f.downTarget!==o))return[];for(var v=cn(o),h={interaction:i,pointer:n,event:r,eventTarget:o,type:s,path:v,targets:[],node:null},m=0;m<v.length;m++){var b=v[m];h.node=b,e.fire("pointerEvents:collect-targets",h)}return s==="hold"&&(h.targets=h.targets.filter((function(T){var E,S;return T.eventable.options.holdDuration===((E=i.pointers[l])==null||(S=E.hold)==null?void 0:S.duration)}))),h.targets}function Ti(t){var e=t.interaction,i=t.pointerIndex,n=e.pointers[i].hold;n&&n.timeout&&(clearTimeout(n.timeout),n.timeout=null)}var Uo=Object.freeze({__proto__:null,default:pt});function $o(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var Go={id:"pointer-events/holdRepeat",install:function(t){t.usePlugin(pt);var e=t.pointerEvents;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(t,e){return t["pointerEvents:".concat(e)]=$o,t}),{"pointerEvents:new":function(t){var e=t.pointerEvent;e.type==="hold"&&(e.count=(e.count||0)+1)},"pointerEvents:fired":function(t,e){var i=t.interaction,n=t.pointerEvent,r=t.eventTarget,o=t.targets;if(n.type==="hold"&&o.length){var s=o[0].eventable.options.holdRepeatInterval;s<=0||(i.holdIntervalHandle=setTimeout((function(){e.pointerEvents.fire({interaction:i,eventTarget:r,type:"hold",pointer:n,event:n},e)}),s))}}})},Ko=Go,Zo={id:"pointer-events/interactableTargets",install:function(t){var e=t.Interactable;e.prototype.pointerEvents=function(n){return z(this.events.options,n),this};var i=e.prototype._backCompatOption;e.prototype._backCompatOption=function(n,r){var o=i.call(this,n,r);return o===this&&(this.events.options[n]=r),o}},listeners:{"pointerEvents:collect-targets":function(t,e){var i=t.targets,n=t.node,r=t.type,o=t.eventTarget;e.interactables.forEachMatch(n,(function(s){var l=s.events,f=l.options;l.types[r]&&l.types[r].length&&s.testIgnoreAllow(f,n,o)&&i.push({node:n,eventable:l,props:{interactable:s}})}))},"interactable:new":function(t){var e=t.interactable;e.events.getRect=function(i){return e.getRect(i)}},"interactable:set":function(t,e){var i=t.interactable,n=t.options;z(i.events.options,e.pointerEvents.defaults),z(i.events.options,n.pointerEvents||{})}}},Jo=Zo,Qo={id:"pointer-events",install:function(t){t.usePlugin(Uo),t.usePlugin(Ko),t.usePlugin(Jo)}},ea=Qo,ta={id:"reflow",install:function(t){var e=t.Interactable;t.actions.phases.reflow=!0,e.prototype.reflow=function(i){return(function(n,r,o){for(var s=n.getAllElements(),l=o.window.Promise,f=l?[]:null,v=function(){var m=s[h],b=n.getRect(m);if(!b)return 1;var T,E=ct(o.interactions.list,(function(I){return I.interacting()&&I.interactable===n&&I.element===m&&I.prepared.name===r.name}));if(E)E.move(),f&&(T=E._reflowPromise||new l((function(I){E._reflowResolve=I})));else{var S=ti(b),P=(function(I){return{coords:I,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}})({page:{x:S.x,y:S.y},client:{x:S.x,y:S.y},timeStamp:o.now()});T=(function(I,A,F,Y,M){var L=I.interactions.new({pointerType:"reflow"}),se={interaction:L,event:M,pointer:M,eventTarget:F,phase:"reflow"};L.interactable=A,L.element=F,L.prevEvent=M,L.updatePointer(M,M,F,!0),dn(L.coords.delta),fi(L.prepared,Y),L._doPhase(se);var K=I.window,fe=K.Promise,we=fe?new fe((function(De){L._reflowResolve=De})):void 0;return L._reflowPromise=we,L.start(Y,A,F),L._interacting?(L.move(se),L.end(M)):(L.stop(),L._reflowResolve()),L.removePointer(M,M),we})(o,n,m,r,P)}f&&f.push(T)},h=0;h<s.length&&!v();h++);return f&&l.all(f).then((function(){return n}))})(this,i,t)}},listeners:{"interactions:stop":function(t,e){var i=t.interaction;i.pointerType==="reflow"&&(i._reflowResolve&&i._reflowResolve(),(function(n,r){n.splice(n.indexOf(r),1)})(e.interactions.list,i))}}},ia=ta;if(ae.use(Cn),ae.use(jn),ae.use(ea),ae.use(bo),ae.use(Bo),ae.use(ao),ae.use(Gr),ae.use(Zr),ae.use(ia),ae.default=ae,p(d)==="object"&&d)try{d.exports=ae}catch{}return ae.default=ae,ae}))})(Je,Je.exports)),Je.exports}var rr=nr();const gt=Ze(rr);/*!
|
|
2
|
+
* Viewer.js v1.11.7
|
|
3
|
+
* https://fengyuanchen.github.io/viewerjs
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2015-present Chen Fengyuan
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
*
|
|
8
|
+
* Date: 2024-11-24T04:32:19.116Z
|
|
9
|
+
*/function or(d,a){if(!(d instanceof a))throw new TypeError("Cannot call a class as a function")}function _i(d,a){for(var u=0;u<a.length;u++){var c=a[u];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(d,Di(c.key),c)}}function ar(d,a,u){return a&&_i(d.prototype,a),u&&_i(d,u),Object.defineProperty(d,"prototype",{writable:!1}),d}function sr(d,a,u){return(a=Di(a))in d?Object.defineProperty(d,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[a]=u,d}function Oi(d,a){var u=Object.keys(d);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(d);a&&(c=c.filter(function(p){return Object.getOwnPropertyDescriptor(d,p).enumerable})),u.push.apply(u,c)}return u}function Yt(d){for(var a=1;a<arguments.length;a++){var u=arguments[a]!=null?arguments[a]:{};a%2?Oi(Object(u),!0).forEach(function(c){sr(d,c,u[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(u)):Oi(Object(u)).forEach(function(c){Object.defineProperty(d,c,Object.getOwnPropertyDescriptor(u,c))})}return d}function lr(d,a){if(typeof d!="object"||!d)return d;var u=d[Symbol.toPrimitive];if(u!==void 0){var c=u.call(d,a);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(d)}function Di(d){var a=lr(d,"string");return typeof a=="symbol"?a:a+""}function Xt(d){"@babel/helpers - typeof";return Xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Xt(d)}var ki={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},cr='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',mt=typeof window<"u"&&typeof window.document<"u",xe=mt?window:{},Ve=mt&&xe.document.documentElement?"ontouchstart"in xe.document.documentElement:!1,Wt=mt?"PointerEvent"in xe:!1,V="viewer",yt="move",Ii="switch",Qe="zoom",bt="".concat(V,"-active"),ur="".concat(V,"-close"),wt="".concat(V,"-fade"),Ht="".concat(V,"-fixed"),fr="".concat(V,"-fullscreen"),Pi="".concat(V,"-fullscreen-exit"),Me="".concat(V,"-hide"),hr="".concat(V,"-hide-md-down"),dr="".concat(V,"-hide-sm-down"),pr="".concat(V,"-hide-xs-down"),he="".concat(V,"-in"),et="".concat(V,"-invisible"),je="".concat(V,"-loading"),vr="".concat(V,"-move"),Ai="".concat(V,"-open"),Ye="".concat(V,"-show"),J="".concat(V,"-transition"),Xe="click",qt="dblclick",zi="dragstart",Mi="focusin",Ci="keydown",de="load",Ce="error",gr=Ve?"touchend touchcancel":"mouseup",mr=Ve?"touchmove":"mousemove",yr=Ve?"touchstart":"mousedown",Ri=Wt?"pointerdown":yr,Ni=Wt?"pointermove":mr,Fi=Wt?"pointerup pointercancel":gr,Li="resize",me="transitionend",Vi="wheel",ji="ready",Yi="show",Xi="shown",Wi="hide",Hi="hidden",qi="view",tt="viewed",Bi="move",Ui="moved",$i="rotate",Gi="rotated",Ki="scale",Zi="scaled",Ji="zoom",Qi="zoomed",en="play",tn="stop",xt="".concat(V,"Action"),Bt=/\s\s*/,Et=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function it(d){return typeof d=="string"}var br=Number.isNaN||xe.isNaN;function Z(d){return typeof d=="number"&&!br(d)}function We(d){return typeof d>"u"}function He(d){return Xt(d)==="object"&&d!==null}var wr=Object.prototype.hasOwnProperty;function qe(d){if(!He(d))return!1;try{var a=d.constructor,u=a.prototype;return a&&u&&wr.call(u,"isPrototypeOf")}catch{return!1}}function W(d){return typeof d=="function"}function $(d,a){if(d&&W(a))if(Array.isArray(d)||Z(d.length)){var u=d.length,c;for(c=0;c<u&&a.call(d,d[c],c,d)!==!1;c+=1);}else He(d)&&Object.keys(d).forEach(function(p){a.call(d,d[p],p,d)});return d}var ce=Object.assign||function(a){for(var u=arguments.length,c=new Array(u>1?u-1:0),p=1;p<u;p++)c[p-1]=arguments[p];return He(a)&&c.length>0&&c.forEach(function(g){He(g)&&Object.keys(g).forEach(function(y){a[y]=g[y]})}),a},xr=/^(?:width|height|left|top|marginLeft|marginTop)$/;function ye(d,a){var u=d.style;$(a,function(c,p){xr.test(p)&&Z(c)&&(c+="px"),u[p]=c})}function Er(d){return it(d)?d.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):d}function Be(d,a){return!d||!a?!1:d.classList?d.classList.contains(a):d.className.indexOf(a)>-1}function R(d,a){if(!(!d||!a)){if(Z(d.length)){$(d,function(c){R(c,a)});return}if(d.classList){d.classList.add(a);return}var u=d.className.trim();u?u.indexOf(a)<0&&(d.className="".concat(u," ").concat(a)):d.className=a}}function X(d,a){if(!(!d||!a)){if(Z(d.length)){$(d,function(u){X(u,a)});return}if(d.classList){d.classList.remove(a);return}d.className.indexOf(a)>=0&&(d.className=d.className.replace(a,""))}}function nt(d,a,u){if(a){if(Z(d.length)){$(d,function(c){nt(c,a,u)});return}u?R(d,a):X(d,a)}}var Tr=/([a-z\d])([A-Z])/g;function Ut(d){return d.replace(Tr,"$1-$2").toLowerCase()}function Ue(d,a){return He(d[a])?d[a]:d.dataset?d.dataset[a]:d.getAttribute("data-".concat(Ut(a)))}function $t(d,a,u){He(u)?d[a]=u:d.dataset?d.dataset[a]=u:d.setAttribute("data-".concat(Ut(a)),u)}var nn=(function(){var d=!1;if(mt){var a=!1,u=function(){},c=Object.defineProperty({},"once",{get:function(){return d=!0,a},set:function(g){a=g}});xe.addEventListener("test",u,c),xe.removeEventListener("test",u,c)}return d})();function H(d,a,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=u;a.trim().split(Bt).forEach(function(g){if(!nn){var y=d.listeners;y&&y[g]&&y[g][u]&&(p=y[g][u],delete y[g][u],Object.keys(y[g]).length===0&&delete y[g],Object.keys(y).length===0&&delete d.listeners)}d.removeEventListener(g,p,c)})}function N(d,a,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=u;a.trim().split(Bt).forEach(function(g){if(c.once&&!nn){var y=d.listeners,x=y===void 0?{}:y;p=function(){delete x[g][u],d.removeEventListener(g,p,c);for(var O=arguments.length,_=new Array(O),k=0;k<O;k++)_[k]=arguments[k];u.apply(d,_)},x[g]||(x[g]={}),x[g][u]&&d.removeEventListener(g,x[g][u],c),x[g][u]=p,d.listeners=x}d.addEventListener(g,p,c)})}function ee(d,a,u,c){var p;return W(Event)&&W(CustomEvent)?p=new CustomEvent(a,Yt({bubbles:!0,cancelable:!0,detail:u},c)):(p=document.createEvent("CustomEvent"),p.initCustomEvent(a,!0,!0,u)),d.dispatchEvent(p)}function Sr(d){var a=d.getBoundingClientRect();return{left:a.left+(window.pageXOffset-document.documentElement.clientLeft),top:a.top+(window.pageYOffset-document.documentElement.clientTop)}}function Tt(d){var a=d.rotate,u=d.scaleX,c=d.scaleY,p=d.translateX,g=d.translateY,y=[];Z(p)&&p!==0&&y.push("translateX(".concat(p,"px)")),Z(g)&&g!==0&&y.push("translateY(".concat(g,"px)")),Z(a)&&a!==0&&y.push("rotate(".concat(a,"deg)")),Z(u)&&u!==1&&y.push("scaleX(".concat(u,")")),Z(c)&&c!==1&&y.push("scaleY(".concat(c,")"));var x=y.length?y.join(" "):"none";return{WebkitTransform:x,msTransform:x,transform:x}}function _r(d){return it(d)?decodeURIComponent(d.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var Gt=xe.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(xe.navigator.userAgent);function rn(d,a,u){var c=document.createElement("img");if(d.naturalWidth&&!Gt)return u(d.naturalWidth,d.naturalHeight),c;var p=document.body||document.documentElement;return c.onload=function(){u(c.width,c.height),Gt||p.removeChild(c)},$(a.inheritedAttributes,function(g){var y=d.getAttribute(g);y!==null&&c.setAttribute(g,y)}),c.src=d.src,Gt||(c.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",p.appendChild(c)),c}function St(d){switch(d){case 2:return pr;case 3:return dr;case 4:return hr;default:return""}}function Or(d){var a=Yt({},d),u=[];return $(d,function(c,p){delete a[p],$(a,function(g){var y=Math.abs(c.startX-g.startX),x=Math.abs(c.startY-g.startY),D=Math.abs(c.endX-g.endX),O=Math.abs(c.endY-g.endY),_=Math.sqrt(y*y+x*x),k=Math.sqrt(D*D+O*O),j=(k-_)/_;u.push(j)})}),u.sort(function(c,p){return Math.abs(c)<Math.abs(p)}),u[0]}function _t(d,a){var u=d.pageX,c=d.pageY,p={endX:u,endY:c};return a?p:Yt({timeStamp:Date.now(),startX:u,startY:c},p)}function Dr(d){var a=0,u=0,c=0;return $(d,function(p){var g=p.startX,y=p.startY;a+=g,u+=y,c+=1}),a/=c,u/=c,{pageX:a,pageY:u}}var kr={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var a=this.element.ownerDocument,u=a.body||a.documentElement;this.body=u,this.scrollbarWidth=window.innerWidth-a.documentElement.clientWidth,this.initialBodyPaddingRight=u.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(u).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var a=this.options,u=this.parent,c;a.inline&&(c={width:Math.max(u.offsetWidth,a.minWidth),height:Math.max(u.offsetHeight,a.minHeight)},this.parentData=c),(this.fulled||!c)&&(c=this.containerData),this.viewerData=ce({},c)},renderViewer:function(){this.options.inline&&!this.fulled&&ye(this.viewer,this.viewerData)},initList:function(){var a=this,u=this.element,c=this.options,p=this.list,g=[];p.innerHTML="",$(this.images,function(y,x){var D=y.src,O=y.alt||_r(D),_=a.getImageURL(y);if(D||_){var k=document.createElement("li"),j=document.createElement("img");$(c.inheritedAttributes,function(q){var B=y.getAttribute(q);B!==null&&j.setAttribute(q,B)}),c.navbar&&(j.src=D||_),j.alt=O,j.setAttribute("data-original-url",_||D),k.setAttribute("data-index",x),k.setAttribute("data-viewer-action","view"),k.setAttribute("role","button"),c.keyboard&&k.setAttribute("tabindex",0),k.appendChild(j),p.appendChild(k),g.push(k)}}),this.items=g,$(g,function(y){var x=y.firstElementChild,D,O;$t(x,"filled",!0),c.loading&&R(y,je),N(x,de,D=function(k){H(x,Ce,O),c.loading&&X(y,je),a.loadImage(k)},{once:!0}),N(x,Ce,O=function(){H(x,de,D),c.loading&&X(y,je)},{once:!0})}),c.transition&&N(u,tt,function(){R(p,J)},{once:!0})},renderList:function(){var a=this.index,u=this.items[a];if(u){var c=u.nextElementSibling,p=parseInt(window.getComputedStyle(c||u).marginLeft,10),g=u.offsetWidth,y=g+p;ye(this.list,ce({width:y*this.length-p},Tt({translateX:(this.viewerData.width-g)/2-y*a})))}},resetList:function(){var a=this.list;a.innerHTML="",X(a,J),ye(a,Tt({translateX:0}))},initImage:function(a){var u=this,c=this.options,p=this.image,g=this.viewerData,y=this.footer.offsetHeight,x=g.width,D=Math.max(g.height-y,y),O=this.imageData||{},_;this.imageInitializing={abort:function(){_.onload=null}},_=rn(p,c,function(k,j){var q=k/j,B=Math.max(0,Math.min(1,c.initialCoverage)),G=x,ie=D;u.imageInitializing=!1,D*q>x?ie=x/q:G=D*q,B=Z(B)?B:.9,G=Math.min(G*B,k),ie=Math.min(ie*B,j);var re=(x-G)/2,Q=(D-ie)/2,U={left:re,top:Q,x:re,y:Q,width:G,height:ie,oldRatio:1,ratio:G/k,aspectRatio:q,naturalWidth:k,naturalHeight:j},ne=ce({},U);c.rotatable&&(U.rotate=O.rotate||0,ne.rotate=0),c.scalable&&(U.scaleX=O.scaleX||1,U.scaleY=O.scaleY||1,ne.scaleX=1,ne.scaleY=1),u.imageData=U,u.initialImageData=ne,a&&a()})},renderImage:function(a){var u=this,c=this.image,p=this.imageData;if(ye(c,ce({width:p.width,height:p.height,marginLeft:p.x,marginTop:p.y},Tt(p))),a)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&Be(c,J)){var g=function(){u.imageRendering=!1,a()};this.imageRendering={abort:function(){H(c,me,g)}},N(c,me,g,{once:!0})}else a()},resetImage:function(){var a=this.image;a&&(this.viewing&&this.viewing.abort(),a.parentNode.removeChild(a),this.image=null,this.title.innerHTML="")}},Ir={bind:function(){var a=this.options,u=this.viewer,c=this.canvas,p=this.element.ownerDocument;N(u,Xe,this.onClick=this.click.bind(this)),N(u,zi,this.onDragStart=this.dragstart.bind(this)),N(c,Ri,this.onPointerDown=this.pointerdown.bind(this)),N(p,Ni,this.onPointerMove=this.pointermove.bind(this)),N(p,Fi,this.onPointerUp=this.pointerup.bind(this)),N(p,Ci,this.onKeyDown=this.keydown.bind(this)),N(window,Li,this.onResize=this.resize.bind(this)),a.zoomable&&a.zoomOnWheel&&N(u,Vi,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleOnDblclick&&N(c,qt,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var a=this.options,u=this.viewer,c=this.canvas,p=this.element.ownerDocument;H(u,Xe,this.onClick),H(u,zi,this.onDragStart),H(c,Ri,this.onPointerDown),H(p,Ni,this.onPointerMove),H(p,Fi,this.onPointerUp),H(p,Ci,this.onKeyDown),H(window,Li,this.onResize),a.zoomable&&a.zoomOnWheel&&H(u,Vi,this.onWheel,{passive:!1,capture:!0}),a.toggleOnDblclick&&H(c,qt,this.onDblclick)}},Pr={click:function(a){var u=this.options,c=this.imageData,p=a.target,g=Ue(p,xt);switch(!g&&p.localName==="img"&&p.parentElement.localName==="li"&&(p=p.parentElement,g=Ue(p,xt)),Ve&&a.isTrusted&&p===this.canvas&&clearTimeout(this.clickCanvasTimeout),g){case"mix":this.played?this.stop():u.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Ue(p,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(u.loop);break;case"play":this.play(u.fullscreen);break;case"next":this.next(u.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-c.scaleX||-1);break;case"flip-vertical":this.scaleY(-c.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(a){a.preventDefault(),this.viewed&&a.target===this.image&&(Ve&&a.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(a.isTrusted?a:a.detail&&a.detail.originalEvent))},load:function(){var a=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var u=this.element,c=this.options,p=this.image,g=this.index,y=this.viewerData;X(p,et),c.loading&&X(this.canvas,je),p.style.cssText="height:0;"+"margin-left:".concat(y.width/2,"px;")+"margin-top:".concat(y.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){nt(p,vr,c.movable),nt(p,J,c.transition),a.renderImage(function(){a.viewed=!0,a.viewing=!1,W(c.viewed)&&N(u,tt,c.viewed,{once:!0}),ee(u,tt,{originalImage:a.images[g],index:g,image:p},{cancelable:!1})})})},loadImage:function(a){var u=a.target,c=u.parentNode,p=c.offsetWidth||30,g=c.offsetHeight||50,y=!!Ue(u,"filled");rn(u,this.options,function(x,D){var O=x/D,_=p,k=g;g*O>p?y?_=g*O:k=p/O:y?k=p/O:_=g*O,ye(u,ce({width:_,height:k},Tt({translateX:(p-_)/2,translateY:(g-k)/2})))})},keydown:function(a){var u=this.options;if(u.keyboard){var c=a.keyCode||a.which||a.charCode;switch(c){case 13:this.viewer.contains(a.target)&&this.click(a);break}if(this.fulled)switch(c){case 27:this.played?this.stop():u.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(u.loop);break;case 38:a.preventDefault(),this.zoom(u.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(u.loop);break;case 40:a.preventDefault(),this.zoom(-u.zoomRatio,!0);break;case 48:case 49:a.ctrlKey&&(a.preventDefault(),this.toggle());break}}},dragstart:function(a){a.target.localName==="img"&&a.preventDefault()},pointerdown:function(a){var u=this.options,c=this.pointers,p=a.buttons,g=a.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||(a.type==="mousedown"||a.type==="pointerdown"&&a.pointerType==="mouse")&&(Z(p)&&p!==1||Z(g)&&g!==0||a.ctrlKey))){a.preventDefault(),a.changedTouches?$(a.changedTouches,function(x){c[x.identifier]=_t(x)}):c[a.pointerId||0]=_t(a);var y=u.movable?yt:!1;u.zoomOnTouch&&u.zoomable&&Object.keys(c).length>1?y=Qe:u.slideOnTouch&&(a.pointerType==="touch"||a.type==="touchstart")&&this.isSwitchable()&&(y=Ii),u.transition&&(y===yt||y===Qe)&&X(this.image,J),this.action=y}},pointermove:function(a){var u=this.pointers,c=this.action;!this.viewed||!c||(a.preventDefault(),a.changedTouches?$(a.changedTouches,function(p){ce(u[p.identifier]||{},_t(p,!0))}):ce(u[a.pointerId||0]||{},_t(a,!0)),this.change(a))},pointerup:function(a){var u=this,c=this.options,p=this.action,g=this.pointers,y;a.changedTouches?$(a.changedTouches,function(x){y=g[x.identifier],delete g[x.identifier]}):(y=g[a.pointerId||0],delete g[a.pointerId||0]),p&&(a.preventDefault(),c.transition&&(p===yt||p===Qe)&&R(this.image,J),this.action=!1,Ve&&p!==Qe&&y&&Date.now()-y.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),c.toggleOnDblclick&&this.viewed&&a.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){ee(u.image,qt,{originalEvent:a})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){u.imageClicked=!1},500)):(this.imageClicked=!1,c.backdrop&&c.backdrop!=="static"&&a.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){ee(u.canvas,Xe,{originalEvent:a})},50)))))},resize:function(){var a=this;if(!(!this.isShown||this.hiding)&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){a.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)){this.stop();return}$(this.player.getElementsByTagName("img"),function(u){N(u,de,a.loadImage.bind(a),{once:!0}),ee(u,de)})}},wheel:function(a){var u=this;if(this.viewed&&(a.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){u.wheeling=!1},50);var c=Number(this.options.zoomRatio)||.1,p=1;a.deltaY?p=a.deltaY>0?1:-1:a.wheelDelta?p=-a.wheelDelta/120:a.detail&&(p=a.detail>0?1:-1),this.zoom(-p*c,!0,null,a)}}},Ar={show:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,u=this.element,c=this.options;if(c.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(a),this;if(W(c.show)&&N(u,Yi,c.show,{once:!0}),ee(u,Yi)===!1||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var p=this.viewer;if(X(p,Me),p.setAttribute("role","dialog"),p.setAttribute("aria-labelledby",this.title.id),p.setAttribute("aria-modal",!0),p.removeAttribute("aria-hidden"),c.transition&&!a){var g=this.shown.bind(this);this.transitioning={abort:function(){H(p,me,g),X(p,he)}},R(p,J),p.initialOffsetWidth=p.offsetWidth,N(p,me,g,{once:!0}),R(p,he)}else R(p,he),this.shown();return this},hide:function(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,c=this.element,p=this.options;if(p.inline||this.hiding||!(this.isShown||this.showing))return this;if(W(p.hide)&&N(c,Wi,p.hide,{once:!0}),ee(c,Wi)===!1)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var g=this.viewer,y=this.image,x=function(){X(g,he),a.hidden()};if(p.transition&&!u){var D=function(k){k&&k.target===g&&(H(g,me,D),a.hidden())},O=function(){Be(g,J)?(N(g,me,D),X(g,he)):x()};this.transitioning={abort:function(){a.viewed&&Be(y,J)?H(y,me,O):Be(g,J)&&H(g,me,D)}},this.viewed&&Be(y,J)?(N(y,me,O,{once:!0}),this.zoomTo(0,!1,null,null,!0)):O()}else x();return this},view:function(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.initialViewIndex;if(u=Number(u)||0,this.hiding||this.played||u<0||u>=this.length||this.viewed&&u===this.index)return this;if(!this.isShown)return this.index=u,this.show();this.viewing&&this.viewing.abort();var c=this.element,p=this.options,g=this.title,y=this.canvas,x=this.items[u],D=x.querySelector("img"),O=Ue(D,"originalUrl"),_=D.getAttribute("alt"),k=document.createElement("img");if($(p.inheritedAttributes,function(ie){var re=D.getAttribute(ie);re!==null&&k.setAttribute(ie,re)}),k.src=O,k.alt=_,W(p.view)&&N(c,qi,p.view,{once:!0}),ee(c,qi,{originalImage:this.images[u],index:u,image:k})===!1||!this.isShown||this.hiding||this.played)return this;var j=this.items[this.index];j&&(X(j,bt),j.removeAttribute("aria-selected")),R(x,bt),x.setAttribute("aria-selected",!0),p.focus&&x.focus(),this.image=k,this.viewed=!1,this.index=u,this.imageData={},R(k,et),p.loading&&R(y,je),y.innerHTML="",y.appendChild(k),this.renderList(),g.innerHTML="";var q=function(){var re=a.imageData,Q=Array.isArray(p.title)?p.title[1]:p.title;g.innerHTML=Er(W(Q)?Q.call(a,k,re):"".concat(_," (").concat(re.naturalWidth," × ").concat(re.naturalHeight,")"))},B,G;return N(c,tt,q,{once:!0}),this.viewing={abort:function(){H(c,tt,q),k.complete?a.imageRendering?a.imageRendering.abort():a.imageInitializing&&a.imageInitializing.abort():(k.src="",H(k,de,B),a.timeout&&clearTimeout(a.timeout))}},k.complete?this.load():(N(k,de,B=function(){H(k,Ce,G),a.load()},{once:!0}),N(k,Ce,G=function(){H(k,de,B),a.timeout&&(clearTimeout(a.timeout),a.timeout=!1),X(k,et),p.loading&&X(a.canvas,je)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){X(k,et),a.timeout=!1},1e3)),this},prev:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,u=this.index-1;return u<0&&(u=a?this.length-1:0),this.view(u),this},next:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,u=this.length-1,c=this.index+1;return c>u&&(c=a?0:u),this.view(c),this},move:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a,c=this.imageData;return this.moveTo(We(a)?a:c.x+Number(a),We(u)?u:c.y+Number(u)),this},moveTo:function(a){var u=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,g=this.element,y=this.options,x=this.imageData;if(a=Number(a),c=Number(c),this.viewed&&!this.played&&y.movable){var D=x.x,O=x.y,_=!1;if(Z(a)?_=!0:a=D,Z(c)?_=!0:c=O,_){if(W(y.move)&&N(g,Bi,y.move,{once:!0}),ee(g,Bi,{x:a,y:c,oldX:D,oldY:O,originalEvent:p})===!1)return this;x.x=a,x.y=c,x.left=a,x.top=c,this.moving=!0,this.renderImage(function(){u.moving=!1,W(y.moved)&&N(g,Ui,y.moved,{once:!0}),ee(g,Ui,{x:a,y:c,oldX:D,oldY:O,originalEvent:p},{cancelable:!1})})}}return this},rotate:function(a){return this.rotateTo((this.imageData.rotate||0)+Number(a)),this},rotateTo:function(a){var u=this,c=this.element,p=this.options,g=this.imageData;if(a=Number(a),Z(a)&&this.viewed&&!this.played&&p.rotatable){var y=g.rotate;if(W(p.rotate)&&N(c,$i,p.rotate,{once:!0}),ee(c,$i,{degree:a,oldDegree:y})===!1)return this;g.rotate=a,this.rotating=!0,this.renderImage(function(){u.rotating=!1,W(p.rotated)&&N(c,Gi,p.rotated,{once:!0}),ee(c,Gi,{degree:a,oldDegree:y},{cancelable:!1})})}return this},scaleX:function(a){return this.scale(a,this.imageData.scaleY),this},scaleY:function(a){return this.scale(this.imageData.scaleX,a),this},scale:function(a){var u=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a,p=this.element,g=this.options,y=this.imageData;if(a=Number(a),c=Number(c),this.viewed&&!this.played&&g.scalable){var x=y.scaleX,D=y.scaleY,O=!1;if(Z(a)?O=!0:a=x,Z(c)?O=!0:c=D,O){if(W(g.scale)&&N(p,Ki,g.scale,{once:!0}),ee(p,Ki,{scaleX:a,scaleY:c,oldScaleX:x,oldScaleY:D})===!1)return this;y.scaleX=a,y.scaleY=c,this.scaling=!0,this.renderImage(function(){u.scaling=!1,W(g.scaled)&&N(p,Zi,g.scaled,{once:!0}),ee(p,Zi,{scaleX:a,scaleY:c,oldScaleX:x,oldScaleY:D},{cancelable:!1})})}}return this},zoom:function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,g=this.imageData;return a=Number(a),a<0?a=1/(1-a):a=1+a,this.zoomTo(g.width*a/g.naturalWidth,u,c,p),this},zoomTo:function(a){var u=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,y=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,x=this.element,D=this.options,O=this.pointers,_=this.imageData,k=_.x,j=_.y,q=_.width,B=_.height,G=_.naturalWidth,ie=_.naturalHeight;if(a=Math.max(0,a),Z(a)&&this.viewed&&!this.played&&(y||D.zoomable)){if(!y){var re=Math.max(.01,D.minZoomRatio),Q=Math.min(100,D.maxZoomRatio);a=Math.min(Math.max(a,re),Q)}if(g)switch(g.type){case"wheel":D.zoomRatio>=.055&&a>.95&&a<1.05&&(a=1);break;case"pointermove":case"touchmove":case"mousemove":a>.99&&a<1.01&&(a=1);break}var U=G*a,ne=ie*a,pe=U-q,ue=ne-B,w=_.ratio;if(W(D.zoom)&&N(x,Ji,D.zoom,{once:!0}),ee(x,Ji,{ratio:a,oldRatio:w,originalEvent:g})===!1)return this;if(this.zooming=!0,g){var Ee=Sr(this.viewer),Te=O&&Object.keys(O).length>0?Dr(O):{pageX:g.pageX,pageY:g.pageY};_.x-=pe*((Te.pageX-Ee.left-k)/q),_.y-=ue*((Te.pageY-Ee.top-j)/B)}else qe(p)&&Z(p.x)&&Z(p.y)?(_.x-=pe*((p.x-k)/q),_.y-=ue*((p.y-j)/B)):(_.x-=pe/2,_.y-=ue/2);_.left=_.x,_.top=_.y,_.width=U,_.height=ne,_.oldRatio=w,_.ratio=a,this.renderImage(function(){u.zooming=!1,W(D.zoomed)&&N(x,Qi,D.zoomed,{once:!0}),ee(x,Qi,{ratio:a,oldRatio:w,originalEvent:g},{cancelable:!1})}),c&&this.tooltip()}return this},play:function(){var a=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.isShown||this.played)return this;var c=this.element,p=this.options;if(W(p.play)&&N(c,en,p.play,{once:!0}),ee(c,en)===!1)return this;var g=this.player,y=this.loadImage.bind(this),x=[],D=0,O=0;if(this.played=!0,this.onLoadWhenPlay=y,u&&this.requestFullscreen(u),R(g,Ye),$(this.items,function(j,q){var B=j.querySelector("img"),G=document.createElement("img");G.src=Ue(B,"originalUrl"),G.alt=B.getAttribute("alt"),G.referrerPolicy=B.referrerPolicy,D+=1,R(G,wt),nt(G,J,p.transition),Be(j,bt)&&(R(G,he),O=q),x.push(G),N(G,de,y,{once:!0}),g.appendChild(G)}),Z(p.interval)&&p.interval>0){var _=function(){clearTimeout(a.playing.timeout),X(x[O],he),O-=1,O=O>=0?O:D-1,R(x[O],he),a.playing.timeout=setTimeout(_,p.interval)},k=function(){clearTimeout(a.playing.timeout),X(x[O],he),O+=1,O=O<D?O:0,R(x[O],he),a.playing.timeout=setTimeout(k,p.interval)};D>1&&(this.playing={prev:_,next:k,timeout:setTimeout(k,p.interval)})}return this},stop:function(){var a=this;if(!this.played)return this;var u=this.element,c=this.options;if(W(c.stop)&&N(u,tn,c.stop,{once:!0}),ee(u,tn)===!1)return this;var p=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,$(p.getElementsByTagName("img"),function(g){H(g,de,a.onLoadWhenPlay)}),X(p,Ye),p.innerHTML="",this.exitFullscreen(),this},full:function(){var a=this,u=this.options,c=this.viewer,p=this.image,g=this.list;return!this.isShown||this.played||this.fulled||!u.inline?this:(this.fulled=!0,this.open(),R(this.button,Pi),u.transition&&(X(g,J),this.viewed&&X(p,J)),R(c,Ht),c.setAttribute("role","dialog"),c.setAttribute("aria-labelledby",this.title.id),c.setAttribute("aria-modal",!0),c.removeAttribute("style"),ye(c,{zIndex:u.zIndex}),u.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=ce({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){a.renderImage(function(){u.transition&&setTimeout(function(){R(p,J),R(g,J)},0)})}),this)},exit:function(){var a=this,u=this.options,c=this.viewer,p=this.image,g=this.list;return!this.isShown||this.played||!this.fulled||!u.inline?this:(this.fulled=!1,this.close(),X(this.button,Pi),u.transition&&(X(g,J),this.viewed&&X(p,J)),u.focus&&this.clearEnforceFocus(),c.removeAttribute("role"),c.removeAttribute("aria-labelledby"),c.removeAttribute("aria-modal"),X(c,Ht),ye(c,{zIndex:u.zIndexInline}),this.viewerData=ce({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){a.renderImage(function(){u.transition&&setTimeout(function(){R(p,J),R(g,J)},0)})}),this)},tooltip:function(){var a=this,u=this.options,c=this.tooltipBox,p=this.imageData;return!this.viewed||this.played||!u.tooltip?this:(c.textContent="".concat(Math.round(p.ratio*100),"%"),this.tooltipping?clearTimeout(this.tooltipping):u.transition?(this.fading&&ee(c,me),R(c,Ye),R(c,wt),R(c,J),c.removeAttribute("aria-hidden"),c.initialOffsetWidth=c.offsetWidth,R(c,he)):(R(c,Ye),c.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){u.transition?(N(c,me,function(){X(c,Ye),X(c,wt),X(c,J),c.setAttribute("aria-hidden",!0),a.fading=!1},{once:!0}),X(c,he),a.fading=!0):(X(c,Ye),c.setAttribute("aria-hidden",!0)),a.tooltipping=!1},1e3),this)},toggle:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.imageData.ratio===1?this.zoomTo(this.imageData.oldRatio,!0,null,a):this.zoomTo(1,!0,null,a),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=ce({},this.initialImageData),this.renderImage()),this},update:function(){var a=this,u=this.element,c=this.options,p=this.isImg;if(p&&!u.parentNode)return this.destroy();var g=[];if($(p?[u]:u.querySelectorAll("img"),function(O){W(c.filter)?c.filter.call(a,O)&&g.push(O):a.getImageURL(O)&&g.push(O)}),!g.length)return this;if(this.images=g,this.length=g.length,this.ready){var y=[];if($(this.items,function(O,_){var k=O.querySelector("img"),j=g[_];j&&k?(j.src!==k.src||j.alt!==k.alt)&&y.push(_):y.push(_)}),ye(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var x=y.indexOf(this.index);if(x>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-x,this.length-1),0));else{var D=this.items[this.index];R(D,bt),D.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var a=this.element,u=this.options;return a[V]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),u.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):u.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),u.inline||H(a,Xe,this.onStart),a[V]=void 0,this):this}},zr={getImageURL:function(a){var u=this.options.url;return it(u)?u=a.getAttribute(u):W(u)?u=u.call(this,a):u="",u},enforceFocus:function(){var a=this;this.clearEnforceFocus(),N(document,Mi,this.onFocusin=function(u){var c=a.viewer,p=u.target;if(!(p===document||p===c||c.contains(p))){for(;p;){if(p.getAttribute("tabindex")!==null||p.getAttribute("aria-modal")==="true")return;p=p.parentElement}c.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(H(document,Mi,this.onFocusin),this.onFocusin=null)},open:function(){var a=this.body;R(a,Ai),this.scrollbarWidth>0&&(a.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var a=this.body;X(a,Ai),this.scrollbarWidth>0&&(a.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var a=this.element,u=this.options,c=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,u.focus&&(c.focus(),this.enforceFocus()),W(u.shown)&&N(a,Xi,u.shown,{once:!0}),ee(a,Xi)!==!1&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var a=this.element,u=this.options,c=this.viewer;u.fucus&&this.clearEnforceFocus(),this.close(),this.unbind(),R(c,Me),c.removeAttribute("role"),c.removeAttribute("aria-labelledby"),c.removeAttribute("aria-modal"),c.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(W(u.hidden)&&N(a,Hi,u.hidden,{once:!0}),ee(a,Hi,null,{cancelable:!1}))},requestFullscreen:function(a){var u=this.element.ownerDocument;if(this.fulled&&!(u.fullscreenElement||u.webkitFullscreenElement||u.mozFullScreenElement||u.msFullscreenElement)){var c=u.documentElement;c.requestFullscreen?qe(a)?c.requestFullscreen(a):c.requestFullscreen():c.webkitRequestFullscreen?c.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):c.mozRequestFullScreen?c.mozRequestFullScreen():c.msRequestFullscreen&&c.msRequestFullscreen()}},exitFullscreen:function(){var a=this.element.ownerDocument;this.fulled&&(a.fullscreenElement||a.webkitFullscreenElement||a.mozFullScreenElement||a.msFullscreenElement)&&(a.exitFullscreen?a.exitFullscreen():a.webkitExitFullscreen?a.webkitExitFullscreen():a.mozCancelFullScreen?a.mozCancelFullScreen():a.msExitFullscreen&&a.msExitFullscreen())},change:function(a){var u=this.options,c=this.pointers,p=c[Object.keys(c)[0]];if(p){var g=p.endX-p.startX,y=p.endY-p.startY;switch(this.action){case yt:(g!==0||y!==0)&&(this.pointerMoved=!0,this.move(g,y,a));break;case Qe:this.zoom(Or(c),!1,null,a);break;case Ii:{this.action="switched";var x=Math.abs(g);x>1&&x>Math.abs(y)&&(this.pointers={},g>1?this.prev(u.loop):g<-1&&this.next(u.loop));break}}$(c,function(D){D.startX=D.endX,D.startY=D.endY})}},isSwitchable:function(){var a=this.imageData,u=this.viewerData;return this.length>1&&a.x>=0&&a.y>=0&&a.width<=u.width&&a.height<=u.height}},Mr=xe.Viewer,Cr=(function(d){return function(){return d+=1,d}})(-1),Kt=(function(){function d(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(or(this,d),!a||a.nodeType!==1)throw new Error("The first argument is required and must be an element.");this.element=a,this.options=ce({},ki,qe(u)&&u),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=Cr(),this.init()}return ar(d,[{key:"init",value:function(){var u=this,c=this.element,p=this.options;if(!c[V]){c[V]=this,p.focus&&!p.keyboard&&(p.focus=!1);var g=c.localName==="img",y=[];if($(g?[c]:c.querySelectorAll("img"),function(O){W(p.filter)?p.filter.call(u,O)&&y.push(O):u.getImageURL(O)&&y.push(O)}),this.isImg=g,this.length=y.length,this.images=y,this.initBody(),We(document.createElement(V).style.transition)&&(p.transition=!1),p.inline){var x=0,D=function(){if(x+=1,x===u.length){var _;u.initializing=!1,u.delaying={abort:function(){clearTimeout(_)}},_=setTimeout(function(){u.delaying=!1,u.build()},0)}};this.initializing={abort:function(){$(y,function(_){_.complete||(H(_,de,D),H(_,Ce,D))})}},$(y,function(O){if(O.complete)D();else{var _,k;N(O,de,_=function(){H(O,Ce,k),D()},{once:!0}),N(O,Ce,k=function(){H(O,de,_),D()},{once:!0})}})}else N(c,Xe,this.onStart=function(O){var _=O.target;_.localName==="img"&&(!W(p.filter)||p.filter.call(u,_))&&u.view(u.images.indexOf(_))})}}},{key:"build",value:function(){if(!this.ready){var u=this.element,c=this.options,p=u.parentNode,g=document.createElement("div");g.innerHTML=cr;var y=g.querySelector(".".concat(V,"-container")),x=y.querySelector(".".concat(V,"-title")),D=y.querySelector(".".concat(V,"-toolbar")),O=y.querySelector(".".concat(V,"-navbar")),_=y.querySelector(".".concat(V,"-button")),k=y.querySelector(".".concat(V,"-canvas"));if(this.parent=p,this.viewer=y,this.title=x,this.toolbar=D,this.navbar=O,this.button=_,this.canvas=k,this.footer=y.querySelector(".".concat(V,"-footer")),this.tooltipBox=y.querySelector(".".concat(V,"-tooltip")),this.player=y.querySelector(".".concat(V,"-player")),this.list=y.querySelector(".".concat(V,"-list")),y.id="".concat(V).concat(this.id),x.id="".concat(V,"Title").concat(this.id),R(x,c.title?St(Array.isArray(c.title)?c.title[0]:c.title):Me),R(O,c.navbar?St(c.navbar):Me),nt(_,Me,!c.button),c.keyboard&&_.setAttribute("tabindex",0),c.backdrop&&(R(y,"".concat(V,"-backdrop")),!c.inline&&c.backdrop!=="static"&&$t(k,xt,"hide")),it(c.className)&&c.className&&c.className.split(Bt).forEach(function(U){R(y,U)}),c.toolbar){var j=document.createElement("ul"),q=qe(c.toolbar),B=Et.slice(0,3),G=Et.slice(7,9),ie=Et.slice(9);q||R(D,St(c.toolbar)),$(q?c.toolbar:Et,function(U,ne){var pe=q&&qe(U),ue=q?Ut(ne):U,w=pe&&!We(U.show)?U.show:U;if(!(!w||!c.zoomable&&B.indexOf(ue)!==-1||!c.rotatable&&G.indexOf(ue)!==-1||!c.scalable&&ie.indexOf(ue)!==-1)){var Ee=pe&&!We(U.size)?U.size:U,Te=pe&&!We(U.click)?U.click:U,le=document.createElement("li");c.keyboard&&le.setAttribute("tabindex",0),le.setAttribute("role","button"),R(le,"".concat(V,"-").concat(ue)),W(Te)||$t(le,xt,ue),Z(w)&&R(le,St(w)),["small","large"].indexOf(Ee)!==-1?R(le,"".concat(V,"-").concat(Ee)):ue==="play"&&R(le,"".concat(V,"-large")),W(Te)&&N(le,Xe,Te),j.appendChild(le)}}),D.appendChild(j)}else R(D,Me);if(!c.rotatable){var re=D.querySelectorAll('li[class*="rotate"]');R(re,et),$(re,function(U){D.appendChild(U)})}if(c.inline)R(_,fr),ye(y,{zIndex:c.zIndexInline}),window.getComputedStyle(p).position==="static"&&ye(p,{position:"relative"}),p.insertBefore(y,u.nextSibling);else{R(_,ur),R(y,Ht),R(y,wt),R(y,Me),ye(y,{zIndex:c.zIndex});var Q=c.container;it(Q)&&(Q=u.ownerDocument.querySelector(Q)),Q||(Q=this.body),Q.appendChild(y)}if(c.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,W(c.ready)&&N(u,ji,c.ready,{once:!0}),ee(u,ji)===!1){this.ready=!1;return}this.ready&&c.inline&&this.view(this.index)}}}],[{key:"noConflict",value:function(){return window.Viewer=Mr,d}},{key:"setDefaults",value:function(u){ce(ki,qe(u)&&u)}}])})();ce(Kt.prototype,kr,Ir,Pr,Ar,zr);const Rr=(d,a)=>{const u=d.__vccOpts||d;for(const[c,p]of a)u[c]=p;return u},Nr={name:"boka-human-v2",props:{token:{type:String,default:""},product:{type:String,default:""},subCustType:{type:String,default:""},source:{type:String,default:""}},computed:{host(){return"https://human.shboka.com"},src(){let{token:d,product:a,subCustType:u}=this;return`${this.host}?token=${d}&product=${a}&subCustType=${u}&human=1&isIFrame=true&time=${new Date().getTime()}`}},data(){return{visible:!1}},mounted(){this.icon(),this.chatMainInitDrag(),window.humanFunction={showImg:this.showImg,showVideo:this.showVideo};let d=document.querySelector("#iframe");d.onload=function(){d.contentWindow.postMessage({from:"human",info:{isFrame:!0}},"*")},window.addEventListener("message",a=>{let{origin:u,data:c}=a;if(u==this.host&&c.from=="humanFrame"){console.log("外部[收到]了===>>>>",c.info);let{info:p}=c,{type:g,data:y}=p;g=="img"&&this.showImg(y)}})},methods:{showImg(d,a){let u=new Image;u.src=d,new Kt(u,{inline:!1,navbar:!1,title:!1}).show()},showVideo(d,a){const u=document.createElement("video");u.src=d,u.controls=!0,new Kt(u,{inline:!1,navbar:!1,title:!1}).show()},icon(){const d=document.body;let a=d.clientWidth-40,u=d.clientHeight-150,c=document.querySelector("#humanEnterIcon");c.style.transform=`translate(${a}px, ${u}px)`,c.setAttribute("data-x",a),c.setAttribute("data-y",u),gt(".humanEnterIcon").on("tap",function(p){p.preventDefault()}).draggable({inertia:!0,modifiers:[gt.modifiers.restrictRect({restriction:"body",endOnly:!0})],autoScroll:!0,listeners:{move:p=>{var g=p.target,y=(parseFloat(g.getAttribute("data-x"))||0)+p.dx,x=(parseFloat(g.getAttribute("data-y"))||0)+p.dy;x<0&&(x=0),x>d.clientHeight-g.offsetHeight&&(x=d.clientHeight-g.offsetHeight),g.style.transform=`translate(${y}px, ${x}px)`,g.setAttribute("data-x",y),g.setAttribute("data-y",x)},end(p){var g=p.target,y=parseFloat(g.getAttribute("data-x"))||0,x=parseFloat(g.getAttribute("data-y"))||0;const D=d.clientWidth/2,O=0,_=d.clientWidth-g.offsetWidth;y+g.offsetWidth/2<D?y=O:y=_,g.setAttribute("data-x",y),g.setAttribute("data-y",x),g.style.transform=`translate(${y}px, ${x}px)`}}})},chatMainInitDrag(){gt(".humanMainView").draggable({inertia:!0,modifiers:[gt.modifiers.restrictRect({restriction:"body",endOnly:!0})],autoScroll:!0,listeners:{move:d=>{var a=d.target,u=(parseFloat(a.getAttribute("data-x"))||0)+d.dx,c=(parseFloat(a.getAttribute("data-y"))||0)+d.dy;a.style.transform="translate("+u+"px, "+c+"px)",a.setAttribute("data-x",u),a.setAttribute("data-y",c)},end(d){}}})}}},Fr={class:"boka-human-v2"},Lr={class:"humanMainView"},Vr={class:"humanMainHeader my-dialog__header"},jr={class:"humanMainHeaderRight"},Yr=["src"];function Xr(d,a,u,c,p,g){return te.openBlock(),te.createElementBlock("div",Fr,[te.createElementVNode("div",{class:"humanEnterIcon",id:"humanEnterIcon",onClick:a[0]||(a[0]=y=>p.visible=!p.visible)},[...a[2]||(a[2]=[te.createElementVNode("svg",{t:"1755741820144",viewBox:"0 0 1051 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1470",width:"32",height:"32"},[te.createElementVNode("path",{d:"M135.73310782 546.11486502v91.39864856a68.41216214 68.41216214 0 0 0 136.82432428 0v-91.39864856a68.41216214 68.41216214 0 0 0-136.82432428 0z m628.77618292 174.3141893A113.58699363 113.58699363 0 0 1 728.63851358 637.51351358v-91.39864856A114.02026996 114.02026996 0 0 1 841.86064218 432.18581069C830.16216214 266.51435782 692.03800637 135.73310782 523.40202716 135.73310782 354.74324363 135.73310782 216.64189218 266.51435782 204.94341214 432.18581069A114.0886821 114.0886821 0 0 1 318.16554074 546.11486502v91.39864856a114.02026996 114.02026996 0 0 1-228.04054074 0v-91.39864856a114.02026996 114.02026996 0 0 1 68.64020288-104.53378353C165.83445926 246.28716214 326.375 90.125 523.40202716 90.125s357.5675679 156.16216214 364.63682428 351.45608149A114.0886821 114.0886821 0 0 1 956.67905432 546.11486502v91.39864856a114.02026996 114.02026996 0 0 1-152.26266934 107.3386821 387.89695926 387.89695926 0 0 1-155.61486503 99.8817572A79.76858148 79.76858148 0 0 1 568.78209424 922.47297284h-68.00168848c-44.23986502 0-80.01942573-35.57432428-80.01942572-79.8141893 0-44.17145288 35.66554074-79.81418931 80.04222922-79.8141893h67.95608148c28.80151995 0 54 15.05067573 68.09290494 37.74071008a342.17483148 342.17483148 0 0 0 127.63429074-80.15625zM774.2466214 546.11486502v91.39864856a68.41216214 68.41216214 0 0 0 136.82432428 0v-91.39864856a68.41216214 68.41216214 0 0 0-136.82432427 0zM500.82601358 876.86486502h67.95608066c19.20101358 0 34.43412141-15.23310782 34.43412222-34.20608148 0-18.99577716-15.30151996-34.20608149-34.43412222-34.20608066h-67.95608066c-19.20101358 0-34.43412141 15.23310782-34.4341214 34.20608066 0 18.99577716 15.30151996 34.20608149 34.4341214 34.20608148z","p-id":"1471"})],-1)])]),te.withDirectives(te.createElementVNode("div",Lr,[te.createElementVNode("div",Vr,[a[3]||(a[3]=te.createElementVNode("div",{class:"humanMainHeaderLeft"},null,-1)),a[4]||(a[4]=te.createElementVNode("div",{class:"humanMainHeaderCenter"},"客服",-1)),te.createElementVNode("div",jr,[te.createElementVNode("span",{onClick:a[1]||(a[1]=y=>p.visible=!p.visible)},"关闭")])]),te.createElementVNode("iframe",{id:"iframe",src:g.src,frameborder:"0",allowfullscreen:""},null,8,Yr)],512),[[te.vShow,p.visible]])])}return Rr(Nr,[["render",Xr],["__scopeId","data-v-6ed69e6f"]])}));
|
package/index.html
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Vite App</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="src/demo/main.js"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "boka-human-cliend-v3",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"main": "dist/boka-human-v3.umd.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"build": "vite build",
|
|
8
|
+
"release": "npm version patch && npm publish",
|
|
9
|
+
"preview": "vite preview"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"vue": "^3.5.18"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
16
|
+
"vite": "^7.0.6",
|
|
17
|
+
"vite-plugin-vue-devtools": "^8.0.0",
|
|
18
|
+
"interactjs": "^1.10.27",
|
|
19
|
+
"viewerjs": "^1.11.7"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/demo/App.vue
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app">
|
|
3
|
+
<BokaHuman :token="'Bearer 5254e164ed5786d6a91eb2c1ba338069'" :product="'manageCenterPlus'" :sub-cust-type="''"/>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import BokaHumanRaw from '../../../v2/src/BokaHumanV2.vue'
|
|
9
|
+
const BokaHuman = BokaHumanRaw
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'App',
|
|
13
|
+
components: {
|
|
14
|
+
BokaHuman
|
|
15
|
+
},
|
|
16
|
+
mounted() {
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
<style>
|
|
22
|
+
body{
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
#app{
|
|
27
|
+
width: 100vw;
|
|
28
|
+
height: 100vh;
|
|
29
|
+
}
|
|
30
|
+
</style>
|
package/src/demo/main.js
ADDED
package/src/index.js
ADDED
package/vite.config.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {defineConfig} from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
4
|
+
|
|
5
|
+
// https://vite.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
vue(),
|
|
9
|
+
vueDevTools(),
|
|
10
|
+
],
|
|
11
|
+
build: {
|
|
12
|
+
lib: {
|
|
13
|
+
entry: 'src/index.js',
|
|
14
|
+
name: 'boka-human-v3',
|
|
15
|
+
formats:["umd"],
|
|
16
|
+
fileName: (format) => `boka-human-v3.${format}.js`
|
|
17
|
+
},
|
|
18
|
+
rollupOptions: {
|
|
19
|
+
external: ['vue'],
|
|
20
|
+
output: {
|
|
21
|
+
globals: {
|
|
22
|
+
vue: 'Vue'
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
})
|