@zuzjs/ui 1.0.25 → 1.0.27
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/dist/bin.cjs +4 -4
- package/dist/bin.js +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +6 -6
- package/package.json +2 -2
- /package/dist/{chunk-X2GGFKXO.js → chunk-4MKLFX4L.js} +0 -0
- /package/dist/{chunk-S2I6IQYE.cjs → chunk-WLB2PTNQ.cjs} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
var Go={Circle:"CIRCLE",Square:"SQUARE"},$p={Default:"DEFAULT",Circle:"CIRCLE"},zp={Light:"light",Dark:"dark",System:"system"},
|
|
1
|
+
'use strict';var chunkWLB2PTNQ_cjs=require('./chunk-WLB2PTNQ.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
|
|
2
|
+
var Go={Circle:"CIRCLE",Square:"SQUARE"},$p={Default:"DEFAULT",Circle:"CIRCLE"},zp={Light:"light",Dark:"dark",System:"system"},we={Default:"DEFAULT",Switch:"SWITCH"},Vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},te=Vt,Ge=hooks.AnchorType,_p=Ge,Z={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Fp={Asc:"ASC",Desc:"DESC"},Zp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Kp={Dots:"DOTS"},Se={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},pe={Success:"success",Error:"error",Warning:"warning",Info:"info"},U={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},G={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Wp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},ue={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},$e=ue,At={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},qo=At,Up={Bar:"BAR",Ring:"RING"},ft={Default:"range",Text:"number"},$t={Default:"DEFAULT",Card:"CARD"},dt={Gooey:"gooey"},ae={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Xo=Symbol.for("zuz.global.map"),Yo=t=>{globalThis[Xo]=t;},Zs=()=>globalThis[Xo]||{},zt=t=>{let s=Array.isArray(t)?t.join(" "):t;if(!s||typeof s!="string")return "";let e=Zs();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkWLB2PTNQ_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkWLB2PTNQ_cjs.h(s).filter(Boolean).map(o=>{let r=o.match(/^([&@][\w-]+)\((.*)\)$/);if(r){let[l,m,f]=r;return chunkWLB2PTNQ_cjs.h(f).map(i=>{let c=`${m}(${i})`;return e[c]||i}).join(" ")}return e[o]||o}).join(" ")},uu=t=>{let s=Array.isArray(t)?t.join(" "):t;return !s||typeof s!="string"?"":zt(s)},Qo=t=>{let s={};for(let e in t){let n=t[e];if(e.startsWith("--")){s[e]=n;continue}let o=chunkWLB2PTNQ_cjs.e[e]?.toString()??e;if(o==="x"||o==="translateX"){let r=s.translate?.split(" ")??["0px","0px"];s.translate=`${chunkWLB2PTNQ_cjs.i.addUnitsSafely(e,n)} ${r[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let r=s.translate?.split(" ")??["0px","0px"];s.translate=`${r[0]??"0px"} ${chunkWLB2PTNQ_cjs.i.addUnitsSafely(e,n)}`;}else chunkWLB2PTNQ_cjs.d.includes(o)?s[o]=chunkWLB2PTNQ_cjs.i.addUnitsSafely(e,n):s[o]=n;}return s},_t=t=>{if(!t)return "linear";switch(t.toUpperCase()){case U.Bounce:return "var(--bounce)";case U.Liquid:return "var(--liquid)";case U.Spring:return "var(--spring)";case U.EaseInOut:return "ease-in-out";case U.EaseOutBack:return "ease-out-back";default:return "linear"}},qe=(t,s=0)=>{let e={},n={},o=s||20;switch(t){case G.SlideInLeft:case G.SlideInRight:e={"--fx-x":t===G.SlideInLeft?`-${o}px`:`${o}px`,opacity:0},n={"--fx-x":"0px",opacity:1};break;case G.SlideInTop:case G.SlideInBottom:e={"--fx-y":t===G.SlideInTop?`-${o}px`:`${o}px`,opacity:0},n={"--fx-y":"0px",opacity:1};break;case G.ScaleIn:e={scale:0,opacity:0},n={scale:1,opacity:1};break;case G.FadeIn:e={opacity:0},n={opacity:1};break}return {from:e,to:n}},fu=(t,s,e)=>{let{from:n,to:o}=qe(t);return s?{...n,...o}:e?n:o};var Ws=(t,s)=>{let e=react.useRef([]),n=react.useRef(false);return react.useEffect(()=>{t?.when||(n.current=false);},[t?.transition]),react.useEffect(()=>{let o=s?.current;if(!o||!t||!t.clearAtEnd)return;let r=l=>{e.current.includes(l.propertyName)&&t.clearAtEnd===true&&(o.style.transform="",o.style.filter="",e.current.forEach(m=>o.style.removeProperty(m)));};return o.addEventListener("transitionend",r),()=>o.removeEventListener("transitionend",r)},[t,s]),react.useEffect(()=>{if(typeof window>"u"||!s?.current)return;let o=s.current;(t?.scroll||t?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${t.curve?_t(t.curve):"var(--spring)"}`);},[t,s]),react.useMemo(()=>{if(!t)return {style:{}};let{transition:o,from:r,to:l,exit:m,when:f,duration:i=.3,delay:c=0,curve:p,watch:a=[]}=t,g=f===false&&!n.current;f===true&&(n.current=true);let C={},{from:h,to:w}=o?qe(o):{from:r||{},to:l||{}};C=f===void 0?{...h,...w}:f?{...w}:m||h;let T=_t(p),P=[],y=Qo(C);e.current=Object.keys(y);let d={...y};return Object.keys(y).forEach(R=>{let v=R.startsWith("--")?"all":R;P.includes(v)||P.push(`${v} ${i}s ${T} ${c}s`);}),a.forEach(R=>{P.includes(R)||P.push(`${R} 0.1s ${T} 0s`);}),{style:{...d,transition:g?"none":P.join(", "),opacity:g?0:d.opacity,pointerEvents:g?"none":d.pointerEvents}}},[t,t?.when,t?.watch])},ie=Ws;var Us=(t,s)=>{let{as:e,fx:n,transition:o,skeleton:r,className:l,propsToRemove:m,style:f,...i}=t||{},c=o?{transition:o,duration:.3}:n||{},{style:p}=ie(c,s),a=zt(e??"");return {style:{...f,...p},className:[l||"",a||"",r?.enabled?"--skeleton":""].join(" ").trim(),rest:{...chunkWLB2PTNQ_cjs.g(i,m?[...m,"skeleton"]:["skeleton"])}}},N=Us;var er="(prefers-color-scheme: dark)",Xs=typeof window>"u",or=react.createContext(void 0),Wt=t=>{let s=react.useContext(or);if(!s){if(t===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return s},q=Wt,Ys=({children:t,storageKey:s="--ucs",forceTheme:e,zuzMap:n,...o})=>(n&&Yo(n),jsxRuntime.jsx(Qs,{storageKey:s,forceTheme:e,...o,children:t})),Qs=({children:t,storageKey:s,forceTheme:e,...n})=>{let[o,r]=react.useState(()=>e||tr(s,"system")),[l,m]=react.useState(()=>e||tr(s)),f=a=>(a||(a=window.matchMedia(er)),a.matches?"dark":"light"),i=react.useCallback(a=>{let g=a=="system"?f():a,C=document.documentElement;C.setAttribute("color-scheme",g),C.style.colorScheme=g,m(g);},[f]),c=react.useCallback(a=>{r(a),localStorage.setItem(s,a),i(a);},[o]),p=react.useCallback(a=>{let g=f(a);m(g),o==="system"&&i("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(s);},[o]),react.useEffect(()=>{window.matchMedia(er).addEventListener("change",p);},[p]),react.useEffect(()=>{let a=g=>{g.key==s&&(g.newValue?c(g.newValue):c("system"));};return window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[c]),react.useEffect(()=>{i(e||o||"system");},[o]),jsxRuntime.jsxs(or,{value:{colorScheme:o,resolvedScheme:l,setColorScheme:c,...n},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
3
3
|
const themes = ['light', 'dark']
|
|
4
4
|
let theme = localStorage.getItem(\`${s}\`) || "system";
|
|
5
5
|
if (theme === "system") {
|
|
6
6
|
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
7
7
|
}
|
|
8
8
|
document.documentElement.setAttribute("color-scheme", theme);
|
|
9
|
-
document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(Gt,{children:t})]})},tr=(t,s)=>{if(Xs)return;let e;try{e=localStorage.getItem(t)||void 0;}catch{}return e||s};var rr=({ref:t,...s})=>{let{style:e,...r}=s,{style:o,className:n,rest:i}=N(r);return jsxRuntime.jsx("span",{ref:t,style:e,className:n,...i})};rr.displayName="Zuz.Span";var ee=rr;var sr=react.forwardRef((t,s)=>{let{name:e,pathCount:r,variant:o,color:n,...i}=t,{variant:m}=q(true),{className:f,style:l,rest:c}=N(i);return jsxRuntime.jsx("div",{style:{color:n,...l},className:`icon-${e} --icon --${o||m||Z.Small} ${f}`.trim(),ref:s,...c,children:Array(r||0).fill(0).map((p,a)=>jsxRuntime.jsx(ee,{className:`path${a+1}`},`${e}-layer-${a}`))})});sr.displayName="Zuz.Icon";var Y=sr;var ne={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var ar=t=>{let{type:s,variant:e,color:r,...o}=t,{className:n,style:i,rest:m}=N(o),{spinner:f}=q(true),l=()=>{switch(s||f?.type||ne.Simple){case ne.Simple:return null;case ne.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(u,{as:"--bar --bar1"}),jsxRuntime.jsx(u,{as:"--bar --bar2"}),jsxRuntime.jsx(u,{as:"--bar --bar3"})]});case ne.Roller:return null}};return jsxRuntime.jsx(u,{className:`${n} --spinner --${(s||f?.type||ne.Simple).toLowerCase()} --${e||f?.variant||Z.Small}`.trim(),style:{...i},...m,children:l()})};ar.displayName="Zuz.Spinner";var ge=ar;var yt={Loading:"loading",Normal:"normal"};var lr=({ref:t,...s})=>{let{reset:e,kind:r="solid",variant:o,icon:n,iconSize:i,children:m,withLabel:f,spinner:l,state:c,disabled:p,...a}=s,{style:d,className:C,rest:h}=N(a),{variant:v}=q(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${o||v} flex aic ${e?"":"jcc"} ${n?"--with-icon":""} ${C}`.trim().replace(/\s+/g," "),style:d,ref:t,disabled:c==yt.Loading||s.skeleton?.enabled||p,...h,children:[c==yt.Loading&&jsxRuntime.jsx(ge,{variant:o||v,type:l||ne.Simple}),(!c||c==yt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[n&&jsxRuntime.jsx(Y,{variant:i,name:n}),f===true?jsxRuntime.jsx(ee,{children:m}):m]})]})};lr.displayName="Zuz.Button";var $=lr;var mr=react.forwardRef((t,s)=>{let{h:e,html:r,children:o,lines:n,...i}=t,{style:m,className:f,rest:l}=N(i),c=`h${t.h||1}`;return jsxRuntime.jsx(c,{ref:s,style:m,className:f,...l,children:r?jsxRuntime.jsx(ee,{dangerouslySetInnerHTML:{__html:r}}):o})});mr.displayName="Zuz.Text";var H=mr;var sa=t=>{let{label:s,labelColor:e,icon:r,iconColor:o,index:n,className:i,onSelect:m}=t;return s=="-"?jsxRuntime.jsx(u,{className:"--line"}):jsxRuntime.jsxs($,{reset:true,onClick:f=>m?.(t),className:`--item ${i||""}`.trim(),children:[jsxRuntime.jsx(u,{as:"--icon",children:jsxRuntime.jsx(Y,{name:r,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:s})]})},pr=sa;var dr=({ref:t,...s})=>{let{id:e,as:r,fx:o,offsetX:n,offsetY:i,parent:m,event:f,arrow:l,when:c,items:p,header:a,footer:d,origin:C=Ge.TopRight,...h}=s,[v,T]=react.useState(false),[P,y]=react.useState(p||[]),{position:g,targetRef:R,calculatedAnchor:w}=hooks.useAnchorPosition(m?.current,f,{offsetX:n,offsetY:i,preferredAnchor:C}),I=m&&g.top>m.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",M=react.useMemo(()=>{let W=w.toLowerCase();return W.includes("left")?"--arrow-left":W.includes("right")?"--arrow-right":"--arrow-center"},[w]),B=g.top!==0||g.left!==0;react.useEffect(()=>{c&&B?T(true):c||T(false);},[c,B]);let{className:A,style:E,rest:z}=N(h),_=ie({...o?.transition?{transition:o.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??U.EaseInOut,duration:o?.duration??.05,when:v&&B});return jsxRuntime.jsxs(u,{ref:R,className:`--contextmenu ${l||m!=null?`--has-arrow ${I} ${M}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!v,style:{...E,..._.style,top:g.top,left:g.left,visibility:B?"visible":"hidden",transformOrigin:w},...z,children:[typeof a=="function"?react.createElement(a):a,P.map((W,x)=>jsxRuntime.jsx(pr,{...W,index:x},`context-${W.label.toLowerCase()}-${x}`)),typeof d=="function"?react.createElement(d):d]})};dr.displayName="Zuz.ContextMenu";var Xt=dr;var gr=react.forwardRef((t,s)=>{let{children:e,fx:r,when:o,fxDelay:n,fxStep:i,classToIgnore:m,...f}=t,l=q(true),c=hooks.useDelayed(),p=r||l?.group?.fx,a=n||l?.group?.fxDelay,d=i||l?.group?.fxStep,C=m||l?.group?.classToIgnore||"--ignore",h=react.useMemo(()=>p?react$1.addPropsToChildren(e,v=>{if(v.type===react.Fragment)return false;let T=v.props||{},P="fx"in T,y=T.as?Array.isArray(T.as)?T.as.join(" "):T.as:T.className||"",g=typeof y=="string"&&y.includes(C);return !P&&!g},v=>({fx:{...p,delay:(a||0)+v*(d||.1),when:o??(r?.when||c)}})):e,[e,o,c,p]);return jsxRuntime.jsx(u,{className:"--group",ref:s,...f,children:h})});gr.displayName="Zuz.Group";var Yt=gr;var yr=react.forwardRef((t,s)=>{let{message:e,spinner:r,spinnerSize:o,color:n,when:i,hideMessage:m,...f}=t,{className:l,style:c,rest:p}=N(f),{spinner:a}=q(true);return "when"in t&&t.when==false?null:jsxRuntime.jsxs(Yt,{fx:{transition:G.SlideInBottom,curve:U.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...p,children:[jsxRuntime.jsx(ge,{variant:o||a?.variant||Z.Small,type:r||a?.type||ne.Simple}),!m&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});yr.displayName="Zuz.Cover";var he=yr;var xr=react.forwardRef((t,s)=>{let{when:e,...r}=t;return jsxRuntime.jsx(u,{ref:s,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...r})});xr.displayName="Zuz.Overlay";var ke=xr;var Sa=({action:t,render:s=true,message:e=""})=>jsxRuntime.jsx(u,{as:`--body flex aic rel ${t?"":"--no-action"}`.trim(),children:s?e:null}),br=Sa;var Ta=({action:t,actionPosition:s,dialogID:e,variant:r})=>jsxRuntime.jsx(u,{as:`--footer flex aic rel ${s?s==qo.Center?"jcc":"":"jce"}`.trim(),children:t.map((o,n)=>jsxRuntime.jsx($,{variant:r,onClick:i=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${e}-action-${o.key}`))}),vr=Ta;var Pa={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[pe.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[pe.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[pe.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[pe.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},D=Pa;var Ra=({title:t="Alert",onClose:s})=>jsxRuntime.jsxs(u,{as:"--head flex aic rel",children:[jsxRuntime.jsx(u,{as:`--${t?"title":"dot"} flex aic jcc rel`,children:t}),jsxRuntime.jsx($,{onClick:e=>s(),className:"--closer abs center-v",children:D.close})]}),Cr=Ra;var Ir=({ref:t,...s})=>{let{index:e,id:r,title:o,message:n,transition:i,curve:m,speed:f,type:l,action:c,actionPosition:p,spinner:a,loadingMessage:d,variant:C,inBackground:h,forceClose:v,forceLoading:T,onClose:P,onShow:y,onHide:g,...R}=s,w=react.useMemo(()=>core.uuid(12),[]),[S,I]=react.useState(o||""),[M,B]=react.useState(n||""),[A,E]=react.useState(l||$e.Dialog),[z,_]=react.useState(false),[W,x]=react.useState(true),[k,V]=react.useState(c||null),[K,O]=react.useState(false),{variant:F,spinner:X,dialog:Q}=q(true),j=C||Q?.variant||F||Z.Small,{style:me,className:re,rest:be}=N(R),Le=react.useRef(null),we=ie({when:z,duration:f||Q?.speed||.3,delay:Q?.delay||.1,transition:i||Q?.transition||G.SlideInBottom,curve:m||Q?.curve||U.EaseInOut,watch:["scale","filter","transform"]}),se=()=>{_(false),P(r);};react.useEffect(()=>{E($e.Dialog),B(n),I(S),k&&V(k.reduce((_o,Fo)=>(_o.push({...Fo,key:Fo.key||core.uuid(12)}),_o),[])),_(true),setTimeout(()=>y?y():()=>{},500);},[]),react.useEffect(()=>{v&&se();},[v]),react.useEffect(()=>{T!=null&&O(T);},[T]);let J=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ke,{style:{zIndex:J},when:z}),jsxRuntime.jsxs(u,{as:`--dialog --${(l??$e.Default).toLowerCase()} ${z?"--visible":""} ${re} fixed abc`.trim(),style:{...we.style,zIndex:J+1,pointerEvents:h==true?"none":"auto",...h==true?{scale:"0.92",filter:"blur(2px)"}:{}},...be,ref:Le,children:[jsxRuntime.jsx(Cr,{title:S,onClose:se}),jsxRuntime.jsx(br,{message:M,render:W,action:k}),k&&k.length>0&&jsxRuntime.jsx(vr,{variant:j,action:k,dialogID:w,actionPosition:p}),jsxRuntime.jsx(he,{when:K,spinner:a||Q?.spinner||X?.type||ne.Simple,message:d||Q?.loadingMessage})]})]})};Ir.displayName="Zuz.Dialog";var Jt=Ir;var jt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(s){return this.stack[this.stack.length-1]===s}push(s){this.stack.includes(s)||(this.stack.push(s),this.updateScrollLock());}pop(s){this.stack=this.stack.filter(e=>e!==s),this.updateScrollLock();}handleEscape(){let s=this.stack[this.stack.length-1];return s?(s(),true):false}get count(){return this.stack.length}},Ye=new jt;var Nr=react.forwardRef((t,s)=>{let{speed:e,style:r,...o}=t,{rootRef:n,containerRef:i,thumbY:m,thumbX:f,onScrollY:l,onScrollX:c}=hooks.useScrollbar(e||1),{style:p,className:a,rest:d}=N(o);return react.useEffect(()=>{let C=i.current;if(!C)return;let h=()=>{window.dispatchEvent(new Event("resize"));};return C.addEventListener("scroll",h),()=>C.removeEventListener("scroll",h)},[]),jsxRuntime.jsxs(u,{ref:n,className:a.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(u,{as:`--scroll-content ${a}`.trim(),ref:i,style:r||{},children:d.children}),jsxRuntime.jsx(u,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(u,{as:"--scroll-thumb --abs",ref:m,onMouseDown:l})}),jsxRuntime.jsx(u,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(u,{as:"--scroll-thumb --abs",ref:f,onMouseDown:c})})]})});Nr.displayName="Zuz.ScrollView";var eo=Nr;var Er=({ref:t,...s})=>{let{id:e,index:r,from:o,speed:n,children:i,margin:m,animation:f,prerender:l,inBackground:c,forceClose:p,forceLoading:a,onClose:d,...C}=s,{drawer:h}=q(true),[v,T]=react.useState(i),[P,y]=react.useState(false),[g,R]=react.useState(l??(h?.prerender||true)),[w,S]=react.useState(false),I=()=>{y(false),d?.(e??-1);},{className:M,style:B,rest:A}=N(C),E=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Ye.isTop(I)&&I();}}],[P]);hooks.useShortcuts(E),react.useEffect(()=>{T(i);},[i]),react.useEffect(()=>(P?Ye.push(I):Ye.pop(I),()=>Ye.pop(I)),[P]),react.useEffect(()=>{y(true);},[]),react.useEffect(()=>{p&&I();},[p]),react.useEffect(()=>{a!=null&&S(a);},[a]);let z=o||h?.from||ae.Left,_=react.useMemo(()=>{switch(z){case ae.Left:return {from:{x:"-100vw"},to:{x:0}};case ae.Right:return {from:{x:"100vw"},to:{x:0}};case ae.Top:return {from:{y:"-100vh"},to:{y:0}};case ae.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,h?.from]),W=ie({from:{..._.from,opacity:0},to:{..._.to,opacity:1},when:P,curve:f||h?.animation||U.EaseInOut,duration:n||h?.speed||.5,watch:["scale","filter"]}),x=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ke,{onClick:k=>{P&&I();},when:P,style:{zIndex:x}}),jsxRuntime.jsxs(u,{ref:t,"aria-hidden":!P,className:`--drawer flex cols ${M} --${z.toLowerCase()} fixed`,style:{...B,...W.style,"--m":`${m||h?.margin||0}px`,zIndex:x+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...A,children:[o==ae.Top||o==ae.Bottom?jsxRuntime.jsx(u,{className:"--handle"}):null,jsxRuntime.jsxs(eo,{as:"rel",children:[g||P?v:null,jsxRuntime.jsx(he,{when:w})]})]})]})};Er.displayName="Zuz.Drawer";var no=Er;var Lr=react.forwardRef((t,s)=>{let{progress:e,type:r,animated:o,...n}=t,i=react.useRef(null);react.useImperativeHandle(s,()=>({setProgress:c=>{i.current.style.width=`${c*100}%`;}}),[]),react.useEffect(()=>{e&&i.current&&(o?setTimeout(()=>i.current.style.width=`${e*100}%`,500):i.current.style.width=`${e*100}%`);},[e,i.current]);let{className:m,style:f,rest:l}=N(n);return jsxRuntime.jsx(u,{className:`--progress ${o?"--animated":""} flex rel ${m}`.trim(),style:f,...l,children:jsxRuntime.jsx(u,{ref:i,className:"--bar rel"})})});Lr.displayName="Zuz.ProgressBar";var je=Lr;var wt=(n=>(n.Default="default",n.Success="success",n.Error="error",n.Warn="warn",n.Promise="promise",n))(wt||{}),vt=(i=>(i.TopLeft="TopLeft",i.TopCenter="TopCenter",i.TopRight="TopRight",i.BottomLeft="BottomLeft",i.BottomCenter="BottomCenter",i.BottomRight="BottomRight",i))(vt||{}),kr=(e=>(e.Stack="stack",e.Individual="individual",e))(kr||{}),Mr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var _a=t=>{let{index:s,id:e,type:r,icon:o,title:n,message:i,duration:m,sticky:f=false,actions:l=[],position:c,style:p,isHovered:a,total:d,progress:C,forceClose:h,variant:v,onClick:T,onClose:P}=t,[y,g]=react.useState(false),[R,w]=react.useState(false),{toast:S}=q(true),I=R||h,M=c||S?.position||"TopCenter",B=r||S?.type||"default",A=p||S?.style||"stack",E=m||S?.duration||4,z=C||S?.progress||false,_=react.useRef(E*1e3),W=react.useRef(void 0),x=react.useRef(void 0),k=react.useRef(null),V=ie({when:y&&!I,duration:.3,transition:S?.transition||(M.includes("Top")?G.SlideInTop:M.includes("Bottom")?G.SlideInBottom:M.includes("Left")?G.SlideInLeft:G.SlideInRight),curve:S?.curve||U.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{g(true);let re=be=>{if(x.current!==void 0){let Le=be-x.current;if(!a&&!f&&!I&&(_.current-=Le,k.current)){let we=Math.max(0,_.current/(E*1e3)*100);k.current?.setProgress?.(we/100);}}x.current=be,_.current<=0?w(true):W.current=requestAnimationFrame(re);};return W.current=requestAnimationFrame(re),()=>{W.current&&cancelAnimationFrame(W.current);}},[a,f,I,E]),react.useEffect(()=>{if(I){let re=setTimeout(()=>{P?.(e);},350);return ()=>clearTimeout(re)}},[I,e]);let K=A==="stack",O=a?s*65:s*8,F=a?1:Math.max(.85,1-s*.05),X=a?1:Math.max(.4,1-s*.2),Q=()=>{T?T():(!l||l.length===0)&&w(true);},j=V.style.transform||"translate(0, 0)",me=I?j:`${j} translateY(${M.includes("Top")?O:-O}px) scale(${F})`;return jsxRuntime.jsxs(u,{onClick:Q,as:`--snack --${I?"hidden":"visible"} --${v||S?.variant||Z.Medium} --${B} --${M.toLowerCase()} abs flex aic`,style:{...V.style,zIndex:1e3-s,pointerEvents:I?"none":"auto",opacity:I?V.style.opacity:X,transform:me,filter:!I&&K&&!a&&s>0?"blur(1px)":"none",cursor:!l||l.length===0?"pointer":"default",transition:`${V.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsx(u,{as:"--ico flex aic jcc",children:o?jsxRuntime.jsx(Y,{name:o}):jsxRuntime.jsx(u,{as:"--no-icon"})}),jsxRuntime.jsxs(u,{as:"--meta flex cols",children:[jsxRuntime.jsx(H,{as:"--tt",children:n||Mr[r]}),jsxRuntime.jsx(H,{as:"--tm",children:i})]}),l&&l.length>0&&jsxRuntime.jsx(u,{as:"--actions flex gap:5",children:l.map((re,be)=>jsxRuntime.jsx($,{as:"--snack-btn bold",onClick:Le=>{Le.stopPropagation(),re.onClick();},children:re.label},be))}),z&&jsxRuntime.jsx(je,{as:"abs",ref:k})]})},so=_a;var le=react.createContext(null),Ga=({ref:t,...s})=>{let r=react.useContext(le)?.depth??0,[o,n]=react.useState(null),[i,m]=react.useState(null),[f,l]=react.useState(false),[c,p]=react.useState([]),a=hooks.useDelayed(),d=react.useRef(0),C=()=>++d.current,h=()=>{l(false),setTimeout(()=>m(null),200);};react.useImperativeHandle(t,()=>({add(g){let R=C(),w={id:R,...g};return p(S=>[...S,w]),R},openMenu(g){l(false),setTimeout(()=>{m({id:C(),type:"menu",props:g}),l(true);},16);},remove(g){p(R=>R.map(w=>w.id===g?{...w,props:{...w.props,forceClose:true}}:w)),i?.id===g&&h();},loading(g,R){p(w=>w.map(S=>S.id===g?{...S,props:{...S.props,forceLoading:R}}:S)),i?.id===g&&h();},clear(g){p(c.filter(R=>R.type!=g));}})),react.useEffect(()=>{if(i&&f){let g=()=>h();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[i,f,h]);let v=g=>{setTimeout(()=>{p(R=>R.filter(w=>w.id!==g)),i?.id===g&&m(null);},250);},T=react.useMemo(()=>[...c.filter(g=>g.type!="toast")],[c]);if(!a)return null;let P=c.filter(g=>g.type=="toast").reverse(),y=Object.values(vt);return reactDom.createPortal(jsxRuntime.jsxs(u,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[T.map((g,R)=>{let w=R<T.length-1;return g.type==="dialog"?jsxRuntime.jsx(Jt,{onClose:v,index:R,id:g.id,...g.props,inBackground:w},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsxRuntime.jsx(no,{onClose:v,index:R,id:g.id,...g.props,inBackground:w},`layer-${g.type}-${g.id}`):null}),y.map(g=>{let R=P.filter(w=>(w.props.position||"TopCenter")===g);return R.length===0?null:jsxRuntime.jsx(u,{onMouseEnter:()=>n(g),onMouseLeave:()=>n(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto"},children:R.map((w,S)=>jsxRuntime.jsx(so,{index:S,total:R.length,isHovered:o===g,onClose:v,id:w.id,...w.props},w.id))},g)}),i&&jsxRuntime.jsx(u,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(Xt,{onClose:h,when:f,...i.props},`menu-${i.id}`)})]}),document.body)},qa=({children:t})=>{let s=react.useContext(le),e=s?s.depth+1:0,r=react.useRef(null),o=react.useMemo(()=>({add:n=>r.current?.add(n),openMenu:n=>r.current?.openMenu(n),remove:n=>r.current?.remove(n),loading:(n,i)=>r.current?.loading(n,i),clear:n=>r.current?.clear(n),depth:e,isSubLayer:!!s}),[s]);return jsxRuntime.jsxs(le.Provider,{value:o,children:[t,jsxRuntime.jsx(Ga,{ref:r})]})},Gt=qa;var Ya=()=>{let t=react.useContext(le);if(!t)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,o,n)=>{r.preventDefault(),t.openMenu({event:r,items:o,origin:n});},showMenu:(r,{items:o,origin:n,offsetX:i,offsetY:m,transition:f,curve:l,arrow:c,duration:p,header:a,footer:d})=>{t.openMenu({fx:{transition:f,curve:l,duration:p},parent:r,items:o,origin:n||Ge.TopCenter,offsetX:i,offsetY:m,arrow:c,header:a,footer:d});},hide:t.clear}},Qa=Ya;var ja=()=>{let t=react.useContext(le);if(!t)throw new Error("useDialog must be used inside <LayersProvider>");let s=()=>t.clear("dialog"),e=n=>t.remove(n),r=(n,i)=>t.loading(n,i);return {clearAll:s,show:n=>{let i=t.add({type:"dialog",props:{...n,type:$e.Dialog}});return {id:i,setLoading:m=>r(i,m),hide:()=>e(i)}},hide:e}},ei=ja;var oi=()=>{let t=react.useContext(le);if(!t)throw new Error("useDialog must be used inside <LayersProvider>");let s=()=>t.clear("drawer"),e=n=>t.remove(n),r=(n,i)=>t.loading(n,i),o=n=>{let i=t.add({type:"drawer",props:n});return {id:i,setLoading:m=>r(i,m),close:()=>e(i)}};return {clearAll:s,open:n=>o({children:n}),right:n=>o({children:n,from:ae.Right}),left:n=>o({children:n,from:ae.Left}),top:n=>o({children:n,from:ae.Top}),bottom:n=>o({children:n,from:ae.Bottom}),close:e}},ri=oi;var si=(t,s,e={})=>{let[r,o]=react.useState(null),[n,i]=react.useState(false),{duration:m=.25,curve:f=U.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=e;return react.useLayoutEffect(()=>{s&&t.current?(o(t.current.getBoundingClientRect()),i(true)):s||i(false);},[s,t]),{style:ie({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:f,duration:m,when:n&&s}).style,isMeasured:n,sourceRect:r}},ai=si;var mi=(t,s={})=>{let{offset:e=8,direction:r="bottom",container:o=null,triggerRef:n=null}=s,i=react.useRef(null),m=react.useCallback(()=>{let f=t.current;if(!f)return;let l=n?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=f.getBoundingClientRect(),p=l.getBoundingClientRect(),a,d;o?(a=o.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(f).position==="fixed"?d="fixed":d="absolute",d==="fixed"?a={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:a={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==d&&(f.style.position=d),i.current=d;let v=0,T=0;switch(r){case "top":v=p.top-c.height-e,T=p.left,v<a.top&&p.bottom+c.height+e<=a.bottom&&(v=p.bottom+e);break;case "bottom":v=p.bottom+e,T=p.left,v+c.height>a.bottom&&p.top-c.height-e>=a.top&&(v=p.top-c.height-e);break;case "left":v=p.top,T=p.left-c.width-e,T<a.left&&p.right+c.width+e<=a.right&&(T=p.right+e);break;case "right":v=p.top,T=p.right+e,T+c.width>a.right&&p.left-c.width-e>=a.left&&(T=p.left-c.width-e);break}if(v=Math.max(a.top,Math.min(v,a.bottom-c.height)),T=Math.max(a.left,Math.min(T,a.right-c.width)),i.current==="fixed")f.style.top=`${v}px`,f.style.left=`${T}px`;else {let P;f.offsetParent?P=f.offsetParent.getBoundingClientRect():P={top:0,left:0};let y=v-P.top+window.scrollY,g=T-P.left+window.scrollX;f.style.top=`${y}px`,f.style.left=`${g}px`;}},[t,n,e,r,o]);return react.useEffect(()=>{let f=t.current;if(!f)return;let l=n?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(m);return c.observe(f),l&&c.observe(l),m(),window.addEventListener("resize",m),window.addEventListener("scroll",m,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,true);}},[t,r,e,o,n]),{postion:i.current,reposition:m}},et=mi;var ui=()=>{let t=react.useContext(le);if(!t)throw new Error("useToast must be used inside <LayersProvider>");let s=(p,a)=>t.add({type:"toast",props:{...a,type:p}}),r=p=>t.remove(p),l=(p,a,d)=>{let C=s(p,{...a,sticky:a.sticky??false,actions:[{label:d?.label||"Ok",onClick:()=>{d?.onClick?.(),r(C);}}]});return C},c=(p,a,d,C)=>{let h=s(p,{...a,sticky:true,actions:[{label:C?.label||"Cancel",onClick:()=>{C?.onClick?.(),r(h);}},{label:d?.label||"Ok",onClick:()=>{d?.onClick?.(),r(h);}}]});return h};return {ok:(p,a)=>l("default",p,a),success:(p,a)=>l("success",p,a),error:(p,a)=>l("error",p,a),confirm:(p,a,d)=>c("default",p,a,d),warn:(p,a)=>l("warn",p,a)}},fi=ui;var gi=()=>{let t=react.useContext(le);if(!t)throw new Error("useToast must be used inside <LayersProvider>");let s=(l,c)=>t.add({type:"toast",props:{...c,type:l}});return {show:(l,c,p,a)=>s("default",{title:l,message:c,icon:p,duration:a}),hide:l=>t.remove(l),success:(l,c,p,a)=>s("success",{title:l,message:c,icon:p,duration:a}),error:(l,c,p,a)=>s("error",{title:l,message:c,icon:p,duration:a}),warn:(l,c,p,a)=>s("warn",{title:l,message:c,icon:p,duration:a}),promise:(l,c,p,a)=>s("promise",{title:l,message:c,icon:p,duration:a}),clearAll:()=>t.clear("toast")}},ao=gi;var Fr=({ref:t,style:s,...e})=>{let r=react.useRef(null),o=react.useMemo(()=>t&&typeof t!="function"&&t.current?t:r,[t]),{style:n,className:i,rest:m}=N(e,o);return jsxRuntime.jsx("div",{ref:t||r,style:{...n,...s||{}},className:i,...m})};Fr.displayName="Zuz.Box";var u=Fr;var Kr=react.forwardRef((t,s)=>{let{title:e,message:r,...o}=t,[n,i]=react.useState(false);return jsxRuntime.jsxs(u,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs($,{onClick:m=>i(!n),className:`--toggle flex aic ${n?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(u,{className:"--arrow flex",children:n?D.arrowUp:D.arrowDown})]}),n&&jsxRuntime.jsx(u,{className:"--detail",children:r})]})});Kr.displayName="Zuz.Accordion";var vi=Kr;var Si=({label:t,icon:s,onClick:e,idx:r,selected:o})=>jsxRuntime.jsx($,{onClick:e,onMouseMove:n=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof s=="string"?jsxRuntime.jsx(Y,{name:s}):s}),Ur=Si;var Gr=react.forwardRef((t,s)=>{let{items:e,name:r,selected:o,position:n,...i}=t,m=react.useRef(null),[f,l]=react.useState(o||e[0].tag||0),c=react.useCallback(({x:v,y:T})=>{if(m.current){let P=m.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${v-P.left}`),document.documentElement.style.setProperty("--tip-y",`${T-P.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),p=react.useCallback(()=>{m.current&&(m.current.removeEventListener("pointerleave",p),m.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),a=react.useCallback(()=>{m.current&&(m.current.addEventListener("pointerleave",p),m.current.addEventListener("pointermove",c));},[]);react.useEffect(()=>{m.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((v,T)=>T.label.length>v.length?T.label:v,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),m.current?.addEventListener("pointerenter",a));},[]);let{className:d,style:C,rest:h}=N(i);return jsxRuntime.jsxs(u,{ref:m,style:C,className:[`--actionbar flex aic ${d}`,`${!n||n==te.Auto?"rel":`--${n}`}`].join(" ").trim(),...h,children:[e.map((v,T)=>jsxRuntime.jsx(Ur,{selected:f===v.tag||o==T,...v,idx:T},`actionbar-action-${v.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(u,{className:"--tip abs",children:jsxRuntime.jsx(u,{className:"--track flex aic",children:e.map(({label:v})=>jsxRuntime.jsx(u,{className:"--lb",children:v},`tool-tip-${v.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Gr.displayName="Zuz.ActionBar";var Ii=Gr;var Xr=react.forwardRef((t,s)=>{let{type:e,icon:r,title:o,message:n,iconSize:i,...m}=t,{className:f,style:l,rest:c}=N(m);return jsxRuntime.jsxs(u,{className:`--alert --${e||pe.Info} flex aic ${f}`.trim(),style:l,...c,children:[jsxRuntime.jsx(u,{className:`--icon icon-${r||"auto-matic"}`,style:i?{fontSize:i,width:i,height:i}:{},children:!r&&D[e||pe.Info]}),jsxRuntime.jsxs(u,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${n?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),n&&jsxRuntime.jsx(H,{className:"--message",h:2,children:n})]})]})});Xr.displayName="Zuz.Alert";var Bi=Xr;var Yr=({ref:t,...s})=>{let{variant:e,numeric:r,onConfirm:o,...n}=s,{style:i,className:m,rest:f}=N(n),{variant:l}=q(true),c=p=>{r&&(p.currentTarget.value=p.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||l} flex ${m}`.trim(),style:i,onInput:c,onKeyDown:p=>{p.key=="Enter"&&o?.(p.currentTarget.value);},ref:t,...f})};Yr.displayName="Zuz.Input";var oe=Yr;var Jr=t=>{let{meta:s,children:e}=t,r=hooks.useDelayed(),{label:o,icon:n,...i}=react.isValidElement(s)?{}:s,{className:m,style:f,rest:l}=N({...i,...i.animate?{animate:{...i.animate,when:r}}:{}});return react.isValidElement(s)?jsxRuntime.jsx("li",{style:f,className:m,children:s}):jsxRuntime.jsxs("li",{style:f,className:m,...l,children:[e,typeof s=="string"?s:o]})};Jr.displayName="Zuz.ListItem";var jr=Jr;var tn=react.forwardRef((t,s)=>{let{items:e,variant:r,direction:o,seperator:n,ol:i,...m}=t,{className:f,style:l,rest:c}=N(m),p=i==true?"ol":"ul";return react.createElement(p,{className:`--list --${r||Z.Small} flex ${o??"cols"} ${f}`.trim(),style:l,ref:s,...c,children:e.map((a,d,C)=>{let h=`${typeof a=="string"?`li-${String(a)}`:react.isValidElement(a)?`li-${a.key}`||`${d}-${core.MD5(a.toString())}`:a.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(jr,{meta:a}),n&&C[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:n},`spt-${d+1}-${h}`):null]},h)})})});tn.displayName="Zuz.List";var De=tn;var rn=react.forwardRef((t,s)=>{let{fx:e,action:r,data:o,withStyle:n,onChange:i,...m}=t,{className:f}=N({as:n||""}),{style:l}=N(m),[c,p]=react.useState(false),[a,d]=react.useState(o||[]),C=react.useRef(null),h=react.useRef(null),v=react.useRef(null),T=react.useMemo(()=>m.name||core.uuid(12),[]),[P,y]=react.useState(null),[g,R]=react.useState(null),[w,S]=react.useState([]),M=hooks.useDebounce(x=>{x.target.value==""?(p(false),d([])):r&&x.target.value.trim()!=""&&core.withPost(r,{query:x.target.value}).then(k=>{"items"in k&&core._(k.items).isArray()?(d(k.items),R(x.target.value),S(k.items)):console.error("Action Response should contain items array"),y(null);}).catch(k=>{y(null),d([]);});},250),B=()=>{if(h.current){let x=h.current.getBoundingClientRect(),k=window.innerHeight-x.bottom,V=x.top;if(v.current){let K=v.current;k<K.offsetHeight&&V>k?(K.style.top="auto",K.style.bottom=`${x.height}px`,K.style.maxHeight=`${V-150}px`):(K.style.top=`${x.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${k-150}px`);}}},A=x=>{if(a.length>0){if((x.key==="ArrowDown"||x.key==="ArrowUp")&&(x.preventDefault(),x.stopPropagation()),x.key==="Escape")y(null),p(false),d([]);else if(x.key==="ArrowDown")y(k=>{let V=k===null||k===a.length-1?0:k+1;return z(V),V});else if(x.key==="ArrowUp")y(k=>{let V=k===null||k===0?a.length-1:k-1;return z(V),V});else if(x.key==="Enter"&&P!==null){let k=a[P];C.current&&(C.current.value=k,p(false),d([]));}}},E=x=>{C.current&&(C.current.value=x,p(false),d([]));},z=x=>{let k=a[x];if(k&&C.current&&(C.current.value=k,C.current.setSelectionRange(k.length,k.length)),v.current){let K=v.current.children[x];K&&K.scrollIntoView({block:"nearest"});}},_=x=>{h.current&&!h.current.contains(x.target)&&(p(false),d([]));},W=()=>{C.current&&C.current.value===g&&(d(w),y(null),B());};return react.useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",_),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",_);}),[]),react.useEffect(()=>{B();},[a]),jsxRuntime.jsxs(u,{style:l,ref:h,className:`--autocomplete --${t.size||Z.Small} flex aic rel ${f}`.trim(),children:[jsxRuntime.jsx(oe,{ref:C,autoComplete:"off",onChange:M,onKeyDown:A,onFocus:W,...m}),jsxRuntime.jsx(u,{className:"--arrow rel flex aic jcc",children:a.length>0?D.arrowUp:D.arrowDown}),a.length>0&&jsxRuntime.jsx(De,{id:T,ref:v,className:"--suggestion-list flex cols abs",items:a.map((x,k)=>({label:x,onClick:V=>{V.preventDefault(),V.stopPropagation(),E(x);},className:P===k?"--current":"",animate:{transition:G.SlideInBottom,curve:U.EaseInOut,delay:core.clamp(.02*k,.02,.5)}}))})]})});rn.displayName="Zuz.AutoComplete";var qi=rn;var nn=react.forwardRef((t,s)=>{let e=react.useRef(null),r=react.useMemo(()=>s&&typeof s!="function"&&s.current?s:e,[s]),{style:o,className:n,rest:i}=N(t,r);return !i.src||i.src==""?null:jsxRuntime.jsx("img",{ref:r,style:o,className:`${n} flex`,...i})});nn.displayName="Zuz.Image";var ot=nn;var sn=react.forwardRef((t,s)=>{let{src:e,variant:r,type:o,crossOrigin:n,referrerPolicy:i,fx:m,as:f,alt:l,color:c,style:p,...a}=t,[d,C,h]=hooks.useImage(e??"",n,i),{className:v,style:T,rest:P}=N({fx:m,as:f});return jsxRuntime.jsx(u,{className:`--avatar --${r||Z.Small} --${(o||Go.Circle).toLowerCase()} rel flex aic jcc ${v}`.trim(),style:{background:c||"var(--primary)",...p,...T},...P,children:e?jsxRuntime.jsx(ot,{src:d,crossOrigin:n,referrerPolicy:i,...a}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});sn.displayName="Zuz.Avatar";var ol=sn;var rl=({size:t=5,type:s="dead",label:e="",variant:r=Z.Small,loading:o=false,spinner:n,...i})=>{let{style:m,className:f,rest:l}=N(i);return jsxRuntime.jsxs(u,{style:{...core._(e).isEmpty()?{width:`${t+4}px`,height:`${t+4}px`}:{},...m},as:`--badge --${r} --${s} rel flex aic jcc ${f}`.trim(),children:[jsxRuntime.jsx(u,{fx:{transition:G.FadeIn,curve:U.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(ge,{type:n})}),core._(e).isEmpty()?jsxRuntime.jsx(u,{style:{width:`${t}px`,height:`${t}px`},as:`--dot --${s}`}):jsxRuntime.jsx(H,{as:"--label",children:e})]})},nl=rl;var xl=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let t=new Date,s=t.getDay();return dateFns.addDays(t,(6-s)%7||6)},getDateFormat:()=>{let t=new Date,s=t.getDay();return dateFns.format(dateFns.addDays(t,(6-s)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],bl=t=>{let s=new Set;return t.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return s.has(r)?false:(s.add(r),true)})},ln=react.forwardRef((t,s)=>{let{defaultValue:e,variant:r,onChange:o,...n}=t,{style:i,className:m,rest:f}=N(n),[l,c]=react.useState(e||new Date),p=dateFns.startOfMonth(l),a=dateFns.endOfMonth(l),d=dateFns.startOfWeek(p),C=dateFns.endOfWeek(a),h=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:C}),[d,C]),v=y=>{o?.(y),c(y);},T=()=>{c(y=>new Date(y.getFullYear(),y.getMonth()-1));},P=()=>{c(y=>new Date(y.getFullYear(),y.getMonth()+1));};return jsxRuntime.jsxs(u,{as:`--calendar flex --${r||"sm"} ${m}`,style:i,children:[jsxRuntime.jsx(u,{as:"--calendar-quick-select flex cols flex:1",children:bl(xl).map(y=>{let g=y.getDate();return jsxRuntime.jsxs($,{onClick:()=>v(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:y.label}),jsxRuntime.jsx(H,{as:"tar",children:y.getDateFormat()})]},`--dtp-option-label-${y.label}`)})}),jsxRuntime.jsxs(u,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(u,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(H,{as:"flex:1 --calendar-cm bold",children:dateFns.format(l,"MMMM yyyy")}),jsxRuntime.jsx($,{onClick:T,as:"--calendar-chevron",children:D.chevronUpOutline}),jsxRuntime.jsx($,{onClick:P,as:"--calendar-chevron",children:D.chevronDownOutline})]}),jsxRuntime.jsxs(u,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(y=>jsxRuntime.jsx(H,{as:"--calendar-day",children:y},`--calendar-hd-${y}`)),h.map((y,g)=>{let R=dateFns.isSameMonth(y,l),w=dateFns.isSameDay(y,l),S=dateFns.isToday(y);return jsxRuntime.jsx($,{disabled:!R,onClick:()=>v(y),as:["--calendar-day --calendar-dd",`${w?"--calendar-dd-selected":""}`,`${S?"--calendar-dd-current":""}`],children:dateFns.format(y,"d")},`--calendar-day-${g}-${y.getFullYear()}-${y.getMonth()}-${y.getDay()}`)})]})]})]})});ln.displayName="Zuz.Calendar";var fo=ln;var cn=(s=>(s.Line="line",s))(cn||{});var un=react.forwardRef((t,s)=>{let{data:e,width:r,height:o,lineColor:n,strokeWidth:i=2,gradientStartColor:m,gradientEndColor:f,animated:l,animDuration:c=2,animDelay:p=0,padding:a=0,type:d,...C}=t,{className:h,style:v,rest:T}=N(C),P=react.useRef(null),y=hooks.useResizeObserver(P.current?.parentElement||P),g=typeof r=="number"?r:y.width,R=typeof o=="number"?o:y.height,w={width:g,height:R},S=react.useId(),{pathD:I,areaPathD:M}=hooks.useLineChart(e,w,a+(i||2)),B=react.useRef(null),A=react.useRef(null),[E,z]=react.useState(0),[_,W]=react.useState(0);return react.useEffect(()=>{l&&(B.current&&z(B.current.getTotalLength()),A.current&&W(A.current.getTotalLength()));},[l,I,M,g,R]),jsxRuntime.jsx(u,{ref:P,as:`--chart --${d||"line"}-chart ${h}`.trim(),style:{...v,width:r,height:o},...T,children:g>0&&R>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${g} ${R}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:m}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:f})]})}),jsxRuntime.jsx("path",{ref:A,d:M,fill:`url(#${S})`,stroke:"none",style:l?{strokeDasharray:_,strokeDashoffset:_}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:_,to:"0",dur:`${c||2}s`,begin:`${p||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:B,d:I,fill:"none",stroke:n,strokeWidth:i,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:E,strokeDashoffset:E}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${c||2}s`,begin:`${p||0}s`,fill:"freeze"})})]})})});un.displayName="Zuz.Chart";var Pl=un;var fn=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(fn||{}),dn=(l=>(l.Image="img",l.Video="vid",l.Audio="audio",l.Link="link",l.Document="doc",l.Location="loc",l.Contact="contact",l.Event="event",l.Poll="poll",l))(dn||{});var gn=react.forwardRef((t,s)=>{let{text:e,media:r,side:o="me",status:n=1,timeStamp:i=Date.now(),arrow:m=true,...f}=t,{className:l,style:c,rest:p}=N(f);return jsxRuntime.jsx(u,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(u,{className:`--bubble --bubble-${o} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${m==true?"--b-arrow":""} ${l}`.trim(),style:{...c},...p,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(u,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(ee,{className:"--bm-action",children:D.play}),jsxRuntime.jsx(je,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(u,{as:"--bubble-image",children:jsxRuntime.jsx(ot,{src:r.source})}):null:null,jsxRuntime.jsxs(u,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(i)}),o=="me"&&jsxRuntime.jsx(ee,{className:`--bubble-status --bs-${n}`,children:n==0?D.pending:n==1?D.done:n==2?D.doneAll:D.doneAll})]})]})})});gn.displayName="Zuz.Bubble";var Nl=gn;var hn=react.forwardRef((t,s)=>{let{style:e,className:r,rest:o}=N(t);return jsxRuntime.jsx("label",{ref:s,style:e,className:r,...o})});hn.displayName="Zuz.Label";var nt=hn;var yn=react.forwardRef((t,s)=>{let{name:e,required:r,type:o,value:n,size:i,variant:m,checked:f,onSwitch:l,...c}=t,[p,a]=react.useState(f||false),d=react.useRef(null),{variant:C}=q(true);return react.useImperativeHandle(s,()=>({setChecked(h,v=true){a(h),d.current&&(d.current.checked=h),v&&l&&l(h,n||"cb");},toggle(h=true){d.current&&(d.current.checked=!p),h&&l&&l&&l(!p,n||"cb"),a(!p);}})),jsxRuntime.jsxs(nt,{className:`--${(o||ve.Default).toLowerCase()} ${!o||o==ve.Default?"--checkbox":"--switch"} --${m||C||Z.Small} flex aic jcc ${p?"is-checked":""} rel`.trim(),...c,children:[(!o||o==ve.Default)&&D.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:p,value:n||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:h=>{l&&l(h.target.checked,n||"cb"),a(h.target.checked);}})]})});yn.displayName="Zuz.CheckBox";var st=yn;var Al=({ref:t,...s})=>{let{code:e,lang:r="tsx",showLines:o=false,highlight:n="",as:i,fx:m,...f}=s,l=react.useRef(null),{className:c,style:p,rest:a}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:m},l),d=react.useMemo(()=>{let h=new Set;return n.split(",").forEach(v=>{if(v.includes("-")){let[T,P]=v.split("-").map(Number);for(let y=T;y<=P;y++)h.add(y);}else v&&h.add(Number(v));}),h},[n]),C=react.useMemo(()=>{let h=e.split(`
|
|
10
|
-
`);for(;h.length>0&&h[0].trim()==="";)h.shift();for(;h.length>0&&h[h.length-1].trim()==="";)h.pop();let
|
|
11
|
-
${o==true?`<span class="--line-number">${
|
|
9
|
+
document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(Ut,{children:t})]})},tr=(t,s)=>{if(Xs)return;let e;try{e=localStorage.getItem(t)||void 0;}catch{}return e||s};var rr=({ref:t,...s})=>{let{style:e,...n}=s,{style:o,className:r,rest:l}=N(n);return jsxRuntime.jsx("span",{ref:t,style:e,className:r,...l})};rr.displayName="Zuz.Span";var ee=rr;var sr=react.forwardRef((t,s)=>{let{name:e,pathCount:n,variant:o,color:r,...l}=t,{variant:m}=q(true),{className:f,style:i,rest:c}=N(l);return jsxRuntime.jsx("div",{style:{color:r,...i},className:`icon-${e} --icon --${o||m||Z.Small} ${f}`.trim(),ref:s,...c,children:Array(n||0).fill(0).map((p,a)=>jsxRuntime.jsx(ee,{className:`path${a+1}`},`${e}-layer-${a}`))})});sr.displayName="Zuz.Icon";var Y=sr;var ne={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var ar=t=>{let{type:s,variant:e,color:n,...o}=t,{className:r,style:l,rest:m}=N(o),{spinner:f}=q(true),i=()=>{switch(s||f?.type||ne.Simple){case ne.Simple:return null;case ne.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(u,{as:"--bar --bar1"}),jsxRuntime.jsx(u,{as:"--bar --bar2"}),jsxRuntime.jsx(u,{as:"--bar --bar3"})]});case ne.Roller:return null}};return jsxRuntime.jsx(u,{className:`${r} --spinner --${(s||f?.type||ne.Simple).toLowerCase()} --${e||f?.variant||Z.Small}`.trim(),style:{...l},...m,children:i()})};ar.displayName="Zuz.Spinner";var ge=ar;var yt={Loading:"loading",Normal:"normal"};var lr=({ref:t,...s})=>{let{reset:e,kind:n="solid",variant:o,icon:r,iconSize:l,children:m,withLabel:f,spinner:i,state:c,disabled:p,...a}=s,{style:g,className:C,rest:h}=N(a),{variant:w}=q(true);return jsxRuntime.jsxs("button",{className:`--button --${n} --${o||w} flex aic ${e?"":"jcc"} ${r?"--with-icon":""} ${C}`.trim().replace(/\s+/g," "),style:g,ref:t,disabled:c==yt.Loading||s.skeleton?.enabled||p,...h,children:[c==yt.Loading&&jsxRuntime.jsx(ge,{variant:o||w,type:i||ne.Simple}),(!c||c==yt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r&&jsxRuntime.jsx(Y,{variant:l,name:r}),f===true?jsxRuntime.jsx(ee,{children:m}):m]})]})};lr.displayName="Zuz.Button";var $=lr;var mr=react.forwardRef((t,s)=>{let{h:e,html:n,children:o,lines:r,...l}=t,{style:m,className:f,rest:i}=N(l),c=`h${t.h||1}`;return jsxRuntime.jsx(c,{ref:s,style:m,className:f,...i,children:n?jsxRuntime.jsx(ee,{dangerouslySetInnerHTML:{__html:n}}):o})});mr.displayName="Zuz.Text";var H=mr;var sa=t=>{let{label:s,labelColor:e,icon:n,iconColor:o,index:r,className:l,onSelect:m}=t;return s=="-"?jsxRuntime.jsx(u,{className:"--line"}):jsxRuntime.jsxs($,{reset:true,onClick:f=>m?.(t),className:`--item ${l||""}`.trim(),children:[jsxRuntime.jsx(u,{as:"--icon",children:jsxRuntime.jsx(Y,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:s})]})},pr=sa;var dr=({ref:t,...s})=>{let{id:e,as:n,fx:o,offsetX:r,offsetY:l,parent:m,event:f,arrow:i,when:c,items:p,header:a,footer:g,origin:C=Ge.TopRight,...h}=s,[w,T]=react.useState(false),[P,y]=react.useState(p||[]),{position:d,targetRef:R,calculatedAnchor:v}=hooks.useAnchorPosition(m?.current,f,{offsetX:r,offsetY:l,preferredAnchor:C}),I=m&&d.top>m.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",k=react.useMemo(()=>{let W=v.toLowerCase();return W.includes("left")?"--arrow-left":W.includes("right")?"--arrow-right":"--arrow-center"},[v]),B=d.top!==0||d.left!==0;react.useEffect(()=>{c&&B?T(true):c||T(false);},[c,B]);let{className:A,style:E,rest:z}=N(h),_=ie({...o?.transition?{transition:o.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??U.EaseInOut,duration:o?.duration??.05,when:w&&B});return jsxRuntime.jsxs(u,{ref:R,className:`--contextmenu ${i||m!=null?`--has-arrow ${I} ${k}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!w,style:{...E,..._.style,top:d.top,left:d.left,visibility:B?"visible":"hidden",transformOrigin:v},...z,children:[typeof a=="function"?react.createElement(a):a,P.map((W,x)=>jsxRuntime.jsx(pr,{...W,index:x},`context-${W.label.toLowerCase()}-${x}`)),typeof g=="function"?react.createElement(g):g]})};dr.displayName="Zuz.ContextMenu";var qt=dr;var gr=react.forwardRef((t,s)=>{let{children:e,fx:n,when:o,fxDelay:r,fxStep:l,classToIgnore:m,...f}=t,i=q(true),c=hooks.useDelayed(),p=n||i?.group?.fx,a=r||i?.group?.fxDelay,g=l||i?.group?.fxStep,C=m||i?.group?.classToIgnore||"--ignore",h=react.useMemo(()=>p?react$1.addPropsToChildren(e,w=>{if(w.type===react.Fragment)return false;let T=w.props||{},P="fx"in T,y=T.as?Array.isArray(T.as)?T.as.join(" "):T.as:T.className||"",d=typeof y=="string"&&y.includes(C);return !P&&!d},w=>({fx:{...p,delay:(a||0)+w*(g||.1),when:o??(n?.when||c)}})):e,[e,o,c,p]);return jsxRuntime.jsx(u,{className:"--group",ref:s,...f,children:h})});gr.displayName="Zuz.Group";var Xt=gr;var yr=react.forwardRef((t,s)=>{let{message:e,spinner:n,spinnerSize:o,color:r,when:l,hideMessage:m,...f}=t,{className:i,style:c,rest:p}=N(f),{spinner:a}=q(true);return "when"in t&&t.when==false?null:jsxRuntime.jsxs(Xt,{fx:{transition:G.SlideInBottom,curve:U.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${i}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...p,children:[jsxRuntime.jsx(ge,{variant:o||a?.variant||Z.Small,type:n||a?.type||ne.Simple}),!m&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});yr.displayName="Zuz.Cover";var he=yr;var xr=react.forwardRef((t,s)=>{let{when:e,...n}=t;return jsxRuntime.jsx(u,{ref:s,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...n})});xr.displayName="Zuz.Overlay";var ke=xr;var Sa=({action:t,render:s=true,message:e=""})=>jsxRuntime.jsx(u,{as:`--body flex aic rel ${t?"":"--no-action"}`.trim(),children:s?e:null}),br=Sa;var Ta=({action:t,actionPosition:s,dialogID:e,variant:n})=>jsxRuntime.jsx(u,{as:`--footer flex aic rel ${s?s==qo.Center?"jcc":"":"jce"}`.trim(),children:t.map((o,r)=>jsxRuntime.jsx($,{variant:n,onClick:l=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${e}-action-${o.key}`))}),wr=Ta;var Pa={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[pe.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[pe.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[pe.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[pe.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},D=Pa;var Ra=({title:t="Alert",onClose:s})=>jsxRuntime.jsxs(u,{as:"--head flex aic rel",children:[jsxRuntime.jsx(u,{as:`--${t?"title":"dot"} flex aic jcc rel`,children:t}),jsxRuntime.jsx($,{onClick:e=>s(),className:"--closer abs center-v",children:D.close})]}),Cr=Ra;var Ir=({ref:t,...s})=>{let{index:e,id:n,title:o,message:r,transition:l,curve:m,speed:f,type:i,action:c,actionPosition:p,spinner:a,loadingMessage:g,variant:C,inBackground:h,forceClose:w,forceLoading:T,onClose:P,onShow:y,onHide:d,...R}=s,v=react.useMemo(()=>core.uuid(12),[]),[S,I]=react.useState(o||""),[k,B]=react.useState(r||""),[A,E]=react.useState(i||$e.Dialog),[z,_]=react.useState(false),[W,x]=react.useState(true),[M,V]=react.useState(c||null),[K,O]=react.useState(false),{variant:F,spinner:X,dialog:Q}=q(true),j=C||Q?.variant||F||Z.Small,{style:me,className:re,rest:be}=N(R),Le=react.useRef(null),ve=ie({when:z,duration:f||Q?.speed||.3,delay:Q?.delay||.1,transition:l||Q?.transition||G.SlideInBottom,curve:m||Q?.curve||U.EaseInOut,watch:["scale","filter","transform"]}),se=()=>{_(false),P(n);};react.useEffect(()=>{E($e.Dialog),B(r),I(S),M&&V(M.reduce((_o,Fo)=>(_o.push({...Fo,key:Fo.key||core.uuid(12)}),_o),[])),_(true),setTimeout(()=>y?y():()=>{},500);},[]),react.useEffect(()=>{w&&se();},[w]),react.useEffect(()=>{T!=null&&O(T);},[T]);let J=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ke,{style:{zIndex:J},when:z}),jsxRuntime.jsxs(u,{as:`--dialog --${(i??$e.Default).toLowerCase()} ${z?"--visible":""} ${re} fixed abc`.trim(),style:{...ve.style,zIndex:J+1,pointerEvents:h==true?"none":"auto",...h==true?{scale:"0.92",filter:"blur(2px)"}:{}},...be,ref:Le,children:[jsxRuntime.jsx(Cr,{title:S,onClose:se}),jsxRuntime.jsx(br,{message:k,render:W,action:M}),M&&M.length>0&&jsxRuntime.jsx(wr,{variant:j,action:M,dialogID:v,actionPosition:p}),jsxRuntime.jsx(he,{when:K,spinner:a||Q?.spinner||X?.type||ne.Simple,message:g||Q?.loadingMessage})]})]})};Ir.displayName="Zuz.Dialog";var Qt=Ir;var Jt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(s){return this.stack[this.stack.length-1]===s}push(s){this.stack.includes(s)||(this.stack.push(s),this.updateScrollLock());}pop(s){this.stack=this.stack.filter(e=>e!==s),this.updateScrollLock();}handleEscape(){let s=this.stack[this.stack.length-1];return s?(s(),true):false}get count(){return this.stack.length}},Ye=new Jt;var Nr=react.forwardRef((t,s)=>{let{speed:e,style:n,...o}=t,{rootRef:r,containerRef:l,thumbY:m,thumbX:f,onScrollY:i,onScrollX:c}=hooks.useScrollbar(e||1),{style:p,className:a,rest:g}=N(o);return react.useEffect(()=>{let C=l.current;if(!C)return;let h=()=>{window.dispatchEvent(new Event("resize"));};return C.addEventListener("scroll",h),()=>C.removeEventListener("scroll",h)},[]),jsxRuntime.jsxs(u,{ref:r,className:a.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(u,{as:`--scroll-content ${a}`.trim(),ref:l,style:n||{},children:g.children}),jsxRuntime.jsx(u,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(u,{as:"--scroll-thumb --abs",ref:m,onMouseDown:i})}),jsxRuntime.jsx(u,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(u,{as:"--scroll-thumb --abs",ref:f,onMouseDown:c})})]})});Nr.displayName="Zuz.ScrollView";var jt=Nr;var Er=({ref:t,...s})=>{let{id:e,index:n,from:o,speed:r,children:l,margin:m,animation:f,prerender:i,inBackground:c,forceClose:p,forceLoading:a,onClose:g,...C}=s,{drawer:h}=q(true),[w,T]=react.useState(l),[P,y]=react.useState(false),[d,R]=react.useState(i??(h?.prerender||true)),[v,S]=react.useState(false),I=()=>{y(false),g?.(e??-1);},{className:k,style:B,rest:A}=N(C),E=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Ye.isTop(I)&&I();}}],[P]);hooks.useShortcuts(E),react.useEffect(()=>{T(l);},[l]),react.useEffect(()=>(P?Ye.push(I):Ye.pop(I),()=>Ye.pop(I)),[P]),react.useEffect(()=>{y(true);},[]),react.useEffect(()=>{p&&I();},[p]),react.useEffect(()=>{a!=null&&S(a);},[a]);let z=o||h?.from||ae.Left,_=react.useMemo(()=>{switch(z){case ae.Left:return {from:{x:"-100vw"},to:{x:0}};case ae.Right:return {from:{x:"100vw"},to:{x:0}};case ae.Top:return {from:{y:"-100vh"},to:{y:0}};case ae.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,h?.from]),W=ie({from:{..._.from,opacity:0},to:{..._.to,opacity:1},when:P,curve:f||h?.animation||U.EaseInOut,duration:r||h?.speed||.5,watch:["scale","filter"]}),x=react.useMemo(()=>1e4+(n||1)*10,[n]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ke,{onClick:M=>{P&&I();},when:P,style:{zIndex:x}}),jsxRuntime.jsxs(u,{ref:t,"aria-hidden":!P,className:`--drawer flex cols ${k} --${z.toLowerCase()} fixed`,style:{...B,...W.style,"--m":`${m||h?.margin||0}px`,zIndex:x+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...A,children:[o==ae.Top||o==ae.Bottom?jsxRuntime.jsx(u,{className:"--handle"}):null,jsxRuntime.jsxs(jt,{as:"rel",children:[d||P?w:null,jsxRuntime.jsx(he,{when:v})]})]})]})};Er.displayName="Zuz.Drawer";var ro=Er;var Lr=react.forwardRef((t,s)=>{let{progress:e,type:n,animated:o,...r}=t,l=react.useRef(null);react.useImperativeHandle(s,()=>({setProgress:c=>{l.current.style.width=`${c*100}%`;}}),[]),react.useEffect(()=>{e&&l.current&&(o?setTimeout(()=>l.current.style.width=`${e*100}%`,500):l.current.style.width=`${e*100}%`);},[e,l.current]);let{className:m,style:f,rest:i}=N(r);return jsxRuntime.jsx(u,{className:`--progress ${o?"--animated":""} flex rel ${m}`.trim(),style:f,...i,children:jsxRuntime.jsx(u,{ref:l,className:"--bar rel"})})});Lr.displayName="Zuz.ProgressBar";var je=Lr;var vt=(r=>(r.Default="default",r.Success="success",r.Error="error",r.Warn="warn",r.Promise="promise",r))(vt||{}),wt=(l=>(l.TopLeft="TopLeft",l.TopCenter="TopCenter",l.TopRight="TopRight",l.BottomLeft="BottomLeft",l.BottomCenter="BottomCenter",l.BottomRight="BottomRight",l))(wt||{}),kr=(e=>(e.Stack="stack",e.Individual="individual",e))(kr||{}),Mr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var _a=t=>{let{index:s,id:e,type:n,icon:o,title:r,message:l,duration:m,sticky:f=false,actions:i=[],position:c,style:p,isHovered:a,total:g,progress:C,forceClose:h,variant:w,onClick:T,onClose:P}=t,[y,d]=react.useState(false),[R,v]=react.useState(false),{toast:S}=q(true),I=R||h,k=c||S?.position||"TopCenter",B=n||S?.type||"default",A=p||S?.style||"stack",E=m||S?.duration||4,z=C||S?.progress||false,_=react.useRef(E*1e3),W=react.useRef(void 0),x=react.useRef(void 0),M=react.useRef(null),V=ie({when:y&&!I,duration:.3,transition:S?.transition||(k.includes("Top")?G.SlideInTop:k.includes("Bottom")?G.SlideInBottom:k.includes("Left")?G.SlideInLeft:G.SlideInRight),curve:S?.curve||U.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{d(true);let re=be=>{if(x.current!==void 0){let Le=be-x.current;if(!a&&!f&&!I&&(_.current-=Le,M.current)){let ve=Math.max(0,_.current/(E*1e3)*100);M.current?.setProgress?.(ve/100);}}x.current=be,_.current<=0?v(true):W.current=requestAnimationFrame(re);};return W.current=requestAnimationFrame(re),()=>{W.current&&cancelAnimationFrame(W.current);}},[a,f,I,E]),react.useEffect(()=>{if(I){let re=setTimeout(()=>{P?.(e);},350);return ()=>clearTimeout(re)}},[I,e]);let K=A==="stack",O=a?s*65:s*8,F=a?1:Math.max(.85,1-s*.05),X=a?1:Math.max(.4,1-s*.2),Q=()=>{T?T():(!i||i.length===0)&&v(true);},j=V.style.transform||"translate(0, 0)",me=I?j:`${j} translateY(${k.includes("Top")?O:-O}px) scale(${F})`;return jsxRuntime.jsxs(u,{onClick:Q,as:`--snack --${I?"hidden":"visible"} --${w||S?.variant||Z.Medium} --${B} --${k.toLowerCase()} abs flex aic`,style:{...V.style,zIndex:1e3-s,pointerEvents:I?"none":"auto",opacity:I?V.style.opacity:X,transform:me,filter:!I&&K&&!a&&s>0?"blur(1px)":"none",cursor:!i||i.length===0?"pointer":"default",transition:`${V.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsx(u,{as:"--ico flex aic jcc",children:o?jsxRuntime.jsx(Y,{name:o}):jsxRuntime.jsx(u,{as:"--no-icon"})}),jsxRuntime.jsxs(u,{as:"--meta flex cols",children:[jsxRuntime.jsx(H,{as:"--tt",children:r||Mr[n]}),jsxRuntime.jsx(H,{as:"--tm",children:l})]}),i&&i.length>0&&jsxRuntime.jsx(u,{as:"--actions flex gap:5",children:i.map((re,be)=>jsxRuntime.jsx($,{as:"--snack-btn bold",onClick:Le=>{Le.stopPropagation(),re.onClick();},children:re.label},be))}),z&&jsxRuntime.jsx(je,{as:"abs",ref:M})]})},no=_a;var le=react.createContext(null),Ga=({ref:t,...s})=>{let n=react.useContext(le)?.depth??0,[o,r]=react.useState(null),[l,m]=react.useState(null),[f,i]=react.useState(false),[c,p]=react.useState([]),a=hooks.useDelayed(),g=react.useRef(0),C=()=>++g.current,h=()=>{i(false),setTimeout(()=>m(null),200);};react.useImperativeHandle(t,()=>({add(d){let R=C(),v={id:R,...d};return p(S=>[...S,v]),R},openMenu(d){i(false),setTimeout(()=>{m({id:C(),type:"menu",props:d}),i(true);},16);},remove(d){p(R=>R.map(v=>v.id===d?{...v,props:{...v.props,forceClose:true}}:v)),l?.id===d&&h();},loading(d,R){p(v=>v.map(S=>S.id===d?{...S,props:{...S.props,forceLoading:R}}:S)),l?.id===d&&h();},clear(d){p(c.filter(R=>R.type!=d));}})),react.useEffect(()=>{if(l&&f){let d=()=>h();return document.addEventListener("click",d),()=>document.removeEventListener("click",d)}},[l,f,h]);let w=d=>{setTimeout(()=>{p(R=>R.filter(v=>v.id!==d)),l?.id===d&&m(null);},250);},T=react.useMemo(()=>[...c.filter(d=>d.type!="toast")],[c]);if(!a)return null;let P=c.filter(d=>d.type=="toast").reverse(),y=Object.values(wt);return reactDom.createPortal(jsxRuntime.jsxs(u,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[T.map((d,R)=>{let v=R<T.length-1;return d.type==="dialog"?jsxRuntime.jsx(Qt,{onClose:w,index:R,id:d.id,...d.props,inBackground:v},`layer-${d.type}-${d.id}`):d.type==="drawer"?jsxRuntime.jsx(ro,{onClose:w,index:R,id:d.id,...d.props,inBackground:v},`layer-${d.type}-${d.id}`):null}),y.map(d=>{let R=P.filter(v=>(v.props.position||"TopCenter")===d);return R.length===0?null:jsxRuntime.jsx(u,{onMouseEnter:()=>r(d),onMouseLeave:()=>r(null),as:`--toast-container fixed --${d.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:R.map((v,S)=>jsxRuntime.jsx(no,{index:S,total:R.length,isHovered:o===d,onClose:w,id:v.id,...v.props},v.id))},d)}),l&&jsxRuntime.jsx(u,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(qt,{onClose:h,when:f,...l.props},`menu-${l.id}`)})]}),document.body)},qa=({children:t})=>{let s=react.useContext(le),e=s?s.depth+1:0,n=react.useRef(null),o=react.useMemo(()=>({add:r=>n.current?.add(r),openMenu:r=>n.current?.openMenu(r),remove:r=>n.current?.remove(r),loading:(r,l)=>n.current?.loading(r,l),clear:r=>n.current?.clear(r),depth:e,isSubLayer:!!s}),[s]);return jsxRuntime.jsxs(le.Provider,{value:o,children:[t,jsxRuntime.jsx(Ga,{ref:n})]})},Ut=qa;var Ya=()=>{let t=react.useContext(le);if(!t)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,r)=>{n.preventDefault(),t.openMenu({event:n,items:o,origin:r});},showMenu:(n,{items:o,origin:r,offsetX:l,offsetY:m,transition:f,curve:i,arrow:c,duration:p,header:a,footer:g})=>{t.openMenu({fx:{transition:f,curve:i,duration:p},parent:n,items:o,origin:r||Ge.TopCenter,offsetX:l,offsetY:m,arrow:c,header:a,footer:g});},hide:t.clear}},Qa=Ya;var ja=()=>{let t=react.useContext(le);if(!t)throw new Error("useDialog must be used inside <LayersProvider>");let s=()=>t.clear("dialog"),e=r=>t.remove(r),n=(r,l)=>t.loading(r,l);return {clearAll:s,show:r=>{let l=t.add({type:"dialog",props:{...r,type:$e.Dialog}});return {id:l,setLoading:m=>n(l,m),hide:()=>e(l)}},hide:e}},ei=ja;var oi=()=>{let t=react.useContext(le);if(!t)throw new Error("useDialog must be used inside <LayersProvider>");let s=()=>t.clear("drawer"),e=r=>t.remove(r),n=(r,l)=>t.loading(r,l),o=r=>{let l=t.add({type:"drawer",props:r});return {id:l,setLoading:m=>n(l,m),close:()=>e(l)}};return {clearAll:s,open:r=>o({children:r}),right:r=>o({children:r,from:ae.Right}),left:r=>o({children:r,from:ae.Left}),top:r=>o({children:r,from:ae.Top}),bottom:r=>o({children:r,from:ae.Bottom}),close:e}},ri=oi;var si=(t,s,e={})=>{let[n,o]=react.useState(null),[r,l]=react.useState(false),{duration:m=.25,curve:f=U.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:c=320}=e;return react.useLayoutEffect(()=>{s&&t.current?(o(t.current.getBoundingClientRect()),l(true)):s||l(false);},[s,t]),{style:ie({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:i.from},to:{opacity:1,width:c,height:"auto",borderRadius:i.to},curve:f,duration:m,when:r&&s}).style,isMeasured:r,sourceRect:n}},ai=si;var mi=(t,s={})=>{let{offset:e=8,direction:n="bottom",container:o=null,triggerRef:r=null}=s,l=react.useRef(null),m=react.useCallback(()=>{let f=t.current;if(!f)return;let i=r?.current||f.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=f.getBoundingClientRect(),p=i.getBoundingClientRect(),a,g;o?(a=o.getBoundingClientRect(),g="absolute"):(window.getComputedStyle(f).position==="fixed"?g="fixed":g="absolute",g==="fixed"?a={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:a={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==g&&(f.style.position=g),l.current=g;let w=0,T=0;switch(n){case "top":w=p.top-c.height-e,T=p.left,w<a.top&&p.bottom+c.height+e<=a.bottom&&(w=p.bottom+e);break;case "bottom":w=p.bottom+e,T=p.left,w+c.height>a.bottom&&p.top-c.height-e>=a.top&&(w=p.top-c.height-e);break;case "left":w=p.top,T=p.left-c.width-e,T<a.left&&p.right+c.width+e<=a.right&&(T=p.right+e);break;case "right":w=p.top,T=p.right+e,T+c.width>a.right&&p.left-c.width-e>=a.left&&(T=p.left-c.width-e);break}if(w=Math.max(a.top,Math.min(w,a.bottom-c.height)),T=Math.max(a.left,Math.min(T,a.right-c.width)),l.current==="fixed")f.style.top=`${w}px`,f.style.left=`${T}px`;else {let P;f.offsetParent?P=f.offsetParent.getBoundingClientRect():P={top:0,left:0};let y=w-P.top+window.scrollY,d=T-P.left+window.scrollX;f.style.top=`${y}px`,f.style.left=`${d}px`;}},[t,r,e,n,o]);return react.useEffect(()=>{let f=t.current;if(!f)return;let i=r?.current||f.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(m);return c.observe(f),i&&c.observe(i),m(),window.addEventListener("resize",m),window.addEventListener("scroll",m,true),()=>{c.disconnect(),i&&c.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,true);}},[t,n,e,o,r]),{postion:l.current,reposition:m}},et=mi;var ui=()=>{let t=react.useContext(le);if(!t)throw new Error("useToast must be used inside <LayersProvider>");let s=(p,a)=>t.add({type:"toast",props:{...a,type:p}}),n=p=>t.remove(p),i=(p,a,g)=>{let C=s(p,{...a,sticky:a.sticky??false,actions:[{label:g?.label||"Ok",onClick:()=>{g?.onClick?.(),n(C);}}]});return C},c=(p,a,g,C)=>{let h=s(p,{...a,sticky:true,actions:[{label:C?.label||"Cancel",onClick:()=>{C?.onClick?.(),n(h);}},{label:g?.label||"Ok",onClick:()=>{g?.onClick?.(),n(h);}}]});return h};return {ok:(p,a)=>i("default",p,a),success:(p,a)=>i("success",p,a),error:(p,a)=>i("error",p,a),confirm:(p,a,g)=>c("default",p,a,g),warn:(p,a)=>i("warn",p,a)}},fi=ui;var gi=()=>{let t=react.useContext(le);if(!t)throw new Error("useToast must be used inside <LayersProvider>");let s=(i,c)=>t.add({type:"toast",props:{...c,type:i}});return {show:(i,c,p,a)=>s("default",{title:i,message:c,icon:p,duration:a}),hide:i=>t.remove(i),success:(i,c,p,a)=>s("success",{title:i,message:c,icon:p,duration:a}),error:(i,c,p,a)=>s("error",{title:i,message:c,icon:p,duration:a}),warn:(i,c,p,a)=>s("warn",{title:i,message:c,icon:p,duration:a}),promise:(i,c,p,a)=>s("promise",{title:i,message:c,icon:p,duration:a}),clearAll:()=>t.clear("toast")}},so=gi;var Fr=({ref:t,style:s,...e})=>{let n=react.useRef(null),o=react.useMemo(()=>t&&typeof t!="function"&&t.current?t:n,[t]),{style:r,className:l,rest:m}=N(e,o);return jsxRuntime.jsx("div",{ref:t||n,style:{...r,...s||{}},className:l,...m})};Fr.displayName="Zuz.Box";var u=Fr;var Kr=react.forwardRef((t,s)=>{let{title:e,message:n,...o}=t,[r,l]=react.useState(false);return jsxRuntime.jsxs(u,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs($,{onClick:m=>l(!r),className:`--toggle flex aic ${r?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(u,{className:"--arrow flex",children:r?D.arrowUp:D.arrowDown})]}),r&&jsxRuntime.jsx(u,{className:"--detail",children:n})]})});Kr.displayName="Zuz.Accordion";var wi=Kr;var Si=({label:t,icon:s,onClick:e,idx:n,selected:o})=>jsxRuntime.jsx($,{onClick:e,onMouseMove:r=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof s=="string"?jsxRuntime.jsx(Y,{name:s}):s}),Ur=Si;var Gr=react.forwardRef((t,s)=>{let{items:e,name:n,selected:o,position:r,...l}=t,m=react.useRef(null),[f,i]=react.useState(o||e[0].tag||0),c=react.useCallback(({x:w,y:T})=>{if(m.current){let P=m.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${w-P.left}`),document.documentElement.style.setProperty("--tip-y",`${T-P.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),p=react.useCallback(()=>{m.current&&(m.current.removeEventListener("pointerleave",p),m.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),a=react.useCallback(()=>{m.current&&(m.current.addEventListener("pointerleave",p),m.current.addEventListener("pointermove",c));},[]);react.useEffect(()=>{m.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((w,T)=>T.label.length>w.length?T.label:w,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),m.current?.addEventListener("pointerenter",a));},[]);let{className:g,style:C,rest:h}=N(l);return jsxRuntime.jsxs(u,{ref:m,style:C,className:[`--actionbar flex aic ${g}`,`${!r||r==te.Auto?"rel":`--${r}`}`].join(" ").trim(),...h,children:[e.map((w,T)=>jsxRuntime.jsx(Ur,{selected:f===w.tag||o==T,...w,idx:T},`actionbar-action-${w.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(u,{className:"--tip abs",children:jsxRuntime.jsx(u,{className:"--track flex aic",children:e.map(({label:w})=>jsxRuntime.jsx(u,{className:"--lb",children:w},`tool-tip-${w.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Gr.displayName="Zuz.ActionBar";var Ii=Gr;var Xr=react.forwardRef((t,s)=>{let{type:e,icon:n,title:o,message:r,iconSize:l,...m}=t,{className:f,style:i,rest:c}=N(m);return jsxRuntime.jsxs(u,{className:`--alert --${e||pe.Info} flex aic ${f}`.trim(),style:i,...c,children:[jsxRuntime.jsx(u,{className:`--icon icon-${n||"auto-matic"}`,style:l?{fontSize:l,width:l,height:l}:{},children:!n&&D[e||pe.Info]}),jsxRuntime.jsxs(u,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${r?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),r&&jsxRuntime.jsx(H,{className:"--message",h:2,children:r})]})]})});Xr.displayName="Zuz.Alert";var Bi=Xr;var Yr=({ref:t,...s})=>{let{variant:e,numeric:n,onConfirm:o,...r}=s,{style:l,className:m,rest:f}=N(r),{variant:i}=q(true),c=p=>{n&&(p.currentTarget.value=p.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||i} flex ${m}`.trim(),style:l,onInput:c,onKeyDown:p=>{p.key=="Enter"&&o?.(p.currentTarget.value);},ref:t,...f})};Yr.displayName="Zuz.Input";var oe=Yr;var Jr=t=>{let{meta:s,children:e}=t,n=hooks.useDelayed(),{label:o,icon:r,...l}=react.isValidElement(s)?{}:s,{className:m,style:f,rest:i}=N({...l,...l.animate?{animate:{...l.animate,when:n}}:{}});return react.isValidElement(s)?jsxRuntime.jsx("li",{style:f,className:m,children:s}):jsxRuntime.jsxs("li",{style:f,className:m,...i,children:[e,typeof s=="string"?s:o]})};Jr.displayName="Zuz.ListItem";var jr=Jr;var tn=react.forwardRef((t,s)=>{let{items:e,variant:n,direction:o,seperator:r,ol:l,...m}=t,{className:f,style:i,rest:c}=N(m),p=l==true?"ol":"ul";return react.createElement(p,{className:`--list --${n||Z.Small} flex ${o??"cols"} ${f}`.trim(),style:i,ref:s,...c,children:e.map((a,g,C)=>{let h=`${typeof a=="string"?`li-${String(a)}`:react.isValidElement(a)?`li-${a.key}`||`${g}-${core.MD5(a.toString())}`:a.label}-${g}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(jr,{meta:a}),r&&C[g+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:r},`spt-${g+1}-${h}`):null]},h)})})});tn.displayName="Zuz.List";var De=tn;var rn=react.forwardRef((t,s)=>{let{fx:e,action:n,data:o,withStyle:r,onChange:l,...m}=t,{className:f}=N({as:r||""}),{style:i}=N(m),[c,p]=react.useState(false),[a,g]=react.useState(o||[]),C=react.useRef(null),h=react.useRef(null),w=react.useRef(null),T=react.useMemo(()=>m.name||core.uuid(12),[]),[P,y]=react.useState(null),[d,R]=react.useState(null),[v,S]=react.useState([]),k=hooks.useDebounce(x=>{x.target.value==""?(p(false),g([])):n&&x.target.value.trim()!=""&&core.withPost(n,{query:x.target.value}).then(M=>{"items"in M&&core._(M.items).isArray()?(g(M.items),R(x.target.value),S(M.items)):console.error("Action Response should contain items array"),y(null);}).catch(M=>{y(null),g([]);});},250),B=()=>{if(h.current){let x=h.current.getBoundingClientRect(),M=window.innerHeight-x.bottom,V=x.top;if(w.current){let K=w.current;M<K.offsetHeight&&V>M?(K.style.top="auto",K.style.bottom=`${x.height}px`,K.style.maxHeight=`${V-150}px`):(K.style.top=`${x.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${M-150}px`);}}},A=x=>{if(a.length>0){if((x.key==="ArrowDown"||x.key==="ArrowUp")&&(x.preventDefault(),x.stopPropagation()),x.key==="Escape")y(null),p(false),g([]);else if(x.key==="ArrowDown")y(M=>{let V=M===null||M===a.length-1?0:M+1;return z(V),V});else if(x.key==="ArrowUp")y(M=>{let V=M===null||M===0?a.length-1:M-1;return z(V),V});else if(x.key==="Enter"&&P!==null){let M=a[P];C.current&&(C.current.value=M,p(false),g([]));}}},E=x=>{C.current&&(C.current.value=x,p(false),g([]));},z=x=>{let M=a[x];if(M&&C.current&&(C.current.value=M,C.current.setSelectionRange(M.length,M.length)),w.current){let K=w.current.children[x];K&&K.scrollIntoView({block:"nearest"});}},_=x=>{h.current&&!h.current.contains(x.target)&&(p(false),g([]));},W=()=>{C.current&&C.current.value===d&&(g(v),y(null),B());};return react.useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",_),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",_);}),[]),react.useEffect(()=>{B();},[a]),jsxRuntime.jsxs(u,{style:i,ref:h,className:`--autocomplete --${t.size||Z.Small} flex aic rel ${f}`.trim(),children:[jsxRuntime.jsx(oe,{ref:C,autoComplete:"off",onChange:k,onKeyDown:A,onFocus:W,...m}),jsxRuntime.jsx(u,{className:"--arrow rel flex aic jcc",children:a.length>0?D.arrowUp:D.arrowDown}),a.length>0&&jsxRuntime.jsx(De,{id:T,ref:w,className:"--suggestion-list flex cols abs",items:a.map((x,M)=>({label:x,onClick:V=>{V.preventDefault(),V.stopPropagation(),E(x);},className:P===M?"--current":"",animate:{transition:G.SlideInBottom,curve:U.EaseInOut,delay:core.clamp(.02*M,.02,.5)}}))})]})});rn.displayName="Zuz.AutoComplete";var qi=rn;var nn=react.forwardRef((t,s)=>{let e=react.useRef(null),n=react.useMemo(()=>s&&typeof s!="function"&&s.current?s:e,[s]),{style:o,className:r,rest:l}=N(t,n);return !l.src||l.src==""?null:jsxRuntime.jsx("img",{ref:n,style:o,className:`${r} flex`,...l})});nn.displayName="Zuz.Image";var ot=nn;var sn=react.forwardRef((t,s)=>{let{src:e,variant:n,type:o,crossOrigin:r,referrerPolicy:l,fx:m,as:f,alt:i,color:c,style:p,...a}=t,[g,C,h]=hooks.useImage(e??"",r,l),{className:w,style:T,rest:P}=N({fx:m,as:f});return jsxRuntime.jsx(u,{className:`--avatar --${n||Z.Small} --${(o||Go.Circle).toLowerCase()} rel flex aic jcc ${w}`.trim(),style:{background:c||"var(--primary)",...p,...T},...P,children:e?jsxRuntime.jsx(ot,{src:g,crossOrigin:r,referrerPolicy:l,...a}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});sn.displayName="Zuz.Avatar";var ol=sn;var rl=({size:t=5,type:s="dead",label:e="",variant:n=Z.Small,loading:o=false,spinner:r,...l})=>{let{style:m,className:f,rest:i}=N(l);return jsxRuntime.jsxs(u,{style:{...core._(e).isEmpty()?{"--badge-size":t}:{},...m},as:`--badge --${n} --${s} rel flex aic jcc ${f}`.trim(),children:[jsxRuntime.jsx(u,{fx:{transition:G.FadeIn,curve:U.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(ge,{type:r})}),core._(e).isEmpty()?jsxRuntime.jsx(u,{as:`--dot --${s}`}):jsxRuntime.jsx(H,{as:"--label",children:e})]})},nl=rl;var xl=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let t=new Date,s=t.getDay();return dateFns.addDays(t,(6-s)%7||6)},getDateFormat:()=>{let t=new Date,s=t.getDay();return dateFns.format(dateFns.addDays(t,(6-s)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],bl=t=>{let s=new Set;return t.filter(e=>{if(e.label=="Later")return true;let n=e.getDate().toISOString().split("T")[0];return s.has(n)?false:(s.add(n),true)})},ln=react.forwardRef((t,s)=>{let{defaultValue:e,variant:n,onChange:o,...r}=t,{style:l,className:m,rest:f}=N(r),[i,c]=react.useState(e||new Date),p=dateFns.startOfMonth(i),a=dateFns.endOfMonth(i),g=dateFns.startOfWeek(p),C=dateFns.endOfWeek(a),h=react.useMemo(()=>dateFns.eachDayOfInterval({start:g,end:C}),[g,C]),w=y=>{o?.(y),c(y);},T=()=>{c(y=>new Date(y.getFullYear(),y.getMonth()-1));},P=()=>{c(y=>new Date(y.getFullYear(),y.getMonth()+1));};return jsxRuntime.jsxs(u,{as:`--calendar flex --${n||"sm"} ${m}`,style:l,children:[jsxRuntime.jsx(u,{as:"--calendar-quick-select flex cols flex:1",children:bl(xl).map(y=>{let d=y.getDate();return jsxRuntime.jsxs($,{onClick:()=>w(d),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:y.label}),jsxRuntime.jsx(H,{as:"tar",children:y.getDateFormat()})]},`--dtp-option-label-${y.label}`)})}),jsxRuntime.jsxs(u,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(u,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(H,{as:"flex:1 --calendar-cm bold",children:dateFns.format(i,"MMMM yyyy")}),jsxRuntime.jsx($,{onClick:T,as:"--calendar-chevron",children:D.chevronUpOutline}),jsxRuntime.jsx($,{onClick:P,as:"--calendar-chevron",children:D.chevronDownOutline})]}),jsxRuntime.jsxs(u,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(y=>jsxRuntime.jsx(H,{as:"--calendar-day",children:y},`--calendar-hd-${y}`)),h.map((y,d)=>{let R=dateFns.isSameMonth(y,i),v=dateFns.isSameDay(y,i),S=dateFns.isToday(y);return jsxRuntime.jsx($,{disabled:!R,onClick:()=>w(y),as:["--calendar-day --calendar-dd",`${v?"--calendar-dd-selected":""}`,`${S?"--calendar-dd-current":""}`],children:dateFns.format(y,"d")},`--calendar-day-${d}-${y.getFullYear()}-${y.getMonth()}-${y.getDay()}`)})]})]})]})});ln.displayName="Zuz.Calendar";var uo=ln;var cn=(s=>(s.Line="line",s))(cn||{});var un=react.forwardRef((t,s)=>{let{data:e,width:n,height:o,lineColor:r,strokeWidth:l=2,gradientStartColor:m,gradientEndColor:f,animated:i,animDuration:c=2,animDelay:p=0,padding:a=0,type:g,...C}=t,{className:h,style:w,rest:T}=N(C),P=react.useRef(null),y=hooks.useResizeObserver(P.current?.parentElement||P),d=typeof n=="number"?n:y.width,R=typeof o=="number"?o:y.height,v={width:d,height:R},S=react.useId(),{pathD:I,areaPathD:k}=hooks.useLineChart(e,v,a+(l||2)),B=react.useRef(null),A=react.useRef(null),[E,z]=react.useState(0),[_,W]=react.useState(0);return react.useEffect(()=>{i&&(B.current&&z(B.current.getTotalLength()),A.current&&W(A.current.getTotalLength()));},[i,I,k,d,R]),jsxRuntime.jsx(u,{ref:P,as:`--chart --${g||"line"}-chart ${h}`.trim(),style:{...w,width:n,height:o},...T,children:d>0&&R>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${d} ${R}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:m}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:f})]})}),jsxRuntime.jsx("path",{ref:A,d:k,fill:`url(#${S})`,stroke:"none",style:i?{strokeDasharray:_,strokeDashoffset:_}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:_,to:"0",dur:`${c||2}s`,begin:`${p||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:B,d:I,fill:"none",stroke:r,strokeWidth:l,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:E,strokeDashoffset:E}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${c||2}s`,begin:`${p||0}s`,fill:"freeze"})})]})})});un.displayName="Zuz.Chart";var Pl=un;var fn=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(fn||{}),dn=(i=>(i.Image="img",i.Video="vid",i.Audio="audio",i.Link="link",i.Document="doc",i.Location="loc",i.Contact="contact",i.Event="event",i.Poll="poll",i))(dn||{});var gn=react.forwardRef((t,s)=>{let{text:e,media:n,side:o="me",status:r=1,timeStamp:l=Date.now(),arrow:m=true,...f}=t,{className:i,style:c,rest:p}=N(f);return jsxRuntime.jsx(u,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(u,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${m==true?"--b-arrow":""} ${i}`.trim(),style:{...c},...p,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),n?n.type=="audio"?jsxRuntime.jsxs(u,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(ee,{className:"--bm-action",children:D.play}),jsxRuntime.jsx(je,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsxRuntime.jsx(u,{as:"--bubble-image",children:jsxRuntime.jsx(ot,{src:n.source})}):null:null,jsxRuntime.jsxs(u,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(l)}),o=="me"&&jsxRuntime.jsx(ee,{className:`--bubble-status --bs-${r}`,children:r==0?D.pending:r==1?D.done:r==2?D.doneAll:D.doneAll})]})]})})});gn.displayName="Zuz.Bubble";var Nl=gn;var hn=react.forwardRef((t,s)=>{let{style:e,className:n,rest:o}=N(t);return jsxRuntime.jsx("label",{ref:s,style:e,className:n,...o})});hn.displayName="Zuz.Label";var nt=hn;var yn=react.forwardRef((t,s)=>{let{name:e,required:n,type:o,value:r,size:l,variant:m,checked:f,onSwitch:i,...c}=t,[p,a]=react.useState(f||false),g=react.useRef(null),{variant:C}=q(true);return react.useImperativeHandle(s,()=>({setChecked(h,w=true){a(h),g.current&&(g.current.checked=h),w&&i&&i(h,r||"cb");},toggle(h=true){g.current&&(g.current.checked=!p),h&&i&&i&&i(!p,r||"cb"),a(!p);}})),jsxRuntime.jsxs(nt,{className:`--${(o||we.Default).toLowerCase()} ${!o||o==we.Default?"--checkbox":"--switch"} --${m||C||Z.Small} flex aic jcc ${p?"is-checked":""} rel`.trim(),...c,children:[(!o||o==we.Default)&&D.check,jsxRuntime.jsx(oe,{ref:g,defaultChecked:p,value:r||"cb",type:"checkbox",className:"abs",name:e,required:n||false,onChange:h=>{i&&i(h.target.checked,r||"cb"),a(h.target.checked);}})]})});yn.displayName="Zuz.CheckBox";var st=yn;var Al=({ref:t,...s})=>{let{code:e,lang:n="tsx",showLines:o=false,highlight:r="",as:l,fx:m,...f}=s,i=react.useRef(null),{className:c,style:p,rest:a}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${l}`,fx:m},i),g=react.useMemo(()=>{let h=new Set;return r.split(",").forEach(w=>{if(w.includes("-")){let[T,P]=w.split("-").map(Number);for(let y=T;y<=P;y++)h.add(y);}else w&&h.add(Number(w));}),h},[r]),C=react.useMemo(()=>{let h=e.split(`
|
|
10
|
+
`);for(;h.length>0&&h[0].trim()==="";)h.shift();for(;h.length>0&&h[h.length-1].trim()==="";)h.pop();let w=h[0]?.match(/^\s*/)?.[0].length||0,T=h.map(y=>{let d=y.match(/^\s*/)?.[0].length||0,R=Math.min(d,w);return y.slice(R)}),P=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(<\/?[A-Z][\w\.]*|>)/g},{name:"var",re:/(?<!<\/|<)\b[A-Z]\w*\b/g},{name:"fn",re:/\b([a-z_]\w*)(?=\s*\()/gi},{name:"prop",re:/\.([a-z_]\w*)\b/gi},{name:"num",re:/\b\d+\b(?![#|A-Z|a-z|_|ZUZ])/g}];return T.map((y,d)=>{let R=y.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),v=g.has(d+1),S=[];P.forEach(I=>{R=R.replace(I.re,k=>{let B=`ZUZ_ID_${S.length}_ZUZ`;return S.push(`<span class="--token-${I.name}">${k}</span>`),B});});for(let I=S.length-1;I>=0;I--)R=R.replace(`ZUZ_ID_${I}_ZUZ`,S[I]);return `<div class="--code-line ${o==true?"--with-ln":""} ${v?"--is-highlighted":""}">
|
|
11
|
+
${o==true?`<span class="--line-number">${d+1}</span>`:""}
|
|
12
12
|
<span class="--line-content">${R||" "}</span>
|
|
13
|
-
</div>`}).join("")},[e,d]);return jsxRuntime.jsx(u,{as:`--code-block ${c}`,style:p,...f,children:jsxRuntime.jsx("pre",{ref:t,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:C}})})})},$l=Al;var bn=({onSelect:t,meta:s,selected:e})=>{let r=react.useRef(null),{index:o,icon:n,label:i}=s,[m,f]=react.useState({x:0,width:0}),l=hooks.useDelayed();return react.useLayoutEffect(()=>{if(l&&r.current){let{width:c,x:p}=r.current.getBoundingClientRect();f({x:p,width:c}),e&&t(o,c,p,s,true);}},[l,r.current]),react.useEffect(()=>{e&&t(o,m.width,m.x,s,false);},[e]),jsxRuntime.jsxs($,{onClick:()=>t(o,m.width,m.x,s,false),ref:r,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[n?typeof n=="string"?jsxRuntime.jsx(Y,{name:n,as:"--segment-icon"}):jsxRuntime.jsx(u,{as:"--segment-icon flex aic jcc",children:n}):null,i&&String(i).trim()!=""&&jsxRuntime.jsx(u,{className:"--segment-label",children:i||`Item ${o}`})]})};bn.displayName="SelectTabItem";var wn=bn;var Sn=react.forwardRef((t,s)=>{let{fx:e,items:r,selected:o,variant:n,onSwitch:i,...m}=t,[f,l]=react.useState(o||0),c=react.useRef(false),p=react.useRef(f),{className:a,style:d,rest:C}=N(m),h=react.useRef(null),v=react.useRef(null),{variant:T}=q(true),P=(y,g,R,w,S)=>{if((S||f!=y&&f!=-2)&&(l(y),p.current=f,c.current&&i?.(w)),h.current){let I=v.current?.getBoundingClientRect();h.current.style.setProperty("--w",`${g}px`),h.current.style.setProperty("--x",`${I?R-I.left:R}px`);}};return react.useImperativeHandle(s,()=>({setSelected:y=>{typeof y=="number"&&y!=f&&l(y);}}),[f]),react.useEffect(()=>{c.current=true;},[]),jsxRuntime.jsxs(u,{ref:v,"data-selected":f,className:`${a} --segmented --${n||T||Z.Medium} flex aic rel`,style:d,...C,children:[jsxRuntime.jsx(u,{ref:h,className:"--segment-tab abs"}),r.map((y,g)=>jsxRuntime.jsx(wn,{onSelect:P,selected:f==g,meta:{...y,index:g}},`segment-${y.label}-${g}`))]})});Sn.displayName="Zuz.SelectTabs";var at=Sn;var Pn=react.forwardRef((t,s)=>{let{type:e,...r}=t,o=hooks.useDelayed(),{colorScheme:n,setColorScheme:i}=Ut(),m=react.useCallback(()=>{i(n=="dark"?"light":n=="light"?"system":"dark");},[n]),{className:f,style:l}=N(r),c=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:D.colorSchemeLight},{tag:"system",index:1,label:"",icon:D.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:D.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:D.colorSchemeLight},{tag:"dark",index:2,label:"",icon:D.colorSchemeDark}],[]),p=react.useMemo(()=>["light","system","dark"].indexOf(n),[n]);return !o||p==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(at,{className:`--color-scheme --${e}`,onSwitch:({tag:a})=>{i(a);},selected:p,items:c,...r}):jsxRuntime.jsx($,{onClick:m,style:l,as:`--color-scheme-switch --${r.variant||Z.Small} ${f}`.trim(),children:n=="system"?D.colorSchemeSystem:n=="light"?D.colorSchemeLight:D.colorSchemeDark})});Pn.displayName="Zuz.ColorScheme";var ec=Pn;var In=react.forwardRef((t,s)=>{let[e,r]=react.useState("wait"),{title:o,message:n,acceptLabel:i,rejectLabel:m,position:f}=t,l=async c=>{r(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return react.useEffect(()=>{let c=localStorage.getItem("--ccnt");r(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(u,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:U.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${f||te.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:o||"This site uses cookies"}),jsxRuntime.jsx(H,{as:"--message",children:n||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(u,{as:"--footer flex aic",children:[jsxRuntime.jsx($,{onClick:c=>l(1),as:"--accept",children:i||"Accept All"}),jsxRuntime.jsx($,{onClick:c=>l(0),as:"--reject",children:m||"Cancel"})]})]})});In.displayName="Zuz.CookiesConsent";var nc=In;var Bn=react.forwardRef((t,s)=>{let {type:e,value:r,min:o,max:n,step:i,onChange:m,roundValue:f,...l}=t,{className:c,style:p,rest:a}=N(l),d=react.useRef(i||.01).current,C=react.useRef(o||0).current,h=react.useRef(n||1).current,v=react.useRef(r||0).current,T=react.useRef(null),P=react.useRef(null),y=react.useRef(null);react.useRef(null);let R=react.useRef(null),w=react.useRef(null),S=(V,K,O)=>(V-K)/(O-K)*100,I=V=>{if(P.current){let K=parseFloat(V.currentTarget.value),O=S(K,parseFloat(V.currentTarget.min),parseFloat(V.currentTarget.max));P.current.style.setProperty("--value",`${O}`),P.current.setAttribute("data-value",`${K}`),m&&m(f?+K.toFixed(2):K);}},[M,B]=react.useState(false),[A,E]=react.useState(0),[z,_]=react.useState(0),W=V=>{B(true),E(V.clientX),_(P.current?parseFloat(P.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},x=V=>{if(M){let K=V.clientX-A,O=Math.max(C,Math.min(z+K*d,h));P.current&&(P.current.setAttribute("data-value",`${O}`),w.current.textContent=f?O.toFixed(2):O.toString(),m&&m(f?+O.toFixed(2):O));}},k=()=>{B(false),document.body.style.cursor="auto";};return react.useEffect(()=>{P.current&&P.current.style.setProperty("--value",T.current?`${S(parseFloat(T.current.value),parseFloat(T.current.min),parseFloat(T.current.max))}`:v.toString());},[]),react.useEffect(()=>(M?(document.addEventListener("mousemove",x),document.addEventListener("mouseup",k)):(document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k)),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k);}),[M]),jsxRuntime.jsx(u,{ref:P,"data-value":v||0,className:`--slider --${e||ft.Default} flex rel ${c}`.trim(),style:{...p},children:ft.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(H,{ref:w,onMouseDown:W,className:"--slider-text",children:v||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(u,{ref:R,className:"--slider-track abs fill"}),jsxRuntime.jsx(u,{ref:y,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:T,onInput:I,className:"abs fill",tabIndex:0,type:e||ft.Default,defaultValue:v||0,step:d,max:h,min:C})]})})});Bn.displayName="Zuz.Slider";var wo=Bn;var kn=react.forwardRef((t,s)=>{let{src:e,shape:r,size:o,...n}=t,{style:i,className:m,rest:f}=N(n),{canvasRef:l,crop:c,setScale:p,handleMouseDown:a,handleMouseUp:d,handleMouseMove:C}=hooks.useImageCropper(e,o||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(s,()=>({getCropped(){return c()},setScale(h){p(h);}})),jsxRuntime.jsxs(u,{as:`--cropper --${r||hooks.CropShape.Circle} ${m}`,style:i,...f,children:[jsxRuntime.jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:a,onMouseUp:d,onMouseLeave:d,onMouseMove:C}),jsxRuntime.jsx(u,{as:"--cropper-slider",children:jsxRuntime.jsx(wo,{onChange:h=>p(h),min:0,max:1,step:.01,value:1})})]})});kn.displayName="Zuz.Cropper";var mc=kn;var uc=(e=>(e.Circle="circle",e.Square="square",e))(uc||{});var On=react.forwardRef((t,s)=>{let{items:e,maxItems:r}=t,o=react.useMemo(()=>{let m=typeof e=="string",f=m?[]:e;return m&&e.split(",").forEach(l=>{f.push({label:l});}),f},[e]),i=react.useMemo(()=>r&&r>0&&o.length>r-1,[o,r])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-r)]:o;return jsxRuntime.jsx(De,{ref:s,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(u,{as:"--crumb-chevron",children:D.chevronRightOutline}),items:i.map((m,f,l)=>m.ID=="."?jsxRuntime.jsx(u,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(u,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxRuntime.jsxs($,{onClick:()=>m.action?.(),className:"--crumb-item",disabled:!l[f+1],children:[m.icon&&jsxRuntime.jsx(Y,{as:"--crumb-icon",name:m.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:m.label})]},`${m.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});On.displayName="Zuz.Crumb";var dc=On;var Vn=react.forwardRef((t,s)=>{let{icon:e,defaultValue:r,value:o,size:n,variant:i,numeric:m,type:f,onConfirm:l,...c}=t,[p,a]=react.useState(false),[d,C]=react.useState(r||null),{style:h,className:v,rest:T}=N(c),P=react.useRef(null),y=react.useRef(null),{reposition:g}=et(y,{direction:te.Bottom,offset:2}),R=S=>{m&&(S.currentTarget.value=S.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let S=I=>{let M=I.target,B=P.current?.contains(M),A=y.current?.contains(M);!B&&!A&&a(false);};return p&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S);}},[p]),react.useEffect(()=>{let S=I=>{I.key==="Escape"&&p&&(a(false),P.current?.focus());};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p]);let w=()=>{a(true);};return react.useEffect(()=>{p&&g();},[p,g]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(u,{as:`--date-picker ${i?`--${i}`:""} rel flex aic ${v}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(Y,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(ee,{as:"--date-picker-icon flex aic jcc",children:D.calendar}),jsxRuntime.jsx("input",{ref:P,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${i?`--${i}`:""} flex`.trim(),style:h,onFocus:w,onInput:R,autoComplete:"new-password",onKeyDown:S=>{S.key=="Enter"&&l?.(S.currentTarget.value);},...T}),jsxRuntime.jsx(u,{"aria-hidden":!p,ref:y,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:p,duration:.05},as:`--date-picker-chooser flex aic ${i?`--${i}`:""}`,children:jsxRuntime.jsx(fo,{defaultValue:d,onChange:S=>{C(S),a(false);}})})]})})});Vn.displayName="Zuz.DatePicker";var xc=Vn;var An=react.forwardRef((t,s)=>{let{icon:e,variant:r,position:o}=t;return jsxRuntime.jsx($,{className:`--fab fixed --${r||Z.Large} --${o||"bottomright"}`,children:e||D.plus})});An.displayName="Zuz.Fab";var Sc=An;var $n=t=>{let{names:s,strength:e}=t,r={[dt.Gooey]:o=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${dt.Gooey}`)};return react.useEffect(()=>{},[s]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(s||[dt.Gooey]).map(o=>r[o](e))})})};$n.displayName="Zuz.Filters";var Pc=$n;var Ne=null,ce=null,_n=react.forwardRef((t,s)=>{let{title:e,message:r,transition:o,curve:n,speed:i,type:m,actionPosition:f,spinner:l,loadingMessage:c,onShow:p,onHide:a,...d}=t,{className:C,style:h,rest:v}=N(d),[T,P]=react.useState(e||""),[y,g]=react.useState(r||""),[R,w]=react.useState(null),[S,I]=react.useState(m||ue.Default),M=react.useMemo(()=>core.uuid(12),[]),[B,A]=react.useState(false),E=react.useRef(null),z=react.useRef(null),[_,W]=react.useState(false),[x,k]=react.useState(true),V=react.useRef(null),K=y;react.useImperativeHandle(s,()=>({setLoading(F){W(F);},showDialog(F,X,Q,j){Ne&&(clearTimeout(Ne),ce&&clearTimeout(ce),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ce=setTimeout(()=>{E.current.classList.remove("--wobble"),ce=null;},500)),I(ue.Dialog),X&&g(X),F&&P(F),Q&&w(Q.reduce((me,re)=>(me.push({...re,key:re.key||core.uuid(12)}),me),[])),A(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(F,X,Q,j){Ne&&(clearTimeout(Ne),ce&&clearTimeout(ce),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ce=setTimeout(()=>{E.current.classList.remove("--wobble"),ce=null;},500)),I(ue.Dialog),g(X),P(F),Q&&w(Q.reduce((me,re)=>(me.push({...re,key:re.key||core.uuid(12)}),me),[])),A(true),setTimeout(()=>j?j():()=>{},1e3);},error(F,X){this.show(F,X,ue.Error);},warn(F,X){this.show(F,X,ue.Warn);},success(F,X){this.show(F,X,ue.Success);},show(F,X,Q){Ne&&(clearTimeout(Ne),ce&&clearTimeout(ce),z.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${z.current} scale(.9)`.trim();},50),ce=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=z.current||"",ce=null;},500)),Ne=setTimeout(()=>{A(false),Ne=null,ce=null;},(X||4)*1e3),I(Q||ue.Default),g(F),A(true),p?.();},hide(){A(false),a?.();}}));let O=react.useMemo(()=>{let F={when:B,duration:i||.3,delay:.1};if(S==ue.Dialog){if(o){let{from:X,to:Q}=qe(o,20);return {from:X,to:Q,curve:n||U.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:U.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:U.Spring,...F}},[B,S]);return react.useEffect(()=>{V.current&&clearTimeout(V.current),B?k(true):V.current=setTimeout(()=>k(false),1e3);},[B]),S==ue.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ke,{when:B}),jsxRuntime.jsxs(u,{className:`--sheet --sheet-${S.toLowerCase()} ${B?"is-visible":""} ${C} fixed`.trim(),style:h,fx:O,...v,ref:E,children:[jsxRuntime.jsx(he,{when:_,spinner:l,message:c}),jsxRuntime.jsxs(u,{className:"--head flex aic rel",children:[jsxRuntime.jsx(u,{className:`--${T?"title":"dot"} flex aic rel`,children:T||""}),jsxRuntime.jsx($,{onClick:F=>A(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(u,{className:`--body flex aic rel ${R?"":"--no-action"}`.trim(),children:x?K:null}),R&&jsxRuntime.jsx(u,{className:`--footer flex aic rel ${f?f==$t.Center?"jcc":"":"jce"}`.trim(),children:R.map((F,X)=>jsxRuntime.jsx($,{onClick:Q=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${M}-action-${F.key}`))})]})]}):jsxRuntime.jsx(u,{className:`--sheet --sheet-${S.toLowerCase()} ${C} abs`.trim(),style:h,...v,fx:O,ref:E,children:B?y:null})}),lt=t=>typeof t=="object"&&t!=null&&"setLoading"in t&&"success"in t&&"error"in t;_n.displayName="Zuz.Sheet";var Bc=_n;var Fn=({ref:t,...s})=>{let{name:e,cover:r,spinner:o,errors:n,action:i,children:m,withData:f,beforeSubmit:l,onSubmit:c,onError:p,onSuccess:a,resetOnSuccess:d,...C}=s,{className:h,style:v,rest:T}=N(C),[P,y]=react.useState(false),g=react.useRef(null),R=react.useRef(null),w=react.useRef(null),S=ao(),I=react.useCallback(x=>g.current?g.current.querySelectorAll(x):[],[g.current]),M=x=>({name:x.name||x.getAttribute("name")||x.getAttribute("data-name"),required:x.required?true:x.getAttribute("data-required")?x.getAttribute("data-required")=="true":false,with:x.with||x.getAttribute("with")}),B=x=>{let k=[];return x.querySelectorAll(".--input").forEach(V=>{k.push(V.value);}),k.join("")},A=react.useCallback(x=>{let{required:V}=M(x);if(V){if(x.type=="checkbox"&&x.checked==false)return false;if(x.classList.contains("--otp")){let O=B(x);if(O==""||O.length<parseInt(x.getAttribute("data-size")))return false}if(x.classList.contains("--select")&&x.querySelector("button.--selected").dataset.value=="-1"||x.value=="")return false}if(x.getAttribute("with")){let O=x.getAttribute("with");switch(O.includes("@")&&(O=O.split("@")[0],O=="match"&&(O=Se.MatchField)),O.toUpperCase()){case Se.IPV4:return core._(x.value).isIPv4();case Se.IPV6:return core._(x.value).isIPv6();case Se.Email:return core._(x.value).isEmail();case Se.Uri:try{return new URL(x.value),!0}catch{return false}case Se.Password:return console.log("Add FORMVALIDATION.Password"),false;case Se.MatchField:let[F,X,Q]=x.getAttribute("with").split("@"),j=document.querySelector(`[name=${X.trim()}]`);if(!j)return false;switch(Q||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=x.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&x.classList.contains("--otp")&&B(j)!=B(x))return false;if(j&&j.value!=x.value)return false;break}break;default:return true}}return true},[g.current]),E=react.useCallback(()=>{let x={},k={},V=null,K=null;if(Array.from(I("[name]")).forEach(O=>{let{name:F,required:X,with:Q}=M(O),j=true;(X||Q)&&(j=A(O)),x[F]={valid:j,value:O.type=="checkbox"?O.checked==true?O.value:false:O.classList.contains("--otp")?B(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value},k[F]=O.type=="checkbox"?O.checked==true:O.classList.contains("--otp")?B(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value,j?O.classList.remove("input-with-error"):(V==null&&n&&(V=O,K=n[F]),O.classList.add("input-with-error"));}),V){let O=V;if(O.classList.contains("--otp"))for(let F of Array.from(O.querySelectorAll(".--input"))){let X=F;if(X.value==""){X.focus();break}}else O.focus();}return {error:V!=null,errorMsg:K||"Fix errors to continue...",data:x,payload:k}},[g.current]),z=react.useCallback(()=>{let{error:x,errorMsg:k,payload:V}=E();x?S.error(k):i?react.startTransition(async()=>{l&&l(V),lt(r)?r.setLoading(true):y(true),S.clearAll(),core.withPost(i,{...V,...f||{}}).then(K=>{let O=K;lt(r)?r.setLoading(false):y(false),d&&Array.from(I("[name]")).forEach(F=>{F instanceof HTMLInputElement&&(F.value="");}),a?a(O):(S.clearAll(),S.success(O.message||"Redirecting..."));}).catch(K=>{lt(r)?r.setLoading(false):y(false),p?p(K):S.error(K.message||"We cannot process your request at this time.");});}):c&&c(V);},[i,R.current,g.current]),_=react.useCallback(()=>{let x=I("[type=submit]");!x||x.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):x.forEach(k=>{k.addEventListener("click",z);});},[g.current]),W=react.useMemo(()=>react$1.addPropsToChildren(m,x=>x.props.type=="submit",x=>({ref:w})),[m]);return react.useImperativeHandle(t,()=>({setLoading(x){if(x){R.current?.hide();try{S.clearAll();}catch{}}y(x);},showError(x){typeof x=="string"?S.error(x):R.current.error(x,4);},hideError(){R.current.hide();try{S.clearAll();}catch{}},init(){_();},submit(){z();}})),react.useEffect(_,[]),jsxRuntime.jsxs(u,{ref:g,style:v,className:`--form flex rel ${h} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!lt(r)&&jsxRuntime.jsx(he,{message:r?r.message||void 0:"working",spinner:o,color:r&&"color"in r?r.color:"#ffffff",when:P}),W]})};Fn.displayName="Zuz.Form";var $c=Fn;var Zn=t=>{let {ref:s,cols:e,rows:r,gap:o,gapX:n,gapY:i,align:m,justify:f,inline:l,flow:c,autoCols:p,autoRows:a,template:d,...C}=t;react.useRef(null);let {className:v,style:T,rest:P}=N(C),y=R=>typeof R=="number"?`repeat(${R}, 1fr)`:R,g={display:l?"inline-grid":"grid",gridTemplateColumns:y(e),gridTemplateRows:y(r),gap:o,columnGap:n,rowGap:i,alignItems:m,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:c,gridAutoColumns:p,gridAutoRows:a,gridTemplateAreas:d,...T};return jsxRuntime.jsx(u,{ref:s,as:`--grid ${v}`.trim(),style:g,...P})};Zn.displayName="Zuz.Grid";var Zc=Zn;var Kn=t=>typeof t=="string"&&t.includes("+"),Wn={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},Un={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var qn=react.forwardRef(({children:t,keys:s,variant:e},r)=>{let o=react.useMemo(()=>{if(Kn(s)){let n=null;return {keys:String(s).split("+").reduce((m,f,l,c)=>(c[l+1]?m.push(f):n=f.toUpperCase(),m),[]),children:n}}return {keys:s,children:String(t).toUpperCase()}},[s]);return jsxRuntime.jsxs(u,{as:`--keyboard-keys --${e||Z.Small} flex aic`,children:[(Array.isArray(o.keys)?o.keys:[o.keys]).map(n=>jsxRuntime.jsx("abbr",{title:Un[n],children:Wn[n]},n)),jsxRuntime.jsx(ee,{children:o?.children??t})]})});qn.displayName="Zuz.KeyboardKeys";var Io=qn;var Yn=react.forwardRef((t,s)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:o,variant:n}=t;return jsxRuntime.jsxs(u,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:U.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${n||Z.Small} fixed flex`,children:[jsxRuntime.jsx(u,{className:"--ico",children:e?D[pe.Success]:D[pe.Error]}),jsxRuntime.jsx(H,{as:"--message",children:e?r||"internet connection restored :)":o||"no internet connection"})]})});Yn.displayName="Zuz.NetWorkManager";var Yc=Yn;var No=(e=>(e.Table="table",e.Gooey="gooey",e))(No||{});var jn=react.forwardRef((t,s)=>{let{itemCount:e,itemsPerPage:r,startPage:o,pageRange:n,paginationStyle:i,breakLabel:m,prevLabel:f,nextLabel:l,hash:c,loading:p,seperator:a,renderOnZeroPageCount:d,onPageChange:C,...h}=t,v=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),T=react.useCallback(E=>`${core.toHash(E,c||6,v)}${a||""}${v}`,[v]),P=react.useMemo(()=>m||"...",[m]),[y,g]=react.useState({id:c?o?typeof o=="number"?T(o):o:1:o||1,label:o||1}),{style:R,className:w,rest:S}=N(h),I=react.useCallback(E=>typeof E=="number"?E:+E.label,[]);if(!e)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(e/r),[e,r]),B=react.useMemo(()=>{let E=[],z=Math.max(I(y)-(n||2),1),_=Math.min(I(y)+(n||2),M);z>1&&E.push({id:c?T(1):1,label:1}),z>2&&E.push({id:-1,label:P});for(let W=z;W<=_;W++)E.push({id:c?T(W):W,label:W});return _<M-1&&E.push({id:-1,label:P}),_<M&&E.push({id:c?T(M):M,label:M}),E},[y]),A=react.useCallback(E=>{let z=E;+z.label<1||+z.label>M||(g(z),C?.(z));},[e,r,y]);return B.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(u,{ref:s,as:`--pagination --pgt-${i||"table"} flex aic w:100% jcc ${w}`,children:[jsxRuntime.jsx(u,{as:"flex flex:1 aic --pgt-btns",children:(B.length>1?B:[{id:1,label:1},{id:-1,label:P}]).map((E,z,_)=>jsxRuntime.jsx($,{disabled:E.id==-1||I(y)==+E.label,className:(typeof E=="string"?E:E.label)==I(y)?"--current-page":"",onClick:W=>A(E),children:typeof E=="string"?E:E.label},`--pg-${z}-${E.id}`))}),jsxRuntime.jsx(u,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(y)-1)*r+1} - `,`${Math.min(I(y)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(u,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx($,{disabled:I(y)<=1,onClick:E=>A({id:c?T(I(y)-1):I(y)-1,label:I(y)-1}),children:D.chevronLeftOutline}),jsxRuntime.jsx($,{disabled:B.length<=1||I(y)==I(B[B.length-1]),onClick:E=>A({id:c?T(I(y)+1):I(y)+1,label:I(y)+1}),children:D.chevronRightOutline})]})]})});jn.displayName="Zuz.Pagination";var Bo=jn;var ts=react.forwardRef((t,s)=>{let{strenthMeter:e,onChange:r,...o}=t;"type"in o&&delete o.type;let{style:n,className:i,rest:m}=N(o),[f,l]=react.useState(false),[c,p]=react.useState(""),a=react.useMemo(()=>core.checkPasswordStrength(c),[c]),d=hooks.useDebounce(C=>{e&&p(C.target.value),r&&r(C);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(u,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(u,{style:n,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:s,type:f?"text":"password",className:i,onChange:d,...m}),jsxRuntime.jsx($,{tabIndex:-1,onClick:()=>l(C=>!C),className:"--toggle flex aic jcc abs",children:f?D.eye:D.eyeSlash})]}),e&&jsxRuntime.jsxs(u,{as:`flex aic --password-meter --pb-score-${a.score}`,style:n,children:[jsxRuntime.jsxs(u,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(u,{as:`--pbar ${a.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:a.result})]})]})});ts.displayName="Zuz.Password";var am=ts;var rs=react.forwardRef((t,s)=>{let{size:e,length:r,mask:o,...n}=t,i=react.useRef([]),m="pinput",f=false,l={};"with"in n&&(l={with:n.with},delete n.with),"type"in n&&delete n.type,"name"in n&&(m=n.name,delete n.name),"required"in n&&(f=true,delete n.required);let{style:c}=N(n),p=a=>{let d=a.currentTarget,C=i.current[parseInt(d.dataset.index)+1],h=i.current[parseInt(d.dataset.index)-1];d.value.length===1&&C?C.focus():d.value.length===0&&h&&h.focus();};return react.useEffect(()=>{i.current=i.current.slice(0,e||r);},[e||r]),jsxRuntime.jsx(u,{name:m,style:c,className:"--otp flex aic rel","data-required":f,"data-size":e||r||4,...l,children:Array(e||r||4).fill(1).map((a,d)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":d,ref:C=>{i.current[d]=C;},numeric:true,onChange:p,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...n},`pin-${d}`))})});rs.displayName="Zuz.PinInput";var mm=rs;var ns=react.forwardRef((t,s)=>{let{children:e,className:r,name:o,required:n,type:i,value:m,variant:f,checked:l,onSwitch:c,...p}=t,[a,d]=react.useState(l||false),{variant:C}=q(true),h=react.useRef(null);return jsxRuntime.jsxs(nt,{className:`${r} --${(i||zt.Default).toLowerCase()} --radio${!i||i==zt.Default?"":"card"} --${f||C||Z.Small} flex aic rel`.trim(),...p,children:[jsxRuntime.jsx(oe,{ref:h,defaultChecked:a,value:m||"rd",type:"radio",className:"abs",name:o,required:n||false,onChange:v=>{c&&c(v.target.checked,m||"cb"),d(v.target.checked);}}),jsxRuntime.jsx(u,{className:"--dot rel",children:jsxRuntime.jsx(u,{className:"--rod abs abc"})}),jsxRuntime.jsx(u,{className:"--value",children:e})]})});ns.displayName="Zuz.Radio";var dm=ns;var ss=react.forwardRef((t,s)=>{let{fx:e,withStyle:r,as:o,reverse:n=false,searchIcon:i=D.search,hideSearchIcon:m=false,clearIcon:f=D.close,hideClearIcon:l=false,onChange:c,onClear:p,...a}=t,{style:d,className:C}=N({as:t.as}),[h,v]=react.useState(""),{variant:T}=q(true),P=react.useRef(null),y=react.useMemo(()=>jsxRuntime.jsx($,{tabIndex:-1,onClick:w=>R(),className:"--send flex aic jcc",variant:t.variant||Z.Small,children:h!==""?!l&&(typeof f=="string"?jsxRuntime.jsx(Y,{name:f,as:"--search-action"}):f):!m&&(typeof i=="string"?jsxRuntime.jsx(Y,{name:i,as:"--search-action"}):i)}),[n,i,l,f,m]);"type"in t&&delete t.type;let g=w=>{v(w.target.value),c?.(w.target.value);},R=w=>{h.trim()!==""&&(v(""),c?.(""),P.current&&(P.current.value="",t.onConfirm?.("")));};return react.useImperativeHandle(s,()=>({focus:()=>P.current?.focus(),value:()=>P.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(u,{style:d,className:`--search ${n?"--search-rev":""} --${t.variant||T||Z.Medium} flex aic ${typeof t.as=="string"&&t.as.includes("abs")?"":"rel"} ${C}`.trim(),children:[n&&y,jsxRuntime.jsx(oe,{ref:P,onChange:g,...a}),t.shortcut&&jsxRuntime.jsx(Io,{keys:t.shortcut,as:"abs"}),!n&&y]})});ss.displayName="Zuz.Search";var Sm=ss;var is=({value:t,updateValue:s,o:e})=>jsxRuntime.jsxs($,{onClick:r=>s(e),as:"--select-option-item",className:t&&(typeof e=="string"?e:e.value)==(typeof t=="string"?t:t.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(Y,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(H,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});is.displayName="Option";var ls=is;var ms=({ref:t,...s})=>{let{selected:e,options:r,label:o,name:n,variant:i,search:m,searchPlaceholder:f,maxHeight:l,arrowDownIcon:c=D.arrowDown,arrowUpIcon:p=D.arrowUp,expanded:a,onChange:d,...C}=s,[h,v]=react.useState(e?typeof e=="string"?r.find(x=>x.value===e):e:r[0]),[T,P]=react.useState(false),[y,g]=react.useState(null),R=react.useRef(null),w=react.useRef(null),S=react.useRef(null),I=react.useId(),M=react.useMemo(()=>n||I,[]),{reposition:B}=et(S,{direction:At.Bottom,offset:2}),{variant:A}=q(true),{className:E,style:z,rest:_}=N(C),W=x=>{v(x),P(false),d&&d(x);};return react.useImperativeHandle(t,()=>({setSelected:x=>{if(typeof x=="string"){let k=r.find(V=>V.value===x);k&&v(k);}else v(x);},getValue:()=>h||null})),react.useEffect(()=>{if(!T)return;let x=()=>{B();};return window.addEventListener("scroll",x,true),window.addEventListener("resize",B),()=>{window.removeEventListener("scroll",B,true),window.removeEventListener("resize",B);}},[T,B]),react.useEffect(()=>{if(!T){w.current&&(w.current.value=""),g(null);return}w.current?.focus(),B();let x=V=>{S.current&&!S.current.contains(V.target)&&P(false);},k=setTimeout(()=>{document.addEventListener("click",x);},0);return ()=>{clearTimeout(k),document.removeEventListener("click",x);}},[T,B]),jsxRuntime.jsxs(u,{className:`--select --${a==true?"expanded":""} --${i||A} ${n?`--${n}`:""} rel`.trim(),name:M,children:[jsxRuntime.jsxs($,{ref:R,"data-value":h?typeof h=="string"?h:h.value:h||"-1",className:`--selected flex aic rel ${E}`.trim(),withLabel:false,style:z,onClick:x=>{x.stopPropagation(),P(k=>!k);},..._,children:[jsxRuntime.jsx(H,{className:"--label",children:h?typeof h=="string"?h:h.label:o||"Choose"}),jsxRuntime.jsx(u,{className:"--svg-arrow rel flex aic jcc",children:T?typeof p=="string"?jsxRuntime.jsx(Y,{name:p,as:"--search-action"}):p:typeof c=="string"?jsxRuntime.jsx(Y,{name:c,as:"--search-action"}):c})]}),jsxRuntime.jsxs(u,{id:M,className:"--options-list flex cols abs","aria-hidden":!T,style:{maxHeight:l||"auto"},ref:S,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:T,duration:.05},children:[m&&jsxRuntime.jsx(u,{as:"--select-search --sticky",children:jsxRuntime.jsx(oe,{ref:w,onChange:x=>{g(x.target.value==""?null:x.target.value);},className:"--search-input",placeholder:f||"Search..."})}),(y==null?r:r.filter(x=>x.label.toLowerCase().includes(y.toLowerCase())||x.value.toLowerCase().includes(y.toLowerCase()))).map(x=>jsxRuntime.jsx(ls,{updateValue:W,value:h,o:x},`option-${(typeof x=="string"?x:x.label).replace(/\s+/g,"-")}-${typeof x=="string"?x:x.value}`))]})]})};ms.displayName="Zuz.Select";var Nm=ms;var ps=react.forwardRef((t,s)=>jsxRuntime.jsx(st,{type:ve.Switch,...t,ref:s}));ps.displayName="Zuz.Switch";var Bm=ps;var fs=t=>{let{idx:s,id:e,as:r,weight:o,style:n,value:i,render:m,resize:f,sortBy:l,sortable:c,onSort:p}=t,[a,d]=react.useState(0),C=()=>{c&&(p?.(String(e),a==1?-1:1),d(h=>h==1?-1:1));};return jsxRuntime.jsxs(u,{style:{flex:o||1,...n},as:`--col flex aic ${r||""} ${c?"--sortable":""}`,onClick:C,children:[jsxRuntime.jsx(u,{children:i}),s==-1&&c&&l==e&&jsxRuntime.jsx(u,{as:"--arrow flex aib",children:a==1?D.arrowUp:D.arrowDown})]})};fs.displayName="Zuz.Column";var Mt=fs;var gs=t=>{let{index:s,pubsub:e,schema:r,data:o,ids:n,styles:i,animate:m,sortBy:f,selectable:l,tableRef:c,loading:p,rowClassName:a,onSort:d,onRowClick:C,onSelect:h,onContextMenu:v}=t,T=hooks.useDelayed(),P=react.useMemo(()=>({transition:G.SlideInBottom,curve:U.EaseInOut,delay:.02*(s+1)}),[]),y=react.useRef(null),g=(w,S)=>{s==-1?e.emit(`ALL_ROWS_${w?"CHECKED":"UNCHECKED"}`,w):(h&&h(o,w),e.emit(`ROW_${w?"CHECKED":"UNCHECKED"}`,w,S));},R=(w,S,I)=>jsxRuntime.jsx(Mt,{idx:w,id:S,as:"--selector",pubsub:e,value:jsxRuntime.jsx(st,{value:I,ref:y,onSwitch:g,type:ve.Default})});return react.useEffect(()=>{let w=(B,A)=>{y.current?.setChecked(B,false);},S=(B,A)=>{let E=false;c?.current&&c.current.querySelectorAll(".--row").forEach(z=>{let _=z;if(!_.classList.contains("--row-head")){let W=_.querySelector(".--selector input[type=checkbox]");W&&W.checked&&!E&&(E=W.checked);}}),y.current.setChecked(E,false);},I=B=>{y.current?.setChecked(B,false),h&&h(o,B);},M=B=>{y.current?.setChecked(B,false),h&&h(o,B);};return s==-1?(e.on("ROW_CHECKED",w),e.on("ROW_UNCHECKED",S),()=>{e.off("ROW_CHECKED",w),e.off("ROW_UNCHECKED",S);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",M),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",M);})},[]),jsxRuntime.jsxs(u,{onContextMenu:w=>v?v(w,o):null,onClick:w=>C?C(w,t.data):()=>{},...m?{fx:{...P,when:T}}:{},as:`--row flex aic ${C?"--row-clickable":""} ${s==-1?"--row-head":""} ${a||""}`,children:[s==-1&&r.map((w,S)=>{let{renderWhenHeader:I,render:M,value:B,...A}=w;return jsxRuntime.jsxs(react.Fragment,{children:[l&&S==0&&R(-1,`--selector-${w.id}`,"all"),jsxRuntime.jsx(Mt,{idx:-1,onSort:d,sortBy:f,value:B,...A,pubsub:e,style:i[w.id]})]},`--col-${w.id}`)}),p&&s>-1&&jsxRuntime.jsx(u,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!p&&s>-1&&n&&o&&r.map((w,S)=>jsxRuntime.jsxs(react.Fragment,{children:[l&&S==0&&R(S,`--selector-${w.id}`,w.id.toString()),n.includes(String(w.id))?jsxRuntime.jsx(Mt,{pubsub:e,idx:S,id:String(w.id),style:i[String(w.id)],value:w.render?w.render(o,s):o[String(w.id).includes(".")?String(w.id).split(".").reverse()[0]:w.id]}):null]},`--${String(w.id)}-val-${S}`))]})};gs.displayName="Zuz.Row";var Ot=gs;var bs=(t,s)=>{let{schema:e,rows:r,rowCount:o,rowsPerPage:n,currentPage:i,pagination:m,paginationHash:f,showPaginationOnZeroPageCount:l,animateRows:c,header:p,rowClassName:a,selectableRows:d,hoverable:C,sortBy:h,loading:v,loadingRowCount:T,loadingMessage:P,spinner:y,emptyMessage:g,onSort:R,onRowClick:w,onRowSelectToggle:S,onPageChange:I,onRowContextMenu:M,...B}=t,A=react.useRef(null),E=react.useMemo(()=>e.reduce((se,J)=>(se[J.id]={flex:J.weight||1,...J.w&&{width:J.w},...J.maxW&&{maxWidth:J.maxW},...J.minW&&{minWidth:J.minW},...J.h&&{height:J.h},...J.maxH&&{maxHeight:J.maxH},...J.minH&&{minHeight:J.minH}},se),{}),[e]),z=react.useMemo(()=>Object.keys(E),[e]),_=react.useMemo(()=>p??true,[p]),{style:W,className:x,rest:k}=N(B),V=react.useRef(null),K=react.useMemo(()=>new core.PubSub,[]),O=react.useRef(r.map(()=>core.uuid(8))),[F,X]=react.useState(h||null),[Q,j]=react.useState(P||"loading"),me=react.useMemo(()=>!v&&r&&r.length==0,[v,r]),re=react.useCallback(()=>g?typeof g=="function"?jsxRuntime.jsx(g,{}):g:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[v,r]);react.useEffect(()=>{O.current=r.map(()=>core.uuid(8));},[r]);let be=(se,J)=>{X(se),R?.(se,J);},Le=(o||(r?r.length:0))/(n||10),we=react.useMemo(()=>l||Le>1?jsxRuntime.jsx(Bo,{hash:f,ref:A,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:i,itemCount:o||(r?r.length:0),itemsPerPage:n||10}):null,[i,o]);return react.useImperativeHandle(s,()=>({setLoading(se){}})),jsxRuntime.jsxs(u,{as:`--table ${C??true?"--hoverable":""} flex cols rel ${x}`,ref:V,children:[_==true&&jsxRuntime.jsx(Ot,{sortBy:F,onSort:be,tableRef:V,pubsub:K,selectable:d,index:-1,schema:e,loading:true,styles:E}),v&&jsxRuntime.jsxs(u,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:y||ne.Simple}),Q&&jsxRuntime.jsx(H,{as:"--table-loading-message",children:Q})]}),v&&Array(T||5).fill({}).map((se,J)=>jsxRuntime.jsx(Ot,{tableRef:V,index:J,pubsub:K,schema:e,styles:E,loading:true,animate:c,onRowClick:w},`--trow-loading-${J}-${e[0].id}`)),!v&&r&&r.map((se,J)=>jsxRuntime.jsx(Ot,{tableRef:V,pubsub:K,loading:false,index:J,schema:e,ids:z,styles:E,animate:c,data:se,onRowClick:w,rowClassName:a,selectable:d,onSelect:S,onContextMenu:M},`--trow-${O.current[J]||J}-${e[0].id}`)),me&&re(),jsxRuntime.jsx(u,{"aria-hidden":!m||!we,...c?{fx:{transition:G.SlideInBottom,curve:U.EaseInOut,delay:.02*(r.length+1),when:!v&&r&&m&&we!=null}}:{},as:"--row flex aic --row-footer",children:m&&we?we:null})]})};bs.displayName="Zuz.Table";var Zm=react.forwardRef(bs),Km=Zm;var Um=({ref:t,...s})=>{let{title:e,items:r}=s,[o,n]=react.useState(0),i=(m,f,l)=>{m.preventDefault(),n(f),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(u,{ref:t,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:e}),jsxRuntime.jsx(De,{items:r.map((m,f)=>jsxRuntime.jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>i(l,f,m.tag),href:`#${m.tag}`,children:m.label}))})]})},Gm=Um;var ws=({isActive:t,transitionType:s,speed:e,width:r,render:o,content:n,onHeightChange:i})=>{let m=react.useRef(null),f=hooks.useResizeObserver(m);react.useEffect(()=>{t&&f.height>0&&i(f.height);},[t,f.height]);let l=react.useMemo(()=>{let c={flexShrink:0,height:"fit-content"};return s==="fade"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,visibility:t?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:t?1:0}:s==="scale"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,transform:`scale(${t?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:t?1:0}:c},[t,s,r,e]);return jsxRuntime.jsx(u,{ref:m,style:{...l},className:"--content",children:o||t?n:null})};ws.displayName="Zuz.TabBody";var vs=ws;var Ts=({ref:t,...s})=>{let{tabs:e,speed:r=.3,prerender:o=true,variant:n,tabStyle:i="fixed",onChange:m,transitionType:f="slide",...l}=s,[c,p]=react.useState(0),a=react.useRef(null),d=hooks.useResizeObserver(a),C=react.useMemo(()=>core.uuid(8),[]),[h,v]=react.useState("auto"),T=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(t,()=>({setTab:S=>p(S)}));let P=react.useMemo(()=>e.map(S=>({...S,key:S.key||core.uuid(8)})),[e]),{style:y,className:g,rest:R}=N({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),w=()=>{if(!T)return {opacity:0};switch(f){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${c*d.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(u,{ref:a,style:y,className:`--tabview --${i} flex cols ${g}`,children:[jsxRuntime.jsx(at,{as:"--tabview-head",onSwitch:S=>{p(S.index);let I=P.find(M=>M.tag==S.tag);I&&I.onSelect&&(I.onSelect(I,S.index),m?.(I,S.index));},selected:c,items:P.reduce((S,I,M)=>(S.push({icon:I.icon,index:M,label:I.label,tag:I.tag}),S),[])}),jsxRuntime.jsx(u,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:h,transition:T?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:T?1:0},children:jsxRuntime.jsx(u,{className:"--track",style:{...w()},children:P.map((S,I)=>jsxRuntime.jsx(vs,{isActive:I===c,transitionType:f,speed:r,width:d.width,render:o||I===c,onHeightChange:M=>I===c&&v(M),content:S.body},`tab-body-${S.key||I}-${C}`))})})]})};Ts.displayName="Zuz.TabView";var rp=Ts;var ip=({ref:t,commands:s,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:n,...i})=>{let[m,f]=react.useState([{type:"output",content:r}]),[l,c]=react.useState(""),p=react.useRef(null),a=react.useRef(null),{variant:d}=q(true);react.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight);},[m]);let C=g=>{let R=typeof g=="string"?{type:"output",content:g}:g;f(w=>{let S=[...w,R];return S.length>1e3?S.slice(-1e3):S});},h=()=>f([]);react.useImperativeHandle(t,()=>({write:C,clear:h}));let v=async g=>{let[R,...w]=g.split(" "),S=R.toLowerCase();return s&&s[S]?await s[S](w):e?await e(g):`command not found: ${R}`},T=g=>{let R=/\u001b\[(\d+)m/g,w=[],S={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,M="#d4d4d4",B=false,A;for(;(A=R.exec(g))!==null;){let z=g.slice(I,A.index);z&&w.push({text:z,color:M,bold:B});let _=A[1];_==="0"?(M="#d4d4d4",B=false):_==="1"?B=true:S[_]&&(M=S[_]),I=R.lastIndex;}let E=g.slice(I);return E&&w.push({text:E,color:M,bold:B}),w},P=(g,R)=>g.includes("\x1B")?T(g).map((w,S)=>jsxRuntime.jsx(ee,{style:{color:w.color||"#d4d4d4",fontWeight:w.bold?"bold":"normal"},children:w.text},`--terminal-msg-${S}-${w.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(ee,{style:{color:R==="error"?"#ff5f56":R==="command"?"#00ff00":"#d4d4d4"},children:g}),y=async g=>{if(g.key==="Enter"&&l.trim()){let R=l.trim(),w=[...m,{type:"command",content:`${o}${R}`}];c(""),f(w);let S=await v(R);f(I=>[...I,{type:"output",content:S}]);}};return jsxRuntime.jsxs(u,{as:`--zuz-terminal --${n||d||Z.Medium} flex cols ${i.className}`,onClick:()=>a.current?.focus(),children:[jsxRuntime.jsx(u,{ref:p,className:"--terminal-log",children:m.map((g,R)=>jsxRuntime.jsx(u,{children:jsxRuntime.jsx(H,{children:P(g.content,g.type)})},R))}),jsxRuntime.jsxs(u,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(oe,{ref:a,className:"--zuz-term-input",autoFocus:true,value:l,variant:n||d||Z.Medium,onChange:g=>c(g.target.value),onKeyDown:y})]})]})},lp=ip;var cp=({meta:t})=>jsxRuntime.jsxs($,{as:"flex aic --command-item",children:[t.icon&&jsxRuntime.jsx(Y,{name:t.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:t.label})]}),mp=({position:t,onSelect:s,commands:e,visible:r})=>jsxRuntime.jsx(u,{"aria-hidden":!r,fx:{transition:G.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...t},children:e.map(o=>jsxRuntime.jsx(cp,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Ns=mp;var Ls=react.forwardRef((t,s)=>{let{autoResize:e,maxHeight:r,variant:o,resize:n="none",command:i,commands:m,onInput:f,cmd:l,renderDropdown:c,value:p,defaultValue:a,...d}=t,C=react.useRef(null),h=react.useRef(null),{variant:v}=q(true),{style:T,className:P,rest:y}=N(d),{showDropdown:g,dropdownPosition:R,handleKeyDown:w,handleInput:S,handleCommandSelect:I}=hooks.useCommandActions({command:i,commands:m,cmd:l,ref:C}),M=react.useCallback(()=>{let A=C.current;!A||!e||(h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>{A.style.height="auto";let E=A.scrollHeight;if(r){let z=parseInt(r.toString(),10);isNaN(z)||(E=Math.min(E,z));}A.style.height=`${E}px`,A.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),B=A=>{f?.(A),S(A),M();};return react.useEffect(()=>{M();},[p,a,M]),react.useEffect(()=>{e&&C.current&&M();},[e,M]),react.useEffect(()=>()=>{h.current&&cancelAnimationFrame(h.current);},[]),jsxRuntime.jsxs(u,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${o||v||Z.Medium} flex ${P}`.trim(),style:{...T,resize:n,height:e?"auto":T?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:w,onInput:B,ref:A=>{typeof s=="function"?s(A):s&&(s.current=A),C.current=A;},value:p,defaultValue:a,...y}),c?c({show:g,position:R,commands:m||[],onSelect:I}):m&&m.length>0&&jsxRuntime.jsx(Ns,{visible:g,commands:m,onSelect:I,position:R})]})});Ls.displayName="Zuz.TextArea";var gp=Ls;var Ms=react.forwardRef((t,s)=>{let{as:e,value:r,color:o,direction:n,...i}=t,m=react.useRef(null),[f,l]=react.useState(r||0);return react.useImperativeHandle(s,()=>({updateValue(c){f.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),m.current){let p=c.toString().split("");m.current.querySelectorAll(".--wheel-char").forEach((a,d)=>{let C=p[d];if(a instanceof HTMLElement){a.setAttribute("data-value",C);let h=a.querySelector(".--wheel-char-track");h instanceof HTMLElement&&(h.style.setProperty("--v",C),h.offsetWidth);}});}}})),react.useEffect(()=>{l(r||0);},[r]),jsxRuntime.jsxs(u,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:m,...i,children:[(f||0).toString().split("").map((c,p)=>isNaN(parseInt(c,10))?jsxRuntime.jsx(ee,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${p}`):jsxRuntime.jsx(ee,{"data-value":c,className:`--wheel-char grid ${p>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(ee,{className:`--wheel-char-track --wheel-track-${n||"down"} grid`,style:{"--v":c},children:[jsxRuntime.jsx(ee,{children:!n||n==="down"?0:9}),(!n||n==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((a,d)=>jsxRuntime.jsx(ee,{children:a},`${p}--${d}`)),jsxRuntime.jsx(ee,{children:!n||n==="down"?9:0})]})},`wheel-char-${p}`)),o&&jsxRuntime.jsx(u,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Ms.displayName="Zuz.TextWheel";var Sp=Ms;var Vs=react.forwardRef((t,s)=>{let{title:e,position:r,margin:o,children:n,...i}=t,{style:m,className:f,rest:l}=N(i),[c,p]=react.useState(false),a=react.useMemo(()=>r||te.Top,[]),d=react.useRef(null),C=react.useRef(null),h=y=>{},v=typeof ResizeObserver<"u"?new ResizeObserver(h):{observe:()=>{},unobserve:()=>{}},T=hooks.useDimensions(),P=react.useMemo(()=>{if(!C.current)return {left:0,top:0};let y=C.current.previousElementSibling;if(y){let g=y.getBoundingClientRect();switch(v.observe(y),a){case te.Top:return {left:g.left+g.width/2,top:g.top-(o||25)};case te.Bottom:return {left:g.left+g.width/2,top:g.top+(o||25)};case te.Left:return {left:g.left-g.width/2,top:g.top+g.height/2};case te.Right:return {left:g.right,top:g.top+g.height/2};default:return {left:0,top:0}}}},[C.current,T,v]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(u,{ref:d,className:"--with-tooltip rel",onMouseEnter:y=>p(true),onMouseLeave:y=>p(false),children:[n,jsxRuntime.jsx(u,{ref:C,style:{left:P?.left+"px",top:P?.top+"px"},className:`--tooltip --${r||te.Top} fixed ${f}`.trim(),fx:{from:a==te.Bottom||a==te.Top?{opacity:0,x:"-50%",y:a==te.Top?-5:5}:{opacity:0,y:"-50%",x:a==te.Right?15:-25},to:a==te.Bottom||a==te.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:a==te.Right?10:-20},curve:U.EaseInOut,when:c},children:jsxRuntime.jsx(H,{className:"--text rel",children:e})})]})});Vs.displayName="Zuz.ToolTip";var Ip=Vs;var zo=react.forwardRef((t,s)=>{let{as:e,meta:r,nodes:o,icons:n,onSelect:i,treeTag:m,selected:f,roots:l,expanded:c,...p}=t,{tag:a,label:d,icon:C,under:h,isHead:v}=r,T=react.useMemo(()=>l.includes(a),[l]),[P,y]=react.useState(c),g=()=>{localStorage.setItem(`--tn${m}-${a}`,P?"0":"1"),y(!P);};react.useEffect(()=>{c||T&&!localStorage.getItem(`--tn${m}-${a}`)?(localStorage.setItem(`--tn${m}-${a}`,"1"),y(true)):y(localStorage.getItem(`--tn${m}-${a}`)=="1");},[]);let R=react.useMemo(()=>o.filter(w=>w.under==a),[o,a]);return jsxRuntime.jsxs(u,{className:`--treenode ${T?"--is-root":""} --treenode-${a} flex cols`,children:[jsxRuntime.jsxs(u,{className:`--node --node-${a} flex aic ${f==a?" --selected":""}`,children:[jsxRuntime.jsx($,{skeleton:p.skeleton,onClick:g,className:"--node-aro-btn",disabled:R.length==0,children:n?.arrowClose&&n?.arrowOpen?jsxRuntime.jsx(Y,{skeleton:p.skeleton,className:"--node-aro-icon",name:R.length==0?n?.arrowDisabled||n?.arrowClose:P?n?.arrowOpen:n?.arrowClose}):R.length==0?D.chevronBottom:P?D.chevronBottom:D.chevronRight}),jsxRuntime.jsxs($,{className:"--node-meta flex aic",onClick:w=>i(a),children:[(n?.nodeOpen&&n?.nodeClose||T&&n?.rootOpen&&n?.rootClose)&&jsxRuntime.jsx(Y,{skeleton:p.skeleton,className:`--node-icon ${T?"--icon-root":""}`,name:C||(P?T&&n?.rootOpen||n.nodeOpen:T&&n?.rootClose||n?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${T?"--node-label-root":""}`.trim(),skeleton:p.skeleton,children:d})]})]}),P&&R.length>0&&jsxRuntime.jsx(u,{className:`--sub-node tree-sub-node-${a} flex cols`,children:R.map(w=>jsxRuntime.jsx(zo,{treeTag:m,selected:f,onSelect:i,icons:n,roots:l,expanded:w.expanded||false,meta:w,nodes:o},`--node-${w.tag}`))})]})});zo.displayName="TreeItem";var $s=zo;var _s=react.forwardRef((t,s)=>{let{as:e,nodes:r,onNodeSelect:o,tag:n,icons:i,roots:m,selected:f,...l}=t,[c,p]=react.useState(f);react.useImperativeHandle(s,()=>({getSelected:()=>c}),[o]);let a=d=>{p(d),o&&o(d);};return react.useEffect(()=>{c!=f&&p(f);},[f]),jsxRuntime.jsx(u,{className:"--treeview flex cols",children:r.filter(d=>m.includes(d.tag)).map(d=>jsxRuntime.jsx($s,{treeTag:n?`-${n}`:"",selected:c,onSelect:C=>a(C),icons:i,meta:d,roots:m,expanded:d.expanded||false,skeleton:l.skeleton,nodes:r},`--node-${d.tag}`))})});_s.displayName="Zuz.TreeView";var Hp=_s;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
-
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return
|
|
13
|
+
</div>`}).join("")},[e,g]);return jsxRuntime.jsx(u,{as:`--code-block ${c}`,style:p,...f,children:jsxRuntime.jsx("pre",{ref:t,children:jsxRuntime.jsx("code",{className:`--code --lang-${n}`,dangerouslySetInnerHTML:{__html:C}})})})},$l=Al;var bn=({onSelect:t,meta:s,selected:e,disabled:n=false})=>{let o=react.useRef(null),{index:r,icon:l,label:m}=s,[f,i]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.useLayoutEffect(()=>{if(c&&o.current){let{width:p,x:a}=o.current.getBoundingClientRect();i({x:a,width:p}),e&&t(r,p,a,s,true);}},[c,o.current]),react.useEffect(()=>{e&&t(r,f.width,f.x,s,false);},[e]),jsxRuntime.jsxs($,{disabled:n,onClick:()=>t(r,f.width,f.x,s,false),ref:o,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[l?typeof l=="string"?jsxRuntime.jsx(Y,{name:l,as:"--segment-icon"}):jsxRuntime.jsx(u,{as:"--segment-icon flex aic jcc",children:l}):null,m&&String(m).trim()!=""&&jsxRuntime.jsx(u,{className:"--segment-label",children:m||`Item ${r}`})]})};bn.displayName="SelectTabItem";var vn=bn;var Sn=react.forwardRef((t,s)=>{let{fx:e,items:n,selected:o,variant:r,disabled:l=false,onSwitch:m,...f}=t,[i,c]=react.useState(o||0),p=hooks.useDelayed(50),a=react.useRef(i),{className:g,style:C,rest:h}=N(f),w=react.useRef(null),T=react.useRef(null),{variant:P}=q(true),y=(d,R,v,S,I)=>{if((I||i!=d&&i!=-2)&&(c(d),a.current=i,queueMicrotask(()=>{p&&m?.(S);})),w.current){let k=T.current?.getBoundingClientRect();w.current.style.setProperty("--w",`${R}px`),w.current.style.setProperty("--x",`${k?v-k.left:v}px`);}};return react.useImperativeHandle(s,()=>({setSelected:d=>{typeof d=="number"&&d!=i&&c(d);}}),[i]),jsxRuntime.jsxs(u,{ref:T,"data-selected":i,className:`${g} --segmented --${r||P||Z.Medium} flex aic rel`,style:C,...h,children:[jsxRuntime.jsx(u,{ref:w,className:`--segment-tab --${l?"disabled":"abled"} abs`}),n.map((d,R)=>jsxRuntime.jsx(vn,{disabled:l,onSelect:y,selected:i==R,meta:{...d,index:R}},`segment-${d.label}-${R}`))]})});Sn.displayName="Zuz.SelectTabs";var at=Sn;var Pn=react.forwardRef((t,s)=>{let{type:e,...n}=t,o=hooks.useDelayed(),{colorScheme:r,setColorScheme:l}=Wt(),m=react.useCallback(()=>{l(r=="dark"?"light":r=="light"?"system":"dark");},[r]),{className:f,style:i}=N(n),c=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:D.colorSchemeLight},{tag:"system",index:1,label:"",icon:D.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:D.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:D.colorSchemeLight},{tag:"dark",index:2,label:"",icon:D.colorSchemeDark}],[]),p=react.useMemo(()=>["light","system","dark"].indexOf(r),[r]);return !o||p==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(at,{className:`--color-scheme --${e}`,onSwitch:({tag:a})=>{l(a);},selected:p,items:c,...n}):jsxRuntime.jsx($,{onClick:m,style:i,as:`--color-scheme-switch --${n.variant||Z.Small} ${f}`.trim(),children:r=="system"?D.colorSchemeSystem:r=="light"?D.colorSchemeLight:D.colorSchemeDark})});Pn.displayName="Zuz.ColorScheme";var ec=Pn;var In=react.forwardRef((t,s)=>{let[e,n]=react.useState("wait"),{title:o,message:r,acceptLabel:l,rejectLabel:m,position:f}=t,i=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return react.useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(u,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:U.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${f||te.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:o||"This site uses cookies"}),jsxRuntime.jsx(H,{as:"--message",children:r||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(u,{as:"--footer flex aic",children:[jsxRuntime.jsx($,{onClick:c=>i(1),as:"--accept",children:l||"Accept All"}),jsxRuntime.jsx($,{onClick:c=>i(0),as:"--reject",children:m||"Cancel"})]})]})});In.displayName="Zuz.CookiesConsent";var nc=In;var Bn=react.forwardRef((t,s)=>{let {type:e,value:n,min:o,max:r,step:l,onChange:m,roundValue:f,...i}=t,{className:c,style:p,rest:a}=N(i),g=react.useRef(l||.01).current,C=react.useRef(o||0).current,h=react.useRef(r||1).current,w=react.useRef(n||0).current,T=react.useRef(null),P=react.useRef(null),y=react.useRef(null);react.useRef(null);let R=react.useRef(null),v=react.useRef(null),S=(V,K,O)=>(V-K)/(O-K)*100,I=V=>{if(P.current){let K=parseFloat(V.currentTarget.value),O=S(K,parseFloat(V.currentTarget.min),parseFloat(V.currentTarget.max));P.current.style.setProperty("--value",`${O}`),P.current.setAttribute("data-value",`${K}`),m&&m(f?+K.toFixed(2):K);}},[k,B]=react.useState(false),[A,E]=react.useState(0),[z,_]=react.useState(0),W=V=>{B(true),E(V.clientX),_(P.current?parseFloat(P.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},x=V=>{if(k){let K=V.clientX-A,O=Math.max(C,Math.min(z+K*g,h));P.current&&(P.current.setAttribute("data-value",`${O}`),v.current.textContent=f?O.toFixed(2):O.toString(),m&&m(f?+O.toFixed(2):O));}},M=()=>{B(false),document.body.style.cursor="auto";};return react.useEffect(()=>{P.current&&P.current.style.setProperty("--value",T.current?`${S(parseFloat(T.current.value),parseFloat(T.current.min),parseFloat(T.current.max))}`:w.toString());},[]),react.useEffect(()=>(k?(document.addEventListener("mousemove",x),document.addEventListener("mouseup",M)):(document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",M)),()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",M);}),[k]),jsxRuntime.jsx(u,{ref:P,"data-value":w||0,className:`--slider --${e||ft.Default} flex rel ${c}`.trim(),style:{...p},children:ft.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(H,{ref:v,onMouseDown:W,className:"--slider-text",children:w||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(u,{ref:R,className:"--slider-track abs fill"}),jsxRuntime.jsx(u,{ref:y,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:T,onInput:I,className:"abs fill",tabIndex:0,type:e||ft.Default,defaultValue:w||0,step:g,max:h,min:C})]})})});Bn.displayName="Zuz.Slider";var vo=Bn;var kn=react.forwardRef((t,s)=>{let{src:e,shape:n,size:o,...r}=t,{style:l,className:m,rest:f}=N(r),{canvasRef:i,crop:c,setScale:p,handleMouseDown:a,handleMouseUp:g,handleMouseMove:C}=hooks.useImageCropper(e,o||200,n||hooks.CropShape.Circle);return react.useImperativeHandle(s,()=>({getCropped(){return c()},setScale(h){p(h);}})),jsxRuntime.jsxs(u,{as:`--cropper --${n||hooks.CropShape.Circle} ${m}`,style:l,...f,children:[jsxRuntime.jsx("canvas",{ref:i,width:o||200,height:o||200,onMouseDown:a,onMouseUp:g,onMouseLeave:g,onMouseMove:C}),jsxRuntime.jsx(u,{as:"--cropper-slider",children:jsxRuntime.jsx(vo,{onChange:h=>p(h),min:0,max:1,step:.01,value:1})})]})});kn.displayName="Zuz.Cropper";var mc=kn;var uc=(e=>(e.Circle="circle",e.Square="square",e))(uc||{});var On=react.forwardRef((t,s)=>{let{items:e,maxItems:n}=t,o=react.useMemo(()=>{let m=typeof e=="string",f=m?[]:e;return m&&e.split(",").forEach(i=>{f.push({label:i});}),f},[e]),l=react.useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsxRuntime.jsx(De,{ref:s,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(u,{as:"--crumb-chevron",children:D.chevronRightOutline}),items:l.map((m,f,i)=>m.ID=="."?jsxRuntime.jsx(u,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(u,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxRuntime.jsxs($,{onClick:()=>m.action?.(),className:"--crumb-item",disabled:!i[f+1],children:[m.icon&&jsxRuntime.jsx(Y,{as:"--crumb-icon",name:m.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:m.label})]},`${m.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});On.displayName="Zuz.Crumb";var dc=On;var Vn=react.forwardRef((t,s)=>{let{icon:e,defaultValue:n,value:o,size:r,variant:l,numeric:m,type:f,onConfirm:i,...c}=t,[p,a]=react.useState(false),[g,C]=react.useState(n||null),{style:h,className:w,rest:T}=N(c),P=react.useRef(null),y=react.useRef(null),{reposition:d}=et(y,{direction:te.Bottom,offset:2}),R=S=>{m&&(S.currentTarget.value=S.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let S=I=>{let k=I.target,B=P.current?.contains(k),A=y.current?.contains(k);!B&&!A&&a(false);};return p&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S);}},[p]),react.useEffect(()=>{let S=I=>{I.key==="Escape"&&p&&(a(false),P.current?.focus());};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[p]);let v=()=>{a(true);};return react.useEffect(()=>{p&&d();},[p,d]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(u,{as:`--date-picker ${l?`--${l}`:""} rel flex aic ${w}`,"data-value":g?g.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(Y,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(ee,{as:"--date-picker-icon flex aic jcc",children:D.calendar}),jsxRuntime.jsx("input",{ref:P,value:g?dateFns.format(g,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${l?`--${l}`:""} flex`.trim(),style:h,onFocus:v,onInput:R,autoComplete:"new-password",onKeyDown:S=>{S.key=="Enter"&&i?.(S.currentTarget.value);},...T}),jsxRuntime.jsx(u,{"aria-hidden":!p,ref:y,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:p,duration:.05},as:`--date-picker-chooser flex aic ${l?`--${l}`:""}`,children:jsxRuntime.jsx(uo,{defaultValue:g,onChange:S=>{C(S),a(false);}})})]})})});Vn.displayName="Zuz.DatePicker";var xc=Vn;var An=react.forwardRef((t,s)=>{let{icon:e,variant:n,position:o}=t;return jsxRuntime.jsx($,{className:`--fab fixed --${n||Z.Large} --${o||"bottomright"}`,children:e||D.plus})});An.displayName="Zuz.Fab";var Sc=An;var $n=t=>{let{names:s,strength:e}=t,n={[dt.Gooey]:o=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${dt.Gooey}`)};return react.useEffect(()=>{},[s]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(s||[dt.Gooey]).map(o=>n[o](e))})})};$n.displayName="Zuz.Filters";var Pc=$n;var Ne=null,ce=null,_n=react.forwardRef((t,s)=>{let{title:e,message:n,transition:o,curve:r,speed:l,type:m,actionPosition:f,spinner:i,loadingMessage:c,onShow:p,onHide:a,...g}=t,{className:C,style:h,rest:w}=N(g),[T,P]=react.useState(e||""),[y,d]=react.useState(n||""),[R,v]=react.useState(null),[S,I]=react.useState(m||ue.Default),k=react.useMemo(()=>core.uuid(12),[]),[B,A]=react.useState(false),E=react.useRef(null),z=react.useRef(null),[_,W]=react.useState(false),[x,M]=react.useState(true),V=react.useRef(null),K=y;react.useImperativeHandle(s,()=>({setLoading(F){W(F);},showDialog(F,X,Q,j){Ne&&(clearTimeout(Ne),ce&&clearTimeout(ce),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ce=setTimeout(()=>{E.current.classList.remove("--wobble"),ce=null;},500)),I(ue.Dialog),X&&d(X),F&&P(F),Q&&v(Q.reduce((me,re)=>(me.push({...re,key:re.key||core.uuid(12)}),me),[])),A(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(F,X,Q,j){Ne&&(clearTimeout(Ne),ce&&clearTimeout(ce),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ce=setTimeout(()=>{E.current.classList.remove("--wobble"),ce=null;},500)),I(ue.Dialog),d(X),P(F),Q&&v(Q.reduce((me,re)=>(me.push({...re,key:re.key||core.uuid(12)}),me),[])),A(true),setTimeout(()=>j?j():()=>{},1e3);},error(F,X){this.show(F,X,ue.Error);},warn(F,X){this.show(F,X,ue.Warn);},success(F,X){this.show(F,X,ue.Success);},show(F,X,Q){Ne&&(clearTimeout(Ne),ce&&clearTimeout(ce),z.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${z.current} scale(.9)`.trim();},50),ce=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=z.current||"",ce=null;},500)),Ne=setTimeout(()=>{A(false),Ne=null,ce=null;},(X||4)*1e3),I(Q||ue.Default),d(F),A(true),p?.();},hide(){A(false),a?.();}}));let O=react.useMemo(()=>{let F={when:B,duration:l||.3,delay:.1};if(S==ue.Dialog){if(o){let{from:X,to:Q}=qe(o,20);return {from:X,to:Q,curve:r||U.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:U.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:U.Spring,...F}},[B,S]);return react.useEffect(()=>{V.current&&clearTimeout(V.current),B?M(true):V.current=setTimeout(()=>M(false),1e3);},[B]),S==ue.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(ke,{when:B}),jsxRuntime.jsxs(u,{className:`--sheet --sheet-${S.toLowerCase()} ${B?"is-visible":""} ${C} fixed`.trim(),style:h,fx:O,...w,ref:E,children:[jsxRuntime.jsx(he,{when:_,spinner:i,message:c}),jsxRuntime.jsxs(u,{className:"--head flex aic rel",children:[jsxRuntime.jsx(u,{className:`--${T?"title":"dot"} flex aic rel`,children:T||""}),jsxRuntime.jsx($,{onClick:F=>A(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(u,{className:`--body flex aic rel ${R?"":"--no-action"}`.trim(),children:x?K:null}),R&&jsxRuntime.jsx(u,{className:`--footer flex aic rel ${f?f==At.Center?"jcc":"":"jce"}`.trim(),children:R.map((F,X)=>jsxRuntime.jsx($,{onClick:Q=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${k}-action-${F.key}`))})]})]}):jsxRuntime.jsx(u,{className:`--sheet --sheet-${S.toLowerCase()} ${C} abs`.trim(),style:h,...w,fx:O,ref:E,children:B?y:null})}),lt=t=>typeof t=="object"&&t!=null&&"setLoading"in t&&"success"in t&&"error"in t;_n.displayName="Zuz.Sheet";var Bc=_n;var Fn=({ref:t,...s})=>{let{name:e,cover:n,spinner:o,errors:r,action:l,children:m,withData:f,beforeSubmit:i,onSubmit:c,onError:p,onSuccess:a,resetOnSuccess:g,...C}=s,{className:h,style:w,rest:T}=N(C),[P,y]=react.useState(false),d=react.useRef(null),R=react.useRef(null),v=react.useRef(null),S=so(),I=react.useCallback(x=>d.current?d.current.querySelectorAll(x):[],[d.current]),k=x=>({name:x.name||x.getAttribute("name")||x.getAttribute("data-name"),required:x.required?true:x.getAttribute("data-required")?x.getAttribute("data-required")=="true":false,with:x.with||x.getAttribute("with")}),B=x=>{let M=[];return x.querySelectorAll(".--input").forEach(V=>{M.push(V.value);}),M.join("")},A=react.useCallback(x=>{let{required:V}=k(x);if(V){if(x.type=="checkbox"&&x.checked==false)return false;if(x.classList.contains("--otp")){let O=B(x);if(O==""||O.length<parseInt(x.getAttribute("data-size")))return false}if(x.classList.contains("--select")&&x.querySelector("button.--selected").dataset.value=="-1"||x.value=="")return false}if(x.getAttribute("with")){let O=x.getAttribute("with");switch(O.includes("@")&&(O=O.split("@")[0],O=="match"&&(O=Se.MatchField)),O.toUpperCase()){case Se.IPV4:return core._(x.value).isIPv4();case Se.IPV6:return core._(x.value).isIPv6();case Se.Email:return core._(x.value).isEmail();case Se.Uri:try{return new URL(x.value),!0}catch{return false}case Se.Password:return console.log("Add FORMVALIDATION.Password"),false;case Se.MatchField:let[F,X,Q]=x.getAttribute("with").split("@"),j=document.querySelector(`[name=${X.trim()}]`);if(!j)return false;switch(Q||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=x.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&x.classList.contains("--otp")&&B(j)!=B(x))return false;if(j&&j.value!=x.value)return false;break}break;default:return true}}return true},[d.current]),E=react.useCallback(()=>{let x={},M={},V=null,K=null;if(Array.from(I("[name]")).forEach(O=>{let{name:F,required:X,with:Q}=k(O),j=true;(X||Q)&&(j=A(O)),x[F]={valid:j,value:O.type=="checkbox"?O.checked==true?O.value:false:O.classList.contains("--otp")?B(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value},M[F]=O.type=="checkbox"?O.checked==true:O.classList.contains("--otp")?B(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value,j?O.classList.remove("input-with-error"):(V==null&&r&&(V=O,K=r[F]),O.classList.add("input-with-error"));}),V){let O=V;if(O.classList.contains("--otp"))for(let F of Array.from(O.querySelectorAll(".--input"))){let X=F;if(X.value==""){X.focus();break}}else O.focus();}return {error:V!=null,errorMsg:K||"Fix errors to continue...",data:x,payload:M}},[d.current]),z=react.useCallback(()=>{let{error:x,errorMsg:M,payload:V}=E();x?S.error(M):l?react.startTransition(async()=>{i&&i(V),lt(n)?n.setLoading(true):y(true),S.clearAll(),core.withPost(l,{...V,...f||{}}).then(K=>{let O=K;lt(n)?n.setLoading(false):y(false),g&&Array.from(I("[name]")).forEach(F=>{F instanceof HTMLInputElement&&(F.value="");}),a?a(O):(S.clearAll(),S.success(O.message||"Redirecting..."));}).catch(K=>{lt(n)?n.setLoading(false):y(false),p?p(K):S.error(K.message||"We cannot process your request at this time.");});}):c&&c(V);},[l,R.current,d.current]),_=react.useCallback(()=>{let x=I("[type=submit]");!x||x.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):x.forEach(M=>{M.addEventListener("click",z);});},[d.current]),W=react.useMemo(()=>react$1.addPropsToChildren(m,x=>x.props.type=="submit",x=>({ref:v})),[m]);return react.useImperativeHandle(t,()=>({setLoading(x){if(x){R.current?.hide();try{S.clearAll();}catch{}}y(x);},showError(x){typeof x=="string"?S.error(x):R.current.error(x,4);},hideError(){R.current.hide();try{S.clearAll();}catch{}},init(){_();},submit(){z();}})),react.useEffect(_,[]),jsxRuntime.jsxs(u,{ref:d,style:w,className:`--form flex rel ${h} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!lt(n)&&jsxRuntime.jsx(he,{message:n?n.message||void 0:"working",spinner:o,color:n&&"color"in n?n.color:"#ffffff",when:P}),W]})};Fn.displayName="Zuz.Form";var $c=Fn;var Zn=t=>{let {ref:s,cols:e,rows:n,gap:o,gapX:r,gapY:l,align:m,justify:f,inline:i,flow:c,autoCols:p,autoRows:a,template:g,...C}=t;react.useRef(null);let {className:w,style:T,rest:P}=N(C),y=R=>typeof R=="number"?`repeat(${R}, 1fr)`:R,d={display:i?"inline-grid":"grid",gridTemplateColumns:y(e),gridTemplateRows:y(n),gap:o,columnGap:r,rowGap:l,alignItems:m,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:c,gridAutoColumns:p,gridAutoRows:a,gridTemplateAreas:g,...T};return jsxRuntime.jsx(u,{ref:s,as:`--grid ${w}`.trim(),style:d,...P})};Zn.displayName="Zuz.Grid";var Zc=Zn;var Kn=t=>typeof t=="string"&&t.includes("+"),Wn={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},Un={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var qn=react.forwardRef(({children:t,keys:s,variant:e},n)=>{let o=react.useMemo(()=>{if(Kn(s)){let r=null;return {keys:String(s).split("+").reduce((m,f,i,c)=>(c[i+1]?m.push(f):r=f.toUpperCase(),m),[]),children:r}}return {keys:s,children:String(t).toUpperCase()}},[s]);return jsxRuntime.jsxs(u,{as:`--keyboard-keys --${e||Z.Small} flex aic`,children:[(Array.isArray(o.keys)?o.keys:[o.keys]).map(r=>jsxRuntime.jsx("abbr",{title:Un[r],children:Wn[r]},r)),jsxRuntime.jsx(ee,{children:o?.children??t})]})});qn.displayName="Zuz.KeyboardKeys";var Io=qn;var Yn=react.forwardRef((t,s)=>{let e=hooks.useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:r}=t;return jsxRuntime.jsxs(u,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:U.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${r||Z.Small} fixed flex`,children:[jsxRuntime.jsx(u,{className:"--ico",children:e?D[pe.Success]:D[pe.Error]}),jsxRuntime.jsx(H,{as:"--message",children:e?n||"internet connection restored :)":o||"no internet connection"})]})});Yn.displayName="Zuz.NetWorkManager";var Yc=Yn;var No=(e=>(e.Table="table",e.Gooey="gooey",e))(No||{});var jn=react.forwardRef((t,s)=>{let{itemCount:e,itemsPerPage:n,startPage:o,pageRange:r,paginationStyle:l,breakLabel:m,prevLabel:f,nextLabel:i,hash:c,loading:p,seperator:a,renderOnZeroPageCount:g,onPageChange:C,...h}=t,w=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),T=react.useCallback(E=>`${core.toHash(E,c||6,w)}${a||""}${w}`,[w]),P=react.useMemo(()=>m||"...",[m]),[y,d]=react.useState({id:c?o?typeof o=="number"?T(o):o:1:o||1,label:o||1}),{style:R,className:v,rest:S}=N(h),I=react.useCallback(E=>typeof E=="number"?E:+E.label,[]);if(!e)throw new Error('"itemCount" prop is required');let k=react.useMemo(()=>Math.ceil(e/n),[e,n]),B=react.useMemo(()=>{let E=[],z=Math.max(I(y)-(r||2),1),_=Math.min(I(y)+(r||2),k);z>1&&E.push({id:c?T(1):1,label:1}),z>2&&E.push({id:-1,label:P});for(let W=z;W<=_;W++)E.push({id:c?T(W):W,label:W});return _<k-1&&E.push({id:-1,label:P}),_<k&&E.push({id:c?T(k):k,label:k}),E},[y]),A=react.useCallback(E=>{let z=E;+z.label<1||+z.label>k||(d(z),C?.(z));},[e,n,y]);return B.length<=1&&(g??false)===false?null:jsxRuntime.jsxs(u,{ref:s,as:`--pagination --pgt-${l||"table"} flex aic w:100% jcc ${v}`,children:[jsxRuntime.jsx(u,{as:"flex flex:1 aic --pgt-btns",children:(B.length>1?B:[{id:1,label:1},{id:-1,label:P}]).map((E,z,_)=>jsxRuntime.jsx($,{disabled:E.id==-1||I(y)==+E.label,className:(typeof E=="string"?E:E.label)==I(y)?"--current-page":"",onClick:W=>A(E),children:typeof E=="string"?E:E.label},`--pg-${z}-${E.id}`))}),jsxRuntime.jsx(u,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(y)-1)*n+1} - `,`${Math.min(I(y)*n,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(u,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx($,{disabled:I(y)<=1,onClick:E=>A({id:c?T(I(y)-1):I(y)-1,label:I(y)-1}),children:D.chevronLeftOutline}),jsxRuntime.jsx($,{disabled:B.length<=1||I(y)==I(B[B.length-1]),onClick:E=>A({id:c?T(I(y)+1):I(y)+1,label:I(y)+1}),children:D.chevronRightOutline})]})]})});jn.displayName="Zuz.Pagination";var Bo=jn;var ts=react.forwardRef((t,s)=>{let{strenthMeter:e,onChange:n,...o}=t;"type"in o&&delete o.type;let{style:r,className:l,rest:m}=N(o),[f,i]=react.useState(false),[c,p]=react.useState(""),a=react.useMemo(()=>core.checkPasswordStrength(c),[c]),g=hooks.useDebounce(C=>{e&&p(C.target.value),n&&n(C);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(u,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(u,{style:r,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:s,type:f?"text":"password",className:l,onChange:g,...m}),jsxRuntime.jsx($,{tabIndex:-1,onClick:()=>i(C=>!C),className:"--toggle flex aic jcc abs",children:f?D.eye:D.eyeSlash})]}),e&&jsxRuntime.jsxs(u,{as:`flex aic --password-meter --pb-score-${a.score}`,style:r,children:[jsxRuntime.jsxs(u,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(u,{as:`--pbar ${a.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(u,{as:`--pbar ${a.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:a.result})]})]})});ts.displayName="Zuz.Password";var am=ts;var rs=react.forwardRef((t,s)=>{let{size:e,length:n,mask:o,...r}=t,l=react.useRef([]),m="pinput",f=false,i={};"with"in r&&(i={with:r.with},delete r.with),"type"in r&&delete r.type,"name"in r&&(m=r.name,delete r.name),"required"in r&&(f=true,delete r.required);let{style:c}=N(r),p=a=>{let g=a.currentTarget,C=l.current[parseInt(g.dataset.index)+1],h=l.current[parseInt(g.dataset.index)-1];g.value.length===1&&C?C.focus():g.value.length===0&&h&&h.focus();};return react.useEffect(()=>{l.current=l.current.slice(0,e||n);},[e||n]),jsxRuntime.jsx(u,{name:m,style:c,className:"--otp flex aic rel","data-required":f,"data-size":e||n||4,...i,children:Array(e||n||4).fill(1).map((a,g)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":g,ref:C=>{l.current[g]=C;},numeric:true,onChange:p,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...r},`pin-${g}`))})});rs.displayName="Zuz.PinInput";var mm=rs;var ns=react.forwardRef((t,s)=>{let{children:e,className:n,name:o,required:r,type:l,value:m,variant:f,checked:i,onSwitch:c,...p}=t,[a,g]=react.useState(i||false),{variant:C}=q(true),h=react.useRef(null);return jsxRuntime.jsxs(nt,{className:`${n} --${(l||$t.Default).toLowerCase()} --radio${!l||l==$t.Default?"":"card"} --${f||C||Z.Small} flex aic rel`.trim(),...p,children:[jsxRuntime.jsx(oe,{ref:h,defaultChecked:a,value:m||"rd",type:"radio",className:"abs",name:o,required:r||false,onChange:w=>{c&&c(w.target.checked,m||"cb"),g(w.target.checked);}}),jsxRuntime.jsx(u,{className:"--dot rel",children:jsxRuntime.jsx(u,{className:"--rod abs abc"})}),jsxRuntime.jsx(u,{className:"--value",children:e})]})});ns.displayName="Zuz.Radio";var dm=ns;var ss=react.forwardRef((t,s)=>{let{fx:e,withStyle:n,as:o,reverse:r=false,searchIcon:l=D.search,hideSearchIcon:m=false,clearIcon:f=D.close,hideClearIcon:i=false,onChange:c,onClear:p,...a}=t,{style:g,className:C}=N({as:t.as}),[h,w]=react.useState(""),{variant:T}=q(true),P=react.useRef(null),y=react.useMemo(()=>jsxRuntime.jsx($,{tabIndex:-1,onClick:v=>R(),className:"--send flex aic jcc",variant:t.variant||Z.Small,children:h!==""?!i&&(typeof f=="string"?jsxRuntime.jsx(Y,{name:f,as:"--search-action"}):f):!m&&(typeof l=="string"?jsxRuntime.jsx(Y,{name:l,as:"--search-action"}):l)}),[r,l,i,f,m]);"type"in t&&delete t.type;let d=v=>{w(v.target.value),c?.(v.target.value);},R=v=>{h.trim()!==""&&(w(""),c?.(""),P.current&&(P.current.value="",t.onConfirm?.("")));};return react.useImperativeHandle(s,()=>({focus:()=>P.current?.focus(),value:()=>P.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(u,{style:g,className:`--search ${r?"--search-rev":""} --${t.variant||T||Z.Medium} flex aic ${typeof t.as=="string"&&t.as.includes("abs")?"":"rel"} ${C}`.trim(),children:[r&&y,jsxRuntime.jsx(oe,{ref:P,onChange:d,...a}),t.shortcut&&jsxRuntime.jsx(Io,{keys:t.shortcut,as:"abs"}),!r&&y]})});ss.displayName="Zuz.Search";var Sm=ss;var is=({value:t,updateValue:s,o:e})=>jsxRuntime.jsxs($,{onClick:n=>s(e),as:"--select-option-item",className:t&&(typeof e=="string"?e:e.value)==(typeof t=="string"?t:t.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(Y,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(H,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});is.displayName="Option";var ls=is;var ms=({ref:t,...s})=>{let{selected:e,options:n,label:o,name:r,variant:l,search:m,searchPlaceholder:f,maxHeight:i,arrowDownIcon:c=D.arrowDown,arrowUpIcon:p=D.arrowUp,expanded:a,onChange:g,...C}=s,[h,w]=react.useState(e?typeof e=="string"?n.find(x=>x.value===e):e:n[0]),[T,P]=react.useState(false),[y,d]=react.useState(null),R=react.useRef(null),v=react.useRef(null),S=react.useRef(null),I=react.useId(),k=react.useMemo(()=>r||I,[]),{reposition:B}=et(S,{direction:Vt.Bottom,offset:2}),{variant:A}=q(true),{className:E,style:z,rest:_}=N(C),W=x=>{w(x),P(false),g&&g(x);};return react.useImperativeHandle(t,()=>({setSelected:x=>{if(typeof x=="string"){let M=n.find(V=>V.value===x);M&&w(M);}else w(x);},getValue:()=>h||null})),react.useEffect(()=>{if(!T)return;let x=()=>{B();};return window.addEventListener("scroll",x,true),window.addEventListener("resize",B),()=>{window.removeEventListener("scroll",B,true),window.removeEventListener("resize",B);}},[T,B]),react.useEffect(()=>{if(!T){v.current&&(v.current.value=""),d(null);return}v.current?.focus(),B();let x=V=>{S.current&&!S.current.contains(V.target)&&P(false);},M=setTimeout(()=>{document.addEventListener("click",x);},0);return ()=>{clearTimeout(M),document.removeEventListener("click",x);}},[T,B]),jsxRuntime.jsxs(u,{className:`--select --${a==true?"expanded":""} --${l||A} ${r?`--${r}`:""} rel`.trim(),name:k,children:[jsxRuntime.jsxs($,{ref:R,"data-value":h?typeof h=="string"?h:h.value:h||"-1",className:`--selected flex aic rel ${E}`.trim(),withLabel:false,style:z,onClick:x=>{x.stopPropagation(),P(M=>!M);},..._,children:[jsxRuntime.jsx(H,{className:"--label",children:h?typeof h=="string"?h:h.label:o||"Choose"}),jsxRuntime.jsx(u,{className:"--svg-arrow rel flex aic jcc",children:T?typeof p=="string"?jsxRuntime.jsx(Y,{name:p,as:"--search-action"}):p:typeof c=="string"?jsxRuntime.jsx(Y,{name:c,as:"--search-action"}):c})]}),jsxRuntime.jsxs(u,{id:k,className:"--options-list flex cols abs","aria-hidden":!T,style:{maxHeight:i||"auto"},ref:S,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:T,duration:.05},children:[m&&jsxRuntime.jsx(u,{as:"--select-search --sticky",children:jsxRuntime.jsx(oe,{ref:v,onChange:x=>{d(x.target.value==""?null:x.target.value);},className:"--search-input",placeholder:f||"Search..."})}),(y==null?n:n.filter(x=>x.label.toLowerCase().includes(y.toLowerCase())||x.value.toLowerCase().includes(y.toLowerCase()))).map(x=>jsxRuntime.jsx(ls,{updateValue:W,value:h,o:x},`option-${(typeof x=="string"?x:x.label).replace(/\s+/g,"-")}-${typeof x=="string"?x:x.value}`))]})]})};ms.displayName="Zuz.Select";var Nm=ms;var ps=react.forwardRef((t,s)=>jsxRuntime.jsx(st,{type:we.Switch,...t,ref:s}));ps.displayName="Zuz.Switch";var Bm=ps;var fs=t=>{let{idx:s,id:e,as:n,weight:o,style:r,value:l,render:m,resize:f,sortBy:i,sortable:c,onSort:p}=t,[a,g]=react.useState(0),C=()=>{c&&(p?.(String(e),a==1?-1:1),g(h=>h==1?-1:1));};return jsxRuntime.jsxs(u,{style:{flex:o||1,...r},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:C,children:[jsxRuntime.jsx(u,{children:l}),s==-1&&c&&i==e&&jsxRuntime.jsx(u,{as:"--arrow flex aib",children:a==1?D.arrowUp:D.arrowDown})]})};fs.displayName="Zuz.Column";var kt=fs;var gs=t=>{let{index:s,pubsub:e,schema:n,data:o,ids:r,styles:l,animate:m,sortBy:f,selectable:i,tableRef:c,loading:p,rowClassName:a,onSort:g,onRowClick:C,onSelect:h,onContextMenu:w}=t,T=hooks.useDelayed(),P=react.useMemo(()=>({transition:G.SlideInBottom,curve:U.EaseInOut,delay:.02*(s+1)}),[]),y=react.useRef(null),d=(v,S)=>{s==-1?e.emit(`ALL_ROWS_${v?"CHECKED":"UNCHECKED"}`,v):(h&&h(o,v),e.emit(`ROW_${v?"CHECKED":"UNCHECKED"}`,v,S));},R=(v,S,I)=>jsxRuntime.jsx(kt,{idx:v,id:S,as:"--selector",pubsub:e,value:jsxRuntime.jsx(st,{value:I,ref:y,onSwitch:d,type:we.Default})});return react.useEffect(()=>{let v=(B,A)=>{y.current?.setChecked(B,false);},S=(B,A)=>{let E=false;c?.current&&c.current.querySelectorAll(".--row").forEach(z=>{let _=z;if(!_.classList.contains("--row-head")){let W=_.querySelector(".--selector input[type=checkbox]");W&&W.checked&&!E&&(E=W.checked);}}),y.current.setChecked(E,false);},I=B=>{y.current?.setChecked(B,false),h&&h(o,B);},k=B=>{y.current?.setChecked(B,false),h&&h(o,B);};return s==-1?(e.on("ROW_CHECKED",v),e.on("ROW_UNCHECKED",S),()=>{e.off("ROW_CHECKED",v),e.off("ROW_UNCHECKED",S);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",k),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",k);})},[]),jsxRuntime.jsxs(u,{onContextMenu:v=>w?w(v,o):null,onClick:v=>C?C(v,t.data):()=>{},...m?{fx:{...P,when:T}}:{},as:`--row flex aic ${C?"--row-clickable":""} ${s==-1?"--row-head":""} ${a||""}`,children:[s==-1&&n.map((v,S)=>{let{renderWhenHeader:I,render:k,value:B,...A}=v;return jsxRuntime.jsxs(react.Fragment,{children:[i&&S==0&&R(-1,`--selector-${v.id}`,"all"),jsxRuntime.jsx(kt,{idx:-1,onSort:g,sortBy:f,value:B,...A,pubsub:e,style:l[v.id]})]},`--col-${v.id}`)}),p&&s>-1&&jsxRuntime.jsx(u,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!p&&s>-1&&r&&o&&n.map((v,S)=>jsxRuntime.jsxs(react.Fragment,{children:[i&&S==0&&R(S,`--selector-${v.id}`,v.id.toString()),r.includes(String(v.id))?jsxRuntime.jsx(kt,{pubsub:e,idx:S,id:String(v.id),style:l[String(v.id)],value:v.render?v.render(o,s):o[String(v.id).includes(".")?String(v.id).split(".").reverse()[0]:v.id]}):null]},`--${String(v.id)}-val-${S}`))]})};gs.displayName="Zuz.Row";var Mt=gs;var bs=(t,s)=>{let{schema:e,rows:n,rowCount:o,rowsPerPage:r,currentPage:l,pagination:m,paginationHash:f,showPaginationOnZeroPageCount:i,animateRows:c,header:p,rowClassName:a,selectableRows:g,hoverable:C,sortBy:h,loading:w,loadingRowCount:T,loadingMessage:P,spinner:y,emptyMessage:d,onSort:R,onRowClick:v,onRowSelectToggle:S,onPageChange:I,onRowContextMenu:k,...B}=t,A=react.useRef(null),E=react.useMemo(()=>e.reduce((se,J)=>(se[J.id]={flex:J.weight||1,...J.w&&{width:J.w},...J.maxW&&{maxWidth:J.maxW},...J.minW&&{minWidth:J.minW},...J.h&&{height:J.h},...J.maxH&&{maxHeight:J.maxH},...J.minH&&{minHeight:J.minH}},se),{}),[e]),z=react.useMemo(()=>Object.keys(E),[e]),_=react.useMemo(()=>p??true,[p]),{style:W,className:x,rest:M}=N(B),V=react.useRef(null),K=react.useMemo(()=>new core.PubSub,[]),O=react.useRef(n.map(()=>core.uuid(8))),[F,X]=react.useState(h||null),[Q,j]=react.useState(P||"loading"),me=react.useMemo(()=>!w&&n&&n.length==0,[w,n]),re=react.useCallback(()=>d?typeof d=="function"?jsxRuntime.jsx(d,{}):d:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[w,n]);react.useEffect(()=>{O.current=n.map(()=>core.uuid(8));},[n]);let be=(se,J)=>{X(se),R?.(se,J);},Le=(o||(n?n.length:0))/(r||10),ve=react.useMemo(()=>i||Le>1?jsxRuntime.jsx(Bo,{hash:f,ref:A,renderOnZeroPageCount:i,onPageChange:I,paginationStyle:"table",startPage:l,itemCount:o||(n?n.length:0),itemsPerPage:r||10}):null,[l,o]);return react.useImperativeHandle(s,()=>({setLoading(se){}})),jsxRuntime.jsxs(u,{as:`--table ${C??true?"--hoverable":""} flex cols rel ${x}`,ref:V,children:[_==true&&jsxRuntime.jsx(Mt,{sortBy:F,onSort:be,tableRef:V,pubsub:K,selectable:g,index:-1,schema:e,loading:true,styles:E}),w&&jsxRuntime.jsxs(u,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:y||ne.Simple}),Q&&jsxRuntime.jsx(H,{as:"--table-loading-message",children:Q})]}),w&&Array(T||5).fill({}).map((se,J)=>jsxRuntime.jsx(Mt,{tableRef:V,index:J,pubsub:K,schema:e,styles:E,loading:true,animate:c,onRowClick:v},`--trow-loading-${J}-${e[0].id}`)),!w&&n&&n.map((se,J)=>jsxRuntime.jsx(Mt,{tableRef:V,pubsub:K,loading:false,index:J,schema:e,ids:z,styles:E,animate:c,data:se,onRowClick:v,rowClassName:a,selectable:g,onSelect:S,onContextMenu:k},`--trow-${O.current[J]||J}-${e[0].id}`)),me&&re(),jsxRuntime.jsx(u,{"aria-hidden":!m||!ve,...c?{fx:{transition:G.SlideInBottom,curve:U.EaseInOut,delay:.02*(n.length+1),when:!w&&n&&m&&ve!=null}}:{},as:"--row flex aic --row-footer",children:m&&ve?ve:null})]})};bs.displayName="Zuz.Table";var Zm=react.forwardRef(bs),Km=Zm;var Um=({ref:t,...s})=>{let{title:e,items:n}=s,[o,r]=react.useState(0),l=(m,f,i)=>{m.preventDefault(),r(f),document.getElementById(i)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(u,{ref:t,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:e}),jsxRuntime.jsx(De,{items:n.map((m,f)=>jsxRuntime.jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:i=>l(i,f,m.tag),href:`#${m.tag}`,children:m.label}))})]})},Gm=Um;var vs=({isActive:t,transitionType:s,speed:e,width:n,render:o,content:r,onHeightChange:l})=>{let m=react.useRef(null),f=hooks.useResizeObserver(m);react.useEffect(()=>{t&&f.height>0&&l(f.height);},[t,f.height]);let i=react.useMemo(()=>{let c={flexShrink:0,height:"fit-content"};return s==="fade"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,visibility:t?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:t?1:0}:s==="scale"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,transform:`scale(${t?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:t?1:0}:c},[t,s,n,e]);return jsxRuntime.jsx(u,{ref:m,style:{...i},className:"--content",children:o||t?r:null})};vs.displayName="Zuz.TabBody";var ws=vs;var Ts=({ref:t,...s})=>{let{tabs:e,speed:n=.3,prerender:o=true,variant:r,tabStyle:l="fixed",onChange:m,transitionType:f="slide",...i}=s,[c,p]=react.useState(0),a=react.useRef(null),g=hooks.useResizeObserver(a),C=react.useMemo(()=>core.uuid(8),[]),[h,w]=react.useState("auto"),T=react.useMemo(()=>g.width>0,[g.width]);react.useImperativeHandle(t,()=>({setTab:S=>p(S)}));let P=react.useMemo(()=>e.map(S=>({...S,key:S.key||core.uuid(8)})),[e]),{style:y,className:d,rest:R}=N({as:`flex cols w-full no-overflow ${i.as||""}`,...i}),v=()=>{if(!T)return {opacity:0};switch(f){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${c*g.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(u,{ref:a,style:y,className:`--tabview --${l} flex cols ${d}`,children:[jsxRuntime.jsx(at,{as:"--tabview-head",onSwitch:S=>{p(S.index);let I=P.find(k=>k.tag==S.tag);I&&I.onSelect&&(I.onSelect(I,S.index),m?.(I,S.index));},selected:c,items:P.reduce((S,I,k)=>(S.push({icon:I.icon,index:k,label:I.label,tag:I.tag}),S),[])}),jsxRuntime.jsx(u,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:h,transition:T?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:T?1:0},children:jsxRuntime.jsx(u,{className:"--track",style:{...v()},children:P.map((S,I)=>jsxRuntime.jsx(ws,{isActive:I===c,transitionType:f,speed:n,width:g.width,render:o||I===c,onHeightChange:k=>I===c&&w(k),content:S.body},`tab-body-${S.key||I}-${C}`))})})]})};Ts.displayName="Zuz.TabView";var rp=Ts;var ip=({ref:t,commands:s,onCommand:e,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:r,...l})=>{let[m,f]=react.useState([{type:"output",content:n}]),[i,c]=react.useState(""),p=react.useRef(null),a=react.useRef(null),{variant:g}=q(true);react.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight);},[m]);let C=d=>{let R=typeof d=="string"?{type:"output",content:d}:d;f(v=>{let S=[...v,R];return S.length>1e3?S.slice(-1e3):S});},h=()=>f([]);react.useImperativeHandle(t,()=>({write:C,clear:h}));let w=async d=>{let[R,...v]=d.split(" "),S=R.toLowerCase();return s&&s[S]?await s[S](v):e?await e(d):`command not found: ${R}`},T=d=>{let R=/\u001b\[(\d+)m/g,v=[],S={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,k="#d4d4d4",B=false,A;for(;(A=R.exec(d))!==null;){let z=d.slice(I,A.index);z&&v.push({text:z,color:k,bold:B});let _=A[1];_==="0"?(k="#d4d4d4",B=false):_==="1"?B=true:S[_]&&(k=S[_]),I=R.lastIndex;}let E=d.slice(I);return E&&v.push({text:E,color:k,bold:B}),v},P=(d,R)=>d.includes("\x1B")?T(d).map((v,S)=>jsxRuntime.jsx(ee,{style:{color:v.color||"#d4d4d4",fontWeight:v.bold?"bold":"normal"},children:v.text},`--terminal-msg-${S}-${v.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(ee,{style:{color:R==="error"?"#ff5f56":R==="command"?"#00ff00":"#d4d4d4"},children:d}),y=async d=>{if(d.key==="Enter"&&i.trim()){let R=i.trim(),v=[...m,{type:"command",content:`${o}${R}`}];c(""),f(v);let S=await w(R);f(I=>[...I,{type:"output",content:S}]);}};return jsxRuntime.jsxs(u,{as:`--zuz-terminal --${r||g||Z.Medium} flex cols ${l.className}`,onClick:()=>a.current?.focus(),children:[jsxRuntime.jsx(u,{ref:p,className:"--terminal-log",children:m.map((d,R)=>jsxRuntime.jsx(u,{children:jsxRuntime.jsx(H,{children:P(d.content,d.type)})},R))}),jsxRuntime.jsxs(u,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(oe,{ref:a,className:"--zuz-term-input",autoFocus:true,value:i,variant:r||g||Z.Medium,onChange:d=>c(d.target.value),onKeyDown:y})]})]})},lp=ip;var cp=({meta:t})=>jsxRuntime.jsxs($,{as:"flex aic --command-item",children:[t.icon&&jsxRuntime.jsx(Y,{name:t.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:t.label})]}),mp=({position:t,onSelect:s,commands:e,visible:n})=>jsxRuntime.jsx(u,{"aria-hidden":!n,fx:{transition:G.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...t},children:e.map(o=>jsxRuntime.jsx(cp,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Ns=mp;var Ls=react.forwardRef((t,s)=>{let{autoResize:e,maxHeight:n,variant:o,resize:r="none",command:l,commands:m,onInput:f,cmd:i,renderDropdown:c,value:p,defaultValue:a,...g}=t,C=react.useRef(null),h=react.useRef(null),{variant:w}=q(true),{style:T,className:P,rest:y}=N(g),{showDropdown:d,dropdownPosition:R,handleKeyDown:v,handleInput:S,handleCommandSelect:I}=hooks.useCommandActions({command:l,commands:m,cmd:i,ref:C}),k=react.useCallback(()=>{let A=C.current;!A||!e||(h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>{A.style.height="auto";let E=A.scrollHeight;if(n){let z=parseInt(n.toString(),10);isNaN(z)||(E=Math.min(E,z));}A.style.height=`${E}px`,A.style.overflowY=n&&E>=parseInt(n.toString(),10)?"auto":"hidden";}));},[e,n]),B=A=>{f?.(A),S(A),k();};return react.useEffect(()=>{k();},[p,a,k]),react.useEffect(()=>{e&&C.current&&k();},[e,k]),react.useEffect(()=>()=>{h.current&&cancelAnimationFrame(h.current);},[]),jsxRuntime.jsxs(u,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${o||w||Z.Medium} flex ${P}`.trim(),style:{...T,resize:r,height:e?"auto":T?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:v,onInput:B,ref:A=>{typeof s=="function"?s(A):s&&(s.current=A),C.current=A;},value:p,defaultValue:a,...y}),c?c({show:d,position:R,commands:m||[],onSelect:I}):m&&m.length>0&&jsxRuntime.jsx(Ns,{visible:d,commands:m,onSelect:I,position:R})]})});Ls.displayName="Zuz.TextArea";var gp=Ls;var Ms=react.forwardRef((t,s)=>{let{as:e,value:n,color:o,direction:r,...l}=t,m=react.useRef(null),[f,i]=react.useState(n||0);return react.useImperativeHandle(s,()=>({updateValue(c){f.toString().length!==c.toString().length&&i(c);},setValue(c){if(this.updateValue(c),m.current){let p=c.toString().split("");m.current.querySelectorAll(".--wheel-char").forEach((a,g)=>{let C=p[g];if(a instanceof HTMLElement){a.setAttribute("data-value",C);let h=a.querySelector(".--wheel-char-track");h instanceof HTMLElement&&(h.style.setProperty("--v",C),h.offsetWidth);}});}}})),react.useEffect(()=>{i(n||0);},[n]),jsxRuntime.jsxs(u,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:m,...l,children:[(f||0).toString().split("").map((c,p)=>isNaN(parseInt(c,10))?jsxRuntime.jsx(ee,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${p}`):jsxRuntime.jsx(ee,{"data-value":c,className:`--wheel-char grid ${p>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(ee,{className:`--wheel-char-track --wheel-track-${r||"down"} grid`,style:{"--v":c},children:[jsxRuntime.jsx(ee,{children:!r||r==="down"?0:9}),(!r||r==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((a,g)=>jsxRuntime.jsx(ee,{children:a},`${p}--${g}`)),jsxRuntime.jsx(ee,{children:!r||r==="down"?9:0})]})},`wheel-char-${p}`)),o&&jsxRuntime.jsx(u,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Ms.displayName="Zuz.TextWheel";var Sp=Ms;var Vs=react.forwardRef((t,s)=>{let{title:e,position:n,margin:o,children:r,...l}=t,{style:m,className:f,rest:i}=N(l),[c,p]=react.useState(false),a=react.useMemo(()=>n||te.Top,[]),g=react.useRef(null),C=react.useRef(null),h=y=>{},w=typeof ResizeObserver<"u"?new ResizeObserver(h):{observe:()=>{},unobserve:()=>{}},T=hooks.useDimensions(),P=react.useMemo(()=>{if(!C.current)return {left:0,top:0};let y=C.current.previousElementSibling;if(y){let d=y.getBoundingClientRect();switch(w.observe(y),a){case te.Top:return {left:d.left+d.width/2,top:d.top-(o||25)};case te.Bottom:return {left:d.left+d.width/2,top:d.top+(o||25)};case te.Left:return {left:d.left-d.width/2,top:d.top+d.height/2};case te.Right:return {left:d.right,top:d.top+d.height/2};default:return {left:0,top:0}}}},[C.current,T,w]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(u,{ref:g,className:"--with-tooltip rel",onMouseEnter:y=>p(true),onMouseLeave:y=>p(false),children:[r,jsxRuntime.jsx(u,{ref:C,style:{left:P?.left+"px",top:P?.top+"px"},className:`--tooltip --${n||te.Top} fixed ${f}`.trim(),fx:{from:a==te.Bottom||a==te.Top?{opacity:0,x:"-50%",y:a==te.Top?-5:5}:{opacity:0,y:"-50%",x:a==te.Right?15:-25},to:a==te.Bottom||a==te.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:a==te.Right?10:-20},curve:U.EaseInOut,when:c},children:jsxRuntime.jsx(H,{className:"--text rel",children:e})})]})});Vs.displayName="Zuz.ToolTip";var Ip=Vs;var zo=react.forwardRef((t,s)=>{let{as:e,meta:n,nodes:o,icons:r,onSelect:l,treeTag:m,selected:f,roots:i,expanded:c,...p}=t,{tag:a,label:g,icon:C,under:h,isHead:w}=n,T=react.useMemo(()=>i.includes(a),[i]),[P,y]=react.useState(c),d=()=>{localStorage.setItem(`--tn${m}-${a}`,P?"0":"1"),y(!P);};react.useEffect(()=>{c||T&&!localStorage.getItem(`--tn${m}-${a}`)?(localStorage.setItem(`--tn${m}-${a}`,"1"),y(true)):y(localStorage.getItem(`--tn${m}-${a}`)=="1");},[]);let R=react.useMemo(()=>o.filter(v=>v.under==a),[o,a]);return jsxRuntime.jsxs(u,{className:`--treenode ${T?"--is-root":""} --treenode-${a} flex cols`,children:[jsxRuntime.jsxs(u,{className:`--node --node-${a} flex aic ${f==a?" --selected":""}`,children:[jsxRuntime.jsx($,{skeleton:p.skeleton,onClick:d,className:"--node-aro-btn",disabled:R.length==0,children:r?.arrowClose&&r?.arrowOpen?jsxRuntime.jsx(Y,{skeleton:p.skeleton,className:"--node-aro-icon",name:R.length==0?r?.arrowDisabled||r?.arrowClose:P?r?.arrowOpen:r?.arrowClose}):R.length==0?D.chevronBottom:P?D.chevronBottom:D.chevronRight}),jsxRuntime.jsxs($,{className:"--node-meta flex aic",onClick:v=>l(a),children:[(r?.nodeOpen&&r?.nodeClose||T&&r?.rootOpen&&r?.rootClose)&&jsxRuntime.jsx(Y,{skeleton:p.skeleton,className:`--node-icon ${T?"--icon-root":""}`,name:C||(P?T&&r?.rootOpen||r.nodeOpen:T&&r?.rootClose||r?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${T?"--node-label-root":""}`.trim(),skeleton:p.skeleton,children:g})]})]}),P&&R.length>0&&jsxRuntime.jsx(u,{className:`--sub-node tree-sub-node-${a} flex cols`,children:R.map(v=>jsxRuntime.jsx(zo,{treeTag:m,selected:f,onSelect:l,icons:r,roots:i,expanded:v.expanded||false,meta:v,nodes:o},`--node-${v.tag}`))})]})});zo.displayName="TreeItem";var $s=zo;var _s=react.forwardRef((t,s)=>{let{as:e,nodes:n,onNodeSelect:o,tag:r,icons:l,roots:m,selected:f,...i}=t,[c,p]=react.useState(f);react.useImperativeHandle(s,()=>({getSelected:()=>c}),[o]);let a=g=>{p(g),o&&o(g);};return react.useEffect(()=>{c!=f&&p(f);},[f]),jsxRuntime.jsx(u,{className:"--treeview flex cols",children:n.filter(g=>m.includes(g.tag)).map(g=>jsxRuntime.jsx($s,{treeTag:r?`-${r}`:"",selected:c,onSelect:C=>a(C),icons:l,meta:g,roots:m,expanded:g.expanded||false,skeleton:i.skeleton,nodes:n},`--node-${g.tag}`))})});_s.displayName="Zuz.TreeView";var Hp=_s;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
+
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkWLB2PTNQ_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkWLB2PTNQ_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkWLB2PTNQ_cjs.h}});exports.ALERT=pe;exports.AVATAR=Go;exports.Accordion=wi;exports.ActionBar=Ii;exports.Alert=Bi;exports.AutoComplete=qi;exports.Avatar=ol;exports.Badge=nl;exports.Box=u;exports.Bubble=Nl;exports.BubbleMediaType=dn;exports.BubbleStatus=fn;exports.Button=$;exports.CHART=cn;exports.CHECKBOX=we;exports.COLORTHEME=zp;exports.Calendar=uo;exports.Chart=Pl;exports.CheckBox=st;exports.CodeBlock=$l;exports.ColorScheme=ec;exports.ContextMenu=qt;exports.CookiesConsent=nc;exports.Cover=he;exports.CropShape=uc;exports.Cropper=mc;exports.Crumb=dc;exports.DATATYPE=Zp;exports.DIALOG=$e;exports.DIALOG_ACTION_POSITION=qo;exports.DRAWER_SIDE=ae;exports.DatePicker=xc;exports.Dialog=Qt;exports.Drawer=ro;exports.FILTER=dt;exports.FORMVALIDATION=Se;exports.FORMVALIDATION_STYLE=Kp;exports.Fab=Sc;exports.Filters=Pc;exports.Form=$c;exports.Grid=Zc;exports.Group=Xt;exports.Icon=Y;exports.Image=ot;exports.Input=oe;exports.KeyboardKeys=Io;exports.KeysLabelMap=Un;exports.KeysMap=Wn;exports.Label=nt;exports.LayersProvider=Ut;exports.List=De;exports.NetworkStatus=Yc;exports.ORIGIN=Ge;exports.OriginType=_p;exports.Overlay=ke;exports.POSITION=Vt;exports.PROGRESS=Up;exports.Pagination=Bo;exports.PaginationStyle=No;exports.Password=am;exports.PinInput=mm;exports.Position=te;exports.ProgressBar=je;exports.RADIO=$t;exports.Radio=dm;exports.SHEET=ue;exports.SHEET_ACTION_POSITION=At;exports.SKELETON=$p;exports.SLIDER=ft;exports.SORT=Fp;exports.SPINNER=ne;exports.ScrollView=jt;exports.Search=Sm;exports.Select=Nm;exports.SelectTabs=at;exports.Sheet=Bc;exports.Slider=vo;exports.SnackPosition=wt;exports.SnackStyle=kr;exports.SnackType=vt;exports.Span=ee;exports.Spinner=ge;exports.Status=Wp;exports.Switch=Bm;exports.TRANSITIONS=G;exports.TRANSITION_CURVES=U;exports.TabView=rp;exports.Table=Km;exports.TableOfContents=Gm;exports.Terminal=lp;exports.Text=H;exports.TextWheel=Sp;exports.Textarea=gp;exports.ThemeProvider=Ys;exports.ToastDefaultTitle=Mr;exports.ToastPosition=wt;exports.ToastProvider=no;exports.ToastStyle=kr;exports.ToastType=vt;exports.ToolTip=Ip;exports.TreeView=Hp;exports.Variant=Z;exports.animationTransition=qe;exports.buildClassString=zt;exports.buildWithStyles=Qo;exports.css=uu;exports.getAnimationCurve=_t;exports.getAnimationTransition=fu;exports.getZuzMap=Zs;exports.isKeyCombination=Kn;exports.setZuzMap=Yo;exports.useBase=N;exports.useContextMenu=Qa;exports.useDialog=ei;exports.useDrawer=ri;exports.useFx=ie;exports.useMorph=ai;exports.usePosition=et;exports.useSnack=fi;exports.useToast=so;
|