@zuzjs/ui 1.0.34 → 1.0.36

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.cjs CHANGED
@@ -1,14 +1,14 @@
1
- 'use strict';var chunkSPYDV5Q4_cjs=require('./chunk-SPYDV5Q4.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
2
- var nr={Circle:"CIRCLE",Square:"SQUARE"},vu={Default:"DEFAULT",Circle:"CIRCLE"},wu={Light:"light",Dark:"dark",System:"system"},Ie={Default:"DEFAULT",Switch:"SWITCH"},rt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},oe=rt,nt=hooks.AnchorType,Su=nt,G={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Cu={Asc:"ASC",Desc:"DESC"},Tu={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Pu={Dots:"DOTS"},Ne={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},ye={Success:"success",Error:"error",Warning:"warning",Info:"info"},U={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"},Ru={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},xe={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},Ge=xe,Qt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},sr=Qt,Iu={Bar:"BAR",Ring:"RING"},Jt={Default:"range",Text:"number"},jt={Default:"DEFAULT",Card:"CARD"},Ct={Gooey:"gooey"},le={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var ar=Symbol.for("zuz.global.map"),ir=t=>{globalThis[ar]=t;},ua=()=>globalThis[ar]||{},eo=t=>{let n=Array.isArray(t)?t.join(" "):t;if(!n||typeof n!="string")return "";let e=ua();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkSPYDV5Q4_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkSPYDV5Q4_cjs.h(n).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,u,f]=s;return chunkSPYDV5Q4_cjs.h(f).map(l=>{let c=`${u}(${l})`;return e[c]||l}).join(" ")}return e[o]||o}).join(" ")},Uu=t=>{let n=Array.isArray(t)?t.join(" "):t;return !n||typeof n!="string"?"":eo(n)},lr=t=>{let n={};for(let e in t){let r=t[e];if(e.startsWith("--")){n[e]=r;continue}let o=chunkSPYDV5Q4_cjs.e[e]?.toString()??e;if(o==="x"||o==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkSPYDV5Q4_cjs.i.addUnitsSafely(e,r)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunkSPYDV5Q4_cjs.i.addUnitsSafely(e,r)}`;}else chunkSPYDV5Q4_cjs.d.includes(o)?n[o]=chunkSPYDV5Q4_cjs.i.addUnitsSafely(e,r):n[o]=r;}return n},to=t=>{if(!t)return "linear";switch(t.toUpperCase()){case U.Bounce:return "var(--bounce)";case U.Liquid:return "var(--liquid)";case U.Spring:return "var(--spring)";case U.EaseInOut:return "ease-in-out";case U.EaseOutBack:return "ease-out-back";default:return "linear"}},st=(t,n=0)=>{let e={},r={},o=n||20;switch(t){case X.SlideInLeft:case X.SlideInRight:e={"--fx-x":t===X.SlideInLeft?`-${o}px`:`${o}px`,opacity:0},r={"--fx-x":"0px",opacity:1};break;case X.SlideInTop:case X.SlideInBottom:e={"--fx-y":t===X.SlideInTop?`-${o}px`:`${o}px`,opacity:0},r={"--fx-y":"0px",opacity:1};break;case X.ScaleIn:e={scale:0,opacity:0},r={scale:1,opacity:1};break;case X.FadeIn:e={opacity:0},r={opacity:1};break}return {from:e,to:r}},qu=(t,n,e)=>{let{from:r,to:o}=st(t);return n?{...r,...o}:e?r:o};var da=(t,n)=>{let e=react.useRef([]),r=react.useRef(false);return react.useEffect(()=>{t?.when||(r.current=false);},[t?.transition]),react.useEffect(()=>{let o=n?.current;if(!o||!t||!t.clearAtEnd)return;let s=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]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let o=n.current;(t?.scroll||t?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${t.curve?to(t.curve):"var(--spring)"}`);},[t,n]),react.useMemo(()=>{if(!t)return {style:{}};let{transition:o,from:s,to:a,exit:u,when:f,duration:l=.3,delay:c=0,curve:p,watch:i=[]}=t,g=f===false&&!r.current;f===true&&(r.current=true);let C={},{from:y,to:w}=o?st(o):{from:s||{},to:a||{}};C=f===void 0?{...y,...w}:f?{...w}:u||y;let R=to(p),P=[],T=lr(C);e.current=Object.keys(T);let h={...T};return Object.keys(T).forEach(S=>{let b=S.startsWith("--")?"all":S;P.includes(b)||P.push(`${b} ${l}s ${R} ${c}s`);}),i.forEach(S=>{P.includes(S)||P.push(`${S} 0.1s ${R} 0s`);}),{style:{...h,transition:g?"none":P.join(", "),opacity:g?0:h.opacity,pointerEvents:g?"none":h.pointerEvents}}},[t,t?.when,t?.watch])},ce=da;var Tt=null,ga=(t,n)=>{let{as:e,fx:r,transition:o,skeleton:s,className:a,propsToRemove:u,draggable:f,dragOptions:l,style:c,...p}=t||{},i=typeof window<"u",g={},C={};if(f&&i&&!Tt&&(import('@zuzjs/hooks').then(P=>{Tt=P.useDrag;}).catch(P=>{console.error("Error loading useDrag:",P);}),Tt)){let P=Tt(l);g={onMouseDown:P.onMouseDown},C={transform:`translate(${P.position.x}px, ${P.position.y}px)`};}let y=o?{transition:o,duration:.3}:r||{},{style:w}=ce(y,n),R=eo(e??"");return {style:{...c,...w,...C},className:[a||"",R||"",s?.enabled?"--skeleton":"",f?"--draggable":""].join(" ").trim(),rest:{...g,...chunkSPYDV5Q4_cjs.g(p,u?[...u,"skeleton"]:["skeleton"])}}},N=ga;var pr="(prefers-color-scheme: dark)",xa=typeof window>"u",fr=react.createContext(void 0),so=t=>{let n=react.useContext(fr);if(!n){if(t===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},q=so,ba=({children:t,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...o})=>(r&&ir(r),jsxRuntime.jsx(va,{storageKey:n,forceTheme:e,...o,children:t})),va=({children:t,storageKey:n,forceTheme:e,...r})=>{let[o,s]=react.useState(()=>e||ur(n,"system")),[a,u]=react.useState(()=>e||ur(n)),f=i=>(i||(i=window.matchMedia(pr)),i.matches?"dark":"light"),l=react.useCallback(i=>{let g=i=="system"?f():i,C=document.documentElement;C.setAttribute("color-scheme",g),C.style.colorScheme=g,u(g);},[f]),c=react.useCallback(i=>{s(i),localStorage.setItem(n,i),l(i);},[o]),p=react.useCallback(i=>{let g=f(i);u(g),o==="system"&&l("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(n);},[o]),react.useEffect(()=>{window.matchMedia(pr).addEventListener("change",p);},[p]),react.useEffect(()=>{let i=g=>{g.key==n&&(g.newValue?c(g.newValue):c("system"));};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[c]),react.useEffect(()=>{l(e||o||"system");},[o]),jsxRuntime.jsxs(fr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:c,...r},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ 'use strict';var chunkSHCFYUVF_cjs=require('./chunk-SHCFYUVF.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
2
+ var ar={Circle:"CIRCLE",Square:"SQUARE"},Su={Default:"DEFAULT",Circle:"CIRCLE"},Cu={Light:"light",Dark:"dark",System:"system"},Be={Default:"DEFAULT",Switch:"SWITCH"},it={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ae=it,lt=hooks.AnchorType,Tu=lt,Z={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Pu={Asc:"ASC",Desc:"DESC"},Ru={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Iu={Dots:"DOTS"},Ee={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},ye={Success:"success",Error:"error",Warning:"warning",Info:"info"},G={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},U={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Nu={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},xe={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},qe=xe,jt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},ir=jt,Bu={Bar:"BAR",Ring:"RING"},eo={Default:"range",Text:"number"},to={Default:"DEFAULT",Card:"CARD"},Rt={Gooey:"gooey"},pe={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var lr=Symbol.for("zuz.global.map"),cr=t=>{globalThis[lr]=t;},pa=()=>globalThis[lr]||{},oo=t=>{let n=Array.isArray(t)?t.join(" "):t;if(!n||typeof n!="string")return "";let e=pa();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkSHCFYUVF_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkSHCFYUVF_cjs.h(n).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,u,f]=s;return chunkSHCFYUVF_cjs.h(f).map(l=>{let c=`${u}(${l})`;return e[c]||l}).join(" ")}return e[o]||o}).join(" ")},qu=t=>{let n=Array.isArray(t)?t.join(" "):t;return !n||typeof n!="string"?"":oo(n)},mr=t=>{let n={};for(let e in t){let r=t[e];if(e.startsWith("--")){n[e]=r;continue}let o=chunkSHCFYUVF_cjs.e[e]?.toString()??e;if(o==="x"||o==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkSHCFYUVF_cjs.i.addUnitsSafely(e,r)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunkSHCFYUVF_cjs.i.addUnitsSafely(e,r)}`;}else chunkSHCFYUVF_cjs.d.includes(o)?n[o]=chunkSHCFYUVF_cjs.i.addUnitsSafely(e,r):n[o]=r;}return n},ro=t=>{if(!t)return "linear";switch(t.toUpperCase()){case G.Bounce:return "var(--bounce)";case G.Liquid:return "var(--liquid)";case G.Spring:return "var(--spring)";case G.EaseInOut:return "ease-in-out";case G.EaseOutBack:return "ease-out-back";default:return "linear"}},ct=(t,n=0,e=0)=>{let r={},o={},s=n||20,a=e||0;switch(t){case U.SlideInLeft:case U.SlideInRight:r={"--fx-x":t===U.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case U.SlideInTop:case U.SlideInBottom:r={"--fx-y":t===U.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case U.ScaleIn:r={scale:0,opacity:0},o={scale:1,opacity:1};break;case U.FadeIn:r={opacity:0},o={opacity:1};break}return {from:r,to:o}},Xu=(t,n,e)=>{let{from:r,to:o}=ct(t);return n?{...r,...o}:e?r:o};var fa=(t,n)=>{let e=react.useRef([]),r=react.useRef(false);return react.useEffect(()=>{t?.when||(r.current=false);},[t?.transition]),react.useEffect(()=>{let o=n?.current;if(!o||!t||!t.clearAtEnd)return;let s=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]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let o=n.current;(t?.scroll||t?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${t.curve?ro(t.curve):"var(--spring)"}`);},[t,n]),react.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:C=[]}=t,b=f===false&&!r.current;f===true&&(r.current=true);let w={},{from:R,to:P}=o?ct(o,g,i):{from:s||{},to:a||{}};w=f===void 0?{...R,...P}:f?{...P}:u||R;let T=ro(m),h=[],S=mr(w);e.current=Object.keys(S);let y={...S};return Object.keys(S).forEach(x=>{let I=x.startsWith("--")?"all":x;h.includes(I)||h.push(`${I} ${l}s ${T} ${c}s`);}),C.forEach(x=>{h.includes(x)||h.push(`${x} 0.1s ${T} 0s`);}),{style:{...y,transition:b?"none":h.join(", "),opacity:b?0:y.opacity,pointerEvents:b?"none":y.pointerEvents}}},[t,t?.when,t?.watch])},ie=fa;var It=null,da=(t,n)=>{let{as:e,fx:r,transition:o,skeleton:s,className:a,propsToRemove:u,draggable:f,dragOptions:l,style:c,...m}=t||{},i=typeof window<"u",g={},C={};if(f&&i&&!It&&(import('@zuzjs/hooks').then(P=>{It=P.useDrag;}).catch(P=>{console.error("Error loading useDrag:",P);}),It)){let P=It(l);g={onMouseDown:P.onMouseDown},C={transform:`translate(${P.position.x}px, ${P.position.y}px)`};}let b=o?{transition:o,duration:.3}:r||{},{style:w}=ie(b,n),R=oo(e??"");return {style:{...c,...w,...C},className:[a||"",R||"",s?.enabled?"--skeleton":"",f?"--draggable":""].join(" ").trim(),rest:{...g,...chunkSHCFYUVF_cjs.g(m,u?[...u,"skeleton"]:["skeleton"])}}},N=da;var fr="(prefers-color-scheme: dark)",ya=typeof window>"u",gr=react.createContext(void 0),io=t=>{let n=react.useContext(gr);if(!n){if(t===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},q=io,xa=({children:t,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...o})=>(r&&cr(r),jsxRuntime.jsx(ba,{storageKey:n,forceTheme:e,...o,children:t})),ba=({children:t,storageKey:n,forceTheme:e,...r})=>{let[o,s]=react.useState(()=>e||dr(n,"system")),[a,u]=react.useState(()=>e||dr(n)),f=i=>(i||(i=window.matchMedia(fr)),i.matches?"dark":"light"),l=react.useCallback(i=>{let g=i=="system"?f():i,C=document.documentElement;C.setAttribute("color-scheme",g),C.style.colorScheme=g,u(g);},[f]),c=react.useCallback(i=>{s(i),localStorage.setItem(n,i),l(i);},[o]),m=react.useCallback(i=>{let g=f(i);u(g),o==="system"&&l("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(n);},[o]),react.useEffect(()=>{window.matchMedia(fr).addEventListener("change",m);},[m]),react.useEffect(()=>{let i=g=>{g.key==n&&(g.newValue?c(g.newValue):c("system"));};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[c]),react.useEffect(()=>{l(e||o||"system");},[o]),jsxRuntime.jsxs(gr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:c,...r},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
3
3
  const themes = ['light', 'dark']
4
4
  let theme = localStorage.getItem(\`${n}\`) || "system";
5
5
  if (theme === "system") {
6
6
  theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
7
7
  }
8
8
  document.documentElement.setAttribute("color-scheme", theme);
9
- document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(ao,{children:t})]})},ur=(t,n)=>{if(xa)return;let e;try{e=localStorage.getItem(t)||void 0;}catch{}return e||n};var dr=({ref:t,...n})=>{let{style:e,...r}=n,{style:o,className:s,rest:a}=N(r);return jsxRuntime.jsx("span",{ref:t,style:e,className:s,...a})};dr.displayName="Zuz.Span";var ee=dr;var hr=react.forwardRef((t,n)=>{let{name:e,pathCount:r,variant:o,color:s,...a}=t,{variant:u}=q(true),{className:f,style:l,rest:c}=N(a);return jsxRuntime.jsx("div",{style:{color:s,...l},className:`icon-${e} --icon --${o||u||G.Small} ${f}`.trim(),ref:n,...c,children:Array(r||0).fill(0).map((p,i)=>jsxRuntime.jsx(ee,{className:`path${i+1}`},`${e}-layer-${i}`))})});hr.displayName="Zuz.Icon";var j=hr;var ie={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var yr=t=>{let{type:n,variant:e,color:r,...o}=t,{className:s,style:a,rest:u}=N(o),{spinner:f}=q(true),l=()=>{switch(n||f?.type||ie.Simple){case ie.Simple:return null;case ie.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(m,{as:"--bar --bar1"}),jsxRuntime.jsx(m,{as:"--bar --bar2"}),jsxRuntime.jsx(m,{as:"--bar --bar3"})]});case ie.Roller:return null}};return jsxRuntime.jsx(m,{className:`${s} --spinner --${(n||f?.type||ie.Simple).toLowerCase()} --${e||f?.variant||G.Small}`.trim(),style:{...a},...u,children:l()})};yr.displayName="Zuz.Spinner";var be=yr;var It={Loading:"loading",Normal:"normal"};var br=({ref:t,...n})=>{let{reset:e,kind:r="solid",variant:o,icon:s,iconSize:a,children:u,withLabel:f,spinner:l,state:c,disabled:p,...i}=n,{style:g,className:C,rest:y}=N(i),{variant:w}=q(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${o||w} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${C}`.trim().replace(/\s+/g," "),style:g,ref:t,disabled:c==It.Loading||n.skeleton?.enabled||p,...y,children:[c==It.Loading&&jsxRuntime.jsx(be,{variant:o||w,type:l||ie.Simple}),(!c||c==It.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(j,{variant:a,name:s}),f===true?jsxRuntime.jsx(ee,{children:u}):u]})]})};br.displayName="Zuz.Button";var A=br;var wr=react.forwardRef((t,n)=>{let{h:e,html:r,children:o,lines:s,...a}=t,{style:u,className:f,rest:l}=N(a),c=`h${t.h||1}`;return jsxRuntime.jsx(c,{ref:n,style:u,className:f,...l,children:r?jsxRuntime.jsx(ee,{dangerouslySetInnerHTML:{__html:r}}):o})});wr.displayName="Zuz.Text";var H=wr;var Na=t=>{let{label:n,labelColor:e,icon:r,iconColor:o,index:s,className:a,onSelect:u}=t;return n=="-"?jsxRuntime.jsx(m,{className:"--line"}):jsxRuntime.jsxs(A,{reset:true,onClick:f=>u?.(t),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(m,{as:"--icon",children:jsxRuntime.jsx(j,{name:r,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},Sr=Na;var Pr=({ref:t,...n})=>{let{id:e,as:r,fx:o,offsetX:s,offsetY:a,parent:u,event:f,arrow:l,when:c,items:p,header:i,footer:g,origin:C=nt.TopRight,...y}=n,[w,R]=react.useState(false),[P,T]=react.useState(p||[]),{position:h,targetRef:S,calculatedAnchor:b}=hooks.useAnchorPosition(u?.current,f,{offsetX:s,offsetY:a,preferredAnchor:C}),I=u&&h.top>u.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",O=react.useMemo(()=>{let K=b.toLowerCase();return K.includes("left")?"--arrow-left":K.includes("right")?"--arrow-right":"--arrow-center"},[b]),M=h.top!==0||h.left!==0;react.useEffect(()=>{c&&M?R(true):c||R(false);},[c,M]);let{className:V,style:E,rest:D}=N(y),$=ce({...o?.transition?{transition:o.transition??X.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??U.EaseInOut,duration:o?.duration??.05,when:w&&M});return jsxRuntime.jsxs(m,{ref:S,className:`--contextmenu ${l||u!=null?`--has-arrow ${I} ${O}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!w,style:{...E,...$.style,top:h.top,left:h.left,visibility:M?"visible":"hidden",transformOrigin:b},...D,children:[typeof i=="function"?react.createElement(i):i,P.map((K,d)=>jsxRuntime.jsx(Sr,{...K,index:d},`context-${K.label.toLowerCase()}-${d}`)),typeof g=="function"?react.createElement(g):g]})};Pr.displayName="Zuz.ContextMenu";var lo=Pr;var Rr=react.forwardRef((t,n)=>{let{children:e,fx:r,when:o,fxDelay:s,fxStep:a,classToIgnore:u,...f}=t,l=q(true),c=hooks.useDelayed(),p=r||l?.group?.fx,i=s||l?.group?.fxDelay,g=a||l?.group?.fxStep,C=u||l?.group?.classToIgnore||"--ignore",y=react.useMemo(()=>p?react$1.addPropsToChildren(e,w=>{if(w.type===react.Fragment)return false;let R=w.props||{},P="fx"in R,T=R.as?Array.isArray(R.as)?R.as.join(" "):R.as:R.className||"",h=typeof T=="string"&&T.includes(C);return !P&&!h},w=>({fx:{...p,delay:(i||0)+w*(g||.1),when:o??(r?.when||c)}})):e,[e,o,c,p]);return jsxRuntime.jsx(m,{className:"--group",ref:n,...f,children:y})});Rr.displayName="Zuz.Group";var co=Rr;var Nr=react.forwardRef((t,n)=>{let{message:e,spinner:r,spinnerSize:o,color:s,when:a,hideMessage:u,...f}=t,{className:l,style:c,rest:p}=N(f),{spinner:i}=q(true);return "when"in t&&t.when==false?null:jsxRuntime.jsxs(co,{fx:{transition:X.SlideInBottom,curve:U.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...p,children:[jsxRuntime.jsx(be,{variant:o||i?.variant||G.Small,type:r||i?.type||ie.Simple}),!u&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});Nr.displayName="Zuz.Cover";var Ce=Nr;var Br=react.forwardRef((t,n)=>{let{when:e,...r}=t;return jsxRuntime.jsx(m,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:X.FadeIn,when:e},...r})});Br.displayName="Zuz.Overlay";var He=Br;var Wa=({action:t,render:n=true,message:e=""})=>jsxRuntime.jsx(m,{as:`--body flex aic rel ${t?"":"--no-action"}`.trim(),children:n?e:null}),Er=Wa;var Ua=({action:t,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(m,{as:`--footer flex aic rel ${n?n==sr.Center?"jcc":"":"jce"}`.trim(),children:t.map((o,s)=>jsxRuntime.jsx(A,{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}`))}),Mr=Ua;var qa={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[ye.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[ye.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[ye.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[ye.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.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:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.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"}),jsxRuntime.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:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},k=qa;var Xa=({title:t="Alert",onClose:n})=>jsxRuntime.jsxs(m,{as:"--head flex aic rel",children:[jsxRuntime.jsx(m,{as:`--${t?"title":"dot"} flex aic jcc rel`,children:t}),jsxRuntime.jsx(A,{onClick:e=>n(),className:"--closer abs center-v",children:k.close})]}),Or=Xa;var Ar=({ref:t,...n})=>{let{index:e,id:r,title:o,message:s,transition:a,curve:u,speed:f,type:l,action:c,actionPosition:p,spinner:i,loadingMessage:g,variant:C,inBackground:y,forceClose:w,forceLoading:R,onClose:P,onShow:T,onHide:h,...S}=n,b=react.useMemo(()=>core.uuid(12),[]),[x,I]=react.useState(o||""),[O,M]=react.useState(s||""),[V,E]=react.useState(l||Ge.Dialog),[D,$]=react.useState(false),[K,d]=react.useState(true),[B,z]=react.useState(c||null),[W,_]=react.useState(false),{variant:Z,spinner:Y,dialog:Q}=q(true),J=C||Q?.variant||Z||G.Small,{style:fe,className:te,rest:de}=N(S),ve=react.useRef(null),we=ce({when:D,duration:f||Q?.speed||.3,delay:Q?.delay||.1,transition:a||Q?.transition||X.SlideInBottom,curve:u||Q?.curve||U.EaseInOut,watch:["scale","filter","transform"]}),se=()=>{$(false),P(r);};react.useEffect(()=>{E(Ge.Dialog),M(s),I(x),B&&z(B.reduce((ne,ge)=>(ne.push({...ge,key:ge.key||core.uuid(12)}),ne),[])),$(true),setTimeout(()=>T?T():()=>{},500);},[]),react.useEffect(()=>{w&&se();},[w]),react.useEffect(()=>{R!=null&&_(R);},[R]);let F=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(He,{style:{zIndex:F},when:D}),jsxRuntime.jsxs(m,{as:`--dialog --${(l??Ge.Default).toLowerCase()} ${D?"--visible":""} ${te} fixed abc`.trim(),style:{...we.style,zIndex:F+1,pointerEvents:y==true?"none":"auto",...y==true?{scale:"0.92",filter:"blur(2px)"}:{}},...de,ref:ve,children:[jsxRuntime.jsx(Or,{title:x,onClose:se}),jsxRuntime.jsx(Er,{message:O,render:K,action:B}),B&&B.length>0&&jsxRuntime.jsx(Mr,{variant:J,action:B,dialogID:b,actionPosition:p}),jsxRuntime.jsx(Ce,{when:W,spinner:i||Q?.spinner||Y?.type||ie.Simple,message:g||Q?.loadingMessage})]})]})};Ar.displayName="Zuz.Dialog";var po=Ar;var uo=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}},it=new uo;var $r=react.forwardRef((t,n)=>{let{speed:e,style:r,...o}=t,{rootRef:s,containerRef:a,thumbY:u,thumbX:f,onScrollY:l,onScrollX:c}=hooks.useScrollbar(e||1),{style:p,className:i,rest:g}=N(o);return react.useEffect(()=>{let C=a.current;if(!C)return;let y=()=>{window.dispatchEvent(new Event("resize"));};return C.addEventListener("scroll",y),()=>C.removeEventListener("scroll",y)},[]),jsxRuntime.jsxs(m,{ref:s,className:i.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(m,{as:`--scroll-content ${i}`.trim(),ref:a,style:r||{},children:g.children}),jsxRuntime.jsx(m,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:u,onMouseDown:l})}),jsxRuntime.jsx(m,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:f,onMouseDown:c})})]})});$r.displayName="Zuz.ScrollView";var fo=$r;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:p,forceLoading:i,onClose:g,...C}=n,{drawer:y}=q(true),[w,R]=react.useState(a),[P,T]=react.useState(false),[h,S]=react.useState(l??(y?.prerender||true)),[b,x]=react.useState(false),I=()=>{T(false),g?.(e??-1);},{className:O,style:M,rest:V}=N(C),E=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{it.isTop(I)&&I();}}],[P]);hooks.useShortcuts(E),react.useEffect(()=>{R(a);},[a]),react.useEffect(()=>(P?it.push(I):it.pop(I),()=>it.pop(I)),[P]),react.useEffect(()=>{T(true);},[]),react.useEffect(()=>{p&&I();},[p]),react.useEffect(()=>{i!=null&&x(i);},[i]);let D=o||y?.from||le.Left,$=react.useMemo(()=>{switch(D){case le.Left:return {from:{x:"-100vw"},to:{x:0}};case le.Right:return {from:{x:"100vw"},to:{x:0}};case le.Top:return {from:{y:"-100vh"},to:{y:0}};case le.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,y?.from]),K=ce({from:{...$.from,opacity:0},to:{...$.to,opacity:1},when:P,curve:f||y?.animation||U.EaseInOut,duration:s||y?.speed||.5,watch:["scale","filter"]}),d=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(He,{onClick:B=>{P&&I();},when:P,style:{zIndex:d}}),jsxRuntime.jsxs(m,{ref:t,"aria-hidden":!P,className:`--drawer flex cols ${O} --${D.toLowerCase()} fixed`,style:{...M,...K.style,"--m":`${u||y?.margin||0}px`,zIndex:d+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...V,children:[o==le.Top||o==le.Bottom?jsxRuntime.jsx(m,{className:"--handle"}):null,jsxRuntime.jsxs(fo,{as:"rel",children:[h||P?w:null,jsxRuntime.jsx(Ce,{when:b})]})]})]})};zr.displayName="Zuz.Drawer";var xo=zr;var Fr=react.forwardRef((t,n)=>{let{progress:e,type:r,animated:o,...s}=t,a=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.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}=N(s);return jsxRuntime.jsx(m,{className:`--progress ${o?"--animated":""} flex rel ${u}`.trim(),style:f,...l,children:jsxRuntime.jsx(m,{ref:a,className:"--bar rel"})})});Fr.displayName="Zuz.ProgressBar";var Ae=Fr;var Et=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Et||{}),Lt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Lt||{}),Zr=(e=>(e.Stack="stack",e.Individual="individual",e))(Zr||{}),Kr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var mi=t=>{let{index:n,id:e,type:r,icon:o,title:s,message:a,duration:u,sticky:f=false,actions:l=[],position:c,style:p,isHovered:i,total:g,progress:C,forceClose:y,variant:w,onClick:R,onClose:P}=t,[T,h]=react.useState(false),[S,b]=react.useState(false),{toast:x}=q(true),I=S||y,O=c||x?.position||"TopCenter",M=r||x?.type||"default",V=p||x?.style||"stack",E=u||x?.duration||4,D=C||x?.progress||false,$=react.useRef(E*1e3),K=react.useRef(void 0),d=react.useRef(void 0),B=react.useRef(null),z=ce({when:T&&!I,duration:.3,transition:x?.transition||(O.includes("Top")?X.SlideInTop:O.includes("Bottom")?X.SlideInBottom:O.includes("Left")?X.SlideInLeft:X.SlideInRight),curve:x?.curve||U.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{h(true);let te=de=>{if(d.current!==void 0){let ve=de-d.current;if(!i&&!f&&!I&&($.current-=ve,B.current)){let we=Math.max(0,$.current/(E*1e3)*100);B.current?.setProgress?.(we/100);}}d.current=de,$.current<=0?b(true):K.current=requestAnimationFrame(te);};return K.current=requestAnimationFrame(te),()=>{K.current&&cancelAnimationFrame(K.current);}},[i,f,I,E]),react.useEffect(()=>{if(I){let te=setTimeout(()=>{P?.(e);},350);return ()=>clearTimeout(te)}},[I,e]);let W=V==="stack",_=i?n*65:n*8,Z=i?1:Math.max(.85,1-n*.05),Y=i?1:Math.max(.4,1-n*.2),Q=()=>{R?R():(!l||l.length===0)&&b(true);},J=z.style.transform||"translate(0, 0)",fe=I?J:`${J} translateY(${O.includes("Top")?_:-_}px) scale(${Z})`;return jsxRuntime.jsxs(m,{onClick:Q,as:`--snack --${I?"hidden":"visible"} --${w||x?.variant||G.Medium} --${M} --${O.toLowerCase()} abs flex aic`,style:{...z.style,zIndex:1e3-n,pointerEvents:I?"none":"auto",opacity:I?z.style.opacity:Y,transform:fe,filter:!I&&W&&!i&&n>0?"blur(1px)":"none",cursor:!l||l.length===0?"pointer":"default",transition:`${z.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsx(m,{as:"--ico flex aic jcc",children:o?jsxRuntime.jsx(j,{name:o}):jsxRuntime.jsx(m,{as:"--no-icon"})}),jsxRuntime.jsxs(m,{as:"--meta flex cols",children:[jsxRuntime.jsx(H,{as:"--tt",children:s||Kr[r]}),jsxRuntime.jsx(H,{as:"--tm",children:a})]}),l&&l.length>0&&jsxRuntime.jsx(m,{as:"--actions flex gap:5",children:l.map((te,de)=>jsxRuntime.jsx(A,{as:"--snack-btn bold",onClick:ve=>{ve.stopPropagation(),te.onClick();},children:te.label},de))}),D&&jsxRuntime.jsx(Ae,{as:"abs",ref:B})]})},bo=mi;var me=react.createContext(null),hi=({ref:t,...n})=>{let r=react.useContext(me)?.depth??0,[o,s]=react.useState(null),[a,u]=react.useState(null),[f,l]=react.useState(false),[c,p]=react.useState([]),i=hooks.useDelayed(),g=react.useRef(0),C=()=>++g.current,y=()=>{l(false),setTimeout(()=>u(null),200);};react.useImperativeHandle(t,()=>({add(h){let S=C(),b={id:S,...h};return p(x=>[...x,b]),S},openMenu(h){l(false),setTimeout(()=>{u({id:C(),type:"menu",props:h}),l(true);},16);},remove(h){p(S=>S.map(b=>b.id===h?{...b,props:{...b.props,forceClose:true}}:b)),a?.id===h&&y();},loading(h,S){p(b=>b.map(x=>x.id===h?{...x,props:{...x.props,forceLoading:S}}:x)),a?.id===h&&y();},clear(h){p(c.filter(S=>S.type!=h));}})),react.useEffect(()=>{if(a&&f){let h=()=>y();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,f,y]);let w=h=>{setTimeout(()=>{p(S=>S.filter(b=>b.id!==h)),a?.id===h&&u(null);},250);},R=react.useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!i)return null;let P=c.filter(h=>h.type=="toast").reverse(),T=Object.values(Lt);return reactDom.createPortal(jsxRuntime.jsxs(m,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[R.map((h,S)=>{let b=S<R.length-1;return h.type==="dialog"?jsxRuntime.jsx(po,{onClose:w,index:S,id:h.id,...h.props,inBackground:b},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(xo,{onClose:w,index:S,id:h.id,...h.props,inBackground:b},`layer-${h.type}-${h.id}`):null}),T.map(h=>{let S=P.filter(b=>(b.props.position||"TopCenter")===h);return S.length===0?null:jsxRuntime.jsx(m,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:S.map((b,x)=>jsxRuntime.jsx(bo,{index:x,total:S.length,isHovered:o===h,onClose:w,id:b.id,...b.props},b.id))},h)}),a&&jsxRuntime.jsx(m,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(lo,{onClose:y,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},yi=({children:t})=>{let n=react.useContext(me),e=n?n.depth+1:0,r=react.useRef(null),o=react.useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),loading:(s,a)=>r.current?.loading(s,a),clear:s=>r.current?.clear(s),depth:e,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(me.Provider,{value:o,children:[t,jsxRuntime.jsx(hi,{ref:r})]})},ao=yi;var bi=()=>{let t=react.useContext(me);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:p,header:i,footer:g})=>{t.openMenu({fx:{transition:f,curve:l,duration:p},parent:r,items:o,origin:s||nt.TopCenter,offsetX:a,offsetY:u,arrow:c,header:i,footer:g});},hide:t.clear}},vi=bi;var Si=()=>{let t=react.useContext(me);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:Ge.Dialog}});return {id:a,setLoading:u=>r(a,u),hide:()=>e(a)}},hide:e}},Ci=Si;var Pi=()=>{let t=react.useContext(me);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:le.Right}),left:s=>o({children:s,from:le.Left}),top:s=>o({children:s,from:le.Top}),bottom:s=>o({children:s,from:le.Bottom}),close:e}},Ri=Pi;var Ni=(t,n,e={})=>{let[r,o]=react.useState(null),[s,a]=react.useState(false),{duration:u=.25,curve:f=U.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=e;return react.useLayoutEffect(()=>{n&&t.current?(o(t.current.getBoundingClientRect()),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}},Bi=Ni;var ki=(t,n={})=>{let{offset:e=8,direction:r="bottom",container:o=null,triggerRef:s=null}=n,a=react.useRef(null),u=react.useCallback(()=>{let f=t.current;if(!f)return;let l=s?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=f.getBoundingClientRect(),p=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 w=0,R=0;switch(r){case "top":w=p.top-c.height-e,R=p.left,w<i.top&&p.bottom+c.height+e<=i.bottom&&(w=p.bottom+e);break;case "bottom":w=p.bottom+e,R=p.left,w+c.height>i.bottom&&p.top-c.height-e>=i.top&&(w=p.top-c.height-e);break;case "left":w=p.top,R=p.left-c.width-e,R<i.left&&p.right+c.width+e<=i.right&&(R=p.right+e);break;case "right":w=p.top,R=p.right+e,R+c.width>i.right&&p.left-c.width-e>=i.left&&(R=p.left-c.width-e);break}if(w=Math.max(i.top,Math.min(w,i.bottom-c.height)),R=Math.max(i.left,Math.min(R,i.right-c.width)),a.current==="fixed")f.style.top=`${w}px`,f.style.left=`${R}px`;else {let P;f.offsetParent?P=f.offsetParent.getBoundingClientRect():P={top:0,left:0};let T=w-P.top+window.scrollY,h=R-P.left+window.scrollX;f.style.top=`${T}px`,f.style.left=`${h}px`;}},[t,s,e,r,o]);return react.useEffect(()=>{let f=t.current;if(!f)return;let l=s?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(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}},mt=ki;var Di=()=>{let t=react.useContext(me);if(!t)throw new Error("useToast must be used inside <LayersProvider>");let n=(p,i)=>t.add({type:"toast",props:{...i,type:p}}),r=p=>t.remove(p),l=(p,i,g)=>{let C=n(p,{...i,sticky:i.sticky??false,actions:[{label:g?.label||"Ok",onClick:()=>{g?.onClick?.(),r(C);}}]});return C},c=(p,i,g,C)=>{let y=n(p,{...i,sticky:true,actions:[{label:C?.label||"Cancel",onClick:()=>{C?.onClick?.(),r(y);}},{label:g?.label||"Ok",onClick:()=>{g?.onClick?.(),r(y);}}]});return y};return {ok:(p,i)=>l("default",p,i),success:(p,i)=>l("success",p,i),error:(p,i)=>l("error",p,i),confirm:(p,i,g)=>c("default",p,i,g),warn:(p,i)=>l("warn",p,i)}},Hi=Di;var Ai=()=>{let t=react.useContext(me);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,p,i)=>n("default",{title:l,message:c,icon:p,duration:i}),hide:l=>t.remove(l),success:(l,c,p,i)=>n("success",{title:l,message:c,icon:p,duration:i}),error:(l,c,p,i)=>n("error",{title:l,message:c,icon:p,duration:i}),warn:(l,c,p,i)=>n("warn",{title:l,message:c,icon:p,duration:i}),promise:(l,c,p,i)=>n("promise",{title:l,message:c,icon:p,duration:i}),clearAll:()=>t.clear("toast")}},vo=Ai;var jr=({ref:t,style:n,...e})=>{let r=react.useRef(null),o=react.useMemo(()=>t&&typeof t!="function"&&t.current?t:r,[t]),{style:s,className:a,rest:u}=N(e,o);return jsxRuntime.jsx("div",{ref:t||r,style:{...s,...n||{}},className:a,...u})};jr.displayName="Zuz.Box";var m=jr;var tn=react.forwardRef((t,n)=>{let{title:e,message:r,...o}=t,[s,a]=react.useState(false);return jsxRuntime.jsxs(m,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs(A,{onClick:u=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(m,{className:"--arrow flex",children:s?k.arrowUp:k.arrowDown})]}),s&&jsxRuntime.jsx(m,{className:"--detail",children:r})]})});tn.displayName="Zuz.Accordion";var Ki=tn;var Wi=({label:t,icon:n,onClick:e,idx:r,selected:o})=>jsxRuntime.jsx(A,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(j,{name:n}):n}),rn=Wi;var nn=react.forwardRef((t,n)=>{let{items:e,name:r,selected:o,position:s,...a}=t,u=react.useRef(null),[f,l]=react.useState(o||e[0].tag||0),c=react.useCallback(({x:w,y:R})=>{if(u.current){let P=u.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${w-P.left}`),document.documentElement.style.setProperty("--tip-y",`${R-P.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),p=react.useCallback(()=>{u.current&&(u.current.removeEventListener("pointerleave",p),u.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),i=react.useCallback(()=>{u.current&&(u.current.addEventListener("pointerleave",p),u.current.addEventListener("pointermove",c));},[]);react.useEffect(()=>{u.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((w,R)=>R.label.length>w.length?R.label:w,"").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:C,rest:y}=N(a);return jsxRuntime.jsxs(m,{ref:u,style:C,className:[`--actionbar flex aic ${g}`,`${!s||s==oe.Auto?"rel":`--${s}`}`].join(" ").trim(),...y,children:[e.map((w,R)=>jsxRuntime.jsx(rn,{selected:f===w.tag||o==R,...w,idx:R},`actionbar-action-${w.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(m,{className:"--tip abs",children:jsxRuntime.jsx(m,{className:"--track flex aic",children:e.map(({label:w})=>jsxRuntime.jsx(m,{className:"--lb",children:w},`tool-tip-${w.toLowerCase().replace(/\s+/g,"-")}`))})})]})});nn.displayName="Zuz.ActionBar";var Yi=nn;var an=react.forwardRef((t,n)=>{let{type:e,icon:r,title:o,message:s,iconSize:a,...u}=t,{className:f,style:l,rest:c}=N(u);return jsxRuntime.jsxs(m,{className:`--alert --${e||ye.Info} flex aic ${f}`.trim(),style:l,...c,children:[jsxRuntime.jsx(m,{className:`--icon icon-${r||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!r&&k[e||ye.Info]}),jsxRuntime.jsxs(m,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(H,{className:"--message",h:2,children:s})]})]})});an.displayName="Zuz.Alert";var ji=an;var ln=({ref:t,...n})=>{let{variant:e,numeric:r,onConfirm:o,...s}=n,{style:a,className:u,rest:f}=N(s),{variant:l}=q(true),c=p=>{r&&(p.currentTarget.value=p.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||l} flex ${u}`.trim(),style:a,onInput:c,onKeyDown:p=>{p.key=="Enter"&&o?.(p.currentTarget.value);},ref:t,...f})};ln.displayName="Zuz.Input";var re=ln;var mn=t=>{let{meta:n,children:e}=t,r=hooks.useDelayed(),{label:o,icon:s,...a}=react.isValidElement(n)?{}:n,{className:u,style:f,rest:l}=N({...a,...a.animate?{animate:{...a.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:f,className:u,children:n}):jsxRuntime.jsxs("li",{style:f,className:u,...l,children:[e,typeof n=="string"?n:o]})};mn.displayName="Zuz.ListItem";var pn=mn;var fn=react.forwardRef((t,n)=>{let{items:e,variant:r,direction:o,seperator:s,ol:a,...u}=t,{className:f,style:l,rest:c}=N(u),p=a==true?"ol":"ul";return react.createElement(p,{className:`--list --${r||G.Small} flex ${o??"cols"} ${f}`.trim(),style:l,ref:n,...c,children:e.map((i,g,C)=>{let y=`${typeof i=="string"?`li-${String(i)}`:react.isValidElement(i)?`li-${i.key}`||`${g}-${core.MD5(i.toString())}`:i.label}-${g}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(pn,{meta:i}),s&&C[g+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${g+1}-${y}`):null]},y)})})});fn.displayName="Zuz.List";var ze=fn;var gn=react.forwardRef((t,n)=>{let{fx:e,action:r,data:o,withStyle:s,onChange:a,...u}=t,{className:f}=N({as:s||""}),{style:l}=N(u),[c,p]=react.useState(false),[i,g]=react.useState(o||[]),C=react.useRef(null),y=react.useRef(null),w=react.useRef(null),R=react.useMemo(()=>u.name||core.uuid(12),[]),[P,T]=react.useState(null),[h,S]=react.useState(null),[b,x]=react.useState([]),O=hooks.useDebounce(d=>{d.target.value==""?(p(false),g([])):r&&d.target.value.trim()!=""&&core.withPost(r,{query:d.target.value}).then(B=>{"items"in B&&core._(B.items).isArray()?(g(B.items),S(d.target.value),x(B.items)):console.error("Action Response should contain items array"),T(null);}).catch(B=>{T(null),g([]);});},250),M=()=>{if(y.current){let d=y.current.getBoundingClientRect(),B=window.innerHeight-d.bottom,z=d.top;if(w.current){let W=w.current;B<W.offsetHeight&&z>B?(W.style.top="auto",W.style.bottom=`${d.height}px`,W.style.maxHeight=`${z-150}px`):(W.style.top=`${d.height+5}px`,W.style.bottom="auto",W.style.maxHeight=`${B-150}px`);}}},V=d=>{if(i.length>0){if((d.key==="ArrowDown"||d.key==="ArrowUp")&&(d.preventDefault(),d.stopPropagation()),d.key==="Escape")T(null),p(false),g([]);else if(d.key==="ArrowDown")T(B=>{let z=B===null||B===i.length-1?0:B+1;return D(z),z});else if(d.key==="ArrowUp")T(B=>{let z=B===null||B===0?i.length-1:B-1;return D(z),z});else if(d.key==="Enter"&&P!==null){let B=i[P];C.current&&(C.current.value=B,p(false),g([]));}}},E=d=>{C.current&&(C.current.value=d,p(false),g([]));},D=d=>{let B=i[d];if(B&&C.current&&(C.current.value=B,C.current.setSelectionRange(B.length,B.length)),w.current){let W=w.current.children[d];W&&W.scrollIntoView({block:"nearest"});}},$=d=>{y.current&&!y.current.contains(d.target)&&(p(false),g([]));},K=()=>{C.current&&C.current.value===h&&(g(b),T(null),M());};return react.useEffect(()=>(window.addEventListener("resize",M),window.addEventListener("scroll",M,true),document.addEventListener("mousedown",$),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true),document.removeEventListener("mousedown",$);}),[]),react.useEffect(()=>{M();},[i]),jsxRuntime.jsxs(m,{style:l,ref:y,className:`--autocomplete --${t.size||G.Small} flex aic rel ${f}`.trim(),children:[jsxRuntime.jsx(re,{ref:C,autoComplete:"off",onChange:O,onKeyDown:V,onFocus:K,...u}),jsxRuntime.jsx(m,{className:"--arrow rel flex aic jcc",children:i.length>0?k.arrowUp:k.arrowDown}),i.length>0&&jsxRuntime.jsx(ze,{id:R,ref:w,className:"--suggestion-list flex cols abs",items:i.map((d,B)=>({label:d,onClick:z=>{z.preventDefault(),z.stopPropagation(),E(d);},className:P===B?"--current":"",animate:{transition:X.SlideInBottom,curve:U.EaseInOut,delay:core.clamp(.02*B,.02,.5)}}))})]})});gn.displayName="Zuz.AutoComplete";var yl=gn;var hn=react.forwardRef((t,n)=>{let e=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:o,className:s,rest:a}=N(t,r);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:r,style:o,className:`${s} flex`,...a})});hn.displayName="Zuz.Image";var _e=hn;var yn=react.forwardRef((t,n)=>{let{src:e,variant:r,type:o,crossOrigin:s,referrerPolicy:a,fx:u,as:f,alt:l,color:c,style:p,...i}=t,[g,C,y]=hooks.useImage(e??"",s,a),{className:w,style:R,rest:P}=N({fx:u,as:f});return jsxRuntime.jsx(m,{className:`--avatar --${r||G.Small} --${(o||nr.Circle).toLowerCase()} rel flex aic jcc ${w}`.trim(),style:{background:c||"var(--primary)",...p,...R},...P,children:e?jsxRuntime.jsx(_e,{src:g,crossOrigin:s,referrerPolicy:a,...i}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});yn.displayName="Zuz.Avatar";var Pl=yn;var Rl=({size:t=5,type:n="dead",label:e="",variant:r=G.Small,loading:o=false,spinner:s,...a})=>{let{style:u,className:f,rest:l}=N(a);return jsxRuntime.jsxs(m,{style:{...core._(e).isEmpty()?{"--badge-size":t}:{},...u},as:`--badge --${r} --${n} rel flex aic jcc ${f}`.trim(),children:[jsxRuntime.jsx(m,{fx:{transition:X.FadeIn,curve:U.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(be,{type:s})}),core._(e).isEmpty()?jsxRuntime.jsx(m,{as:`--dot --${n}`}):jsxRuntime.jsx(H,{as:"--label",children:e})]})},Il=Rl;var _l=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let t=new Date,n=t.getDay();return dateFns.addDays(t,(6-n)%7||6)},getDateFormat:()=>{let t=new Date,n=t.getDay();return dateFns.format(dateFns.addDays(t,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],Fl=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)})},bn=react.forwardRef((t,n)=>{let{defaultValue:e,variant:r,onChange:o,...s}=t,{style:a,className:u,rest:f}=N(s),[l,c]=react.useState(e||new Date),p=dateFns.startOfMonth(l),i=dateFns.endOfMonth(l),g=dateFns.startOfWeek(p),C=dateFns.endOfWeek(i),y=react.useMemo(()=>dateFns.eachDayOfInterval({start:g,end:C}),[g,C]),w=T=>{o?.(T),c(T);},R=()=>{c(T=>new Date(T.getFullYear(),T.getMonth()-1));},P=()=>{c(T=>new Date(T.getFullYear(),T.getMonth()+1));};return jsxRuntime.jsxs(m,{as:`--calendar flex --${r||"sm"} ${u}`,style:a,children:[jsxRuntime.jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Fl(_l).map(T=>{let h=T.getDate();return jsxRuntime.jsxs(A,{onClick:()=>w(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:T.label}),jsxRuntime.jsx(H,{as:"tar",children:T.getDateFormat()})]},`--dtp-option-label-${T.label}`)})}),jsxRuntime.jsxs(m,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(m,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(H,{as:"flex:1 --calendar-cm bold",children:dateFns.format(l,"MMMM yyyy")}),jsxRuntime.jsx(A,{onClick:R,as:"--calendar-chevron",children:k.chevronUpOutline}),jsxRuntime.jsx(A,{onClick:P,as:"--calendar-chevron",children:k.chevronDownOutline})]}),jsxRuntime.jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(T=>jsxRuntime.jsx(H,{as:"--calendar-day",children:T},`--calendar-hd-${T}`)),y.map((T,h)=>{let S=dateFns.isSameMonth(T,l),b=dateFns.isSameDay(T,l),x=dateFns.isToday(T);return jsxRuntime.jsx(A,{disabled:!S,onClick:()=>w(T),as:["--calendar-day --calendar-dd",`${b?"--calendar-dd-selected":""}`,`${x?"--calendar-dd-current":""}`],children:dateFns.format(T,"d")},`--calendar-day-${h}-${T.getFullYear()}-${T.getMonth()}-${T.getDay()}`)})]})]})]})});bn.displayName="Zuz.Calendar";var Io=bn;var Vt=(e=>(e.Table="table",e.Gooey="gooey",e))(Vt||{});var Cn=({ref:t,...n})=>{let{itemCount:e,itemsPerPage:r,startPage:o,pageRange:s,paginationStyle:a,breakLabel:u,prevLabel:f,nextLabel:l,hash:c,loading:p,seperator:i,renderOnZeroPageCount:g,asDots:C,progressBar:y,onPageChange:w,...R}=n,P=react.useRef(null),T=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(d=>`${core.toHash(d,c||6,T)}${i||""}${T}`,[T]),S=react.useMemo(()=>u||"...",[u]),b=react.useRef(null),[x,I]=react.useState({id:c?o?typeof o=="number"?h(o):o:1:o||1,label:o||1});react.useImperativeHandle(t,()=>({setPage:d=>I(d),getPage:d=>x,setProgress:d=>b.current?.setProgress?.(d),getProgress:()=>b.current?.getProgress?.()??0}),[b.current]);let{style:O,className:M,rest:V}=N(R),E=react.useCallback(d=>typeof d=="number"?d:+d.label,[]);if(!e)throw new Error('"itemCount" prop is required');let D=react.useMemo(()=>Math.ceil(e/r),[e,r]),$=react.useMemo(()=>{let d=[],B=Math.max(E(x)-(s||2),1),z=Math.min(E(x)+(s||2),D);B>1&&d.push({id:c?h(1):1,label:1}),B>2&&d.push({id:-1,label:S});for(let W=B;W<=z;W++)d.push({id:c?h(W):W,label:W});return z<D-1&&d.push({id:-1,label:S}),z<D&&d.push({id:c?h(D):D,label:D}),d},[x]),K=react.useCallback(d=>{let B=d;+B.label<1||+B.label>D||(I(B),w?.(B));},[e,r,x]);return $.length<=1&&(g??false)===false?null:jsxRuntime.jsxs(m,{ref:P,as:`--pagination ${C===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${M}`,children:[jsxRuntime.jsx(m,{as:"flex flex:1 aic --pgt-btns",children:($.length>1?$:[{id:1,label:1},{id:-1,label:S}]).map((d,B,z)=>{let W=(typeof d=="string"?d:d.label)==E(x);return jsxRuntime.jsx(A,{disabled:d.id==-1||E(x)==+d.label,className:W?"--current-page":"",onClick:_=>K(d),children:C===true?y===true&&W?jsxRuntime.jsx(Ae,{ref:b}):"":typeof d=="string"?d:d.label},`--pg-${B}-${d.id}`)})}),jsxRuntime.jsx(m,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(E(x)-1)*r+1} - `,`${Math.min(E(x)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(A,{disabled:E(x)<=1,onClick:d=>K({id:c?h(E(x)-1):E(x)-1,label:E(x)-1}),children:k.chevronLeftOutline}),jsxRuntime.jsx(A,{disabled:$.length<=1||E(x)==E($[$.length-1]),onClick:d=>K({id:c?h(E(x)+1):E(x)+1,label:E(x)+1}),children:k.chevronRightOutline})]})]})};Cn.displayName="Zuz.Pagination";var ft=Cn;function Yl(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:p=20,scaleStep:i=.15,blur:g=4,animation:C="power",showDots:y=false,autoPlay:w=false,autoPlaySpeed:R=3,onChange:P,...T}=t,{className:h,style:S}=N(T),b=react.useRef(null),x=R/(R>=1e3?1e3:1),I=hooks.useCarousel({total:e.length,initialIndex:u,loop:s,useKeys:f,useWheel:l,onChange:D=>{b.current?.setPage({id:D+1,label:D+1}),b.current?.setProgress(0),P?.(D);}}),{pause:O,resume:M,reset:V}=hooks.useTimer({duration:x,autoStart:w===true,onProgress:D=>{w===true&&b.current?.setProgress(1-D);},onExpired:()=>{w===true&&I.next(),V();}}),E={...S,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${p}deg`,"--carousel-blur":`${g}px`,"--carousel-scale-step":i,"--active-index":I.index,"--carousel-transition":`var(--${C})`};return jsxRuntime.jsxs(m,{ref:n,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${h}`.trim(),style:E,children:[jsxRuntime.jsx(m,{className:"--carousel-stage rel fill flex aic jcc",children:e.map((D,$)=>{let K=$-I.index;if(a==="infinite"){let B=e.length;K=((K+B/2)%B+B)%B-B/2;}let d=$===I.index;return jsxRuntime.jsx(m,{onMouseEnter:()=>d&&O(),onMouseLeave:()=>d&&M(),className:`--carousel-item-wrapper abs ${d?"--is-active":""}`,style:{"--offset":K,zIndex:d?100:100-Math.abs(K),display:Math.abs(K)>5?"none":"flex"},children:r(D,$,I.index)},$)})}),y&&jsxRuntime.jsx(ft,{ref:b,itemCount:e.length,itemsPerPage:1,startPage:u+1,pageRange:e.length,paginationStyle:"gooey",onPageChange:D=>I.goTo(+D.label-1),asDots:true,progressBar:true})]})}var Ql=react.forwardRef(Yl),Jl=Ql;var Tn=(n=>(n.Line="line",n))(Tn||{});var In=react.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:p=0,padding:i=0,type:g,...C}=t,{className:y,style:w,rest:R}=N(C),P=react.useRef(null),T=hooks.useResizeObserver(P.current?.parentElement||P),h=typeof r=="number"?r:T.width,S=typeof o=="number"?o:T.height,b={width:h,height:S},x=react.useId(),{pathD:I,areaPathD:O}=hooks.useLineChart(e,b,i+(a||2)),M=react.useRef(null),V=react.useRef(null),[E,D]=react.useState(0),[$,K]=react.useState(0);return react.useEffect(()=>{l&&(M.current&&D(M.current.getTotalLength()),V.current&&K(V.current.getTotalLength()));},[l,I,O,h,S]),jsxRuntime.jsx(m,{ref:P,as:`--chart --${g||"line"}-chart ${y}`.trim(),style:{...w,width:r,height:o},...R,children:h>0&&S>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${h} ${S}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:x,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:u}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:f})]})}),jsxRuntime.jsx("path",{ref:V,d:O,fill:`url(#${x})`,stroke:"none",style:l?{strokeDasharray:$,strokeDashoffset:$}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:$,to:"0",dur:`${c||2}s`,begin:`${p||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:M,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:E,strokeDashoffset:E}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${c||2}s`,begin:`${p||0}s`,fill:"freeze"})})]})})});In.displayName="Zuz.Chart";var sc=In;var Nn=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(Nn||{}),Bn=(l=>(l.Image="img",l.Video="vid",l.Audio="audio",l.Link="link",l.Document="doc",l.Location="loc",l.Contact="contact",l.Event="event",l.Poll="poll",l))(Bn||{});var En=react.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:p}=N(f);return jsxRuntime.jsx(m,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(m,{className:`--bubble --bubble-${o} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${u==true?"--b-arrow":""} ${l}`.trim(),style:{...c},...p,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(m,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(ee,{className:"--bm-action",children:k.play}),jsxRuntime.jsx(Ae,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(m,{as:"--bubble-image",children:jsxRuntime.jsx(_e,{src:r.source})}):null:null,jsxRuntime.jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(a)}),o=="me"&&jsxRuntime.jsx(ee,{className:`--bubble-status --bs-${s}`,children:s==0?k.pending:s==1?k.done:s==2?k.doneAll:k.doneAll})]})]})})});En.displayName="Zuz.Bubble";var lc=En;var Ln=react.forwardRef((t,n)=>{let{style:e,className:r,rest:o}=N(t);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...o})});Ln.displayName="Zuz.Label";var dt=Ln;var Mn=react.forwardRef((t,n)=>{let{name:e,required:r,type:o,value:s,size:a,variant:u,checked:f,onSwitch:l,...c}=t,[p,i]=react.useState(f||false),g=react.useRef(null),{variant:C}=q(true);return react.useImperativeHandle(n,()=>({setChecked(y,w=true){i(y),g.current&&(g.current.checked=y),w&&l&&l(y,s||"cb");},toggle(y=true){g.current&&(g.current.checked=!p),y&&l&&l&&l(!p,s||"cb"),i(!p);}})),jsxRuntime.jsxs(dt,{className:`--${(o||Ie.Default).toLowerCase()} ${!o||o==Ie.Default?"--checkbox":"--switch"} --${u||C||G.Small} flex aic jcc ${p?"is-checked":""} rel`.trim(),...c,children:[(!o||o==Ie.Default)&&k.check,jsxRuntime.jsx(re,{ref:g,defaultChecked:p,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:y=>{l&&l(y.target.checked,s||"cb"),i(y.target.checked);}})]})});Mn.displayName="Zuz.CheckBox";var gt=Mn;var xc=({ref:t,...n})=>{let{code:e,lang:r="tsx",showLines:o=false,highlight:s="",as:a,fx:u,...f}=n,l=react.useRef(null),{className:c,style:p,rest:i}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${a}`,fx:u},l),g=react.useMemo(()=>{let y=new Set;return s.split(",").forEach(w=>{if(w.includes("-")){let[R,P]=w.split("-").map(Number);for(let T=R;T<=P;T++)y.add(T);}else w&&y.add(Number(w));}),y},[s]),C=react.useMemo(()=>{let y=e.split(`
10
- `);for(;y.length>0&&y[0].trim()==="";)y.shift();for(;y.length>0&&y[y.length-1].trim()==="";)y.pop();let w=y[0]?.match(/^\s*/)?.[0].length||0,R=y.map(T=>{let h=T.match(/^\s*/)?.[0].length||0,S=Math.min(h,w);return T.slice(S)}),P=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(&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((T,h)=>{let S=T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=g.has(h+1),x=[];P.forEach(I=>{S=S.replace(I.re,O=>{let M=`ZUZ_ID_${x.length}_ZUZ`;return x.push(`<span class="--token-${I.name}">${O}</span>`),M});});for(let I=x.length-1;I>=0;I--)S=S.replace(`ZUZ_ID_${I}_ZUZ`,x[I]);return `<div class="--code-line ${o==true?"--with-ln":""} ${b?"--is-highlighted":""}">
9
+ document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(lo,{children:t})]})},dr=(t,n)=>{if(ya)return;let e;try{e=localStorage.getItem(t)||void 0;}catch{}return e||n};var hr=({ref:t,...n})=>{let{style:e,...r}=n,{style:o,className:s,rest:a}=N(r);return jsxRuntime.jsx("span",{ref:t,style:e,className:s,...a})};hr.displayName="Zuz.Span";var te=hr;var xr=react.forwardRef((t,n)=>{let{name:e,pathCount:r,variant:o,color:s,...a}=t,{variant:u}=q(true),{className:f,style:l,rest:c}=N(a);return jsxRuntime.jsx("div",{style:{color:s,...l},className:`icon-${e} --icon --${o||u||Z.Small} ${f}`.trim(),ref:n,...c,children:Array(r||0).fill(0).map((m,i)=>jsxRuntime.jsx(te,{className:`path${i+1}`},`${e}-layer-${i}`))})});xr.displayName="Zuz.Icon";var Q=xr;var le={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var br=t=>{let{type:n,variant:e,color:r,...o}=t,{className:s,style:a,rest:u}=N(o),{spinner:f}=q(true),l=()=>{switch(n||f?.type||le.Simple){case le.Simple:return null;case le.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(p,{as:"--bar --bar1"}),jsxRuntime.jsx(p,{as:"--bar --bar2"}),jsxRuntime.jsx(p,{as:"--bar --bar3"})]});case le.Roller:return null}};return jsxRuntime.jsx(p,{className:`${s} --spinner --${(n||f?.type||le.Simple).toLowerCase()} --${e||f?.variant||Z.Small}`.trim(),style:{...a},...u,children:l()})};br.displayName="Zuz.Spinner";var be=br;var Et={Loading:"loading",Normal:"normal"};var wr=({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:C,rest:b}=N(i),{variant:w}=q(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${o||w} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${C}`.trim().replace(/\s+/g," "),style:g,ref:t,disabled:c==Et.Loading||n.skeleton?.enabled||m,...b,children:[c==Et.Loading&&jsxRuntime.jsx(be,{variant:o||w,type:l||le.Simple}),(!c||c==Et.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(Q,{variant:a,name:s}),f===true?jsxRuntime.jsx(te,{children:u}):u]})]})};wr.displayName="Zuz.Button";var $=wr;var Cr=react.forwardRef((t,n)=>{let{h:e,html:r,children:o,lines:s,...a}=t,{style:u,className:f,rest:l}=N(a),c=`h${t.h||1}`;return jsxRuntime.jsx(c,{ref:n,style:u,className:f,...l,children:r?jsxRuntime.jsx(te,{dangerouslySetInnerHTML:{__html:r}}):o})});Cr.displayName="Zuz.Text";var A=Cr;var Ia=t=>{let{label:n,labelColor:e,icon:r,iconColor:o,index:s,className:a,onSelect:u}=t;return n=="-"?jsxRuntime.jsx(p,{className:"--line"}):jsxRuntime.jsxs($,{reset:true,onClick:f=>u?.(t),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(p,{as:"--icon",children:jsxRuntime.jsx(Q,{name:r,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(A,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},Tr=Ia;var Ir=({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:C=lt.TopRight,...b}=n,[w,R]=react.useState(false),[P,T]=react.useState(m||[]),{position:h,targetRef:S,calculatedAnchor:y}=hooks.useAnchorPosition(u?.current,f,{offsetX:s,offsetY:a,preferredAnchor:C}),I=u&&h.top>u.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",O=react.useMemo(()=>{let K=y.toLowerCase();return K.includes("left")?"--arrow-left":K.includes("right")?"--arrow-right":"--arrow-center"},[y]),E=h.top!==0||h.left!==0;react.useEffect(()=>{c&&E?R(true):c||R(false);},[c,E]);let{className:V,style:L,rest:D}=N(b),H=ie({...o?.transition?{transition:o.transition??U.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??G.EaseInOut,duration:o?.duration??.05,when:w&&E});return jsxRuntime.jsxs(p,{ref:S,className:`--contextmenu ${l||u!=null?`--has-arrow ${I} ${O}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!w,style:{...L,...H.style,top:h.top,left:h.left,visibility:E?"visible":"hidden",transformOrigin:y},...D,children:[typeof i=="function"?react.createElement(i):i,P.map((K,d)=>jsxRuntime.jsx(Tr,{...K,index:d},`context-${K.label.toLowerCase()}-${d}`)),typeof g=="function"?react.createElement(g):g]})};Ir.displayName="Zuz.ContextMenu";var mo=Ir;var Nr=react.forwardRef((t,n)=>{let{children:e,fx:r,when:o,fxDelay:s,fxStep:a,classToIgnore:u,...f}=t,l=q(true),c=hooks.useDelayed(),m=r||l?.group?.fx,i=s||l?.group?.fxDelay,g=a||l?.group?.fxStep,C=u||l?.group?.classToIgnore||"-fx",b=react.useMemo(()=>m?react$1.addPropsToChildren(e,w=>{if(w.type===react.Fragment)return false;let R=w.props||{},P="fx"in R,T=R.as?Array.isArray(R.as)?R.as.join(" "):R.as:R.className||"",h=typeof T=="string"&&T.includes(C);return !P&&!h},w=>({fx:{...m,delay:(i||0)+w*(g||.1),when:o??(r?.when||c)}})):e,[e,o,c,m]);return jsxRuntime.jsx(p,{className:"--group",ref:n,...f,children:b})});Nr.displayName="Zuz.Group";var po=Nr;var Er=react.forwardRef((t,n)=>{let{message:e,spinner:r,spinnerSize:o,color:s,when:a,hideMessage:u,...f}=t,{className:l,style:c,rest:m}=N(f),{spinner:i}=q(true);return "when"in t&&t.when==false?null:jsxRuntime.jsxs(po,{fx:{transition:U.SlideInBottom,curve:G.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...m,children:[jsxRuntime.jsx(be,{variant:o||i?.variant||Z.Small,type:r||i?.type||le.Simple}),!u&&jsxRuntime.jsx(A,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});Er.displayName="Zuz.Cover";var Pe=Er;var Lr=react.forwardRef((t,n)=>{let{when:e,...r}=t;return jsxRuntime.jsx(p,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:U.FadeIn,when:e},...r})});Lr.displayName="Zuz.Overlay";var Ae=Lr;var Ka=({action:t,render:n=true,message:e=""})=>jsxRuntime.jsx(p,{as:`--body flex aic rel ${t?"":"--no-action"}`.trim(),children:n?e:null}),Mr=Ka;var Ua=({action:t,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(p,{as:`--footer flex aic rel ${n?n==ir.Center?"jcc":"":"jce"}`.trim(),children:t.map((o,s)=>jsxRuntime.jsx($,{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}`))}),Or=Ua;var Ga={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[ye.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[ye.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[ye.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[ye.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.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:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.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"}),jsxRuntime.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:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},k=Ga;var qa=({title:t="Alert",onClose:n})=>jsxRuntime.jsxs(p,{as:"--head flex aic rel",children:[jsxRuntime.jsx(p,{as:`--${t?"title":"dot"} flex aic jcc rel`,children:t}),jsxRuntime.jsx($,{onClick:e=>n(),className:"--closer abs center-v",children:k.close})]}),Hr=qa;var zr=({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:C,inBackground:b,forceClose:w,forceLoading:R,onClose:P,onShow:T,onHide:h,...S}=n,y=react.useMemo(()=>core.uuid(12),[]),[x,I]=react.useState(o||""),[O,E]=react.useState(s||""),[V,L]=react.useState(l||qe.Dialog),[D,H]=react.useState(false),[K,d]=react.useState(true),[B,z]=react.useState(c||null),[W,_]=react.useState(false),{variant:F,spinner:J,dialog:Y}=q(true),X=C||Y?.variant||F||Z.Small,{style:ge,className:oe,rest:he}=N(S),ve=react.useRef(null),we=ie({when:D,duration:f||Y?.speed||.3,delay:Y?.delay||.1,transition:a||Y?.transition||U.SlideInBottom,curve:u||Y?.curve||G.EaseInOut,watch:["scale","filter","transform"]}),ce=()=>{H(false),P(r);};react.useEffect(()=>{L(qe.Dialog),E(s),I(x),B&&z(B.reduce((ee,re)=>(ee.push({...re,key:re.key||core.uuid(12)}),ee),[])),H(true),setTimeout(()=>T?T():()=>{},500);},[]),react.useEffect(()=>{w&&ce();},[w]),react.useEffect(()=>{R!=null&&_(R);},[R]);let j=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ae,{style:{zIndex:j},when:D}),jsxRuntime.jsxs(p,{as:`--dialog --${(l??qe.Default).toLowerCase()} ${D?"--visible":""} ${oe} fixed abc`.trim(),style:{...we.style,zIndex:j+1,pointerEvents:b==true?"none":"auto",...b==true?{scale:"0.92",filter:"blur(2px)"}:{}},...he,ref:ve,children:[jsxRuntime.jsx(Hr,{title:x,onClose:ce}),jsxRuntime.jsx(Mr,{message:O,render:K,action:B}),B&&B.length>0&&jsxRuntime.jsx(Or,{variant:X,action:B,dialogID:y,actionPosition:m}),jsxRuntime.jsx(Pe,{when:W,spinner:i||Y?.spinner||J?.type||le.Simple,message:g||Y?.loadingMessage})]})]})};zr.displayName="Zuz.Dialog";var fo=zr;var go=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}},pt=new go;var _r=react.forwardRef((t,n)=>{let{speed:e,style:r,...o}=t,{rootRef:s,containerRef:a,thumbY:u,thumbX:f,onScrollY:l,onScrollX:c}=hooks.useScrollbar(e||1),{style:m,className:i,rest:g}=N(o);return react.useEffect(()=>{let C=a.current;if(!C)return;let b=()=>{window.dispatchEvent(new Event("resize"));};return C.addEventListener("scroll",b),()=>C.removeEventListener("scroll",b)},[]),jsxRuntime.jsxs(p,{ref:s,className:i.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(p,{as:`--scroll-content ${i}`.trim(),ref:a,style:r||{},children:g.children}),jsxRuntime.jsx(p,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(p,{as:"--scroll-thumb --abs",ref:u,onMouseDown:l})}),jsxRuntime.jsx(p,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(p,{as:"--scroll-thumb --abs",ref:f,onMouseDown:c})})]})});_r.displayName="Zuz.ScrollView";var ho=_r;var Fr=({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,...C}=n,{drawer:b}=q(true),[w,R]=react.useState(a),[P,T]=react.useState(false),[h,S]=react.useState(l??(b?.prerender||true)),[y,x]=react.useState(false),I=()=>{T(false),g?.(e??-1);},{className:O,style:E,rest:V}=N(C),L=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{pt.isTop(I)&&I();}}],[P]);hooks.useShortcuts(L),react.useEffect(()=>{R(a);},[a]),react.useEffect(()=>(P?pt.push(I):pt.pop(I),()=>pt.pop(I)),[P]),react.useEffect(()=>{T(true);},[]),react.useEffect(()=>{m&&I();},[m]),react.useEffect(()=>{i!=null&&x(i);},[i]);let D=o||b?.from||pe.Left,H=react.useMemo(()=>{switch(D){case pe.Left:return {from:{x:"-100vw"},to:{x:0}};case pe.Right:return {from:{x:"100vw"},to:{x:0}};case pe.Top:return {from:{y:"-100vh"},to:{y:0}};case pe.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,b?.from]),K=ie({from:{...H.from,opacity:0},to:{...H.to,opacity:1},when:P,curve:f||b?.animation||G.EaseInOut,duration:s||b?.speed||.5,watch:["scale","filter"]}),d=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ae,{onClick:B=>{P&&I();},when:P,style:{zIndex:d}}),jsxRuntime.jsxs(p,{ref:t,"aria-hidden":!P,className:`--drawer flex cols ${O} --${D.toLowerCase()} fixed`,style:{...E,...K.style,"--m":`${u||b?.margin||0}px`,zIndex:d+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...V,children:[o==pe.Top||o==pe.Bottom?jsxRuntime.jsx(p,{className:"--handle"}):null,jsxRuntime.jsxs(ho,{as:"rel",children:[h||P?w:null,jsxRuntime.jsx(Pe,{when:y})]})]})]})};Fr.displayName="Zuz.Drawer";var vo=Fr;var Kr=react.forwardRef((t,n)=>{let{progress:e,type:r,animated:o,...s}=t,a=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.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}=N(s);return jsxRuntime.jsx(p,{className:`--progress ${o?"--animated":""} flex rel ${u}`.trim(),style:f,...l,children:jsxRuntime.jsx(p,{ref:a,className:"--bar rel"})})});Kr.displayName="Zuz.ProgressBar";var ze=Kr;var kt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(kt||{}),Ot=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Ot||{}),Wr=(e=>(e.Stack="stack",e.Individual="individual",e))(Wr||{}),Ur={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var ci=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:C,forceClose:b,variant:w,onClick:R,onClose:P}=t,[T,h]=react.useState(false),[S,y]=react.useState(false),{toast:x}=q(true),I=S||b,O=c||x?.position||"TopCenter",E=r||x?.type||"default",V=m||x?.style||"stack",L=u||x?.duration||4,D=C||x?.progress||false,H=react.useRef(L*1e3),K=react.useRef(void 0),d=react.useRef(void 0),B=react.useRef(null),z=ie({when:T&&!I,duration:.3,transition:x?.transition||(O.includes("Top")?U.SlideInTop:O.includes("Bottom")?U.SlideInBottom:O.includes("Left")?U.SlideInLeft:U.SlideInRight),curve:x?.curve||G.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{h(true);let oe=he=>{if(d.current!==void 0){let ve=he-d.current;if(!i&&!f&&!I&&(H.current-=ve,B.current)){let we=Math.max(0,H.current/(L*1e3)*100);B.current?.setProgress?.(we/100);}}d.current=he,H.current<=0?y(true):K.current=requestAnimationFrame(oe);};return K.current=requestAnimationFrame(oe),()=>{K.current&&cancelAnimationFrame(K.current);}},[i,f,I,L]),react.useEffect(()=>{if(I){let oe=setTimeout(()=>{P?.(e);},350);return ()=>clearTimeout(oe)}},[I,e]);let W=V==="stack",_=i?n*65:n*8,F=i?1:Math.max(.85,1-n*.05),J=i?1:Math.max(.4,1-n*.2),Y=()=>{R?R():(!l||l.length===0)&&y(true);},X=z.style.transform||"translate(0, 0)",ge=I?X:`${X} translateY(${O.includes("Top")?_:-_}px) scale(${F})`;return jsxRuntime.jsxs(p,{onClick:Y,as:`--snack --${I?"hidden":"visible"} --${w||x?.variant||Z.Medium} --${E} --${O.toLowerCase()} abs flex aic`,style:{...z.style,zIndex:1e3-n,pointerEvents:I?"none":"auto",opacity:I?z.style.opacity:J,transform:ge,filter:!I&&W&&!i&&n>0?"blur(1px)":"none",cursor:!l||l.length===0?"pointer":"default",transition:`${z.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsx(p,{as:"--ico flex aic jcc",children:o?jsxRuntime.jsx(Q,{name:o}):jsxRuntime.jsx(p,{as:"--no-icon"})}),jsxRuntime.jsxs(p,{as:"--meta flex cols",children:[jsxRuntime.jsx(A,{as:"--tt",children:s||Ur[r]}),jsxRuntime.jsx(A,{as:"--tm",children:a})]}),l&&l.length>0&&jsxRuntime.jsx(p,{as:"--actions flex gap:5",children:l.map((oe,he)=>jsxRuntime.jsx($,{as:"--snack-btn bold",onClick:ve=>{ve.stopPropagation(),oe.onClick();},children:oe.label},he))}),D&&jsxRuntime.jsx(ze,{as:"abs",ref:B})]})},wo=ci;var ue=react.createContext(null),gi=({ref:t,...n})=>{let r=react.useContext(ue)?.depth??0,[o,s]=react.useState(null),[a,u]=react.useState(null),[f,l]=react.useState(false),[c,m]=react.useState([]),i=hooks.useDelayed(),g=react.useRef(0),C=()=>++g.current,b=()=>{l(false),setTimeout(()=>u(null),200);};react.useImperativeHandle(t,()=>({add(h){let S=C(),y={id:S,...h};return m(x=>[...x,y]),S},openMenu(h){l(false),setTimeout(()=>{u({id:C(),type:"menu",props:h}),l(true);},16);},remove(h){m(S=>S.map(y=>y.id===h?{...y,props:{...y.props,forceClose:true}}:y)),a?.id===h&&b();},loading(h,S){m(y=>y.map(x=>x.id===h?{...x,props:{...x.props,forceLoading:S}}:x)),a?.id===h&&b();},clear(h){m(c.filter(S=>S.type!=h));}})),react.useEffect(()=>{if(a&&f){let h=()=>b();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,f,b]);let w=h=>{setTimeout(()=>{m(S=>S.filter(y=>y.id!==h)),a?.id===h&&u(null);},250);},R=react.useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!i)return null;let P=c.filter(h=>h.type=="toast").reverse(),T=Object.values(Ot);return reactDom.createPortal(jsxRuntime.jsxs(p,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[R.map((h,S)=>{let y=S<R.length-1;return h.type==="dialog"?jsxRuntime.jsx(fo,{onClose:w,index:S,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(vo,{onClose:w,index:S,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):null}),T.map(h=>{let S=P.filter(y=>(y.props.position||"TopCenter")===h);return S.length===0?null:jsxRuntime.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:S.map((y,x)=>jsxRuntime.jsx(wo,{index:x,total:S.length,isHovered:o===h,onClose:w,id:y.id,...y.props},y.id))},h)}),a&&jsxRuntime.jsx(p,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(mo,{onClose:b,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},hi=({children:t})=>{let n=react.useContext(ue),e=n?n.depth+1:0,r=react.useRef(null),o=react.useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),loading:(s,a)=>r.current?.loading(s,a),clear:s=>r.current?.clear(s),depth:e,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(ue.Provider,{value:o,children:[t,jsxRuntime.jsx(gi,{ref:r})]})},lo=hi;var xi=()=>{let t=react.useContext(ue);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||lt.TopCenter,offsetX:a,offsetY:u,arrow:c,header:i,footer:g});},hide:t.clear}},bi=xi;var wi=()=>{let t=react.useContext(ue);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:qe.Dialog}});return {id:a,setLoading:u=>r(a,u),hide:()=>e(a)}},hide:e}},Si=wi;var Ti=()=>{let t=react.useContext(ue);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:pe.Right}),left:s=>o({children:s,from:pe.Left}),top:s=>o({children:s,from:pe.Top}),bottom:s=>o({children:s,from:pe.Bottom}),close:e}},Pi=Ti;var Ii=(t,n,e={})=>{let[r,o]=react.useState(null),[s,a]=react.useState(false),{duration:u=.25,curve:f=G.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=e;return react.useLayoutEffect(()=>{n&&t.current?(o(t.current.getBoundingClientRect()),a(true)):n||a(false);},[n,t]),{style:ie({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:f,duration:u,when:s&&n}).style,isMeasured:s,sourceRect:r}},Ni=Ii;var Mi=(t,n={})=>{let{offset:e=8,direction:r="bottom",container:o=null,triggerRef:s=null}=n,a=react.useRef(null),u=react.useCallback(()=>{let f=t.current;if(!f)return;let l=s?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=f.getBoundingClientRect(),m=l.getBoundingClientRect(),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 w=0,R=0;switch(r){case "top":w=m.top-c.height-e,R=m.left,w<i.top&&m.bottom+c.height+e<=i.bottom&&(w=m.bottom+e);break;case "bottom":w=m.bottom+e,R=m.left,w+c.height>i.bottom&&m.top-c.height-e>=i.top&&(w=m.top-c.height-e);break;case "left":w=m.top,R=m.left-c.width-e,R<i.left&&m.right+c.width+e<=i.right&&(R=m.right+e);break;case "right":w=m.top,R=m.right+e,R+c.width>i.right&&m.left-c.width-e>=i.left&&(R=m.left-c.width-e);break}if(w=Math.max(i.top,Math.min(w,i.bottom-c.height)),R=Math.max(i.left,Math.min(R,i.right-c.width)),a.current==="fixed")f.style.top=`${w}px`,f.style.left=`${R}px`;else {let P;f.offsetParent?P=f.offsetParent.getBoundingClientRect():P={top:0,left:0};let T=w-P.top+window.scrollY,h=R-P.left+window.scrollX;f.style.top=`${T}px`,f.style.left=`${h}px`;}},[t,s,e,r,o]);return react.useEffect(()=>{let f=t.current;if(!f)return;let l=s?.current||f.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(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}},dt=Mi;var Oi=()=>{let t=react.useContext(ue);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 C=n(m,{...i,sticky:i.sticky??false,actions:[{label:g?.label||"Ok",onClick:()=>{g?.onClick?.(),r(C);}}]});return C},c=(m,i,g,C)=>{let b=n(m,{...i,sticky:true,actions:[{label:C?.label||"Cancel",onClick:()=>{C?.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)}},Di=Oi;var Vi=()=>{let t=react.useContext(ue);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")}},So=Vi;var tn=({ref:t,style:n,...e})=>{let r=react.useRef(null),o=react.useMemo(()=>t&&typeof t!="function"&&t.current?t:r,[t]),{style:s,className:a,rest:u}=N(e,o);return jsxRuntime.jsx("div",{ref:t||r,style:{...s,...n||{}},className:a,...u})};tn.displayName="Zuz.Box";var p=tn;var rn=react.forwardRef((t,n)=>{let{title:e,message:r,...o}=t,[s,a]=react.useState(false);return jsxRuntime.jsxs(p,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs($,{onClick:u=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(A,{className:"--label flex",children:e}),jsxRuntime.jsx(p,{className:"--arrow flex",children:s?k.arrowUp:k.arrowDown})]}),s&&jsxRuntime.jsx(p,{className:"--detail",children:r})]})});rn.displayName="Zuz.Accordion";var Zi=rn;var Ki=({label:t,icon:n,onClick:e,idx:r,selected:o})=>jsxRuntime.jsx($,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(Q,{name:n}):n}),sn=Ki;var an=react.forwardRef((t,n)=>{let{items:e,name:r,selected:o,position:s,...a}=t,u=react.useRef(null),[f,l]=react.useState(o||e[0].tag||0),c=react.useCallback(({x:w,y:R})=>{if(u.current){let P=u.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${w-P.left}`),document.documentElement.style.setProperty("--tip-y",`${R-P.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),m=react.useCallback(()=>{u.current&&(u.current.removeEventListener("pointerleave",m),u.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),i=react.useCallback(()=>{u.current&&(u.current.addEventListener("pointerleave",m),u.current.addEventListener("pointermove",c));},[]);react.useEffect(()=>{u.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((w,R)=>R.label.length>w.length?R.label:w,"").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:C,rest:b}=N(a);return jsxRuntime.jsxs(p,{ref:u,style:C,className:[`--actionbar flex aic ${g}`,`${!s||s==ae.Auto?"rel":`--${s}`}`].join(" ").trim(),...b,children:[e.map((w,R)=>jsxRuntime.jsx(sn,{selected:f===w.tag||o==R,...w,idx:R},`actionbar-action-${w.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(p,{className:"--tip abs",children:jsxRuntime.jsx(p,{className:"--track flex aic",children:e.map(({label:w})=>jsxRuntime.jsx(p,{className:"--lb",children:w},`tool-tip-${w.toLowerCase().replace(/\s+/g,"-")}`))})})]})});an.displayName="Zuz.ActionBar";var Xi=an;var cn=react.forwardRef((t,n)=>{let{type:e,icon:r,title:o,message:s,iconSize:a,...u}=t,{className:f,style:l,rest:c}=N(u);return jsxRuntime.jsxs(p,{className:`--alert --${e||ye.Info} flex aic ${f}`.trim(),style:l,...c,children:[jsxRuntime.jsx(p,{className:`--icon icon-${r||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!r&&k[e||ye.Info]}),jsxRuntime.jsxs(p,{className:"--meta flex cols",children:[jsxRuntime.jsx(A,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(A,{className:"--message",h:2,children:s})]})]})});cn.displayName="Zuz.Alert";var Ji=cn;var mn=({ref:t,...n})=>{let{variant:e,numeric:r,onConfirm:o,...s}=n,{style:a,className:u,rest:f}=N(s),{variant:l}=q(true),c=m=>{r&&(m.currentTarget.value=m.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||l} flex ${u}`.trim(),style:a,onInput:c,onKeyDown:m=>{m.key=="Enter"&&o?.(m.currentTarget.value);},ref:t,...f})};mn.displayName="Zuz.Input";var ne=mn;var un=t=>{let{meta:n,children:e}=t,r=hooks.useDelayed(),{label:o,icon:s,...a}=react.isValidElement(n)?{}:n,{className:u,style:f,rest:l}=N({...a,...a.animate?{animate:{...a.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:f,className:u,children:n}):jsxRuntime.jsxs("li",{style:f,className:u,...l,children:[e,typeof n=="string"?n:o]})};un.displayName="Zuz.ListItem";var fn=un;var gn=react.forwardRef((t,n)=>{let{items:e,variant:r,direction:o,seperator:s,ol:a,...u}=t,{className:f,style:l,rest:c}=N(u),m=a==true?"ol":"ul";return react.createElement(m,{className:`--list --${r||Z.Small} flex ${o??"cols"} ${f}`.trim(),style:l,ref:n,...c,children:e.map((i,g,C)=>{let b=`${typeof i=="string"?`li-${String(i)}`:react.isValidElement(i)?`li-${i.key}`||`${g}-${core.MD5(i.toString())}`:i.label}-${g}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(fn,{meta:i}),s&&C[g+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${g+1}-${b}`):null]},b)})})});gn.displayName="Zuz.List";var Fe=gn;var yn=react.forwardRef((t,n)=>{let{fx:e,action:r,data:o,withStyle:s,onChange:a,...u}=t,{className:f}=N({as:s||""}),{style:l}=N(u),[c,m]=react.useState(false),[i,g]=react.useState(o||[]),C=react.useRef(null),b=react.useRef(null),w=react.useRef(null),R=react.useMemo(()=>u.name||core.uuid(12),[]),[P,T]=react.useState(null),[h,S]=react.useState(null),[y,x]=react.useState([]),O=hooks.useDebounce(d=>{d.target.value==""?(m(false),g([])):r&&d.target.value.trim()!=""&&core.withPost(r,{query:d.target.value}).then(B=>{"items"in B&&core._(B.items).isArray()?(g(B.items),S(d.target.value),x(B.items)):console.error("Action Response should contain items array"),T(null);}).catch(B=>{T(null),g([]);});},250),E=()=>{if(b.current){let d=b.current.getBoundingClientRect(),B=window.innerHeight-d.bottom,z=d.top;if(w.current){let W=w.current;B<W.offsetHeight&&z>B?(W.style.top="auto",W.style.bottom=`${d.height}px`,W.style.maxHeight=`${z-150}px`):(W.style.top=`${d.height+5}px`,W.style.bottom="auto",W.style.maxHeight=`${B-150}px`);}}},V=d=>{if(i.length>0){if((d.key==="ArrowDown"||d.key==="ArrowUp")&&(d.preventDefault(),d.stopPropagation()),d.key==="Escape")T(null),m(false),g([]);else if(d.key==="ArrowDown")T(B=>{let z=B===null||B===i.length-1?0:B+1;return D(z),z});else if(d.key==="ArrowUp")T(B=>{let z=B===null||B===0?i.length-1:B-1;return D(z),z});else if(d.key==="Enter"&&P!==null){let B=i[P];C.current&&(C.current.value=B,m(false),g([]));}}},L=d=>{C.current&&(C.current.value=d,m(false),g([]));},D=d=>{let B=i[d];if(B&&C.current&&(C.current.value=B,C.current.setSelectionRange(B.length,B.length)),w.current){let W=w.current.children[d];W&&W.scrollIntoView({block:"nearest"});}},H=d=>{b.current&&!b.current.contains(d.target)&&(m(false),g([]));},K=()=>{C.current&&C.current.value===h&&(g(y),T(null),E());};return react.useEffect(()=>(window.addEventListener("resize",E),window.addEventListener("scroll",E,true),document.addEventListener("mousedown",H),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),document.removeEventListener("mousedown",H);}),[]),react.useEffect(()=>{E();},[i]),jsxRuntime.jsxs(p,{style:l,ref:b,className:`--autocomplete --${t.size||Z.Small} flex aic rel ${f}`.trim(),children:[jsxRuntime.jsx(ne,{ref:C,autoComplete:"off",onChange:O,onKeyDown:V,onFocus:K,...u}),jsxRuntime.jsx(p,{className:"--arrow rel flex aic jcc",children:i.length>0?k.arrowUp:k.arrowDown}),i.length>0&&jsxRuntime.jsx(Fe,{id:R,ref:w,className:"--suggestion-list flex cols abs",items:i.map((d,B)=>({label:d,onClick:z=>{z.preventDefault(),z.stopPropagation(),L(d);},className:P===B?"--current":"",animate:{transition:U.SlideInBottom,curve:G.EaseInOut,delay:core.clamp(.02*B,.02,.5)}}))})]})});yn.displayName="Zuz.AutoComplete";var hl=yn;var xn=react.forwardRef((t,n)=>{let e=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:o,className:s,rest:a}=N(t,r);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:r,style:o,className:`${s} flex`,...a})});xn.displayName="Zuz.Image";var Ze=xn;var bn=react.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,C,b]=hooks.useImage(e??"",s,a),{className:w,style:R,rest:P}=N({fx:u,as:f});return jsxRuntime.jsx(p,{className:`--avatar --${r||Z.Small} --${(o||ar.Circle).toLowerCase()} rel flex aic jcc ${w}`.trim(),style:{background:c||"var(--primary)",...m,...R},...P,children:e?jsxRuntime.jsx(Ze,{src:g,crossOrigin:s,referrerPolicy:a,...i}):jsxRuntime.jsx(A,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});bn.displayName="Zuz.Avatar";var Tl=bn;var Pl=({size:t=5,type:n="dead",label:e="",variant:r=Z.Small,loading:o=false,spinner:s,...a})=>{let{style:u,className:f,rest:l}=N(a);return jsxRuntime.jsxs(p,{style:{...core._(e).isEmpty()?{"--badge-size":t}:{},...u},as:`--badge --${r} --${n} rel flex aic jcc ${f}`.trim(),children:[jsxRuntime.jsx(p,{fx:{transition:U.FadeIn,curve:G.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(be,{type:s})}),core._(e).isEmpty()?jsxRuntime.jsx(p,{as:`--dot --${n}`}):jsxRuntime.jsx(A,{as:"--label",children:e})]})},Rl=Pl;var zl=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let t=new Date,n=t.getDay();return dateFns.addDays(t,(6-n)%7||6)},getDateFormat:()=>{let t=new Date,n=t.getDay();return dateFns.format(dateFns.addDays(t,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],_l=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)})},wn=react.forwardRef((t,n)=>{let{defaultValue:e,variant:r,onChange:o,...s}=t,{style:a,className:u,rest:f}=N(s),[l,c]=react.useState(e||new Date),m=dateFns.startOfMonth(l),i=dateFns.endOfMonth(l),g=dateFns.startOfWeek(m),C=dateFns.endOfWeek(i),b=react.useMemo(()=>dateFns.eachDayOfInterval({start:g,end:C}),[g,C]),w=T=>{o?.(T),c(T);},R=()=>{c(T=>new Date(T.getFullYear(),T.getMonth()-1));},P=()=>{c(T=>new Date(T.getFullYear(),T.getMonth()+1));};return jsxRuntime.jsxs(p,{as:`--calendar flex --${r||"sm"} ${u}`,style:a,children:[jsxRuntime.jsx(p,{as:"--calendar-quick-select flex cols flex:1",children:_l(zl).map(T=>{let h=T.getDate();return jsxRuntime.jsxs($,{onClick:()=>w(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(A,{as:"flex:1",children:T.label}),jsxRuntime.jsx(A,{as:"tar",children:T.getDateFormat()})]},`--dtp-option-label-${T.label}`)})}),jsxRuntime.jsxs(p,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(p,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(A,{as:"flex:1 --calendar-cm bold",children:dateFns.format(l,"MMMM yyyy")}),jsxRuntime.jsx($,{onClick:R,as:"--calendar-chevron",children:k.chevronUpOutline}),jsxRuntime.jsx($,{onClick:P,as:"--calendar-chevron",children:k.chevronDownOutline})]}),jsxRuntime.jsxs(p,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(T=>jsxRuntime.jsx(A,{as:"--calendar-day",children:T},`--calendar-hd-${T}`)),b.map((T,h)=>{let S=dateFns.isSameMonth(T,l),y=dateFns.isSameDay(T,l),x=dateFns.isToday(T);return jsxRuntime.jsx($,{disabled:!S,onClick:()=>w(T),as:["--calendar-day --calendar-dd",`${y?"--calendar-dd-selected":""}`,`${x?"--calendar-dd-current":""}`],children:dateFns.format(T,"d")},`--calendar-day-${h}-${T.getFullYear()}-${T.getMonth()}-${T.getDay()}`)})]})]})]})});wn.displayName="Zuz.Calendar";var Bo=wn;var zt=(e=>(e.Table="table",e.Gooey="gooey",e))(zt||{});var Pn=({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:C,progressBar:b,onPageChange:w,...R}=n,P=react.useRef(null),T=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(d=>`${core.toHash(d,c||6,T)}${i||""}${T}`,[T]),S=react.useMemo(()=>u||"...",[u]),y=react.useRef(null),[x,I]=react.useState({id:c?o?typeof o=="number"?h(o):o:1:o||1,label:o||1});react.useImperativeHandle(t,()=>({setPage:d=>I(d),getPage:d=>x,setProgress:d=>y.current?.setProgress?.(d),getProgress:()=>y.current?.getProgress?.()??0}),[y.current]);let{style:O,className:E,rest:V}=N(R),L=react.useCallback(d=>typeof d=="number"?d:+d.label,[]);if(!e)throw new Error('"itemCount" prop is required');let D=react.useMemo(()=>Math.ceil(e/r),[e,r]),H=react.useMemo(()=>{let d=[],B=Math.max(L(x)-(s||2),1),z=Math.min(L(x)+(s||2),D);B>1&&d.push({id:c?h(1):1,label:1}),B>2&&d.push({id:-1,label:S});for(let W=B;W<=z;W++)d.push({id:c?h(W):W,label:W});return z<D-1&&d.push({id:-1,label:S}),z<D&&d.push({id:c?h(D):D,label:D}),d},[x]),K=react.useCallback(d=>{let B=d;+B.label<1||+B.label>D||(I(B),w?.(B));},[e,r,x]);return H.length<=1&&(g??false)===false?null:jsxRuntime.jsxs(p,{ref:P,as:`--pagination ${C===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${E}`,children:[jsxRuntime.jsx(p,{as:"flex flex:1 aic --pgt-btns",children:(H.length>1?H:[{id:1,label:1},{id:-1,label:S}]).map((d,B,z)=>{let W=(typeof d=="string"?d:d.label)==L(x);return jsxRuntime.jsx($,{disabled:d.id==-1||L(x)==+d.label,className:W?"--current-page":"",onClick:_=>K(d),children:C===true?b===true&&W?jsxRuntime.jsx(ze,{ref:y}):"":typeof d=="string"?d:d.label},`--pg-${B}-${d.id}`)})}),jsxRuntime.jsx(p,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(L(x)-1)*r+1} - `,`${Math.min(L(x)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(p,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx($,{disabled:L(x)<=1,onClick:d=>K({id:c?h(L(x)-1):L(x)-1,label:L(x)-1}),children:k.chevronLeftOutline}),jsxRuntime.jsx($,{disabled:H.length<=1||L(x)==L(H[H.length-1]),onClick:d=>K({id:c?h(L(x)+1):L(x)+1,label:L(x)+1}),children:k.chevronRightOutline})]})]})};Pn.displayName="Zuz.Pagination";var yt=Pn;function Xl(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:C="power",showDots:b=false,autoPlay:w=false,autoPlaySpeed:R=3,onChange:P,...T}=t,{className:h,style:S}=N(T),y=react.useRef(null),x=R/(R>=1e3?1e3:1),I=hooks.useCarousel({total:e.length,initialIndex:u,loop:s,useKeys:f,useWheel:l,onChange:D=>{y.current?.setPage({id:D+1,label:D+1}),y.current?.setProgress(0),P?.(D);}}),{pause:O,resume:E,reset:V}=hooks.useTimer({duration:x,autoStart:w===true,onProgress:D=>{w===true&&y.current?.setProgress(1-D);},onExpired:()=>{w===true&&I.next(),V();}}),L={...S,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${m}deg`,"--carousel-blur":`${g}px`,"--carousel-scale-step":i,"--active-index":I.index,"--carousel-transition":`var(--${C})`};return jsxRuntime.jsxs(p,{ref:n,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${h}`.trim(),style:L,children:[jsxRuntime.jsx(p,{className:"--carousel-stage rel fill flex aic jcc",children:e.map((D,H)=>{let K=H-I.index;if(a==="infinite"){let B=e.length;K=((K+B/2)%B+B)%B-B/2;}let d=H===I.index;return jsxRuntime.jsx(p,{onMouseEnter:()=>d&&O(),onMouseLeave:()=>d&&E(),className:`--carousel-item-wrapper abs ${d?"--is-active":""}`,style:{"--offset":K,zIndex:d?100:100-Math.abs(K),display:Math.abs(K)>5?"none":"flex"},children:r(D,H,I.index)},H)})}),b&&jsxRuntime.jsx(yt,{ref:y,itemCount:e.length,itemsPerPage:1,startPage:u+1,pageRange:e.length,paginationStyle:"gooey",onPageChange:D=>I.goTo(+D.label-1),asDots:true,progressBar:true})]})}var Yl=react.forwardRef(Xl),Ql=Yl;var Rn=(n=>(n.Line="line",n))(Rn||{});var Bn=react.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,...C}=t,{className:b,style:w,rest:R}=N(C),P=react.useRef(null),T=hooks.useResizeObserver(P.current?.parentElement||P),h=typeof r=="number"?r:T.width,S=typeof o=="number"?o:T.height,y={width:h,height:S},x=react.useId(),{pathD:I,areaPathD:O}=hooks.useLineChart(e,y,i+(a||2)),E=react.useRef(null),V=react.useRef(null),[L,D]=react.useState(0),[H,K]=react.useState(0);return react.useEffect(()=>{l&&(E.current&&D(E.current.getTotalLength()),V.current&&K(V.current.getTotalLength()));},[l,I,O,h,S]),jsxRuntime.jsx(p,{ref:P,as:`--chart --${g||"line"}-chart ${b}`.trim(),style:{...w,width:r,height:o},...R,children:h>0&&S>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${h} ${S}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:x,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:u}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:f})]})}),jsxRuntime.jsx("path",{ref:V,d:O,fill:`url(#${x})`,stroke:"none",style:l?{strokeDasharray:H,strokeDashoffset:H}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:H,to:"0",dur:`${c||2}s`,begin:`${m||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:E,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:L,strokeDashoffset:L}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${c||2}s`,begin:`${m||0}s`,fill:"freeze"})})]})})});Bn.displayName="Zuz.Chart";var nc=Bn;var En=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(En||{}),Ln=(l=>(l.Image="img",l.Video="vid",l.Audio="audio",l.Link="link",l.Document="doc",l.Location="loc",l.Contact="contact",l.Event="event",l.Poll="poll",l))(Ln||{});var Mn=react.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}=N(f);return jsxRuntime.jsx(p,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.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&&jsxRuntime.jsx(A,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(p,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(te,{className:"--bm-action",children:k.play}),jsxRuntime.jsx(ze,{progress:.7}),jsxRuntime.jsx(A,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(p,{as:"--bubble-image",children:jsxRuntime.jsx(Ze,{src:r.source})}):null:null,jsxRuntime.jsxs(p,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(A,{className:"--bubble-stamp tar",children:core.timeSince(a)}),o=="me"&&jsxRuntime.jsx(te,{className:`--bubble-status --bs-${s}`,children:s==0?k.pending:s==1?k.done:s==2?k.doneAll:k.doneAll})]})]})})});Mn.displayName="Zuz.Bubble";var ic=Mn;var kn=react.forwardRef((t,n)=>{let{style:e,className:r,rest:o}=N(t);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...o})});kn.displayName="Zuz.Label";var xt=kn;var On=react.forwardRef((t,n)=>{let{name:e,required:r,type:o,value:s,size:a,variant:u,checked:f,onSwitch:l,...c}=t,[m,i]=react.useState(f||false),g=react.useRef(null),{variant:C}=q(true);return react.useImperativeHandle(n,()=>({setChecked(b,w=true){i(b),g.current&&(g.current.checked=b),w&&l&&l(b,s||"cb");},toggle(b=true){g.current&&(g.current.checked=!m),b&&l&&l&&l(!m,s||"cb"),i(!m);}})),jsxRuntime.jsxs(xt,{className:`--${(o||Be.Default).toLowerCase()} ${!o||o==Be.Default?"--checkbox":"--switch"} --${u||C||Z.Small} flex aic jcc ${m?"is-checked":""} rel`.trim(),...c,children:[(!o||o==Be.Default)&&k.check,jsxRuntime.jsx(ne,{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);}})]})});On.displayName="Zuz.CheckBox";var bt=On;var yc=({ref:t,...n})=>{let{code:e,lang:r="tsx",showLines:o=false,highlight:s="",as:a,fx:u,...f}=n,l=react.useRef(null),{className:c,style:m,rest:i}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${a}`,fx:u},l),g=react.useMemo(()=>{let b=new Set;return s.split(",").forEach(w=>{if(w.includes("-")){let[R,P]=w.split("-").map(Number);for(let T=R;T<=P;T++)b.add(T);}else w&&b.add(Number(w));}),b},[s]),C=react.useMemo(()=>{let b=e.split(`
10
+ `);for(;b.length>0&&b[0].trim()==="";)b.shift();for(;b.length>0&&b[b.length-1].trim()==="";)b.pop();let w=b[0]?.match(/^\s*/)?.[0].length||0,R=b.map(T=>{let h=T.match(/^\s*/)?.[0].length||0,S=Math.min(h,w);return T.slice(S)}),P=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(&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((T,h)=>{let S=T.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),y=g.has(h+1),x=[];P.forEach(I=>{S=S.replace(I.re,O=>{let E=`ZUZ_ID_${x.length}_ZUZ`;return x.push(`<span class="--token-${I.name}">${O}</span>`),E});});for(let I=x.length-1;I>=0;I--)S=S.replace(`ZUZ_ID_${I}_ZUZ`,x[I]);return `<div class="--code-line ${o==true?"--with-ln":""} ${y?"--is-highlighted":""}">
11
11
  ${o==true?`<span class="--line-number">${h+1}</span>`:""}
12
12
  <span class="--line-content">${S||" "}</span>
13
- </div>`}).join("")},[e,g]);return jsxRuntime.jsx(m,{as:`--code-block ${c}`,style:p,...f,children:jsxRuntime.jsx("pre",{ref:t,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:C}})})})},bc=xc;var On=({onSelect:t,meta:n,selected:e,disabled:r=false})=>{let o=react.useRef(null),{index:s,icon:a,label:u}=n,[f,l]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.useLayoutEffect(()=>{if(c&&o.current){let{width:p,x:i}=o.current.getBoundingClientRect();l({x:i,width:p}),e&&t(s,p,i,n,true);}},[c,o.current]),react.useEffect(()=>{e&&t(s,f.width,f.x,n,false);},[e]),jsxRuntime.jsxs(A,{disabled:r,onClick:()=>t(s,f.width,f.x,n,false),ref:o,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(j,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(m,{as:"--segment-icon flex aic jcc",children:a}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(m,{className:"--segment-label",children:u||`Item ${s}`})]})};On.displayName="SelectTabItem";var Dn=On;var Vn=react.forwardRef((t,n)=>{let{fx:e,items:r,selected:o,variant:s,disabled:a=false,onSwitch:u,...f}=t,[l,c]=react.useState(o||0),p=hooks.useDelayed(50),i=react.useRef(l),{className:g,style:C,rest:y}=N(f),w=react.useRef(null),R=react.useRef(null),{variant:P}=q(true),T=(h,S,b,x,I)=>{if((I||l!=h&&l!=-2)&&(c(h),i.current=l,queueMicrotask(()=>{p&&u?.(x);})),w.current){let O=R.current?.getBoundingClientRect();w.current.style.setProperty("--w",`${S}px`),w.current.style.setProperty("--x",`${O?b-O.left:b}px`);}};return react.useImperativeHandle(n,()=>({setSelected:h=>{typeof h=="number"&&h!=l&&c(h);}}),[l]),jsxRuntime.jsxs(m,{ref:R,"data-selected":l,className:`${g} --segmented --${s||P||G.Medium} flex aic rel`,style:C,...y,children:[jsxRuntime.jsx(m,{ref:w,className:`--segment-tab --${a?"disabled":"abled"} abs`}),r.map((h,S)=>jsxRuntime.jsx(Dn,{disabled:a,onSelect:T,selected:l==S,meta:{...h,index:S}},`segment-${h.label}-${S}`))]})});Vn.displayName="Zuz.SelectTabs";var ht=Vn;var zn=react.forwardRef((t,n)=>{let{type:e,...r}=t,o=hooks.useDelayed(),{colorScheme:s,setColorScheme:a}=so(),u=react.useCallback(()=>{a(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:f,style:l}=N(r),c=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon: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}],[]),p=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !o||p==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(ht,{className:`--color-scheme --${e}`,onSwitch:({tag:i})=>{a(i);},selected:p,items:c,...r}):jsxRuntime.jsx(A,{onClick:u,style:l,as:`--color-scheme-switch --${r.variant||G.Small} ${f}`.trim(),children:s=="system"?k.colorSchemeSystem:s=="light"?k.colorSchemeLight:k.colorSchemeDark})});zn.displayName="Zuz.ColorScheme";var Oc=zn;var Fn=react.forwardRef((t,n)=>{let[e,r]=react.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 react.useEffect(()=>{let c=localStorage.getItem("--ccnt");r(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:U.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${f||oe.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:o||"This site uses cookies"}),jsxRuntime.jsx(H,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(m,{as:"--footer flex aic",children:[jsxRuntime.jsx(A,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx(A,{onClick:c=>l(0),as:"--reject",children:u||"Cancel"})]})]})});Fn.displayName="Zuz.CookiesConsent";var Ac=Fn;var Un=({ref:t,...n})=>{let{title:e,position:r,margin:o,children:s,show:a,...u}=n,{style:f,className:l,rest:c}=N(u),[p,i]=react.useState(false),[g,C]=react.useState(null),y=react.useMemo(()=>r||oe.Top,[]),w=react.useRef(null),R=react.useRef(null),P=a!==void 0?a:p,T=x=>{},h=typeof ResizeObserver<"u"?new ResizeObserver(T):{observe:()=>{},unobserve:()=>{}},S=hooks.useDimensions(),b=react.useMemo(()=>{if(!R.current)return {left:0,top:0};let x=R.current.previousElementSibling;if(x){let I=x.getBoundingClientRect();switch(h.observe(x),y){case oe.Top:return {left:I.left+I.width/2,top:I.top-(o||25)};case oe.Bottom:return {left:I.left+I.width/2,top:I.top+(o||25)};case oe.Left:return {left:I.left-I.width/2,top:I.top+I.height/2};case oe.Right:return {left:I.right,top:I.top+I.height/2};default:return {left:0,top:0}}}},[R.current,S,y,P,h]);return react.useEffect(()=>{},[]),react.useImperativeHandle(t,()=>({setPosition:x=>{C(x);},show:()=>{},hide:()=>{}})),jsxRuntime.jsxs(m,{ref:w,className:"--with-tooltip rel",onMouseEnter:x=>i(true),onMouseLeave:x=>i(false),children:[s,jsxRuntime.jsx(m,{ref:R,style:{left:(g?g.x:b?.left)+"px",top:(g?g.y:b?.top)+"px"},className:`--tooltip --${y} abs ${l}`.trim(),fx:a!==void 0?void 0:{from:y==oe.Bottom||y==oe.Top?{opacity:0,x:"-50%",y:y==oe.Top?-5:5}:{opacity:0,y:"-50%",x:y==oe.Right?15:-25},to:y==oe.Bottom||y==oe.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:y==oe.Right?10:-20},curve:U.EaseInOut,when:P},children:jsxRuntime.jsx(H,{className:"--text rel",children:e})})]})};Un.displayName="Zuz.ToolTip";var Do=Un;var qn=({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:p,formatValue:i,...g}=n,{className:C,style:y,rest:w}=N(g),R=react.useRef(a||.01).current,P=react.useRef(o||0).current,T=react.useRef(s||1).current,h=react.useRef(r||0).current,S=react.useRef(null),b=react.useRef(null),x=react.useRef(null),I=react.useRef(null);react.useRef(null);let M=react.useRef(null),V=react.useRef(null),E=react.useRef(null),D=react.useRef(null),$=(F,ne,ge)=>(F-ne)/(ge-ne)*100,K=F=>{if(b.current){let ne=parseFloat(F.currentTarget.value);J(ne);let ge=$(ne,parseFloat(F.currentTarget.min),parseFloat(F.currentTarget.max));b.current.style.setProperty("--value",`${ge}`),b.current.setAttribute("data-value",`${ne}`),u&&u(p?+ne.toFixed(2):ne);}},[d,B]=react.useState(false),[z,W]=react.useState(0),[_,Z]=react.useState(0),[Y,Q]=react.useState(false),J=async F=>{let ne=i?i(+F):p?(+F).toFixed(2):Math.round(+F);E.current&&(E.current.textContent=String(ne));},te=F=>{if(d){let ne=F.clientX-z,ge=T-P,wt=ne/200*ge,he=Math.max(P,Math.min(_+wt,T));if(he=Math.round(he/R)*R,J(he),b.current){let Xt=$(he,P,T);b.current.style.setProperty("--value",`${Xt}`),b.current.setAttribute("data-value",`${he}`),V.current&&(V.current.textContent=p?he.toFixed(2):he.toString()),u&&u(he);}}},de=()=>{B(false),document.body.style.cursor="auto";},ve=F=>(F-P)/(T-P)*100,we=F=>{if(!n.showGhostBar||!b.current)return;let ne=b.current.getBoundingClientRect(),ge=F.clientX-ne.left,wt=Math.max(0,Math.min(100,ge/ne.width*100));if(c&&E.current&&(J(ve(S.current?+S.current.value:r)),D.current?.setPosition({x:ge,y:-36})),f){let he=ve(S.current?+S.current.value:r),Xt=Math.min(he,wt),ma=Math.abs(wt-he);b.current.style.setProperty("--ghost-start",`${Xt}`),b.current.style.setProperty("--ghost-width",`${ma}`);}};react.useEffect(()=>{b.current&&b.current.style.setProperty("--value",S.current?`${$(parseFloat(S.current.value),parseFloat(S.current.min),parseFloat(S.current.max))}`:h.toString());},[]),react.useEffect(()=>(d?(document.addEventListener("mousemove",te),document.addEventListener("mouseup",de)):(document.removeEventListener("mousemove",te),document.removeEventListener("mouseup",de)),()=>{document.removeEventListener("mousemove",te),document.removeEventListener("mouseup",de);}),[d]),react.useEffect(()=>{let F=$(r,P,T);b.current?.style.setProperty("--value",`${F}`),J(r);},[r,P,T,E.current]);let se=()=>jsxRuntime.jsxs(m,{ref:b,onMouseEnter:()=>Q(true),onMouseLeave:()=>Q(false),onMouseMove:we,className:`--slider --${e||Jt.Default} ${l?"--knob-hover":""} flex rel ${C}`.trim(),style:{...y},children:[jsxRuntime.jsx(m,{ref:M,className:"--slider-track abs fill"}),f&&jsxRuntime.jsx(m,{ref:I,className:"--slider-ghost abs fill"}),jsxRuntime.jsx(m,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsxRuntime.jsx(m,{ref:x,className:"--slider-knob abs"}),jsxRuntime.jsx(re,{ref:S,onInput:K,className:"abs fill",tabIndex:0,type:e||Jt.Default,defaultValue:h||0,step:R,max:T,min:P})]});if(c===true){let F=i?i(r):p?r.toFixed(2):r;return jsxRuntime.jsx(Do,{ref:D,show:d||Y,position:rt.Top,margin:15,title:jsxRuntime.jsx(ee,{ref:E,children:F}),children:se()})}return se()};qn.displayName="Zuz.Slider";var qe=qn;var Yn=react.forwardRef((t,n)=>{let{src:e,shape:r,size:o,...s}=t,{style:a,className:u,rest:f}=N(s),{canvasRef:l,crop:c,setScale:p,handleMouseDown:i,handleMouseUp:g,handleMouseMove:C}=hooks.useImageCropper(e,o||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return c()},setScale(y){p(y);}})),jsxRuntime.jsxs(m,{as:`--cropper --${r||hooks.CropShape.Circle} ${u}`,style:a,...f,children:[jsxRuntime.jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:i,onMouseUp:g,onMouseLeave:g,onMouseMove:C}),jsxRuntime.jsx(m,{as:"--cropper-slider",children:jsxRuntime.jsx(qe,{onChange:y=>p(y),min:0,max:1,step:.01,value:1})})]})});Yn.displayName="Zuz.Cropper";var Uc=Yn;var Xc=(e=>(e.Circle="circle",e.Square="square",e))(Xc||{});var Jn=react.forwardRef((t,n)=>{let{items:e,maxItems:r}=t,o=react.useMemo(()=>{let u=typeof e=="string",f=u?[]:e;return u&&e.split(",").forEach(l=>{f.push({label:l});}),f},[e]),a=react.useMemo(()=>r&&r>0&&o.length>r-1,[o,r])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-r)]:o;return jsxRuntime.jsx(ze,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(m,{as:"--crumb-chevron",children:k.chevronRightOutline}),items:a.map((u,f,l)=>u.ID=="."?jsxRuntime.jsx(m,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(m,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxRuntime.jsxs(A,{onClick:()=>u.action?.(),className:"--crumb-item",disabled:!l[f+1],children:[u.icon&&jsxRuntime.jsx(j,{as:"--crumb-icon",name:u.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:u.label})]},`${u.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});Jn.displayName="Zuz.Crumb";var Qc=Jn;var ts=react.forwardRef((t,n)=>{let{icon:e,defaultValue:r,value:o,size:s,variant:a,numeric:u,type:f,onConfirm:l,...c}=t,[p,i]=react.useState(false),[g,C]=react.useState(r||null),{style:y,className:w,rest:R}=N(c),P=react.useRef(null),T=react.useRef(null),{reposition:h}=mt(T,{direction:oe.Bottom,offset:2}),S=x=>{u&&(x.currentTarget.value=x.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let x=I=>{let O=I.target,M=P.current?.contains(O),V=T.current?.contains(O);!M&&!V&&i(false);};return p&&document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x);}},[p]),react.useEffect(()=>{let x=I=>{I.key==="Escape"&&p&&(i(false),P.current?.focus());};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[p]);let b=()=>{i(true);};return react.useEffect(()=>{p&&h();},[p,h]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(m,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${w}`,"data-value":g?g.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(j,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(ee,{as:"--date-picker-icon flex aic jcc",children:k.calendar}),jsxRuntime.jsx("input",{ref:P,value:g?dateFns.format(g,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:y,onFocus:b,onInput:S,autoComplete:"new-password",onKeyDown:x=>{x.key=="Enter"&&l?.(x.currentTarget.value);},...R}),jsxRuntime.jsx(m,{"aria-hidden":!p,ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:p,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(Io,{defaultValue:g,onChange:x=>{C(x),i(false);}})})]})})});ts.displayName="Zuz.DatePicker";var tm=ts;var os=react.forwardRef((t,n)=>{let{icon:e,variant:r,position:o}=t;return jsxRuntime.jsx(A,{className:`--fab fixed --${r||G.Large} --${o||"bottomright"}`,children:e||k.plus})});os.displayName="Zuz.Fab";var sm=os;var rs=t=>{let{names:n,strength:e}=t,r={[Ct.Gooey]:o=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${Ct.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[Ct.Gooey]).map(o=>r[o](e))})})};rs.displayName="Zuz.Filters";var lm=rs;var ke=null,ue=null,ss=react.forwardRef((t,n)=>{let{title:e,message:r,transition:o,curve:s,speed:a,type:u,actionPosition:f,spinner:l,loadingMessage:c,onShow:p,onHide:i,...g}=t,{className:C,style:y,rest:w}=N(g),[R,P]=react.useState(e||""),[T,h]=react.useState(r||""),[S,b]=react.useState(null),[x,I]=react.useState(u||xe.Default),O=react.useMemo(()=>core.uuid(12),[]),[M,V]=react.useState(false),E=react.useRef(null),D=react.useRef(null),[$,K]=react.useState(false),[d,B]=react.useState(true),z=react.useRef(null),W=T;react.useImperativeHandle(n,()=>({setLoading(Z){K(Z);},showDialog(Z,Y,Q,J){ke&&(clearTimeout(ke),ue&&clearTimeout(ue),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ue=setTimeout(()=>{E.current.classList.remove("--wobble"),ue=null;},500)),I(xe.Dialog),Y&&h(Y),Z&&P(Z),Q&&b(Q.reduce((fe,te)=>(fe.push({...te,key:te.key||core.uuid(12)}),fe),[])),V(true),setTimeout(()=>J?J():()=>{},1e3);},dialog(Z,Y,Q,J){ke&&(clearTimeout(ke),ue&&clearTimeout(ue),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ue=setTimeout(()=>{E.current.classList.remove("--wobble"),ue=null;},500)),I(xe.Dialog),h(Y),P(Z),Q&&b(Q.reduce((fe,te)=>(fe.push({...te,key:te.key||core.uuid(12)}),fe),[])),V(true),setTimeout(()=>J?J():()=>{},1e3);},error(Z,Y){this.show(Z,Y,xe.Error);},warn(Z,Y){this.show(Z,Y,xe.Warn);},success(Z,Y){this.show(Z,Y,xe.Success);},show(Z,Y,Q){ke&&(clearTimeout(ke),ue&&clearTimeout(ue),D.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${D.current} scale(.9)`.trim();},50),ue=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=D.current||"",ue=null;},500)),ke=setTimeout(()=>{V(false),ke=null,ue=null;},(Y||4)*1e3),I(Q||xe.Default),h(Z),V(true),p?.();},hide(){V(false),i?.();}}));let _=react.useMemo(()=>{let Z={when:M,duration:a||.3,delay:.1};if(x==xe.Dialog){if(o){let{from:Y,to:Q}=st(o,20);return {from:Y,to:Q,curve:s||U.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:U.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:U.Spring,...Z}},[M,x]);return react.useEffect(()=>{z.current&&clearTimeout(z.current),M?B(true):z.current=setTimeout(()=>B(false),1e3);},[M]),x==xe.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(He,{when:M}),jsxRuntime.jsxs(m,{className:`--sheet --sheet-${x.toLowerCase()} ${M?"is-visible":""} ${C} fixed`.trim(),style:y,fx:_,...w,ref:E,children:[jsxRuntime.jsx(Ce,{when:$,spinner:l,message:c}),jsxRuntime.jsxs(m,{className:"--head flex aic rel",children:[jsxRuntime.jsx(m,{className:`--${R?"title":"dot"} flex aic rel`,children:R||""}),jsxRuntime.jsx(A,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(m,{className:`--body flex aic rel ${S?"":"--no-action"}`.trim(),children:d?W:null}),S&&jsxRuntime.jsx(m,{className:`--footer flex aic rel ${f?f==Qt.Center?"jcc":"":"jce"}`.trim(),children:S.map((Z,Y)=>jsxRuntime.jsx(A,{onClick:Q=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${O}-action-${Z.key}`))})]})]}):jsxRuntime.jsx(m,{className:`--sheet --sheet-${x.toLowerCase()} ${C} abs`.trim(),style:y,...w,fx:_,ref:E,children:M?T:null})}),xt=t=>typeof t=="object"&&t!=null&&"setLoading"in t&&"success"in t&&"error"in t;ss.displayName="Zuz.Sheet";var fm=ss;var as=({ref:t,...n})=>{let{name:e,cover:r,spinner:o,errors:s,action:a,children:u,withData:f,beforeSubmit:l,onSubmit:c,onError:p,onSuccess:i,resetOnSuccess:g,...C}=n,{className:y,style:w,rest:R}=N(C),[P,T]=react.useState(false),h=react.useRef(null),S=react.useRef(null),b=react.useRef(null),x=vo(),I=react.useCallback(d=>h.current?h.current.querySelectorAll(d):[],[h.current]),O=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")}),M=d=>{let B=[];return d.querySelectorAll(".--input").forEach(z=>{B.push(z.value);}),B.join("")},V=react.useCallback(d=>{let{required:z}=O(d);if(z){if(d.type=="checkbox"&&d.checked==false)return false;if(d.classList.contains("--otp")){let _=M(d);if(_==""||_.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 _=d.getAttribute("with");switch(_.includes("@")&&(_=_.split("@")[0],_=="match"&&(_=Ne.MatchField)),_.toUpperCase()){case Ne.IPV4:return core._(d.value).isIPv4();case Ne.IPV6:return core._(d.value).isIPv6();case Ne.Email:return core._(d.value).isEmail();case Ne.Uri:try{return new URL(d.value),!0}catch{return false}case Ne.Password:return console.log("Add FORMVALIDATION.Password"),false;case Ne.MatchField:let[Z,Y,Q]=d.getAttribute("with").split("@"),J=document.querySelector(`[name=${Y.trim()}]`);if(!J)return false;switch(Q||"direct-match"){case "if-not-empty":if(J&&!core._(J.value).isEmpty()&&J.value!=d.value)return false;break;case "direct-match":if(J&&J.classList.contains("--otp")&&d.classList.contains("--otp")&&M(J)!=M(d))return false;if(J&&J.value!=d.value)return false;break}break;default:return true}}return true},[h.current]),E=react.useCallback(()=>{let d={},B={},z=null,W=null;if(Array.from(I("[name]")).forEach(_=>{let{name:Z,required:Y,with:Q}=O(_),J=true;(Y||Q)&&(J=V(_)),d[Z]={valid:J,value:_.type=="checkbox"?_.checked==true?_.value:false:_.classList.contains("--otp")?M(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value},B[Z]=_.type=="checkbox"?_.checked==true:_.classList.contains("--otp")?M(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value,J?_.classList.remove("input-with-error"):(z==null&&s&&(z=_,W=s[Z]),_.classList.add("input-with-error"));}),z){let _=z;if(_.classList.contains("--otp"))for(let Z of Array.from(_.querySelectorAll(".--input"))){let Y=Z;if(Y.value==""){Y.focus();break}}else _.focus();}return {error:z!=null,errorMsg:W||"Fix errors to continue...",data:d,payload:B}},[h.current]),D=react.useCallback(()=>{let{error:d,errorMsg:B,payload:z}=E();d?x.error(B):a?react.startTransition(async()=>{l&&l(z),xt(r)?r.setLoading(true):T(true),x.clearAll(),core.withPost(a,{...z,...f||{}}).then(W=>{let _=W;xt(r)?r.setLoading(false):T(false),g&&Array.from(I("[name]")).forEach(Z=>{Z instanceof HTMLInputElement&&(Z.value="");}),i?i(_):(x.clearAll(),x.success(_.message||"Redirecting..."));}).catch(W=>{xt(r)?r.setLoading(false):T(false),p?p(W):x.error(W.message||"We cannot process your request at this time.");});}):c&&c(z);},[a,S.current,h.current]),$=react.useCallback(()=>{let d=I("[type=submit]");!d||d.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):d.forEach(B=>{B.addEventListener("click",D);});},[h.current]),K=react.useMemo(()=>react$1.addPropsToChildren(u,d=>d.props.type=="submit",d=>({ref:b})),[u]);return react.useImperativeHandle(t,()=>({setLoading(d){if(d){S.current?.hide();try{x.clearAll();}catch{}}T(d);},showError(d){typeof d=="string"?x.error(d):S.current.error(d,4);},hideError(){S.current.hide();try{x.clearAll();}catch{}},init(){$();},submit(){D();}})),react.useEffect($,[]),jsxRuntime.jsxs(m,{ref:h,style:w,className:`--form flex rel ${y} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!xt(r)&&jsxRuntime.jsx(Ce,{message:r?r.message||void 0:"working",spinner:o,color:r&&"color"in r?r.color:"#ffffff",when:P}),K]})};as.displayName="Zuz.Form";var Sm=as;var is=t=>{let {ref:n,cols:e,rows:r,gap:o,gapX:s,gapY:a,align:u,justify:f,inline:l,flow:c,autoCols:p,autoRows:i,template:g,...C}=t;react.useRef(null);let {className:w,style:R,rest:P}=N(C),T=S=>typeof S=="number"?`repeat(${S}, 1fr)`:S,h={display:l?"inline-grid":"grid",gridTemplateColumns:T(e),gridTemplateRows:T(r),gap:o,columnGap:s,rowGap:a,alignItems:u,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:c,gridAutoColumns:p,gridAutoRows:i,gridTemplateAreas:g,...R};return jsxRuntime.jsx(m,{ref:n,as:`--grid ${w}`.trim(),style:h,...P})};is.displayName="Zuz.Grid";var Rm=is;var ls=t=>typeof t=="string"&&t.includes("+"),cs={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"},ms={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 us=react.forwardRef(({children:t,keys:n,as:e,className:r,variant:o},s)=>{let{variant:a}=q(true),u=react.useMemo(()=>{if(ls(n)){let f=null;return {keys:String(n).split("+").reduce((c,p,i,g)=>(g[i+1]?c.push(p):f=p.toUpperCase(),c),[]),children:f}}return {keys:n,children:String(t).toUpperCase()}},[n]);return jsxRuntime.jsxs(m,{as:`--keyboard-keys --${o||a||G.Small} flex aic ${e} ${r}`.trim(),children:[(Array.isArray(u.keys)?u.keys:[u.keys]).map(f=>jsxRuntime.jsx("abbr",{title:ms[f],children:cs[f]},f)),jsxRuntime.jsx(ee,{children:u?.children??t})]})});us.displayName="Zuz.KeyboardKeys";var Zo=us;var gs=react.createContext(null),Qe=()=>{let t=react.useContext(gs);if(!t)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return t},Om=({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:p,style:i,rest:g}=N(c),C=hooks.useMediaPlayer(o,o[0]??void 0),y=react.useMemo(()=>({play:k.play,pause:k.pause,prev:k.prev,next:k.next,volumeHigh:k.volumeHigh,volumeMute:k.volumeMute,...n}),[n]),w=react.useMemo(()=>({...C,mode:s,icons:y}),[C,y]);return jsxRuntime.jsx(gs.Provider,{value:w,children:jsxRuntime.jsx(m,{className:`--zuz-media-player ${p}`,style:i,children:e})})},hs=Om;var ys=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")}`},Ft=t=>typeof t=="string"?jsxRuntime.jsx(j,{name:t}):t,xs=()=>{let{mediaRef:t,state:n,controls:e,mode:r}=Qe();return jsxRuntime.jsxs(m,{as:`--mediaplayer-stage rel --mode-${r}`,children:[r==="video"?jsxRuntime.jsx("video",{ref:t,className:"fill",onClick:e.togglePlay}):jsxRuntime.jsx("audio",{ref:t}),n.isLoading&&jsxRuntime.jsx(m,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(be,{})})]})},bs=()=>{let{state:t,defaultArtist:n,defaultTitle:e,defaultCover:r}=Qe();return jsxRuntime.jsxs(m,{as:"--track-info flex aic",children:[jsxRuntime.jsx(_e,{src:t.currentItem?.cover||r||"",as:"--track-cover"}),jsxRuntime.jsxs(m,{as:"flex cols",children:[jsxRuntime.jsx(m,{as:"--track-title",children:t.currentItem?.title||e||"Choose Track"}),jsxRuntime.jsx(m,{as:"--track-artist",children:t.currentItem?.artist||n||"..."})]})]})},vs=()=>{let{state:t,controls:n,icons:e}=Qe();return jsxRuntime.jsxs(m,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx(A,{onClick:n.prev,as:"--prev",children:Ft(e?.prev??k.prev)}),jsxRuntime.jsx(A,{onClick:n.togglePlay,as:"--play-pause",children:Ft(t.isPlaying?e?.pause??k.pause:e?.play??k.play)}),jsxRuntime.jsx(A,{onClick:n.next,as:"--next",children:Ft(e?.next??k.next)})]})},ws=()=>{let{state:t,controls:n,mediaRef:e}=Qe(),r=t.progress*(t.duration||0);return jsxRuntime.jsxs(m,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(m,{as:"--track-current-duration",children:ys(r)}),jsxRuntime.jsx(qe,{value:t.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;n.seek(a);}}),jsxRuntime.jsx(m,{as:"--track-total-duration",children:ys(t.duration)})]})},Ss=()=>{let{state:t,controls:n,icons:e}=Qe();return jsxRuntime.jsxs(m,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx(A,{onClick:()=>n.setIsMuted(),children:Ft(t.isMuted?e?.volumeMute??k.volumeMute:e?.volumeHigh??k.volumeHigh)}),jsxRuntime.jsx(qe,{value:t.volume,className:"h:3 flex:1",onClick:r=>{let o=r.currentTarget.getBoundingClientRect();n.setVolume((r.clientX-o.left)/o.width);}})]})};var Dm=({ref:t,...n})=>jsxRuntime.jsx(hs,{...n,ref:t}),Hm=Object.assign(Dm,{Stage:xs,TrackInfo:bs,Controls:vs,Progress:ws,Volume:Ss}),Vm=Hm;var Ts=react.forwardRef((t,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:o,variant:s}=t;return jsxRuntime.jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:U.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||G.Small} fixed flex`,children:[jsxRuntime.jsx(m,{className:"--ico",children:e?k[ye.Success]:k[ye.Error]}),jsxRuntime.jsx(H,{as:"--message",children:e?r||"internet connection restored :)":o||"no internet connection"})]})});Ts.displayName="Zuz.NetWorkManager";var _m=Ts;var Rs=react.forwardRef((t,n)=>{let{strenthMeter:e,onChange:r,...o}=t;"type"in o&&delete o.type;let{style:s,className:a,rest:u}=N(o),[f,l]=react.useState(false),[c,p]=react.useState(""),i=react.useMemo(()=>core.checkPasswordStrength(c),[c]),g=hooks.useDebounce(C=>{e&&p(C.target.value),r&&r(C);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(m,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(re,{ref:n,type:f?"text":"password",className:a,onChange:g,...u}),jsxRuntime.jsx(A,{tabIndex:-1,onClick:()=>l(C=>!C),className:"--toggle flex aic jcc abs",children:f?k.eye:k.eyeSlash})]}),e&&jsxRuntime.jsxs(m,{as:`flex aic --password-meter --pb-score-${i.score}`,style:s,children:[jsxRuntime.jsxs(m,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(m,{as:`--pbar ${i.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${i.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${i.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${i.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${i.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:i.result})]})]})});Rs.displayName="Zuz.Password";var qm=Rs;var Ns=react.forwardRef((t,n)=>{let{size:e,length:r,mask:o,...s}=t,a=react.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}=N(s),p=i=>{let g=i.currentTarget,C=a.current[parseInt(g.dataset.index)+1],y=a.current[parseInt(g.dataset.index)-1];g.value.length===1&&C?C.focus():g.value.length===0&&y&&y.focus();};return react.useEffect(()=>{a.current=a.current.slice(0,e||r);},[e||r]),jsxRuntime.jsx(m,{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)=>jsxRuntime.jsx(re,{autoComplete:"new-password","data-index":g,ref:C=>{a.current[g]=C;},numeric:true,onChange:p,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${g}`))})});Ns.displayName="Zuz.PinInput";var Jm=Ns;var Bs=react.forwardRef((t,n)=>{let{children:e,className:r,name:o,required:s,type:a,value:u,variant:f,checked:l,onSwitch:c,...p}=t,[i,g]=react.useState(l||false),{variant:C}=q(true),y=react.useRef(null);return jsxRuntime.jsxs(dt,{className:`${r} --${(a||jt.Default).toLowerCase()} --radio${!a||a==jt.Default?"":"card"} --${f||C||G.Small} flex aic rel`.trim(),...p,children:[jsxRuntime.jsx(re,{ref:y,defaultChecked:i,value:u||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:w=>{c&&c(w.target.checked,u||"cb"),g(w.target.checked);}}),jsxRuntime.jsx(m,{className:"--dot rel",children:jsxRuntime.jsx(m,{className:"--rod abs abc"})}),jsxRuntime.jsx(m,{className:"--value",children:e})]})});Bs.displayName="Zuz.Radio";var op=Bs;var Es=react.forwardRef((t,n)=>{let{fx:e,withStyle:r,as:o,reverse:s=false,searchIcon:a=k.search,hideSearchIcon:u=false,clearIcon:f=k.close,hideClearIcon:l=false,onChange:c,onClear:p,...i}=t,{style:g,className:C}=N({as:t.as}),[y,w]=react.useState(""),{variant:R}=q(true),P=react.useRef(null);"type"in t&&delete t.type;let T=S=>{w(S.target.value),c?.(S.target.value);},h=S=>{y.trim()!==""&&(w(""),c?.(""),P.current&&(P.current.value="",t.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>P.current?.focus(),value:()=>P.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{style:g,className:`--search ${s?"--search-rev":""} --${t.variant||R||G.Medium} flex aic ${typeof t.as=="string"&&t.as.includes("abs")?"":"rel"} ${C}`.trim(),children:[jsxRuntime.jsx(re,{ref:P,onChange:T,...i}),t.shortcut&&jsxRuntime.jsx(Zo,{keys:t.shortcut,as:"abs"}),jsxRuntime.jsx(A,{tabIndex:-1,onClick:S=>h(),className:"--send flex aic jcc",variant:t.variant||G.Medium,children:y!==""?!l&&(typeof f=="string"?jsxRuntime.jsx(j,{name:f,as:"--search-action"}):f):!u&&(typeof a=="string"?jsxRuntime.jsx(j,{name:a,as:"--search-action"}):a)})]})});Es.displayName="Zuz.Search";var cp=Es;var Ms=({value:t,updateValue:n,o:e})=>jsxRuntime.jsxs(A,{onClick:r=>n(e),as:"--select-option-item",className:t&&(typeof e=="string"?e:e.value)==(typeof t=="string"?t:t.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(j,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(H,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});Ms.displayName="Option";var ks=Ms;var Ds=({ref:t,...n})=>{let{selected:e,options:r,label:o,name:s,variant:a,search:u,searchPlaceholder:f,maxHeight:l,arrowDownIcon:c=k.arrowDown,arrowUpIcon:p=k.arrowUp,expanded:i,onChange:g,...C}=n,[y,w]=react.useState(e?typeof e=="string"?r.find(d=>d.value===e):e:r[0]),[R,P]=react.useState(false),[T,h]=react.useState(null),S=react.useRef(null),b=react.useRef(null),x=react.useRef(null),I=react.useId(),O=react.useMemo(()=>s||I,[]),{reposition:M}=mt(x,{direction:rt.Bottom,offset:2}),{variant:V}=q(true),{className:E,style:D,rest:$}=N(C),K=d=>{w(d),P(false),g&&g(d);};return react.useImperativeHandle(t,()=>({setSelected:d=>{if(typeof d=="string"){let B=r.find(z=>z.value===d);B&&w(B);}else w(d);},getValue:()=>y||null})),react.useEffect(()=>{if(!R)return;let d=()=>{M();};return window.addEventListener("scroll",d,true),window.addEventListener("resize",M),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",M);}},[R,M]),react.useEffect(()=>{if(!R){b.current&&(b.current.value=""),h(null);return}b.current?.focus(),M();let d=z=>{x.current&&!x.current.contains(z.target)&&P(false);},B=setTimeout(()=>{document.addEventListener("click",d);},0);return ()=>{clearTimeout(B),document.removeEventListener("click",d);}},[R,M]),jsxRuntime.jsxs(m,{className:`--select --${i==true?"expanded":""} --${a||V} ${s?`--${s}`:""} rel`.trim(),name:O,children:[jsxRuntime.jsxs(A,{ref:S,"data-value":y?typeof y=="string"?y:y.value:y||"-1",className:`--selected flex aic rel ${E}`.trim(),withLabel:false,style:D,onClick:d=>{d.stopPropagation(),P(B=>!B);},...$,children:[jsxRuntime.jsx(H,{className:"--label",children:y?typeof y=="string"?y:y.label:o||"Choose"}),jsxRuntime.jsx(m,{className:"--svg-arrow rel flex aic jcc",children:R?typeof p=="string"?jsxRuntime.jsx(j,{name:p,as:"--search-action"}):p:typeof c=="string"?jsxRuntime.jsx(j,{name:c,as:"--search-action"}):c})]}),jsxRuntime.jsxs(m,{id:O,className:"--options-list flex cols abs","aria-hidden":!R,style:{maxHeight:l||"auto"},ref:x,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:R,duration:.05},children:[u&&jsxRuntime.jsx(m,{as:"--select-search --sticky",children:jsxRuntime.jsx(re,{ref:b,onChange:d=>{h(d.target.value==""?null:d.target.value);},className:"--search-input",placeholder:f||"Search..."})}),(T==null?r:r.filter(d=>d.label.toLowerCase().includes(T.toLowerCase())||d.value.toLowerCase().includes(T.toLowerCase()))).map(d=>jsxRuntime.jsx(ks,{updateValue:K,value:y,o:d},`option-${(typeof d=="string"?d:d.label).replace(/\s+/g,"-")}-${typeof d=="string"?d:d.value}`))]})]})};Ds.displayName="Zuz.Select";var gp=Ds;var Hs=react.forwardRef((t,n)=>jsxRuntime.jsx(gt,{type:Ie.Switch,...t,ref:n}));Hs.displayName="Zuz.Switch";var yp=Hs;var As=t=>{let{idx:n,id:e,as:r,weight:o,style:s,value:a,render:u,resize:f,sortBy:l,sortable:c,onSort:p}=t,[i,g]=react.useState(0),C=()=>{c&&(p?.(String(e),i==1?-1:1),g(y=>y==1?-1:1));};return jsxRuntime.jsxs(m,{style:{flex:o||1,...s},as:`--col flex aic ${r||""} ${c?"--sortable":""}`,onClick:C,children:[jsxRuntime.jsx(m,{children:a}),n==-1&&c&&l==e&&jsxRuntime.jsx(m,{as:"--arrow flex aib",children:i==1?k.arrowUp:k.arrowDown})]})};As.displayName="Zuz.Column";var Wt=As;var zs=t=>{let{index:n,pubsub:e,schema:r,data:o,ids:s,styles:a,animate:u,sortBy:f,selectable:l,tableRef:c,loading:p,rowClassName:i,onSort:g,onRowClick:C,onSelect:y,onContextMenu:w}=t,R=hooks.useDelayed(),P=react.useMemo(()=>({transition:X.SlideInBottom,curve:U.EaseInOut,delay:.02*(n+1)}),[]),T=react.useRef(null),h=(b,x)=>{n==-1?e.emit(`ALL_ROWS_${b?"CHECKED":"UNCHECKED"}`,b):(y&&y(o,b),e.emit(`ROW_${b?"CHECKED":"UNCHECKED"}`,b,x));},S=(b,x,I)=>jsxRuntime.jsx(Wt,{idx:b,id:x,as:"--selector",pubsub:e,value:jsxRuntime.jsx(gt,{value:I,ref:T,onSwitch:h,type:Ie.Default})});return react.useEffect(()=>{let b=(M,V)=>{T.current?.setChecked(M,false);},x=(M,V)=>{let E=false;c?.current&&c.current.querySelectorAll(".--row").forEach(D=>{let $=D;if(!$.classList.contains("--row-head")){let K=$.querySelector(".--selector input[type=checkbox]");K&&K.checked&&!E&&(E=K.checked);}}),T.current.setChecked(E,false);},I=M=>{T.current?.setChecked(M,false),y&&y(o,M);},O=M=>{T.current?.setChecked(M,false),y&&y(o,M);};return n==-1?(e.on("ROW_CHECKED",b),e.on("ROW_UNCHECKED",x),()=>{e.off("ROW_CHECKED",b),e.off("ROW_UNCHECKED",x);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",O),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",O);})},[]),jsxRuntime.jsxs(m,{onContextMenu:b=>w?w(b,o):null,onClick:b=>C?C(b,t.data):()=>{},...u?{fx:{...P,when:R}}:{},as:`--row flex aic ${C?"--row-clickable":""} ${n==-1?"--row-head":""} ${i||""}`,children:[n==-1&&r.map((b,x)=>{let{renderWhenHeader:I,render:O,value:M,...V}=b;return jsxRuntime.jsxs(react.Fragment,{children:[l&&x==0&&S(-1,`--selector-${b.id}`,"all"),jsxRuntime.jsx(Wt,{idx:-1,onSort:g,sortBy:f,value:M,...V,pubsub:e,style:a[b.id]})]},`--col-${b.id}`)}),p&&n>-1&&jsxRuntime.jsx(m,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!p&&n>-1&&s&&o&&r.map((b,x)=>jsxRuntime.jsxs(react.Fragment,{children:[l&&x==0&&S(x,`--selector-${b.id}`,b.id.toString()),s.includes(String(b.id))?jsxRuntime.jsx(Wt,{pubsub:e,idx:x,id:String(b.id),style:a[String(b.id)],value:b.render?b.render(o,n):o[String(b.id).includes(".")?String(b.id).split(".").reverse()[0]:b.id]}):null]},`--${String(b.id)}-val-${x}`))]})};zs.displayName="Zuz.Row";var Gt=zs;var Ks=(t,n)=>{let{schema:e,rows:r,rowCount:o,rowsPerPage:s,currentPage:a,pagination:u,paginationHash:f,showPaginationOnZeroPageCount:l,animateRows:c,header:p,rowClassName:i,selectableRows:g,hoverable:C,sortBy:y,loading:w,loadingRowCount:R,loadingMessage:P,spinner:T,emptyMessage:h,onSort:S,onRowClick:b,onRowSelectToggle:x,onPageChange:I,onRowContextMenu:O,...M}=t,V=react.useRef(null),E=react.useMemo(()=>e.reduce((se,F)=>(se[F.id]={flex:F.weight||1,...F.w&&{width:F.w},...F.maxW&&{maxWidth:F.maxW},...F.minW&&{minWidth:F.minW},...F.h&&{height:F.h},...F.maxH&&{maxHeight:F.maxH},...F.minH&&{minHeight:F.minH}},se),{}),[e]),D=react.useMemo(()=>Object.keys(E),[e]),$=react.useMemo(()=>p??true,[p]),{style:K,className:d,rest:B}=N(M),z=react.useRef(null),W=react.useMemo(()=>new core.PubSub,[]),_=react.useRef(r.map(()=>core.uuid(8))),[Z,Y]=react.useState(y||null),[Q,J]=react.useState(P||"loading"),fe=react.useMemo(()=>!w&&r&&r.length==0,[w,r]),te=react.useCallback(()=>h?typeof h=="function"?jsxRuntime.jsx(h,{}):h:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[w,r]);react.useEffect(()=>{_.current=r.map(()=>core.uuid(8));},[r]);let de=(se,F)=>{Y(se),S?.(se,F);},ve=(o||(r?r.length:0))/(s||10),we=react.useMemo(()=>l||ve>1?jsxRuntime.jsx(ft,{hash:f,ref:V,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:o||(r?r.length:0),itemsPerPage:s||10}):null,[a,o]);return react.useImperativeHandle(n,()=>({setLoading(se){}})),jsxRuntime.jsxs(m,{as:`--table ${C??true?"--hoverable":""} flex cols rel ${d}`,ref:z,children:[$==true&&jsxRuntime.jsx(Gt,{sortBy:Z,onSort:de,tableRef:z,pubsub:W,selectable:g,index:-1,schema:e,loading:true,styles:E}),w&&jsxRuntime.jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(be,{type:T||ie.Simple}),Q&&jsxRuntime.jsx(H,{as:"--table-loading-message",children:Q})]}),w&&Array(R||5).fill({}).map((se,F)=>jsxRuntime.jsx(Gt,{tableRef:z,index:F,pubsub:W,schema:e,styles:E,loading:true,animate:c,onRowClick:b},`--trow-loading-${F}-${e[0].id}`)),!w&&r&&r.map((se,F)=>jsxRuntime.jsx(Gt,{tableRef:z,pubsub:W,loading:false,index:F,schema:e,ids:D,styles:E,animate:c,data:se,onRowClick:b,rowClassName:i,selectable:g,onSelect:x,onContextMenu:O},`--trow-${_.current[F]||F}-${e[0].id}`)),fe&&te(),jsxRuntime.jsx(m,{"aria-hidden":!u||!we,...c?{fx:{transition:X.SlideInBottom,curve:U.EaseInOut,delay:.02*(r.length+1),when:!w&&r&&u&&we!=null}}:{},as:"--row flex aic --row-footer",children:u&&we?we:null})]})};Ks.displayName="Zuz.Table";var Ep=react.forwardRef(Ks),Lp=Ep;var kp=({ref:t,...n})=>{let{title:e,items:r}=n,[o,s]=react.useState(0),a=(u,f,l)=>{u.preventDefault(),s(f),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(m,{ref:t,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:e}),jsxRuntime.jsx(ze,{items:r.map((u,f)=>jsxRuntime.jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,f,u.tag),href:`#${u.tag}`,children:u.label}))})]})},Op=kp;var Ws=({isActive:t,transitionType:n,speed:e,width:r,render:o,content:s,onHeightChange:a})=>{let u=react.useRef(null),f=hooks.useResizeObserver(u);react.useEffect(()=>{t&&f.height>0&&a(f.height);},[t,f.height]);let l=react.useMemo(()=>{let c={flexShrink:0,height:"fit-content"};return n==="fade"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,visibility:t?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:t?1:0}:n==="scale"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,transform:`scale(${t?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:t?1:0}:c},[t,n,r,e]);return jsxRuntime.jsx(m,{ref:u,style:{...l},className:"--content",children:o||t?s:null})};Ws.displayName="Zuz.TabBody";var Gs=Ws;var Xs=({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,p]=react.useState(0),i=react.useRef(null),g=hooks.useResizeObserver(i),C=react.useMemo(()=>core.uuid(8),[]),[y,w]=react.useState("auto"),R=react.useMemo(()=>g.width>0,[g.width]);react.useImperativeHandle(t,()=>({setTab:x=>p(x)}));let P=react.useMemo(()=>e.map(x=>({...x,key:x.key||core.uuid(8)})),[e]),{style:T,className:h,rest:S}=N({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),b=()=>{if(!R)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 jsxRuntime.jsxs(m,{ref:i,style:T,className:`--tabview --${a} flex cols ${h}`,children:[jsxRuntime.jsx(ht,{as:"--tabview-head",onSwitch:x=>{p(x.index);let I=P.find(O=>O.tag==x.tag);I&&I.onSelect&&(I.onSelect(I,x.index),u?.(I,x.index));},selected:c,items:P.reduce((x,I,O)=>(x.push({icon:I.icon,index:O,label:I.label,tag:I.tag}),x),[])}),jsxRuntime.jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:y,transition:R?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:R?1:0},children:jsxRuntime.jsx(m,{className:"--track",style:{...b()},children:P.map((x,I)=>jsxRuntime.jsx(Gs,{isActive:I===c,transitionType:f,speed:r,width:g.width,render:o||I===c,onHeightChange:O=>I===c&&w(O),content:x.body},`tab-body-${x.key||I}-${C}`))})})]})};Xs.displayName="Zuz.TabView";var Kp=Xs;var qp=({ref:t,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[u,f]=react.useState([{type:"output",content:r}]),[l,c]=react.useState(""),p=react.useRef(null),i=react.useRef(null),{variant:g}=q(true);react.useEffect(()=>{p.current&&(p.current.scrollTop=p.current.scrollHeight);},[u]);let C=h=>{let S=typeof h=="string"?{type:"output",content:h}:h;f(b=>{let x=[...b,S];return x.length>1e3?x.slice(-1e3):x});},y=()=>f([]);react.useImperativeHandle(t,()=>({write:C,clear:y}));let w=async h=>{let[S,...b]=h.split(" "),x=S.toLowerCase();return n&&n[x]?await n[x](b):e?await e(h):`command not found: ${S}`},R=h=>{let S=/\u001b\[(\d+)m/g,b=[],x={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,O="#d4d4d4",M=false,V;for(;(V=S.exec(h))!==null;){let D=h.slice(I,V.index);D&&b.push({text:D,color:O,bold:M});let $=V[1];$==="0"?(O="#d4d4d4",M=false):$==="1"?M=true:x[$]&&(O=x[$]),I=S.lastIndex;}let E=h.slice(I);return E&&b.push({text:E,color:O,bold:M}),b},P=(h,S)=>h.includes("\x1B")?R(h).map((b,x)=>jsxRuntime.jsx(ee,{style:{color:b.color||"#d4d4d4",fontWeight:b.bold?"bold":"normal"},children:b.text},`--terminal-msg-${x}-${b.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(ee,{style:{color:S==="error"?"#ff5f56":S==="command"?"#00ff00":"#d4d4d4"},children:h}),T=async h=>{if(h.key==="Enter"&&l.trim()){let S=l.trim(),b=[...u,{type:"command",content:`${o}${S}`}];c(""),f(b);let x=await w(S);f(I=>[...I,{type:"output",content:x}]);}};return jsxRuntime.jsxs(m,{as:`--zuz-terminal --${s||g||G.Medium} flex cols ${a.className}`,onClick:()=>i.current?.focus(),children:[jsxRuntime.jsx(m,{ref:p,className:"--terminal-log",children:u.map((h,S)=>jsxRuntime.jsx(m,{children:jsxRuntime.jsx(H,{children:P(h.content,h.type)})},S))}),jsxRuntime.jsxs(m,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(re,{ref:i,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||g||G.Medium,onChange:h=>c(h.target.value),onKeyDown:T})]})]})},Xp=qp;var Yp=({meta:t})=>jsxRuntime.jsxs(A,{as:"flex aic --command-item",children:[t.icon&&jsxRuntime.jsx(j,{name:t.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:t.label})]}),Qp=({position:t,onSelect:n,commands:e,visible:r})=>jsxRuntime.jsx(m,{"aria-hidden":!r,fx:{transition:X.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...t},children:e.map(o=>jsxRuntime.jsx(Yp,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),js=Qp;var oa=react.forwardRef((t,n)=>{let{autoResize:e,maxHeight:r,variant:o,resize:s="none",command:a,commands:u,onInput:f,cmd:l,renderDropdown:c,value:p,defaultValue:i,...g}=t,C=react.useRef(null),y=react.useRef(null),{variant:w}=q(true),{style:R,className:P,rest:T}=N(g),{showDropdown:h,dropdownPosition:S,handleKeyDown:b,handleInput:x,handleCommandSelect:I}=hooks.useCommandActions({command:a,commands:u,cmd:l,ref:C}),O=react.useCallback(()=>{let V=C.current;!V||!e||(y.current&&cancelAnimationFrame(y.current),y.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(r){let D=parseInt(r.toString(),10);isNaN(D)||(E=Math.min(E,D));}V.style.height=`${E}px`,V.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),M=V=>{f?.(V),x(V),O();};return react.useEffect(()=>{O();},[p,i,O]),react.useEffect(()=>{e&&C.current&&O();},[e,O]),react.useEffect(()=>()=>{y.current&&cancelAnimationFrame(y.current);},[]),jsxRuntime.jsxs(m,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${o||w||G.Medium} flex ${P}`.trim(),style:{...R,resize:s,height:e?"auto":R?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:b,onInput:M,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),C.current=V;},value:p,defaultValue:i,...T}),c?c({show:h,position:S,commands:u||[],onSelect:I}):u&&u.length>0&&jsxRuntime.jsx(js,{visible:h,commands:u,onSelect:I,position:S})]})});oa.displayName="Zuz.TextArea";var ou=oa;var na=react.forwardRef((t,n)=>{let{as:e,value:r,color:o,direction:s,...a}=t,u=react.useRef(null),[f,l]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(c){f.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),u.current){let p=c.toString().split("");u.current.querySelectorAll(".--wheel-char").forEach((i,g)=>{let C=p[g];if(i instanceof HTMLElement){i.setAttribute("data-value",C);let y=i.querySelector(".--wheel-char-track");y instanceof HTMLElement&&(y.style.setProperty("--v",C),y.offsetWidth);}});}}})),react.useEffect(()=>{l(r||0);},[r]),jsxRuntime.jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:u,...a,children:[(f||0).toString().split("").map((c,p)=>isNaN(parseInt(c,10))?jsxRuntime.jsx(ee,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${p}`):jsxRuntime.jsx(ee,{"data-value":c,className:`--wheel-char grid ${p>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(ee,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsxRuntime.jsx(ee,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((i,g)=>jsxRuntime.jsx(ee,{children:i},`${p}--${g}`)),jsxRuntime.jsx(ee,{children:!s||s==="down"?9:0})]})},`wheel-char-${p}`)),o&&jsxRuntime.jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});na.displayName="Zuz.TextWheel";var cu=na;var jo=react.forwardRef((t,n)=>{let{as:e,meta:r,nodes:o,icons:s,onSelect:a,treeTag:u,selected:f,roots:l,expanded:c,...p}=t,{tag:i,label:g,icon:C,under:y,isHead:w}=r,R=react.useMemo(()=>l.includes(i),[l]),[P,T]=react.useState(c),h=()=>{localStorage.setItem(`--tn${u}-${i}`,P?"0":"1"),T(!P);};react.useEffect(()=>{c||R&&!localStorage.getItem(`--tn${u}-${i}`)?(localStorage.setItem(`--tn${u}-${i}`,"1"),T(true)):T(localStorage.getItem(`--tn${u}-${i}`)=="1");},[]);let S=react.useMemo(()=>o.filter(b=>b.under==i),[o,i]);return jsxRuntime.jsxs(m,{className:`--treenode ${R?"--is-root":""} --treenode-${i} flex cols`,children:[jsxRuntime.jsxs(m,{className:`--node --node-${i} flex aic ${f==i?" --selected":""}`,children:[jsxRuntime.jsx(A,{skeleton:p.skeleton,onClick:h,className:"--node-aro-btn",disabled:S.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(j,{skeleton:p.skeleton,className:"--node-aro-icon",name:S.length==0?s?.arrowDisabled||s?.arrowClose:P?s?.arrowOpen:s?.arrowClose}):S.length==0?k.chevronBottom:P?k.chevronBottom:k.chevronRight}),jsxRuntime.jsxs(A,{className:"--node-meta flex aic",onClick:b=>a(i),children:[(s?.nodeOpen&&s?.nodeClose||R&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(j,{skeleton:p.skeleton,className:`--node-icon ${R?"--icon-root":""}`,name:C||(P?R&&s?.rootOpen||s.nodeOpen:R&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${R?"--node-label-root":""}`.trim(),skeleton:p.skeleton,children:g})]})]}),P&&S.length>0&&jsxRuntime.jsx(m,{className:`--sub-node tree-sub-node-${i} flex cols`,children:S.map(b=>jsxRuntime.jsx(jo,{treeTag:u,selected:f,onSelect:a,icons:s,roots:l,expanded:b.expanded||false,meta:b,nodes:o},`--node-${b.tag}`))})]})});jo.displayName="TreeItem";var aa=jo;var la=react.forwardRef((t,n)=>{let{as:e,nodes:r,onNodeSelect:o,tag:s,icons:a,roots:u,selected:f,...l}=t,[c,p]=react.useState(f);react.useImperativeHandle(n,()=>({getSelected:()=>c}),[o]);let i=g=>{p(g),o&&o(g);};return react.useEffect(()=>{c!=f&&p(f);},[f]),jsxRuntime.jsx(m,{className:"--treeview flex cols",children:r.filter(g=>u.includes(g.tag)).map(g=>jsxRuntime.jsx(aa,{treeTag:s?`-${s}`:"",selected:c,onSelect:C=>i(C),icons:a,meta:g,roots:u,expanded:g.expanded||false,skeleton:l.skeleton,nodes:r},`--node-${g.tag}`))})});la.displayName="Zuz.TreeView";var yu=la;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
- Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkSPYDV5Q4_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkSPYDV5Q4_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkSPYDV5Q4_cjs.h}});exports.ALERT=ye;exports.AVATAR=nr;exports.Accordion=Ki;exports.ActionBar=Yi;exports.Alert=ji;exports.AutoComplete=yl;exports.Avatar=Pl;exports.Badge=Il;exports.Box=m;exports.Bubble=lc;exports.BubbleMediaType=Bn;exports.BubbleStatus=Nn;exports.Button=A;exports.CHART=Tn;exports.CHECKBOX=Ie;exports.COLORTHEME=wu;exports.Calendar=Io;exports.Carousel=Jl;exports.Chart=sc;exports.CheckBox=gt;exports.CodeBlock=bc;exports.ColorScheme=Oc;exports.ContextMenu=lo;exports.CookiesConsent=Ac;exports.Cover=Ce;exports.CropShape=Xc;exports.Cropper=Uc;exports.Crumb=Qc;exports.DATATYPE=Tu;exports.DIALOG=Ge;exports.DIALOG_ACTION_POSITION=sr;exports.DRAWER_SIDE=le;exports.DatePicker=tm;exports.Dialog=po;exports.Drawer=xo;exports.FILTER=Ct;exports.FORMVALIDATION=Ne;exports.FORMVALIDATION_STYLE=Pu;exports.Fab=sm;exports.Filters=lm;exports.Form=Sm;exports.Grid=Rm;exports.Group=co;exports.Icon=j;exports.Image=_e;exports.Input=re;exports.KeyboardKeys=Zo;exports.KeysLabelMap=ms;exports.KeysMap=cs;exports.Label=dt;exports.LayersProvider=ao;exports.List=ze;exports.MediaPlayer=Vm;exports.NetworkStatus=_m;exports.ORIGIN=nt;exports.OriginType=Su;exports.Overlay=He;exports.POSITION=rt;exports.PROGRESS=Iu;exports.Pagination=ft;exports.PaginationStyle=Vt;exports.Password=qm;exports.PinInput=Jm;exports.Position=oe;exports.ProgressBar=Ae;exports.RADIO=jt;exports.Radio=op;exports.SHEET=xe;exports.SHEET_ACTION_POSITION=Qt;exports.SKELETON=vu;exports.SLIDER=Jt;exports.SORT=Cu;exports.SPINNER=ie;exports.ScrollView=fo;exports.Search=cp;exports.Select=gp;exports.SelectTabs=ht;exports.Sheet=fm;exports.Slider=qe;exports.SnackPosition=Lt;exports.SnackStyle=Zr;exports.SnackType=Et;exports.Span=ee;exports.Spinner=be;exports.Status=Ru;exports.Switch=yp;exports.TRANSITIONS=X;exports.TRANSITION_CURVES=U;exports.TabView=Kp;exports.Table=Lp;exports.TableOfContents=Op;exports.Terminal=Xp;exports.Text=H;exports.TextWheel=cu;exports.Textarea=ou;exports.ThemeProvider=ba;exports.ToastDefaultTitle=Kr;exports.ToastPosition=Lt;exports.ToastProvider=bo;exports.ToastStyle=Zr;exports.ToastType=Et;exports.ToolTip=Do;exports.TreeView=yu;exports.Variant=G;exports.animationTransition=st;exports.buildClassString=eo;exports.buildWithStyles=lr;exports.css=Uu;exports.getAnimationCurve=to;exports.getAnimationTransition=qu;exports.getZuzMap=ua;exports.isKeyCombination=ls;exports.setZuzMap=ir;exports.useBase=N;exports.useContextMenu=vi;exports.useDialog=Ci;exports.useDrawer=Ri;exports.useFx=ce;exports.useMorph=Bi;exports.usePosition=mt;exports.useSnack=Hi;exports.useToast=vo;
13
+ </div>`}).join("")},[e,g]);return jsxRuntime.jsx(p,{as:`--code-block ${c}`,style:m,...f,children:jsxRuntime.jsx("pre",{ref:t,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:C}})})})},xc=yc;var Hn=({onSelect:t,meta:n,selected:e,disabled:r=false})=>{let o=react.useRef(null),{index:s,icon:a,label:u}=n,[f,l]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.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]),react.useEffect(()=>{e&&t(s,f.width,f.x,n,false);},[e]),jsxRuntime.jsxs($,{disabled:r,onClick:()=>t(s,f.width,f.x,n,false),ref:o,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(Q,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(p,{as:"--segment-icon flex aic jcc",children:a}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(p,{className:"--segment-label",children:u||`Item ${s}`})]})};Hn.displayName="SelectTabItem";var Vn=Hn;var $n=react.forwardRef((t,n)=>{let{fx:e,items:r,selected:o,variant:s,disabled:a=false,onSwitch:u,...f}=t,[l,c]=react.useState(o||0),m=hooks.useDelayed(50),i=react.useRef(l),{className:g,style:C,rest:b}=N(f),w=react.useRef(null),R=react.useRef(null),{variant:P}=q(true),T=(h,S,y,x,I)=>{if((I||l!=h&&l!=-2)&&(c(h),i.current=l,queueMicrotask(()=>{m&&u?.(x);})),w.current){let O=R.current?.getBoundingClientRect();w.current.style.setProperty("--w",`${S}px`),w.current.style.setProperty("--x",`${O?y-O.left:y}px`);}};return react.useImperativeHandle(n,()=>({setSelected:h=>{typeof h=="number"&&h!=l&&c(h);}}),[l]),jsxRuntime.jsxs(p,{ref:R,"data-selected":l,className:`${g} --segmented --${s||P||Z.Medium} flex aic rel`,style:C,...b,children:[jsxRuntime.jsx(p,{ref:w,className:`--segment-tab --${a?"disabled":"abled"} abs`}),r.map((h,S)=>jsxRuntime.jsx(Vn,{disabled:a,onSelect:T,selected:l==S,meta:{...h,index:S}},`segment-${h.label}-${S}`))]})});$n.displayName="Zuz.SelectTabs";var vt=$n;var Fn=react.forwardRef((t,n)=>{let{type:e,...r}=t,o=hooks.useDelayed(),{colorScheme:s,setColorScheme:a}=io(),u=react.useCallback(()=>{a(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:f,style:l}=N(r),c=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon: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}],[]),m=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !o||m==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(vt,{className:`--color-scheme --${e}`,onSwitch:({tag:i})=>{a(i);},selected:m,items:c,...r}):jsxRuntime.jsx($,{onClick:u,style:l,as:`--color-scheme-switch --${r.variant||Z.Small} ${f}`.trim(),children:s=="system"?k.colorSchemeSystem:s=="light"?k.colorSchemeLight:k.colorSchemeDark})});Fn.displayName="Zuz.ColorScheme";var kc=Fn;var Kn=react.forwardRef((t,n)=>{let[e,r]=react.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 react.useEffect(()=>{let c=localStorage.getItem("--ccnt");r(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(p,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:G.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${f||ae.Left} flex cols`,children:[jsxRuntime.jsx(A,{as:"--title",children:o||"This site uses cookies"}),jsxRuntime.jsx(A,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(p,{as:"--footer flex aic",children:[jsxRuntime.jsx($,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx($,{onClick:c=>l(0),as:"--reject",children:u||"Cancel"})]})]})});Kn.displayName="Zuz.CookiesConsent";var Vc=Kn;var Gn=({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}=N(l),g=r||ae.Top;react.useRef(null);let [b,w]=react.useState(false);react.useRef(6);let P=u===true||b,h=`--anchor-${react.useId().replace(/:/g,"")}`,{tooltip:S}=q(true),y=react.useMemo(()=>{let I=false;return react$1.addPropsToChildren(a,O=>{let E=O.props.className?.includes(s);return E&&(I=true),E||!I},(O,E)=>{let V=E.props.className?.includes(s),L=O===0,D={};return (V||L)&&(D.style={...E.props.style,anchorName:h}),L&&(D.onMouseEnter=H=>{w(true),E.props.onMouseEnter?.(H);},D.onMouseLeave=H=>{w(false),E.props.onMouseLeave?.(H);}),D})},[a,s,h]),x=ie({transition:g==ae.Top?U.SlideInTop:g==ae.Bottom?U.SlideInBottom:g==ae.Left?U.SlideInLeft:U.SlideInRight,when:P,duration:.2,offset:o+6,margin:g==ae.Top||g==ae.Left?-o:o,curve:S?.curve||G.EaseInOut});return react.useImperativeHandle(t,()=>({show:()=>w(true),hide:()=>w(false),setPosition:()=>{}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[y,jsxRuntime.jsx(p,{style:{positionAnchor:h,...x.style,...g===ae.Top||g===ae.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${P} --${f||S?.variant||Z.Small} --${g} abs ${m}`.trim(),children:typeof e=="string"?jsxRuntime.jsx(A,{as:"--text rel",children:e}):e})]})};Gn.displayName="Zuz.ToolTip";var Vo=Gn;var qn=({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:C,style:b,rest:w}=N(g),R=react.useRef(a||.01).current,P=react.useRef(o||0).current,T=react.useRef(s||1).current,h=react.useRef(r||0).current,S=react.useRef(null),y=react.useRef(null),x=react.useRef(null),I=react.useRef(null);react.useRef(null);let E=react.useRef(null),V=react.useRef(null),L=react.useRef(null),D=react.useRef(null),H=(ee,re,Ce)=>(ee-re)/(Ce-re)*100,K=ee=>{if(y.current){let re=parseFloat(ee.currentTarget.value);X(re);let Ce=H(re,parseFloat(ee.currentTarget.min),parseFloat(ee.currentTarget.max));y.current.style.setProperty("--value",`${Ce}`),y.current.setAttribute("data-value",`${re}`),u&&u(m?+re.toFixed(2):re);}},[d,B]=react.useState(false),[z,W]=react.useState(0),[_,F]=react.useState(0),[J,Y]=react.useState(false),X=async ee=>{let re=i?i(+ee):m?(+ee).toFixed(2):Math.round(+ee);L.current&&(L.current.textContent=String(re));},oe=ee=>{if(d){let re=ee.clientX-z,Ce=T-P,Te=re/200*Ce,me=Math.max(P,Math.min(_+Te,T));if(me=Math.round(me/R)*R,X(me),y.current){let at=H(me,P,T);y.current.style.setProperty("--value",`${at}`),y.current.setAttribute("data-value",`${me}`),V.current&&(V.current.textContent=m?me.toFixed(2):me.toString()),u&&u(me);}}},he=()=>{B(false),document.body.style.cursor="auto";},ve=ee=>(ee-P)/(T-P)*100,we=ee=>{if(!y.current)return;let re=y.current.getBoundingClientRect(),Ce=ee.clientX-re.left,st=Math.max(0,Math.min(100,Ce/re.width*100));if(c&&L.current){let Te=S.current?+S.current.value:r;X(Te*100);}if(f){let Te=ve(S.current?+S.current.value:r),me=Math.min(Te,st),at=Math.abs(st-Te);y.current.style.setProperty("--ghost-start",`${me}`),y.current.style.setProperty("--ghost-width",`${at}`);}};react.useEffect(()=>{y.current&&y.current.style.setProperty("--value",S.current?`${H(parseFloat(S.current.value),parseFloat(S.current.min),parseFloat(S.current.max))}`:h.toString());},[]),react.useEffect(()=>(d?(document.addEventListener("mousemove",oe),document.addEventListener("mouseup",he)):(document.removeEventListener("mousemove",oe),document.removeEventListener("mouseup",he)),()=>{document.removeEventListener("mousemove",oe),document.removeEventListener("mouseup",he);}),[d]),react.useEffect(()=>{let ee=H(r,P,T);y.current?.style.setProperty("--value",`${ee}`),X(r);},[r,P,T,L.current]);let j=()=>jsxRuntime.jsxs(p,{ref:y,onMouseEnter:()=>Y(true),onMouseLeave:()=>Y(false),onMouseMove:we,className:`--slider --${e||eo.Default} ${l?"--knob-hover":""} flex rel ${C}`.trim(),style:{...b},children:[jsxRuntime.jsx(p,{ref:E,className:"--slider-track abs fill"}),f&&jsxRuntime.jsx(p,{ref:I,className:"--slider-ghost abs fill"}),jsxRuntime.jsx(p,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsxRuntime.jsx(p,{ref:x,className:"--slider-knob --tooltip-knob abs"}),jsxRuntime.jsx(ne,{ref:S,onInput:K,className:"abs fill",tabIndex:0,type:e||eo.Default,defaultValue:h||0,step:R,max:T,min:P})]});if(c===true){let ee=i?i(r):m?r.toFixed(2):r;return jsxRuntime.jsx(Vo,{ref:D,show:d,position:it.Top,margin:15,anchorName:"--tooltip-knob",title:jsxRuntime.jsx(te,{ref:L,children:ee}),children:j()})}return j()};qn.displayName="Zuz.Slider";var Ye=qn;var Yn=react.forwardRef((t,n)=>{let{src:e,shape:r,size:o,...s}=t,{style:a,className:u,rest:f}=N(s),{canvasRef:l,crop:c,setScale:m,handleMouseDown:i,handleMouseUp:g,handleMouseMove:C}=hooks.useImageCropper(e,o||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return c()},setScale(b){m(b);}})),jsxRuntime.jsxs(p,{as:`--cropper --${r||hooks.CropShape.Circle} ${u}`,style:a,...f,children:[jsxRuntime.jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:i,onMouseUp:g,onMouseLeave:g,onMouseMove:C}),jsxRuntime.jsx(p,{as:"--cropper-slider",children:jsxRuntime.jsx(Ye,{onChange:b=>m(b),min:0,max:1,step:.01,value:1})})]})});Yn.displayName="Zuz.Cropper";var Xc=Yn;var Qc=(e=>(e.Circle="circle",e.Square="square",e))(Qc||{});var Jn=react.forwardRef((t,n)=>{let{items:e,maxItems:r}=t,o=react.useMemo(()=>{let u=typeof e=="string",f=u?[]:e;return u&&e.split(",").forEach(l=>{f.push({label:l});}),f},[e]),a=react.useMemo(()=>r&&r>0&&o.length>r-1,[o,r])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-r)]:o;return jsxRuntime.jsx(Fe,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(p,{as:"--crumb-chevron",children:k.chevronRightOutline}),items:a.map((u,f,l)=>u.ID=="."?jsxRuntime.jsx(p,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(p,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxRuntime.jsxs($,{onClick:()=>u.action?.(),className:"--crumb-item",disabled:!l[f+1],children:[u.icon&&jsxRuntime.jsx(Q,{as:"--crumb-icon",name:u.icon}),jsxRuntime.jsx(A,{as:"--crumb-label",children:u.label})]},`${u.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});Jn.displayName="Zuz.Crumb";var jc=Jn;var ts=react.forwardRef((t,n)=>{let{icon:e,defaultValue:r,value:o,size:s,variant:a,numeric:u,type:f,onConfirm:l,...c}=t,[m,i]=react.useState(false),[g,C]=react.useState(r||null),{style:b,className:w,rest:R}=N(c),P=react.useRef(null),T=react.useRef(null),{reposition:h}=dt(T,{direction:ae.Bottom,offset:2}),S=x=>{u&&(x.currentTarget.value=x.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let x=I=>{let O=I.target,E=P.current?.contains(O),V=T.current?.contains(O);!E&&!V&&i(false);};return m&&document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x);}},[m]),react.useEffect(()=>{let x=I=>{I.key==="Escape"&&m&&(i(false),P.current?.focus());};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[m]);let y=()=>{i(true);};return react.useEffect(()=>{m&&h();},[m,h]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(p,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${w}`,"data-value":g?g.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(Q,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(te,{as:"--date-picker-icon flex aic jcc",children:k.calendar}),jsxRuntime.jsx("input",{ref:P,value:g?dateFns.format(g,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:b,onFocus:y,onInput:S,autoComplete:"new-password",onKeyDown:x=>{x.key=="Enter"&&l?.(x.currentTarget.value);},...R}),jsxRuntime.jsx(p,{"aria-hidden":!m,ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:m,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(Bo,{defaultValue:g,onChange:x=>{C(x),i(false);}})})]})})});ts.displayName="Zuz.DatePicker";var rm=ts;var os=react.forwardRef((t,n)=>{let{icon:e,variant:r,position:o}=t;return jsxRuntime.jsx($,{className:`--fab fixed --${r||Z.Large} --${o||"bottomright"}`,children:e||k.plus})});os.displayName="Zuz.Fab";var im=os;var rs=t=>{let{names:n,strength:e}=t,r={[Rt.Gooey]:o=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${Rt.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[Rt.Gooey]).map(o=>r[o](e))})})};rs.displayName="Zuz.Filters";var mm=rs;var De=null,de=null,ss=react.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:C,style:b,rest:w}=N(g),[R,P]=react.useState(e||""),[T,h]=react.useState(r||""),[S,y]=react.useState(null),[x,I]=react.useState(u||xe.Default),O=react.useMemo(()=>core.uuid(12),[]),[E,V]=react.useState(false),L=react.useRef(null),D=react.useRef(null),[H,K]=react.useState(false),[d,B]=react.useState(true),z=react.useRef(null),W=T;react.useImperativeHandle(n,()=>({setLoading(F){K(F);},showDialog(F,J,Y,X){De&&(clearTimeout(De),de&&clearTimeout(de),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),de=setTimeout(()=>{L.current.classList.remove("--wobble"),de=null;},500)),I(xe.Dialog),J&&h(J),F&&P(F),Y&&y(Y.reduce((ge,oe)=>(ge.push({...oe,key:oe.key||core.uuid(12)}),ge),[])),V(true),setTimeout(()=>X?X():()=>{},1e3);},dialog(F,J,Y,X){De&&(clearTimeout(De),de&&clearTimeout(de),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),de=setTimeout(()=>{L.current.classList.remove("--wobble"),de=null;},500)),I(xe.Dialog),h(J),P(F),Y&&y(Y.reduce((ge,oe)=>(ge.push({...oe,key:oe.key||core.uuid(12)}),ge),[])),V(true),setTimeout(()=>X?X():()=>{},1e3);},error(F,J){this.show(F,J,xe.Error);},warn(F,J){this.show(F,J,xe.Warn);},success(F,J){this.show(F,J,xe.Success);},show(F,J,Y){De&&(clearTimeout(De),de&&clearTimeout(de),D.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${D.current} scale(.9)`.trim();},50),de=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=D.current||"",de=null;},500)),De=setTimeout(()=>{V(false),De=null,de=null;},(J||4)*1e3),I(Y||xe.Default),h(F),V(true),m?.();},hide(){V(false),i?.();}}));let _=react.useMemo(()=>{let F={when:E,duration:a||.3,delay:.1};if(x==xe.Dialog){if(o){let{from:J,to:Y}=ct(o,20);return {from:J,to:Y,curve:s||G.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:G.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:G.Spring,...F}},[E,x]);return react.useEffect(()=>{z.current&&clearTimeout(z.current),E?B(true):z.current=setTimeout(()=>B(false),1e3);},[E]),x==xe.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ae,{when:E}),jsxRuntime.jsxs(p,{className:`--sheet --sheet-${x.toLowerCase()} ${E?"is-visible":""} ${C} fixed`.trim(),style:b,fx:_,...w,ref:L,children:[jsxRuntime.jsx(Pe,{when:H,spinner:l,message:c}),jsxRuntime.jsxs(p,{className:"--head flex aic rel",children:[jsxRuntime.jsx(p,{className:`--${R?"title":"dot"} flex aic rel`,children:R||""}),jsxRuntime.jsx($,{onClick:F=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(p,{className:`--body flex aic rel ${S?"":"--no-action"}`.trim(),children:d?W:null}),S&&jsxRuntime.jsx(p,{className:`--footer flex aic rel ${f?f==jt.Center?"jcc":"":"jce"}`.trim(),children:S.map((F,J)=>jsxRuntime.jsx($,{onClick:Y=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${O}-action-${F.key}`))})]})]}):jsxRuntime.jsx(p,{className:`--sheet --sheet-${x.toLowerCase()} ${C} abs`.trim(),style:b,...w,fx:_,ref:L,children:E?T:null})}),St=t=>typeof t=="object"&&t!=null&&"setLoading"in t&&"success"in t&&"error"in t;ss.displayName="Zuz.Sheet";var gm=ss;var as=({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,...C}=n,{className:b,style:w,rest:R}=N(C),[P,T]=react.useState(false),h=react.useRef(null),S=react.useRef(null),y=react.useRef(null),x=So(),I=react.useCallback(d=>h.current?h.current.querySelectorAll(d):[],[h.current]),O=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")}),E=d=>{let B=[];return d.querySelectorAll(".--input").forEach(z=>{B.push(z.value);}),B.join("")},V=react.useCallback(d=>{let{required:z}=O(d);if(z){if(d.type=="checkbox"&&d.checked==false)return false;if(d.classList.contains("--otp")){let _=E(d);if(_==""||_.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 _=d.getAttribute("with");switch(_.includes("@")&&(_=_.split("@")[0],_=="match"&&(_=Ee.MatchField)),_.toUpperCase()){case Ee.IPV4:return core._(d.value).isIPv4();case Ee.IPV6:return core._(d.value).isIPv6();case Ee.Email:return core._(d.value).isEmail();case Ee.Uri:try{return new URL(d.value),!0}catch{return false}case Ee.Password:return console.log("Add FORMVALIDATION.Password"),false;case Ee.MatchField:let[F,J,Y]=d.getAttribute("with").split("@"),X=document.querySelector(`[name=${J.trim()}]`);if(!X)return false;switch(Y||"direct-match"){case "if-not-empty":if(X&&!core._(X.value).isEmpty()&&X.value!=d.value)return false;break;case "direct-match":if(X&&X.classList.contains("--otp")&&d.classList.contains("--otp")&&E(X)!=E(d))return false;if(X&&X.value!=d.value)return false;break}break;default:return true}}return true},[h.current]),L=react.useCallback(()=>{let d={},B={},z=null,W=null;if(Array.from(I("[name]")).forEach(_=>{let{name:F,required:J,with:Y}=O(_),X=true;(J||Y)&&(X=V(_)),d[F]={valid:X,value:_.type=="checkbox"?_.checked==true?_.value:false:_.classList.contains("--otp")?E(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value},B[F]=_.type=="checkbox"?_.checked==true:_.classList.contains("--otp")?E(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value,X?_.classList.remove("input-with-error"):(z==null&&s&&(z=_,W=s[F]),_.classList.add("input-with-error"));}),z){let _=z;if(_.classList.contains("--otp"))for(let F of Array.from(_.querySelectorAll(".--input"))){let J=F;if(J.value==""){J.focus();break}}else _.focus();}return {error:z!=null,errorMsg:W||"Fix errors to continue...",data:d,payload:B}},[h.current]),D=react.useCallback(()=>{let{error:d,errorMsg:B,payload:z}=L();d?x.error(B):a?react.startTransition(async()=>{l&&l(z),St(r)?r.setLoading(true):T(true),x.clearAll(),core.withPost(a,{...z,...f||{}}).then(W=>{let _=W;St(r)?r.setLoading(false):T(false),g&&Array.from(I("[name]")).forEach(F=>{F instanceof HTMLInputElement&&(F.value="");}),i?i(_):(x.clearAll(),x.success(_.message||"Redirecting..."));}).catch(W=>{St(r)?r.setLoading(false):T(false),m?m(W):x.error(W.message||"We cannot process your request at this time.");});}):c&&c(z);},[a,S.current,h.current]),H=react.useCallback(()=>{let d=I("[type=submit]");!d||d.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):d.forEach(B=>{B.addEventListener("click",D);});},[h.current]),K=react.useMemo(()=>react$1.addPropsToChildren(u,d=>d.props.type=="submit",d=>({ref:y})),[u]);return react.useImperativeHandle(t,()=>({setLoading(d){if(d){S.current?.hide();try{x.clearAll();}catch{}}T(d);},showError(d){typeof d=="string"?x.error(d):S.current.error(d,4);},hideError(){S.current.hide();try{x.clearAll();}catch{}},init(){H();},submit(){D();}})),react.useEffect(H,[]),jsxRuntime.jsxs(p,{ref:h,style:w,className:`--form flex rel ${b} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!St(r)&&jsxRuntime.jsx(Pe,{message:r?r.message||void 0:"working",spinner:o,color:r&&"color"in r?r.color:"#ffffff",when:P}),K]})};as.displayName="Zuz.Form";var Tm=as;var is=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,...C}=t;react.useRef(null);let {className:w,style:R,rest:P}=N(C),T=S=>typeof S=="number"?`repeat(${S}, 1fr)`:S,h={display:l?"inline-grid":"grid",gridTemplateColumns:T(e),gridTemplateRows:T(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,...R};return jsxRuntime.jsx(p,{ref:n,as:`--grid ${w}`.trim(),style:h,...P})};is.displayName="Zuz.Grid";var Nm=is;var ls=t=>typeof t=="string"&&t.includes("+"),cs={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"},ms={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 us=react.forwardRef(({children:t,keys:n,as:e,className:r,variant:o},s)=>{let{variant:a}=q(true),u=react.useMemo(()=>{if(ls(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 jsxRuntime.jsxs(p,{as:`--keyboard-keys --${o||a||Z.Small} flex aic ${e} ${r}`.trim(),children:[(Array.isArray(u.keys)?u.keys:[u.keys]).map(f=>jsxRuntime.jsx("abbr",{title:ms[f],children:cs[f]},f)),jsxRuntime.jsx(te,{children:u?.children??t})]})});us.displayName="Zuz.KeyboardKeys";var Wo=us;var gs=react.createContext(null),je=()=>{let t=react.useContext(gs);if(!t)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return t},Hm=({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}=N(c),C=hooks.useMediaPlayer(o,o[0]??void 0),b=react.useMemo(()=>({play:k.play,pause:k.pause,prev:k.prev,next:k.next,volumeHigh:k.volumeHigh,volumeMute:k.volumeMute,...n}),[n]),w=react.useMemo(()=>({...C,mode:s,icons:b}),[C,b]);return jsxRuntime.jsx(gs.Provider,{value:w,children:jsxRuntime.jsx(p,{className:`--zuz-media-player ${m}`,style:i,children:e})})},hs=Hm;var ys=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")}`},Wt=t=>typeof t=="string"?jsxRuntime.jsx(Q,{name:t}):t,xs=()=>{let{mediaRef:t,state:n,controls:e,mode:r}=je();return jsxRuntime.jsxs(p,{as:`--mediaplayer-stage rel --mode-${r}`,children:[r==="video"?jsxRuntime.jsx("video",{ref:t,className:"fill",onClick:e.togglePlay}):jsxRuntime.jsx("audio",{ref:t}),n.isLoading&&jsxRuntime.jsx(p,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(be,{})})]})},bs=()=>{let{state:t,defaultArtist:n,defaultTitle:e,defaultCover:r}=je();return jsxRuntime.jsxs(p,{as:"--track-info flex aic",children:[jsxRuntime.jsx(Ze,{src:t.currentItem?.cover||r||"",as:"--track-cover"}),jsxRuntime.jsxs(p,{as:"flex cols",children:[jsxRuntime.jsx(p,{as:"--track-title",children:t.currentItem?.title||e||"Choose Track"}),jsxRuntime.jsx(p,{as:"--track-artist",children:t.currentItem?.artist||n||"..."})]})]})},vs=()=>{let{state:t,controls:n,icons:e}=je();return jsxRuntime.jsxs(p,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx($,{onClick:n.prev,as:"--prev",children:Wt(e?.prev??k.prev)}),jsxRuntime.jsx($,{onClick:n.togglePlay,as:"--play-pause",children:Wt(t.isPlaying?e?.pause??k.pause:e?.play??k.play)}),jsxRuntime.jsx($,{onClick:n.next,as:"--next",children:Wt(e?.next??k.next)})]})},ws=()=>{let{state:t,controls:n,mediaRef:e}=je(),r=t.progress*(t.duration||0);return jsxRuntime.jsxs(p,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(p,{as:"--track-current-duration",children:ys(r)}),jsxRuntime.jsx(Ye,{value:t.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;n.seek(a);}}),jsxRuntime.jsx(p,{as:"--track-total-duration",children:ys(t.duration)})]})},Ss=()=>{let{state:t,controls:n,icons:e}=je();return jsxRuntime.jsxs(p,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx($,{onClick:()=>n.setIsMuted(),children:Wt(t.isMuted?e?.volumeMute??k.volumeMute:e?.volumeHigh??k.volumeHigh)}),jsxRuntime.jsx(Ye,{value:t.volume,className:"h:3 flex:1",onClick:r=>{let o=r.currentTarget.getBoundingClientRect();n.setVolume((r.clientX-o.left)/o.width);}})]})};var Vm=({ref:t,...n})=>jsxRuntime.jsx(hs,{...n,ref:t}),Am=Object.assign(Vm,{Stage:xs,TrackInfo:bs,Controls:vs,Progress:ws,Volume:Ss}),$m=Am;var Ts=react.forwardRef((t,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:o,variant:s}=t;return jsxRuntime.jsxs(p,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:G.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||Z.Small} fixed flex`,children:[jsxRuntime.jsx(p,{className:"--ico",children:e?k[ye.Success]:k[ye.Error]}),jsxRuntime.jsx(A,{as:"--message",children:e?r||"internet connection restored :)":o||"no internet connection"})]})});Ts.displayName="Zuz.NetWorkManager";var Zm=Ts;var Rs=react.forwardRef((t,n)=>{let{strenthMeter:e,onChange:r,...o}=t;"type"in o&&delete o.type;let{style:s,className:a,rest:u}=N(o),[f,l]=react.useState(false),[c,m]=react.useState(""),i=react.useMemo(()=>core.checkPasswordStrength(c),[c]),g=hooks.useDebounce(C=>{e&&m(C.target.value),r&&r(C);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(p,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(p,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(ne,{ref:n,type:f?"text":"password",className:a,onChange:g,...u}),jsxRuntime.jsx($,{tabIndex:-1,onClick:()=>l(C=>!C),className:"--toggle flex aic jcc abs",children:f?k.eye:k.eyeSlash})]}),e&&jsxRuntime.jsxs(p,{as:`flex aic --password-meter --pb-score-${i.score}`,style:s,children:[jsxRuntime.jsxs(p,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(p,{as:`--pbar ${i.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${i.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${i.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${i.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(p,{as:`--pbar ${i.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(A,{as:"--password-meter-label","aria-hidden":true,children:i.result})]})]})});Rs.displayName="Zuz.Password";var Ym=Rs;var Ns=react.forwardRef((t,n)=>{let{size:e,length:r,mask:o,...s}=t,a=react.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}=N(s),m=i=>{let g=i.currentTarget,C=a.current[parseInt(g.dataset.index)+1],b=a.current[parseInt(g.dataset.index)-1];g.value.length===1&&C?C.focus():g.value.length===0&&b&&b.focus();};return react.useEffect(()=>{a.current=a.current.slice(0,e||r);},[e||r]),jsxRuntime.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)=>jsxRuntime.jsx(ne,{autoComplete:"new-password","data-index":g,ref:C=>{a.current[g]=C;},numeric:true,onChange:m,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${g}`))})});Ns.displayName="Zuz.PinInput";var ep=Ns;var Bs=react.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]=react.useState(l||false),{variant:C}=q(true),b=react.useRef(null);return jsxRuntime.jsxs(xt,{className:`${r} --${(a||to.Default).toLowerCase()} --radio${!a||a==to.Default?"":"card"} --${f||C||Z.Small} flex aic rel`.trim(),...m,children:[jsxRuntime.jsx(ne,{ref:b,defaultChecked:i,value:u||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:w=>{c&&c(w.target.checked,u||"cb"),g(w.target.checked);}}),jsxRuntime.jsx(p,{className:"--dot rel",children:jsxRuntime.jsx(p,{className:"--rod abs abc"})}),jsxRuntime.jsx(p,{className:"--value",children:e})]})});Bs.displayName="Zuz.Radio";var np=Bs;var Es=react.forwardRef((t,n)=>{let{fx:e,withStyle:r,as:o,reverse:s=false,searchIcon:a=k.search,hideSearchIcon:u=false,clearIcon:f=k.close,hideClearIcon:l=false,onChange:c,onClear:m,...i}=t,{style:g,className:C}=N({as:t.as}),[b,w]=react.useState(""),{variant:R}=q(true),P=react.useRef(null);"type"in t&&delete t.type;let T=S=>{w(S.target.value),c?.(S.target.value);},h=S=>{b.trim()!==""&&(w(""),c?.(""),P.current&&(P.current.value="",t.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>P.current?.focus(),value:()=>P.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(p,{style:g,className:`--search ${s?"--search-rev":""} --${t.variant||R||Z.Medium} flex aic ${typeof t.as=="string"&&t.as.includes("abs")?"":"rel"} ${C}`.trim(),children:[jsxRuntime.jsx(ne,{ref:P,onChange:T,...i}),t.shortcut&&jsxRuntime.jsx(Wo,{keys:t.shortcut,as:"abs"}),jsxRuntime.jsx($,{tabIndex:-1,onClick:S=>h(),className:"--send flex aic jcc",variant:t.variant||Z.Medium,children:b!==""?!l&&(typeof f=="string"?jsxRuntime.jsx(Q,{name:f,as:"--search-action"}):f):!u&&(typeof a=="string"?jsxRuntime.jsx(Q,{name:a,as:"--search-action"}):a)})]})});Es.displayName="Zuz.Search";var pp=Es;var Ms=({value:t,updateValue:n,o:e})=>jsxRuntime.jsxs($,{onClick:r=>n(e),as:"--select-option-item",className:t&&(typeof e=="string"?e:e.value)==(typeof t=="string"?t:t.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(Q,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(A,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});Ms.displayName="Option";var ks=Ms;var Ds=({ref:t,...n})=>{let{selected:e,options:r,label:o,name:s,variant:a,search:u,searchPlaceholder:f,maxHeight:l,arrowDownIcon:c=k.arrowDown,arrowUpIcon:m=k.arrowUp,expanded:i,onChange:g,...C}=n,[b,w]=react.useState(e?typeof e=="string"?r.find(d=>d.value===e):e:r[0]),[R,P]=react.useState(false),[T,h]=react.useState(null),S=react.useRef(null),y=react.useRef(null),x=react.useRef(null),I=react.useId(),O=react.useMemo(()=>s||I,[]),{reposition:E}=dt(x,{direction:it.Bottom,offset:2}),{variant:V}=q(true),{className:L,style:D,rest:H}=N(C),K=d=>{w(d),P(false),g&&g(d);};return react.useImperativeHandle(t,()=>({setSelected:d=>{if(typeof d=="string"){let B=r.find(z=>z.value===d);B&&w(B);}else w(d);},getValue:()=>b||null})),react.useEffect(()=>{if(!R)return;let d=()=>{E();};return window.addEventListener("scroll",d,true),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,true),window.removeEventListener("resize",E);}},[R,E]),react.useEffect(()=>{if(!R){y.current&&(y.current.value=""),h(null);return}y.current?.focus(),E();let d=z=>{x.current&&!x.current.contains(z.target)&&P(false);},B=setTimeout(()=>{document.addEventListener("click",d);},0);return ()=>{clearTimeout(B),document.removeEventListener("click",d);}},[R,E]),jsxRuntime.jsxs(p,{className:`--select ${i==true?"--expanded":""} --${a||V} ${s?`--${s}`:""} rel`.trim(),name:O,children:[jsxRuntime.jsxs($,{ref:S,"data-value":b?typeof b=="string"?b:b.value:b||"-1",className:`--selected flex aic rel ${L}`.trim(),withLabel:false,style:D,onClick:d=>{d.stopPropagation(),P(B=>!B);},...H,children:[jsxRuntime.jsx(A,{className:"--label",children:b?typeof b=="string"?b:b.label:o||"Choose"}),jsxRuntime.jsx(p,{className:"--svg-arrow rel flex aic jcc",children:R?typeof m=="string"?jsxRuntime.jsx(Q,{name:m,as:"--search-action"}):m:typeof c=="string"?jsxRuntime.jsx(Q,{name:c,as:"--search-action"}):c})]}),jsxRuntime.jsxs(p,{id:O,className:"--options-list -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!R,style:{maxHeight:l||"auto"},ref:x,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:R,duration:.05},children:[u&&jsxRuntime.jsx(p,{as:"--select-search --sticky",children:jsxRuntime.jsx(ne,{ref:y,onChange:d=>{h(d.target.value==""?null:d.target.value);},className:"--search-input",placeholder:f||"Search..."})}),(T==null?r:r.filter(d=>d.label.toLowerCase().includes(T.toLowerCase())||d.value.toLowerCase().includes(T.toLowerCase()))).map(d=>jsxRuntime.jsx(ks,{updateValue:K,value:b,o:d},`option-${(typeof d=="string"?d:d.label).replace(/\s+/g,"-")}-${typeof d=="string"?d:d.value}`))]})]})};Ds.displayName="Zuz.Select";var yp=Ds;var Hs=react.forwardRef((t,n)=>jsxRuntime.jsx(bt,{type:Be.Switch,...t,ref:n}));Hs.displayName="Zuz.Switch";var bp=Hs;var As=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]=react.useState(0),C=()=>{c&&(m?.(String(e),i==1?-1:1),g(b=>b==1?-1:1));};return jsxRuntime.jsxs(p,{style:{flex:o||1,...s},as:`--col flex aic ${r||""} ${c?"--sortable":""}`,onClick:C,children:[jsxRuntime.jsx(p,{children:a}),n==-1&&c&&l==e&&jsxRuntime.jsx(p,{as:"--arrow flex aib",children:i==1?k.arrowUp:k.arrowDown})]})};As.displayName="Zuz.Column";var qt=As;var zs=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:C,onSelect:b,onContextMenu:w}=t,R=hooks.useDelayed(),P=react.useMemo(()=>({transition:U.SlideInBottom,curve:G.EaseInOut,delay:.02*(n+1)}),[]),T=react.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));},S=(y,x,I)=>jsxRuntime.jsx(qt,{idx:y,id:x,as:"--selector",pubsub:e,value:jsxRuntime.jsx(bt,{value:I,ref:T,onSwitch:h,type:Be.Default})});return react.useEffect(()=>{let y=(E,V)=>{T.current?.setChecked(E,false);},x=(E,V)=>{let L=false;c?.current&&c.current.querySelectorAll(".--row").forEach(D=>{let H=D;if(!H.classList.contains("--row-head")){let K=H.querySelector(".--selector input[type=checkbox]");K&&K.checked&&!L&&(L=K.checked);}}),T.current.setChecked(L,false);},I=E=>{T.current?.setChecked(E,false),b&&b(o,E);},O=E=>{T.current?.setChecked(E,false),b&&b(o,E);};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",I),e.on("ALL_ROWS_UNCHECKED",O),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",O);})},[]),jsxRuntime.jsxs(p,{onContextMenu:y=>w?w(y,o):null,onClick:y=>C?C(y,t.data):()=>{},...u?{fx:{...P,when:R}}:{},as:`--row flex aic ${C?"--row-clickable":""} ${n==-1?"--row-head":""} ${i||""}`,children:[n==-1&&r.map((y,x)=>{let{renderWhenHeader:I,render:O,value:E,...V}=y;return jsxRuntime.jsxs(react.Fragment,{children:[l&&x==0&&S(-1,`--selector-${y.id}`,"all"),jsxRuntime.jsx(qt,{idx:-1,onSort:g,sortBy:f,value:E,...V,pubsub:e,style:a[y.id]})]},`--col-${y.id}`)}),m&&n>-1&&jsxRuntime.jsx(p,{as:"--col",children:jsxRuntime.jsx(A,{as:"opacity:0",children:"..."})}),!m&&n>-1&&s&&o&&r.map((y,x)=>jsxRuntime.jsxs(react.Fragment,{children:[l&&x==0&&S(x,`--selector-${y.id}`,y.id.toString()),s.includes(String(y.id))?jsxRuntime.jsx(qt,{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}`))]})};zs.displayName="Zuz.Row";var Xt=zs;var Ks=(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:C,sortBy:b,loading:w,loadingRowCount:R,loadingMessage:P,spinner:T,emptyMessage:h,onSort:S,onRowClick:y,onRowSelectToggle:x,onPageChange:I,onRowContextMenu:O,...E}=t,V=react.useRef(null),L=react.useMemo(()=>e.reduce((ce,j)=>(ce[j.id]={flex:j.weight||1,...j.w&&{width:j.w},...j.maxW&&{maxWidth:j.maxW},...j.minW&&{minWidth:j.minW},...j.h&&{height:j.h},...j.maxH&&{maxHeight:j.maxH},...j.minH&&{minHeight:j.minH}},ce),{}),[e]),D=react.useMemo(()=>Object.keys(L),[e]),H=react.useMemo(()=>m??true,[m]),{style:K,className:d,rest:B}=N(E),z=react.useRef(null),W=react.useMemo(()=>new core.PubSub,[]),_=react.useRef(r.map(()=>core.uuid(8))),[F,J]=react.useState(b||null),[Y,X]=react.useState(P||"loading"),ge=react.useMemo(()=>!w&&r&&r.length==0,[w,r]),oe=react.useCallback(()=>h?typeof h=="function"?jsxRuntime.jsx(h,{}):h:jsxRuntime.jsx(A,{as:"tac s:18 mt:75",children:"No Record Found"}),[w,r]);react.useEffect(()=>{_.current=r.map(()=>core.uuid(8));},[r]);let he=(ce,j)=>{J(ce),S?.(ce,j);},ve=(o||(r?r.length:0))/(s||10),we=react.useMemo(()=>l||ve>1?jsxRuntime.jsx(yt,{hash:f,ref:V,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:o||(r?r.length:0),itemsPerPage:s||10}):null,[a,o]);return react.useImperativeHandle(n,()=>({setLoading(ce){}})),jsxRuntime.jsxs(p,{as:`--table ${C??true?"--hoverable":""} flex cols rel ${d}`,ref:z,children:[H==true&&jsxRuntime.jsx(Xt,{sortBy:F,onSort:he,tableRef:z,pubsub:W,selectable:g,index:-1,schema:e,loading:true,styles:L}),w&&jsxRuntime.jsxs(p,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(be,{type:T||le.Simple}),Y&&jsxRuntime.jsx(A,{as:"--table-loading-message",children:Y})]}),w&&Array(R||5).fill({}).map((ce,j)=>jsxRuntime.jsx(Xt,{tableRef:z,index:j,pubsub:W,schema:e,styles:L,loading:true,animate:c,onRowClick:y},`--trow-loading-${j}-${e[0].id}`)),!w&&r&&r.map((ce,j)=>jsxRuntime.jsx(Xt,{tableRef:z,pubsub:W,loading:false,index:j,schema:e,ids:D,styles:L,animate:c,data:ce,onRowClick:y,rowClassName:i,selectable:g,onSelect:x,onContextMenu:O},`--trow-${_.current[j]||j}-${e[0].id}`)),ge&&oe(),jsxRuntime.jsx(p,{"aria-hidden":!u||!we,...c?{fx:{transition:U.SlideInBottom,curve:G.EaseInOut,delay:.02*(r.length+1),when:!w&&r&&u&&we!=null}}:{},as:"--row flex aic --row-footer",children:u&&we?we:null})]})};Ks.displayName="Zuz.Table";var Mp=react.forwardRef(Ks),kp=Mp;var Dp=({ref:t,...n})=>{let{title:e,items:r}=n,[o,s]=react.useState(0),a=(u,f,l)=>{u.preventDefault(),s(f),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(p,{ref:t,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(A,{as:"--toc-title",children:e}),jsxRuntime.jsx(Fe,{items:r.map((u,f)=>jsxRuntime.jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,f,u.tag),href:`#${u.tag}`,children:u.label}))})]})},Hp=Dp;var Ws=({isActive:t,transitionType:n,speed:e,width:r,render:o,content:s,onHeightChange:a})=>{let u=react.useRef(null),f=hooks.useResizeObserver(u);react.useEffect(()=>{t&&f.height>0&&a(f.height);},[t,f.height]);let l=react.useMemo(()=>{let c={flexShrink:0,height:"fit-content"};return n==="fade"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,visibility:t?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:t?1:0}:n==="scale"?{...c,gridArea:"1 / 1 / 2 / 2",opacity:t?1:0,transform:`scale(${t?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:t?1:0}:c},[t,n,r,e]);return jsxRuntime.jsx(p,{ref:u,style:{...l},className:"--content",children:o||t?s:null})};Ws.displayName="Zuz.TabBody";var Us=Ws;var Xs=({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]=react.useState(0),i=react.useRef(null),g=hooks.useResizeObserver(i),C=react.useMemo(()=>core.uuid(8),[]),[b,w]=react.useState("auto"),R=react.useMemo(()=>g.width>0,[g.width]);react.useImperativeHandle(t,()=>({setTab:x=>m(x)}));let P=react.useMemo(()=>e.map(x=>({...x,key:x.key||core.uuid(8)})),[e]),{style:T,className:h,rest:S}=N({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),y=()=>{if(!R)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 jsxRuntime.jsxs(p,{ref:i,style:T,className:`--tabview --${a} flex cols ${h}`,children:[jsxRuntime.jsx(vt,{as:"--tabview-head",onSwitch:x=>{m(x.index);let I=P.find(O=>O.tag==x.tag);I&&I.onSelect&&(I.onSelect(I,x.index),u?.(I,x.index));},selected:c,items:P.reduce((x,I,O)=>(x.push({icon:I.icon,index:O,label:I.label,tag:I.tag}),x),[])}),jsxRuntime.jsx(p,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:b,transition:R?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:R?1:0},children:jsxRuntime.jsx(p,{className:"--track",style:{...y()},children:P.map((x,I)=>jsxRuntime.jsx(Us,{isActive:I===c,transitionType:f,speed:r,width:g.width,render:o||I===c,onHeightChange:O=>I===c&&w(O),content:x.body},`tab-body-${x.key||I}-${C}`))})})]})};Xs.displayName="Zuz.TabView";var Up=Xs;var Yp=({ref:t,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[u,f]=react.useState([{type:"output",content:r}]),[l,c]=react.useState(""),m=react.useRef(null),i=react.useRef(null),{variant:g}=q(true);react.useEffect(()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight);},[u]);let C=h=>{let S=typeof h=="string"?{type:"output",content:h}:h;f(y=>{let x=[...y,S];return x.length>1e3?x.slice(-1e3):x});},b=()=>f([]);react.useImperativeHandle(t,()=>({write:C,clear:b}));let w=async h=>{let[S,...y]=h.split(" "),x=S.toLowerCase();return n&&n[x]?await n[x](y):e?await e(h):`command not found: ${S}`},R=h=>{let S=/\u001b\[(\d+)m/g,y=[],x={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,O="#d4d4d4",E=false,V;for(;(V=S.exec(h))!==null;){let D=h.slice(I,V.index);D&&y.push({text:D,color:O,bold:E});let H=V[1];H==="0"?(O="#d4d4d4",E=false):H==="1"?E=true:x[H]&&(O=x[H]),I=S.lastIndex;}let L=h.slice(I);return L&&y.push({text:L,color:O,bold:E}),y},P=(h,S)=>h.includes("\x1B")?R(h).map((y,x)=>jsxRuntime.jsx(te,{style:{color:y.color||"#d4d4d4",fontWeight:y.bold?"bold":"normal"},children:y.text},`--terminal-msg-${x}-${y.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(te,{style:{color:S==="error"?"#ff5f56":S==="command"?"#00ff00":"#d4d4d4"},children:h}),T=async h=>{if(h.key==="Enter"&&l.trim()){let S=l.trim(),y=[...u,{type:"command",content:`${o}${S}`}];c(""),f(y);let x=await w(S);f(I=>[...I,{type:"output",content:x}]);}};return jsxRuntime.jsxs(p,{as:`--zuz-terminal --${s||g||Z.Medium} flex cols ${a.className}`,onClick:()=>i.current?.focus(),children:[jsxRuntime.jsx(p,{ref:m,className:"--terminal-log",children:u.map((h,S)=>jsxRuntime.jsx(p,{children:jsxRuntime.jsx(A,{children:P(h.content,h.type)})},S))}),jsxRuntime.jsxs(p,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(A,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(ne,{ref:i,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||g||Z.Medium,onChange:h=>c(h.target.value),onKeyDown:T})]})]})},Qp=Yp;var Jp=({meta:t})=>jsxRuntime.jsxs($,{as:"flex aic --command-item",children:[t.icon&&jsxRuntime.jsx(Q,{name:t.icon,as:"--command-icon"}),jsxRuntime.jsx(A,{children:t.label})]}),jp=({position:t,onSelect:n,commands:e,visible:r})=>jsxRuntime.jsx(p,{"aria-hidden":!r,fx:{transition:U.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...t},children:e.map(o=>jsxRuntime.jsx(Jp,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),js=jp;var oa=react.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,C=react.useRef(null),b=react.useRef(null),{variant:w}=q(true),{style:R,className:P,rest:T}=N(g),{showDropdown:h,dropdownPosition:S,handleKeyDown:y,handleInput:x,handleCommandSelect:I}=hooks.useCommandActions({command:a,commands:u,cmd:l,ref:C}),O=react.useCallback(()=>{let V=C.current;!V||!e||(b.current&&cancelAnimationFrame(b.current),b.current=requestAnimationFrame(()=>{V.style.height="auto";let L=V.scrollHeight;if(r){let D=parseInt(r.toString(),10);isNaN(D)||(L=Math.min(L,D));}V.style.height=`${L}px`,V.style.overflowY=r&&L>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),E=V=>{f?.(V),x(V),O();};return react.useEffect(()=>{O();},[m,i,O]),react.useEffect(()=>{e&&C.current&&O();},[e,O]),react.useEffect(()=>()=>{b.current&&cancelAnimationFrame(b.current);},[]),jsxRuntime.jsxs(p,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${o||w||Z.Medium} flex ${P}`.trim(),style:{...R,resize:s,height:e?"auto":R?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:y,onInput:E,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),C.current=V;},value:m,defaultValue:i,...T}),c?c({show:h,position:S,commands:u||[],onSelect:I}):u&&u.length>0&&jsxRuntime.jsx(js,{visible:h,commands:u,onSelect:I,position:S})]})});oa.displayName="Zuz.TextArea";var nu=oa;var na=react.forwardRef((t,n)=>{let{as:e,value:r,color:o,direction:s,...a}=t,u=react.useRef(null),[f,l]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(c){f.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),u.current){let m=c.toString().split("");u.current.querySelectorAll(".--wheel-char").forEach((i,g)=>{let C=m[g];if(i instanceof HTMLElement){i.setAttribute("data-value",C);let b=i.querySelector(".--wheel-char-track");b instanceof HTMLElement&&(b.style.setProperty("--v",C),b.offsetWidth);}});}}})),react.useEffect(()=>{l(r||0);},[r]),jsxRuntime.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))?jsxRuntime.jsx(te,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${m}`):jsxRuntime.jsx(te,{"data-value":c,className:`--wheel-char grid ${m>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(te,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsxRuntime.jsx(te,{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)=>jsxRuntime.jsx(te,{children:i},`${m}--${g}`)),jsxRuntime.jsx(te,{children:!s||s==="down"?9:0})]})},`wheel-char-${m}`)),o&&jsxRuntime.jsx(p,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});na.displayName="Zuz.TextWheel";var pu=na;var tr=react.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:C,under:b,isHead:w}=r,R=react.useMemo(()=>l.includes(i),[l]),[P,T]=react.useState(c),h=()=>{localStorage.setItem(`--tn${u}-${i}`,P?"0":"1"),T(!P);};react.useEffect(()=>{c||R&&!localStorage.getItem(`--tn${u}-${i}`)?(localStorage.setItem(`--tn${u}-${i}`,"1"),T(true)):T(localStorage.getItem(`--tn${u}-${i}`)=="1");},[]);let S=react.useMemo(()=>o.filter(y=>y.under==i),[o,i]);return jsxRuntime.jsxs(p,{className:`--treenode ${R?"--is-root":""} --treenode-${i} flex cols`,children:[jsxRuntime.jsxs(p,{className:`--node --node-${i} flex aic ${f==i?" --selected":""}`,children:[jsxRuntime.jsx($,{skeleton:m.skeleton,onClick:h,className:"--node-aro-btn",disabled:S.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(Q,{skeleton:m.skeleton,className:"--node-aro-icon",name:S.length==0?s?.arrowDisabled||s?.arrowClose:P?s?.arrowOpen:s?.arrowClose}):S.length==0?k.chevronBottom:P?k.chevronBottom:k.chevronRight}),jsxRuntime.jsxs($,{className:"--node-meta flex aic",onClick:y=>a(i),children:[(s?.nodeOpen&&s?.nodeClose||R&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(Q,{skeleton:m.skeleton,className:`--node-icon ${R?"--icon-root":""}`,name:C||(P?R&&s?.rootOpen||s.nodeOpen:R&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(A,{className:`--node-label ${R?"--node-label-root":""}`.trim(),skeleton:m.skeleton,children:g})]})]}),P&&S.length>0&&jsxRuntime.jsx(p,{className:`--sub-node tree-sub-node-${i} flex cols`,children:S.map(y=>jsxRuntime.jsx(tr,{treeTag:u,selected:f,onSelect:a,icons:s,roots:l,expanded:y.expanded||false,meta:y,nodes:o},`--node-${y.tag}`))})]})});tr.displayName="TreeItem";var aa=tr;var la=react.forwardRef((t,n)=>{let{as:e,nodes:r,onNodeSelect:o,tag:s,icons:a,roots:u,selected:f,...l}=t,[c,m]=react.useState(f);react.useImperativeHandle(n,()=>({getSelected:()=>c}),[o]);let i=g=>{m(g),o&&o(g);};return react.useEffect(()=>{c!=f&&m(f);},[f]),jsxRuntime.jsx(p,{className:"--treeview flex cols",children:r.filter(g=>u.includes(g.tag)).map(g=>jsxRuntime.jsx(aa,{treeTag:s?`-${s}`:"",selected:c,onSelect:C=>i(C),icons:a,meta:g,roots:u,expanded:g.expanded||false,skeleton:l.skeleton,nodes:r},`--node-${g.tag}`))})});la.displayName="Zuz.TreeView";var bu=la;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
+ Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkSHCFYUVF_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkSHCFYUVF_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkSHCFYUVF_cjs.h}});exports.ALERT=ye;exports.AVATAR=ar;exports.Accordion=Zi;exports.ActionBar=Xi;exports.Alert=Ji;exports.AutoComplete=hl;exports.Avatar=Tl;exports.Badge=Rl;exports.Box=p;exports.Bubble=ic;exports.BubbleMediaType=Ln;exports.BubbleStatus=En;exports.Button=$;exports.CHART=Rn;exports.CHECKBOX=Be;exports.COLORTHEME=Cu;exports.Calendar=Bo;exports.Carousel=Ql;exports.Chart=nc;exports.CheckBox=bt;exports.CodeBlock=xc;exports.ColorScheme=kc;exports.ContextMenu=mo;exports.CookiesConsent=Vc;exports.Cover=Pe;exports.CropShape=Qc;exports.Cropper=Xc;exports.Crumb=jc;exports.DATATYPE=Ru;exports.DIALOG=qe;exports.DIALOG_ACTION_POSITION=ir;exports.DRAWER_SIDE=pe;exports.DatePicker=rm;exports.Dialog=fo;exports.Drawer=vo;exports.FILTER=Rt;exports.FORMVALIDATION=Ee;exports.FORMVALIDATION_STYLE=Iu;exports.Fab=im;exports.Filters=mm;exports.Form=Tm;exports.Grid=Nm;exports.Group=po;exports.Icon=Q;exports.Image=Ze;exports.Input=ne;exports.KeyboardKeys=Wo;exports.KeysLabelMap=ms;exports.KeysMap=cs;exports.Label=xt;exports.LayersProvider=lo;exports.List=Fe;exports.MediaPlayer=$m;exports.NetworkStatus=Zm;exports.ORIGIN=lt;exports.OriginType=Tu;exports.Overlay=Ae;exports.POSITION=it;exports.PROGRESS=Bu;exports.Pagination=yt;exports.PaginationStyle=zt;exports.Password=Ym;exports.PinInput=ep;exports.Position=ae;exports.ProgressBar=ze;exports.RADIO=to;exports.Radio=np;exports.SHEET=xe;exports.SHEET_ACTION_POSITION=jt;exports.SKELETON=Su;exports.SLIDER=eo;exports.SORT=Pu;exports.SPINNER=le;exports.ScrollView=ho;exports.Search=pp;exports.Select=yp;exports.SelectTabs=vt;exports.Sheet=gm;exports.Slider=Ye;exports.SnackPosition=Ot;exports.SnackStyle=Wr;exports.SnackType=kt;exports.Span=te;exports.Spinner=be;exports.Status=Nu;exports.Switch=bp;exports.TRANSITIONS=U;exports.TRANSITION_CURVES=G;exports.TabView=Up;exports.Table=kp;exports.TableOfContents=Hp;exports.Terminal=Qp;exports.Text=A;exports.TextWheel=pu;exports.Textarea=nu;exports.ThemeProvider=xa;exports.ToastDefaultTitle=Ur;exports.ToastPosition=Ot;exports.ToastProvider=wo;exports.ToastStyle=Wr;exports.ToastType=kt;exports.ToolTip=Vo;exports.TreeView=bu;exports.Variant=Z;exports.animationTransition=ct;exports.buildClassString=oo;exports.buildWithStyles=mr;exports.css=qu;exports.getAnimationCurve=ro;exports.getAnimationTransition=Xu;exports.getZuzMap=pa;exports.isKeyCombination=ls;exports.setZuzMap=cr;exports.useBase=N;exports.useContextMenu=bi;exports.useDialog=Si;exports.useDrawer=Pi;exports.useFx=ie;exports.useMorph=Ni;exports.usePosition=dt;exports.useSnack=Di;exports.useToast=So;