@zhin.js/console 1.0.39 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/client/src/components/PluginConfigForm/index.tsx +20 -5
- package/client/src/components/PluginConfigForm/types.ts +1 -0
- package/client/src/main.tsx +22 -6
- package/client/src/pages/dashboard-config.tsx +421 -0
- package/client/src/pages/dashboard-env.tsx +219 -0
- package/dist/client.js +1 -1
- package/dist/index.js +137 -6
- package/dist/style.css +2 -2
- package/lib/index.js +204 -81
- package/lib/websocket.d.ts +0 -9
- package/lib/websocket.js +174 -56
- package/package.json +7 -6
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as Y from"./react.js";import ln,{useMemo as xt,useCallback as L,useEffect as ft}from"./react.js";import{jsx as tt}from"./react-jsx-runtime.js";import{createBrowserRouter as un,RouterProvider as dn,Outlet as fn}from"./react-router.js";import{Link as Fi,Outlet as Li,useNavigate as $i,useOutlet as qi,useParams as Ui}from"./react-router.js";function kr(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=kr(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function pn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=kr(e))&&(n&&(n+=" "),n+=t);return n}const hn=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},mn=(e,t)=>({classGroupId:e,validator:t}),_r=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ze="-",Xt=[],gn="arbitrary..",yn=e=>{const t=wn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return bn(i);const c=i.split(ze),a=c[0]===""&&c.length>1?1:0;return xr(c,a,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const a=n[i],l=r[i];return a?l?hn(l,a):a:l||Xt}return r[i]||Xt}}},xr=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const l=xr(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const c=t===0?e.join(ze):e.slice(t).join(ze),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(c))return u.classGroupId}},bn=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?gn+n:void 0})(),wn=e=>{const{theme:t,classGroups:r}=e;return vn(r,t)},vn=(e,t)=>{const r=_r();for(const n in e){const o=e[n];Ct(o,r,n,t)}return r},Ct=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];Sn(i,t,r,n)}},Sn=(e,t,r,n)=>{if(typeof e=="string"){kn(e,t,r);return}if(typeof e=="function"){_n(e,t,r,n);return}xn(e,t,r,n)},kn=(e,t,r)=>{const n=e===""?t:Cr(t,e);n.classGroupId=r},_n=(e,t,r,n)=>{if(Cn(e)){Ct(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(mn(r,e))},xn=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[c,a]=o[i];Ct(a,Cr(t,c),r,n)}},Cr=(e,t)=>{let r=e;const n=t.split(ze),o=n.length;for(let s=0;s<o;s++){const i=n[s];let c=r.nextPart.get(i);c||(c=_r(),r.nextPart.set(i,c)),r=c}return r},Cn=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,En=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},pt="!",Yt=":",Rn=[],Jt=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),On=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,c=0,a=0,l;const u=o.length;for(let g=0;g<u;g++){const v=o[g];if(i===0&&c===0){if(v===Yt){s.push(o.slice(a,g)),a=g+1;continue}if(v==="/"){l=g;continue}}v==="["?i++:v==="]"?i--:v==="("?c++:v===")"&&c--}const d=s.length===0?o:o.slice(a);let m=d,y=!1;d.endsWith(pt)?(m=d.slice(0,-1),y=!0):d.startsWith(pt)&&(m=d.slice(1),y=!0);const x=l&&l>a?l-a:void 0;return Jt(s,y,m,x)};if(t){const o=t+Yt,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Jt(Rn,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},Pn=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],c=i[0]==="[",a=t.has(i);c||a?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},An=e=>({cache:En(e.cacheSize),parseClassName:On(e),sortModifiers:Pn(e),...yn(e)}),Tn=/\s+/,In=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(Tn);let a="";for(let l=c.length-1;l>=0;l-=1){const u=c[l],{isExternal:d,modifiers:m,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:g}=r(u);if(d){a=u+(a.length>0?" "+a:a);continue}let v=!!g,E=n(v?x.substring(0,g):x);if(!E){if(!v){a=u+(a.length>0?" "+a:a);continue}if(E=n(x),!E){a=u+(a.length>0?" "+a:a);continue}v=!1}const O=m.length===0?"":m.length===1?m[0]:s(m).join(":"),S=y?O+pt:O,b=S+E;if(i.indexOf(b)>-1)continue;i.push(b);const w=o(E,v);for(let _=0;_<w.length;++_){const R=w[_];i.push(S+R)}a=u+(a.length>0?" "+a:a)}return a},Mn=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Er(r))&&(o&&(o+=" "),o+=n);return o},Er=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Er(e[n]))&&(r&&(r+=" "),r+=t);return r},zn=(e,...t)=>{let r,n,o,s;const i=a=>{const l=t.reduce((u,d)=>d(u),e());return r=An(l),n=r.cache.get,o=r.cache.set,s=c,c(a)},c=a=>{const l=n(a);if(l)return l;const u=In(a,r);return o(a,u),u};return s=i,(...a)=>s(Mn(...a))},Nn=[],T=e=>{const t=r=>r[e]||Nn;return t.isThemeGetter=!0,t},Rr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Or=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dn=/^\d+\/\d+$/,jn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ln=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>Dn.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),X=e=>!!e&&Number.isInteger(Number(e)),rt=e=>e.endsWith("%")&&C(e.slice(0,-1)),G=e=>jn.test(e),qn=()=>!0,Un=e=>Wn.test(e)&&!Fn.test(e),Pr=()=>!1,Gn=e=>Ln.test(e),Bn=e=>$n.test(e),Vn=e=>!p(e)&&!h(e),Hn=e=>ae(e,Ir,Pr),p=e=>Rr.test(e),Q=e=>ae(e,Mr,Un),nt=e=>ae(e,Qn,C),Qt=e=>ae(e,Ar,Pr),Kn=e=>ae(e,Tr,Bn),xe=e=>ae(e,zr,Gn),h=e=>Or.test(e),ue=e=>ce(e,Mr),Xn=e=>ce(e,Zn),Zt=e=>ce(e,Ar),Yn=e=>ce(e,Ir),Jn=e=>ce(e,Tr),Ce=e=>ce(e,zr,!0),ae=(e,t,r)=>{const n=Rr.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ce=(e,t,r=!1)=>{const n=Or.exec(e);return n?n[1]?t(n[1]):r:!1},Ar=e=>e==="position"||e==="percentage",Tr=e=>e==="image"||e==="url",Ir=e=>e==="length"||e==="size"||e==="bg-size",Mr=e=>e==="length",Qn=e=>e==="number",Zn=e=>e==="family-name",zr=e=>e==="shadow",eo=()=>{const e=T("color"),t=T("font"),r=T("text"),n=T("font-weight"),o=T("tracking"),s=T("leading"),i=T("breakpoint"),c=T("container"),a=T("spacing"),l=T("radius"),u=T("shadow"),d=T("inset-shadow"),m=T("text-shadow"),y=T("drop-shadow"),x=T("blur"),g=T("perspective"),v=T("aspect"),E=T("ease"),O=T("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...b(),h,p],_=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],f=()=>[h,p,a],A=()=>[oe,"full","auto",...f()],le=()=>[X,"none","subgrid",h,p],be=()=>["auto",{span:["full",X,h,p]},X,h,p],we=()=>[X,"auto",h,p],Ut=()=>["auto","min","max","fr",h,p],Qe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ne=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...f()],J=()=>[oe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...f()],k=()=>[e,h,p],Gt=()=>[...b(),Zt,Qt,{position:[h,p]}],Bt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Vt=()=>["auto","cover","contain",Yn,Hn,{size:[h,p]}],Ze=()=>[rt,ue,Q],z=()=>["","none","full",l,h,p],D=()=>["",C,ue,Q],ve=()=>["solid","dashed","dotted","double"],Ht=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[C,rt,Zt,Qt],Kt=()=>["","none",x,h,p],Se=()=>["none",C,h,p],ke=()=>["none",C,h,p],et=()=>[C,h,p],_e=()=>[oe,"full",...f()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[G],breakpoint:[G],color:[qn],container:[G],"drop-shadow":[G],ease:["in","out","in-out"],font:[Vn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[G],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[G],shadow:[G],spacing:["px",C],text:[G],"text-shadow":[G],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oe,p,h,v]}],container:["container"],columns:[{columns:[C,p,h,c]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[X,"auto",h,p]}],basis:[{basis:[oe,"full","auto",c,...f()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,oe,"auto","initial","none",p]}],grow:[{grow:["",C,h,p]}],shrink:[{shrink:["",C,h,p]}],order:[{order:[X,"first","last","none",h,p]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":we()}],"col-end":[{"col-end":we()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":we()}],"row-end":[{"row-end":we()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ut()}],"auto-rows":[{"auto-rows":Ut()}],gap:[{gap:f()}],"gap-x":[{"gap-x":f()}],"gap-y":[{"gap-y":f()}],"justify-content":[{justify:[...Qe(),"normal"]}],"justify-items":[{"justify-items":[...ne(),"normal"]}],"justify-self":[{"justify-self":["auto",...ne()]}],"align-content":[{content:["normal",...Qe()]}],"align-items":[{items:[...ne(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ne(),{baseline:["","last"]}]}],"place-content":[{"place-content":Qe()}],"place-items":[{"place-items":[...ne(),"baseline"]}],"place-self":[{"place-self":["auto",...ne()]}],p:[{p:f()}],px:[{px:f()}],py:[{py:f()}],ps:[{ps:f()}],pe:[{pe:f()}],pt:[{pt:f()}],pr:[{pr:f()}],pb:[{pb:f()}],pl:[{pl:f()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":f()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":f()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[c,"screen",...J()]}],"min-w":[{"min-w":[c,"screen","none",...J()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,ue,Q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,h,nt]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rt,p]}],"font-family":[{font:[Xn,p,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,h,p]}],"line-clamp":[{"line-clamp":[C,"none",h,nt]}],leading:[{leading:[s,...f()]}],"list-image":[{"list-image":["none",h,p]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",h,p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",h,Q]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[C,"auto",h,p]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:f()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h,p]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h,p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Gt()}],"bg-repeat":[{bg:Bt()}],"bg-size":[{bg:Vt()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},X,h,p],radial:["",h,p],conic:[X,h,p]},Jn,Kn]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:Ze()}],"gradient-via-pos":[{via:Ze()}],"gradient-to-pos":[{to:Ze()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,h,p]}],"outline-w":[{outline:["",C,ue,Q]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,Ce,xe]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,Ce,xe]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[C,Q]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",m,Ce,xe]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[C,h,p]}],"mix-blend":[{"mix-blend":[...Ht(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ht()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[h,p]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Gt()}],"mask-repeat":[{mask:Bt()}],"mask-size":[{mask:Vt()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",h,p]}],filter:[{filter:["","none",h,p]}],blur:[{blur:Kt()}],brightness:[{brightness:[C,h,p]}],contrast:[{contrast:[C,h,p]}],"drop-shadow":[{"drop-shadow":["","none",y,Ce,xe]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",C,h,p]}],"hue-rotate":[{"hue-rotate":[C,h,p]}],invert:[{invert:["",C,h,p]}],saturate:[{saturate:[C,h,p]}],sepia:[{sepia:["",C,h,p]}],"backdrop-filter":[{"backdrop-filter":["","none",h,p]}],"backdrop-blur":[{"backdrop-blur":Kt()}],"backdrop-brightness":[{"backdrop-brightness":[C,h,p]}],"backdrop-contrast":[{"backdrop-contrast":[C,h,p]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,h,p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,h,p]}],"backdrop-invert":[{"backdrop-invert":["",C,h,p]}],"backdrop-opacity":[{"backdrop-opacity":[C,h,p]}],"backdrop-saturate":[{"backdrop-saturate":[C,h,p]}],"backdrop-sepia":[{"backdrop-sepia":["",C,h,p]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":f()}],"border-spacing-x":[{"border-spacing-x":f()}],"border-spacing-y":[{"border-spacing-y":f()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",h,p]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",h,p]}],ease:[{ease:["linear","initial",E,h,p]}],delay:[{delay:[C,h,p]}],animate:[{animate:["none",O,h,p]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,h,p]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:et()}],"skew-x":[{"skew-x":et()}],"skew-y":[{"skew-y":et()}],transform:[{transform:[h,p,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h,p]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":f()}],"scroll-mx":[{"scroll-mx":f()}],"scroll-my":[{"scroll-my":f()}],"scroll-ms":[{"scroll-ms":f()}],"scroll-me":[{"scroll-me":f()}],"scroll-mt":[{"scroll-mt":f()}],"scroll-mr":[{"scroll-mr":f()}],"scroll-mb":[{"scroll-mb":f()}],"scroll-ml":[{"scroll-ml":f()}],"scroll-p":[{"scroll-p":f()}],"scroll-px":[{"scroll-px":f()}],"scroll-py":[{"scroll-py":f()}],"scroll-ps":[{"scroll-ps":f()}],"scroll-pe":[{"scroll-pe":f()}],"scroll-pt":[{"scroll-pt":f()}],"scroll-pr":[{"scroll-pr":f()}],"scroll-pb":[{"scroll-pb":f()}],"scroll-pl":[{"scroll-pl":f()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h,p]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[C,ue,Q,nt]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},to=zn(eo);function M(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var ro=typeof Symbol=="function"&&Symbol.observable||"@@observable",er=ro,ot=()=>Math.random().toString(36).substring(7).split("").join("."),no={INIT:`@@redux/INIT${ot()}`,REPLACE:`@@redux/REPLACE${ot()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ot()}`},Ne=no;function Et(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Rt(e,t,r){if(typeof e!="function")throw new Error(M(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(Rt)(e,t)}let n=e,o=t,s=new Map,i=s,c=0,a=!1;function l(){i===s&&(i=new Map,s.forEach((v,E)=>{i.set(E,v)}))}function u(){if(a)throw new Error(M(3));return o}function d(v){if(typeof v!="function")throw new Error(M(4));if(a)throw new Error(M(5));let E=!0;l();const O=c++;return i.set(O,v),function(){if(E){if(a)throw new Error(M(6));E=!1,l(),i.delete(O),s=null}}}function m(v){if(!Et(v))throw new Error(M(7));if(typeof v.type>"u")throw new Error(M(8));if(typeof v.type!="string")throw new Error(M(17));if(a)throw new Error(M(9));try{a=!0,o=n(o,v)}finally{a=!1}return(s=i).forEach(O=>{O()}),v}function y(v){if(typeof v!="function")throw new Error(M(10));n=v,m({type:Ne.REPLACE})}function x(){const v=d;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(M(11));function O(){const b=E;b.next&&b.next(u())}return O(),{unsubscribe:v(O)}},[er](){return this}}}return m({type:Ne.INIT}),{dispatch:m,subscribe:d,getState:u,replaceReducer:y,[er]:x}}function oo(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Ne.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:Ne.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Ot(e){const t=Object.keys(e),r={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(r[i]=e[i])}const n=Object.keys(r);let o;try{oo(r)}catch(s){o=s}return function(i={},c){if(o)throw o;let a=!1;const l={};for(let u=0;u<n.length;u++){const d=n[u],m=r[d],y=i[d],x=m(y,c);if(typeof x>"u")throw c&&c.type,new Error(M(14));l[d]=x,a=a||x!==y}return a=a||n.length!==Object.keys(i).length,a?l:i}}function De(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function so(...e){return t=>(r,n)=>{const o=t(r,n);let s=()=>{throw new Error(M(15))};const i={getState:o.getState,dispatch:(a,...l)=>s(a,...l)},c=e.map(a=>a(i));return s=De(...c)(o.dispatch),{...o,dispatch:s}}}function io(e){return Et(e)&&"type"in e&&typeof e.type=="string"}var Nr=Symbol.for("immer-nothing"),tr=Symbol.for("immer-draftable"),N=Symbol.for("immer-state");function $(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var j=Object,ie=j.getPrototypeOf,je="constructor",Ue="prototype",ht="configurable",We="enumerable",Ae="writable",he="value",K=e=>!!e&&!!e[N];function q(e){return e?Dr(e)||Be(e)||!!e[tr]||!!e[je]?.[tr]||Ve(e)||He(e):!1}var ao=j[Ue][je].toString(),rr=new WeakMap;function Dr(e){if(!e||!Pt(e))return!1;const t=ie(e);if(t===null||t===j[Ue])return!0;const r=j.hasOwnProperty.call(t,je)&&t[je];if(r===Object)return!0;if(!se(r))return!1;let n=rr.get(r);return n===void 0&&(n=Function.toString.call(r),rr.set(r,n)),n===ao}function Ge(e,t,r=!0){ye(e)===0?(r?Reflect.ownKeys(e):j.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function ye(e){const t=e[N];return t?t.type_:Be(e)?1:Ve(e)?2:He(e)?3:0}var nr=(e,t,r=ye(e))=>r===2?e.has(t):j[Ue].hasOwnProperty.call(e,t),mt=(e,t,r=ye(e))=>r===2?e.get(t):e[t],Fe=(e,t,r,n=ye(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function co(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Be=Array.isArray,Ve=e=>e instanceof Map,He=e=>e instanceof Set,Pt=e=>typeof e=="object",se=e=>typeof e=="function",st=e=>typeof e=="boolean";function lo(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var V=e=>e.copy_||e.base_,At=e=>e.modified_?e.copy_:e.base_;function gt(e,t){if(Ve(e))return new Map(e);if(He(e))return new Set(e);if(Be(e))return Array[Ue].slice.call(e);const r=Dr(e);if(t===!0||t==="class_only"&&!r){const n=j.getOwnPropertyDescriptors(e);delete n[N];let o=Reflect.ownKeys(n);for(let s=0;s<o.length;s++){const i=o[s],c=n[i];c[Ae]===!1&&(c[Ae]=!0,c[ht]=!0),(c.get||c.set)&&(n[i]={[ht]:!0,[Ae]:!0,[We]:c[We],[he]:e[i]})}return j.create(ie(e),n)}else{const n=ie(e);if(n!==null&&r)return{...e};const o=j.create(n);return j.assign(o,e)}}function Tt(e,t=!1){return Ke(e)||K(e)||!q(e)||(ye(e)>1&&j.defineProperties(e,{set:Ee,add:Ee,clear:Ee,delete:Ee}),j.freeze(e),t&&Ge(e,(r,n)=>{Tt(n,!0)},!1)),e}function uo(){$(2)}var Ee={[he]:uo};function Ke(e){return e===null||!Pt(e)?!0:j.isFrozen(e)}var Le="MapSet",yt="Patches",or="ArrayMethods",jr={};function te(e){const t=jr[e];return t||$(0,e),t}var sr=e=>!!jr[e],me,Wr=()=>me,fo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:sr(Le)?te(Le):void 0,arrayMethodsPlugin_:sr(or)?te(or):void 0});function ir(e,t){t&&(e.patchPlugin_=te(yt),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function bt(e){wt(e),e.drafts_.forEach(po),e.drafts_=null}function wt(e){e===me&&(me=e.parent_)}var ar=e=>me=fo(me,e);function po(e){const t=e[N];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[N].modified_&&(bt(t),$(4)),q(e)&&(e=lr(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[N].base_,e,t)}else e=lr(t,r);return ho(t,e,!0),bt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Nr?e:void 0}function lr(e,t){if(Ke(t))return t;const r=t[N];if(!r)return $e(t,e.handledSet_,e);if(!Xe(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);$r(r,e)}return r.copy_}function ho(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Tt(t,r)}function Fr(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Xe=(e,t)=>e.scope_===t,mo=[];function Lr(e,t,r,n){const o=V(e),s=e.type_;if(n!==void 0&&mt(o,n,s)===t){Fe(o,n,r,s);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Ge(o,(a,l)=>{if(K(l)){const u=c.get(l)||[];u.push(a),c.set(l,u)}})}const i=e.draftLocations_.get(t)??mo;for(const c of i)Fe(o,c,r,s)}function go(e,t,r){e.callbacks_.push(function(o){const s=t;if(!s||!Xe(s,o))return;o.mapSetPlugin_?.fixSetContents(s);const i=At(s);Lr(e,s.draft_??s,i,r),$r(s,o)})}function $r(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const o=n.getPath(e);o&&n.generatePatches_(e,o,t)}Fr(e)}}function yo(e,t,r){const{scope_:n}=e;if(K(r)){const o=r[N];Xe(o,n)&&o.callbacks_.push(function(){Te(e);const i=At(o);Lr(e,r,i,t)})}else q(r)&&e.callbacks_.push(function(){const s=V(e);e.type_===3?s.has(r)&&$e(r,n.handledSet_,n):mt(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&$e(mt(e.copy_,t,e.type_),n.handledSet_,n)})}function $e(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||K(e)||t.has(e)||!q(e)||Ke(e)||(t.add(e),Ge(e,(n,o)=>{if(K(o)){const s=o[N];if(Xe(s,r)){const i=At(s);Fe(e,n,i,e.type_),Fr(s)}}else q(o)&&$e(o,t,r)})),e}function bo(e,t){const r=Be(e),n={type_:r?1:0,scope_:t?t.scope_:Wr(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=n,s=qe;r&&(o=[n],s=ge);const{revoke:i,proxy:c}=Proxy.revocable(o,s);return n.draft_=c,n.revoke_=i,[c,n]}var qe={get(e,t){if(t===N)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=V(e);if(!nr(o,t,e.type_))return wo(e,o,t);const s=o[t];if(e.finalized_||!q(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&lo(t))return s;if(s===it(e.base_,t)){Te(e);const i=e.type_===1?+t:t,c=St(e.scope_,s,e,i);return e.copy_[i]=c}return s},has(e,t){return t in V(e)},ownKeys(e){return Reflect.ownKeys(V(e))},set(e,t,r){const n=qr(V(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=it(V(e),t),s=o?.[N];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(co(r,o)&&(r!==void 0||nr(e.base_,t,e.type_)))return!0;Te(e),vt(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),yo(e,t,r)),!0},deleteProperty(e,t){return Te(e),it(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),vt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=V(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ae]:!0,[ht]:e.type_!==1||t!=="length",[We]:n[We],[he]:r[t]}},defineProperty(){$(11)},getPrototypeOf(e){return ie(e.base_)},setPrototypeOf(){$(12)}},ge={};for(let e in qe){let t=qe[e];ge[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}ge.deleteProperty=function(e,t){return ge.set.call(this,e,t,void 0)};ge.set=function(e,t,r){return qe.set.call(this,e[0],t,r,e[0])};function it(e,t){const r=e[N];return(r?V(r):e)[t]}function wo(e,t,r){const n=qr(t,r);return n?he in n?n[he]:n.get?.call(e.draft_):void 0}function qr(e,t){if(!(t in e))return;let r=ie(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ie(r)}}function vt(e){e.modified_||(e.modified_=!0,e.parent_&&vt(e.parent_))}function Te(e){e.copy_||(e.assigned_=new Map,e.copy_=gt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var vo=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(se(t)&&!se(r)){const s=r;r=t;const i=this;return function(a=s,...l){return i.produce(a,u=>r.call(this,u,...l))}}se(r)||$(6),n!==void 0&&!se(n)&&$(7);let o;if(q(t)){const s=ar(this),i=St(s,t,void 0);let c=!0;try{o=r(i),c=!1}finally{c?bt(s):wt(s)}return ir(s,n),cr(o,s)}else if(!t||!Pt(t)){if(o=r(t),o===void 0&&(o=t),o===Nr&&(o=void 0),this.autoFreeze_&&Tt(o,!0),n){const s=[],i=[];te(yt).generateReplacementPatches_(t,o,{patches_:s,inversePatches_:i}),n(s,i)}return o}else $(1,t)},this.produceWithPatches=(t,r)=>{if(se(t))return(i,...c)=>this.produceWithPatches(i,a=>t(a,...c));let n,o;return[this.produce(t,r,(i,c)=>{n=i,o=c}),n,o]},st(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),st(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),st(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){q(e)||$(8),K(e)&&(e=So(e));const t=ar(this),r=St(t,e,void 0);return r[N].isManual_=!0,wt(t),r}finishDraft(e,t){const r=e&&e[N];(!r||!r.isManual_)&&$(9);const{scope_:n}=r;return ir(n,t),cr(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=te(yt).applyPatches_;return K(e)?n(e,t):this.produce(e,o=>n(o,t))}};function St(e,t,r,n){const[o,s]=Ve(t)?te(Le).proxyMap_(t,r):He(t)?te(Le).proxySet_(t,r):bo(t,r);return(r?.scope_??Wr()).drafts_.push(o),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?go(r,s,n):s.callbacks_.push(function(a){a.mapSetPlugin_?.fixSetContents(s);const{patchPlugin_:l}=a;s.modified_&&l&&l.generatePatches_(s,[],a)}),o}function So(e){return K(e)||$(10,e),Ur(e)}function Ur(e){if(!q(e)||Ke(e))return e;const t=e[N];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=gt(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=gt(e,!0);return Ge(r,(o,s)=>{Fe(r,o,Ur(s))},n),t&&(t.finalized_=!1),r}var ko=new vo,Gr=ko.produce;function Br(e){return({dispatch:r,getState:n})=>o=>s=>typeof s=="function"?s(r,n,e):o(s)}var _o=Br(),xo=Br,Co=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?De:De.apply(null,arguments)},Eo=e=>e&&typeof e.match=="function";function pe(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(H(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>io(n)&&n.type===e,r}var Vr=class de extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,de.prototype)}static get[Symbol.species](){return de}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new de(...t[0].concat(this)):new de(...t.concat(this))}};function ur(e){return q(e)?Gr(e,()=>{}):e}function Re(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Ro(e){return typeof e=="boolean"}var Oo=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new Vr;return r&&(Ro(r)?i.push(_o):i.push(xo(r.extraArgument))),i},Po="RTK_autoBatch",dr=e=>t=>{setTimeout(t,e)},Ao=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,s=!1,i=!1;const c=new Set,a=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:dr(10):e.type==="callback"?e.queueNotification:dr(e.timeout),l=()=>{i=!1,s&&(s=!1,c.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const d=()=>o&&u(),m=n.subscribe(d);return c.add(u),()=>{m(),c.delete(u)}},dispatch(u){try{return o=!u?.meta?.[Po],s=!o,s&&(i||(i=!0,a(l))),n.dispatch(u)}finally{o=!0}}})},To=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new Vr(e);return n&&o.push(Ao(typeof n=="object"?n:void 0)),o};function Io(e){const t=Oo(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Et(r))c=Ot(r);else throw new Error(H(1));let a;typeof n=="function"?a=n(t):a=t();let l=De;o&&(l=Co({trace:!1,...typeof o=="object"&&o}));const u=so(...a),d=To(u);let m=typeof i=="function"?i(d):d();const y=l(...m);return Rt(c,s,y)}function Hr(e){const t={},r=[];let n;const o={addCase(s,i){const c=typeof s=="string"?s:s.type;if(!c)throw new Error(H(28));if(c in t)throw new Error(H(29));return t[c]=i,o},addAsyncThunk(s,i){return i.pending&&(t[s.pending.type]=i.pending),i.rejected&&(t[s.rejected.type]=i.rejected),i.fulfilled&&(t[s.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:s.settled,reducer:i.settled}),o},addMatcher(s,i){return r.push({matcher:s,reducer:i}),o},addDefaultCase(s){return n=s,o}};return e(o),[t,r,n]}function Mo(e){return typeof e=="function"}function zo(e,t){let[r,n,o]=Hr(t),s;if(Mo(e))s=()=>ur(e());else{const c=ur(e);s=()=>c}function i(c=s(),a){let l=[r[a.type],...n.filter(({matcher:u})=>u(a)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,d)=>{if(d)if(K(u)){const y=d(u,a);return y===void 0?u:y}else{if(q(u))return Gr(u,m=>d(m,a));{const m=d(u,a);if(m===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return u},c)}return i.getInitialState=s,i}var No=(e,t)=>Eo(e)?e.match(t):e(t);function Do(...e){return t=>e.some(r=>No(r,t))}var jo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Wo=(e=21)=>{let t="",r=e;for(;r--;)t+=jo[Math.random()*64|0];return t},Fo=["name","message","stack","code"],at=class{constructor(e,t){this.payload=e,this.meta=t}_type},fr=class{constructor(e,t){this.payload=e,this.meta=t}_type},Lo=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of Fo)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},pr="External signal was aborted",It=(()=>{function e(t,r,n){const o=pe(t+"/fulfilled",(a,l,u,d)=>({payload:a,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=pe(t+"/pending",(a,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:a,requestStatus:"pending"}})),i=pe(t+"/rejected",(a,l,u,d,m)=>({payload:d,error:(n&&n.serializeError||Lo)(a||"Rejected"),meta:{...m||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:a?.name==="AbortError",condition:a?.name==="ConditionError"}}));function c(a,{signal:l}={}){return(u,d,m)=>{const y=n?.idGenerator?n.idGenerator(a):Wo(),x=new AbortController;let g,v;function E(S){v=S,x.abort()}l&&(l.aborted?E(pr):l.addEventListener("abort",()=>E(pr),{once:!0}));const O=(async function(){let S;try{let w=n?.condition?.(a,{getState:d,extra:m});if(qo(w)&&(w=await w),w===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const _=new Promise((R,f)=>{g=()=>{f({name:"AbortError",message:v||"Aborted"})},x.signal.addEventListener("abort",g,{once:!0})});u(s(y,a,n?.getPendingMeta?.({requestId:y,arg:a},{getState:d,extra:m}))),S=await Promise.race([_,Promise.resolve(r(a,{dispatch:u,getState:d,extra:m,requestId:y,signal:x.signal,abort:E,rejectWithValue:(R,f)=>new at(R,f),fulfillWithValue:(R,f)=>new fr(R,f)})).then(R=>{if(R instanceof at)throw R;return R instanceof fr?o(R.payload,y,a,R.meta):o(R,y,a)})])}catch(w){S=w instanceof at?i(null,y,a,w.payload,w.meta):i(w,y,a)}finally{g&&x.signal.removeEventListener("abort",g)}return n&&!n.dispatchConditionRejection&&i.match(S)&&S.meta.condition||u(S),S})();return Object.assign(O,{abort:E,requestId:y,arg:a,unwrap(){return O.then($o)}})}}return Object.assign(c,{pending:s,rejected:i,fulfilled:o,settled:Do(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function $o(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function qo(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Uo=Symbol.for("rtk-slice-createasyncthunk");function Go(e,t){return`${e}/${t}`}function Bo({creators:e}={}){const t=e?.asyncThunk?.[Uo];return function(n){const{name:o,reducerPath:s=o}=n;if(!o)throw new Error(H(11));const i=(typeof n.reducers=="function"?n.reducers(Ho()):n.reducers)||{},c=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,b){const w=typeof S=="string"?S:S.type;if(!w)throw new Error(H(12));if(w in a.sliceCaseReducersByType)throw new Error(H(13));return a.sliceCaseReducersByType[w]=b,l},addMatcher(S,b){return a.sliceMatchers.push({matcher:S,reducer:b}),l},exposeAction(S,b){return a.actionCreators[S]=b,l},exposeCaseReducer(S,b){return a.sliceCaseReducersByName[S]=b,l}};c.forEach(S=>{const b=i[S],w={reducerName:S,type:Go(o,S),createNotation:typeof n.reducers=="function"};Xo(b)?Jo(w,b,l,t):Ko(w,b,l)});function u(){const[S={},b=[],w=void 0]=typeof n.extraReducers=="function"?Hr(n.extraReducers):[n.extraReducers],_={...S,...a.sliceCaseReducersByType};return zo(n.initialState,R=>{for(let f in _)R.addCase(f,_[f]);for(let f of a.sliceMatchers)R.addMatcher(f.matcher,f.reducer);for(let f of b)R.addMatcher(f.matcher,f.reducer);w&&R.addDefaultCase(w)})}const d=S=>S,m=new Map,y=new WeakMap;let x;function g(S,b){return x||(x=u()),x(S,b)}function v(){return x||(x=u()),x.getInitialState()}function E(S,b=!1){function w(R){let f=R[S];return typeof f>"u"&&b&&(f=Re(y,w,v)),f}function _(R=d){const f=Re(m,b,()=>new WeakMap);return Re(f,R,()=>{const A={};for(const[le,be]of Object.entries(n.selectors??{}))A[le]=Vo(be,R,()=>Re(y,R,v),b);return A})}return{reducerPath:S,getSelectors:_,get selectors(){return _(w)},selectSlice:w}}const O={name:o,reducer:g,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:v,...E(s),injectInto(S,{reducerPath:b,...w}={}){const _=b??s;return S.inject({reducerPath:_,reducer:g},w),{...O,...E(_,!0)}}};return O}}function Vo(e,t,r,n){function o(s,...i){let c=t(s);return typeof c>"u"&&n&&(c=r()),e(c,...i)}return o.unwrapped=e,o}var Ye=Bo();function Ho(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Ko({type:e,reducerName:t,createNotation:r},n,o){let s,i;if("reducer"in n){if(r&&!Yo(n))throw new Error(H(17));s=n.reducer,i=n.prepare}else s=n;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?pe(e,i):pe(e))}function Xo(e){return e._reducerDefinitionType==="asyncThunk"}function Yo(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Jo({type:e,reducerName:t},r,n,o){if(!o)throw new Error(H(18));const{payloadCreator:s,fulfilled:i,pending:c,rejected:a,settled:l,options:u}=r,d=o(e,s,u);n.exposeAction(t,d),i&&n.addCase(d.fulfilled,i),c&&n.addCase(d.pending,c),a&&n.addCase(d.rejected,a),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:i||Oe,pending:c||Oe,rejected:a||Oe,settled:l||Oe})}function Oe(){}function H(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Mt="persist:",zt="persist/FLUSH",Je="persist/REHYDRATE",Nt="persist/PAUSE",Dt="persist/PERSIST",jt="persist/PURGE",Wt="persist/REGISTER",Qo=-1;function Ie(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ie=function(r){return typeof r}:Ie=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ie(e)}function hr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Zo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hr(r,!0).forEach(function(n){es(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function es(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ts(e,t,r,n){n.debug;var o=Zo({},r);return e&&Ie(e)==="object"&&Object.keys(e).forEach(function(s){s!=="_persist"&&t[s]===r[s]&&(o[s]=e[s])}),o}function rs(e){var t=e.blacklist||null,r=e.whitelist||null,n=e.transforms||[],o=e.throttle||0,s="".concat(e.keyPrefix!==void 0?e.keyPrefix:Mt).concat(e.key),i=e.storage,c;e.serialize===!1?c=function(w){return w}:typeof e.serialize=="function"?c=e.serialize:c=ns;var a=e.writeFailHandler||null,l={},u={},d=[],m=null,y=null,x=function(w){Object.keys(w).forEach(function(_){E(_)&&l[_]!==w[_]&&d.indexOf(_)===-1&&d.push(_)}),Object.keys(l).forEach(function(_){w[_]===void 0&&E(_)&&d.indexOf(_)===-1&&l[_]!==void 0&&d.push(_)}),m===null&&(m=setInterval(g,o)),l=w};function g(){if(d.length===0){m&&clearInterval(m),m=null;return}var b=d.shift(),w=n.reduce(function(_,R){return R.in(_,b,l)},l[b]);if(w!==void 0)try{u[b]=c(w)}catch(_){console.error("redux-persist/createPersistoid: error serializing state",_)}else delete u[b];d.length===0&&v()}function v(){Object.keys(u).forEach(function(b){l[b]===void 0&&delete u[b]}),y=i.setItem(s,c(u)).catch(O)}function E(b){return!(r&&r.indexOf(b)===-1&&b!=="_persist"||t&&t.indexOf(b)!==-1)}function O(b){a&&a(b)}var S=function(){for(;d.length!==0;)g();return y||Promise.resolve()};return{update:x,flush:S}}function ns(e){return JSON.stringify(e)}function os(e){var t=e.transforms||[],r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Mt).concat(e.key),n=e.storage;e.debug;var o;return e.deserialize===!1?o=function(i){return i}:typeof e.deserialize=="function"?o=e.deserialize:o=ss,n.getItem(r).then(function(s){if(s)try{var i={},c=o(s);return Object.keys(c).forEach(function(a){i[a]=t.reduceRight(function(l,u){return u.out(l,a,c)},o(c[a]))}),i}catch(a){throw a}else return})}function ss(e){return JSON.parse(e)}function is(e){var t=e.storage,r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Mt).concat(e.key);return t.removeItem(r,as)}function as(e){}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mr(r,!0).forEach(function(n){cs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ls(e,t){if(e==null)return{};var r=us(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function us(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,s;for(s=0;s<n.length;s++)o=n[s],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var ds=5e3;function Kr(e,t){var r=e.version!==void 0?e.version:Qo;e.debug;var n=e.stateReconciler===void 0?ts:e.stateReconciler,o=e.getStoredState||os,s=e.timeout!==void 0?e.timeout:ds,i=null,c=!1,a=!0,l=function(d){return d._persist.rehydrated&&i&&!a&&i.update(d),d};return function(u,d){var m=u||{},y=m._persist,x=ls(m,["_persist"]),g=x;if(d.type===Dt){var v=!1,E=function(f,A){v||(d.rehydrate(e.key,f,A),v=!0)};if(s&&setTimeout(function(){!v&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},s),a=!1,i||(i=rs(e)),y)return B({},t(g,d),{_persist:y});if(typeof d.rehydrate!="function"||typeof d.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(e.key),o(e).then(function(R){var f=e.migrate||function(A,le){return Promise.resolve(A)};f(R,r).then(function(A){E(A)},function(A){E(void 0,A)})},function(R){E(void 0,R)}),B({},t(g,d),{_persist:{version:r,rehydrated:!1}})}else{if(d.type===jt)return c=!0,d.result(is(e)),B({},t(g,d),{_persist:y});if(d.type===zt)return d.result(i&&i.flush()),B({},t(g,d),{_persist:y});if(d.type===Nt)a=!0;else if(d.type===Je){if(c)return B({},g,{_persist:B({},y,{rehydrated:!0})});if(d.key===e.key){var O=t(g,d),S=d.payload,b=n!==!1&&S!==void 0?n(S,u,O,e):O,w=B({},b,{_persist:B({},y,{rehydrated:!0})});return l(w)}}}if(!y)return t(u,d);var _=t(g,d);return _===g?u:l(B({},_,{_persist:y}))}}function gr(e){return hs(e)||ps(e)||fs()}function fs(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function ps(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function hs(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yr(r,!0).forEach(function(n){ms(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ms(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xr={registry:[],bootstrapped:!1},gs=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case Wt:return kt({},t,{registry:[].concat(gr(t.registry),[r.key])});case Je:var n=t.registry.indexOf(r.key),o=gr(t.registry);return o.splice(n,1),kt({},t,{registry:o,bootstrapped:o.length===0});default:return t}};function ys(e,t,r){var n=Rt(gs,Xr,void 0),o=function(a){n.dispatch({type:Wt,key:a})},s=function(a,l,u){var d={type:Je,payload:l,err:u,key:a};e.dispatch(d),n.dispatch(d)},i=kt({},n,{purge:function(){var a=[];return e.dispatch({type:jt,result:function(u){a.push(u)}}),Promise.all(a)},flush:function(){var a=[];return e.dispatch({type:zt,result:function(u){a.push(u)}}),Promise.all(a)},pause:function(){e.dispatch({type:Nt})},persist:function(){e.dispatch({type:Dt,register:o,rehydrate:s})}});return i.persist(),i}function Yr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.whitelist||null,o=r.blacklist||null;function s(i){return!!(n&&n.indexOf(i)===-1||o&&o.indexOf(i)!==-1)}return{in:function(c,a,l){return!s(a)&&e?e(c,a,l):c},out:function(c,a,l){return!s(a)&&t?t(c,a,l):c}}}function Me(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Me=function(r){return typeof r}:Me=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Me(e)}function ct(){}var bs={getItem:ct,setItem:ct,removeItem:ct};function ws(e){if((typeof self>"u"?"undefined":Me(self))!=="object"||!(e in self))return!1;try{var t=self[e],r="redux-persist ".concat(e," test");t.setItem(r,"test"),t.getItem(r),t.removeItem(r)}catch{return!1}return!0}function vs(e){var t="".concat(e,"Storage");return ws(t)?self[t]:bs}function Ss(e){var t=vs(e);return{getItem:function(n){return new Promise(function(o,s){o(t.getItem(n))})},setItem:function(n,o){return new Promise(function(s,i){s(t.setItem(n,o))})},removeItem:function(n){return new Promise(function(o,s){o(t.removeItem(n))})}}}const ks=Ss("local"),_s={sidebarOpen:!0,activeMenu:"home"},Jr=Ye({name:"ui",initialState:_s,reducers:{toggleSidebar:e=>{e.sidebarOpen=!e.sidebarOpen},setSidebarOpen:(e,t)=>{e.sidebarOpen=t.payload},setActiveMenu:(e,t)=>{e.activeMenu=t.payload}}}),{toggleSidebar:yi,setSidebarOpen:bi,setActiveMenu:wi}=Jr.actions,xs=Jr.reducer,Cs={routes:[]},Es=(e,t)=>{const r=t.split("/").filter(Boolean);for(let n=r.length-1;n>0;n--){const o="/"+r.slice(0,n).join("/"),s=e.find(i=>i.path===o);if(s)return s}return e.find(n=>n.path==="/")||null},Rs=(e,t)=>e==="/"?t:t.replace(e+"/",""),Qr=Ye({name:"route",initialState:Cs,reducers:{addRoute:(e,t)=>{const r=t.payload,n=Es(e.routes,r.path);if(n){n.children||(n.children=[]);const o=Rs(n.path,r.path);n.children.push({...r,path:o})}else e.routes.push(r);e.routes.sort((o,s)=>(o.meta?.order||999)-(s.meta?.order||999))},removeRoute:(e,t)=>{const r=t.payload,n=o=>{const s=o.findIndex(i=>i.path===r);if(s>=0)return o.splice(s,1),!0;for(const i of o)if(i.children&&n(i.children))return!0;return!1};n(e.routes)},updateRoute:(e,t)=>{const{path:r,updates:n}=t.payload,o=s=>{const i=s.findIndex(c=>c.path===r);if(i>=0)return s[i]={...s[i],...n},!0;for(const c of s)if(c.children&&o(c.children))return!0;return!1};o(e.routes)},setRoutes:(e,t)=>{e.routes=t.payload,e.routes.sort((r,n)=>(r.meta?.order||999)-(n.meta?.order||999))},clearRoutes:e=>{e.routes=[]}}}),{addRoute:Os,removeRoute:Ps,updateRoute:As,setRoutes:vi,clearRoutes:Ts}=Qr.actions,Is=Qr.reducer,Ms={entries:[],loadedScripts:[],synced:!1},Ft=It("script/loadScript",async e=>new Promise((t,r)=>{const n=document.createElement("script");n.type="module",n.src=e,n.dataset.dynamicEntry="true",n.onload=()=>t(e),n.onerror=o=>{console.error("[Script] Load failed:",e),r(o)},document.body.appendChild(n)})),Zr=It("script/loadScripts",async(e,{dispatch:t})=>(await Promise.allSettled(e.map(n=>t(Ft(n)).unwrap()))).filter(n=>n.status==="fulfilled").map(n=>n.value)),en=It("script/unloadScript",async e=>(document.querySelectorAll(`script[src="${e}"][data-dynamic-entry="true"]`).forEach(r=>r.remove()),e)),tn=Ye({name:"script",initialState:Ms,reducers:{syncEntries:(e,t)=>{e.entries=t.payload,e.synced=!0},addEntry:(e,t)=>{e.entries.includes(t.payload)||e.entries.push(t.payload)},removeEntry:(e,t)=>{e.entries=e.entries.filter(r=>r!==t.payload),e.loadedScripts=e.loadedScripts.filter(r=>r!==t.payload)}},extraReducers:e=>{e.addCase(Ft.fulfilled,(t,r)=>{t.loadedScripts.includes(r.payload)||t.loadedScripts.push(r.payload)}),e.addCase(Zr.fulfilled,(t,r)=>{r.payload.forEach(n=>{t.loadedScripts.includes(n)||t.loadedScripts.push(n)})}),e.addCase(en.fulfilled,(t,r)=>{t.loadedScripts=t.loadedScripts.filter(n=>n!==r.payload)})}}),{syncEntries:zs,addEntry:Ns,removeEntry:Ds}=tn.actions,js=tn.reducer,Ws={configs:{},schemas:{},loading:{},errors:{},connected:!1},rn=Ye({name:"config",initialState:Ws,reducers:{setConnected:(e,t)=>{e.connected=t.payload},setLoading:(e,t)=>{const{pluginName:r,loading:n}=t.payload;e.loading[r]=n},setError:(e,t)=>{const{pluginName:r,error:n}=t.payload;e.errors[r]=n},updateConfig:(e,t)=>{const{pluginName:r,config:n}=t.payload;e.configs[r]=n,e.loading[r]=!1,e.errors[r]=null},updateSchema:(e,t)=>{const{pluginName:r,schema:n}=t.payload;e.schemas[r]=n},updateConfigs:(e,t)=>{e.configs={...e.configs,...t.payload}},updateSchemas:(e,t)=>{e.schemas={...e.schemas,...t.payload}},removeConfig:(e,t)=>{const r=t.payload;delete e.configs[r],delete e.schemas[r],delete e.loading[r],delete e.errors[r]},clearConfigs:e=>{e.configs={},e.schemas={},e.loading={},e.errors={}}}}),{setConnected:lt,setLoading:Pe,setError:fe,updateConfig:Fs,updateSchema:Ls,updateConfigs:nn,updateSchemas:on,removeConfig:Si,clearConfigs:ki}=rn.actions,$s=rn.reducer,qs=(e,t)=>e.config.configs[t],Us=(e,t)=>e.config.schemas[t],Gs=(e,t)=>e.config.loading[t]||!1,Bs=(e,t)=>e.config.errors[t]||null,Lt=e=>e.config.connected,Vs=e=>e.config.configs,Hs=e=>e.config.schemas,_t={ui:xs,route:Is,script:js,config:$s};var ut={exports:{}},dt={};var br;function Ks(){if(br)return dt;br=1;var e=ln;function t(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,c=e.useDebugValue;return dt.useSyncExternalStoreWithSelector=function(a,l,u,d,m){var y=o(null);if(y.current===null){var x={hasValue:!1,value:null};y.current=x}else x=y.current;y=i(function(){function v(w){if(!E){if(E=!0,O=w,w=d(w),m!==void 0&&x.hasValue){var _=x.value;if(m(_,w))return S=_}return S=w}if(_=S,r(O,w))return _;var R=d(w);return m!==void 0&&m(_,R)?(O=w,_):(O=w,S=R)}var E=!1,O,S,b=u===void 0?null:u;return[function(){return v(l())},b===null?void 0:function(){return v(b())}]},[l,u,d,m]);var g=n(a,y[0],y[1]);return s(function(){x.hasValue=!0,x.value=g},[g]),c(g),g},dt}var wr;function Xs(){return wr||(wr=1,ut.exports=Ks()),ut.exports}var Ys=Xs(),Js=Symbol.for("react-redux-context"),Qs=typeof globalThis<"u"?globalThis:{};function Zs(){if(!Y.createContext)return{};const e=Qs[Js]??=new Map;let t=e.get(Y.createContext);return t||(t=Y.createContext(null),e.set(Y.createContext,t)),t}var re=Zs();function $t(e=re){return function(){return Y.useContext(e)}}var sn=$t();function an(e=re){const t=e===re?sn:$t(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var ei=an();function ti(e=re){const t=e===re?ei:an(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var ri=ti(),ni=(e,t)=>e===t;function oi(e=re){const t=e===re?sn:$t(e),r=(n,o={})=>{const{equalityFn:s=ni}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:c,subscription:a,getServerState:l}=i;Y.useRef(!0);const u=Y.useCallback({[n.name](m){return n(m)}}[n.name],[n]),d=Ys.useSyncExternalStoreWithSelector(a.addNestedSub,c.getState,l||c.getState,u,s);return Y.useDebugValue(d),d};return Object.assign(r,{withTypes:()=>r}),r}var si=oi();const ii=Yr(e=>{const{routes:t,...r}=e;return r},e=>({...e,routes:[]}),{whitelist:["route"]}),ai=Yr(e=>{const{entries:t,loadedScripts:r,synced:n,...o}=e;return o},e=>({...e,entries:[],loadedScripts:[],synced:!1}),{whitelist:["script"]}),cn={key:"root",storage:ks,transforms:[ii,ai]},ci=Kr(cn,Ot(_t)),P=Io({reducer:ci,middleware:e=>e({serializableCheck:{ignoredActions:[zt,Je,Nt,Dt,jt,Wt,"route/addRoute","route/updateRoute","route/setRoutes"],ignoredPaths:["route.routes"]}})}),_i=ys(P);typeof window<"u"&&(window.__REDUX_STORE__=P);function xi(e,t){_t[e]=t;const r=Kr(cn,Ot(_t));P.replaceReducer(r)}const li=ri,F=si,Ci=e=>P.dispatch(Os(e)),Ei=e=>P.dispatch(Ps(e)),Ri=(e,t)=>P.dispatch(As({path:e,updates:t})),Oi=e=>P.getState().route.routes.find(t=>t.path===e),Pi=()=>P.getState().route.routes,Ai=()=>P.dispatch(Ts());function Ti(){const e=F(r=>r.route.routes),t=xt(()=>{const r=s=>{const i={path:s.path,element:s.element,Component:s.Component};return s.children&&s.children.length>0&&(i.children=s.children.map(c=>r(c))),i},n=e.map(r);return un([{path:"/",element:tt(fn,{}),children:n},{path:"*",element:tt("div",{children:"404 - Page Not Found"})}])},[e]);return tt(dn,{router:t})}var W=(e=>(e.DISCONNECTED="disconnected",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.ERROR="error",e))(W||{});class Z extends Error{constructor(t,r,n){super(t),this.code=r,this.originalError=n,this.name="WebSocketError"}}class ui extends Z{constructor(t){super(`Request ${t} timed out`,"REQUEST_TIMEOUT")}}class vr extends Z{constructor(t,r){super(t,"CONNECTION_ERROR",r)}}class Sr extends Z{constructor(t,r){super(t,"MESSAGE_ERROR",r)}}class di{static handle(t){try{switch(t.type){case"sync":this.handleScriptSync(t);break;case"add":this.handleScriptAdd(t);break;case"delete":this.handleScriptDelete(t);break;case"config:updated":this.handleConfigUpdated(t);break;case"config:batch":this.handleConfigBatch(t);break;case"config:error":this.handleConfigError(t);break;case"schema:updated":this.handleSchemaUpdated(t);break;case"schema:batch":this.handleSchemaBatch(t);break;case"hmr:reload":this.handleHmrReload(t);break;case"init-data":case"data-update":this.handleSystemMessage(t);break;default:console.warn("[WebSocket] Unknown message type:",t.type)}}catch(r){console.error("[WebSocket] Message handling error:",r)}}static handleScriptSync(t){if(t.data?.key==="entries"){const r=Array.isArray(t.data.value)?t.data.value:[t.data.value];P.dispatch(zs(r)),P.dispatch(Zr(r))}}static handleScriptAdd(t){t.data?.key==="entries"&&(P.dispatch(Ns(t.data.value)),P.dispatch(Ft(t.data.value)))}static handleScriptDelete(t){t.data?.key==="entries"&&(P.dispatch(Ds(t.data.value)),P.dispatch(en(t.data.value)))}static handleConfigUpdated(t){t.pluginName&&t.data!==void 0&&P.dispatch(Fs({pluginName:t.pluginName,config:t.data}))}static handleConfigBatch(t){t.data&&P.dispatch(nn(t.data))}static handleConfigError(t){t.pluginName&&t.error&&P.dispatch(fe({pluginName:t.pluginName,error:t.error}))}static handleSchemaUpdated(t){t.pluginName&&t.data!==void 0&&P.dispatch(Ls({pluginName:t.pluginName,schema:t.data}))}static handleSchemaBatch(t){t.data&&P.dispatch(on(t.data))}static handleHmrReload(t){const r=t.data?.file||"";console.info(`[HMR] 文件变更: ${r},正在刷新页面...`),window.location.reload()}static handleSystemMessage(t){}}class fi{ws=null;config;callbacks;state=W.DISCONNECTED;reconnectAttempts=0;reconnectTimer=null;requestId=0;pendingRequests=new Map;constructor(t={},r={}){this.config={url:this.buildWebSocketUrl(t.url),reconnectInterval:t.reconnectInterval??3e3,maxReconnectAttempts:t.maxReconnectAttempts??10,requestTimeout:t.requestTimeout??1e4},this.callbacks=r}connect(){if(!(this.state===W.CONNECTED||this.state===W.CONNECTING)){this.setState(W.CONNECTING);try{this.ws=new WebSocket(this.config.url),this.attachEventHandlers()}catch(t){this.handleConnectionError(new vr("Failed to create WebSocket",t))}}}disconnect(){this.clearReconnectTimer(),this.clearPendingRequests(),this.ws&&(this.ws.close(),this.ws=null),this.setState(W.DISCONNECTED),P.dispatch(lt(!1))}send(t){if(!this.isConnected())throw new Z("WebSocket is not connected","NOT_CONNECTED");try{this.ws.send(JSON.stringify(t))}catch(r){throw new Sr("Failed to send message",r)}}async sendRequest(t){if(!this.isConnected())throw new Z("WebSocket is not connected","NOT_CONNECTED");return new Promise((r,n)=>{const o=++this.requestId,s={...t,requestId:o},i=setTimeout(()=>{this.pendingRequests.delete(o),n(new ui(o))},this.config.requestTimeout);this.pendingRequests.set(o,{resolve:r,reject:n,timer:i});try{this.ws.send(JSON.stringify(s))}catch(c){this.pendingRequests.delete(o),clearTimeout(i),n(new Sr("Failed to send request",c))}})}isConnected(){return this.ws?.readyState===WebSocket.OPEN}getState(){return this.state}async getConfig(t){return this.sendRequest({type:"config:get",pluginName:t})}async setConfig(t,r){await this.sendRequest({type:"config:set",pluginName:t,data:r})}async getSchema(t){return this.sendRequest({type:"schema:get",pluginName:t})}async getAllConfigs(){return this.sendRequest({type:"config:get-all"})}async getAllSchemas(){return this.sendRequest({type:"schema:get-all"})}buildWebSocketUrl(t){if(t)return t;const r=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return`${r}//${n}/server`}setState(t){const r=this.state;this.state=t,console.debug(`[WebSocket] State changed: ${r} -> ${t}`)}attachEventHandlers(){this.ws&&(this.ws.onopen=()=>{this.handleConnectionOpen()},this.ws.onmessage=t=>{this.handleMessage(t)},this.ws.onclose=t=>{this.handleConnectionClose(t)},this.ws.onerror=t=>{this.handleConnectionError(new vr("WebSocket error",t))})}handleConnectionOpen(){this.setState(W.CONNECTED),this.reconnectAttempts=0,P.dispatch(lt(!0)),this.initializeData(),this.callbacks.onConnect?.()}handleMessage(t){try{const r=JSON.parse(t.data);if(r.requestId&&this.pendingRequests.has(r.requestId)){this.handleRequestResponse(r);return}di.handle(r),this.callbacks.onMessage?.(r)}catch(r){console.error("[WebSocket] Message parsing error:",r)}}handleRequestResponse(t){const{requestId:r}=t,n=this.pendingRequests.get(r);n&&(this.pendingRequests.delete(r),clearTimeout(n.timer),t.error?n.reject(new Z(t.error,"SERVER_ERROR")):n.resolve(t.data))}handleConnectionClose(t){this.ws=null,P.dispatch(lt(!1)),this.state!==W.DISCONNECTED&&(this.setState(W.RECONNECTING),this.callbacks.onDisconnect?.(),this.scheduleReconnect())}handleConnectionError(t){this.clearReconnectTimer(),this.setState(W.ERROR),console.error("[WebSocket] Connection error:",t),this.callbacks.onError?.(t)}scheduleReconnect(){if(this.reconnectAttempts>=this.config.maxReconnectAttempts){console.error("[WebSocket] Max reconnect attempts reached"),this.setState(W.ERROR);return}this.reconnectAttempts++;const t=this.config.reconnectInterval*this.reconnectAttempts;console.debug(`[WebSocket] Reconnecting in ${t}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.state===W.RECONNECTING&&this.connect()},t)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearPendingRequests(){for(const[t,{reject:r,timer:n}]of this.pendingRequests)clearTimeout(n),r(new Z("Connection closed","CONNECTION_CLOSED"));this.pendingRequests.clear()}async initializeData(){try{const[t,r]=await Promise.all([this.getAllConfigs().catch(n=>(console.warn("[WebSocket] Failed to load configs:",n),{})),this.getAllSchemas().catch(n=>(console.warn("[WebSocket] Failed to load schemas:",n),{}))]);P.dispatch(nn(t)),P.dispatch(on(r))}catch(t){console.error("[WebSocket] Data initialization failed:",t)}}}let ee=null;function qt(){return ee||(ee=new fi,typeof window<"u"&&ee.connect()),ee}function pi(){ee&&(ee.disconnect(),ee=null)}function Ii(){pi()}function Mi(e={}){const{autoConnect:t=!0}=e,r=qt(),n=F(Lt),o=F(m=>m.script?.entries||[]),s=F(m=>m.script?.loadedScripts||[]),i=L(()=>{r.connect()},[r]),c=L(()=>{r.disconnect()},[r]),a=L(m=>{r.send(m)},[r]),l=L(async m=>r.sendRequest(m),[r]),u=L(()=>r.isConnected(),[r]),d=L(()=>r.isConnected()?"connected":"disconnected",[r]);return ft(()=>{t&&!n&&i()},[t,n,i]),{connected:n,entries:o,loadedScripts:s,connect:i,disconnect:c,send:a,sendRequest:l,isConnected:u,getState:d,manager:r}}function zi(e,t={}){const{autoLoad:r=!0,autoLoadSchema:n=!0}=t,o=li(),s=qt(),i=F(g=>qs(g,e)),c=F(g=>Us(g,e)),a=F(g=>Gs(g,e)),l=F(g=>Bs(g,e)),u=F(Lt),d=L(async()=>{o(Pe({pluginName:e,loading:!0})),o(fe({pluginName:e,error:null}));try{return await s.getConfig(e)}catch(g){console.error("[useConfig] getConfig failed:",g);const v=g instanceof Error?g.message:"Unknown error";throw o(fe({pluginName:e,error:v})),g}finally{o(Pe({pluginName:e,loading:!1}))}},[e,s,o]),m=L(async g=>{o(Pe({pluginName:e,loading:!0})),o(fe({pluginName:e,error:null}));try{await s.setConfig(e,g)}catch(v){console.error("[useConfig] setConfig failed:",v);const E=v instanceof Error?v.message:"Unknown error";throw o(fe({pluginName:e,error:E})),v}finally{o(Pe({pluginName:e,loading:!1}))}},[e,s,o]),y=L(async()=>{try{return await s.getSchema(e)}catch(g){throw console.error(`Failed to get schema for plugin ${e}:`,g),g}},[e,s]),x=L(async()=>{const g=[];r&&g.push(d()),n&&g.push(y()),await Promise.all(g)},[r,n,d,y]);return ft(()=>{u&&r&&!i&&!a&&d().catch(console.error)},[u,r,i,a,d]),ft(()=>{u&&n&&!c&&y().catch(console.error)},[u,n,c,y]),xt(()=>({config:i,schema:c,loading:a,error:l,connected:u,getConfig:d,setConfig:m,getSchema:y,reload:x}),[i,c,a,l,u,d,m,y,x])}function Ni(){const e=qt(),t=F(Vs),r=F(Hs),n=F(Lt),o=L(async()=>{try{const[s,i]=await Promise.all([e.getAllConfigs(),e.getAllSchemas()]);return{configs:s,schemas:i}}catch(s){throw console.error("Failed to refresh all configs:",s),s}},[e]);return xt(()=>({configs:t,schemas:r,connected:n,refreshAll:o}),[t,r,n,o])}function Di(...e){return to(pn(e))}export{vr as ConnectionError,W as ConnectionState,Ti as DynamicRouter,Fi as Link,Sr as MessageError,di as MessageHandler,Li as Outlet,ui as RequestTimeoutError,Z as WebSocketError,fi as WebSocketManager,Ns as addEntry,Ci as addPage,xi as addReducer,Os as addRoute,ki as clearConfigs,Ai as clearPages,Ts as clearRoutes,Di as cn,pi as destroyWebSocketManager,Pi as getAllPages,Oi as getPage,qt as getWebSocketManager,Ft as loadScript,Zr as loadScripts,_i as persistor,Si as removeConfig,Ds as removeEntry,Ei as removePage,Ps as removeRoute,Ii as resetWebSocketManager,Vs as selectAllConfigs,Hs as selectAllSchemas,qs as selectConfig,Lt as selectConfigConnected,Bs as selectConfigError,Gs as selectConfigLoading,Us as selectSchema,wi as setActiveMenu,lt as setConnected,fe as setError,Pe as setLoading,vi as setRoutes,bi as setSidebarOpen,P as store,zs as syncEntries,yi as toggleSidebar,en as unloadScript,Fs as updateConfig,nn as updateConfigs,Ri as updatePage,As as updateRoute,Ls as updateSchema,on as updateSchemas,Ni as useAllConfigs,zi as useConfig,li as useDispatch,$i as useNavigate,qi as useOutlet,Ui as useParams,F as useSelector,Mi as useWebSocket};
|
|
1
|
+
import*as X from"./react.js";import fn,{useMemo as we,useCallback as z,useEffect as me,useState as Z}from"./react.js";import{jsx as it}from"./react-jsx-runtime.js";import{createBrowserRouter as pn,RouterProvider as hn,Outlet as mn}from"./react-router.js";import{Link as Ui,Outlet as $i,useNavigate as Gi,useOutlet as Bi,useParams as Vi}from"./react-router.js";function _r(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=_r(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function gn(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=_r(e))&&(n&&(n+=" "),n+=t);return n}const yn=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},bn=(e,t)=>({classGroupId:e,validator:t}),xr=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),We="-",Xt=[],wn="arbitrary..",vn=e=>{const t=kn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Sn(i);const c=i.split(We),a=c[0]===""&&c.length>1?1:0;return Cr(c,a,t)},getConflictingClassGroupIds:(i,c)=>{if(c){const a=n[i],l=r[i];return a?l?yn(l,a):a:l||Xt}return r[i]||Xt}}},Cr=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],s=r.nextPart.get(o);if(s){const l=Cr(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const c=t===0?e.join(We):e.slice(t).join(We),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(c))return u.classGroupId}},Sn=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?wn+n:void 0})(),kn=e=>{const{theme:t,classGroups:r}=e;return _n(r,t)},_n=(e,t)=>{const r=xr();for(const n in e){const o=e[n];Ot(o,r,n,t)}return r},Ot=(e,t,r,n)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];xn(i,t,r,n)}},xn=(e,t,r,n)=>{if(typeof e=="string"){Cn(e,t,r);return}if(typeof e=="function"){En(e,t,r,n);return}Rn(e,t,r,n)},Cn=(e,t,r)=>{const n=e===""?t:Er(t,e);n.classGroupId=r},En=(e,t,r,n)=>{if(On(e)){Ot(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(bn(r,e))},Rn=(e,t,r,n)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[c,a]=o[i];Ot(a,Er(t,c),r,n)}},Er=(e,t)=>{let r=e;const n=t.split(We),o=n.length;for(let s=0;s<o;s++){const i=n[s];let c=r.nextPart.get(i);c||(c=xr(),r.nextPart.set(i,c)),r=c}return r},On=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Pn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(s,i)=>{r[s]=i,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(s){let i=r[s];if(i!==void 0)return i;if((i=n[s])!==void 0)return o(s,i),i},set(s,i){s in r?r[s]=i:o(s,i)}}},yt="!",Jt=":",An=[],Qt=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Tn=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const s=[];let i=0,c=0,a=0,l;const u=o.length;for(let m=0;m<u;m++){const b=o[m];if(i===0&&c===0){if(b===Jt){s.push(o.slice(a,m)),a=m+1;continue}if(b==="/"){l=m;continue}}b==="["?i++:b==="]"?i--:b==="("?c++:b===")"&&c--}const d=s.length===0?o:o.slice(a);let f=d,p=!1;d.endsWith(yt)?(f=d.slice(0,-1),p=!0):d.startsWith(yt)&&(f=d.slice(1),p=!0);const _=l&&l>a?l-a:void 0;return Qt(s,p,f,_)};if(t){const o=t+Jt,s=n;n=i=>i.startsWith(o)?s(i.slice(o.length)):Qt(An,!1,i,void 0,!0)}if(r){const o=n;n=s=>r({className:s,parseClassName:o})}return n},In=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let s=0;s<r.length;s++){const i=r[s],c=i[0]==="[",a=t.has(i);c||a?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(i)):o.push(i)}return o.length>0&&(o.sort(),n.push(...o)),n}},Mn=e=>({cache:Pn(e.cacheSize),parseClassName:Tn(e),sortModifiers:In(e),...vn(e)}),zn=/\s+/,Nn=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],c=e.trim().split(zn);let a="";for(let l=c.length-1;l>=0;l-=1){const u=c[l],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:_,maybePostfixModifierPosition:m}=r(u);if(d){a=u+(a.length>0?" "+a:a);continue}let b=!!m,E=n(b?_.substring(0,m):_);if(!E){if(!b){a=u+(a.length>0?" "+a:a);continue}if(E=n(_),!E){a=u+(a.length>0?" "+a:a);continue}b=!1}const O=f.length===0?"":f.length===1?f[0]:s(f).join(":"),S=p?O+yt:O,w=S+E;if(i.indexOf(w)>-1)continue;i.push(w);const v=o(E,b);for(let x=0;x<v.length;++x){const R=v[x];i.push(S+R)}a=u+(a.length>0?" "+a:a)}return a},Dn=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=Rr(r))&&(o&&(o+=" "),o+=n);return o},Rr=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Rr(e[n]))&&(r&&(r+=" "),r+=t);return r},jn=(e,...t)=>{let r,n,o,s;const i=a=>{const l=t.reduce((u,d)=>d(u),e());return r=Mn(l),n=r.cache.get,o=r.cache.set,s=c,c(a)},c=a=>{const l=n(a);if(l)return l;const u=Nn(a,r);return o(a,u),u};return s=i,(...a)=>s(Dn(...a))},Fn=[],T=e=>{const t=r=>r[e]||Fn;return t.isThemeGetter=!0,t},Or=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Wn=/^\d+\/\d+$/,Ln=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Un=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,se=e=>Wn.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),Y=e=>!!e&&Number.isInteger(Number(e)),at=e=>e.endsWith("%")&&C(e.slice(0,-1)),G=e=>Ln.test(e),Bn=()=>!0,Vn=e=>qn.test(e)&&!Un.test(e),Ar=()=>!1,Hn=e=>$n.test(e),Kn=e=>Gn.test(e),Yn=e=>!g(e)&&!y(e),Xn=e=>ce(e,Mr,Ar),g=e=>Or.test(e),Q=e=>ce(e,zr,Vn),ct=e=>ce(e,to,C),Zt=e=>ce(e,Tr,Ar),Jn=e=>ce(e,Ir,Kn),Pe=e=>ce(e,Nr,Hn),y=e=>Pr.test(e),de=e=>le(e,zr),Qn=e=>le(e,ro),er=e=>le(e,Tr),Zn=e=>le(e,Mr),eo=e=>le(e,Ir),Ae=e=>le(e,Nr,!0),ce=(e,t,r)=>{const n=Or.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},le=(e,t,r=!1)=>{const n=Pr.exec(e);return n?n[1]?t(n[1]):r:!1},Tr=e=>e==="position"||e==="percentage",Ir=e=>e==="image"||e==="url",Mr=e=>e==="length"||e==="size"||e==="bg-size",zr=e=>e==="length",to=e=>e==="number",ro=e=>e==="family-name",Nr=e=>e==="shadow",no=()=>{const e=T("color"),t=T("font"),r=T("text"),n=T("font-weight"),o=T("tracking"),s=T("leading"),i=T("breakpoint"),c=T("container"),a=T("spacing"),l=T("radius"),u=T("shadow"),d=T("inset-shadow"),f=T("text-shadow"),p=T("drop-shadow"),_=T("blur"),m=T("perspective"),b=T("aspect"),E=T("ease"),O=T("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...w(),y,g],x=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],h=()=>[y,g,a],A=()=>[se,"full","auto",...h()],ue=()=>[Y,"none","subgrid",y,g],_e=()=>["auto",{span:["full",Y,y,g]},Y,y,g],xe=()=>[Y,"auto",y,g],Gt=()=>["auto","min","max","fr",y,g],nt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],$=()=>["auto",...h()],J=()=>[se,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...h()],k=()=>[e,y,g],Bt=()=>[...w(),er,Zt,{position:[y,g]}],Vt=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ht=()=>["auto","cover","contain",Zn,Xn,{size:[y,g]}],ot=()=>[at,de,Q],N=()=>["","none","full",l,y,g],F=()=>["",C,de,Q],Ce=()=>["solid","dashed","dotted","double"],Kt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[C,at,er,Zt],Yt=()=>["","none",_,y,g],Ee=()=>["none",C,y,g],Re=()=>["none",C,y,g],st=()=>[C,y,g],Oe=()=>[se,"full",...h()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[G],breakpoint:[G],color:[Bn],container:[G],"drop-shadow":[G],ease:["in","out","in-out"],font:[Yn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[G],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[G],shadow:[G],spacing:["px",C],text:[G],"text-shadow":[G],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",se,g,y,b]}],container:["container"],columns:[{columns:[C,g,y,c]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Y,"auto",y,g]}],basis:[{basis:[se,"full","auto",c,...h()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,se,"auto","initial","none",g]}],grow:[{grow:["",C,y,g]}],shrink:[{shrink:["",C,y,g]}],order:[{order:[Y,"first","last","none",y,g]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:_e()}],"col-start":[{"col-start":xe()}],"col-end":[{"col-end":xe()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:_e()}],"row-start":[{"row-start":xe()}],"row-end":[{"row-end":xe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Gt()}],"auto-rows":[{"auto-rows":Gt()}],gap:[{gap:h()}],"gap-x":[{"gap-x":h()}],"gap-y":[{"gap-y":h()}],"justify-content":[{justify:[...nt(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...nt()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":nt()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:h()}],px:[{px:h()}],py:[{py:h()}],ps:[{ps:h()}],pe:[{pe:h()}],pt:[{pt:h()}],pr:[{pr:h()}],pb:[{pb:h()}],pl:[{pl:h()}],m:[{m:$()}],mx:[{mx:$()}],my:[{my:$()}],ms:[{ms:$()}],me:[{me:$()}],mt:[{mt:$()}],mr:[{mr:$()}],mb:[{mb:$()}],ml:[{ml:$()}],"space-x":[{"space-x":h()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":h()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[c,"screen",...J()]}],"min-w":[{"min-w":[c,"screen","none",...J()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[i]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,de,Q]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,y,ct]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",at,g]}],"font-family":[{font:[Qn,g,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,y,g]}],"line-clamp":[{"line-clamp":[C,"none",y,ct]}],leading:[{leading:[s,...h()]}],"list-image":[{"list-image":["none",y,g]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",y,g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[C,"from-font","auto",y,Q]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[C,"auto",y,g]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",y,g]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",y,g]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Bt()}],"bg-repeat":[{bg:Vt()}],"bg-size":[{bg:Ht()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Y,y,g],radial:["",y,g],conic:[Y,y,g]},eo,Jn]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ot()}],"gradient-via-pos":[{via:ot()}],"gradient-to-pos":[{to:ot()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[C,y,g]}],"outline-w":[{outline:["",C,de,Q]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,Ae,Pe]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,Ae,Pe]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[C,Q]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,Ae,Pe]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[C,y,g]}],"mix-blend":[{"mix-blend":[...Kt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Kt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[C]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[y,g]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":w()}],"mask-image-conic-pos":[{"mask-conic":[C]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Bt()}],"mask-repeat":[{mask:Vt()}],"mask-size":[{mask:Ht()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",y,g]}],filter:[{filter:["","none",y,g]}],blur:[{blur:Yt()}],brightness:[{brightness:[C,y,g]}],contrast:[{contrast:[C,y,g]}],"drop-shadow":[{"drop-shadow":["","none",p,Ae,Pe]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",C,y,g]}],"hue-rotate":[{"hue-rotate":[C,y,g]}],invert:[{invert:["",C,y,g]}],saturate:[{saturate:[C,y,g]}],sepia:[{sepia:["",C,y,g]}],"backdrop-filter":[{"backdrop-filter":["","none",y,g]}],"backdrop-blur":[{"backdrop-blur":Yt()}],"backdrop-brightness":[{"backdrop-brightness":[C,y,g]}],"backdrop-contrast":[{"backdrop-contrast":[C,y,g]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,y,g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,y,g]}],"backdrop-invert":[{"backdrop-invert":["",C,y,g]}],"backdrop-opacity":[{"backdrop-opacity":[C,y,g]}],"backdrop-saturate":[{"backdrop-saturate":[C,y,g]}],"backdrop-sepia":[{"backdrop-sepia":["",C,y,g]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":h()}],"border-spacing-x":[{"border-spacing-x":h()}],"border-spacing-y":[{"border-spacing-y":h()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",y,g]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[C,"initial",y,g]}],ease:[{ease:["linear","initial",E,y,g]}],delay:[{delay:[C,y,g]}],animate:[{animate:["none",O,y,g]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,y,g]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:st()}],"skew-x":[{"skew-x":st()}],"skew-y":[{"skew-y":st()}],transform:[{transform:[y,g,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",y,g]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",y,g]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[C,de,Q,ct]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oo=jn(no);function M(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var so=typeof Symbol=="function"&&Symbol.observable||"@@observable",tr=so,lt=()=>Math.random().toString(36).substring(7).split("").join("."),io={INIT:`@@redux/INIT${lt()}`,REPLACE:`@@redux/REPLACE${lt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${lt()}`},Le=io;function Pt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function At(e,t,r){if(typeof e!="function")throw new Error(M(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(M(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(M(1));return r(At)(e,t)}let n=e,o=t,s=new Map,i=s,c=0,a=!1;function l(){i===s&&(i=new Map,s.forEach((b,E)=>{i.set(E,b)}))}function u(){if(a)throw new Error(M(3));return o}function d(b){if(typeof b!="function")throw new Error(M(4));if(a)throw new Error(M(5));let E=!0;l();const O=c++;return i.set(O,b),function(){if(E){if(a)throw new Error(M(6));E=!1,l(),i.delete(O),s=null}}}function f(b){if(!Pt(b))throw new Error(M(7));if(typeof b.type>"u")throw new Error(M(8));if(typeof b.type!="string")throw new Error(M(17));if(a)throw new Error(M(9));try{a=!0,o=n(o,b)}finally{a=!1}return(s=i).forEach(O=>{O()}),b}function p(b){if(typeof b!="function")throw new Error(M(10));n=b,f({type:Le.REPLACE})}function _(){const b=d;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(M(11));function O(){const w=E;w.next&&w.next(u())}return O(),{unsubscribe:b(O)}},[tr](){return this}}}return f({type:Le.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[tr]:_}}function ao(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Le.INIT})>"u")throw new Error(M(12));if(typeof r(void 0,{type:Le.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(M(13))})}function Tt(e){const t=Object.keys(e),r={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(r[i]=e[i])}const n=Object.keys(r);let o;try{ao(r)}catch(s){o=s}return function(i={},c){if(o)throw o;let a=!1;const l={};for(let u=0;u<n.length;u++){const d=n[u],f=r[d],p=i[d],_=f(p,c);if(typeof _>"u")throw c&&c.type,new Error(M(14));l[d]=_,a=a||_!==p}return a=a||n.length!==Object.keys(i).length,a?l:i}}function qe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function co(...e){return t=>(r,n)=>{const o=t(r,n);let s=()=>{throw new Error(M(15))};const i={getState:o.getState,dispatch:(a,...l)=>s(a,...l)},c=e.map(a=>a(i));return s=qe(...c)(o.dispatch),{...o,dispatch:s}}}function lo(e){return Pt(e)&&"type"in e&&typeof e.type=="string"}var Dr=Symbol.for("immer-nothing"),rr=Symbol.for("immer-draftable"),D=Symbol.for("immer-state");function q(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var W=Object,ae=W.getPrototypeOf,Ue="constructor",Ke="prototype",bt="configurable",$e="enumerable",Ne="writable",ge="value",K=e=>!!e&&!!e[D];function U(e){return e?jr(e)||Xe(e)||!!e[rr]||!!e[Ue]?.[rr]||Je(e)||Qe(e):!1}var uo=W[Ke][Ue].toString(),nr=new WeakMap;function jr(e){if(!e||!It(e))return!1;const t=ae(e);if(t===null||t===W[Ke])return!0;const r=W.hasOwnProperty.call(t,Ue)&&t[Ue];if(r===Object)return!0;if(!ie(r))return!1;let n=nr.get(r);return n===void 0&&(n=Function.toString.call(r),nr.set(r,n)),n===uo}function Ye(e,t,r=!0){ve(e)===0?(r?Reflect.ownKeys(e):W.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function ve(e){const t=e[D];return t?t.type_:Xe(e)?1:Je(e)?2:Qe(e)?3:0}var or=(e,t,r=ve(e))=>r===2?e.has(t):W[Ke].hasOwnProperty.call(e,t),wt=(e,t,r=ve(e))=>r===2?e.get(t):e[t],Ge=(e,t,r,n=ve(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function fo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Xe=Array.isArray,Je=e=>e instanceof Map,Qe=e=>e instanceof Set,It=e=>typeof e=="object",ie=e=>typeof e=="function",ut=e=>typeof e=="boolean";function po(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var V=e=>e.copy_||e.base_,Mt=e=>e.modified_?e.copy_:e.base_;function vt(e,t){if(Je(e))return new Map(e);if(Qe(e))return new Set(e);if(Xe(e))return Array[Ke].slice.call(e);const r=jr(e);if(t===!0||t==="class_only"&&!r){const n=W.getOwnPropertyDescriptors(e);delete n[D];let o=Reflect.ownKeys(n);for(let s=0;s<o.length;s++){const i=o[s],c=n[i];c[Ne]===!1&&(c[Ne]=!0,c[bt]=!0),(c.get||c.set)&&(n[i]={[bt]:!0,[Ne]:!0,[$e]:c[$e],[ge]:e[i]})}return W.create(ae(e),n)}else{const n=ae(e);if(n!==null&&r)return{...e};const o=W.create(n);return W.assign(o,e)}}function zt(e,t=!1){return Ze(e)||K(e)||!U(e)||(ve(e)>1&&W.defineProperties(e,{set:Te,add:Te,clear:Te,delete:Te}),W.freeze(e),t&&Ye(e,(r,n)=>{zt(n,!0)},!1)),e}function ho(){q(2)}var Te={[ge]:ho};function Ze(e){return e===null||!It(e)?!0:W.isFrozen(e)}var Be="MapSet",St="Patches",sr="ArrayMethods",Fr={};function re(e){const t=Fr[e];return t||q(0,e),t}var ir=e=>!!Fr[e],ye,Wr=()=>ye,mo=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ir(Be)?re(Be):void 0,arrayMethodsPlugin_:ir(sr)?re(sr):void 0});function ar(e,t){t&&(e.patchPlugin_=re(St),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function kt(e){_t(e),e.drafts_.forEach(go),e.drafts_=null}function _t(e){e===ye&&(ye=e.parent_)}var cr=e=>ye=mo(ye,e);function go(e){const t=e[D];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function lr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[D].modified_&&(kt(t),q(4)),U(e)&&(e=ur(t,e));const{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[D].base_,e,t)}else e=ur(t,r);return yo(t,e,!0),kt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Dr?e:void 0}function ur(e,t){if(Ze(t))return t;const r=t[D];if(!r)return Ve(t,e.handledSet_,e);if(!et(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Ur(r,e)}return r.copy_}function yo(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zt(t,r)}function Lr(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var et=(e,t)=>e.scope_===t,bo=[];function qr(e,t,r,n){const o=V(e),s=e.type_;if(n!==void 0&&wt(o,n,s)===t){Ge(o,n,r,s);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Ye(o,(a,l)=>{if(K(l)){const u=c.get(l)||[];u.push(a),c.set(l,u)}})}const i=e.draftLocations_.get(t)??bo;for(const c of i)Ge(o,c,r,s)}function wo(e,t,r){e.callbacks_.push(function(o){const s=t;if(!s||!et(s,o))return;o.mapSetPlugin_?.fixSetContents(s);const i=Mt(s);qr(e,s.draft_??s,i,r),Ur(s,o)})}function Ur(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const o=n.getPath(e);o&&n.generatePatches_(e,o,t)}Lr(e)}}function vo(e,t,r){const{scope_:n}=e;if(K(r)){const o=r[D];et(o,n)&&o.callbacks_.push(function(){De(e);const i=Mt(o);qr(e,r,i,t)})}else U(r)&&e.callbacks_.push(function(){const s=V(e);e.type_===3?s.has(r)&&Ve(r,n.handledSet_,n):wt(s,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ve(wt(e.copy_,t,e.type_),n.handledSet_,n)})}function Ve(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||K(e)||t.has(e)||!U(e)||Ze(e)||(t.add(e),Ye(e,(n,o)=>{if(K(o)){const s=o[D];if(et(s,r)){const i=Mt(s);Ge(e,n,i,e.type_),Lr(s)}}else U(o)&&Ve(o,t,r)})),e}function So(e,t){const r=Xe(e),n={type_:r?1:0,scope_:t?t.scope_:Wr(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=n,s=He;r&&(o=[n],s=be);const{revoke:i,proxy:c}=Proxy.revocable(o,s);return n.draft_=c,n.revoke_=i,[c,n]}var He={get(e,t){if(t===D)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const o=V(e);if(!or(o,t,e.type_))return ko(e,o,t);const s=o[t];if(e.finalized_||!U(s)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&po(t))return s;if(s===dt(e.base_,t)){De(e);const i=e.type_===1?+t:t,c=Ct(e.scope_,s,e,i);return e.copy_[i]=c}return s},has(e,t){return t in V(e)},ownKeys(e){return Reflect.ownKeys(V(e))},set(e,t,r){const n=$r(V(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=dt(V(e),t),s=o?.[D];if(s&&s.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(fo(r,o)&&(r!==void 0||or(e.base_,t,e.type_)))return!0;De(e),xt(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),vo(e,t,r)),!0},deleteProperty(e,t){return De(e),dt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),xt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=V(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ne]:!0,[bt]:e.type_!==1||t!=="length",[$e]:n[$e],[ge]:r[t]}},defineProperty(){q(11)},getPrototypeOf(e){return ae(e.base_)},setPrototypeOf(){q(12)}},be={};for(let e in He){let t=He[e];be[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}be.deleteProperty=function(e,t){return be.set.call(this,e,t,void 0)};be.set=function(e,t,r){return He.set.call(this,e[0],t,r,e[0])};function dt(e,t){const r=e[D];return(r?V(r):e)[t]}function ko(e,t,r){const n=$r(t,r);return n?ge in n?n[ge]:n.get?.call(e.draft_):void 0}function $r(e,t){if(!(t in e))return;let r=ae(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ae(r)}}function xt(e){e.modified_||(e.modified_=!0,e.parent_&&xt(e.parent_))}function De(e){e.copy_||(e.assigned_=new Map,e.copy_=vt(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var _o=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(ie(t)&&!ie(r)){const s=r;r=t;const i=this;return function(a=s,...l){return i.produce(a,u=>r.call(this,u,...l))}}ie(r)||q(6),n!==void 0&&!ie(n)&&q(7);let o;if(U(t)){const s=cr(this),i=Ct(s,t,void 0);let c=!0;try{o=r(i),c=!1}finally{c?kt(s):_t(s)}return ar(s,n),lr(o,s)}else if(!t||!It(t)){if(o=r(t),o===void 0&&(o=t),o===Dr&&(o=void 0),this.autoFreeze_&&zt(o,!0),n){const s=[],i=[];re(St).generateReplacementPatches_(t,o,{patches_:s,inversePatches_:i}),n(s,i)}return o}else q(1,t)},this.produceWithPatches=(t,r)=>{if(ie(t))return(i,...c)=>this.produceWithPatches(i,a=>t(a,...c));let n,o;return[this.produce(t,r,(i,c)=>{n=i,o=c}),n,o]},ut(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ut(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ut(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){U(e)||q(8),K(e)&&(e=xo(e));const t=cr(this),r=Ct(t,e,void 0);return r[D].isManual_=!0,_t(t),r}finishDraft(e,t){const r=e&&e[D];(!r||!r.isManual_)&&q(9);const{scope_:n}=r;return ar(n,t),lr(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=re(St).applyPatches_;return K(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ct(e,t,r,n){const[o,s]=Je(t)?re(Be).proxyMap_(t,r):Qe(t)?re(Be).proxySet_(t,r):So(t,r);return(r?.scope_??Wr()).drafts_.push(o),s.callbacks_=r?.callbacks_??[],s.key_=n,r&&n!==void 0?wo(r,s,n):s.callbacks_.push(function(a){a.mapSetPlugin_?.fixSetContents(s);const{patchPlugin_:l}=a;s.modified_&&l&&l.generatePatches_(s,[],a)}),o}function xo(e){return K(e)||q(10,e),Gr(e)}function Gr(e){if(!U(e)||Ze(e))return e;const t=e[D];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=vt(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=vt(e,!0);return Ye(r,(o,s)=>{Ge(r,o,Gr(s))},n),t&&(t.finalized_=!1),r}var Co=new _o,Br=Co.produce;function Vr(e){return({dispatch:r,getState:n})=>o=>s=>typeof s=="function"?s(r,n,e):o(s)}var Eo=Vr(),Ro=Vr,Oo=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qe:qe.apply(null,arguments)},Po=e=>e&&typeof e.match=="function";function he(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(H(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>lo(n)&&n.type===e,r}var Hr=class fe extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,fe.prototype)}static get[Symbol.species](){return fe}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new fe(...t[0].concat(this)):new fe(...t.concat(this))}};function dr(e){return U(e)?Br(e,()=>{}):e}function Ie(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Ao(e){return typeof e=="boolean"}var To=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new Hr;return r&&(Ao(r)?i.push(Eo):i.push(Ro(r.extraArgument))),i},Io="RTK_autoBatch",fr=e=>t=>{setTimeout(t,e)},Mo=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let o=!0,s=!1,i=!1;const c=new Set,a=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:fr(10):e.type==="callback"?e.queueNotification:fr(e.timeout),l=()=>{i=!1,s&&(s=!1,c.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const d=()=>o&&u(),f=n.subscribe(d);return c.add(u),()=>{f(),c.delete(u)}},dispatch(u){try{return o=!u?.meta?.[Io],s=!o,s&&(i||(i=!0,a(l))),n.dispatch(u)}finally{o=!0}}})},zo=e=>function(r){const{autoBatch:n=!0}=r??{};let o=new Hr(e);return n&&o.push(Mo(typeof n=="object"?n:void 0)),o};function No(e){const t=To(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(Pt(r))c=Tt(r);else throw new Error(H(1));let a;typeof n=="function"?a=n(t):a=t();let l=qe;o&&(l=Oo({trace:!1,...typeof o=="object"&&o}));const u=co(...a),d=zo(u);let f=typeof i=="function"?i(d):d();const p=l(...f);return At(c,s,p)}function Kr(e){const t={},r=[];let n;const o={addCase(s,i){const c=typeof s=="string"?s:s.type;if(!c)throw new Error(H(28));if(c in t)throw new Error(H(29));return t[c]=i,o},addAsyncThunk(s,i){return i.pending&&(t[s.pending.type]=i.pending),i.rejected&&(t[s.rejected.type]=i.rejected),i.fulfilled&&(t[s.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:s.settled,reducer:i.settled}),o},addMatcher(s,i){return r.push({matcher:s,reducer:i}),o},addDefaultCase(s){return n=s,o}};return e(o),[t,r,n]}function Do(e){return typeof e=="function"}function jo(e,t){let[r,n,o]=Kr(t),s;if(Do(e))s=()=>dr(e());else{const c=dr(e);s=()=>c}function i(c=s(),a){let l=[r[a.type],...n.filter(({matcher:u})=>u(a)).map(({reducer:u})=>u)];return l.filter(u=>!!u).length===0&&(l=[o]),l.reduce((u,d)=>{if(d)if(K(u)){const p=d(u,a);return p===void 0?u:p}else{if(U(u))return Br(u,f=>d(f,a));{const f=d(u,a);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},c)}return i.getInitialState=s,i}var Fo=(e,t)=>Po(e)?e.match(t):e(t);function Wo(...e){return t=>e.some(r=>Fo(r,t))}var Lo="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",qo=(e=21)=>{let t="",r=e;for(;r--;)t+=Lo[Math.random()*64|0];return t},Uo=["name","message","stack","code"],ft=class{constructor(e,t){this.payload=e,this.meta=t}_type},pr=class{constructor(e,t){this.payload=e,this.meta=t}_type},$o=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of Uo)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},hr="External signal was aborted",Nt=(()=>{function e(t,r,n){const o=he(t+"/fulfilled",(a,l,u,d)=>({payload:a,meta:{...d||{},arg:u,requestId:l,requestStatus:"fulfilled"}})),s=he(t+"/pending",(a,l,u)=>({payload:void 0,meta:{...u||{},arg:l,requestId:a,requestStatus:"pending"}})),i=he(t+"/rejected",(a,l,u,d,f)=>({payload:d,error:(n&&n.serializeError||$o)(a||"Rejected"),meta:{...f||{},arg:u,requestId:l,rejectedWithValue:!!d,requestStatus:"rejected",aborted:a?.name==="AbortError",condition:a?.name==="ConditionError"}}));function c(a,{signal:l}={}){return(u,d,f)=>{const p=n?.idGenerator?n.idGenerator(a):qo(),_=new AbortController;let m,b;function E(S){b=S,_.abort()}l&&(l.aborted?E(hr):l.addEventListener("abort",()=>E(hr),{once:!0}));const O=(async function(){let S;try{let v=n?.condition?.(a,{getState:d,extra:f});if(Bo(v)&&(v=await v),v===!1||_.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const x=new Promise((R,h)=>{m=()=>{h({name:"AbortError",message:b||"Aborted"})},_.signal.addEventListener("abort",m,{once:!0})});u(s(p,a,n?.getPendingMeta?.({requestId:p,arg:a},{getState:d,extra:f}))),S=await Promise.race([x,Promise.resolve(r(a,{dispatch:u,getState:d,extra:f,requestId:p,signal:_.signal,abort:E,rejectWithValue:(R,h)=>new ft(R,h),fulfillWithValue:(R,h)=>new pr(R,h)})).then(R=>{if(R instanceof ft)throw R;return R instanceof pr?o(R.payload,p,a,R.meta):o(R,p,a)})])}catch(v){S=v instanceof ft?i(null,p,a,v.payload,v.meta):i(v,p,a)}finally{m&&_.signal.removeEventListener("abort",m)}return n&&!n.dispatchConditionRejection&&i.match(S)&&S.meta.condition||u(S),S})();return Object.assign(O,{abort:E,requestId:p,arg:a,unwrap(){return O.then(Go)}})}}return Object.assign(c,{pending:s,rejected:i,fulfilled:o,settled:Wo(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Go(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Bo(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Vo=Symbol.for("rtk-slice-createasyncthunk");function Ho(e,t){return`${e}/${t}`}function Ko({creators:e}={}){const t=e?.asyncThunk?.[Vo];return function(n){const{name:o,reducerPath:s=o}=n;if(!o)throw new Error(H(11));const i=(typeof n.reducers=="function"?n.reducers(Xo()):n.reducers)||{},c=Object.keys(i),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(S,w){const v=typeof S=="string"?S:S.type;if(!v)throw new Error(H(12));if(v in a.sliceCaseReducersByType)throw new Error(H(13));return a.sliceCaseReducersByType[v]=w,l},addMatcher(S,w){return a.sliceMatchers.push({matcher:S,reducer:w}),l},exposeAction(S,w){return a.actionCreators[S]=w,l},exposeCaseReducer(S,w){return a.sliceCaseReducersByName[S]=w,l}};c.forEach(S=>{const w=i[S],v={reducerName:S,type:Ho(o,S),createNotation:typeof n.reducers=="function"};Qo(w)?es(v,w,l,t):Jo(v,w,l)});function u(){const[S={},w=[],v=void 0]=typeof n.extraReducers=="function"?Kr(n.extraReducers):[n.extraReducers],x={...S,...a.sliceCaseReducersByType};return jo(n.initialState,R=>{for(let h in x)R.addCase(h,x[h]);for(let h of a.sliceMatchers)R.addMatcher(h.matcher,h.reducer);for(let h of w)R.addMatcher(h.matcher,h.reducer);v&&R.addDefaultCase(v)})}const d=S=>S,f=new Map,p=new WeakMap;let _;function m(S,w){return _||(_=u()),_(S,w)}function b(){return _||(_=u()),_.getInitialState()}function E(S,w=!1){function v(R){let h=R[S];return typeof h>"u"&&w&&(h=Ie(p,v,b)),h}function x(R=d){const h=Ie(f,w,()=>new WeakMap);return Ie(h,R,()=>{const A={};for(const[ue,_e]of Object.entries(n.selectors??{}))A[ue]=Yo(_e,R,()=>Ie(p,R,b),w);return A})}return{reducerPath:S,getSelectors:x,get selectors(){return x(v)},selectSlice:v}}const O={name:o,reducer:m,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:b,...E(s),injectInto(S,{reducerPath:w,...v}={}){const x=w??s;return S.inject({reducerPath:x,reducer:m},v),{...O,...E(x,!0)}}};return O}}function Yo(e,t,r,n){function o(s,...i){let c=t(s);return typeof c>"u"&&n&&(c=r()),e(c,...i)}return o.unwrapped=e,o}var tt=Ko();function Xo(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Jo({type:e,reducerName:t,createNotation:r},n,o){let s,i;if("reducer"in n){if(r&&!Zo(n))throw new Error(H(17));s=n.reducer,i=n.prepare}else s=n;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?he(e,i):he(e))}function Qo(e){return e._reducerDefinitionType==="asyncThunk"}function Zo(e){return e._reducerDefinitionType==="reducerWithPrepare"}function es({type:e,reducerName:t},r,n,o){if(!o)throw new Error(H(18));const{payloadCreator:s,fulfilled:i,pending:c,rejected:a,settled:l,options:u}=r,d=o(e,s,u);n.exposeAction(t,d),i&&n.addCase(d.fulfilled,i),c&&n.addCase(d.pending,c),a&&n.addCase(d.rejected,a),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:i||Me,pending:c||Me,rejected:a||Me,settled:l||Me})}function Me(){}function H(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Dt="persist:",jt="persist/FLUSH",rt="persist/REHYDRATE",Ft="persist/PAUSE",Wt="persist/PERSIST",Lt="persist/PURGE",qt="persist/REGISTER",ts=-1;function je(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(r){return typeof r}:je=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},je(e)}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mr(r,!0).forEach(function(n){ns(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ns(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function os(e,t,r,n){n.debug;var o=rs({},r);return e&&je(e)==="object"&&Object.keys(e).forEach(function(s){s!=="_persist"&&t[s]===r[s]&&(o[s]=e[s])}),o}function ss(e){var t=e.blacklist||null,r=e.whitelist||null,n=e.transforms||[],o=e.throttle||0,s="".concat(e.keyPrefix!==void 0?e.keyPrefix:Dt).concat(e.key),i=e.storage,c;e.serialize===!1?c=function(v){return v}:typeof e.serialize=="function"?c=e.serialize:c=is;var a=e.writeFailHandler||null,l={},u={},d=[],f=null,p=null,_=function(v){Object.keys(v).forEach(function(x){E(x)&&l[x]!==v[x]&&d.indexOf(x)===-1&&d.push(x)}),Object.keys(l).forEach(function(x){v[x]===void 0&&E(x)&&d.indexOf(x)===-1&&l[x]!==void 0&&d.push(x)}),f===null&&(f=setInterval(m,o)),l=v};function m(){if(d.length===0){f&&clearInterval(f),f=null;return}var w=d.shift(),v=n.reduce(function(x,R){return R.in(x,w,l)},l[w]);if(v!==void 0)try{u[w]=c(v)}catch(x){console.error("redux-persist/createPersistoid: error serializing state",x)}else delete u[w];d.length===0&&b()}function b(){Object.keys(u).forEach(function(w){l[w]===void 0&&delete u[w]}),p=i.setItem(s,c(u)).catch(O)}function E(w){return!(r&&r.indexOf(w)===-1&&w!=="_persist"||t&&t.indexOf(w)!==-1)}function O(w){a&&a(w)}var S=function(){for(;d.length!==0;)m();return p||Promise.resolve()};return{update:_,flush:S}}function is(e){return JSON.stringify(e)}function as(e){var t=e.transforms||[],r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Dt).concat(e.key),n=e.storage;e.debug;var o;return e.deserialize===!1?o=function(i){return i}:typeof e.deserialize=="function"?o=e.deserialize:o=cs,n.getItem(r).then(function(s){if(s)try{var i={},c=o(s);return Object.keys(c).forEach(function(a){i[a]=t.reduceRight(function(l,u){return u.out(l,a,c)},o(c[a]))}),i}catch(a){throw a}else return})}function cs(e){return JSON.parse(e)}function ls(e){var t=e.storage,r="".concat(e.keyPrefix!==void 0?e.keyPrefix:Dt).concat(e.key);return t.removeItem(r,us)}function us(e){}function gr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function B(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gr(r,!0).forEach(function(n){ds(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gr(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ds(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fs(e,t){if(e==null)return{};var r=ps(e,t),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ps(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,s;for(s=0;s<n.length;s++)o=n[s],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var hs=5e3;function Yr(e,t){var r=e.version!==void 0?e.version:ts;e.debug;var n=e.stateReconciler===void 0?os:e.stateReconciler,o=e.getStoredState||as,s=e.timeout!==void 0?e.timeout:hs,i=null,c=!1,a=!0,l=function(d){return d._persist.rehydrated&&i&&!a&&i.update(d),d};return function(u,d){var f=u||{},p=f._persist,_=fs(f,["_persist"]),m=_;if(d.type===Wt){var b=!1,E=function(h,A){b||(d.rehydrate(e.key,h,A),b=!0)};if(s&&setTimeout(function(){!b&&E(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},s),a=!1,i||(i=ss(e)),p)return B({},t(m,d),{_persist:p});if(typeof d.rehydrate!="function"||typeof d.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return d.register(e.key),o(e).then(function(R){var h=e.migrate||function(A,ue){return Promise.resolve(A)};h(R,r).then(function(A){E(A)},function(A){E(void 0,A)})},function(R){E(void 0,R)}),B({},t(m,d),{_persist:{version:r,rehydrated:!1}})}else{if(d.type===Lt)return c=!0,d.result(ls(e)),B({},t(m,d),{_persist:p});if(d.type===jt)return d.result(i&&i.flush()),B({},t(m,d),{_persist:p});if(d.type===Ft)a=!0;else if(d.type===rt){if(c)return B({},m,{_persist:B({},p,{rehydrated:!0})});if(d.key===e.key){var O=t(m,d),S=d.payload,w=n!==!1&&S!==void 0?n(S,u,O,e):O,v=B({},w,{_persist:B({},p,{rehydrated:!0})});return l(v)}}}if(!p)return t(u,d);var x=t(m,d);return x===m?u:l(B({},x,{_persist:p}))}}function yr(e){return ys(e)||gs(e)||ms()}function ms(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function gs(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ys(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?br(r,!0).forEach(function(n){bs(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(r).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xr={registry:[],bootstrapped:!1},ws=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xr,r=arguments.length>1?arguments[1]:void 0;switch(r.type){case qt:return Et({},t,{registry:[].concat(yr(t.registry),[r.key])});case rt:var n=t.registry.indexOf(r.key),o=yr(t.registry);return o.splice(n,1),Et({},t,{registry:o,bootstrapped:o.length===0});default:return t}};function vs(e,t,r){var n=At(ws,Xr,void 0),o=function(a){n.dispatch({type:qt,key:a})},s=function(a,l,u){var d={type:rt,payload:l,err:u,key:a};e.dispatch(d),n.dispatch(d)},i=Et({},n,{purge:function(){var a=[];return e.dispatch({type:Lt,result:function(u){a.push(u)}}),Promise.all(a)},flush:function(){var a=[];return e.dispatch({type:jt,result:function(u){a.push(u)}}),Promise.all(a)},pause:function(){e.dispatch({type:Ft})},persist:function(){e.dispatch({type:Wt,register:o,rehydrate:s})}});return i.persist(),i}function Jr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=r.whitelist||null,o=r.blacklist||null;function s(i){return!!(n&&n.indexOf(i)===-1||o&&o.indexOf(i)!==-1)}return{in:function(c,a,l){return!s(a)&&e?e(c,a,l):c},out:function(c,a,l){return!s(a)&&t?t(c,a,l):c}}}function Fe(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fe=function(r){return typeof r}:Fe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fe(e)}function pt(){}var Ss={getItem:pt,setItem:pt,removeItem:pt};function ks(e){if((typeof self>"u"?"undefined":Fe(self))!=="object"||!(e in self))return!1;try{var t=self[e],r="redux-persist ".concat(e," test");t.setItem(r,"test"),t.getItem(r),t.removeItem(r)}catch{return!1}return!0}function _s(e){var t="".concat(e,"Storage");return ks(t)?self[t]:Ss}function xs(e){var t=_s(e);return{getItem:function(n){return new Promise(function(o,s){o(t.getItem(n))})},setItem:function(n,o){return new Promise(function(s,i){s(t.setItem(n,o))})},removeItem:function(n){return new Promise(function(o,s){o(t.removeItem(n))})}}}const Cs=xs("local"),Es={sidebarOpen:!0,activeMenu:"home"},Qr=tt({name:"ui",initialState:Es,reducers:{toggleSidebar:e=>{e.sidebarOpen=!e.sidebarOpen},setSidebarOpen:(e,t)=>{e.sidebarOpen=t.payload},setActiveMenu:(e,t)=>{e.activeMenu=t.payload}}}),{toggleSidebar:bi,setSidebarOpen:wi,setActiveMenu:vi}=Qr.actions,Rs=Qr.reducer,Os={routes:[]},Ps=(e,t)=>{const r=t.split("/").filter(Boolean);for(let n=r.length-1;n>0;n--){const o="/"+r.slice(0,n).join("/"),s=e.find(i=>i.path===o);if(s)return s}return e.find(n=>n.path==="/")||null},As=(e,t)=>e==="/"?t:t.replace(e+"/",""),Zr=tt({name:"route",initialState:Os,reducers:{addRoute:(e,t)=>{const r=t.payload,n=Ps(e.routes,r.path);if(n){n.children||(n.children=[]);const o=As(n.path,r.path);n.children.push({...r,path:o})}else e.routes.push(r);e.routes.sort((o,s)=>(o.meta?.order||999)-(s.meta?.order||999))},removeRoute:(e,t)=>{const r=t.payload,n=o=>{const s=o.findIndex(i=>i.path===r);if(s>=0)return o.splice(s,1),!0;for(const i of o)if(i.children&&n(i.children))return!0;return!1};n(e.routes)},updateRoute:(e,t)=>{const{path:r,updates:n}=t.payload,o=s=>{const i=s.findIndex(c=>c.path===r);if(i>=0)return s[i]={...s[i],...n},!0;for(const c of s)if(c.children&&o(c.children))return!0;return!1};o(e.routes)},setRoutes:(e,t)=>{e.routes=t.payload,e.routes.sort((r,n)=>(r.meta?.order||999)-(n.meta?.order||999))},clearRoutes:e=>{e.routes=[]}}}),{addRoute:Ts,removeRoute:Is,updateRoute:Ms,setRoutes:Si,clearRoutes:zs}=Zr.actions,Ns=Zr.reducer,Ds={entries:[],loadedScripts:[],synced:!1},Ut=Nt("script/loadScript",async e=>new Promise((t,r)=>{const n=document.createElement("script");n.type="module",n.src=e,n.dataset.dynamicEntry="true",n.onload=()=>t(e),n.onerror=o=>{console.error("[Script] Load failed:",e),r(o)},document.body.appendChild(n)})),en=Nt("script/loadScripts",async(e,{dispatch:t})=>(await Promise.allSettled(e.map(n=>t(Ut(n)).unwrap()))).filter(n=>n.status==="fulfilled").map(n=>n.value)),tn=Nt("script/unloadScript",async e=>(document.querySelectorAll(`script[src="${e}"][data-dynamic-entry="true"]`).forEach(r=>r.remove()),e)),rn=tt({name:"script",initialState:Ds,reducers:{syncEntries:(e,t)=>{e.entries=t.payload,e.synced=!0},addEntry:(e,t)=>{e.entries.includes(t.payload)||e.entries.push(t.payload)},removeEntry:(e,t)=>{e.entries=e.entries.filter(r=>r!==t.payload),e.loadedScripts=e.loadedScripts.filter(r=>r!==t.payload)}},extraReducers:e=>{e.addCase(Ut.fulfilled,(t,r)=>{t.loadedScripts.includes(r.payload)||t.loadedScripts.push(r.payload)}),e.addCase(en.fulfilled,(t,r)=>{r.payload.forEach(n=>{t.loadedScripts.includes(n)||t.loadedScripts.push(n)})}),e.addCase(tn.fulfilled,(t,r)=>{t.loadedScripts=t.loadedScripts.filter(n=>n!==r.payload)})}}),{syncEntries:js,addEntry:Fs,removeEntry:Ws}=rn.actions,Ls=rn.reducer,qs={configs:{},schemas:{},loading:{},errors:{},connected:!1},nn=tt({name:"config",initialState:qs,reducers:{setConnected:(e,t)=>{e.connected=t.payload},setLoading:(e,t)=>{const{pluginName:r,loading:n}=t.payload;e.loading[r]=n},setError:(e,t)=>{const{pluginName:r,error:n}=t.payload;e.errors[r]=n},updateConfig:(e,t)=>{const{pluginName:r,config:n}=t.payload;e.configs[r]=n,e.loading[r]=!1,e.errors[r]=null},updateSchema:(e,t)=>{const{pluginName:r,schema:n}=t.payload;e.schemas[r]=n},updateConfigs:(e,t)=>{e.configs={...e.configs,...t.payload}},updateSchemas:(e,t)=>{e.schemas={...e.schemas,...t.payload}},removeConfig:(e,t)=>{const r=t.payload;delete e.configs[r],delete e.schemas[r],delete e.loading[r],delete e.errors[r]},clearConfigs:e=>{e.configs={},e.schemas={},e.loading={},e.errors={}}}}),{setConnected:ht,setLoading:ze,setError:pe,updateConfig:on,updateSchema:sn,updateConfigs:an,updateSchemas:cn,removeConfig:ki,clearConfigs:_i}=nn.actions,Us=nn.reducer,$s=(e,t)=>e.config.configs[t],Gs=(e,t)=>e.config.schemas[t],Bs=(e,t)=>e.config.loading[t]||!1,Vs=(e,t)=>e.config.errors[t]||null,Se=e=>e.config.connected,Hs=e=>e.config.configs,Ks=e=>e.config.schemas,Rt={ui:Rs,route:Ns,script:Ls,config:Us};var mt={exports:{}},gt={};var wr;function Ys(){if(wr)return gt;wr=1;var e=fn;function t(a,l){return a===l&&(a!==0||1/a===1/l)||a!==a&&l!==l}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,i=e.useMemo,c=e.useDebugValue;return gt.useSyncExternalStoreWithSelector=function(a,l,u,d,f){var p=o(null);if(p.current===null){var _={hasValue:!1,value:null};p.current=_}else _=p.current;p=i(function(){function b(v){if(!E){if(E=!0,O=v,v=d(v),f!==void 0&&_.hasValue){var x=_.value;if(f(x,v))return S=x}return S=v}if(x=S,r(O,v))return x;var R=d(v);return f!==void 0&&f(x,R)?(O=v,x):(O=v,S=R)}var E=!1,O,S,w=u===void 0?null:u;return[function(){return b(l())},w===null?void 0:function(){return b(w())}]},[l,u,d,f]);var m=n(a,p[0],p[1]);return s(function(){_.hasValue=!0,_.value=m},[m]),c(m),m},gt}var vr;function Xs(){return vr||(vr=1,mt.exports=Ys()),mt.exports}var Js=Xs(),Qs=Symbol.for("react-redux-context"),Zs=typeof globalThis<"u"?globalThis:{};function ei(){if(!X.createContext)return{};const e=Zs[Qs]??=new Map;let t=e.get(X.createContext);return t||(t=X.createContext(null),e.set(X.createContext,t)),t}var ne=ei();function $t(e=ne){return function(){return X.useContext(e)}}var ln=$t();function un(e=ne){const t=e===ne?ln:$t(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var ti=un();function ri(e=ne){const t=e===ne?ti:un(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var ni=ri(),oi=(e,t)=>e===t;function si(e=ne){const t=e===ne?ln:$t(e),r=(n,o={})=>{const{equalityFn:s=oi}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:c,subscription:a,getServerState:l}=i;X.useRef(!0);const u=X.useCallback({[n.name](f){return n(f)}}[n.name],[n]),d=Js.useSyncExternalStoreWithSelector(a.addNestedSub,c.getState,l||c.getState,u,s);return X.useDebugValue(d),d};return Object.assign(r,{withTypes:()=>r}),r}var ii=si();const ai=Jr(e=>{const{routes:t,...r}=e;return r},e=>({...e,routes:[]}),{whitelist:["route"]}),ci=Jr(e=>{const{entries:t,loadedScripts:r,synced:n,...o}=e;return o},e=>({...e,entries:[],loadedScripts:[],synced:!1}),{whitelist:["script"]}),dn={key:"root",storage:Cs,transforms:[ai,ci]},li=Yr(dn,Tt(Rt)),P=No({reducer:li,middleware:e=>e({serializableCheck:{ignoredActions:[jt,rt,Ft,Wt,Lt,qt,"route/addRoute","route/updateRoute","route/setRoutes"],ignoredPaths:["route.routes"]}})}),xi=vs(P);typeof window<"u"&&(window.__REDUX_STORE__=P);function Ci(e,t){Rt[e]=t;const r=Yr(dn,Tt(Rt));P.replaceReducer(r)}const ui=ni,j=ii,Ei=e=>P.dispatch(Ts(e)),Ri=e=>P.dispatch(Is(e)),Oi=(e,t)=>P.dispatch(Ms({path:e,updates:t})),Pi=e=>P.getState().route.routes.find(t=>t.path===e),Ai=()=>P.getState().route.routes,Ti=()=>P.dispatch(zs());function Ii(){const e=j(r=>r.route.routes),t=we(()=>{const r=s=>{const i={path:s.path,element:s.element,Component:s.Component};return s.children&&s.children.length>0&&(i.children=s.children.map(c=>r(c))),i},n=e.map(r);return pn([{path:"/",element:it(mn,{}),children:n},{path:"*",element:it("div",{children:"404 - Page Not Found"})}])},[e]);return it(hn,{router:t})}var L=(e=>(e.DISCONNECTED="disconnected",e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.ERROR="error",e))(L||{});class ee extends Error{constructor(t,r,n){super(t),this.code=r,this.originalError=n,this.name="WebSocketError"}}class di extends ee{constructor(t){super(`Request ${t} timed out`,"REQUEST_TIMEOUT")}}class Sr extends ee{constructor(t,r){super(t,"CONNECTION_ERROR",r)}}class kr extends ee{constructor(t,r){super(t,"MESSAGE_ERROR",r)}}class fi{static handle(t){try{switch(t.type){case"sync":this.handleScriptSync(t);break;case"add":this.handleScriptAdd(t);break;case"delete":this.handleScriptDelete(t);break;case"config:updated":this.handleConfigUpdated(t);break;case"config:batch":this.handleConfigBatch(t);break;case"config:error":this.handleConfigError(t);break;case"schema:updated":this.handleSchemaUpdated(t);break;case"schema:batch":this.handleSchemaBatch(t);break;case"hmr:reload":this.handleHmrReload(t);break;case"init-data":case"data-update":this.handleSystemMessage(t);break;default:console.warn("[WebSocket] Unknown message type:",t.type)}}catch(r){console.error("[WebSocket] Message handling error:",r)}}static handleScriptSync(t){if(t.data?.key==="entries"){const r=Array.isArray(t.data.value)?t.data.value:[t.data.value];P.dispatch(js(r)),P.dispatch(en(r))}}static handleScriptAdd(t){t.data?.key==="entries"&&(P.dispatch(Fs(t.data.value)),P.dispatch(Ut(t.data.value)))}static handleScriptDelete(t){t.data?.key==="entries"&&(P.dispatch(Ws(t.data.value)),P.dispatch(tn(t.data.value)))}static handleConfigUpdated(t){t.pluginName&&t.data!==void 0&&P.dispatch(on({pluginName:t.pluginName,config:t.data}))}static handleConfigBatch(t){t.data&&P.dispatch(an(t.data))}static handleConfigError(t){t.pluginName&&t.error&&P.dispatch(pe({pluginName:t.pluginName,error:t.error}))}static handleSchemaUpdated(t){t.pluginName&&t.data!==void 0&&P.dispatch(sn({pluginName:t.pluginName,schema:t.data}))}static handleSchemaBatch(t){t.data&&P.dispatch(cn(t.data))}static handleHmrReload(t){const r=t.data?.file||"";console.info(`[HMR] 文件变更: ${r},正在刷新页面...`),window.location.reload()}static handleSystemMessage(t){}}class pi{ws=null;config;callbacks;state=L.DISCONNECTED;reconnectAttempts=0;reconnectTimer=null;requestId=0;pendingRequests=new Map;constructor(t={},r={}){this.config={url:this.buildWebSocketUrl(t.url),reconnectInterval:t.reconnectInterval??3e3,maxReconnectAttempts:t.maxReconnectAttempts??10,requestTimeout:t.requestTimeout??1e4},this.callbacks=r}connect(){if(!(this.state===L.CONNECTED||this.state===L.CONNECTING)){this.setState(L.CONNECTING);try{this.ws=new WebSocket(this.config.url),this.attachEventHandlers()}catch(t){this.handleConnectionError(new Sr("Failed to create WebSocket",t))}}}disconnect(){this.clearReconnectTimer(),this.clearPendingRequests(),this.ws&&(this.ws.close(),this.ws=null),this.setState(L.DISCONNECTED),P.dispatch(ht(!1))}send(t){if(!this.isConnected())throw new ee("WebSocket is not connected","NOT_CONNECTED");try{this.ws.send(JSON.stringify(t))}catch(r){throw new kr("Failed to send message",r)}}async sendRequest(t){if(!this.isConnected())throw new ee("WebSocket is not connected","NOT_CONNECTED");return new Promise((r,n)=>{const o=++this.requestId,s={...t,requestId:o},i=setTimeout(()=>{this.pendingRequests.delete(o),n(new di(o))},this.config.requestTimeout);this.pendingRequests.set(o,{resolve:r,reject:n,timer:i});try{this.ws.send(JSON.stringify(s))}catch(c){this.pendingRequests.delete(o),clearTimeout(i),n(new kr("Failed to send request",c))}})}isConnected(){return this.ws?.readyState===WebSocket.OPEN}getState(){return this.state}async getConfig(t){return this.sendRequest({type:"config:get",pluginName:t})}async setConfig(t,r){return this.sendRequest({type:"config:set",pluginName:t,data:r})}async getSchema(t){return this.sendRequest({type:"schema:get",pluginName:t})}async getAllConfigs(){return this.sendRequest({type:"config:get-all"})}async getAllSchemas(){return this.sendRequest({type:"schema:get-all"})}async getConfigYaml(){return this.sendRequest({type:"config:get-yaml"})}async saveConfigYaml(t){return this.sendRequest({type:"config:save-yaml",yaml:t})}async getEnvList(){return this.sendRequest({type:"env:list"})}async getEnvFile(t){return this.sendRequest({type:"env:get",filename:t})}async saveEnvFile(t,r){return this.sendRequest({type:"env:save",filename:t,content:r})}buildWebSocketUrl(t){if(t)return t;const r=window.location.protocol==="https:"?"wss:":"ws:",n=window.location.host;return`${r}//${n}/server`}setState(t){const r=this.state;this.state=t,console.debug(`[WebSocket] State changed: ${r} -> ${t}`)}attachEventHandlers(){this.ws&&(this.ws.onopen=()=>{this.handleConnectionOpen()},this.ws.onmessage=t=>{this.handleMessage(t)},this.ws.onclose=t=>{this.handleConnectionClose(t)},this.ws.onerror=t=>{this.handleConnectionError(new Sr("WebSocket error",t))})}handleConnectionOpen(){this.setState(L.CONNECTED),this.reconnectAttempts=0,P.dispatch(ht(!0)),this.initializeData(),this.callbacks.onConnect?.()}handleMessage(t){try{const r=JSON.parse(t.data);if(r.requestId&&this.pendingRequests.has(r.requestId)){this.handleRequestResponse(r);return}fi.handle(r),this.callbacks.onMessage?.(r)}catch(r){console.error("[WebSocket] Message parsing error:",r)}}handleRequestResponse(t){const{requestId:r}=t,n=this.pendingRequests.get(r);n&&(this.pendingRequests.delete(r),clearTimeout(n.timer),t.error?n.reject(new ee(t.error,"SERVER_ERROR")):n.resolve(t.data))}handleConnectionClose(t){this.ws=null,P.dispatch(ht(!1)),this.state!==L.DISCONNECTED&&(this.setState(L.RECONNECTING),this.callbacks.onDisconnect?.(),this.scheduleReconnect())}handleConnectionError(t){this.clearReconnectTimer(),this.setState(L.ERROR),console.error("[WebSocket] Connection error:",t),this.callbacks.onError?.(t)}scheduleReconnect(){if(this.reconnectAttempts>=this.config.maxReconnectAttempts){console.error("[WebSocket] Max reconnect attempts reached"),this.setState(L.ERROR);return}this.reconnectAttempts++;const t=this.config.reconnectInterval*this.reconnectAttempts;console.debug(`[WebSocket] Reconnecting in ${t}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`),this.reconnectTimer=setTimeout(()=>{this.state===L.RECONNECTING&&this.connect()},t)}clearReconnectTimer(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}clearPendingRequests(){for(const[t,{reject:r,timer:n}]of this.pendingRequests)clearTimeout(n),r(new ee("Connection closed","CONNECTION_CLOSED"));this.pendingRequests.clear()}async initializeData(){try{const[t,r]=await Promise.all([this.getAllConfigs().catch(n=>(console.warn("[WebSocket] Failed to load configs:",n),{})),this.getAllSchemas().catch(n=>(console.warn("[WebSocket] Failed to load schemas:",n),{}))]);P.dispatch(an(t)),P.dispatch(cn(r))}catch(t){console.error("[WebSocket] Data initialization failed:",t)}}}let te=null;function ke(){return te||(te=new pi,typeof window<"u"&&te.connect()),te}function hi(){te&&(te.disconnect(),te=null)}function Mi(){hi()}function zi(e={}){const{autoConnect:t=!0}=e,r=ke(),n=j(Se),o=j(f=>f.script?.entries||[]),s=j(f=>f.script?.loadedScripts||[]),i=z(()=>{r.connect()},[r]),c=z(()=>{r.disconnect()},[r]),a=z(f=>{r.send(f)},[r]),l=z(async f=>r.sendRequest(f),[r]),u=z(()=>r.isConnected(),[r]),d=z(()=>r.isConnected()?"connected":"disconnected",[r]);return me(()=>{t&&!n&&i()},[t,n,i]),{connected:n,entries:o,loadedScripts:s,connect:i,disconnect:c,send:a,sendRequest:l,isConnected:u,getState:d,manager:r}}function Ni(e,t={}){const{autoLoad:r=!0,autoLoadSchema:n=!0}=t,o=ui(),s=ke(),i=j(m=>$s(m,e)),c=j(m=>Gs(m,e)),a=j(m=>Bs(m,e)),l=j(m=>Vs(m,e)),u=j(Se),d=z(async()=>{o(ze({pluginName:e,loading:!0})),o(pe({pluginName:e,error:null}));try{const m=await s.getConfig(e);return o(on({pluginName:e,config:m})),m}catch(m){console.error("[useConfig] getConfig failed:",m);const b=m instanceof Error?m.message:"Unknown error";throw o(pe({pluginName:e,error:b})),m}finally{o(ze({pluginName:e,loading:!1}))}},[e,s,o]),f=z(async m=>{o(ze({pluginName:e,loading:!0})),o(pe({pluginName:e,error:null}));try{const b=await s.setConfig(e,m);return{reloaded:b?.reloaded,message:b?.message}}catch(b){console.error("[useConfig] setConfig failed:",b);const E=b instanceof Error?b.message:"Unknown error";throw o(pe({pluginName:e,error:E})),b}finally{o(ze({pluginName:e,loading:!1}))}},[e,s,o]),p=z(async()=>{try{const m=await s.getSchema(e);return m&&o(sn({pluginName:e,schema:m})),m}catch(m){throw console.error(`Failed to get schema for plugin ${e}:`,m),m}},[e,s,o]),_=z(async()=>{const m=[];r&&m.push(d()),n&&m.push(p()),await Promise.all(m)},[r,n,d,p]);return me(()=>{u&&r&&!i&&!a&&d().catch(console.error)},[u,r,i,a,d]),me(()=>{u&&n&&!c&&p().catch(console.error)},[u,n,c,p]),we(()=>({config:i,schema:c,loading:a,error:l,connected:u,getConfig:d,setConfig:f,getSchema:p,reload:_}),[i,c,a,l,u,d,f,p,_])}function Di(){const e=ke(),t=j(Hs),r=j(Ks),n=j(Se),o=z(async()=>{try{const[s,i]=await Promise.all([e.getAllConfigs(),e.getAllSchemas()]);return{configs:s,schemas:i}}catch(s){throw console.error("Failed to refresh all configs:",s),s}},[e]);return we(()=>({configs:t,schemas:r,connected:n,refreshAll:o}),[t,r,n,o])}function ji(){const e=ke(),t=j(Se),[r,n]=Z(""),[o,s]=Z([]),[i,c]=Z(!1),[a,l]=Z(null),u=z(async()=>{c(!0),l(null);try{const f=await e.getConfigYaml();return n(f.yaml),s(f.pluginKeys),f}catch(f){const p=f instanceof Error?f.message:"Unknown error";throw l(p),f}finally{c(!1)}},[e]),d=z(async f=>{c(!0),l(null);try{const p=await e.saveConfigYaml(f);return n(f),p}catch(p){const _=p instanceof Error?p.message:"Unknown error";throw l(_),p}finally{c(!1)}},[e]);return me(()=>{t&&!r&&!i&&u().catch(()=>{})},[t,r,i,u]),we(()=>({yaml:r,pluginKeys:o,loading:i,error:a,load:u,save:d}),[r,o,i,a,u,d])}function Fi(){const e=ke(),t=j(Se),[r,n]=Z([]),[o,s]=Z(!1),[i,c]=Z(null),a=z(async()=>{s(!0),c(null);try{const d=await e.getEnvList();return n(d.files),d.files}catch(d){const f=d instanceof Error?d.message:"Unknown error";throw c(f),d}finally{s(!1)}},[e]),l=z(async d=>{try{return(await e.getEnvFile(d)).content}catch(f){const p=f instanceof Error?f.message:"Unknown error";throw c(p),f}},[e]),u=z(async(d,f)=>{s(!0),c(null);try{return await e.saveEnvFile(d,f)}catch(p){const _=p instanceof Error?p.message:"Unknown error";throw c(_),p}finally{s(!1)}},[e]);return me(()=>{t&&r.length===0&&!o&&a().catch(()=>{})},[t,r.length,o,a]),we(()=>({files:r,loading:o,error:i,listFiles:a,getFile:l,saveFile:u}),[r,o,i,a,l,u])}function Wi(...e){return oo(gn(e))}export{Sr as ConnectionError,L as ConnectionState,Ii as DynamicRouter,Ui as Link,kr as MessageError,fi as MessageHandler,$i as Outlet,di as RequestTimeoutError,ee as WebSocketError,pi as WebSocketManager,Fs as addEntry,Ei as addPage,Ci as addReducer,Ts as addRoute,_i as clearConfigs,Ti as clearPages,zs as clearRoutes,Wi as cn,hi as destroyWebSocketManager,Ai as getAllPages,Pi as getPage,ke as getWebSocketManager,Ut as loadScript,en as loadScripts,xi as persistor,ki as removeConfig,Ws as removeEntry,Ri as removePage,Is as removeRoute,Mi as resetWebSocketManager,Hs as selectAllConfigs,Ks as selectAllSchemas,$s as selectConfig,Se as selectConfigConnected,Vs as selectConfigError,Bs as selectConfigLoading,Gs as selectSchema,vi as setActiveMenu,ht as setConnected,pe as setError,ze as setLoading,Si as setRoutes,wi as setSidebarOpen,P as store,js as syncEntries,bi as toggleSidebar,tn as unloadScript,on as updateConfig,an as updateConfigs,Oi as updatePage,Ms as updateRoute,sn as updateSchema,cn as updateSchemas,Di as useAllConfigs,Ni as useConfig,ji as useConfigYaml,ui as useDispatch,Fi as useEnvFiles,Gi as useNavigate,Bi as useOutlet,Vi as useParams,j as useSelector,zi as useWebSocket};
|