diff --git a/assets/index-bxe7n5UW.css b/assets/index-bxe7n5UW.css new file mode 100644 index 0000000..dbbd1ec --- /dev/null +++ b/assets/index-bxe7n5UW.css @@ -0,0 +1 @@ +.vue-grid-item{box-sizing:border-box;touch-action:none;background-color:#f2f2f2;transition:all .2s ease;transition-property:left,top,right}.vue-grid-item.no-touch{touch-action:none}.vue-grid-item.css-transforms{right:auto;left:0;transition-property:transform}.vue-grid-item.resizing{z-index:3;opacity:.6}.vue-grid-item.vue-draggable-dragging{z-index:3;transition:none}.vue-grid-item.vue-grid-placeholder{z-index:2;-webkit-user-select:none;user-select:none;background:red;opacity:.2;transition-duration:.1s}.vue-grid-item>.vue-resizable-handle{position:absolute;right:0;bottom:0;z-index:20;box-sizing:border-box;width:20px;height:20px;padding:0 3px 3px 0;cursor:se-resize;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg08c3ZnIGlkPSJVbnRpdGxlZC1QYWdlJTIwMSIgdmlld0JveD0iMCAwIDYgNiIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6I2ZmZmZmZjAwIiB2ZXJzaW9uPSIxLjEiDQl4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIg0JeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ig0+DQk8ZyBvcGFjaXR5PSIwLjMwMiI+DQkJPHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz4NCTwvZz4NPC9zdmc+);background-repeat:no-repeat;background-position:bottom right;background-origin:content-box}.vue-grid-item.disable-user-select{-webkit-user-select:none;user-select:none}.vue-grid-layout{position:relative;transition:height .2s ease} diff --git a/assets/index-hrPU_8Po.js b/assets/index-hrPU_8Po.js new file mode 100644 index 0000000..e0c9cef --- /dev/null +++ b/assets/index-hrPU_8Po.js @@ -0,0 +1,23 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(i){if(i.ep)return;i.ep=!0;const r=n(i);fetch(i.href,r)}})();/** +* @vue/shared v3.4.14 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function bi(t,e){const n=new Set(t.split(","));return e?o=>n.has(o.toLowerCase()):o=>n.has(o)}const ht={},$e=[],Ht=()=>{},oa=()=>!1,eo=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),xi=t=>t.startsWith("onUpdate:"),Tt=Object.assign,wi=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},ia=Object.prototype.hasOwnProperty,st=(t,e)=>ia.call(t,e),Z=Array.isArray,Be=t=>no(t)==="[object Map]",rs=t=>no(t)==="[object Set]",tt=t=>typeof t=="function",_t=t=>typeof t=="string",Ye=t=>typeof t=="symbol",vt=t=>t!==null&&typeof t=="object",ss=t=>(vt(t)||tt(t))&&tt(t.then)&&tt(t.catch),ls=Object.prototype.toString,no=t=>ls.call(t),ra=t=>no(t).slice(8,-1),as=t=>no(t)==="[object Object]",_i=t=>_t(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Nn=bi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),oo=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},sa=/-(\w)/g,Gt=oo(t=>t.replace(sa,(e,n)=>n?n.toUpperCase():"")),la=/\B([A-Z])/g,Ge=oo(t=>t.replace(la,"-$1").toLowerCase()),io=oo(t=>t.charAt(0).toUpperCase()+t.slice(1)),_o=oo(t=>t?`on${io(t)}`:""),ve=(t,e)=>!Object.is(t,e),Eo=(t,e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},aa=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Ji;const cs=()=>Ji||(Ji=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _n(t){if(Z(t)){const e={};for(let n=0;n{if(n){const o=n.split(ua);o.length>1&&(e[o[0].trim()]=o[1].trim())}}),e}function hn(t){let e="";if(_t(t))e=t;else if(Z(t))for(let n=0;n_t(t)?t:t==null?"":Z(t)||vt(t)&&(t.toString===ls||!tt(t.toString))?JSON.stringify(t,fs,2):String(t),fs=(t,e)=>e&&e.__v_isRef?fs(t,e.value):Be(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[o,i],r)=>(n[So(o,r)+" =>"]=i,n),{})}:rs(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>So(n))}:Ye(e)?So(e):vt(e)&&!Z(e)&&!as(e)?String(e):e,So=(t,e="")=>{var n;return Ye(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +* @vue/reactivity v3.4.14 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let $t;class ma{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=$t,!e&&$t&&(this.index=($t.scopes||($t.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=$t;try{return $t=this,e()}finally{$t=n}}}on(){$t=this}off(){$t=this.parent}stop(e){if(this._active){let n,o;for(n=0,o=this.effects.length;n=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),Le()}return this._dirtyLevel>=2}set dirty(e){this._dirtyLevel=e?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=he,n=Ae;try{return he=!0,Ae=this,this._runnings++,Zi(this),this.fn()}finally{Qi(this),this._runnings--,Ae=n,he=e}}stop(){var e;this.active&&(Zi(this),Qi(this),(e=this.onStop)==null||e.call(this),this.active=!1)}}function ba(t){return t.value}function Zi(t){t._trackId++,t._depsLength=0}function Qi(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e{const n=new Map;return n.cleanup=t,n.computed=e,n},Ho=new WeakMap,ze=Symbol(""),ko=Symbol("");function Dt(t,e,n){if(he&&Ae){let o=Ho.get(t);o||Ho.set(t,o=new Map);let i=o.get(n);i||o.set(n,i=ms(()=>o.delete(n))),hs(Ae,i)}}function ne(t,e,n,o,i,r){const s=Ho.get(t);if(!s)return;let l=[];if(e==="clear")l=[...s.values()];else if(n==="length"&&Z(t)){const c=Number(o);s.forEach((a,u)=>{(u==="length"||!Ye(u)&&u>=c)&&l.push(a)})}else switch(n!==void 0&&l.push(s.get(n)),e){case"add":Z(t)?_i(n)&&l.push(s.get("length")):(l.push(s.get(ze)),Be(t)&&l.push(s.get(ko)));break;case"delete":Z(t)||(l.push(s.get(ze)),Be(t)&&l.push(s.get(ko)));break;case"set":Be(t)&&l.push(s.get(ze));break}Si();for(const c of l)c&&gs(c,2);Ti()}const xa=bi("__proto__,__v_isRef,__isVue"),vs=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Ye)),tr=wa();function wa(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const o=at(this);for(let r=0,s=this.length;r{t[e]=function(...n){Ne(),Si();const o=at(this)[e].apply(this,n);return Ti(),Le(),o}}),t}function _a(t){const e=at(this);return Dt(e,"has",t),e.hasOwnProperty(t)}class ys{constructor(e=!1,n=!1){this._isReadonly=e,this._shallow=n}get(e,n,o){const i=this._isReadonly,r=this._shallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(i?r?Fa:_s:r?ws:xs).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(o)?e:void 0;const s=Z(e);if(!i){if(s&&st(tr,n))return Reflect.get(tr,n,o);if(n==="hasOwnProperty")return _a}const l=Reflect.get(e,n,o);return(Ye(n)?vs.has(n):xa(n))||(i||Dt(e,"get",n),r)?l:Rt(l)?s&&_i(n)?l:l.value:vt(l)?i?Es(l):so(l):l}}class bs extends ys{constructor(e=!1){super(!1,e)}set(e,n,o,i){let r=e[n];if(!this._shallow){const c=Ke(r);if(!$n(o)&&!Ke(o)&&(r=at(r),o=at(o)),!Z(e)&&Rt(r)&&!Rt(o))return c?!1:(r.value=o,!0)}const s=Z(e)&&_i(n)?Number(n)t,ro=t=>Reflect.getPrototypeOf(t);function In(t,e,n=!1,o=!1){t=t.__v_raw;const i=at(t),r=at(e);n||(ve(e,r)&&Dt(i,"get",e),Dt(i,"get",r));const{has:s}=ro(i),l=o?Oi:n?Ci:gn;if(s.call(i,e))return l(t.get(e));if(s.call(i,r))return l(t.get(r));t!==i&&t.get(e)}function Pn(t,e=!1){const n=this.__v_raw,o=at(n),i=at(t);return e||(ve(t,i)&&Dt(o,"has",t),Dt(o,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function Cn(t,e=!1){return t=t.__v_raw,!e&&Dt(at(t),"iterate",ze),Reflect.get(t,"size",t)}function er(t){t=at(t);const e=at(this);return ro(e).has.call(e,t)||(e.add(t),ne(e,"add",t,t)),this}function nr(t,e){e=at(e);const n=at(this),{has:o,get:i}=ro(n);let r=o.call(n,t);r||(t=at(t),r=o.call(n,t));const s=i.call(n,t);return n.set(t,e),r?ve(e,s)&&ne(n,"set",t,e):ne(n,"add",t,e),this}function or(t){const e=at(this),{has:n,get:o}=ro(e);let i=n.call(e,t);i||(t=at(t),i=n.call(e,t)),o&&o.call(e,t);const r=e.delete(t);return i&&ne(e,"delete",t,void 0),r}function ir(){const t=at(this),e=t.size!==0,n=t.clear();return e&&ne(t,"clear",void 0,void 0),n}function Mn(t,e){return function(o,i){const r=this,s=r.__v_raw,l=at(s),c=e?Oi:t?Ci:gn;return!t&&Dt(l,"iterate",ze),s.forEach((a,u)=>o.call(i,c(a),c(u),r))}}function An(t,e,n){return function(...o){const i=this.__v_raw,r=at(i),s=Be(r),l=t==="entries"||t===Symbol.iterator&&s,c=t==="keys"&&s,a=i[t](...o),u=n?Oi:e?Ci:gn;return!e&&Dt(r,"iterate",c?ko:ze),{next(){const{value:d,done:h}=a.next();return h?{value:d,done:h}:{value:l?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function se(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Ia(){const t={get(r){return In(this,r)},get size(){return Cn(this)},has:Pn,add:er,set:nr,delete:or,clear:ir,forEach:Mn(!1,!1)},e={get(r){return In(this,r,!1,!0)},get size(){return Cn(this)},has:Pn,add:er,set:nr,delete:or,clear:ir,forEach:Mn(!1,!0)},n={get(r){return In(this,r,!0)},get size(){return Cn(this,!0)},has(r){return Pn.call(this,r,!0)},add:se("add"),set:se("set"),delete:se("delete"),clear:se("clear"),forEach:Mn(!0,!1)},o={get(r){return In(this,r,!0,!0)},get size(){return Cn(this,!0)},has(r){return Pn.call(this,r,!0)},add:se("add"),set:se("set"),delete:se("delete"),clear:se("clear"),forEach:Mn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{t[r]=An(r,!1,!1),n[r]=An(r,!0,!1),e[r]=An(r,!1,!0),o[r]=An(r,!0,!0)}),[t,n,e,o]}const[Pa,Ca,Ma,Aa]=Ia();function Ii(t,e){const n=e?t?Aa:Ma:t?Ca:Pa;return(o,i,r)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?o:Reflect.get(st(n,i)&&i in o?n:o,i,r)}const za={get:Ii(!1,!1)},Da={get:Ii(!1,!0)},Ra={get:Ii(!0,!1)},xs=new WeakMap,ws=new WeakMap,_s=new WeakMap,Fa=new WeakMap;function Na(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function La(t){return t.__v_skip||!Object.isExtensible(t)?0:Na(ra(t))}function so(t){return Ke(t)?t:Pi(t,!1,Sa,za,xs)}function ja(t){return Pi(t,!1,Oa,Da,ws)}function Es(t){return Pi(t,!0,Ta,Ra,_s)}function Pi(t,e,n,o,i){if(!vt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const s=La(t);if(s===0)return t;const l=new Proxy(t,s===2?o:n);return i.set(t,l),l}function We(t){return Ke(t)?We(t.__v_raw):!!(t&&t.__v_isReactive)}function Ke(t){return!!(t&&t.__v_isReadonly)}function $n(t){return!!(t&&t.__v_isShallow)}function Ss(t){return We(t)||Ke(t)}function at(t){const e=t&&t.__v_raw;return e?at(e):t}function Ts(t){return kn(t,"__v_skip",!0),t}const gn=t=>vt(t)?so(t):t,Ci=t=>vt(t)?Es(t):t;class Os{constructor(e,n,o,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ei(()=>e(this._value),()=>$o(this,1)),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=o}get value(){const e=at(this);return(!e._cacheable||e.effect.dirty)&&ve(e._value,e._value=e.effect.run())&&$o(e,2),Is(e),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Ha(t,e,n=!1){let o,i;const r=tt(t);return r?(o=t,i=Ht):(o=t.get,i=t.set),new Os(o,i,r||!i,n)}function Is(t){he&&Ae&&(t=at(t),hs(Ae,t.dep||(t.dep=ms(()=>t.dep=void 0,t instanceof Os?t:void 0))))}function $o(t,e=2,n){t=at(t);const o=t.dep;o&&gs(o,e)}function Rt(t){return!!(t&&t.__v_isRef===!0)}function yt(t){return ka(t,!1)}function ka(t,e){return Rt(t)?t:new $a(t,e)}class $a{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:at(e),this._value=n?e:gn(e)}get value(){return Is(this),this._value}set value(e){const n=this.__v_isShallow||$n(e)||Ke(e);e=n?e:at(e),ve(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:gn(e),$o(this,2))}}function Bn(t){return Rt(t)?t.value:t}const Ba={get:(t,e,n)=>Bn(Reflect.get(t,e,n)),set:(t,e,n,o)=>{const i=t[e];return Rt(i)&&!Rt(n)?(i.value=n,!0):Reflect.set(t,e,n,o)}};function Ps(t){return We(t)?t:new Proxy(t,Ba)}/** +* @vue/runtime-core v3.4.14 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function ge(t,e,n,o){let i;try{i=o?t(...o):t()}catch(r){lo(r,e,n)}return i}function Wt(t,e,n,o){if(tt(t)){const r=ge(t,e,n,o);return r&&ss(r)&&r.catch(s=>{lo(s,e,n)}),r}const i=[];for(let r=0;r>>1,i=It[o],r=vn(i);rYt&&It.splice(e,1)}function Ka(t){Z(t)?Ue.push(...t):(!ce||!ce.includes(t,t.allowRecurse?Ce+1:Ce))&&Ue.push(t),Ms()}function rr(t,e,n=mn?Yt+1:0){for(;nvn(n)-vn(o));if(Ue.length=0,ce){ce.push(...e);return}for(ce=e,Ce=0;Cet.id==null?1/0:t.id,Xa=(t,e)=>{const n=vn(t)-vn(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function zs(t){Bo=!1,mn=!0,It.sort(Xa);try{for(Yt=0;Yt_t(g)?g.trim():g)),d&&(i=n.map(aa))}let l,c=o[l=_o(e)]||o[l=_o(Gt(e))];!c&&r&&(c=o[l=_o(Ge(e))]),c&&Wt(c,t,6,i);const a=o[l+"Once"];if(a){if(!t.emitted)t.emitted={};else if(t.emitted[l])return;t.emitted[l]=!0,Wt(a,t,6,i)}}function Ds(t,e,n=!1){const o=e.emitsCache,i=o.get(t);if(i!==void 0)return i;const r=t.emits;let s={},l=!1;if(!tt(t)){const c=a=>{const u=Ds(a,e,!0);u&&(l=!0,Tt(s,u))};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}return!r&&!l?(vt(t)&&o.set(t,null),null):(Z(r)?r.forEach(c=>s[c]=null):Tt(s,r),vt(t)&&o.set(t,s),s)}function ao(t,e){return!t||!eo(e)?!1:(e=e.slice(2).replace(/Once$/,""),st(t,e[0].toLowerCase()+e.slice(1))||st(t,Ge(e))||st(t,e))}let Et=null,Rs=null;function Wn(t){const e=Et;return Et=t,Rs=t&&t.type.__scopeId||null,e}function zi(t,e=Et,n){if(!e||t._n)return t;const o=(...i)=>{o._d&&mr(-1);const r=Wn(e);let s;try{s=t(...i)}finally{Wn(r),o._d&&mr(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function To(t){const{type:e,vnode:n,proxy:o,withProxy:i,props:r,propsOptions:[s],slots:l,attrs:c,emit:a,render:u,renderCache:d,data:h,setupState:g,ctx:w,inheritAttrs:D}=t;let R,F;const j=Wn(t);try{if(n.shapeFlag&4){const S=i||o,m=S;R=qt(u.call(m,S,d,r,g,h,w)),F=c}else{const S=e;R=qt(S.length>1?S(r,{attrs:c,slots:l,emit:a}):S(r,null)),F=e.props?c:Ya(c)}}catch(S){cn.length=0,lo(S,t,1),R=Ut(ye)}let L=R;if(F&&D!==!1){const S=Object.keys(F),{shapeFlag:m}=L;S.length&&m&7&&(s&&S.some(xi)&&(F=Ga(F,s)),L=Xe(L,F))}return n.dirs&&(L=Xe(L),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition&&(L.transition=n.transition),R=L,Wn(j),R}const Ya=t=>{let e;for(const n in t)(n==="class"||n==="style"||eo(n))&&((e||(e={}))[n]=t[n]);return e},Ga=(t,e)=>{const n={};for(const o in t)(!xi(o)||!(o.slice(9)in e))&&(n[o]=t[o]);return n};function Ja(t,e,n){const{props:o,children:i,component:r}=t,{props:s,children:l,patchFlag:c}=e,a=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return o?sr(o,s,a):!!s;if(c&8){const u=e.dynamicProps;for(let d=0;dt.__isSuspense;function oc(t,e){e&&e.pendingBranch?Z(t)?e.effects.push(...t):e.effects.push(t):Ka(t)}const ic=Symbol.for("v-scx"),rc=()=>an(ic),zn={};function mt(t,e,n){return Ns(t,e,n)}function Ns(t,e,{immediate:n,deep:o,flush:i,once:r,onTrack:s,onTrigger:l}=ht){if(e&&r){const N=e;e=(...A)=>{N(...A),m()}}const c=Pt,a=N=>o===!0?N:Me(N,o===!1?1:void 0);let u,d=!1,h=!1;if(Rt(t)?(u=()=>t.value,d=$n(t)):We(t)?(u=()=>a(t),d=!0):Z(t)?(h=!0,d=t.some(N=>We(N)||$n(N)),u=()=>t.map(N=>{if(Rt(N))return N.value;if(We(N))return a(N);if(tt(N))return ge(N,c,2)})):tt(t)?e?u=()=>ge(t,c,2):u=()=>(g&&g(),Wt(t,c,3,[w])):u=Ht,e&&o){const N=u;u=()=>Me(N())}let g,w=N=>{g=L.onStop=()=>{ge(N,c,4),g=L.onStop=void 0}},D;if(go)if(w=Ht,e?n&&Wt(e,c,3,[u(),h?[]:void 0,w]):u(),i==="sync"){const N=rc();D=N.__watcherHandles||(N.__watcherHandles=[])}else return Ht;let R=h?new Array(t.length).fill(zn):zn;const F=()=>{if(!(!L.active||!L.dirty))if(e){const N=L.run();(o||d||(h?N.some((A,G)=>ve(A,R[G])):ve(N,R)))&&(g&&g(),Wt(e,c,3,[N,R===zn?void 0:h&&R[0]===zn?[]:R,w]),R=N)}else L.run()};F.allowRecurse=!!e;let j;i==="sync"?j=F:i==="post"?j=()=>zt(F,c&&c.suspense):(F.pre=!0,c&&(F.id=c.uid),j=()=>Ai(F));const L=new Ei(u,Ht,j),S=ya(),m=()=>{L.stop(),S&&wi(S.effects,L)};return e?n?F():R=L.run():i==="post"?zt(L.run.bind(L),c&&c.suspense):L.run(),D&&D.push(m),m}function sc(t,e,n){const o=this.proxy,i=_t(t)?t.includes(".")?Ls(o,t):()=>o[t]:t.bind(o,o);let r;tt(e)?r=e:(r=e.handler,n=e);const s=En(this),l=Ns(i,r.bind(o),n);return s(),l}function Ls(t,e){const n=e.split(".");return()=>{let o=t;for(let i=0;i0){if(n>=e)return t;n++}if(o=o||new Set,o.has(t))return t;if(o.add(t),Rt(t))Me(t.value,e,n,o);else if(Z(t))for(let i=0;i{Me(i,e,n,o)});else if(as(t))for(const i in t)Me(t[i],e,n,o);return t}function lc(t,e){if(Et===null)return t;const n=mo(Et)||Et.proxy,o=t.dirs||(t.dirs=[]);for(let i=0;i!!t.type.__asyncLoader,js=t=>t.type.__isKeepAlive;function ac(t,e){Hs(t,"a",e)}function cc(t,e){Hs(t,"da",e)}function Hs(t,e,n=Pt){const o=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(co(e,o,n),n){let i=n.parent;for(;i&&i.parent;)js(i.parent.vnode)&&uc(o,e,n,i),i=i.parent}}function uc(t,e,n,o){const i=co(e,t,o,!0);$s(()=>{wi(o[e],i)},n)}function co(t,e,n=Pt,o=!1){if(n){const i=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...s)=>{if(n.isUnmounted)return;Ne();const l=En(n),c=Wt(e,n,t,s);return l(),Le(),c});return o?i.unshift(r):i.push(r),r}}const ie=t=>(e,n=Pt)=>(!go||t==="sp")&&co(t,(...o)=>e(...o),n),ks=ie("bm"),Ri=ie("m"),fc=ie("bu"),dc=ie("u"),Fi=ie("bum"),$s=ie("um"),pc=ie("sp"),hc=ie("rtg"),gc=ie("rtc");function mc(t,e=Pt){co("ec",t,e)}function vc(t,e,n,o){let i;const r=n&&n[o];if(Z(t)||_t(t)){i=new Array(t.length);for(let s=0,l=t.length;se(s,l,void 0,r&&r[l]));else{const s=Object.keys(t);i=new Array(s.length);for(let l=0,c=s.length;ltl(e)?!(e.type===ye||e.type===jt&&!Bs(e.children)):!0)?t:null}const Uo=t=>t?nl(t)?mo(t)||t.proxy:Uo(t.parent):null,ln=Tt(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Uo(t.parent),$root:t=>Uo(t.root),$emit:t=>t.emit,$options:t=>Ni(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,Ai(t.update)}),$nextTick:t=>t.n||(t.n=Zt.bind(t.proxy)),$watch:t=>sc.bind(t)}),Oo=(t,e)=>t!==ht&&!t.__isScriptSetup&&st(t,e),yc={get({_:t},e){const{ctx:n,setupState:o,data:i,props:r,accessCache:s,type:l,appContext:c}=t;let a;if(e[0]!=="$"){const g=s[e];if(g!==void 0)switch(g){case 1:return o[e];case 2:return i[e];case 4:return n[e];case 3:return r[e]}else{if(Oo(o,e))return s[e]=1,o[e];if(i!==ht&&st(i,e))return s[e]=2,i[e];if((a=t.propsOptions[0])&&st(a,e))return s[e]=3,r[e];if(n!==ht&&st(n,e))return s[e]=4,n[e];Vo&&(s[e]=0)}}const u=ln[e];let d,h;if(u)return e==="$attrs"&&Dt(t,"get",e),u(t);if((d=l.__cssModules)&&(d=d[e]))return d;if(n!==ht&&st(n,e))return s[e]=4,n[e];if(h=c.config.globalProperties,st(h,e))return h[e]},set({_:t},e,n){const{data:o,setupState:i,ctx:r}=t;return Oo(i,e)?(i[e]=n,!0):o!==ht&&st(o,e)?(o[e]=n,!0):st(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:o,appContext:i,propsOptions:r}},s){let l;return!!n[s]||t!==ht&&st(t,s)||Oo(e,s)||(l=r[0])&&st(l,s)||st(o,s)||st(ln,s)||st(i.config.globalProperties,s)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:st(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function ar(t){return Z(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let Vo=!0;function bc(t){const e=Ni(t),n=t.proxy,o=t.ctx;Vo=!1,e.beforeCreate&&cr(e.beforeCreate,t,"bc");const{data:i,computed:r,methods:s,watch:l,provide:c,inject:a,created:u,beforeMount:d,mounted:h,beforeUpdate:g,updated:w,activated:D,deactivated:R,beforeDestroy:F,beforeUnmount:j,destroyed:L,unmounted:S,render:m,renderTracked:N,renderTriggered:A,errorCaptured:G,serverPrefetch:lt,expose:K,inheritAttrs:ot,components:J,directives:it,filters:gt}=e;if(a&&xc(a,o,null),s)for(const C in s){const M=s[C];tt(M)&&(o[C]=M.bind(n))}if(i){const C=i.call(n,n);vt(C)&&(t.data=so(C))}if(Vo=!0,r)for(const C in r){const M=r[C],V=tt(M)?M.bind(n,n):tt(M.get)?M.get.bind(n,n):Ht,ct=!tt(M)&&tt(M.set)?M.set.bind(n):Ht,ut=un({get:V,set:ct});Object.defineProperty(o,C,{enumerable:!0,configurable:!0,get:()=>ut.value,set:k=>ut.value=k})}if(l)for(const C in l)Ws(l[C],o,n,C);if(c){const C=tt(c)?c.call(n):c;Reflect.ownKeys(C).forEach(M=>{Vs(M,C[M])})}u&&cr(u,t,"c");function E(C,M){Z(M)?M.forEach(V=>C(V.bind(n))):M&&C(M.bind(n))}if(E(ks,d),E(Ri,h),E(fc,g),E(dc,w),E(ac,D),E(cc,R),E(mc,G),E(gc,N),E(hc,A),E(Fi,j),E($s,S),E(pc,lt),Z(K))if(K.length){const C=t.exposed||(t.exposed={});K.forEach(M=>{Object.defineProperty(C,M,{get:()=>n[M],set:V=>n[M]=V})})}else t.exposed||(t.exposed={});m&&t.render===Ht&&(t.render=m),ot!=null&&(t.inheritAttrs=ot),J&&(t.components=J),it&&(t.directives=it)}function xc(t,e,n=Ht){Z(t)&&(t=Ko(t));for(const o in t){const i=t[o];let r;vt(i)?"default"in i?r=an(i.from||o,i.default,!0):r=an(i.from||o):r=an(i),Rt(r)?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):e[o]=r}}function cr(t,e,n){Wt(Z(t)?t.map(o=>o.bind(e.proxy)):t.bind(e.proxy),e,n)}function Ws(t,e,n,o){const i=o.includes(".")?Ls(n,o):()=>n[o];if(_t(t)){const r=e[t];tt(r)&&mt(i,r)}else if(tt(t))mt(i,t.bind(n));else if(vt(t))if(Z(t))t.forEach(r=>Ws(r,e,n,o));else{const r=tt(t.handler)?t.handler.bind(n):e[t.handler];tt(r)&&mt(i,r,t)}}function Ni(t){const e=t.type,{mixins:n,extends:o}=e,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=t.appContext,l=r.get(e);let c;return l?c=l:!i.length&&!n&&!o?c=e:(c={},i.length&&i.forEach(a=>Un(c,a,s,!0)),Un(c,e,s)),vt(e)&&r.set(e,c),c}function Un(t,e,n,o=!1){const{mixins:i,extends:r}=e;r&&Un(t,r,n,!0),i&&i.forEach(s=>Un(t,s,n,!0));for(const s in e)if(!(o&&s==="expose")){const l=wc[s]||n&&n[s];t[s]=l?l(t[s],e[s]):e[s]}return t}const wc={data:ur,props:fr,emits:fr,methods:nn,computed:nn,beforeCreate:Mt,created:Mt,beforeMount:Mt,mounted:Mt,beforeUpdate:Mt,updated:Mt,beforeDestroy:Mt,beforeUnmount:Mt,destroyed:Mt,unmounted:Mt,activated:Mt,deactivated:Mt,errorCaptured:Mt,serverPrefetch:Mt,components:nn,directives:nn,watch:Ec,provide:ur,inject:_c};function ur(t,e){return e?t?function(){return Tt(tt(t)?t.call(this,this):t,tt(e)?e.call(this,this):e)}:e:t}function _c(t,e){return nn(Ko(t),Ko(e))}function Ko(t){if(Z(t)){const e={};for(let n=0;n1)return n&&tt(e)?e.call(o&&o.proxy):e}}function Oc(t,e,n,o=!1){const i={},r={};kn(r,po,1),t.propsDefaults=Object.create(null),Ks(t,e,i,r);for(const s in t.propsOptions[0])s in i||(i[s]=void 0);n?t.props=o?i:ja(i):t.type.props?t.props=i:t.props=r,t.attrs=r}function Ic(t,e,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=t,l=at(i),[c]=t.propsOptions;let a=!1;if((o||s>0)&&!(s&16)){if(s&8){const u=t.vnode.dynamicProps;for(let d=0;d{c=!0;const[h,g]=Xs(d,e,!0);Tt(s,h),g&&l.push(...g)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!c)return vt(t)&&o.set(t,$e),$e;if(Z(r))for(let u=0;u-1,g[1]=D<0||w-1||st(g,"default"))&&l.push(d)}}}const a=[s,l];return vt(t)&&o.set(t,a),a}function dr(t){return t[0]!=="$"}function pr(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function hr(t,e){return pr(t)===pr(e)}function gr(t,e){return Z(e)?e.findIndex(n=>hr(n,t)):tt(e)&&hr(e,t)?0:-1}const qs=t=>t[0]==="_"||t==="$stable",Li=t=>Z(t)?t.map(qt):[qt(t)],Pc=(t,e,n)=>{if(e._n)return e;const o=zi((...i)=>Li(e(...i)),n);return o._c=!1,o},Ys=(t,e,n)=>{const o=t._ctx;for(const i in t){if(qs(i))continue;const r=t[i];if(tt(r))e[i]=Pc(i,r,o);else if(r!=null){const s=Li(r);e[i]=()=>s}}},Gs=(t,e)=>{const n=Li(e);t.slots.default=()=>n},Cc=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=at(e),kn(e,"_",n)):Ys(e,t.slots={})}else t.slots={},e&&Gs(t,e);kn(t.slots,po,1)},Mc=(t,e,n)=>{const{vnode:o,slots:i}=t;let r=!0,s=ht;if(o.shapeFlag&32){const l=e._;l?n&&l===1?r=!1:(Tt(i,e),!n&&l===1&&delete i._):(r=!e.$stable,Ys(e,i)),s=e}else e&&(Gs(t,e),s={default:1});if(r)for(const l in i)!qs(l)&&s[l]==null&&delete i[l]};function qo(t,e,n,o,i=!1){if(Z(t)){t.forEach((h,g)=>qo(h,e&&(Z(e)?e[g]:e),n,o,i));return}if(sn(o)&&!i)return;const r=o.shapeFlag&4?mo(o.component)||o.component.proxy:o.el,s=i?null:r,{i:l,r:c}=t,a=e&&e.r,u=l.refs===ht?l.refs={}:l.refs,d=l.setupState;if(a!=null&&a!==c&&(_t(a)?(u[a]=null,st(d,a)&&(d[a]=null)):Rt(a)&&(a.value=null)),tt(c))ge(c,l,12,[s,u]);else{const h=_t(c),g=Rt(c);if(h||g){const w=()=>{if(t.f){const D=h?st(d,c)?d[c]:u[c]:c.value;i?Z(D)&&wi(D,r):Z(D)?D.includes(r)||D.push(r):h?(u[c]=[r],st(d,c)&&(d[c]=u[c])):(c.value=[r],t.k&&(u[t.k]=c.value))}else h?(u[c]=s,st(d,c)&&(d[c]=s)):g&&(c.value=s,t.k&&(u[t.k]=s))};s?(w.id=-1,zt(w,n)):w()}}}const zt=oc;function Ac(t){return zc(t)}function zc(t,e){const n=cs();n.__VUE__=!0;const{insert:o,remove:i,patchProp:r,createElement:s,createText:l,createComment:c,setText:a,setElementText:u,parentNode:d,nextSibling:h,setScopeId:g=Ht,insertStaticContent:w}=t,D=(f,p,v,_=null,y=null,O=null,z=void 0,I=null,P=!!p.dynamicChildren)=>{if(f===p)return;f&&!Je(f,p)&&(_=kt(f),k(f,y,O,!0),f=null),p.patchFlag===-2&&(P=!1,p.dynamicChildren=null);const{type:T,ref:H,shapeFlag:U}=p;switch(T){case uo:R(f,p,v,_);break;case ye:F(f,p,v,_);break;case Po:f==null&&j(p,v,_,z);break;case jt:J(f,p,v,_,y,O,z,I,P);break;default:U&1?m(f,p,v,_,y,O,z,I,P):U&6?it(f,p,v,_,y,O,z,I,P):(U&64||U&128)&&T.process(f,p,v,_,y,O,z,I,P,nt)}H!=null&&y&&qo(H,f&&f.ref,O,p||f,!p)},R=(f,p,v,_)=>{if(f==null)o(p.el=l(p.children),v,_);else{const y=p.el=f.el;p.children!==f.children&&a(y,p.children)}},F=(f,p,v,_)=>{f==null?o(p.el=c(p.children||""),v,_):p.el=f.el},j=(f,p,v,_)=>{[f.el,f.anchor]=w(f.children,p,v,_,f.el,f.anchor)},L=({el:f,anchor:p},v,_)=>{let y;for(;f&&f!==p;)y=h(f),o(f,v,_),f=y;o(p,v,_)},S=({el:f,anchor:p})=>{let v;for(;f&&f!==p;)v=h(f),i(f),f=v;i(p)},m=(f,p,v,_,y,O,z,I,P)=>{p.type==="svg"?z="svg":p.type==="math"&&(z="mathml"),f==null?N(p,v,_,y,O,z,I,P):lt(f,p,y,O,z,I,P)},N=(f,p,v,_,y,O,z,I)=>{let P,T;const{props:H,shapeFlag:U,transition:B,dirs:X}=f;if(P=f.el=s(f.type,O,H&&H.is,H),U&8?u(P,f.children):U&16&&G(f.children,P,null,_,y,Io(f,O),z,I),X&&Se(f,null,_,"created"),A(P,f,f.scopeId,z,_),H){for(const q in H)q!=="value"&&!Nn(q)&&r(P,q,null,H[q],O,f.children,_,y,Ot);"value"in H&&r(P,"value",null,H.value,O),(T=H.onVnodeBeforeMount)&&Xt(T,_,f)}X&&Se(f,null,_,"beforeMount");const et=Dc(y,B);et&&B.beforeEnter(P),o(P,p,v),((T=H&&H.onVnodeMounted)||et||X)&&zt(()=>{T&&Xt(T,_,f),et&&B.enter(P),X&&Se(f,null,_,"mounted")},y)},A=(f,p,v,_,y)=>{if(v&&g(f,v),_)for(let O=0;O<_.length;O++)g(f,_[O]);if(y){let O=y.subTree;if(p===O){const z=y.vnode;A(f,z,z.scopeId,z.slotScopeIds,y.parent)}}},G=(f,p,v,_,y,O,z,I,P=0)=>{for(let T=P;T{const I=p.el=f.el;let{patchFlag:P,dynamicChildren:T,dirs:H}=p;P|=f.patchFlag&16;const U=f.props||ht,B=p.props||ht;let X;if(v&&Te(v,!1),(X=B.onVnodeBeforeUpdate)&&Xt(X,v,p,f),H&&Se(p,f,v,"beforeUpdate"),v&&Te(v,!0),T?K(f.dynamicChildren,T,I,v,_,Io(p,y),O):z||M(f,p,I,null,v,_,Io(p,y),O,!1),P>0){if(P&16)ot(I,p,U,B,v,_,y);else if(P&2&&U.class!==B.class&&r(I,"class",null,B.class,y),P&4&&r(I,"style",U.style,B.style,y),P&8){const et=p.dynamicProps;for(let q=0;q{X&&Xt(X,v,p,f),H&&Se(p,f,v,"updated")},_)},K=(f,p,v,_,y,O,z)=>{for(let I=0;I{if(v!==_){if(v!==ht)for(const I in v)!Nn(I)&&!(I in _)&&r(f,I,v[I],null,z,p.children,y,O,Ot);for(const I in _){if(Nn(I))continue;const P=_[I],T=v[I];P!==T&&I!=="value"&&r(f,I,T,P,z,p.children,y,O,Ot)}"value"in _&&r(f,"value",v.value,_.value,z)}},J=(f,p,v,_,y,O,z,I,P)=>{const T=p.el=f?f.el:l(""),H=p.anchor=f?f.anchor:l("");let{patchFlag:U,dynamicChildren:B,slotScopeIds:X}=p;X&&(I=I?I.concat(X):X),f==null?(o(T,v,_),o(H,v,_),G(p.children||[],v,H,y,O,z,I,P)):U>0&&U&64&&B&&f.dynamicChildren?(K(f.dynamicChildren,B,v,y,O,z,I),(p.key!=null||y&&p===y.subTree)&&Js(f,p,!0)):M(f,p,v,H,y,O,z,I,P)},it=(f,p,v,_,y,O,z,I,P)=>{p.slotScopeIds=I,f==null?p.shapeFlag&512?y.ctx.activate(p,v,_,z,P):gt(p,v,_,y,O,z,P):bt(f,p,P)},gt=(f,p,v,_,y,O,z)=>{const I=f.component=Wc(f,_,y);if(js(f)&&(I.ctx.renderer=nt),Uc(I),I.asyncDep){if(y&&y.registerDep(I,E),!f.el){const P=I.subTree=Ut(ye);F(null,P,p,v)}}else E(I,f,p,v,y,O,z)},bt=(f,p,v)=>{const _=p.component=f.component;if(Ja(f,p,v))if(_.asyncDep&&!_.asyncResolved){C(_,p,v);return}else _.next=p,Va(_.update),_.effect.dirty=!0,_.update();else p.el=f.el,_.vnode=p},E=(f,p,v,_,y,O,z)=>{const I=()=>{if(f.isMounted){let{next:H,bu:U,u:B,parent:X,vnode:et}=f;{const re=Zs(f);if(re){H&&(H.el=et.el,C(f,H,z)),re.asyncDep.then(()=>{f.isUnmounted||I()});return}}let q=H,rt;Te(f,!1),H?(H.el=et.el,C(f,H,z)):H=et,U&&Eo(U),(rt=H.props&&H.props.onVnodeBeforeUpdate)&&Xt(rt,X,H,et),Te(f,!0);const pt=To(f),wt=f.subTree;f.subTree=pt,D(wt,pt,d(wt.el),kt(wt),f,y,O),H.el=pt.el,q===null&&Za(f,pt.el),B&&zt(B,y),(rt=H.props&&H.props.onVnodeUpdated)&&zt(()=>Xt(rt,X,H,et),y)}else{let H;const{el:U,props:B}=p,{bm:X,m:et,parent:q}=f,rt=sn(p);if(Te(f,!1),X&&Eo(X),!rt&&(H=B&&B.onVnodeBeforeMount)&&Xt(H,q,p),Te(f,!0),U&&At){const pt=()=>{f.subTree=To(f),At(U,f.subTree,f,y,null)};rt?p.type.__asyncLoader().then(()=>!f.isUnmounted&&pt()):pt()}else{const pt=f.subTree=To(f);D(null,pt,v,_,f,y,O),p.el=pt.el}if(et&&zt(et,y),!rt&&(H=B&&B.onVnodeMounted)){const pt=p;zt(()=>Xt(H,q,pt),y)}(p.shapeFlag&256||q&&sn(q.vnode)&&q.vnode.shapeFlag&256)&&f.a&&zt(f.a,y),f.isMounted=!0,p=v=_=null}},P=f.effect=new Ei(I,Ht,()=>Ai(T),f.scope),T=f.update=()=>{P.dirty&&P.run()};T.id=f.uid,Te(f,!0),T()},C=(f,p,v)=>{p.component=f;const _=f.vnode.props;f.vnode=p,f.next=null,Ic(f,p.props,_,v),Mc(f,p.children,v),Ne(),rr(f),Le()},M=(f,p,v,_,y,O,z,I,P=!1)=>{const T=f&&f.children,H=f?f.shapeFlag:0,U=p.children,{patchFlag:B,shapeFlag:X}=p;if(B>0){if(B&128){ct(T,U,v,_,y,O,z,I,P);return}else if(B&256){V(T,U,v,_,y,O,z,I,P);return}}X&8?(H&16&&Ot(T,y,O),U!==T&&u(v,U)):H&16?X&16?ct(T,U,v,_,y,O,z,I,P):Ot(T,y,O,!0):(H&8&&u(v,""),X&16&&G(U,v,_,y,O,z,I,P))},V=(f,p,v,_,y,O,z,I,P)=>{f=f||$e,p=p||$e;const T=f.length,H=p.length,U=Math.min(T,H);let B;for(B=0;BH?Ot(f,y,O,!0,!1,U):G(p,v,_,y,O,z,I,P,U)},ct=(f,p,v,_,y,O,z,I,P)=>{let T=0;const H=p.length;let U=f.length-1,B=H-1;for(;T<=U&&T<=B;){const X=f[T],et=p[T]=P?ue(p[T]):qt(p[T]);if(Je(X,et))D(X,et,v,null,y,O,z,I,P);else break;T++}for(;T<=U&&T<=B;){const X=f[U],et=p[B]=P?ue(p[B]):qt(p[B]);if(Je(X,et))D(X,et,v,null,y,O,z,I,P);else break;U--,B--}if(T>U){if(T<=B){const X=B+1,et=XB)for(;T<=U;)k(f[T],y,O,!0),T++;else{const X=T,et=T,q=new Map;for(T=et;T<=B;T++){const Ct=p[T]=P?ue(p[T]):qt(p[T]);Ct.key!=null&&q.set(Ct.key,T)}let rt,pt=0;const wt=B-et+1;let re=!1,_e=0;const Ee=new Array(wt);for(T=0;T=wt){k(Ct,y,O,!0);continue}let Kt;if(Ct.key!=null)Kt=q.get(Ct.key);else for(rt=et;rt<=B;rt++)if(Ee[rt-et]===0&&Je(Ct,p[rt])){Kt=rt;break}Kt===void 0?k(Ct,y,O,!0):(Ee[Kt-et]=T+1,Kt>=_e?_e=Kt:re=!0,D(Ct,p[Kt],v,null,y,O,z,I,P),pt++)}const He=re?Rc(Ee):$e;for(rt=He.length-1,T=wt-1;T>=0;T--){const Ct=et+T,Kt=p[Ct],Gi=Ct+1{const{el:O,type:z,transition:I,children:P,shapeFlag:T}=f;if(T&6){ut(f.component.subTree,p,v,_);return}if(T&128){f.suspense.move(p,v,_);return}if(T&64){z.move(f,p,v,nt);return}if(z===jt){o(O,p,v);for(let U=0;UI.enter(O),y);else{const{leave:U,delayLeave:B,afterLeave:X}=I,et=()=>o(O,p,v),q=()=>{U(O,()=>{et(),X&&X()})};B?B(O,et,q):q()}else o(O,p,v)},k=(f,p,v,_=!1,y=!1)=>{const{type:O,props:z,ref:I,children:P,dynamicChildren:T,shapeFlag:H,patchFlag:U,dirs:B}=f;if(I!=null&&qo(I,null,v,f,!0),H&256){p.ctx.deactivate(f);return}const X=H&1&&B,et=!sn(f);let q;if(et&&(q=z&&z.onVnodeBeforeUnmount)&&Xt(q,p,f),H&6)xt(f.component,v,_);else{if(H&128){f.suspense.unmount(v,_);return}X&&Se(f,null,p,"beforeUnmount"),H&64?f.type.remove(f,p,v,y,nt,_):T&&(O!==jt||U>0&&U&64)?Ot(T,p,v,!1,!0):(O===jt&&U&384||!y&&H&16)&&Ot(P,p,v),_&&Q(f)}(et&&(q=z&&z.onVnodeUnmounted)||X)&&zt(()=>{q&&Xt(q,p,f),X&&Se(f,null,p,"unmounted")},v)},Q=f=>{const{type:p,el:v,anchor:_,transition:y}=f;if(p===jt){dt(v,_);return}if(p===Po){S(f);return}const O=()=>{i(v),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(f.shapeFlag&1&&y&&!y.persisted){const{leave:z,delayLeave:I}=y,P=()=>z(v,O);I?I(f.el,O,P):P()}else O()},dt=(f,p)=>{let v;for(;f!==p;)v=h(f),i(f),f=v;i(p)},xt=(f,p,v)=>{const{bum:_,scope:y,update:O,subTree:z,um:I}=f;_&&Eo(_),y.stop(),O&&(O.active=!1,k(z,f,p,v)),I&&zt(I,p),zt(()=>{f.isUnmounted=!0},p),p&&p.pendingBranch&&!p.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===p.pendingId&&(p.deps--,p.deps===0&&p.resolve())},Ot=(f,p,v,_=!1,y=!1,O=0)=>{for(let z=O;zf.shapeFlag&6?kt(f.component.subTree):f.shapeFlag&128?f.suspense.next():h(f.anchor||f.el);let je=!1;const $=(f,p,v)=>{f==null?p._vnode&&k(p._vnode,null,null,!0):D(p._vnode||null,f,p,null,null,null,v),je||(je=!0,rr(),As(),je=!1),p._vnode=f},nt={p:D,um:k,m:ut,r:Q,mt:gt,mc:G,pc:M,pbc:K,n:kt,o:t};let ft,At;return e&&([ft,At]=e(nt)),{render:$,hydrate:ft,createApp:Tc($,ft)}}function Io({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Te({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function Dc(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Js(t,e,n=!1){const o=t.children,i=e.children;if(Z(o)&&Z(i))for(let r=0;r>1,t[n[l]]0&&(e[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=e[s];return n}function Zs(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Zs(e)}const Fc=t=>t.__isTeleport,jt=Symbol.for("v-fgt"),uo=Symbol.for("v-txt"),ye=Symbol.for("v-cmt"),Po=Symbol.for("v-stc"),cn=[];let Bt=null;function me(t=!1){cn.push(Bt=t?null:[])}function Nc(){cn.pop(),Bt=cn[cn.length-1]||null}let yn=1;function mr(t){yn+=t}function Qs(t){return t.dynamicChildren=yn>0?Bt||$e:null,Nc(),yn>0&&Bt&&Bt.push(t),t}function Kn(t,e,n,o,i,r){return Qs(ho(t,e,n,o,i,r,!0))}function fo(t,e,n,o,i){return Qs(Ut(t,e,n,o,i,!0))}function tl(t){return t?t.__v_isVNode===!0:!1}function Je(t,e){return t.type===e.type&&t.key===e.key}const po="__vInternal",el=({key:t})=>t??null,Ln=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?_t(t)||Rt(t)||tt(t)?{i:Et,r:t,k:e,f:!!n}:t:null);function ho(t,e=null,n=null,o=0,i=null,r=t===jt?0:1,s=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&el(e),ref:e&&Ln(e),scopeId:Rs,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Et};return l?(ji(c,n),r&128&&t.normalize(c)):n&&(c.shapeFlag|=_t(n)?8:16),yn>0&&!s&&Bt&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&Bt.push(c),c}const Ut=Lc;function Lc(t,e=null,n=null,o=0,i=null,r=!1){if((!t||t===tc)&&(t=ye),tl(t)){const l=Xe(t,e,!0);return n&&ji(l,n),yn>0&&!r&&Bt&&(l.shapeFlag&6?Bt[Bt.indexOf(t)]=l:Bt.push(l)),l.patchFlag|=-2,l}if(Yc(t)&&(t=t.__vccOpts),e){e=jc(e);let{class:l,style:c}=e;l&&!_t(l)&&(e.class=hn(l)),vt(c)&&(Ss(c)&&!Z(c)&&(c=Tt({},c)),e.style=_n(c))}const s=_t(t)?1:nc(t)?128:Fc(t)?64:vt(t)?4:tt(t)?2:0;return ho(t,e,n,o,i,s,r,!0)}function jc(t){return t?Ss(t)||po in t?Tt({},t):t:null}function Xe(t,e,n=!1){const{props:o,ref:i,patchFlag:r,children:s}=t,l=e?Yo(o||{},e):o;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:l,key:l&&el(l),ref:e&&e.ref?n&&i?Z(i)?i.concat(Ln(e)):[i,Ln(e)]:Ln(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:s,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==jt?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Xe(t.ssContent),ssFallback:t.ssFallback&&Xe(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function Hc(t=" ",e=0){return Ut(uo,null,t,e)}function kc(t="",e=!1){return e?(me(),fo(ye,null,t)):Ut(ye,null,t)}function qt(t){return t==null||typeof t=="boolean"?Ut(ye):Z(t)?Ut(jt,null,t.slice()):typeof t=="object"?ue(t):Ut(uo,null,String(t))}function ue(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Xe(t)}function ji(t,e){let n=0;const{shapeFlag:o}=t;if(e==null)e=null;else if(Z(e))n=16;else if(typeof e=="object")if(o&65){const i=e.default;i&&(i._c&&(i._d=!1),ji(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!(po in e)?e._ctx=Et:i===3&&Et&&(Et.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else tt(e)?(e={default:e,_ctx:Et},n=32):(e=String(e),o&64?(n=16,e=[Hc(e)]):n=8);t.children=e,t.shapeFlag|=n}function Yo(...t){const e={};for(let n=0;n{let i;return(i=t[n])||(i=t[n]=[]),i.push(o),r=>{i.length>1?i.forEach(s=>s(r)):i[0](r)}};Xn=e("__VUE_INSTANCE_SETTERS__",n=>Pt=n),Go=e("__VUE_SSR_SETTERS__",n=>go=n)}const En=t=>{const e=Pt;return Xn(t),t.scope.on(),()=>{t.scope.off(),Xn(e)}},vr=()=>{Pt&&Pt.scope.off(),Xn(null)};function nl(t){return t.vnode.shapeFlag&4}let go=!1;function Uc(t,e=!1){e&&Go(e);const{props:n,children:o}=t.vnode,i=nl(t);Oc(t,n,i,e),Cc(t,o);const r=i?Vc(t,e):void 0;return e&&Go(!1),r}function Vc(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=Ts(new Proxy(t.ctx,yc));const{setup:o}=n;if(o){const i=t.setupContext=o.length>1?Xc(t):null,r=En(t);Ne();const s=ge(o,t,0,[t.props,i]);if(Le(),r(),ss(s)){if(s.then(vr,vr),e)return s.then(l=>{yr(t,l,e)}).catch(l=>{lo(l,t,0)});t.asyncDep=s}else yr(t,s,e)}else ol(t,e)}function yr(t,e,n){tt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:vt(e)&&(t.setupState=Ps(e)),ol(t,n)}let br;function ol(t,e,n){const o=t.type;if(!t.render){if(!e&&br&&!o.render){const i=o.template||Ni(t).template;if(i){const{isCustomElement:r,compilerOptions:s}=t.appContext.config,{delimiters:l,compilerOptions:c}=o,a=Tt(Tt({isCustomElement:r,delimiters:l},s),c);o.render=br(i,a)}}t.render=o.render||Ht}{const i=En(t);Ne();try{bc(t)}finally{Le(),i()}}}function Kc(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,n){return Dt(t,"get","$attrs"),e[n]}}))}function Xc(t){const e=n=>{t.exposed=n||{}};return{get attrs(){return Kc(t)},slots:t.slots,emit:t.emit,expose:e}}function mo(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(Ps(Ts(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in ln)return ln[n](t)},has(e,n){return n in e||n in ln}}))}function qc(t,e=!0){return tt(t)?t.displayName||t.name:t.name||e&&t.__name}function Yc(t){return tt(t)&&"__vccOpts"in t}const un=(t,e)=>Ha(t,e,go),Gc="3.4.14";/** +* @vue/runtime-dom v3.4.14 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const Jc="http://www.w3.org/2000/svg",Zc="http://www.w3.org/1998/Math/MathML",fe=typeof document<"u"?document:null,xr=fe&&fe.createElement("template"),Qc={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,o)=>{const i=e==="svg"?fe.createElementNS(Jc,t):e==="mathml"?fe.createElementNS(Zc,t):fe.createElement(t,n?{is:n}:void 0);return t==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:t=>fe.createTextNode(t),createComment:t=>fe.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>fe.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,o,i,r){const s=n?n.previousSibling:e.lastChild;if(i&&(i===r||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{xr.innerHTML=o==="svg"?`${t}`:o==="mathml"?`${t}`:t;const l=xr.content;if(o==="svg"||o==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}e.insertBefore(l,n)}return[s?s.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},tu=Symbol("_vtc");function eu(t,e,n){const o=t[tu];o&&(e=(e?[e,...o]:[...o]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const Hi=Symbol("_vod"),nu={beforeMount(t,{value:e},{transition:n}){t[Hi]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Ze(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:o}){!e!=!n&&(o?e?(o.beforeEnter(t),Ze(t,!0),o.enter(t)):o.leave(t,()=>{Ze(t,!1)}):Ze(t,e))},beforeUnmount(t,{value:e}){Ze(t,e)}};function Ze(t,e){t.style.display=e?t[Hi]:"none"}const ou=Symbol("");function iu(t,e,n){const o=t.style,i=o.display,r=_t(n);if(n&&!r){if(e&&!_t(e))for(const s in e)n[s]==null&&Jo(o,s,"");for(const s in n)Jo(o,s,n[s])}else if(r){if(e!==n){const s=o[ou];s&&(n+=";"+s),o.cssText=n}}else e&&t.removeAttribute("style");Hi in t&&(o.display=i)}const wr=/\s*!important$/;function Jo(t,e,n){if(Z(n))n.forEach(o=>Jo(t,e,o));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const o=ru(t,e);wr.test(n)?t.setProperty(Ge(o),n.replace(wr,""),"important"):t[o]=n}}const _r=["Webkit","Moz","ms"],Co={};function ru(t,e){const n=Co[e];if(n)return n;let o=Gt(e);if(o!=="filter"&&o in t)return Co[e]=o;o=io(o);for(let i=0;i<_r.length;i++){const r=_r[i]+o;if(r in t)return Co[e]=r}return e}const Er="http://www.w3.org/1999/xlink";function su(t,e,n,o,i){if(o&&e.startsWith("xlink:"))n==null?t.removeAttributeNS(Er,e.slice(6,e.length)):t.setAttributeNS(Er,e,n);else{const r=ha(e);n==null||r&&!us(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)}}function lu(t,e,n,o,i,r,s){if(e==="innerHTML"||e==="textContent"){o&&s(o,i,r),t[e]=n??"";return}const l=t.tagName;if(e==="value"&&l!=="PROGRESS"&&!l.includes("-")){t._value=n;const a=l==="OPTION"?t.getAttribute("value"):t.value,u=n??"";a!==u&&(t.value=u),n==null&&t.removeAttribute(e);return}let c=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=us(n):n==null&&a==="string"?(n="",c=!0):a==="number"&&(n=0,c=!0)}try{t[e]=n}catch{}c&&t.removeAttribute(e)}function au(t,e,n,o){t.addEventListener(e,n,o)}function cu(t,e,n,o){t.removeEventListener(e,n,o)}const Sr=Symbol("_vei");function uu(t,e,n,o,i=null){const r=t[Sr]||(t[Sr]={}),s=r[e];if(o&&s)s.value=o;else{const[l,c]=fu(e);if(o){const a=r[e]=hu(o,i);au(t,l,a,c)}else s&&(cu(t,l,s,c),r[e]=void 0)}}const Tr=/(?:Once|Passive|Capture)$/;function fu(t){let e;if(Tr.test(t)){e={};let o;for(;o=t.match(Tr);)t=t.slice(0,t.length-o[0].length),e[o[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):Ge(t.slice(2)),e]}let Mo=0;const du=Promise.resolve(),pu=()=>Mo||(du.then(()=>Mo=0),Mo=Date.now());function hu(t,e){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Wt(gu(o,n.value),e,5,[o])};return n.value=t,n.attached=pu(),n}function gu(t,e){if(Z(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(o=>i=>!i._stopped&&o&&o(i))}else return e}const Or=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,mu=(t,e,n,o,i,r,s,l,c)=>{const a=i==="svg";e==="class"?eu(t,o,a):e==="style"?iu(t,n,o):eo(e)?xi(e)||uu(t,e,n,o,s):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):vu(t,e,o,a))?lu(t,e,o,r,s,l,c):(e==="true-value"?t._trueValue=o:e==="false-value"&&(t._falseValue=o),su(t,e,o,a))};function vu(t,e,n,o){if(o)return!!(e==="innerHTML"||e==="textContent"||e in t&&Or(e)&&tt(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Or(e)&&_t(n)?!1:e in t}const yu=Tt({patchProp:mu},Qc);let Ir;function bu(){return Ir||(Ir=Ac(yu))}const xu=(...t)=>{const e=bu().createApp(...t),{mount:n}=e;return e.mount=o=>{const i=_u(o);if(!i)return;const r=e._component;!tt(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.innerHTML="";const s=n(i,!1,wu(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},e};function wu(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function _u(t){return _t(t)?document.querySelector(t):t}const Eu=Di({name:"App",data(){return{colNum:6,editable:!1,layout:[{h:2,id:0,w:2,x:0,y:0},{h:2,id:1,w:2,x:2,y:0},{h:2,id:2,w:2,x:4,y:0},{h:2,id:3,w:2,x:0,y:2},{h:2,id:4,w:2,x:2,y:2},{h:2,id:5,w:2,x:4,y:2},{h:2,id:6,w:2,x:0,y:4},{h:2,id:7,w:2,x:2,y:4},{h:2,id:8,w:2,x:4,y:4},{h:2,id:9,w:2,x:0,y:6},{h:2,id:10,w:2,x:2,y:6},{h:2,id:11,w:2,x:4,y:6}]}},computed:{rowHeight(){return(window.innerWidth-56)/4}},methods:{containerResized(t){console.log(t)},foo(){const t=this.groupWidgetByHeightInAxis(this.layout),e=Object.keys(t),n=i=>i.reduce((r,s)=>r+s.w,0),o=(i=0,r=1)=>{if(i===e.length-1)return;const s=t[e[i]],l=n(s);if(!(l<4))return o(i+1,i+2);const a=t==null?void 0:t[e==null?void 0:e[r]];if(!a)return o(i+1,i+1);for(let u=0;u4-l||s.find(F=>F.id===d.id))continue;const g=s.map(F=>F.x),w=Array.from({length:5},(F,j)=>j);for(let F=0;Fm.x===j),S=Array.from({length:L.w},()=>100);w.splice(F,L.w,...S)}const D=Math.min(...w),R=w.indexOf(D);if(w[R+1-1]!==100&&(d.x=D,d.y=+e[i]),s.push(d),d.h<=1&&a.splice(u,1),d.h>1&&(t==null?void 0:t[e==null?void 0:e[r+1]]).splice(u,1),n(s)>3)return o(i+1,i+2)}if(n(s)<4)return o(i,r+1)};o()},groupWidgetByHeightInAxis(t){const e=t.reduce((o,i)=>(o[i.y]=((o==null?void 0:o[i.y])??[]).concat(i),o),{});return Object.keys(e).reduce((o,i)=>{const r=e[i];return o[i]=(o[i]??[]).concat(r),r.forEach(s=>{for(let l=s.y;l{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n};function Tu(t,e,n,o,i,r){const s=Qa("grid-layout");return me(),fo(s,{layout:t.layout,"onUpdate:layout":e[0]||(e[0]=l=>t.layout=l),"col-num":t.colNum,"row-height":t.rowHeight,margin:[10],"use-css-transforms":!1},{gridItemContent:zi(l=>[ho("div",null,ga(l.item.id),1)]),_:1},8,["layout","col-num","row-height"])}const Ou=Su(Eu,[["render",Tu]]);var Iu=Object.defineProperty,Pu=(t,e,n)=>e in t?Iu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,b=(t,e,n)=>(Pu(t,typeof e!="symbol"?e+"":e,n),n);const il=Symbol("$emitter");var Oe=(t=>(t.DOWN="DOWN",t.LEFT="LEFT",t.RIGHT="RIGHT",t.UP="UP",t))(Oe||{});const Cu=t=>{let e=0,n;for(let o=0;oe&&(e=n);return e},Zo=t=>{const e=Array(t.length);for(let n=0;nJSON.parse(JSON.stringify(t)),rl=(t,e)=>!(t===e||t.x+t.w<=e.x||t.x>=e.x+e.w||t.y+t.h<=e.y||t.y>=e.y+e.h),Ie=(t,e)=>{if(!t)return;const n=ll(t),o=al(t),i=Array(t.length);for(let r=0;r{if(n)for(;e.y>0&&!qn(t,e);)e.y--;let o;for(;o=qn(t,e);)e.y=o.y+o.h;return e},zu=(t,e)=>{const n=ll(t);for(let o=0;oe.cols&&(i.x=e.cols-i.w),i.x<0&&(i.x=0,i.w=e.cols),!i.isStatic)n.push(i);else for(;qn(n,i);)i.y++}return t},sl=(t,e)=>t.filter(n=>rl(n,e)),qn=(t,e)=>{for(let n=0,o=t.length;nt.filter(n=>n.id===e)[0],ll=t=>t.filter(e=>e.isStatic),Qo=(t,e,n,o,i,r,s)=>{var l;if(e.isStatic)return t;const c=e.x,a=e.y,u={DOWN:an,RIGHT:co};e.x=n,e.y=o,e.moved=!0;let d=al(t);u.UP&&(d=d.reverse());const h=sl(d,e);if(s&&h.length)return e.x=c,e.y=a,e.moved=!1,t;for(let g=0;gw.y&&e.y-w.y>w.h/4)continue;const D=(l=Object.keys(u).filter(R=>u[R]))==null?void 0:l[0];w.isStatic?t=Cr(t,w,e,i,D,r):t=Cr(t,e,w,i,D,r)}return t},Cr=(t,e,n,o,i,r)=>{if(o){const l={h:n.h,id:-1,w:n.w,x:n.x,y:Math.max(e.y-n.h,0)};if(!qn(t,l))return Qo(t,n,l.x,l.y,o,r,!1)}const s={$default:{x:n.x,y:n.y+1},[Oe.LEFT]:[n.x+e.w,e.y],[Oe.RIGHT]:[n.x-e.w,e.y],[Oe.UP]:[n.x,n.y+e.h],[Oe.DOWN]:[n.x,n.y-e.h]};if(r){const l=i===Oe.LEFT||i===Oe.RIGHT;if(i in s&&!(l&&e.wt.length===1?[t[0],t[0]]:t,Du=(t,e,n,o)=>(console.log(t,e,n,o),{height:`${o}px`,left:`${e}px`,position:"absolute",top:`${t}px`,width:`${n}px`}),Ru=(t,e,n,o)=>({height:`${o}px`,position:"absolute",transform:`translate3d(${e}px,${t}px, 0)`,width:`${n}px`}),al=t=>[...t].sort((e,n)=>e.y===n.y&&e.x===n.x?0:e.y>n.y||e.y===n.y&&e.x>n.x?1:-1),Fu=(t,e,n)=>t.trim().replace(e,n),Nu=(t,e,n,o,i,r,s)=>{if(Object.prototype.hasOwnProperty.call(e,o))return Zo(e[o]||[]);let l=t;const c=cl(n),a=c.slice(c.indexOf(o));for(let u=0;u{const n=cl(t);let[o]=n;for(let i=1;i(t[r]??1)&&(o=r)}return o},ti=(t,e)=>e[t],cl=t=>Object.keys(t).sort((e,n)=>(t[e]??1)-(t[n]??1)),ul=t=>!!(t&&t.Window)&&t instanceof t.Window;let fl,xe;function dl(t){fl=t;const e=t.document.createTextNode("");e.ownerDocument!==t.document&&typeof t.wrap=="function"&&t.wrap(e)===e&&(t=t.wrap(t)),xe=t}typeof window<"u"&&window&&dl(window);function oe(t){return ul(t)?t:(t.ownerDocument||t).defaultView||xe.window}const ju=t=>t===xe||ul(t),Hu=t=>vo(t)&&t.nodeType===11,vo=t=>!!t&&typeof t=="object",pl=t=>typeof t=="function",ku=t=>typeof t=="number",$u=t=>typeof t=="boolean",Bu=t=>typeof t=="string",Wu=t=>{if(!t||typeof t!="object")return!1;const e=oe(t)||xe;return/object|function/.test(typeof Element)?t instanceof Element||t instanceof e.Element:t.nodeType===1&&typeof t.nodeName=="string"},Uu=t=>vo(t)&&!!t.constructor&&/function Object\b/.test(t.constructor.toString()),Vu=t=>vo(t)&&typeof t.length<"u"&&pl(t.splice),x={window:ju,docFrag:Hu,object:vo,func:pl,number:ku,bool:$u,string:Bu,element:Wu,plainObject:Uu,array:Vu};function Ku(t){const{actions:e,Interactable:n,defaults:o}=t;n.prototype.draggable=jn.draggable,e.map.drag=jn,e.methodDict.drag="draggable",o.actions.drag=jn.defaults}function Ao({interaction:t}){if(t.prepared.name!=="drag")return;const e=t.prepared.axis;e==="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):e==="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 Mr({iEvent:t,interaction:e}){if(e.prepared.name!=="drag")return;const n=e.prepared.axis;if(n==="x"||n==="y"){const o=n==="x"?"y":"x";t.page[o]=e.coords.start.page[o],t.client[o]=e.coords.start.client[o],t.delta[o]=0}}const Xu=function(t){return x.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):x.bool(t)?(this.options.drag.enabled=t,this):this.options.drag},jn={id:"actions/drag",install:Ku,listeners:{"interactions:before-action-move":Ao,"interactions:action-resume":Ao,"interactions:action-move":Mr,"auto-start:check":t=>{const{interaction:e,interactable:n,buttons:o}=t,i=n.options.drag;if(!(!(i&&i.enabled)||e.pointerIsDown&&/mouse|pointer/.test(e.pointerType)&&!(o&n.options.drag.mouseButtons)))return t.action={name:"drag",axis:i.lockAxis==="start"?i.startAxis:i.lockAxis},!1}},draggable:Xu,beforeMove:Ao,move:Mr,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor(){return"move"}},hl=jn,Nt={init:qu,document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function ke(){}const St=Nt;function qu(t){const e=t;Nt.document=e.document,Nt.DocumentFragment=e.DocumentFragment||ke,Nt.SVGElement=e.SVGElement||ke,Nt.SVGSVGElement=e.SVGSVGElement||ke,Nt.SVGElementInstance=e.SVGElementInstance||ke,Nt.Element=e.Element||ke,Nt.HTMLElement=e.HTMLElement||Nt.Element,Nt.Event=e.Event,Nt.Touch=e.Touch||ke,Nt.PointerEvent=e.PointerEvent||e.MSPointerEvent}const Lt={init:Yu,supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null};function Yu(t){const e=St.Element,n=t.navigator||{};Lt.supportsTouch="ontouchstart"in t||x.func(t.DocumentTouch)&&St.document instanceof t.DocumentTouch,Lt.supportsPointerEvent=n.pointerEnabled!==!1&&!!St.PointerEvent,Lt.isIOS=/iP(hone|od|ad)/.test(n.platform),Lt.isIOS7=/iP(hone|od|ad)/.test(n.platform)&&/OS 7[^\d]/.test(n.appVersion),Lt.isIe9=/MSIE 9/.test(n.userAgent),Lt.isOperaMobile=n.appName==="Opera"&&Lt.supportsTouch&&/Presto/.test(n.userAgent),Lt.prefixedMatchesSelector="matches"in e.prototype?"matches":"webkitMatchesSelector"in e.prototype?"webkitMatchesSelector":"mozMatchesSelector"in e.prototype?"mozMatchesSelector":"oMatchesSelector"in e.prototype?"oMatchesSelector":"msMatchesSelector",Lt.pEventTypes=Lt.supportsPointerEvent?St.PointerEvent===t.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,Lt.wheelEvent=St.document&&"onmousewheel"in St.document?"mousewheel":"wheel"}const Vt=Lt;function De(t,e){if(t.contains)return t.contains(e);for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function gl(t,e){for(;x.element(t);){if(be(t,e))return t;t=Jt(t)}return null}function Jt(t){let e=t.parentNode;if(x.docFrag(e)){for(;(e=e.host)&&x.docFrag(e););return e}return e}function be(t,e){return xe!==fl&&(e=e.replace(/\/deep\//g," ")),t[Vt.prefixedMatchesSelector](e)}const ei=t=>t.parentNode||t.host;function Gu(t){let e=[],n;for(let o=0;o=o}function ni(t,e,n){for(;x.element(t);){if(be(t,e))return!0;if(t=Jt(t),t===n)return be(t,e)}return!1}function zr(t){return t.correspondingUseElement||t}function Zu(t){return t=t||xe,{x:t.scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop}}function ki(t){const e=t instanceof St.SVGElement?t.getBoundingClientRect():t.getClientRects()[0];return e&&{left:e.left,right:e.right,top:e.top,bottom:e.bottom,width:e.width||e.right-e.left,height:e.height||e.bottom-e.top}}function $i(t){const e=ki(t);if(!Vt.isIOS7&&e){const n=Zu(oe(t));e.left+=n.x,e.right+=n.x,e.top+=n.y,e.bottom+=n.y}return e}function ml(t){const e=[];for(;t;)e.push(t),t=Jt(t);return e}function Dr(t){return x.string(t)?(St.document.querySelector(t),!0):!1}function W(t,e){for(const n in e)t[n]=e[n];return t}function vl(t,e,n){return t==="parent"?Jt(n):t==="self"?e.getRect(n):gl(n,t)}function bn(t,e,n,o){let i=t;return x.string(i)?i=vl(i,e,n):x.func(i)&&(i=i(...o)),x.element(i)&&(i=$i(i)),i}function yo(t){return t&&{x:"x"in t?t.x:t.left,y:"y"in t?t.y:t.top}}function Qu(t){return t&&!("left"in t&&"top"in t)&&(t=W({},t),t.left=t.x||0,t.top=t.y||0,t.right=t.right||t.left+t.width,t.bottom=t.bottom||t.top+t.height),t}function oi(t){return t&&!("x"in t&&"y"in t)&&(t=W({},t),t.x=t.left||0,t.y=t.top||0,t.width=t.width||(t.right||0)-t.x,t.height=t.height||(t.bottom||0)-t.y),t}function bo(t,e,n){t.left&&(e.left+=n.x),t.right&&(e.right+=n.x),t.top&&(e.top+=n.y),t.bottom&&(e.bottom+=n.y),e.width=e.right-e.left,e.height=e.bottom-e.top}function Sn(t,e,n){const o=n&&t.options[n],i=o&&o.origin||t.options.origin,r=bn(i,t,e,[t&&e]);return yo(r)||{x:0,y:0}}function Re(t,e,n){if(n=n||{},x.string(t)&&t.search(" ")!==-1&&(t=Rr(t)),x.array(t))return t.reduce((o,i)=>W(o,Re(i,e,n)),n);if(x.object(t)&&(e=t,t=""),x.func(e))n[t]=n[t]||[],n[t].push(e);else if(x.array(e))for(const o of e)Re(t,o,n);else if(x.object(e))for(const o in e){const i=Rr(o).map(r=>`${t}${r}`);Re(i,e[o],n)}return n}function Rr(t){return t.trim().split(/ +/)}const Tn=(t,e)=>Math.sqrt(t*t+e*e),tf=["webkit","moz"];function Yn(t,e){t.__set||(t.__set={});for(const n in e)tf.some(o=>n.indexOf(o)===0)||typeof t[n]!="function"&&n!=="__set"&&Object.defineProperty(t,n,{get(){return n in t.__set?t.__set[n]:t.__set[n]=e[n]},set(o){t.__set[n]=o},configurable:!0});return t}function Hn(t,e){t.page=t.page||{},t.page.x=e.page.x,t.page.y=e.page.y,t.client=t.client||{},t.client.x=e.client.x,t.client.y=e.client.y,t.timeStamp=e.timeStamp}function ef(t,e,n){t.page.x=n.page.x-e.page.x,t.page.y=n.page.y-e.page.y,t.client.x=n.client.x-e.client.x,t.client.y=n.client.y-e.client.y,t.timeStamp=n.timeStamp-e.timeStamp}function nf(t,e){const n=Math.max(e.timeStamp/1e3,.001);t.page.x=e.page.x/n,t.page.y=e.page.y/n,t.client.x=e.client.x/n,t.client.y=e.client.y/n,t.timeStamp=n}function yl(t){t.page.x=0,t.page.y=0,t.client.x=0,t.client.y=0}function bl(t){return t instanceof St.Event||t instanceof St.Touch}function Gn(t,e,n){return n=n||{},t=t||"page",n.x=e[t+"X"],n.y=e[t+"Y"],n}function xl(t,e){return e=e||{x:0,y:0},Vt.isOperaMobile&&bl(t)?(Gn("screen",t,e),e.x+=window.scrollX,e.y+=window.scrollY):Gn("page",t,e),e}function of(t,e){return e=e||{},Vt.isOperaMobile&&bl(t)?Gn("screen",t,e):Gn("client",t,e),e}function xn(t){return x.number(t.pointerId)?t.pointerId:t.identifier}function rf(t,e,n){const o=e.length>1?wl(e):e[0];xl(o,t.page),of(o,t.client),t.timeStamp=n}function Bi(t){const e=[];return x.array(t)?(e[0]=t[0],e[1]=t[1]):t.type==="touchend"?t.touches.length===1?(e[0]=t.touches[0],e[1]=t.changedTouches[0]):t.touches.length===0&&(e[0]=t.changedTouches[0],e[1]=t.changedTouches[1]):(e[0]=t.touches[0],e[1]=t.touches[1]),e}function wl(t){const e={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0};for(const n of t)for(const o in e)e[o]+=n[o];for(const n in e)e[n]/=t.length;return e}function ii(t){if(!t.length)return null;const e=Bi(t),n=Math.min(e[0].pageX,e[1].pageX),o=Math.min(e[0].pageY,e[1].pageY),i=Math.max(e[0].pageX,e[1].pageX),r=Math.max(e[0].pageY,e[1].pageY);return{x:n,y:o,left:n,top:o,right:i,bottom:r,width:i-n,height:r-o}}function ri(t,e){const n=e+"X",o=e+"Y",i=Bi(t),r=i[0][n]-i[1][n],s=i[0][o]-i[1][o];return Tn(r,s)}function si(t,e){const n=e+"X",o=e+"Y",i=Bi(t),r=i[1][n]-i[0][n],s=i[1][o]-i[0][o];return 180*Math.atan2(s,r)/Math.PI}function _l(t){return x.string(t.pointerType)?t.pointerType:x.number(t.pointerType)?[void 0,void 0,"touch","pen","mouse"][t.pointerType]:/touch/.test(t.type||"")||t instanceof St.Touch?"touch":"mouse"}function El(t){const e=x.func(t.composedPath)?t.composedPath():t.path;return[zr(e?e[0]:t.target),zr(t.currentTarget)]}function Qe(){return{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}}function sf(t){return{coords:t,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault(){}}}class xo{constructor(e){b(this,"immediatePropagationStopped",!1),b(this,"propagationStopped",!1),this._interaction=e}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}Object.defineProperty(xo.prototype,"interaction",{get(){return this._interaction._proxy},set(){}});const lf=(t,e)=>t.indexOf(e)!==-1,af=(t,e)=>t.splice(t.indexOf(e),1),Sl=(t,e)=>{for(const n of e)t.push(n);return t},Wi=t=>Sl([],t),On=(t,e)=>{for(let n=0;nt[On(t,e)];class te extends xo{constructor(e,n,o){super(n._interaction),b(this,"dropzone"),b(this,"dragEvent"),b(this,"relatedTarget"),b(this,"draggable"),b(this,"propagationStopped",!1),b(this,"immediatePropagationStopped",!1);const{element:i,dropzone:r}=o==="dragleave"?e.prev:e.cur;this.type=o,this.target=i,this.currentTarget=i,this.dropzone=r,this.dragEvent=n,this.relatedTarget=n.target,this.draggable=n.interactable,this.timeStamp=n.timeStamp}reject(){const{dropState:e}=this._interaction;if(!(this.type!=="dropactivate"&&(!this.dropzone||e.cur.dropzone!==this.dropzone||e.cur.element!==this.target)))if(e.prev.dropzone=this.dropzone,e.prev.element=this.target,e.rejected=!0,e.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){const n=e.activeDrops,o=On(n,({dropzone:r,element:s})=>r===this.dropzone&&s===this.target);e.activeDrops.splice(o,1);const i=new te(e,this.dragEvent,"dropdeactivate");i.dropzone=this.dropzone,i.target=this.target,this.dropzone.fire(i)}else this.dropzone.fire(new te(e,this.dragEvent,"dragleave"))}preventDefault(){}stopPropagation(){this.propagationStopped=!0}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}}function cf(t){const{actions:e,interactStatic:n,Interactable:o,defaults:i}=t;t.usePlugin(hl),o.prototype.dropzone=function(r){return ff(this,r)},o.prototype.dropCheck=function(r,s,l,c,a,u){return df(this,r,s,l,c,a,u)},n.dynamicDrop=function(r){return x.bool(r)?(t.dynamicDrop=r,n):t.dynamicDrop},W(e.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),e.methodDict.drop="dropzone",t.dynamicDrop=!1,i.actions.drop=Il.defaults}function uf({interactables:t},e){const n=[];for(const o of t.list){if(!o.options.drop.enabled)continue;const i=o.options.drop.accept;if(x.element(i)&&i!==e||x.string(i)&&!be(e,i)||x.func(i)&&!i({dropzone:o,draggableElement:e}))continue;const r=x.string(o.target)?o._context.querySelectorAll(o.target):x.array(o.target)?o.target:[o.target];for(const s of r)s!==e&&n.push({dropzone:o,element:s,rect:o.getRect(s)})}return n}function Tl(t,e){for(const{dropzone:n,element:o}of t.slice())e.dropzone=n,e.target=o,n.fire(e),e.propagationStopped=e.immediatePropagationStopped=!1}function li(t,e){const n=uf(t,e);for(const o of n)o.rect=o.dropzone.getRect(o.element);return n}function Ol({dropState:t,interactable:e,element:n},o,i){const r=[];for(const{dropzone:l,element:c,rect:a}of t.activeDrops)l.dropCheck(o,i,e,n,c,a)&&r.push(c);const s=Gu(r);return t.activeDrops[s]||null}function ai(t,e,n){const o=t.dropState,i={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return n.type==="dragstart"&&(i.activate=new te(o,n,"dropactivate"),i.activate.target=null,i.activate.dropzone=null),n.type==="dragend"&&(i.deactivate=new te(o,n,"dropdeactivate"),i.deactivate.target=null,i.deactivate.dropzone=null),o.rejected||(o.cur.element!==o.prev.element&&(o.prev.dropzone&&(i.leave=new te(o,n,"dragleave"),n.dragLeave=i.leave.target=o.prev.element,n.prevDropzone=i.leave.dropzone=o.prev.dropzone),o.cur.dropzone&&(i.enter=new te(o,n,"dragenter"),n.dragEnter=o.cur.element,n.dropzone=o.cur.dropzone)),n.type==="dragend"&&o.cur.dropzone&&(i.drop=new te(o,n,"drop"),n.dropzone=o.cur.dropzone,n.relatedTarget=o.cur.element),n.type==="dragmove"&&o.cur.dropzone&&(i.move=new te(o,n,"dropmove"),n.dropzone=o.cur.dropzone)),i}function zo(t,e){const n=t.dropState,{activeDrops:o,cur:i,prev:r}=n;e.leave&&r.dropzone.fire(e.leave),e.enter&&i.dropzone.fire(e.enter),e.move&&i.dropzone.fire(e.move),e.drop&&i.dropzone.fire(e.drop),e.deactivate&&Tl(o,e.deactivate),n.prev.dropzone=i.dropzone,n.prev.element=i.element}function Fr({interaction:t,iEvent:e,event:n},o){if(e.type!=="dragmove"&&e.type!=="dragend")return;const i=t.dropState;o.dynamicDrop&&(i.activeDrops=li(o,t.element));const r=e,s=Ol(t,r,n);i.rejected=i.rejected&&!!s&&s.dropzone===i.cur.dropzone&&s.element===i.cur.element,i.cur.dropzone=s&&s.dropzone,i.cur.element=s&&s.element,i.events=ai(t,n,r)}function ff(t,e){if(x.object(e)){if(t.options.drop.enabled=e.enabled!==!1,e.listeners){const n=Re(e.listeners),o=Object.keys(n).reduce((r,s)=>{const l=/^(enter|leave)/.test(s)?`drag${s}`:/^(activate|deactivate|move)/.test(s)?`drop${s}`:s;return r[l]=n[s],r},{}),i=t.options.drop.listeners;i&&t.off(i),t.on(o),t.options.drop.listeners=o}return x.func(e.ondrop)&&t.on("drop",e.ondrop),x.func(e.ondropactivate)&&t.on("dropactivate",e.ondropactivate),x.func(e.ondropdeactivate)&&t.on("dropdeactivate",e.ondropdeactivate),x.func(e.ondragenter)&&t.on("dragenter",e.ondragenter),x.func(e.ondragleave)&&t.on("dragleave",e.ondragleave),x.func(e.ondropmove)&&t.on("dropmove",e.ondropmove),/^(pointer|center)$/.test(e.overlap)?t.options.drop.overlap=e.overlap:x.number(e.overlap)&&(t.options.drop.overlap=Math.max(Math.min(1,e.overlap),0)),"accept"in e&&(t.options.drop.accept=e.accept),"checker"in e&&(t.options.drop.checker=e.checker),t}return x.bool(e)?(t.options.drop.enabled=e,t):t.options.drop}function df(t,e,n,o,i,r,s){let l=!1;if(!(s=s||t.getRect(r)))return t.options.drop.checker?t.options.drop.checker(e,n,l,t,r,o,i):!1;const c=t.options.drop.overlap;if(c==="pointer"){const u=Sn(o,i,"drag"),d=xl(e);d.x+=u.x,d.y+=u.y;const h=d.x>s.left&&d.xs.top&&d.y=s.left&&u<=s.right&&d>=s.top&&d<=s.bottom}return a&&x.number(c)&&(l=Math.max(0,Math.min(s.right,a.right)-Math.max(s.left,a.left))*Math.max(0,Math.min(s.bottom,a.bottom)-Math.max(s.top,a.top))/(a.width*a.height)>=c),t.options.drop.checker&&(l=t.options.drop.checker(e,n,l,t,r,o,i)),l}const Il={id:"actions/drop",install:cf,listeners:{"interactions:before-action-start":({interaction:t})=>{t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":({interaction:t,event:e,iEvent:n},o)=>{if(t.prepared.name!=="drag")return;const i=t.dropState;i.activeDrops=[],i.events={},i.activeDrops=li(o,t.element),i.events=ai(t,e,n),i.events.activate&&(Tl(i.activeDrops,i.events.activate),o.fire("actions/drop:start",{interaction:t,dragEvent:n}))},"interactions:action-move":Fr,"interactions:after-action-move":({interaction:t,iEvent:e},n)=>{if(t.prepared.name!=="drag")return;const o=t.dropState;zo(t,o.events),n.fire("actions/drop:move",{interaction:t,dragEvent:e}),o.events={}},"interactions:action-end":(t,e)=>{if(t.interaction.prepared.name!=="drag")return;const{interaction:n,iEvent:o}=t;Fr(t,e),zo(n,n.dropState.events),e.fire("actions/drop:end",{interaction:n,dragEvent:o})},"interactions:stop":({interaction:t})=>{if(t.prepared.name!=="drag")return;const{dropState:e}=t;e&&(e.activeDrops=null,e.events=null,e.cur.dropzone=null,e.cur.element=null,e.prev.dropzone=null,e.prev.element=null,e.rejected=!1)}},getActiveDrops:li,getDrop:Ol,getDropEvents:ai,fireDropEvents:zo,defaults:{enabled:!1,accept:null,overlap:"pointer"}},pf=Il;function hf(t){const{actions:e,Interactable:n,defaults:o}=t;n.prototype.gesturable=function(i){return x.object(i)?(this.options.gesture.enabled=i.enabled!==!1,this.setPerAction("gesture",i),this.setOnEvents("gesture",i),this):x.bool(i)?(this.options.gesture.enabled=i,this):this.options.gesture},e.map.gesture=ci,e.methodDict.gesture="gesturable",o.actions.gesture=ci.defaults}function Do({interaction:t,iEvent:e,phase:n}){if(t.prepared.name!=="gesture")return;const o=t.pointers.map(l=>l.pointer),i=n==="start",r=n==="end",s=t.interactable.options.deltaSource;if(e.touches=[o[0],o[1]],i)e.distance=ri(o,s),e.box=ii(o),e.scale=1,e.ds=0,e.angle=si(o,s),e.da=0,t.gesture.startDistance=e.distance,t.gesture.startAngle=e.angle;else if(r){const l=t.prevEvent;e.distance=l.distance,e.box=l.box,e.scale=l.scale,e.ds=0,e.angle=l.angle,e.da=0}else e.distance=ri(o,s),e.box=ii(o),e.scale=e.distance/t.gesture.startDistance,e.angle=si(o,s),e.ds=e.scale-t.gesture.scale,e.da=e.angle-t.gesture.angle;t.gesture.distance=e.distance,t.gesture.angle=e.angle,x.number(e.scale)&&e.scale!==1/0&&!isNaN(e.scale)&&(t.gesture.scale=e.scale)}const ci={id:"actions/gesture",before:["actions/drag","actions/resize"],install:hf,listeners:{"interactions:action-start":Do,"interactions:action-move":Do,"interactions:action-end":Do,"interactions:new":({interaction:t})=>{t.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":t=>{if(t.interaction.pointers.length<2)return;const e=t.interactable.options.gesture;if(e&&e.enabled)return t.action={name:"gesture"},!1}},defaults:{},getCursor(){return""}},gf=ci;function mf(t){const{actions:e,browser:n,Interactable:o,defaults:i}=t;ee.cursors=xf(n),ee.defaultMargin=n.supportsTouch||n.supportsPointerEvent?20:10,o.prototype.resizable=function(r){return yf(this,r,t)},e.map.resize=ee,e.methodDict.resize="resizable",i.actions.resize=ee.defaults}function vf(t){const{interaction:e,interactable:n,element:o,rect:i,buttons:r}=t;if(!i)return;const s=W({},e.coords.cur.page),l=n.options.resize;if(!(!(l&&l.enabled)||e.pointerIsDown&&/mouse|pointer/.test(e.pointerType)&&!(r&l.mouseButtons))){if(x.object(l.edges)){const c={left:!1,right:!1,top:!1,bottom:!1};for(const a in c)c[a]=bf(a,l.edges[a],s,e._latestPointer.eventTarget,o,i,l.margin||ee.defaultMargin);c.left=c.left&&!c.right,c.top=c.top&&!c.bottom,(c.left||c.right||c.top||c.bottom)&&(t.action={name:"resize",edges:c})}else{const c=l.axis!=="y"&&s.x>i.right-ee.defaultMargin,a=l.axis!=="x"&&s.y>i.bottom-ee.defaultMargin;(c||a)&&(t.action={name:"resize",axes:(c?"x":"")+(a?"y":"")})}return t.action?!1:void 0}}function yf(t,e,n){return x.object(e)?(t.options.resize.enabled=e.enabled!==!1,t.setPerAction("resize",e),t.setOnEvents("resize",e),x.string(e.axis)&&/^x$|^y$|^xy$/.test(e.axis)?t.options.resize.axis=e.axis:e.axis===null&&(t.options.resize.axis=n.defaults.actions.resize.axis),x.bool(e.preserveAspectRatio)?t.options.resize.preserveAspectRatio=e.preserveAspectRatio:x.bool(e.square)&&(t.options.resize.square=e.square),t):x.bool(e)?(t.options.resize.enabled=e,t):t.options.resize}function bf(t,e,n,o,i,r,s){if(!e)return!1;if(e===!0){const l=x.number(r.width)?r.width:r.right-r.left,c=x.number(r.height)?r.height:r.bottom-r.top;if(s=Math.min(s,Math.abs((t==="left"||t==="right"?l:c)/2)),l<0&&(t==="left"?t="right":t==="right"&&(t="left")),c<0&&(t==="top"?t="bottom":t==="bottom"&&(t="top")),t==="left"){const a=l>=0?r.left:r.right;return n.x=0?r.top:r.bottom;return n.y(l>=0?r.right:r.left)-s;if(t==="bottom")return n.y>(c>=0?r.bottom:r.top)-s}return x.element(o)?x.element(e)?e===o:ni(o,e,i):!1}function xf(t){return t.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 wf({iEvent:t,interaction:e}){if(e.prepared.name!=="resize"||!e.prepared.edges)return;const n=t,o=e.rect;e._rects={start:W({},o),corrected:W({},o),previous:W({},o),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},n.edges=e.prepared.edges,n.rect=e._rects.corrected,n.deltaRect=e._rects.delta}function _f({iEvent:t,interaction:e}){if(e.prepared.name!=="resize"||!e.prepared.edges)return;const n=t,o=e.interactable.options.resize.invert,i=o==="reposition"||o==="negate",r=e.rect,{start:s,corrected:l,delta:c,previous:a}=e._rects;if(W(a,l),i){if(W(l,r),o==="reposition"){if(l.top>l.bottom){const u=l.top;l.top=l.bottom,l.bottom=u}if(l.left>l.right){const u=l.left;l.left=l.right,l.right=u}}}else l.top=Math.min(r.top,s.bottom),l.bottom=Math.max(r.bottom,s.top),l.left=Math.min(r.left,s.right),l.right=Math.max(r.right,s.left);l.width=l.right-l.left,l.height=l.bottom-l.top;for(const u in l)c[u]=l[u]-a[u];n.edges=e.prepared.edges,n.rect=l,n.deltaRect=c}function Ef({iEvent:t,interaction:e}){if(e.prepared.name!=="resize"||!e.prepared.edges)return;const n=t;n.edges=e.prepared.edges,n.rect=e._rects.corrected,n.deltaRect=e._rects.delta}function Nr({iEvent:t,interaction:e}){if(e.prepared.name!=="resize"||!e.resizeAxes)return;const n=e.interactable.options,o=t;n.resize.square?(e.resizeAxes==="y"?o.delta.x=o.delta.y:o.delta.y=o.delta.x,o.axes="xy"):(o.axes=e.resizeAxes,e.resizeAxes==="x"?o.delta.y=0:e.resizeAxes==="y"&&(o.delta.x=0))}const ee={id:"actions/resize",before:["actions/drag"],install:mf,listeners:{"interactions:new":({interaction:t})=>{t.resizeAxes="xy"},"interactions:action-start":t=>{wf(t),Nr(t)},"interactions:action-move":t=>{_f(t),Nr(t)},"interactions:action-end":Ef,"auto-start:check":vf},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor({edges:t,axis:e,name:n}){const o=ee.cursors;let i=null;if(e)i=o[n+e];else if(t){let r="";for(const s of["top","bottom","left","right"])t[s]&&(r+=s);i=o[r]}return i},defaultMargin:null},Sf=ee,Tf={id:"actions",install(t){t.usePlugin(gf),t.usePlugin(Sf),t.usePlugin(hl),t.usePlugin(pf)}};let Lr=0,Qt,Pe;function Of(t){if(Qt=t.requestAnimationFrame,Pe=t.cancelAnimationFrame,!Qt){const e=["ms","moz","webkit","o"];for(const n of e)Qt=t[`${n}RequestAnimationFrame`],Pe=t[`${n}CancelAnimationFrame`]||t[`${n}CancelRequestAnimationFrame`]}Qt=Qt&&Qt.bind(t),Pe=Pe&&Pe.bind(t),Qt||(Qt=e=>{const n=Date.now(),o=Math.max(0,16-(n-Lr)),i=t.setTimeout(()=>{e(n+o)},o);return Lr=n+o,i},Pe=e=>clearTimeout(e))}const de={request:t=>Qt(t),cancel:t=>Pe(t),init:Of};function If(t){const{defaults:e,actions:n}=t;t.autoScroll=Y,Y.now=()=>t.now(),n.phaselessTypes.autoscroll=!0,e.perAction.autoScroll=Y.defaults}const Y={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(t){Y.isScrolling=!0,de.cancel(Y.i),t.autoScroll=Y,Y.interaction=t,Y.prevTime=Y.now(),Y.i=de.request(Y.scroll)},stop(){Y.isScrolling=!1,Y.interaction&&(Y.interaction.autoScroll=null),de.cancel(Y.i)},scroll(){const{interaction:t}=Y,{interactable:e,element:n}=t,o=t.prepared.name,i=e.options[o].autoScroll,r=jr(i.container,e,n),s=Y.now(),l=(s-Y.prevTime)/1e3,c=i.speed*l;if(c>=1){const a={x:Y.x*c,y:Y.y*c};if(a.x||a.y){const u=Hr(r);x.window(r)?r.scrollBy(a.x,a.y):r&&(r.scrollLeft+=a.x,r.scrollTop+=a.y);const d=Hr(r),h={x:d.x-u.x,y:d.y-u.y};(h.x||h.y)&&e.fire({type:"autoscroll",target:n,interactable:e,delta:h,interaction:t,container:r})}Y.prevTime=s}Y.isScrolling&&(de.cancel(Y.i),Y.i=de.request(Y.scroll))},check(t,e){var n;return(n=t.options[e].autoScroll)==null?void 0:n.enabled},onInteractionMove({interaction:t,pointer:e}){if(!(t.interacting()&&Y.check(t.interactable,t.prepared.name)))return;if(t.simulation){Y.x=Y.y=0;return}let n,o,i,r;const{interactable:s,element:l}=t,c=t.prepared.name,a=s.options[c].autoScroll,u=jr(a.container,s,l);if(x.window(u))r=e.clientXu.innerWidth-Y.margin,i=e.clientY>u.innerHeight-Y.margin;else{const d=ki(u);r=e.clientXd.right-Y.margin,i=e.clientY>d.bottom-Y.margin}Y.x=o?1:r?-1:0,Y.y=i?1:n?-1:0,Y.isScrolling||(Y.margin=a.margin,Y.speed=a.speed,Y.start(t))}};function jr(t,e,n){return(x.string(t)?vl(t,e,n):t)||oe(n)}function Hr(t){return x.window(t)&&(t=window.document.body),{x:t.scrollLeft,y:t.scrollTop}}const Pf={id:"auto-scroll",install:If,listeners:{"interactions:new":({interaction:t})=>{t.autoScroll=null},"interactions:destroy":({interaction:t})=>{t.autoScroll=null,Y.stop(),Y.interaction&&(Y.interaction=null)},"interactions:stop":Y.stop,"interactions:action-move":t=>Y.onInteractionMove(t)}},Cf=Pf;function wn(t,e){let n=!1;return function(){return n||(xe.console.warn(e),n=!0),t.apply(this,arguments)}}function Ui(t,e){return t.name=e.name,t.axis=e.axis,t.edges=e.edges,t}function Mf(t){const{Interactable:e}=t;e.prototype.getAction=function(n,o,i,r){const s=Af(this,o,i,r,t);return this.options.actionChecker?this.options.actionChecker(n,o,s,this,r,i):s},e.prototype.ignoreFrom=wn(function(n){return this._backCompatOption("ignoreFrom",n)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),e.prototype.allowFrom=wn(function(n){return this._backCompatOption("allowFrom",n)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),e.prototype.actionChecker=Df,e.prototype.styleCursor=zf}function Af(t,e,n,o,i){const r=t.getRect(o),s=e.buttons||{0:1,1:4,3:8,4:16}[e.button],l={action:null,interactable:t,interaction:n,element:o,rect:r,buttons:s};return i.fire("auto-start:check",l),l.action}function zf(t){return x.bool(t)?(this.options.styleCursor=t,this):t===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Df(t){return x.func(t)?(this.options.actionChecker=t,this):t===null?(delete this.options.actionChecker,this):this.options.actionChecker}const Rf={id:"auto-start/interactableMethods",install:Mf};function Ff(t){const{interactStatic:e,defaults:n}=t;t.usePlugin(Rf),n.base.actionChecker=null,n.base.styleCursor=!0,W(n.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),e.maxInteractions=o=>Al(o,t),t.autoStart={maxInteractions:1/0,withinInteractionLimit:wo,cursorElement:null}}function Nf({interaction:t,pointer:e,event:n,eventTarget:o},i){if(t.interacting())return;const r=Cl(t,e,n,o,i);Ml(t,r,i)}function Lf({interaction:t,pointer:e,event:n,eventTarget:o},i){if(t.pointerType!=="mouse"||t.pointerIsDown||t.interacting())return;const r=Cl(t,e,n,o,i);Ml(t,r,i)}function jf(t,e){const{interaction:n}=t;if(!n.pointerIsDown||n.interacting()||!n.pointerWasMoved||!n.prepared.name)return;e.fire("autoStart:before-start",t);const{interactable:o}=n,i=n.prepared.name;i&&o&&(o.options[i].manualStart||!wo(o,n.element,n.prepared,e)?n.stop():(n.start(n.prepared,o,n.element),zl(n,e)))}function Hf({interaction:t},e){const{interactable:n}=t;n&&n.options.styleCursor&&ui(t.element,"",e)}function Pl(t,e,n,o,i){return e.testIgnoreAllow(e.options[t.name],n,o)&&e.options[t.name].enabled&&wo(e,n,t,i)?t:null}function kf(t,e,n,o,i,r,s){for(let l=0,c=o.length;l=l||d.interactable===t&&(a+=h===n.name?1:0,a>=r||d.element===e&&(u++,h===n.name&&u>=s))))return!1}return l>0}function Al(t,e){return x.number(t)?(e.autoStart.maxInteractions=t,this):e.autoStart.maxInteractions}function ui(t,e,n){const{cursorElement:o}=n.autoStart;o&&o!==t&&(o.style.cursor=""),t.ownerDocument.documentElement.style.cursor=e,t.style.cursor=e,n.autoStart.cursorElement=e?t:null}function zl(t,e){const{interactable:n,element:o,prepared:i}=t;if(!(t.pointerType==="mouse"&&n&&n.options.styleCursor)){e.autoStart.cursorElement&&ui(e.autoStart.cursorElement,"",e);return}let r="";if(i.name){const s=n.options[i.name].cursorChecker;x.func(s)?r=s(i,n,o,t._interacting):r=e.actions.map[i.name].getCursor(i)}ui(t.element,r||"",e)}const $f={id:"auto-start/base",before:["actions"],install:Ff,listeners:{"interactions:down":Nf,"interactions:move":(t,e)=>{Lf(t,e),jf(t,e)},"interactions:stop":Hf},maxInteractions:Al,withinInteractionLimit:wo,validateAction:Pl},Vi=$f;function Bf({interaction:t,eventTarget:e,dx:n,dy:o},i){if(t.prepared.name!=="drag")return;const r=Math.abs(n),s=Math.abs(o),l=t.interactable.options.drag,c=l.startAxis,a=r>s?"x":r{t.autoStartHoldTimer=null},"autoStart:prepared":({interaction:t})=>{const e=Ro(t);e>0&&(t.autoStartHoldTimer=setTimeout(()=>{t.start(t.prepared,t.interactable,t.element)},e))},"interactions:move":({interaction:t,duplicate:e})=>{t.autoStartHoldTimer&&t.pointerWasMoved&&!e&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":({interaction:t})=>{Ro(t)>0&&(t.prepared.name=null)}},getHoldDuration:Ro},Xf=Kf,qf={id:"auto-start",install(t){t.usePlugin(Vi),t.usePlugin(Xf),t.usePlugin(Uf)}};function Yf(t){return/^(always|never|auto)$/.test(t)?(this.options.preventDefault=t,this):x.bool(t)?(this.options.preventDefault=t?"always":"never",this):this.options.preventDefault}function Gf(t,e,n){const o=t.options.preventDefault;if(o!=="never"){if(o==="always"){n.preventDefault();return}if(e.events.supportsPassive&&/^touch(start|move)$/.test(n.type)){const i=oe(n.target).document,r=e.getDocOptions(i);if(!(r&&r.events)||r.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(n.type)||x.element(n.target)&&be(n.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||n.preventDefault()}}function Jf({interaction:t,event:e}){t.interactable&&t.interactable.checkAndPreventDefault(e)}function Zf(t){const{Interactable:e}=t;e.prototype.preventDefault=Yf,e.prototype.checkAndPreventDefault=function(n){return Gf(this,t,n)},t.interactions.docEvents.push({type:"dragstart",listener(n){for(const o of t.interactions.list)if(o.element&&(o.element===n.target||De(o.element,n.target))){o.interactable.checkAndPreventDefault(n);return}}})}const Dl={id:"core/interactablePreventDefault",install:Zf,listeners:["down","move","up","cancel"].reduce((t,e)=>(t[`interactions:${e}`]=Jf,t),{})},Qf={};var Ve;(function(t){t.touchAction="touchAction",t.boxSizing="boxSizing",t.noListeners="noListeners"})(Ve||(Ve={}));const kr="[interact.js] ",fi={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 td(t,{logger:e}={}){const{Interactable:n,defaults:o}=t;t.logger=e||console,o.base.devTools={ignore:{}},n.prototype.devTools=function(i){return i?(W(this.options.devTools,i),this):this.options.devTools},t.usePlugin(Qf)}const $r=[{name:Ve.touchAction,perform({element:t}){return!!t&&!ed(t,"touchAction",/pan-|pinch|none/)},getInfo({element:t}){return[t,fi.touchAction]},text:`Consider adding CSS "touch-action: none" to this element +`},{name:Ve.boxSizing,perform(t){const{element:e}=t;return t.prepared.name==="resize"&&e instanceof St.HTMLElement&&!Rl(e,"boxSizing",/border-box/)},text:'Consider adding CSS "box-sizing: border-box" to this resizable element',getInfo({element:t}){return[t,fi.boxSizing]}},{name:Ve.noListeners,perform(t){var e;const n=t.prepared.name;return!(((e=t.interactable)==null?void 0:e.events.types[`${n}move`])||[]).length},getInfo(t){return[t.prepared.name,t.interactable]},text:"There are no listeners set for this action"}];function Rl(t,e,n){const o=t.style[e]||xe.getComputedStyle(t)[e];return n.test((o||"").toString())}function ed(t,e,n){let o=t;for(;x.element(o);){if(Rl(o,e,n))return!0;o=Jt(o)}return!1}const nd="dev-tools",od={id:nd,install:td,listeners:{"interactions:action-start":({interaction:t},e)=>{for(const n of $r){const o=t.interactable&&t.interactable.options;!(o&&o.devTools&&o.devTools.ignore[n.name])&&n.perform(t)&&e.logger.warn(kr+n.text,...n.getInfo(t))}}},checks:$r,CheckName:Ve,links:fi,prefix:kr},id=od;function qe(t){const e={};for(const n in t){const o=t[n];x.plainObject(o)?e[n]=qe(o):x.array(o)?e[n]=Wi(o):e[n]=o}return e}class Ki{constructor(e){b(this,"states",[]),b(this,"startOffset",{left:0,right:0,top:0,bottom:0}),b(this,"startDelta"),b(this,"result"),b(this,"endResult"),b(this,"startEdges"),b(this,"edges"),b(this,"interaction"),this.interaction=e,this.result=Dn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}start({phase:e},n){const{interaction:o}=this,i=rd(o);this.prepareStates(i),this.startEdges=W({},o.edges),this.edges=W({},this.startEdges),this.startOffset=sd(o.rect,n),this.startDelta={x:0,y:0};const r=this.fillArg({phase:e,pageCoords:n,preEnd:!1});return this.result=Dn(),this.startAll(r),this.result=this.setAll(r)}fillArg(e){const{interaction:n}=this;return e.interaction=n,e.interactable=n.interactable,e.element=n.element,e.rect||(e.rect=n.rect),e.edges||(e.edges=this.startEdges),e.startOffset=this.startOffset,e}startAll(e){for(const n of this.states)n.methods.start&&(e.state=n,n.methods.start(e))}setAll(e){const{phase:n,preEnd:o,skipModifiers:i,rect:r,edges:s}=e;e.coords=W({},e.pageCoords),e.rect=W({},r),e.edges=W({},s);const l=i?this.states.slice(i):this.states,c=Dn(e.coords,e.rect);for(const h of l){var a;const{options:g}=h,w=W({},e.coords);let D=null;(a=h.methods)!=null&&a.set&&this.shouldDo(g,o,n)&&(e.state=h,D=h.methods.set(e),bo(e.edges,e.rect,{x:e.coords.x-w.x,y:e.coords.y-w.y})),c.eventProps.push(D)}W(this.edges,e.edges),c.delta.x=e.coords.x-e.pageCoords.x,c.delta.y=e.coords.y-e.pageCoords.y,c.rectDelta.left=e.rect.left-r.left,c.rectDelta.right=e.rect.right-r.right,c.rectDelta.top=e.rect.top-r.top,c.rectDelta.bottom=e.rect.bottom-r.bottom;const u=this.result.coords,d=this.result.rect;if(u&&d){const h=c.rect.left!==d.left||c.rect.right!==d.right||c.rect.top!==d.top||c.rect.bottom!==d.bottom;c.changed=h||u.x!==c.coords.x||u.y!==c.coords.y}return c}applyToInteraction(e){const{interaction:n}=this,{phase:o}=e,i=n.coords.cur,r=n.coords.start,{result:s,startDelta:l}=this,c=s.delta;o==="start"&&W(this.startDelta,s.delta);for(const[d,h]of[[r,l],[i,c]])d.page.x+=h.x,d.page.y+=h.y,d.client.x+=h.x,d.client.y+=h.y;const{rectDelta:a}=this.result,u=e.rect||n.rect;u.left+=a.left,u.right+=a.right,u.top+=a.top,u.bottom+=a.bottom,u.width=u.right-u.left,u.height=u.bottom-u.top}setAndApply(e){const{interaction:n}=this,{phase:o,preEnd:i,skipModifiers:r}=e,s=this.setAll(this.fillArg({preEnd:i,phase:o,pageCoords:e.modifiedCoords||n.coords.cur.page}));if(this.result=s,!s.changed&&(!r||rqe(n)),this.result=Dn(W({},e.result.coords),W({},e.result.rect))}destroy(){for(const e in this)this[e]=null}}function Dn(t,e){return{rect:e,coords:t,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function rd(t){const e=t.interactable.options[t.prepared.name],n=e.modifiers;return n&&n.length?n:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(o=>{const i=e[o];return i&&i.enabled&&{options:i,methods:i._methods}}).filter(o=>!!o)}function sd(t,e){return t?{left:e.x-t.left,top:e.y-t.top,right:t.right-e.x,bottom:t.bottom-e.y}:{left:0,top:0,right:0,bottom:0}}function we(t,e){const{defaults:n}=t,o={start:t.start,set:t.set,beforeEnd:t.beforeEnd,stop:t.stop},i=r=>{const s=r||{};s.enabled=s.enabled!==!1;for(const c in n)c in s||(s[c]=n[c]);const l={options:s,methods:o,name:e,enable:()=>(s.enabled=!0,l),disable:()=>(s.enabled=!1,l)};return l};return e&&typeof e=="string"&&(i._defaults=n,i._methods=o),i}function fn({iEvent:t,interaction:e}){const n=e.modification.result;n&&(t.modifiers=n.eventProps)}const ld={id:"modifiers/base",before:["actions"],install:t=>{t.defaults.perAction.modifiers=[]},listeners:{"interactions:new":({interaction:t})=>{t.modification=new Ki(t)},"interactions:before-action-start":t=>{const{interaction:e}=t,n=t.interaction.modification;n.start(t,e.coords.start.page),e.edges=n.edges,n.applyToInteraction(t)},"interactions:before-action-move":t=>{const{interaction:e}=t,{modification:n}=e,o=n.setAndApply(t);return e.edges=n.edges,o},"interactions:before-action-end":t=>{const{interaction:e}=t,{modification:n}=e,o=n.beforeEnd(t);return e.edges=n.startEdges,o},"interactions:action-start":fn,"interactions:action-move":fn,"interactions:action-end":fn,"interactions:after-action-start":t=>t.interaction.modification.restoreInteractionCoords(t),"interactions:after-action-move":t=>t.interaction.modification.restoreInteractionCoords(t),"interactions:stop":t=>t.interaction.modification.stop(t)}},Fl=ld,Nl={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}};class Xi extends xo{constructor(e,n,o,i,r,s,l){super(e),b(this,"relatedTarget",null),b(this,"screenX"),b(this,"screenY"),b(this,"button"),b(this,"buttons"),b(this,"ctrlKey"),b(this,"shiftKey"),b(this,"altKey"),b(this,"metaKey"),b(this,"page"),b(this,"client"),b(this,"delta"),b(this,"rect"),b(this,"x0"),b(this,"y0"),b(this,"t0"),b(this,"dt"),b(this,"duration"),b(this,"clientX0"),b(this,"clientY0"),b(this,"velocity"),b(this,"speed"),b(this,"swipe"),b(this,"axes"),b(this,"preEnd"),r=r||e.element;const c=e.interactable,a=(c&&c.options||Nl).deltaSource,u=Sn(c,r,o),d=i==="start",h=i==="end",g=d?this:e.prevEvent,w=d?e.coords.start:h?{page:g.page,client:g.client,timeStamp:e.coords.cur.timeStamp}:e.coords.cur;this.page=W({},w.page),this.client=W({},w.client),this.rect=W({},e.rect),this.timeStamp=w.timeStamp,h||(this.page.x-=u.x,this.page.y-=u.y,this.client.x-=u.x,this.client.y-=u.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=r,this.currentTarget=r,this.preEnd=s,this.type=l||o+(i||""),this.interactable=c,this.t0=d?e.pointers[e.pointers.length-1].downTime:g.t0,this.x0=e.coords.start.page.x-u.x,this.y0=e.coords.start.page.y-u.y,this.clientX0=e.coords.start.client.x-u.x,this.clientY0=e.coords.start.client.y-u.y,d||h?this.delta={x:0,y:0}:this.delta={x:this[a].x-g[a].x,y:this[a].y-g[a].y},this.dt=e.coords.delta.timeStamp,this.duration=this.timeStamp-this.t0,this.velocity=W({},e.coords.velocity[a]),this.speed=Tn(this.velocity.x,this.velocity.y),this.swipe=h||i==="inertiastart"?this.getSwipe():null}getSwipe(){const e=this._interaction;if(e.prevEvent.speed<600||this.timeStamp-e.prevEvent.timeStamp>150)return null;let n=180*Math.atan2(e.prevEvent.velocityY,e.prevEvent.velocityX)/Math.PI;const o=22.5;n<0&&(n+=360);const i=135-o<=n&&n<225+o,r=225-o<=n&&n<315+o,s=!i&&(315-o<=n||n<45+o),l=!r&&45-o<=n&&n<135+o;return{up:r,down:l,left:i,right:s,angle:n,speed:e.prevEvent.speed,velocity:{x:e.prevEvent.velocityX,y:e.prevEvent.velocityY}}}preventDefault(){}stopImmediatePropagation(){this.immediatePropagationStopped=this.propagationStopped=!0}stopPropagation(){this.propagationStopped=!0}}Object.defineProperties(Xi.prototype,{pageX:{get(){return this.page.x},set(t){this.page.x=t}},pageY:{get(){return this.page.y},set(t){this.page.y=t}},clientX:{get(){return this.client.x},set(t){this.client.x=t}},clientY:{get(){return this.client.y},set(t){this.client.y=t}},dx:{get(){return this.delta.x},set(t){this.delta.x=t}},dy:{get(){return this.delta.y},set(t){this.delta.y=t}},velocityX:{get(){return this.velocity.x},set(t){this.velocity.x=t}},velocityY:{get(){return this.velocity.y},set(t){this.velocity.y=t}}});class ad{constructor(e,n,o,i,r){b(this,"id"),b(this,"pointer"),b(this,"event"),b(this,"downTime"),b(this,"downTarget"),this.id=e,this.pointer=n,this.event=o,this.downTime=i,this.downTarget=r}}let di;(function(t){t.interactable="",t.element="",t.prepared="",t.pointerIsDown="",t.pointerWasMoved="",t._proxy=""})(di||(di={}));let Zn;(function(t){t.start="",t.move="",t.end="",t.stop="",t.interacting=""})(Zn||(Zn={}));let cd=0;class ud{constructor({pointerType:e,scopeFire:n}){b(this,"interactable",null),b(this,"element",null),b(this,"rect",null),b(this,"_rects"),b(this,"edges",null),b(this,"_scopeFire"),b(this,"prepared",{name:null,axis:null,edges:null}),b(this,"pointerType"),b(this,"pointers",[]),b(this,"downEvent",null),b(this,"downPointer",{}),b(this,"_latestPointer",{pointer:null,event:null,eventTarget:null}),b(this,"prevEvent",null),b(this,"pointerIsDown",!1),b(this,"pointerWasMoved",!1),b(this,"_interacting",!1),b(this,"_ending",!1),b(this,"_stopped",!0),b(this,"_proxy"),b(this,"simulation",null),b(this,"doMove",wn(function(i){this.move(i)},"The interaction.doMove() method has been renamed to interaction.move()")),b(this,"coords",{start:Qe(),prev:Qe(),cur:Qe(),delta:Qe(),velocity:Qe()}),b(this,"_id",cd++),this._scopeFire=n,this.pointerType=e;const o=this;this._proxy={};for(const i in di)Object.defineProperty(this._proxy,i,{get(){return o[i]}});for(const i in Zn)Object.defineProperty(this._proxy,i,{value:(...r)=>o[i](...r)});this._scopeFire("interactions:new",{interaction:this})}get pointerMoveTolerance(){return 1}pointerDown(e,n,o){const i=this.updatePointer(e,n,o,!0),r=this.pointers[i];this._scopeFire("interactions:down",{pointer:e,event:n,eventTarget:o,pointerIndex:i,pointerInfo:r,type:"down",interaction:this})}start(e,n,o){return this.interacting()||!this.pointerIsDown||this.pointers.length<(e.name==="gesture"?2:1)||!n.options[e.name].enabled?!1:(Ui(this.prepared,e),this.interactable=n,this.element=o,this.rect=n.getRect(o),this.edges=this.prepared.edges?W({},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(e,n,o){!this.simulation&&!(this.modification&&this.modification.endResult)&&this.updatePointer(e,n,o,!1);const i=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 r,s;this.pointerIsDown&&!this.pointerWasMoved&&(r=this.coords.cur.client.x-this.coords.start.client.x,s=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Tn(r,s)>this.pointerMoveTolerance);const l=this.getPointerIndex(e),c={pointer:e,pointerIndex:l,pointerInfo:this.pointers[l],event:n,type:"move",eventTarget:o,dx:r,dy:s,duplicate:i,interaction:this};i||nf(this.coords.velocity,this.coords.delta),this._scopeFire("interactions:move",c),!i&&!this.simulation&&(this.interacting()&&(c.type=null,this.move(c)),this.pointerWasMoved&&Hn(this.coords.prev,this.coords.cur))}move(e){(!e||!e.event)&&yl(this.coords.delta),e=W({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},e||{}),e.phase="move",this._doPhase(e)}pointerUp(e,n,o,i){let r=this.getPointerIndex(e);r===-1&&(r=this.updatePointer(e,n,o,!1));const s=/cancel$/i.test(n.type)?"cancel":"up";this._scopeFire(`interactions:${s}`,{pointer:e,pointerIndex:r,pointerInfo:this.pointers[r],event:n,eventTarget:o,type:s,curEventTarget:i,interaction:this}),this.simulation||this.end(n),this.removePointer(e,n)}documentBlur(e){this.end(e),this._scopeFire("interactions:blur",{event:e,type:"blur",interaction:this})}end(e){this._ending=!0,e=e||this._latestPointer.event;let n;this.interacting()&&(n=this._doPhase({event:e,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(e){const n=xn(e);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:On(this.pointers,o=>o.id===n)}getPointerInfo(e){return this.pointers[this.getPointerIndex(e)]}updatePointer(e,n,o,i){const r=xn(e);let s=this.getPointerIndex(e),l=this.pointers[s];return i=i===!1?!1:i||/(down|start)$/i.test(n.type),l?l.pointer=e:(l=new ad(r,e,n,null,null),s=this.pointers.length,this.pointers.push(l)),rf(this.coords.cur,this.pointers.map(c=>c.pointer),this._now()),ef(this.coords.delta,this.coords.prev,this.coords.cur),i&&(this.pointerIsDown=!0,l.downTime=this.coords.cur.timeStamp,l.downTarget=o,Yn(this.downPointer,e),this.interacting()||(Hn(this.coords.start,this.coords.cur),Hn(this.coords.prev,this.coords.cur),this.downEvent=n,this.pointerWasMoved=!1)),this._updateLatestPointer(e,n,o),this._scopeFire("interactions:update-pointer",{pointer:e,event:n,eventTarget:o,down:i,pointerInfo:l,pointerIndex:s,interaction:this}),s}removePointer(e,n){const o=this.getPointerIndex(e);if(o===-1)return;const i=this.pointers[o];this._scopeFire("interactions:remove-pointer",{pointer:e,event:n,eventTarget:null,pointerIndex:o,pointerInfo:i,interaction:this}),this.pointers.splice(o,1),this.pointerIsDown=!1}_updateLatestPointer(e,n,o){this._latestPointer.pointer=e,this._latestPointer.event=n,this._latestPointer.eventTarget=o}destroy(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}_createPreparedEvent(e,n,o,i){return new Xi(this,e,this.prepared.name,n,this.element,o,i)}_fireEvent(e){var n;(n=this.interactable)==null||n.fire(e),(!this.prevEvent||e.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=e)}_doPhase(e){const{event:n,phase:o,preEnd:i,type:r}=e,{rect:s}=this;if(s&&o==="move"&&(bo(this.edges,s,this.coords.delta[this.interactable.options.deltaSource]),s.width=s.right-s.left,s.height=s.bottom-s.top),this._scopeFire(`interactions:before-action-${o}`,e)===!1)return!1;const l=e.iEvent=this._createPreparedEvent(n,o,i,r);return this._scopeFire(`interactions:action-${o}`,e),o==="start"&&(this.prevEvent=l),this._fireEvent(l),this._scopeFire(`interactions:after-action-${o}`,e),!0}_now(){return Date.now()}}Zn.offsetBy="";function fd(t){t.pointerIsDown&&(pi(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}function Br({interaction:t}){Ll(t)}function dd({interaction:t}){if(Ll(t))return t.move({offset:!0}),t.end(),!1}function pd({interaction:t}){t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}function Ll(t){if(!gd(t))return!1;const{pending:e}=t.offset;return pi(t.coords.cur,e),pi(t.coords.delta,e),bo(t.edges,t.rect,e),e.x=0,e.y=0,!0}function hd({x:t,y:e}){this.offset.pending.x+=t,this.offset.pending.y+=e,this.offset.total.x+=t,this.offset.total.y+=e}function pi({page:t,client:e},{x:n,y:o}){t.x+=n,t.y+=o,e.x+=n,e.y+=o}function gd(t){return!!(t.offset.pending.x||t.offset.pending.y)}const md={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install(t){t.Interaction.prototype.offsetBy=hd},listeners:{"interactions:new":({interaction:t})=>{t.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":({interaction:t})=>fd(t),"interactions:before-action-start":Br,"interactions:before-action-move":Br,"interactions:before-action-end":dd,"interactions:stop":pd}},jl=md;function vd(t){const{defaults:e}=t;t.usePlugin(jl),t.usePlugin(Fl),t.actions.phases.inertiastart=!0,t.actions.phases.resume=!0,e.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}}class yd{constructor(e){b(this,"active",!1),b(this,"isModified",!1),b(this,"smoothEnd",!1),b(this,"allowResume",!1),b(this,"modification"),b(this,"modifierCount",0),b(this,"modifierArg"),b(this,"startCoords"),b(this,"t0",0),b(this,"v0",0),b(this,"te",0),b(this,"targetOffset"),b(this,"modifiedOffset"),b(this,"currentOffset"),b(this,"lambda_v0",0),b(this,"one_ve_v0",0),b(this,"timeout"),b(this,"interaction"),this.interaction=e}start(e){const{interaction:n}=this,o=Rn(n);if(!o||!o.enabled)return!1;const{client:i}=n.coords.velocity,r=Tn(i.x,i.y),s=this.modification||(this.modification=new Ki(n));if(s.copyFrom(n.modification),this.t0=n._now(),this.allowResume=o.allowResume,this.v0=r,this.currentOffset={x:0,y:0},this.startCoords=n.coords.cur.page,this.modifierArg=s.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-n.coords.cur.timeStamp<50&&r>o.minSpeed&&r>o.endSpeed)this.startInertia();else{if(s.result=s.setAll(this.modifierArg),!s.result.changed)return!1;this.startSmoothEnd()}return n.modification.result.rect=null,n.offsetBy(this.targetOffset),n._doPhase({interaction:n,event:e,phase:"inertiastart"}),n.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),n.modification.result.rect=null,this.active=!0,n.simulation=this,!0}startInertia(){const e=this.interaction.coords.velocity.client,n=Rn(this.interaction),o=n.resistance,i=-Math.log(n.endSpeed/this.v0)/o;this.targetOffset={x:(e.x-i)/o,y:(e.y-i)/o},this.te=i,this.lambda_v0=o/this.v0,this.one_ve_v0=1-n.endSpeed/this.v0;const{modification:r,modifierArg:s}=this;s.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},r.result=r.setAll(s),r.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+r.result.delta.x,y:this.targetOffset.y+r.result.delta.y}),this.onNextFrame(()=>this.inertiaTick())}startSmoothEnd(){this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(()=>this.smoothEndTick())}onNextFrame(e){this.timeout=de.request(()=>{this.active&&e()})}inertiaTick(){const{interaction:e}=this,n=Rn(e).resistance,o=(e._now()-this.t0)/1e3;if(othis.inertiaTick())}else e.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}smoothEndTick(){const{interaction:e}=this,n=e._now()-this.t0,{smoothEndDuration:o}=Rn(e);if(nthis.smoothEndTick())}else e.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}resume({pointer:e,event:n,eventTarget:o}){const{interaction:i}=this;i.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),i.updatePointer(e,n,o,!0),i._doPhase({interaction:i,event:n,phase:"resume"}),Hn(i.coords.prev,i.coords.cur),this.stop()}end(){this.interaction.move(),this.interaction.end(),this.stop()}stop(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,de.cancel(this.timeout)}}function bd({interaction:t,event:e}){return!t._interacting||t.simulation?null:t.inertia.start(e)?!1:null}function xd(t){const{interaction:e,eventTarget:n}=t,o=e.inertia;if(!o.active)return;let i=n;for(;x.element(i);){if(i===e.element){o.resume(t);break}i=Jt(i)}}function wd({interaction:t}){const e=t.inertia;e.active&&e.stop()}function Rn({interactable:t,prepared:e}){return t&&t.options&&e.name&&t.options[e.name].inertia}const _d={id:"inertia",before:["modifiers","actions"],install:vd,listeners:{"interactions:new":({interaction:t})=>{t.inertia=new yd(t)},"interactions:before-action-end":bd,"interactions:down":xd,"interactions:stop":wd,"interactions:before-action-resume":t=>{const{modification:e}=t.interaction;e.stop(t),e.start(t,t.interaction.coords.cur.page),e.applyToInteraction(t)},"interactions:before-action-inertiastart":t=>t.interaction.modification.setAndApply(t),"interactions:action-resume":fn,"interactions:action-inertiastart":fn,"interactions:after-action-inertiastart":t=>t.interaction.modification.restoreInteractionCoords(t),"interactions:after-action-resume":t=>t.interaction.modification.restoreInteractionCoords(t)}};function Wr(t,e,n,o){const i=1-t;return i*i*e+2*i*t*n+t*t*o}function Ed(t,e,n,o,i,r,s){return{x:Wr(s,t,n,i),y:Wr(s,e,o,r)}}function Ur(t,e,n,o){return t/=o,-n*t*(t-2)+e}const Sd=_d;function Vr(t,e){for(const n of e){if(t.immediatePropagationStopped)break;n(t)}}class Hl{constructor(e){b(this,"options"),b(this,"types",{}),b(this,"propagationStopped",!1),b(this,"immediatePropagationStopped",!1),b(this,"global"),this.options=W({},e||{})}fire(e){let n;const o=this.global;(n=this.types[e.type])&&Vr(e,n),!e.propagationStopped&&o&&(n=o[e.type])&&Vr(e,n)}on(e,n){const o=Re(e,n);for(e in o)this.types[e]=Sl(this.types[e]||[],o[e])}off(e,n){const o=Re(e,n);for(e in o){const i=this.types[e];if(!(!i||!i.length))for(const r of o[e]){const s=i.indexOf(r);s!==-1&&i.splice(s,1)}}}getRect(e){return null}}function hi(t,e){if(e.phaselessTypes[t])return!0;for(const n in e.map)if(t.indexOf(n)===0&&t.substr(n.length)in e.phases)return!0;return!1}function Td(t){const e=(n,o)=>{let i=t.interactables.get(n,o);return i||(i=t.interactables.new(n,o),i.events.global=e.globalEvents),i};return e.getPointerAverage=wl,e.getTouchBBox=ii,e.getTouchDistance=ri,e.getTouchAngle=si,e.getElementRect=$i,e.getElementClientRect=ki,e.matchesSelector=be,e.closest=gl,e.globalEvents={},e.version="1.10.20",e.scope=t,e.use=function(n,o){return this.scope.usePlugin(n,o),this},e.isSet=function(n,o){return!!this.scope.interactables.get(n,o&&o.context)},e.on=wn(function(n,o,i){if(x.string(n)&&n.search(" ")!==-1&&(n=n.trim().split(/ +/)),x.array(n)){for(const r of n)this.on(r,o,i);return this}if(x.object(n)){for(const r in n)this.on(r,n[r],o);return this}return hi(n,this.scope.actions)?this.globalEvents[n]?this.globalEvents[n].push(o):this.globalEvents[n]=[o]:this.scope.events.add(this.scope.document,n,o,{options:i}),this},"The interact.on() method is being deprecated"),e.off=wn(function(n,o,i){if(x.string(n)&&n.search(" ")!==-1&&(n=n.trim().split(/ +/)),x.array(n)){for(const r of n)this.off(r,o,i);return this}if(x.object(n)){for(const r in n)this.off(r,n[r],o);return this}if(hi(n,this.scope.actions)){let r;n in this.globalEvents&&(r=this.globalEvents[n].indexOf(o))!==-1&&this.globalEvents[n].splice(r,1)}else this.scope.events.remove(this.scope.document,n,o,i);return this},"The interact.off() method is being deprecated"),e.debug=function(){return this.scope},e.supportsTouch=function(){return Vt.supportsTouch},e.supportsPointerEvent=function(){return Vt.supportsPointerEvent},e.stop=function(){for(const n of this.scope.interactions.list)n.stop();return this},e.pointerMoveTolerance=function(n){return x.number(n)?(this.scope.interactions.pointerMoveTolerance=n,this):this.scope.interactions.pointerMoveTolerance},e.addDocument=function(n,o){this.scope.addDocument(n,o)},e.removeDocument=function(n){this.scope.removeDocument(n)},e}class Od{constructor(e,n,o,i){b(this,"options"),b(this,"_actions"),b(this,"target"),b(this,"events",new Hl),b(this,"_context"),b(this,"_win"),b(this,"_doc"),b(this,"_scopeEvents"),this._actions=n.actions,this.target=e,this._context=n.context||o,this._win=oe(Dr(e)?this._context:e),this._doc=this._win.document,this._scopeEvents=i,this.set(n)}get _defaults(){return{base:{},perAction:{},actions:{}}}setOnEvents(e,n){return x.func(n.onstart)&&this.on(`${e}start`,n.onstart),x.func(n.onmove)&&this.on(`${e}move`,n.onmove),x.func(n.onend)&&this.on(`${e}end`,n.onend),x.func(n.oninertiastart)&&this.on(`${e}inertiastart`,n.oninertiastart),this}updatePerActionListeners(e,n,o){(x.array(n)||x.object(n))&&this.off(e,n),(x.array(o)||x.object(o))&&this.on(e,o)}setPerAction(e,n){const o=this._defaults;for(const i in n){const r=i,s=this.options[e],l=n[r];r==="listeners"&&this.updatePerActionListeners(e,s.listeners,l),x.array(l)?s[r]=Wi(l):x.plainObject(l)?(s[r]=W(s[r]||{},qe(l)),x.object(o.perAction[r])&&"enabled"in o.perAction[r]&&(s[r].enabled=l.enabled!==!1)):x.bool(l)&&x.object(o.perAction[r])?s[r].enabled=l:s[r]=l}}getRect(e){return e=e||(x.element(this.target)?this.target:null),x.string(this.target)&&(e=e||this._context.querySelector(this.target)),$i(e)}rectChecker(e){return x.func(e)?(this.getRect=n=>{const o=W({},e.apply(this,n));return"width"in o||(o.width=o.right-o.left,o.height=o.bottom-o.top),o},this):e===null?(delete this.getRect,this):this.getRect}_backCompatOption(e,n){if(Dr(n)||x.object(n)){this.options[e]=n;for(const o in this._actions.map)this.options[o][e]=n;return this}return this.options[e]}origin(e){return this._backCompatOption("origin",e)}deltaSource(e){return e==="page"||e==="client"?(this.options.deltaSource=e,this):this.options.deltaSource}context(){return this._context}inContext(e){return this._context===e.ownerDocument||De(this._context,e)}testIgnoreAllow(e,n,o){return!this.testIgnore(e.ignoreFrom,n,o)&&this.testAllow(e.allowFrom,n,o)}testAllow(e,n,o){return e?x.element(o)?x.string(e)?ni(o,e,n):x.element(e)?De(e,o):!1:!1:!0}testIgnore(e,n,o){return!e||!x.element(o)?!1:x.string(e)?ni(o,e,n):x.element(e)?De(e,o):!1}fire(e){return this.events.fire(e),this}_onOff(e,n,o,i){x.object(n)&&!x.array(n)&&(i=o,o=null);const r=e==="on"?"add":"remove",s=Re(n,o);for(let l in s){l==="wheel"&&(l=Vt.wheelEvent);for(const c of s[l])hi(l,this._actions)?this.events[e](l,c):x.string(this.target)?this._scopeEvents[`${r}Delegate`](this.target,this._context,l,c,i):this._scopeEvents[r](this.target,l,c,i)}return this}on(e,n,o){return this._onOff("on",e,n,o)}off(e,n,o){return this._onOff("off",e,n,o)}set(e){const n=this._defaults;x.object(e)||(e={}),this.options=qe(n.base);for(const o in this._actions.methodDict){const i=o,r=this._actions.methodDict[i];this.options[i]={},this.setPerAction(i,W(W({},n.perAction),n.actions[i])),this[r](e[i])}for(const o in e)x.func(this[o])&&this[o](e[o]);return this}unset(){if(x.string(this.target))for(const e in this._scopeEvents.delegatedEvents){const n=this._scopeEvents.delegatedEvents[e];for(let o=n.length-1;o>=0;o--){const{selector:i,context:r,listeners:s}=n[o];i===this.target&&r===this._context&&n.splice(o,1);for(let l=s.length-1;l>=0;l--)this._scopeEvents.removeDelegate(this.target,this._context,e,s[l][0],s[l][1])}}else this._scopeEvents.remove(this.target,"all")}}class Id{constructor(e){b(this,"list",[]),b(this,"selectorMap",{}),b(this,"scope"),this.scope=e,e.addListeners({"interactable:unset":({interactable:n})=>{const{target:o,_context:i}=n,r=x.string(o)?this.selectorMap[o]:o[this.scope.id],s=On(r,l=>l.context===i);r[s]&&(r[s].context=null,r[s].interactable=null),r.splice(s,1)}})}new(e,n){n=W(n||{},{actions:this.scope.actions});const o=new this.scope.Interactable(e,n,this.scope.document,this.scope.events),i={context:o._context,interactable:o};return this.scope.addDocument(o._doc),this.list.push(o),x.string(e)?(this.selectorMap[e]||(this.selectorMap[e]=[]),this.selectorMap[e].push(i)):(o.target[this.scope.id]||Object.defineProperty(e,this.scope.id,{value:[],configurable:!0}),e[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:e,options:n,interactable:o,win:this.scope._win}),o}get(e,n){const o=n&&n.context||this.scope.document,i=x.string(e),r=i?this.selectorMap[e]:e[this.scope.id];if(!r)return null;const s=Jn(r,l=>l.context===o&&(i||l.interactable.inContext(e)));return s&&s.interactable}forEachMatch(e,n){for(const o of this.list){let i;if((x.string(o.target)?x.element(e)&&be(e,o.target):e===o.target)&&o.inContext(e)&&(i=n(o)),i!==void 0)return i}}}function Pd(t){var e;const n=[],o={},i=[],r={add:s,remove:l,addDelegate:c,removeDelegate:a,delegateListener:u,delegateUseCapture:d,delegatedEvents:o,documents:i,targets:n,supportsOptions:!1,supportsPassive:!1};(e=t.document)==null||e.createElement("div").addEventListener("test",null,{get capture(){return r.supportsOptions=!0},get passive(){return r.supportsPassive=!0}}),t.events=r;function s(h,g,w,D){const R=tn(D);let F=Jn(n,j=>j.eventTarget===h);F||(F={eventTarget:h,events:{}},n.push(F)),F.events[g]||(F.events[g]=[]),h.addEventListener&&!lf(F.events[g],w)&&(h.addEventListener(g,w,r.supportsOptions?R:R.capture),F.events[g].push(w))}function l(h,g,w,D){const R=tn(D),F=On(n,m=>m.eventTarget===h),j=n[F];if(!j||!j.events)return;if(g==="all"){for(g in j.events)j.events.hasOwnProperty(g)&&l(h,g,"all");return}let L=!1;const S=j.events[g];if(S){if(w==="all"){for(let m=S.length-1;m>=0;m--)l(h,g,S[m],R);return}else for(let m=0;mS.selector===h&&S.context===g);L||(L={selector:h,context:g,listeners:[]},j.push(L)),L.listeners.push([D,F])}function a(h,g,w,D,R){const F=tn(R),j=o[w];let L=!1,S;if(j)for(S=j.length-1;S>=0;S--){const m=j[S];if(m.selector===h&&m.context===g){const{listeners:N}=m;for(let A=N.length-1;A>=0;A--){const[G,{capture:lt,passive:K}]=N[A];if(G===D&<===F.capture&&K===F.passive){N.splice(A,1),N.length||(j.splice(S,1),l(g,w,u),l(g,w,d,!0)),L=!0;break}}if(L)break}}}function u(h,g){const w=tn(g),D=new Cd(h),R=o[h.type],[F]=El(h);let j=F;for(;x.element(j);){for(let L=0;L=2)continue;if(!n.interacting()&&t===n.pointerType)return n}return null}};function Kr(t,e){return t.pointers.some(({id:n})=>n===e)}const Ad=gi,kl=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function zd(t){const e={};for(const r of kl)e[r]=$l(r,t);const n=Vt.pEventTypes;let o;St.PointerEvent?o=[{type:n.down,listener:i},{type:n.down,listener:e.pointerDown},{type:n.move,listener:e.pointerMove},{type:n.up,listener:e.pointerUp},{type:n.cancel,listener:e.pointerUp}]:o=[{type:"mousedown",listener:e.pointerDown},{type:"mousemove",listener:e.pointerMove},{type:"mouseup",listener:e.pointerUp},{type:"touchstart",listener:i},{type:"touchstart",listener:e.pointerDown},{type:"touchmove",listener:e.pointerMove},{type:"touchend",listener:e.pointerUp},{type:"touchcancel",listener:e.pointerUp}],o.push({type:"blur",listener(r){for(const s of t.interactions.list)s.documentBlur(r)}}),t.prevTouchTime=0,t.Interaction=class extends ud{get pointerMoveTolerance(){return t.interactions.pointerMoveTolerance}set pointerMoveTolerance(r){t.interactions.pointerMoveTolerance=r}_now(){return t.now()}},t.interactions={list:[],new(r){r.scopeFire=(l,c)=>t.fire(l,c);const s=new t.Interaction(r);return t.interactions.list.push(s),s},listeners:e,docEvents:o,pointerMoveTolerance:1};function i(){for(const r of t.interactions.list)if(!(!r.pointerIsDown||r.pointerType!=="touch"||r._interacting))for(const s of r.pointers)t.documents.some(({doc:l})=>De(l,s.downTarget))||r.removePointer(s.pointer,s.event)}t.usePlugin(Dl)}function $l(t,e){return function(n){const o=e.interactions.list,i=_l(n),[r,s]=El(n),l=[];if(/^touch/.test(n.type)){e.prevTouchTime=e.now();for(const c of n.changedTouches){const a=c,u=xn(a),d={pointer:a,pointerId:u,pointerType:i,eventType:n.type,eventTarget:r,curEventTarget:s,scope:e},h=Xr(d);l.push([d.pointer,d.eventTarget,d.curEventTarget,h])}}else{let c=!1;if(!Vt.supportsPointerEvent&&/mouse/.test(n.type)){for(let a=0;aFo(t,"add"),"scope:remove-document":t=>Fo(t,"remove"),"interactable:unset":({interactable:t},e)=>{for(let n=e.interactions.list.length-1;n>=0;n--){const o=e.interactions.list[n];o.interactable===t&&(o.stop(),e.fire("interactions:destroy",{interaction:o}),o.destroy(),e.interactions.list.length>2&&e.interactions.list.splice(n,1))}}},onDocSignal:Fo,doOnInteractions:$l,methodNames:kl},Rd=Dd;class Fd{constructor(){b(this,"id",`__interact_scope_${Math.floor(Math.random()*100)}`),b(this,"isInitialized",!1),b(this,"listenerMaps",[]),b(this,"browser",Vt),b(this,"defaults",qe(Nl)),b(this,"Eventable",Hl),b(this,"actions",{map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}}),b(this,"interactStatic",Td(this)),b(this,"InteractEvent",Xi),b(this,"Interactable"),b(this,"interactables",new Id(this)),b(this,"_win"),b(this,"document"),b(this,"window"),b(this,"documents",[]),b(this,"_plugins",{list:[],map:{}}),b(this,"onWindowUnload",n=>this.removeDocument(n.target));const e=this;this.Interactable=class extends Od{get _defaults(){return e.defaults}set(n){return super.set(n),e.fire("interactable:set",{options:n,interactable:this}),this}unset(){super.unset();const n=e.interactables.list.indexOf(this);n<0||(e.interactables.list.splice(n,1),e.fire("interactable:unset",{interactable:this}))}}}addListeners(e,n){this.listenerMaps.push({id:n,map:e})}fire(e,n){for(const{map:{[e]:o}}of this.listenerMaps)if(o&&o(n,this,e)===!1)return!1}init(e){return this.isInitialized?this:Nd(this,e)}pluginIsInstalled(e){const{id:n}=e;return n?!!this._plugins.map[n]:this._plugins.list.indexOf(e)!==-1}usePlugin(e,n){if(!this.isInitialized)return this;if(this.pluginIsInstalled(e))return this;if(e.id&&(this._plugins.map[e.id]=e),this._plugins.list.push(e),e.install&&e.install(this,n),e.listeners&&e.before){let o=0;const i=this.listenerMaps.length,r=e.before.reduce((s,l)=>(s[l]=!0,s[qr(l)]=!0,s),{});for(;o{},kd=()=>{},$d=t=>{const e=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(([o,i])=>o in t||i in t),n=(o,i)=>{const{range:r,limits:s={left:-1/0,right:1/0,top:-1/0,bottom:1/0},offset:l={x:0,y:0}}=t,c={range:r,grid:t,x:null,y:null};for(const[a,u]of e){const d=Math.round((o-l.x)/t[a]),h=Math.round((i-l.y)/t[u]);c[a]=Math.max(s.left,Math.min(s.right,d*t[a]+l.x)),c[u]=Math.max(s.top,Math.min(s.bottom,h*t[u]+l.y))}return c};return n.grid=t,n.coordFields=e,n},Bd=Object.freeze(Object.defineProperty({__proto__:null,edgeTarget:Hd,elements:kd,grid:$d},Symbol.toStringTag,{value:"Module"})),Wd={id:"snappers",install(t){const{interactStatic:e}=t;e.snappers=W(e.snappers||{},Bd),e.createSnapGrid=e.snappers.grid}},Ud=Wd,Vd={start(t){const{state:e,rect:n,edges:o,pageCoords:i}=t;let{ratio:r,enabled:s}=e.options;const{equalDelta:l,modifiers:c}=e.options;r==="preserve"&&(r=n.width/n.height),e.startCoords=W({},i),e.startRect=W({},n),e.ratio=r,e.equalDelta=l;const a=e.linkedEdges={top:o.top||o.left&&!o.bottom,left:o.left||o.top&&!o.right,bottom:o.bottom||o.right&&!o.top,right:o.right||o.bottom&&!o.left};if(e.xIsPrimaryAxis=!!(o.left||o.right),e.equalDelta){const d=(a.left?1:-1)*(a.top?1:-1);e.edgeSign={x:d,y:d}}else e.edgeSign={x:a.left?-1:1,y:a.top?-1:1};if(s!==!1&&W(o,a),!(c!=null&&c.length))return;const u=new Ki(t.interaction);u.copyFrom(t.interaction.modification),u.prepareStates(c),e.subModification=u,u.startAll({...t})},set(t){const{state:e,rect:n,coords:o}=t,{linkedEdges:i}=e,r=W({},o),s=e.equalDelta?Kd:Xd;if(W(t.edges,i),s(e,e.xIsPrimaryAxis,o,n),!e.subModification)return null;const l=W({},n);bo(i,l,{x:o.x-r.x,y:o.y-r.y});const c=e.subModification.setAll({...t,rect:l,edges:i,pageCoords:o,prevCoords:o,prevRect:l}),{delta:a}=c;if(c.changed){const u=Math.abs(a.x)>Math.abs(a.y);s(e,u,c.coords,c.rect),W(o,c.coords)}return c.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Kd({startCoords:t,edgeSign:e},n,o){n?o.y=t.y+(o.x-t.x)*e.y:o.x=t.x+(o.y-t.y)*e.x}function Xd({startRect:t,startCoords:e,ratio:n,edgeSign:o},i,r,s){if(i){const l=s.width/n;r.y=e.y+(l-t.height)*o.y}else{const l=s.height*n;r.x=e.x+(l-t.width)*o.x}}const qd=we(Vd,"aspectRatio"),Wl=()=>{};Wl._defaults={};const Fn=Wl;function Yd({rect:t,startOffset:e,state:n,interaction:o,pageCoords:i}){const{options:r}=n,{elementRect:s}=r,l=W({left:0,top:0,right:0,bottom:0},r.offset||{});if(t&&s){const c=Fe(r.restriction,o,i);if(c){const a=c.right-c.left-t.width,u=c.bottom-c.top-t.height;a<0&&(l.left+=a,l.right+=a),u<0&&(l.top+=u,l.bottom+=u)}l.left+=e.left-t.width*s.left,l.top+=e.top-t.height*s.top,l.right+=e.right-t.width*(1-s.right),l.bottom+=e.bottom-t.height*(1-s.bottom)}n.offset=l}function Gd({coords:t,interaction:e,state:n}){const{options:o,offset:i}=n,r=Fe(o.restriction,e,t);if(!r)return;const s=Qu(r);t.x=Math.max(Math.min(s.right-i.right,t.x),s.left+i.left),t.y=Math.max(Math.min(s.bottom-i.bottom,t.y),s.top+i.top)}function Fe(t,e,n){return x.func(t)?bn(t,e.interactable,e.element,[n.x,n.y,e]):bn(t,e.interactable,e.element)}const Jd={restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1},Qn={start:Yd,set:Gd,defaults:Jd},Zd=we(Qn,"restrict"),Ul={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Vl={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Qd({interaction:t,startOffset:e,state:n}){const{options:o}=n;let i;if(o){const r=Fe(o.offset,t,t.coords.start.page);i=yo(r)}i=i||{x:0,y:0},n.offset={top:i.y+e.top,left:i.x+e.left,bottom:i.y-e.bottom,right:i.x-e.right}}function tp({coords:t,edges:e,interaction:n,state:o}){const{offset:i,options:r}=o;if(!e)return;const s=W({},t),l=Fe(r.inner,n,s)||{},c=Fe(r.outer,n,s)||{};Yr(l,Ul),Yr(c,Vl),e.top?t.y=Math.min(Math.max(c.top+i.top,s.y),l.top+i.top):e.bottom&&(t.y=Math.max(Math.min(c.bottom+i.bottom,s.y),l.bottom+i.bottom)),e.left?t.x=Math.min(Math.max(c.left+i.left,s.x),l.left+i.left):e.right&&(t.x=Math.max(Math.min(c.right+i.right,s.x),l.right+i.right))}function Yr(t,e){for(const n of["top","left","bottom","right"])n in t||(t[n]=e[n]);return t}const ep={inner:null,outer:null,offset:null,endOnly:!1,enabled:!1},dn={noInner:Ul,noOuter:Vl,start:Qd,set:tp,defaults:ep},np=we(dn,"restrictEdges"),op=W({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(t){}},Qn.defaults),ip={start:Qn.start,set:Qn.set,defaults:op},rp=we(ip,"restrictRect"),sp={width:-1/0,height:-1/0},lp={width:1/0,height:1/0};function ap(t){return dn.start(t)}function cp(t){const{interaction:e,state:n,rect:o,edges:i}=t,{options:r}=n;if(!i)return;const s=oi(Fe(r.min,e,t.coords))||sp,l=oi(Fe(r.max,e,t.coords))||lp;n.options={endOnly:r.endOnly,inner:W({},dn.noInner),outer:W({},dn.noOuter)},i.top?(n.options.inner.top=o.bottom-s.height,n.options.outer.top=o.bottom-l.height):i.bottom&&(n.options.inner.bottom=o.top+s.height,n.options.outer.bottom=o.top+l.height),i.left?(n.options.inner.left=o.right-s.width,n.options.outer.left=o.right-l.width):i.right&&(n.options.inner.right=o.left+s.width,n.options.outer.right=o.left+l.width),dn.set(t),n.options=r}const up={min:null,max:null,endOnly:!1,enabled:!1},fp={start:ap,set:cp,defaults:up},dp=we(fp,"restrictSize");function pp(t){const{interaction:e,interactable:n,element:o,rect:i,state:r,startOffset:s}=t,{options:l}=r,c=l.offsetWithOrigin?gp(t):{x:0,y:0};let a;if(l.offset==="startCoords")a={x:e.coords.start.page.x,y:e.coords.start.page.y};else{const d=bn(l.offset,n,o,[e]);a=yo(d)||{x:0,y:0},a.x+=c.x,a.y+=c.y}const{relativePoints:u}=l;r.offsets=i&&u&&u.length?u.map((d,h)=>({index:h,relativePoint:d,x:s.left-i.width*d.x+a.x,y:s.top-i.height*d.y+a.y})):[{index:0,relativePoint:null,x:a.x,y:a.y}]}function hp(t){const{interaction:e,coords:n,state:o}=t,{options:i,offsets:r}=o,s=Sn(e.interactable,e.element,e.prepared.name),l=W({},n),c=[];i.offsetWithOrigin||(l.x-=s.x,l.y-=s.y);for(const u of r){const d=l.x-u.x,h=l.y-u.y;for(let g=0,w=i.targets.length;g{Ap(t,e),pe(t,e)},"interactions:up":(t,e)=>{mi(t),pe(t,e),zp(t,e)},"interactions:cancel":(t,e)=>{mi(t),pe(t,e)}},PointerEvent:Kl,fire:pe,collectEventTargets:Xl,defaults:Ip,types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function pe(t,e){const{interaction:n,pointer:o,event:i,eventTarget:r,type:s,targets:l=Xl(t,e)}=t,c=new Kl(s,o,i,r,n,e.now());e.fire("pointerEvents:new",{pointerEvent:c});const a={interaction:n,pointer:o,event:i,eventTarget:r,targets:l,type:s,pointerEvent:c};for(let u=0;u{var d,h;return u.eventable.options.holdDuration===((d=t.pointers[s])==null||(h=d.hold)==null?void 0:h.duration)})),a.targets}function Pp({interaction:t}){t.prevTap=null,t.tapTime=0}function Cp({down:t,pointerInfo:e}){!t&&e.hold||(e.hold={duration:1/0,timeout:null})}function mi({interaction:t,pointerIndex:e}){const n=t.pointers[e].hold;n&&n.timeout&&(clearTimeout(n.timeout),n.timeout=null)}function Mp(t,e){const{interaction:n,pointer:o,event:i,eventTarget:r,duplicate:s}=t;!s&&(!n.pointerIsDown||n.pointerWasMoved)&&(n.pointerIsDown&&mi(t),pe({interaction:n,pointer:o,event:i,eventTarget:r,type:"move"},e))}function Ap({interaction:t,pointer:e,event:n,eventTarget:o,pointerIndex:i},r){const s=t.pointers[i].hold,l=ml(o),c={interaction:t,pointer:e,event:n,eventTarget:o,type:"hold",targets:[],path:l,node:null};for(const u of l)c.node=u,r.fire("pointerEvents:collect-targets",c);if(!c.targets.length)return;let a=1/0;for(const u of c.targets){const d=u.eventable.options.holdDuration;d{pe({interaction:t,eventTarget:o,pointer:e,event:n,type:"hold"},r)},a)}function zp({interaction:t,pointer:e,event:n,eventTarget:o},i){t.pointerWasMoved||pe({interaction:t,eventTarget:o,pointer:e,event:n,type:"tap"},i)}function Dp(t){t.pointerEvents=pn,t.defaults.actions.pointerEvents=pn.defaults,W(t.actions.phaselessTypes,pn.types)}const Rp=Object.freeze(Object.defineProperty({__proto__:null,default:pn},Symbol.toStringTag,{value:"Module"}));function Fp(t){t.usePlugin(pn);const{pointerEvents:e}=t;e.defaults.holdRepeatInterval=0,e.types.holdrepeat=t.actions.phaselessTypes.holdrepeat=!0}function Np({pointerEvent:t}){t.type==="hold"&&(t.count=(t.count||0)+1)}function Lp({interaction:t,pointerEvent:e,eventTarget:n,targets:o},i){if(e.type!=="hold"||!o.length)return;const r=o[0].eventable.options.holdRepeatInterval;r<=0||(t.holdIntervalHandle=setTimeout(()=>{i.pointerEvents.fire({interaction:t,eventTarget:n,type:"hold",pointer:e,event:e},i)},r))}function jp({interaction:t}){t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}const Hp={id:"pointer-events/holdRepeat",install:Fp,listeners:["move","up","cancel","endall"].reduce((t,e)=>(t[`pointerEvents:${e}`]=jp,t),{"pointerEvents:new":Np,"pointerEvents:fired":Lp})},kp=Hp;function $p(t){const{Interactable:e}=t;e.prototype.pointerEvents=Bp;const n=e.prototype._backCompatOption;e.prototype._backCompatOption=function(o,i){const r=n.call(this,o,i);return r===this&&(this.events.options[o]=i),r}}function Bp(t){return W(this.events.options,t),this}const Wp={id:"pointer-events/interactableTargets",install:$p,listeners:{"pointerEvents:collect-targets":({targets:t,node:e,type:n,eventTarget:o},i)=>{i.interactables.forEachMatch(e,r=>{const s=r.events,l=s.options;s.types[n]&&s.types[n].length&&r.testIgnoreAllow(l,e,o)&&t.push({node:e,eventable:s,props:{interactable:r}})})},"interactable:new":({interactable:t})=>{t.events.getRect=function(e){return t.getRect(e)}},"interactable:set":({interactable:t,options:e},n)=>{W(t.events.options,n.pointerEvents.defaults),W(t.events.options,e.pointerEvents||{})}}},Up=Wp,Vp={id:"pointer-events",install(t){t.usePlugin(Rp),t.usePlugin(kp),t.usePlugin(Up)}},Kp=Vp;function Xp(t){const{Interactable:e}=t;t.actions.phases.reflow=!0,e.prototype.reflow=function(n){return qp(this,n,t)}}function qp(t,e,n){const o=x.string(t.target)?Wi(t._context.querySelectorAll(t.target)):[t.target],i=n.window.Promise,r=i?[]:null;for(const s of o){const l=t.getRect(s);if(!l)break;const c=Jn(n.interactions.list,u=>u.interacting()&&u.interactable===t&&u.element===s&&u.prepared.name===e.name);let a;if(c)c.move(),r&&(a=c._reflowPromise||new i(u=>{c._reflowResolve=u}));else{const u=oi(l),d={page:{x:u.x,y:u.y},client:{x:u.x,y:u.y},timeStamp:n.now()},h=sf(d);a=Yp(n,t,s,e,h)}r&&r.push(a)}return r&&i.all(r).then(()=>t)}function Yp(t,e,n,o,i){const r=t.interactions.new({pointerType:"reflow"}),s={interaction:r,event:i,pointer:i,eventTarget:n,phase:"reflow"};r.interactable=e,r.element=n,r.prevEvent=i,r.updatePointer(i,i,n,!0),yl(r.coords.delta),Ui(r.prepared,o),r._doPhase(s);const{Promise:l}=t.window,c=l?new l(a=>{r._reflowResolve=a}):void 0;return r._reflowPromise=c,r.start(o,e,n),r._interacting?(r.move(s),r.end(i)):(r.stop(),r._reflowResolve()),r.removePointer(i,i),c}const Gp={id:"reflow",install:Xp,listeners:{"interactions:stop":({interaction:t},e)=>{t.pointerType==="reflow"&&(t._reflowResolve&&t._reflowResolve(),af(e.interactions.list,t))}}},Jp=Gp;Ft.use(Dl);Ft.use(jl);Ft.use(Kp);Ft.use(Sd);Ft.use(Op);Ft.use(qf);Ft.use(Tf);Ft.use(Cf);Ft.use(Jp);Ft.use(id);Ft.default=Ft;const vi=Symbol("INTERSECTION_OBSERVER_ID"),Gr="vue-resizable-handle",Zp=t=>!isNaN(t),Qp=t=>{const e=t.target.offsetParent||document.body,n=t.offsetParent===document.body?{left:0,top:0}:e.getBoundingClientRect(),o=t.clientX+e.scrollLeft-n.left,i=t.clientY+e.scrollTop-n.top;return{x:o,y:i}},Jr=(t,e,n,o)=>Zp(t)?{deltaX:n-t,deltaY:o-e,lastX:t,lastY:e,x:n,y:o}:{deltaX:0,deltaY:0,lastX:n,lastY:o,x:n,y:o},Zr=t=>Qp(t),yi=Di({__name:"GridItem",props:{breakpointCols:{},colNum:{},containerWidth:{},h:{},id:{},isDraggable:{type:Boolean},isResizable:{type:Boolean},lastBreakpoint:{},margin:{},maxRows:{},rowHeight:{},useCssTransforms:{type:Boolean},w:{},x:{},y:{},dragAllowFrom:{default:null},dragIgnoreFrom:{default:"a, button"},dragOption:{default:()=>({})},maxH:{default:1/0},maxW:{default:1/0},minH:{default:1},minW:{default:1},observer:{default:void 0},isStatic:{type:Boolean,default:!1}},emits:["noc-resize-container","noc-resize","noc-resize-end","noc-move","noc-move-end"],setup(t,{emit:e}){const n=t,o=e,i=yt(null),r=an(il),s=yt(n.colNum),l=yt(!1),c=yt({}),a=yt({h:n.h,w:n.w,x:n.x,y:n.y}),u=yt(null),d=yt(!1),h=yt(!1),g=yt({h:NaN,w:NaN,x:NaN,y:NaN}),w=yt({h:NaN,w:NaN,x:NaN,y:NaN}),D=yt(!1),R=yt(null),F=so({props:{}}),j=un(()=>({"css-transforms":n.useCssTransforms,"disable-user-select":d.value,"no-touch":L.value,resizing:h.value,static:n.isStatic,"vue-draggable-dragging":d.value,"vue-resizable":S.value})),L=un(()=>{const E=n.isDraggable||n.isResizable;return navigator.userAgent.toLowerCase().indexOf("android")!==-1&&E&&!n.isStatic}),S=un(()=>n.isResizable&&!n.isStatic);mt(()=>n.observer,()=>{n.observer&&i.value&&(n.observer.observe(i.value),i.value[vi]=n.id)}),mt(()=>s.value,()=>{bt(),K()}),mt(()=>n.containerWidth,()=>{bt(),K()}),mt(()=>n.h,E=>{a.value.h=E,K()}),mt(()=>n.isDraggable,()=>{gt()}),mt(()=>n.isResizable,()=>{bt()}),mt(()=>n.maxH,()=>{bt()}),mt(()=>n.maxW,()=>{bt()}),mt(()=>n.minH,()=>{bt()}),mt(()=>n.minW,()=>{bt()}),mt(()=>n.rowHeight,()=>{K()}),mt(()=>n.isStatic,()=>{bt(),gt()}),mt(()=>n.w,E=>{a.value.w=E,lt()}),mt(()=>n.x,E=>{a.value.x=E,lt()}),mt(()=>n.y,E=>{a.value.y=E,lt()});const m=()=>{const[E]=on(n.margin);return(n.containerWidth-E*(s.value+1))/s.value},N=({x:E,y:C,w:M,h:V})=>{const ct=m(),ut=([Q,dt])=>({height:V===1/0?V:Math.round(n.rowHeight*V+Math.max(0,V-1)*Q),left:Math.floor(ct*E+(E+1)*dt),top:Math.round(n.rowHeight*C+(C+1)*Q),width:M===1/0?M:Math.round(ct*M+Math.max(0,M-1)*dt)}),k=on(n.margin);return ut(k)},A=(E,C)=>{const M=m(),[V,ct]=on(n.margin),ut=Math.round((C+V)/(M+V)),k=Math.round((E+ct)/(n.rowHeight+ct));return{h:Math.max(Math.min(k,n.maxRows-a.value.y),0),w:Math.max(Math.min(ut,s.value-a.value.x),0)}},G=(E,C)=>{const M=m(),[V,ct]=on(n.margin),ut=Math.round((C-V)/(M+V)),k=Math.round((E-ct)/(n.rowHeight+ct));return{x:Math.max(Math.min(ut,s.value-a.value.w),0),y:Math.max(Math.min(k,n.maxRows-a.value.h),0)}},lt=()=>{var E,C;const M=N({h:a.value.h,w:a.value.w,x:a.value.x,y:a.value.y});n.x+n.w>s.value?(a.value.x=0,a.value.w=n.w>s.value?s.value:n.w):(a.value.x=n.x,a.value.w=n.w),d.value&&(M.top=c.value.top??0,M.left=c.value.left??0),h.value&&(M.width=((E=R==null?void 0:R.value)==null?void 0:E.width)??0,M.height=((C=R==null?void 0:R.value)==null?void 0:C.height)??0),console.log(n.id),F.props=n.useCssTransforms?Ru(M.top,M.left,M.width,M.height):Du(M.top,M.left,M.width,M.height)},K=()=>{lt();const E={};for(const C of["width","height"]){const M=F.props[C],V=M==null?void 0:M.toString().match(/^(\d+)px$/);if(!V)return;E[C]=+V[1]}o("noc-resize-container",{h:n.h,height:E.height,id:n.id,w:n.w,width:E.width})},ot=E=>{var C,M;if(n.isStatic||h.value)return;const V=Zr(E);if(!V)return;const{x:ct,y:ut}=V,k={left:0,top:0};switch(E.type){case"dragstart":{w.value.x=a.value.x,w.value.y=a.value.y;const dt=E.target.offsetParent.getBoundingClientRect(),xt=E.target.getBoundingClientRect();k.left=xt.left-dt.left,k.top=xt.top-dt.top,c.value=k,d.value=!0;break}case"dragend":{if(!d.value)return;const dt=E.target.offsetParent.getBoundingClientRect(),xt=E.target.getBoundingClientRect();k.left=xt.left-dt.left,k.top=xt.top-dt.top,c.value={},d.value=!1;break}case"dragmove":{const dt=Jr(g.value.x,g.value.y,ct,ut);k.left=(((C=c==null?void 0:c.value)==null?void 0:C.left)??0)+dt.deltaX,k.top=(((M=c==null?void 0:c.value)==null?void 0:M.top)??0)+dt.deltaY,c.value=k;break}}const Q=G(k.top,k.left);g.value.x=ct,g.value.y=ut,(a.value.x!==Q.x||a.value.y!==Q.y)&&o("noc-move",{id:n.id,x:Q.x,y:Q.y}),E.type==="dragend"&&(w.value.x!==a.value.x||w.value.y!==a.value.y)&&o("noc-move-end",{id:n.id,x:Q.x,y:Q.y}),r==null||r.emit("drag-event",[E.type,n.id,Q.x,Q.y,a.value.h,a.value.w])},J=E=>{var C,M;if(n.isStatic)return;const V=Zr(E);if(!V)return;const{x:ct,y:ut}=V,k={height:0,width:0};switch(E.type){case"resizestart":{w.value.w=a.value.w,w.value.h=a.value.h;const{height:dt,width:xt}=N({h:a.value.h,w:a.value.w,x:a.value.x,y:a.value.y});k.width=xt,k.height=dt,R.value=k,h.value=!0;break}case"resizemove":{const dt=Jr(g.value.x,g.value.h,ct,ut);k.width=(((C=R==null?void 0:R.value)==null?void 0:C.width)??0)+dt.deltaX,k.height=(((M=R==null?void 0:R.value)==null?void 0:M.height)??0)+dt.deltaY,R.value=k,h.value=!0;break}case"resizeend":{const{height:dt,width:xt}=N({h:a.value.h,w:a.value.w,x:a.value.x,y:a.value.y});k.width=xt,k.height=dt,R.value=null,h.value=!1;break}}const Q=A(k.height,k.width);Q.wn.maxW&&(Q.w=n.maxW),Q.hn.maxH&&(Q.h=n.maxH),Q.h<1&&(Q.h=1),Q.w<1&&(Q.w=1),g.value.x=ct,g.value.h=ut,(a.value.w!==Q.w||a.value.h!==Q.h)&&o("noc-resize",{h:Q.h,height:k.height,id:n.id,w:Q.w,width:k.width}),E.type==="resizeend"&&(w.value.w!==a.value.w||w.value.h!==a.value.h)&&o("noc-resize-end",{h:Q.h,height:k.height,id:n.id,w:Q.w,width:k.width}),r==null||r.emit("resize-event",[E.type,n.id,a.value.x,a.value.y,Q.h,Q.w])},it=E=>{s.value=E},gt=()=>{!u.value&&i.value&&(u.value=Ft(i.value)),n.isDraggable&&!n.isStatic?(u.value.draggable({allowFrom:n.dragAllowFrom,ignoreFrom:n.dragIgnoreFrom,...n.dragOption}),l.value||(l.value=!0,u.value.on("dragstart dragmove dragend",ot))):u.value.draggable({enabled:!1})},bt=()=>{if(!u.value&&i.value&&(u.value=Ft(i.value)),n.isResizable&&!n.isStatic){const E=`.${Fu(Gr," ",".")}`,C=N({h:n.maxH,w:n.maxW,x:0,y:0}),M=N({h:n.minH,w:n.minW,x:0,y:0}),V={edges:{bottom:E,left:!1,right:E,top:!1},ignoreFrom:"a, button",restrictSize:{max:{height:C.height,width:C.width},min:{height:M.height,width:M.width}}};u.value.resizable(V),D.value||(D.value=!0,u.value.on("resizestart resizemove resizeend",J))}else u.value.resizable({enabled:!1})};return r==null||r.on("recalculate-styles",lt),r==null||r.on("set-col-num",it),Fi(()=>{r==null||r.off("recalculate-styles",lt),r==null||r.off("set-col-num",it),u.value&&u.value.unset(),n.observer&&i.value!==null&&n.observer.unobserve(i.value)}),Ri(()=>{n.lastBreakpoint&&(s.value=ti(n.lastBreakpoint,n.breakpointCols)),bt(),gt(),lt()}),(E,C)=>(me(),Kn("div",{ref_key:"item",ref:i,class:hn(["vue-grid-item",j.value]),style:_n(F.props)},[Wo(E.$slots,"default"),S.value?(me(),Kn("span",{key:0,class:hn(Bn(Gr))},null,2)):kc("",!0)],6))}});function th(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ql={exports:{}},eh=ql.exports={};eh.forEach=function(t,e){for(var n=0;n";while(s[0]);return i>4?i:o}();return t===n};Jl.isLegacyOpera=function(){return!!window.opera};var Zl=Gl.exports,Ql={exports:{}},lh=Ql.exports={};lh.getOption=ah;function ah(t,e,n){var o=t[e];return o==null&&n!==void 0?n:o}var ch=Ql.exports,Qr=ch,uh=function(t){t=t||{};var e=t.reporter,n=Qr.getOption(t,"async",!0),o=Qr.getOption(t,"auto",!0);o&&!n&&(e&&e.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var i=ts(),r,s=!1;function l(g,w){!s&&o&&n&&i.size()===0&&u(),i.add(g,w)}function c(){for(s=!0;i.size();){var g=i;i=ts(),g.process()}s=!1}function a(g){s||(g===void 0&&(g=n),r&&(d(r),r=null),g?u():c())}function u(){r=h(c)}function d(g){var w=clearTimeout;return w(g)}function h(g){var w=function(D){return setTimeout(D,0)};return w(g)}return{add:l,force:a}};function ts(){var t={},e=0,n=0,o=0;function i(l,c){c||(c=l,l=0),l>n?n=l:l div::-webkit-scrollbar { "+a(["display: none"])+` } + +`,K+="."+lt+" { "+a(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+G,"animation-name: "+G])+` } +`,K+="@-webkit-keyframes "+G+` { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } } +`,K+="@keyframes "+G+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",A(K)}}function h(S){S.className+=" "+l+"_animation_active"}function g(S,m,N){if(S.addEventListener)S.addEventListener(m,N);else if(S.attachEvent)S.attachEvent("on"+m,N);else return e.error("[scroll] Don't know how to add event listeners.")}function w(S,m,N){if(S.removeEventListener)S.removeEventListener(m,N);else if(S.detachEvent)S.detachEvent("on"+m,N);else return e.error("[scroll] Don't know how to remove event listeners.")}function D(S){return o(S).container.childNodes[0].childNodes[0].childNodes[0]}function R(S){return o(S).container.childNodes[0].childNodes[0].childNodes[1]}function F(S,m){var N=o(S).listeners;if(!N.push)throw new Error("Cannot add listener to an element that is not detectable.");o(S).listeners.push(m)}function j(S,m,N){N||(N=m,m=S,S=null),S=S||{};function A(){if(S.debug){var $=Array.prototype.slice.call(arguments);if($.unshift(i.get(m),"Scroll: "),e.log.apply)e.log.apply(null,$);else for(var nt=0;nt<$.length;nt++)e.log($[nt])}}function G($){function nt(ft){var At=ft.getRootNode&&ft.getRootNode().contains(ft);return ft===ft.ownerDocument.body||ft.ownerDocument.body.contains(ft)||At}return!nt($)||window.getComputedStyle($)===null}function lt($){var nt=o($).container.childNodes[0],ft=window.getComputedStyle(nt);return!ft.width||ft.width.indexOf("px")===-1}function K(){var $=window.getComputedStyle(m),nt={};return nt.position=$.position,nt.width=m.offsetWidth,nt.height=m.offsetHeight,nt.top=$.top,nt.right=$.right,nt.bottom=$.bottom,nt.left=$.left,nt.widthCSS=$.width,nt.heightCSS=$.height,nt}function ot(){var $=K();o(m).startSize={width:$.width,height:$.height},A("Element start size",o(m).startSize)}function J(){o(m).listeners=[]}function it(){if(A("storeStyle invoked."),!o(m)){A("Aborting because element has been uninstalled");return}var $=K();o(m).style=$}function gt($,nt,ft){o($).lastWidth=nt,o($).lastHeight=ft}function bt($){return D($).childNodes[0]}function E(){return 2*r.width+1}function C(){return 2*r.height+1}function M($){return $+10+E()}function V($){return $+10+C()}function ct($){return $*2+E()}function ut($){return $*2+C()}function k($,nt,ft){var At=D($),f=R($),p=M(nt),v=V(ft),_=ct(nt),y=ut(ft);At.scrollLeft=p,At.scrollTop=v,f.scrollLeft=_,f.scrollTop=y}function Q(){var $=o(m).container;if(!$){$=document.createElement("div"),$.className=l,$.style.cssText=a(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),o(m).container=$,h($),m.appendChild($);var nt=function(){o(m).onRendered&&o(m).onRendered()};g($,"animationstart",nt),o(m).onAnimationStart=nt}return $}function dt(){function $(){var q=o(m).style;if(q.position==="static"){m.style.setProperty("position","relative",S.important?"important":"");var rt=function(pt,wt,re,_e){function Ee(Ct){return Ct.replace(/[^-\d\.]/g,"")}var He=re[_e];He!=="auto"&&Ee(He)!=="0"&&(pt.warn("An element that is positioned static has style."+_e+"="+He+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+_e+" will be set to 0. Element: ",wt),wt.style[_e]=0)};rt(e,m,q,"top"),rt(e,m,q,"right"),rt(e,m,q,"bottom"),rt(e,m,q,"left")}}function nt(q,rt,pt,wt){return q=q?q+"px":"0",rt=rt?rt+"px":"0",pt=pt?pt+"px":"0",wt=wt?wt+"px":"0",["left: "+q,"top: "+rt,"right: "+wt,"bottom: "+pt]}if(A("Injecting elements"),!o(m)){A("Aborting because element has been uninstalled");return}$();var ft=o(m).container;ft||(ft=Q());var At=r.width,f=r.height,p=a(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),v=a(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(nt(-(1+At),-(1+f),-f,-At))),_=a(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),y=a(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),O=a(["position: absolute","left: 0","top: 0"]),z=a(["position: absolute","width: 200%","height: 200%"]),I=document.createElement("div"),P=document.createElement("div"),T=document.createElement("div"),H=document.createElement("div"),U=document.createElement("div"),B=document.createElement("div");I.dir="ltr",I.style.cssText=p,I.className=l,P.className=l,P.style.cssText=v,T.style.cssText=_,H.style.cssText=O,U.style.cssText=y,B.style.cssText=z,T.appendChild(H),U.appendChild(B),P.appendChild(T),P.appendChild(U),I.appendChild(P),ft.appendChild(I);function X(){var q=o(m);q&&q.onExpand?q.onExpand():A("Aborting expand scroll handler: element has been uninstalled")}function et(){var q=o(m);q&&q.onShrink?q.onShrink():A("Aborting shrink scroll handler: element has been uninstalled")}g(T,"scroll",X),g(U,"scroll",et),o(m).onExpandScroll=X,o(m).onShrinkScroll=et}function xt(){function $(_,y,O){var z=bt(_),I=M(y),P=V(O);z.style.setProperty("width",I+"px",S.important?"important":""),z.style.setProperty("height",P+"px",S.important?"important":"")}function nt(_){var y=m.offsetWidth,O=m.offsetHeight,z=y!==o(m).lastWidth||O!==o(m).lastHeight;A("Storing current size",y,O),gt(m,y,O),n.add(0,function(){if(z){if(!o(m)){A("Aborting because element has been uninstalled");return}if(!ft()){A("Aborting because element container has not been initialized");return}if(S.debug){var I=m.offsetWidth,P=m.offsetHeight;(I!==y||P!==O)&&e.warn(i.get(m),"Scroll: Size changed before updating detector elements.")}$(m,y,O)}}),n.add(1,function(){if(!o(m)){A("Aborting because element has been uninstalled");return}if(!ft()){A("Aborting because element container has not been initialized");return}k(m,y,O)}),z&&_&&n.add(2,function(){if(!o(m)){A("Aborting because element has been uninstalled");return}if(!ft()){A("Aborting because element container has not been initialized");return}_()})}function ft(){return!!o(m).container}function At(){function _(){return o(m).lastNotifiedWidth===void 0}A("notifyListenersIfNeeded invoked");var y=o(m);if(_()&&y.lastWidth===y.startSize.width&&y.lastHeight===y.startSize.height)return A("Not notifying: Size is the same as the start size, and there has been no notification yet.");if(y.lastWidth===y.lastNotifiedWidth&&y.lastHeight===y.lastNotifiedHeight)return A("Not notifying: Size already notified");A("Current size not notified, notifying..."),y.lastNotifiedWidth=y.lastWidth,y.lastNotifiedHeight=y.lastHeight,gh(o(m).listeners,function(O){O(m)})}function f(){if(A("startanimation triggered."),lt(m)){A("Ignoring since element is still unrendered...");return}A("Element rendered.");var _=D(m),y=R(m);(_.scrollLeft===0||_.scrollTop===0||y.scrollLeft===0||y.scrollTop===0)&&(A("Scrollbars out of sync. Updating detector elements..."),nt(At))}function p(){if(A("Scroll detected."),lt(m)){A("Scroll event fired while unrendered. Ignoring...");return}nt(At)}if(A("registerListenersAndPositionElements invoked."),!o(m)){A("Aborting because element has been uninstalled");return}o(m).onRendered=f,o(m).onExpand=p,o(m).onShrink=p;var v=o(m).style;$(m,v.width,v.height)}function Ot(){if(A("finalizeDomMutation invoked."),!o(m)){A("Aborting because element has been uninstalled");return}var $=o(m).style;gt(m,$.width,$.height),k(m,$.width,$.height)}function kt(){N(m)}function je(){A("Installing..."),J(),ot(),n.add(0,it),n.add(1,dt),n.add(2,xt),n.add(3,Ot),n.add(4,kt)}A("Making detectable..."),G(m)?(A("Element is detached"),Q(),A("Waiting until element is attached..."),o(m).onRendered=function(){A("Element is now attached"),je()}):je()}function L(S){var m=o(S);m&&(m.onExpandScroll&&w(D(S),"scroll",m.onExpandScroll),m.onShrinkScroll&&w(R(S),"scroll",m.onShrinkScroll),m.onAnimationStart&&w(m.container,"animationstart",m.onAnimationStart),m.container&&S.removeChild(m.container))}return{makeDetectable:j,addListener:F,uninstall:L,initDocument:c}},rn=Yl.forEach,vh=nh,yh=oh,bh=ih,xh=rh,wh=sh,es=Zl,_h=uh,le=ph,Eh=hh,Sh=mh;function ns(t){return Array.isArray(t)||t.length!==void 0}function os(t){if(Array.isArray(t))return t;var e=[];return rn(t,function(n){e.push(n)}),e}function is(t){return t&&t.nodeType===1}var Th=function(t){t=t||{};var e;if(t.idHandler)e={get:function(j){return t.idHandler.get(j,!0)},set:t.idHandler.set};else{var n=bh(),o=xh({idGenerator:n,stateHandler:le});e=o}var i=t.reporter;if(!i){var r=i===!1;i=wh(r)}var s=ae(t,"batchProcessor",_h({reporter:i})),l={};l.callOnAdd=!!ae(t,"callOnAdd",!0),l.debug=!!ae(t,"debug",!1);var c=yh(e),a=vh({stateHandler:le}),u,d=ae(t,"strategy","object"),h=ae(t,"important",!1),g={reporter:i,batchProcessor:s,stateHandler:le,idHandler:e,important:h};if(d==="scroll"&&(es.isLegacyOpera()?(i.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),d="object"):es.isIE(9)&&(i.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),d="object")),d==="scroll")u=Sh(g);else if(d==="object")u=Eh(g);else throw new Error("Invalid strategy name: "+d);var w={};function D(j,L,S){function m(ot){var J=c.get(ot);rn(J,function(it){it(ot)})}function N(ot,J,it){c.add(J,it),ot&&it(J)}if(S||(S=L,L=j,j={}),!L)throw new Error("At least one element required.");if(!S)throw new Error("Listener required.");if(is(L))L=[L];else if(ns(L))L=os(L);else return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");var A=0,G=ae(j,"callOnAdd",l.callOnAdd),lt=ae(j,"onReady",function(){}),K=ae(j,"debug",l.debug);rn(L,function(ot){le.getState(ot)||(le.initState(ot),e.set(ot));var J=e.get(ot);if(K&&i.log("Attaching listener to element",J,ot),!a.isDetectable(ot)){if(K&&i.log(J,"Not detectable."),a.isBusy(ot)){K&&i.log(J,"System busy making it detectable"),N(G,ot,S),w[J]=w[J]||[],w[J].push(function(){A++,A===L.length&<()});return}return K&&i.log(J,"Making detectable..."),a.markBusy(ot,!0),u.makeDetectable({debug:K,important:h},ot,function(it){if(K&&i.log(J,"onElementDetectable"),le.getState(it)){a.markAsDetectable(it),a.markBusy(it,!1),u.addListener(it,m),N(G,it,S);var gt=le.getState(it);if(gt&>.startSize){var bt=it.offsetWidth,E=it.offsetHeight;(gt.startSize.width!==bt||gt.startSize.height!==E)&&m(it)}w[J]&&rn(w[J],function(C){C()})}else K&&i.log(J,"Element uninstalled before being detectable.");delete w[J],A++,A===L.length&<()})}K&&i.log(J,"Already detecable, adding listener."),N(G,ot,S),A++}),A===L.length&<()}function R(j){if(!j)return i.error("At least one element is required.");if(is(j))j=[j];else if(ns(j))j=os(j);else return i.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");rn(j,function(L){c.removeAllListeners(L),u.uninstall(L),le.cleanState(L)})}function F(j){u.initDocument&&u.initDocument(j)}return{listenTo:D,removeListener:c.removeListener,removeAllListeners:c.removeAllListeners,uninstall:R,initDocument:F}};function ae(t,e,n){var o=t[e];return o==null&&n!==void 0?n:o}const Oh=th(Th);function Ih(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o?o.push(n):t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&(n?o.splice(o.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var o=t.get(e);o&&o.slice().map(function(i){i(n)}),(o=t.get("*"))&&o.slice().map(function(i){i(e,n)})}}}const ea=()=>typeof window<"u",Ph=(t,e)=>{if(!ea)return e();window.addEventListener(t,e)},Ch=(t,e)=>{ea&&window.removeEventListener(t,e)},Mh=Di({__name:"GridLayout",props:{colNum:{},layout:{},autoSize:{type:Boolean,default:!0},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},horizontalShift:{type:Boolean,default:!1},intersectionObserverConfig:{default:()=>({root:null,rootMargin:"8px",threshold:.4})},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},margin:{default:()=>[10]},maxRows:{default:1/0},preventCollision:{type:Boolean,default:!1},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},rowHeight:{default:150},useCssTransforms:{type:Boolean,default:!0},useObserver:{type:Boolean,default:!1},verticalCompact:{type:Boolean,default:!0}},emits:["noc-resize-container","noc-layout-before-mount","noc-layout-create","noc-layout-mount","noc-layout-ready","noc-layout-update","update:layout","update:breakpoints","noc-intersection-observe","noc-intersection-unobserve","noc-item-move","noc-item-move-end","noc-item-resize","noc-item-resize-end"],setup(t,{emit:e}){const n=t,o=e,i=Ih();Vs(il,i);const r=["minW","minH","maxW","maxH","moved","static","isDraggable","isResizable","isBounded","dragIgnoreFrom","dragAllowFrom","resizeIgnoreFrom","preserveAspectRatio","dragOption","resizeOption"],s={h:0,id:-1,w:0,x:0,y:0},l=yt(Oh({callOnAdd:!1,strategy:"scroll"})),c=yt(!1),a=yt(""),u=yt(0),d=yt({}),h=yt({}),g=yt(n.layout),w=yt({h:0,id:-1,w:0,x:0,y:0}),D=yt(0);let R;const F=yt(null),j=un(()=>({breakpointCols:n.cols,colNum:n.colNum,containerWidth:D.value,isDraggable:n.isDraggable,isResizable:n.isResizable,lastBreakpoint:a.value,margin:n.margin,maxRows:n.maxRows,responsive:n.responsive,rowHeight:n.rowHeight,useCssTransforms:n.useCssTransforms,width:D.value}));mt(()=>n.colNum,E=>{i.emit("set-col-num",E)}),mt(()=>n.layout.length,()=>{m(),Ie(n.layout,n.verticalCompact)}),mt(()=>n.margin,()=>{G()}),mt(()=>n.responsive,E=>{E||(o("update:layout",g.value),i.emit("set-col-num",n.colNum)),K()}),mt(()=>D.value,(E,C)=>{Zt(()=>{C===0&&Zt(()=>{o("noc-layout-ready",n.layout)}),n.responsive&&ot(),G()})}),mt(()=>n.useObserver,E=>{if(!E){R.disconnect();return}bt()});const L=E=>{const C={observe:[],unobserve:[]};E.forEach(({target:M,isIntersecting:V})=>{if(V){C.observe.push(M[vi]);return}C.unobserve.push(M[vi])}),o("noc-intersection-observe",C.observe),o("noc-intersection-unobserve",C.unobserve)},S=E=>{const C=Object.keys(s);return Object.keys(E).reduce((M,V)=>((r.includes(V)||C.includes(V))&&(M[V]=E[V]),M),{})},m=()=>{if(n.layout&&g.value){if(n.layout.length!==g.value.length){const E=N(n.layout,g.value);E.length>0&&(n.layout.length>g.value.length?g.value=g.value.concat(E):g.value=g.value.filter(C=>!E.some(M=>C.id===M.id))),u.value=n.layout.length,A()}Ie(n.layout,n.verticalCompact),G(),o("noc-layout-update",n.layout),i.emit("recalculate-styles")}},N=(E,C)=>{const M=E.filter(ct=>!C.some(ut=>ct.id===ut.id)),V=C.filter(ct=>!E.some(ut=>ct.id===ut.id));return M.concat(V)},A=()=>{d.value=Object.assign({},n.responsiveLayouts)},G=()=>{const E=lt();h.value={height:E}},lt=()=>{if(!n.autoSize||!n.layout)return;const[,E]=on(n.margin);return`${Cu(n.layout)*(n.rowHeight+E)+E}px`},K=()=>{F.value&&(D.value=F.value.offsetWidth)},ot=()=>{const E=Lu(n.breakpoints,D.value),C=ti(E,n.cols);a.value&&!d.value[a.value]&&(d.value[a.value]=Zo(n.layout));const M=Nu(g.value,d.value,n.breakpoints,E,a.value,C,n.verticalCompact);d.value[E]=M,a.value!==E&&o("update:breakpoints",E),a.value=E,o("update:layout",M),i.emit("set-col-num",ti(E,n.cols))},J=()=>{o("noc-layout-create",n.layout),i.on("resize-event",it),i.on("drag-event",gt)},it=([E,C,M,V,ct,ut])=>{const k=Pr(n.layout,C)??{...s};let Q;if(n.preventCollision){const dt=sl(n.layout,{...k,h:ct,w:ut}).filter(xt=>xt.id!==k.id);if(Q=dt.length>0,Q){let xt=1/0,Ot=1/0;dt.forEach(kt=>{kt.x>k.x&&(xt=Math.min(xt,kt.x)),kt.y>k.y&&(Ot=Math.min(Ot,kt.y))}),Number.isFinite(xt)&&(k.w=xt-k.x),Number.isFinite(Ot)&&(k.h=Ot-k.y)}}Q||(k.w=ut,k.h=ct),E==="resizestart"||E==="resizemove"?(w.value.id=+C,w.value.x=M,w.value.y=V,w.value.w=k.w,w.value.h=k.h,Zt(()=>{c.value=!0})):Zt(()=>{c.value=!1}),n.responsive&&ot(),Ie(n.layout,n.verticalCompact),i.emit("recalculate-styles"),G(),E==="resizeend"&&o("noc-layout-update",n.layout)},gt=([E,C,M,V,ct,ut])=>{const k=Pr(n.layout,C)??{...s};E==="dragmove"||E==="dragstart"?(w.value.id=+C,w.value.x=k.x,w.value.y=k.y,w.value.w=ut,w.value.h=ct,Zt(()=>{c.value=!0})):Zt(()=>{c.value=!1}),o("update:layout",Qo(n.layout,k,M,V,!0,n.horizontalShift,n.preventCollision)),Ie(n.layout,n.verticalCompact),i.emit("recalculate-styles"),G(),E==="dragend"&&(Ie(n.layout,n.verticalCompact),o("noc-layout-update",n.layout))},bt=()=>{R=new IntersectionObserver(L,{root:null,rootMargin:"8px",threshold:.4,...n.intersectionObserverConfig})};return J(),Fi(()=>{Ch("resize",K),l.value&&F.value&&l.value.uninstall(F.value),i.off("resize-event",it),i.off("drag-event",gt)}),ks(()=>{o("noc-layout-before-mount",n.layout)}),Ri(()=>{o("noc-layout-mount",n.layout),Zt(()=>{g.value=n.layout,Zt(()=>{K(),A(),Ph("resize",K.bind(this)),Ie(n.layout,n.verticalCompact),o("noc-layout-update",n.layout),G(),F.value&&l.value.listenTo(F.value,K),n.useObserver&&bt()})})}),(E,C)=>(me(),Kn("div",null,[ho("div",{ref_key:"wrapper",ref:F,class:"vue-grid-layout",style:_n(h.value)},[lc(Ut(yi,Yo({class:"vue-grid-placeholder"},{...j.value,...w.value}),null,16),[[nu,c.value]]),Wo(E.$slots,"default",{gridItemProps:{...j.value,observer:Bn(R)}},()=>[(me(!0),Kn(jt,null,vc(E.layout,M=>(me(),fo(yi,Yo({key:M.id},{...j.value,...S(M)},{observer:Bn(R),onNocResizeContainer:C[0]||(C[0]=V=>o("noc-resize-container",V)),onNocResizeEnd:C[1]||(C[1]=V=>o("noc-item-resize-end",V)),onNocResize:C[2]||(C[2]=V=>o("noc-item-resize",V)),onNocMove:C[3]||(C[3]=V=>o("noc-item-move",V)),onNocMoveEnd:C[4]||(C[4]=V=>o("noc-item-move-end",V))}),{default:zi(()=>[Wo(E.$slots,"gridItemContent",{item:M})]),_:2},1040,["observer"]))),128))])],4)]))}});function Ah(t){t.component("GridLayout",Mh),t.component("GridItem",yi)}const zh={install:Ah},na=xu(Ou);na.use(zh);na.mount("#app"); diff --git a/index.html b/index.html new file mode 100644 index 0000000..8493576 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ + + + + + + @noction/vue-draggable-grid Playground + + + + +
+ +