iobroker.javascript
Version:
Rules Engine for ioBroker
91 lines (78 loc) • 1.2 MB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DFZipply.js","./createSvgIcon-DPvF8xqu.js","./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js","./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js","./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js","./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js","./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js","./index-C49cpVll.js","./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-D-eF6r8M.js","./preload-helper-BDBacUwf.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js","./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js","./inheritsLoose-B0Ba5G9z.js","./index-BCK6q-N6.css","./index-BVPl8hv0.js","./ScriptEditorVanillaMonaco-DSYvOslZ.js","./ScriptEditor-C-fO5h68.js","./Save-Cld9qv9i.js","./OpenAiDialog-rhLuRLIM.js","./index-gIA8x-8f.js"])))=>i.map(i=>d[i]);
import{d as Xy}from"./virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-D-eF6r8M.js";import{j as g,c as ht,g as Cw,r as Tw,_ as Tg,i as Zy}from"./createSvgIcon-DPvF8xqu.js";import{r as Ek}from"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs_commonjs-proxy-RQRRZMX5.js";import{a as Y,_ as Ik,b as Bo,c as Mt,d as xk,e as kw,f as kg,g as rm,h as am,i as lm,j as vt,k as _n,l as rs,m as Xr,n as Sw,o as Sg,p as Dk,q as Ak,r as Ew,s as Rk,t as pn}from"./iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js";import{_ as Gt,a as as,b as Vt,c as vo,d as _i,e as Eg,f as wi,g as Ge,h as Kt,i as De,j as Yl,k as Jl,l as ql,m as Xl,n as Zl,o as Me,p as Iw,q as $i,r as Ig,s as Qy,t as xg,u as Dg,v as Dn,w as xw,x as Ok,y as cm,z as $t,A as Mk,B as e_,C as Nk,D as Yp,E as bc,F as Lk,G as Pk,H as Bk,I as jk,J as Dw,K as Fk,L as zk,M as t_,N as gn,O as Uk,P as Hk,Q as Wk,R as Gk,S as Vk,T as Aw,U as Kk,V as Ag,W as Rw,X as Yk}from"./iobroker_javascript__loadShare___mf_0_mui_mf_1_material__loadShare__.mjs-QWG5Arqe.js";import{_ as b}from"./iobroker_javascript__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__.mjs-DkBjPSMw.js";import{I as zo,a as qs,b as dc,C as Jk,c as Ow,F as qk,d as Xk,e as vc,f as Rg,g as Zk,h as Qk,i as eS,j as tS,M as sS,k as oS,l as iS,m as nS,_ as rS,n as Ql,o as aS,p as lS,q as ec,r as s_,s as cS,t as uS,u as dS,v as hS,w as o_,x as Wc,y as pS,z as gS,A as mS,B as fS,D as $S,E as bS,G as vS,H as Mw,J as Nw,K as Lw,L as yS,N as _S,O as wS,P as CS,Q as TS,R as kS}from"./index-C49cpVll.js";import{y as SS,_ as ES,a as IS,m as xS,S as i_,T as n_}from"./inheritsLoose-B0Ba5G9z.js";import{c as wn}from"./iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js";function Si(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}import{_ as On}from"./preload-helper-BDBacUwf.js";import{P as Z}from"./iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js";import{_ as DS}from"./iobroker_javascript__loadShare__react_mf_2_dom__loadShare__.mjs-DeVAS-oa.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(l){if(l.ep)return;l.ep=!0;const u=i(l);fetch(l.href,u)}})();var Pw,r_=Ek;Pw=r_.createRoot,r_.hydrateRoot;var Bw={exports:{}},rt={};var Gc=60103,Vc=60106,Zr=60107,Qr=60108,ea=60114,ta=60109,sa=60110,oa=60112,ia=60113,um=60120,na=60115,ra=60116,jw=60121,Fw=60122,zw=60117,Uw=60129,Hw=60131;if(typeof Symbol=="function"&&Symbol.for){var Rt=Symbol.for;Gc=Rt("react.element"),Vc=Rt("react.portal"),Zr=Rt("react.fragment"),Qr=Rt("react.strict_mode"),ea=Rt("react.profiler"),ta=Rt("react.provider"),sa=Rt("react.context"),oa=Rt("react.forward_ref"),ia=Rt("react.suspense"),um=Rt("react.suspense_list"),na=Rt("react.memo"),ra=Rt("react.lazy"),jw=Rt("react.block"),Fw=Rt("react.server.block"),zw=Rt("react.fundamental"),Uw=Rt("react.debug_trace_mode"),Hw=Rt("react.legacy_hidden")}function Rs(a){if(typeof a=="object"&&a!==null){var s=a.$$typeof;switch(s){case Gc:switch(a=a.type,a){case Zr:case ea:case Qr:case ia:case um:return a;default:switch(a=a&&a.$$typeof,a){case sa:case oa:case ra:case na:case ta:return a;default:return s}}case Vc:return s}}}var AS=ta,RS=Gc,OS=oa,MS=Zr,NS=ra,LS=na,PS=Vc,BS=ea,jS=Qr,FS=ia;rt.ContextConsumer=sa;rt.ContextProvider=AS;rt.Element=RS;rt.ForwardRef=OS;rt.Fragment=MS;rt.Lazy=NS;rt.Memo=LS;rt.Portal=PS;rt.Profiler=BS;rt.StrictMode=jS;rt.Suspense=FS;rt.isAsyncMode=function(){return!1};rt.isConcurrentMode=function(){return!1};rt.isContextConsumer=function(a){return Rs(a)===sa};rt.isContextProvider=function(a){return Rs(a)===ta};rt.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===Gc};rt.isForwardRef=function(a){return Rs(a)===oa};rt.isFragment=function(a){return Rs(a)===Zr};rt.isLazy=function(a){return Rs(a)===ra};rt.isMemo=function(a){return Rs(a)===na};rt.isPortal=function(a){return Rs(a)===Vc};rt.isProfiler=function(a){return Rs(a)===ea};rt.isStrictMode=function(a){return Rs(a)===Qr};rt.isSuspense=function(a){return Rs(a)===ia};rt.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===Zr||a===ea||a===Uw||a===Qr||a===ia||a===um||a===Hw||typeof a=="object"&&a!==null&&(a.$$typeof===ra||a.$$typeof===na||a.$$typeof===ta||a.$$typeof===sa||a.$$typeof===oa||a.$$typeof===zw||a.$$typeof===jw||a[0]===Fw)};rt.typeOf=Rs;Bw.exports=rt;var zS=Bw.exports;function yc(a,s){const i=getComputedStyle(s);if(!i)return;let r=a===dt.Horizontal?s.clientWidth:s.clientHeight;return r!==0?(a===dt.Horizontal?r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight):r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),r):void 0}function tc(a,s,i=[],r={condition:!0}){const{condition:l}=r,u=(function(d,p){var m={};for(var f in d)Object.prototype.hasOwnProperty.call(d,f)&&p.indexOf(f)<0&&(m[f]=d[f]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function"){var v=0;for(f=Object.getOwnPropertySymbols(d);v<f.length;v++)p.indexOf(f[v])<0&&Object.prototype.propertyIsEnumerable.call(d,f[v])&&(m[f[v]]=d[f[v]])}return m})(r,["condition"]);Mt((()=>(l&&window.addEventListener(a,s,u),()=>{l&&window.removeEventListener(a,s)})),[a,s,l,...i])}(function(a,s){s===void 0&&(s={});var i=s.insertAt;if(typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",i==="top"&&r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),l.styleSheet?l.styleSheet.cssText=a:l.appendChild(document.createTextNode(a))}})(`/* === Main Container === */
.__dbk__container {
height: 100%;
width: 100%;
display: flex;
overflow: hidden;
}
.__dbk__container.Horizontal {
flex-direction: row;
}
.__dbk__container.Vertical {
flex-direction: column;
}
/* ====== */
/* === Wrapper for each child element === */
.__dbk__child-wrapper {
height: 100%;
width: 100%;
}
/* ====== */
/* === Gutter === */
.__dbk__gutter {
display: flex;
align-items: center;
justify-content: center;
}
/* .__dbk__gutter > div {
background: red;
} */
.__dbk__gutter.Horizontal {
height: 100%;
padding: 0 2px;
flex-direction: column;
}
.__dbk__gutter.Horizontal:hover {
cursor: col-resize;
}
.__dbk__gutter.Vertical {
width: 100%;
padding: 2px 0;
flex-direction: row;
}
.__dbk__gutter.Vertical:hover {
cursor: row-resize;
}
.__dbk__gutter.Light {
background: #EDF0EF;
}
.__dbk__gutter.Light:hover > .__dbk__dragger {
background: #76747B;
}
.__dbk__gutter.Dark {
background: #020203;
}
.__dbk__gutter.Dark:hover > .__dbk__dragger {
background: #9995A3;
}
/* ====== */
/* === Gutter's Dragger === */
.__dbk__dragger {
border-radius: 2px;
}
.__dbk__dragger.Horizontal {
width: 4px;
height: 24px;
}
.__dbk__dragger.Vertical {
width: 24px;
height: 4px;
}
.__dbk__dragger.Light {
background: #A6ACB5;
}
.__dbk__dragger.Dark {
background: #434252;
}
/* ====== */`);const US=Y.forwardRef((({className:a,theme:s,draggerClassName:i,direction:r=dt.Vertical,onDragging:l},u)=>{const d=`__dbk__gutter ${r} ${a||s}`,p=`__dbk__dragger ${r} ${i||s}`;return g.jsx("div",Object.assign({className:d,ref:u,dir:r,onMouseDown:l,onTouchStart:hc?l:void 0},{children:g.jsx("div",{className:p},void 0)}),void 0)}));var vs;function Og(a,s,i){let r,l;return s?(r=a/2,l=a):i?(r=a,l=a/2):(r=a,l=a),{aGutterSize:r,bGutterSize:l}}function HS(a,s){switch(s.type){case vs.SetIsReadyToCompute:return Object.assign(Object.assign({},a),{isReady:s.payload.isReady});case vs.CreatePairs:{const{direction:i,children:r,gutters:l}=s.payload,u=r[0].parentNode;if(!u)throw new Error("Cannot create pairs - parent is undefined.");const d=yc(i,u);if(d===void 0)throw new Error(`Cannot create pairs - parent has undefined or zero size: ${d}.`);const p=[];return r.forEach(((m,f)=>{if(f>0){const v=r[f-1],_=r[f],y=l[f-1],k=i===dt.Horizontal?v.getBoundingClientRect().left:v.getBoundingClientRect().top,C=i===dt.Horizontal?_.getBoundingClientRect().right:_.getBoundingClientRect().bottom,w=i===dt.Horizontal?v.getBoundingClientRect().width+y.getBoundingClientRect().width+_.getBoundingClientRect().width:v.getBoundingClientRect().height+y.getBoundingClientRect().height+_.getBoundingClientRect().height,E=i===dt.Horizontal?y.getBoundingClientRect().width:y.getBoundingClientRect().height,R={idx:f-1,a:v,b:_,gutter:y,parent:u,start:k,end:C,size:w,gutterSize:E,aSizePct:100/r.length,bSizePct:100/r.length};p.push(R)}})),Object.assign(Object.assign({},a),{pairs:p})}case vs.StartDragging:{const{gutterIdx:i}=s.payload;return Object.assign(Object.assign({},a),{isDragging:!0,draggingIdx:i})}case vs.StopDragging:return Object.assign(Object.assign({},a),{isDragging:!1});case vs.CalculateSizes:{const{direction:i,gutterIdx:r}=s.payload,l=a.pairs[r],u=yc(i,l.parent);if(!u)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const d=l.gutter[i===dt.Horizontal?"clientWidth":"clientHeight"],p=r===0,m=r===a.pairs.length-1,{aGutterSize:f,bGutterSize:v}=Og(d,p,m);let _,y,k,C,w;return i===dt.Horizontal?(_=l.a.getBoundingClientRect().left,y=l.b.getBoundingClientRect().right,C=(l.a.getBoundingClientRect().width+f)/u*100,w=(l.b.getBoundingClientRect().width+v)/u*100,k=l.a.getBoundingClientRect().width+f+v+l.b.getBoundingClientRect().width):(_=l.a.getBoundingClientRect().top,y=l.b.getBoundingClientRect().bottom,C=(l.a.getBoundingClientRect().height+f)/u*100,w=(l.b.getBoundingClientRect().height+v)/u*100,k=l.a.getBoundingClientRect().height+f+v+l.b.getBoundingClientRect().height),a.pairs[r]=Object.assign(Object.assign({},l),{start:_,end:y,size:k,aSizePct:C,bSizePct:w,gutterSize:d}),Object.assign({},a)}default:return a}}function Ww(a,s=0,i=[]){return xk.toArray(a).reduce(((r,l,u)=>(zS.isFragment(l)?r.push.apply(r,Ww(l.props.children,s+1,i.concat(l.key||u))):kw(l)?r.push(kg(l,{key:i.concat(String(l.key)).join(".")})):typeof l!="string"&&typeof l!="number"||r.push(l),r)),[])}(function(a){a[a.SetIsReadyToCompute=0]="SetIsReadyToCompute",a[a.CreatePairs=1]="CreatePairs",a[a.CalculateSizes=2]="CalculateSizes",a[a.StartDragging=3]="StartDragging",a[a.StopDragging=4]="StopDragging"})(vs||(vs={}));const a_=a=>"changedTouches"in a;var dt,Mg;(function(a){a.Horizontal="Horizontal",a.Vertical="Vertical"})(dt||(dt={})),(function(a){a.Light="Light",a.Dark="Dark"})(Mg||(Mg={}));const hc=typeof window<"u"&&"ontouchstart"in window;function Jp(a){return a===dt.Horizontal?"col-resize":"row-resize"}const WS={isReady:!1,isDragging:!1,pairs:[]};function l_({direction:a=dt.Horizontal,minWidths:s=[],minHeights:i=[],initialSizes:r,gutterTheme:l=Mg.Dark,gutterClassName:u,draggerClassName:d,children:p,onResizeStarted:m,onResizeFinished:f,classes:v=[]}){const _=Ww(p),[y,k]=Ik(HS,WS),C=Bo(null),w=Bo([]),E=Bo([]);w.current=[],E.current=[];const R=Y.useCallback((ae=>{k({type:vs.SetIsReadyToCompute,payload:{isReady:ae}})}),[]),D=Y.useCallback(((ae,ce)=>{k({type:vs.StartDragging,payload:{gutterIdx:ce}});const K=y.pairs[ce];m==null||m(K.idx),K.a.style.userSelect="none",K.b.style.userSelect="none",K.gutter.style.cursor=Jp(ae),K.parent.style.cursor=Jp(ae),document.body.style.cursor=Jp(ae)}),[y.pairs]),A=Y.useCallback((()=>{k({type:vs.StopDragging});const ae=[];for(let K=0;K<y.pairs.length;K++){const ye=y.pairs[K],he=yc(a,ye.parent);if(he===void 0)throw new Error("Cannot call the 'onResizeFinished' callback - parentSize is undefined");if(ye.gutterSize===void 0)throw new Error("Cannot call 'onResizeFinished' callback - gutterSize is undefined");const je=K===0,V=K===y.pairs.length-1,tt=ye.a.getBoundingClientRect()[a===dt.Horizontal?"width":"height"],{aGutterSize:q,bGutterSize:ee}=Og(ye.gutterSize,je,V),B=(tt+q)/he*100;if(ae.push(B),V){const H=(ye.b.getBoundingClientRect()[a===dt.Horizontal?"width":"height"]+ee)/he*100;ae.push(H)}}if(y.draggingIdx===void 0)throw new Error("Could not reset cursor and user-select because 'state.draggingIdx' is undefined");const ce=y.pairs[y.draggingIdx];f==null||f(ce.idx,ae),ce.a.style.userSelect="",ce.b.style.userSelect="",ce.gutter.style.cursor="",ce.parent.style.cursor="",document.body.style.cursor=""}),[y.draggingIdx,y.pairs,a]),J=Y.useCallback(((ae,ce)=>{k({type:vs.CalculateSizes,payload:{direction:ae,gutterIdx:ce}})}),[]),ie=Y.useCallback(((ae,ce,K)=>{k({type:vs.CreatePairs,payload:{direction:ae,children:ce,gutters:K}})}),[]),se=Y.useCallback(((ae,ce,K,ye)=>{const he=ce[0].parentNode;if(!he)throw new Error("Cannot set initial sizes - parent is undefined");if(yc(ae,he)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");ce.forEach(((je,V)=>{const tt=V===0,q=V===ce.length-1;let ee,B=0;ce.length>1&&(B=K[q?V-1:V].getBoundingClientRect()[ae===dt.Horizontal?"width":"height"],B=tt||q?B/2:B),ee=ye&&V<ye.length?`calc(${ye[V]}% - ${B}px)`:`calc(${100/ce.length}% - ${B}px)`,ae===dt.Horizontal?(je.style.width=ee,je.style.height="100%"):(je.style.height=ee,je.style.width="100%")}))}),[]),me=Y.useCallback(((ae,ce)=>{if(y.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const K=y.pairs[y.draggingIdx];if(K.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(K.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const ye=K.aSizePct+K.bSizePct,he=ce/K.size*ye,je=ye-ce/K.size*ye,V=y.draggingIdx===0,tt=y.draggingIdx===y.pairs.length-1,{aGutterSize:q,bGutterSize:ee}=Og(K.gutterSize,V,tt),B=`calc(${he}% - ${q}px)`,H=`calc(${je}% - ${ee}px)`;ae===dt.Horizontal?(K.a.style.width=B,K.b.style.width=H):(K.a.style.height=B,K.b.style.height=H)}),[y.draggingIdx,y.pairs,a]),z=Y.useCallback(((ae,ce,K)=>{if(!y.isDragging)return;if(y.draggingIdx===void 0)throw new Error("Cannot drag - 'draggingIdx' is undefined");const ye=y.pairs[y.draggingIdx];if(ye.start===void 0)throw new Error("Cannot drag - 'pair.start' is undefined");if(ye.size===void 0)throw new Error("Cannot drag - 'pair.size' is undefined");if(ye.gutterSize===void 0)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let he=(function(tt,q){const ee=a_(q)?q.changedTouches[0]:q;return tt===dt.Horizontal?ee.clientX:ee.clientY})(ce,ae)-ye.start,je=16,V=16;K.length>y.draggingIdx&&(je=K[y.draggingIdx]),K.length>=y.draggingIdx+1&&(V=K[y.draggingIdx+1]),he<ye.gutterSize+je&&(he=ye.gutterSize+je),he>=ye.size-(ye.gutterSize+V)&&(he=ye.size-(ye.gutterSize+V)),me(ce,he)}),[y.isDragging,y.draggingIdx,y.pairs,me]),Oe=()=>{if(y.isDragging){if(y.draggingIdx===void 0)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");J(a,y.draggingIdx),A()}},Ne=ae=>{y.isDragging&&(a_(ae)&&ae.preventDefault(),z(ae,a,a===dt.Horizontal?s:i))};function Ze(ae,ce){if(!ae.current)throw new Error("Can't add element to ref object - ref isn't initialized");ce&&!ae.current.includes(ce)&&ae.current.push(ce)}return tc("mouseup",Oe,[y.isDragging,A]),tc("mousemove",Ne,[a,y.isDragging,z,s,i]),tc("touchend",Oe,[y.isDragging,A],{condition:hc}),tc("touchmove",Ne,[a,y.isDragging,z,s,i],{condition:hc,passive:!hc}),Mt((function(){if(!C.current)return;const ae=C.current.parentElement;if(!ae)return;const ce=new ResizeObserver((()=>{const K=getComputedStyle(ae),ye=a===dt.Horizontal?ae.clientWidth:ae.clientHeight;R(!!K&&!!ye)}));return ce.observe(ae),()=>{ce.disconnect()}}),[C.current,a]),Mt((function(){if(y.isReady&&(!w.current||w.current[0].offsetParent)){if(!w.current||!E.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");_.length<=1?se(a,w.current,E.current,r):(se(a,w.current,E.current,r),ie(a,w.current,E.current))}}),[p,y.isReady,a,se,ie,r]),g.jsx("div",Object.assign({className:`__dbk__container ${a}`,ref:C},{children:y.isReady&&_.map(((ae,ce)=>g.jsxs(Y.Fragment,{children:[g.jsx("div",Object.assign({ref:K=>Ze(w,K),className:"__dbk__child-wrapper "+(ce<v.length?v[ce]:"")},{children:ae}),void 0),ce<_.length-1&&g.jsx(US,{ref:K=>Ze(E,K),className:u,theme:l,draggerClassName:d,direction:a,onDragging:()=>{return J(a,K=ce),void D(a,K);var K}},void 0)]},ce)))}),void 0)}const Gw=rm({dragDropManager:void 0});function Vr(a){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},Vr(a)}function GS(a,s){if(Vr(a)!="object"||!a)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var r=i.call(a,s);if(Vr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function VS(a){var s=GS(a,"string");return Vr(s)=="symbol"?s:s+""}function KS(a,s,i){return(s=VS(s))in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function ms(a){return"Minified Redux error #"+a+"; visit https://redux.js.org/Errors?code="+a+" for the full message or use the non-minified dev environment for full errors. "}var c_=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),u_=function(){return Math.random().toString(36).substring(7).split("").join(".")},d_={INIT:"@@redux/INIT"+u_(),REPLACE:"@@redux/REPLACE"+u_()};function YS(a){if(typeof a!="object"||a===null)return!1;for(var s=a;Object.getPrototypeOf(s)!==null;)s=Object.getPrototypeOf(s);return Object.getPrototypeOf(a)===s}function Vw(a,s,i){var r;if(typeof s=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(ms(0));if(typeof s=="function"&&typeof i>"u"&&(i=s,s=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(ms(1));return i(Vw)(a,s)}if(typeof a!="function")throw new Error(ms(2));var l=a,u=s,d=[],p=d,m=!1;function f(){p===d&&(p=d.slice())}function v(){if(m)throw new Error(ms(3));return u}function _(w){if(typeof w!="function")throw new Error(ms(4));if(m)throw new Error(ms(5));var E=!0;return f(),p.push(w),function(){if(E){if(m)throw new Error(ms(6));E=!1,f();var D=p.indexOf(w);p.splice(D,1),d=null}}}function y(w){if(!YS(w))throw new Error(ms(7));if(typeof w.type>"u")throw new Error(ms(8));if(m)throw new Error(ms(9));try{m=!0,u=l(u,w)}finally{m=!1}for(var E=d=p,R=0;R<E.length;R++){var D=E[R];D()}return w}function k(w){if(typeof w!="function")throw new Error(ms(10));l=w,y({type:d_.REPLACE})}function C(){var w,E=_;return w={subscribe:function(D){if(typeof D!="object"||D===null)throw new Error(ms(11));function A(){D.next&&D.next(v())}A();var J=E(A);return{unsubscribe:J}}},w[c_]=function(){return this},w}return y({type:d_.INIT}),r={dispatch:y,subscribe:_,getState:v,replaceReducer:k},r[c_]=C,r}function Ie(a,s,...i){if(JS()&&s===void 0)throw new Error("invariant requires an error message argument");if(!a){let r;if(s===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let l=0;r=new Error(s.replace(/%s/g,function(){return i[l++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function JS(){return typeof process<"u"&&!0}function qS(a,s,i){return s.split(".").reduce((r,l)=>r&&r[l]?r[l]:i||null,a)}function XS(a,s){return a.filter(i=>i!==s)}function Kw(a){return typeof a=="object"}function ZS(a,s){const i=new Map,r=u=>{i.set(u,i.has(u)?i.get(u)+1:1)};a.forEach(r),s.forEach(r);const l=[];return i.forEach((u,d)=>{u===1&&l.push(d)}),l}function QS(a,s){return a.filter(i=>s.indexOf(i)>-1)}const dm="dnd-core/INIT_COORDS",Kc="dnd-core/BEGIN_DRAG",hm="dnd-core/PUBLISH_DRAG_SOURCE",Yc="dnd-core/HOVER",Jc="dnd-core/DROP",qc="dnd-core/END_DRAG";function h_(a,s){return{type:dm,payload:{sourceClientOffset:s||null,clientOffset:a||null}}}const eE={type:dm,payload:{clientOffset:null,sourceClientOffset:null}};function tE(a){return function(i=[],r={publishSource:!0}){const{publishSource:l=!0,clientOffset:u,getSourceClientOffset:d}=r,p=a.getMonitor(),m=a.getRegistry();a.dispatch(h_(u)),sE(i,p,m);const f=nE(i,p);if(f==null){a.dispatch(eE);return}let v=null;if(u){if(!d)throw new Error("getSourceClientOffset must be defined");oE(d),v=d(f)}a.dispatch(h_(u,v));const y=m.getSource(f).beginDrag(p,f);if(y==null)return;iE(y),m.pinSource(f);const k=m.getSourceType(f);return{type:Kc,payload:{itemType:k,item:y,sourceId:f,clientOffset:u||null,sourceClientOffset:v||null,isSourcePublic:!!l}}}}function sE(a,s,i){Ie(!s.isDragging(),"Cannot call beginDrag while dragging."),a.forEach(function(r){Ie(i.getSource(r),"Expected sourceIds to be registered.")})}function oE(a){Ie(typeof a=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function iE(a){Ie(Kw(a),"Item must be an object.")}function nE(a,s){let i=null;for(let r=a.length-1;r>=0;r--)if(s.canDragSource(a[r])){i=a[r];break}return i}function rE(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function aE(a){for(var s=1;s<arguments.length;s++){var i=arguments[s]!=null?arguments[s]:{},r=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),r.forEach(function(l){rE(a,l,i[l])})}return a}function lE(a){return function(i={}){const r=a.getMonitor(),l=a.getRegistry();cE(r),hE(r).forEach((d,p)=>{const m=uE(d,p,l,r),f={type:Jc,payload:{dropResult:aE({},i,m)}};a.dispatch(f)})}}function cE(a){Ie(a.isDragging(),"Cannot call drop while not dragging."),Ie(!a.didDrop(),"Cannot call drop twice during one drag operation.")}function uE(a,s,i,r){const l=i.getTarget(a);let u=l?l.drop(r,a):void 0;return dE(u),typeof u>"u"&&(u=s===0?{}:r.getDropResult()),u}function dE(a){Ie(typeof a>"u"||Kw(a),"Drop result must either be an object or undefined.")}function hE(a){const s=a.getTargetIds().filter(a.canDropOnTarget,a);return s.reverse(),s}function pE(a){return function(){const i=a.getMonitor(),r=a.getRegistry();gE(i);const l=i.getSourceId();return l!=null&&(r.getSource(l,!0).endDrag(i,l),r.unpinSource()),{type:qc}}}function gE(a){Ie(a.isDragging(),"Cannot call endDrag while not dragging.")}function Ng(a,s){return s===null?a===null:Array.isArray(a)?a.some(i=>i===s):a===s}function mE(a){return function(i,{clientOffset:r}={}){fE(i);const l=i.slice(0),u=a.getMonitor(),d=a.getRegistry(),p=u.getItemType();return bE(l,d,p),$E(l,u,d),vE(l,u,d),{type:Yc,payload:{targetIds:l,clientOffset:r||null}}}}function fE(a){Ie(Array.isArray(a),"Expected targetIds to be an array.")}function $E(a,s,i){Ie(s.isDragging(),"Cannot call hover while not dragging."),Ie(!s.didDrop(),"Cannot call hover after drop.");for(let r=0;r<a.length;r++){const l=a[r];Ie(a.lastIndexOf(l)===r,"Expected targetIds to be unique in the passed array.");const u=i.getTarget(l);Ie(u,"Expected targetIds to be registered.")}}function bE(a,s,i){for(let r=a.length-1;r>=0;r--){const l=a[r],u=s.getTargetType(l);Ng(u,i)||a.splice(r,1)}}function vE(a,s,i){a.forEach(function(r){i.getTarget(r).hover(s,r)})}function yE(a){return function(){if(a.getMonitor().isDragging())return{type:hm}}}function _E(a){return{beginDrag:tE(a),publishDragSource:yE(a),hover:mE(a),drop:lE(a),endDrag:pE(a)}}class wE{receiveBackend(s){this.backend=s}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const s=this,{dispatch:i}=this.store;function r(u){return(...d)=>{const p=u.apply(s,d);typeof p<"u"&&i(p)}}const l=_E(this);return Object.keys(l).reduce((u,d)=>{const p=l[d];return u[d]=r(p),u},{})}dispatch(s){this.store.dispatch(s)}constructor(s,i){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=s,this.monitor=i,s.subscribe(this.handleRefCountChange)}}function CE(a,s){return{x:a.x+s.x,y:a.y+s.y}}function Yw(a,s){return{x:a.x-s.x,y:a.y-s.y}}function TE(a){const{clientOffset:s,initialClientOffset:i,initialSourceClientOffset:r}=a;return!s||!i||!r?null:Yw(CE(s,r),i)}function kE(a){const{clientOffset:s,initialClientOffset:i}=a;return!s||!i?null:Yw(s,i)}const Fr=[],pm=[];Fr.__IS_NONE__=!0;pm.__IS_ALL__=!0;function SE(a,s){return a===Fr?!1:a===pm||typeof s>"u"?!0:QS(s,a).length>0}class EE{subscribeToStateChange(s,i={}){const{handlerIds:r}=i;Ie(typeof s=="function","listener must be a function."),Ie(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let l=this.store.getState().stateId;const u=()=>{const d=this.store.getState(),p=d.stateId;try{p===l||p===l+1&&!SE(d.dirtyHandlerIds,r)||s()}finally{l=p}};return this.store.subscribe(u)}subscribeToOffsetChange(s){Ie(typeof s=="function","listener must be a function.");let i=this.store.getState().dragOffset;const r=()=>{const l=this.store.getState().dragOffset;l!==i&&(i=l,s())};return this.store.subscribe(r)}canDragSource(s){if(!s)return!1;const i=this.registry.getSource(s);return Ie(i,`Expected to find a valid source. sourceId=${s}`),this.isDragging()?!1:i.canDrag(this,s)}canDropOnTarget(s){if(!s)return!1;const i=this.registry.getTarget(s);if(Ie(i,`Expected to find a valid target. targetId=${s}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(s),l=this.getItemType();return Ng(r,l)&&i.canDrop(this,s)}isDragging(){return!!this.getItemType()}isDraggingSource(s){if(!s)return!1;const i=this.registry.getSource(s,!0);if(Ie(i,`Expected to find a valid source. sourceId=${s}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(s),l=this.getItemType();return r!==l?!1:i.isDragging(this,s)}isOverTarget(s,i={shallow:!1}){if(!s)return!1;const{shallow:r}=i;if(!this.isDragging())return!1;const l=this.registry.getTargetType(s),u=this.getItemType();if(u&&!Ng(l,u))return!1;const d=this.getTargetIds();if(!d.length)return!1;const p=d.indexOf(s);return r?p===d.length-1:p>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return TE(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return kE(this.store.getState().dragOffset)}constructor(s,i){this.store=s,this.registry=i}}const p_=typeof global<"u"?global:self,Jw=p_.MutationObserver||p_.WebKitMutationObserver;function qw(a){return function(){const i=setTimeout(l,0),r=setInterval(l,50);function l(){clearTimeout(i),clearInterval(r),a()}}}function IE(a){let s=1;const i=new Jw(a),r=document.createTextNode("");return i.observe(r,{characterData:!0}),function(){s=-s,r.data=s}}const xE=typeof Jw=="function"?IE:qw;class DE{enqueueTask(s){const{queue:i,requestFlush:r}=this;i.length||(r(),this.flushing=!0),i[i.length]=s}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:s}=this;for(;this.index<s.length;){const i=this.index;if(this.index++,s[i].call(),this.index>this.capacity){for(let r=0,l=s.length-this.index;r<l;r++)s[r]=s[r+this.index];s.length-=this.index,this.index=0}}s.length=0,this.index=0,this.flushing=!1},this.registerPendingError=s=>{this.pendingErrors.push(s),this.requestErrorThrow()},this.requestFlush=xE(this.flush),this.requestErrorThrow=qw(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class AE{call(){try{this.task&&this.task()}catch(s){this.onError(s)}finally{this.task=null,this.release(this)}}constructor(s,i){this.onError=s,this.release=i,this.task=null}}class RE{create(s){const i=this.freeTasks,r=i.length?i.pop():new AE(this.onError,l=>i[i.length]=l);return r.task=s,r}constructor(s){this.onError=s,this.freeTasks=[]}}const Xw=new DE,OE=new RE(Xw.registerPendingError);function ME(a){Xw.enqueueTask(OE.create(a))}const gm="dnd-core/ADD_SOURCE",mm="dnd-core/ADD_TARGET",fm="dnd-core/REMOVE_SOURCE",Xc="dnd-core/REMOVE_TARGET";function NE(a){return{type:gm,payload:{sourceId:a}}}function LE(a){return{type:mm,payload:{targetId:a}}}function PE(a){return{type:fm,payload:{sourceId:a}}}function BE(a){return{type:Xc,payload:{targetId:a}}}function jE(a){Ie(typeof a.canDrag=="function","Expected canDrag to be a function."),Ie(typeof a.beginDrag=="function","Expected beginDrag to be a function."),Ie(typeof a.endDrag=="function","Expected endDrag to be a function.")}function FE(a){Ie(typeof a.canDrop=="function","Expected canDrop to be a function."),Ie(typeof a.hover=="function","Expected hover to be a function."),Ie(typeof a.drop=="function","Expected beginDrag to be a function.")}function Lg(a,s){if(s&&Array.isArray(a)){a.forEach(i=>Lg(i,!1));return}Ie(typeof a=="string"||typeof a=="symbol",s?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var bs;(function(a){a.SOURCE="SOURCE",a.TARGET="TARGET"})(bs||(bs={}));let zE=0;function UE(){return zE++}function HE(a){const s=UE().toString();switch(a){case bs.SOURCE:return`S${s}`;case bs.TARGET:return`T${s}`;default:throw new Error(`Unknown Handler Role: ${a}`)}}function g_(a){switch(a[0]){case"S":return bs.SOURCE;case"T":return bs.TARGET;default:throw new Error(`Cannot parse handler ID: ${a}`)}}function m_(a,s){const i=a.entries();let r=!1;do{const{done:l,value:[,u]}=i.next();if(u===s)return!0;r=!!l}while(!r);return!1}class WE{addSource(s,i){Lg(s),jE(i);const r=this.addHandler(bs.SOURCE,s,i);return this.store.dispatch(NE(r)),r}addTarget(s,i){Lg(s,!0),FE(i);const r=this.addHandler(bs.TARGET,s,i);return this.store.dispatch(LE(r)),r}containsHandler(s){return m_(this.dragSources,s)||m_(this.dropTargets,s)}getSource(s,i=!1){return Ie(this.isSourceId(s),"Expected a valid source ID."),i&&s===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(s)}getTarget(s){return Ie(this.isTargetId(s),"Expected a valid target ID."),this.dropTargets.get(s)}getSourceType(s){return Ie(this.isSourceId(s),"Expected a valid source ID."),this.types.get(s)}getTargetType(s){return Ie(this.isTargetId(s),"Expected a valid target ID."),this.types.get(s)}isSourceId(s){return g_(s)===bs.SOURCE}isTargetId(s){return g_(s)===bs.TARGET}removeSource(s){Ie(this.getSource(s),"Expected an existing source."),this.store.dispatch(PE(s)),ME(()=>{this.dragSources.delete(s),this.types.delete(s)})}removeTarget(s){Ie(this.getTarget(s),"Expected an existing target."),this.store.dispatch(BE(s)),this.dropTargets.delete(s),this.types.delete(s)}pinSource(s){const i=this.getSource(s);Ie(i,"Expected an existing source."),this.pinnedSourceId=s,this.pinnedSource=i}unpinSource(){Ie(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(s,i,r){const l=HE(s);return this.types.set(l,i),s===bs.SOURCE?this.dragSources.set(l,r):s===bs.TARGET&&this.dropTargets.set(l,r),l}constructor(s){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=s}}const GE=(a,s)=>a===s;function VE(a,s){return!a&&!s?!0:!a||!s?!1:a.x===s.x&&a.y===s.y}function KE(a,s,i=GE){if(a.length!==s.length)return!1;for(let r=0;r<a.length;++r)if(!i(a[r],s[r]))return!1;return!0}function YE(a=Fr,s){switch(s.type){case Yc:break;case gm:case mm:case Xc:case fm:return Fr;case Kc:case hm:case qc:case Jc:default:return pm}const{targetIds:i=[],prevTargetIds:r=[]}=s.payload,l=ZS(i,r);if(!(l.length>0||!KE(i,r)))return Fr;const d=r[r.length-1],p=i[i.length-1];return d!==p&&(d&&l.push(d),p&&l.push(p)),l}function JE(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function qE(a){for(var s=1;s<arguments.length;s++){var i=arguments[s]!=null?arguments[s]:{},r=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),r.forEach(function(l){JE(a,l,i[l])})}return a}const f_={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function XE(a=f_,s){const{payload:i}=s;switch(s.type){case dm:case Kc:return{initialSourceClientOffset:i.sourceClientOffset,initialClientOffset:i.clientOffset,clientOffset:i.clientOffset};case Yc:return VE(a.clientOffset,i.clientOffset)?a:qE({},a,{clientOffset:i.clientOffset});case qc:case Jc:return f_;default:return a}}function ZE(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function mn(a){for(var s=1;s<arguments.length;s++){var i=arguments[s]!=null?arguments[s]:{},r=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),r.forEach(function(l){ZE(a,l,i[l])})}return a}const QE={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function eI(a=QE,s){const{payload:i}=s;switch(s.type){case Kc:return mn({},a,{itemType:i.itemType,item:i.item,sourceId:i.sourceId,isSourcePublic:i.isSourcePublic,dropResult:null,didDrop:!1});case hm:return mn({},a,{isSourcePublic:!0});case Yc:return mn({},a,{targetIds:i.targetIds});case Xc:return a.targetIds.indexOf(i.targetId)===-1?a:mn({},a,{targetIds:XS(a.targetIds,i.targetId)});case Jc:return mn({},a,{dropResult:i.dropResult,didDrop:!0,targetIds:[]});case qc:return mn({},a,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return a}}function tI(a=0,s){switch(s.type){case gm:case mm:return a+1;case fm:case Xc:return a-1;default:return a}}function sI(a=0){return a+1}function oI(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function iI(a){for(var s=1;s<arguments.length;s++){var i=arguments[s]!=null?arguments[s]:{},r=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),r.forEach(function(l){oI(a,l,i[l])})}return a}function nI(a={},s){return{dirtyHandlerIds:YE(a.dirtyHandlerIds,{type:s.type,payload:iI({},s.payload,{prevTargetIds:qS(a,"dragOperation.targetIds",[])})}),dragOffset:XE(a.dragOffset,s),refCount:tI(a.refCount,s),dragOperation:eI(a.dragOperation,s),stateId:sI(a.stateId)}}function rI(a,s=void 0,i={},r=!1){const l=aI(r),u=new EE(l,new WE(l)),d=new wE(l,u),p=a(d,s,i);return d.receiveBackend(p),d}function aI(a){const s=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Vw(nI,a&&s&&s({name:"dnd-core",instanceId:"dnd-core"}))}function lI(a,s){if(a==null)return{};var i=cI(a,s),r,l;if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(a);for(l=0;l<u.length;l++)r=u[l],!(s.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(a,r)&&(i[r]=a[r])}return i}function cI(a,s){if(a==null)return{};var i={},r=Object.keys(a),l,u;for(u=0;u<r.length;u++)l=r[u],!(s.indexOf(l)>=0)&&(i[l]=a[l]);return i}let $_=0;const pc=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Zw=am(function(s){var{children:i}=s,r=lI(s,["children"]);const[l,u]=uI(r);return Mt(()=>{if(u){const d=Qw();return++$_,()=>{--$_===0&&(d[pc]=null)}}},[]),g.jsx(Gw.Provider,{value:l,children:i})});function uI(a){if("manager"in a)return[{dragDropManager:a.manager},!1];const s=dI(a.backend,a.context,a.options,a.debugMode),i=!a.context;return[s,i]}function dI(a,s=Qw(),i,r){const l=s;return l[pc]||(l[pc]={dragDropManager:rI(a,s,i,r)}),l[pc]}function Qw(){return typeof global<"u"?global:window}var hI=function a(s,i){if(s===i)return!0;if(s&&i&&typeof s=="object"&&typeof i=="object"){if(s.constructor!==i.constructor)return!1;var r,l,u;if(Array.isArray(s)){if(r=s.length,r!=i.length)return!1;for(l=r;l--!==0;)if(!a(s[l],i[l]))return!1;return!0}if(s.constructor===RegExp)return s.source===i.source&&s.flags===i.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===i.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===i.toString();if(u=Object.keys(s),r=u.length,r!==Object.keys(i).length)return!1;for(l=r;l--!==0;)if(!Object.prototype.hasOwnProperty.call(i,u[l]))return!1;for(l=r;l--!==0;){var d=u[l];if(!a(s[d],i[d]))return!1}return!0}return s!==s&&i!==i};const pI=Si(hI),Ci=typeof window<"u"?lm:Mt;function gI(a,s,i){const[r,l]=vt(()=>s(a)),u=_n(()=>{const d=s(a);pI(r,d)||(l(d),i&&i())},[r,a,i]);return Ci(u),[r,u]}function mI(a,s,i){const[r,l]=gI(a,s,i);return Ci(function(){const d=a.getHandlerId();if(d!=null)return a.subscribeToStateChange(l,{handlerIds:[d]})},[a,l]),r}function eC(a,s,i){return mI(s,a||(()=>({})),()=>i.reconnect())}function tC(a,s){const i=[];return typeof a!="function"&&i.push(a),rs(()=>typeof a=="function"?a():a,i)}function fI(a){return rs(()=>a.hooks.dragSource(),[a])}function $I(a){return rs(()=>a.hooks.dragPreview(),[a])}let qp=!1,Xp=!1;class bI{receiveHandlerId(s){this.sourceId=s}getHandlerId(){return this.sourceId}canDrag(){Ie(!qp,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return qp=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{qp=!1}}isDragging(){if(!this.sourceId)return!1;Ie(!Xp,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Xp=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Xp=!1}}subscribeToStateChange(s,i){return this.internalMonitor.subscribeToStateChange(s,i)}isDraggingSource(s){return this.internalMonitor.isDraggingSource(s)}isOverTarget(s,i){return this.internalMonitor.isOverTarget(s,i)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(s){return this.internalMonitor.subscribeToOffsetChange(s)}canDragSource(s){return this.internalMonitor.canDragSource(s)}canDropOnTarget(s){return this.internalMonitor.canDropOnTarget(s)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(s){this.sourceId=null,this.internalMonitor=s.getMonitor()}}let Zp=!1;class vI{receiveHandlerId(s){this.targetId=s}getHandlerId(){return this.targetId}subscribeToStateChange(s,i){return this.internalMonitor.subscribeToStateChange(s,i)}canDrop(){if(!this.targetId)return!1;Ie(!Zp,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Zp=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Zp=!1}}isOver(s){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,s):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(s){this.targetId=null,this.internalMonitor=s.getMonitor()}}function yI(a,s,i){const r=i.getRegistry(),l=r.addTarget(a,s);return[l,()=>r.removeTarget(l)]}function _I(a,s,i){const r=i.getRegistry(),l=r.addSource(a,s);return[l,()=>r.removeSource(l)]}function Pg(a,s,i,r){let l;if(l!==void 0)return!!l;if(a===s)return!0;if(typeof a!="object"||!a||typeof s!="object"||!s)return!1;const u=Object.keys(a),d=Object.keys(s);if(u.length!==d.length)return!1;const p=Object.prototype.hasOwnProperty.bind(s);for(let m=0;m<u.length;m++){const f=u[m];if(!p(f))return!1;const v=a[f],_=s[f];if(l=void 0,l===!1||l===void 0&&v!==_)return!1}return!0}function Bg(a){return a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function wI(a){if(typeof a.type=="string")return;const s=a.type.displayName||a.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${s} into a <div>, or turn it into a drag source or a drop target itself.`)}function CI(a){return(s=null,i=null)=>{if(!kw(s)){const u=s;return a(u,i),u}const r=s;return wI(r),TI(r,i?u=>a(u,i):a)}}function sC(a){const s={};return Object.keys(a).forEach(i=>{const r=a[i];if(i.endsWith("Ref"))s[i]=a[i];else{const l=CI(r);s[i]=()=>l}}),s}function b_(a,s){typeof a=="function"?a(s):a.current=s}function TI(a,s){const i=a.ref;return Ie(typeof i!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),i?kg(a,{ref:r=>{b_(i,r),b_(s,r)}}):kg(a,{ref:s})}class kI{receiveHandlerId(s){this.handlerId!==s&&(this.handlerId=s,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(s){this.dragSourceOptionsInternal=s}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(s){this.dragPreviewOptionsInternal=s}reconnect(){const s=this.reconnectDragSource();this.reconnectDragPreview(s)}reconnectDragSource(){const s=this.dragSource,i=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return i&&this.disconnectDragSource(),this.handlerId?s?(i&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=s,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,s,this.dragSourceOptions)),i):(this.lastConnectedDragSource=s,i):i}reconnectDragPreview(s=!1){const i=this.dragPreview,r=s||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!i){this.lastConnectedDragPreview=i;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=i,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,i,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Pg(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Pg(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(s){this.hooks=sC({dragSource:(i,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,Bg(i)?this.dragSourceRef=i:this.dragSourceNode=i,this.reconnectDragSource()},dragPreview:(i,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,Bg(i)?this.dragPreviewRef=i:this.dragPreviewNode=i,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=s}}class SI{get connectTarget(){return this.dropTarget}reconnect(){const s=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();s&&this.disconnectDropTarget();const i=this.dropTarget;if(this.handlerId){if(!i){this.lastConnectedDropTarget=i;return}s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=i,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,i,this.dropTargetOptions))}}receiveHandlerId(s){s!==this.handlerId&&(this.handlerId=s,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(s){this.dropTargetOptionsInternal=s}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Pg(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(s){this.hooks=sC({dropTarget:(i,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,Bg(i)?this.dropTargetRef=i:this.dropTargetNode=i,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=s}}function Mn(){const{dragDropManager:a}=Xr(Gw);return Ie(a!=null,"Expected drag drop context"),a}function EI(a,s){const i=Mn(),r=rs(()=>new kI(i.getBackend()),[i]);return Ci(()=>(r.dragSourceOptions=a||null,r.reconnect(),()=>r.disconnectDragSource()),[r,a]),Ci(()=>(r.dragPreviewOptions=s||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,s]),r}function II(){const a=Mn();return rs(()=>new bI(a),[a])}class xI{beginDrag(){const s=this.spec,i=this.monitor;let r=null;return typeof s.item=="object"?r=s.item:typeof s.item=="function"?r=s.item(i):r={},r??null}canDrag(){const s=this.spec,i=this.monitor;return typeof s.canDrag=="boolean"?s.canDrag:typeof s.canDrag=="function"?s.canDrag(i):!0}isDragging(s,i){const r=this.spec,l=this.monitor,{isDragging:u}=r;return u?u(l):i===s.getSourceId()}endDrag(){const s=this.spec,i=this.monitor,r=this.connector,{end:l}=s;l&&l(i.getItem(),i),r.reconnect()}constructor(s,i,r){this.spec=s,this.monitor=i,this.connector=r}}function DI(a,s,i){const r=rs(()=>new xI(a,s,i),[s,i]);return Mt(()=>{r.spec=a},[a]),r}function AI(a){return rs(()=>{const s=a.type;return Ie(s!=null,"spec.type must be defined"),s},[a])}function RI(a,s,i){const r=Mn(),l=DI(a,s,i),u=AI(a);Ci(function(){if(u!=null){const[p,m]=_I(u,l,r);return s.receiveHandlerId(p),i.receiveHandlerId(p),m}},[r,s,i,l,u])}function OI(a,s){const i=tC(a);Ie(!i.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.be