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