14 lines
108 KiB
JavaScript
14 lines
108 KiB
JavaScript
/**
|
|
* vue-grid-layout-v3 3.1.2
|
|
* coffeebi <merfais.bwq@163.com>
|
|
* https://github.com/merfais/vue-grid-layout-v3
|
|
*/
|
|
var VueGridLayout=function(Mt,b){"use strict";var ke=document.createElement("style");ke.textContent=`.vue-grid-item[data-v-99aff433]{transition:all .2s ease;transition-property:left,top,right}.vue-grid-item.no-touch[data-v-99aff433]{touch-action:none}.vue-grid-item.cssTransforms[data-v-99aff433]{transition-property:transform;left:0;right:auto}.vue-grid-item.cssTransforms.render-rtl[data-v-99aff433]{left:auto;right:0}.vue-grid-item.resizing[data-v-99aff433]{opacity:.6;z-index:3}.vue-grid-item.vue-draggable-dragging[data-v-99aff433]{transition:none;z-index:3}.vue-grid-item.vue-grid-placeholder[data-v-99aff433]{background:red;opacity:.2;transition-duration:.1s;z-index:2;-webkit-user-select:none;user-select:none}.vue-grid-item>.vue-resizable-handle[data-v-99aff433]{position:absolute;width:20px;height:20px;bottom:0;right:0;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg08IS0tIEdlbmVyYXRvcjogQWRvYmUgRmlyZXdvcmtzIENTNiwgRXhwb3J0IFNWRyBFeHRlbnNpb24gYnkgQWFyb24gQmVhbGwgKGh0dHA6Ly9maXJld29ya3MuYWJlYWxsLmNvbSkgLiBWZXJzaW9uOiAwLjYuMSAgLS0+DTwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DTxzdmcgaWQ9IlVudGl0bGVkLVBhZ2UlMjAxIiB2aWV3Qm94PSIwIDAgNiA2IiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjojZmZmZmZmMDAiIHZlcnNpb249IjEuMSINCXhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiDQl4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjZweCIgaGVpZ2h0PSI2cHgiDT4NCTxnIG9wYWNpdHk9IjAuMzAyIj4NCQk8cGF0aCBkPSJNIDYgNiBMIDAgNiBMIDAgNC4yIEwgNCA0LjIgTCA0LjIgNC4yIEwgNC4yIDAgTCA2IDAgTCA2IDYgTCA2IDYgWiIgZmlsbD0iIzAwMDAwMCIvPg0JPC9nPg08L3N2Zz4=);background-position:bottom right;padding:0 3px 3px 0;background-repeat:no-repeat;background-origin:content-box;box-sizing:border-box;cursor:se-resize}.vue-grid-item>.vue-rtl-resizable-handle[data-v-99aff433]{bottom:0;left:0;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAuMDAwMDAwMDAwMDAwMDAyIiBoZWlnaHQ9IjEwLjAwMDAwMDAwMDAwMDAwMiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KIDwhLS0gQ3JlYXRlZCB3aXRoIE1ldGhvZCBEcmF3IC0gaHR0cDovL2dpdGh1Yi5jb20vZHVvcGl4ZWwvTWV0aG9kLURyYXcvIC0tPgogPGc+CiAgPHRpdGxlPmJhY2tncm91bmQ8L3RpdGxlPgogIDxyZWN0IGZpbGw9Im5vbmUiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgaGVpZ2h0PSIxMiIgd2lkdGg9IjEyIiB5PSItMSIgeD0iLTEiLz4KICA8ZyBkaXNwbGF5PSJub25lIiBvdmVyZmxvdz0idmlzaWJsZSIgeT0iMCIgeD0iMCIgaGVpZ2h0PSIxMDAlIiB3aWR0aD0iMTAwJSIgaWQ9ImNhbnZhc0dyaWQiPgogICA8cmVjdCBmaWxsPSJ1cmwoI2dyaWRwYXR0ZXJuKSIgc3Ryb2tlLXdpZHRoPSIwIiB5PSIwIiB4PSIwIiBoZWlnaHQ9IjEwMCUiIHdpZHRoPSIxMDAlIi8+CiAgPC9nPgogPC9nPgogPGc+CiAgPHRpdGxlPkxheWVyIDE8L3RpdGxlPgogIDxsaW5lIGNhbnZhcz0iI2ZmZmZmZiIgY2FudmFzLW9wYWNpdHk9IjEiIHN0cm9rZS1saW5lY2FwPSJ1bmRlZmluZWQiIHN0cm9rZS1saW5lam9pbj0idW5kZWZpbmVkIiBpZD0ic3ZnXzEiIHkyPSItNzAuMTc4NDA3IiB4Mj0iMTI0LjQ2NDE3NSIgeTE9Ii0zOC4zOTI3MzciIHgxPSIxNDQuODIxMjg5IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlPSIjMDAwIiBmaWxsPSJub25lIi8+CiAgPGxpbmUgc3Ryb2tlPSIjNjY2NjY2IiBzdHJva2UtbGluZWNhcD0idW5kZWZpbmVkIiBzdHJva2UtbGluZWpvaW49InVuZGVmaW5lZCIgaWQ9InN2Z181IiB5Mj0iOS4xMDY5NTciIHgyPSIwLjk0NzI0NyIgeTE9Ii0wLjAxODEyOCIgeDE9IjAuOTQ3MjQ3IiBzdHJva2Utd2lkdGg9IjIiIGZpbGw9Im5vbmUiLz4KICA8bGluZSBzdHJva2UtbGluZWNhcD0idW5kZWZpbmVkIiBzdHJva2UtbGluZWpvaW49InVuZGVmaW5lZCIgaWQ9InN2Z183IiB5Mj0iOSIgeDI9IjEwLjA3MzUyOSIgeTE9IjkiIHgxPSItMC42NTU2NCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2U9IiM2NjY2NjYiIGZpbGw9Im5vbmUiLz4KIDwvZz4KPC9zdmc+);background-position:bottom left;padding-left:3px;background-repeat:no-repeat;background-origin:content-box;cursor:sw-resize;right:auto}.vue-grid-item.disable-userselect[data-v-99aff433]{-webkit-user-select:none;user-select:none}.vue-grid-layout[data-v-a10aee95]{position:relative;transition:height .2s ease}
|
|
/*$vite$:1*/`,document.head.appendChild(ke);const G={init:ti,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Tt(){}function ti(e){const t=e;G.document=t.document,G.DocumentFragment=t.DocumentFragment||Tt,G.SVGElement=t.SVGElement||Tt,G.SVGSVGElement=t.SVGSVGElement||Tt,G.SVGElementInstance=t.SVGElementInstance||Tt,G.Element=t.Element||Tt,G.HTMLElement=t.HTMLElement||G.Element,G.Event=t.Event,G.Touch=t.Touch||Tt,G.PointerEvent=t.PointerEvent||t.MSPointerEvent}var _e=e=>!!(e&&e.Window)&&e instanceof e.Window;let Re,ut;function Oe(e){Re=e;const t=e.document.createTextNode("");t.ownerDocument!==e.document&&typeof e.wrap=="function"&&e.wrap(t)===t&&(e=e.wrap(e)),ut=e}typeof window<"u"&&window&&Oe(window);function mt(e){return _e(e)?e:(e.ownerDocument||e).defaultView||ut.window}const ei=e=>e===ut||_e(e),ni=e=>Gt(e)&&e.nodeType===11,Gt=e=>!!e&&typeof e=="object",He=e=>typeof e=="function";var p={window:ei,docFrag:ni,object:Gt,func:He,number:e=>typeof e=="number",bool:e=>typeof e=="boolean",string:e=>typeof e=="string",element:e=>{if(!e||typeof e!="object")return!1;const t=mt(e)||ut;return/object|function/.test(typeof Element)?e instanceof Element||e instanceof t.Element:e.nodeType===1&&typeof e.nodeName=="string"},plainObject:e=>Gt(e)&&!!e.constructor&&/function Object\b/.test(e.constructor.toString()),array:e=>Gt(e)&&typeof e.length<"u"&&He(e.splice)};const Z={init:ii,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function ii(e){const t=G.Element,n=e.navigator||{};Z.supportsTouch="ontouchstart"in e||p.func(e.DocumentTouch)&&G.document instanceof e.DocumentTouch,Z.supportsPointerEvent=n.pointerEnabled!==!1&&!!G.PointerEvent,Z.isIOS=/iP(hone|od|ad)/.test(n.platform),Z.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),Z.isIe9=/MSIE 9/.test(n.userAgent),Z.isOperaMobile=n.appName==="Opera"&&Z.supportsTouch&&/Presto/.test(n.userAgent),Z.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",Z.pEventTypes=Z.supportsPointerEvent?G.PointerEvent===e.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,Z.wheelEvent=G.document&&"onmousewheel"in G.document?"mousewheel":"wheel"}const We=(e,t)=>{for(const n of t)e.push(n);return e},Le=e=>We([],e),Zt=(e,t)=>{for(let n=0;n<e.length;n++)if(t(e[n],n,e))return n;return-1},qt=(e,t)=>e[Zt(e,t)];function Ct(e){const t={};for(const n in e){const i=e[n];p.plainObject(i)?t[n]=Ct(i):p.array(i)?t[n]=Le(i):t[n]=i}return t}function I(e,t){for(const i in t)e[i]=t[i];return e}let Ne=0,rt,yt;function ri(e){if(rt=e.requestAnimationFrame,yt=e.cancelAnimationFrame,!rt){const t=["ms","moz","webkit","o"];for(const n of t)rt=e[`${n}RequestAnimationFrame`],yt=e[`${n}CancelAnimationFrame`]||e[`${n}CancelRequestAnimationFrame`]}rt=rt&&rt.bind(e),yt=yt&&yt.bind(e),rt||(rt=t=>{const n=Date.now(),i=Math.max(0,16-(n-Ne)),o=e.setTimeout(()=>{t(n+i)},i);return Ne=n+i,o},yt=t=>clearTimeout(t))}var Pt={request:e=>rt(e),cancel:e=>yt(e),init:ri};function bt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o=>!0,i=arguments.length>3?arguments[3]:void 0;if(i=i||{},p.string(e)&&e.search(" ")!==-1&&(e=Be(e)),p.array(e))return e.forEach(o=>bt(o,t,n,i)),i;if(p.object(e)&&(t=e,e=""),p.func(t)&&n(e))i[e]=i[e]||[],i[e].push(t);else if(p.array(t))for(const o of t)bt(e,o,n,i);else if(p.object(t))for(const o in t){const s=Be(o).map(a=>`${e}${a}`);bt(s,t[o],n,i)}return i}function Be(e){return e.trim().split(/ +/)}function je(e,t){for(const n of t){if(e.immediatePropagationStopped)break;n(e)}}class $e{constructor(t){this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=I({},t||{})}fire(t){let n;const i=this.global;(n=this.types[t.type])&&je(t,n),!t.propagationStopped&&i&&(n=i[t.type])&&je(t,n)}on(t,n){const i=bt(t,n);for(t in i)this.types[t]=We(this.types[t]||[],i[t])}off(t,n){const i=bt(t,n);for(t in i){const o=this.types[t];if(!(!o||!o.length))for(const s of i[t]){const a=o.indexOf(s);a!==-1&&o.splice(a,1)}}}getRect(t){return null}}function vt(e,t){if(e.contains)return e.contains(t);for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Fe(e,t){for(;p.element(e);){if(xt(e,t))return e;e=dt(e)}return null}function dt(e){let t=e.parentNode;if(p.docFrag(t)){for(;(t=t.host)&&p.docFrag(t););return t}return t}function xt(e,t){return ut!==Re&&(t=t.replace(/\/deep\//g," ")),e[Z.prefixedMatchesSelector](t)}function ce(e,t,n){for(;p.element(e);){if(xt(e,t))return!0;if(e=dt(e),e===n)return xt(e,t)}return!1}function Ye(e){return e.correspondingUseElement||e}function oi(e){return e=e||ut,{x:e.scrollX||e.document.documentElement.scrollLeft,y:e.scrollY||e.document.documentElement.scrollTop}}function le(e){const t=e instanceof G.SVGElement?e.getBoundingClientRect():e.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function ue(e){const t=le(e);if(!Z.isIOS7&&t){const n=oi(mt(e));t.left+=n.x,t.right+=n.x,t.top+=n.y,t.bottom+=n.y}return t}function Xe(e){return p.string(e)?(G.document.querySelector(e),!0):!1}const si=["webkit","moz"];function Ge(e,t){e.__set||(e.__set={});for(const n in t)si.some(i=>n.indexOf(i)===0)||typeof e[n]!="function"&&n!=="__set"&&Object.defineProperty(e,n,{get(){return n in e.__set?e.__set[n]:e.__set[n]=t[n]},set(i){e.__set[n]=i},configurable:!0});return e}var Ut=(e,t)=>Math.sqrt(e*e+t*t);function de(e,t){e.page=e.page||{},e.page.x=t.page.x,e.page.y=t.page.y,e.client=e.client||{},e.client.x=t.client.x,e.client.y=t.client.y,e.timeStamp=t.timeStamp}function ai(e,t,n){e.page.x=n.page.x-t.page.x,e.page.y=n.page.y-t.page.y,e.client.x=n.client.x-t.client.x,e.client.y=n.client.y-t.client.y,e.timeStamp=n.timeStamp-t.timeStamp}function ci(e,t){const n=Math.max(t.timeStamp/1e3,.001);e.page.x=t.page.x/n,e.page.y=t.page.y/n,e.client.x=t.client.x/n,e.client.y=t.client.y/n,e.timeStamp=n}function li(e){e.page.x=0,e.page.y=0,e.client.x=0,e.client.y=0}function Ze(e){return e instanceof G.Event||e instanceof G.Touch}function Vt(e,t,n){return n=n||{},e=e||"page",n.x=t[e+"X"],n.y=t[e+"Y"],n}function ui(e,t){return t=t||{x:0,y:0},Z.isOperaMobile&&Ze(e)?(Vt("screen",e,t),t.x+=window.scrollX,t.y+=window.scrollY):Vt("page",e,t),t}function di(e,t){return t=t||{},Z.isOperaMobile&&Ze(e)?Vt("screen",e,t):Vt("client",e,t),t}function Jt(e){return p.number(e.pointerId)?e.pointerId:e.identifier}function fi(e,t,n){const i=t.length>1?qe(t):t[0];ui(i,e.page),di(i,e.client),e.timeStamp=n}function fe(e){const t=[];return p.array(e)?(t[0]=e[0],t[1]=e[1]):e.type==="touchend"?e.touches.length===1?(t[0]=e.touches[0],t[1]=e.changedTouches[0]):e.touches.length===0&&(t[0]=e.changedTouches[0],t[1]=e.changedTouches[1]):(t[0]=e.touches[0],t[1]=e.touches[1]),t}function qe(e){const t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0};for(const n of e)for(const i in t)t[i]+=n[i];for(const n in t)t[n]/=e.length;return t}function hi(e){if(!e.length)return null;const t=fe(e),n=Math.min(t[0].pageX,t[1].pageX),i=Math.min(t[0].pageY,t[1].pageY),o=Math.max(t[0].pageX,t[1].pageX),s=Math.max(t[0].pageY,t[1].pageY);return{x:n,y:i,left:n,top:i,right:o,bottom:s,width:o-n,height:s-i}}function pi(e,t){const n=t+"X",i=t+"Y",o=fe(e),s=o[0][n]-o[1][n],a=o[0][i]-o[1][i];return Ut(s,a)}function gi(e,t){const n=t+"X",i=t+"Y",o=fe(e),s=o[1][n]-o[0][n],a=o[1][i]-o[0][i];return 180*Math.atan2(a,s)/Math.PI}function mi(e){return p.string(e.pointerType)?e.pointerType:p.number(e.pointerType)?[void 0,void 0,"touch","pen","mouse"][e.pointerType]:/touch/.test(e.type||"")||e instanceof G.Touch?"touch":"mouse"}function Ue(e){const t=p.func(e.composedPath)?e.composedPath():e.path;return[Ye(t?t[0]:e.target),Ye(e.currentTarget)]}function Rt(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}function yi(e){var t;const n=[],i={},o=[],s={add:a,remove:l,addDelegate:c,removeDelegate:r,delegateListener:d,delegateUseCapture:f,delegatedEvents:i,documents:o,targets:n,supportsOptions:!1,supportsPassive:!1};(t=e.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return s.supportsOptions=!0},get passive(){return s.supportsPassive=!0}}),e.events=s;function a(m,g,x,P){if(!m.addEventListener)return;const O=Ot(P);let H=qt(n,E=>E.eventTarget===m);H||(H={eventTarget:m,events:{}},n.push(H)),H.events[g]||(H.events[g]=[]),qt(H.events[g],E=>E.func===x&&Kt(E.options,O))||(m.addEventListener(g,x,s.supportsOptions?O:O.capture),H.events[g].push({func:x,options:O}))}function l(m,g,x,P){if(!m.addEventListener||!m.removeEventListener)return;const O=Zt(n,y=>y.eventTarget===m),H=n[O];if(!H||!H.events)return;if(g==="all"){for(g in H.events)H.events.hasOwnProperty(g)&&l(m,g,"all");return}let E=!1;const A=H.events[g];if(A)if(x==="all"){for(let y=A.length-1;y>=0;y--){const u=A[y];l(m,g,u.func,u.options)}return}else{const y=Ot(P);for(let u=0;u<A.length;u++){const S=A[u];if(S.func===x&&Kt(S.options,y)){m.removeEventListener(g,x,s.supportsOptions?y:y.capture),A.splice(u,1),A.length===0&&(delete H.events[g],E=!0);break}}}E&&!Object.keys(H.events).length&&n.splice(O,1)}function c(m,g,x,P,O){const H=Ot(O);if(!i[x]){i[x]=[];for(const y of o)a(y,x,d),a(y,x,f,!0)}const E=i[x];let A=qt(E,y=>y.selector===m&&y.context===g);A||(A={selector:m,context:g,listeners:[]},E.push(A)),A.listeners.push({func:P,options:H})}function r(m,g,x,P,O){const H=Ot(O),E=i[x];let A=!1,y;if(E)for(y=E.length-1;y>=0;y--){const u=E[y];if(u.selector===m&&u.context===g){const{listeners:S}=u;for(let v=S.length-1;v>=0;v--){const M=S[v];if(M.func===P&&Kt(M.options,H)){S.splice(v,1),S.length||(E.splice(y,1),l(g,x,d),l(g,x,f,!0)),A=!0;break}}if(A)break}}}function d(m,g){const x=Ot(g),P=new bi(m),O=i[m.type],[H]=Ue(m);let E=H;for(;p.element(E);){for(let A=0;A<O.length;A++){const y=O[A],{selector:u,context:S}=y;if(xt(E,u)&&vt(S,H)&&vt(S,E)){const{listeners:v}=y;P.currentTarget=E;for(const M of v)Kt(M.options,x)&&M.func(P)}}E=dt(E)}}function f(m){return d.call(this,m,!0)}return s}class bi{constructor(t){this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,Ge(this,t)}preventOriginalDefault(){this.originalEvent.preventDefault()}stopPropagation(){this.originalEvent.stopPropagation()}stopImmediatePropagation(){this.originalEvent.stopImmediatePropagation()}}function Ot(e){return p.object(e)?{capture:!!e.capture,passive:!!e.passive}:{capture:!!e,passive:!1}}function Kt(e,t){return e===t?!0:typeof e=="boolean"?!!t.capture===e&&!t.passive:!!e.capture==!!t.capture&&!!e.passive==!!t.passive}var vi={id:"events",install:yi};const xi=function(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):p.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault};function wi(e,t,n){const i=e.options.preventDefault;if(i!=="never"){if(i==="always"){n.preventDefault();return}if(t.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){const o=mt(n.target).document,s=t.getDocOptions(o);if(!(s&&s.events)||s.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||p.element(n.target)&&xt(n.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||n.preventDefault()}}function Si(e){let{interaction:t,event:n}=e;t.interactable&&t.interactable.checkAndPreventDefault(n)}function Ii(e){const{Interactable:t}=e;t.prototype.preventDefault=xi,t.prototype.checkAndPreventDefault=function(n){return wi(this,e,n)},e.interactions.docEvents.push({type:"dragstart",listener(n){for(const i of e.interactions.list)if(i.element&&(i.element===n.target||vt(i.element,n.target))){i.interactable.checkAndPreventDefault(n);return}}})}var Ei={id:"core/interactablePreventDefault",install:Ii,listeners:["down","move","up","cancel"].reduce((e,t)=>(e[`interactions:${t}`]=Si,e),{})};function Ht(e,t){let n=!1;return function(){return n||(ut.console.warn(t),n=!0),e.apply(this,arguments)}}function Ve(e,t){return e.name=t.name,e.axis=t.axis,e.edges=t.edges,e}function Je(e,t,n){return e==="parent"?dt(n):e==="self"?t.getRect(n):Fe(n,e)}function Wt(e,t,n,i){let o=e;return p.string(o)?o=Je(o,t,n):p.func(o)&&(o=o(...i)),p.element(o)&&(o=ue(o)),o}function Qt(e){return e&&{x:"x"in e?e.x:e.left,y:"y"in e?e.y:e.top}}function zi(e){return e&&!("left"in e&&"top"in e)&&(e=I({},e),e.left=e.x||0,e.top=e.y||0,e.right=e.right||e.left+e.width,e.bottom=e.bottom||e.top+e.height),e}function Ke(e){return e&&!("x"in e&&"y"in e)&&(e=I({},e),e.x=e.left||0,e.y=e.top||0,e.width=e.width||(e.right||0)-e.x,e.height=e.height||(e.bottom||0)-e.y),e}function he(e,t,n){e.left&&(t.left+=n.x),e.right&&(t.right+=n.x),e.top&&(t.top+=n.y),e.bottom&&(t.bottom+=n.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function pe(e,t,n){const i=n&&e.options[n],s=i&&i.origin||e.options.origin,a=Wt(s,e,t,[e&&t]);return Qt(a)||{x:0,y:0}}class Qe{constructor(t){this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}Object.defineProperty(Qe.prototype,"interaction",{get(){return this._interaction._proxy},set(){}});const tn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};class ge extends Qe{constructor(t,n,i,o,s,a,l){super(t),this.relatedTarget=null,this.screenX=void 0,this.screenY=void 0,this.button=void 0,this.buttons=void 0,this.ctrlKey=void 0,this.shiftKey=void 0,this.altKey=void 0,this.metaKey=void 0,this.page=void 0,this.client=void 0,this.delta=void 0,this.rect=void 0,this.x0=void 0,this.y0=void 0,this.t0=void 0,this.dt=void 0,this.duration=void 0,this.clientX0=void 0,this.clientY0=void 0,this.velocity=void 0,this.speed=void 0,this.swipe=void 0,this.axes=void 0,this.preEnd=void 0,s=s||t.element;const c=t.interactable,r=(c&&c.options||tn).deltaSource,d=pe(c,s,i),f=o==="start",m=o==="end",g=f?this:t.prevEvent,x=f?t.coords.start:m?{page:g.page,client:g.client,timeStamp:t.coords.cur.timeStamp}:t.coords.cur;this.page=I({},x.page),this.client=I({},x.client),this.rect=I({},t.rect),this.timeStamp=x.timeStamp,m||(this.page.x-=d.x,this.page.y-=d.y,this.client.x-=d.x,this.client.y-=d.y),this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.button=n.button,this.buttons=n.buttons,this.target=s,this.currentTarget=s,this.preEnd=a,this.type=l||i+(o||""),this.interactable=c,this.t0=f?t.pointers[t.pointers.length-1].downTime:g.t0,this.x0=t.coords.start.page.x-d.x,this.y0=t.coords.start.page.y-d.y,this.clientX0=t.coords.start.client.x-d.x,this.clientY0=t.coords.start.client.y-d.y,f||m?this.delta={x:0,y:0}:this.delta={x:this[r].x-g[r].x,y:this[r].y-g[r].y},this.dt=t.coords.delta.timeStamp,this.duration=this.timeStamp-this.t0,this.velocity=I({},t.coords.velocity[r]),this.speed=Ut(this.velocity.x,this.velocity.y),this.swipe=m||o==="inertiastart"?this.getSwipe():null}getSwipe(){const t=this._interaction;if(t.prevEvent.speed<600||this.timeStamp-t.prevEvent.timeStamp>150)return null;let n=180*Math.atan2(t.prevEvent.velocityY,t.prevEvent.velocityX)/Math.PI;const i=22.5;n<0&&(n+=360);const o=135-i<=n&&n<225+i,s=225-i<=n&&n<315+i,a=!o&&(315-i<=n||n<45+i),l=!s&&45-i<=n&&n<135+i;return{up:s,down:l,left:o,right:a,angle:n,speed:t.prevEvent.speed,velocity:{x:t.prevEvent.velocityX,y:t.prevEvent.velocityY}}}preventDefault(){}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}stopPropagation(){this.propagationStopped=!0}}Object.defineProperties(ge.prototype,{pageX:{get(){return this.page.x},set(e){this.page.x=e}},pageY:{get(){return this.page.y},set(e){this.page.y=e}},clientX:{get(){return this.client.x},set(e){this.client.x=e}},clientY:{get(){return this.client.y},set(e){this.client.y=e}},dx:{get(){return this.delta.x},set(e){this.delta.x=e}},dy:{get(){return this.delta.y},set(e){this.delta.y=e}},velocityX:{get(){return this.velocity.x},set(e){this.velocity.x=e}},velocityY:{get(){return this.velocity.y},set(e){this.velocity.y=e}}});class Di{constructor(t,n,i,o,s){this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=n,this.event=i,this.downTime=o,this.downTarget=s}}let Mi=function(e){return e.interactable="",e.element="",e.prepared="",e.pointerIsDown="",e.pointerWasMoved="",e._proxy="",e}({}),Ti=function(e){return e.start="",e.move="",e.end="",e.stop="",e.interacting="",e}({}),Ci=0;class Pi{get pointerMoveTolerance(){return 1}constructor(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=Ht(function(s){this.move(s)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:Rt(),prev:Rt(),cur:Rt(),delta:Rt(),velocity:Rt()},this._id=Ci++;let{pointerType:n,scopeFire:i}=t;this._scopeFire=i,this.pointerType=n;const o=this;this._proxy={};for(const s in Mi)Object.defineProperty(this._proxy,s,{get(){return o[s]}});for(const s in Ti)Object.defineProperty(this._proxy,s,{value:function(){return o[s](...arguments)}});this._scopeFire("interactions:new",{interaction:this})}pointerDown(t,n,i){const o=this.updatePointer(t,n,i,!0),s=this.pointers[o];this._scopeFire("interactions:down",{pointer:t,event:n,eventTarget:i,pointerIndex:o,pointerInfo:s,type:"down",interaction:this})}start(t,n,i){return this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!n.options[t.name].enabled?!1:(Ve(this.prepared,t),this.interactable=n,this.element=i,this.rect=n.getRect(i),this.edges=this.prepared.edges?I({},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)}pointerMove(t,n,i){!this.simulation&&!(this.modification&&this.modification.endResult)&&this.updatePointer(t,n,i,!1);const o=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;let s,a;this.pointerIsDown&&!this.pointerWasMoved&&(s=this.coords.cur.client.x-this.coords.start.client.x,a=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Ut(s,a)>this.pointerMoveTolerance);const l=this.getPointerIndex(t),c={pointer:t,pointerIndex:l,pointerInfo:this.pointers[l],event:n,type:"move",eventTarget:i,dx:s,dy:a,duplicate:o,interaction:this};o||ci(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",c),!o&&!this.simulation&&(this.interacting()&&(c.type=null,this.move(c)),this.pointerWasMoved&&de(this.coords.prev,this.coords.cur))}move(t){(!t||!t.event)&&li(this.coords.delta),t=I({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{}),t.phase="move",this._doPhase(t)}pointerUp(t,n,i,o){let s=this.getPointerIndex(t);s===-1&&(s=this.updatePointer(t,n,i,!1));const a=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire(`interactions:${a}`,{pointer:t,pointerIndex:s,pointerInfo:this.pointers[s],event:n,eventTarget:i,type:a,curEventTarget:o,interaction:this}),this.simulation||this.end(n),this.removePointer(t,n)}documentBlur(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}end(t){this._ending=!0,t=t||this._latestPointer.event;let n;this.interacting()&&(n=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,n===!0&&this.stop()}currentAction(){return this._interacting?this.prepared.name:null}interacting(){return this._interacting}stop(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}getPointerIndex(t){const n=Jt(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Zt(this.pointers,i=>i.id===n)}getPointerInfo(t){return this.pointers[this.getPointerIndex(t)]}updatePointer(t,n,i,o){const s=Jt(t);let a=this.getPointerIndex(t),l=this.pointers[a];return o=o===!1?!1:o||/(down|start)$/i.test(n.type),l?l.pointer=t:(l=new Di(s,t,n,null,null),a=this.pointers.length,this.pointers.push(l)),fi(this.coords.cur,this.pointers.map(c=>c.pointer),this._now()),ai(this.coords.delta,this.coords.prev,this.coords.cur),o&&(this.pointerIsDown=!0,l.downTime=this.coords.cur.timeStamp,l.downTarget=i,Ge(this.downPointer,t),this.interacting()||(de(this.coords.start,this.coords.cur),de(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(t,n,i),this._scopeFire("interactions:update-pointer",{pointer:t,event:n,eventTarget:i,down:o,pointerInfo:l,pointerIndex:a,interaction:this}),a}removePointer(t,n){const i=this.getPointerIndex(t);if(i===-1)return;const o=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:t,event:n,eventTarget:null,pointerIndex:i,pointerInfo:o,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}_updateLatestPointer(t,n,i){this._latestPointer.pointer=t,this._latestPointer.event=n,this._latestPointer.eventTarget=i}destroy(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}_createPreparedEvent(t,n,i,o){return new ge(this,t,this.prepared.name,n,this.element,i,o)}_fireEvent(t){var n;(n=this.interactable)==null||n.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}_doPhase(t){const{event:n,phase:i,preEnd:o,type:s}=t,{rect:a}=this;if(a&&i==="move"&&(he(this.edges,a,this.coords.delta[this.interactable.options.deltaSource]),a.width=a.right-a.left,a.height=a.bottom-a.top),this._scopeFire(`interactions:before-action-${i}`,t)===!1)return!1;const c=t.iEvent=this._createPreparedEvent(n,i,o,s);return this._scopeFire(`interactions:action-${i}`,t),i==="start"&&(this.prevEvent=c),this._fireEvent(c),this._scopeFire(`interactions:after-action-${i}`,t),!0}_now(){return Date.now()}}const me={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search(e){for(const t of me.methodOrder){const n=me[t](e);if(n)return n}return null},simulationResume(e){let{pointerType:t,eventType:n,eventTarget:i,scope:o}=e;if(!/down|start/i.test(n))return null;for(const s of o.interactions.list){let a=i;if(s.simulation&&s.simulation.allowResume&&s.pointerType===t)for(;a;){if(a===s.element)return s;a=dt(a)}}return null},mouseOrPen(e){let{pointerId:t,pointerType:n,eventType:i,scope:o}=e;if(n!=="mouse"&&n!=="pen")return null;let s;for(const a of o.interactions.list)if(a.pointerType===n){if(a.simulation&&!en(a,t))continue;if(a.interacting())return a;s||(s=a)}if(s)return s;for(const a of o.interactions.list)if(a.pointerType===n&&!(/down/i.test(i)&&a.simulation))return a;return null},hasPointer(e){let{pointerId:t,scope:n}=e;for(const i of n.interactions.list)if(en(i,t))return i;return null},idle(e){let{pointerType:t,scope:n}=e;for(const i of n.interactions.list){if(i.pointers.length===1){const o=i.interactable;if(o&&!(o.options.gesture&&o.options.gesture.enabled))continue}else if(i.pointers.length>=2)continue;if(!i.interacting()&&t===i.pointerType)return i}return null}};function en(e,t){return e.pointers.some(n=>{let{id:i}=n;return i===t})}const nn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Ai(e){const t={};for(const s of nn)t[s]=rn(s,e);const n=Z.pEventTypes;let i;G.PointerEvent?i=[{type:n.down,listener:o},{type:n.down,listener:t.pointerDown},{type:n.move,listener:t.pointerMove},{type:n.up,listener:t.pointerUp},{type:n.cancel,listener:t.pointerUp}]:i=[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:o},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}],i.push({type:"blur",listener(s){for(const a of e.interactions.list)a.documentBlur(s)}}),e.prevTouchTime=0,e.Interaction=class extends Pi{get pointerMoveTolerance(){return e.interactions.pointerMoveTolerance}set pointerMoveTolerance(s){e.interactions.pointerMoveTolerance=s}_now(){return e.now()}},e.interactions={list:[],new(s){s.scopeFire=(l,c)=>e.fire(l,c);const a=new e.Interaction(s);return e.interactions.list.push(a),a},listeners:t,docEvents:i,pointerMoveTolerance:1};function o(){for(const s of e.interactions.list)if(!(!s.pointerIsDown||s.pointerType!=="touch"||s._interacting))for(const a of s.pointers)e.documents.some(l=>{let{doc:c}=l;return vt(c,a.downTarget)})||s.removePointer(a.pointer,a.event)}e.usePlugin(Ei)}function rn(e,t){return function(n){const i=t.interactions.list,o=mi(n),[s,a]=Ue(n),l=[];if(/^touch/.test(n.type)){t.prevTouchTime=t.now();for(const c of n.changedTouches){const r=c,d=Jt(r),f={pointer:r,pointerId:d,pointerType:o,eventType:n.type,eventTarget:s,curEventTarget:a,scope:t},m=on(f);l.push([f.pointer,f.eventTarget,f.curEventTarget,m])}}else{let c=!1;if(!Z.supportsPointerEvent&&/mouse/.test(n.type)){for(let r=0;r<i.length&&!c;r++)c=i[r].pointerType!=="mouse"&&i[r].pointerIsDown;c=c||t.now()-t.prevTouchTime<500||n.timeStamp===0}if(!c){const r={pointer:n,pointerId:Jt(n),pointerType:o,eventType:n.type,curEventTarget:a,eventTarget:s,scope:t},d=on(r);l.push([r.pointer,r.eventTarget,r.curEventTarget,d])}}for(const[c,r,d,f]of l)f[e](c,n,r,d)}}function on(e){const{pointerType:t,scope:n}=e,o={interaction:me.search(e),searchDetails:e};return n.fire("interactions:find",o),o.interaction||n.interactions.new({pointerType:t})}function ye(e,t){let{doc:n,scope:i,options:o}=e;const{interactions:{docEvents:s},events:a}=i,l=a[t];i.browser.isIOS&&!o.events&&(o.events={passive:!1});for(const r in a.delegatedEvents)l(n,r,a.delegateListener),l(n,r,a.delegateUseCapture,!0);const c=o&&o.events;for(const{type:r,listener:d}of s)l(n,r,d,c)}const ki={id:"core/interactions",install:Ai,listeners:{"scope:add-document":e=>ye(e,"add"),"scope:remove-document":e=>ye(e,"remove"),"interactable:unset":(e,t)=>{let{interactable:n}=e;for(let i=t.interactions.list.length-1;i>=0;i--){const o=t.interactions.list[i];o.interactable===n&&(o.stop(),t.fire("interactions:destroy",{interaction:o}),o.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(i,1))}}},onDocSignal:ye,doOnInteractions:rn,methodNames:nn};function Lt(e,t){if(t.phaselessTypes[e])return!0;for(const n in t.map)if(e.indexOf(n)===0&&e.substr(n.length)in t.phases)return!0;return!1}var ft=function(e){return e[e.On=0]="On",e[e.Off=1]="Off",e}(ft||{});class _i{get _defaults(){return{base:{},perAction:{},actions:{}}}constructor(t,n,i,o){this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new $e,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=n.actions,this.target=t,this._context=n.context||i,this._win=mt(Xe(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=o,this.set(n)}setOnEvents(t,n){return p.func(n.onstart)&&this.on(`${t}start`,n.onstart),p.func(n.onmove)&&this.on(`${t}move`,n.onmove),p.func(n.onend)&&this.on(`${t}end`,n.onend),p.func(n.oninertiastart)&&this.on(`${t}inertiastart`,n.oninertiastart),this}updatePerActionListeners(t,n,i){var o;const s=(o=this._actions.map[t])==null?void 0:o.filterEventType,a=l=>(s==null||s(l))&&Lt(l,this._actions);(p.array(n)||p.object(n))&&this._onOff(ft.Off,t,n,void 0,a),(p.array(i)||p.object(i))&&this._onOff(ft.On,t,i,void 0,a)}setPerAction(t,n){const i=this._defaults;for(const o in n){const s=o,a=this.options[t],l=n[s];s==="listeners"&&this.updatePerActionListeners(t,a.listeners,l),p.array(l)?a[s]=Le(l):p.plainObject(l)?(a[s]=I(a[s]||{},Ct(l)),p.object(i.perAction[s])&&"enabled"in i.perAction[s]&&(a[s].enabled=l.enabled!==!1)):p.bool(l)&&p.object(i.perAction[s])?a[s].enabled=l:a[s]=l}}getRect(t){return t=t||(p.element(this.target)?this.target:null),p.string(this.target)&&(t=t||this._context.querySelector(this.target)),ue(t)}rectChecker(t){return p.func(t)?(this.getRect=n=>{const i=I({},t.apply(this,n));return"width"in i||(i.width=i.right-i.left,i.height=i.bottom-i.top),i},this):t===null?(delete this.getRect,this):this.getRect}_backCompatOption(t,n){if(Xe(n)||p.object(n)){this.options[t]=n;for(const i in this._actions.map)this.options[i][t]=n;return this}return this.options[t]}origin(t){return this._backCompatOption("origin",t)}deltaSource(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}getAllElements(){const{target:t}=this;return p.string(t)?Array.from(this._context.querySelectorAll(t)):p.func(t)&&t.getAllElements?t.getAllElements():p.element(t)?[t]:[]}context(){return this._context}inContext(t){return this._context===t.ownerDocument||vt(this._context,t)}testIgnoreAllow(t,n,i){return!this.testIgnore(t.ignoreFrom,n,i)&&this.testAllow(t.allowFrom,n,i)}testAllow(t,n,i){return t?p.element(i)?p.string(t)?ce(i,t,n):p.element(t)?vt(t,i):!1:!1:!0}testIgnore(t,n,i){return!t||!p.element(i)?!1:p.string(t)?ce(i,t,n):p.element(t)?vt(t,i):!1}fire(t){return this.events.fire(t),this}_onOff(t,n,i,o,s){p.object(n)&&!p.array(n)&&(o=i,i=null);const a=bt(n,i,s);for(let l in a){l==="wheel"&&(l=Z.wheelEvent);for(const c of a[l])Lt(l,this._actions)?this.events[t===ft.On?"on":"off"](l,c):p.string(this.target)?this._scopeEvents[t===ft.On?"addDelegate":"removeDelegate"](this.target,this._context,l,c,o):this._scopeEvents[t===ft.On?"add":"remove"](this.target,l,c,o)}return this}on(t,n,i){return this._onOff(ft.On,t,n,i)}off(t,n,i){return this._onOff(ft.Off,t,n,i)}set(t){const n=this._defaults;p.object(t)||(t={}),this.options=Ct(n.base);for(const i in this._actions.methodDict){const o=i,s=this._actions.methodDict[o];this.options[o]={},this.setPerAction(o,I(I({},n.perAction),n.actions[o])),this[s](t[o])}for(const i in t){if(i==="getRect"){this.rectChecker(t.getRect);continue}p.func(this[i])&&this[i](t[i])}return this}unset(){if(p.string(this.target))for(const t in this._scopeEvents.delegatedEvents){const n=this._scopeEvents.delegatedEvents[t];for(let i=n.length-1;i>=0;i--){const{selector:o,context:s,listeners:a}=n[i];o===this.target&&s===this._context&&n.splice(i,1);for(let l=a.length-1;l>=0;l--)this._scopeEvents.removeDelegate(this.target,this._context,t,a[l][0],a[l][1])}}else this._scopeEvents.remove(this.target,"all")}}class Ri{constructor(t){this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":n=>{let{interactable:i}=n;const{target:o}=i,s=p.string(o)?this.selectorMap[o]:o[this.scope.id],a=Zt(s,l=>l===i);s.splice(a,1)}})}new(t,n){n=I(n||{},{actions:this.scope.actions});const i=new this.scope.Interactable(t,n,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),p.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(i)):(i.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:t,options:n,interactable:i,win:this.scope._win}),i}getExisting(t,n){const i=n&&n.context||this.scope.document,o=p.string(t),s=o?this.selectorMap[t]:t[this.scope.id];if(s)return qt(s,a=>a._context===i&&(o||a.inContext(t)))}forEachMatch(t,n){for(const i of this.list){let o;if((p.string(i.target)?p.element(t)&&xt(t,i.target):t===i.target)&&i.inContext(t)&&(o=n(i)),o!==void 0)return o}}}function Oi(e){const t=(n,i)=>{let o=e.interactables.getExisting(n,i);return o||(o=e.interactables.new(n,i),o.events.global=t.globalEvents),o};return t.getPointerAverage=qe,t.getTouchBBox=hi,t.getTouchDistance=pi,t.getTouchAngle=gi,t.getElementRect=ue,t.getElementClientRect=le,t.matchesSelector=xt,t.closest=Fe,t.globalEvents={},t.version="1.10.27",t.scope=e,t.use=function(n,i){return this.scope.usePlugin(n,i),this},t.isSet=function(n,i){return!!this.scope.interactables.get(n,i&&i.context)},t.on=Ht(function(i,o,s){if(p.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),p.array(i)){for(const a of i)this.on(a,o,s);return this}if(p.object(i)){for(const a in i)this.on(a,i[a],o);return this}return Lt(i,this.scope.actions)?this.globalEvents[i]?this.globalEvents[i].push(o):this.globalEvents[i]=[o]:this.scope.events.add(this.scope.document,i,o,{options:s}),this},"The interact.on() method is being deprecated"),t.off=Ht(function(i,o,s){if(p.string(i)&&i.search(" ")!==-1&&(i=i.trim().split(/ +/)),p.array(i)){for(const a of i)this.off(a,o,s);return this}if(p.object(i)){for(const a in i)this.off(a,i[a],o);return this}if(Lt(i,this.scope.actions)){let a;i in this.globalEvents&&(a=this.globalEvents[i].indexOf(o))!==-1&&this.globalEvents[i].splice(a,1)}else this.scope.events.remove(this.scope.document,i,o,s);return this},"The interact.off() method is being deprecated"),t.debug=function(){return this.scope},t.supportsTouch=function(){return Z.supportsTouch},t.supportsPointerEvent=function(){return Z.supportsPointerEvent},t.stop=function(){for(const n of this.scope.interactions.list)n.stop();return this},t.pointerMoveTolerance=function(n){return p.number(n)?(this.scope.interactions.pointerMoveTolerance=n,this):this.scope.interactions.pointerMoveTolerance},t.addDocument=function(n,i){this.scope.addDocument(n,i)},t.removeDocument=function(n){this.scope.removeDocument(n)},t}class Hi{constructor(){this.id=`__interact_scope_${Math.floor(Math.random()*100)}`,this.isInitialized=!1,this.listenerMaps=[],this.browser=Z,this.defaults=Ct(tn),this.Eventable=$e,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=Oi(this),this.InteractEvent=ge,this.Interactable=void 0,this.interactables=new Ri(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=n=>this.removeDocument(n.target);const t=this;this.Interactable=class extends _i{get _defaults(){return t.defaults}set(n){return super.set(n),t.fire("interactable:set",{options:n,interactable:this}),this}unset(){super.unset();const n=t.interactables.list.indexOf(this);n<0||(t.interactables.list.splice(n,1),t.fire("interactable:unset",{interactable:this}))}}}addListeners(t,n){this.listenerMaps.push({id:n,map:t})}fire(t,n){for(const{map:{[t]:i}}of this.listenerMaps)if(i&&i(n,this,t)===!1)return!1}init(t){return this.isInitialized?this:Wi(this,t)}pluginIsInstalled(t){const{id:n}=t;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(t)!==-1}usePlugin(t,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,n),t.listeners&&t.before){let i=0;const o=this.listenerMaps.length,s=t.before.reduce((a,l)=>(a[l]=!0,a[sn(l)]=!0,a),{});for(;i<o;i++){const a=this.listenerMaps[i].id;if(a&&(s[a]||s[sn(a)]))break}this.listenerMaps.splice(i,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}addDocument(t,n){if(this.getDocIndex(t)!==-1)return!1;const i=mt(t);n=n?I({},n):{},this.documents.push({doc:t,options:n}),this.events.documents.push(t),t!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:i,scope:this,options:n})}removeDocument(t){const n=this.getDocIndex(t),i=mt(t),o=this.documents[n].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(n,1),this.events.documents.splice(n,1),this.fire("scope:remove-document",{doc:t,window:i,scope:this,options:o})}getDocIndex(t){for(let n=0;n<this.documents.length;n++)if(this.documents[n].doc===t)return n;return-1}getDocOptions(t){const n=this.getDocIndex(t);return n===-1?null:this.documents[n].options}now(){return(this.window.Date||Date).now()}}function Wi(e,t){return e.isInitialized=!0,p.window(t)&&Oe(t),G.init(t),Z.init(t),Pt.init(t),e.window=t,e.document=t.document,e.usePlugin(ki),e.usePlugin(vi),e}function sn(e){return e&&e.replace(/\/.*$/,"")}const an=new Hi,ot=an.interactStatic,Li=typeof globalThis<"u"?globalThis:window;an.init(Li);function Ni(e){const{Interactable:t}=e;t.prototype.getAction=function(i,o,s,a){const l=Bi(this,o,s,a,e);return this.options.actionChecker?this.options.actionChecker(i,o,l,this,a,s):l},t.prototype.ignoreFrom=Ht(function(n){return this._backCompatOption("ignoreFrom",n)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=Ht(function(n){return this._backCompatOption("allowFrom",n)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=$i,t.prototype.styleCursor=ji}function Bi(e,t,n,i,o){const s=e.getRect(i),a=t.buttons||{0:1,1:4,3:8,4:16}[t.button],l={action:null,interactable:e,interaction:n,element:i,rect:s,buttons:a};return o.fire("auto-start:check",l),l.action}function ji(e){return p.bool(e)?(this.options.styleCursor=e,this):e===null?(delete this.options.styleCursor,this):this.options.styleCursor}function $i(e){return p.func(e)?(this.options.actionChecker=e,this):e===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Fi={id:"auto-start/interactableMethods",install:Ni};function Yi(e){const{interactStatic:t,defaults:n}=e;e.usePlugin(Fi),n.base.actionChecker=null,n.base.styleCursor=!0,I(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=i=>dn(i,e),e.autoStart={maxInteractions:1/0,withinInteractionLimit:te,cursorElement:null}}function Xi(e,t){let{interaction:n,pointer:i,event:o,eventTarget:s}=e;if(n.interacting())return;const a=ln(n,i,o,s,t);un(n,a,t)}function Gi(e,t){let{interaction:n,pointer:i,event:o,eventTarget:s}=e;if(n.pointerType!=="mouse"||n.pointerIsDown||n.interacting())return;const a=ln(n,i,o,s,t);un(n,a,t)}function Zi(e,t){const{interaction:n}=e;if(!n.pointerIsDown||n.interacting()||!n.pointerWasMoved||!n.prepared.name)return;t.fire("autoStart:before-start",e);const{interactable:i}=n,o=n.prepared.name;o&&i&&(i.options[o].manualStart||!te(i,n.element,n.prepared,t)?n.stop():(n.start(n.prepared,i,n.element),fn(n,t)))}function qi(e,t){let{interaction:n}=e;const{interactable:i}=n;i&&i.options.styleCursor&&be(n.element,"",t)}function cn(e,t,n,i,o){return t.testIgnoreAllow(t.options[e.name],n,i)&&t.options[e.name].enabled&&te(t,n,e,o)?e:null}function Ui(e,t,n,i,o,s,a){for(let l=0,c=i.length;l<c;l++){const r=i[l],d=o[l],f=r.getAction(t,n,e,d);if(!f)continue;const m=cn(f,r,d,s,a);if(m)return{action:m,interactable:r,element:d}}return{action:null,interactable:null,element:null}}function ln(e,t,n,i,o){let s=[],a=[],l=i;function c(r){s.push(r),a.push(l)}for(;p.element(l);){s=[],a=[],o.interactables.forEachMatch(l,c);const r=Ui(e,t,n,s,a,i,o);if(r.action&&!r.interactable.options[r.action.name].manualStart)return r;l=dt(l)}return{action:null,interactable:null,element:null}}function un(e,t,n){let{action:i,interactable:o,element:s}=t;i=i||{name:null},e.interactable=o,e.element=s,Ve(e.prepared,i),e.rect=o&&i.name?o.getRect(s):null,fn(e,n),n.fire("autoStart:prepared",{interaction:e})}function te(e,t,n,i){const o=e.options,s=o[n.name].max,a=o[n.name].maxPerElement,l=i.autoStart.maxInteractions;let c=0,r=0,d=0;if(!(s&&a&&l))return!1;for(const f of i.interactions.list){const m=f.prepared.name;if(f.interacting()){if(c++,c>=l)return!1;if(f.interactable===e&&(r+=m===n.name?1:0,r>=s||f.element===t&&(d++,m===n.name&&d>=a)))return!1}}return l>0}function dn(e,t){return p.number(e)?(t.autoStart.maxInteractions=e,this):t.autoStart.maxInteractions}function be(e,t,n){const{cursorElement:i}=n.autoStart;i&&i!==e&&(i.style.cursor=""),e.ownerDocument.documentElement.style.cursor=t,e.style.cursor=t,n.autoStart.cursorElement=t?e:null}function fn(e,t){const{interactable:n,element:i,prepared:o}=e;if(!(e.pointerType==="mouse"&&n&&n.options.styleCursor)){t.autoStart.cursorElement&&be(t.autoStart.cursorElement,"",t);return}let s="";if(o.name){const a=n.options[o.name].cursorChecker;p.func(a)?s=a(o,n,i,e._interacting):s=t.actions.map[o.name].getCursor(o)}be(e.element,s||"",t)}const ve={id:"auto-start/base",before:["actions"],install:Yi,listeners:{"interactions:down":Xi,"interactions:move":(e,t)=>{Gi(e,t),Zi(e,t)},"interactions:stop":qi},maxInteractions:dn,withinInteractionLimit:te,validateAction:cn};function Vi(e,t){let{interaction:n,eventTarget:i,dx:o,dy:s}=e;if(n.prepared.name!=="drag")return;const a=Math.abs(o),l=Math.abs(s),c=n.interactable.options.drag,r=c.startAxis,d=a>l?"x":a<l?"y":"xy";if(n.prepared.axis=c.lockAxis==="start"?d[0]:c.lockAxis,d!=="xy"&&r!=="xy"&&r!==d){n.prepared.name=null;let f=i;const m=function(g){if(g===n.interactable)return;const x=n.interactable.options.drag;if(!x.manualStart&&g.testIgnoreAllow(x,f,i)){const P=g.getAction(n.downPointer,n.downEvent,n,f);if(P&&P.name==="drag"&&Ji(d,g)&&ve.validateAction(P,g,f,i,t))return g}};for(;p.element(f);){const g=t.interactables.forEachMatch(f,m);if(g){n.prepared.name="drag",n.interactable=g,n.element=f;break}f=dt(f)}}}function Ji(e,t){if(!t)return!1;const n=t.options.drag.startAxis;return e==="xy"||n==="xy"||n===e}var Ki={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":Vi}};function Qi(e){const{defaults:t}=e;e.usePlugin(ve),t.perAction.hold=0,t.perAction.delay=0}function xe(e){const t=e.prepared&&e.prepared.name;if(!t)return null;const n=e.interactable.options;return n[t].hold||n[t].delay}const tr={id:"auto-start/hold",install:Qi,listeners:{"interactions:new":e=>{let{interaction:t}=e;t.autoStartHoldTimer=null},"autoStart:prepared":e=>{let{interaction:t}=e;const n=xe(t);n>0&&(t.autoStartHoldTimer=setTimeout(()=>{t.start(t.prepared,t.interactable,t.element)},n))},"interactions:move":e=>{let{interaction:t,duplicate:n}=e;t.autoStartHoldTimer&&t.pointerWasMoved&&!n&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":e=>{let{interaction:t}=e;xe(t)>0&&(t.prepared.name=null)}},getHoldDuration:xe};var er={id:"auto-start",install(e){e.usePlugin(ve),e.usePlugin(tr),e.usePlugin(Ki)}};ot.use(er);function nr(e){const{defaults:t,actions:n}=e;e.autoScroll=C,C.now=()=>e.now(),n.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=C.defaults}const 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(e){C.isScrolling=!0,Pt.cancel(C.i),e.autoScroll=C,C.interaction=e,C.prevTime=C.now(),C.i=Pt.request(C.scroll)},stop(){C.isScrolling=!1,C.interaction&&(C.interaction.autoScroll=null),Pt.cancel(C.i)},scroll(){const{interaction:e}=C,{interactable:t,element:n}=e,i=e.prepared.name,o=t.options[i].autoScroll,s=hn(o.container,t,n),a=C.now(),l=(a-C.prevTime)/1e3,c=o.speed*l;if(c>=1){const r={x:C.x*c,y:C.y*c};if(r.x||r.y){const d=pn(s);p.window(s)?s.scrollBy(r.x,r.y):s&&(s.scrollLeft+=r.x,s.scrollTop+=r.y);const f=pn(s),m={x:f.x-d.x,y:f.y-d.y};(m.x||m.y)&&t.fire({type:"autoscroll",target:n,interactable:t,delta:m,interaction:e,container:s})}C.prevTime=a}C.isScrolling&&(Pt.cancel(C.i),C.i=Pt.request(C.scroll))},check(e,t){var n;return(n=e.options[t].autoScroll)==null?void 0:n.enabled},onInteractionMove(e){let{interaction:t,pointer:n}=e;if(!(t.interacting()&&C.check(t.interactable,t.prepared.name)))return;if(t.simulation){C.x=C.y=0;return}let i,o,s,a;const{interactable:l,element:c}=t,r=t.prepared.name,d=l.options[r].autoScroll,f=hn(d.container,l,c);if(p.window(f))a=n.clientX<C.margin,i=n.clientY<C.margin,o=n.clientX>f.innerWidth-C.margin,s=n.clientY>f.innerHeight-C.margin;else{const m=le(f);a=n.clientX<m.left+C.margin,i=n.clientY<m.top+C.margin,o=n.clientX>m.right-C.margin,s=n.clientY>m.bottom-C.margin}C.x=o?1:a?-1:0,C.y=s?1:i?-1:0,C.isScrolling||(C.margin=d.margin,C.speed=d.speed,C.start(t))}};function hn(e,t,n){return(p.string(e)?Je(e,t,n):e)||mt(n)}function pn(e){return p.window(e)&&(e=window.document.body),{x:e.scrollLeft,y:e.scrollTop}}const ir={id:"auto-scroll",install:nr,listeners:{"interactions:new":e=>{let{interaction:t}=e;t.autoScroll=null},"interactions:destroy":e=>{let{interaction:t}=e;t.autoScroll=null,C.stop(),C.interaction&&(C.interaction=null)},"interactions:stop":C.stop,"interactions:action-move":e=>C.onInteractionMove(e)}};ot.use(ir);function rr(e){const{actions:t,Interactable:n,defaults:i}=e;n.prototype.draggable=ee.draggable,t.map.drag=ee,t.methodDict.drag="draggable",i.actions.drag=ee.defaults}function we(e){let{interaction:t}=e;if(t.prepared.name!=="drag")return;const n=t.prepared.axis;n==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):n==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}function gn(e){let{iEvent:t,interaction:n}=e;if(n.prepared.name!=="drag")return;const i=n.prepared.axis;if(i==="x"||i==="y"){const o=i==="x"?"y":"x";t.page[o]=n.coords.start.page[o],t.client[o]=n.coords.start.client[o],t.delta[o]=0}}const ee={id:"actions/drag",install:rr,listeners:{"interactions:before-action-move":we,"interactions:action-resume":we,"interactions:action-move":gn,"auto-start:check":e=>{const{interaction:t,interactable:n,buttons:i}=e,o=n.options.drag;if(!(!(o&&o.enabled)||t.pointerIsDown&&/mouse|pointer/.test(t.pointerType)&&!(i&n.options.drag.mouseButtons)))return e.action={name:"drag",axis:o.lockAxis==="start"?o.startAxis:o.lockAxis},!1}},draggable:function(t){return p.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):p.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},beforeMove:we,move:gn,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor(){return"move"},filterEventType:e=>e.search("drag")===0};ot.use(ee);function or(e){const{actions:t,browser:n,Interactable:i,defaults:o}=e;st.cursors=lr(n),st.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,i.prototype.resizable=function(s){return ar(this,s,e)},t.map.resize=st,t.methodDict.resize="resizable",o.actions.resize=st.defaults}function sr(e){const{interaction:t,interactable:n,element:i,rect:o,buttons:s}=e;if(!o)return;const a=I({},t.coords.cur.page),l=n.options.resize;if(!(!(l&&l.enabled)||t.pointerIsDown&&/mouse|pointer/.test(t.pointerType)&&!(s&l.mouseButtons))){if(p.object(l.edges)){const c={left:!1,right:!1,top:!1,bottom:!1};for(const r in c)c[r]=cr(r,l.edges[r],a,t._latestPointer.eventTarget,i,o,l.margin||st.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(e.action={name:"resize",edges:c})}else{const c=l.axis!=="y"&&a.x>o.right-st.defaultMargin,r=l.axis!=="x"&&a.y>o.bottom-st.defaultMargin;(c||r)&&(e.action={name:"resize",axes:(c?"x":"")+(r?"y":"")})}return e.action?!1:void 0}}function ar(e,t,n){return p.object(t)?(e.options.resize.enabled=t.enabled!==!1,e.setPerAction("resize",t),e.setOnEvents("resize",t),p.string(t.axis)&&/^x$|^y$|^xy$/.test(t.axis)?e.options.resize.axis=t.axis:t.axis===null&&(e.options.resize.axis=n.defaults.actions.resize.axis),p.bool(t.preserveAspectRatio)?e.options.resize.preserveAspectRatio=t.preserveAspectRatio:p.bool(t.square)&&(e.options.resize.square=t.square),e):p.bool(t)?(e.options.resize.enabled=t,e):e.options.resize}function cr(e,t,n,i,o,s,a){if(!t)return!1;if(t===!0){const l=p.number(s.width)?s.width:s.right-s.left,c=p.number(s.height)?s.height:s.bottom-s.top;if(a=Math.min(a,Math.abs((e==="left"||e==="right"?l:c)/2)),l<0&&(e==="left"?e="right":e==="right"&&(e="left")),c<0&&(e==="top"?e="bottom":e==="bottom"&&(e="top")),e==="left"){const r=l>=0?s.left:s.right;return n.x<r+a}if(e==="top"){const r=c>=0?s.top:s.bottom;return n.y<r+a}if(e==="right")return n.x>(l>=0?s.right:s.left)-a;if(e==="bottom")return n.y>(c>=0?s.bottom:s.top)-a}return p.element(i)?p.element(t)?t===i:ce(i,t,o):!1}function lr(e){return e.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"}}function ur(e){let{iEvent:t,interaction:n}=e;if(n.prepared.name!=="resize"||!n.prepared.edges)return;const i=t,o=n.rect;n._rects={start:I({},o),corrected:I({},o),previous:I({},o),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},i.edges=n.prepared.edges,i.rect=n._rects.corrected,i.deltaRect=n._rects.delta}function dr(e){let{iEvent:t,interaction:n}=e;if(n.prepared.name!=="resize"||!n.prepared.edges)return;const i=t,s=n.interactable.options.resize.invert,a=s==="reposition"||s==="negate",l=n.rect,{start:c,corrected:r,delta:d,previous:f}=n._rects;if(I(f,r),a){if(I(r,l),s==="reposition"){if(r.top>r.bottom){const m=r.top;r.top=r.bottom,r.bottom=m}if(r.left>r.right){const m=r.left;r.left=r.right,r.right=m}}}else r.top=Math.min(l.top,c.bottom),r.bottom=Math.max(l.bottom,c.top),r.left=Math.min(l.left,c.right),r.right=Math.max(l.right,c.left);r.width=r.right-r.left,r.height=r.bottom-r.top;for(const m in r)d[m]=r[m]-f[m];i.edges=n.prepared.edges,i.rect=r,i.deltaRect=d}function fr(e){let{iEvent:t,interaction:n}=e;if(n.prepared.name!=="resize"||!n.prepared.edges)return;const i=t;i.edges=n.prepared.edges,i.rect=n._rects.corrected,i.deltaRect=n._rects.delta}function mn(e){let{iEvent:t,interaction:n}=e;if(n.prepared.name!=="resize"||!n.resizeAxes)return;const i=n.interactable.options,o=t;i.resize.square?(n.resizeAxes==="y"?o.delta.x=o.delta.y:o.delta.y=o.delta.x,o.axes="xy"):(o.axes=n.resizeAxes,n.resizeAxes==="x"?o.delta.y=0:n.resizeAxes==="y"&&(o.delta.x=0))}const st={id:"actions/resize",before:["actions/drag"],install:or,listeners:{"interactions:new":e=>{let{interaction:t}=e;t.resizeAxes="xy"},"interactions:action-start":e=>{ur(e),mn(e)},"interactions:action-move":e=>{dr(e),mn(e)},"interactions:action-end":fr,"auto-start:check":sr},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor(e){let{edges:t,axis:n,name:i}=e;const o=st.cursors;let s=null;if(n)s=o[i+n];else if(t){let a="";for(const l of["top","bottom","left","right"])t[l]&&(a+=l);s=o[a]}return s},filterEventType:e=>e.search("resize")===0,defaultMargin:null};ot.use(st);var hr=()=>{},pr=()=>{},gr=e=>{const t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(i=>{let[o,s]=i;return o in e||s in e}),n=(i,o)=>{const{range:s,limits:a={left:-1/0,right:1/0,top:-1/0,bottom:1/0},offset:l={x:0,y:0}}=e,c={range:s,grid:e,x:null,y:null};for(const[r,d]of t){const f=Math.round((i-l.x)/e[r]),m=Math.round((o-l.y)/e[d]);c[r]=Math.max(a.left,Math.min(a.right,f*e[r]+l.x)),c[d]=Math.max(a.top,Math.min(a.bottom,m*e[d]+l.y))}return c};return n.grid=e,n.coordFields=t,n},mr=Object.freeze({__proto__:null,edgeTarget:hr,elements:pr,grid:gr});const yr={id:"snappers",install(e){const{interactStatic:t}=e;t.snappers=I(t.snappers||{},mr),t.createSnapGrid=t.snappers.grid}};class yn{constructor(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=t,this.result=ne(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}start(t,n){let{phase:i}=t;const{interaction:o}=this,s=br(o);this.prepareStates(s),this.startEdges=I({},o.edges),this.edges=I({},this.startEdges),this.startOffset=vr(o.rect,n),this.startDelta={x:0,y:0};const a=this.fillArg({phase:i,pageCoords:n,preEnd:!1});return this.result=ne(),this.startAll(a),this.result=this.setAll(a)}fillArg(t){const{interaction:n}=this;return t.interaction=n,t.interactable=n.interactable,t.element=n.element,t.rect||(t.rect=n.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}startAll(t){for(const n of this.states)n.methods.start&&(t.state=n,n.methods.start(t))}setAll(t){const{phase:n,preEnd:i,skipModifiers:o,rect:s,edges:a}=t;t.coords=I({},t.pageCoords),t.rect=I({},s),t.edges=I({},a);const l=o?this.states.slice(o):this.states,c=ne(t.coords,t.rect);for(const m of l){var r;const{options:g}=m,x=I({},t.coords);let P=null;(r=m.methods)!=null&&r.set&&this.shouldDo(g,i,n)&&(t.state=m,P=m.methods.set(t),he(t.edges,t.rect,{x:t.coords.x-x.x,y:t.coords.y-x.y})),c.eventProps.push(P)}I(this.edges,t.edges),c.delta.x=t.coords.x-t.pageCoords.x,c.delta.y=t.coords.y-t.pageCoords.y,c.rectDelta.left=t.rect.left-s.left,c.rectDelta.right=t.rect.right-s.right,c.rectDelta.top=t.rect.top-s.top,c.rectDelta.bottom=t.rect.bottom-s.bottom;const d=this.result.coords,f=this.result.rect;if(d&&f){const m=c.rect.left!==f.left||c.rect.right!==f.right||c.rect.top!==f.top||c.rect.bottom!==f.bottom;c.changed=m||d.x!==c.coords.x||d.y!==c.coords.y}return c}applyToInteraction(t){const{interaction:n}=this,{phase:i}=t,o=n.coords.cur,s=n.coords.start,{result:a,startDelta:l}=this,c=a.delta;i==="start"&&I(this.startDelta,a.delta);for(const[f,m]of[[s,l],[o,c]])f.page.x+=m.x,f.page.y+=m.y,f.client.x+=m.x,f.client.y+=m.y;const{rectDelta:r}=this.result,d=t.rect||n.rect;d.left+=r.left,d.right+=r.right,d.top+=r.top,d.bottom+=r.bottom,d.width=d.right-d.left,d.height=d.bottom-d.top}setAndApply(t){const{interaction:n}=this,{phase:i,preEnd:o,skipModifiers:s}=t,a=this.setAll(this.fillArg({preEnd:o,phase:i,pageCoords:t.modifiedCoords||n.coords.cur.page}));if(this.result=a,!a.changed&&(!s||s<this.states.length)&&n.interacting())return!1;if(t.modifiedCoords){const{page:l}=n.coords.cur,c={x:t.modifiedCoords.x-l.x,y:t.modifiedCoords.y-l.y};a.coords.x+=c.x,a.coords.y+=c.y,a.delta.x+=c.x,a.delta.y+=c.y}this.applyToInteraction(t)}beforeEnd(t){const{interaction:n,event:i}=t,o=this.states;if(!o||!o.length)return;let s=!1;for(const a of o){t.state=a;const{options:l,methods:c}=a,r=c.beforeEnd&&c.beforeEnd(t);if(r)return this.endResult=r,!1;s=s||!s&&this.shouldDo(l,!0,t.phase,!0)}s&&n.move({event:i,preEnd:!0})}stop(t){const{interaction:n}=t;if(!this.states||!this.states.length)return;const i=I({states:this.states,interactable:n.interactable,element:n.element,rect:null},t);this.fillArg(i);for(const o of this.states)i.state=o,o.methods.stop&&o.methods.stop(i);this.states=null,this.endResult=null}prepareStates(t){this.states=[];for(let n=0;n<t.length;n++){const{options:i,methods:o,name:s}=t[n];this.states.push({options:i,methods:o,index:n,name:s})}return this.states}restoreInteractionCoords(t){let{interaction:{coords:n,rect:i,modification:o}}=t;if(!o.result)return;const{startDelta:s}=o,{delta:a,rectDelta:l}=o.result,c=[[n.start,s],[n.cur,a]];for(const[r,d]of c)r.page.x-=d.x,r.page.y-=d.y,r.client.x-=d.x,r.client.y-=d.y;i.left-=l.left,i.right-=l.right,i.top-=l.top,i.bottom-=l.bottom}shouldDo(t,n,i,o){return!(!t||t.enabled===!1||o&&!t.endOnly||t.endOnly&&!n||i==="start"&&!t.setStart)}copyFrom(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(n=>Ct(n)),this.result=ne(I({},t.result.coords),I({},t.result.rect))}destroy(){for(const t in this)this[t]=null}}function ne(e,t){return{rect:t,coords:e,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function br(e){const t=e.interactable.options[e.prepared.name],n=t.modifiers;return n&&n.length?n:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(i=>{const o=t[i];return o&&o.enabled&&{options:o,methods:o._methods}}).filter(i=>!!i)}function vr(e,t){return e?{left:t.x-e.left,top:t.y-e.top,right:e.right-t.x,bottom:e.bottom-t.y}:{left:0,top:0,right:0,bottom:0}}function ht(e,t){const{defaults:n}=e,i={start:e.start,set:e.set,beforeEnd:e.beforeEnd,stop:e.stop},o=s=>{const a=s||{};a.enabled=a.enabled!==!1;for(const c in n)c in a||(a[c]=n[c]);const l={options:a,methods:i,name:t,enable:()=>(a.enabled=!0,l),disable:()=>(a.enabled=!1,l)};return l};return t&&typeof t=="string"&&(o._defaults=n,o._methods=i),o}function Se(e){let{iEvent:t,interaction:n}=e;const i=n.modification.result;i&&(t.modifiers=i.eventProps)}const xr={id:"modifiers/base",before:["actions"],install:e=>{e.defaults.perAction.modifiers=[]},listeners:{"interactions:new":e=>{let{interaction:t}=e;t.modification=new yn(t)},"interactions:before-action-start":e=>{const{interaction:t}=e,n=e.interaction.modification;n.start(e,t.coords.start.page),t.edges=n.edges,n.applyToInteraction(e)},"interactions:before-action-move":e=>{const{interaction:t}=e,{modification:n}=t,i=n.setAndApply(e);return t.edges=n.edges,i},"interactions:before-action-end":e=>{const{interaction:t}=e,{modification:n}=t,i=n.beforeEnd(e);return t.edges=n.startEdges,i},"interactions:action-start":Se,"interactions:action-move":Se,"interactions:action-end":Se,"interactions:after-action-start":e=>e.interaction.modification.restoreInteractionCoords(e),"interactions:after-action-move":e=>e.interaction.modification.restoreInteractionCoords(e),"interactions:stop":e=>e.interaction.modification.stop(e)}},wr={start(e){const{state:t,rect:n,edges:i,pageCoords:o}=e;let{ratio:s,enabled:a}=t.options;const{equalDelta:l,modifiers:c}=t.options;s==="preserve"&&(s=n.width/n.height),t.startCoords=I({},o),t.startRect=I({},n),t.ratio=s,t.equalDelta=l;const r=t.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(t.xIsPrimaryAxis=!!(i.left||i.right),t.equalDelta){const f=(r.left?1:-1)*(r.top?1:-1);t.edgeSign={x:f,y:f}}else t.edgeSign={x:r.left?-1:1,y:r.top?-1:1};if(a!==!1&&I(i,r),!(c!=null&&c.length))return;const d=new yn(e.interaction);d.copyFrom(e.interaction.modification),d.prepareStates(c),t.subModification=d,d.startAll({...e})},set(e){const{state:t,rect:n,coords:i}=e,{linkedEdges:o}=t,s=I({},i),a=t.equalDelta?Sr:Ir;if(I(e.edges,o),a(t,t.xIsPrimaryAxis,i,n),!t.subModification)return null;const l=I({},n);he(o,l,{x:i.x-s.x,y:i.y-s.y});const c=t.subModification.setAll({...e,rect:l,edges:o,pageCoords:i,prevCoords:i,prevRect:l}),{delta:r}=c;if(c.changed){const d=Math.abs(r.x)>Math.abs(r.y);a(t,d,c.coords,c.rect),I(i,c.coords)}return c.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Sr(e,t,n){let{startCoords:i,edgeSign:o}=e;t?n.y=i.y+(n.x-i.x)*o.y:n.x=i.x+(n.y-i.y)*o.x}function Ir(e,t,n,i){let{startRect:o,startCoords:s,ratio:a,edgeSign:l}=e;if(t){const c=i.width/a;n.y=s.y+(c-o.height)*l.y}else{const c=i.height*a;n.x=s.x+(c-o.width)*l.x}}var Er=ht(wr,"aspectRatio");function zr(e){let{rect:t,startOffset:n,state:i,interaction:o,pageCoords:s}=e;const{options:a}=i,{elementRect:l}=a,c=I({left:0,top:0,right:0,bottom:0},a.offset||{});if(t&&l){const r=wt(a.restriction,o,s);if(r){const d=r.right-r.left-t.width,f=r.bottom-r.top-t.height;d<0&&(c.left+=d,c.right+=d),f<0&&(c.top+=f,c.bottom+=f)}c.left+=n.left-t.width*l.left,c.top+=n.top-t.height*l.top,c.right+=n.right-t.width*(1-l.right),c.bottom+=n.bottom-t.height*(1-l.bottom)}i.offset=c}function Dr(e){let{coords:t,interaction:n,state:i}=e;const{options:o,offset:s}=i,a=wt(o.restriction,n,t);if(!a)return;const l=zi(a);t.x=Math.max(Math.min(l.right-s.right,t.x),l.left+s.left),t.y=Math.max(Math.min(l.bottom-s.bottom,t.y),l.top+s.top)}function wt(e,t,n){return p.func(e)?Wt(e,t.interactable,t.element,[n.x,n.y,t]):Wt(e,t.interactable,t.element)}const ie={start:zr,set:Dr,defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}};var Mr=ht(ie,"restrict");const bn={top:1/0,left:1/0,bottom:-1/0,right:-1/0},vn={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Tr(e){let{interaction:t,startOffset:n,state:i}=e;const{options:o}=i;let s;if(o){const a=wt(o.offset,t,t.coords.start.page);s=Qt(a)}s=s||{x:0,y:0},i.offset={top:s.y+n.top,left:s.x+n.left,bottom:s.y-n.bottom,right:s.x-n.right}}function Cr(e){let{coords:t,edges:n,interaction:i,state:o}=e;const{offset:s,options:a}=o;if(!n)return;const l=I({},t),c=wt(a.inner,i,l)||{},r=wt(a.outer,i,l)||{};xn(c,bn),xn(r,vn),n.top?t.y=Math.min(Math.max(r.top+s.top,l.y),c.top+s.top):n.bottom&&(t.y=Math.max(Math.min(r.bottom+s.bottom,l.y),c.bottom+s.bottom)),n.left?t.x=Math.min(Math.max(r.left+s.left,l.x),c.left+s.left):n.right&&(t.x=Math.max(Math.min(r.right+s.right,l.x),c.right+s.right))}function xn(e,t){for(const n of["top","left","bottom","right"])n in e||(e[n]=t[n]);return e}const Nt={noInner:bn,noOuter:vn,start:Tr,set:Cr,defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}};var Pr=ht(Nt,"restrictEdges");const Ar=I({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(e){}},ie.defaults),kr={start:ie.start,set:ie.set,defaults:Ar};var _r=ht(kr,"restrictRect");const Rr={width:-1/0,height:-1/0},Or={width:1/0,height:1/0};function Hr(e){return Nt.start(e)}function Wr(e){const{interaction:t,state:n,rect:i,edges:o}=e,{options:s}=n;if(!o)return;const a=Ke(wt(s.min,t,e.coords))||Rr,l=Ke(wt(s.max,t,e.coords))||Or;n.options={endOnly:s.endOnly,inner:I({},Nt.noInner),outer:I({},Nt.noOuter)},o.top?(n.options.inner.top=i.bottom-a.height,n.options.outer.top=i.bottom-l.height):o.bottom&&(n.options.inner.bottom=i.top+a.height,n.options.outer.bottom=i.top+l.height),o.left?(n.options.inner.left=i.right-a.width,n.options.outer.left=i.right-l.width):o.right&&(n.options.inner.right=i.left+a.width,n.options.outer.right=i.left+l.width),Nt.set(e),n.options=s}var Lr=ht({start:Hr,set:Wr,defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize");function Nr(e){const{interaction:t,interactable:n,element:i,rect:o,state:s,startOffset:a}=e,{options:l}=s,c=l.offsetWithOrigin?jr(e):{x:0,y:0};let r;if(l.offset==="startCoords")r={x:t.coords.start.page.x,y:t.coords.start.page.y};else{const f=Wt(l.offset,n,i,[t]);r=Qt(f)||{x:0,y:0},r.x+=c.x,r.y+=c.y}const{relativePoints:d}=l;s.offsets=o&&d&&d.length?d.map((f,m)=>({index:m,relativePoint:f,x:a.left-o.width*f.x+r.x,y:a.top-o.height*f.y+r.y})):[{index:0,relativePoint:null,x:r.x,y:r.y}]}function Br(e){const{interaction:t,coords:n,state:i}=e,{options:o,offsets:s}=i,a=pe(t.interactable,t.element,t.prepared.name),l=I({},n),c=[];o.offsetWithOrigin||(l.x-=a.x,l.y-=a.y);for(const d of s){const f=l.x-d.x,m=l.y-d.y;for(let g=0,x=o.targets.length;g<x;g++){const P=o.targets[g];let O;p.func(P)?O=P(f,m,t._proxy,d,g):O=P,O&&c.push({x:(p.number(O.x)?O.x:f)+d.x,y:(p.number(O.y)?O.y:m)+d.y,range:p.number(O.range)?O.range:o.range,source:P,index:g,offset:d})}}const r={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}};for(const d of c){const f=d.range,m=d.x-l.x,g=d.y-l.y,x=Ut(m,g);let P=x<=f;f===1/0&&r.inRange&&r.range!==1/0&&(P=!1),(!r.target||(P?r.inRange&&f!==1/0?x/f<r.distance/r.range:f===1/0&&r.range!==1/0||x<r.distance:!r.inRange&&x<r.distance))&&(r.target=d,r.distance=x,r.range=f,r.inRange=P,r.delta.x=m,r.delta.y=g)}return r.inRange&&(n.x=r.target.x,n.y=r.target.y),i.closest=r,r}function jr(e){const{element:t}=e.interaction;return Qt(Wt(e.state.options.origin,null,null,[t]))||pe(e.interactable,t,e.interaction.prepared.name)}const Ie={start:Nr,set:Br,defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}};var $r=ht(Ie,"snap");function Fr(e){const{state:t,edges:n}=e,{options:i}=t;if(!n)return null;e.state={options:{targets:null,relativePoints:[{x:n.left?0:1,y:n.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Ie.start(e),t.offsets=e.state.offsets,e.state=t}function Yr(e){const{interaction:t,state:n,coords:i}=e,{options:o,offsets:s}=n,a={x:i.x-s[0].x,y:i.y-s[0].y};n.options=I({},o),n.options.targets=[];for(const c of o.targets||[]){let r;if(p.func(c)?r=c(a.x,a.y,t):r=c,!!r){for(const[d,f]of n.targetFields)if(d in r||f in r){r.x=r[d],r.y=r[f];break}n.options.targets.push(r)}}const l=Ie.set(e);return n.options=o,l}const re={start:Fr,set:Yr,defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}};var Xr=ht(re,"snapSize");function Gr(e){const{edges:t}=e;return t?(e.state.targetFields=e.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],re.start(e)):null}const Zr={start:Gr,set:re.set,defaults:I(Ct(re.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})};var qr=ht(Zr,"snapEdges");const Bt=()=>{};Bt._defaults={};var Ee={aspectRatio:Er,restrictEdges:Pr,restrict:Mr,restrictRect:_r,restrictSize:Lr,snapEdges:qr,snap:$r,snapSize:Xr,spring:Bt,avoid:Bt,transform:Bt,rubberband:Bt};const Ur={id:"modifiers",install(e){const{interactStatic:t}=e;e.usePlugin(xr),e.usePlugin(yr),t.modifiers=Ee;for(const n in Ee){const{_defaults:i,_methods:o}=Ee[n];i._methods=o,e.defaults.perAction[n]=i}}};ot.use(Ur);var jt=function(e){return e.touchAction="touchAction",e.boxSizing="boxSizing",e.noListeners="noListeners",e}(jt||{});const ze="[interact.js] ",De={touchAction:"https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action",boxSizing:"https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing"};function Vr(e){let{logger:t}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{Interactable:n,defaults:i}=e;e.logger=t||console,i.base.devTools={ignore:{}},n.prototype.devTools=function(s){return s?(I(this.options.devTools,s),this):this.options.devTools};const{_onOff:o}=n.prototype;n.prototype._onOff=function(s,a,l,c,r){if(p.string(this.target)||this.target.addEventListener)return o.call(this,s,a,l,c,r);p.object(a)&&!p.array(a)&&(c=l,l=null);const d=bt(a,l,r);for(const f in d)Lt(f,e.actions)||e.logger.warn(ze+`Can't add native "${f}" event listener to target without \`addEventListener(type, listener, options)\` prop.`);return o.call(this,s,d,c)}}const wn=[{name:jt.touchAction,perform(e){let{element:t}=e;return!!t&&!Jr(t,"touchAction",/pan-|pinch|none/)},getInfo(e){let{element:t}=e;return[t,De.touchAction]},text:`Consider adding CSS "touch-action: none" to this element
|
|
`},{name:jt.boxSizing,perform(e){const{element:t}=e;return e.prepared.name==="resize"&&t instanceof G.HTMLElement&&!Sn(t,"boxSizing",/border-box/)},text:'Consider adding CSS "box-sizing: border-box" to this resizable element',getInfo(e){let{element:t}=e;return[t,De.boxSizing]}},{name:jt.noListeners,perform(e){var t;const n=e.prepared.name;return!(((t=e.interactable)==null?void 0:t.events.types[`${n}move`])||[]).length},getInfo(e){return[e.prepared.name,e.interactable]},text:"There are no listeners set for this action"}];function Sn(e,t,n){const i=e.style[t]||ut.getComputedStyle(e)[t];return n.test((i||"").toString())}function Jr(e,t,n){let i=e;for(;p.element(i);){if(Sn(i,t,n))return!0;i=dt(i)}return!1}const Kr={id:"dev-tools",install:Vr,listeners:{"interactions:action-start":(e,t)=>{let{interaction:n}=e;for(const i of wn){const o=n.interactable&&n.interactable.options;!(o&&o.devTools&&o.devTools.ignore[i.name])&&i.perform(n)&&t.logger.warn(ze+i.text,...i.getInfo(n))}}},checks:wn,CheckName:jt,links:De,prefix:ze};ot.use(Kr);function Qr(e){let t=0,n;for(let i=0,o=e.length;i<o;i++)n=e[i].y+e[i].h,n>t&&(t=n);return t}function St(e){return(e||[]).map(t=>({...t}))}function In(e,t){return!(e===t||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function $t(e,t,n){const i=Dn(e),o=Tn(e),s=Array(e.length);for(let a=0,l=o.length;a<l;a++){let c=o[a];c.static||(c=to(i,c,t,n),i.push(c)),s[e.indexOf(c)]=c,delete c.moved}return s}function to(e,t,n,i){if(n)for(;t.y>0&&!Ft(e,t);)t.y--;else if(i){const s=i[t.i].y;for(;t.y>s&&!Ft(e,t);)t.y--}let o;for(;o=Ft(e,t);)t.y=o.y+o.h;return t}function eo(e,t){const n=Dn(e);for(let i=0,o=e.length;i<o;i++){const s=e[i];if(s.x+s.w>t.cols&&(s.x=t.cols-s.w),s.x<0&&(s.x=0,s.w=t.cols),!s.static)n.push(s);else for(;Ft(n,s);)s.y++}return e}function En(e,t){for(let n=0,i=e.length;n<i;n++)if(e[n].i===t)return e[n]}function Ft(e,t){for(let n=0,i=e.length;n<i;n++)if(In(e[n],t))return e[n]}function zn(e,t){return e.filter(n=>In(n,t))}function Dn(e){return e.filter(t=>t.static)}function Me(e,t,n,i,o,s){if(t.static)return e;const a=t.x,l=t.y,c=i&&t.y>i;typeof n=="number"&&(t.x=n),typeof i=="number"&&(t.y=i),t.moved=!0;let r=Tn(e);c&&(r=r.reverse());const d=zn(r,t);if(s&&d.length)return t.x=a,t.y=l,t.moved=!1,e;for(let f=0,m=d.length;f<m;f++){const g=d[f];g.moved||t.y>g.y&&t.y-g.y>g.h/4||(g.static?e=Mn(e,g,t,o):e=Mn(e,t,g,o))}return e}function Mn(e,t,n,i){if(i){const s={x:n.x,y:n.y,w:n.w,h:n.h,i:"-1"};if(s.y=Math.max(t.y-n.h,0),!Ft(e,s))return Me(e,n,void 0,s.y,!1)}return Me(e,n,void 0,n.y+1,!1)}function no(e,t,n,i){const o=`translate3d(${t}px,${e}px, 0)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${n}px`,height:`${i}px`,position:"absolute"}}function io(e,t,n,i){const o=`translate3d(${t*-1}px,${e}px, 0)`;return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:`${n}px`,height:`${i}px`,position:"absolute"}}function ro(e,t,n,i){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${i}px`,position:"absolute"}}function oo(e,t,n,i){return{top:`${e}px`,right:`${t}px`,width:`${n}px`,height:`${i}px`,position:"absolute"}}function Tn(e){return[].concat(e).sort((t,n)=>t.y===n.y&&t.x===n.x?0:t.y>n.y||t.y===n.y&&t.x>n.x?1:-1)}function so(e,t){t=t||"Layout";const n=["x","y","w","h"],i=[];if(!Array.isArray(e))throw new Error(`${t} must be an array!`);for(let o=0,s=e.length;o<s;o++){const a=e[o];for(let l=0;l<n.length;l++)if(typeof a[n[l]]!="number")throw new Error(`VueGridLayout: ${t}[${o}].${n[l]} must be a number!`);if(a.i===void 0||a.i===null)throw new Error(`VueGridLayout: ${t}[${o}].i cannot be null!`);if(typeof a.i!="number"&&typeof a.i!="string")throw new Error(`VueGridLayout: ${t}[${o}].i must be a string or number!`);if(i.indexOf(a.i)>=0)throw new Error(`VueGridLayout: ${t}[${o}].i must be unique!`);if(i.push(a.i),a.static!==void 0&&typeof a.static!="boolean")throw new Error(`VueGridLayout: ${t}[${o}].static must be a boolean!`)}}function Cn(e){return ao(e)}function ao(e){const t=e.target.offsetParent||document.body,n=e.offsetParent===document.body?{left:0,top:0}:t.getBoundingClientRect(),i=e.clientX+t.scrollLeft-n.left,o=e.clientY+t.scrollTop-n.top;return{x:i,y:o}}function Pn(e,t,n,i){return co(e)?{deltaX:n-e,deltaY:i-t,lastX:e,lastY:t,x:n,y:i}:{deltaX:0,deltaY:0,lastX:n,lastY:i,x:n,y:i}}function co(e){return typeof e=="number"&&!Number.isNaN(e)}function lo(e,t){const n=kn(e);let i=n[0];for(let o=1,s=n.length;o<s;o++){const a=n[o];t>e[a]&&(i=a)}return i}function An(e,t){if(!t[e])throw new Error(`ResponsiveGridLayout: \`cols\` entry for breakpoint ${e} is missing!`);return t[e]}function uo(e,t,n,i,o,s){if(t[i])return St(t[i]);let a=e;const l=kn(n),c=l.slice(l.indexOf(i));for(let r=0,d=c.length;r<d;r++){const f=c[r];if(t[f]){a=t[f];break}}return a=St(a||[]),$t(eo(a,{cols:o}),s)}function kn(e){return Object.keys(e).sort((n,i)=>e[n]-e[i])}const _n=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},fo=["id"],Te=_n({__name:"grid-item",props:{i:{required:!0},x:{type:Number,required:!0},y:{type:Number,required:!0},w:{type:Number,required:!0},h:{type:Number,required:!0},minW:{type:Number,required:!1,default:1},minH:{type:Number,required:!1,default:1},maxW:{type:Number,required:!1,default:1/0},maxH:{type:Number,required:!1,default:1/0},isDraggable:{type:Boolean,required:!1,default:null},isResizable:{type:Boolean,required:!1,default:null},isBounded:{type:Boolean,required:!1,default:null},static:{type:Boolean,required:!1,default:!1},dragIgnoreFrom:{type:String,required:!1,default:"a, button"},dragAllowFrom:{type:String,required:!1,default:null},resizeIgnoreFrom:{type:String,required:!1,default:"a, button"},preserveAspectRatio:{type:Boolean,required:!1,default:!1},dragOption:{type:Object,required:!1,default:()=>({})},resizeOption:{type:Object,required:!1,default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(e,{expose:t,emit:n}){const i=e,o=n,s={el:void 0,calcXY:_};t(s);const a=b.inject("emitter"),l=b.inject("gridLayout");let c;const r=b.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:null,resizable:null,bounded:null,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:null,isResizing:!1,resizing:null,lastX:NaN,lastY:NaN,lastW:NaN,lastH:NaN,style:{},dragEventSet:!1,resizeEventSet:!1,previousW:null,previousH:null,previousX:null,previousY:null,innerX:i.x,innerY:i.y,innerW:i.w,innerH:i.h}),d=b.computed(()=>({"vue-resizable":b.unref(f),static:i.static,resizing:r.isResizing,"vue-draggable-dragging":r.isDragging,cssTransforms:r.useCssTransforms,"render-rtl":b.unref(g),"disable-userselect":r.isDragging,"no-touch":b.unref(m)})),f=b.computed(()=>r.resizable&&!i.static),m=b.computed(()=>(r.draggable||r.resizable)&&!i.static),g=b.computed(()=>l.props.isMirrored),x=b.computed(()=>b.unref(g)?"vue-resizable-handle vue-rtl-resizable-handle":"vue-resizable-handle");function P(){a.on("updateWidth",It),a.on("setDraggable",O),a.on("setResizable",H),a.on("setBounded",E),a.on("setTransformScale",A),a.on("setRowHeight",y),a.on("setMaxRows",u),a.on("directionchange",S),a.on("setColNum",v)}P(),b.onBeforeUnmount(()=>{a.off("updateWidth",It),a.off("setDraggable",O),a.off("setResizable",H),a.off("setBounded",E),a.off("setTransformScale",A),a.off("setRowHeight",y),a.off("setMaxRows",u),a.off("directionchange",S),a.off("setColNum",v),c&&c.unset()}),b.onMounted(()=>{const h={...l.props,...l.state};h.responsive&&h.lastBreakpoint?r.cols=An(h.lastBreakpoint,h.cols):r.cols=h.colNum,r.rowHeight=h.rowHeight,r.containerWidth=h.width!==null?h.width:100,r.margin=h.margin!==void 0?h.margin:[10,10],r.maxRows=h.maxRows,i.isDraggable===null?r.draggable=h.isDraggable:r.draggable=i.isDraggable,i.isResizable===null?r.resizable=h.isResizable:r.resizable=i.isResizable,i.isBounded===null?r.bounded=h.isBounded:r.bounded=i.isBounded,r.transformScale=h.transformScale,r.useCssTransforms=h.useCssTransforms,r.useStyleCursor=h.useStyleCursor,M()}),b.watch(()=>i.isDraggable,()=>{r.draggable=i.isDraggable}),b.watch(()=>i.static,()=>{Et(),Q()}),b.watch(()=>r.draggable,()=>{Et()}),b.watch(()=>i.isResizable,()=>{r.resizable=i.isResizable}),b.watch(()=>i.isBounded,()=>{r.bounded=i.isBounded}),b.watch(()=>r.resizable,()=>{Q()}),b.watch(()=>r.rowHeight,()=>{M(),F()}),b.watch(()=>r.cols,()=>{Q(),M(),F()}),b.watch(()=>r.containerWidth,()=>{Q(),M(),F()}),b.watch(()=>i.x,h=>{r.innerX=h,M()}),b.watch(()=>i.y,h=>{r.innerY=h,M()}),b.watch(()=>i.h,h=>{r.innerH=h,M()}),b.watch(()=>i.w,h=>{r.innerW=h,M()}),b.watch(g,()=>{Q(),M()}),b.watch(()=>i.minH,()=>{Q()}),b.watch(()=>i.maxH,()=>{Q()}),b.watch(()=>i.minW,()=>{Q()}),b.watch(()=>i.maxW,()=>{Q()}),b.watch(()=>l.props.margin,h=>{!h||Number(h[0])===Number(r.margin[0])&&Number(h[1])===Number(r.margin[1])||(r.margin=h.map(R=>Number(R)||0),M(),F())});function O(h){i.isDraggable===null&&(r.draggable=h)}function H(h){i.isResizable===null&&(r.resizable=h)}function E(h){i.isBounded===null&&(r.bounded=h)}function A(h){r.transformScale=h}function y(h){r.rowHeight=h}function u(h){r.maxRows=h}function S(){M()}function v(h){r.cols=parseInt(h)}function M(){i.x+i.w>r.cols?(r.innerX=0,r.innerW=i.w>r.cols?r.cols:i.w):(r.innerX=i.x,r.innerW=i.w);const h=T(r.innerX,r.innerY,r.innerW,r.innerH);r.isDragging&&(h.top=r.dragging.top,b.unref(g)?h.right=r.dragging.left:h.left=r.dragging.left),r.isResizing&&(h.width=r.resizing.width,h.height=r.resizing.height);let R;r.useCssTransforms?b.unref(g)?R=io(h.top,h.right,h.width,h.height):R=no(h.top,h.left,h.width,h.height):b.unref(g)?R=oo(h.top,h.right,h.width,h.height):R=ro(h.top,h.left,h.width,h.height),r.style=R}function F(){const h={};for(const R of["width","height"]){const Y=r.style[R].match(/^(\d+)px$/);if(!Y)return;h[R]=Y[1]}o("container-resized",i.i,i.h,i.w,h.height,h.width)}function L(h){if(i.static)return;const R=Cn(h);if(R==null)return;const{x:j,y:Y}=R,z={width:0,height:0};let D;switch(h.type){case"resizestart":{Q(),r.previousW=r.innerW,r.previousH=r.innerH,D=T(r.innerX,r.innerY,r.innerW,r.innerH),z.width=D.width,z.height=D.height,r.resizing=z,r.isResizing=!0;break}case"resizemove":{const q=Pn(r.lastW,r.lastH,j,Y);b.unref(g)?z.width=r.resizing.width-q.deltaX/r.transformScale:z.width=r.resizing.width+q.deltaX/r.transformScale,z.height=r.resizing.height+q.deltaY/r.transformScale,r.resizing=z;break}case"resizeend":{D=T(r.innerX,r.innerY,r.innerW,r.innerH),z.width=D.width,z.height=D.height,r.resizing=null,r.isResizing=!1;break}}M(),D=At(z.height,z.width),D.w<i.minW&&(D.w=i.minW),D.w>i.maxW&&(D.w=i.maxW),D.h<i.minH&&(D.h=i.minH),D.h>i.maxH&&(D.h=i.maxH),D.h<1&&(D.h=1),D.w<1&&(D.w=1),r.lastW=j,r.lastH=Y,(r.innerW!==D.w||r.innerH!==D.h)&&o("resize",i.i,D.h,D.w,z.height,z.width),h.type==="resizeend"&&(r.previousW!==r.innerW||r.previousH!==r.innerH)&&o("resized",i.i,D.h,D.w,z.height,z.width),a.emit("resizeEvent",[h.type,i.i,r.innerX,r.innerY,D.h,D.w])}function k(h){if(i.static||r.isResizing)return;const R=Cn(h);if(R===null)return;const{x:j,y:Y}=R,z={top:0,left:0};switch(h.type){case"dragstart":{r.previousX=r.innerX,r.previousY=r.innerY;const q=h.target.offsetParent.getBoundingClientRect(),w=h.target.getBoundingClientRect(),W=w.left/r.transformScale,B=q.left/r.transformScale,J=w.right/r.transformScale,et=q.right/r.transformScale,nt=w.top/r.transformScale,it=q.top/r.transformScale;b.unref(g)?z.left=(J-et)*-1:z.left=W-B,z.top=nt-it,r.dragging=z,r.isDragging=!0;break}case"dragend":{if(!r.isDragging)return;const q=h.target.offsetParent.getBoundingClientRect(),w=h.target.getBoundingClientRect(),W=w.left/r.transformScale,B=q.left/r.transformScale,J=w.right/r.transformScale,et=q.right/r.transformScale,nt=w.top/r.transformScale,it=q.top/r.transformScale;b.unref(g)?z.left=(J-et)*-1:z.left=W-B,z.top=nt-it,r.dragging=null,r.isDragging=!1;break}case"dragmove":{const q=Pn(r.lastX,r.lastY,j,Y);if(b.unref(g)?z.left=r.dragging.left-q.deltaX/r.transformScale:z.left=r.dragging.left+q.deltaX/r.transformScale,z.top=r.dragging.top+q.deltaY/r.transformScale,r.bounded){const w=h.target.offsetParent.clientHeight-X(i.h,r.rowHeight,r.margin[1]);z.top=V(z.top,0,w);const W=N(),B=r.containerWidth-X(i.w,W,r.margin[0]);z.left=V(z.left,0,B)}r.dragging=z;break}}M();let D;b.unref(g),D=_(z.top,z.left),r.lastX=j,r.lastY=Y,(r.innerX!==D.x||r.innerY!==D.y)&&o("move",i.i,D.x,D.y),h.type==="dragend"&&(r.previousX!==r.innerX||r.previousY!==r.innerY)&&o("moved",i.i,D.x,D.y),a.emit("dragEvent",[h.type,i.i,D.x,D.y,r.innerH,r.innerW])}function T(h,R,j,Y){const z=N();let D;return b.unref(g)?D={right:Math.round(z*h+(h+1)*r.margin[0]),top:Math.round(r.rowHeight*R+(R+1)*r.margin[1]),width:j===1/0?j:Math.round(z*j+Math.max(0,j-1)*r.margin[0]),height:Y===1/0?Y:Math.round(r.rowHeight*Y+Math.max(0,Y-1)*r.margin[1])}:D={left:Math.round(z*h+(h+1)*r.margin[0]),top:Math.round(r.rowHeight*R+(R+1)*r.margin[1]),width:j===1/0?j:Math.round(z*j+Math.max(0,j-1)*r.margin[0]),height:Y===1/0?Y:Math.round(r.rowHeight*Y+Math.max(0,Y-1)*r.margin[1])},D}function _(h,R){const j=N();let Y=Math.round((R-r.margin[0])/(j+r.margin[0])),z=Math.round((h-r.margin[1])/(r.rowHeight+r.margin[1]));return Y=Math.max(Math.min(Y,r.cols-r.innerW),0),z=Math.max(Math.min(z,r.maxRows-r.innerH),0),{x:Y,y:z}}function N(){return(r.containerWidth-r.margin[0]*(r.cols+1))/r.cols}function X(h,R,j){return Number.isFinite(h)?Math.round(R*h+Math.max(0,h-1)*j):h}function V(h,R,j){return Math.max(Math.min(h,j),R)}function At(h,R,j=!1){const Y=N();let z=Math.round((R+r.margin[0])/(Y+r.margin[0])),D=0;return j?D=Math.ceil((h+r.margin[1])/(r.rowHeight+r.margin[1])):D=Math.round((h+r.margin[1])/(r.rowHeight+r.margin[1])),z=Math.max(Math.min(z,r.cols-r.innerX),0),D=Math.max(Math.min(D,r.maxRows-r.innerY),0),{w:z,h:D}}function It(h,R){r.containerWidth=h,R!=null&&(r.cols=R)}function Et(){if(c==null&&(c=ot(s.el),r.useStyleCursor||c.styleCursor(!1)),r.draggable&&!i.static){const h={ignoreFrom:i.dragIgnoreFrom,allowFrom:i.dragAllowFrom,...i.dragOption};c.draggable(h),r.dragEventSet||(r.dragEventSet=!0,c.on("dragstart dragmove dragend",R=>{k(R)}))}else c.draggable({enabled:!1})}function Q(){if(c==null&&(c=ot(s.el),r.useStyleCursor||c.styleCursor(!1)),r.resizable&&!i.static){const h=T(0,0,i.maxW,i.maxH),R=T(0,0,i.minW,i.minH),j={edges:{left:!1,right:`.${b.unref(x).trim().replace(" ",".")}`,bottom:`.${b.unref(x).trim().replace(" ",".")}`,top:!1},ignoreFrom:i.resizeIgnoreFrom,restrictSize:{min:{height:R.height*r.transformScale,width:R.width*r.transformScale},max:{height:h.height*r.transformScale,width:h.width*r.transformScale}},...i.resizeOption};i.preserveAspectRatio&&(j.modifiers=[ot.modifiers.aspectRatio({ratio:"preserve"})]),c.resizable(j),r.resizeEventSet||(r.resizeEventSet=!0,c.on("resizestart resizemove resizeend",Y=>{L(Y)}))}else c.resizable({enabled:!1})}function Pe(h){s.el=h}return(h,R)=>(b.openBlock(),b.createElementBlock("div",{ref:Pe,class:b.normalizeClass(["vue-grid-item",d.value]),style:b.normalizeStyle(r.style),id:e.i,key:e.i},[b.renderSlot(h.$slots,"default",{class:b.normalizeClass({rtl:g.value})},void 0,!0),f.value?(b.openBlock(),b.createElementBlock("span",{key:0,class:b.normalizeClass(x.value)},null,2)):b.createCommentVNode("",!0)],14,fo))}},[["__scopeId","data-v-99aff433"]]);function ho(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rn={exports:{}},po=Rn.exports={};po.forEach=function(e,t){for(var n=0;n<e.length;n++){var i=t(e[n]);if(i)return i}};var On=Rn.exports,go=function(e){var t=e.stateHandler.getState;function n(a){var l=t(a);return l&&!!l.isDetectable}function i(a){t(a).isDetectable=!0}function o(a){return!!t(a).busy}function s(a,l){t(a).busy=!!l}return{isDetectable:n,markAsDetectable:i,isBusy:o,markBusy:s}},mo=function(e){var t={};function n(a){var l=e.get(a);return l===void 0?[]:t[l]||[]}function i(a,l){var c=e.get(a);t[c]||(t[c]=[]),t[c].push(l)}function o(a,l){for(var c=n(a),r=0,d=c.length;r<d;++r)if(c[r]===l){c.splice(r,1);break}}function s(a){var l=n(a);l&&(l.length=0)}return{get:n,add:i,removeListener:o,removeAllListeners:s}},yo=function(){var e=1;function t(){return e++}return{generate:t}},bo=function(e){var t=e.idGenerator,n=e.stateHandler.getState;function i(s){var a=n(s);return a&&a.id!==void 0?a.id:null}function o(s){var a=n(s);if(!a)throw new Error("setId required the element to have a resize detection state.");var l=t.generate();return a.id=l,l}return{get:i,set:o}},vo=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var i=function(o,s){o[s]=function(){var l=console[s];if(l.apply)l.apply(console,arguments);else for(var c=0;c<arguments.length;c++)l(arguments[c])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n},Hn={exports:{}},Wn=Hn.exports={};Wn.isIE=function(e){function t(){var i=navigator.userAgent.toLowerCase();return i.indexOf("msie")!==-1||i.indexOf("trident")!==-1||i.indexOf(" edge/")!==-1}if(!t())return!1;if(!e)return!0;var n=function(){var i,o=3,s=document.createElement("div"),a=s.getElementsByTagName("i");do s.innerHTML="<!--[if gt IE "+ ++o+"]><i></i><![endif]-->";while(a[0]);return o>4?o:i}();return e===n},Wn.isLegacyOpera=function(){return!!window.opera};var Ln=Hn.exports,Nn={exports:{}},xo=Nn.exports={};xo.getOption=wo;function wo(e,t,n){var i=e[t];return i==null&&n!==void 0?n:i}var So=Nn.exports,Bn=So,Io=function(t){t=t||{};var n=t.reporter,i=Bn.getOption(t,"async",!0),o=Bn.getOption(t,"auto",!0);o&&!i&&(n&&n.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),i=!0);var s=jn(),a,l=!1;function c(x,P){!l&&o&&i&&s.size()===0&&f(),s.add(x,P)}function r(){for(l=!0;s.size();){var x=s;s=jn(),x.process()}l=!1}function d(x){l||(x===void 0&&(x=i),a&&(m(a),a=null),x?f():r())}function f(){a=g(r)}function m(x){var P=clearTimeout;return P(x)}function g(x){var P=function(O){return setTimeout(O,0)};return P(x)}return{add:c,force:d}};function jn(){var e={},t=0,n=0,i=0;function o(l,c){c||(c=l,l=0),l>n?n=l:l<i&&(i=l),e[l]||(e[l]=[]),e[l].push(c),t++}function s(){for(var l=i;l<=n;l++)for(var c=e[l],r=0;r<c.length;r++){var d=c[r];d()}}function a(){return t}return{add:o,process:s,size:a}}var Ce="_erd";function Eo(e){return e[Ce]={},$n(e)}function $n(e){return e[Ce]}function zo(e){delete e[Ce]}var Do={initState:Eo,getState:$n,cleanState:zo},Yt=Ln,Mo=function(e){e=e||{};var t=e.reporter,n=e.batchProcessor,i=e.stateHandler.getState;if(!t)throw new Error("Missing required dependency: reporter.");function o(r,d){function f(){d(r)}if(Yt.isIE(8))i(r).object={proxy:f},r.attachEvent("onresize",f);else{var m=l(r);if(!m)throw new Error("Element is not detectable by this strategy.");m.contentDocument.defaultView.addEventListener("resize",f)}}function s(r){var d=e.important?" !important; ":"; ";return(r.join(d)+d).trim()}function a(r,d,f){f||(f=d,d=r,r=null),r=r||{},r.debug;function m(g,x){var P=s(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),O=!1,H=window.getComputedStyle(g),E=g.offsetWidth,A=g.offsetHeight;i(g).startSize={width:E,height:A};function y(){function u(){if(H.position==="static"){g.style.setProperty("position","relative",r.important?"important":"");var M=function(F,L,k,T){function _(X){return X.replace(/[^-\d\.]/g,"")}var N=k[T];N!=="auto"&&_(N)!=="0"&&(F.warn("An element that is positioned static has style."+T+"="+N+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+T+" will be set to 0. Element: ",L),L.style.setProperty(T,"0",r.important?"important":""))};M(t,g,H,"top"),M(t,g,H,"right"),M(t,g,H,"bottom"),M(t,g,H,"left")}}function S(){O||u();function M(L,k){if(!L.contentDocument){var T=i(L);T.checkForObjectDocumentTimeoutId&&window.clearTimeout(T.checkForObjectDocumentTimeoutId),T.checkForObjectDocumentTimeoutId=setTimeout(function(){T.checkForObjectDocumentTimeoutId=0,M(L,k)},100);return}k(L.contentDocument)}var F=this;M(F,function(k){x(g)})}H.position!==""&&(u(),O=!0);var v=document.createElement("object");v.style.cssText=P,v.tabIndex=-1,v.type="text/html",v.setAttribute("aria-hidden","true"),v.onload=S,Yt.isIE()||(v.data="about:blank"),i(g)&&(g.appendChild(v),i(g).object=v,Yt.isIE()&&(v.data="about:blank"))}n?n.add(y):y()}Yt.isIE(8)?f(d):m(d,f)}function l(r){return i(r).object}function c(r){if(i(r)){var d=l(r);d&&(Yt.isIE(8)?r.detachEvent("onresize",d.proxy):r.removeChild(d),i(r).checkForObjectDocumentTimeoutId&&window.clearTimeout(i(r).checkForObjectDocumentTimeoutId),delete i(r).object)}}return{makeDetectable:a,addListener:o,uninstall:c}},To=On.forEach,Co=function(e){e=e||{};var t=e.reporter,n=e.batchProcessor,i=e.stateHandler.getState;e.stateHandler.hasState;var o=e.idHandler;if(!n)throw new Error("Missing required dependency: batchProcessor");if(!t)throw new Error("Missing required dependency: reporter.");var s=d(),a="erd_scroll_detection_scrollbar_style",l="erd_scroll_detection_container";function c(y){f(y,a,l)}c(window.document);function r(y){var u=e.important?" !important; ":"; ";return(y.join(u)+u).trim()}function d(){var y=500,u=500,S=document.createElement("div");S.style.cssText=r(["position: absolute","width: "+y*2+"px","height: "+u*2+"px","visibility: hidden","margin: 0","padding: 0"]);var v=document.createElement("div");v.style.cssText=r(["position: absolute","width: "+y+"px","height: "+u+"px","overflow: scroll","visibility: none","top: "+-y*3+"px","left: "+-u*3+"px","visibility: hidden","margin: 0","padding: 0"]),v.appendChild(S),document.body.insertBefore(v,document.body.firstChild);var M=y-v.clientWidth,F=u-v.clientHeight;return document.body.removeChild(v),{width:M,height:F}}function f(y,u,S){function v(k,T){T=T||function(N){y.head.appendChild(N)};var _=y.createElement("style");return _.innerHTML=k,_.id=u,T(_),_}if(!y.getElementById(u)){var M=S+"_animation",F=S+"_animation_active",L=`/* Created by the element-resize-detector library. */
|
|
`;L+="."+S+" > div::-webkit-scrollbar { "+r(["display: none"])+` }
|
|
|
|
`,L+="."+F+" { "+r(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+M,"animation-name: "+M])+` }
|
|
`,L+="@-webkit-keyframes "+M+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
|
|
`,L+="@keyframes "+M+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",v(L)}}function m(y){y.className+=" "+l+"_animation_active"}function g(y,u,S){if(y.addEventListener)y.addEventListener(u,S);else if(y.attachEvent)y.attachEvent("on"+u,S);else return t.error("[scroll] Don't know how to add event listeners.")}function x(y,u,S){if(y.removeEventListener)y.removeEventListener(u,S);else if(y.detachEvent)y.detachEvent("on"+u,S);else return t.error("[scroll] Don't know how to remove event listeners.")}function P(y){return i(y).container.childNodes[0].childNodes[0].childNodes[0]}function O(y){return i(y).container.childNodes[0].childNodes[0].childNodes[1]}function H(y,u){var S=i(y).listeners;if(!S.push)throw new Error("Cannot add listener to an element that is not detectable.");i(y).listeners.push(u)}function E(y,u,S){S||(S=u,u=y,y=null),y=y||{};function v(){if(y.debug){var w=Array.prototype.slice.call(arguments);if(w.unshift(o.get(u),"Scroll: "),t.log.apply)t.log.apply(null,w);else for(var W=0;W<w.length;W++)t.log(w[W])}}function M(w){function W(B){var J=B.getRootNode&&B.getRootNode().contains(B);return B===B.ownerDocument.body||B.ownerDocument.body.contains(B)||J}return!W(w)||window.getComputedStyle(w)===null}function F(w){var W=i(w).container.childNodes[0],B=window.getComputedStyle(W);return!B.width||B.width.indexOf("px")===-1}function L(){var w=window.getComputedStyle(u),W={};return W.position=w.position,W.width=u.offsetWidth,W.height=u.offsetHeight,W.top=w.top,W.right=w.right,W.bottom=w.bottom,W.left=w.left,W.widthCSS=w.width,W.heightCSS=w.height,W}function k(){var w=L();i(u).startSize={width:w.width,height:w.height},v("Element start size",i(u).startSize)}function T(){i(u).listeners=[]}function _(){if(v("storeStyle invoked."),!i(u)){v("Aborting because element has been uninstalled");return}var w=L();i(u).style=w}function N(w,W,B){i(w).lastWidth=W,i(w).lastHeight=B}function X(w){return P(w).childNodes[0]}function V(){return 2*s.width+1}function At(){return 2*s.height+1}function It(w){return w+10+V()}function Et(w){return w+10+At()}function Q(w){return w*2+V()}function Pe(w){return w*2+At()}function h(w,W,B){var J=P(w),et=O(w),nt=It(W),it=Et(B),K=Q(W),$=Pe(B);J.scrollLeft=nt,J.scrollTop=it,et.scrollLeft=K,et.scrollTop=$}function R(){var w=i(u).container;if(!w){w=document.createElement("div"),w.className=l,w.style.cssText=r(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),i(u).container=w,m(w),u.appendChild(w);var W=function(){i(u).onRendered&&i(u).onRendered()};g(w,"animationstart",W),i(u).onAnimationStart=W}return w}function j(){function w(){var U=i(u).style;if(U.position==="static"){u.style.setProperty("position","relative",y.important?"important":"");var lt=function(_t,Dt,Fo,ae){function Yo(Xo){return Xo.replace(/[^-\d\.]/g,"")}var Ae=Fo[ae];Ae!=="auto"&&Yo(Ae)!=="0"&&(_t.warn("An element that is positioned static has style."+ae+"="+Ae+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+ae+" will be set to 0. Element: ",Dt),Dt.style[ae]=0)};lt(t,u,U,"top"),lt(t,u,U,"right"),lt(t,u,U,"bottom"),lt(t,u,U,"left")}}function W(U,lt,_t,Dt){return U=U?U+"px":"0",lt=lt?lt+"px":"0",_t=_t?_t+"px":"0",Dt=Dt?Dt+"px":"0",["left: "+U,"top: "+lt,"right: "+Dt,"bottom: "+_t]}if(v("Injecting elements"),!i(u)){v("Aborting because element has been uninstalled");return}w();var B=i(u).container;B||(B=R());var J=s.width,et=s.height,nt=r(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),it=r(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(W(-(1+J),-(1+et),-et,-J))),K=r(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),$=r(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),tt=r(["position: absolute","left: 0","top: 0"]),zt=r(["position: absolute","width: 200%","height: 200%"]),at=document.createElement("div"),ct=document.createElement("div"),kt=document.createElement("div"),Vn=document.createElement("div"),se=document.createElement("div"),Jn=document.createElement("div");at.dir="ltr",at.style.cssText=nt,at.className=l,ct.className=l,ct.style.cssText=it,kt.style.cssText=K,Vn.style.cssText=tt,se.style.cssText=$,Jn.style.cssText=zt,kt.appendChild(Vn),se.appendChild(Jn),ct.appendChild(kt),ct.appendChild(se),at.appendChild(ct),B.appendChild(at);function Kn(){var U=i(u);U&&U.onExpand?U.onExpand():v("Aborting expand scroll handler: element has been uninstalled")}function Qn(){var U=i(u);U&&U.onShrink?U.onShrink():v("Aborting shrink scroll handler: element has been uninstalled")}g(kt,"scroll",Kn),g(se,"scroll",Qn),i(u).onExpandScroll=Kn,i(u).onShrinkScroll=Qn}function Y(){function w(K,$,tt){var zt=X(K),at=It($),ct=Et(tt);zt.style.setProperty("width",at+"px",y.important?"important":""),zt.style.setProperty("height",ct+"px",y.important?"important":"")}function W(K){var $=u.offsetWidth,tt=u.offsetHeight,zt=$!==i(u).lastWidth||tt!==i(u).lastHeight;v("Storing current size",$,tt),N(u,$,tt),n.add(0,function(){if(zt){if(!i(u)){v("Aborting because element has been uninstalled");return}if(!B()){v("Aborting because element container has not been initialized");return}if(y.debug){var ct=u.offsetWidth,kt=u.offsetHeight;(ct!==$||kt!==tt)&&t.warn(o.get(u),"Scroll: Size changed before updating detector elements.")}w(u,$,tt)}}),n.add(1,function(){if(!i(u)){v("Aborting because element has been uninstalled");return}if(!B()){v("Aborting because element container has not been initialized");return}h(u,$,tt)}),zt&&K&&n.add(2,function(){if(!i(u)){v("Aborting because element has been uninstalled");return}if(!B()){v("Aborting because element container has not been initialized");return}K()})}function B(){return!!i(u).container}function J(){function K(){return i(u).lastNotifiedWidth===void 0}v("notifyListenersIfNeeded invoked");var $=i(u);if(K()&&$.lastWidth===$.startSize.width&&$.lastHeight===$.startSize.height)return v("Not notifying: Size is the same as the start size, and there has been no notification yet.");if($.lastWidth===$.lastNotifiedWidth&&$.lastHeight===$.lastNotifiedHeight)return v("Not notifying: Size already notified");v("Current size not notified, notifying..."),$.lastNotifiedWidth=$.lastWidth,$.lastNotifiedHeight=$.lastHeight,To(i(u).listeners,function(tt){tt(u)})}function et(){if(v("startanimation triggered."),F(u)){v("Ignoring since element is still unrendered...");return}v("Element rendered.");var K=P(u),$=O(u);(K.scrollLeft===0||K.scrollTop===0||$.scrollLeft===0||$.scrollTop===0)&&(v("Scrollbars out of sync. Updating detector elements..."),W(J))}function nt(){if(v("Scroll detected."),F(u)){v("Scroll event fired while unrendered. Ignoring...");return}W(J)}if(v("registerListenersAndPositionElements invoked."),!i(u)){v("Aborting because element has been uninstalled");return}i(u).onRendered=et,i(u).onExpand=nt,i(u).onShrink=nt;var it=i(u).style;w(u,it.width,it.height)}function z(){if(v("finalizeDomMutation invoked."),!i(u)){v("Aborting because element has been uninstalled");return}var w=i(u).style;N(u,w.width,w.height),h(u,w.width,w.height)}function D(){S(u)}function q(){v("Installing..."),T(),k(),n.add(0,_),n.add(1,j),n.add(2,Y),n.add(3,z),n.add(4,D)}v("Making detectable..."),M(u)?(v("Element is detached"),R(),v("Waiting until element is attached..."),i(u).onRendered=function(){v("Element is now attached"),q()}):q()}function A(y){var u=i(y);u&&(u.onExpandScroll&&x(P(y),"scroll",u.onExpandScroll),u.onShrinkScroll&&x(O(y),"scroll",u.onShrinkScroll),u.onAnimationStart&&x(u.container,"animationstart",u.onAnimationStart),u.container&&y.removeChild(u.container))}return{makeDetectable:E,addListener:H,uninstall:A,initDocument:c}},Xt=On.forEach,Po=go,Ao=mo,ko=yo,_o=bo,Ro=vo,Fn=Ln,Oo=Io,pt=Do,Ho=Mo,Wo=Co;function Yn(e){return Array.isArray(e)||e.length!==void 0}function Xn(e){if(Array.isArray(e))return e;var t=[];return Xt(e,function(n){t.push(n)}),t}function Gn(e){return e&&e.nodeType===1}var Lo=function(e){e=e||{};var t;if(e.idHandler)t={get:function(E){return e.idHandler.get(E,!0)},set:e.idHandler.set};else{var n=ko(),i=_o({idGenerator:n,stateHandler:pt});t=i}var o=e.reporter;if(!o){var s=o===!1;o=Ro(s)}var a=gt(e,"batchProcessor",Oo({reporter:o})),l={};l.callOnAdd=!!gt(e,"callOnAdd",!0),l.debug=!!gt(e,"debug",!1);var c=Ao(t),r=Po({stateHandler:pt}),d,f=gt(e,"strategy","object"),m=gt(e,"important",!1),g={reporter:o,batchProcessor:a,stateHandler:pt,idHandler:t,important:m};if(f==="scroll"&&(Fn.isLegacyOpera()?(o.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),f="object"):Fn.isIE(9)&&(o.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),f="object")),f==="scroll")d=Wo(g);else if(f==="object")d=Ho(g);else throw new Error("Invalid strategy name: "+f);var x={};function P(E,A,y){function u(k){var T=c.get(k);Xt(T,function(N){N(k)})}function S(k,T,_){c.add(T,_),k&&_(T)}if(y||(y=A,A=E,E={}),!A)throw new Error("At least one element required.");if(!y)throw new Error("Listener required.");if(Gn(A))A=[A];else if(Yn(A))A=Xn(A);else return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");var v=0,M=gt(E,"callOnAdd",l.callOnAdd),F=gt(E,"onReady",function(){}),L=gt(E,"debug",l.debug);Xt(A,function(T){pt.getState(T)||(pt.initState(T),t.set(T));var _=t.get(T);if(L&&o.log("Attaching listener to element",_,T),!r.isDetectable(T)){if(L&&o.log(_,"Not detectable."),r.isBusy(T)){L&&o.log(_,"System busy making it detectable"),S(M,T,y),x[_]=x[_]||[],x[_].push(function(){v++,v===A.length&&F()});return}return L&&o.log(_,"Making detectable..."),r.markBusy(T,!0),d.makeDetectable({debug:L,important:m},T,function(X){if(L&&o.log(_,"onElementDetectable"),pt.getState(X)){r.markAsDetectable(X),r.markBusy(X,!1),d.addListener(X,u),S(M,X,y);var V=pt.getState(X);if(V&&V.startSize){var At=X.offsetWidth,It=X.offsetHeight;(V.startSize.width!==At||V.startSize.height!==It)&&u(X)}x[_]&&Xt(x[_],function(Et){Et()})}else L&&o.log(_,"Element uninstalled before being detectable.");delete x[_],v++,v===A.length&&F()})}L&&o.log(_,"Already detecable, adding listener."),S(M,T,y),v++}),v===A.length&&F()}function O(E){if(!E)return o.error("At least one element is required.");if(Gn(E))E=[E];else if(Yn(E))E=Xn(E);else return o.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");Xt(E,function(A){c.removeAllListeners(A),d.uninstall(A),pt.cleanState(A)})}function H(E){d.initDocument&&d.initDocument(E)}return{listenTo:P,removeListener:c.removeListener,removeAllListeners:c.removeAllListeners,uninstall:O,initDocument:H}};function gt(e,t,n){var i=e[t];return i==null&&n!==void 0?n:i}const No=ho(Lo);function Bo(e){return{all:e=e||new Map,on:function(t,n){var i=e.get(t);i?i.push(n):e.set(t,[n])},off:function(t,n){var i=e.get(t);i&&(n?i.splice(i.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var i=e.get(t);i&&i.slice().map(function(o){o(n)}),(i=e.get("*"))&&i.slice().map(function(o){o(t,n)})}}}function Zn(){return typeof window<"u"}const qn=()=>{};function jo(e,t=qn){if(!Zn){t();return}window.addEventListener(e,t)}function $o(e,t=qn){Zn&&window.removeEventListener(e,t)}const Un=_n({__name:"grid-layout",props:{layout:{type:Array,required:!0},responsiveLayouts:{type:Object,default(){return{}}},colNum:{type:Number,default:12},rowHeight:{type:Number,default:150},maxRows:{type:Number,default:1/0},margin:{type:Array,default(){return[10,10]}},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},preventCollision:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},responsive:{type:Boolean,default:!1},breakpoints:{type:Object,default(){return{lg:1200,md:996,sm:768,xs:480,xxs:0}}},cols:{type:Object,default(){return{lg:12,md:10,sm:6,xs:4,xxs:2}}},useStyleCursor:{type:Boolean,default:!0},transformScale:{type:Number,default:1}},emits:["update:layout","layout-ready","layout-created","layout-before-mount","layout-mounted","layout-updated","breakpoint-changed"],setup(e,{expose:t,emit:n}){const i=e,o=n,s=Bo(),a={el:void 0,placeholderEl:void 0,placeholder:{},emitter:s};t(a);const l=No({strategy:"scroll",callOnAdd:!1}),c=b.reactive({width:null,mergedStyle:{},isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:-1},layout:[],layouts:{},lastBreakpoint:null,originalLayout:null});b.provide("emitter",s),b.provide("gridLayout",{props:i,state:c});function r(){s.on("resizeEvent",O),s.on("dragEvent",P),o("layout-created",i.layout),jo("resize",g)}r(),b.onBeforeMount(()=>{o("layout-before-mount",c.layout)}),b.onMounted(()=>{o("layout-mounted",c.layout)}),b.onBeforeUnmount(()=>{s.off("resizeEvent",O),s.off("dragEvent",P),$o("resize",g),l&&a.el&&l.uninstall(a.el)}),b.watch(()=>c.width,async(u,S)=>{s.emit("updateWidth",c.width),m(),S===null&&(await b.nextTick(),o("layout-ready",c.layout))}),b.watch(()=>i.layout,()=>{so(i.layout),c.originalLayout=i.layout,f()},{deep:!0,immediate:!0}),b.watch(()=>i.colNum,()=>{c.colNum=i.colNum,s.emit("setColNum",i.colNum)},{immediate:!0}),b.watch(()=>i.rowHeight,()=>{s.emit("setRowHeight",i.rowHeight)}),b.watch(()=>i.isDraggable,()=>{s.emit("setDraggable",i.isDraggable)}),b.watch(()=>i.isResizable,()=>{s.emit("setResizable",i.isResizable)}),b.watch(()=>i.isBounded,()=>{s.emit("setBounded",i.isBounded)}),b.watch(()=>i.transformScale,()=>{s.emit("setTransformScale",i.transformScale)}),b.watch(()=>i.responsive,()=>{i.responsive||(c.layout=St(c.originalLayout),s.emit("setColNum",i.colNum)),g()}),b.watch(()=>i.maxRows,()=>{s.emit("setMaxRows",i.maxRows)}),b.watch(()=>i.margin,()=>{m()},{deep:!0});function d(u,S){if((u==null?void 0:u.length)!==(S==null?void 0:S.length))return!0;let v=!1,M=0;for(;M<u.length;){const F=u[M],L=Object.keys(F),k=S[M],T=Object.keys(k),_=[...new Set([...L,...T])];let N=0;for(;N<_.length;){const X=_[N];if(F[X]!==k[X]){v=!0;break}N+=1}if(v)break;M+=1}return v}function f(){if(d(i.layout,c.layout)&&(E(),c.layout=St(i.layout),$t(c.layout,i.verticalCompact),s.emit("updateWidth",c.width),m(),d(i.layout,c.layout))){const S=St(c.layout);o("layout-updated",S),o("update:layout",S)}}function m(){c.mergedStyle={height:x()}}function g(){a.el&&(c.width=a.el.offsetWidth),s.emit("resizeEvent")}function x(){var S;if(!i.autoSize)return;const u=((S=i.margin)==null?void 0:S[1])||0;return`${Qr(c.layout)*(i.rowHeight+u)+u}px`}function P([u,S,v,M,F,L]=[]){let k=En(c.layout,S);if(k==null&&(k={x:0,y:0}),u==="dragstart"&&!i.verticalCompact&&(c.positionsBeforeDrag=c.layout.reduce((T,{i:_,x:N,y:X})=>({...T,[_]:{x:N,y:X}}),{})),u==="dragmove"||u==="dragstart"?(c.placeholder.x=k.x,c.placeholder.y=k.y,c.placeholder.w=L,c.placeholder.h=F,c.isDragging=!0):c.isDragging=!1,c.layout=Me(c.layout,k,v,M,!0,i.preventCollision),i.restoreOnDrag?(k.static=!0,$t(c.layout,i.verticalCompact,c.positionsBeforeDrag),k.static=!1):$t(c.layout,i.verticalCompact),m(),u==="dragend"&&delete c.positionsBeforeDrag,d(i.layout,c.layout)){const T=St(c.layout);o("layout-updated",T),o("update:layout",T)}}function O([u,S,v,M,F,L]=[]){let k=En(c.layout,S);k==null&&(k={h:0,w:0});let T;if(i.preventCollision){const _=zn(c.layout,{...k,w:L,h:F}).filter(N=>N.i!==k.i);if(T=_.length>0,T){let N=1/0,X=1/0;_.forEach(V=>{V.x>k.x&&(N=Math.min(N,V.x)),V.y>k.y&&(X=Math.min(X,V.y))}),Number.isFinite(N)&&(k.w=N-k.x),Number.isFinite(X)&&(k.h=X-k.y)}}if(T||(k.w=L,k.h=F),u==="resizestart"||u==="resizemove"?(c.placeholder.x=v,c.placeholder.y=M,c.placeholder.w=k.w,c.placeholder.h=k.h,c.isDragging=!0):c.isDragging=!1,i.responsive&&H(),$t(c.layout,i.verticalCompact),m(),d(i.layout,c.layout)){const _=St(c.layout);o("layout-updated",_),o("update:layout",_)}}function H(){const u=lo(i.breakpoints,c.width),S=An(u,i.cols);S!==c.colNum&&(c.colNum=S,c.layout=uo(c.layout,c.layouts,i.breakpoints,u,S,i.verticalCompact),c.layouts[u]=c.layout,s.emit("setColNum",S)),c.lastBreakpoint!==u&&(c.lastBreakpoint=u,o("breakpoint-changed",u,c.layout))}function E(){c.layouts={...i.responsiveLayouts}}function A(u){!u||u===a.el||(a.el=u,l&&l.listenTo(a.el,()=>{g()}),c.width=a.el.offsetWidth)}function y(u){u&&(a.placeholder=u,a.placeholderEl=u.el)}return(u,S)=>(b.openBlock(),b.createElementBlock("div",{ref:A,class:"vue-grid-layout",style:b.normalizeStyle(c.mergedStyle)},[b.renderSlot(u.$slots,"default",{},void 0,!0),b.withDirectives(b.createVNode(Te,{ref:y,class:"vue-grid-placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:"placeholder"},null,8,["x","y","w","h"]),[[b.vShow,c.isDragging]])],4))}},[["__scopeId","data-v-a10aee95"]]);function oe(e){oe.installed||(oe.installed=!0,e.component("GridLayout",Un),e.component("GridItem",Te))}return Mt.GridItem=Te,Mt.GridLayout=Un,Mt.default=oe,Mt.install=oe,Object.defineProperties(Mt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),Mt}({},Vue);
|