@zuzjs/ui 1.0.37 → 1.0.39

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