boka-human-cliend-v3 0.0.8 → 0.0.10

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.
@@ -6,4 +6,4 @@
6
6
  * Released under the MIT license
7
7
  *
8
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-688b4a9e]{overflow:hidden;position:fixed;top:0;left:0;z-index:999}.humanEnterIcon[data-v-688b4a9e]{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-688b4a9e]{width:100%;height:100%;fill:#fff}.humanEnterIcon.unreadCount[data-v-688b4a9e]{background-color:red;color:#fff;line-height:24px;font-size:14px;font-weight:700}.humanMainView[data-v-688b4a9e]{position:fixed;min-width:420px;min-height:400px;height:80vh;border:1px solid #ccc}.humanMainView .humanMainHeader[data-v-688b4a9e]{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-688b4a9e]{text-align:right}.humanMainView .humanMainHeader .humanMainHeaderLeft[data-v-688b4a9e],.humanMainView .humanMainHeader .humanMainHeaderRight[data-v-688b4a9e]{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-688b4a9e]{width:60%;display:inline-block;vertical-align:middle;font-size:16px;box-sizing:border-box}.humanMainView>iframe[data-v-688b4a9e]{width:100%;height:calc(100% - 40px)}
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-594c3975]{overflow:hidden;position:fixed;top:0;left:0;z-index:999}.humanEnterIcon[data-v-594c3975]{position:fixed;z-index:999;background-color:#0074ff;border-radius:50%;width:40px;height:40px;text-align:center;padding:8px;box-sizing:border-box;right:50px;bottom:50px}.humanEnterIcon>svg[data-v-594c3975]{width:100%;height:100%;fill:#fff}.humanEnterIcon.unreadCount[data-v-594c3975]{background-color:red;color:#fff;line-height:24px;font-size:14px;font-weight:700}.humanMainView[data-v-594c3975]{position:fixed;min-width:420px;min-height:400px;height:80vh;border:1px solid #ccc}.humanMainView .humanMainHeader[data-v-594c3975]{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-594c3975]{text-align:right}.humanMainView .humanMainHeader .humanMainHeaderLeft[data-v-594c3975],.humanMainView .humanMainHeader .humanMainHeaderRight[data-v-594c3975]{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-594c3975]{width:60%;display:inline-block;vertical-align:middle;font-size:16px;box-sizing:border-box}.humanMainView>iframe[data-v-594c3975]{width:100%;height:calc(100% - 40px)}
@@ -1,4 +1,4 @@
1
- (function(G,Ze){typeof exports=="object"&&typeof module<"u"?module.exports=Ze(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ze):(G=typeof globalThis<"u"?globalThis:G||self,G["boka-human-v3"]=Ze(G.Vue))})(this,(function(G){"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){k(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,K(n.key),n)}}function x(t,e,i){return e&&y(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function k(t,e,i){return(e=K(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&&D(t,e)}function _(t){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(t)}function D(t,e){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},D(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 K(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,ee=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)),ee=t}function ne(t){return ie(t)?t:(t.ownerDocument||t).defaultView||ee.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===ee||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)||ee;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||Ge,ve.SVGElement=e.SVGElement||Ge,ve.SVGSVGElement=e.SVGSVGElement||Ge,ve.SVGElementInstance=e.SVGElementInstance||Ge,ve.Element=e.Element||Ge,ve.HTMLElement=e.HTMLElement||ve.Element,ve.Event=e.Event,ve.Touch=e.Touch||Ge,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 Ge(){}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(De(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 De(t,e){return ee!==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(De(t,e))return!0;if((t=Se(t))===i)return De(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))||ee).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 kt(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)},Hr=["webkit","moz"];function Dt(t,e){t.__set||(t.__set={});var i=function(r){if(Hr.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 qr(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)]},$e=(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)&&!De(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),Z=Zt(L);if(se!==M.ownerDocument)if(Z!==M.ownerDocument)if(se!==Z){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===Z)continue;fe=M.ownerSVGElement}else fe=M;for(var we=sn(fe,L.ownerDocument),ke=0;we[ke]&&we[ke]===F[ke];)ke++;var jt=[we[ke-1],we[ke],F[ke]];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 $e(n,i,"dropactivate"),r.activate.target=null,r.activate.dropzone=null),i.type==="dragend"&&(r.deactivate=new $e(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 $e(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 $e(n,i,"dragenter"),i.dragEnter=n.cur.element,i.dropzone=n.cur.dropzone)),i.type==="dragend"&&n.cur.dropzone&&(r.drop=new $e(n,i,"drop"),i.dropzone=n.cur.dropzone,i.relatedTarget=n.cur.element),i.type==="dragmove"&&n.cur.dropzone&&(r.move=new $e(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 Z=E.getRect(S);if(Z&&F==="center"){var fe=Z.left+Z.width/2,we=Z.top+Z.height/2;A=fe>=I.left&&fe<=I.right&&we>=I.top&&we<=I.bottom}return Z&&w.number(F)&&(A=Math.max(0,Math.min(I.right,Z.right)-Math.max(I.left,Z.left))*Math.max(0,Math.min(I.bottom,Z.bottom)-Math.max(I.top,Z.top))/(Z.width*Z.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"}},Br=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}},Ur=ui;function Gr(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]=Gr(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,Kr={id:"actions",install:function(t){t.usePlugin(Ur),t.usePlugin($r),t.usePlugin(on),t.usePlugin(Br)}},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=kn(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=Dn(o);w.window(o)?o.scrollBy(v.x,v.y):o&&(o.scrollLeft+=v.x,o.scrollTop+=v.y);var m=Dn(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=kn(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 kn(t,e,i){return(w.string(t)?fn(t,e,i):t)||ne(i)}function Dn(t){return w.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}var Zr={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)}}},Jr=Zr;function ut(t,e){var i=!1;return function(){return i||(ee.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 Qr(t){return w.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function eo(t){return w.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}var to={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=eo,e.prototype.styleCursor=Qr}};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 io(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=io(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 no={id:"auto-start/base",before:["actions"],install:function(t){var e=t.interactStatic,i=t.defaults;t.usePlugin(to),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=no,ro={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 oo={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},ao=oo,so={id:"auto-start",install:function(t){t.usePlugin(di),t.usePlugin(ao),t.usePlugin(ro)}},lo=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 co(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=lo,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)&&De(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)]=co,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),kt(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 uo={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=uo,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 fo=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})),ho=(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})({}),po=0,vo=(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=po++,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 ho)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 fo(f,e,i,null,null),v=this.pointers.length,this.pointers.push(h)),qr(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,Dt(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"&&(kt(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),kt(t.edges,t.rect,e),e.x=0,e.y=0,!0}function go(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 mo={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(t){t.Interaction.prototype.offsetBy=go},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=mo,yo=(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 bo={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 yo(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 wo=bo;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})(),xo=(function(){function t(e){g(this,t),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=e,Dt(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 Eo={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 xo(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(De(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 To=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:To.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 So={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})(vo),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},_o=So,Ae=(function(t){return t[t.On=0]="On",t[t.Off=1]="Off",t})(Ae||{}),Oo=(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})(),ko=(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)&&De(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=De,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 ko(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})(Oo)}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(_o),i.usePlugin(Eo),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[Gn(f)]=!0,l}),{});n<r;n++){var s=this.listenerMaps[n].id;if(s&&(o[s]||o[Gn(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 Gn(t){return t&&t.replace(/\/.*$/,"")}var $n=new Do,ae=$n.interactStatic,Io=typeof globalThis<"u"?globalThis:window;$n.init(Io);var Po=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}}),Ao={id:"snappers",install:function(t){var e=t.interactStatic;e.snappers=z(e.snappers||{},Po),e.createSnapGrid=e.snappers.grid}},zo=Ao,Mo={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?Co:Ro;if(z(t.edges,r),s(e,e.xIsPrimaryAxis,n,i),!e.subModification)return null;var l=z({},i);kt(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 Co(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 Ro(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 No=Pe(Mo,"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}},Fo=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}},Lo=Pe(dt,"restrictEdges"),Vo=z({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Lt.defaults),jo=Pe({start:Lt.start,set:Lt.set,defaults:Vo},"restrictRect"),Yo={width:-1/0,height:-1/0},Xo={width:1/0,height:1/0},Wo=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))||Yo,l=ti(Le(o.max,e,t.coords))||Xo;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,Z=at(L,se),fe=Z<=M;M===1/0&&A.inRange&&A.range!==1/0&&(fe=!1),A.target&&!(fe?A.inRange&&M!==1/0?Z/M<A.distance/A.range:M===1/0&&A.range!==1/0||Z<A.distance:!A.inRange&&Z<A.distance)||(A.target=Y,A.distance=Z,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}},Ho=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}},qo=Pe(Vt,"snapSize"),Ei={aspectRatio:No,restrictEdges:Lo,restrict:Fo,restrictRect:jo,restrictSize:Wo,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:Ho,snapSize:qo,spring:Ft,avoid:Ft,transform:Ft,rubberband:Ft},Bo={id:"modifiers",install:function(t){var e=t.interactStatic;for(var i in t.usePlugin(Rn),t.usePlugin(zo),e.modifiers=Ei,Ei){var n=Ei[i],r=n._defaults,o=n._methods;r._methods=o,t.defaults.perAction[i]=r}}},Uo=Bo,er=(function(t){O(i,t);var e=q(i);function i(n,r,o,s,l,f){var v;if(g(this,i),Dt(j(v=e.call(this,l)),o),o!==r&&Dt(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 Go=Object.freeze({__proto__:null,default:pt});function $o(t){var e=t.interaction;e.holdIntervalHandle&&(clearInterval(e.holdIntervalHandle),e.holdIntervalHandle=null)}var Ko={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))}}})},Zo=Ko,Jo={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||{})}}},Qo=Jo,ea={id:"pointer-events",install:function(t){t.usePlugin(Go),t.usePlugin(Zo),t.usePlugin(Qo)}},ta=ea,ia={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 Z=I.window,fe=Z.Promise,we=fe?new fe((function(ke){L._reflowResolve=ke})):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))}}},na=ia;if(ae.use(Cn),ae.use(jn),ae.use(ta),ae.use(wo),ae.use(Uo),ae.use(so),ae.use(Kr),ae.use(Jr),ae.use(na),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);/*!
1
+ (function(w,tt){typeof exports=="object"&&typeof module<"u"?module.exports=tt(require("vue")):typeof define=="function"&&define.amd?define(["vue"],tt):(w=typeof globalThis<"u"?globalThis:w||self,w["boka-human-v3"]=tt(w.Vue))})(this,(function(w){"use strict";/*!
2
2
  * Viewer.js v1.11.7
3
3
  * https://fengyuanchen.github.io/viewerjs
4
4
  *
@@ -6,4 +6,4 @@
6
6
  * Released under the MIT license
7
7
  *
8
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,ki(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=ki(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 ki(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 Di={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"),Q="".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",Gi="rotate",$i="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 J(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)||J(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)&&J(c)&&(c+="px"),u[p]=c})}function Er(d){return it(d)?d.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):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(J(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(J(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(J(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 Gt(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),D=0;D<O;D++)_[D]=arguments[D];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 te(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=[];J(p)&&p!==0&&y.push("translateX(".concat(p,"px)")),J(g)&&g!==0&&y.push("translateY(".concat(g,"px)")),J(a)&&a!==0&&y.push("rotate(".concat(a,"deg)")),J(u)&&u!==1&&y.push("scaleX(".concat(u,")")),J(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 $t=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&&!$t)return u(d.naturalWidth,d.naturalHeight),c;var p=document.body||document.documentElement;return c.onload=function(){u(c.width,c.height),$t||p.removeChild(c)},$(a.inheritedAttributes,function(g){var y=d.getAttribute(g);y!==null&&c.setAttribute(g,y)}),c.src=d.src,$t||(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),k=Math.abs(c.endX-g.endX),O=Math.abs(c.endY-g.endY),_=Math.sqrt(y*y+x*x),D=Math.sqrt(k*k+O*O),j=(D-_)/_;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 kr(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 Dr={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 k=y.src,O=y.alt||_r(k),_=a.getImageURL(y);if(k||_){var D=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=k||_),j.alt=O,j.setAttribute("data-original-url",_||k),D.setAttribute("data-index",x),D.setAttribute("data-viewer-action","view"),D.setAttribute("role","button"),c.keyboard&&D.setAttribute("tabindex",0),D.appendChild(j),p.appendChild(D),g.push(D)}}),this.items=g,$(g,function(y){var x=y.firstElementChild,k,O;Gt(x,"filled",!0),c.loading&&R(y,je),N(x,de,k=function(D){H(x,Ce,O),c.loading&&X(y,je),a.loadImage(D)},{once:!0}),N(x,Ce,O=function(){H(x,de,k),c.loading&&X(y,je)},{once:!0})}),c.transition&&N(u,tt,function(){R(p,Q)},{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,Q),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,k=Math.max(g.height-y,y),O=this.imageData||{},_;this.imageInitializing={abort:function(){_.onload=null}},_=rn(p,c,function(D,j){var q=D/j,B=Math.max(0,Math.min(1,c.initialCoverage)),K=x,ie=k;u.imageInitializing=!1,k*q>x?ie=x/q:K=k*q,B=J(B)?B:.9,K=Math.min(K*B,D),ie=Math.min(ie*B,j);var re=(x-K)/2,ee=(k-ie)/2,U={left:re,top:ee,x:re,y:ee,width:K,height:ie,oldRatio:1,ratio:K/D,aspectRatio:q,naturalWidth:D,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,Q)){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,Q,c.transition),a.renderImage(function(){a.viewed=!0,a.viewing=!1,W(c.viewed)&&N(u,tt,c.viewed,{once:!0}),te(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,k){var O=x/k,_=p,D=g;g*O>p?y?_=g*O:D=p/O:y?D=p/O:_=g*O,ye(u,ce({width:_,height:D},Tt({translateX:(p-_)/2,translateY:(g-D)/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")&&(J(p)&&p!==1||J(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,Q),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,Q),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(){te(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(){te(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}),te(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}),te(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,Q),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}),te(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 k=function(D){D&&D.target===g&&(H(g,me,k),a.hidden())},O=function(){Be(g,Q)?(N(g,me,k),X(g,he)):x()};this.transitioning={abort:function(){a.viewed&&Be(y,Q)?H(y,me,O):Be(g,Q)&&H(g,me,k)}},this.viewed&&Be(y,Q)?(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],k=x.querySelector("img"),O=Ue(k,"originalUrl"),_=k.getAttribute("alt"),D=document.createElement("img");if($(p.inheritedAttributes,function(ie){var re=k.getAttribute(ie);re!==null&&D.setAttribute(ie,re)}),D.src=O,D.alt=_,W(p.view)&&N(c,qi,p.view,{once:!0}),te(c,qi,{originalImage:this.images[u],index:u,image:D})===!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=D,this.viewed=!1,this.index=u,this.imageData={},R(D,et),p.loading&&R(y,je),y.innerHTML="",y.appendChild(D),this.renderList(),g.innerHTML="";var q=function(){var re=a.imageData,ee=Array.isArray(p.title)?p.title[1]:p.title;g.innerHTML=Er(W(ee)?ee.call(a,D,re):"".concat(_," (").concat(re.naturalWidth," × ").concat(re.naturalHeight,")"))},B,K;return N(c,tt,q,{once:!0}),this.viewing={abort:function(){H(c,tt,q),D.complete?a.imageRendering?a.imageRendering.abort():a.imageInitializing&&a.imageInitializing.abort():(D.src="",H(D,de,B),a.timeout&&clearTimeout(a.timeout))}},D.complete?this.load():(N(D,de,B=function(){H(D,Ce,K),a.load()},{once:!0}),N(D,Ce,K=function(){H(D,de,B),a.timeout&&(clearTimeout(a.timeout),a.timeout=!1),X(D,et),p.loading&&X(a.canvas,je)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){X(D,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 k=x.x,O=x.y,_=!1;if(J(a)?_=!0:a=k,J(c)?_=!0:c=O,_){if(W(y.move)&&N(g,Bi,y.move,{once:!0}),te(g,Bi,{x:a,y:c,oldX:k,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}),te(g,Ui,{x:a,y:c,oldX:k,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),J(a)&&this.viewed&&!this.played&&p.rotatable){var y=g.rotate;if(W(p.rotate)&&N(c,Gi,p.rotate,{once:!0}),te(c,Gi,{degree:a,oldDegree:y})===!1)return this;g.rotate=a,this.rotating=!0,this.renderImage(function(){u.rotating=!1,W(p.rotated)&&N(c,$i,p.rotated,{once:!0}),te(c,$i,{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,k=y.scaleY,O=!1;if(J(a)?O=!0:a=x,J(c)?O=!0:c=k,O){if(W(g.scale)&&N(p,Ki,g.scale,{once:!0}),te(p,Ki,{scaleX:a,scaleY:c,oldScaleX:x,oldScaleY:k})===!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}),te(p,Zi,{scaleX:a,scaleY:c,oldScaleX:x,oldScaleY:k},{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,k=this.options,O=this.pointers,_=this.imageData,D=_.x,j=_.y,q=_.width,B=_.height,K=_.naturalWidth,ie=_.naturalHeight;if(a=Math.max(0,a),J(a)&&this.viewed&&!this.played&&(y||k.zoomable)){if(!y){var re=Math.max(.01,k.minZoomRatio),ee=Math.min(100,k.maxZoomRatio);a=Math.min(Math.max(a,re),ee)}if(g)switch(g.type){case"wheel":k.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=K*a,ne=ie*a,pe=U-q,ue=ne-B,w=_.ratio;if(W(k.zoom)&&N(x,Ji,k.zoom,{once:!0}),te(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?kr(O):{pageX:g.pageX,pageY:g.pageY};_.x-=pe*((Te.pageX-Ee.left-D)/q),_.y-=ue*((Te.pageY-Ee.top-j)/B)}else qe(p)&&J(p.x)&&J(p.y)?(_.x-=pe*((p.x-D)/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(k.zoomed)&&N(x,Qi,k.zoomed,{once:!0}),te(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}),te(c,en)===!1)return this;var g=this.player,y=this.loadImage.bind(this),x=[],k=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"),K=document.createElement("img");K.src=Ue(B,"originalUrl"),K.alt=B.getAttribute("alt"),K.referrerPolicy=B.referrerPolicy,k+=1,R(K,wt),nt(K,Q,p.transition),Be(j,bt)&&(R(K,he),O=q),x.push(K),N(K,de,y,{once:!0}),g.appendChild(K)}),J(p.interval)&&p.interval>0){var _=function(){clearTimeout(a.playing.timeout),X(x[O],he),O-=1,O=O>=0?O:k-1,R(x[O],he),a.playing.timeout=setTimeout(_,p.interval)},D=function(){clearTimeout(a.playing.timeout),X(x[O],he),O+=1,O=O<k?O:0,R(x[O],he),a.playing.timeout=setTimeout(D,p.interval)};k>1&&(this.playing={prev:_,next:D,timeout:setTimeout(D,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}),te(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,Q),this.viewed&&X(p,Q)),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,Q),R(g,Q)},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,Q),this.viewed&&X(p,Q)),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,Q),R(g,Q)},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&&te(c,me),R(c,Ye),R(c,wt),R(c,Q),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,Q),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 D=O.querySelector("img"),j=g[_];j&&D?(j.src!==D.src||j.alt!==D.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 k=this.items[this.index];R(k,bt),k.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}),te(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}),te(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(k){k.startX=k.endX,k.startY=k.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({},Di,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,k=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,k),H(_,Ce,k))})}},$(y,function(O){if(O.complete)k();else{var _,D;N(O,de,_=function(){H(O,Ce,D),k()},{once:!0}),N(O,Ce,D=function(){H(O,de,_),k()},{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")),k=y.querySelector(".".concat(V,"-toolbar")),O=y.querySelector(".".concat(V,"-navbar")),_=y.querySelector(".".concat(V,"-button")),D=y.querySelector(".".concat(V,"-canvas"));if(this.parent=p,this.viewer=y,this.title=x,this.toolbar=k,this.navbar=O,this.button=_,this.canvas=D,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"&&Gt(D,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),K=Et.slice(7,9),ie=Et.slice(9);q||R(k,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&&K.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)||Gt(le,xt,ue),J(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)}}),k.appendChild(j)}else R(k,Me);if(!c.rotatable){var re=k.querySelectorAll('li[class*="rotate"]');R(re,et),$(re,function(U){k.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 ee=c.container;it(ee)&&(ee=u.ownerDocument.querySelector(ee)),ee||(ee=this.body),ee.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}),te(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(Di,qe(u)&&u)}}])})();ce(Kt.prototype,Dr,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(){let{product:d,subCustType:a}=this;return d.toLowerCase()==="mase"||d.toLowerCase()==="aime"&&a==="overseas"?"https://service.mase.cloud":"https://human.shboka.com"},src(){let{token:d,product:a,subCustType:u,source:c}=this;return`${this.host}?token=${d}&product=${a}&subCustType=${u}&source=${c}&human=1&isIFrame=true&time=${new Date().getTime()}`}},data(){return{visible:!1,unreadCount:0}},mounted(){this.icon(),this.chatMainInitDrag(),window.humanFunction={showChatView:this.showChat};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;if(g=="img")this.showImg(y);else if(g=="unreadCountChange"){let{count:x,type:k}=p.data;k=="add"&&!this.visible&&(this.unreadCount+=x)}}})},methods:{showChat(d=!0){this.visible=d},changeChatViewVisible(){this.visible=!this.visible,this.visible&&(this.unreadCount=0)},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 k=d.clientWidth/2,O=0,_=d.clientWidth-g.offsetWidth;y+g.offsetWidth/2<k?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={key:0,t:"1755741820144",viewBox:"0 0 1051 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1470",width:"32",height:"32"},Vr={class:"humanMainView"},jr={class:"humanMainHeader my-dialog__header"},Yr={class:"humanMainHeaderRight"},Xr=["src"];function Wr(d,a,u,c,p,g){return G.openBlock(),G.createElementBlock("div",Fr,[G.createElementVNode("div",{class:G.normalizeClass(["humanEnterIcon",[p.unreadCount>0?"unreadCount":""]]),id:"humanEnterIcon",onClick:a[0]||(a[0]=(...y)=>g.changeChatViewVisible&&g.changeChatViewVisible(...y))},[p.unreadCount<1?(G.openBlock(),G.createElementBlock("svg",Lr,[...a[2]||(a[2]=[G.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"},null,-1)])])):(G.openBlock(),G.createElementBlock(G.Fragment,{key:1},[G.createTextVNode(G.toDisplayString(p.unreadCount>99?"99+":p.unreadCount),1)],64))],2),G.withDirectives(G.createElementVNode("div",Vr,[G.createElementVNode("div",jr,[a[3]||(a[3]=G.createElementVNode("div",{class:"humanMainHeaderLeft"},null,-1)),a[4]||(a[4]=G.createElementVNode("div",{class:"humanMainHeaderCenter"},"客服",-1)),G.createElementVNode("div",Yr,[G.createElementVNode("span",{onClick:a[1]||(a[1]=y=>p.visible=!p.visible)},"关闭")])]),G.createElementVNode("iframe",{id:"iframe",src:g.src,frameborder:"0",allowfullscreen:""},null,8,Xr)],512),[[G.vShow,p.visible]])])}return Rr(Nr,[["render",Wr],["__scopeId","data-v-688b4a9e"]])}));
9
+ */function tt(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function It(n,t){for(var i=0;i<t.length;i++){var e=t[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,Nt(e.key),e)}}function re(n,t,i){return t&&It(n.prototype,t),i&&It(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n}function se(n,t,i){return(t=Nt(t))in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function xt(n,t){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(n);t&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable})),i.push.apply(i,e)}return i}function gt(n){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?xt(Object(i),!0).forEach(function(e){se(n,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):xt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function oe(n,t){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var e=i.call(n,t);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}function Nt(n){var t=oe(n,"string");return typeof t=="symbol"?t:t+""}function pt(n){"@babel/helpers - typeof";return pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pt(n)}var At={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},le='<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>',ot=typeof window<"u"&&typeof window.document<"u",M=ot?window:{},q=ot&&M.document.documentElement?"ontouchstart"in M.document.documentElement:!1,bt=ot?"PointerEvent"in M:!1,m="viewer",lt="move",kt="switch",et="zoom",ht="".concat(m,"-active"),he="".concat(m,"-close"),ut="".concat(m,"-fade"),wt="".concat(m,"-fixed"),ue="".concat(m,"-fullscreen"),_t="".concat(m,"-fullscreen-exit"),Y="".concat(m,"-hide"),ce="".concat(m,"-hide-md-down"),fe="".concat(m,"-hide-sm-down"),de="".concat(m,"-hide-xs-down"),O="".concat(m,"-in"),it="".concat(m,"-invisible"),j="".concat(m,"-loading"),me="".concat(m,"-move"),Ot="".concat(m,"-open"),B="".concat(m,"-show"),C="".concat(m,"-transition"),U="click",yt="dblclick",zt="dragstart",Lt="focusin",Vt="keydown",z="load",W="error",ve=q?"touchend touchcancel":"mouseup",ge=q?"touchmove":"mousemove",pe=q?"touchstart":"mousedown",Rt=bt?"pointerdown":pe,Mt=bt?"pointermove":ge,Ft=bt?"pointerup pointercancel":ve,Pt="resize",L="transitionend",Yt="wheel",Wt="ready",Ht="show",Xt="shown",qt="hide",jt="hidden",Bt="view",nt="viewed",Ut="move",Kt="moved",Zt="rotate",Gt="rotated",$t="scale",Jt="scaled",Qt="zoom",te="zoomed",ee="play",ie="stop",ct="".concat(m,"Action"),Et=/\s\s*/,ft=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function at(n){return typeof n=="string"}var be=Number.isNaN||M.isNaN;function T(n){return typeof n=="number"&&!be(n)}function K(n){return typeof n>"u"}function Z(n){return pt(n)==="object"&&n!==null}var we=Object.prototype.hasOwnProperty;function G(n){if(!Z(n))return!1;try{var t=n.constructor,i=t.prototype;return t&&i&&we.call(i,"isPrototypeOf")}catch{return!1}}function p(n){return typeof n=="function"}function y(n,t){if(n&&p(t))if(Array.isArray(n)||T(n.length)){var i=n.length,e;for(e=0;e<i&&t.call(n,n[e],e,n)!==!1;e+=1);}else Z(n)&&Object.keys(n).forEach(function(a){t.call(n,n[a],a,n)});return n}var _=Object.assign||function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),a=1;a<i;a++)e[a-1]=arguments[a];return Z(t)&&e.length>0&&e.forEach(function(r){Z(r)&&Object.keys(r).forEach(function(s){t[s]=r[s]})}),t},ye=/^(?:width|height|left|top|marginLeft|marginTop)$/;function V(n,t){var i=n.style;y(t,function(e,a){ye.test(a)&&T(e)&&(e+="px"),i[a]=e})}function Ee(n){return at(n)?n.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):n}function $(n,t){return!n||!t?!1:n.classList?n.classList.contains(t):n.className.indexOf(t)>-1}function f(n,t){if(!(!n||!t)){if(T(n.length)){y(n,function(e){f(e,t)});return}if(n.classList){n.classList.add(t);return}var i=n.className.trim();i?i.indexOf(t)<0&&(n.className="".concat(i," ").concat(t)):n.className=t}}function g(n,t){if(!(!n||!t)){if(T(n.length)){y(n,function(i){g(i,t)});return}if(n.classList){n.classList.remove(t);return}n.className.indexOf(t)>=0&&(n.className=n.className.replace(t,""))}}function rt(n,t,i){if(t){if(T(n.length)){y(n,function(e){rt(e,t,i)});return}i?f(n,t):g(n,t)}}var Te=/([a-z\d])([A-Z])/g;function Tt(n){return n.replace(Te,"$1-$2").toLowerCase()}function J(n,t){return Z(n[t])?n[t]:n.dataset?n.dataset[t]:n.getAttribute("data-".concat(Tt(t)))}function St(n,t,i){Z(i)?n[t]=i:n.dataset?n.dataset[t]=i:n.setAttribute("data-".concat(Tt(t)),i)}var ne=(function(){var n=!1;if(ot){var t=!1,i=function(){},e=Object.defineProperty({},"once",{get:function(){return n=!0,t},set:function(r){t=r}});M.addEventListener("test",i,e),M.removeEventListener("test",i,e)}return n})();function b(n,t,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=i;t.trim().split(Et).forEach(function(r){if(!ne){var s=n.listeners;s&&s[r]&&s[r][i]&&(a=s[r][i],delete s[r][i],Object.keys(s[r]).length===0&&delete s[r],Object.keys(s).length===0&&delete n.listeners)}n.removeEventListener(r,a,e)})}function d(n,t,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=i;t.trim().split(Et).forEach(function(r){if(e.once&&!ne){var s=n.listeners,o=s===void 0?{}:s;a=function(){delete o[r][i],n.removeEventListener(r,a,e);for(var h=arguments.length,l=new Array(h),c=0;c<h;c++)l[c]=arguments[c];i.apply(n,l)},o[r]||(o[r]={}),o[r][i]&&n.removeEventListener(r,o[r][i],e),o[r][i]=a,n.listeners=o}n.addEventListener(r,a,e)})}function I(n,t,i,e){var a;return p(Event)&&p(CustomEvent)?a=new CustomEvent(t,gt({bubbles:!0,cancelable:!0,detail:i},e)):(a=document.createEvent("CustomEvent"),a.initCustomEvent(t,!0,!0,i)),n.dispatchEvent(a)}function Se(n){var t=n.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function dt(n){var t=n.rotate,i=n.scaleX,e=n.scaleY,a=n.translateX,r=n.translateY,s=[];T(a)&&a!==0&&s.push("translateX(".concat(a,"px)")),T(r)&&r!==0&&s.push("translateY(".concat(r,"px)")),T(t)&&t!==0&&s.push("rotate(".concat(t,"deg)")),T(i)&&i!==1&&s.push("scaleX(".concat(i,")")),T(e)&&e!==1&&s.push("scaleY(".concat(e,")"));var o=s.length?s.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function Ce(n){return at(n)?decodeURIComponent(n.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var Ct=M.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(M.navigator.userAgent);function ae(n,t,i){var e=document.createElement("img");if(n.naturalWidth&&!Ct)return i(n.naturalWidth,n.naturalHeight),e;var a=document.body||document.documentElement;return e.onload=function(){i(e.width,e.height),Ct||a.removeChild(e)},y(t.inheritedAttributes,function(r){var s=n.getAttribute(r);s!==null&&e.setAttribute(r,s)}),e.src=n.src,Ct||(e.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;",a.appendChild(e)),e}function mt(n){switch(n){case 2:return de;case 3:return fe;case 4:return ce;default:return""}}function De(n){var t=gt({},n),i=[];return y(n,function(e,a){delete t[a],y(t,function(r){var s=Math.abs(e.startX-r.startX),o=Math.abs(e.startY-r.startY),u=Math.abs(e.endX-r.endX),h=Math.abs(e.endY-r.endY),l=Math.sqrt(s*s+o*o),c=Math.sqrt(u*u+h*h),v=(c-l)/l;i.push(v)})}),i.sort(function(e,a){return Math.abs(e)<Math.abs(a)}),i[0]}function vt(n,t){var i=n.pageX,e=n.pageY,a={endX:i,endY:e};return t?a:gt({timeStamp:Date.now(),startX:i,startY:e},a)}function Ie(n){var t=0,i=0,e=0;return y(n,function(a){var r=a.startX,s=a.startY;t+=r,i+=s,e+=1}),t/=e,i/=e,{pageX:t,pageY:i}}var xe={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var t=this.element.ownerDocument,i=t.body||t.documentElement;this.body=i,this.scrollbarWidth=window.innerWidth-t.documentElement.clientWidth,this.initialBodyPaddingRight=i.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(i).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var t=this.options,i=this.parent,e;t.inline&&(e={width:Math.max(i.offsetWidth,t.minWidth),height:Math.max(i.offsetHeight,t.minHeight)},this.parentData=e),(this.fulled||!e)&&(e=this.containerData),this.viewerData=_({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&V(this.viewer,this.viewerData)},initList:function(){var t=this,i=this.element,e=this.options,a=this.list,r=[];a.innerHTML="",y(this.images,function(s,o){var u=s.src,h=s.alt||Ce(u),l=t.getImageURL(s);if(u||l){var c=document.createElement("li"),v=document.createElement("img");y(e.inheritedAttributes,function(x){var D=s.getAttribute(x);D!==null&&v.setAttribute(x,D)}),e.navbar&&(v.src=u||l),v.alt=h,v.setAttribute("data-original-url",l||u),c.setAttribute("data-index",o),c.setAttribute("data-viewer-action","view"),c.setAttribute("role","button"),e.keyboard&&c.setAttribute("tabindex",0),c.appendChild(v),a.appendChild(c),r.push(c)}}),this.items=r,y(r,function(s){var o=s.firstElementChild,u,h;St(o,"filled",!0),e.loading&&f(s,j),d(o,z,u=function(c){b(o,W,h),e.loading&&g(s,j),t.loadImage(c)},{once:!0}),d(o,W,h=function(){b(o,z,u),e.loading&&g(s,j)},{once:!0})}),e.transition&&d(i,nt,function(){f(a,C)},{once:!0})},renderList:function(){var t=this.index,i=this.items[t];if(i){var e=i.nextElementSibling,a=parseInt(window.getComputedStyle(e||i).marginLeft,10),r=i.offsetWidth,s=r+a;V(this.list,_({width:s*this.length-a},dt({translateX:(this.viewerData.width-r)/2-s*t})))}},resetList:function(){var t=this.list;t.innerHTML="",g(t,C),V(t,dt({translateX:0}))},initImage:function(t){var i=this,e=this.options,a=this.image,r=this.viewerData,s=this.footer.offsetHeight,o=r.width,u=Math.max(r.height-s,s),h=this.imageData||{},l;this.imageInitializing={abort:function(){l.onload=null}},l=ae(a,e,function(c,v){var x=c/v,D=Math.max(0,Math.min(1,e.initialCoverage)),S=o,N=u;i.imageInitializing=!1,u*x>o?N=o/x:S=u*x,D=T(D)?D:.9,S=Math.min(S*D,c),N=Math.min(N*D,v);var A=(o-S)/2,k=(u-N)/2,E={left:A,top:k,x:A,y:k,width:S,height:N,oldRatio:1,ratio:S/c,aspectRatio:x,naturalWidth:c,naturalHeight:v},F=_({},E);e.rotatable&&(E.rotate=h.rotate||0,F.rotate=0),e.scalable&&(E.scaleX=h.scaleX||1,E.scaleY=h.scaleY||1,F.scaleX=1,F.scaleY=1),i.imageData=E,i.initialImageData=F,t&&t()})},renderImage:function(t){var i=this,e=this.image,a=this.imageData;if(V(e,_({width:a.width,height:a.height,marginLeft:a.x,marginTop:a.y},dt(a))),t)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&$(e,C)){var r=function(){i.imageRendering=!1,t()};this.imageRendering={abort:function(){b(e,L,r)}},d(e,L,r,{once:!0})}else t()},resetImage:function(){var t=this.image;t&&(this.viewing&&this.viewing.abort(),t.parentNode.removeChild(t),this.image=null,this.title.innerHTML="")}},Ne={bind:function(){var t=this.options,i=this.viewer,e=this.canvas,a=this.element.ownerDocument;d(i,U,this.onClick=this.click.bind(this)),d(i,zt,this.onDragStart=this.dragstart.bind(this)),d(e,Rt,this.onPointerDown=this.pointerdown.bind(this)),d(a,Mt,this.onPointerMove=this.pointermove.bind(this)),d(a,Ft,this.onPointerUp=this.pointerup.bind(this)),d(a,Vt,this.onKeyDown=this.keydown.bind(this)),d(window,Pt,this.onResize=this.resize.bind(this)),t.zoomable&&t.zoomOnWheel&&d(i,Yt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleOnDblclick&&d(e,yt,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var t=this.options,i=this.viewer,e=this.canvas,a=this.element.ownerDocument;b(i,U,this.onClick),b(i,zt,this.onDragStart),b(e,Rt,this.onPointerDown),b(a,Mt,this.onPointerMove),b(a,Ft,this.onPointerUp),b(a,Vt,this.onKeyDown),b(window,Pt,this.onResize),t.zoomable&&t.zoomOnWheel&&b(i,Yt,this.onWheel,{passive:!1,capture:!0}),t.toggleOnDblclick&&b(e,yt,this.onDblclick)}},Ae={click:function(t){var i=this.options,e=this.imageData,a=t.target,r=J(a,ct);switch(!r&&a.localName==="img"&&a.parentElement.localName==="li"&&(a=a.parentElement,r=J(a,ct)),q&&t.isTrusted&&a===this.canvas&&clearTimeout(this.clickCanvasTimeout),r){case"mix":this.played?this.stop():i.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(J(a,"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(i.loop);break;case"play":this.play(i.fullscreen);break;case"next":this.next(i.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-e.scaleX||-1);break;case"flip-vertical":this.scaleY(-e.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(t){t.preventDefault(),this.viewed&&t.target===this.image&&(q&&t.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(t.isTrusted?t:t.detail&&t.detail.originalEvent))},load:function(){var t=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var i=this.element,e=this.options,a=this.image,r=this.index,s=this.viewerData;g(a,it),e.loading&&g(this.canvas,j),a.style.cssText="height:0;"+"margin-left:".concat(s.width/2,"px;")+"margin-top:".concat(s.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){rt(a,me,e.movable),rt(a,C,e.transition),t.renderImage(function(){t.viewed=!0,t.viewing=!1,p(e.viewed)&&d(i,nt,e.viewed,{once:!0}),I(i,nt,{originalImage:t.images[r],index:r,image:a},{cancelable:!1})})})},loadImage:function(t){var i=t.target,e=i.parentNode,a=e.offsetWidth||30,r=e.offsetHeight||50,s=!!J(i,"filled");ae(i,this.options,function(o,u){var h=o/u,l=a,c=r;r*h>a?s?l=r*h:c=a/h:s?c=a/h:l=r*h,V(i,_({width:l,height:c},dt({translateX:(a-l)/2,translateY:(r-c)/2})))})},keydown:function(t){var i=this.options;if(i.keyboard){var e=t.keyCode||t.which||t.charCode;switch(e){case 13:this.viewer.contains(t.target)&&this.click(t);break}if(this.fulled)switch(e){case 27:this.played?this.stop():i.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(i.loop);break;case 38:t.preventDefault(),this.zoom(i.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(i.loop);break;case 40:t.preventDefault(),this.zoom(-i.zoomRatio,!0);break;case 48:case 49:t.ctrlKey&&(t.preventDefault(),this.toggle());break}}},dragstart:function(t){t.target.localName==="img"&&t.preventDefault()},pointerdown:function(t){var i=this.options,e=this.pointers,a=t.buttons,r=t.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(T(a)&&a!==1||T(r)&&r!==0||t.ctrlKey))){t.preventDefault(),t.changedTouches?y(t.changedTouches,function(o){e[o.identifier]=vt(o)}):e[t.pointerId||0]=vt(t);var s=i.movable?lt:!1;i.zoomOnTouch&&i.zoomable&&Object.keys(e).length>1?s=et:i.slideOnTouch&&(t.pointerType==="touch"||t.type==="touchstart")&&this.isSwitchable()&&(s=kt),i.transition&&(s===lt||s===et)&&g(this.image,C),this.action=s}},pointermove:function(t){var i=this.pointers,e=this.action;!this.viewed||!e||(t.preventDefault(),t.changedTouches?y(t.changedTouches,function(a){_(i[a.identifier]||{},vt(a,!0))}):_(i[t.pointerId||0]||{},vt(t,!0)),this.change(t))},pointerup:function(t){var i=this,e=this.options,a=this.action,r=this.pointers,s;t.changedTouches?y(t.changedTouches,function(o){s=r[o.identifier],delete r[o.identifier]}):(s=r[t.pointerId||0],delete r[t.pointerId||0]),a&&(t.preventDefault(),e.transition&&(a===lt||a===et)&&f(this.image,C),this.action=!1,q&&a!==et&&s&&Date.now()-s.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),e.toggleOnDblclick&&this.viewed&&t.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){I(i.image,yt,{originalEvent:t})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){i.imageClicked=!1},500)):(this.imageClicked=!1,e.backdrop&&e.backdrop!=="static"&&t.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){I(i.canvas,U,{originalEvent:t})},50)))))},resize:function(){var t=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(){t.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)){this.stop();return}y(this.player.getElementsByTagName("img"),function(i){d(i,z,t.loadImage.bind(t),{once:!0}),I(i,z)})}},wheel:function(t){var i=this;if(this.viewed&&(t.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50);var e=Number(this.options.zoomRatio)||.1,a=1;t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*e,!0,null,t)}}},ke={show:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.element,e=this.options;if(e.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(t),this;if(p(e.show)&&d(i,Ht,e.show,{once:!0}),I(i,Ht)===!1||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var a=this.viewer;if(g(a,Y),a.setAttribute("role","dialog"),a.setAttribute("aria-labelledby",this.title.id),a.setAttribute("aria-modal",!0),a.removeAttribute("aria-hidden"),e.transition&&!t){var r=this.shown.bind(this);this.transitioning={abort:function(){b(a,L,r),g(a,O)}},f(a,C),a.initialOffsetWidth=a.offsetWidth,d(a,L,r,{once:!0}),f(a,O)}else f(a,O),this.shown();return this},hide:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.element,a=this.options;if(a.inline||this.hiding||!(this.isShown||this.showing))return this;if(p(a.hide)&&d(e,qt,a.hide,{once:!0}),I(e,qt)===!1)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var r=this.viewer,s=this.image,o=function(){g(r,O),t.hidden()};if(a.transition&&!i){var u=function(c){c&&c.target===r&&(b(r,L,u),t.hidden())},h=function(){$(r,C)?(d(r,L,u),g(r,O)):o()};this.transitioning={abort:function(){t.viewed&&$(s,C)?b(s,L,h):$(r,C)&&b(r,L,u)}},this.viewed&&$(s,C)?(d(s,L,h,{once:!0}),this.zoomTo(0,!1,null,null,!0)):h()}else o();return this},view:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.initialViewIndex;if(i=Number(i)||0,this.hiding||this.played||i<0||i>=this.length||this.viewed&&i===this.index)return this;if(!this.isShown)return this.index=i,this.show();this.viewing&&this.viewing.abort();var e=this.element,a=this.options,r=this.title,s=this.canvas,o=this.items[i],u=o.querySelector("img"),h=J(u,"originalUrl"),l=u.getAttribute("alt"),c=document.createElement("img");if(y(a.inheritedAttributes,function(N){var A=u.getAttribute(N);A!==null&&c.setAttribute(N,A)}),c.src=h,c.alt=l,p(a.view)&&d(e,Bt,a.view,{once:!0}),I(e,Bt,{originalImage:this.images[i],index:i,image:c})===!1||!this.isShown||this.hiding||this.played)return this;var v=this.items[this.index];v&&(g(v,ht),v.removeAttribute("aria-selected")),f(o,ht),o.setAttribute("aria-selected",!0),a.focus&&o.focus(),this.image=c,this.viewed=!1,this.index=i,this.imageData={},f(c,it),a.loading&&f(s,j),s.innerHTML="",s.appendChild(c),this.renderList(),r.innerHTML="";var x=function(){var A=t.imageData,k=Array.isArray(a.title)?a.title[1]:a.title;r.innerHTML=Ee(p(k)?k.call(t,c,A):"".concat(l," (").concat(A.naturalWidth," × ").concat(A.naturalHeight,")"))},D,S;return d(e,nt,x,{once:!0}),this.viewing={abort:function(){b(e,nt,x),c.complete?t.imageRendering?t.imageRendering.abort():t.imageInitializing&&t.imageInitializing.abort():(c.src="",b(c,z,D),t.timeout&&clearTimeout(t.timeout))}},c.complete?this.load():(d(c,z,D=function(){b(c,W,S),t.load()},{once:!0}),d(c,W,S=function(){b(c,z,D),t.timeout&&(clearTimeout(t.timeout),t.timeout=!1),g(c,it),a.loading&&g(t.canvas,j)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){g(c,it),t.timeout=!1},1e3)),this},prev:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.index-1;return i<0&&(i=t?this.length-1:0),this.view(i),this},next:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.length-1,e=this.index+1;return e>i&&(e=t?0:i),this.view(e),this},move:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.imageData;return this.moveTo(K(t)?t:e.x+Number(t),K(i)?i:e.y+Number(i)),this},moveTo:function(t){var i=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=this.element,s=this.options,o=this.imageData;if(t=Number(t),e=Number(e),this.viewed&&!this.played&&s.movable){var u=o.x,h=o.y,l=!1;if(T(t)?l=!0:t=u,T(e)?l=!0:e=h,l){if(p(s.move)&&d(r,Ut,s.move,{once:!0}),I(r,Ut,{x:t,y:e,oldX:u,oldY:h,originalEvent:a})===!1)return this;o.x=t,o.y=e,o.left=t,o.top=e,this.moving=!0,this.renderImage(function(){i.moving=!1,p(s.moved)&&d(r,Kt,s.moved,{once:!0}),I(r,Kt,{x:t,y:e,oldX:u,oldY:h,originalEvent:a},{cancelable:!1})})}}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t)),this},rotateTo:function(t){var i=this,e=this.element,a=this.options,r=this.imageData;if(t=Number(t),T(t)&&this.viewed&&!this.played&&a.rotatable){var s=r.rotate;if(p(a.rotate)&&d(e,Zt,a.rotate,{once:!0}),I(e,Zt,{degree:t,oldDegree:s})===!1)return this;r.rotate=t,this.rotating=!0,this.renderImage(function(){i.rotating=!1,p(a.rotated)&&d(e,Gt,a.rotated,{once:!0}),I(e,Gt,{degree:t,oldDegree:s},{cancelable:!1})})}return this},scaleX:function(t){return this.scale(t,this.imageData.scaleY),this},scaleY:function(t){return this.scale(this.imageData.scaleX,t),this},scale:function(t){var i=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,a=this.element,r=this.options,s=this.imageData;if(t=Number(t),e=Number(e),this.viewed&&!this.played&&r.scalable){var o=s.scaleX,u=s.scaleY,h=!1;if(T(t)?h=!0:t=o,T(e)?h=!0:e=u,h){if(p(r.scale)&&d(a,$t,r.scale,{once:!0}),I(a,$t,{scaleX:t,scaleY:e,oldScaleX:o,oldScaleY:u})===!1)return this;s.scaleX=t,s.scaleY=e,this.scaling=!0,this.renderImage(function(){i.scaling=!1,p(r.scaled)&&d(a,Jt,r.scaled,{once:!0}),I(a,Jt,{scaleX:t,scaleY:e,oldScaleX:o,oldScaleY:u},{cancelable:!1})})}}return this},zoom:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,r=this.imageData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(r.width*t/r.naturalWidth,i,e,a),this},zoomTo:function(t){var i=this,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o=this.element,u=this.options,h=this.pointers,l=this.imageData,c=l.x,v=l.y,x=l.width,D=l.height,S=l.naturalWidth,N=l.naturalHeight;if(t=Math.max(0,t),T(t)&&this.viewed&&!this.played&&(s||u.zoomable)){if(!s){var A=Math.max(.01,u.minZoomRatio),k=Math.min(100,u.maxZoomRatio);t=Math.min(Math.max(t,A),k)}if(r)switch(r.type){case"wheel":u.zoomRatio>=.055&&t>.95&&t<1.05&&(t=1);break;case"pointermove":case"touchmove":case"mousemove":t>.99&&t<1.01&&(t=1);break}var E=S*t,F=N*t,H=E-x,R=F-D,X=l.ratio;if(p(u.zoom)&&d(o,Qt,u.zoom,{once:!0}),I(o,Qt,{ratio:t,oldRatio:X,originalEvent:r})===!1)return this;if(this.zooming=!0,r){var st=Se(this.viewer),Q=h&&Object.keys(h).length>0?Ie(h):{pageX:r.pageX,pageY:r.pageY};l.x-=H*((Q.pageX-st.left-c)/x),l.y-=R*((Q.pageY-st.top-v)/D)}else G(a)&&T(a.x)&&T(a.y)?(l.x-=H*((a.x-c)/x),l.y-=R*((a.y-v)/D)):(l.x-=H/2,l.y-=R/2);l.left=l.x,l.top=l.y,l.width=E,l.height=F,l.oldRatio=X,l.ratio=t,this.renderImage(function(){i.zooming=!1,p(u.zoomed)&&d(o,te,u.zoomed,{once:!0}),I(o,te,{ratio:t,oldRatio:X,originalEvent:r},{cancelable:!1})}),e&&this.tooltip()}return this},play:function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.isShown||this.played)return this;var e=this.element,a=this.options;if(p(a.play)&&d(e,ee,a.play,{once:!0}),I(e,ee)===!1)return this;var r=this.player,s=this.loadImage.bind(this),o=[],u=0,h=0;if(this.played=!0,this.onLoadWhenPlay=s,i&&this.requestFullscreen(i),f(r,B),y(this.items,function(v,x){var D=v.querySelector("img"),S=document.createElement("img");S.src=J(D,"originalUrl"),S.alt=D.getAttribute("alt"),S.referrerPolicy=D.referrerPolicy,u+=1,f(S,ut),rt(S,C,a.transition),$(v,ht)&&(f(S,O),h=x),o.push(S),d(S,z,s,{once:!0}),r.appendChild(S)}),T(a.interval)&&a.interval>0){var l=function(){clearTimeout(t.playing.timeout),g(o[h],O),h-=1,h=h>=0?h:u-1,f(o[h],O),t.playing.timeout=setTimeout(l,a.interval)},c=function(){clearTimeout(t.playing.timeout),g(o[h],O),h+=1,h=h<u?h:0,f(o[h],O),t.playing.timeout=setTimeout(c,a.interval)};u>1&&(this.playing={prev:l,next:c,timeout:setTimeout(c,a.interval)})}return this},stop:function(){var t=this;if(!this.played)return this;var i=this.element,e=this.options;if(p(e.stop)&&d(i,ie,e.stop,{once:!0}),I(i,ie)===!1)return this;var a=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,y(a.getElementsByTagName("img"),function(r){b(r,z,t.onLoadWhenPlay)}),g(a,B),a.innerHTML="",this.exitFullscreen(),this},full:function(){var t=this,i=this.options,e=this.viewer,a=this.image,r=this.list;return!this.isShown||this.played||this.fulled||!i.inline?this:(this.fulled=!0,this.open(),f(this.button,_t),i.transition&&(g(r,C),this.viewed&&g(a,C)),f(e,wt),e.setAttribute("role","dialog"),e.setAttribute("aria-labelledby",this.title.id),e.setAttribute("aria-modal",!0),e.removeAttribute("style"),V(e,{zIndex:i.zIndex}),i.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=_({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){i.transition&&setTimeout(function(){f(a,C),f(r,C)},0)})}),this)},exit:function(){var t=this,i=this.options,e=this.viewer,a=this.image,r=this.list;return!this.isShown||this.played||!this.fulled||!i.inline?this:(this.fulled=!1,this.close(),g(this.button,_t),i.transition&&(g(r,C),this.viewed&&g(a,C)),i.focus&&this.clearEnforceFocus(),e.removeAttribute("role"),e.removeAttribute("aria-labelledby"),e.removeAttribute("aria-modal"),g(e,wt),V(e,{zIndex:i.zIndexInline}),this.viewerData=_({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){i.transition&&setTimeout(function(){f(a,C),f(r,C)},0)})}),this)},tooltip:function(){var t=this,i=this.options,e=this.tooltipBox,a=this.imageData;return!this.viewed||this.played||!i.tooltip?this:(e.textContent="".concat(Math.round(a.ratio*100),"%"),this.tooltipping?clearTimeout(this.tooltipping):i.transition?(this.fading&&I(e,L),f(e,B),f(e,ut),f(e,C),e.removeAttribute("aria-hidden"),e.initialOffsetWidth=e.offsetWidth,f(e,O)):(f(e,B),e.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){i.transition?(d(e,L,function(){g(e,B),g(e,ut),g(e,C),e.setAttribute("aria-hidden",!0),t.fading=!1},{once:!0}),g(e,O),t.fading=!0):(g(e,B),e.setAttribute("aria-hidden",!0)),t.tooltipping=!1},1e3),this)},toggle:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.imageData.ratio===1?this.zoomTo(this.imageData.oldRatio,!0,null,t):this.zoomTo(1,!0,null,t),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=_({},this.initialImageData),this.renderImage()),this},update:function(){var t=this,i=this.element,e=this.options,a=this.isImg;if(a&&!i.parentNode)return this.destroy();var r=[];if(y(a?[i]:i.querySelectorAll("img"),function(h){p(e.filter)?e.filter.call(t,h)&&r.push(h):t.getImageURL(h)&&r.push(h)}),!r.length)return this;if(this.images=r,this.length=r.length,this.ready){var s=[];if(y(this.items,function(h,l){var c=h.querySelector("img"),v=r[l];v&&c?(v.src!==c.src||v.alt!==c.alt)&&s.push(l):s.push(l)}),V(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var o=s.indexOf(this.index);if(o>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-o,this.length-1),0));else{var u=this.items[this.index];f(u,ht),u.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 t=this.element,i=this.options;return t[m]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),i.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)):i.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),i.inline||b(t,U,this.onStart),t[m]=void 0,this):this}},_e={getImageURL:function(t){var i=this.options.url;return at(i)?i=t.getAttribute(i):p(i)?i=i.call(this,t):i="",i},enforceFocus:function(){var t=this;this.clearEnforceFocus(),d(document,Lt,this.onFocusin=function(i){var e=t.viewer,a=i.target;if(!(a===document||a===e||e.contains(a))){for(;a;){if(a.getAttribute("tabindex")!==null||a.getAttribute("aria-modal")==="true")return;a=a.parentElement}e.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(b(document,Lt,this.onFocusin),this.onFocusin=null)},open:function(){var t=this.body;f(t,Ot),this.scrollbarWidth>0&&(t.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var t=this.body;g(t,Ot),this.scrollbarWidth>0&&(t.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var t=this.element,i=this.options,e=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,i.focus&&(e.focus(),this.enforceFocus()),p(i.shown)&&d(t,Xt,i.shown,{once:!0}),I(t,Xt)!==!1&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var t=this.element,i=this.options,e=this.viewer;i.fucus&&this.clearEnforceFocus(),this.close(),this.unbind(),f(e,Y),e.removeAttribute("role"),e.removeAttribute("aria-labelledby"),e.removeAttribute("aria-modal"),e.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(p(i.hidden)&&d(t,jt,i.hidden,{once:!0}),I(t,jt,null,{cancelable:!1}))},requestFullscreen:function(t){var i=this.element.ownerDocument;if(this.fulled&&!(i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement)){var e=i.documentElement;e.requestFullscreen?G(t)?e.requestFullscreen(t):e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()}},exitFullscreen:function(){var t=this.element.ownerDocument;this.fulled&&(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},change:function(t){var i=this.options,e=this.pointers,a=e[Object.keys(e)[0]];if(a){var r=a.endX-a.startX,s=a.endY-a.startY;switch(this.action){case lt:(r!==0||s!==0)&&(this.pointerMoved=!0,this.move(r,s,t));break;case et:this.zoom(De(e),!1,null,t);break;case kt:{this.action="switched";var o=Math.abs(r);o>1&&o>Math.abs(s)&&(this.pointers={},r>1?this.prev(i.loop):r<-1&&this.next(i.loop));break}}y(e,function(u){u.startX=u.endX,u.startY=u.endY})}},isSwitchable:function(){var t=this.imageData,i=this.viewerData;return this.length>1&&t.x>=0&&t.y>=0&&t.width<=i.width&&t.height<=i.height}},Oe=M.Viewer,ze=(function(n){return function(){return n+=1,n}})(-1),Dt=(function(){function n(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(tt(this,n),!t||t.nodeType!==1)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=_({},At,G(i)&&i),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=ze(),this.init()}return re(n,[{key:"init",value:function(){var i=this,e=this.element,a=this.options;if(!e[m]){e[m]=this,a.focus&&!a.keyboard&&(a.focus=!1);var r=e.localName==="img",s=[];if(y(r?[e]:e.querySelectorAll("img"),function(h){p(a.filter)?a.filter.call(i,h)&&s.push(h):i.getImageURL(h)&&s.push(h)}),this.isImg=r,this.length=s.length,this.images=s,this.initBody(),K(document.createElement(m).style.transition)&&(a.transition=!1),a.inline){var o=0,u=function(){if(o+=1,o===i.length){var l;i.initializing=!1,i.delaying={abort:function(){clearTimeout(l)}},l=setTimeout(function(){i.delaying=!1,i.build()},0)}};this.initializing={abort:function(){y(s,function(l){l.complete||(b(l,z,u),b(l,W,u))})}},y(s,function(h){if(h.complete)u();else{var l,c;d(h,z,l=function(){b(h,W,c),u()},{once:!0}),d(h,W,c=function(){b(h,z,l),u()},{once:!0})}})}else d(e,U,this.onStart=function(h){var l=h.target;l.localName==="img"&&(!p(a.filter)||a.filter.call(i,l))&&i.view(i.images.indexOf(l))})}}},{key:"build",value:function(){if(!this.ready){var i=this.element,e=this.options,a=i.parentNode,r=document.createElement("div");r.innerHTML=le;var s=r.querySelector(".".concat(m,"-container")),o=s.querySelector(".".concat(m,"-title")),u=s.querySelector(".".concat(m,"-toolbar")),h=s.querySelector(".".concat(m,"-navbar")),l=s.querySelector(".".concat(m,"-button")),c=s.querySelector(".".concat(m,"-canvas"));if(this.parent=a,this.viewer=s,this.title=o,this.toolbar=u,this.navbar=h,this.button=l,this.canvas=c,this.footer=s.querySelector(".".concat(m,"-footer")),this.tooltipBox=s.querySelector(".".concat(m,"-tooltip")),this.player=s.querySelector(".".concat(m,"-player")),this.list=s.querySelector(".".concat(m,"-list")),s.id="".concat(m).concat(this.id),o.id="".concat(m,"Title").concat(this.id),f(o,e.title?mt(Array.isArray(e.title)?e.title[0]:e.title):Y),f(h,e.navbar?mt(e.navbar):Y),rt(l,Y,!e.button),e.keyboard&&l.setAttribute("tabindex",0),e.backdrop&&(f(s,"".concat(m,"-backdrop")),!e.inline&&e.backdrop!=="static"&&St(c,ct,"hide")),at(e.className)&&e.className&&e.className.split(Et).forEach(function(E){f(s,E)}),e.toolbar){var v=document.createElement("ul"),x=G(e.toolbar),D=ft.slice(0,3),S=ft.slice(7,9),N=ft.slice(9);x||f(u,mt(e.toolbar)),y(x?e.toolbar:ft,function(E,F){var H=x&&G(E),R=x?Tt(F):E,X=H&&!K(E.show)?E.show:E;if(!(!X||!e.zoomable&&D.indexOf(R)!==-1||!e.rotatable&&S.indexOf(R)!==-1||!e.scalable&&N.indexOf(R)!==-1)){var st=H&&!K(E.size)?E.size:E,Q=H&&!K(E.click)?E.click:E,P=document.createElement("li");e.keyboard&&P.setAttribute("tabindex",0),P.setAttribute("role","button"),f(P,"".concat(m,"-").concat(R)),p(Q)||St(P,ct,R),T(X)&&f(P,mt(X)),["small","large"].indexOf(st)!==-1?f(P,"".concat(m,"-").concat(st)):R==="play"&&f(P,"".concat(m,"-large")),p(Q)&&d(P,U,Q),v.appendChild(P)}}),u.appendChild(v)}else f(u,Y);if(!e.rotatable){var A=u.querySelectorAll('li[class*="rotate"]');f(A,it),y(A,function(E){u.appendChild(E)})}if(e.inline)f(l,ue),V(s,{zIndex:e.zIndexInline}),window.getComputedStyle(a).position==="static"&&V(a,{position:"relative"}),a.insertBefore(s,i.nextSibling);else{f(l,he),f(s,wt),f(s,ut),f(s,Y),V(s,{zIndex:e.zIndex});var k=e.container;at(k)&&(k=i.ownerDocument.querySelector(k)),k||(k=this.body),k.appendChild(s)}if(e.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,p(e.ready)&&d(i,Wt,e.ready,{once:!0}),I(i,Wt)===!1){this.ready=!1;return}this.ready&&e.inline&&this.view(this.index)}}}],[{key:"noConflict",value:function(){return window.Viewer=Oe,n}},{key:"setDefaults",value:function(i){_(At,G(i)&&i)}}])})();_(Dt.prototype,xe,Ne,Ae,ke,_e);const Le=(n,t)=>{const i=n.__vccOpts||n;for(const[e,a]of t)i[e]=a;return i},Ve={name:"boka-human-v2",props:{token:{type:String,default:""},product:{type:String,default:""},subCustType:{type:String,default:""},source:{type:String,default:""}},computed:{host(){let{product:n,subCustType:t}=this;return n.toLowerCase()==="mase"||n.toLowerCase()==="aime"&&t==="overseas"?"https://service.mase.cloud":"https://human.shboka.com"},src(){let{token:n,product:t,subCustType:i,source:e}=this;return`${this.host}?token=${n}&product=${t}&subCustType=${i}&source=${e}&human=1&isIFrame=true&time=${new Date().getTime()}`}},data(){return{visible:!1,unreadCount:0}},mounted(){window.humanFunction={showChatView:this.showChat};let n=document.querySelector("#iframe");n.onload=function(){n.contentWindow.postMessage({from:"human",info:{isFrame:!0}},"*")},window.addEventListener("message",t=>{let{origin:i,data:e}=t;if(i==this.host&&e.from=="humanFrame"){console.log("外部[收到]了===>>>>",e.info);let{info:a}=e,{type:r,data:s}=a;if(r=="img")this.showImg(s);else if(r=="unreadCountChange"){let{count:o,type:u}=a.data;u=="add"&&!this.visible&&(this.unreadCount+=o)}}})},methods:{showChat(n=!0){this.visible=n},changeChatViewVisible(){this.visible=!this.visible,this.visible&&(this.unreadCount=0)},showImg(n,t){let i=new Image;i.src=n,new Dt(i,{inline:!1,navbar:!1,title:!1}).show()},showVideo(n,t){const i=document.createElement("video");i.src=n,i.controls=!0,new Dt(i,{inline:!1,navbar:!1,title:!1}).show()}}},Re={class:"boka-human-v2"},Me={key:0,t:"1755741820144",viewBox:"0 0 1051 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1470",width:"32",height:"32"},Fe={class:"humanMainView"},Pe={class:"humanMainHeader my-dialog__header"},Ye={class:"humanMainHeaderRight"},We=["src"];function He(n,t,i,e,a,r){return w.openBlock(),w.createElementBlock("div",Re,[w.createElementVNode("div",{class:w.normalizeClass(["humanEnterIcon",[a.unreadCount>0?"unreadCount":""]]),id:"humanEnterIcon",onClick:t[0]||(t[0]=(...s)=>r.changeChatViewVisible&&r.changeChatViewVisible(...s))},[a.unreadCount<1?(w.openBlock(),w.createElementBlock("svg",Me,[...t[2]||(t[2]=[w.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"},null,-1)])])):(w.openBlock(),w.createElementBlock(w.Fragment,{key:1},[w.createTextVNode(w.toDisplayString(a.unreadCount>99?"99+":a.unreadCount),1)],64))],2),w.withDirectives(w.createElementVNode("div",Fe,[w.createElementVNode("div",Pe,[t[3]||(t[3]=w.createElementVNode("div",{class:"humanMainHeaderLeft"},null,-1)),t[4]||(t[4]=w.createElementVNode("div",{class:"humanMainHeaderCenter"},"客服",-1)),w.createElementVNode("div",Ye,[w.createElementVNode("span",{onClick:t[1]||(t[1]=s=>a.visible=!a.visible)},"关闭")])]),w.createElementVNode("iframe",{id:"iframe",src:r.src,frameborder:"0",allowfullscreen:""},null,8,We)],512),[[w.vShow,a.visible]])])}return Le(Ve,[["render",He],["__scopeId","data-v-594c3975"]])}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boka-human-cliend-v3",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "main": "dist/boka-human-v3.umd.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -15,7 +15,6 @@
15
15
  "@vitejs/plugin-vue": "^6.0.1",
16
16
  "vite": "^7.0.6",
17
17
  "vite-plugin-vue-devtools": "^8.0.0",
18
- "interactjs": "^1.10.27",
19
18
  "viewerjs": "^1.11.7"
20
19
  }
21
20
  }