claude-web/node_modules/vue-grid-layout-v3/dist/vue-grid-layout-v3.cjs

13 lines
104 KiB
JavaScript

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