@zuzjs/ui 1.0.22 → 1.0.24
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 +9 -9
- package/dist/index.d.cts +21 -10
- package/dist/index.d.ts +21 -10
- package/dist/index.js +8 -8
- package/package.json +1 -1
- package/dist/css/colors.css +0 -1
- package/dist/css/keyframes.css +0 -1
- package/dist/css/mixins.css +0 -1
- package/dist/css/transitions.css +0 -1
- /package/dist/{chunk-ACEKHLN3.js → chunk-QNDXKMRP.js} +0 -0
- /package/dist/{chunk-PSQ7ETQC.cjs → chunk-ZUZUOZRM.cjs} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
var
|
|
1
|
+
'use strict';var chunkZUZUOZRM_cjs=require('./chunk-ZUZUOZRM.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 Ko={Circle:"CIRCLE",Square:"SQUARE"},kp={Default:"DEFAULT",Circle:"CIRCLE"},Op={Light:"light",Dark:"dark",System:"system"},be={Default:"DEFAULT",Switch:"SWITCH"},kt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},te=kt,Ke=hooks.AnchorType,Dp=Ke,K={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Hp={Asc:"ASC",Desc:"DESC"},Vp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Ap={Dots:"DOTS"},we={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},le={Success:"success",Error:"error",Warning:"warning",Info:"info"},_={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},U={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},$p={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},He=me,Ot={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Wo=Ot,zp={Bar:"BAR",Ring:"RING"},ct={Default:"range",Text:"number"},Dt={Default:"DEFAULT",Card:"CARD"},pt={Gooey:"gooey"},se={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Uo=Symbol.for("zuz.global.map"),Go=t=>{globalThis[Uo]=t;},$s=()=>globalThis[Uo]||{},Ht=t=>{let s=Array.isArray(t)?t.join(" "):t;if(!s||typeof s!="string")return "";let e=$s();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkZUZUOZRM_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkZUZUOZRM_cjs.h(s).filter(Boolean).map(o=>{let r=o.match(/^([&@][\w-]+)\((.*)\)$/);if(r){let[m,i,c]=r;return chunkZUZUOZRM_cjs.h(c).map(l=>{let a=`${i}(${l})`;return e[a]||l}).join(" ")}return e[o]||o}).join(" ")},au=t=>{let s=Array.isArray(t)?t.join(" "):t;return !s||typeof s!="string"?"":Ht(s)},qo=t=>{let s={};for(let e in t){let n=t[e];if(e.startsWith("--")){s[e]=n;continue}let o=chunkZUZUOZRM_cjs.e[e]?.toString()??e;if(o==="x"||o==="translateX"){let r=s.translate?.split(" ")??["0px","0px"];s.translate=`${chunkZUZUOZRM_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"} ${chunkZUZUOZRM_cjs.i.addUnitsSafely(e,n)}`;}else chunkZUZUOZRM_cjs.d.includes(o)?s[o]=chunkZUZUOZRM_cjs.i.addUnitsSafely(e,n):s[o]=n;}return s},Vt=t=>{if(!t)return "linear";switch(t.toUpperCase()){case _.Bounce:return "var(--bounce)";case _.Liquid:return "var(--liquid)";case _.Spring:return "var(--spring)";case _.EaseInOut:return "ease-in-out";case _.EaseOutBack:return "ease-out-back";default:return "linear"}},We=(t,s=0)=>{let e={},n={},o=s||20;switch(t){case U.SlideInLeft:case U.SlideInRight:e={"--fx-x":t===U.SlideInLeft?`-${o}px`:`${o}px`,opacity:0},n={"--fx-x":"0px",opacity:1};break;case U.SlideInTop:case U.SlideInBottom:e={"--fx-y":t===U.SlideInTop?`-${o}px`:`${o}px`,opacity:0},n={"--fx-y":"0px",opacity:1};break;case U.ScaleIn:e={scale:0,opacity:0},n={scale:1,opacity:1};break;case U.FadeIn:e={opacity:0},n={opacity:1};break}return {from:e,to:n}},iu=(t,s,e)=>{let{from:n,to:o}=We(t);return s?{...n,...o}:e?n:o};var _s=(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=m=>{e.current.includes(m.propertyName)&&t.clearAtEnd===true&&(o.style.transform="",o.style.filter="",e.current.forEach(i=>o.style.removeProperty(i)));};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?Vt(t.curve):"var(--spring)"}`);},[t,s]),react.useMemo(()=>{if(!t)return {style:{}};let{transition:o,from:r,to:m,exit:i,when:c,duration:l=.3,delay:a=0,curve:f,watch:u=[]}=t,d=c===false&&!n.current;c===true&&(n.current=true);let C={},{from:x,to:v}=o?We(o):{from:r||{},to:m||{}};C=c===void 0?{...x,...v}:c?{...v}:i||x;let h=Vt(f),w=[],g=qo(C);e.current=Object.keys(g);let S={...g};return Object.keys(g).forEach(N=>{let P=N.startsWith("--")?"all":N;w.includes(P)||w.push(`${P} ${l}s ${h} ${a}s`);}),u.forEach(N=>{w.includes(N)||w.push(`${N} 0.1s ${h} 0s`);}),{style:{...S,transition:d?"none":w.join(", "),opacity:d?0:S.opacity,pointerEvents:d?"none":S.pointerEvents}}},[t,t?.when,t?.watch])},ae=_s;var Fs=(t,s)=>{let{as:e,fx:n,transition:o,skeleton:r,className:m,propsToRemove:i,style:c,...l}=t||{},a=o?{transition:o,duration:.3}:n||{},{style:f}=ae(a,s),u=Ht(e??"");return {style:{...c,...f},className:[m||"",u||"",r?.enabled?"--skeleton":""].join(" ").trim(),rest:{...chunkZUZUOZRM_cjs.g(l,i?[...i,"skeleton"]:["skeleton"])}}},I=Fs;var Us=(t,s={})=>{let{offset:e=8,direction:n="bottom",container:o=null,triggerRef:r=null}=s,m=react.useRef(null),i=react.useCallback(()=>{let c=t.current;if(!c)return;let l=r?.current||c.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=c.getBoundingClientRect(),f=l.getBoundingClientRect(),u,d;o?(u=o.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(c).position==="fixed"?d="fixed":d="absolute",d==="fixed"?u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),c.style.position!==d&&(c.style.position=d),m.current=d;let v=0,h=0;switch(n){case "top":v=f.top-a.height-e,h=f.left,v<u.top&&f.bottom+a.height+e<=u.bottom&&(v=f.bottom+e);break;case "bottom":v=f.bottom+e,h=f.left,v+a.height>u.bottom&&f.top-a.height-e>=u.top&&(v=f.top-a.height-e);break;case "left":v=f.top,h=f.left-a.width-e,h<u.left&&f.right+a.width+e<=u.right&&(h=f.right+e);break;case "right":v=f.top,h=f.right+e,h+a.width>u.right&&f.left-a.width-e>=u.left&&(h=f.left-a.width-e);break}if(v=Math.max(u.top,Math.min(v,u.bottom-a.height)),h=Math.max(u.left,Math.min(h,u.right-a.width)),m.current==="fixed")c.style.top=`${v}px`,c.style.left=`${h}px`;else {let w;c.offsetParent?w=c.offsetParent.getBoundingClientRect():w={top:0,left:0};let g=v-w.top+window.scrollY,S=h-w.left+window.scrollX;c.style.top=`${g}px`,c.style.left=`${S}px`;}},[t,r,e,n,o]);return react.useEffect(()=>{let c=t.current;if(!c)return;let l=r?.current||c.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=new ResizeObserver(i);return a.observe(c),l&&a.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{a.disconnect(),l&&a.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[t,n,e,o,r]),{postion:m.current,reposition:i}},Ue=Us;var Qo="(prefers-color-scheme: dark)",Xs=typeof window>"u",jo=react.createContext(void 0),_t=t=>{let s=react.useContext(jo);if(!s){if(t===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return s},q=_t,Ys=({children:t,storageKey:s="--ucs",forceTheme:e,zuzMap:n,...o})=>(n&&Go(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||Jo(s,"system")),[m,i]=react.useState(()=>e||Jo(s)),c=u=>(u||(u=window.matchMedia(Qo)),u.matches?"dark":"light"),l=react.useCallback(u=>{let d=u=="system"?c():u,C=document.documentElement;C.setAttribute("color-scheme",d),C.style.colorScheme=d,i(d);},[c]),a=react.useCallback(u=>{r(u),localStorage.setItem(s,u),l(u);},[o]),f=react.useCallback(u=>{let d=c(u);i(d),o==="system"&&l("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(s);},[o]),react.useEffect(()=>{window.matchMedia(Qo).addEventListener("change",f);},[f]),react.useEffect(()=>{let u=d=>{d.key==s&&(d.newValue?a(d.newValue):a("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[a]),react.useEffect(()=>{l(e||o||"system");},[o]),jsxRuntime.jsxs(jo,{value:{colorScheme:o,resolvedScheme:m,setColorScheme:a,...n},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
3
3
|
const themes = ['light', 'dark']
|
|
4
|
-
let theme = localStorage.getItem(\`${
|
|
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($t,{children:o})]})},qo=(o,n)=>{if(Ws)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Yo=({ref:o,...n})=>{let{style:e,...r}=n,{style:t,className:s,rest:u}=R(r);return jsxRuntime.jsx("span",{ref:o,style:e,className:s,...u})};Yo.displayName="Zuz.Span";var J=Yo;var Jo=react.forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:l}=X(true),{className:m,style:i,rest:a}=R(u);return jsxRuntime.jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${t||l||W.Small} ${m}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,p)=>jsxRuntime.jsx(J,{className:`path${p+1}`},`${e}-layer-${p}`))})});Jo.displayName="Zuz.Icon";var Y=Jo;var re={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var jo=o=>{let{type:n,variant:e,color:r,...t}=o,{className:s,style:u,rest:l}=R(t),{spinner:m}=X(true),i=()=>{switch(n||m?.type||re.Simple){case re.Simple:return null;case re.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{as:"--bar --bar1"}),jsxRuntime.jsx(c,{as:"--bar --bar2"}),jsxRuntime.jsx(c,{as:"--bar --bar3"})]});case re.Roller:return null}};return jsxRuntime.jsx(c,{className:`${s} --spinner --${(n||m?.type||re.Simple).toLowerCase()} --${e||m?.variant||W.Small}`.trim(),style:{...u},...l,children:i()})};jo.displayName="Zuz.Spinner";var ge=jo;var ft={Loading:"loading",Normal:"normal"};var tr=({ref:o,...n})=>{let{reset:e,kind:r="solid",variant:t,icon:s,iconSize:u,children:l,withLabel:m,spinner:i,state:a,disabled:f,...p}=n,{style:d,className:b,rest:w}=R(p),{variant:x}=X(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${t||x} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${b}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:a==ft.Loading||n.skeleton?.enabled||f,...w,children:[a==ft.Loading&&jsxRuntime.jsx(ge,{variant:t||x,type:i||re.Simple}),(!a||a==ft.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(Y,{variant:u,name:s}),m===true?jsxRuntime.jsx(J,{children:l}):l]})]})};tr.displayName="Zuz.Button";var z=tr;var rr=react.forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:l,className:m,rest:i}=R(u),a=`h${o.h||1}`;return jsxRuntime.jsx(a,{ref:n,style:l,className:m,...i,children:r?jsxRuntime.jsx(J,{dangerouslySetInnerHTML:{__html:r}}):t})});rr.displayName="Zuz.Text";var H=rr;var ta=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:l}=o;return n=="-"?jsxRuntime.jsx(c,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:m=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsxRuntime.jsx(c,{as:"--icon",children:jsxRuntime.jsx(Y,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},nr=ta;var ir=({ref:o,...n})=>{let{id:e,as:r,fx:t,offsetX:s,offsetY:u,parent:l,event:m,arrow:i,when:a,items:f,header:p,footer:d,origin:b=Ke.TopRight,...w}=n,[x,h]=react.useState(false),[S,g]=react.useState(f||[]),{position:v,targetRef:I,calculatedAnchor:T}=hooks.useAnchorPosition(l?.current,m,{offsetX:s,offsetY:u,preferredAnchor:b}),N=l&&v.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",M=react.useMemo(()=>{let k=T.toLowerCase();return k.includes("left")?"--arrow-left":k.includes("right")?"--arrow-right":"--arrow-center"},[T]),L=v.top!==0||v.left!==0;react.useEffect(()=>{a&&L?h(true):a||h(false);},[a,L]);let{className:V,style:E,rest:_}=R(w),U=ae({...t?.transition?{transition:t.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:t?.curve??F.EaseInOut,duration:t?.duration??.05,when:x&&L});return jsxRuntime.jsxs(c,{ref:I,className:`--contextmenu ${i||l!=null?`--has-arrow ${N} ${M}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!x,style:{...E,...U.style,top:v.top,left:v.left,visibility:L?"visible":"hidden",transformOrigin:T},..._,children:[typeof p=="function"?react.createElement(p):p,S.map((k,C)=>jsxRuntime.jsx(nr,{...k,index:C},`context-${k.label.toLowerCase()}-${C}`)),typeof d=="function"?react.createElement(d):d]})};ir.displayName="Zuz.ContextMenu";var _t=ir;var lr=react.forwardRef((o,n)=>{let{children:e,fx:r,when:t,fxDelay:s,fxStep:u,classToIgnore:l,...m}=o,i=X(true),a=hooks.useDelayed(),f=r||i?.group?.fx,p=s||i?.group?.fxDelay,d=u||i?.group?.fxStep,b=l||i?.group?.classToIgnore||"--ignore",w=react.useMemo(()=>f?react$1.addPropsToChildren(e,x=>{if(x.type===react.Fragment)return false;let h=x.props||{},S="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",v=typeof g=="string"&&g.includes(b);return !S&&!v},x=>({fx:{...f,delay:(p||0)+x*(d||.1),when:t??(r?.when||a)}})):e,[e,t,a,f]);return jsxRuntime.jsx(c,{className:"--group",ref:n,...m,children:w})});lr.displayName="Zuz.Group";var Ft=lr;var cr=react.forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:l,...m}=o,{className:i,style:a,rest:f}=R(m),{spinner:p}=X(true);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(Ft,{fx:{transition:G.SlideInBottom,curve:F.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:t||p?.variant||W.Small,type:r||p?.type||re.Simple}),!l&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});cr.displayName="Zuz.Cover";var Ne=cr;var pr=react.forwardRef((o,n)=>{let{when:e,...r}=o;return jsxRuntime.jsx(c,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...r})});pr.displayName="Zuz.Overlay";var Ee=pr;var ya=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),ur=ya;var wa=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(c,{as:`--footer flex aic rel ${n?n==_o.Center?"jcc":"":"jce"}`.trim(),children:o.map((t,s)=>jsxRuntime.jsx(z,{variant:r,onClick:u=>t.handler?t.handler():t.onClick?t.onClick():console.log("onClick Handler missing"),as:"--action",children:t.label},`dialog-${e}-action-${t.key}`))}),dr=wa;var va={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"})," "]}),[le.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"})}),[le.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"})}),[le.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"})}),[le.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"})]})},O=va;var Sa=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(c,{as:"--head flex aic rel",children:[jsxRuntime.jsx(c,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(z,{onClick:e=>n(),className:"--closer abs center-v",children:O.close})]}),hr=Sa;var wr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:l,speed:m,type:i,action:a,actionPosition:f,spinner:p,loadingMessage:d,variant:b,inBackground:w,closeDelay:x=200,onClose:h,onShow:S,onHide:g,...v}=n,I=react.useMemo(()=>core.uuid(12),[]),[T,P]=react.useState(t||""),[N,M]=react.useState(s||""),[L,V]=react.useState(i||He.Dialog),[E,_]=react.useState(false),[U,k]=react.useState(true),[C,A]=react.useState(a||null),[$,K]=react.useState(false),{variant:D,spinner:Z,dialog:q}=X(true),te=b||q?.variant||D||W.Small,{style:j,className:pe,rest:de}=R(v),It=react.useRef(null),Nt=ae({when:E,duration:m||q?.speed||.3,delay:q?.delay||.1,transition:u||q?.transition||G.SlideInBottom,curve:l||q?.curve||F.EaseInOut,watch:["scale","filter","transform"]});react.useEffect(()=>{V(He.Dialog),M(s),P(T),C&&A(C.reduce((ne,Q)=>(ne.push({...Q,key:Q.key||core.uuid(12)}),ne),[])),_(true),setTimeout(()=>S?S():()=>{},500);},[]);let Ie=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{style:{zIndex:Ie},when:E}),jsxRuntime.jsxs(c,{as:`--dialog --${(i??He.Default).toLowerCase()} ${E?"--visible":""} ${pe} fixed abc`.trim(),style:{...Nt.style,zIndex:Ie+1,pointerEvents:w==true?"none":"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...de,ref:It,children:[jsxRuntime.jsx(Ne,{when:$,spinner:p||q?.spinner||Z?.type||re.Simple,message:d||q?.loadingMessage}),jsxRuntime.jsx(hr,{title:T,onClose:()=>{_(false),h(r);}}),jsxRuntime.jsx(ur,{message:N,render:U,action:C}),C&&C.length>0&&jsxRuntime.jsx(dr,{variant:te,action:C,dialogID:I,actionPosition:f})]})]})};wr.displayName="Zuz.Dialog";var Zt=wr;var Kt=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(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},qe=new Kt;var vr=react.forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:m,onScrollY:i,onScrollX:a}=hooks.useScrollbar(e||1),{style:f,className:p,rest:d}=R(t);return react.useEffect(()=>{let b=u.current;if(!b)return;let w=()=>{window.dispatchEvent(new Event("resize"));};return b.addEventListener("scroll",w),()=>b.removeEventListener("scroll",w)},[]),jsxRuntime.jsxs(c,{ref:s,className:p.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(c,{as:`--scroll-content ${p}`.trim(),ref:u,style:r||{},children:d.children}),jsxRuntime.jsx(c,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:l,onMouseDown:i})}),jsxRuntime.jsx(c,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})})]})});vr.displayName="Zuz.ScrollView";var Wt=vr;var Cr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:l,animation:m,prerender:i,inBackground:a,onClose:f,...p}=n,{drawer:d}=X(true),[b,w]=react.useState(u),[x,h]=react.useState(false),[S,g]=react.useState(i??(d?.prerender||true)),v=()=>{h(false),f?.(e??-1);},{className:I,style:T,rest:P}=R(p),N=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(v)&&v();}}],[x]);hooks.useShortcuts(N),react.useEffect(()=>{w(u);},[u]),react.useEffect(()=>(x?qe.push(v):qe.pop(v),()=>qe.pop(v)),[x]),react.useEffect(()=>{h(true);},[]);let M=t||d?.from||se.Left,L=react.useMemo(()=>{switch(M){case se.Left:return {from:{x:"-100vw"},to:{x:0}};case se.Right:return {from:{x:"100vw"},to:{x:0}};case se.Top:return {from:{y:"-100vh"},to:{y:0}};case se.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,d?.from]),V=ae({from:{...L.from,opacity:0},to:{...L.to,opacity:1},when:x,curve:m||d?.animation||F.EaseInOut,duration:s||d?.speed||.5,watch:["scale","filter"]}),E=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{onClick:_=>{x&&v();},when:x,style:{zIndex:E}}),jsxRuntime.jsxs(c,{ref:o,"aria-hidden":!x,className:`--drawer flex cols ${I} --${M.toLowerCase()} fixed`,style:{...T,...V.style,"--m":`${l||d?.margin||0}px`,zIndex:E+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...P,children:[t==se.Top||t==se.Bottom?jsxRuntime.jsx(c,{className:"--handle"}):null,jsxRuntime.jsx(Wt,{children:S||x?b:null})]})]})};Cr.displayName="Zuz.Drawer";var Yt=Cr;var Tr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Tr||{}),Pr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Da=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:l})=>{let m=hooks.useDelayed(),i=hooks.useDelayed(((u||4)-1)*1e3),{toast:a}=X(true),f=ae({when:m&&!i,duration:a?.duration||.2,transition:G.SlideInTop,curve:a?.curve||F.EaseInOut});return react.useEffect(()=>{i&&n&&l?.(n);},[i,n]),jsxRuntime.jsxs(c,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(c,{as:"--ico flex aic jcc",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.2,when:m&&!i},children:r?jsxRuntime.jsx(Y,{name:r,fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}}):jsxRuntime.jsx(c,{as:"--no-icon",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}})}),jsxRuntime.jsxs(c,{as:"--meta",children:[jsxRuntime.jsx(H,{as:"--tt",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.3,when:m},children:t||Pr[e]}),jsxRuntime.jsx(H,{as:"--tm",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.4,duration:.5,when:m},children:s})]})]})},Qt=Da;var ce=react.createContext(null),_a=({ref:o,...n})=>{let r=react.useContext(ce)?.depth??0,[t,s]=react.useState(null),[u,l]=react.useState(false),[m,i]=react.useState([]),a=hooks.useDelayed(),f=react.useRef(0),p=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};react.useImperativeHandle(o,()=>({add(h){let S=p(),g={id:S,...h};return i(v=>[...v,g]),S},openMenu(h){l(false),setTimeout(()=>{s({id:p(),type:"menu",props:h}),l(true);},16);},remove(h){i(S=>S.filter(g=>g.id!==h)),t?.id===h&&d();},clear(){i([]);}})),react.useEffect(()=>{if(t&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,d]);let b=h=>{setTimeout(()=>{i(S=>S.filter(g=>g.id!==h)),t?.id===h&&s(null);},250);},w=react.useMemo(()=>[...m.filter(h=>h.type!="toast")],[m]);if(!a)return null;let x=m.filter(h=>h.type=="toast").reverse();return reactDom.createPortal(jsxRuntime.jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[w.map((h,S)=>{let g=S<w.length-1;return h.type==="dialog"?jsxRuntime.jsx(Zt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(Yt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),x.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:x.map((h,S)=>jsxRuntime.jsx(Qt,{onClose:b,index:S,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsxRuntime.jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(_t,{onClose:d,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},Fa=({children:o})=>{let n=react.useContext(ce),e=n?n.depth+1:0,r=react.useRef(null),t=react.useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),clear:()=>r.current?.clear(),depth:e,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(ce.Provider,{value:t,children:[o,jsxRuntime.jsx(_a,{ref:r})]})},$t=Fa;var Ka=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t);return {clearAll:n,show:t=>{let s=o.add({type:"dialog",props:{...t,type:He.Dialog}});return {id:s,hide:()=>e(s)}},hide:e}},Wa=Ka;var Ga=()=>{let o=react.useContext(ce);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,a)=>o.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,p)=>n("default",{title:i,message:a,icon:f,duration:p}),hide:i=>o.remove(i),success:(i,a,f,p)=>n("success",{title:i,message:a,icon:f,duration:p}),error:(i,a,f,p)=>n("error",{title:i,message:a,icon:f,duration:p}),warn:(i,a,f,p)=>n("warn",{title:i,message:a,icon:f,duration:p}),promise:(i,a,f,p)=>n("promise",{title:i,message:a,icon:f,duration:p}),clearAll:()=>o.clear()}},jt=Ga;var Xa=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>{let s=o.add({type:"drawer",props:t});return {id:s,close:()=>e(s)}};return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:se.Right}),left:t=>r({children:t,from:se.Left}),top:t=>r({children:t,from:se.Top}),bottom:t=>r({children:t,from:se.Bottom}),close:e}},Ya=Xa;var Ja=(o,n,e={})=>{let[r,t]=react.useState(null),[s,u]=react.useState(false),{duration:l=.25,curve:m=F.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return react.useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ae({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:m,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},ja=Ja;var ti=()=>{let o=react.useContext(ce);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,t,s)=>{r.preventDefault(),o.openMenu({event:r,items:t,origin:s});},showMenu:(r,{items:t,origin:s,offsetX:u,offsetY:l,transition:m,curve:i,arrow:a,duration:f,header:p,footer:d})=>{o.openMenu({fx:{transition:m,curve:i,duration:f},parent:r,items:t,origin:s||Ke.TopCenter,offsetX:u,offsetY:l,arrow:a,header:p,footer:d});},hide:o.clear}},oi=ti;var kr=({ref:o,style:n,...e})=>{let r=react.useRef(null),t=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=R(e,t);return jsxRuntime.jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};kr.displayName="Zuz.Box";var c=kr;var Dr=react.forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=react.useState(false);return jsxRuntime.jsxs(c,{className:"--accordion flex cols",...t,children:[jsxRuntime.jsxs(z,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(c,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(c,{className:"--detail",children:r})]})});Dr.displayName="Zuz.Accordion";var li=Dr;var mi=({label:o,icon:n,onClick:e,idx:r,selected:t})=>jsxRuntime.jsx(z,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${t?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(Y,{name:n}):n}),Vr=mi;var Ar=react.forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(t||e[0].tag||0),a=react.useCallback(({x,y:h})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${h-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=react.useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",a));},[]);react.useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((x,h)=>h.label.length>x.length?h.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),l.current?.addEventListener("pointerenter",p));},[]);let{className:d,style:b,rest:w}=R(u);return jsxRuntime.jsxs(c,{ref:l,style:b,className:[`--actionbar flex aic ${d}`,`${!s||s==ee.Auto?"rel":`--${s}`}`].join(" ").trim(),...w,children:[e.map((x,h)=>jsxRuntime.jsx(Vr,{selected:m===x.tag||t==h,...x,idx:h},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(c,{className:"--tip abs",children:jsxRuntime.jsx(c,{className:"--track flex aic",children:e.map(({label:x})=>jsxRuntime.jsx(c,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Ar.displayName="Zuz.ActionBar";var di=Ar;var zr=react.forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...l}=o,{className:m,style:i,rest:a}=R(l);return jsxRuntime.jsxs(c,{className:`--alert --${e||le.Info} flex aic ${m}`.trim(),style:i,...a,children:[jsxRuntime.jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&O[e||le.Info]}),jsxRuntime.jsxs(c,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(H,{className:"--message",h:2,children:s})]})]})});zr.displayName="Zuz.Alert";var xi=zr;var _r=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:l,rest:m}=R(s),{variant:i}=X(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||i} flex ${l}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...m})};_r.displayName="Zuz.Input";var oe=_r;var Zr=o=>{let{meta:n,children:e}=o,r=hooks.useDelayed(),{label:t,icon:s,...u}=react.isValidElement(n)?{}:n,{className:l,style:m,rest:i}=R({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:m,className:l,children:n}):jsxRuntime.jsxs("li",{style:m,className:l,...i,children:[e,typeof n=="string"?n:t]})};Zr.displayName="Zuz.ListItem";var Kr=Zr;var Ur=react.forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...l}=o,{className:m,style:i,rest:a}=R(l),f=u==true?"ol":"ul";return react.createElement(f,{className:`--list --${r||W.Small} flex ${t??"cols"} ${m}`.trim(),style:i,ref:n,...a,children:e.map((p,d,b)=>{let w=`${typeof p=="string"?`li-${String(p)}`:react.isValidElement(p)?`li-${p.key}`||`${d}-${core.MD5(p.toString())}`:p.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Kr,{meta:p}),s&&b[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${w}`):null]},w)})})});Ur.displayName="Zuz.List";var Me=Ur;var qr=react.forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...l}=o,{className:m}=R({as:s||""}),{style:i}=R(l),[a,f]=react.useState(false),[p,d]=react.useState(t||[]),b=react.useRef(null),w=react.useRef(null),x=react.useRef(null),h=react.useMemo(()=>l.name||core.uuid(12),[]),[S,g]=react.useState(null),[v,I]=react.useState(null),[T,P]=react.useState([]),M=hooks.useDebounce(C=>{C.target.value==""?(f(false),d([])):r&&C.target.value.trim()!=""&&core.withPost(r,{query:C.target.value}).then(A=>{"items"in A&&core._(A.items).isArray()?(d(A.items),I(C.target.value),P(A.items)):console.error("Action Response should contain items array"),g(null);}).catch(A=>{g(null),d([]);});},250),L=()=>{if(w.current){let C=w.current.getBoundingClientRect(),A=window.innerHeight-C.bottom,$=C.top;if(x.current){let K=x.current;A<K.offsetHeight&&$>A?(K.style.top="auto",K.style.bottom=`${C.height}px`,K.style.maxHeight=`${$-150}px`):(K.style.top=`${C.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${A-150}px`);}}},V=C=>{if(p.length>0){if((C.key==="ArrowDown"||C.key==="ArrowUp")&&(C.preventDefault(),C.stopPropagation()),C.key==="Escape")g(null),f(false),d([]);else if(C.key==="ArrowDown")g(A=>{let $=A===null||A===p.length-1?0:A+1;return _($),$});else if(C.key==="ArrowUp")g(A=>{let $=A===null||A===0?p.length-1:A-1;return _($),$});else if(C.key==="Enter"&&S!==null){let A=p[S];b.current&&(b.current.value=A,f(false),d([]));}}},E=C=>{b.current&&(b.current.value=C,f(false),d([]));},_=C=>{let A=p[C];if(A&&b.current&&(b.current.value=A,b.current.setSelectionRange(A.length,A.length)),x.current){let K=x.current.children[C];K&&K.scrollIntoView({block:"nearest"});}},U=C=>{w.current&&!w.current.contains(C.target)&&(f(false),d([]));},k=()=>{b.current&&b.current.value===v&&(d(T),g(null),L());};return react.useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",U),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",U);}),[]),react.useEffect(()=>{L();},[p]),jsxRuntime.jsxs(c,{style:i,ref:w,className:`--autocomplete --${o.size||W.Small} flex aic rel ${m}`.trim(),children:[jsxRuntime.jsx(oe,{ref:b,autoComplete:"off",onChange:M,onKeyDown:V,onFocus:k,...l}),jsxRuntime.jsx(c,{className:"--arrow rel flex aic jcc",children:p.length>0?O.arrowUp:O.arrowDown}),p.length>0&&jsxRuntime.jsx(Me,{id:h,ref:x,className:"--suggestion-list flex cols abs",items:p.map((C,A)=>({label:C,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(C);},className:S===A?"--current":"",animate:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:core.clamp(.02*A,.02,.5)}}))})]})});qr.displayName="Zuz.AutoComplete";var Di=qr;var Xr=react.forwardRef((o,n)=>{let e=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:t,className:s,rest:u}=R(o,r);return !u.src||u.src==""?null:jsxRuntime.jsx("img",{ref:r,style:t,className:`${s} flex`,...u})});Xr.displayName="Zuz.Image";var Je=Xr;var Yr=react.forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:l,as:m,alt:i,color:a,style:f,...p}=o,[d,b,w]=hooks.useImage(e??"",s,u),{className:x,style:h,rest:S}=R({fx:l,as:m});return jsxRuntime.jsx(c,{className:`--avatar --${r||W.Small} --${(t||zo.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:a||"var(--primary)",...f,...h},...S,children:e?jsxRuntime.jsx(Je,{src:d,crossOrigin:s,referrerPolicy:u,...p}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Yr.displayName="Zuz.Avatar";var Zi=Yr;var Ki=({size:o=5,type:n="dead",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:l}=R(t);return jsxRuntime.jsxs(c,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsxRuntime.jsx(c,{fx:{transition:G.FadeIn,curve:F.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(ge,{})}),jsxRuntime.jsx(c,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Wi=Ki;var sl=[{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 o=new Date,n=o.getDay();return dateFns.addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return dateFns.format(dateFns.addDays(o,(6-n)%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)}],al=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Qr=react.forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:l,rest:m}=R(s),[i,a]=react.useState(e||new Date),f=dateFns.startOfMonth(i),p=dateFns.endOfMonth(i),d=dateFns.startOfWeek(f),b=dateFns.endOfWeek(p),w=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:b}),[d,b]),x=g=>{t?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},S=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(c,{as:`--calendar flex --${r||"sm"} ${l}`,style:u,children:[jsxRuntime.jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:al(sl).map(g=>{let v=g.getDate();return jsxRuntime.jsxs(z,{onClick:()=>x(v),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:g.label}),jsxRuntime.jsx(H,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(c,{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(z,{onClick:h,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(H,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),w.map((g,v)=>{let I=dateFns.isSameMonth(g,i),T=dateFns.isSameDay(g,i),P=dateFns.isToday(g);return jsxRuntime.jsx(z,{disabled:!I,onClick:()=>x(g),as:["--calendar-day --calendar-dd",`${T?"--calendar-dd-selected":""}`,`${P?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${v}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Qr.displayName="Zuz.Calendar";var io=Qr;var Jr=(n=>(n.Line="line",n))(Jr||{});var tn=react.forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:m,animated:i,animDuration:a=2,animDelay:f=0,padding:p=0,type:d,...b}=o,{className:w,style:x,rest:h}=R(b),S=react.useRef(null),g=hooks.useResizeObserver(S.current?.parentElement||S),v=typeof r=="number"?r:g.width,I=typeof t=="number"?t:g.height,T={width:v,height:I},P=react.useId(),{pathD:N,areaPathD:M}=hooks.useLineChart(e,T,p+(u||2)),L=react.useRef(null),V=react.useRef(null),[E,_]=react.useState(0),[U,k]=react.useState(0);return react.useEffect(()=>{i&&(L.current&&_(L.current.getTotalLength()),V.current&&k(V.current.getTotalLength()));},[i,N,M,v,I]),jsxRuntime.jsx(c,{ref:S,as:`--chart --${d||"line"}-chart ${w}`.trim(),style:{...x,width:r,height:t},...h,children:v>0&&I>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${v} ${I}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:P,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:l}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:m})]})}),jsxRuntime.jsx("path",{ref:V,d:M,fill:`url(#${P})`,stroke:"none",style:i?{strokeDasharray:U,strokeDashoffset:U}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:U,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:N,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:E,strokeDashoffset:E}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});tn.displayName="Zuz.Chart";var ul=tn;var on=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(on||{}),rn=(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))(rn||{});var sn=react.forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),react.useEffect(()=>{e&&u.current&&(t?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:l,style:m,rest:i}=R(s);return jsxRuntime.jsx(c,{className:`--progress ${t?"--animated":""} flex rel ${l}`.trim(),style:m,...i,children:jsxRuntime.jsx(c,{ref:u,className:"--bar rel"})})});sn.displayName="Zuz.ProgressBar";var mo=sn;var an=react.forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...m}=o,{className:i,style:a,rest:f}=R(m);return jsxRuntime.jsx(c,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxRuntime.jsxs(c,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(c,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(J,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(mo,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(c,{as:"--bubble-image",children:jsxRuntime.jsx(Je,{src:r.source})}):null:null,jsxRuntime.jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(u)}),t=="me"&&jsxRuntime.jsx(J,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});an.displayName="Zuz.Bubble";var bl=an;var ln=react.forwardRef((o,n)=>{let{style:e,className:r,rest:t}=R(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...t})});ln.displayName="Zuz.Label";var et=ln;var mn=react.forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:l,checked:m,onSwitch:i,...a}=o,[f,p]=react.useState(m||false),d=react.useRef(null),{variant:b}=X(true);return react.useImperativeHandle(n,()=>({setChecked(w,x=true){p(w),d.current&&(d.current.checked=w),x&&i&&i(w,s||"cb");},toggle(w=true){d.current&&(d.current.checked=!f),w&&i&&i&&i(!f,s||"cb"),p(!f);}})),jsxRuntime.jsxs(et,{className:`--${(t||ye.Default).toLowerCase()} ${!t||t==ye.Default?"--checkbox":"--switch"} --${l||b||W.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!t||t==ye.Default)&&O.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:w=>{i&&i(w.target.checked,s||"cb"),p(w.target.checked);}})]})});mn.displayName="Zuz.CheckBox";var tt=mn;var El=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:l,...m}=n,i=react.useRef(null),{className:a,style:f,rest:p}=R({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},i),d=react.useMemo(()=>{let w=new Set;return s.split(",").forEach(x=>{if(x.includes("-")){let[h,S]=x.split("-").map(Number);for(let g=h;g<=S;g++)w.add(g);}else x&&w.add(Number(x));}),w},[s]),b=react.useMemo(()=>{let w=e.split(`
|
|
10
|
-
`);for(;
|
|
11
|
-
${
|
|
12
|
-
<span class="--line-content">${
|
|
13
|
-
</div>`}).join("")},[e,d]);return jsxRuntime.jsx(c,{as:`--code-block ${a}`,style:f,...m,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:b}})})})},Bl=El;var pn=({onSelect:o,meta:n,selected:e})=>{let r=react.useRef(null),{index:t,icon:s,label:u}=n,[l,m]=react.useState({x:0,width:0}),i=hooks.useDelayed();return react.useLayoutEffect(()=>{if(i&&r.current){let{width:a,x:f}=r.current.getBoundingClientRect();m({x:f,width:a}),e&&o(t,a,f,n,true);}},[i,r.current]),react.useEffect(()=>{e&&o(t,l.width,l.x,n,false);},[e]),jsxRuntime.jsxs(z,{onClick:()=>o(t,l.width,l.x,n,false),ref:r,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(Y,{name:s,as:"--segment-icon"}):jsxRuntime.jsx(c,{as:"--segment-icon flex aic jcc",children:s}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(c,{className:"--segment-label",children:u||`Item ${t}`})]})};pn.displayName="SelectTabItem";var un=pn;var dn=react.forwardRef((o,n)=>{let{fx:e,items:r,selected:t,variant:s,onSwitch:u,...l}=o,[m,i]=react.useState(t||0),a=react.useRef(false),f=react.useRef(m),{className:p,style:d,rest:b}=R(l),w=react.useRef(null),x=react.useRef(null),{variant:h}=X(true),S=(g,v,I,T,P)=>{if((P||m!=g&&m!=-2)&&(i(g),f.current=m,a.current&&u?.(T)),w.current){let N=x.current?.getBoundingClientRect();w.current.style.setProperty("--w",`${v}px`),w.current.style.setProperty("--x",`${N?I-N.left:I}px`);}};return react.useImperativeHandle(n,()=>({setSelected:g=>{typeof g=="number"&&g!=m&&i(g);}}),[m]),react.useEffect(()=>{a.current=true;},[]),jsxRuntime.jsxs(c,{ref:x,"data-selected":m,className:`${p} --segmented --${s||h||W.Medium} flex aic rel`,style:d,...b,children:[jsxRuntime.jsx(c,{ref:w,className:"--segment-tab abs"}),r.map((g,v)=>jsxRuntime.jsx(un,{onSelect:S,selected:m==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});dn.displayName="Zuz.SelectTabs";var ot=dn;var xn=react.forwardRef((o,n)=>{let{type:e,...r}=o,t=hooks.useDelayed(),{colorScheme:s,setColorScheme:u}=At(),l=react.useCallback(()=>{u(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:m,style:i}=R(r),a=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !t||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(ot,{className:`--color-scheme --${e}`,onSwitch:({tag:p})=>{u(p);},selected:f,items:a,...r}):jsxRuntime.jsx(z,{onClick:l,style:i,as:`--color-scheme-switch --${r.variant||W.Small} ${m}`.trim(),children:s=="system"?O.colorSchemeSystem:s=="light"?O.colorSchemeLight:O.colorSchemeDark})});xn.displayName="Zuz.ColorScheme";var Wl=xn;var bn=react.forwardRef((o,n)=>{let[e,r]=react.useState("wait"),{title:t,message:s,acceptLabel:u,rejectLabel:l,position:m}=o,i=async a=>{r(a==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(a));};return react.useEffect(()=>{let a=localStorage.getItem("--ccnt");r(a?a=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(c,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:F.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${m||ee.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:t||"This site uses cookies"}),jsxRuntime.jsx(H,{as:"--message",children:s||"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(c,{as:"--footer flex aic",children:[jsxRuntime.jsx(z,{onClick:a=>i(1),as:"--accept",children:u||"Accept All"}),jsxRuntime.jsx(z,{onClick:a=>i(0),as:"--reject",children:l||"Cancel"})]})]})});bn.displayName="Zuz.CookiesConsent";var Xl=bn;var Sn=react.forwardRef((o,n)=>{let {type:e,value:r,min:t,max:s,step:u,onChange:l,roundValue:m,...i}=o,{className:a,style:f,rest:p}=R(i),d=react.useRef(u||.01).current,b=react.useRef(t||0).current,w=react.useRef(s||1).current,x=react.useRef(r||0).current,h=react.useRef(null),S=react.useRef(null),g=react.useRef(null);react.useRef(null);let I=react.useRef(null),T=react.useRef(null),P=($,K,D)=>($-K)/(D-K)*100,N=$=>{if(S.current){let K=parseFloat($.currentTarget.value),D=P(K,parseFloat($.currentTarget.min),parseFloat($.currentTarget.max));S.current.style.setProperty("--value",`${D}`),S.current.setAttribute("data-value",`${K}`),l&&l(m?+K.toFixed(2):K);}},[M,L]=react.useState(false),[V,E]=react.useState(0),[_,U]=react.useState(0),k=$=>{L(true),E($.clientX),U(S.current?parseFloat(S.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},C=$=>{if(M){let K=$.clientX-V,D=Math.max(b,Math.min(_+K*d,w));S.current&&(S.current.setAttribute("data-value",`${D}`),T.current.textContent=m?D.toFixed(2):D.toString(),l&&l(m?+D.toFixed(2):D));}},A=()=>{L(false),document.body.style.cursor="auto";};return react.useEffect(()=>{S.current&&S.current.style.setProperty("--value",h.current?`${P(parseFloat(h.current.value),parseFloat(h.current.min),parseFloat(h.current.max))}`:x.toString());},[]),react.useEffect(()=>(M?(document.addEventListener("mousemove",C),document.addEventListener("mouseup",A)):(document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A)),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A);}),[M]),jsxRuntime.jsx(c,{ref:S,"data-value":x||0,className:`--slider --${e||mt.Default} flex rel ${a}`.trim(),style:{...f},children:mt.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(H,{ref:T,onMouseDown:k,className:"--slider-text",children:x||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{ref:I,className:"--slider-track abs fill"}),jsxRuntime.jsx(c,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:h,onInput:N,className:"abs fill",tabIndex:0,type:e||mt.Default,defaultValue:x||0,step:d,max:w,min:b})]})})});Sn.displayName="Zuz.Slider";var go=Sn;var Tn=react.forwardRef((o,n)=>{let{src:e,shape:r,size:t,...s}=o,{style:u,className:l,rest:m}=R(s),{canvasRef:i,crop:a,setScale:f,handleMouseDown:p,handleMouseUp:d,handleMouseMove:b}=hooks.useImageCropper(e,t||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return a()},setScale(w){f(w);}})),jsxRuntime.jsxs(c,{as:`--cropper --${r||hooks.CropShape.Circle} ${l}`,style:u,...m,children:[jsxRuntime.jsx("canvas",{ref:i,width:t||200,height:t||200,onMouseDown:p,onMouseUp:d,onMouseLeave:d,onMouseMove:b}),jsxRuntime.jsx(c,{as:"--cropper-slider",children:jsxRuntime.jsx(go,{onChange:w=>f(w),min:0,max:1,step:.01,value:1})})]})});Tn.displayName="Zuz.Cropper";var tm=Tn;var rm=(e=>(e.Circle="circle",e.Square="square",e))(rm||{});var Rn=react.forwardRef((o,n)=>{let{items:e,maxItems:r}=o,t=react.useMemo(()=>{let l=typeof e=="string",m=l?[]:e;return l&&e.split(",").forEach(i=>{m.push({label:i});}),m},[e]),u=react.useMemo(()=>r&&r>0&&t.length>r-1,[t,r])?[...t.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...t.slice(-r)]:t;return jsxRuntime.jsx(Me,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(c,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:u.map((l,m,i)=>l.ID=="."?jsxRuntime.jsx(c,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(c,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${m}`))}):jsxRuntime.jsxs(z,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!i[m+1],children:[l.icon&&jsxRuntime.jsx(Y,{as:"--crumb-icon",name:l.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${m}`))})});Rn.displayName="Zuz.Crumb";var sm=Rn;var En=react.forwardRef((o,n)=>{let{icon:e,defaultValue:r,value:t,size:s,variant:u,numeric:l,type:m,onConfirm:i,...a}=o,[f,p]=react.useState(false),[d,b]=react.useState(r||null),{style:w,className:x,rest:h}=R(a),S=react.useRef(null),g=react.useRef(null),{reposition:v}=Ue(g,{direction:ee.Bottom,offset:2}),I=P=>{l&&(P.currentTarget.value=P.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let P=N=>{let M=N.target,L=S.current?.contains(M),V=g.current?.contains(M);!L&&!V&&p(false);};return f&&document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P);}},[f]),react.useEffect(()=>{let P=N=>{N.key==="Escape"&&f&&(p(false),S.current?.focus());};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[f]);let T=()=>{p(true);};return react.useEffect(()=>{f&&v();},[f,v]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(c,{as:`--date-picker ${u?`--${u}`:""} rel flex aic ${x}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(Y,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(J,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):t||"",className:`--input ${u?`--${u}`:""} flex`.trim(),style:w,onFocus:T,onInput:I,autoComplete:"new-password",onKeyDown:P=>{P.key=="Enter"&&i?.(P.currentTarget.value);},...h}),jsxRuntime.jsx(c,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${u?`--${u}`:""}`,children:jsxRuntime.jsx(io,{defaultValue:d,onChange:P=>{b(P),p(false);}})})]})})});En.displayName="Zuz.DatePicker";var mm=En;var Bn=react.forwardRef((o,n)=>{let{icon:e,variant:r,position:t}=o;return jsxRuntime.jsx(z,{className:`--fab fixed --${r||W.Large} --${t||"bottomright"}`,children:e||O.plus})});Bn.displayName="Zuz.Fab";var fm=Bn;var Ln=o=>{let{names:n,strength:e}=o,r={[ct.Gooey]:t=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:t||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-${ct.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[ct.Gooey]).map(t=>r[t](e))})})};Ln.displayName="Zuz.Filters";var hm=Ln;var Te=null,ie=null,kn=react.forwardRef((o,n)=>{let{title:e,message:r,transition:t,curve:s,speed:u,type:l,actionPosition:m,spinner:i,loadingMessage:a,onShow:f,onHide:p,...d}=o,{className:b,style:w,rest:x}=R(d),[h,S]=react.useState(e||""),[g,v]=react.useState(r||""),[I,T]=react.useState(null),[P,N]=react.useState(l||me.Default),M=react.useMemo(()=>core.uuid(12),[]),[L,V]=react.useState(false),E=react.useRef(null),_=react.useRef(null),[U,k]=react.useState(false),[C,A]=react.useState(true),$=react.useRef(null),K=g;react.useImperativeHandle(n,()=>({setLoading(Z){k(Z);},showDialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),q&&v(q),Z&&S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),v(q),S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},error(Z,q){this.show(Z,q,me.Error);},warn(Z,q){this.show(Z,q,me.Warn);},success(Z,q){this.show(Z,q,me.Success);},show(Z,q,te){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),_.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${_.current} scale(.9)`.trim();},50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=_.current||"",ie=null;},500)),Te=setTimeout(()=>{V(false),Te=null,ie=null;},(q||4)*1e3),N(te||me.Default),v(Z),V(true),f?.();},hide(){V(false),p?.();}}));let D=react.useMemo(()=>{let Z={when:L,duration:u||.3,delay:.1};if(P==me.Dialog){if(t){let{from:q,to:te}=We(t,20);return {from:q,to:te,curve:s||F.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:F.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:F.Spring,...Z}},[L,P]);return react.useEffect(()=>{$.current&&clearTimeout($.current),L?A(true):$.current=setTimeout(()=>A(false),1e3);},[L]),P==me.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{when:L}),jsxRuntime.jsxs(c,{className:`--sheet --sheet-${P.toLowerCase()} ${L?"is-visible":""} ${b} fixed`.trim(),style:w,fx:D,...x,ref:E,children:[jsxRuntime.jsx(Ne,{when:U,spinner:i,message:a}),jsxRuntime.jsxs(c,{className:"--head flex aic rel",children:[jsxRuntime.jsx(c,{className:`--${h?"title":"dot"} flex aic rel`,children:h||""}),jsxRuntime.jsx(z,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(c,{className:`--body flex aic rel ${I?"":"--no-action"}`.trim(),children:C?K:null}),I&&jsxRuntime.jsx(c,{className:`--footer flex aic rel ${m?m==Lt.Center?"jcc":"":"jce"}`.trim(),children:I.map((Z,q)=>jsxRuntime.jsx(z,{onClick:te=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${M}-action-${Z.key}`))})]})]}):jsxRuntime.jsx(c,{className:`--sheet --sheet-${P.toLowerCase()} ${b} abs`.trim(),style:w,...x,fx:D,ref:E,children:L?g:null})}),nt=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;kn.displayName="Zuz.Sheet";var vm=kn;var On=({ref:o,...n})=>{let{name:e,cover:r,spinner:t,errors:s,action:u,children:l,withData:m,beforeSubmit:i,onSubmit:a,onError:f,onSuccess:p,resetOnSuccess:d,...b}=n,{className:w,style:x,rest:h}=R(b),[S,g]=react.useState(false),v=react.useRef(null),I=react.useRef(null),T=react.useRef(null),P=jt(),N=react.useCallback(C=>v.current?v.current.querySelectorAll(C):[],[v.current]),M=C=>({name:C.name||C.getAttribute("name")||C.getAttribute("data-name"),required:C.required?true:C.getAttribute("data-required")?C.getAttribute("data-required")=="true":false,with:C.with||C.getAttribute("with")}),L=C=>{let A=[];return C.querySelectorAll(".--input").forEach($=>{A.push($.value);}),A.join("")},V=react.useCallback(C=>{let{required:$}=M(C);if($){if(C.type=="checkbox"&&C.checked==false)return false;if(C.classList.contains("--otp")){let D=L(C);if(D==""||D.length<parseInt(C.getAttribute("data-size")))return false}if(C.classList.contains("--select")&&C.querySelector("button.--selected").dataset.value=="-1"||C.value=="")return false}if(C.getAttribute("with")){let D=C.getAttribute("with");switch(D.includes("@")&&(D=D.split("@")[0],D=="match"&&(D=be.MatchField)),D.toUpperCase()){case be.IPV4:return core._(C.value).isIPv4();case be.IPV6:return core._(C.value).isIPv6();case be.Email:return core._(C.value).isEmail();case be.Uri:try{return new URL(C.value),!0}catch{return false}case be.Password:return console.log("Add FORMVALIDATION.Password"),false;case be.MatchField:let[Z,q,te]=C.getAttribute("with").split("@"),j=document.querySelector(`[name=${q.trim()}]`);if(!j)return false;switch(te||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=C.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&C.classList.contains("--otp")&&L(j)!=L(C))return false;if(j&&j.value!=C.value)return false;break}break;default:return true}}return true},[v.current]),E=react.useCallback(()=>{let C={},A={},$=null,K=null;if(Array.from(N("[name]")).forEach(D=>{let{name:Z,required:q,with:te}=M(D),j=true;(q||te)&&(j=V(D)),C[Z]={valid:j,value:D.type=="checkbox"?D.checked==true?D.value:false:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value},A[Z]=D.type=="checkbox"?D.checked==true:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value,j?D.classList.remove("input-with-error"):($==null&&s&&($=D,K=s[Z]),D.classList.add("input-with-error"));}),$){let D=$;if(D.classList.contains("--otp"))for(let Z of Array.from(D.querySelectorAll(".--input"))){let q=Z;if(q.value==""){q.focus();break}}else D.focus();}return {error:$!=null,errorMsg:K||"Fix errors to continue...",data:C,payload:A}},[v.current]),_=react.useCallback(()=>{let{error:C,errorMsg:A,payload:$}=E();C?P.error(A):u?react.startTransition(async()=>{i&&i($),nt(r)?r.setLoading(true):g(true),P.clearAll(),core.withPost(u,{...$,...m||{}}).then(K=>{let D=K;nt(r)?r.setLoading(false):g(false),d&&Array.from(N("[name]")).forEach(Z=>{Z instanceof HTMLInputElement&&(Z.value="");}),p?p(D):(P.clearAll(),P.success(D.message||"Redirecting..."));}).catch(K=>{nt(r)?r.setLoading(false):g(false),f?f(K):P.error(K.message||"We cannot process your request at this time.");});}):a&&a($);},[u,I.current,v.current]),U=react.useCallback(()=>{let C=N("[type=submit]");!C||C.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):C.forEach(A=>{A.addEventListener("click",_);});},[v.current]),k=react.useMemo(()=>react$1.addPropsToChildren(l,C=>C.props.type=="submit",C=>({ref:T})),[l]);return react.useImperativeHandle(o,()=>({setLoading(C){if(C){I.current?.hide();try{P.clearAll();}catch{}}g(C);},showError(C){typeof C=="string"?P.error(C):I.current.error(C,4);},hideError(){I.current.hide();try{P.clearAll();}catch{}},init(){U();},submit(){_();}})),react.useEffect(U,[]),jsxRuntime.jsxs(c,{ref:v,style:x,className:`--form flex rel ${w} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!nt(r)&&jsxRuntime.jsx(Ne,{message:r?r.message||void 0:"working",spinner:t,color:r&&"color"in r?r.color:"#ffffff",when:S}),k]})};On.displayName="Zuz.Form";var Bm=On;var Dn=o=>{let {ref:n,cols:e,rows:r,gap:t,gapX:s,gapY:u,align:l,justify:m,inline:i,flow:a,autoCols:f,autoRows:p,template:d,...b}=o;react.useRef(null);let {className:x,style:h,rest:S}=R(b),g=I=>typeof I=="number"?`repeat(${I}, 1fr)`:I,v={display:i?"inline-grid":"grid",gridTemplateColumns:g(e),gridTemplateRows:g(r),gap:t,columnGap:s,rowGap:u,alignItems:l,justifyContent:m==="between"?"space-between":m==="around"?"space-around":m,gridAutoFlow:a,gridAutoColumns:f,gridAutoRows:p,gridTemplateAreas:d,...h};return jsxRuntime.jsx(c,{ref:n,as:`--grid ${x}`.trim(),style:v,...S})};Dn.displayName="Zuz.Grid";var Om=Dn;var Hn=o=>typeof o=="string"&&o.includes("+"),Vn={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"},An={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 zn=react.forwardRef(({children:o,keys:n,variant:e},r)=>{let t=react.useMemo(()=>{if(Hn(n)){let s=null;return {keys:String(n).split("+").reduce((l,m,i,a)=>(a[i+1]?l.push(m):s=m.toUpperCase(),l),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(c,{as:`--keyboard-keys --${e||W.Small} flex aic`,children:[(Array.isArray(t.keys)?t.keys:[t.keys]).map(s=>jsxRuntime.jsx("abbr",{title:An[s],children:Vn[s]},s)),jsxRuntime.jsx(J,{children:t?.children??o})]})});zn.displayName="Zuz.KeyboardKeys";var So=zn;var Fn=react.forwardRef((o,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:t,variant:s}=o;return jsxRuntime.jsxs(c,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:F.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||W.Small} fixed flex`,children:[jsxRuntime.jsx(c,{className:"--ico",children:e?O[le.Success]:O[le.Error]}),jsxRuntime.jsx(H,{as:"--message",children:e?r||"internet connection restored :)":t||"no internet connection"})]})});Fn.displayName="Zuz.NetWorkManager";var _m=Fn;var Co=(e=>(e.Table="table",e.Gooey="gooey",e))(Co||{});var Wn=react.forwardRef((o,n)=>{let{itemCount:e,itemsPerPage:r,startPage:t,pageRange:s,paginationStyle:u,breakLabel:l,prevLabel:m,nextLabel:i,hash:a,loading:f,seperator:p,renderOnZeroPageCount:d,onPageChange:b,...w}=o,x=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(E=>`${core.toHash(E,a||6,x)}${p||""}${x}`,[x]),S=react.useMemo(()=>l||"...",[l]),[g,v]=react.useState({id:a?t?typeof t=="number"?h(t):t:1:t||1,label:t||1}),{style:I,className:T,rest:P}=R(w),N=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]),L=react.useMemo(()=>{let E=[],_=Math.max(N(g)-(s||2),1),U=Math.min(N(g)+(s||2),M);_>1&&E.push({id:a?h(1):1,label:1}),_>2&&E.push({id:-1,label:S});for(let k=_;k<=U;k++)E.push({id:a?h(k):k,label:k});return U<M-1&&E.push({id:-1,label:S}),U<M&&E.push({id:a?h(M):M,label:M}),E},[g]),V=react.useCallback(E=>{let _=E;+_.label<1||+_.label>M||(v(_),b?.(_));},[e,r,g]);return L.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(c,{ref:n,as:`--pagination --pgt-${u||"table"} flex aic w:100% jcc ${T}`,children:[jsxRuntime.jsx(c,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:S}]).map((E,_,U)=>jsxRuntime.jsx(z,{disabled:E.id==-1||N(g)==+E.label,className:(typeof E=="string"?E:E.label)==N(g)?"--current-page":"",onClick:k=>V(E),children:typeof E=="string"?E:E.label},`--pg-${_}-${E.id}`))}),jsxRuntime.jsx(c,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(N(g)-1)*r+1} - `,`${Math.min(N(g)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(c,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(z,{disabled:N(g)<=1,onClick:E=>V({id:a?h(N(g)-1):N(g)-1,label:N(g)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(z,{disabled:L.length<=1||N(g)==N(L[L.length-1]),onClick:E=>V({id:a?h(N(g)+1):N(g)+1,label:N(g)+1}),children:O.chevronRightOutline})]})]})});Wn.displayName="Zuz.Pagination";var Po=Wn;var Gn=react.forwardRef((o,n)=>{let{strenthMeter:e,onChange:r,...t}=o;"type"in t&&delete t.type;let{style:s,className:u,rest:l}=R(t),[m,i]=react.useState(false),[a,f]=react.useState(""),p=react.useMemo(()=>core.checkPasswordStrength(a),[a]),d=hooks.useDebounce(b=>{e&&f(b.target.value),r&&r(b);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(c,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:n,type:m?"text":"password",className:u,onChange:d,...l}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:()=>i(b=>!b),className:"--toggle flex aic jcc abs",children:m?O.eye:O.eyeSlash})]}),e&&jsxRuntime.jsxs(c,{as:`flex aic --password-meter --pb-score-${p.score}`,style:s,children:[jsxRuntime.jsxs(c,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(c,{as:`--pbar ${p.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:p.result})]})]})});Gn.displayName="Zuz.Password";var Qm=Gn;var Xn=react.forwardRef((o,n)=>{let{size:e,length:r,mask:t,...s}=o,u=react.useRef([]),l="pinput",m=false,i={};"with"in s&&(i={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(m=true,delete s.required);let{style:a}=R(s),f=p=>{let d=p.currentTarget,b=u.current[parseInt(d.dataset.index)+1],w=u.current[parseInt(d.dataset.index)-1];d.value.length===1&&b?b.focus():d.value.length===0&&w&&w.focus();};return react.useEffect(()=>{u.current=u.current.slice(0,e||r);},[e||r]),jsxRuntime.jsx(c,{name:l,style:a,className:"--otp flex aic rel","data-required":m,"data-size":e||r||4,...i,children:Array(e||r||4).fill(1).map((p,d)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":d,ref:b=>{u.current[d]=b;},numeric:true,onChange:f,maxLength:1,placeholder:t?"\xB7":"0",type:t?"password":"text",...s},`pin-${d}`))})});Xn.displayName="Zuz.PinInput";var tc=Xn;var Yn=react.forwardRef((o,n)=>{let{children:e,className:r,name:t,required:s,type:u,value:l,variant:m,checked:i,onSwitch:a,...f}=o,[p,d]=react.useState(i||false),{variant:b}=X(true),w=react.useRef(null);return jsxRuntime.jsxs(et,{className:`${r} --${(u||Mt.Default).toLowerCase()} --radio${!u||u==Mt.Default?"":"card"} --${m||b||W.Small} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(oe,{ref:w,defaultChecked:p,value:l||"rd",type:"radio",className:"abs",name:t,required:s||false,onChange:x=>{a&&a(x.target.checked,l||"cb"),d(x.target.checked);}}),jsxRuntime.jsx(c,{className:"--dot rel",children:jsxRuntime.jsx(c,{className:"--rod abs abc"})}),jsxRuntime.jsx(c,{className:"--value",children:e})]})});Yn.displayName="Zuz.Radio";var sc=Yn;var Qn=react.forwardRef((o,n)=>{let{fx:e,withStyle:r,as:t,reverse:s=false,searchIcon:u=O.search,hideSearchIcon:l=false,clearIcon:m=O.close,hideClearIcon:i=false,onChange:a,onClear:f,...p}=o,{style:d,className:b}=R({as:o.as}),[w,x]=react.useState(""),{variant:h}=X(true),S=react.useRef(null),g=react.useMemo(()=>jsxRuntime.jsx(z,{tabIndex:-1,onClick:T=>I(),className:"--send flex aic jcc",variant:o.variant||W.Small,children:w!==""?!i&&(typeof m=="string"?jsxRuntime.jsx(Y,{name:m,as:"--search-action"}):m):!l&&(typeof u=="string"?jsxRuntime.jsx(Y,{name:u,as:"--search-action"}):u)}),[s,u,i,m,l]);"type"in o&&delete o.type;let v=T=>{x(T.target.value),a?.(T.target.value);},I=T=>{w.trim()!==""&&(x(""),a?.(""),S.current&&(S.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{style:d,className:`--search ${s?"--search-rev":""} --${o.variant||h||W.Medium} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${b}`.trim(),children:[s&&g,jsxRuntime.jsx(oe,{ref:S,onChange:v,...p}),o.shortcut&&jsxRuntime.jsx(So,{keys:o.shortcut,as:"abs"}),!s&&g]})});Qn.displayName="Zuz.Search";var fc=Qn;var jn=({value:o,updateValue:n,o:e})=>jsxRuntime.jsxs(z,{onClick:r=>n(e),as:"--select-option-item",className:o&&(typeof e=="string"?e:e.value)==(typeof o=="string"?o:o.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})]});jn.displayName="Option";var es=jn;var os=({ref:o,...n})=>{let{selected:e,options:r,label:t,name:s,variant:u,search:l,searchPlaceholder:m,maxHeight:i,arrowDownIcon:a=O.arrowDown,arrowUpIcon:f=O.arrowUp,onChange:p,...d}=n,[b,w]=react.useState(e?typeof e=="string"?r.find(k=>k.value===e):e:r[0]),[x,h]=react.useState(false),[S,g]=react.useState(null),v=react.useRef(null),I=react.useRef(null),T=react.useRef(null),P=react.useId(),N=react.useMemo(()=>s||P,[]),{reposition:M}=Ue(T,{direction:Bt.Bottom,offset:2}),{variant:L}=X(true),{className:V,style:E,rest:_}=R(d),U=k=>{w(k),h(false),p&&p(k);};return react.useImperativeHandle(o,()=>({setSelected:k=>{if(typeof k=="string"){let C=r.find(A=>A.value===k);C&&w(C);}else w(k);},getValue:()=>b||null})),react.useEffect(()=>{if(!x)return;let k=()=>{M();};return window.addEventListener("scroll",k,true),window.addEventListener("resize",M),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",M);}},[x,M]),react.useEffect(()=>{if(!x){I.current&&(I.current.value=""),g(null);return}I.current?.focus(),M();let k=A=>{T.current&&!T.current.contains(A.target)&&h(false);},C=setTimeout(()=>{document.addEventListener("click",k);},0);return ()=>{clearTimeout(C),document.removeEventListener("click",k);}},[x,M]),jsxRuntime.jsxs(c,{className:`--select --${u||L} ${s?`--${s}`:""} rel`.trim(),name:N,children:[jsxRuntime.jsxs(z,{ref:v,"data-value":b?typeof b=="string"?b:b.value:b||"-1",className:`--selected flex aic rel ${V}`.trim(),withLabel:false,style:E,onClick:k=>{k.stopPropagation(),h(C=>!C);},..._,children:[jsxRuntime.jsx(H,{className:"--label",children:b?typeof b=="string"?b:b.label:t||"Choose"}),jsxRuntime.jsx(c,{className:"--svg-arrow rel flex aic jcc",children:x?typeof f=="string"?jsxRuntime.jsx(Y,{name:f,as:"--search-action"}):f:typeof a=="string"?jsxRuntime.jsx(Y,{name:a,as:"--search-action"}):a})]}),jsxRuntime.jsxs(c,{id:N,className:"--options-list flex cols abs","aria-hidden":!x,style:{maxHeight:i||"auto"},ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:x,duration:.05},children:[l&&jsxRuntime.jsx(c,{as:"--select-search --sticky",children:jsxRuntime.jsx(oe,{ref:I,onChange:k=>{g(k.target.value==""?null:k.target.value);},className:"--search-input",placeholder:m||"Search..."})}),(S==null?r:r.filter(k=>k.label.toLowerCase().includes(S.toLowerCase())||k.value.toLowerCase().includes(S.toLowerCase()))).map(k=>jsxRuntime.jsx(es,{updateValue:U,value:b,o:k},`option-${(typeof k=="string"?k:k.label).replace(/\s+/g,"-")}-${typeof k=="string"?k:k.value}`))]})]})};os.displayName="Zuz.Select";var bc=os;var rs=react.forwardRef((o,n)=>jsxRuntime.jsx(tt,{type:ye.Switch,...o,ref:n}));rs.displayName="Zuz.Switch";var vc=rs;var ss=o=>{let{idx:n,id:e,as:r,weight:t,style:s,value:u,render:l,resize:m,sortBy:i,sortable:a,onSort:f}=o,[p,d]=react.useState(0),b=()=>{a&&(f?.(String(e),p==1?-1:1),d(w=>w==1?-1:1));};return jsxRuntime.jsxs(c,{style:{flex:t||1,...s},as:`--col flex aic ${r||""} ${a?"--sortable":""}`,onClick:b,children:[jsxRuntime.jsx(c,{children:u}),n==-1&&a&&i==e&&jsxRuntime.jsx(c,{as:"--arrow flex aib",children:p==1?O.arrowUp:O.arrowDown})]})};ss.displayName="Zuz.Column";var Ct=ss;var is=o=>{let{index:n,pubsub:e,schema:r,data:t,ids:s,styles:u,animate:l,sortBy:m,selectable:i,tableRef:a,loading:f,rowClassName:p,onSort:d,onRowClick:b,onSelect:w,onContextMenu:x}=o,h=hooks.useDelayed(),S=react.useMemo(()=>({transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(n+1)}),[]),g=react.useRef(null),v=(T,P)=>{n==-1?e.emit(`ALL_ROWS_${T?"CHECKED":"UNCHECKED"}`,T):(w&&w(t,T),e.emit(`ROW_${T?"CHECKED":"UNCHECKED"}`,T,P));},I=(T,P,N)=>jsxRuntime.jsx(Ct,{idx:T,id:P,as:"--selector",pubsub:e,value:jsxRuntime.jsx(tt,{value:N,ref:g,onSwitch:v,type:ye.Default})});return react.useEffect(()=>{let T=(L,V)=>{g.current?.setChecked(L,false);},P=(L,V)=>{let E=false;a?.current&&a.current.querySelectorAll(".--row").forEach(_=>{let U=_;if(!U.classList.contains("--row-head")){let k=U.querySelector(".--selector input[type=checkbox]");k&&k.checked&&!E&&(E=k.checked);}}),g.current.setChecked(E,false);},N=L=>{g.current?.setChecked(L,false),w&&w(t,L);},M=L=>{g.current?.setChecked(L,false),w&&w(t,L);};return n==-1?(e.on("ROW_CHECKED",T),e.on("ROW_UNCHECKED",P),()=>{e.off("ROW_CHECKED",T),e.off("ROW_UNCHECKED",P);}):(e.on("ALL_ROWS_CHECKED",N),e.on("ALL_ROWS_UNCHECKED",M),()=>{e.off("ALL_ROWS_CHECKED",N),e.off("ALL_ROWS_UNCHECKED",M);})},[]),jsxRuntime.jsxs(c,{onContextMenu:T=>x?x(T,t):null,onClick:T=>b?b(T,o.data):()=>{},...l?{fx:{...S,when:h}}:{},as:`--row flex aic ${b?"--row-clickable":""} ${n==-1?"--row-head":""} ${p||""}`,children:[n==-1&&r.map((T,P)=>{let{renderWhenHeader:N,render:M,value:L,...V}=T;return jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&I(-1,`--selector-${T.id}`,"all"),jsxRuntime.jsx(Ct,{idx:-1,onSort:d,sortBy:m,value:L,...V,pubsub:e,style:u[T.id]})]},`--col-${T.id}`)}),f&&n>-1&&jsxRuntime.jsx(c,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&t&&r.map((T,P)=>jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&I(P,`--selector-${T.id}`,T.id.toString()),s.includes(String(T.id))?jsxRuntime.jsx(Ct,{pubsub:e,idx:P,id:String(T.id),style:u[String(T.id)],value:T.render?T.render(t,n):t[String(T.id).includes(".")?String(T.id).split(".").reverse()[0]:T.id]}):null]},`--${String(T.id)}-val-${P}`))]})};is.displayName="Zuz.Row";var Tt=is;var ps=(o,n)=>{let{schema:e,rows:r,rowCount:t,rowsPerPage:s,currentPage:u,pagination:l,paginationHash:m,showPaginationOnZeroPageCount:i,animateRows:a,header:f,rowClassName:p,selectableRows:d,hoverable:b,sortBy:w,loading:x,loadingRowCount:h,loadingMessage:S,spinner:g,emptyMessage:v,onSort:I,onRowClick:T,onRowSelectToggle:P,onPageChange:N,onRowContextMenu:M,...L}=o,V=react.useRef(null),E=react.useMemo(()=>e.reduce((ne,Q)=>(ne[Q.id]={flex:Q.weight||1,...Q.w&&{width:Q.w},...Q.maxW&&{maxWidth:Q.maxW},...Q.minW&&{minWidth:Q.minW},...Q.h&&{height:Q.h},...Q.maxH&&{maxHeight:Q.maxH},...Q.minH&&{minHeight:Q.minH}},ne),{}),[e]),_=react.useMemo(()=>Object.keys(E),[e]),U=react.useMemo(()=>f??true,[f]),{style:k,className:C,rest:A}=R(L),$=react.useRef(null),K=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(r.map(()=>core.uuid(8))),[Z,q]=react.useState(w||null),[te,j]=react.useState(S||"loading"),pe=react.useMemo(()=>!x&&r&&r.length==0,[x,r]),de=react.useCallback(()=>v?typeof v=="function"?jsxRuntime.jsx(v,{}):v:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,r]);react.useEffect(()=>{D.current=r.map(()=>core.uuid(8));},[r]);let It=(ne,Q)=>{q(ne),I?.(ne,Q);},Nt=(t||(r?r.length:0))/(s||10),Ie=react.useMemo(()=>i||Nt>1?jsxRuntime.jsx(Po,{hash:m,ref:V,renderOnZeroPageCount:i,onPageChange:N,paginationStyle:"table",startPage:u,itemCount:t||(r?r.length:0),itemsPerPage:s||10}):null,[u,t]);return react.useImperativeHandle(n,()=>({setLoading(ne){}})),jsxRuntime.jsxs(c,{as:`--table ${b??true?"--hoverable":""} flex cols rel ${C}`,ref:$,children:[U==true&&jsxRuntime.jsx(Tt,{sortBy:Z,onSort:It,tableRef:$,pubsub:K,selectable:d,index:-1,schema:e,loading:true,styles:E}),x&&jsxRuntime.jsxs(c,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:g||re.Simple}),te&&jsxRuntime.jsx(H,{as:"--table-loading-message",children:te})]}),x&&Array(h||5).fill({}).map((ne,Q)=>jsxRuntime.jsx(Tt,{tableRef:$,index:Q,pubsub:K,schema:e,styles:E,loading:true,animate:a,onRowClick:T},`--trow-loading-${Q}-${e[0].id}`)),!x&&r&&r.map((ne,Q)=>jsxRuntime.jsx(Tt,{tableRef:$,pubsub:K,loading:false,index:Q,schema:e,ids:_,styles:E,animate:a,data:ne,onRowClick:T,rowClassName:p,selectable:d,onSelect:P,onContextMenu:M},`--trow-${D.current[Q]||Q}-${e[0].id}`)),pe&&de(),jsxRuntime.jsx(c,{"aria-hidden":!l||!Ie,...a?{fx:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(r.length+1),when:!x&&r&&l&&Ie!=null}}:{},as:"--row flex aic --row-footer",children:l&&Ie?Ie:null})]})};ps.displayName="Zuz.Table";var Oc=react.forwardRef(ps),Dc=Oc;var Vc=({ref:o,...n})=>{let{title:e,items:r}=n,[t,s]=react.useState(0),u=(l,m,i)=>{l.preventDefault(),s(m),document.getElementById(i)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(c,{ref:o,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:e}),jsxRuntime.jsx(Me,{items:r.map((l,m)=>jsxRuntime.jsx("a",{className:t==m?"--toc-active":"",style:{anchorName:t===m?"--toc-active":"none",color:t==m?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:i=>u(i,m,l.tag),href:`#${l.tag}`,children:l.label}))})]})},Ac=Vc;var us=({isActive:o,transitionType:n,speed:e,width:r,render:t,content:s,onHeightChange:u})=>{let l=react.useRef(null),m=hooks.useResizeObserver(l);react.useEffect(()=>{o&&m.height>0&&u(m.height);},[o,m.height]);let i=react.useMemo(()=>{let a={flexShrink:0,height:"fit-content"};return n==="fade"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:o?1:0}:n==="scale"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:a},[o,n,r,e]);return jsxRuntime.jsx(c,{ref:l,style:{...i},className:"--content",children:t||o?s:null})};us.displayName="Zuz.TabBody";var fs=us;var hs=({ref:o,...n})=>{let{tabs:e,speed:r=.3,prerender:t=true,variant:s,tabStyle:u="fixed",onChange:l,transitionType:m="slide",...i}=n,[a,f]=react.useState(0),p=react.useRef(null),d=hooks.useResizeObserver(p),b=react.useMemo(()=>core.uuid(8),[]),[w,x]=react.useState("auto"),h=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(o,()=>({setTab:P=>f(P)}));let S=react.useMemo(()=>e.map(P=>({...P,key:P.key||core.uuid(8)})),[e]),{style:g,className:v,rest:I}=R({as:`flex cols w-full no-overflow ${i.as||""}`,...i}),T=()=>{if(!h)return {opacity:0};switch(m){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${a*d.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(c,{ref:p,style:g,className:`--tabview --${u} flex cols ${v}`,children:[jsxRuntime.jsx(ot,{as:"--tabview-head",onSwitch:P=>{f(P.index);let N=S.find(M=>M.tag==P.tag);N&&N.onSelect&&(N.onSelect(N,P.index),l?.(N,P.index));},selected:a,items:S.reduce((P,N,M)=>(P.push({icon:N.icon,index:M,label:N.label,tag:N.tag}),P),[])}),jsxRuntime.jsx(c,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:w,transition:h?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:h?1:0},children:jsxRuntime.jsx(c,{className:"--track",style:{...T()},children:S.map((P,N)=>jsxRuntime.jsx(fs,{isActive:N===a,transitionType:m,speed:r,width:d.width,render:t||N===a,onHeightChange:M=>N===a&&x(M),content:P.body},`tab-body-${P.key||N}-${b}`))})})]})};hs.displayName="Zuz.TabView";var qc=hs;var Jc=({ref:o,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:t="zuz ~ ",variant:s,...u})=>{let[l,m]=react.useState([{type:"output",content:r}]),[i,a]=react.useState(""),f=react.useRef(null),p=react.useRef(null),{variant:d}=X(true);react.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[l]);let b=v=>{let I=typeof v=="string"?{type:"output",content:v}:v;m(T=>{let P=[...T,I];return P.length>1e3?P.slice(-1e3):P});},w=()=>m([]);react.useImperativeHandle(o,()=>({write:b,clear:w}));let x=async v=>{let[I,...T]=v.split(" "),P=I.toLowerCase();return n&&n[P]?await n[P](T):e?await e(v):`command not found: ${I}`},h=v=>{let I=/\u001b\[(\d+)m/g,T=[],P={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},N=0,M="#d4d4d4",L=false,V;for(;(V=I.exec(v))!==null;){let _=v.slice(N,V.index);_&&T.push({text:_,color:M,bold:L});let U=V[1];U==="0"?(M="#d4d4d4",L=false):U==="1"?L=true:P[U]&&(M=P[U]),N=I.lastIndex;}let E=v.slice(N);return E&&T.push({text:E,color:M,bold:L}),T},S=(v,I)=>v.includes("\x1B")?h(v).map((T,P)=>jsxRuntime.jsx(J,{style:{color:T.color||"#d4d4d4",fontWeight:T.bold?"bold":"normal"},children:T.text},`--terminal-msg-${P}-${T.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(J,{style:{color:I==="error"?"#ff5f56":I==="command"?"#00ff00":"#d4d4d4"},children:v}),g=async v=>{if(v.key==="Enter"&&i.trim()){let I=i.trim(),T=[...l,{type:"command",content:`${t}${I}`}];a(""),m(T);let P=await x(I);m(N=>[...N,{type:"output",content:P}]);}};return jsxRuntime.jsxs(c,{as:`--zuz-terminal --${s||d||W.Medium} flex cols ${u.className}`,onClick:()=>p.current?.focus(),children:[jsxRuntime.jsx(c,{ref:f,className:"--terminal-log",children:l.map((v,I)=>jsxRuntime.jsx(c,{children:jsxRuntime.jsx(H,{children:S(v.content,v.type)})},I))}),jsxRuntime.jsxs(c,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:t}),jsxRuntime.jsx(oe,{ref:p,className:"--zuz-term-input",autoFocus:true,value:i,variant:s||d||W.Medium,onChange:v=>a(v.target.value),onKeyDown:g})]})]})},jc=Jc;var ep=({meta:o})=>jsxRuntime.jsxs(z,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(Y,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:o.label})]}),tp=({position:o,onSelect:n,commands:e,visible:r})=>jsxRuntime.jsx(c,{"aria-hidden":!r,fx:{transition:G.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...o},children:e.map(t=>jsxRuntime.jsx(ep,{meta:t},`cmd-${t.label.replace(/\s+/,"-")}`))}),ws=tp;var Cs=react.forwardRef((o,n)=>{let{autoResize:e,maxHeight:r,variant:t,resize:s="none",command:u,commands:l,onInput:m,cmd:i,renderDropdown:a,value:f,defaultValue:p,...d}=o,b=react.useRef(null),w=react.useRef(null),{variant:x}=X(true),{style:h,className:S,rest:g}=R(d),{showDropdown:v,dropdownPosition:I,handleKeyDown:T,handleInput:P,handleCommandSelect:N}=hooks.useCommandActions({command:u,commands:l,cmd:i,ref:b}),M=react.useCallback(()=>{let V=b.current;!V||!e||(w.current&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(r){let _=parseInt(r.toString(),10);isNaN(_)||(E=Math.min(E,_));}V.style.height=`${E}px`,V.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),L=V=>{m?.(V),P(V),M();};return react.useEffect(()=>{M();},[f,p,M]),react.useEffect(()=>{e&&b.current&&M();},[e,M]),react.useEffect(()=>()=>{w.current&&cancelAnimationFrame(w.current);},[]),jsxRuntime.jsxs(c,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${t||x||W.Medium} flex ${S}`.trim(),style:{...h,resize:s,height:e?"auto":h?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:T,onInput:L,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),b.current=V;},value:f,defaultValue:p,...g}),a?a({show:v,position:I,commands:l||[],onSelect:N}):l&&l.length>0&&jsxRuntime.jsx(ws,{visible:v,commands:l,onSelect:N,position:I})]})});Cs.displayName="Zuz.TextArea";var ap=Cs;var Ps=react.forwardRef((o,n)=>{let{as:e,value:r,color:t,direction:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(a){m.toString().length!==a.toString().length&&i(a);},setValue(a){if(this.updateValue(a),l.current){let f=a.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((p,d)=>{let b=f[d];if(p instanceof HTMLElement){p.setAttribute("data-value",b);let w=p.querySelector(".--wheel-char-track");w instanceof HTMLElement&&(w.style.setProperty("--v",b),w.offsetWidth);}});}}})),react.useEffect(()=>{i(r||0);},[r]),jsxRuntime.jsxs(c,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:l,...u,children:[(m||0).toString().split("").map((a,f)=>isNaN(parseInt(a,10))?jsxRuntime.jsx(J,{className:"--wheel-char wheel-char-symbol grid",children:a},`wheel-char-symbol-${f}`):jsxRuntime.jsx(J,{"data-value":a,className:`--wheel-char grid ${f>(m||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(J,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":a},children:[jsxRuntime.jsx(J,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((p,d)=>jsxRuntime.jsx(J,{children:p},`${f}--${d}`)),jsxRuntime.jsx(J,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),t&&jsxRuntime.jsx(c,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${t}, transparent, transparent, transparent, ${t})`}})]})});Ps.displayName="Zuz.TextWheel";var fp=Ps;var Es=react.forwardRef((o,n)=>{let{title:e,position:r,margin:t,children:s,...u}=o,{style:l,className:m,rest:i}=R(u),[a,f]=react.useState(false),p=react.useMemo(()=>r||ee.Top,[]),d=react.useRef(null),b=react.useRef(null),w=g=>{},x=typeof ResizeObserver<"u"?new ResizeObserver(w):{observe:()=>{},unobserve:()=>{}},h=hooks.useDimensions(),S=react.useMemo(()=>{if(!b.current)return {left:0,top:0};let g=b.current.previousElementSibling;if(g){let v=g.getBoundingClientRect();switch(x.observe(g),p){case ee.Top:return {left:v.left+v.width/2,top:v.top-(t||25)};case ee.Bottom:return {left:v.left+v.width/2,top:v.top+(t||25)};case ee.Left:return {left:v.left-v.width/2,top:v.top+v.height/2};case ee.Right:return {left:v.right,top:v.top+v.height/2};default:return {left:0,top:0}}}},[b.current,h,x]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[s,jsxRuntime.jsx(c,{ref:b,style:{left:S?.left+"px",top:S?.top+"px"},className:`--tooltip --${r||ee.Top} fixed ${m}`.trim(),fx:{from:p==ee.Bottom||p==ee.Top?{opacity:0,x:"-50%",y:p==ee.Top?-5:5}:{opacity:0,y:"-50%",x:p==ee.Right?15:-25},to:p==ee.Bottom||p==ee.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:p==ee.Right?10:-20},curve:F.EaseInOut,when:a},children:jsxRuntime.jsx(H,{className:"--text rel",children:e})})]})});Es.displayName="Zuz.ToolTip";var yp=Es;var Do=react.forwardRef((o,n)=>{let{as:e,meta:r,nodes:t,icons:s,onSelect:u,treeTag:l,selected:m,roots:i,expanded:a,...f}=o,{tag:p,label:d,icon:b,under:w,isHead:x}=r,h=react.useMemo(()=>i.includes(p),[i]),[S,g]=react.useState(a),v=()=>{localStorage.setItem(`--tn${l}-${p}`,S?"0":"1"),g(!S);};react.useEffect(()=>{a||h&&!localStorage.getItem(`--tn${l}-${p}`)?(localStorage.setItem(`--tn${l}-${p}`,"1"),g(true)):g(localStorage.getItem(`--tn${l}-${p}`)=="1");},[]);let I=react.useMemo(()=>t.filter(T=>T.under==p),[t,p]);return jsxRuntime.jsxs(c,{className:`--treenode ${h?"--is-root":""} --treenode-${p} flex cols`,children:[jsxRuntime.jsxs(c,{className:`--node --node-${p} flex aic ${m==p?" --selected":""}`,children:[jsxRuntime.jsx(z,{skeleton:f.skeleton,onClick:v,className:"--node-aro-btn",disabled:I.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:"--node-aro-icon",name:I.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):I.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(z,{className:"--node-meta flex aic",onClick:T=>u(p),children:[(s?.nodeOpen&&s?.nodeClose||h&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:`--node-icon ${h?"--icon-root":""}`,name:b||(S?h&&s?.rootOpen||s.nodeOpen:h&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${h?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),S&&I.length>0&&jsxRuntime.jsx(c,{className:`--sub-node tree-sub-node-${p} flex cols`,children:I.map(T=>jsxRuntime.jsx(Do,{treeTag:l,selected:m,onSelect:u,icons:s,roots:i,expanded:T.expanded||false,meta:T,nodes:t},`--node-${T.tag}`))})]})});Do.displayName="TreeItem";var Ls=Do;var ks=react.forwardRef((o,n)=>{let{as:e,nodes:r,onNodeSelect:t,tag:s,icons:u,roots:l,selected:m,...i}=o,[a,f]=react.useState(m);react.useImperativeHandle(n,()=>({getSelected:()=>a}),[t]);let p=d=>{f(d),t&&t(d);};return react.useEffect(()=>{a!=m&&f(m);},[m]),jsxRuntime.jsx(c,{className:"--treeview flex cols",children:r.filter(d=>l.includes(d.tag)).map(d=>jsxRuntime.jsx(Ls,{treeTag:s?`-${s}`:"",selected:a,onSelect:b=>p(b),icons:u,meta:d,roots:l,expanded:d.expanded||false,skeleton:i.skeleton,nodes:r},`--node-${d.tag}`))})});ks.displayName="Zuz.TreeView";var Ip=ks;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
-
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return
|
|
9
|
+
document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(Ft,{children:t})]})},Jo=(t,s)=>{if(Xs)return;let e;try{e=localStorage.getItem(t)||void 0;}catch{}return e||s};var er=({ref:t,...s})=>{let{style:e,...n}=s,{style:o,className:r,rest:m}=I(n);return jsxRuntime.jsx("span",{ref:t,style:e,className:r,...m})};er.displayName="Zuz.Span";var j=er;var or=react.forwardRef((t,s)=>{let{name:e,pathCount:n,variant:o,color:r,...m}=t,{variant:i}=q(true),{className:c,style:l,rest:a}=I(m);return jsxRuntime.jsx("div",{style:{color:r,...l},className:`icon-${e} --icon --${o||i||K.Small} ${c}`.trim(),ref:s,...a,children:Array(n||0).fill(0).map((f,u)=>jsxRuntime.jsx(j,{className:`path${u+1}`},`${e}-layer-${u}`))})});or.displayName="Zuz.Icon";var X=or;var re={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var rr=t=>{let{type:s,variant:e,color:n,...o}=t,{className:r,style:m,rest:i}=I(o),{spinner:c}=q(true),l=()=>{switch(s||c?.type||re.Simple){case re.Simple:return null;case re.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(p,{as:"--bar --bar1"}),jsxRuntime.jsx(p,{as:"--bar --bar2"}),jsxRuntime.jsx(p,{as:"--bar --bar3"})]});case re.Roller:return null}};return jsxRuntime.jsx(p,{className:`${r} --spinner --${(s||c?.type||re.Simple).toLowerCase()} --${e||c?.variant||K.Small}`.trim(),style:{...m},...i,children:l()})};rr.displayName="Zuz.Spinner";var ge=rr;var dt={Loading:"loading",Normal:"normal"};var sr=({ref:t,...s})=>{let{reset:e,kind:n="solid",variant:o,icon:r,iconSize:m,children:i,withLabel:c,spinner:l,state:a,disabled:f,...u}=s,{style:d,className:C,rest:x}=I(u),{variant:v}=q(true);return jsxRuntime.jsxs("button",{className:`--button --${n} --${o||v} flex aic ${e?"":"jcc"} ${r?"--with-icon":""} ${C}`.trim().replace(/\s+/g," "),style:d,ref:t,disabled:a==dt.Loading||s.skeleton?.enabled||f,...x,children:[a==dt.Loading&&jsxRuntime.jsx(ge,{variant:o||v,type:l||re.Simple}),(!a||a==dt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r&&jsxRuntime.jsx(X,{variant:m,name:r}),c===true?jsxRuntime.jsx(j,{children:i}):i]})]})};sr.displayName="Zuz.Button";var $=sr;var ir=react.forwardRef((t,s)=>{let{h:e,html:n,children:o,lines:r,...m}=t,{style:i,className:c,rest:l}=I(m),a=`h${t.h||1}`;return jsxRuntime.jsx(a,{ref:s,style:i,className:c,...l,children:n?jsxRuntime.jsx(j,{dangerouslySetInnerHTML:{__html:n}}):o})});ir.displayName="Zuz.Text";var D=ir;var sa=t=>{let{label:s,labelColor:e,icon:n,iconColor:o,index:r,className:m,onSelect:i}=t;return s=="-"?jsxRuntime.jsx(p,{className:"--line"}):jsxRuntime.jsxs($,{reset:true,onClick:c=>i?.(t),className:`--item ${m||""}`.trim(),children:[jsxRuntime.jsx(p,{as:"--icon",children:jsxRuntime.jsx(X,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(D,{className:"--lbl flex aic",style:e?{color:e}:{},children:s})]})},lr=sa;var pr=({ref:t,...s})=>{let{id:e,as:n,fx:o,offsetX:r,offsetY:m,parent:i,event:c,arrow:l,when:a,items:f,header:u,footer:d,origin:C=Ke.TopRight,...x}=s,[v,h]=react.useState(false),[w,g]=react.useState(f||[]),{position:S,targetRef:N,calculatedAnchor:P}=hooks.useAnchorPosition(i?.current,c,{offsetX:r,offsetY:m,preferredAnchor:C}),R=i&&S.top>i.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",k=react.useMemo(()=>{let G=P.toLowerCase();return G.includes("left")?"--arrow-left":G.includes("right")?"--arrow-right":"--arrow-center"},[P]),B=S.top!==0||S.left!==0;react.useEffect(()=>{a&&B?h(true):a||h(false);},[a,B]);let{className:V,style:E,rest:z}=I(x),Z=ae({...o?.transition?{transition:o.transition??U.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??_.EaseInOut,duration:o?.duration??.05,when:v&&B});return jsxRuntime.jsxs(p,{ref:N,className:`--contextmenu ${l||i!=null?`--has-arrow ${R} ${k}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!v,style:{...E,...Z.style,top:S.top,left:S.left,visibility:B?"visible":"hidden",transformOrigin:P},...z,children:[typeof u=="function"?react.createElement(u):u,w.map((G,b)=>jsxRuntime.jsx(lr,{...G,index:b},`context-${G.label.toLowerCase()}-${b}`)),typeof d=="function"?react.createElement(d):d]})};pr.displayName="Zuz.ContextMenu";var Kt=pr;var ur=react.forwardRef((t,s)=>{let{children:e,fx:n,when:o,fxDelay:r,fxStep:m,classToIgnore:i,...c}=t,l=q(true),a=hooks.useDelayed(),f=n||l?.group?.fx,u=r||l?.group?.fxDelay,d=m||l?.group?.fxStep,C=i||l?.group?.classToIgnore||"--ignore",x=react.useMemo(()=>f?react$1.addPropsToChildren(e,v=>{if(v.type===react.Fragment)return false;let h=v.props||{},w="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",S=typeof g=="string"&&g.includes(C);return !w&&!S},v=>({fx:{...f,delay:(u||0)+v*(d||.1),when:o??(n?.when||a)}})):e,[e,o,a,f]);return jsxRuntime.jsx(p,{className:"--group",ref:s,...c,children:x})});ur.displayName="Zuz.Group";var Wt=ur;var dr=react.forwardRef((t,s)=>{let{message:e,spinner:n,spinnerSize:o,color:r,when:m,hideMessage:i,...c}=t,{className:l,style:a,rest:f}=I(c),{spinner:u}=q(true);return "when"in t&&t.when==false?null:jsxRuntime.jsxs(Wt,{fx:{transition:U.SlideInBottom,curve:_.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:o||u?.variant||K.Small,type:n||u?.type||re.Simple}),!i&&jsxRuntime.jsx(D,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});dr.displayName="Zuz.Cover";var he=dr;var gr=react.forwardRef((t,s)=>{let{when:e,...n}=t;return jsxRuntime.jsx(p,{ref:s,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:U.FadeIn,when:e},...n})});gr.displayName="Zuz.Overlay";var Ne=gr;var Sa=({action:t,render:s=true,message:e=""})=>jsxRuntime.jsx(p,{as:`--body flex aic rel ${t?"":"--no-action"}`.trim(),children:s?e:null}),hr=Sa;var Ta=({action:t,actionPosition:s,dialogID:e,variant:n})=>jsxRuntime.jsx(p,{as:`--footer flex aic rel ${s?s==Wo.Center?"jcc":"":"jce"}`.trim(),children:t.map((o,r)=>jsxRuntime.jsx($,{variant:n,onClick:m=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${e}-action-${o.key}`))}),yr=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"})," "]}),[le.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"})}),[le.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"})}),[le.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"})}),[le.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"})]})},O=Pa;var Ra=({title:t="Alert",onClose:s})=>jsxRuntime.jsxs(p,{as:"--head flex aic rel",children:[jsxRuntime.jsx(p,{as:`--${t?"title":"dot"} flex aic jcc rel`,children:t}),jsxRuntime.jsx($,{onClick:e=>s(),className:"--closer abs center-v",children:O.close})]}),wr=Ra;var Tr=({ref:t,...s})=>{let{index:e,id:n,title:o,message:r,transition:m,curve:i,speed:c,type:l,action:a,actionPosition:f,spinner:u,loadingMessage:d,variant:C,inBackground:x,forceClose:v,forceLoading:h,onClose:w,onShow:g,onHide:S,...N}=s,P=react.useMemo(()=>core.uuid(12),[]),[T,R]=react.useState(o||""),[k,B]=react.useState(r||""),[V,E]=react.useState(l||He.Dialog),[z,Z]=react.useState(false),[G,b]=react.useState(true),[M,A]=react.useState(a||null),[W,H]=react.useState(false),{variant:F,spinner:Y,dialog:J}=q(true),ee=C||J?.variant||F||K.Small,{style:fe,className:de,rest:Bt}=I(N),Lt=react.useRef(null),De=ae({when:z,duration:c||J?.speed||.3,delay:J?.delay||.1,transition:m||J?.transition||U.SlideInBottom,curve:i||J?.curve||_.EaseInOut,watch:["scale","filter","transform"]}),ne=()=>{Z(false),w(n);};react.useEffect(()=>{E(He.Dialog),B(r),R(T),M&&A(M.reduce((Ao,$o)=>(Ao.push({...$o,key:$o.key||core.uuid(12)}),Ao),[])),Z(true),setTimeout(()=>g?g():()=>{},500);},[]),react.useEffect(()=>{v&&ne();},[v]),react.useEffect(()=>{h!=null&&H(h);},[h]);let Q=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ne,{style:{zIndex:Q},when:z}),jsxRuntime.jsxs(p,{as:`--dialog --${(l??He.Default).toLowerCase()} ${z?"--visible":""} ${de} fixed abc`.trim(),style:{...De.style,zIndex:Q+1,pointerEvents:x==true?"none":"auto",...x==true?{scale:"0.92",filter:"blur(2px)"}:{}},...Bt,ref:Lt,children:[jsxRuntime.jsx(wr,{title:T,onClose:ne}),jsxRuntime.jsx(hr,{message:k,render:G,action:M}),M&&M.length>0&&jsxRuntime.jsx(yr,{variant:ee,action:M,dialogID:P,actionPosition:f}),jsxRuntime.jsx(he,{when:W,spinner:u||J?.spinner||Y?.type||re.Simple,message:d||J?.loadingMessage})]})]})};Tr.displayName="Zuz.Dialog";var Gt=Tr;var qt=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}},qe=new qt;var Pr=react.forwardRef((t,s)=>{let{speed:e,style:n,...o}=t,{rootRef:r,containerRef:m,thumbY:i,thumbX:c,onScrollY:l,onScrollX:a}=hooks.useScrollbar(e||1),{style:f,className:u,rest:d}=I(o);return react.useEffect(()=>{let C=m.current;if(!C)return;let x=()=>{window.dispatchEvent(new Event("resize"));};return C.addEventListener("scroll",x),()=>C.removeEventListener("scroll",x)},[]),jsxRuntime.jsxs(p,{ref:r,className:u.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(p,{as:`--scroll-content ${u}`.trim(),ref:m,style:n||{},children:d.children}),jsxRuntime.jsx(p,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(p,{as:"--scroll-thumb --abs",ref:i,onMouseDown:l})}),jsxRuntime.jsx(p,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(p,{as:"--scroll-thumb --abs",ref:c,onMouseDown:a})})]})});Pr.displayName="Zuz.ScrollView";var Xt=Pr;var Rr=({ref:t,...s})=>{let{id:e,index:n,from:o,speed:r,children:m,margin:i,animation:c,prerender:l,inBackground:a,forceClose:f,forceLoading:u,onClose:d,...C}=s,{drawer:x}=q(true),[v,h]=react.useState(m),[w,g]=react.useState(false),[S,N]=react.useState(l??(x?.prerender||true)),[P,T]=react.useState(false),R=()=>{g(false),d?.(e??-1);},{className:k,style:B,rest:V}=I(C),E=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(R)&&R();}}],[w]);hooks.useShortcuts(E),react.useEffect(()=>{h(m);},[m]),react.useEffect(()=>(w?qe.push(R):qe.pop(R),()=>qe.pop(R)),[w]),react.useEffect(()=>{g(true);},[]),react.useEffect(()=>{f&&R();},[f]),react.useEffect(()=>{u!=null&&T(u);},[u]);let z=o||x?.from||se.Left,Z=react.useMemo(()=>{switch(z){case se.Left:return {from:{x:"-100vw"},to:{x:0}};case se.Right:return {from:{x:"100vw"},to:{x:0}};case se.Top:return {from:{y:"-100vh"},to:{y:0}};case se.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,x?.from]),G=ae({from:{...Z.from,opacity:0},to:{...Z.to,opacity:1},when:w,curve:c||x?.animation||_.EaseInOut,duration:r||x?.speed||.5,watch:["scale","filter"]}),b=react.useMemo(()=>1e4+(n||1)*10,[n]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ne,{onClick:M=>{w&&R();},when:w,style:{zIndex:b}}),jsxRuntime.jsxs(p,{ref:t,"aria-hidden":!w,className:`--drawer flex cols ${k} --${z.toLowerCase()} fixed`,style:{...B,...G.style,"--m":`${i||x?.margin||0}px`,zIndex:b+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...V,children:[o==se.Top||o==se.Bottom?jsxRuntime.jsx(p,{className:"--handle"}):null,jsxRuntime.jsxs(Xt,{as:"rel",children:[S||w?v:null,jsxRuntime.jsx(he,{when:P})]})]})]})};Rr.displayName="Zuz.Drawer";var jt=Rr;var Ir=(r=>(r.Default="default",r.Success="success",r.Error="error",r.Warn="warn",r.Promise="promise",r))(Ir||{}),Nr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Aa=({index:t,id:s,type:e,icon:n,title:o,message:r,duration:m,onClose:i})=>{let c=hooks.useDelayed(),l=hooks.useDelayed(((m||4)-1)*1e3),{toast:a}=q(true),f=ae({when:c&&!l,duration:a?.duration||.2,transition:U.SlideInTop,curve:a?.curve||_.EaseInOut});return react.useEffect(()=>{l&&s&&i?.(s);},[l,s]),jsxRuntime.jsxs(p,{as:`--snack --${e} --snack-${s} ${t>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(p,{as:"--ico flex aic jcc",fx:{transition:U.ScaleIn,curve:_.Spring,delay:.2,when:c&&!l},children:n?jsxRuntime.jsx(X,{name:n,fx:{transition:U.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:c&&!l}}):jsxRuntime.jsx(p,{as:"--no-icon",fx:{transition:U.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:c&&!l}})}),jsxRuntime.jsxs(p,{as:"--meta",children:[jsxRuntime.jsx(D,{as:"--tt",fx:{transition:U.SlideInTop,curve:_.Spring,delay:.3,when:c},children:o||Nr[e]}),jsxRuntime.jsx(D,{as:"--tm",fx:{transition:U.SlideInTop,curve:_.Spring,delay:.4,duration:.5,when:c},children:r})]})]})},eo=Aa;var ce=react.createContext(null),Ka=({ref:t,...s})=>{let n=react.useContext(ce)?.depth??0,[o,r]=react.useState(null),[m,i]=react.useState(false),[c,l]=react.useState([]),a=hooks.useDelayed(),f=react.useRef(0),u=()=>++f.current,d=()=>{i(false),setTimeout(()=>r(null),200);};react.useImperativeHandle(t,()=>({add(h){let w=u(),g={id:w,...h};return l(S=>[...S,g]),w},openMenu(h){i(false),setTimeout(()=>{r({id:u(),type:"menu",props:h}),i(true);},16);},remove(h){l(w=>w.map(g=>g.id===h?{...g,props:{...g.props,forceClose:true}}:g)),o?.id===h&&d();},loading(h,w){l(g=>g.map(S=>S.id===h?{...S,props:{...S.props,forceLoading:w}}:S)),o?.id===h&&d();},clear(h){l(c.filter(w=>w.type!=h));}})),react.useEffect(()=>{if(o&&m){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[o,m,d]);let C=h=>{setTimeout(()=>{l(w=>w.filter(g=>g.id!==h)),o?.id===h&&r(null);},250);},x=react.useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!a)return null;let v=c.filter(h=>h.type=="toast").reverse();return reactDom.createPortal(jsxRuntime.jsxs(p,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[x.map((h,w)=>{let g=w<x.length-1;return h.type==="dialog"?jsxRuntime.jsx(Gt,{onClose:C,index:w,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(jt,{onClose:C,index:w,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),v.length>0&&jsxRuntime.jsx(p,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:v.map((h,w)=>jsxRuntime.jsx(eo,{onClose:C,index:w,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),o&&jsxRuntime.jsx(p,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(Kt,{onClose:d,when:m,...o.props},`menu-${o.id}`)})]}),document.body)},Wa=({children:t})=>{let s=react.useContext(ce),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,m)=>n.current?.loading(r,m),clear:r=>n.current?.clear(r),depth:e,isSubLayer:!!s}),[s]);return jsxRuntime.jsxs(ce.Provider,{value:o,children:[t,jsxRuntime.jsx(Ka,{ref:n})]})},Ft=Wa;var Ga=()=>{let t=react.useContext(ce);if(!t)throw new Error("useDialog must be used inside <LayersProvider>");let s=()=>t.clear("dialog"),e=r=>t.remove(r),n=(r,m)=>t.loading(r,m);return {clearAll:s,show:r=>{let m=t.add({type:"dialog",props:{...r,type:He.Dialog}});return {id:m,setLoading:i=>n(m,i),hide:()=>e(m)}},hide:e}},qa=Ga;var Ya=()=>{let t=react.useContext(ce);if(!t)throw new Error("useToast must be used inside <LayersProvider>");let s=(l,a)=>t.add({type:"toast",props:{...a,type:l}});return {show:(l,a,f,u)=>s("default",{title:l,message:a,icon:f,duration:u}),hide:l=>t.remove(l),success:(l,a,f,u)=>s("success",{title:l,message:a,icon:f,duration:u}),error:(l,a,f,u)=>s("error",{title:l,message:a,icon:f,duration:u}),warn:(l,a,f,u)=>s("warn",{title:l,message:a,icon:f,duration:u}),promise:(l,a,f,u)=>s("promise",{title:l,message:a,icon:f,duration:u}),clearAll:()=>t.clear("toast")}},oo=Ya;var Ja=()=>{let t=react.useContext(ce);if(!t)throw new Error("useDialog must be used inside <LayersProvider>");let s=()=>t.clear("drawer"),e=r=>t.remove(r),n=(r,m)=>t.loading(r,m),o=r=>{let m=t.add({type:"drawer",props:r});return {id:m,setLoading:i=>n(m,i),close:()=>e(m)}};return {clearAll:s,open:r=>o({children:r}),right:r=>o({children:r,from:se.Right}),left:r=>o({children:r,from:se.Left}),top:r=>o({children:r,from:se.Top}),bottom:r=>o({children:r,from:se.Bottom}),close:e}},ja=Ja;var ti=(t,s,e={})=>{let[n,o]=react.useState(null),[r,m]=react.useState(false),{duration:i=.25,curve:c=_.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:a=320}=e;return react.useLayoutEffect(()=>{s&&t.current?(o(t.current.getBoundingClientRect()),m(true)):s||m(false);},[s,t]),{style:ae({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:a,height:"auto",borderRadius:l.to},curve:c,duration:i,when:r&&s}).style,isMeasured:r,sourceRect:n}},oi=ti;var ni=()=>{let t=react.useContext(ce);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:m,offsetY:i,transition:c,curve:l,arrow:a,duration:f,header:u,footer:d})=>{t.openMenu({fx:{transition:c,curve:l,duration:f},parent:n,items:o,origin:r||Ke.TopCenter,offsetX:m,offsetY:i,arrow:a,header:u,footer:d});},hide:t.clear}},si=ni;var Hr=({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:m,rest:i}=I(e,o);return jsxRuntime.jsx("div",{ref:t||n,style:{...r,...s||{}},className:m,...i})};Hr.displayName="Zuz.Box";var p=Hr;var Ar=react.forwardRef((t,s)=>{let{title:e,message:n,...o}=t,[r,m]=react.useState(false);return jsxRuntime.jsxs(p,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs($,{onClick:i=>m(!r),className:`--toggle flex aic ${r?"--open":""}`.trim(),children:[jsxRuntime.jsx(D,{className:"--label flex",children:e}),jsxRuntime.jsx(p,{className:"--arrow flex",children:r?O.arrowUp:O.arrowDown})]}),r&&jsxRuntime.jsx(p,{className:"--detail",children:n})]})});Ar.displayName="Zuz.Accordion";var pi=Ar;var ui=({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(X,{name:s}):s}),zr=ui;var _r=react.forwardRef((t,s)=>{let{items:e,name:n,selected:o,position:r,...m}=t,i=react.useRef(null),[c,l]=react.useState(o||e[0].tag||0),a=react.useCallback(({x:v,y:h})=>{if(i.current){let w=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${v-w.left}`),document.documentElement.style.setProperty("--tip-y",`${h-w.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",f),i.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=react.useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",f),i.current.addEventListener("pointermove",a));},[]);react.useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((v,h)=>h.label.length>v.length?h.label:v,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),i.current?.addEventListener("pointerenter",u));},[]);let{className:d,style:C,rest:x}=I(m);return jsxRuntime.jsxs(p,{ref:i,style:C,className:[`--actionbar flex aic ${d}`,`${!r||r==te.Auto?"rel":`--${r}`}`].join(" ").trim(),...x,children:[e.map((v,h)=>jsxRuntime.jsx(zr,{selected:c===v.tag||o==h,...v,idx:h},`actionbar-action-${v.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(p,{className:"--tip abs",children:jsxRuntime.jsx(p,{className:"--track flex aic",children:e.map(({label:v})=>jsxRuntime.jsx(p,{className:"--lb",children:v},`tool-tip-${v.toLowerCase().replace(/\s+/g,"-")}`))})})]})});_r.displayName="Zuz.ActionBar";var xi=_r;var Zr=react.forwardRef((t,s)=>{let{type:e,icon:n,title:o,message:r,iconSize:m,...i}=t,{className:c,style:l,rest:a}=I(i);return jsxRuntime.jsxs(p,{className:`--alert --${e||le.Info} flex aic ${c}`.trim(),style:l,...a,children:[jsxRuntime.jsx(p,{className:`--icon icon-${n||"auto-matic"}`,style:m?{fontSize:m,width:m,height:m}:{},children:!n&&O[e||le.Info]}),jsxRuntime.jsxs(p,{className:"--meta flex cols",children:[jsxRuntime.jsx(D,{className:`--title ${r?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),r&&jsxRuntime.jsx(D,{className:"--message",h:2,children:r})]})]})});Zr.displayName="Zuz.Alert";var wi=Zr;var Kr=({ref:t,...s})=>{let{variant:e,numeric:n,onConfirm:o,...r}=s,{style:m,className:i,rest:c}=I(r),{variant:l}=q(true),a=f=>{n&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||l} flex ${i}`.trim(),style:m,onInput:a,onKeyDown:f=>{f.key=="Enter"&&o?.(f.currentTarget.value);},ref:t,...c})};Kr.displayName="Zuz.Input";var oe=Kr;var Ur=t=>{let{meta:s,children:e}=t,n=hooks.useDelayed(),{label:o,icon:r,...m}=react.isValidElement(s)?{}:s,{className:i,style:c,rest:l}=I({...m,...m.animate?{animate:{...m.animate,when:n}}:{}});return react.isValidElement(s)?jsxRuntime.jsx("li",{style:c,className:i,children:s}):jsxRuntime.jsxs("li",{style:c,className:i,...l,children:[e,typeof s=="string"?s:o]})};Ur.displayName="Zuz.ListItem";var Gr=Ur;var Xr=react.forwardRef((t,s)=>{let{items:e,variant:n,direction:o,seperator:r,ol:m,...i}=t,{className:c,style:l,rest:a}=I(i),f=m==true?"ol":"ul";return react.createElement(f,{className:`--list --${n||K.Small} flex ${o??"cols"} ${c}`.trim(),style:l,ref:s,...a,children:e.map((u,d,C)=>{let x=`${typeof u=="string"?`li-${String(u)}`:react.isValidElement(u)?`li-${u.key}`||`${d}-${core.MD5(u.toString())}`:u.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Gr,{meta:u}),r&&C[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:r},`spt-${d+1}-${x}`):null]},x)})})});Xr.displayName="Zuz.List";var Le=Xr;var Qr=react.forwardRef((t,s)=>{let{fx:e,action:n,data:o,withStyle:r,onChange:m,...i}=t,{className:c}=I({as:r||""}),{style:l}=I(i),[a,f]=react.useState(false),[u,d]=react.useState(o||[]),C=react.useRef(null),x=react.useRef(null),v=react.useRef(null),h=react.useMemo(()=>i.name||core.uuid(12),[]),[w,g]=react.useState(null),[S,N]=react.useState(null),[P,T]=react.useState([]),k=hooks.useDebounce(b=>{b.target.value==""?(f(false),d([])):n&&b.target.value.trim()!=""&&core.withPost(n,{query:b.target.value}).then(M=>{"items"in M&&core._(M.items).isArray()?(d(M.items),N(b.target.value),T(M.items)):console.error("Action Response should contain items array"),g(null);}).catch(M=>{g(null),d([]);});},250),B=()=>{if(x.current){let b=x.current.getBoundingClientRect(),M=window.innerHeight-b.bottom,A=b.top;if(v.current){let W=v.current;M<W.offsetHeight&&A>M?(W.style.top="auto",W.style.bottom=`${b.height}px`,W.style.maxHeight=`${A-150}px`):(W.style.top=`${b.height+5}px`,W.style.bottom="auto",W.style.maxHeight=`${M-150}px`);}}},V=b=>{if(u.length>0){if((b.key==="ArrowDown"||b.key==="ArrowUp")&&(b.preventDefault(),b.stopPropagation()),b.key==="Escape")g(null),f(false),d([]);else if(b.key==="ArrowDown")g(M=>{let A=M===null||M===u.length-1?0:M+1;return z(A),A});else if(b.key==="ArrowUp")g(M=>{let A=M===null||M===0?u.length-1:M-1;return z(A),A});else if(b.key==="Enter"&&w!==null){let M=u[w];C.current&&(C.current.value=M,f(false),d([]));}}},E=b=>{C.current&&(C.current.value=b,f(false),d([]));},z=b=>{let M=u[b];if(M&&C.current&&(C.current.value=M,C.current.setSelectionRange(M.length,M.length)),v.current){let W=v.current.children[b];W&&W.scrollIntoView({block:"nearest"});}},Z=b=>{x.current&&!x.current.contains(b.target)&&(f(false),d([]));},G=()=>{C.current&&C.current.value===S&&(d(P),g(null),B());};return react.useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",Z),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",Z);}),[]),react.useEffect(()=>{B();},[u]),jsxRuntime.jsxs(p,{style:l,ref:x,className:`--autocomplete --${t.size||K.Small} flex aic rel ${c}`.trim(),children:[jsxRuntime.jsx(oe,{ref:C,autoComplete:"off",onChange:k,onKeyDown:V,onFocus:G,...i}),jsxRuntime.jsx(p,{className:"--arrow rel flex aic jcc",children:u.length>0?O.arrowUp:O.arrowDown}),u.length>0&&jsxRuntime.jsx(Le,{id:h,ref:v,className:"--suggestion-list flex cols abs",items:u.map((b,M)=>({label:b,onClick:A=>{A.preventDefault(),A.stopPropagation(),E(b);},className:w===M?"--current":"",animate:{transition:U.SlideInBottom,curve:_.EaseInOut,delay:core.clamp(.02*M,.02,.5)}}))})]})});Qr.displayName="Zuz.AutoComplete";var Ai=Qr;var Jr=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:m}=I(t,n);return !m.src||m.src==""?null:jsxRuntime.jsx("img",{ref:n,style:o,className:`${r} flex`,...m})});Jr.displayName="Zuz.Image";var je=Jr;var jr=react.forwardRef((t,s)=>{let{src:e,variant:n,type:o,crossOrigin:r,referrerPolicy:m,fx:i,as:c,alt:l,color:a,style:f,...u}=t,[d,C,x]=hooks.useImage(e??"",r,m),{className:v,style:h,rest:w}=I({fx:i,as:c});return jsxRuntime.jsx(p,{className:`--avatar --${n||K.Small} --${(o||Ko.Circle).toLowerCase()} rel flex aic jcc ${v}`.trim(),style:{background:a||"var(--primary)",...f,...h},...w,children:e?jsxRuntime.jsx(je,{src:d,crossOrigin:r,referrerPolicy:m,...u}):jsxRuntime.jsx(D,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});jr.displayName="Zuz.Avatar";var Ui=jr;var Gi=({size:t=5,type:s="dead",label:e="",variant:n=K.Small,loading:o=false,...r})=>{let{style:m,className:i,rest:c}=I(r);return jsxRuntime.jsxs(p,{style:{...core._(e).isEmpty()?{width:`${t+4}px`,height:`${t+4}px`}:{},...m},as:`--badge --${n} --${s} rel flex aic jcc ${i}`.trim(),children:[jsxRuntime.jsx(p,{fx:{transition:U.FadeIn,curve:_.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(ge,{})}),core._(e).isEmpty()?jsxRuntime.jsx(p,{style:{width:`${t}px`,height:`${t}px`},as:`--dot --${s}`}):jsxRuntime.jsx(D,{as:"--label",children:e})]})},qi=Gi;var ll=[{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)}],ml=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)})},tn=react.forwardRef((t,s)=>{let{defaultValue:e,variant:n,onChange:o,...r}=t,{style:m,className:i,rest:c}=I(r),[l,a]=react.useState(e||new Date),f=dateFns.startOfMonth(l),u=dateFns.endOfMonth(l),d=dateFns.startOfWeek(f),C=dateFns.endOfWeek(u),x=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:C}),[d,C]),v=g=>{o?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},w=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(p,{as:`--calendar flex --${n||"sm"} ${i}`,style:m,children:[jsxRuntime.jsx(p,{as:"--calendar-quick-select flex cols flex:1",children:ml(ll).map(g=>{let S=g.getDate();return jsxRuntime.jsxs($,{onClick:()=>v(S),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(D,{as:"flex:1",children:g.label}),jsxRuntime.jsx(D,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(p,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(p,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(D,{as:"flex:1 --calendar-cm bold",children:dateFns.format(l,"MMMM yyyy")}),jsxRuntime.jsx($,{onClick:h,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx($,{onClick:w,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(p,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(D,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),x.map((g,S)=>{let N=dateFns.isSameMonth(g,l),P=dateFns.isSameDay(g,l),T=dateFns.isToday(g);return jsxRuntime.jsx($,{disabled:!N,onClick:()=>v(g),as:["--calendar-day --calendar-dd",`${P?"--calendar-dd-selected":""}`,`${T?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${S}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});tn.displayName="Zuz.Calendar";var mo=tn;var on=(s=>(s.Line="line",s))(on||{});var sn=react.forwardRef((t,s)=>{let{data:e,width:n,height:o,lineColor:r,strokeWidth:m=2,gradientStartColor:i,gradientEndColor:c,animated:l,animDuration:a=2,animDelay:f=0,padding:u=0,type:d,...C}=t,{className:x,style:v,rest:h}=I(C),w=react.useRef(null),g=hooks.useResizeObserver(w.current?.parentElement||w),S=typeof n=="number"?n:g.width,N=typeof o=="number"?o:g.height,P={width:S,height:N},T=react.useId(),{pathD:R,areaPathD:k}=hooks.useLineChart(e,P,u+(m||2)),B=react.useRef(null),V=react.useRef(null),[E,z]=react.useState(0),[Z,G]=react.useState(0);return react.useEffect(()=>{l&&(B.current&&z(B.current.getTotalLength()),V.current&&G(V.current.getTotalLength()));},[l,R,k,S,N]),jsxRuntime.jsx(p,{ref:w,as:`--chart --${d||"line"}-chart ${x}`.trim(),style:{...v,width:n,height:o},...h,children:S>0&&N>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${S} ${N}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:T,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:i}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:c})]})}),jsxRuntime.jsx("path",{ref:V,d:k,fill:`url(#${T})`,stroke:"none",style:l?{strokeDasharray:Z,strokeDashoffset:Z}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:Z,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:B,d:R,fill:"none",stroke:r,strokeWidth:m,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:E,strokeDashoffset:E}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});sn.displayName="Zuz.Chart";var gl=sn;var an=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(an||{}),ln=(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))(ln||{});var cn=react.forwardRef((t,s)=>{let{progress:e,type:n,animated:o,...r}=t,m=react.useRef(null);react.useImperativeHandle(s,()=>({setProgress:a=>{m.current.style.width=`${a*100}%`;}}),[]),react.useEffect(()=>{e&&m.current&&(o?setTimeout(()=>m.current.style.width=`${e*100}%`,500):m.current.style.width=`${e*100}%`);},[e,m.current]);let{className:i,style:c,rest:l}=I(r);return jsxRuntime.jsx(p,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:c,...l,children:jsxRuntime.jsx(p,{ref:m,className:"--bar rel"})})});cn.displayName="Zuz.ProgressBar";var po=cn;var pn=react.forwardRef((t,s)=>{let{text:e,media:n,side:o="me",status:r=1,timeStamp:m=Date.now(),arrow:i=true,...c}=t,{className:l,style:a,rest:f}=I(c);return jsxRuntime.jsx(p,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(p,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${l}`.trim(),style:{...a},...f,children:[e&&jsxRuntime.jsx(D,{className:"--bubble-text",children:e}),n?n.type=="audio"?jsxRuntime.jsxs(p,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(j,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(po,{progress:.7}),jsxRuntime.jsx(D,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsxRuntime.jsx(p,{as:"--bubble-image",children:jsxRuntime.jsx(je,{src:n.source})}):null:null,jsxRuntime.jsxs(p,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(D,{className:"--bubble-stamp tar",children:core.timeSince(m)}),o=="me"&&jsxRuntime.jsx(j,{className:`--bubble-status --bs-${r}`,children:r==0?O.pending:r==1?O.done:r==2?O.doneAll:O.doneAll})]})]})})});pn.displayName="Zuz.Bubble";var Sl=pn;var un=react.forwardRef((t,s)=>{let{style:e,className:n,rest:o}=I(t);return jsxRuntime.jsx("label",{ref:s,style:e,className:n,...o})});un.displayName="Zuz.Label";var tt=un;var fn=react.forwardRef((t,s)=>{let{name:e,required:n,type:o,value:r,size:m,variant:i,checked:c,onSwitch:l,...a}=t,[f,u]=react.useState(c||false),d=react.useRef(null),{variant:C}=q(true);return react.useImperativeHandle(s,()=>({setChecked(x,v=true){u(x),d.current&&(d.current.checked=x),v&&l&&l(x,r||"cb");},toggle(x=true){d.current&&(d.current.checked=!f),x&&l&&l&&l(!f,r||"cb"),u(!f);}})),jsxRuntime.jsxs(tt,{className:`--${(o||be.Default).toLowerCase()} ${!o||o==be.Default?"--checkbox":"--switch"} --${i||C||K.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!o||o==be.Default)&&O.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:f,value:r||"cb",type:"checkbox",className:"abs",name:e,required:n||false,onChange:x=>{l&&l(x.target.checked,r||"cb"),u(x.target.checked);}})]})});fn.displayName="Zuz.CheckBox";var ot=fn;var Ml=({ref:t,...s})=>{let{code:e,lang:n="tsx",showLines:o=false,highlight:r="",as:m,fx:i,...c}=s,l=react.useRef(null),{className:a,style:f,rest:u}=I({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${m}`,fx:i},l),d=react.useMemo(()=>{let x=new Set;return r.split(",").forEach(v=>{if(v.includes("-")){let[h,w]=v.split("-").map(Number);for(let g=h;g<=w;g++)x.add(g);}else v&&x.add(Number(v));}),x},[r]),C=react.useMemo(()=>{let x=e.split(`
|
|
10
|
+
`);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let v=x[0]?.match(/^\s*/)?.[0].length||0,h=x.map(g=>{let S=g.match(/^\s*/)?.[0].length||0,N=Math.min(S,v);return g.slice(N)}),w=[{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 h.map((g,S)=>{let N=g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),P=d.has(S+1),T=[];w.forEach(R=>{N=N.replace(R.re,k=>{let B=`ZUZ_ID_${T.length}_ZUZ`;return T.push(`<span class="--token-${R.name}">${k}</span>`),B});});for(let R=T.length-1;R>=0;R--)N=N.replace(`ZUZ_ID_${R}_ZUZ`,T[R]);return `<div class="--code-line ${o==true?"--with-ln":""} ${P?"--is-highlighted":""}">
|
|
11
|
+
${o==true?`<span class="--line-number">${S+1}</span>`:""}
|
|
12
|
+
<span class="--line-content">${N||" "}</span>
|
|
13
|
+
</div>`}).join("")},[e,d]);return jsxRuntime.jsx(p,{as:`--code-block ${a}`,style:f,...c,children:jsxRuntime.jsx("pre",{ref:t,children:jsxRuntime.jsx("code",{className:`--code --lang-${n}`,dangerouslySetInnerHTML:{__html:C}})})})},kl=Ml;var gn=({onSelect:t,meta:s,selected:e})=>{let n=react.useRef(null),{index:o,icon:r,label:m}=s,[i,c]=react.useState({x:0,width:0}),l=hooks.useDelayed();return react.useLayoutEffect(()=>{if(l&&n.current){let{width:a,x:f}=n.current.getBoundingClientRect();c({x:f,width:a}),e&&t(o,a,f,s,true);}},[l,n.current]),react.useEffect(()=>{e&&t(o,i.width,i.x,s,false);},[e]),jsxRuntime.jsxs($,{onClick:()=>t(o,i.width,i.x,s,false),ref:n,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[r?typeof r=="string"?jsxRuntime.jsx(X,{name:r,as:"--segment-icon"}):jsxRuntime.jsx(p,{as:"--segment-icon flex aic jcc",children:r}):null,m&&String(m).trim()!=""&&jsxRuntime.jsx(p,{className:"--segment-label",children:m||`Item ${o}`})]})};gn.displayName="SelectTabItem";var hn=gn;var yn=react.forwardRef((t,s)=>{let{fx:e,items:n,selected:o,variant:r,onSwitch:m,...i}=t,[c,l]=react.useState(o||0),a=react.useRef(false),f=react.useRef(c),{className:u,style:d,rest:C}=I(i),x=react.useRef(null),v=react.useRef(null),{variant:h}=q(true),w=(g,S,N,P,T)=>{if((T||c!=g&&c!=-2)&&(l(g),f.current=c,a.current&&m?.(P)),x.current){let R=v.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${S}px`),x.current.style.setProperty("--x",`${R?N-R.left:N}px`);}};return react.useImperativeHandle(s,()=>({setSelected:g=>{typeof g=="number"&&g!=c&&l(g);}}),[c]),react.useEffect(()=>{a.current=true;},[]),jsxRuntime.jsxs(p,{ref:v,"data-selected":c,className:`${u} --segmented --${r||h||K.Medium} flex aic rel`,style:d,...C,children:[jsxRuntime.jsx(p,{ref:x,className:"--segment-tab abs"}),n.map((g,S)=>jsxRuntime.jsx(hn,{onSelect:w,selected:c==S,meta:{...g,index:S}},`segment-${g.label}-${S}`))]})});yn.displayName="Zuz.SelectTabs";var rt=yn;var vn=react.forwardRef((t,s)=>{let{type:e,...n}=t,o=hooks.useDelayed(),{colorScheme:r,setColorScheme:m}=_t(),i=react.useCallback(()=>{m(r=="dark"?"light":r=="light"?"system":"dark");},[r]),{className:c,style:l}=I(n),a=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(r),[r]);return !o||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(rt,{className:`--color-scheme --${e}`,onSwitch:({tag:u})=>{m(u);},selected:f,items:a,...n}):jsxRuntime.jsx($,{onClick:i,style:l,as:`--color-scheme-switch --${n.variant||K.Small} ${c}`.trim(),children:r=="system"?O.colorSchemeSystem:r=="light"?O.colorSchemeLight:O.colorSchemeDark})});vn.displayName="Zuz.ColorScheme";var ql=vn;var Cn=react.forwardRef((t,s)=>{let[e,n]=react.useState("wait"),{title:o,message:r,acceptLabel:m,rejectLabel:i,position:c}=t,l=async a=>{n(a==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(a));};return react.useEffect(()=>{let a=localStorage.getItem("--ccnt");n(a?a=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(p,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:_.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${c||te.Left} flex cols`,children:[jsxRuntime.jsx(D,{as:"--title",children:o||"This site uses cookies"}),jsxRuntime.jsx(D,{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(p,{as:"--footer flex aic",children:[jsxRuntime.jsx($,{onClick:a=>l(1),as:"--accept",children:m||"Accept All"}),jsxRuntime.jsx($,{onClick:a=>l(0),as:"--reject",children:i||"Cancel"})]})]})});Cn.displayName="Zuz.CookiesConsent";var Jl=Cn;var Rn=react.forwardRef((t,s)=>{let {type:e,value:n,min:o,max:r,step:m,onChange:i,roundValue:c,...l}=t,{className:a,style:f,rest:u}=I(l),d=react.useRef(m||.01).current,C=react.useRef(o||0).current,x=react.useRef(r||1).current,v=react.useRef(n||0).current,h=react.useRef(null),w=react.useRef(null),g=react.useRef(null);react.useRef(null);let N=react.useRef(null),P=react.useRef(null),T=(A,W,H)=>(A-W)/(H-W)*100,R=A=>{if(w.current){let W=parseFloat(A.currentTarget.value),H=T(W,parseFloat(A.currentTarget.min),parseFloat(A.currentTarget.max));w.current.style.setProperty("--value",`${H}`),w.current.setAttribute("data-value",`${W}`),i&&i(c?+W.toFixed(2):W);}},[k,B]=react.useState(false),[V,E]=react.useState(0),[z,Z]=react.useState(0),G=A=>{B(true),E(A.clientX),Z(w.current?parseFloat(w.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},b=A=>{if(k){let W=A.clientX-V,H=Math.max(C,Math.min(z+W*d,x));w.current&&(w.current.setAttribute("data-value",`${H}`),P.current.textContent=c?H.toFixed(2):H.toString(),i&&i(c?+H.toFixed(2):H));}},M=()=>{B(false),document.body.style.cursor="auto";};return react.useEffect(()=>{w.current&&w.current.style.setProperty("--value",h.current?`${T(parseFloat(h.current.value),parseFloat(h.current.min),parseFloat(h.current.max))}`:v.toString());},[]),react.useEffect(()=>(k?(document.addEventListener("mousemove",b),document.addEventListener("mouseup",M)):(document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",M)),()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",M);}),[k]),jsxRuntime.jsx(p,{ref:w,"data-value":v||0,className:`--slider --${e||ct.Default} flex rel ${a}`.trim(),style:{...f},children:ct.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(D,{ref:P,onMouseDown:G,className:"--slider-text",children:v||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(p,{ref:N,className:"--slider-track abs fill"}),jsxRuntime.jsx(p,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:h,onInput:R,className:"abs fill",tabIndex:0,type:e||ct.Default,defaultValue:v||0,step:d,max:x,min:C})]})})});Rn.displayName="Zuz.Slider";var xo=Rn;var Nn=react.forwardRef((t,s)=>{let{src:e,shape:n,size:o,...r}=t,{style:m,className:i,rest:c}=I(r),{canvasRef:l,crop:a,setScale:f,handleMouseDown:u,handleMouseUp:d,handleMouseMove:C}=hooks.useImageCropper(e,o||200,n||hooks.CropShape.Circle);return react.useImperativeHandle(s,()=>({getCropped(){return a()},setScale(x){f(x);}})),jsxRuntime.jsxs(p,{as:`--cropper --${n||hooks.CropShape.Circle} ${i}`,style:m,...c,children:[jsxRuntime.jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:u,onMouseUp:d,onMouseLeave:d,onMouseMove:C}),jsxRuntime.jsx(p,{as:"--cropper-slider",children:jsxRuntime.jsx(xo,{onChange:x=>f(x),min:0,max:1,step:.01,value:1})})]})});Nn.displayName="Zuz.Cropper";var nm=Nn;var am=(e=>(e.Circle="circle",e.Square="square",e))(am||{});var Bn=react.forwardRef((t,s)=>{let{items:e,maxItems:n}=t,o=react.useMemo(()=>{let i=typeof e=="string",c=i?[]:e;return i&&e.split(",").forEach(l=>{c.push({label:l});}),c},[e]),m=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(Le,{ref:s,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(p,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:m.map((i,c,l)=>i.ID=="."?jsxRuntime.jsx(p,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(p,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${c}`))}):jsxRuntime.jsxs($,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[c+1],children:[i.icon&&jsxRuntime.jsx(X,{as:"--crumb-icon",name:i.icon}),jsxRuntime.jsx(D,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${c}`))})});Bn.displayName="Zuz.Crumb";var lm=Bn;var kn=react.forwardRef((t,s)=>{let{icon:e,defaultValue:n,value:o,size:r,variant:m,numeric:i,type:c,onConfirm:l,...a}=t,[f,u]=react.useState(false),[d,C]=react.useState(n||null),{style:x,className:v,rest:h}=I(a),w=react.useRef(null),g=react.useRef(null),{reposition:S}=Ue(g,{direction:te.Bottom,offset:2}),N=T=>{i&&(T.currentTarget.value=T.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let T=R=>{let k=R.target,B=w.current?.contains(k),V=g.current?.contains(k);!B&&!V&&u(false);};return f&&document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T);}},[f]),react.useEffect(()=>{let T=R=>{R.key==="Escape"&&f&&(u(false),w.current?.focus());};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[f]);let P=()=>{u(true);};return react.useEffect(()=>{f&&S();},[f,S]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(p,{as:`--date-picker ${m?`--${m}`:""} rel flex aic ${v}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(X,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(j,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:w,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${m?`--${m}`:""} flex`.trim(),style:x,onFocus:P,onInput:N,autoComplete:"new-password",onKeyDown:T=>{T.key=="Enter"&&l?.(T.currentTarget.value);},...h}),jsxRuntime.jsx(p,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${m?`--${m}`:""}`,children:jsxRuntime.jsx(mo,{defaultValue:d,onChange:T=>{C(T),u(false);}})})]})})});kn.displayName="Zuz.DatePicker";var um=kn;var On=react.forwardRef((t,s)=>{let{icon:e,variant:n,position:o}=t;return jsxRuntime.jsx($,{className:`--fab fixed --${n||K.Large} --${o||"bottomright"}`,children:e||O.plus})});On.displayName="Zuz.Fab";var hm=On;var Dn=t=>{let{names:s,strength:e}=t,n={[pt.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-${pt.Gooey}`)};return react.useEffect(()=>{},[s]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(s||[pt.Gooey]).map(o=>n[o](e))})})};Dn.displayName="Zuz.Filters";var bm=Dn;var Pe=null,ie=null,Vn=react.forwardRef((t,s)=>{let{title:e,message:n,transition:o,curve:r,speed:m,type:i,actionPosition:c,spinner:l,loadingMessage:a,onShow:f,onHide:u,...d}=t,{className:C,style:x,rest:v}=I(d),[h,w]=react.useState(e||""),[g,S]=react.useState(n||""),[N,P]=react.useState(null),[T,R]=react.useState(i||me.Default),k=react.useMemo(()=>core.uuid(12),[]),[B,V]=react.useState(false),E=react.useRef(null),z=react.useRef(null),[Z,G]=react.useState(false),[b,M]=react.useState(true),A=react.useRef(null),W=g;react.useImperativeHandle(s,()=>({setLoading(F){G(F);},showDialog(F,Y,J,ee){Pe&&(clearTimeout(Pe),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),R(me.Dialog),Y&&S(Y),F&&w(F),J&&P(J.reduce((fe,de)=>(fe.push({...de,key:de.key||core.uuid(12)}),fe),[])),V(true),setTimeout(()=>ee?ee():()=>{},1e3);},dialog(F,Y,J,ee){Pe&&(clearTimeout(Pe),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),R(me.Dialog),S(Y),w(F),J&&P(J.reduce((fe,de)=>(fe.push({...de,key:de.key||core.uuid(12)}),fe),[])),V(true),setTimeout(()=>ee?ee():()=>{},1e3);},error(F,Y){this.show(F,Y,me.Error);},warn(F,Y){this.show(F,Y,me.Warn);},success(F,Y){this.show(F,Y,me.Success);},show(F,Y,J){Pe&&(clearTimeout(Pe),ie&&clearTimeout(ie),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),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=z.current||"",ie=null;},500)),Pe=setTimeout(()=>{V(false),Pe=null,ie=null;},(Y||4)*1e3),R(J||me.Default),S(F),V(true),f?.();},hide(){V(false),u?.();}}));let H=react.useMemo(()=>{let F={when:B,duration:m||.3,delay:.1};if(T==me.Dialog){if(o){let{from:Y,to:J}=We(o,20);return {from:Y,to:J,curve:r||_.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:_.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:_.Spring,...F}},[B,T]);return react.useEffect(()=>{A.current&&clearTimeout(A.current),B?M(true):A.current=setTimeout(()=>M(false),1e3);},[B]),T==me.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ne,{when:B}),jsxRuntime.jsxs(p,{className:`--sheet --sheet-${T.toLowerCase()} ${B?"is-visible":""} ${C} fixed`.trim(),style:x,fx:H,...v,ref:E,children:[jsxRuntime.jsx(he,{when:Z,spinner:l,message:a}),jsxRuntime.jsxs(p,{className:"--head flex aic rel",children:[jsxRuntime.jsx(p,{className:`--${h?"title":"dot"} flex aic rel`,children:h||""}),jsxRuntime.jsx($,{onClick:F=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(p,{className:`--body flex aic rel ${N?"":"--no-action"}`.trim(),children:b?W:null}),N&&jsxRuntime.jsx(p,{className:`--footer flex aic rel ${c?c==Ot.Center?"jcc":"":"jce"}`.trim(),children:N.map((F,Y)=>jsxRuntime.jsx($,{onClick:J=>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(p,{className:`--sheet --sheet-${T.toLowerCase()} ${C} abs`.trim(),style:x,...v,fx:H,ref:E,children:B?g:null})}),st=t=>typeof t=="object"&&t!=null&&"setLoading"in t&&"success"in t&&"error"in t;Vn.displayName="Zuz.Sheet";var Tm=Vn;var An=({ref:t,...s})=>{let{name:e,cover:n,spinner:o,errors:r,action:m,children:i,withData:c,beforeSubmit:l,onSubmit:a,onError:f,onSuccess:u,resetOnSuccess:d,...C}=s,{className:x,style:v,rest:h}=I(C),[w,g]=react.useState(false),S=react.useRef(null),N=react.useRef(null),P=react.useRef(null),T=oo(),R=react.useCallback(b=>S.current?S.current.querySelectorAll(b):[],[S.current]),k=b=>({name:b.name||b.getAttribute("name")||b.getAttribute("data-name"),required:b.required?true:b.getAttribute("data-required")?b.getAttribute("data-required")=="true":false,with:b.with||b.getAttribute("with")}),B=b=>{let M=[];return b.querySelectorAll(".--input").forEach(A=>{M.push(A.value);}),M.join("")},V=react.useCallback(b=>{let{required:A}=k(b);if(A){if(b.type=="checkbox"&&b.checked==false)return false;if(b.classList.contains("--otp")){let H=B(b);if(H==""||H.length<parseInt(b.getAttribute("data-size")))return false}if(b.classList.contains("--select")&&b.querySelector("button.--selected").dataset.value=="-1"||b.value=="")return false}if(b.getAttribute("with")){let H=b.getAttribute("with");switch(H.includes("@")&&(H=H.split("@")[0],H=="match"&&(H=we.MatchField)),H.toUpperCase()){case we.IPV4:return core._(b.value).isIPv4();case we.IPV6:return core._(b.value).isIPv6();case we.Email:return core._(b.value).isEmail();case we.Uri:try{return new URL(b.value),!0}catch{return false}case we.Password:return console.log("Add FORMVALIDATION.Password"),false;case we.MatchField:let[F,Y,J]=b.getAttribute("with").split("@"),ee=document.querySelector(`[name=${Y.trim()}]`);if(!ee)return false;switch(J||"direct-match"){case "if-not-empty":if(ee&&!core._(ee.value).isEmpty()&&ee.value!=b.value)return false;break;case "direct-match":if(ee&&ee.classList.contains("--otp")&&b.classList.contains("--otp")&&B(ee)!=B(b))return false;if(ee&&ee.value!=b.value)return false;break}break;default:return true}}return true},[S.current]),E=react.useCallback(()=>{let b={},M={},A=null,W=null;if(Array.from(R("[name]")).forEach(H=>{let{name:F,required:Y,with:J}=k(H),ee=true;(Y||J)&&(ee=V(H)),b[F]={valid:ee,value:H.type=="checkbox"?H.checked==true?H.value:false:H.classList.contains("--otp")?B(H):H.classList.contains("--select")?H.querySelector("button.--selected").dataset.value:H.value},M[F]=H.type=="checkbox"?H.checked==true:H.classList.contains("--otp")?B(H):H.classList.contains("--select")?H.querySelector("button.--selected").dataset.value:H.value,ee?H.classList.remove("input-with-error"):(A==null&&r&&(A=H,W=r[F]),H.classList.add("input-with-error"));}),A){let H=A;if(H.classList.contains("--otp"))for(let F of Array.from(H.querySelectorAll(".--input"))){let Y=F;if(Y.value==""){Y.focus();break}}else H.focus();}return {error:A!=null,errorMsg:W||"Fix errors to continue...",data:b,payload:M}},[S.current]),z=react.useCallback(()=>{let{error:b,errorMsg:M,payload:A}=E();b?T.error(M):m?react.startTransition(async()=>{l&&l(A),st(n)?n.setLoading(true):g(true),T.clearAll(),core.withPost(m,{...A,...c||{}}).then(W=>{let H=W;st(n)?n.setLoading(false):g(false),d&&Array.from(R("[name]")).forEach(F=>{F instanceof HTMLInputElement&&(F.value="");}),u?u(H):(T.clearAll(),T.success(H.message||"Redirecting..."));}).catch(W=>{st(n)?n.setLoading(false):g(false),f?f(W):T.error(W.message||"We cannot process your request at this time.");});}):a&&a(A);},[m,N.current,S.current]),Z=react.useCallback(()=>{let b=R("[type=submit]");!b||b.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):b.forEach(M=>{M.addEventListener("click",z);});},[S.current]),G=react.useMemo(()=>react$1.addPropsToChildren(i,b=>b.props.type=="submit",b=>({ref:P})),[i]);return react.useImperativeHandle(t,()=>({setLoading(b){if(b){N.current?.hide();try{T.clearAll();}catch{}}g(b);},showError(b){typeof b=="string"?T.error(b):N.current.error(b,4);},hideError(){N.current.hide();try{T.clearAll();}catch{}},init(){Z();},submit(){z();}})),react.useEffect(Z,[]),jsxRuntime.jsxs(p,{ref:S,style:v,className:`--form flex rel ${x} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!st(n)&&jsxRuntime.jsx(he,{message:n?n.message||void 0:"working",spinner:o,color:n&&"color"in n?n.color:"#ffffff",when:w}),G]})};An.displayName="Zuz.Form";var km=An;var $n=t=>{let {ref:s,cols:e,rows:n,gap:o,gapX:r,gapY:m,align:i,justify:c,inline:l,flow:a,autoCols:f,autoRows:u,template:d,...C}=t;react.useRef(null);let {className:v,style:h,rest:w}=I(C),g=N=>typeof N=="number"?`repeat(${N}, 1fr)`:N,S={display:l?"inline-grid":"grid",gridTemplateColumns:g(e),gridTemplateRows:g(n),gap:o,columnGap:r,rowGap:m,alignItems:i,justifyContent:c==="between"?"space-between":c==="around"?"space-around":c,gridAutoFlow:a,gridAutoColumns:f,gridAutoRows:u,gridTemplateAreas:d,...h};return jsxRuntime.jsx(p,{ref:s,as:`--grid ${v}`.trim(),style:S,...w})};$n.displayName="Zuz.Grid";var Vm=$n;var zn=t=>typeof t=="string"&&t.includes("+"),_n={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"},Fn={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 Kn=react.forwardRef(({children:t,keys:s,variant:e},n)=>{let o=react.useMemo(()=>{if(zn(s)){let r=null;return {keys:String(s).split("+").reduce((i,c,l,a)=>(a[l+1]?i.push(c):r=c.toUpperCase(),i),[]),children:r}}return {keys:s,children:String(t).toUpperCase()}},[s]);return jsxRuntime.jsxs(p,{as:`--keyboard-keys --${e||K.Small} flex aic`,children:[(Array.isArray(o.keys)?o.keys:[o.keys]).map(r=>jsxRuntime.jsx("abbr",{title:Fn[r],children:_n[r]},r)),jsxRuntime.jsx(j,{children:o?.children??t})]})});Kn.displayName="Zuz.KeyboardKeys";var To=Kn;var Un=react.forwardRef((t,s)=>{let e=hooks.useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:r}=t;return jsxRuntime.jsxs(p,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:_.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${r||K.Small} fixed flex`,children:[jsxRuntime.jsx(p,{className:"--ico",children:e?O[le.Success]:O[le.Error]}),jsxRuntime.jsx(D,{as:"--message",children:e?n||"internet connection restored :)":o||"no internet connection"})]})});Un.displayName="Zuz.NetWorkManager";var Km=Un;var Po=(e=>(e.Table="table",e.Gooey="gooey",e))(Po||{});var Xn=react.forwardRef((t,s)=>{let{itemCount:e,itemsPerPage:n,startPage:o,pageRange:r,paginationStyle:m,breakLabel:i,prevLabel:c,nextLabel:l,hash:a,loading:f,seperator:u,renderOnZeroPageCount:d,onPageChange:C,...x}=t,v=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(E=>`${core.toHash(E,a||6,v)}${u||""}${v}`,[v]),w=react.useMemo(()=>i||"...",[i]),[g,S]=react.useState({id:a?o?typeof o=="number"?h(o):o:1:o||1,label:o||1}),{style:N,className:P,rest:T}=I(x),R=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(R(g)-(r||2),1),Z=Math.min(R(g)+(r||2),k);z>1&&E.push({id:a?h(1):1,label:1}),z>2&&E.push({id:-1,label:w});for(let G=z;G<=Z;G++)E.push({id:a?h(G):G,label:G});return Z<k-1&&E.push({id:-1,label:w}),Z<k&&E.push({id:a?h(k):k,label:k}),E},[g]),V=react.useCallback(E=>{let z=E;+z.label<1||+z.label>k||(S(z),C?.(z));},[e,n,g]);return B.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(p,{ref:s,as:`--pagination --pgt-${m||"table"} flex aic w:100% jcc ${P}`,children:[jsxRuntime.jsx(p,{as:"flex flex:1 aic --pgt-btns",children:(B.length>1?B:[{id:1,label:1},{id:-1,label:w}]).map((E,z,Z)=>jsxRuntime.jsx($,{disabled:E.id==-1||R(g)==+E.label,className:(typeof E=="string"?E:E.label)==R(g)?"--current-page":"",onClick:G=>V(E),children:typeof E=="string"?E:E.label},`--pg-${z}-${E.id}`))}),jsxRuntime.jsx(p,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(R(g)-1)*n+1} - `,`${Math.min(R(g)*n,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(p,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx($,{disabled:R(g)<=1,onClick:E=>V({id:a?h(R(g)-1):R(g)-1,label:R(g)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx($,{disabled:B.length<=1||R(g)==R(B[B.length-1]),onClick:E=>V({id:a?h(R(g)+1):R(g)+1,label:R(g)+1}),children:O.chevronRightOutline})]})]})});Xn.displayName="Zuz.Pagination";var Io=Xn;var Qn=react.forwardRef((t,s)=>{let{strenthMeter:e,onChange:n,...o}=t;"type"in o&&delete o.type;let{style:r,className:m,rest:i}=I(o),[c,l]=react.useState(false),[a,f]=react.useState(""),u=react.useMemo(()=>core.checkPasswordStrength(a),[a]),d=hooks.useDebounce(C=>{e&&f(C.target.value),n&&n(C);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(p,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(p,{style:r,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:s,type:c?"text":"password",className:m,onChange:d,...i}),jsxRuntime.jsx($,{tabIndex:-1,onClick:()=>l(C=>!C),className:"--toggle flex aic jcc abs",children:c?O.eye:O.eyeSlash})]}),e&&jsxRuntime.jsxs(p,{as:`flex aic --password-meter --pb-score-${u.score}`,style:r,children:[jsxRuntime.jsxs(p,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(p,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(D,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});Qn.displayName="Zuz.Password";var ec=Qn;var jn=react.forwardRef((t,s)=>{let{size:e,length:n,mask:o,...r}=t,m=react.useRef([]),i="pinput",c=false,l={};"with"in r&&(l={with:r.with},delete r.with),"type"in r&&delete r.type,"name"in r&&(i=r.name,delete r.name),"required"in r&&(c=true,delete r.required);let{style:a}=I(r),f=u=>{let d=u.currentTarget,C=m.current[parseInt(d.dataset.index)+1],x=m.current[parseInt(d.dataset.index)-1];d.value.length===1&&C?C.focus():d.value.length===0&&x&&x.focus();};return react.useEffect(()=>{m.current=m.current.slice(0,e||n);},[e||n]),jsxRuntime.jsx(p,{name:i,style:a,className:"--otp flex aic rel","data-required":c,"data-size":e||n||4,...l,children:Array(e||n||4).fill(1).map((u,d)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":d,ref:C=>{m.current[d]=C;},numeric:true,onChange:f,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...r},`pin-${d}`))})});jn.displayName="Zuz.PinInput";var nc=jn;var es=react.forwardRef((t,s)=>{let{children:e,className:n,name:o,required:r,type:m,value:i,variant:c,checked:l,onSwitch:a,...f}=t,[u,d]=react.useState(l||false),{variant:C}=q(true),x=react.useRef(null);return jsxRuntime.jsxs(tt,{className:`${n} --${(m||Dt.Default).toLowerCase()} --radio${!m||m==Dt.Default?"":"card"} --${c||C||K.Small} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(oe,{ref:x,defaultChecked:u,value:i||"rd",type:"radio",className:"abs",name:o,required:r||false,onChange:v=>{a&&a(v.target.checked,i||"cb"),d(v.target.checked);}}),jsxRuntime.jsx(p,{className:"--dot rel",children:jsxRuntime.jsx(p,{className:"--rod abs abc"})}),jsxRuntime.jsx(p,{className:"--value",children:e})]})});es.displayName="Zuz.Radio";var lc=es;var ts=react.forwardRef((t,s)=>{let{fx:e,withStyle:n,as:o,reverse:r=false,searchIcon:m=O.search,hideSearchIcon:i=false,clearIcon:c=O.close,hideClearIcon:l=false,onChange:a,onClear:f,...u}=t,{style:d,className:C}=I({as:t.as}),[x,v]=react.useState(""),{variant:h}=q(true),w=react.useRef(null),g=react.useMemo(()=>jsxRuntime.jsx($,{tabIndex:-1,onClick:P=>N(),className:"--send flex aic jcc",variant:t.variant||K.Small,children:x!==""?!l&&(typeof c=="string"?jsxRuntime.jsx(X,{name:c,as:"--search-action"}):c):!i&&(typeof m=="string"?jsxRuntime.jsx(X,{name:m,as:"--search-action"}):m)}),[r,m,l,c,i]);"type"in t&&delete t.type;let S=P=>{v(P.target.value),a?.(P.target.value);},N=P=>{x.trim()!==""&&(v(""),a?.(""),w.current&&(w.current.value="",t.onConfirm?.("")));};return react.useImperativeHandle(s,()=>({focus:()=>w.current?.focus(),value:()=>w.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(p,{style:d,className:`--search ${r?"--search-rev":""} --${t.variant||h||K.Medium} flex aic ${typeof t.as=="string"&&t.as.includes("abs")?"":"rel"} ${C}`.trim(),children:[r&&g,jsxRuntime.jsx(oe,{ref:w,onChange:S,...u}),t.shortcut&&jsxRuntime.jsx(To,{keys:t.shortcut,as:"abs"}),!r&&g]})});ts.displayName="Zuz.Search";var hc=ts;var rs=({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(X,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(D,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});rs.displayName="Option";var ns=rs;var as=({ref:t,...s})=>{let{selected:e,options:n,label:o,name:r,variant:m,search:i,searchPlaceholder:c,maxHeight:l,arrowDownIcon:a=O.arrowDown,arrowUpIcon:f=O.arrowUp,expanded:u,onChange:d,...C}=s,[x,v]=react.useState(e?typeof e=="string"?n.find(b=>b.value===e):e:n[0]),[h,w]=react.useState(false),[g,S]=react.useState(null),N=react.useRef(null),P=react.useRef(null),T=react.useRef(null),R=react.useId(),k=react.useMemo(()=>r||R,[]),{reposition:B}=Ue(T,{direction:kt.Bottom,offset:2}),{variant:V}=q(true),{className:E,style:z,rest:Z}=I(C),G=b=>{v(b),w(false),d&&d(b);};return react.useImperativeHandle(t,()=>({setSelected:b=>{if(typeof b=="string"){let M=n.find(A=>A.value===b);M&&v(M);}else v(b);},getValue:()=>x||null})),react.useEffect(()=>{if(!h)return;let b=()=>{B();};return window.addEventListener("scroll",b,true),window.addEventListener("resize",B),()=>{window.removeEventListener("scroll",B,true),window.removeEventListener("resize",B);}},[h,B]),react.useEffect(()=>{if(!h){P.current&&(P.current.value=""),S(null);return}P.current?.focus(),B();let b=A=>{T.current&&!T.current.contains(A.target)&&w(false);},M=setTimeout(()=>{document.addEventListener("click",b);},0);return ()=>{clearTimeout(M),document.removeEventListener("click",b);}},[h,B]),jsxRuntime.jsxs(p,{className:`--select --${u==true?"expanded":""} --${m||V} ${r?`--${r}`:""} rel`.trim(),name:k,children:[jsxRuntime.jsxs($,{ref:N,"data-value":x?typeof x=="string"?x:x.value:x||"-1",className:`--selected flex aic rel ${E}`.trim(),withLabel:false,style:z,onClick:b=>{b.stopPropagation(),w(M=>!M);},...Z,children:[jsxRuntime.jsx(D,{className:"--label",children:x?typeof x=="string"?x:x.label:o||"Choose"}),jsxRuntime.jsx(p,{className:"--svg-arrow rel flex aic jcc",children:h?typeof f=="string"?jsxRuntime.jsx(X,{name:f,as:"--search-action"}):f:typeof a=="string"?jsxRuntime.jsx(X,{name:a,as:"--search-action"}):a})]}),jsxRuntime.jsxs(p,{id:k,className:"--options-list flex cols abs","aria-hidden":!h,style:{maxHeight:l||"auto"},ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:h,duration:.05},children:[i&&jsxRuntime.jsx(p,{as:"--select-search --sticky",children:jsxRuntime.jsx(oe,{ref:P,onChange:b=>{S(b.target.value==""?null:b.target.value);},className:"--search-input",placeholder:c||"Search..."})}),(g==null?n:n.filter(b=>b.label.toLowerCase().includes(g.toLowerCase())||b.value.toLowerCase().includes(g.toLowerCase()))).map(b=>jsxRuntime.jsx(ns,{updateValue:G,value:x,o:b},`option-${(typeof b=="string"?b:b.label).replace(/\s+/g,"-")}-${typeof b=="string"?b:b.value}`))]})]})};as.displayName="Zuz.Select";var Sc=as;var is=react.forwardRef((t,s)=>jsxRuntime.jsx(ot,{type:be.Switch,...t,ref:s}));is.displayName="Zuz.Switch";var Tc=is;var ms=t=>{let{idx:s,id:e,as:n,weight:o,style:r,value:m,render:i,resize:c,sortBy:l,sortable:a,onSort:f}=t,[u,d]=react.useState(0),C=()=>{a&&(f?.(String(e),u==1?-1:1),d(x=>x==1?-1:1));};return jsxRuntime.jsxs(p,{style:{flex:o||1,...r},as:`--col flex aic ${n||""} ${a?"--sortable":""}`,onClick:C,children:[jsxRuntime.jsx(p,{children:m}),s==-1&&a&&l==e&&jsxRuntime.jsx(p,{as:"--arrow flex aib",children:u==1?O.arrowUp:O.arrowDown})]})};ms.displayName="Zuz.Column";var Rt=ms;var ps=t=>{let{index:s,pubsub:e,schema:n,data:o,ids:r,styles:m,animate:i,sortBy:c,selectable:l,tableRef:a,loading:f,rowClassName:u,onSort:d,onRowClick:C,onSelect:x,onContextMenu:v}=t,h=hooks.useDelayed(),w=react.useMemo(()=>({transition:U.SlideInBottom,curve:_.EaseInOut,delay:.02*(s+1)}),[]),g=react.useRef(null),S=(P,T)=>{s==-1?e.emit(`ALL_ROWS_${P?"CHECKED":"UNCHECKED"}`,P):(x&&x(o,P),e.emit(`ROW_${P?"CHECKED":"UNCHECKED"}`,P,T));},N=(P,T,R)=>jsxRuntime.jsx(Rt,{idx:P,id:T,as:"--selector",pubsub:e,value:jsxRuntime.jsx(ot,{value:R,ref:g,onSwitch:S,type:be.Default})});return react.useEffect(()=>{let P=(B,V)=>{g.current?.setChecked(B,false);},T=(B,V)=>{let E=false;a?.current&&a.current.querySelectorAll(".--row").forEach(z=>{let Z=z;if(!Z.classList.contains("--row-head")){let G=Z.querySelector(".--selector input[type=checkbox]");G&&G.checked&&!E&&(E=G.checked);}}),g.current.setChecked(E,false);},R=B=>{g.current?.setChecked(B,false),x&&x(o,B);},k=B=>{g.current?.setChecked(B,false),x&&x(o,B);};return s==-1?(e.on("ROW_CHECKED",P),e.on("ROW_UNCHECKED",T),()=>{e.off("ROW_CHECKED",P),e.off("ROW_UNCHECKED",T);}):(e.on("ALL_ROWS_CHECKED",R),e.on("ALL_ROWS_UNCHECKED",k),()=>{e.off("ALL_ROWS_CHECKED",R),e.off("ALL_ROWS_UNCHECKED",k);})},[]),jsxRuntime.jsxs(p,{onContextMenu:P=>v?v(P,o):null,onClick:P=>C?C(P,t.data):()=>{},...i?{fx:{...w,when:h}}:{},as:`--row flex aic ${C?"--row-clickable":""} ${s==-1?"--row-head":""} ${u||""}`,children:[s==-1&&n.map((P,T)=>{let{renderWhenHeader:R,render:k,value:B,...V}=P;return jsxRuntime.jsxs(react.Fragment,{children:[l&&T==0&&N(-1,`--selector-${P.id}`,"all"),jsxRuntime.jsx(Rt,{idx:-1,onSort:d,sortBy:c,value:B,...V,pubsub:e,style:m[P.id]})]},`--col-${P.id}`)}),f&&s>-1&&jsxRuntime.jsx(p,{as:"--col",children:jsxRuntime.jsx(D,{as:"opacity:0",children:"..."})}),!f&&s>-1&&r&&o&&n.map((P,T)=>jsxRuntime.jsxs(react.Fragment,{children:[l&&T==0&&N(T,`--selector-${P.id}`,P.id.toString()),r.includes(String(P.id))?jsxRuntime.jsx(Rt,{pubsub:e,idx:T,id:String(P.id),style:m[String(P.id)],value:P.render?P.render(o,s):o[String(P.id).includes(".")?String(P.id).split(".").reverse()[0]:P.id]}):null]},`--${String(P.id)}-val-${T}`))]})};ps.displayName="Zuz.Row";var It=ps;var gs=(t,s)=>{let{schema:e,rows:n,rowCount:o,rowsPerPage:r,currentPage:m,pagination:i,paginationHash:c,showPaginationOnZeroPageCount:l,animateRows:a,header:f,rowClassName:u,selectableRows:d,hoverable:C,sortBy:x,loading:v,loadingRowCount:h,loadingMessage:w,spinner:g,emptyMessage:S,onSort:N,onRowClick:P,onRowSelectToggle:T,onPageChange:R,onRowContextMenu:k,...B}=t,V=react.useRef(null),E=react.useMemo(()=>e.reduce((ne,Q)=>(ne[Q.id]={flex:Q.weight||1,...Q.w&&{width:Q.w},...Q.maxW&&{maxWidth:Q.maxW},...Q.minW&&{minWidth:Q.minW},...Q.h&&{height:Q.h},...Q.maxH&&{maxHeight:Q.maxH},...Q.minH&&{minHeight:Q.minH}},ne),{}),[e]),z=react.useMemo(()=>Object.keys(E),[e]),Z=react.useMemo(()=>f??true,[f]),{style:G,className:b,rest:M}=I(B),A=react.useRef(null),W=react.useMemo(()=>new core.PubSub,[]),H=react.useRef(n.map(()=>core.uuid(8))),[F,Y]=react.useState(x||null),[J,ee]=react.useState(w||"loading"),fe=react.useMemo(()=>!v&&n&&n.length==0,[v,n]),de=react.useCallback(()=>S?typeof S=="function"?jsxRuntime.jsx(S,{}):S:jsxRuntime.jsx(D,{as:"tac s:18 mt:75",children:"No Record Found"}),[v,n]);react.useEffect(()=>{H.current=n.map(()=>core.uuid(8));},[n]);let Bt=(ne,Q)=>{Y(ne),N?.(ne,Q);},Lt=(o||(n?n.length:0))/(r||10),De=react.useMemo(()=>l||Lt>1?jsxRuntime.jsx(Io,{hash:c,ref:V,renderOnZeroPageCount:l,onPageChange:R,paginationStyle:"table",startPage:m,itemCount:o||(n?n.length:0),itemsPerPage:r||10}):null,[m,o]);return react.useImperativeHandle(s,()=>({setLoading(ne){}})),jsxRuntime.jsxs(p,{as:`--table ${C??true?"--hoverable":""} flex cols rel ${b}`,ref:A,children:[Z==true&&jsxRuntime.jsx(It,{sortBy:F,onSort:Bt,tableRef:A,pubsub:W,selectable:d,index:-1,schema:e,loading:true,styles:E}),v&&jsxRuntime.jsxs(p,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:g||re.Simple}),J&&jsxRuntime.jsx(D,{as:"--table-loading-message",children:J})]}),v&&Array(h||5).fill({}).map((ne,Q)=>jsxRuntime.jsx(It,{tableRef:A,index:Q,pubsub:W,schema:e,styles:E,loading:true,animate:a,onRowClick:P},`--trow-loading-${Q}-${e[0].id}`)),!v&&n&&n.map((ne,Q)=>jsxRuntime.jsx(It,{tableRef:A,pubsub:W,loading:false,index:Q,schema:e,ids:z,styles:E,animate:a,data:ne,onRowClick:P,rowClassName:u,selectable:d,onSelect:T,onContextMenu:k},`--trow-${H.current[Q]||Q}-${e[0].id}`)),fe&&de(),jsxRuntime.jsx(p,{"aria-hidden":!i||!De,...a?{fx:{transition:U.SlideInBottom,curve:_.EaseInOut,delay:.02*(n.length+1),when:!v&&n&&i&&De!=null}}:{},as:"--row flex aic --row-footer",children:i&&De?De:null})]})};gs.displayName="Zuz.Table";var Vc=react.forwardRef(gs),Ac=Vc;var zc=({ref:t,...s})=>{let{title:e,items:n}=s,[o,r]=react.useState(0),m=(i,c,l)=>{i.preventDefault(),r(c),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(p,{ref:t,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(D,{as:"--toc-title",children:e}),jsxRuntime.jsx(Le,{items:n.map((i,c)=>jsxRuntime.jsx("a",{className:o==c?"--toc-active":"",style:{anchorName:o===c?"--toc-active":"none",color:o==c?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>m(l,c,i.tag),href:`#${i.tag}`,children:i.label}))})]})},_c=zc;var hs=({isActive:t,transitionType:s,speed:e,width:n,render:o,content:r,onHeightChange:m})=>{let i=react.useRef(null),c=hooks.useResizeObserver(i);react.useEffect(()=>{t&&c.height>0&&m(c.height);},[t,c.height]);let l=react.useMemo(()=>{let a={flexShrink:0,height:"fit-content"};return s==="fade"?{...a,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"?{...a,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}:a},[t,s,n,e]);return jsxRuntime.jsx(p,{ref:i,style:{...l},className:"--content",children:o||t?r:null})};hs.displayName="Zuz.TabBody";var xs=hs;var ws=({ref:t,...s})=>{let{tabs:e,speed:n=.3,prerender:o=true,variant:r,tabStyle:m="fixed",onChange:i,transitionType:c="slide",...l}=s,[a,f]=react.useState(0),u=react.useRef(null),d=hooks.useResizeObserver(u),C=react.useMemo(()=>core.uuid(8),[]),[x,v]=react.useState("auto"),h=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(t,()=>({setTab:T=>f(T)}));let w=react.useMemo(()=>e.map(T=>({...T,key:T.key||core.uuid(8)})),[e]),{style:g,className:S,rest:N}=I({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),P=()=>{if(!h)return {opacity:0};switch(c){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${a*d.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(p,{ref:u,style:g,className:`--tabview --${m} flex cols ${S}`,children:[jsxRuntime.jsx(rt,{as:"--tabview-head",onSwitch:T=>{f(T.index);let R=w.find(k=>k.tag==T.tag);R&&R.onSelect&&(R.onSelect(R,T.index),i?.(R,T.index));},selected:a,items:w.reduce((T,R,k)=>(T.push({icon:R.icon,index:k,label:R.label,tag:R.tag}),T),[])}),jsxRuntime.jsx(p,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:x,transition:h?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:h?1:0},children:jsxRuntime.jsx(p,{className:"--track",style:{...P()},children:w.map((T,R)=>jsxRuntime.jsx(xs,{isActive:R===a,transitionType:c,speed:n,width:d.width,render:o||R===a,onHeightChange:k=>R===a&&v(k),content:T.body},`tab-body-${T.key||R}-${C}`))})})]})};ws.displayName="Zuz.TabView";var Qc=ws;var tp=({ref:t,commands:s,onCommand:e,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:r,...m})=>{let[i,c]=react.useState([{type:"output",content:n}]),[l,a]=react.useState(""),f=react.useRef(null),u=react.useRef(null),{variant:d}=q(true);react.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[i]);let C=S=>{let N=typeof S=="string"?{type:"output",content:S}:S;c(P=>{let T=[...P,N];return T.length>1e3?T.slice(-1e3):T});},x=()=>c([]);react.useImperativeHandle(t,()=>({write:C,clear:x}));let v=async S=>{let[N,...P]=S.split(" "),T=N.toLowerCase();return s&&s[T]?await s[T](P):e?await e(S):`command not found: ${N}`},h=S=>{let N=/\u001b\[(\d+)m/g,P=[],T={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},R=0,k="#d4d4d4",B=false,V;for(;(V=N.exec(S))!==null;){let z=S.slice(R,V.index);z&&P.push({text:z,color:k,bold:B});let Z=V[1];Z==="0"?(k="#d4d4d4",B=false):Z==="1"?B=true:T[Z]&&(k=T[Z]),R=N.lastIndex;}let E=S.slice(R);return E&&P.push({text:E,color:k,bold:B}),P},w=(S,N)=>S.includes("\x1B")?h(S).map((P,T)=>jsxRuntime.jsx(j,{style:{color:P.color||"#d4d4d4",fontWeight:P.bold?"bold":"normal"},children:P.text},`--terminal-msg-${T}-${P.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(j,{style:{color:N==="error"?"#ff5f56":N==="command"?"#00ff00":"#d4d4d4"},children:S}),g=async S=>{if(S.key==="Enter"&&l.trim()){let N=l.trim(),P=[...i,{type:"command",content:`${o}${N}`}];a(""),c(P);let T=await v(N);c(R=>[...R,{type:"output",content:T}]);}};return jsxRuntime.jsxs(p,{as:`--zuz-terminal --${r||d||K.Medium} flex cols ${m.className}`,onClick:()=>u.current?.focus(),children:[jsxRuntime.jsx(p,{ref:f,className:"--terminal-log",children:i.map((S,N)=>jsxRuntime.jsx(p,{children:jsxRuntime.jsx(D,{children:w(S.content,S.type)})},N))}),jsxRuntime.jsxs(p,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(D,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(oe,{ref:u,className:"--zuz-term-input",autoFocus:true,value:l,variant:r||d||K.Medium,onChange:S=>a(S.target.value),onKeyDown:g})]})]})},op=tp;var rp=({meta:t})=>jsxRuntime.jsxs($,{as:"flex aic --command-item",children:[t.icon&&jsxRuntime.jsx(X,{name:t.icon,as:"--command-icon"}),jsxRuntime.jsx(D,{children:t.label})]}),np=({position:t,onSelect:s,commands:e,visible:n})=>jsxRuntime.jsx(p,{"aria-hidden":!n,fx:{transition:U.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...t},children:e.map(o=>jsxRuntime.jsx(rp,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Ts=np;var Is=react.forwardRef((t,s)=>{let{autoResize:e,maxHeight:n,variant:o,resize:r="none",command:m,commands:i,onInput:c,cmd:l,renderDropdown:a,value:f,defaultValue:u,...d}=t,C=react.useRef(null),x=react.useRef(null),{variant:v}=q(true),{style:h,className:w,rest:g}=I(d),{showDropdown:S,dropdownPosition:N,handleKeyDown:P,handleInput:T,handleCommandSelect:R}=hooks.useCommandActions({command:m,commands:i,cmd:l,ref:C}),k=react.useCallback(()=>{let V=C.current;!V||!e||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(n){let z=parseInt(n.toString(),10);isNaN(z)||(E=Math.min(E,z));}V.style.height=`${E}px`,V.style.overflowY=n&&E>=parseInt(n.toString(),10)?"auto":"hidden";}));},[e,n]),B=V=>{c?.(V),T(V),k();};return react.useEffect(()=>{k();},[f,u,k]),react.useEffect(()=>{e&&C.current&&k();},[e,k]),react.useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),jsxRuntime.jsxs(p,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${o||v||K.Medium} flex ${w}`.trim(),style:{...h,resize:r,height:e?"auto":h?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:P,onInput:B,ref:V=>{typeof s=="function"?s(V):s&&(s.current=V),C.current=V;},value:f,defaultValue:u,...g}),a?a({show:S,position:N,commands:i||[],onSelect:R}):i&&i.length>0&&jsxRuntime.jsx(Ts,{visible:S,commands:i,onSelect:R,position:N})]})});Is.displayName="Zuz.TextArea";var mp=Is;var Es=react.forwardRef((t,s)=>{let{as:e,value:n,color:o,direction:r,...m}=t,i=react.useRef(null),[c,l]=react.useState(n||0);return react.useImperativeHandle(s,()=>({updateValue(a){c.toString().length!==a.toString().length&&l(a);},setValue(a){if(this.updateValue(a),i.current){let f=a.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((u,d)=>{let C=f[d];if(u instanceof HTMLElement){u.setAttribute("data-value",C);let x=u.querySelector(".--wheel-char-track");x instanceof HTMLElement&&(x.style.setProperty("--v",C),x.offsetWidth);}});}}})),react.useEffect(()=>{l(n||0);},[n]),jsxRuntime.jsxs(p,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:i,...m,children:[(c||0).toString().split("").map((a,f)=>isNaN(parseInt(a,10))?jsxRuntime.jsx(j,{className:"--wheel-char wheel-char-symbol grid",children:a},`wheel-char-symbol-${f}`):jsxRuntime.jsx(j,{"data-value":a,className:`--wheel-char grid ${f>(c||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(j,{className:`--wheel-char-track --wheel-track-${r||"down"} grid`,style:{"--v":a},children:[jsxRuntime.jsx(j,{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((u,d)=>jsxRuntime.jsx(j,{children:u},`${f}--${d}`)),jsxRuntime.jsx(j,{children:!r||r==="down"?9:0})]})},`wheel-char-${f}`)),o&&jsxRuntime.jsx(p,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Es.displayName="Zuz.TextWheel";var hp=Es;var ks=react.forwardRef((t,s)=>{let{title:e,position:n,margin:o,children:r,...m}=t,{style:i,className:c,rest:l}=I(m),[a,f]=react.useState(false),u=react.useMemo(()=>n||te.Top,[]),d=react.useRef(null),C=react.useRef(null),x=g=>{},v=typeof ResizeObserver<"u"?new ResizeObserver(x):{observe:()=>{},unobserve:()=>{}},h=hooks.useDimensions(),w=react.useMemo(()=>{if(!C.current)return {left:0,top:0};let g=C.current.previousElementSibling;if(g){let S=g.getBoundingClientRect();switch(v.observe(g),u){case te.Top:return {left:S.left+S.width/2,top:S.top-(o||25)};case te.Bottom:return {left:S.left+S.width/2,top:S.top+(o||25)};case te.Left:return {left:S.left-S.width/2,top:S.top+S.height/2};case te.Right:return {left:S.right,top:S.top+S.height/2};default:return {left:0,top:0}}}},[C.current,h,v]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(p,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[r,jsxRuntime.jsx(p,{ref:C,style:{left:w?.left+"px",top:w?.top+"px"},className:`--tooltip --${n||te.Top} fixed ${c}`.trim(),fx:{from:u==te.Bottom||u==te.Top?{opacity:0,x:"-50%",y:u==te.Top?-5:5}:{opacity:0,y:"-50%",x:u==te.Right?15:-25},to:u==te.Bottom||u==te.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:u==te.Right?10:-20},curve:_.EaseInOut,when:a},children:jsxRuntime.jsx(D,{className:"--text rel",children:e})})]})});ks.displayName="Zuz.ToolTip";var vp=ks;var Vo=react.forwardRef((t,s)=>{let{as:e,meta:n,nodes:o,icons:r,onSelect:m,treeTag:i,selected:c,roots:l,expanded:a,...f}=t,{tag:u,label:d,icon:C,under:x,isHead:v}=n,h=react.useMemo(()=>l.includes(u),[l]),[w,g]=react.useState(a),S=()=>{localStorage.setItem(`--tn${i}-${u}`,w?"0":"1"),g(!w);};react.useEffect(()=>{a||h&&!localStorage.getItem(`--tn${i}-${u}`)?(localStorage.setItem(`--tn${i}-${u}`,"1"),g(true)):g(localStorage.getItem(`--tn${i}-${u}`)=="1");},[]);let N=react.useMemo(()=>o.filter(P=>P.under==u),[o,u]);return jsxRuntime.jsxs(p,{className:`--treenode ${h?"--is-root":""} --treenode-${u} flex cols`,children:[jsxRuntime.jsxs(p,{className:`--node --node-${u} flex aic ${c==u?" --selected":""}`,children:[jsxRuntime.jsx($,{skeleton:f.skeleton,onClick:S,className:"--node-aro-btn",disabled:N.length==0,children:r?.arrowClose&&r?.arrowOpen?jsxRuntime.jsx(X,{skeleton:f.skeleton,className:"--node-aro-icon",name:N.length==0?r?.arrowDisabled||r?.arrowClose:w?r?.arrowOpen:r?.arrowClose}):N.length==0?O.chevronBottom:w?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs($,{className:"--node-meta flex aic",onClick:P=>m(u),children:[(r?.nodeOpen&&r?.nodeClose||h&&r?.rootOpen&&r?.rootClose)&&jsxRuntime.jsx(X,{skeleton:f.skeleton,className:`--node-icon ${h?"--icon-root":""}`,name:C||(w?h&&r?.rootOpen||r.nodeOpen:h&&r?.rootClose||r?.nodeClose)}),jsxRuntime.jsx(D,{className:`--node-label ${h?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),w&&N.length>0&&jsxRuntime.jsx(p,{className:`--sub-node tree-sub-node-${u} flex cols`,children:N.map(P=>jsxRuntime.jsx(Vo,{treeTag:i,selected:c,onSelect:m,icons:r,roots:l,expanded:P.expanded||false,meta:P,nodes:o},`--node-${P.tag}`))})]})});Vo.displayName="TreeItem";var Ds=Vo;var Vs=react.forwardRef((t,s)=>{let{as:e,nodes:n,onNodeSelect:o,tag:r,icons:m,roots:i,selected:c,...l}=t,[a,f]=react.useState(c);react.useImperativeHandle(s,()=>({getSelected:()=>a}),[o]);let u=d=>{f(d),o&&o(d);};return react.useEffect(()=>{a!=c&&f(c);},[c]),jsxRuntime.jsx(p,{className:"--treeview flex cols",children:n.filter(d=>i.includes(d.tag)).map(d=>jsxRuntime.jsx(Ds,{treeTag:r?`-${r}`:"",selected:a,onSelect:C=>u(C),icons:m,meta:d,roots:i,expanded:d.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${d.tag}`))})});Vs.displayName="Zuz.TreeView";var Bp=Vs;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
+
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkZUZUOZRM_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkZUZUOZRM_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkZUZUOZRM_cjs.h}});exports.ALERT=le;exports.AVATAR=Ko;exports.Accordion=pi;exports.ActionBar=xi;exports.Alert=wi;exports.AutoComplete=Ai;exports.Avatar=Ui;exports.Badge=qi;exports.Box=p;exports.Bubble=Sl;exports.BubbleMediaType=ln;exports.BubbleStatus=an;exports.Button=$;exports.CHART=on;exports.CHECKBOX=be;exports.COLORTHEME=Op;exports.Calendar=mo;exports.Chart=gl;exports.CheckBox=ot;exports.CodeBlock=kl;exports.ColorScheme=ql;exports.ContextMenu=Kt;exports.CookiesConsent=Jl;exports.Cover=he;exports.CropShape=am;exports.Cropper=nm;exports.Crumb=lm;exports.DATATYPE=Vp;exports.DIALOG=He;exports.DIALOG_ACTION_POSITION=Wo;exports.DRAWER_SIDE=se;exports.DatePicker=um;exports.Dialog=Gt;exports.Drawer=jt;exports.FILTER=pt;exports.FORMVALIDATION=we;exports.FORMVALIDATION_STYLE=Ap;exports.Fab=hm;exports.Filters=bm;exports.Form=km;exports.Grid=Vm;exports.Group=Wt;exports.Icon=X;exports.Image=je;exports.Input=oe;exports.KeyboardKeys=To;exports.KeysLabelMap=Fn;exports.KeysMap=_n;exports.Label=tt;exports.LayersProvider=Ft;exports.List=Le;exports.NetworkStatus=Km;exports.ORIGIN=Ke;exports.OriginType=Dp;exports.Overlay=Ne;exports.POSITION=kt;exports.PROGRESS=zp;exports.Pagination=Io;exports.PaginationStyle=Po;exports.Password=ec;exports.PinInput=nc;exports.Position=te;exports.ProgressBar=po;exports.RADIO=Dt;exports.Radio=lc;exports.SHEET=me;exports.SHEET_ACTION_POSITION=Ot;exports.SKELETON=kp;exports.SLIDER=ct;exports.SORT=Hp;exports.SPINNER=re;exports.ScrollView=Xt;exports.Search=hc;exports.Select=Sc;exports.SelectTabs=rt;exports.Sheet=Tm;exports.Slider=xo;exports.Span=j;exports.Spinner=ge;exports.Status=$p;exports.Switch=Tc;exports.TRANSITIONS=U;exports.TRANSITION_CURVES=_;exports.TabView=Qc;exports.Table=Ac;exports.TableOfContents=_c;exports.Terminal=op;exports.Text=D;exports.TextWheel=hp;exports.Textarea=mp;exports.ThemeProvider=Ys;exports.ToastDefaultTitle=Nr;exports.ToastProvider=eo;exports.ToastType=Ir;exports.ToolTip=vp;exports.TreeView=Bp;exports.Variant=K;exports.animationTransition=We;exports.buildClassString=Ht;exports.buildWithStyles=qo;exports.css=au;exports.getAnimationCurve=Vt;exports.getAnimationTransition=iu;exports.getZuzMap=$s;exports.isKeyCombination=zn;exports.setZuzMap=Go;exports.useBase=I;exports.useContextMenu=si;exports.useDialog=qa;exports.useDrawer=ja;exports.useFx=ae;exports.useMorph=oi;exports.usePosition=Ue;exports.useToast=oo;
|