@zuzjs/ui 1.0.69 → 1.0.71
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-3NHJM7EJ.js → chunk-SNPEZORB.js} +3 -3
- package/dist/{chunk-6WVMHXAS.cjs → chunk-TJD2DNSW.cjs} +2 -2
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +98 -29
- package/dist/index.d.ts +98 -29
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {f as f$1,e,g,d,h,c}from'./chunk-
|
|
1
|
+
import {f as f$1,e,g,d,h,c}from'./chunk-SNPEZORB.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-SNPEZORB.js';import {createContext,forwardRef,useMemo,Fragment,useState,useRef,useImperativeHandle,useEffect,useCallback,isValidElement,createElement,useId,memo,useLayoutEffect,useContext,useSyncExternalStore,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useIntersectionObserver,useCarousel,useTimer,useMediaPlayer,AnchorType,useAnchorPosition,KeyCode,useShortcuts,useCommandActions}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {uuid,MD5,withPost,_,clamp,timeSince,checkPasswordStrength,removeDuplicateWords,PubSub,toHash,numberInRange,copyToClipboard}from'@zuzjs/core';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {addPropsToChildren}from'@zuzjs/core/react';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var gi="1.0.70",hi=gi;var Ur={Circle:"CIRCLE",Square:"SQUARE"},jf={Default:"DEFAULT",Circle:"CIRCLE"},Qf={Light:"light",Dark:"dark",System:"system"},Ke={Default:"DEFAULT",Switch:"SWITCH"},vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ve=vt,St=AnchorType,Jf=St,ed={Top:"top",TopStart:"top-start",TopCenter:"top-center",TopEnd:"top-end",Bottom:"bottom",BottomStart:"bottom-start",BottomCenter:"bottom-center",BottomEnd:"bottom-end",Left:"left",LeftStart:"left-start",LeftCenter:"left-center",LeftEnd:"left-end",Right:"right",RightStart:"right-start",RightCenter:"right-center",RightEnd:"right-end"},q={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},td={Asc:"ASC",Desc:"DESC"},od={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},rd={Dots:"DOTS"},Je={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Le={Success:"success",Error:"error",Warning:"warning",Info:"info"},oe={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",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},nd={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE",Confirm:"CONFIRM"},et=Me,Lo={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},qr=Lo,sd={Bar:"BAR",Ring:"RING"},Mo={Default:"range",Text:"number"},Oo={Default:"DEFAULT",Card:"CARD"},qt={Gooey:"gooey"},Pe={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Xr=Symbol.for("zuz.global.map"),Yr=e=>{globalThis[Xr]=e;},xi=()=>globalThis[Xr]||{},Do=e$1=>{let o=Array.isArray(e$1)?e$1.join(" "):e$1;if(!o||typeof o!="string")return "";let t=xi();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(o).filter(Boolean).map(r=>{let s=r.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,p]=s;return g(p).map(l=>{let c=`${i}(${l})`;return t[c]||l}).join(" ")}return t[r]||r}).join(" ")},Td=e=>{let o=Array.isArray(e)?e.join(" "):e;return !o||typeof o!="string"?"":Do(o)},jr=e=>{let o={};for(let t in e){let n=e[t];if(t.startsWith("--")){o[t]=n;continue}let r=d[t]?.toString()??t;if(r==="x"||r==="translateX"){let s=o.translate?.split(" ")??["0px","0px"];o.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(r==="y"||r==="translateY"){let s=o.translate?.split(" ")??["0px","0px"];o.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(r)?o[r]=h.addUnitsSafely(t,n):o[r]=n;}return o},Vo=e=>{if(!e)return "linear";switch(e.toUpperCase()){case oe.Bounce:return "var(--bounce)";case oe.Liquid:return "var(--liquid)";case oe.Spring:return "var(--spring)";case oe.EaseInOut:return "ease-in-out";case oe.EaseOutBack:return "ease-out-back";default:return "linear"}},wt=(e,o=0,t=0)=>{let n={},r={},s=o||20,a=t||0;switch(e){case Q.SlideInLeft:case Q.SlideInRight:n={"--fx-x":e===Q.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},r={"--fx-x":`${a}px`,opacity:1};break;case Q.SlideInTop:case Q.SlideInBottom:n={"--fx-y":e===Q.SlideInTop?`-${s}px`:`${s}px`,opacity:0},r={"--fx-y":`${a}px`,opacity:1};break;case Q.SlideInTopScale:case Q.SlideInBottomScale:n={"--fx-y":e===Q.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},r={"--fx-y":`${a}px`,scale:1};break;case Q.ScaleIn:n={scale:0,opacity:0},r={scale:1,opacity:1};break;case Q.FadeIn:n={opacity:0},r={opacity:1};break}return {from:n,to:r}},Pd=(e,o,t)=>{let{from:n,to:r}=wt(e);return o?{...n,...r}:t?n:r};var vi=(e,o)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),useEffect(()=>{let r=o?.current;if(!r||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(r.style.transform="",r.style.filter="",t.current.forEach(i=>r.style.removeProperty(i)));};return r.addEventListener("transitionend",s),()=>r.removeEventListener("transitionend",s)},[e,o]),useEffect(()=>{if(typeof window>"u"||!o?.current)return;let r=o.current;(e?.scroll||e?.mouse)&&(r.style.willChange="transform",r.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",r.style.transition=`translate 0.1s ${e.curve?Vo(e.curve):"var(--spring)"}`);},[e,o]),useMemo(()=>{if(!e)return {style:{}};let{transition:r,from:s,to:a,exit:i,when:p,duration:l=.3,delay:c=0,curve:d,margin:u=0,offset:m=20,watch:y=[]}=e,R=p===false&&!n.current;p===true&&(n.current=true);let x={},{from:C,to:v}=r?wt(r,m,u):{from:s||{},to:a||{}};x=p===void 0?{...C,...v}:p?{...v}:i||C;let S=Vo(d),h=[],w=jr(x);t.current=Object.keys(w);let g={...w};return Object.keys(w).forEach(b=>{let I=b.startsWith("--")?"all":b;h.includes(I)||h.push(`${I} ${l}s ${S} ${c}s`);}),y.forEach(b=>{h.includes(b)||h.push(`${b} 0.1s ${S} 0s`);}),{style:{...g,transition:R?"none":h.join(", "),opacity:R?0:g.opacity,pointerEvents:R?"none":g.pointerEvents}}},[e,e?.when,e?.watch])},Se=vi;var Xt=null,Ct=e=>{if(e!=null)return typeof e=="number"?`${e}px`:e},Si=(e,o)=>{let{as:t,fx:n,busy:r=false,stripes:s,transition:a,skeleton:i,className:p,propsToRemove:l,draggable:c,dragOptions:d,style:u,...m}=e||{},y=typeof window<"u",R={},x={};if(c&&y&&!Xt&&(import('@zuzjs/hooks').then(g=>{Xt=g.useDrag;}).catch(g=>{console.error("Error loading useDrag:",g);}),Xt)){let g=Xt(d);R={onMouseDown:g.onMouseDown},x={transform:`translate(${g.position.x}px, ${g.position.y}px)`};}let C=[p,r===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),v=a?{transition:a,duration:.3}:n||{},{style:S}=Se(v,o),h={};if(i?.enabled){let g=Ct(i.size),b=Ct(i.width),I=Ct(i.height),B=Ct(i.defaultSize),E=Ct(i.radius);g?(h["--skeleton-width"]=g,h["--skeleton-height"]=g):(b&&(h["--skeleton-width"]=b),I&&(h["--skeleton-height"]=I),B&&(h["--skeleton-default-size"]=B)),E&&(h["--skeleton-radius"]=E);}let w=Do(t??"");return {style:{...h,...u,...S,...x},className:[C,w||"",i?.enabled?"--skeleton":"",i?.enabled&&i?.type==="CIRCLE"?"--skeleton-circle":"",c?"--draggable":""].join(" ").trim(),rest:{...R,...f$1(m,l?[...l,"skeleton"]:["skeleton"])}}},O=Si;var en="(prefers-color-scheme: dark)",Ti=typeof window>"u",on=createContext(void 0),Fo=e=>{let o=useContext(on);if(!o){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return o},j=Fo,Pi=({children:e,storageKey:o="--ucs",forceTheme:t,zuzMap:n,...r})=>(n&&Yr(n),jsx(Ri,{storageKey:o,forceTheme:t,...r,children:e})),Ri=({children:e,storageKey:o,forceTheme:t,...n})=>{let[r,s]=useState(()=>t||tn(o,"system")),[a,i]=useState(()=>t||tn(o)),p=u=>(u||(u=window.matchMedia(en)),u.matches?"dark":"light"),l=useCallback(u=>{let m=u=="system"?p():u,y=document.documentElement;y.setAttribute("color-scheme",m),y.style.colorScheme=m,i(m);},[p]),c=useCallback(u=>{s(u),localStorage.setItem(o,u),l(u);},[r]),d=useCallback(u=>{let m=p(u);i(m),r==="system"&&l("system");},[r]);return useEffect(()=>{r==null&&window.localStorage.getItem(o);},[r]),useEffect(()=>{window.matchMedia(en).addEventListener("change",d);},[d]),useEffect(()=>{let u=m=>{m.key==o&&(m.newValue?c(m.newValue):c("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[c]),useEffect(()=>{l(t||r||"system");},[r]),jsxs(on,{value:{colorScheme:r,resolvedScheme:a,setColorScheme:c,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
2
2
|
const themes = ['light', 'dark']
|
|
3
|
-
let theme = localStorage.getItem(\`${
|
|
3
|
+
let theme = localStorage.getItem(\`${o}\`) || "system";
|
|
4
4
|
if (theme === "system") {
|
|
5
5
|
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
6
6
|
}
|
|
7
7
|
document.documentElement.setAttribute("color-scheme", theme);
|
|
8
|
-
document.documentElement.style.colorScheme = theme;`}}),jsx(Vo,{children:e})]})},Ur=(e,r)=>{if(gi)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Xr=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=B(n);return jsx("span",{ref:e,style:t,className:s,...a})};Xr.displayName="Zuz.Span";var ce=Xr;var jr=forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...i}=e,{variant:p}=j(true),{className:l,style:c,rest:d}=B(i);return jsx("div",{style:{color:s,...c,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||p||q.Small} ${l}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((u,m)=>jsx(ce,{className:`path${m+1}`},`${t}-layer-${m}`))})});jr.displayName="Zuz.Icon";var te=jr;var Se={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Qr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:i}=B(o),{spinner:p}=j(true),l=()=>{switch(r||p?.type||Se.Simple){case Se.Simple:return null;case Se.Wave:return jsxs(Fragment$1,{children:[jsx(f,{as:"--bar --bar1"}),jsx(f,{as:"--bar --bar2"}),jsx(f,{as:"--bar --bar3"})]});case Se.Roller:return null}};return jsx(f,{className:`${s} --spinner --${(r||p?.type||Se.Simple).toLowerCase()} --${t||p?.variant||q.Small}`.trim(),style:{...a},...i,children:l()})};Qr.displayName="Zuz.Spinner";var Re=Qr;var Jr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:i=0,duration:p=.5,stagger:l=.05,repeat:c=true,reveal:d=false,hover:u=false,...m}=r,{style:h,className:T,rest:x}=B(m),P=useRef(null),[v,R]=useState(false),[y]=useIntersectionObserver([P],{threshold:[1]}),S=useMemo(()=>{if(h?.opacity!==void 0)return h.opacity;if(typeof r.as=="string"){let A=r.as.match(/opacity:([\d.]+)/);if(A)return A[1]}return 1},[r.as,h?.opacity]),g=useMemo(()=>a?u?v:d?y===1:true:false,[a,u,v,d,y]);useEffect(()=>{e&&(typeof e=="function"?e(P.current):e.current=P.current);},[e]);let b=`h${r.h||1}`,E=useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),F=useMemo(()=>{let A=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof A=="string"&&A.includes("text-clip")},[r.as]);useLayoutEffect(()=>{if(!F||!P.current||E===null)return;let A=P.current,L=0,O=0,$=()=>{let k=A.getBoundingClientRect(),U=getComputedStyle(A).backgroundImage,X=k.width;A.querySelectorAll(".--fx-char").forEach(z=>{let W=z.getBoundingClientRect().left-k.left;z.style.backgroundImage=U,z.style.backgroundRepeat="no-repeat",z.style.backgroundSize=`${X}px 100%`,z.style.backgroundPosition=`-${W}px 0`,z.style.backgroundClip="text",z.style.webkitBackgroundClip="text",z.style.color="transparent";});},Z=()=>{cancelAnimationFrame(L),cancelAnimationFrame(O),L=requestAnimationFrame(()=>{O=requestAnimationFrame($);});};Z();let I=new ResizeObserver(Z);return I.observe(A),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(Z),window.addEventListener("resize",Z),()=>{cancelAnimationFrame(L),cancelAnimationFrame(O),I.disconnect(),window.removeEventListener("resize",Z);}},[F,E,a,g]);let M=useMemo(()=>n?jsx(ce,{dangerouslySetInnerHTML:{__html:n}}):a&&E!==null?E.split("").map((A,L)=>{let O=A===" ",Z=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":c?"infinite":"1";return jsx(ce,{"data-char":A,className:`--fx-char -fx ${g?`--fx-${a}`:""}`,style:{"--delay":`${i+L*l}s`,"--duration":`${p}s`,"--iteration":Z,"--target-opacity":S,display:O?"inline":"inline-block",whiteSpace:"pre",opacity:!g&&a==="typewriter"?0:void 0},children:A},L)}):o,[o,n,a,E,g,i,l,p,c]);return jsx(b,{ref:P,onMouseEnter:()=>u&&R(true),onMouseLeave:()=>u&&R(false),style:a?{...h,display:a?"flex":h?.display,flexWrap:a?"wrap":h?.flexWrap,opacity:a&&!g?0:a?1:h?.opacity,transition:a?"opacity 0.4s ease":void 0}:h,className:`${T} ${a?"--text-fx -fx":""}`.trim(),...x,children:M})};Jr.displayName="Zuz.Text";var _=Jr;var on=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:p,...l}=r,{style:c,className:d,rest:u}=B(l),m=n||be.Top;useRef(null);let [T,x]=useState(false);useRef(6);let v=i===true||T,y=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:S}=j(true),g=useMemo(()=>{let E=false;return addPropsToChildren(a,F=>{let M=F.props.className?.includes(s);return M&&(E=true),M||!E},(F,M)=>{let A=M.props.className?.includes(s),L=F===0,O={};return (A||L)&&(O.style={...M.props.style,anchorName:y}),L&&(O.onMouseEnter=$=>{x(true),M.props.onMouseEnter?.($);},O.onMouseLeave=$=>{x(false),M.props.onMouseLeave?.($);}),O})},[a,s,y]),b=ve({transition:m==be.Top?Q.SlideInTop:m==be.Bottom?Q.SlideInBottom:m==be.Left?Q.SlideInLeft:Q.SlideInRight,when:v,duration:.2,offset:o+6,margin:m==be.Top||m==be.Left?-o:o,curve:S?.curve||oe.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[g,jsx(f,{style:{positionAnchor:y,...b.style,...m===be.Top||m===be.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${v} --${p||S?.variant||q.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsx(_,{as:"--text rel",children:t}):t})]})};on.displayName="Zuz.ToolTip";var Pt=on;var qt={Loading:"loading",Normal:"normal"};var nn=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,tooltip:s,tooltipProps:a,icon:i,iconSize:p,children:l,withLabel:c,spinner:d,state:u,disabled:m,...h}=r,{style:T,className:x,rest:P}=B(h),{variant:v}=j(true),R=jsxs("button",{className:removeDuplicateWords(`--button ${s?"--tooltip-anchor":""} --${n} --${o||v} flex aic ${t?"":"jcc"} ${i?"--with-icon":""} ${x}`).trim().replace(/\s+/g," "),style:T,ref:e,disabled:u==qt.Loading||r.skeleton?.enabled||m,...P,children:[u==qt.Loading&&jsx(Re,{variant:o||v,type:d||Se.Simple}),(!u||u==qt.Normal)&&jsxs(Fragment$1,{children:[i&&jsx(te,{variant:p,name:i}),c===true?jsx(ce,{children:l}):l]})]});return s?jsx(Pt,{title:s,...a,children:R}):R};nn.displayName="Zuz.Button";var K=nn;var Hi=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:i}=e;return r=="-"?jsx(f,{className:"--line"}):jsxs(K,{reset:true,onClick:p=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsx(f,{as:"--icon",children:jsx(te,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsx(_,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},sn=Hi;var cn=({ref:e,...r})=>{let {id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:i,event:p,arrow:l,when:c,items:d,header:u,footer:m,origin:h=wt.TopRight,...T}=r,[x,P]=useState(false),[v,R]=useState(d||[]),{position:y,targetRef:S,calculatedAnchor:g}=useAnchorPosition(i?.current,p,{offsetX:s,offsetY:a,preferredAnchor:h}),b=g.toLowerCase(),E=b.includes("top");b.includes("bottom");let M=E?"--arrow-top":"--arrow-bottom",A=useMemo(()=>b.includes("left")?"--arrow-left":b.includes("right")?"--arrow-right":"--arrow-center",[b]),L=y.top!==0||y.left!==0;useEffect(()=>{c&&L?P(true):c||P(false);},[c,L]);let{className:O,style:$,rest:Z}=B(T),I=ve({...o?.transition?{transition:o.transition??Q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??oe.EaseInOut,duration:o?.duration??.05,when:x&&L});return jsxs(f,{ref:S,className:`--contextmenu ${l||i!=null?`--has-arrow ${M} ${A}`:""} abs flex cols ${O}`.trim(),"aria-hidden":!x,style:{...$,...I.style,top:y.top,left:y.left,visibility:L?"visible":"hidden",transformOrigin:g},...Z,children:[typeof u=="function"?createElement(u):u,v.map((k,U)=>jsx(sn,{...k,index:U},`context-${k.label.toLowerCase()}-${U}`)),typeof m=="function"?createElement(m):m]})};cn.displayName="Zuz.ContextMenu";var Ho=cn;var mn=forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:i,...p}=e,l=j(true),c=useDelayed(),d=n||l?.group?.fx,u=s||l?.group?.fxDelay,m=a||l?.group?.fxStep,h=i||l?.group?.classToIgnore||"-fx",T=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let P=x.props||{},v="fx"in P,R="tfx"in P,y=P.as?Array.isArray(P.as)?P.as.join(" "):P.as:P.className||"";return !(typeof y=="string"&&y.includes(h))&&(!v||R)},(x,P)=>{let v=(u??0)+x*(m??.1),R=P.props||{};return "tfx"in R?{delay:(R.delay??0)+v}:{fx:{...d,delay:v,when:o??(n?.when||c)}}}):t,[t,o,c,d,u,m,h,n]);return jsx(f,{className:"--group",ref:r,...p,children:T})});mn.displayName="Zuz.Group";var Ao=mn;var un=forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:i,...p}=e,{className:l,style:c,rest:d}=B(p),{spinner:u}=j(true);return "when"in e&&e.when==false?null:jsxs(Ao,{fx:{transition:Q.SlideInBottom,curve:oe.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)"},...d,children:[jsx(Re,{variant:o||u?.variant||q.Small,type:n||u?.type||Se.Simple}),!i&&jsx(_,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});un.displayName="Zuz.Cover";var $e=un;var jt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(jt||{}),Qt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Qt||{}),fn=(t=>(t.Stack="stack",t.Individual="individual",t))(fn||{}),dn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Ji=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(l,c)=>e.add({type:"toast",props:{...c,type:l}});return {show:(l,c,d,u)=>r("default",{title:l,message:c,icon:d,duration:u}),hide:l=>e.remove(l),success:(l,c,d,u)=>r("success",{title:l,message:c,icon:d,duration:u}),error:(l,c,d,u)=>r("error",{title:l,message:c,icon:d,duration:u}),warn:(l,c,d,u)=>r("warn",{title:l,message:c,icon:d,duration:u}),promise:(l,c,d,u)=>r("promise",{title:l,message:c,icon:d,duration:u}),clearAll:()=>e.clear("toast")}},$o=Ji;var gn=forwardRef((e,r)=>{let{when:t,...n}=e;return jsx(f,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:Q.FadeIn,when:t},...n})});gn.displayName="Zuz.Overlay";var tt=gn;var We=null,Ee=null,yn=forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:i,actionPosition:p,spinner:l,loadingMessage:c,onShow:d,onHide:u,...m}=e,{className:h,style:T,rest:x}=B(m),[P,v]=useState(t||""),[R,y]=useState(n||""),[S,g]=useState(null),[b,E]=useState(i||Le.Default),F=useMemo(()=>uuid(12),[]),[M,A]=useState(false),L=useRef(null),O=useRef(null),[$,Z]=useState(false),[I,k]=useState(true),U=useRef(null),X=R;useImperativeHandle(r,()=>({setLoading(z){Z(z);},showDialog(z,G,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{L.current.classList.remove("--wobble"),Ee=null;},500)),E(Le.Dialog),G&&y(G),z&&v(z),W&&g(W.reduce((J,le)=>(J.push({...le,key:le.key||uuid(12)}),J),[])),A(true),setTimeout(()=>re?re():()=>{},1e3);},dialog(z,G,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{L.current.classList.remove("--wobble"),Ee=null;},500)),E(Le.Dialog),y(G),v(z),W&&g(W.reduce((J,le)=>(J.push({...le,key:le.key||uuid(12)}),J),[])),A(true),setTimeout(()=>re?re():()=>{},1e3);},error(z,G){this.show(z,G,Le.Error);},warn(z,G){this.show(z,G,Le.Warn);},success(z,G){this.show(z,G,Le.Success);},show(z,G,W){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),O.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${O.current} scale(.9)`.trim();},50),Ee=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=O.current||"",Ee=null;},500)),We=setTimeout(()=>{A(false),We=null,Ee=null;},(G||4)*1e3),E(W||Le.Default),y(z),A(true),d?.();},hide(){A(false),u?.();}}));let H=useMemo(()=>{let z={when:M,duration:a||.3,delay:.1};if(b==Le.Dialog){if(o){let{from:G,to:W}=Ct(o,20);return {from:G,to:W,curve:s||oe.EaseInOut,...z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:oe.Spring,...z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:oe.Spring,...z}},[M,b]);return useEffect(()=>{U.current&&clearTimeout(U.current),M?k(true):U.current=setTimeout(()=>k(false),1e3);},[M]),b==Le.Dialog?jsxs(Fragment$1,{children:[jsx(tt,{when:M}),jsxs(f,{className:`--sheet --sheet-${b.toLowerCase()} ${M?"is-visible":""} ${h} fixed`.trim(),style:T,fx:H,...x,ref:L,children:[jsx($e,{when:$,spinner:l,message:c}),jsxs(f,{className:"--head flex aic rel",children:[jsx(f,{className:`--${P?"title":"dot"} flex aic rel`,children:P||""}),jsx(K,{onClick:z=>A(false),className:"--closer abs",children:"\xD7"})]}),jsx(f,{className:`--body flex aic rel ${S?"":"--no-action"}`.trim(),children:I?X:null}),S&&jsx(f,{className:`--footer flex aic rel ${p?p==Ro.Center?"jcc":"":"jce"}`.trim(),children:S.map((z,G)=>jsx(K,{onClick:W=>z.handler?z.handler():z.onClick?z.onClick():console.log("onClick Handler missing"),className:"--action",children:z.label},`sheet-${F}-action-${z.key}`))})]})]}):jsx(f,{className:`--sheet --sheet-${b.toLowerCase()} ${h} abs`.trim(),style:T,...x,fx:H,ref:L,children:M?R:null})}),xn=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;yn.displayName="Zuz.Sheet";var sl=yn;var Rt=createContext(null),Wo=()=>{let e=useContext(Rt);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},It=()=>useContext(Rt),vn=()=>()=>{},Sn=e=>{let r=useContext(Rt);return useSyncExternalStore(r?.subscribe??vn,()=>{if(!(!r||!e))return r.getSnapshot().values?.[e]},()=>{})},wn=e=>{let r=useContext(Rt);return useSyncExternalStore(r?.subscribe??vn,()=>!r||!e?null:r.getSnapshot().errors?.[e]??null,()=>null)},lt=()=>{let e=It(),r=Wo();return {...e,...r}},Cn=({children:e,initialValues:r={}})=>{let t=useRef({values:r,errors:{},touched:{}}),n=useRef(new Set(Object.keys(r))),o=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(l=>(o.current.add(l),()=>o.current.delete(l)),[]),i=()=>{o.current.forEach(l=>l());};useEffect(()=>{if(!r||Object.keys(r).length===0)return;let l=new Set(Object.keys(r)),c=[...n.current].filter(P=>!l.has(P)),d={...t.current.values};c.forEach(P=>delete d[P]);let u={...d,...r},m=t.current.values||{},h=Object.entries(u),T=Object.entries(m),x=h.length!==T.length||h.some(([P,v])=>m[P]!==v);n.current=l,x&&(t.current={...t.current,values:u},i());},[r]);let p=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,c)=>{t.current.values[l]!==c&&(t.current={...t.current,values:{...t.current.values,[l]:c}},i());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:c,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(l,c)=>{t.current={...t.current,errors:{...t.current.errors,[l]:c}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsx(Rt.Provider,{value:p,children:e})};var yl=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let i=!isNaN(Number(n[a+1]));o[s]=o[s]||(i?[]:{});}return o[s]},r);}return r},Tn=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:i,children:p,withData:l,beforeSubmit:c,onSubmit:d,onError:u,onSuccess:m,resetOnSuccess:h,...T}=r,{className:x,style:P,rest:v}=B(T),[R,y]=useState(false),S=useRef(null),g=$o(),b=It();Wo();let F=useRef(null),M=useCallback(H=>S.current?S.current.querySelectorAll(H):[],[S.current]),A=H=>({name:H.name||H.getAttribute("name")||H.getAttribute("data-name"),required:H.required?true:H.getAttribute("data-required")?H.getAttribute("data-required")=="true":false,with:H.with||H.getAttribute("with")}),L=H=>{let z=[];return H.querySelectorAll(".--input").forEach(G=>{z.push(G.value);}),z.join("")},O=H=>H.classList.contains("--otp")?L(H):H.classList.contains("--select")?H.querySelector("button.--selected")?.dataset.value:H.classList.contains("--checkbox")||H.getAttribute("type")==="checkbox"?H.checked:H.value,$=useCallback(H=>{let{name:z,required:G,with:W}=A(H),re=O(H);if(t&&t[z]&&b?.getSnapshot()){let J=t[z](re,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError(z,J),false}if(G&&(H.type==="checkbox"&&!H.checked||H.classList.contains("--select")&&(re==="-1"||!re)||!re||re===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?Je.MatchField:W.split("@")[0]:W).toUpperCase()){case Je.IPV4:return _$1(re).isIPv4();case Je.IPV6:return _$1(re).isIPv6();case Je.Email:return _$1(re).isEmail();case Je.Uri:try{return new URL(re),!0}catch{return false}case Je.MatchField:let[le,me,we]=W.split("@"),ie=document.querySelector(`[name=${me.trim()}]`);if(!ie)return false;switch(we||"direct-match"){case "if-not-empty":if(ie&&!_$1(ie.value).isEmpty()&&ie.value!=H.value)return false;break;case "direct-match":if(ie&&ie.classList.contains("--otp")&&H.classList.contains("--otp")&&L(ie)!=L(H))return false;if(ie&&ie.value!=H.value)return false;break}break}return true},[t,b]),Z=useCallback(()=>{let H={},z={...b?.getSnapshot().values||{}},G=null,W=null;if(M("[name]").forEach(J=>{let{name:le,required:me,with:we}=A(J),ie=me||we?$(J):true,pe=O(J);H[le]={valid:ie,value:pe},z[le]=pe,b?.setFieldError(le,ie?null:a?.[le]||"Invalid"),ie?J.classList.remove("--with-error"):(J.classList.add("--with-error"),G||(G=J),W=a?.[le]);}),G){let J=G;if(J.classList.contains("--otp"))for(let le of Array.from(J.querySelectorAll(".--input"))){let me=le;if(me.value==""){me.focus();break}}else J.focus();}let re=yl(z);return {error:G!=null,errorMsg:W||"Fix errors to continue...",data:H,payload:re}},[S.current,b]),I=useCallback((H={})=>{let{error:z,errorMsg:G,payload:W,data:re}=Z();if(z){g.error(G);return}i?startTransition(async()=>{y(true),withPost(i,{...l,...W,...H}).then(J=>{y(false),h&&b?.reset(),m?.(J,{...l,...W,...H}),m||g.success(J.message||"Redirecting...");}).catch(J=>{y(false),u?u(J):g.error(J.message);});}):d?.(W,re);},[Z,i,l,m,u,h,d]),k=useCallback(()=>{let H=M("[type=submit]");!H||H.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):H.forEach(z=>{z.addEventListener("click",I);});},[S.current]),U=useMemo(()=>addPropsToChildren(p,H=>H.props.type=="submit",H=>({ref:F})),[p]),X=useRef(I);return useImperativeHandle(e,()=>({setLoading:H=>y(H),submit:H=>X.current(H),init:k,hideError:()=>g.clearAll()}),[I,k]),useEffect(k,[]),useEffect(()=>{X.current=I;},[I]),useEffect(()=>{let H=M("[type=submit]"),z=Array.from(H).map(G=>{let W=G;return W.addEventListener("click",I),()=>W.removeEventListener("click",I)});return ()=>z.forEach(G=>G())},[I,M]),jsxs(f,{ref:S,style:P,className:`--form flex rel ${x}`,children:[!xn(o)&&jsx($e,{when:R,spinner:s,...o}),U]})};Tn.displayName="Zuz.FormInternal";var Pn=e=>jsx(Cn,{initialValues:e.withData,children:jsx(Tn,{...e})});Pn.displayName="Zuz.Form";var Xo=Pn;var Yo=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(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},Ve=new Yo;var bl=({action:e,render:r=true,message:t=""})=>jsx(f,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),Rn=bl;var In=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:i,className:p="",style:l,...c})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",p].filter(Boolean).join(" "),u={...l,gap:typeof r=="number"?`${r}px`:r};return jsx(f,{...c,className:d,style:u})};In.displayName="Zuz.FlexBox";var Ce=In;var wl=({useForm:e,action:r,actionPosition:t,dialogID:n,variant:o})=>jsx(Ce,{aic:true,as:`--footer rel ${t?t==Fr.Center?"--jcc":"":"--jce"}`.trim(),children:r.map((s,a)=>jsx(K,{variant:o,kind:s.kind,type:s.type||"button",onClick:()=>{if(!(e===true&&s.type==="submit")){if(s.handler)return s.handler();if(s.onClick)return s.onClick();console.log("onClick Handler missing");}},as:"--action",children:s.label},`dialog-${n}-action-${s.key||a}`))}),Nn=wl;var Cl={colorSchemeLight: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:[jsx("circle",{cx:"12",cy:"12",r:"5"}),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: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:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark: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:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[ke.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[ke.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[ke.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[ke.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[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"}),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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[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"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},V=Cl;var Tl=({title:e="Alert",description:r,titlePosition:t="center",onClose:n})=>jsxs(Ce,{as:"--head rel",children:[jsxs(Ce,{cols:true,as:[`--${e?"title":"dot"} rel`,`--position-${t}`],children:[jsx(_,{children:e}),r&&jsx(_,{as:"--description",children:r})]}),jsx(K,{onClick:o=>n(),className:`--closer abs ${t=="center"?"center-v":""}`,children:V.close})]}),kn=Tl;var On=({ref:e,...r})=>{let{index:t,id:n,title:o,description:s,titleAlignment:a,message:i,content:p,transition:l,curve:c,speed:d,type:u,width:m,action:h,actionPosition:T,spinner:x,loadingMessage:P,variant:v,inBackground:R,forceClose:y,forceLoading:S,useForm:g,formProps:b,onConfirm:E,onCancel:F,onClose:M,onShow:A,onHide:L,...O}=r,$=useMemo(()=>uuid(12),[]),[Z,I]=useState(o||""),[k,U]=useState(s||""),[X,H]=useState(p||i||""),[z,G]=useState(u||et.Dialog),[W,re]=useState(false),[J,le]=useState(true),[me,we]=useState(()=>h?h.map(Oe=>({...Oe,key:Oe.key||uuid(12)})):null),[ie,pe]=useState(false),{variant:Y,spinner:se,dialog:ne}=j(true),ge=v||ne?.variant||Y||q.Small,{style:He,className:Te,rest:he}=B(O),Me=useRef(null),ae=ve({when:W,duration:d||ne?.speed||.3,delay:ne?.delay||.1,transition:l||ne?.transition||Q.SlideInBottom,curve:c||ne?.curve||oe.EaseInOut,watch:["scale","filter","transform"]}),xe=()=>{re(false),M(n);},zt=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(xe)&&xe();}}],[W]);useShortcuts(zt),useEffect(()=>{G(et.Dialog),H(p||i),I(Z),U(k),re(true),setTimeout(()=>A?A():()=>{},500);},[]),useEffect(()=>{y&&xe();},[y]),useEffect(()=>{S!=null&&pe(S);},[S]),useEffect(()=>(W?Ve.push(xe):Ve.pop(xe),()=>Ve.pop(xe)),[W]);let _t=useMemo(()=>1e4+t*10,[t]),Ae=jsxs(f,{as:`--dialog --${(u??et.Default).toLowerCase()} ${W?"--visible":""} ${Te} fixed abc`.trim(),style:{...ae.style,zIndex:_t+1,pointerEvents:R==true?"none":"auto",width:m||"auto",...R==true?{scale:"0.92",filter:"blur(2px)"}:{}},...he,ref:Me,children:[jsx(kn,{title:Z,description:s,titlePosition:a||ne?.titleAlignment||"center",onClose:xe}),jsx(Rn,{message:X,render:J,action:me}),me&&me.length>0&&jsx(Nn,{variant:ge,action:me,dialogID:$,useForm:g,actionPosition:T}),jsx($e,{when:ie,spinner:x||ne?.spinner||se?.type||Se.Simple,message:P||ne?.loadingMessage})]});return jsxs(Fragment$1,{children:[jsx(tt,{style:{zIndex:_t},when:W}),g?jsx(Xo,{onSubmit:((Oe,Co)=>{E?.(Oe,Co);}),...b,children:Ae}):Ae]})};On.displayName="Zuz.Dialog";var Jo=On;var Vn=forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:i,containerRef:p,thumbY:l,thumbX:c,onScrollY:d,onScrollX:u}=useScrollbar(t||1,o,n),{style:m,className:h,rest:T}=B(a);return useEffect(()=>{let x=p.current;if(!x)return;let P=()=>{window.dispatchEvent(new Event("resize"));},v=R=>{let y=R.target;if(y.closest(".--allow-scroll")){let g=y.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:E,clientHeight:F}=g,M=R.deltaY<0,A=R.deltaY>0;(M&&b>0||A&&b+F<E)&&R.stopPropagation();}};return x.addEventListener("scroll",P),x.addEventListener("wheel",v,{passive:true}),()=>{x.removeEventListener("scroll",P),x.removeEventListener("wheel",v);}},[p]),jsxs(f,{ref:i,className:h.trim(),as:"--scrollview rel",children:[jsx(f,{as:`--scroll-content ${h}`.trim(),ref:p,style:s||{},children:T.children}),jsx(f,{as:"--scroll-track --track-y --abs",children:jsx(f,{as:"--scroll-thumb --abs --round",ref:l,onMouseDown:d})}),jsx(f,{as:"--scroll-track --track-x --abs",children:jsx(f,{as:"--scroll-thumb --abs --round",ref:c,onMouseDown:u})})]})});Vn.displayName="Zuz.ScrollView";var er=Vn;var Dn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:i,animation:p,prerender:l,inBackground:c,forceClose:d,forceLoading:u,onClose:m,...h}=r,{drawer:T}=j(true),[x,P]=useState(a),[v,R]=useState(false),[y,S]=useState(l??(T?.prerender||true)),[g,b]=useState(false),E=()=>{R(false),m?.(t??-1);},{className:F,style:M,rest:A}=B(h),L=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(E)&&E();}}],[v]);useShortcuts(L),useEffect(()=>{P(a);},[a]),useEffect(()=>(v?Ve.push(E):Ve.pop(E),()=>Ve.pop(E)),[v]),useEffect(()=>{R(true);},[]),useEffect(()=>{d&&E();},[d]),useEffect(()=>{u!=null&&b(u);},[u]);let O=o||T?.from||Pe.Left,$=useMemo(()=>{switch(O){case Pe.Left:return {from:{x:"-100vw"},to:{x:0}};case Pe.Right:return {from:{x:"100vw"},to:{x:0}};case Pe.Top:return {from:{y:"-100vh"},to:{y:0}};case Pe.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,T?.from]),Z=ve({from:{...$.from,opacity:0},to:{...$.to,opacity:1},when:v,curve:p||T?.animation||oe.EaseInOut,duration:s||T?.speed||.5,watch:["scale","filter"]}),I=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(tt,{onClick:k=>{v&&E();},when:v,style:{zIndex:I}}),jsxs(f,{ref:e,"aria-hidden":!v,className:`--drawer flex cols ${F} --${O.toLowerCase()} fixed`,style:{...M,...Z.style,"--m":`${i||T?.margin||0}px`,zIndex:I+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...A,children:[o==Pe.Top||o==Pe.Bottom?jsx(f,{className:"--handle"}):null,jsx(K,{as:"--close-drawer --abs",onClick:E,children:V.close}),jsxs(er,{as:"rel",children:[y||v?x:null,jsx($e,{when:g})]})]})]})};Dn.displayName="Zuz.Drawer";var rr=Dn;var An=forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=useRef(null);useImperativeHandle(r,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(o?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:i,style:p,rest:l}=B(s);return jsx(f,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:p,...l,children:jsx(f,{ref:a,className:"--bar rel"})})});An.displayName="Zuz.ProgressBar";var rt=An;var Fl=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:i,message:p,duration:l,sticky:c=false,actions:d=[],position:u,style:m,isHovered:h,total:T,progress:x,progressValue:P,forceClose:v,variant:R,onClick:y,onClose:S}=e,[g,b]=useState(false),[E,F]=useState(false),{toast:M}=j(true),A=typeof P=="number",L=A?Math.max(0,Math.min(1,P)):void 0,O=E||v,$=u??M?.position??"TopCenter",Z=n??M?.type??"default",I=m??M?.style??"stack",k=l??M?.duration??4,U=x??M?.progress??false,X=useRef(k*1e3),H=useRef(void 0),z=useRef(void 0),G=useRef(null),W=ve({when:g&&!O,duration:.3,transition:M?.transition||($.includes("Top")?Q.SlideInTop:$.includes("Bottom")?Q.SlideInBottom:$.includes("Left")?Q.SlideInLeft:Q.SlideInRight),curve:M?.curve||oe.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let Y=se=>{if(z.current!==void 0){let ne=se-z.current;if(!A&&!h&&!c&&!O&&(X.current-=ne,G.current)){let ge=Math.max(0,X.current/(k*1e3)*100);G.current?.setProgress?.(ge/100);}}z.current=se,X.current<=0?F(true):H.current=requestAnimationFrame(Y);};return H.current=requestAnimationFrame(Y),()=>{H.current&&cancelAnimationFrame(H.current);}},[h,c,O,k]),useEffect(()=>{if(O){let Y=setTimeout(()=>{S?.(t);},350);return ()=>clearTimeout(Y)}},[O,t]);let re=I==="stack",J=h?r*65:r*8,le=h?1:Math.max(.85,1-r*.05),me=h?1:Math.max(.4,1-r*.2),we=Y=>{y?y(Y):s!==true&&(!d||d.length===0)&&F(true);},ie=W.style.transform||"translate(0, 0)",pe=O?ie:`${ie} translateY(${$.includes("Top")?J:-J}px) scale(${le})`;return jsxs(f,{onClick:we,as:`--snack --${O?"hidden":"visible"} --${R||M?.variant||q.Medium} --${Z} --${$.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-r,pointerEvents:O?"none":"auto",opacity:O?W.style.opacity:me,transform:pe,filter:!O&&re&&!h&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${W.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxs(f,{as:"--ico flex aic jcc rel",children:[o?jsx(te,{name:o}):jsx(f,{as:"--no-icon"}),s===true&&jsx(Re,{as:"abs abc"})]}),jsxs(f,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(_,{as:"--tt",children:i||dn[n]}),jsx(_,{as:"--tm",children:p})]}),d&&d.length>0&&jsx(f,{as:"--actions flex gap:5",children:d.map((Y,se)=>jsx(K,{as:"--snack-btn bold",variant:q.XSmall,onClick:ne=>{ne.stopPropagation(),Y.onClick(ne);},children:Y.label},se))}),(U||A)&&jsx(rt,{as:"abs",progress:L,ref:G})]})},sr=Fl;var Ie=createContext(null),Gl=({ref:e,...r})=>{let n=useContext(Ie)?.depth??0,[o,s]=useState(null),[a,i]=useState(null),[p,l]=useState(false),[c,d]=useState([]),u=useDelayed(),m=useRef(0),h=()=>++m.current,T=()=>{l(false),setTimeout(()=>i(null),200);};useImperativeHandle(e,()=>({add(y){let S=h(),g={id:S,...y};return d(b=>[...b,g]),S},openMenu(y){l(false),setTimeout(()=>{i({id:h(),type:"menu",props:y}),l(true);},16);},update(y,S){d(g=>g.map(b=>b.id!==y?b:{...b,props:{...b.props,...S}}));},remove(y){d(S=>S.map(g=>g.id===y?{...g,props:{...g.props,forceClose:true}}:g)),a?.id===y&&T();},loading(y,S){d(g=>g.map(b=>b.id===y?{...b,props:{...b.props,forceLoading:S}}:b)),a?.id===y&&T();},clear(y){d(c.filter(S=>S.type!=y));}})),useEffect(()=>{if(a&&p){let y=()=>T();return document.addEventListener("click",y),()=>document.removeEventListener("click",y)}},[a,p,T]);let x=y=>{setTimeout(()=>{d(S=>S.filter(g=>g.id!==y)),a?.id===y&&i(null);},250);},P=useMemo(()=>[...c.filter(y=>y.type!="toast")],[c]);if(!u)return null;let v=c.filter(y=>y.type=="toast").reverse(),R=Object.values(Qt);return createPortal(jsxs(f,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[P.map((y,S)=>{let g=S<P.length-1;return y.type==="dialog"?jsx(Jo,{onClose:x,index:S,id:y.id,...y.props,inBackground:g},`layer-${y.type}-${y.id}`):y.type==="drawer"?jsx(rr,{onClose:x,index:S,id:y.id,...y.props,inBackground:g},`layer-${y.type}-${y.id}`):null}),R.map(y=>{let S=v.filter(g=>(g.props.position||"TopCenter")===y);return S.length===0?null:jsx(f,{onMouseEnter:()=>s(y),onMouseLeave:()=>s(null),as:`--toast-container fixed --${y.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:S.map((g,b)=>jsx(sr,{index:b,total:S.length,isHovered:o===y,onClose:x,id:g.id,...g.props},g.id))},y)}),a&&jsx(f,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(Ho,{onClose:T,when:p,...a.props},`menu-${a.id}`)})]}),document.body)},Ul=({children:e})=>{let r=useContext(Ie),t=r?r.depth+1:0,n=useRef(null),o=useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxs(Ie.Provider,{value:o,children:[e,jsx(Gl,{ref:n})]})},Vo=Ul;var Xl=()=>{let e=useContext(Ie);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:i,transition:p,curve:l,arrow:c,duration:d,header:u,footer:m})=>{e.openMenu({fx:{transition:p,curve:l,duration:d},parent:n,items:o,origin:s||wt.TopCenter,offsetX:a,offsetY:i,arrow:c,header:u,footer:m});},hide:e.clear}},Yl=Xl;var Ql=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=a=>e.remove(a),n=(a,i)=>e.loading(a,i);return {clearAll:r,show:a=>{let i=e.add({type:"dialog",props:{...a,type:et.Dialog}});return {id:i,setLoading:p=>n(i,p),hide:()=>t(i)}},confirm:a=>{let i=e.add({type:"dialog",props:{...a,type:et.Confirm,action:a.action??[{label:a.cancelLabel??"Cancel",kind:"ghost",onClick:()=>{a.onCancel?.(),t(i);}},{label:a.confirmLabel??"Confirm",kind:"solid",type:"submit",onClick:p=>{a.onConfirm?.(p);}}]}});return {id:i,setLoading:p=>n(i,p),hide:()=>t(i)}},hide:t}},Jl=Ql;var tc=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:Pe.Right}),left:s=>o({children:s,from:Pe.Left}),top:s=>o({children:s,from:Pe.Top}),bottom:s=>o({children:s,from:Pe.Bottom}),close:t}},oc=tc;var nc=(e,r,t={})=>{let[n,o]=useState(null),[s,a]=useState(false),{duration:i=.25,curve:p=oe.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=t;return useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:ve({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:p,duration:i,when:s&&r}).style,isMeasured:s,sourceRect:n}},sc=nc;var cc=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=useRef(null),i=useCallback(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=p.getBoundingClientRect(),d=l.getBoundingClientRect(),u,m;o?(u=o.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(p).position==="fixed"?m="fixed":m="absolute",m==="fixed"?u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),p.style.position!==m&&(p.style.position=m),a.current=m;let x=0,P=0;switch(n){case "top":x=d.top-c.height-t,P=d.left,x<u.top&&d.bottom+c.height+t<=u.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,P=d.left,x+c.height>u.bottom&&d.top-c.height-t>=u.top&&(x=d.top-c.height-t);break;case "left":x=d.top,P=d.left-c.width-t,P<u.left&&d.right+c.width+t<=u.right&&(P=d.right+t);break;case "right":x=d.top,P=d.right+t,P+c.width>u.right&&d.left-c.width-t>=u.left&&(P=d.left-c.width-t);break}if(x=Math.max(u.top,Math.min(x,u.bottom-c.height)),P=Math.max(u.left,Math.min(P,u.right-c.width)),a.current==="fixed")p.style.top=`${x}px`,p.style.left=`${P}px`;else {let v;p.offsetParent?v=p.offsetParent.getBoundingClientRect():v={top:0,left:0};let R=x-v.top+window.scrollY,y=P-v.left+window.scrollX;p.style.top=`${R}px`,p.style.left=`${y}px`;}},[e,s,t,n,o]);return useEffect(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(i);return c.observe(p),l&&c.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,o,s]),{postion:a.current,reposition:i}},kt=cc;var pc=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(m,h)=>e.add({type:"toast",props:{...h,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),o=(m,h)=>e.update(m,h),s=m=>({id:m,update:h=>o(m,h),setType:h=>o(m,{type:h}),setProgress:h=>o(m,{progress:true,progressValue:h}),setBusy:h=>o(m,{busy:h}),success:()=>o(m,{type:"success"}),error:()=>o(m,{type:"error"}),warn:()=>o(m,{type:"warn"}),promise:()=>o(m,{type:"promise"}),default:()=>o(m,{type:"default"}),hide:()=>n(m)}),a=m=>s(r("default",m)),i=m=>s(r("success",m)),p=m=>s(r("error",m)),l=m=>s(r("warn",m)),c=m=>s(r("promise",m)),d=(m,h,T)=>{let x=r(m,{...h,sticky:h.sticky??false,actions:[{label:T?.label||"Ok",onClick:P=>{T?.onClick?.(P),n(x);}}]});return s(x)},u=(m,h,T,x)=>{let P=r(m,{...h,sticky:true,actions:[{label:T?.label||"Ok",onClick:v=>{T?.onClick?.(v),(T?.hide??false)===true&&n(P);}},{label:x?.label||"Cancel",onClick:v=>{x?.onClick?.(v),(x?.hide??true)===true&&n(P);}}]});return s(P)};return {show:a,hide:n,promise:c,clearAll:t,ok:(m,h)=>d("default",m,h),success:(m,h)=>h?d("success",m,h):i(m),error:(m,h)=>h?d("error",m,h):p(m),confirm:(m,h,T)=>u("default",m,h,T),warn:(m,h)=>h?d("warn",m,h):l(m),succes:(m,h)=>h?d("success",m,h):i(m)}},uc=pc;var Gn=({ref:e,style:r,...t})=>{let n=useRef(null),o=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=B(t,o);return jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...i})};Gn.displayName="Zuz.Box";var f=Gn;var qn=forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=useState(false);return jsxs(f,{className:"--accordion flex cols",...o,children:[jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(_,{className:"--label flex",children:t}),jsx(f,{className:"--arrow flex",children:s?V.arrowUp:V.arrowDown})]}),s&&jsx(f,{className:"--detail",children:n})]})});qn.displayName="Zuz.Accordion";var xc=qn;var bc=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsx(K,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsx(te,{name:r}):r}),Yn=bc;var jn=forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,i=useRef(null),[p,l]=useState(o||t[0].tag||0),c=useCallback(({x,y:P})=>{if(i.current){let v=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-v.left}`),document.documentElement.style.setProperty("--tip-y",`${P-v.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",c));},[]);useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,P)=>P.label.length>x.length?P.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",u));},[]);let{className:m,style:h,rest:T}=B(a);return jsxs(f,{ref:i,style:h,className:[`--actionbar flex aic ${m}`,`${!s||s==be.Auto?"rel":`--${s}`}`].join(" ").trim(),...T,children:[t.map((x,P)=>jsx(Yn,{selected:p===x.tag||o==P,...x,idx:P},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(f,{className:"--tip abs",children:jsx(f,{className:"--track flex aic",children:t.map(({label:x})=>jsx(f,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});jn.displayName="Zuz.ActionBar";var Tc=jn;var Jn=forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...i}=e,{className:p,style:l,rest:c}=B(i);return jsxs(f,{className:`--alert --${t||ke.Info} flex aic ${p}`.trim(),style:l,...c,children:[jsx(f,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&V[t||ke.Info]}),jsxs(f,{className:"--meta flex cols",children:[jsx(_,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(_,{className:"--message",h:2,children:s})]})]})});Jn.displayName="Zuz.Alert";var Ic=Jn;var ts=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:i,className:p,rest:l}=B(a),{variant:c}=j(true),d=useRef(null),u=lt(),m=o?u.errors?.[o]:null,h=o&&u.values&&u.setFieldValue,T=h?u.values?.[o]:void 0,x=useDebounce(v=>{h&&u.setFieldValue?.(o,v);},500),P=v=>{let R=v.currentTarget.value;n&&(R=R.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),v.currentTarget.value=R),x(R),r.onInput?.(v);};return useEffect(()=>{d.current&&o&&T!==void 0&&d.current.value!==String(T)&&(d.current.value=String(T));},[T,o]),useEffect(()=>()=>{h&&u.deleteFieldValue?.(o);},[]),jsx("input",{name:o,className:`--input --${t||c} ${m?"--has-error":""} --flex ${p}`.trim(),style:i,defaultValue:T??r.defaultValue??"",onInput:P,onKeyDown:v=>{v.key=="Enter"&&s?.(v.currentTarget.value);},ref:v=>{d.current=v,typeof e=="function"?e(v):e&&(e.current=v);},...l})};ts.displayName="Zuz.Input";var fe=ts;var rs=e=>{let{meta:r,children:t}=e,n=useDelayed(),{label:o,icon:s,...a}=isValidElement(r)?{}:r,{className:i,style:p,rest:l}=B({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(r)?jsx("li",{style:p,className:i,children:r}):jsxs("li",{style:p,className:i,...l,children:[t,typeof r=="string"?r:o]})};rs.displayName="Zuz.ListItem";var ns=rs;var as=forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...i}=e,{className:p,style:l,rest:c}=B(i),d=a==true?"ol":"ul";return createElement(d,{className:`--list --${n||q.Small} flex ${o??"cols"} ${p}`.trim(),style:l,ref:r,...c,children:t.map((u,m,h)=>{let T=`${typeof u=="string"?`li-${String(u)}`:isValidElement(u)?`li-${u.key}`||`${m}-${MD5(u.toString())}`:u.label}-${m}`;return jsxs(Fragment,{children:[jsx(ns,{meta:u}),s&&h[m+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${m+1}-${T}`):null]},T)})})});as.displayName="Zuz.List";var ze=as;var ls=forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...i}=e,{className:p}=B({as:s||""}),{style:l}=B(i),[c,d]=useState(false),[u,m]=useState(o||[]),h=useRef(null),T=useRef(null),x=useRef(null),P=useMemo(()=>i.name||uuid(12),[]),[v,R]=useState(null),[y,S]=useState(null),[g,b]=useState([]),F=useDebounce(I=>{I.target.value==""?(d(false),m([])):n&&I.target.value.trim()!=""&&withPost(n,{query:I.target.value}).then(k=>{"items"in k&&_$1(k.items).isArray()?(m(k.items),S(I.target.value),b(k.items)):console.error("Action Response should contain items array"),R(null);}).catch(k=>{R(null),m([]);});},250),M=()=>{if(T.current){let I=T.current.getBoundingClientRect(),k=window.innerHeight-I.bottom,U=I.top;if(x.current){let X=x.current;k<X.offsetHeight&&U>k?(X.style.top="auto",X.style.bottom=`${I.height}px`,X.style.maxHeight=`${U-150}px`):(X.style.top=`${I.height+5}px`,X.style.bottom="auto",X.style.maxHeight=`${k-150}px`);}}},A=I=>{if(u.length>0){if((I.key==="ArrowDown"||I.key==="ArrowUp")&&(I.preventDefault(),I.stopPropagation()),I.key==="Escape")R(null),d(false),m([]);else if(I.key==="ArrowDown")R(k=>{let U=k===null||k===u.length-1?0:k+1;return O(U),U});else if(I.key==="ArrowUp")R(k=>{let U=k===null||k===0?u.length-1:k-1;return O(U),U});else if(I.key==="Enter"&&v!==null){let k=u[v];h.current&&(h.current.value=k,d(false),m([]));}}},L=I=>{h.current&&(h.current.value=I,d(false),m([]));},O=I=>{let k=u[I];if(k&&h.current&&(h.current.value=k,h.current.setSelectionRange(k.length,k.length)),x.current){let X=x.current.children[I];X&&X.scrollIntoView({block:"nearest"});}},$=I=>{T.current&&!T.current.contains(I.target)&&(d(false),m([]));},Z=()=>{h.current&&h.current.value===y&&(m(g),R(null),M());};return useEffect(()=>(window.addEventListener("resize",M),window.addEventListener("scroll",M,true),document.addEventListener("mousedown",$),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true),document.removeEventListener("mousedown",$);}),[]),useEffect(()=>{M();},[u]),jsxs(f,{style:l,ref:T,className:`--autocomplete --${e.size||q.Small} flex aic rel ${p}`.trim(),children:[jsx(fe,{ref:h,autoComplete:"off",onChange:F,onKeyDown:A,onFocus:Z,...i}),jsx(f,{className:"--arrow rel flex aic jcc",children:u.length>0?V.arrowUp:V.arrowDown}),u.length>0&&jsx(ze,{id:P,ref:x,className:"--suggestion-list flex cols abs",items:u.map((I,k)=>({label:I,onClick:U=>{U.preventDefault(),U.stopPropagation(),L(I);},className:v===k?"--current":"",animate:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:clamp(.02*k,.02,.5)}}))})]})});ls.displayName="Zuz.AutoComplete";var Uc=ls;var cs=forwardRef((e,r)=>{let t=useRef(null),n=useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=B(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});cs.displayName="Zuz.Image";var st=cs;var ms=forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:i,as:p,alt:l,color:c,style:d,...u}=e,[m,h,T]=useImage(t??"",s,a),{className:x,style:P,rest:v}=B({fx:i,as:p});return jsx(f,{className:`--avatar --${n||q.Small} --${(o||$r.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:c||"var(--avatar-bg, var(--primary))",...d,...P},...v,children:t?jsx(st,{src:m,crossOrigin:s,referrerPolicy:a,...u}):jsx(_,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});ms.displayName="Zuz.Avatar";var tm=ms;var om=({size:e=5,type:r="dead",label:t="",variant:n=q.Small,loading:o=false,spinner:s,...a})=>{let{style:i,className:p,rest:l}=B(a);return jsxs(f,{style:{..._$1(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${r} rel flex aic jcc ${p}`.trim(),children:[jsx(f,{fx:{transition:Q.FadeIn,curve:oe.Liquid,duration:.5,when:o},as:"abs abc",children:jsx(Re,{type:s})}),_$1(t).isEmpty()?jsx(f,{as:`--dot --${r}`}):jsx(_,{as:"--label",children:t})]})},rm=om;var ym=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,r=e.getDay();return addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return format(addDays(e,(6-r)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],xm=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},us=forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:i,rest:p}=B(s),[l,c]=useState(t||new Date),d=startOfMonth(l),u=endOfMonth(l),m=startOfWeek(d),h=endOfWeek(u),T=useMemo(()=>eachDayOfInterval({start:m,end:h}),[m,h]),x=R=>{o?.(R),c(R);},P=()=>{c(R=>new Date(R.getFullYear(),R.getMonth()-1));},v=()=>{c(R=>new Date(R.getFullYear(),R.getMonth()+1));};return jsxs(f,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsx(f,{as:"--calendar-quick-select flex cols flex:1",children:xm(ym).map(R=>{let y=R.getDate();return jsxs(K,{onClick:()=>x(y),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(_,{as:"flex:1",children:R.label}),jsx(_,{as:"tar",children:R.getDateFormat()})]},`--dtp-option-label-${R.label}`)})}),jsxs(f,{as:"--calendar-selector flex cols flex:1",children:[jsxs(f,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(_,{as:"flex:1 --calendar-cm bold",children:format(l,"MMMM yyyy")}),jsx(K,{onClick:P,as:"--calendar-chevron",children:V.chevronUpOutline}),jsx(K,{onClick:v,as:"--calendar-chevron",children:V.chevronDownOutline})]}),jsxs(f,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(R=>jsx(_,{as:"--calendar-day",children:R},`--calendar-hd-${R}`)),T.map((R,y)=>{let S=isSameMonth(R,l),g=isSameDay(R,l),b=isToday(R);return jsx(K,{disabled:!S,onClick:()=>x(R),as:["--calendar-day --calendar-dd",`${g?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(R,"d")},`--calendar-day-${y}-${R.getFullYear()}-${R.getMonth()}-${R.getDay()}`)})]})]})]})});us.displayName="Zuz.Calendar";var ur=us;var co=(t=>(t.Table="table",t.Gooey="gooey",t))(co||{});var hs=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:p,nextLabel:l,hash:c,loading:d,seperator:u,renderOnZeroPageCount:m,asDots:h,progressBar:T,onPageChange:x,...P}=r,v=useRef(null),R=useMemo(()=>toHash(numberInRange(4,8)),[]),y=useCallback(I=>`${toHash(I,c||6,R)}${u||""}${R}`,[R]),S=useMemo(()=>i||"...",[i]),g=useRef(null),[b,E]=useState({id:c?o?typeof o=="number"?y(o):o:1:o||1,label:o||1});useImperativeHandle(e,()=>({setPage:I=>E(I),getPage:I=>b,setProgress:I=>g.current?.setProgress?.(I),getProgress:()=>g.current?.getProgress?.()??0}),[g.current]);let{style:F,className:M,rest:A}=B(P),L=useCallback(I=>typeof I=="number"?I:+I.label,[]);if(!t)throw new Error('"itemCount" prop is required');let O=useMemo(()=>Math.ceil(t/n),[t,n]),$=useMemo(()=>{let I=[],k=Math.max(L(b)-(s||2),1),U=Math.min(L(b)+(s||2),O);k>1&&I.push({id:c?y(1):1,label:1}),k>2&&I.push({id:-1,label:S});for(let X=k;X<=U;X++)I.push({id:c?y(X):X,label:X});return U<O-1&&I.push({id:-1,label:S}),U<O&&I.push({id:c?y(O):O,label:O}),I},[b]),Z=useCallback(I=>{let k=I;+k.label<1||+k.label>O||(E(k),x?.(k));},[t,n,b]);return $.length<=1&&(m??false)===false?null:jsxs(f,{ref:v,as:`--pagination ${h===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${M}`,children:[jsx(f,{as:"flex flex:1 aic --pgt-btns",children:($.length>1?$:[{id:1,label:1},{id:-1,label:S}]).map((I,k,U)=>{let X=(typeof I=="string"?I:I.label)==L(b);return jsx(K,{disabled:I.id==-1||L(b)==+I.label,className:X?"--current-page":"",onClick:H=>Z(I),children:h===true?T===true&&X?jsx(rt,{ref:g}):"":typeof I=="string"?I:I.label},`--pg-${k}-${I.id}`)})}),jsx(f,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(L(b)-1)*n+1} - `,`${Math.min(L(b)*n,t)} of ${t} items`].join(" ")}),jsxs(f,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(K,{disabled:L(b)<=1,onClick:I=>Z({id:c?y(L(b)-1):L(b)-1,label:L(b)-1}),children:V.chevronLeftOutline}),jsx(K,{disabled:$.length<=1||L(b)==L($[$.length-1]),onClick:I=>Z({id:c?y(L(b)+1):L(b)+1,label:L(b)+1}),children:V.chevronRightOutline})]})]})};hs.displayName="Zuz.Pagination";var Ot=hs;function Rm(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:p=true,useWheel:l=true,spacing:c=160,rotation:d=20,scaleStep:u=.15,blur:m=4,animation:h="power",showDots:T=false,autoPlay:x=false,autoPlaySpeed:P=3,onChange:v,...R}=e,{className:y,style:S}=B(R),g=useRef(null),b=P/(P>=1e3?1e3:1),E=useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:p,useWheel:l,onChange:O=>{g.current?.setPage({id:O+1,label:O+1}),g.current?.setProgress(0),v?.(O);}}),{pause:F,resume:M,reset:A}=useTimer({duration:b,autoStart:x===true,onProgress:O=>{x===true&&g.current?.setProgress(1-O);},onExpired:()=>{x===true&&E.next(),A();}}),L={...S,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":u,"--active-index":E.index,"--carousel-transition":`var(--${h})`};return jsxs(f,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${y}`.trim(),style:L,children:[jsx(f,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((O,$)=>{let Z=$-E.index;if(a==="infinite"){let k=t.length;Z=((Z+k/2)%k+k)%k-k/2;}let I=$===E.index;return jsx(f,{onMouseEnter:()=>I&&F(),onMouseLeave:()=>I&&M(),className:`--carousel-item-wrapper abs ${I?"--is-active":""}`,style:{"--offset":Z,zIndex:I?100:100-Math.abs(Z),display:Math.abs(Z)>5?"none":"flex"},children:n(O,$,E.index)},$)})}),T&&jsx(Ot,{ref:g,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:O=>E.goTo(+O.label-1),asDots:true,progressBar:true})]})}var Im=forwardRef(Rm),Em=Im;var ys=(r=>(r.Line="line",r))(ys||{});var vs=forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:p,animated:l,animDuration:c=2,animDelay:d=0,padding:u=0,type:m,...h}=e,{className:T,style:x,rest:P}=B(h),v=useRef(null),R=useResizeObserver(v.current?.parentElement||v),y=typeof n=="number"?n:R.width,S=typeof o=="number"?o:R.height,g={width:y,height:S},b=useId(),{pathD:E,areaPathD:F}=useLineChart(t,g,u+(a||2)),M=useRef(null),A=useRef(null),[L,O]=useState(0),[$,Z]=useState(0);return useEffect(()=>{l&&(M.current&&O(M.current.getTotalLength()),A.current&&Z(A.current.getTotalLength()));},[l,E,F,y,S]),jsx(f,{ref:v,as:`--chart --${m||"line"}-chart ${T}`.trim(),style:{...x,width:n,height:o},...P,children:y>0&&S>0&&jsxs("svg",{viewBox:`0 0 ${y} ${S}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:i}),jsx("stop",{offset:"100%",stopColor:p})]})}),jsx("path",{ref:A,d:F,fill:`url(#${b})`,stroke:"none",style:l?{strokeDasharray:$,strokeDashoffset:$}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:$,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:M,d:E,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:L,strokeDashoffset:L}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});vs.displayName="Zuz.Chart";var Vm=vs;var Ss=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(Ss||{}),ws=(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))(ws||{});var Cs=forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:i=true,...p}=e,{className:l,style:c,rest:d}=B(p);return jsx(f,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(f,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${l}`.trim(),style:{...c},...d,children:[t&&jsx(_,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxs(f,{as:"flex aic --bubble-audio",children:[jsx(ce,{className:"--bm-action",children:V.play}),jsx(rt,{progress:.7}),jsx(_,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsx(f,{as:"--bubble-image",children:jsx(st,{src:n.source})}):null:null,jsxs(f,{as:"flex aie jce --bubble-stats",children:[jsx(_,{className:"--bubble-stamp tar",children:timeSince(a)}),o=="me"&&jsx(ce,{className:`--bubble-status --bs-${s}`,children:s==0?V.pending:s==1?V.done:s==2?V.doneAll:V.doneAll})]})]})})});Cs.displayName="Zuz.Bubble";var yr=Cs;var Am=({messages:e})=>jsx(ze,{items:e.map((r,t)=>jsx(yr,{...r},r.id||t))}),$m=Am;var Ps=forwardRef((e,r)=>{let{style:t,className:n,rest:o}=B(e);return jsx("label",{ref:r,style:t,className:n,...o})});Ps.displayName="Zuz.Label";var Vt=Ps;var Is=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:i,checked:p,disabled:l,onSwitch:c,...d}=r,u=lt(),m=!!(t&&u.values);m?u.errors?.[t]:null;let T=m?u.values?.[t]:void 0,[x,P]=useState(p||false),v=useRef(null),{variant:R}=j(true),y=useMemo(()=>m&&T!=null?typeof T=="string"?T.toLowerCase()!=="false"&&T!=="":!!T:x,[T,x,m]);useEffect(()=>{v.current&&v.current.checked!==y&&(v.current.checked=y);},[y]),useEffect(()=>{p!==void 0&&P(p);},[p]);let S=g=>{let b=!!g;m&&u.setFieldValue?.(t,b),P(b),c?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(g,b=true){S(g);},toggle(g=true){S(!y);}})),jsxs(Vt,{"aria-hidden":l,className:[`--${(o||Ze.Default).toLowerCase()}`,`${!o||o===Ze.Default?"--checkbox":"--switch"}`,`--${i||R||q.Small}`,`flex aic jcc ${y?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==Ze.Default)&&V.check,jsx(fe,{ref:g=>{v.current=g,e&&(e.current=g);},defaultChecked:y,type:"checkbox",className:"abs",name:t,required:n||false,onChange:g=>{g.stopPropagation(),S(g.target.checked);},disabled:l})]})};Is.displayName="Zuz.CheckBox";var Dt=Is;var Ym=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:i,fx:p,...l}=r,c=useRef(null),{className:d,style:u,rest:m}=B({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:p},c),h=useMemo(()=>{let x=new Set;return a.split(",").forEach(P=>{if(P.includes("-")){let[v,R]=P.split("-").map(Number);for(let y=v;y<=R;y++)x.add(y);}else P&&x.add(Number(P));}),x},[a]),T=useMemo(()=>{let x=t.split(`
|
|
9
|
-
`);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let
|
|
10
|
-
${s==true?`<span class="--line-number">${
|
|
8
|
+
document.documentElement.style.colorScheme = theme;`}}),jsx(zo,{children:e})]})},tn=(e,o)=>{if(Ti)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||o};var rn=({ref:e,...o})=>{let{style:t,...n}=o,{style:r,className:s,rest:a}=O(n);return jsx("span",{ref:e,style:t,className:s,...a})};rn.displayName="Zuz.Span";var ie=rn;var sn=forwardRef((e,o)=>{let{name:t,pathCount:n,variant:r,color:s,size:a,...i}=e,{variant:p}=j(true),{className:l,style:c,rest:d}=O(i);return jsx("div",{style:{color:s,...c,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${r||p||q.Small} ${l}`.trim(),ref:o,...d,children:Array(n||0).fill(0).map((u,m)=>jsx(ie,{className:`path${m+1}`},`${t}-layer-${m}`))})});sn.displayName="Zuz.Icon";var te=sn;var we={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var an=e=>{let{type:o,variant:t,color:n,...r}=e,{className:s,style:a,rest:i}=O(r),{spinner:p}=j(true),l=()=>{switch(o||p?.type||we.Simple){case we.Simple:return null;case we.Wave:return jsxs(Fragment$1,{children:[jsx(f,{as:"--bar --bar1"}),jsx(f,{as:"--bar --bar2"}),jsx(f,{as:"--bar --bar3"})]});case we.Roller:return null}};return jsx(f,{className:`${s} --spinner --${(o||p?.type||we.Simple).toLowerCase()} --${t||p?.variant||q.Small}`.trim(),style:{...a},...i,children:l()})};an.displayName="Zuz.Spinner";var Re=an;var ln=({ref:e,...o})=>{let{h:t,html:n,children:r,lines:s,tfx:a,delay:i=0,duration:p=.5,stagger:l=.05,repeat:c=true,reveal:d=false,hover:u=false,...m}=o,{style:y,className:R,rest:x}=O(m),C=useRef(null),[v,S]=useState(false),[h]=useIntersectionObserver([C],{threshold:[1]}),w=useMemo(()=>{if(y?.opacity!==void 0)return y.opacity;if(typeof o.as=="string"){let V=o.as.match(/opacity:([\d.]+)/);if(V)return V[1]}return 1},[o.as,y?.opacity]),g=useMemo(()=>a?u?v:d?h===1:true:false,[a,u,v,d,h]);useEffect(()=>{e&&(typeof e=="function"?e(C.current):e.current=C.current);},[e]);let b=`h${o.h||1}`,I=useMemo(()=>typeof r=="string"?r:Array.isArray(r)&&r.length===1&&typeof r[0]=="string"?r[0]:null,[r]),B=useMemo(()=>{let V=Array.isArray(o.as)?o.as.join(" "):o.as||"";return typeof V=="string"&&V.includes("text-clip")},[o.as]);useLayoutEffect(()=>{if(!B||!C.current||I===null)return;let V=C.current,k=0,D=0,$=()=>{let L=V.getBoundingClientRect(),U=getComputedStyle(V).backgroundImage,X=L.width;V.querySelectorAll(".--fx-char").forEach(Z=>{let W=Z.getBoundingClientRect().left-L.left;Z.style.backgroundImage=U,Z.style.backgroundRepeat="no-repeat",Z.style.backgroundSize=`${X}px 100%`,Z.style.backgroundPosition=`-${W}px 0`,Z.style.backgroundClip="text",Z.style.webkitBackgroundClip="text",Z.style.color="transparent";});},_=()=>{cancelAnimationFrame(k),cancelAnimationFrame(D),k=requestAnimationFrame(()=>{D=requestAnimationFrame($);});};_();let N=new ResizeObserver(_);return N.observe(V),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(_),window.addEventListener("resize",_),()=>{cancelAnimationFrame(k),cancelAnimationFrame(D),N.disconnect(),window.removeEventListener("resize",_);}},[B,I,a,g]);let E=useMemo(()=>n?jsx(ie,{dangerouslySetInnerHTML:{__html:n}}):a&&I!==null?I.split("").map((V,k)=>{let D=V===" ",_=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":c?"infinite":"1";return jsx(ie,{"data-char":V,className:`--fx-char -fx ${g?`--fx-${a}`:""}`,style:{"--delay":`${i+k*l}s`,"--duration":`${p}s`,"--iteration":_,"--target-opacity":w,display:D?"inline":"inline-block",whiteSpace:"pre",opacity:!g&&a==="typewriter"?0:void 0},children:V},k)}):r,[r,n,a,I,g,i,l,p,c]);return jsx(b,{ref:C,onMouseEnter:()=>u&&S(true),onMouseLeave:()=>u&&S(false),style:a?{...y,display:a?"flex":y?.display,flexWrap:a?"wrap":y?.flexWrap,opacity:a&&!g?0:a?1:y?.opacity,transition:a?"opacity 0.4s ease":void 0}:y,className:`${R} ${a?"--text-fx -fx":""}`.trim(),...x,children:E})};ln.displayName="Zuz.Text";var z=ln;var pn=({ref:e,...o})=>{let {title:t,position:n,margin:r=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:p,...l}=o,{style:c,className:d,rest:u}=O(l),m=n||ve.Top;useRef(null);let [R,x]=useState(false);useRef(6);let v=i===true||R,h=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:w}=j(true),g=useMemo(()=>{let I=false;return addPropsToChildren(a,B=>{let E=B.props.className?.includes(s);return E&&(I=true),E||!I},(B,E)=>{let V=E.props.className?.includes(s),k=B===0,D={};return (V||k)&&(D.style={...E.props.style,anchorName:h}),k&&(D.onMouseEnter=$=>{x(true),E.props.onMouseEnter?.($);},D.onMouseLeave=$=>{x(false),E.props.onMouseLeave?.($);}),D})},[a,s,h]),b=Se({transition:m==ve.Top?Q.SlideInTop:m==ve.Bottom?Q.SlideInBottom:m==ve.Left?Q.SlideInLeft:Q.SlideInRight,when:v,duration:.2,offset:r+6,margin:m==ve.Top||m==ve.Left?-r:r,curve:w?.curve||oe.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[g,createPortal(jsx(f,{style:{positionAnchor:h,...b.style,...m===ve.Top||m===ve.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${v} --${p||w?.variant||q.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsx(z,{as:"--text rel",children:t}):t}),document.body)]})};pn.displayName="Zuz.ToolTip";var Pt=pn;var Qt={Loading:"loading",Normal:"normal"};var fn=({ref:e,...o})=>{let{reset:t,kind:n="solid",variant:r,tooltip:s,tooltipProps:a,icon:i,iconSize:p,children:l,withLabel:c,spinner:d,state:u,disabled:m,...y}=o,{style:R,className:x,rest:C}=O(y),{variant:v}=j(true),S=jsxs("button",{className:removeDuplicateWords(`--button ${s?"--tooltip-anchor":""} --${n} --${r||v} flex aic ${t?"":"jcc"} ${i?"--with-icon":""} ${x}`).trim().replace(/\s+/g," "),style:R,ref:e,disabled:u==Qt.Loading||o.skeleton?.enabled||m,...C,children:[u==Qt.Loading&&jsx(Re,{variant:r||v,type:d||we.Simple}),(!u||u==Qt.Normal)&&jsxs(Fragment$1,{children:[i&&jsx(te,{variant:p,name:i}),c===true?jsx(ie,{children:l}):l]})]});return s?jsx(Pt,{title:s,...a,children:S}):S};fn.displayName="Zuz.Button";var K=fn;var Ui=e=>{let{label:o,labelColor:t,icon:n,iconColor:r,index:s,className:a,onSelect:i}=e;return o=="-"?jsx(f,{className:"--line"}):jsxs(K,{reset:true,onClick:p=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsx(f,{as:"--icon",children:jsx(te,{name:n,className:"--ico",style:r?{color:r}:{}})}),jsx(z,{className:"--lbl flex aic",style:t?{color:t}:{},children:o})]})},dn=Ui;var yn=({ref:e,...o})=>{let {id:t,as:n,fx:r,offsetX:s,offsetY:a,parent:i,event:p,arrow:l,when:c,items:d,header:u,footer:m,origin:y=St.TopRight,...R}=o,[x,C]=useState(false),[v,S]=useState(d||[]),{position:h,targetRef:w,calculatedAnchor:g}=useAnchorPosition(i?.current,p,{offsetX:s,offsetY:a,preferredAnchor:y}),b=g.toLowerCase(),I=b.includes("top");b.includes("bottom");let E=I?"--arrow-top":"--arrow-bottom",V=useMemo(()=>b.includes("left")?"--arrow-left":b.includes("right")?"--arrow-right":"--arrow-center",[b]),k=h.top!==0||h.left!==0;useEffect(()=>{c&&k?C(true):c||C(false);},[c,k]);let{className:D,style:$,rest:_}=O(R),N=Se({...r?.transition?{transition:r.transition??Q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:r?.curve??oe.EaseInOut,duration:r?.duration??.05,when:x&&k});return jsxs(f,{ref:w,className:`--contextmenu ${l||i!=null?`--has-arrow ${E} ${V}`:""} abs flex cols ${D}`.trim(),"aria-hidden":!x,style:{...$,...N.style,top:h.top,left:h.left,visibility:k?"visible":"hidden",transformOrigin:g},..._,children:[typeof u=="function"?createElement(u):u,v.map((L,U)=>jsx(dn,{...L,index:U},`context-${L.label.toLowerCase()}-${U}`)),typeof m=="function"?createElement(m):m]})};yn.displayName="Zuz.ContextMenu";var Zo=yn;var xn=forwardRef((e,o)=>{let{children:t,fx:n,when:r,fxDelay:s,fxStep:a,classToIgnore:i,...p}=e,l=j(true),c=useDelayed(),d=n||l?.group?.fx,u=s||l?.group?.fxDelay,m=a||l?.group?.fxStep,y=i||l?.group?.classToIgnore||"-fx",R=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let C=x.props||{},v="fx"in C,S="tfx"in C,h=C.as?Array.isArray(C.as)?C.as.join(" "):C.as:C.className||"";return !(typeof h=="string"&&h.includes(y))&&(!v||S)},(x,C)=>{let v=(u??0)+x*(m??.1),S=C.props||{};return "tfx"in S?{delay:(S.delay??0)+v}:{fx:{...d,delay:v,when:r??(n?.when||c)}}}):t,[t,r,c,d,u,m,y,n]);return jsx(f,{className:"--group",ref:o,...p,children:R})});xn.displayName="Zuz.Group";var Ko=xn;var vn=forwardRef((e,o)=>{let{message:t,spinner:n,spinnerSize:r,color:s,when:a,hideMessage:i,...p}=e,{className:l,style:c,rest:d}=O(p),{spinner:u}=j(true);return "when"in e&&e.when==false?null:jsxs(Ko,{fx:{transition:Q.SlideInBottom,curve:oe.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)"},...d,children:[jsx(Re,{variant:r||u?.variant||q.Small,type:n||u?.type||we.Simple}),!i&&jsx(z,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});vn.displayName="Zuz.Cover";var Fe=vn;var to=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(to||{}),oo=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(oo||{}),Sn=(t=>(t.Stack="stack",t.Individual="individual",t))(Sn||{}),wn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var cl=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let o=(l,c)=>e.add({type:"toast",props:{...c,type:l}});return {show:(l,c,d,u)=>o("default",{title:l,message:c,icon:d,duration:u}),hide:l=>e.remove(l),success:(l,c,d,u)=>o("success",{title:l,message:c,icon:d,duration:u}),error:(l,c,d,u)=>o("error",{title:l,message:c,icon:d,duration:u}),warn:(l,c,d,u)=>o("warn",{title:l,message:c,icon:d,duration:u}),promise:(l,c,d,u)=>o("promise",{title:l,message:c,icon:d,duration:u}),clearAll:()=>e.clear("toast")}},Wo=cl;var Cn=forwardRef((e,o)=>{let{when:t,...n}=e;return jsx(f,{ref:o,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:Q.FadeIn,when:t},...n})});Cn.displayName="Zuz.Overlay";var tt=Cn;var We=null,Ee=null,Pn=forwardRef((e,o)=>{let{title:t,message:n,transition:r,curve:s,speed:a,type:i,actionPosition:p,spinner:l,loadingMessage:c,onShow:d,onHide:u,...m}=e,{className:y,style:R,rest:x}=O(m),[C,v]=useState(t||""),[S,h]=useState(n||""),[w,g]=useState(null),[b,I]=useState(i||Me.Default),B=useMemo(()=>uuid(12),[]),[E,V]=useState(false),k=useRef(null),D=useRef(null),[$,_]=useState(false),[N,L]=useState(true),U=useRef(null),X=S;useImperativeHandle(o,()=>({setLoading(Z){_(Z);},showDialog(Z,G,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),Ee=null;},500)),I(Me.Dialog),G&&h(G),Z&&v(Z),W&&g(W.reduce((J,ce)=>(J.push({...ce,key:ce.key||uuid(12)}),J),[])),V(true),setTimeout(()=>re?re():()=>{},1e3);},dialog(Z,G,W,re){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),Ee=null;},500)),I(Me.Dialog),h(G),v(Z),W&&g(W.reduce((J,ce)=>(J.push({...ce,key:ce.key||uuid(12)}),J),[])),V(true),setTimeout(()=>re?re():()=>{},1e3);},error(Z,G){this.show(Z,G,Me.Error);},warn(Z,G){this.show(Z,G,Me.Warn);},success(Z,G){this.show(Z,G,Me.Success);},show(Z,G,W){We&&(clearTimeout(We),Ee&&clearTimeout(Ee),D.current=k.current.style.transform,k.current.style.transform="",k.current.classList.remove("--wobble"),setTimeout(()=>{k.current.classList.add("--wobble"),k.current.style.transform=`${D.current} scale(.9)`.trim();},50),Ee=setTimeout(()=>{k.current.classList.remove("--wobble"),k.current.style.transform=D.current||"",Ee=null;},500)),We=setTimeout(()=>{V(false),We=null,Ee=null;},(G||4)*1e3),I(W||Me.Default),h(Z),V(true),d?.();},hide(){V(false),u?.();}}));let F=useMemo(()=>{let Z={when:E,duration:a||.3,delay:.1};if(b==Me.Dialog){if(r){let{from:G,to:W}=wt(r,20);return {from:G,to:W,curve:s||oe.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:oe.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:oe.Spring,...Z}},[E,b]);return useEffect(()=>{U.current&&clearTimeout(U.current),E?L(true):U.current=setTimeout(()=>L(false),1e3);},[E]),b==Me.Dialog?jsxs(Fragment$1,{children:[jsx(tt,{when:E}),jsxs(f,{className:`--sheet --sheet-${b.toLowerCase()} ${E?"is-visible":""} ${y} fixed`.trim(),style:R,fx:F,...x,ref:k,children:[jsx(Fe,{when:$,spinner:l,message:c}),jsxs(f,{className:"--head flex aic rel",children:[jsx(f,{className:`--${C?"title":"dot"} flex aic rel`,children:C||""}),jsx(K,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsx(f,{className:`--body flex aic rel ${w?"":"--no-action"}`.trim(),children:N?X:null}),w&&jsx(f,{className:`--footer flex aic rel ${p?p==Lo.Center?"jcc":"":"jce"}`.trim(),children:w.map((Z,G)=>jsx(K,{onClick:W=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${B}-action-${Z.key}`))})]})]}):jsx(f,{className:`--sheet --sheet-${b.toLowerCase()} ${y} abs`.trim(),style:R,...x,fx:F,ref:k,children:E?S:null})}),Rn=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Pn.displayName="Zuz.Sheet";var gl=Pn;var Rt=createContext(null),jo=()=>{let e=useContext(Rt);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},It=()=>useContext(Rt),En=()=>()=>{},Nn=e=>{let o=useContext(Rt);return useSyncExternalStore(o?.subscribe??En,()=>{if(!(!o||!e))return o.getSnapshot().values?.[e]},()=>{})},Bn=e=>{let o=useContext(Rt);return useSyncExternalStore(o?.subscribe??En,()=>!o||!e?null:o.getSnapshot().errors?.[e]??null,()=>null)},at=()=>{let e=It(),o=jo();return {...e,...o}},kn=({children:e,initialValues:o={}})=>{let t=useRef({values:o,errors:{},touched:{}}),n=useRef(new Set(Object.keys(o))),r=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(l=>(r.current.add(l),()=>r.current.delete(l)),[]),i=()=>{r.current.forEach(l=>l());};useEffect(()=>{if(!o||Object.keys(o).length===0)return;let l=new Set(Object.keys(o)),c=[...n.current].filter(C=>!l.has(C)),d={...t.current.values};c.forEach(C=>delete d[C]);let u={...d,...o},m=t.current.values||{},y=Object.entries(u),R=Object.entries(m),x=y.length!==R.length||y.some(([C,v])=>m[C]!==v);n.current=l,x&&(t.current={...t.current,values:u},i());},[o]);let p=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,c)=>{t.current.values[l]!==c&&(t.current={...t.current,values:{...t.current.values,[l]:c}},i());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:c,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(l,c)=>{t.current={...t.current,errors:{...t.current.errors,[l]:c}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsx(Rt.Provider,{value:p,children:e})};var Il=e=>{let o={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((r,s,a)=>{if(a===n.length-1)r[s]=e[t];else {let i=!isNaN(Number(n[a+1]));r[s]=r[s]||(i?[]:{});}return r[s]},o);}return o},Ln=({ref:e,...o})=>{let {schema:t,name:n,cover:r,spinner:s,errors:a,action:i,children:p,withData:l,beforeSubmit:c,onSubmit:d,onError:u,onSuccess:m,resetOnSuccess:y,...R}=o,{className:x,style:C,rest:v}=O(R),[S,h]=useState(false),w=useRef(null),g=Wo(),b=It();jo();let B=useRef(null),E=useCallback(F=>w.current?w.current.querySelectorAll(F):[],[w.current]),V=F=>({name:F.name||F.getAttribute("name")||F.getAttribute("data-name"),required:F.required?true:F.getAttribute("data-required")?F.getAttribute("data-required")=="true":false,with:F.with||F.getAttribute("with")}),k=F=>{let Z=[];return F.querySelectorAll(".--input").forEach(G=>{Z.push(G.value);}),Z.join("")},D=F=>F.classList.contains("--otp")?k(F):F.classList.contains("--select")?F.querySelector("button.--selected")?.dataset.value:F.classList.contains("--checkbox")||F.getAttribute("type")==="checkbox"?F.checked:F.value,$=useCallback(F=>{let{name:Z,required:G,with:W}=V(F),re=D(F);if(t&&t[Z]&&b?.getSnapshot()){let J=t[Z](re,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError(Z,J),false}if(G&&(F.type==="checkbox"&&!F.checked||F.classList.contains("--select")&&(re==="-1"||!re)||!re||re===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?Je.MatchField:W.split("@")[0]:W).toUpperCase()){case Je.IPV4:return _(re).isIPv4();case Je.IPV6:return _(re).isIPv6();case Je.Email:return _(re).isEmail();case Je.Uri:try{return new URL(re),!0}catch{return false}case Je.MatchField:let[ce,me,Ce]=W.split("@"),le=document.querySelector(`[name=${me.trim()}]`);if(!le)return false;switch(Ce||"direct-match"){case "if-not-empty":if(le&&!_(le.value).isEmpty()&&le.value!=F.value)return false;break;case "direct-match":if(le&&le.classList.contains("--otp")&&F.classList.contains("--otp")&&k(le)!=k(F))return false;if(le&&le.value!=F.value)return false;break}break}return true},[t,b]),_$1=useCallback(()=>{let F={},Z={...b?.getSnapshot().values||{}},G=null,W=null;if(E("[name]").forEach(J=>{let{name:ce,required:me,with:Ce}=V(J),le=me||Ce?$(J):true,pe=D(J);F[ce]={valid:le,value:pe},Z[ce]=pe,b?.setFieldError(ce,le?null:a?.[ce]||"Invalid"),le?J.classList.remove("--with-error"):(J.classList.add("--with-error"),G||(G=J),W=a?.[ce]);}),G){let J=G;if(J.classList.contains("--otp"))for(let ce of Array.from(J.querySelectorAll(".--input"))){let me=ce;if(me.value==""){me.focus();break}}else J.focus();}let re=Il(Z);return {error:G!=null,errorMsg:W||"Fix errors to continue...",data:F,payload:re}},[w.current,b]),N=useCallback((F={})=>{let{error:Z,errorMsg:G,payload:W,data:re}=_$1();if(Z){g.error(G);return}i?startTransition(async()=>{h(true),withPost(i,{...l,...W,...F}).then(J=>{h(false),y&&b?.reset(),m?.(J,{...l,...W,...F}),m||g.success(J.message||"Redirecting...");}).catch(J=>{h(false),u?u(J):g.error(J.message);});}):d?.(W,re);},[_$1,i,l,m,u,y,d]),L=useCallback(()=>{let F=E("[type=submit]");!F||F.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):F.forEach(Z=>{Z.addEventListener("click",N);});},[w.current]),U=useMemo(()=>addPropsToChildren(p,F=>F.props.type=="submit",F=>({ref:B})),[p]),X=useRef(N);return useImperativeHandle(e,()=>({setLoading:F=>h(F),submit:F=>X.current(F),init:L,hideError:()=>g.clearAll()}),[N,L]),useEffect(L,[]),useEffect(()=>{X.current=N;},[N]),useEffect(()=>{let F=E("[type=submit]"),Z=Array.from(F).map(G=>{let W=G;return W.addEventListener("click",N),()=>W.removeEventListener("click",N)});return ()=>Z.forEach(G=>G())},[N,E]),jsxs(f,{ref:w,style:C,className:`--form flex rel ${x}`,children:[!Rn(r)&&jsx(Fe,{when:S,spinner:s,...r}),U]})};Ln.displayName="Zuz.FormInternal";var Mn=e=>jsx(kn,{initialValues:e.withData,children:jsx(Ln,{...e})});Mn.displayName="Zuz.Form";var tr=Mn;var or=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(o){return this.stack[this.stack.length-1]===o}push(o){this.stack.includes(o)||(this.stack.push(o),this.updateScrollLock());}pop(o){this.stack=this.stack.filter(t=>t!==o),this.updateScrollLock();}handleEscape(){let o=this.stack[this.stack.length-1];return o?(o(),true):false}get count(){return this.stack.length}},Ve=new or;var Nl=({action:e,render:o=true,message:t=""})=>jsx(f,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:o?t:null}),On=Nl;var Dn=({cols:e,gap:o,ais:t,aic:n,aie:r,jcs:s,jcc:a,jce:i,className:p="",style:l,...c})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",r?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",p].filter(Boolean).join(" "),u={...l,gap:typeof o=="number"?`${o}px`:o};return jsx(f,{...c,className:d,style:u})};Dn.displayName="Zuz.FlexBox";var de=Dn;var Ll=({useForm:e,action:o,actionPosition:t,dialogID:n,variant:r})=>jsx(de,{aic:true,as:`--footer rel ${t?t==qr.Center?"--jcc":"":"--jce"}`.trim(),children:o.map((s,a)=>jsx(K,{variant:r,kind:s.kind,type:s.type||"button",onClick:()=>{if(!(e===true&&s.type==="submit")){if(s.handler)return s.handler();if(s.onClick)return s.onClick();console.log("onClick Handler missing");}},as:"--action",children:s.label},`dialog-${n}-action-${s.key||a}`))}),Hn=Ll;var Ml={colorSchemeLight: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:[jsx("circle",{cx:"12",cy:"12",r:"5"}),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: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:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark: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:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[Le.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[Le.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[Le.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[Le.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[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"}),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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[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"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},A=Ml;var Ol=({title:e="Alert",description:o,titlePosition:t="center",onClose:n})=>jsxs(de,{as:"--head rel",children:[jsxs(de,{cols:true,as:[`--${e?"title":"dot"} rel`,`--position-${t}`],children:[jsx(z,{children:e}),o&&jsx(z,{as:"--description",children:o})]}),jsx(K,{onClick:r=>n(),className:`--closer abs ${t=="center"?"center-v":""}`,children:A.close})]}),$n=Ol;var _n=({ref:e,...o})=>{let{index:t,id:n,title:r,description:s,titleAlignment:a,message:i,content:p,transition:l,curve:c,speed:d,type:u,width:m,action:y,actionPosition:R,spinner:x,loadingMessage:C,variant:v,inBackground:S,forceClose:h,forceLoading:w,useForm:g,formProps:b,onConfirm:I,onCancel:B,onClose:E,onShow:V,onHide:k,...D}=o,$=useMemo(()=>uuid(12),[]),[_,N]=useState(r||""),[L,U]=useState(s||""),[X,F]=useState(p||i||""),[Z,G]=useState(u||et.Dialog),[W,re]=useState(false),[J,ce]=useState(true),[me,Ce]=useState(()=>y?y.map(De=>({...De,key:De.key||uuid(12)})):null),[le,pe]=useState(false),{variant:Y,spinner:se,dialog:ne}=j(true),he=v||ne?.variant||Y||q.Small,{style:Ae,className:Te,rest:ye}=O(D),Oe=useRef(null),ae=Se({when:W,duration:d||ne?.speed||.3,delay:ne?.delay||.1,transition:l||ne?.transition||Q.SlideInBottom,curve:c||ne?.curve||oe.EaseInOut,watch:["scale","filter","transform"]}),be=()=>{re(false),E(n);},Wt=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(be)&&be();}}],[W]);useShortcuts(Wt),useEffect(()=>{G(et.Dialog),F(p||i),N(_),U(L),re(true),setTimeout(()=>V?V():()=>{},500);},[]),useEffect(()=>{h&&be();},[h]),useEffect(()=>{w!=null&&pe(w);},[w]),useEffect(()=>(W?Ve.push(be):Ve.pop(be),()=>Ve.pop(be)),[W]);let Gt=useMemo(()=>1e4+t*10,[t]),$e=jsxs(f,{as:`--dialog --${(u??et.Default).toLowerCase()} ${W?"--visible":""} ${Te} fixed abc`.trim(),style:{...ae.style,zIndex:Gt+1,pointerEvents:S==true?"none":"auto",width:m||"auto",...S==true?{scale:"0.92",filter:"blur(2px)"}:{}},...ye,ref:Oe,children:[jsx($n,{title:_,description:s,titlePosition:a||ne?.titleAlignment||"center",onClose:be}),jsx(On,{message:X,render:J,action:me}),me&&me.length>0&&jsx(Hn,{variant:he,action:me,dialogID:$,useForm:g,actionPosition:R}),jsx(Fe,{when:le,spinner:x||ne?.spinner||se?.type||we.Simple,message:C||ne?.loadingMessage})]});return jsxs(Fragment$1,{children:[jsx(tt,{style:{zIndex:Gt},when:W}),g?jsx(tr,{onSubmit:((De,No)=>{I?.(De,No);}),...b,children:$e}):$e]})};_n.displayName="Zuz.Dialog";var sr=_n;var Zn=forwardRef((e,o)=>{let{speed:t,smooth:n=false,breakpoints:r={},style:s,...a}=e,{rootRef:i,containerRef:p,thumbY:l,thumbX:c,onScrollY:d,onScrollX:u}=useScrollbar(t||1,r,n),{style:m,className:y,rest:R}=O(a);return useEffect(()=>{let x=p.current;if(!x)return;let C=()=>{window.dispatchEvent(new Event("resize"));},v=S=>{let h=S.target;if(h.closest(".--allow-scroll")){let g=h.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:I,clientHeight:B}=g,E=S.deltaY<0,V=S.deltaY>0;(E&&b>0||V&&b+B<I)&&S.stopPropagation();}};return x.addEventListener("scroll",C),x.addEventListener("wheel",v,{passive:true}),()=>{x.removeEventListener("scroll",C),x.removeEventListener("wheel",v);}},[p]),jsxs(f,{ref:i,className:y.trim(),as:"--scrollview rel",children:[jsx(f,{as:`--scroll-content ${y}`.trim(),ref:p,style:s||{},children:R.children}),jsx(f,{as:"--scroll-track --track-y --abs",children:jsx(f,{as:"--scroll-thumb --abs --round",ref:l,onMouseDown:d})}),jsx(f,{as:"--scroll-track --track-x --abs",children:jsx(f,{as:"--scroll-thumb --abs --round",ref:c,onMouseDown:u})})]})});Zn.displayName="Zuz.ScrollView";var Bt=Zn;var Kn=({ref:e,...o})=>{let{id:t,index:n,from:r,speed:s,children:a,margin:i,animation:p,prerender:l,inBackground:c,forceClose:d,forceLoading:u,closeBtn:m,onClose:y,...R}=o,{drawer:x}=j(true),[C,v]=useState(a),[S,h]=useState(false),[w,g]=useState(l??(x?.prerender||true)),[b,I]=useState(false),B=()=>{h(false),y?.(t??-1);},{className:E,style:V,rest:k}=O(R),D=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ve.isTop(B)&&B();}}],[S]);useShortcuts(D),useEffect(()=>{v(a);},[a]),useEffect(()=>(S?Ve.push(B):Ve.pop(B),()=>Ve.pop(B)),[S]),useEffect(()=>{h(true);},[]),useEffect(()=>{d&&B();},[d]),useEffect(()=>{u!=null&&I(u);},[u]);let $=r||x?.from||Pe.Left,_=useMemo(()=>{switch($){case Pe.Left:return {from:{x:"-100vw"},to:{x:0}};case Pe.Right:return {from:{x:"100vw"},to:{x:0}};case Pe.Top:return {from:{y:"-100vh"},to:{y:0}};case Pe.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[r,x?.from]),N=Se({from:{..._.from,opacity:0},to:{..._.to,opacity:1},when:S,curve:p||x?.animation||oe.EaseInOut,duration:s||x?.speed||.5,watch:["scale","filter"]}),L=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(tt,{onClick:U=>{S&&B();},when:S,style:{zIndex:L}}),jsxs(f,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${E} --${$.toLowerCase()} fixed`,style:{...V,...N.style,"--m":`${i||x?.margin||0}px`,zIndex:L+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...k,children:[r==Pe.Top||r==Pe.Bottom?jsx(f,{className:"--handle"}):null,m&&jsx(K,{as:`--close-drawer --close-${m} --abs --round`,onClick:B,children:A.close}),jsxs(Bt,{as:"rel",children:[w||S?C:null,jsx(Fe,{when:b})]})]})]})};Kn.displayName="Zuz.Drawer";var lr=Kn;var Gn=forwardRef((e,o)=>{let{progress:t,type:n,animated:r,...s}=e,a=useRef(null);useImperativeHandle(o,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),useEffect(()=>{t&&a.current&&(r?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:i,style:p,rest:l}=O(s);return jsx(f,{className:`--progress ${r?"--animated":""} flex rel ${i}`.trim(),style:p,...l,children:jsx(f,{ref:a,className:"--bar rel"})})});Gn.displayName="Zuz.ProgressBar";var Lt=Gn;var Yl=e=>{let{index:o,id:t,type:n,icon:r,busy:s,width:a,title:i,message:p,duration:l,sticky:c=false,actions:d=[],position:u,style:m,isHovered:y,total:R,progress:x,progressValue:C,forceClose:v,variant:S,onClick:h,onClose:w}=e,[g,b]=useState(false),[I,B]=useState(false),{toast:E}=j(true),V=typeof C=="number",k=V?Math.max(0,Math.min(1,C)):void 0,D=I||v,$=u??E?.position??"TopCenter",_=n??E?.type??"default",N=m??E?.style??"stack",L=l??E?.duration??4,U=x??E?.progress??false,X=useRef(L*1e3),F=useRef(void 0),Z=useRef(void 0),G=useRef(null),W=Se({when:g&&!D,duration:.3,transition:E?.transition||($.includes("Top")?Q.SlideInTop:$.includes("Bottom")?Q.SlideInBottom:$.includes("Left")?Q.SlideInLeft:Q.SlideInRight),curve:E?.curve||oe.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let Y=se=>{if(Z.current!==void 0){let ne=se-Z.current;if(!V&&!y&&!c&&!D&&(X.current-=ne,G.current)){let he=Math.max(0,X.current/(L*1e3)*100);G.current?.setProgress?.(he/100);}}Z.current=se,X.current<=0?B(true):F.current=requestAnimationFrame(Y);};return F.current=requestAnimationFrame(Y),()=>{F.current&&cancelAnimationFrame(F.current);}},[y,c,D,L]),useEffect(()=>{if(D){let Y=setTimeout(()=>{w?.(t);},350);return ()=>clearTimeout(Y)}},[D,t]);let re=N==="stack",J=y?o*65:o*8,ce=y?1:Math.max(.85,1-o*.05),me=y?1:Math.max(.4,1-o*.2),Ce=Y=>{h?h(Y):s!==true&&(!d||d.length===0)&&B(true);},le=W.style.transform||"translate(0, 0)",pe=D?le:`${le} translateY(${$.includes("Top")?J:-J}px) scale(${ce})`;return jsxs(f,{onClick:Ce,as:`--snack --${D?"hidden":"visible"} --${S||E?.variant||q.Medium} --${_} --${$.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-o,pointerEvents:D?"none":"auto",opacity:D?W.style.opacity:me,transform:pe,filter:!D&&re&&!y&&o>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${W.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxs(f,{as:"--ico flex aic jcc rel",children:[r?jsx(te,{name:r}):jsx(f,{as:"--no-icon"}),s===true&&jsx(Re,{as:"abs abc"})]}),jsxs(f,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(z,{as:"--tt",children:i||wn[n]}),jsx(z,{as:"--tm",children:p})]}),d&&d.length>0&&jsx(f,{as:"--actions flex gap:5",children:d.map((Y,se)=>jsx(K,{as:"--snack-btn bold",variant:q.XSmall,onClick:ne=>{ne.stopPropagation(),Y.onClick(ne);},children:Y.label},se))}),(U||V)&&jsx(Lt,{as:"abs",progress:k,ref:G})]})},mr=Yl;var Ie=createContext(null),oc=({ref:e,...o})=>{let n=useContext(Ie)?.depth??0,[r,s]=useState(null),[a,i]=useState(null),[p,l]=useState(false),[c,d]=useState([]),u=useDelayed(),m=useRef(0),y=()=>++m.current,R=()=>{l(false),setTimeout(()=>i(null),200);};useImperativeHandle(e,()=>({add(h){let w=y(),g={id:w,...h};return d(b=>[...b,g]),w},openMenu(h){l(false),setTimeout(()=>{i({id:y(),type:"menu",props:h}),l(true);},16);},update(h,w){d(g=>g.map(b=>b.id!==h?b:{...b,props:{...b.props,...w}}));},remove(h){d(w=>w.map(g=>g.id===h?{...g,props:{...g.props,forceClose:true}}:g)),a?.id===h&&R();},loading(h,w){d(g=>g.map(b=>b.id===h?{...b,props:{...b.props,forceLoading:w}}:b)),a?.id===h&&R();},clear(h){d(c.filter(w=>w.type!=h));}})),useEffect(()=>{if(a&&p){let h=()=>R();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,p,R]);let x=h=>{setTimeout(()=>{d(w=>w.filter(g=>g.id!==h)),a?.id===h&&i(null);},250);},C=useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!u)return null;let v=c.filter(h=>h.type=="toast").reverse(),S=Object.values(oo);return createPortal(jsxs(f,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[C.map((h,w)=>{let g=w<C.length-1;return h.type==="dialog"?jsx(sr,{onClose:x,index:w,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsx(lr,{onClose:x,index:w,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),S.map(h=>{let w=v.filter(g=>(g.props.position||"TopCenter")===h);return w.length===0?null:jsx(f,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:w.map((g,b)=>jsx(mr,{index:b,total:w.length,isHovered:r===h,onClose:x,id:g.id,...g.props},g.id))},h)}),a&&jsx(f,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(Zo,{onClose:R,when:p,...a.props},`menu-${a.id}`)})]}),document.body)},rc=({children:e})=>{let o=useContext(Ie),t=o?o.depth+1:0,n=useRef(null),r=useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!o}),[o]);return jsxs(Ie.Provider,{value:r,children:[e,jsx(oc,{ref:n})]})},zo=rc;var sc=()=>{let e=useContext(Ie);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,r,s)=>{n.preventDefault(),e.openMenu({event:n,items:r,origin:s});},showMenu:(n,{items:r,origin:s,offsetX:a,offsetY:i,transition:p,curve:l,arrow:c,duration:d,header:u,footer:m})=>{e.openMenu({fx:{transition:p,curve:l,duration:d},parent:n,items:r,origin:s||St.TopCenter,offsetX:a,offsetY:i,arrow:c,header:u,footer:m});},hide:e.clear}},ac=sc;var lc=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let o=()=>e.clear("dialog"),t=a=>e.remove(a),n=(a,i)=>e.loading(a,i);return {clearAll:o,show:a=>{let i=e.add({type:"dialog",props:{...a,type:et.Dialog}});return {id:i,setLoading:p=>n(i,p),hide:()=>t(i)}},confirm:a=>{let{confirmLabel:i,...p}=a,l=e.add({type:"dialog",props:{...p,type:et.Confirm,action:a.action??[{label:a.cancelLabel??"Cancel",kind:"ghost",onClick:()=>{a.onCancel?.(),t(l);}},{label:a.confirmLabel??"Confirm",kind:"solid",type:"submit",onClick:c=>{a.onConfirm?.(c);}}]}});return {id:l,setLoading:c=>n(l,c),hide:()=>t(l)}},hide:t}},cc=lc;var pc=()=>{let e=useContext(Ie);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let o=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),r=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:o,open:s=>r({children:s}),right:s=>r({children:s,from:Pe.Right}),left:s=>r({children:s,from:Pe.Left}),top:s=>r({children:s,from:Pe.Top}),bottom:s=>r({children:s,from:Pe.Bottom}),close:t}},uc=pc;var dc=(e,o,t={})=>{let[n,r]=useState(null),[s,a]=useState(false),{duration:i=.25,curve:p=oe.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=t;return useLayoutEffect(()=>{o&&e.current?(r(e.current.getBoundingClientRect()),a(true)):o||a(false);},[o,e]),{style:Se({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:p,duration:i,when:s&&o}).style,isMeasured:s,sourceRect:n}},gc=dc;var bc=(e,o={})=>{let{offset:t=8,direction:n="bottom",container:r=null,triggerRef:s=null}=o,a=useRef(null),i=useCallback(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=p.getBoundingClientRect(),d=l.getBoundingClientRect(),u,m;r?(u=r.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(p).position==="fixed"?m="fixed":m="absolute",m==="fixed"?u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),p.style.position!==m&&(p.style.position=m),a.current=m;let x=0,C=0;switch(n){case "top":x=d.top-c.height-t,C=d.left,x<u.top&&d.bottom+c.height+t<=u.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,C=d.left,x+c.height>u.bottom&&d.top-c.height-t>=u.top&&(x=d.top-c.height-t);break;case "left":x=d.top,C=d.left-c.width-t,C<u.left&&d.right+c.width+t<=u.right&&(C=d.right+t);break;case "right":x=d.top,C=d.right+t,C+c.width>u.right&&d.left-c.width-t>=u.left&&(C=d.left-c.width-t);break}if(x=Math.max(u.top,Math.min(x,u.bottom-c.height)),C=Math.max(u.left,Math.min(C,u.right-c.width)),a.current==="fixed")p.style.top=`${x}px`,p.style.left=`${C}px`;else {let v;p.offsetParent?v=p.offsetParent.getBoundingClientRect():v={top:0,left:0};let S=x-v.top+window.scrollY,h=C-v.left+window.scrollX;p.style.top=`${S}px`,p.style.left=`${h}px`;}},[e,s,t,n,r]);return useEffect(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(i);return c.observe(p),l&&c.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,r,s]),{postion:a.current,reposition:i}},Mt=bc;var Sc=()=>{let e=useContext(Ie);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let o=(m,y)=>e.add({type:"toast",props:{...y,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),r=(m,y)=>e.update(m,y),s=m=>({id:m,update:y=>r(m,y),setType:y=>r(m,{type:y}),setProgress:y=>r(m,{progress:true,progressValue:y}),setBusy:y=>r(m,{busy:y}),success:()=>r(m,{type:"success"}),error:()=>r(m,{type:"error"}),warn:()=>r(m,{type:"warn"}),promise:()=>r(m,{type:"promise"}),default:()=>r(m,{type:"default"}),hide:()=>n(m)}),a=m=>s(o("default",m)),i=m=>s(o("success",m)),p=m=>s(o("error",m)),l=m=>s(o("warn",m)),c=m=>s(o("promise",m)),d=(m,y,R)=>{let x=o(m,{...y,sticky:y.sticky??false,actions:[{label:R?.label||"Ok",onClick:C=>{R?.onClick?.(C),n(x);}}]});return s(x)},u=(m,y,R,x)=>{let C=o(m,{...y,sticky:true,actions:[{label:R?.label||"Ok",onClick:v=>{R?.onClick?.(v),(R?.hide??false)===true&&n(C);}},{label:x?.label||"Cancel",onClick:v=>{x?.onClick?.(v),(x?.hide??true)===true&&n(C);}}]});return s(C)};return {show:a,hide:n,promise:c,clearAll:t,ok:(m,y)=>d("default",m,y),success:(m,y)=>y?d("success",m,y):i(m),error:(m,y)=>y?d("error",m,y):p(m),confirm:(m,y,R)=>u("default",m,y,R),warn:(m,y)=>y?d("warn",m,y):l(m),succes:(m,y)=>y?d("success",m,y):i(m)}},wc=Sc;var es=({ref:e,style:o,...t})=>{let n=useRef(null),r=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=O(t,r);return jsx("div",{ref:e||n,style:{...s,...o||{}},className:a,...i})};es.displayName="Zuz.Box";var f=es;var os=forwardRef((e,o)=>{let{title:t,message:n,...r}=e,[s,a]=useState(false);return jsxs(f,{className:"--accordion flex cols",...r,children:[jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(z,{className:"--label flex",children:t}),jsx(f,{className:"--arrow flex",children:s?A.arrowUp:A.arrowDown})]}),s&&jsx(f,{className:"--detail",children:n})]})});os.displayName="Zuz.Accordion";var Ec=os;var Nc=({label:e,icon:o,onClick:t,idx:n,selected:r})=>jsx(K,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof o=="string"?jsx(te,{name:o}):o}),ns=Nc;var ss=forwardRef((e,o)=>{let{items:t,name:n,selected:r,position:s,...a}=e,i=useRef(null),[p,l]=useState(r||t[0].tag||0),c=useCallback(({x,y:C})=>{if(i.current){let v=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-v.left}`),document.documentElement.style.setProperty("--tip-y",`${C-v.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",c));},[]);useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,C)=>C.label.length>x.length?C.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",u));},[]);let{className:m,style:y,rest:R}=O(a);return jsxs(f,{ref:i,style:y,className:[`--actionbar flex aic ${m}`,`${!s||s==ve.Auto?"rel":`--${s}`}`].join(" ").trim(),...R,children:[t.map((x,C)=>jsx(ns,{selected:p===x.tag||r==C,...x,idx:C},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(f,{className:"--tip abs",children:jsx(f,{className:"--track flex aic",children:t.map(({label:x})=>jsx(f,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});ss.displayName="Zuz.ActionBar";var Oc=ss;var is=forwardRef((e,o)=>{let{type:t,icon:n,title:r,message:s,iconSize:a,...i}=e,{className:p,style:l,rest:c}=O(i);return jsxs(f,{className:`--alert --${t||Le.Info} flex aic ${p}`.trim(),style:l,...c,children:[jsx(f,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&A[t||Le.Info]}),jsxs(f,{className:"--meta flex cols",children:[jsx(z,{className:`--title ${s?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(z,{className:"--message",h:2,children:s})]})]})});is.displayName="Zuz.Alert";var Hc=is;var cs=({ref:e,...o})=>{let{variant:t,numeric:n,name:r,onConfirm:s,...a}=o,{style:i,className:p,rest:l}=O(a),{variant:c}=j(true),d=useRef(null),u=at(),m=r?u.errors?.[r]:null,y=r&&u.values&&u.setFieldValue,R=y?u.values?.[r]:void 0,x=useDebounce(v=>{y&&u.setFieldValue?.(r,v);},500),C=v=>{let S=v.currentTarget.value;n&&(S=S.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),v.currentTarget.value=S),x(S),o.onInput?.(v);};return useEffect(()=>{d.current&&r&&R!==void 0&&d.current.value!==String(R)&&(d.current.value=String(R));},[R,r]),useEffect(()=>()=>{y&&u.deleteFieldValue?.(r);},[]),jsx("input",{name:r,className:`--input --${t||c} ${m?"--has-error":""} --flex ${p}`.trim(),style:i,defaultValue:R??o.defaultValue??"",onInput:C,onKeyDown:v=>{v.key=="Enter"&&s?.(v.currentTarget.value);},ref:v=>{d.current=v,typeof e=="function"?e(v):e&&(e.current=v);},...l})};cs.displayName="Zuz.Input";var fe=cs;var ps=e=>{let{meta:o,children:t}=e,n=useDelayed(),{label:r,icon:s,...a}=isValidElement(o)?{}:o,{className:i,style:p,rest:l}=O({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(o)?jsx("li",{style:p,className:i,children:o}):jsxs("li",{style:p,className:i,...l,children:[t,typeof o=="string"?o:r]})};ps.displayName="Zuz.ListItem";var us=ps;var gs=forwardRef((e,o)=>{let{items:t,variant:n,direction:r,seperator:s,ol:a,virtual:i,...p}=e,l=useRef(null),c=useRef(null),{className:d,style:u,rest:m}=O(p),y=a==true?"ol":"ul",{visibleRange:R,scrollTop:x}=useMemo(()=>{if(!i||typeof window>"u")return {visibleRange:{start:0,end:t.length},scrollTop:0};i.itemHeight??50;i.overscan??5;i.height??400;return {visibleRange:{start:0,end:t.length},scrollTop:0}},[t.length,i]),C=useCallback(()=>{let{start:v,end:S}=R;return t.slice(v,S).map((w,g)=>{let b=v+g,I=t,B=`${typeof w=="string"?`li-${String(w)}`:isValidElement(w)?`li-${w.key}`||`${b}-${MD5(w.toString())}`:w.label}-${b}`;return jsxs(Fragment,{children:[jsx(us,{meta:w}),s&&I[b+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${b+1}-${B}`):null]},B)})},[R,t,s]);return useEffect(()=>{let v=l.current;if(!v)return;let S=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{},100);};return v.addEventListener("scroll",S,{passive:true}),()=>{v.removeEventListener("scroll",S),c.current&&clearTimeout(c.current);}},[]),createElement(y,{className:`--list --${n||q.Small} flex ${r??"cols"} ${d}`.trim(),style:u,ref:v=>{l.current=v,typeof o=="function"?o(v):o&&(o.current=v);},...m,children:C()})});gs.displayName="Zuz.List";var _e=gs;var ys=forwardRef((e,o)=>{let{fx:t,action:n,data:r,withStyle:s,onChange:a,...i}=e,{className:p}=O({as:s||""}),{style:l}=O(i),[c,d]=useState(false),[u,m]=useState(r||[]),y=useRef(null),R=useRef(null),x=useRef(null),C=useMemo(()=>i.name||uuid(12),[]),[v,S]=useState(null),[h,w]=useState(null),[g,b]=useState([]),B=useDebounce(N=>{N.target.value==""?(d(false),m([])):n&&N.target.value.trim()!=""&&withPost(n,{query:N.target.value}).then(L=>{"items"in L&&_(L.items).isArray()?(m(L.items),w(N.target.value),b(L.items)):console.error("Action Response should contain items array"),S(null);}).catch(L=>{S(null),m([]);});},250),E=()=>{if(R.current){let N=R.current.getBoundingClientRect(),L=window.innerHeight-N.bottom,U=N.top;if(x.current){let X=x.current;L<X.offsetHeight&&U>L?(X.style.top="auto",X.style.bottom=`${N.height}px`,X.style.maxHeight=`${U-150}px`):(X.style.top=`${N.height+5}px`,X.style.bottom="auto",X.style.maxHeight=`${L-150}px`);}}},V=N=>{if(u.length>0){if((N.key==="ArrowDown"||N.key==="ArrowUp")&&(N.preventDefault(),N.stopPropagation()),N.key==="Escape")S(null),d(false),m([]);else if(N.key==="ArrowDown")S(L=>{let U=L===null||L===u.length-1?0:L+1;return D(U),U});else if(N.key==="ArrowUp")S(L=>{let U=L===null||L===0?u.length-1:L-1;return D(U),U});else if(N.key==="Enter"&&v!==null){let L=u[v];y.current&&(y.current.value=L,d(false),m([]));}}},k=N=>{y.current&&(y.current.value=N,d(false),m([]));},D=N=>{let L=u[N];if(L&&y.current&&(y.current.value=L,y.current.setSelectionRange(L.length,L.length)),x.current){let X=x.current.children[N];X&&X.scrollIntoView({block:"nearest"});}},$=N=>{R.current&&!R.current.contains(N.target)&&(d(false),m([]));},_$1=()=>{y.current&&y.current.value===h&&(m(g),S(null),E());};return useEffect(()=>(window.addEventListener("resize",E),window.addEventListener("scroll",E,true),document.addEventListener("mousedown",$),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),document.removeEventListener("mousedown",$);}),[]),useEffect(()=>{E();},[u]),jsxs(f,{style:l,ref:R,className:`--autocomplete --${e.size||q.Small} flex aic rel ${p}`.trim(),children:[jsx(fe,{ref:y,autoComplete:"off",onChange:B,onKeyDown:V,onFocus:_$1,...i}),jsx(f,{className:"--arrow rel flex aic jcc",children:u.length>0?A.arrowUp:A.arrowDown}),u.length>0&&jsx(_e,{id:C,ref:x,className:"--suggestion-list flex cols abs",items:u.map((N,L)=>({label:N,onClick:U=>{U.preventDefault(),U.stopPropagation(),k(N);},className:v===L?"--current":"",animate:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:clamp(.02*L,.02,.5)}}))})]})});ys.displayName="Zuz.AutoComplete";var am=ys;var xs=forwardRef((e,o)=>{let t=useRef(null),n=useMemo(()=>o&&typeof o!="function"&&o.current?o:t,[o]),{style:r,className:s,rest:a}=O(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:r,className:`${s} flex`,...a})});xs.displayName="Zuz.Image";var Dt=xs;var bs=forwardRef((e,o)=>{let{src:t,variant:n,type:r,crossOrigin:s,referrerPolicy:a,fx:i,as:p,alt:l,color:c,style:d,...u}=e,[m,y,R]=useImage(t??"",s,a),{className:x,style:C,rest:v}=O({fx:i,as:p});return jsx(f,{className:`--avatar --${n||q.Small} --${(r||Ur.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:c||"var(--avatar-bg, var(--primary))",...d,...C},...v,children:t?jsx(Dt,{src:m,crossOrigin:s,referrerPolicy:a,...u}):jsx(z,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});bs.displayName="Zuz.Avatar";var yr=bs;var dm=({size:e=5,type:o="dead",label:t="",variant:n=q.Small,loading:r=false,spinner:s,...a})=>{let{style:i,className:p,rest:l}=O(a);return jsxs(f,{style:{..._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${o} rel flex aic jcc ${p}`.trim(),children:[jsx(f,{fx:{transition:Q.FadeIn,curve:oe.Liquid,duration:.5,when:r},as:"abs abc",children:jsx(Re,{type:s})}),_(t).isEmpty()?jsx(f,{as:`--dot --${o}`}):jsx(z,{as:"--label",children:t})]})},gm=dm;var Nm=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,o=e.getDay();return addDays(e,(6-o)%7||6)},getDateFormat:()=>{let e=new Date,o=e.getDay();return format(addDays(e,(6-o)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],Bm=e=>{let o=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return o.has(n)?false:(o.add(n),true)})},Ss=forwardRef((e,o)=>{let{defaultValue:t,variant:n,onChange:r,...s}=e,{style:a,className:i,rest:p}=O(s),[l,c]=useState(t||new Date),d=startOfMonth(l),u=endOfMonth(l),m=startOfWeek(d),y=endOfWeek(u),R=useMemo(()=>eachDayOfInterval({start:m,end:y}),[m,y]),x=S=>{r?.(S),c(S);},C=()=>{c(S=>new Date(S.getFullYear(),S.getMonth()-1));},v=()=>{c(S=>new Date(S.getFullYear(),S.getMonth()+1));};return jsxs(f,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsx(f,{as:"--calendar-quick-select flex cols flex:1",children:Bm(Nm).map(S=>{let h=S.getDate();return jsxs(K,{onClick:()=>x(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(z,{as:"flex:1",children:S.label}),jsx(z,{as:"tar",children:S.getDateFormat()})]},`--dtp-option-label-${S.label}`)})}),jsxs(f,{as:"--calendar-selector flex cols flex:1",children:[jsxs(f,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(z,{as:"flex:1 --calendar-cm bold",children:format(l,"MMMM yyyy")}),jsx(K,{onClick:C,as:"--calendar-chevron",children:A.chevronUpOutline}),jsx(K,{onClick:v,as:"--calendar-chevron",children:A.chevronDownOutline})]}),jsxs(f,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(S=>jsx(z,{as:"--calendar-day",children:S},`--calendar-hd-${S}`)),R.map((S,h)=>{let w=isSameMonth(S,l),g=isSameDay(S,l),b=isToday(S);return jsx(K,{disabled:!w,onClick:()=>x(S),as:["--calendar-day --calendar-dd",`${g?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(S,"d")},`--calendar-day-${h}-${S.getFullYear()}-${S.getMonth()}-${S.getDay()}`)})]})]})]})});Ss.displayName="Zuz.Calendar";var xr=Ss;var fo=(t=>(t.Table="table",t.Gooey="gooey",t))(fo||{});var Ps=({ref:e,...o})=>{let{itemCount:t,itemsPerPage:n,startPage:r,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:p,nextLabel:l,hash:c,loading:d,seperator:u,renderOnZeroPageCount:m,asDots:y,progressBar:R,onPageChange:x,...C}=o,v=useRef(null),S=useMemo(()=>toHash(numberInRange(4,8)),[]),h=useCallback(N=>`${toHash(N,c||6,S)}${u||""}${S}`,[S]),w=useMemo(()=>i||"...",[i]),g=useRef(null),[b,I]=useState({id:c?r?typeof r=="number"?h(r):r:1:r||1,label:r||1});useImperativeHandle(e,()=>({setPage:N=>I(N),getPage:N=>b,setProgress:N=>g.current?.setProgress?.(N),getProgress:()=>g.current?.getProgress?.()??0}),[g.current]);let{style:B,className:E,rest:V}=O(C),k=useCallback(N=>typeof N=="number"?N:+N.label,[]);if(!t)throw new Error('"itemCount" prop is required');let D=useMemo(()=>Math.ceil(t/n),[t,n]),$=useMemo(()=>{let N=[],L=Math.max(k(b)-(s||2),1),U=Math.min(k(b)+(s||2),D);L>1&&N.push({id:c?h(1):1,label:1}),L>2&&N.push({id:-1,label:w});for(let X=L;X<=U;X++)N.push({id:c?h(X):X,label:X});return U<D-1&&N.push({id:-1,label:w}),U<D&&N.push({id:c?h(D):D,label:D}),N},[b]),_=useCallback(N=>{let L=N;+L.label<1||+L.label>D||(I(L),x?.(L));},[t,n,b]);return $.length<=1&&(m??false)===false?null:jsxs(f,{ref:v,as:`--pagination ${y===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${E}`,children:[jsx(f,{as:"flex flex:1 aic --pgt-btns",children:($.length>1?$:[{id:1,label:1},{id:-1,label:w}]).map((N,L,U)=>{let X=(typeof N=="string"?N:N.label)==k(b);return jsx(K,{disabled:N.id==-1||k(b)==+N.label,className:X?"--current-page":"",onClick:F=>_(N),children:y===true?R===true&&X?jsx(Lt,{ref:g}):"":typeof N=="string"?N:N.label},`--pg-${L}-${N.id}`)})}),jsx(f,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(k(b)-1)*n+1} - `,`${Math.min(k(b)*n,t)} of ${t} items`].join(" ")}),jsxs(f,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(K,{disabled:k(b)<=1,onClick:N=>_({id:c?h(k(b)-1):k(b)-1,label:k(b)-1}),children:A.chevronLeftOutline}),jsx(K,{disabled:$.length<=1||k(b)==k($[$.length-1]),onClick:N=>_({id:c?h(k(b)+1):k(b)+1,label:k(b)+1}),children:A.chevronRightOutline})]})]})};Ps.displayName="Zuz.Pagination";var Ht=Ps;function Am(e,o){let{items:t,renderItem:n,effect:r="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:p=true,useWheel:l=true,spacing:c=160,rotation:d=20,scaleStep:u=.15,blur:m=4,animation:y="power",showDots:R=false,autoPlay:x=false,autoPlaySpeed:C=3,onChange:v,...S}=e,{className:h,style:w}=O(S),g=useRef(null),b=C/(C>=1e3?1e3:1),I=useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:p,useWheel:l,onChange:D=>{g.current?.setPage({id:D+1,label:D+1}),g.current?.setProgress(0),v?.(D);}}),{pause:B,resume:E,reset:V}=useTimer({duration:b,autoStart:x===true,onProgress:D=>{x===true&&g.current?.setProgress(1-D);},onExpired:()=>{x===true&&I.next(),V();}}),k={...w,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":u,"--active-index":I.index,"--carousel-transition":`var(--${y})`};return jsxs(f,{ref:o,className:`--carousel --effect-${r} --loop-${a} flex cols aic jcc ${h}`.trim(),style:k,children:[jsx(f,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((D,$)=>{let _=$-I.index;if(a==="infinite"){let L=t.length;_=((_+L/2)%L+L)%L-L/2;}let N=$===I.index;return jsx(f,{onMouseEnter:()=>N&&B(),onMouseLeave:()=>N&&E(),className:`--carousel-item-wrapper abs ${N?"--is-active":""}`,style:{"--offset":_,zIndex:N?100:100-Math.abs(_),display:Math.abs(_)>5?"none":"flex"},children:n(D,$,I.index)},$)})}),R&&jsx(Ht,{ref:g,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:D=>I.goTo(+D.label-1),asDots:true,progressBar:true})]})}var $m=forwardRef(Am),Fm=$m;var Rs=(o=>(o.Line="line",o))(Rs||{});var Ns=forwardRef((e,o)=>{let{data:t,width:n,height:r,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:p,animated:l,animDuration:c=2,animDelay:d=0,padding:u=0,type:m,...y}=e,{className:R,style:x,rest:C}=O(y),v=useRef(null),S=useResizeObserver(v.current?.parentElement||v),h=typeof n=="number"?n:S.width,w=typeof r=="number"?r:S.height,g={width:h,height:w},b=useId(),{pathD:I,areaPathD:B}=useLineChart(t,g,u+(a||2)),E=useRef(null),V=useRef(null),[k,D]=useState(0),[$,_]=useState(0);return useEffect(()=>{l&&(E.current&&D(E.current.getTotalLength()),V.current&&_(V.current.getTotalLength()));},[l,I,B,h,w]),jsx(f,{ref:v,as:`--chart --${m||"line"}-chart ${R}`.trim(),style:{...x,width:n,height:r},...C,children:h>0&&w>0&&jsxs("svg",{viewBox:`0 0 ${h} ${w}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:i}),jsx("stop",{offset:"100%",stopColor:p})]})}),jsx("path",{ref:V,d:B,fill:`url(#${b})`,stroke:"none",style:l?{strokeDasharray:$,strokeDashoffset:$}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:$,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:E,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:k,strokeDashoffset:k}:{},children:l&&jsx("animate",{attributeName:"stroke-dashoffset",from:k,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});Ns.displayName="Zuz.Chart";var Um=Ns;var Bs=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(Bs||{}),qm=(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))(qm||{}),Xm=(s=>(s.File="file",s.Image="image",s.Video="video",s.Audio="audio",s.Link="link",s))(Xm||{});var ks=memo(({ref:e,...o})=>{let{sender:t,text:n,media:r,side:s="me",stylePreset:a="default",status:i=1,timeStamp:p=Date.now(),arrow:l=true,attachments:c,autoFetchLinkPreview:d=false,linkPreviewFetcher:u,replyTo:m,reactions:y,forwarded:R,...x}=o,{className:C,style:v,rest:S}=O(x);return jsxs(de,{gap:8,as:`--bubble-wrapper --bw-${s}`.trim(),ref:e,children:[t&&jsx(yr,{alt:t.name,src:t.picture,style:{backgroundColor:t.color}}),jsxs(de,{cols:true,ref:e,className:["--bubble --bubble-enter rel",r?`--with-media --bma-${r.type}`:"",`--bubble-${s}`,`--bubble-style-${a}`,l?"":"--bubble-grouped",l===true?"--b-arrow":"",C].filter(Boolean).join(" ").trim(),style:{...v,contain:"layout style paint"},...S,children:[t&&jsx(z,{className:"--bubble-name",children:t.name}),n&&jsx(z,{className:"--bubble-text",children:n}),jsxs(de,{aie:true,jce:true,as:"--bubble-stats",children:[jsx(z,{className:"--bubble-stamp tar",children:timeSince(p)}),s==="me"&&jsx(ie,{className:`--bubble-status --bs-${i}`,children:i===0?A.pending:i===1?A.done:i===2?A.doneAll:A.doneAll})]})]})]})},(e,o)=>e.text===o.text&&e.side===o.side&&e.status===o.status&&e.timeStamp===o.timeStamp&&e.stylePreset===o.stylePreset&&e.media===o.media&&e.attachments===o.attachments&&e.reactions===o.reactions);ks.displayName="Zuz.Bubble";var Cr=ks;var Jm={today:"Today",yesterday:"Yesterday"},Ms=memo(({messages:e,autoScroll:o=true,onScrollTop:t,typing:n,dateLabels:r,locale:s,formatDateLabel:a})=>{let i=useRef(null),p=useRef(null),l=useRef(null),c=useRef(false),d=useRef(false),[u,m]=useState(0),[y,R]=useState(false),x=useRef(e.length),C=useMemo(()=>({...Jm,...r||{}}),[r]),v=useCallback(()=>i.current?.querySelector(".--scroll-content"),[]),S=useCallback(I=>{let B=I||Date.now(),E=new Date(B),V=new Date,k=new Date(V.getFullYear(),V.getMonth(),V.getDate()),D=new Date(E.getFullYear(),E.getMonth(),E.getDate()),$=Math.floor((k.getTime()-D.getTime())/864e5),_=`${E.getFullYear()}-${E.getMonth()+1}-${E.getDate()}`,N=C,L=a?a(B,{date:E,dayDiff:$,locale:s,labels:N}):$===0?N.today:$===1?N.yesterday:E.toLocaleDateString(s);return {key:_,label:L}},[a,s,C]),h=useMemo(()=>e.flatMap((I,B)=>{let E=e[B-1],V=S(I.timeStamp),k=E?S(E.timeStamp):null,D=B===0||V.key!==k?.key,$=B===0||E?.side!==I.side||V.key!==k?.key,_=[];return D&&_.push(jsx(f,{as:"flex aic jcc p:8,0",children:jsx(z,{as:"s:xs dim-50",children:V.label})},`date-${V.key}-${B}`)),_.push(jsx(Cr,{...I,arrow:I.arrow??$},I.id||B)),_}),[e,S]),w=useMemo(()=>n?[...h,jsx(f,{as:"flex jcs p:4,8",children:jsxs(f,{as:"--bubble --bubble-you --typing-indicator rel flex cols",children:[jsx(z,{as:"s:xs dim-75",children:typeof n=="string"?n:"Typing"}),jsxs(f,{as:"flex aic gap:4",children:[jsx(ie,{className:"--typing-dot"}),jsx(ie,{className:"--typing-dot"}),jsx(ie,{className:"--typing-dot"})]})]})},"typing-row")]:h,[h,n]);useEffect(()=>{let I=v();if(!I||!o)return;let B=e.length-x.current;B>0&&(x.current=e.length,c.current?(m(E=>E+B),R(true)):(requestAnimationFrame(()=>{I.scrollTop=I.scrollHeight;}),m(0),R(false)));},[e,o,v]);let g=useCallback(()=>{let I=v();if(!I)return;let B=I.scrollHeight-I.scrollTop-I.clientHeight<100,E=I.scrollTop<50;c.current=!B,R(!B),B&&(m(0),R(false)),E?d.current||(d.current=true,t?.()):d.current=false,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{c.current=false;},500);},[t,v]);useEffect(()=>{let I=v();if(I)return I.addEventListener("scroll",g,{passive:true}),()=>I.removeEventListener("scroll",g)},[g,v]);let b=useCallback(()=>{let I=v();I&&(I.scrollTop=I.scrollHeight,m(0),R(false));},[v]);return useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),jsxs(f,{ref:i,as:"rel flex cols",style:{height:"100%",contain:"layout style paint"},children:[jsx(Bt,{as:"h:full",smooth:true,children:jsx(_e,{ref:p,items:w})}),y&&u>0&&jsx(f,{as:"abs bottom:0 left:0 right:0 flex aic jcc",style:{padding:"12px",background:"linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%)"},children:jsx(K,{onClick:b,style:{padding:"8px 16px",borderRadius:"20px",fontSize:"12px"},children:jsxs(z,{children:[u," new message",u!==1?"s":""]})})})]})},(e,o)=>e.messages.length===o.messages.length&&e.autoScroll===o.autoScroll&&e.onScrollTop===o.onScrollTop&&e.typing===o.typing&&e.locale===o.locale&&e.formatDateLabel===o.formatDateLabel&&e.dateLabels?.today===o.dateLabels?.today&&e.dateLabels?.yesterday===o.dateLabels?.yesterday);Ms.displayName="Zuz.ChatList";var ep=Ms;var Os=forwardRef((e,o)=>{let{style:t,className:n,rest:r}=O(e);return jsx("label",{ref:o,style:t,className:n,...r})});Os.displayName="Zuz.Label";var $t=Os;var Vs=({ref:e,...o})=>{let {name:t,required:n,type:r,value:s,size:a,variant:i,checked:p,disabled:l,onSwitch:c,...d}=o,u=at(),m=!!(t&&u.values);m?u.errors?.[t]:null;let R=m?u.values?.[t]:void 0,[x,C]=useState(p||false),v=useRef(null),{variant:S}=j(true),h=useMemo(()=>m&&R!=null?typeof R=="string"?R.toLowerCase()!=="false"&&R!=="":!!R:x,[R,x,m]);useEffect(()=>{v.current&&v.current.checked!==h&&(v.current.checked=h);},[h]),useEffect(()=>{p!==void 0&&C(p);},[p]);let w=g=>{let b=!!g;m&&u.setFieldValue?.(t,b),C(b),c?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(g,b=true){w(g);},toggle(g=true){w(!h);}})),jsxs($t,{"aria-hidden":l,className:[`--${(r||Ke.Default).toLowerCase()}`,`${!r||r===Ke.Default?"--checkbox":"--switch"}`,`--${i||S||q.Small}`,`flex aic jcc ${h?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...d,children:[(!r||r==Ke.Default)&&A.check,jsx(fe,{ref:g=>{v.current=g,e&&(e.current=g);},defaultChecked:h,type:"checkbox",className:"abs",name:t,required:n||false,onChange:g=>{g.stopPropagation(),w(g.target.checked);},disabled:l})]})};Vs.displayName="Zuz.CheckBox";var Ft=Vs;var pp=({ref:e,...o})=>{let{code:t,copy:n,lang:r="tsx",showLines:s=false,highlight:a="",as:i,fx:p,...l}=o,c=useRef(null),{className:d,style:u,rest:m}=O({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:p},c),y=useMemo(()=>{let x=new Set;return a.split(",").forEach(C=>{if(C.includes("-")){let[v,S]=C.split("-").map(Number);for(let h=v;h<=S;h++)x.add(h);}else C&&x.add(Number(C));}),x},[a]),R=useMemo(()=>{let x=t.split(`
|
|
9
|
+
`);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let C=x[0]?.match(/^\s*/)?.[0].length||0,v=x.map(h=>{let w=h.match(/^\s*/)?.[0].length||0,g=Math.min(w,C);return h.slice(g)}),S=[{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 v.map((h,w)=>{let g=h.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),b=y.has(w+1);if(r!="plain"){let I=[];S.forEach(B=>{g=g.replace(B.re,E=>{let V=`ZUZ_ID_${I.length}_ZUZ`;return I.push(`<span class="--token-${B.name}">${E}</span>`),V});});for(let B=I.length-1;B>=0;B--)g=g.replace(`ZUZ_ID_${B}_ZUZ`,I[B]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
|
|
10
|
+
${s==true?`<span class="--line-number">${w+1}</span>`:""}
|
|
11
11
|
<span class="--line-content">${g||" "}</span>
|
|
12
|
-
</div>`}).join("")},[t,h]);return jsxs(f,{as:`--code-block rel ${d}`,style:u,...l,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:T}})}),n&&jsx(K,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},jm=Ym;var Ns=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=useRef(null),{index:s,icon:a,label:i}=r,[p,l]=useState({x:0,width:0}),c=useDelayed();return useLayoutEffect(()=>{if(c&&o.current){let{width:d,x:u}=o.current.getBoundingClientRect();l({x:u,width:d}),t&&e(s,d,u,r,true);}},[c,o.current]),useEffect(()=>{t&&e(s,p.width,p.x,r,false);},[t]),jsxs(K,{disabled:n,onClick:()=>e(s,p.width,p.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(te,{name:a,as:"--segment-icon"}):jsx(f,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsx(f,{className:"--segment-label",children:i||`Item ${s}`})]})};Ns.displayName="SelectTabItem";var Bs=Ns;var Ls=forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:i,...p}=e,[l,c]=useState(o||0),d=useDelayed(50),u=useRef(l),{className:m,style:h,rest:T}=B(p),x=useRef(null),P=useRef(null),{variant:v}=j(true),R=(y,S,g,b,E)=>{if((E||l!=y&&l!=-2)&&(c(y),u.current=l,queueMicrotask(()=>{d&&i?.(b);})),x.current){let F=P.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${S}px`),x.current.style.setProperty("--x",`${F?g-F.left:g}px`);}};return useImperativeHandle(r,()=>({setSelected:y=>{typeof y=="number"&&y!=l&&c(y);}}),[l]),jsxs(f,{ref:P,"data-selected":l,className:`${m} --segmented --${s||v||q.Medium} flex aic rel`,style:h,...T,children:[jsx(f,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((y,S)=>jsx(Bs,{disabled:a,onSelect:R,selected:l==S,meta:{...y,index:S}},`segment-${y.label}-${S}`))]})});Ls.displayName="Zuz.SelectTabs";var Ht=Ls;var Vs=forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=useDelayed(),{colorScheme:a,setColorScheme:i}=Oo(),p=useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:l}=j(true),{className:c,style:d}=B(o),u=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"system",index:1,label:"",icon:V.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}],[]),m=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsx(Ht,{className:`--color-scheme --${t}`,onSwitch:({tag:h})=>{i(h);},selected:m,items:u,...o}):jsx(K,{onClick:p,style:d,variant:n,as:`--color-scheme-switch ${c}`.trim(),children:a=="system"?V.colorSchemeSystem:a=="light"?V.colorSchemeLight:V.colorSchemeDark})});Vs.displayName="Zuz.ColorScheme";var fp=Vs;var Hs=forwardRef((e,r)=>{let[t,n]=useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:i,position:p}=e,l=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxs(f,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:oe.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${p||be.Left} flex cols`,children:[jsx(_,{as:"--title",children:o||"This site uses cookies"}),jsx(_,{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"}),jsxs(f,{as:"--footer flex aic",children:[jsx(K,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsx(K,{onClick:c=>l(0),as:"--reject",children:i||"Cancel"})]})]})});Hs.displayName="Zuz.CookiesConsent";var yp=Hs;var As=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:i,showGhostBar:p,showKnobOnHover:l,showToolTip:c,roundValue:d,formatValue:u,...m}=r,{className:h,style:T,rest:x}=B(m),P=useRef(a||.01).current,v=useRef(o||0).current,R=useRef(s||1).current,y=useRef(n||0).current,S=useRef(null),g=useRef(null),b=useRef(null),E=useRef(null);useRef(null);let M=useRef(null),A=useRef(null),L=useRef(null),O=useRef(null),$=(se,ne,ge)=>(se-ne)/(ge-ne)*100,Z=se=>{if(g.current){let ne=parseFloat(se.currentTarget.value);re(ne);let ge=$(ne,parseFloat(se.currentTarget.min),parseFloat(se.currentTarget.max));g.current.style.setProperty("--value",`${ge}`),g.current.setAttribute("data-value",`${ne}`),i&&i(d?+ne.toFixed(2):ne);}},[I,k]=useState(false),[U,X]=useState(0),[H,z]=useState(0),[G,W]=useState(false),re=async se=>{let ne=u?u(+se):d?(+se).toFixed(2):Math.round(+se);L.current&&(L.current.textContent=String(ne));},le=se=>{if(I){let ne=se.clientX-U,ge=R-v,Te=ne/200*ge,he=Math.max(v,Math.min(H+Te,R));if(he=Math.round(he/P)*P,re(he),g.current){let Me=$(he,v,R);g.current.style.setProperty("--value",`${Me}`),g.current.setAttribute("data-value",`${he}`),A.current&&(A.current.textContent=d?he.toFixed(2):he.toString()),i&&i(he);}}},me=()=>{k(false),document.body.style.cursor="auto";},we=se=>(se-v)/(R-v)*100,ie=se=>{if(!g.current)return;let ne=g.current.getBoundingClientRect(),ge=se.clientX-ne.left,He=Math.max(0,Math.min(100,ge/ne.width*100));if(c&&L.current){let Te=S.current?+S.current.value:n;re(Te*100);}if(p){let Te=we(S.current?+S.current.value:n),he=Math.min(Te,He),Me=Math.abs(He-Te);g.current.style.setProperty("--ghost-start",`${he}`),g.current.style.setProperty("--ghost-width",`${Me}`);}};useEffect(()=>{g.current&&g.current.style.setProperty("--value",S.current?`${$(parseFloat(S.current.value),parseFloat(S.current.min),parseFloat(S.current.max))}`:y.toString());},[]),useEffect(()=>(I?(document.addEventListener("mousemove",le),document.addEventListener("mouseup",me)):(document.removeEventListener("mousemove",le),document.removeEventListener("mouseup",me)),()=>{document.removeEventListener("mousemove",le),document.removeEventListener("mouseup",me);}),[I]),useEffect(()=>{let se=$(n,v,R);g.current?.style.setProperty("--value",`${se}`),re(n);},[n,v,R,L.current]);let Y=()=>jsxs(f,{ref:g,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:ie,className:`--slider --${t||Io.Default} ${l?"--knob-hover":""} flex rel ${h}`.trim(),style:{...T},children:[jsx(f,{ref:M,className:"--slider-track abs fill"}),p&&jsx(f,{ref:E,className:"--slider-ghost abs fill"}),jsx(f,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(f,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(fe,{ref:S,onInput:Z,className:"abs fill",tabIndex:0,type:t||Io.Default,defaultValue:y||0,step:P,max:R,min:v})]});if(c===true){let se=u?u(n):d?n.toFixed(2):n;return jsx(Pt,{ref:O,show:I,position:St.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(ce,{ref:L,children:se}),children:Y()})}return Y()};As.displayName="Zuz.Slider";var pt=As;var Fs=forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:i,rest:p}=B(s),{canvasRef:l,crop:c,setScale:d,handleMouseDown:u,handleMouseUp:m,handleMouseMove:h}=useImageCropper(t,o||200,n||CropShape.Circle);return useImperativeHandle(r,()=>({getCropped(){return c()},setScale(T){d(T);}})),jsxs(f,{as:`--cropper --${n||CropShape.Circle} ${i}`,style:a,...p,children:[jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:u,onMouseUp:m,onMouseLeave:m,onMouseMove:h}),jsx(f,{as:"--cropper-slider",children:jsx(pt,{onChange:T=>d(T),min:0,max:1,step:.01,value:1})})]})});Fs.displayName="Zuz.Cropper";var wp=Fs;var Tp=(t=>(t.Circle="circle",t.Square="square",t))(Tp||{});var _s=forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=useMemo(()=>{let i=typeof t=="string",p=i?[]:t;return i&&t.split(",").forEach(l=>{p.push({label:l});}),p},[t]),a=useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsx(ze,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsx(f,{as:"--crumb-chevron",children:V.chevronRightOutline}),items:a.map((i,p,l)=>i.ID=="."?jsx(f,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(f,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${p}`))}):jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[p+1],children:[i.icon&&jsx(te,{as:"--crumb-icon",name:i.icon}),jsx(_,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});_s.displayName="Zuz.Crumb";var Rp=_s;var Ws=forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:i,type:p,onConfirm:l,...c}=e,[d,u]=useState(false),[m,h]=useState(n||null),{style:T,className:x,rest:P}=B(c),v=useRef(null),R=useRef(null),{reposition:y}=kt(R,{direction:be.Bottom,offset:2}),S=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=E=>{let F=E.target,M=v.current?.contains(F),A=R.current?.contains(F);!M&&!A&&u(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=E=>{E.key==="Escape"&&d&&(u(false),v.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let g=()=>{u(true);};return useEffect(()=>{d&&y();},[d,y]),jsx(Fragment$1,{children:jsxs(f,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":m?m.toISOString():"",children:[t?typeof t=="string"?jsx(te,{as:"mr:10 c:#666",name:t}):t:jsx(ce,{as:"--date-picker-icon flex aic jcc",children:V.calendar}),jsx("input",{ref:v,value:m?format(m,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:T,onFocus:g,onInput:S,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&l?.(b.currentTarget.value);},...P}),jsx(f,{"aria-hidden":!d,ref:R,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsx(ur,{defaultValue:m,onChange:b=>{h(b),u(false);}})})]})})});Ws.displayName="Zuz.DatePicker";var Bp=Ws;var Gs=forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsx(K,{className:`--fab fixed --${n||q.Large} --${o||"bottomright"}`,children:t||V.plus})});Gs.displayName="Zuz.Fab";var Op=Gs;var Dp=({ref:e,children:r,...t})=>{let{legend:n,legendPlacement:o,variant:s,...a}=t,{variant:i}=j(true),{className:p,style:l,rest:c}=B(a);return jsxs(f,{as:`--fieldset --rel --flex --${s||i||q.Medium} ${p}`.trim(),style:l,children:[jsx(f,{as:`--legend --abs --${o||"top-start"}`,children:n&&typeof n=="string"?jsx("legend",{children:n}):n}),r]})},Hp=Dp;var qs=e=>{let{names:r,strength:t}=e,n={[Zt.Gooey]:o=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),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"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${Zt.Gooey}`)};return useEffect(()=>{},[r]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(r||[Zt.Gooey]).map(o=>n[o](t))})})};qs.displayName="Zuz.Filters";var Fp=qs;var Xs=e=>typeof e=="number"?`repeat(${e}, 1fr)`:e,_p=e=>e==="between"?"space-between":e==="around"?"space-around":e,Ys=e=>{let{ref:r,cols:t,rows:n,columns:o,gap:s,gapX:a,gapY:i,columnGap:p,rowGap:l,align:c,alignItems:d,justify:u,justifyContent:m,inline:h,flow:T,autoFlow:x,autoCols:P,autoRows:v,autoColumns:R,autoRow:y,template:S,areas:g,...b}=e,{className:E,style:F,rest:M}=B(b),A=o??t,L=p??a??s,O=l??i??s,$=d??c,Z=m??u,I=x??T,k=R??P,U=y??v,X=g??S,H={...h?{display:"inline-grid"}:{},gridTemplateColumns:Xs(A),gridTemplateRows:Xs(n),columnGap:L,rowGap:O,alignItems:$,justifyContent:_p(Z),gridAutoFlow:I,gridAutoColumns:k,gridAutoRows:U,gridTemplateAreas:X,...F};return jsx(f,{ref:r,className:["--grid",E].filter(Boolean).join(" "),style:H,...M})};Ys.displayName="Zuz.Grid";var Kp=Ys;var js=e=>typeof e=="string"&&e.includes("+"),Qs={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"},Js={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 ta=forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=j(true),i=useMemo(()=>{if(js(r)){let p=null;return {keys:String(r).split("+").reduce((c,d,u,m)=>(m[u+1]?c.push(d):p=d.toUpperCase(),c),[]),children:p}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxs(f,{as:`--keyboard-keys --${o||a||q.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(p=>jsx("abbr",{title:Js[p],children:Qs[p]},p)),jsx(ce,{children:i?.children??e})]})});ta.displayName="Zuz.KeyboardKeys";var Tr=ta;var na=createContext(null),dt=()=>{let e=useContext(na);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},jp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:p,onTrackChange:l,...c}=n,{className:d,style:u,rest:m}=B(c),h=useMediaPlayer(o,o[0]??void 0),T=useMemo(()=>({play:V.play,pause:V.pause,prev:V.prev,next:V.next,volumeHigh:V.volumeHigh,volumeMute:V.volumeMute,...r}),[r]),x=useMemo(()=>({...h,mode:s,icons:T}),[h,T]);return jsx(na.Provider,{value:x,children:jsx(f,{className:`--zuz-media-player ${d}`,style:u,children:t})})},sa=jp;var aa=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},fo=e=>typeof e=="string"?jsx(te,{name:e}):e,ia=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=dt();return jsxs(f,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),r.isLoading&&jsx(f,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Re,{})})]})},la=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=dt();return jsxs(f,{as:"--track-info flex aic",children:[jsx(st,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(f,{as:"flex cols",children:[jsx(f,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(f,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},ca=()=>{let{state:e,controls:r,icons:t}=dt();return jsxs(f,{as:"--mediaplayer-controls flex aic",children:[jsx(K,{onClick:r.prev,as:"--prev",children:fo(t?.prev??V.prev)}),jsx(K,{onClick:r.togglePlay,as:"--play-pause",children:fo(e.isPlaying?t?.pause??V.pause:t?.play??V.play)}),jsx(K,{onClick:r.next,as:"--next",children:fo(t?.next??V.next)})]})},ma=()=>{let{state:e,controls:r,mediaRef:t}=dt(),n=e.progress*(e.duration||0);return jsxs(f,{as:"--track-progress flex aic",children:[jsx(f,{as:"--track-current-duration",children:aa(n)}),jsx(pt,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsx(f,{as:"--track-total-duration",children:aa(e.duration)})]})},pa=()=>{let{state:e,controls:r,icons:t}=dt();return jsxs(f,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(K,{onClick:()=>r.setIsMuted(),children:fo(e.isMuted?t?.volumeMute??V.volumeMute:t?.volumeHigh??V.volumeHigh)}),jsx(pt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Qp=Object.assign(sa,{Stage:ia,TrackInfo:la,Controls:ca,Progress:ma,Volume:pa}),Jp=Qp;var fa=forwardRef((e,r)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxs(f,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:oe.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||q.Small} fixed flex`,children:[jsx(f,{className:"--ico",children:t?V[ke.Success]:V[ke.Error]}),jsx(_,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});fa.displayName="Zuz.NetWorkManager";var ou=fa;var ga=forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:i}=B(o),[p,l]=useState(false),[c,d]=useState(""),u=useMemo(()=>checkPasswordStrength(c),[c]),m=useDebounce(h=>{t&&d(h.target.value),n&&n(h);},100);return useEffect(()=>{},[]),jsxs(f,{as:"w:100% flex cols",children:[jsxs(f,{style:s,className:"--password flex aic rel",children:[jsx(fe,{ref:r,type:p?"text":"password",className:a,onChange:m,...i}),jsx(K,{tabIndex:-1,onClick:()=>l(h=>!h),className:"--toggle flex aic jcc abs",children:p?V.eye:V.eyeSlash})]}),t&&jsxs(f,{as:`flex aic --password-meter --pb-score-${u.score}`,style:s,children:[jsxs(f,{as:"--password-bars flex aic",children:[jsx(f,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsx(_,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});ga.displayName="Zuz.Password";var cu=ga;var ya=forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=useRef([]),i="pinput",p=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:c}=B(s),d=m=>{let h=m.currentTarget,T=a.current[parseInt(h.dataset.index)+1],x=a.current[parseInt(h.dataset.index)-1];h.value.length===1&&T?T.focus():h.value.length===0&&x&&x.focus();},{variant:u}=j(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(f,{name:i,style:c,className:`--otp --${s.variant??u??q.Medium} flex aic rel`,"data-required":p,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((m,h)=>jsx(fe,{autoComplete:"new-password","data-index":h,ref:T=>{a.current[h]=T;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${h}`))})});ya.displayName="Zuz.PinInput";var fu=ya;var xa=forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:i,variant:p,checked:l,onSwitch:c,...d}=e,[u,m]=useState(l||false),{variant:h}=j(true),T=useRef(null);return jsxs(Vt,{className:`${n} --${(a||Eo.Default).toLowerCase()} --radio${!a||a==Eo.Default?"":"card"} --${p||h||q.Small} flex aic rel`.trim(),...d,children:[jsx(fe,{ref:T,defaultChecked:u,value:i||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{c&&c(x.target.checked,i||"cb"),m(x.target.checked);}}),jsx(f,{className:"--dot rel",children:jsx(f,{className:"--rod abs abc"})}),jsx(f,{className:"--value",children:t})]})});xa.displayName="Zuz.Radio";var yu=xa;var ba=forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=V.search,hideSearchIcon:i=false,clearIcon:p=V.close,hideClearIcon:l=false,onChange:c,onClear:d,...u}=e,{style:m,className:h}=B({as:e.as}),[T,x]=useState(""),{variant:P}=j(true),v=useRef(null);"type"in e&&delete e.type;let R=g=>{x(g.target.value),c?.(g.target.value);},y=g=>{T.trim()!==""&&(x(""),c?.(""),v.current&&(v.current.value="",e.onConfirm?.("")));};useImperativeHandle(r,()=>({focus:()=>v.current?.focus(),value:()=>v.current?.value})),useEffect(()=>{},[]);let S=jsx(K,{tabIndex:-1,onClick:g=>y(),className:"--send flex aic jcc",variant:e.variant||q.Medium,children:T!==""?!l&&(typeof p=="string"?jsx(te,{name:p,as:"--search-action"}):p):!i&&(typeof a=="string"?jsx(te,{name:a,as:"--search-action"}):a)});return jsxs(f,{style:m,className:`--search --no-shrink --${e.variant||P||q.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${h}`.trim(),children:[s&&S,jsx(fe,{ref:v,onChange:R,...u}),e.shortcut&&jsx(Tr,{keys:e.shortcut,as:"--abs"}),!s&&S]})});ba.displayName="Zuz.Search";var Pr=ba;var Pu=({label:e,icon:r})=>jsxs(f,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsx(te,{name:r}),jsx(_,{as:"--select-group-label",children:e})]}),Sa=Pu;var Ca=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsx(te,{name:"checkIcon"}):e:V.check,s=n.disabled===true;return jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(Ce,{as:"--option-item-meta --aic",children:[n.icon&&jsx(te,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(_,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsx(Ce,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};Ca.displayName="Option";var Ta=Ca;var Ra=(({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:i,searchPlaceholder:p,maxHeight:l,arrowDownIcon:c=V.arrowDown,arrowUpIcon:d=V.arrowUp,expanded:u,multiple:m,tokenizer:h,wrapTokens:T,disabled:x,checkIcon:P,closeIcon:v,editable:R,editablePlaceholder:y,onChange:S,required:g,with:b,...E}=r,F=It(),M=!!(s&&F?.setFieldValue),A=wn(s),L=Sn(s),O=R===true&&m!==true&&h!==true,$=N=>typeof N=="string"||typeof N=="number",Z=N=>typeof N=="object"&&N!==null&&!Array.isArray(N)&&"value"in N&&"label"in N,I=N=>n.find(ee=>String(ee.value)===String(N)),k=N=>{if(N==null)return null;if(O&&N==="")return "";if(m||h)return (Array.isArray(N)?N:[N]).map(de=>$(de)?I(de):de).filter(de=>Z(de));if($(N)){let ee=I(N);return ee||(O?String(N):null)}return Z(N)?N:null},U=()=>{if(t!==void 0)return k(t);let N=n.find(ee=>String(ee.value)==="-1");return N||(O?"":null)},X=N=>Array.isArray(N)?N.map(ee=>ee.value):Z(N)?N.value:N,[H,z]=useState(()=>U()),[G,W]=useState(false),[re,J]=useState(null),le=useRef(null),me=useRef(null),we=useRef(null),ie=useId(),pe=useMemo(()=>s||ie,[s,ie]),{reposition:Y}=kt(we,{direction:St.Bottom,offset:2}),{variant:se}=j(true),ne=v?typeof v=="string"?jsx(te,{name:v}):v:V.close,{className:ge,style:He,rest:Te}=B(E,void 0),{onClick:he,...Me}=Te||{},ae=useMemo(()=>L!==void 0?k(L):H,[L,H,n,O,m,h]),xe=useMemo(()=>{if(!(!ae||Array.isArray(ae)||!Z(ae)))return ae},[ae]),zt=useMemo(()=>O?Z(ae)?String(ae.value??""):$(ae)?String(ae):"":"",[O,ae]),_t=N=>Array.isArray(ae)?ae.some(ee=>ee.value===N.value):Z(ae)?ae.value===N.value:O&&$(ae)?String(ae)===String(N.value):false,Ae=N=>{if(M&&F?.setFieldValue&&s){F.setFieldValue(s,X(N));return}z(N);},Oe=N=>{S?.(R===true&&N instanceof Option?String(N.value):N);},Co=N=>{if(!(x||N.disabled)){if(m||h){let ee=Array.isArray(ae)?ae:[],Be=ee.find(To=>To.value===N.value)?ee.filter(To=>To.value!==N.value):[...ee,N];Ae(Be),Oe(Be);return}Ae(N),W(false),Oe(N);}},ei=N=>{let ee=N.target.value,de=ee===""?null:I(ee),Be=de?de.value:ee;Ae(Be),Oe(Be);},ti=N=>{if(N.key==="Enter"&&(N.preventDefault(),O)){let ee=N.currentTarget.value.trim();if(!ee){W(false);return}let Be=I(ee)??ee;Ae(Be),Oe(Be),W(false);}},oi=(N,ee)=>{if(N.stopPropagation(),x)return;let de=ae.filter(Be=>Be.value!==ee.value);Ae(de),W(false),Oe(de);},ri=N=>{let ee=N.currentTarget,de=ee.scrollTop===0&&N.deltaY<0,Be=ee.scrollHeight-ee.scrollTop===ee.clientHeight&&N.deltaY>0;!de&&!Be||N.preventDefault(),N.stopPropagation();};useImperativeHandle(e,()=>({setSelected:N=>{Ae(k(N));},getValue:()=>ae??null}),[ae,n,O,m,h,M,s]),useEffect(()=>{M||t===void 0||z(k(t));},[t,M,n,O,m,h]),useEffect(()=>{if(!G)return;let N=()=>{Y();};return window.addEventListener("scroll",N,true),window.addEventListener("resize",Y),()=>{window.removeEventListener("scroll",N,true),window.removeEventListener("resize",Y);}},[G,Y]),useEffect(()=>{if(!G){me.current&&(me.current.value=""),J(null);return}me.current?.focus(),Y();let N=de=>{le.current&&!le.current.contains(de.target)&&W(false);},ee=setTimeout(()=>{document.addEventListener("click",N);},0);return ()=>{clearTimeout(ee),document.removeEventListener("click",N);}},[G,Y]);let ni=useDebounce(N=>J(N===""?null:N),300),si=useDebounce(ei,300);return jsxs(f,{ref:le,"data-required":g?"true":void 0,with:b,className:[`--select ${u==true?"--expanded":""}`,`--${a||se}`,`${s?`--${s}`:""}`,`${A?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:pe,children:[O?jsxs(f,{"data-value":xe?.value??(zt||"-1"),className:`--select-display --selected --editable flex aic rel ${ge}`.trim(),style:He,onClick:N=>N.stopPropagation(),...Me,children:[xe?.icon&&jsx(te,{as:"--selected-icon",name:xe.icon}),jsx(Ce,{aic:true,as:"--label-wrapper",children:jsx(fe,{"aria-expanded":G,className:"--select-input",disabled:x,onChange:si,onClick:N=>{N.stopPropagation(),x||W(true);},onKeyDown:ti,placeholder:y||o||"Choose",type:"text",defaultValue:zt})}),jsx(K,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:N=>{N.stopPropagation(),x||W(ee=>!ee);},tabIndex:-1,withLabel:false,children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}):jsxs(K,{disabled:x,variant:a||se,"data-value":xe?.value??"-1",className:`--select-display --selected flex aic rel ${ge}`.trim(),withLabel:false,style:He,onClick:N=>{N.stopPropagation(),x||W(ee=>!ee);},...Me,children:[xe?.icon&&jsx(te,{as:"--selected-icon",name:xe.icon}),jsx(Ce,{aic:true,as:"--label-wrapper",children:h&&Array.isArray(ae)&&ae.length>0?jsxs(Ce,{as:`--tokens-wrap${T===true?" --wrap":""}`,children:[ae.map(N=>jsxs(Ce,{aic:true,as:"--token",children:[jsx(_,{as:"--token-label",children:N.label}),jsx(f,{as:"--token-remove",onClick:ee=>oi(ee,N),children:ne})]},N.value)),ae.length<n.length&&jsx(_,{as:"--label",children:o||"Choose"})]}):jsx(_,{as:"--label",children:Array.isArray(ae)?ae.length>0?`${ae.length} selected`:o||"Choose":xe?.label||o||"Choose"})}),jsx(f,{className:"--svg-arrow rel flex aic jcc",children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}),jsxs(f,{id:pe,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!G,onWheel:ri,style:{maxHeight:l||"auto"},ref:we,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:G,duration:.05},children:[i&&jsx(f,{as:"--select-search --no-shrink flex --sticky",children:jsx(Pr,{ref:me,variant:q.Small,placeholder:p||"Search...",onChange:ni})}),o&&jsx(Sa,{label:o}),n?.filter(N=>!re||N.label.toLowerCase().includes(re.toLowerCase()))?.map(N=>jsx(Ta,{updateValue:Co,checkIcon:P,selected:_t(N),o:N},`option-${N.label.replace(/\s+/g,"-")}-${N.value}`))]})]})});Ra.displayName="Zuz.Select";var Nu=Ra;var Ia=({ref:e,...r})=>jsx(Dt,{type:Ze.Switch,...r,ref:e});Ia.displayName="Zuz.Switch";var Bu=Ia;var Na=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:i,resize:p,sortBy:l,sortable:c,onSort:d}=e,[u,m]=useState(0),h=()=>{c&&(d?.(String(t),u==1?-1:1),m(T=>T==1?-1:1));};return jsxs(f,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:h,children:[jsx(f,{as:"--colv",children:a}),r==-1&&c&&l==t&&jsx(f,{as:"--arrow flex aib",children:u==1?V.arrowUp:V.arrowDown})]})};Na.displayName="Zuz.Column";var bo=Na;var ka=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:i,sortBy:p,selectable:l,tableRef:c,loading:d,rowClassName:u,onSort:m,onRowClick:h,onSelect:T,onContextMenu:x}=e,P=useDelayed(),v=useMemo(()=>({transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(r+1)}),[]),R=useRef(null),y=(g,b)=>{r==-1?t.emit(`ALL_ROWS_${g?"CHECKED":"UNCHECKED"}`,g):(T&&T(o,g),t.emit(`ROW_${g?"CHECKED":"UNCHECKED"}`,g,b));},S=(g,b,E)=>jsx(bo,{idx:g,id:b,as:"--selector",pubsub:t,value:jsx(Dt,{value:E,ref:R,onSwitch:y,type:Ze.Default})});return useEffect(()=>{let g=(M,A)=>{R.current?.setChecked(M,false);},b=(M,A)=>{let L=false;c?.current&&c.current.querySelectorAll(".--row").forEach(O=>{let $=O;if(!$.classList.contains("--row-head")){let Z=$.querySelector(".--selector input[type=checkbox]");Z&&Z.checked&&!L&&(L=Z.checked);}}),R.current.setChecked(L,false);},E=M=>{R.current?.setChecked(M,false),T&&T(o,M);},F=M=>{R.current?.setChecked(M,false),T&&T(o,M);};return r==-1?(t.on("ROW_CHECKED",g),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",g),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",E),t.on("ALL_ROWS_UNCHECKED",F),()=>{t.off("ALL_ROWS_CHECKED",E),t.off("ALL_ROWS_UNCHECKED",F);})},[]),jsxs(f,{onContextMenu:g=>x?x(g,o):null,onClick:g=>h?h(g,e.data):()=>{},...i?{fx:{...v,when:P}}:{},as:`--row flex aic ${h?"--row-clickable":""} ${r==-1?"--row-head":""} ${u||""}`,children:[r==-1&&n.map((g,b)=>{let{renderWhenHeader:E,render:F,value:M,...A}=g;return jsxs(Fragment,{children:[l&&b==0&&S(-1,`--selector-${g.id}`,"all"),jsx(bo,{idx:-1,onSort:m,sortBy:p,value:M,...A,pubsub:t,style:a[g.id]})]},`--col-${g.id}`)}),d&&r>-1&&jsx(f,{as:"--col",children:jsx(_,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((g,b)=>jsxs(Fragment,{children:[l&&b==0&&S(b,`--selector-${g.id}`,g.id.toString()),s.includes(String(g.id))?jsx(bo,{pubsub:t,idx:b,id:String(g.id),style:a[String(g.id)],value:g.render?g.render(o,r):o[String(g.id).includes(".")?String(g.id).split(".").reverse()[0]:g.id]}):null]},`--${String(g.id)}-val-${b}`))]})};ka.displayName="Zuz.Row";var vo=ka;var Va=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:p,showPaginationOnZeroPageCount:l,animateRows:c,header:d,rowClassName:u,selectableRows:m,hoverable:h,sortBy:T,loading:x,loadingRowCount:P,loadingMessage:v,spinner:R,emptyMessage:y,onSort:S,onRowClick:g,onRowSelectToggle:b,onPageChange:E,onRowContextMenu:F,...M}=e,A=useRef(null),L=useMemo(()=>t.reduce((pe,Y)=>(pe[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},pe),{}),[t]),O=useMemo(()=>Object.keys(L),[t]),$=useMemo(()=>d??true,[d]),{style:Z,className:I,rest:k}=B(M),U=useRef(null),X=useMemo(()=>new PubSub,[]),H=useRef(n.map(()=>uuid(8))),[z,G]=useState(T||null),[W,re]=useState(v||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),le=useCallback(()=>y?typeof y=="function"?jsx(y,{}):y:jsx(_,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!H.current&&(H.current=n.map(()=>uuid(8)));},[n]);let me=(pe,Y)=>{G(pe),S?.(pe,Y);},we=(o||(n?n.length:0))/(s||10),ie=useMemo(()=>l||we>1?jsx(Ot,{hash:p,ref:A,renderOnZeroPageCount:l,onPageChange:E,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return useImperativeHandle(r,()=>({setLoading(pe){}})),jsxs(f,{as:`--table ${h??true?"--hoverable":""} flex cols rel ${I}`,ref:U,children:[$==true&&jsx(vo,{sortBy:z,onSort:me,tableRef:U,pubsub:X,selectable:m,index:-1,schema:t,loading:true,styles:L}),x&&jsxs(f,{as:"center-x flex aic --table-spinner",children:[jsx(Re,{type:R||Se.Simple}),W&&jsx(_,{as:"--table-loading-message",children:W})]}),x&&Array(P||5).fill({}).map((pe,Y)=>jsx(vo,{tableRef:U,index:Y,pubsub:X,schema:t,styles:L,loading:true,animate:c,onRowClick:g},`--trow-loading-${Y}-${t[0].id}`)),!x&&n&&n.map((pe,Y)=>jsx(vo,{tableRef:U,pubsub:X,loading:false,index:Y,schema:t,ids:O,styles:L,animate:c,data:pe,onRowClick:g,rowClassName:u,selectable:m,onSelect:b,onContextMenu:F},`--trow-${H.current[Y]||Y}-${t[0].id}`)),J&&le(),i&&ie&&jsx(f,{"aria-hidden":!i||!ie,...c?{fx:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&ie!=null}}:{},as:"--row flex aic --row-footer",children:ie})]})};Va.displayName="Zuz.Table";var Ku=forwardRef(Va),Zu=Ku;var Gu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=useState(0),a=(i,p,l)=>{i.preventDefault(),s(p),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxs(f,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(_,{as:"--toc-title",children:t}),jsx(ze,{items:n.map((i,p)=>jsx("a",{className:o==p?"--toc-active":"",style:{anchorName:o===p?"--toc-active":"none",color:o==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,p,i.tag),href:`#${i.tag}`,children:i.label}))})]})},Uu=Gu;var Da=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let i=useRef(null),p=useResizeObserver(i);useEffect(()=>{e&&p.height>0&&a(p.height);},[e,p.height]);let c=useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:d},[e,r,n,t]);return jsx(f,{ref:i,style:{...c},className:"--content",children:o||e?s:null})};Da.displayName="Zuz.TabBody";var Ha=Da;var Fa=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:p="slide",...l}=r,[c,d]=useState(0),u=useRef(null),m=useResizeObserver(u),h=useMemo(()=>uuid(8),[]),[T,x]=useState("auto"),P=useMemo(()=>m.width>0,[m.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let v=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:R,className:y,rest:S}=B({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),g=()=>{if(!P)return {opacity:0};switch(p){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${v.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${c*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(f,{ref:u,style:R,className:`--tabview --${a} flex cols ${y}`,children:[jsx(Ht,{as:"--tabview-head",onSwitch:b=>{d(b.index);let E=v.find(F=>F.tag==b.tag);E&&E.onSelect&&(E.onSelect(E,b.index),i?.(E,b.index));},selected:c,items:v.reduce((b,E,F)=>(b.push({icon:E.icon,index:F,label:E.label,tag:E.tag}),b),[])}),jsx(f,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:T,transition:P?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:P?1:0},children:jsx(f,{className:"--track",style:{...g()},children:v.map((b,E)=>jsx(Ha,{isActive:E===c,transitionType:p,speed:n,width:m.width,render:o||E===c,onHeightChange:F=>E===c&&x(F),content:b.body},`tab-body-${b.key||E}-${h}`))})})]})};Fa.displayName="Zuz.TabView";var rf=Fa;var lf=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[i,p]=useState([{type:"output",content:n}]),[l,c]=useState(""),d=useRef(null),u=useRef(null),{variant:m}=j(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let h=y=>{let S=typeof y=="string"?{type:"output",content:y}:y;p(g=>{let b=[...g,S];return b.length>1e3?b.slice(-1e3):b});},T=()=>p([]);useImperativeHandle(e,()=>({write:h,clear:T}));let x=async y=>{let[S,...g]=y.split(" "),b=S.toLowerCase();return r&&r[b]?await r[b](g):t?await t(y):`command not found: ${S}`},P=y=>{let S=/\u001b\[(\d+)m/g,g=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},E=0,F="#d4d4d4",M=false,A;for(;(A=S.exec(y))!==null;){let O=y.slice(E,A.index);O&&g.push({text:O,color:F,bold:M});let $=A[1];$==="0"?(F="#d4d4d4",M=false):$==="1"?M=true:b[$]&&(F=b[$]),E=S.lastIndex;}let L=y.slice(E);return L&&g.push({text:L,color:F,bold:M}),g},v=(y,S)=>y.includes("\x1B")?P(y).map((g,b)=>jsx(ce,{style:{color:g.color||"#d4d4d4",fontWeight:g.bold?"bold":"normal"},children:g.text},`--terminal-msg-${b}-${g.text.replace(/\S+/g,"-")}`)):jsx(ce,{style:{color:S==="error"?"#ff5f56":S==="command"?"#00ff00":"#d4d4d4"},children:y}),R=async y=>{if(y.key==="Enter"&&l.trim()){let S=l.trim(),g=[...i,{type:"command",content:`${o}${S}`}];c(""),p(g);let b=await x(S);p(E=>[...E,{type:"output",content:b}]);}};return jsxs(f,{as:`--zuz-terminal --${s||m||q.Medium} flex cols ${a.className}`,onClick:()=>u.current?.focus(),children:[jsx(f,{ref:d,className:"--terminal-log",children:i.map((y,S)=>jsx(f,{children:jsx(_,{children:v(y.content,y.type)})},S))}),jsxs(f,{as:"flex aic --terminal-input",children:[jsx(_,{as:"--terminal-prompt",children:o}),jsx(fe,{ref:u,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||m||q.Medium,onChange:y=>c(y.target.value),onKeyDown:R})]})]})},cf=lf;var mf=({meta:e})=>jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsx(te,{name:e.icon,as:"--command-icon"}),jsx(_,{children:e.label})]}),pf=({position:e,onSelect:r,commands:t,visible:n})=>jsx(f,{"aria-hidden":!n,fx:{transition:Q.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsx(mf,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Za=pf;var Ua=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:i,name:p,onInput:l,cmd:c,renderDropdown:d,value:u,defaultValue:m,...h}=r,T=useRef(null),x=useRef(null),{variant:P}=j(true),{style:v,className:R,rest:y}=B(h),S=lt();p?S.errors?.[p]:null;let b=p&&S.values&&S.setFieldValue,E=b?S.values?.[p]:void 0,F=useDebounce(k=>{b&&S.setFieldValue?.(p,k);},500),{showDropdown:M,dropdownPosition:A,handleKeyDown:L,handleInput:O,handleCommandSelect:$}=useCommandActions({command:a,commands:i,cmd:c,ref:T}),Z=useCallback(()=>{let k=T.current;!k||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{k.style.height="auto";let U=k.scrollHeight;if(n){let X=parseInt(n.toString(),10);isNaN(X)||(U=Math.min(U,X));}k.style.height=`${U}px`,k.style.overflowY=n&&U>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),I=k=>{F(k.currentTarget.value),l?.(k),O(k),Z();};return useEffect(()=>{T.current&&p&&E!==void 0&&T.current.value!==String(E)&&(T.current.value=String(E));},[E,p]),useEffect(()=>{Z();},[u,m,Z]),useEffect(()=>{t&&T.current&&Z();},[t,Z]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&S.deleteFieldValue?.(p);},[]),jsxs(f,{as:"rel --flex w-full",children:[jsx("textarea",{name:p,className:`--input --textarea --${o||P||q.Medium} flex ${R}`.trim(),style:{...v,resize:s,height:t?"auto":v?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:L,onInput:I,ref:k=>{T.current=k,typeof e=="function"?e(k):e&&(e.current=k);},value:u,defaultValue:m,...y}),d?d({show:M,position:A,commands:i||[],onSelect:$}):i&&i.length>0&&jsx(Za,{visible:M,commands:i,onSelect:$,position:A})]})};Ua.displayName="Zuz.TextArea";var hf=Ua;var Xa=forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,i=useRef(null),[p,l]=useState(n||0);return useImperativeHandle(r,()=>({updateValue(c){p.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),i.current){let d=c.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((u,m)=>{let h=d[m];if(u instanceof HTMLElement){u.setAttribute("data-value",h);let T=u.querySelector(".--wheel-char-track");T instanceof HTMLElement&&(T.style.setProperty("--v",h),T.offsetWidth);}});}}})),useEffect(()=>{l(n||0);},[n]),jsxs(f,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(p||0).toString().split("").map((c,d)=>isNaN(parseInt(c,10))?jsx(ce,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${d}`):jsx(ce,{"data-value":c,className:`--wheel-char grid ${d>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(ce,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsx(ce,{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((u,m)=>jsx(ce,{children:u},`${d}--${m}`)),jsx(ce,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsx(f,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Xa.displayName="Zuz.TextWheel";var Cf=Xa;var Or=forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:i,selected:p,roots:l,expanded:c,...d}=e,{tag:u,label:m,icon:h,under:T,isHead:x}=n,P=useMemo(()=>l.includes(u),[l]),[v,R]=useState(c),y=()=>{localStorage.setItem(`--tn${i}-${u}`,v?"0":"1"),R(!v);};useEffect(()=>{c||P&&!localStorage.getItem(`--tn${i}-${u}`)?(localStorage.setItem(`--tn${i}-${u}`,"1"),R(true)):R(localStorage.getItem(`--tn${i}-${u}`)=="1");},[]);let S=useMemo(()=>o.filter(g=>g.under==u),[o,u]);return jsxs(f,{className:`--treenode ${P?"--is-root":""} --treenode-${u} flex cols`,children:[jsxs(f,{className:`--node --node-${u} flex aic ${p==u?" --selected":""}`,children:[jsx(K,{skeleton:d.skeleton,onClick:y,className:"--node-aro-btn",disabled:S.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(te,{skeleton:d.skeleton,className:"--node-aro-icon",name:S.length==0?s?.arrowDisabled||s?.arrowClose:v?s?.arrowOpen:s?.arrowClose}):S.length==0?V.chevronBottom:v?V.chevronBottom:V.chevronRight}),jsxs(K,{className:"--node-meta flex aic",onClick:g=>a(u),children:[(s?.nodeOpen&&s?.nodeClose||P&&s?.rootOpen&&s?.rootClose)&&jsx(te,{skeleton:d.skeleton,className:`--node-icon ${P?"--icon-root":""}`,name:h||(v?P&&s?.rootOpen||s.nodeOpen:P&&s?.rootClose||s?.nodeClose)}),jsx(_,{className:`--node-label ${P?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),v&&S.length>0&&jsx(f,{className:`--sub-node tree-sub-node-${u} flex cols`,children:S.map(g=>jsx(Or,{treeTag:i,selected:p,onSelect:a,icons:s,roots:l,expanded:g.expanded||false,meta:g,nodes:o},`--node-${g.tag}`))})]})});Or.displayName="TreeItem";var ja=Or;var Ja=forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:i,selected:p,...l}=e,[c,d]=useState(p);useImperativeHandle(r,()=>({getSelected:()=>c}),[o]);let u=m=>{d(m),o&&o(m);};return useEffect(()=>{c!=p&&d(p);},[p]),jsx(f,{className:"--treeview flex cols",children:n.filter(m=>i.includes(m.tag)).map(m=>jsx(ja,{treeTag:s?`-${s}`:"",selected:c,onSelect:h=>u(h),icons:a,meta:m,roots:i,expanded:m.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${m.tag}`))})});Ja.displayName="Zuz.TreeView";var kf=Ja;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
13
|
-
export{
|
|
12
|
+
</div>`}).join("")},[t,y]);return jsxs(f,{as:`--code-block rel ${d}`,style:u,...l,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:R}})}),n&&jsx(K,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},up=pp;var As=({onSelect:e,meta:o,selected:t,disabled:n=false})=>{let r=useRef(null),{index:s,icon:a,label:i}=o,[p,l]=useState({x:0,width:0}),c=useDelayed();return useLayoutEffect(()=>{if(c&&r.current){let{width:d,x:u}=r.current.getBoundingClientRect();l({x:u,width:d}),t&&e(s,d,u,o,true);}},[c,r.current]),useEffect(()=>{t&&e(s,p.width,p.x,o,false);},[t]),jsxs(K,{disabled:n,onClick:()=>e(s,p.width,p.x,o,false),ref:r,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(te,{name:a,as:"--segment-icon"}):jsx(f,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsx(f,{className:"--segment-label",children:i||`Item ${s}`})]})};As.displayName="SelectTabItem";var $s=As;var zs=forwardRef((e,o)=>{let{fx:t,items:n,selected:r,variant:s,disabled:a=false,onSwitch:i,...p}=e,[l,c]=useState(r||0),d=useDelayed(50),u=useRef(l),{className:m,style:y,rest:R}=O(p),x=useRef(null),C=useRef(null),{variant:v}=j(true),S=(h,w,g,b,I)=>{if((I||l!=h&&l!=-2)&&(c(h),u.current=l,queueMicrotask(()=>{d&&i?.(b);})),x.current){let B=C.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${w}px`),x.current.style.setProperty("--x",`${B?g-B.left:g}px`);}};return useImperativeHandle(o,()=>({setSelected:h=>{typeof h=="number"&&h!=l&&c(h);}}),[l]),jsxs(f,{ref:C,"data-selected":l,className:`${m} --segmented --${s||v||q.Medium} flex aic rel`,style:y,...R,children:[jsx(f,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((h,w)=>jsx($s,{disabled:a,onSelect:S,selected:l==w,meta:{...h,index:w}},`segment-${h.label}-${w}`))]})});zs.displayName="Zuz.SelectTabs";var zt=zs;var Ks=forwardRef((e,o)=>{let{type:t,variant:n,...r}=e,s=useDelayed(),{colorScheme:a,setColorScheme:i}=Fo(),p=useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:l}=j(true),{className:c,style:d}=O(r),u=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:A.colorSchemeLight},{tag:"system",index:1,label:"",icon:A.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:A.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:A.colorSchemeLight},{tag:"dark",index:2,label:"",icon:A.colorSchemeDark}],[]),m=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsx(zt,{className:`--color-scheme --${t}`,onSwitch:({tag:y})=>{i(y);},selected:m,items:u,...r}):jsx(K,{onClick:p,style:d,variant:n,as:`--color-scheme-switch ${c}`.trim(),children:a=="system"?A.colorSchemeSystem:a=="light"?A.colorSchemeLight:A.colorSchemeDark})});Ks.displayName="Zuz.ColorScheme";var Ep=Ks;var Gs=forwardRef((e,o)=>{let[t,n]=useState("wait"),{title:r,message:s,acceptLabel:a,rejectLabel:i,position:p}=e,l=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxs(f,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:oe.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${p||ve.Left} flex cols`,children:[jsx(z,{as:"--title",children:r||"This site uses cookies"}),jsx(z,{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"}),jsxs(f,{as:"--footer flex aic",children:[jsx(K,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsx(K,{onClick:c=>l(0),as:"--reject",children:i||"Cancel"})]})]})});Gs.displayName="Zuz.CookiesConsent";var Lp=Gs;var Us=({ref:e,...o})=>{let {type:t,value:n=0,min:r=0,max:s=1,step:a=.01,onChange:i,showGhostBar:p,showKnobOnHover:l,showToolTip:c,roundValue:d,formatValue:u,...m}=o,{className:y,style:R,rest:x}=O(m),C=useRef(a||.01).current,v=useRef(r||0).current,S=useRef(s||1).current,h=useRef(n||0).current,w=useRef(null),g=useRef(null),b=useRef(null),I=useRef(null);useRef(null);let E=useRef(null),V=useRef(null),k=useRef(null),D=useRef(null),$=(se,ne,he)=>(se-ne)/(he-ne)*100,_=se=>{if(g.current){let ne=parseFloat(se.currentTarget.value);re(ne);let he=$(ne,parseFloat(se.currentTarget.min),parseFloat(se.currentTarget.max));g.current.style.setProperty("--value",`${he}`),g.current.setAttribute("data-value",`${ne}`),i&&i(d?+ne.toFixed(2):ne);}},[N,L]=useState(false),[U,X]=useState(0),[F,Z]=useState(0),[G,W]=useState(false),re=async se=>{let ne=u?u(+se):d?(+se).toFixed(2):Math.round(+se);k.current&&(k.current.textContent=String(ne));},ce=se=>{if(N){let ne=se.clientX-U,he=S-v,Te=ne/200*he,ye=Math.max(v,Math.min(F+Te,S));if(ye=Math.round(ye/C)*C,re(ye),g.current){let Oe=$(ye,v,S);g.current.style.setProperty("--value",`${Oe}`),g.current.setAttribute("data-value",`${ye}`),V.current&&(V.current.textContent=d?ye.toFixed(2):ye.toString()),i&&i(ye);}}},me=()=>{L(false),document.body.style.cursor="auto";},Ce=se=>(se-v)/(S-v)*100,le=se=>{if(!g.current)return;let ne=g.current.getBoundingClientRect(),he=se.clientX-ne.left,Ae=Math.max(0,Math.min(100,he/ne.width*100));if(c&&k.current){let Te=w.current?+w.current.value:n;re(Te*100);}if(p){let Te=Ce(w.current?+w.current.value:n),ye=Math.min(Te,Ae),Oe=Math.abs(Ae-Te);g.current.style.setProperty("--ghost-start",`${ye}`),g.current.style.setProperty("--ghost-width",`${Oe}`);}};useEffect(()=>{g.current&&g.current.style.setProperty("--value",w.current?`${$(parseFloat(w.current.value),parseFloat(w.current.min),parseFloat(w.current.max))}`:h.toString());},[]),useEffect(()=>(N?(document.addEventListener("mousemove",ce),document.addEventListener("mouseup",me)):(document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",me)),()=>{document.removeEventListener("mousemove",ce),document.removeEventListener("mouseup",me);}),[N]),useEffect(()=>{let se=$(n,v,S);g.current?.style.setProperty("--value",`${se}`),re(n);},[n,v,S,k.current]);let Y=()=>jsxs(f,{ref:g,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:le,className:`--slider --${t||Mo.Default} ${l?"--knob-hover":""} flex rel ${y}`.trim(),style:{...R},children:[jsx(f,{ref:E,className:"--slider-track abs fill"}),p&&jsx(f,{ref:I,className:"--slider-ghost abs fill"}),jsx(f,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(f,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(fe,{ref:w,onInput:_,className:"abs fill",tabIndex:0,type:t||Mo.Default,defaultValue:h||0,step:C,max:S,min:v})]});if(c===true){let se=u?u(n):d?n.toFixed(2):n;return jsx(Pt,{ref:D,show:N,position:vt.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(ie,{ref:k,children:se}),children:Y()})}return Y()};Us.displayName="Zuz.Slider";var mt=Us;var Xs=forwardRef((e,o)=>{let{src:t,shape:n,size:r,...s}=e,{style:a,className:i,rest:p}=O(s),{canvasRef:l,crop:c,setScale:d,handleMouseDown:u,handleMouseUp:m,handleMouseMove:y}=useImageCropper(t,r||200,n||CropShape.Circle);return useImperativeHandle(o,()=>({getCropped(){return c()},setScale(R){d(R);}})),jsxs(f,{as:`--cropper --${n||CropShape.Circle} ${i}`,style:a,...p,children:[jsx("canvas",{ref:l,width:r||200,height:r||200,onMouseDown:u,onMouseUp:m,onMouseLeave:m,onMouseMove:y}),jsx(f,{as:"--cropper-slider",children:jsx(mt,{onChange:R=>d(R),min:0,max:1,step:.01,value:1})})]})});Xs.displayName="Zuz.Cropper";var Hp=Xs;var $p=(t=>(t.Circle="circle",t.Square="square",t))($p||{});var js=forwardRef((e,o)=>{let{items:t,maxItems:n}=e,r=useMemo(()=>{let i=typeof t=="string",p=i?[]:t;return i&&t.split(",").forEach(l=>{p.push({label:l});}),p},[t]),a=useMemo(()=>n&&n>0&&r.length>n-1,[r,n])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-n)]:r;return jsx(_e,{ref:o,className:"--crumb flex aic",direction:"rows",seperator:jsx(f,{as:"--crumb-chevron",children:A.chevronRightOutline}),items:a.map((i,p,l)=>i.ID=="."?jsx(f,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(f,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${p}`))}):jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[p+1],children:[i.icon&&jsx(te,{as:"--crumb-icon",name:i.icon}),jsx(z,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});js.displayName="Zuz.Crumb";var zp=js;var ea=forwardRef((e,o)=>{let{icon:t,defaultValue:n,value:r,size:s,variant:a,numeric:i,type:p,onConfirm:l,...c}=e,[d,u]=useState(false),[m,y]=useState(n||null),{style:R,className:x,rest:C}=O(c),v=useRef(null),S=useRef(null),{reposition:h}=Mt(S,{direction:ve.Bottom,offset:2}),w=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=I=>{let B=I.target,E=v.current?.contains(B),V=S.current?.contains(B);!E&&!V&&u(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=I=>{I.key==="Escape"&&d&&(u(false),v.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let g=()=>{u(true);};return useEffect(()=>{d&&h();},[d,h]),jsx(Fragment$1,{children:jsxs(f,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":m?m.toISOString():"",children:[t?typeof t=="string"?jsx(te,{as:"mr:10 c:#666",name:t}):t:jsx(ie,{as:"--date-picker-icon flex aic jcc",children:A.calendar}),jsx("input",{ref:v,value:m?format(m,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:R,onFocus:g,onInput:w,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&l?.(b.currentTarget.value);},...C}),jsx(f,{"aria-hidden":!d,ref:S,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsx(xr,{defaultValue:m,onChange:b=>{y(b),u(false);}})})]})})});ea.displayName="Zuz.DatePicker";var Wp=ea;var ta=forwardRef((e,o)=>{let{icon:t,variant:n,position:r}=e;return jsx(K,{className:`--fab fixed --${n||q.Large} --${r||"bottomright"}`,children:t||A.plus})});ta.displayName="Zuz.Fab";var Xp=ta;var jp=({ref:e,children:o,...t})=>{let{legend:n,legendPlacement:r,variant:s,...a}=t,{variant:i}=j(true),{className:p,style:l,rest:c}=O(a);return jsxs(f,{as:`--fieldset --rel --flex --${s||i||q.Medium} ${p}`.trim(),style:l,children:[jsx(f,{as:`--legend --abs --${r||"top-start"}`,children:n&&typeof n=="string"?jsx("legend",{children:n}):n}),o]})},Qp=jp;var ra=e=>{let{names:o,strength:t}=e,n={[qt.Gooey]:r=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||10,result:"blur"}),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"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${qt.Gooey}`)};return useEffect(()=>{},[o]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(o||[qt.Gooey]).map(r=>n[r](t))})})};ra.displayName="Zuz.Filters";var tu=ra;var na=e=>typeof e=="number"?`repeat(${e}, 1fr)`:e,ru=e=>e==="between"?"space-between":e==="around"?"space-around":e,sa=e=>{let{ref:o,cols:t,rows:n,columns:r,gap:s,gapX:a,gapY:i,columnGap:p,rowGap:l,align:c,alignItems:d,justify:u,justifyContent:m,inline:y,flow:R,autoFlow:x,autoCols:C,autoRows:v,autoColumns:S,autoRow:h,template:w,areas:g,...b}=e,{className:I,style:B,rest:E}=O(b),V=r??t,k=p??a??s,D=l??i??s,$=d??c,_=m??u,N=x??R,L=S??C,U=h??v,X=g??w,F={...y?{display:"inline-grid"}:{},gridTemplateColumns:na(V),gridTemplateRows:na(n),columnGap:k,rowGap:D,alignItems:$,justifyContent:ru(_),gridAutoFlow:N,gridAutoColumns:L,gridAutoRows:U,gridTemplateAreas:X,...B};return jsx(f,{ref:o,className:["--grid",I].filter(Boolean).join(" "),style:F,...E})};sa.displayName="Zuz.Grid";var nu=sa;var aa=e=>typeof e=="string"&&e.includes("+"),ia={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"},la={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 ma=forwardRef(({children:e,keys:o,as:t,className:n,variant:r},s)=>{let{variant:a}=j(true),i=useMemo(()=>{if(aa(o)){let p=null;return {keys:String(o).split("+").reduce((c,d,u,m)=>(m[u+1]?c.push(d):p=d.toUpperCase(),c),[]),children:p}}return {keys:o,children:String(e).toUpperCase()}},[o]);return jsxs(f,{as:`--keyboard-keys --${r||a||q.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(p=>jsx("abbr",{title:la[p],children:ia[p]},p)),jsx(ie,{children:i?.children??e})]})});ma.displayName="Zuz.KeyboardKeys";var Lr=ma;var fa=createContext(null),ft=()=>{let e=useContext(fa);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},uu=({ref:e,icons:o,children:t,...n})=>{let{playlist:r=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:p,onTrackChange:l,...c}=n,{className:d,style:u,rest:m}=O(c),y=useMediaPlayer(r,r[0]??void 0),R=useMemo(()=>({play:A.play,pause:A.pause,prev:A.prev,next:A.next,volumeHigh:A.volumeHigh,volumeMute:A.volumeMute,...o}),[o]),x=useMemo(()=>({...y,mode:s,icons:R}),[y,R]);return jsx(fa.Provider,{value:x,children:jsx(f,{className:`--zuz-media-player ${d}`,style:u,children:t})})},da=uu;var ga=e=>{if(!e||isNaN(e))return "0:00";let o=Math.floor(e/60),t=Math.floor(e%60);return `${o}:${t.toString().padStart(2,"0")}`},vo=e=>typeof e=="string"?jsx(te,{name:e}):e,ha=()=>{let{mediaRef:e,state:o,controls:t,mode:n}=ft();return jsxs(f,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),o.isLoading&&jsx(f,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Re,{})})]})},ya=()=>{let{state:e,defaultArtist:o,defaultTitle:t,defaultCover:n}=ft();return jsxs(f,{as:"--track-info flex aic",children:[jsx(Dt,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(f,{as:"flex cols",children:[jsx(f,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(f,{as:"--track-artist",children:e.currentItem?.artist||o||"..."})]})]})},xa=()=>{let{state:e,controls:o,icons:t}=ft();return jsxs(f,{as:"--mediaplayer-controls flex aic",children:[jsx(K,{onClick:o.prev,as:"--prev",children:vo(t?.prev??A.prev)}),jsx(K,{onClick:o.togglePlay,as:"--play-pause",children:vo(e.isPlaying?t?.pause??A.pause:t?.play??A.play)}),jsx(K,{onClick:o.next,as:"--next",children:vo(t?.next??A.next)})]})},ba=()=>{let{state:e,controls:o,mediaRef:t}=ft(),n=e.progress*(e.duration||0);return jsxs(f,{as:"--track-progress flex aic",children:[jsx(f,{as:"--track-current-duration",children:ga(n)}),jsx(mt,{value:e.progress,onClick:r=>{let s=r.currentTarget.getBoundingClientRect(),a=(r.clientX-s.left)/s.width;o.seek(a);}}),jsx(f,{as:"--track-total-duration",children:ga(e.duration)})]})},va=()=>{let{state:e,controls:o,icons:t}=ft();return jsxs(f,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(K,{onClick:()=>o.setIsMuted(),children:vo(e.isMuted?t?.volumeMute??A.volumeMute:t?.volumeHigh??A.volumeHigh)}),jsx(mt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let r=n.currentTarget.getBoundingClientRect();o.setVolume((n.clientX-r.left)/r.width);}})]})};var fu=Object.assign(da,{Stage:ha,TrackInfo:ya,Controls:xa,Progress:ba,Volume:va}),du=fu;var wa=forwardRef((e,o)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:r,variant:s}=e;return jsxs(f,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:oe.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||q.Small} fixed flex`,children:[jsx(f,{className:"--ico",children:t?A[Le.Success]:A[Le.Error]}),jsx(z,{as:"--message",children:t?n||"internet connection restored :)":r||"no internet connection"})]})});wa.displayName="Zuz.NetWorkManager";var yu=wa;var Ta=forwardRef((e,o)=>{let{strenthMeter:t,onChange:n,...r}=e;"type"in r&&delete r.type;let{style:s,className:a,rest:i}=O(r),[p,l]=useState(false),[c,d]=useState(""),u=useMemo(()=>checkPasswordStrength(c),[c]),m=useDebounce(y=>{t&&d(y.target.value),n&&n(y);},100);return useEffect(()=>{},[]),jsxs(f,{as:"w:100% flex cols",children:[jsxs(f,{style:s,className:"--password flex aic rel",children:[jsx(fe,{ref:o,type:p?"text":"password",className:a,onChange:m,...i}),jsx(K,{tabIndex:-1,onClick:()=>l(y=>!y),className:"--toggle flex aic jcc abs",children:p?A.eye:A.eyeSlash})]}),t&&jsxs(f,{as:`flex aic --password-meter --pb-score-${u.score}`,style:s,children:[jsxs(f,{as:"--password-bars flex aic",children:[jsx(f,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsx(f,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsx(z,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});Ta.displayName="Zuz.Password";var Tu=Ta;var Ra=forwardRef((e,o)=>{let{size:t,length:n,mask:r,...s}=e,a=useRef([]),i="pinput",p=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:c}=O(s),d=m=>{let y=m.currentTarget,R=a.current[parseInt(y.dataset.index)+1],x=a.current[parseInt(y.dataset.index)-1];y.value.length===1&&R?R.focus():y.value.length===0&&x&&x.focus();},{variant:u}=j(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(f,{name:i,style:c,className:`--otp --${s.variant??u??q.Medium} flex aic rel`,"data-required":p,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((m,y)=>jsx(fe,{autoComplete:"new-password","data-index":y,ref:R=>{a.current[y]=R;},numeric:true,onChange:d,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...s},`pin-${y}`))})});Ra.displayName="Zuz.PinInput";var Eu=Ra;var Ia=forwardRef((e,o)=>{let{children:t,className:n,name:r,required:s,type:a,value:i,variant:p,checked:l,onSwitch:c,...d}=e,[u,m]=useState(l||false),{variant:y}=j(true),R=useRef(null);return jsxs($t,{className:`${n} --${(a||Oo.Default).toLowerCase()} --radio${!a||a==Oo.Default?"":"card"} --${p||y||q.Small} flex aic rel`.trim(),...d,children:[jsx(fe,{ref:R,defaultChecked:u,value:i||"rd",type:"radio",className:"abs",name:r,required:s||false,onChange:x=>{c&&c(x.target.checked,i||"cb"),m(x.target.checked);}}),jsx(f,{className:"--dot rel",children:jsx(f,{className:"--rod abs abc"})}),jsx(f,{className:"--value",children:t})]})});Ia.displayName="Zuz.Radio";var Lu=Ia;var Ea=forwardRef((e,o)=>{let{fx:t,withStyle:n,as:r,reverse:s=false,searchIcon:a=A.search,hideSearchIcon:i=false,clearIcon:p=A.close,hideClearIcon:l=false,onChange:c,onClear:d,...u}=e,{style:m,className:y}=O({as:e.as}),[R,x]=useState(""),{variant:C}=j(true),v=useRef(null);"type"in e&&delete e.type;let S=g=>{x(g.target.value),c?.(g.target.value);},h=g=>{R.trim()!==""&&(x(""),c?.(""),v.current&&(v.current.value="",e.onConfirm?.("")));};useImperativeHandle(o,()=>({focus:()=>v.current?.focus(),value:()=>v.current?.value})),useEffect(()=>{},[]);let w=jsx(K,{tabIndex:-1,onClick:g=>h(),className:"--send flex aic jcc",variant:e.variant||q.Medium,children:R!==""?!l&&(typeof p=="string"?jsx(te,{name:p,as:"--search-action"}):p):!i&&(typeof a=="string"?jsx(te,{name:a,as:"--search-action"}):a)});return jsxs(f,{style:m,className:`--search --no-shrink --${e.variant||C||q.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[s&&w,jsx(fe,{ref:v,onChange:S,...u}),e.shortcut&&jsx(Lr,{keys:e.shortcut,as:"--abs"}),!s&&w]})});Ea.displayName="Zuz.Search";var Mr=Ea;var Fu=({label:e,icon:o})=>jsxs(f,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[o&&jsx(te,{name:o}),jsx(z,{as:"--select-group-label",children:e})]}),Ba=Fu;var La=({checkIcon:e,selected:o,updateValue:t,o:n})=>{let r=e?typeof e=="string"?jsx(te,{name:"checkIcon"}):e:A.check,s=n.disabled===true;return jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${o?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(de,{as:"--option-item-meta --aic",children:[n.icon&&jsx(te,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(z,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),o&&jsx(de,{aic:true,jcc:true,as:"--select-option-check --abs",children:r})]})};La.displayName="Option";var Ma=La;var Da=(({ref:e,...o})=>{let{selected:t,options:n,label:r,name:s,variant:a,search:i,searchPlaceholder:p,maxHeight:l,arrowDownIcon:c=A.arrowDown,arrowUpIcon:d=A.arrowUp,expanded:u,multiple:m,tokenizer:y,wrapTokens:R,disabled:x,checkIcon:C,closeIcon:v,editable:S,editablePlaceholder:h,onChange:w,required:g,with:b,...I}=o,B=It(),E=!!(s&&B?.setFieldValue),V=Bn(s),k=Nn(s),D=S===true&&m!==true&&y!==true,$=M=>typeof M=="string"||typeof M=="number",_=M=>typeof M=="object"&&M!==null&&!Array.isArray(M)&&"value"in M&&"label"in M,N=M=>n.find(ee=>String(ee.value)===String(M)),L=M=>{if(M==null)return null;if(D&&M==="")return "";if(m||y)return (Array.isArray(M)?M:[M]).map(ge=>$(ge)?N(ge):ge).filter(ge=>_(ge));if($(M)){let ee=N(M);return ee||(D?String(M):null)}return _(M)?M:null},U=()=>{if(t!==void 0)return L(t);let M=n.find(ee=>String(ee.value)==="-1");return M||(D?"":null)},X=M=>Array.isArray(M)?M.map(ee=>ee.value):_(M)?M.value:M,[F,Z]=useState(()=>U()),[G,W]=useState(false),[re,J]=useState(null),ce=useRef(null),me=useRef(null),Ce=useRef(null),le=useId(),pe=useMemo(()=>s||le,[s,le]),{reposition:Y}=Mt(Ce,{direction:vt.Bottom,offset:2}),{variant:se}=j(true),ne=v?typeof v=="string"?jsx(te,{name:v}):v:A.close,{className:he,style:Ae,rest:Te}=O(I,void 0),{onClick:ye,...Oe}=Te||{},ae=useMemo(()=>k!==void 0?L(k):F,[k,F,n,D,m,y]),be=useMemo(()=>{if(!(!ae||Array.isArray(ae)||!_(ae)))return ae},[ae]),Wt=useMemo(()=>D?_(ae)?String(ae.value??""):$(ae)?String(ae):"":"",[D,ae]),Gt=M=>Array.isArray(ae)?ae.some(ee=>ee.value===M.value):_(ae)?ae.value===M.value:D&&$(ae)?String(ae)===String(M.value):false,$e=M=>{if(E&&B?.setFieldValue&&s){B.setFieldValue(s,X(M));return}Z(M);},De=M=>{w?.(S===true&&M instanceof Option?String(M.value):M);},No=M=>{if(!(x||M.disabled)){if(m||y){let ee=Array.isArray(ae)?ae:[],Be=ee.find(Bo=>Bo.value===M.value)?ee.filter(Bo=>Bo.value!==M.value):[...ee,M];$e(Be),De(Be);return}$e(M),W(false),De(M);}},ci=M=>{let ee=M.target.value,ge=ee===""?null:N(ee),Be=ge?ge.value:ee;$e(Be),De(Be);},mi=M=>{if(M.key==="Enter"&&(M.preventDefault(),D)){let ee=M.currentTarget.value.trim();if(!ee){W(false);return}let Be=N(ee)??ee;$e(Be),De(Be),W(false);}},pi=(M,ee)=>{if(M.stopPropagation(),x)return;let ge=ae.filter(Be=>Be.value!==ee.value);$e(ge),W(false),De(ge);},ui=M=>{let ee=M.currentTarget,ge=ee.scrollTop===0&&M.deltaY<0,Be=ee.scrollHeight-ee.scrollTop===ee.clientHeight&&M.deltaY>0;!ge&&!Be||M.preventDefault(),M.stopPropagation();};useImperativeHandle(e,()=>({setSelected:M=>{$e(L(M));},getValue:()=>ae??null}),[ae,n,D,m,y,E,s]),useEffect(()=>{E||t===void 0||Z(L(t));},[t,E,n,D,m,y]),useEffect(()=>{if(!G)return;let M=()=>{Y();};return window.addEventListener("scroll",M,true),window.addEventListener("resize",Y),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",Y);}},[G,Y]),useEffect(()=>{if(!G){me.current&&(me.current.value=""),J(null);return}me.current?.focus(),Y();let M=ge=>{ce.current&&!ce.current.contains(ge.target)&&W(false);},ee=setTimeout(()=>{document.addEventListener("click",M);},0);return ()=>{clearTimeout(ee),document.removeEventListener("click",M);}},[G,Y]);let fi=useDebounce(M=>J(M===""?null:M),300),di=useDebounce(ci,300);return jsxs(f,{ref:ce,"data-required":g?"true":void 0,with:b,className:[`--select ${u==true?"--expanded":""}`,`--${a||se}`,`${s?`--${s}`:""}`,`${V?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:pe,children:[D?jsxs(f,{"data-value":be?.value??(Wt||"-1"),className:`--select-display --selected --editable flex aic rel ${he}`.trim(),style:Ae,onClick:M=>M.stopPropagation(),...Oe,children:[be?.icon&&jsx(te,{as:"--selected-icon",name:be.icon}),jsx(de,{aic:true,as:"--label-wrapper",children:jsx(fe,{"aria-expanded":G,className:"--select-input",disabled:x,onChange:di,onClick:M=>{M.stopPropagation(),x||W(true);},onKeyDown:mi,placeholder:h||r||"Choose",type:"text",defaultValue:Wt})}),jsx(K,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:M=>{M.stopPropagation(),x||W(ee=>!ee);},tabIndex:-1,withLabel:false,children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}):jsxs(K,{disabled:x,variant:a||se,"data-value":be?.value??"-1",className:`--select-display --selected flex aic rel ${he}`.trim(),withLabel:false,style:Ae,onClick:M=>{M.stopPropagation(),x||W(ee=>!ee);},...Oe,children:[be?.icon&&jsx(te,{as:"--selected-icon",name:be.icon}),jsx(de,{aic:true,as:"--label-wrapper",children:y&&Array.isArray(ae)&&ae.length>0?jsxs(de,{as:`--tokens-wrap${R===true?" --wrap":""}`,children:[ae.map(M=>jsxs(de,{aic:true,as:"--token",children:[jsx(z,{as:"--token-label",children:M.label}),jsx(f,{as:"--token-remove",onClick:ee=>pi(ee,M),children:ne})]},M.value)),ae.length<n.length&&jsx(z,{as:"--label",children:r||"Choose"})]}):jsx(z,{as:"--label",children:Array.isArray(ae)?ae.length>0?`${ae.length} selected`:r||"Choose":be?.label||r||"Choose"})}),jsx(f,{className:"--svg-arrow rel flex aic jcc",children:G?typeof d=="string"?jsx(te,{name:d,as:"--search-action"}):d:typeof c=="string"?jsx(te,{name:c,as:"--search-action"}):c})]}),jsxs(f,{id:pe,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!G,onWheel:ui,style:{maxHeight:l||"auto"},ref:Ce,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:G,duration:.05},children:[i&&jsx(f,{as:"--select-search --no-shrink flex --sticky",children:jsx(Mr,{ref:me,variant:q.Small,placeholder:p||"Search...",onChange:fi})}),r&&jsx(Ba,{label:r}),n?.filter(M=>!re||M.label.toLowerCase().includes(re.toLowerCase()))?.map(M=>jsx(Ma,{updateValue:No,checkIcon:C,selected:Gt(M),o:M},`option-${M.label.replace(/\s+/g,"-")}-${M.value}`))]})]})});Da.displayName="Zuz.Select";var Ku=Da;var Va=({ref:e,...o})=>jsx(Ft,{type:Ke.Switch,...o,ref:e});Va.displayName="Zuz.Switch";var Wu=Va;var Aa=e=>{let{idx:o,id:t,as:n,weight:r,style:s,value:a,render:i,resize:p,sortBy:l,sortable:c,onSort:d}=e,[u,m]=useState(0),y=()=>{c&&(d?.(String(t),u==1?-1:1),m(R=>R==1?-1:1));};return jsxs(f,{style:{flex:r||1,...s},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:y,children:[jsx(f,{as:"--colv",children:a}),o==-1&&c&&l==t&&jsx(f,{as:"--arrow flex aib",children:u==1?A.arrowUp:A.arrowDown})]})};Aa.displayName="Zuz.Column";var Po=Aa;var Fa=e=>{let{index:o,pubsub:t,schema:n,data:r,ids:s,styles:a,animate:i,sortBy:p,selectable:l,tableRef:c,loading:d,rowClassName:u,onSort:m,onRowClick:y,onSelect:R,onContextMenu:x}=e,C=useDelayed(),v=useMemo(()=>({transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(o+1)}),[]),S=useRef(null),h=(g,b)=>{o==-1?t.emit(`ALL_ROWS_${g?"CHECKED":"UNCHECKED"}`,g):(R&&R(r,g),t.emit(`ROW_${g?"CHECKED":"UNCHECKED"}`,g,b));},w=(g,b,I)=>jsx(Po,{idx:g,id:b,as:"--selector",pubsub:t,value:jsx(Ft,{value:I,ref:S,onSwitch:h,type:Ke.Default})});return useEffect(()=>{let g=(E,V)=>{S.current?.setChecked(E,false);},b=(E,V)=>{let k=false;c?.current&&c.current.querySelectorAll(".--row").forEach(D=>{let $=D;if(!$.classList.contains("--row-head")){let _=$.querySelector(".--selector input[type=checkbox]");_&&_.checked&&!k&&(k=_.checked);}}),S.current.setChecked(k,false);},I=E=>{S.current?.setChecked(E,false),R&&R(r,E);},B=E=>{S.current?.setChecked(E,false),R&&R(r,E);};return o==-1?(t.on("ROW_CHECKED",g),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",g),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",B),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",B);})},[]),jsxs(f,{onContextMenu:g=>x?x(g,r):null,onClick:g=>y?y(g,e.data):()=>{},...i?{fx:{...v,when:C}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${o==-1?"--row-head":""} ${u||""}`,children:[o==-1&&n.map((g,b)=>{let{renderWhenHeader:I,render:B,value:E,...V}=g;return jsxs(Fragment,{children:[l&&b==0&&w(-1,`--selector-${g.id}`,"all"),jsx(Po,{idx:-1,onSort:m,sortBy:p,value:E,...V,pubsub:t,style:a[g.id]})]},`--col-${g.id}`)}),d&&o>-1&&jsx(f,{as:"--col",children:jsx(z,{as:"opacity:0",children:"..."})}),!d&&o>-1&&s&&r&&n.map((g,b)=>jsxs(Fragment,{children:[l&&b==0&&w(b,`--selector-${g.id}`,g.id.toString()),s.includes(String(g.id))?jsx(Po,{pubsub:t,idx:b,id:String(g.id),style:a[String(g.id)],value:g.render?g.render(r,o):r[String(g.id).includes(".")?String(g.id).split(".").reverse()[0]:g.id]}):null]},`--${String(g.id)}-val-${b}`))]})};Fa.displayName="Zuz.Row";var Ro=Fa;var Ka=(e,o)=>{let{schema:t,rows:n,rowCount:r,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:p,showPaginationOnZeroPageCount:l,animateRows:c,header:d,rowClassName:u,selectableRows:m,hoverable:y,sortBy:R,loading:x,loadingRowCount:C,loadingMessage:v,spinner:S,emptyMessage:h,onSort:w,onRowClick:g,onRowSelectToggle:b,onPageChange:I,onRowContextMenu:B,...E}=e,V=useRef(null),k=useMemo(()=>t.reduce((pe,Y)=>(pe[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},pe),{}),[t]),D=useMemo(()=>Object.keys(k),[t]),$=useMemo(()=>d??true,[d]),{style:_,className:N,rest:L}=O(E),U=useRef(null),X=useMemo(()=>new PubSub,[]),F=useRef(n.map(()=>uuid(8))),[Z,G]=useState(R||null),[W,re]=useState(v||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),ce=useCallback(()=>h?typeof h=="function"?jsx(h,{}):h:jsx(z,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!F.current&&(F.current=n.map(()=>uuid(8)));},[n]);let me=(pe,Y)=>{G(pe),w?.(pe,Y);},Ce=(r||(n?n.length:0))/(s||10),le=useMemo(()=>l||Ce>1?jsx(Ht,{hash:p,ref:V,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:r||(n?n.length:0),itemsPerPage:s||10}):null,[a,r]);return useImperativeHandle(o,()=>({setLoading(pe){}})),jsxs(f,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${N}`,ref:U,children:[$==true&&jsx(Ro,{sortBy:Z,onSort:me,tableRef:U,pubsub:X,selectable:m,index:-1,schema:t,loading:true,styles:k}),x&&jsxs(f,{as:"center-x flex aic --table-spinner",children:[jsx(Re,{type:S||we.Simple}),W&&jsx(z,{as:"--table-loading-message",children:W})]}),x&&Array(C||5).fill({}).map((pe,Y)=>jsx(Ro,{tableRef:U,index:Y,pubsub:X,schema:t,styles:k,loading:true,animate:c,onRowClick:g},`--trow-loading-${Y}-${t[0].id}`)),!x&&n&&n.map((pe,Y)=>jsx(Ro,{tableRef:U,pubsub:X,loading:false,index:Y,schema:t,ids:D,styles:k,animate:c,data:pe,onRowClick:g,rowClassName:u,selectable:m,onSelect:b,onContextMenu:B},`--trow-${F.current[Y]||Y}-${t[0].id}`)),J&&ce(),i&&le&&jsx(f,{"aria-hidden":!i||!le,...c?{fx:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&le!=null}}:{},as:"--row flex aic --row-footer",children:le})]})};Ka.displayName="Zuz.Table";var nf=forwardRef(Ka),sf=nf;var lf=({ref:e,...o})=>{let{title:t,items:n}=o,[r,s]=useState(0),a=(i,p,l)=>{i.preventDefault(),s(p),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxs(f,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(z,{as:"--toc-title",children:t}),jsx(_e,{items:n.map((i,p)=>jsx("a",{className:r==p?"--toc-active":"",style:{anchorName:r===p?"--toc-active":"none",color:r==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,p,i.tag),href:`#${i.tag}`,children:i.label}))})]})},cf=lf;var Wa=({isActive:e,transitionType:o,speed:t,width:n,render:r,content:s,onHeightChange:a})=>{let i=useRef(null),p=useResizeObserver(i);useEffect(()=>{e&&p.height>0&&a(p.height);},[e,p.height]);let c=useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return o==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:o==="scale"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:d},[e,o,n,t]);return jsx(f,{ref:i,style:{...c},className:"--content",children:r||e?s:null})};Wa.displayName="Zuz.TabBody";var Ga=Wa;var Xa=({ref:e,...o})=>{let{tabs:t,speed:n=.3,prerender:r=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:p="slide",...l}=o,[c,d]=useState(0),u=useRef(null),m=useResizeObserver(u),y=useMemo(()=>uuid(8),[]),[R,x]=useState("auto"),C=useMemo(()=>m.width>0,[m.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let v=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:S,className:h,rest:w}=O({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),g=()=>{if(!C)return {opacity:0};switch(p){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${v.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${c*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(f,{ref:u,style:S,className:`--tabview --${a} flex cols ${h}`,children:[jsx(zt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let I=v.find(B=>B.tag==b.tag);I&&I.onSelect&&(I.onSelect(I,b.index),i?.(I,b.index));},selected:c,items:v.reduce((b,I,B)=>(b.push({icon:I.icon,index:B,label:I.label,tag:I.tag}),b),[])}),jsx(f,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:R,transition:C?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:C?1:0},children:jsx(f,{className:"--track",style:{...g()},children:v.map((b,I)=>jsx(Ga,{isActive:I===c,transitionType:p,speed:n,width:m.width,render:r||I===c,onHeightChange:B=>I===c&&x(B),content:b.body},`tab-body-${b.key||I}-${y}`))})})]})};Xa.displayName="Zuz.TabView";var bf=Xa;var Cf=({ref:e,commands:o,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:r="zuz ~ ",variant:s,...a})=>{let[i,p]=useState([{type:"output",content:n}]),[l,c]=useState(""),d=useRef(null),u=useRef(null),{variant:m}=j(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let y=h=>{let w=typeof h=="string"?{type:"output",content:h}:h;p(g=>{let b=[...g,w];return b.length>1e3?b.slice(-1e3):b});},R=()=>p([]);useImperativeHandle(e,()=>({write:y,clear:R}));let x=async h=>{let[w,...g]=h.split(" "),b=w.toLowerCase();return o&&o[b]?await o[b](g):t?await t(h):`command not found: ${w}`},C=h=>{let w=/\u001b\[(\d+)m/g,g=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,B="#d4d4d4",E=false,V;for(;(V=w.exec(h))!==null;){let D=h.slice(I,V.index);D&&g.push({text:D,color:B,bold:E});let $=V[1];$==="0"?(B="#d4d4d4",E=false):$==="1"?E=true:b[$]&&(B=b[$]),I=w.lastIndex;}let k=h.slice(I);return k&&g.push({text:k,color:B,bold:E}),g},v=(h,w)=>h.includes("\x1B")?C(h).map((g,b)=>jsx(ie,{style:{color:g.color||"#d4d4d4",fontWeight:g.bold?"bold":"normal"},children:g.text},`--terminal-msg-${b}-${g.text.replace(/\S+/g,"-")}`)):jsx(ie,{style:{color:w==="error"?"#ff5f56":w==="command"?"#00ff00":"#d4d4d4"},children:h}),S=async h=>{if(h.key==="Enter"&&l.trim()){let w=l.trim(),g=[...i,{type:"command",content:`${r}${w}`}];c(""),p(g);let b=await x(w);p(I=>[...I,{type:"output",content:b}]);}};return jsxs(f,{as:`--zuz-terminal --${s||m||q.Medium} flex cols ${a.className}`,onClick:()=>u.current?.focus(),children:[jsx(f,{ref:d,className:"--terminal-log",children:i.map((h,w)=>jsx(f,{children:jsx(z,{children:v(h.content,h.type)})},w))}),jsxs(f,{as:"flex aic --terminal-input",children:[jsx(z,{as:"--terminal-prompt",children:r}),jsx(fe,{ref:u,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||m||q.Medium,onChange:h=>c(h.target.value),onKeyDown:S})]})]})},Tf=Cf;var Pf=({meta:e})=>jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsx(te,{name:e.icon,as:"--command-icon"}),jsx(z,{children:e.label})]}),Rf=({position:e,onSelect:o,commands:t,visible:n})=>jsx(f,{"aria-hidden":!n,fx:{transition:Q.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(r=>jsx(Pf,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),Ja=Rf;var oi=({ref:e,...o})=>{let {autoResize:t,maxHeight:n,variant:r,resize:s="none",command:a,commands:i,name:p,onInput:l,cmd:c,renderDropdown:d,value:u,defaultValue:m,...y}=o,R=useRef(null),x=useRef(null),{variant:C}=j(true),{style:v,className:S,rest:h}=O(y),w=at();p?w.errors?.[p]:null;let b=p&&w.values&&w.setFieldValue,I=b?w.values?.[p]:void 0,B=useDebounce(L=>{b&&w.setFieldValue?.(p,L);},500),{showDropdown:E,dropdownPosition:V,handleKeyDown:k,handleInput:D,handleCommandSelect:$}=useCommandActions({command:a,commands:i,cmd:c,ref:R}),_=useCallback(()=>{let L=R.current;!L||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{L.style.height="auto";let U=L.scrollHeight;if(n){let X=parseInt(n.toString(),10);isNaN(X)||(U=Math.min(U,X));}L.style.height=`${U}px`,L.style.overflowY=n&&U>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),N=L=>{B(L.currentTarget.value),l?.(L),D(L),_();};return useEffect(()=>{R.current&&p&&I!==void 0&&R.current.value!==String(I)&&(R.current.value=String(I));},[I,p]),useEffect(()=>{_();},[u,m,_]),useEffect(()=>{t&&R.current&&_();},[t,_]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&w.deleteFieldValue?.(p);},[]),jsxs(f,{as:"rel --flex w-full",children:[jsx("textarea",{name:p,className:`--input --textarea --${r||C||q.Medium} flex ${S}`.trim(),style:{...v,resize:s,height:t?"auto":v?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:k,onInput:N,ref:L=>{R.current=L,typeof e=="function"?e(L):e&&(e.current=L);},value:u,defaultValue:m,...h}),d?d({show:E,position:V,commands:i||[],onSelect:$}):i&&i.length>0&&jsx(Ja,{visible:E,commands:i,onSelect:$,position:V})]})};oi.displayName="Zuz.TextArea";var kf=oi;var ni=forwardRef((e,o)=>{let{as:t,value:n,color:r,direction:s,...a}=e,i=useRef(null),[p,l]=useState(n||0);return useImperativeHandle(o,()=>({updateValue(c){p.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),i.current){let d=c.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((u,m)=>{let y=d[m];if(u instanceof HTMLElement){u.setAttribute("data-value",y);let R=u.querySelector(".--wheel-char-track");R instanceof HTMLElement&&(R.style.setProperty("--v",y),R.offsetWidth);}});}}})),useEffect(()=>{l(n||0);},[n]),jsxs(f,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(p||0).toString().split("").map((c,d)=>isNaN(parseInt(c,10))?jsx(ie,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${d}`):jsx(ie,{"data-value":c,className:`--wheel-char grid ${d>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(ie,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsx(ie,{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((u,m)=>jsx(ie,{children:u},`${d}--${m}`)),jsx(ie,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),r&&jsx(f,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});ni.displayName="Zuz.TextWheel";var Af=ni;var _r=forwardRef((e,o)=>{let{as:t,meta:n,nodes:r,icons:s,onSelect:a,treeTag:i,selected:p,roots:l,expanded:c,...d}=e,{tag:u,label:m,icon:y,under:R,isHead:x}=n,C=useMemo(()=>l.includes(u),[l]),[v,S]=useState(c),h=()=>{localStorage.setItem(`--tn${i}-${u}`,v?"0":"1"),S(!v);};useEffect(()=>{c||C&&!localStorage.getItem(`--tn${i}-${u}`)?(localStorage.setItem(`--tn${i}-${u}`,"1"),S(true)):S(localStorage.getItem(`--tn${i}-${u}`)=="1");},[]);let w=useMemo(()=>r.filter(g=>g.under==u),[r,u]);return jsxs(f,{className:`--treenode ${C?"--is-root":""} --treenode-${u} flex cols`,children:[jsxs(f,{className:`--node --node-${u} flex aic ${p==u?" --selected":""}`,children:[jsx(K,{skeleton:d.skeleton,onClick:h,className:"--node-aro-btn",disabled:w.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(te,{skeleton:d.skeleton,className:"--node-aro-icon",name:w.length==0?s?.arrowDisabled||s?.arrowClose:v?s?.arrowOpen:s?.arrowClose}):w.length==0?A.chevronBottom:v?A.chevronBottom:A.chevronRight}),jsxs(K,{className:"--node-meta flex aic",onClick:g=>a(u),children:[(s?.nodeOpen&&s?.nodeClose||C&&s?.rootOpen&&s?.rootClose)&&jsx(te,{skeleton:d.skeleton,className:`--node-icon ${C?"--icon-root":""}`,name:y||(v?C&&s?.rootOpen||s.nodeOpen:C&&s?.rootClose||s?.nodeClose)}),jsx(z,{className:`--node-label ${C?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),v&&w.length>0&&jsx(f,{className:`--sub-node tree-sub-node-${u} flex cols`,children:w.map(g=>jsx(_r,{treeTag:i,selected:p,onSelect:a,icons:s,roots:l,expanded:g.expanded||false,meta:g,nodes:r},`--node-${g.tag}`))})]})});_r.displayName="TreeItem";var ai=_r;var li=forwardRef((e,o)=>{let{as:t,nodes:n,onNodeSelect:r,tag:s,icons:a,roots:i,selected:p,...l}=e,[c,d]=useState(p);useImperativeHandle(o,()=>({getSelected:()=>c}),[r]);let u=m=>{d(m),r&&r(m);};return useEffect(()=>{c!=p&&d(p);},[p]),jsx(f,{className:"--treeview flex cols",children:n.filter(m=>i.includes(m.tag)).map(m=>jsx(ai,{treeTag:s?`-${s}`:"",selected:c,onSelect:y=>u(y),icons:a,meta:m,roots:i,expanded:m.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${m.tag}`))})});li.displayName="Zuz.TreeView";var Gf=li;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
13
|
+
export{Le as ALERT,Ur as AVATAR,Ec as Accordion,Oc as ActionBar,Hc as Alert,am as AutoComplete,yr as Avatar,gm as Badge,f as Box,Xm as BubbleAttachmentType,qm as BubbleMediaType,Bs as BubbleStatus,K as Button,Rs as CHART,Ke as CHECKBOX,Qf as COLORTHEME,xr as Calendar,Fm as Carousel,Um as Chart,Cr as ChatBubble,ep as ChatList,Ft as CheckBox,up as CodeBlock,Ep as ColorScheme,Zo as ContextMenu,Lp as CookiesConsent,Fe as Cover,$p as CropShape,Hp as Cropper,zp as Crumb,od as DATATYPE,et as DIALOG,qr as DIALOG_ACTION_POSITION,Pe as DRAWER_SIDE,Wp as DatePicker,sr as Dialog,lr as Drawer,qt as FILTER,Je as FORMVALIDATION,rd as FORMVALIDATION_STYLE,Xp as Fab,Qp as Fieldset,tu as Filters,de as Flex,tr as Form,nu as Grid,Ko as Group,te as Icon,Dt as Image,fe as Input,Lr as KeyboardKeys,la as KeysLabelMap,ia as KeysMap,$t as Label,zo as LayersProvider,_e as List,du as MediaPlayer,yu as NetworkStatus,St as ORIGIN,Jf as OriginType,tt as Overlay,ed as PLACEMENTS,vt as POSITION,sd as PROGRESS,Ht as Pagination,fo as PaginationStyle,Tu as Password,Eu as PinInput,ve as Position,Lt as ProgressBar,Oo as RADIO,Lu as Radio,Me as SHEET,Lo as SHEET_ACTION_POSITION,jf as SKELETON,Mo as SLIDER,td as SORT,we as SPINNER,Bt as ScrollView,Mr as Search,Ku as Select,zt as SelectTabs,gl as Sheet,mt as Slider,oo as SnackPosition,Sn as SnackStyle,to as SnackType,ie as Span,Re as Spinner,nd as Status,Wu as Switch,Q as TRANSITIONS,oe as TRANSITION_CURVES,bf as TabView,sf as Table,cf as TableOfContents,Tf as Terminal,z as Text,Af as TextWheel,kf as Textarea,Pi as ThemeProvider,wn as ToastDefaultTitle,oo as ToastPosition,mr as ToastProvider,Sn as ToastStyle,to as ToastType,Pt as ToolTip,Gf as TreeView,q as Variant,hi as __ZUZJS_UI_VERSION,wt as animationTransition,Do as buildClassString,jr as buildWithStyles,Td as css,Vo as getAnimationCurve,Pd as getAnimationTransition,xi as getZuzMap,aa as isKeyCombination,Yr as setZuzMap,O as useBase,ac as useContextMenu,cc as useDialog,uc as useDrawer,Se as useFx,gc as useMorph,Mt as usePosition,wc as useSnack,Wo as useToast};
|