iobroker.javascript
Version:
Rules Engine for ioBroker
111 lines (96 loc) • 1.19 MB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-VCnuVxRc.js","./createSvgIcon-DlIk-fDn.js","./iobroker_javascript__loadShare__react__loadShare__-i8pXne9X.js","./_commonjsHelpers-Cpj98o6Y.js","./iobroker_javascript__mf_v__runtimeInit__mf_v__-DZdFIfoQ.js","./index-Cjl4b70e.js","./inheritsLoose-DNrhibGS.js","./preload-helper-BDBacUwf.js","./index-BCK6q-N6.css","./index-C3P3FHiC.js","./ScriptEditorVanillaMonaco-CJS71hoK.js","./ScriptEditor-DhkUQSDz.js","./Save-DXaUpIPM.js","./OpenAiDialog-BX-z5kNr.js","./index-DZ3lKVw8.js"])))=>i.map(i=>d[i]);
import{a as OT,b as MT,r as NT,l as LT}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-DZdFIfoQ.js";import{j as g,c as dt,g as L_,r as B_,_ as Zp,i as gy,P as ee}from"./createSvgIcon-DlIk-fDn.js";import{i as P_,y as BT,_ as PT,a as FT,m as jT,S as my,T as fy}from"./inheritsLoose-DNrhibGS.js";import{R as X,i as H}from"./iobroker_javascript__loadShare__react__loadShare__-i8pXne9X.js";import{i as y,C as Do,I as zs,a as zl,b as zT,c as F_,F as UT,d as HT,e as Yl,f as Qp,g as WT,h as VT,j as GT,k as KT,M as YT,l as JT,m as XT,n as qT,_ as ZT,o as xl,p as QT,q as ek,r as Dl,s as $y,t as tk,u as sk,v as ok,w as ik,x as by,y as vc,z as nk,A as rk,B as ak,D as lk,E as ck,G as uk,H as j_,J as z_,K as U_,L as dk,N as hk,O as pk,P as gk,Q as mk,R as fk}from"./index-Cjl4b70e.js";import{g as hi,c as nn}from"./_commonjsHelpers-Cpj98o6Y.js";import{_ as mn}from"./preload-helper-BDBacUwf.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 H_,vy=P_;H_=vy.createRoot,vy.hydrateRoot;var W_={exports:{}},nt={};/** @license React v17.0.2
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var yc=60103,_c=60106,Or=60107,Mr=60108,Nr=60114,Lr=60109,Br=60110,Pr=60112,Fr=60113,Eg=60120,jr=60115,zr=60116,V_=60121,G_=60122,K_=60117,Y_=60129,J_=60131;if(typeof Symbol=="function"&&Symbol.for){var xt=Symbol.for;yc=xt("react.element"),_c=xt("react.portal"),Or=xt("react.fragment"),Mr=xt("react.strict_mode"),Nr=xt("react.profiler"),Lr=xt("react.provider"),Br=xt("react.context"),Pr=xt("react.forward_ref"),Fr=xt("react.suspense"),Eg=xt("react.suspense_list"),jr=xt("react.memo"),zr=xt("react.lazy"),V_=xt("react.block"),G_=xt("react.server.block"),K_=xt("react.fundamental"),Y_=xt("react.debug_trace_mode"),J_=xt("react.legacy_hidden")}function Cs(a){if(typeof a=="object"&&a!==null){var s=a.$$typeof;switch(s){case yc:switch(a=a.type,a){case Or:case Nr:case Mr:case Fr:case Eg:return a;default:switch(a=a&&a.$$typeof,a){case Br:case Pr:case zr:case jr:case Lr:return a;default:return s}}case _c:return s}}}var $k=Lr,bk=yc,vk=Pr,yk=Or,_k=zr,wk=jr,Ck=_c,Tk=Nr,kk=Mr,Sk=Fr;nt.ContextConsumer=Br;nt.ContextProvider=$k;nt.Element=bk;nt.ForwardRef=vk;nt.Fragment=yk;nt.Lazy=_k;nt.Memo=wk;nt.Portal=Ck;nt.Profiler=Tk;nt.StrictMode=kk;nt.Suspense=Sk;nt.isAsyncMode=function(){return!1};nt.isConcurrentMode=function(){return!1};nt.isContextConsumer=function(a){return Cs(a)===Br};nt.isContextProvider=function(a){return Cs(a)===Lr};nt.isElement=function(a){return typeof a=="object"&&a!==null&&a.$$typeof===yc};nt.isForwardRef=function(a){return Cs(a)===Pr};nt.isFragment=function(a){return Cs(a)===Or};nt.isLazy=function(a){return Cs(a)===zr};nt.isMemo=function(a){return Cs(a)===jr};nt.isPortal=function(a){return Cs(a)===_c};nt.isProfiler=function(a){return Cs(a)===Nr};nt.isStrictMode=function(a){return Cs(a)===Mr};nt.isSuspense=function(a){return Cs(a)===Fr};nt.isValidElementType=function(a){return typeof a=="string"||typeof a=="function"||a===Or||a===Nr||a===Y_||a===Mr||a===Fr||a===Eg||a===J_||typeof a=="object"&&a!==null&&(a.$$typeof===zr||a.$$typeof===jr||a.$$typeof===Lr||a.$$typeof===Br||a.$$typeof===Pr||a.$$typeof===K_||a.$$typeof===V_||a[0]===G_)};nt.typeOf=Cs;W_.exports=nt;var Ek=W_.exports;function Jl(a,s){const i=getComputedStyle(s);if(!i)return;let r=a===ut.Horizontal?s.clientWidth:s.clientHeight;return r!==0?(a===ut.Horizontal?r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight):r-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),r):void 0}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Al(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"]);H.useEffect((()=>(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 Ik=X.forwardRef((({className:a,theme:s,draggerClassName:i,direction:r=ut.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:Ul?l:void 0},{children:g.jsx("div",{className:p},void 0)}),void 0)}));var us;function eg(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 xk(a,s){switch(s.type){case us.SetIsReadyToCompute:return Object.assign(Object.assign({},a),{isReady:s.payload.isReady});case us.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=Jl(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],w=r[f],_=l[f-1],S=i===ut.Horizontal?v.getBoundingClientRect().left:v.getBoundingClientRect().top,T=i===ut.Horizontal?w.getBoundingClientRect().right:w.getBoundingClientRect().bottom,C=i===ut.Horizontal?v.getBoundingClientRect().width+_.getBoundingClientRect().width+w.getBoundingClientRect().width:v.getBoundingClientRect().height+_.getBoundingClientRect().height+w.getBoundingClientRect().height,I=i===ut.Horizontal?_.getBoundingClientRect().width:_.getBoundingClientRect().height,O={idx:f-1,a:v,b:w,gutter:_,parent:u,start:S,end:T,size:C,gutterSize:I,aSizePct:100/r.length,bSizePct:100/r.length};p.push(O)}})),Object.assign(Object.assign({},a),{pairs:p})}case us.StartDragging:{const{gutterIdx:i}=s.payload;return Object.assign(Object.assign({},a),{isDragging:!0,draggingIdx:i})}case us.StopDragging:return Object.assign(Object.assign({},a),{isDragging:!1});case us.CalculateSizes:{const{direction:i,gutterIdx:r}=s.payload,l=a.pairs[r],u=Jl(i,l.parent);if(!u)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const d=l.gutter[i===ut.Horizontal?"clientWidth":"clientHeight"],p=r===0,m=r===a.pairs.length-1,{aGutterSize:f,bGutterSize:v}=eg(d,p,m);let w,_,S,T,C;return i===ut.Horizontal?(w=l.a.getBoundingClientRect().left,_=l.b.getBoundingClientRect().right,T=(l.a.getBoundingClientRect().width+f)/u*100,C=(l.b.getBoundingClientRect().width+v)/u*100,S=l.a.getBoundingClientRect().width+f+v+l.b.getBoundingClientRect().width):(w=l.a.getBoundingClientRect().top,_=l.b.getBoundingClientRect().bottom,T=(l.a.getBoundingClientRect().height+f)/u*100,C=(l.b.getBoundingClientRect().height+v)/u*100,S=l.a.getBoundingClientRect().height+f+v+l.b.getBoundingClientRect().height),a.pairs[r]=Object.assign(Object.assign({},l),{start:w,end:_,size:S,aSizePct:T,bSizePct:C,gutterSize:d}),Object.assign({},a)}default:return a}}function X_(a,s=0,i=[]){return H.Children.toArray(a).reduce(((r,l,u)=>(Ek.isFragment(l)?r.push.apply(r,X_(l.props.children,s+1,i.concat(l.key||u))):H.isValidElement(l)?r.push(H.cloneElement(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"})(us||(us={}));const yy=a=>"changedTouches"in a;var ut,tg;(function(a){a.Horizontal="Horizontal",a.Vertical="Vertical"})(ut||(ut={})),(function(a){a.Light="Light",a.Dark="Dark"})(tg||(tg={}));const Ul=typeof window<"u"&&"ontouchstart"in window;function Cp(a){return a===ut.Horizontal?"col-resize":"row-resize"}const Dk={isReady:!1,isDragging:!1,pairs:[]};function _y({direction:a=ut.Horizontal,minWidths:s=[],minHeights:i=[],initialSizes:r,gutterTheme:l=tg.Dark,gutterClassName:u,draggerClassName:d,children:p,onResizeStarted:m,onResizeFinished:f,classes:v=[]}){const w=X_(p),[_,S]=H.useReducer(xk,Dk),T=H.useRef(null),C=H.useRef([]),I=H.useRef([]);C.current=[],I.current=[];const O=X.useCallback((ce=>{S({type:us.SetIsReadyToCompute,payload:{isReady:ce}})}),[]),A=X.useCallback(((ce,de)=>{S({type:us.StartDragging,payload:{gutterIdx:de}});const J=_.pairs[de];m==null||m(J.idx),J.a.style.userSelect="none",J.b.style.userSelect="none",J.gutter.style.cursor=Cp(ce),J.parent.style.cursor=Cp(ce),document.body.style.cursor=Cp(ce)}),[_.pairs]),R=X.useCallback((()=>{S({type:us.StopDragging});const ce=[];for(let J=0;J<_.pairs.length;J++){const we=_.pairs[J],ge=Jl(a,we.parent);if(ge===void 0)throw new Error("Cannot call the 'onResizeFinished' callback - parentSize is undefined");if(we.gutterSize===void 0)throw new Error("Cannot call 'onResizeFinished' callback - gutterSize is undefined");const Fe=J===0,Y=J===_.pairs.length-1,et=we.a.getBoundingClientRect()[a===ut.Horizontal?"width":"height"],{aGutterSize:Z,bGutterSize:se}=eg(we.gutterSize,Fe,Y),F=(et+Z)/ge*100;if(ce.push(F),Y){const V=(we.b.getBoundingClientRect()[a===ut.Horizontal?"width":"height"]+se)/ge*100;ce.push(V)}}if(_.draggingIdx===void 0)throw new Error("Could not reset cursor and user-select because 'state.draggingIdx' is undefined");const de=_.pairs[_.draggingIdx];f==null||f(de.idx,ce),de.a.style.userSelect="",de.b.style.userSelect="",de.gutter.style.cursor="",de.parent.style.cursor="",document.body.style.cursor=""}),[_.draggingIdx,_.pairs,a]),q=X.useCallback(((ce,de)=>{S({type:us.CalculateSizes,payload:{direction:ce,gutterIdx:de}})}),[]),re=X.useCallback(((ce,de,J)=>{S({type:us.CreatePairs,payload:{direction:ce,children:de,gutters:J}})}),[]),ie=X.useCallback(((ce,de,J,we)=>{const ge=de[0].parentNode;if(!ge)throw new Error("Cannot set initial sizes - parent is undefined");if(Jl(ce,ge)===void 0)throw new Error("Cannot set initial sizes - parent has undefined size");de.forEach(((Fe,Y)=>{const et=Y===0,Z=Y===de.length-1;let se,F=0;de.length>1&&(F=J[Z?Y-1:Y].getBoundingClientRect()[ce===ut.Horizontal?"width":"height"],F=et||Z?F/2:F),se=we&&Y<we.length?`calc(${we[Y]}% - ${F}px)`:`calc(${100/de.length}% - ${F}px)`,ce===ut.Horizontal?(Fe.style.width=se,Fe.style.height="100%"):(Fe.style.height=se,Fe.style.width="100%")}))}),[]),$e=X.useCallback(((ce,de)=>{if(_.draggingIdx===void 0)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const J=_.pairs[_.draggingIdx];if(J.size===void 0)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(J.gutterSize===void 0)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const we=J.aSizePct+J.bSizePct,ge=de/J.size*we,Fe=we-de/J.size*we,Y=_.draggingIdx===0,et=_.draggingIdx===_.pairs.length-1,{aGutterSize:Z,bGutterSize:se}=eg(J.gutterSize,Y,et),F=`calc(${ge}% - ${Z}px)`,V=`calc(${Fe}% - ${se}px)`;ce===ut.Horizontal?(J.a.style.width=F,J.b.style.width=V):(J.a.style.height=F,J.b.style.height=V)}),[_.draggingIdx,_.pairs,a]),U=X.useCallback(((ce,de,J)=>{if(!_.isDragging)return;if(_.draggingIdx===void 0)throw new Error("Cannot drag - 'draggingIdx' is undefined");const we=_.pairs[_.draggingIdx];if(we.start===void 0)throw new Error("Cannot drag - 'pair.start' is undefined");if(we.size===void 0)throw new Error("Cannot drag - 'pair.size' is undefined");if(we.gutterSize===void 0)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let ge=(function(et,Z){const se=yy(Z)?Z.changedTouches[0]:Z;return et===ut.Horizontal?se.clientX:se.clientY})(de,ce)-we.start,Fe=16,Y=16;J.length>_.draggingIdx&&(Fe=J[_.draggingIdx]),J.length>=_.draggingIdx+1&&(Y=J[_.draggingIdx+1]),ge<we.gutterSize+Fe&&(ge=we.gutterSize+Fe),ge>=we.size-(we.gutterSize+Y)&&(ge=we.size-(we.gutterSize+Y)),$e(de,ge)}),[_.isDragging,_.draggingIdx,_.pairs,$e]),Me=()=>{if(_.isDragging){if(_.draggingIdx===void 0)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");q(a,_.draggingIdx),R()}},Ne=ce=>{_.isDragging&&(yy(ce)&&ce.preventDefault(),U(ce,a,a===ut.Horizontal?s:i))};function qe(ce,de){if(!ce.current)throw new Error("Can't add element to ref object - ref isn't initialized");de&&!ce.current.includes(de)&&ce.current.push(de)}return Al("mouseup",Me,[_.isDragging,R]),Al("mousemove",Ne,[a,_.isDragging,U,s,i]),Al("touchend",Me,[_.isDragging,R],{condition:Ul}),Al("touchmove",Ne,[a,_.isDragging,U,s,i],{condition:Ul,passive:!Ul}),H.useEffect((function(){if(!T.current)return;const ce=T.current.parentElement;if(!ce)return;const de=new ResizeObserver((()=>{const J=getComputedStyle(ce),we=a===ut.Horizontal?ce.clientWidth:ce.clientHeight;O(!!J&&!!we)}));return de.observe(ce),()=>{de.disconnect()}}),[T.current,a]),H.useEffect((function(){if(_.isReady&&(!C.current||C.current[0].offsetParent)){if(!C.current||!I.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");w.length<=1?ie(a,C.current,I.current,r):(ie(a,C.current,I.current,r),re(a,C.current,I.current))}}),[p,_.isReady,a,ie,re,r]),g.jsx("div",Object.assign({className:`__dbk__container ${a}`,ref:T},{children:_.isReady&&w.map(((ce,de)=>g.jsxs(X.Fragment,{children:[g.jsx("div",Object.assign({ref:J=>qe(C,J),className:"__dbk__child-wrapper "+(de<v.length?v[de]:"")},{children:ce}),void 0),de<w.length-1&&g.jsx(Ik,{ref:J=>qe(I,J),className:u,theme:l,draggerClassName:d,direction:a,onDragging:()=>{return q(a,J=de),void A(a,J);var J}},void 0)]},de)))}),void 0)}const Ak=dt([g.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),g.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime"),Rk=dt(g.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox"),Ok=dt(g.jsx("path",{d:"M4 8h4V4H4zm6 12h4v-4h-4zm-6 0h4v-4H4zm0-6h4v-4H4zm6 0h4v-4h-4zm6-10v4h4V4zm-6 4h4V4h-4zm6 6h4v-4h-4zm0 6h4v-4h-4z"}),"Apps"),Mk=dt(g.jsx("path",{d:"M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54s-2.94 8.27-7 9.54c.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2"}),"Brightness3"),Nk=dt(g.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z"}),"BugReport"),Lk=dt(g.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm-1 4 6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2zm-1 7h5.5L14 6.5z"}),"FileCopy"),Bk=dt(g.jsx("path",{d:"M7 2v11h3v9l7-12h-4l4-8z"}),"FlashOn"),Pk=dt(g.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),Fk=dt(g.jsx("path",{d:"M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"}),"Functions"),q_=dt(g.jsx("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),jk=dt(g.jsx("path",{d:"M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z"}),"Input"),wy=dt(g.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"}),"Lock"),zk=dt(g.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),Uk=dt(g.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5"}),"Palette"),Hl=dt(g.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"Pause"),sg=dt(g.jsx("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),Hk=dt(g.jsx("path",{d:"M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4z"}),"PlayForWork"),Wk=dt(g.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search"),Vk=dt(g.jsx("path",{d:"M10.59 9.17 5.41 4 4 5.41l5.17 5.17zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4zm.33 9.41-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04z"}),"Shuffle"),Gk=dt(g.jsx("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage"),Kk=dt(g.jsx("path",{d:"M14 17H4v2h10zm6-8H4v2h16zM4 15h16v-2H4zM4 5v2h16V5z"}),"Subject"),Yk=dt(g.jsx("path",{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99zM9 3 5 6.99h3V14h2V6.99h3z"}),"SwapVert"),Jk=dt(g.jsx("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10z"}),"UnfoldLess"),Xk=dt(g.jsx("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore"),{loadShare:qk}=MT,{initPromise:Zk}=OT,Qk=Zk.then(a=>qk("@iobroker/adapter-react-v5",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),eS=await Qk.then(a=>a());var b=eS;const Z_=H.createContext({dragDropManager:void 0});function Ir(a){"@babel/helpers - typeof";return Ir=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},Ir(a)}function tS(a,s){if(Ir(a)!="object"||!a)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var r=i.call(a,s);if(Ir(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function sS(a){var s=tS(a,"string");return Ir(s)=="symbol"?s:s+""}function oS(a,s,i){return(s=sS(s))in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function rs(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 Cy=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Ty=function(){return Math.random().toString(36).substring(7).split("").join(".")},ky={INIT:"@@redux/INIT"+Ty(),REPLACE:"@@redux/REPLACE"+Ty()};function iS(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 Q_(a,s,i){var r;if(typeof s=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(rs(0));if(typeof s=="function"&&typeof i>"u"&&(i=s,s=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(rs(1));return i(Q_)(a,s)}if(typeof a!="function")throw new Error(rs(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(rs(3));return u}function w(C){if(typeof C!="function")throw new Error(rs(4));if(m)throw new Error(rs(5));var I=!0;return f(),p.push(C),function(){if(I){if(m)throw new Error(rs(6));I=!1,f();var A=p.indexOf(C);p.splice(A,1),d=null}}}function _(C){if(!iS(C))throw new Error(rs(7));if(typeof C.type>"u")throw new Error(rs(8));if(m)throw new Error(rs(9));try{m=!0,u=l(u,C)}finally{m=!1}for(var I=d=p,O=0;O<I.length;O++){var A=I[O];A()}return C}function S(C){if(typeof C!="function")throw new Error(rs(10));l=C,_({type:ky.REPLACE})}function T(){var C,I=w;return C={subscribe:function(A){if(typeof A!="object"||A===null)throw new Error(rs(11));function R(){A.next&&A.next(v())}R();var q=I(R);return{unsubscribe:q}}},C[Cy]=function(){return this},C}return _({type:ky.INIT}),r={dispatch:_,subscribe:w,getState:v,replaceReducer:S},r[Cy]=T,r}function De(a,s,...i){if(nS()&&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 nS(){return typeof process<"u"&&!0}function rS(a,s,i){return s.split(".").reduce((r,l)=>r&&r[l]?r[l]:i||null,a)}function aS(a,s){return a.filter(i=>i!==s)}function ew(a){return typeof a=="object"}function lS(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 cS(a,s){return a.filter(i=>s.indexOf(i)>-1)}const Ig="dnd-core/INIT_COORDS",wc="dnd-core/BEGIN_DRAG",xg="dnd-core/PUBLISH_DRAG_SOURCE",Cc="dnd-core/HOVER",Tc="dnd-core/DROP",kc="dnd-core/END_DRAG";function Sy(a,s){return{type:Ig,payload:{sourceClientOffset:s||null,clientOffset:a||null}}}const uS={type:Ig,payload:{clientOffset:null,sourceClientOffset:null}};function dS(a){return function(i=[],r={publishSource:!0}){const{publishSource:l=!0,clientOffset:u,getSourceClientOffset:d}=r,p=a.getMonitor(),m=a.getRegistry();a.dispatch(Sy(u)),hS(i,p,m);const f=mS(i,p);if(f==null){a.dispatch(uS);return}let v=null;if(u){if(!d)throw new Error("getSourceClientOffset must be defined");pS(d),v=d(f)}a.dispatch(Sy(u,v));const _=m.getSource(f).beginDrag(p,f);if(_==null)return;gS(_),m.pinSource(f);const S=m.getSourceType(f);return{type:wc,payload:{itemType:S,item:_,sourceId:f,clientOffset:u||null,sourceClientOffset:v||null,isSourcePublic:!!l}}}}function hS(a,s,i){De(!s.isDragging(),"Cannot call beginDrag while dragging."),a.forEach(function(r){De(i.getSource(r),"Expected sourceIds to be registered.")})}function pS(a){De(typeof a=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function gS(a){De(ew(a),"Item must be an object.")}function mS(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 fS(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function $S(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){fS(a,l,i[l])})}return a}function bS(a){return function(i={}){const r=a.getMonitor(),l=a.getRegistry();vS(r),wS(r).forEach((d,p)=>{const m=yS(d,p,l,r),f={type:Tc,payload:{dropResult:$S({},i,m)}};a.dispatch(f)})}}function vS(a){De(a.isDragging(),"Cannot call drop while not dragging."),De(!a.didDrop(),"Cannot call drop twice during one drag operation.")}function yS(a,s,i,r){const l=i.getTarget(a);let u=l?l.drop(r,a):void 0;return _S(u),typeof u>"u"&&(u=s===0?{}:r.getDropResult()),u}function _S(a){De(typeof a>"u"||ew(a),"Drop result must either be an object or undefined.")}function wS(a){const s=a.getTargetIds().filter(a.canDropOnTarget,a);return s.reverse(),s}function CS(a){return function(){const i=a.getMonitor(),r=a.getRegistry();TS(i);const l=i.getSourceId();return l!=null&&(r.getSource(l,!0).endDrag(i,l),r.unpinSource()),{type:kc}}}function TS(a){De(a.isDragging(),"Cannot call endDrag while not dragging.")}function og(a,s){return s===null?a===null:Array.isArray(a)?a.some(i=>i===s):a===s}function kS(a){return function(i,{clientOffset:r}={}){SS(i);const l=i.slice(0),u=a.getMonitor(),d=a.getRegistry(),p=u.getItemType();return IS(l,d,p),ES(l,u,d),xS(l,u,d),{type:Cc,payload:{targetIds:l,clientOffset:r||null}}}}function SS(a){De(Array.isArray(a),"Expected targetIds to be an array.")}function ES(a,s,i){De(s.isDragging(),"Cannot call hover while not dragging."),De(!s.didDrop(),"Cannot call hover after drop.");for(let r=0;r<a.length;r++){const l=a[r];De(a.lastIndexOf(l)===r,"Expected targetIds to be unique in the passed array.");const u=i.getTarget(l);De(u,"Expected targetIds to be registered.")}}function IS(a,s,i){for(let r=a.length-1;r>=0;r--){const l=a[r],u=s.getTargetType(l);og(u,i)||a.splice(r,1)}}function xS(a,s,i){a.forEach(function(r){i.getTarget(r).hover(s,r)})}function DS(a){return function(){if(a.getMonitor().isDragging())return{type:xg}}}function AS(a){return{beginDrag:dS(a),publishDragSource:DS(a),hover:kS(a),drop:bS(a),endDrag:CS(a)}}class RS{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=AS(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 OS(a,s){return{x:a.x+s.x,y:a.y+s.y}}function tw(a,s){return{x:a.x-s.x,y:a.y-s.y}}function MS(a){const{clientOffset:s,initialClientOffset:i,initialSourceClientOffset:r}=a;return!s||!i||!r?null:tw(OS(s,r),i)}function NS(a){const{clientOffset:s,initialClientOffset:i}=a;return!s||!i?null:tw(s,i)}const wr=[],Dg=[];wr.__IS_NONE__=!0;Dg.__IS_ALL__=!0;function LS(a,s){return a===wr?!1:a===Dg||typeof s>"u"?!0:cS(s,a).length>0}class BS{subscribeToStateChange(s,i={}){const{handlerIds:r}=i;De(typeof s=="function","listener must be a function."),De(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&&!LS(d.dirtyHandlerIds,r)||s()}finally{l=p}};return this.store.subscribe(u)}subscribeToOffsetChange(s){De(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 De(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(De(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 og(r,l)&&i.canDrop(this,s)}isDragging(){return!!this.getItemType()}isDraggingSource(s){if(!s)return!1;const i=this.registry.getSource(s,!0);if(De(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&&!og(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 MS(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return NS(this.store.getState().dragOffset)}constructor(s,i){this.store=s,this.registry=i}}const Ey=typeof global<"u"?global:self,sw=Ey.MutationObserver||Ey.WebKitMutationObserver;function ow(a){return function(){const i=setTimeout(l,0),r=setInterval(l,50);function l(){clearTimeout(i),clearInterval(r),a()}}}function PS(a){let s=1;const i=new sw(a),r=document.createTextNode("");return i.observe(r,{characterData:!0}),function(){s=-s,r.data=s}}const FS=typeof sw=="function"?PS:ow;class jS{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=FS(this.flush),this.requestErrorThrow=ow(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class zS{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 US{create(s){const i=this.freeTasks,r=i.length?i.pop():new zS(this.onError,l=>i[i.length]=l);return r.task=s,r}constructor(s){this.onError=s,this.freeTasks=[]}}const iw=new jS,HS=new US(iw.registerPendingError);function WS(a){iw.enqueueTask(HS.create(a))}const Ag="dnd-core/ADD_SOURCE",Rg="dnd-core/ADD_TARGET",Og="dnd-core/REMOVE_SOURCE",Sc="dnd-core/REMOVE_TARGET";function VS(a){return{type:Ag,payload:{sourceId:a}}}function GS(a){return{type:Rg,payload:{targetId:a}}}function KS(a){return{type:Og,payload:{sourceId:a}}}function YS(a){return{type:Sc,payload:{targetId:a}}}function JS(a){De(typeof a.canDrag=="function","Expected canDrag to be a function."),De(typeof a.beginDrag=="function","Expected beginDrag to be a function."),De(typeof a.endDrag=="function","Expected endDrag to be a function.")}function XS(a){De(typeof a.canDrop=="function","Expected canDrop to be a function."),De(typeof a.hover=="function","Expected hover to be a function."),De(typeof a.drop=="function","Expected beginDrag to be a function.")}function ig(a,s){if(s&&Array.isArray(a)){a.forEach(i=>ig(i,!1));return}De(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 cs;(function(a){a.SOURCE="SOURCE",a.TARGET="TARGET"})(cs||(cs={}));let qS=0;function ZS(){return qS++}function QS(a){const s=ZS().toString();switch(a){case cs.SOURCE:return`S${s}`;case cs.TARGET:return`T${s}`;default:throw new Error(`Unknown Handler Role: ${a}`)}}function Iy(a){switch(a[0]){case"S":return cs.SOURCE;case"T":return cs.TARGET;default:throw new Error(`Cannot parse handler ID: ${a}`)}}function xy(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 eE{addSource(s,i){ig(s),JS(i);const r=this.addHandler(cs.SOURCE,s,i);return this.store.dispatch(VS(r)),r}addTarget(s,i){ig(s,!0),XS(i);const r=this.addHandler(cs.TARGET,s,i);return this.store.dispatch(GS(r)),r}containsHandler(s){return xy(this.dragSources,s)||xy(this.dropTargets,s)}getSource(s,i=!1){return De(this.isSourceId(s),"Expected a valid source ID."),i&&s===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(s)}getTarget(s){return De(this.isTargetId(s),"Expected a valid target ID."),this.dropTargets.get(s)}getSourceType(s){return De(this.isSourceId(s),"Expected a valid source ID."),this.types.get(s)}getTargetType(s){return De(this.isTargetId(s),"Expected a valid target ID."),this.types.get(s)}isSourceId(s){return Iy(s)===cs.SOURCE}isTargetId(s){return Iy(s)===cs.TARGET}removeSource(s){De(this.getSource(s),"Expected an existing source."),this.store.dispatch(KS(s)),WS(()=>{this.dragSources.delete(s),this.types.delete(s)})}removeTarget(s){De(this.getTarget(s),"Expected an existing target."),this.store.dispatch(YS(s)),this.dropTargets.delete(s),this.types.delete(s)}pinSource(s){const i=this.getSource(s);De(i,"Expected an existing source."),this.pinnedSourceId=s,this.pinnedSource=i}unpinSource(){De(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(s,i,r){const l=QS(s);return this.types.set(l,i),s===cs.SOURCE?this.dragSources.set(l,r):s===cs.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 tE=(a,s)=>a===s;function sE(a,s){return!a&&!s?!0:!a||!s?!1:a.x===s.x&&a.y===s.y}function oE(a,s,i=tE){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 iE(a=wr,s){switch(s.type){case Cc:break;case Ag:case Rg:case Sc:case Og:return wr;case wc:case xg:case kc:case Tc:default:return Dg}const{targetIds:i=[],prevTargetIds:r=[]}=s.payload,l=lS(i,r);if(!(l.length>0||!oE(i,r)))return wr;const d=r[r.length-1],p=i[i.length-1];return d!==p&&(d&&l.push(d),p&&l.push(p)),l}function nE(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function rE(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){nE(a,l,i[l])})}return a}const Dy={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function aE(a=Dy,s){const{payload:i}=s;switch(s.type){case Ig:case wc:return{initialSourceClientOffset:i.sourceClientOffset,initialClientOffset:i.clientOffset,clientOffset:i.clientOffset};case Cc:return sE(a.clientOffset,i.clientOffset)?a:rE({},a,{clientOffset:i.clientOffset});case kc:case Tc:return Dy;default:return a}}function lE(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function Zi(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){lE(a,l,i[l])})}return a}const cE={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function uE(a=cE,s){const{payload:i}=s;switch(s.type){case wc:return Zi({},a,{itemType:i.itemType,item:i.item,sourceId:i.sourceId,isSourcePublic:i.isSourcePublic,dropResult:null,didDrop:!1});case xg:return Zi({},a,{isSourcePublic:!0});case Cc:return Zi({},a,{targetIds:i.targetIds});case Sc:return a.targetIds.indexOf(i.targetId)===-1?a:Zi({},a,{targetIds:aS(a.targetIds,i.targetId)});case Tc:return Zi({},a,{dropResult:i.dropResult,didDrop:!0,targetIds:[]});case kc:return Zi({},a,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return a}}function dE(a=0,s){switch(s.type){case Ag:case Rg:return a+1;case Og:case Sc:return a-1;default:return a}}function hE(a=0){return a+1}function pE(a,s,i){return s in a?Object.defineProperty(a,s,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[s]=i,a}function gE(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){pE(a,l,i[l])})}return a}function mE(a={},s){return{dirtyHandlerIds:iE(a.dirtyHandlerIds,{type:s.type,payload:gE({},s.payload,{prevTargetIds:rS(a,"dragOperation.targetIds",[])})}),dragOffset:aE(a.dragOffset,s),refCount:dE(a.refCount,s),dragOperation:uE(a.dragOperation,s),stateId:hE(a.stateId)}}function fE(a,s=void 0,i={},r=!1){const l=$E(r),u=new BS(l,new eE(l)),d=new RS(l,u),p=a(d,s,i);return d.receiveBackend(p),d}function $E(a){const s=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Q_(mE,a&&s&&s({name:"dnd-core",instanceId:"dnd-core"}))}function bE(a,s){if(a==null)return{};var i=vE(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 vE(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 Ay=0;const Wl=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var nw=H.memo(function(s){var{children:i}=s,r=bE(s,["children"]);const[l,u]=yE(r);return H.useEffect(()=>{if(u){const d=rw();return++Ay,()=>{--Ay===0&&(d[Wl]=null)}}},[]),g.jsx(Z_.Provider,{value:l,children:i})});function yE(a){if("manager"in a)return[{dragDropManager:a.manager},!1];const s=_E(a.backend,a.context,a.options,a.debugMode),i=!a.context;return[s,i]}function _E(a,s=rw(),i,r){const l=s;return l[Wl]||(l[Wl]={dragDropManager:fE(a,s,i,r)}),l[Wl]}function rw(){return typeof global<"u"?global:window}var wE=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 CE=hi(wE),ci=typeof window<"u"?H.useLayoutEffect:H.useEffect;function TE(a,s,i){const[r,l]=H.useState(()=>s(a)),u=H.useCallback(()=>{const d=s(a);CE(r,d)||(l(d),i&&i())},[r,a,i]);return ci(u),[r,u]}function kE(a,s,i){const[r,l]=TE(a,s,i);return ci(function(){const d=a.getHandlerId();if(d!=null)return a.subscribeToStateChange(l,{handlerIds:[d]})},[a,l]),r}function aw(a,s,i){return kE(s,a||(()=>({})),()=>i.reconnect())}function lw(a,s){const i=[];return typeof a!="function"&&i.push(a),H.useMemo(()=>typeof a=="function"?a():a,i)}function SE(a){return H.useMemo(()=>a.hooks.dragSource(),[a])}function EE(a){return H.useMemo(()=>a.hooks.dragPreview(),[a])}let Tp=!1,kp=!1;class IE{receiveHandlerId(s){this.sourceId=s}getHandlerId(){return this.sourceId}canDrag(){De(!Tp,"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 Tp=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Tp=!1}}isDragging(){if(!this.sourceId)return!1;De(!kp,"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 kp=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{kp=!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 Sp=!1;class xE{receiveHandlerId(s){this.targetId=s}getHandlerId(){return this.targetId}subscribeToStateChange(s,i){return this.internalMonitor.subscribeToStateChange(s,i)}canDrop(){if(!this.targetId)return!1;De(!Sp,"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 Sp=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Sp=!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 DE(a,s,i){const r=i.getRegistry(),l=r.addTarget(a,s);return[l,()=>r.removeTarget(l)]}function AE(a,s,i){const r=i.getRegistry(),l=r.addSource(a,s);return[l,()=>r.removeSource(l)]}function ng(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],w=s[f];if(l=void 0,l===!1||l===void 0&&v!==w)return!1}return!0}function rg(a){return a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function RE(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 OE(a){return(s=null,i=null)=>{if(!H.isValidElement(s)){const u=s;return a(u,i),u}const r=s;return RE(r),ME(r,i?u=>a(u,i):a)}}function cw(a){const s={};return Object.keys(a).forEach(i=>{const r=a[i];if(i.endsWith("Ref"))s[i]=a[i];else{const l=OE(r);s[i]=()=>l}}),s}function Ry(a,s){typeof a=="function"?a(s):a.current=s}function ME(a,s){const i=a.ref;return De(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?H.cloneElement(a,{ref:r=>{Ry(i,r),Ry(s,r)}}):H.cloneElement(a,{ref:s})}class NE{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!ng(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ng(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(){retu