@zuzjs/ui 1.0.56 → 1.0.57

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 chunk7G4O77ED_cjs=require('./chunk-7G4O77ED.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),core=require('@zuzjs/core'),jsxRuntime=require('react/jsx-runtime'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
2
- var Cr={Circle:"CIRCLE",Square:"SQUARE"},af={Default:"DEFAULT",Circle:"CIRCLE"},lf={Light:"light",Dark:"dark",System:"system"},Oe={Default:"DEFAULT",Switch:"SWITCH"},pt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},de=pt,ut=hooks.AnchorType,cf=ut,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},mf={Asc:"ASC",Desc:"DESC"},pf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},uf={Dots:"DOTS"},Ke={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Pe={Success:"success",Error:"error",Warning:"warning",Info:"info"},te={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},j={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},ff={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Re={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},et=Re,lo={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Tr=lo,df={Bar:"BAR",Ring:"RING"},co={Default:"range",Text:"number"},mo={Default:"DEFAULT",Card:"CARD"},kt={Gooey:"gooey"},ve={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Pr=Symbol.for("zuz.global.map"),Rr=e=>{globalThis[Pr]=e;},Ma=()=>globalThis[Pr]||{},po=e=>{let r=Array.isArray(e)?e.join(" "):e;if(!r||typeof r!="string")return "";let t=Ma();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${chunk7G4O77ED_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunk7G4O77ED_cjs.h(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,u]=s;return chunk7G4O77ED_cjs.h(u).map(l=>{let c=`${i}(${l})`;return t[c]||l}).join(" ")}return t[o]||o}).join(" ")},Mf=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":po(r)},Ir=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=chunk7G4O77ED_cjs.e[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${chunk7G4O77ED_cjs.i.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${chunk7G4O77ED_cjs.i.addUnitsSafely(t,n)}`;}else chunk7G4O77ED_cjs.d.includes(o)?r[o]=chunk7G4O77ED_cjs.i.addUnitsSafely(t,n):r[o]=n;}return r},uo=e=>{if(!e)return "linear";switch(e.toUpperCase()){case te.Bounce:return "var(--bounce)";case te.Liquid:return "var(--liquid)";case te.Spring:return "var(--spring)";case te.EaseInOut:return "ease-in-out";case te.EaseOutBack:return "ease-out-back";default:return "linear"}},ft=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case j.SlideInLeft:case j.SlideInRight:n={"--fx-x":e===j.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case j.SlideInTop:case j.SlideInBottom:n={"--fx-y":e===j.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case j.SlideInTopScale:case j.SlideInBottomScale:n={"--fx-y":e===j.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},o={"--fx-y":`${a}px`,scale:1};break;case j.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case j.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},Of=(e,r,t)=>{let{from:n,to:o}=ft(e);return r?{...n,...o}:t?n:o};var Va=(e,r)=>{let t=react.useRef([]),n=react.useRef(false);return react.useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),react.useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(i=>o.style.removeProperty(i)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),react.useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?uo(e.curve):"var(--spring)"}`);},[e,r]),react.useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:i,when:u,duration:l=.3,delay:c=0,curve:d,margin:p=0,offset:f=20,watch:y=[]}=e,C=u===false&&!n.current;u===true&&(n.current=true);let x={},{from:T,to:S}=o?ft(o,f,p):{from:s||{},to:a||{}};x=u===void 0?{...T,...S}:u?{...S}:i||T;let P=uo(d),g=[],v=Ir(x);t.current=Object.keys(v);let h={...v};return Object.keys(v).forEach(b=>{let I=b.startsWith("--")?"all":b;g.includes(I)||g.push(`${I} ${l}s ${P} ${c}s`);}),y.forEach(b=>{g.includes(b)||g.push(`${b} 0.1s ${P} 0s`);}),{style:{...h,transition:C?"none":g.join(", "),opacity:C?0:h.opacity,pointerEvents:C?"none":h.pointerEvents}}},[e,e?.when,e?.watch])},ge=Va;var Lt=null,Da=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:i,className:u,propsToRemove:l,draggable:c,dragOptions:d,style:p,...f}=e||{},y=typeof window<"u",C={},x={};if(c&&y&&!Lt&&(import('@zuzjs/hooks').then(v=>{Lt=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),Lt)){let v=Lt(d);C={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let T=[u,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:P}=ge(S,r),g=po(t??"");return {style:{...p,...P,...x},className:[T,g||"",i?.enabled?"--skeleton":"",c?"--draggable":""].join(" ").trim(),rest:{...C,...chunk7G4O77ED_cjs.g(f,l?[...l,"skeleton"]:["skeleton"])}}},N=Da;var Er="(prefers-color-scheme: dark)",$a=typeof window>"u",Lr=react.createContext(void 0),yo=e=>{let r=react.useContext(Lr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},J=yo,za=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Rr(n),jsxRuntime.jsx(Fa,{storageKey:r,forceTheme:t,...o,children:e})),Fa=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=react.useState(()=>t||kr(r,"system")),[a,i]=react.useState(()=>t||kr(r)),u=p=>(p||(p=window.matchMedia(Er)),p.matches?"dark":"light"),l=react.useCallback(p=>{let f=p=="system"?u():p,y=document.documentElement;y.setAttribute("color-scheme",f),y.style.colorScheme=f,i(f);},[u]),c=react.useCallback(p=>{s(p),localStorage.setItem(r,p),l(p);},[o]),d=react.useCallback(p=>{let f=u(p);i(f),o==="system"&&l("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),react.useEffect(()=>{window.matchMedia(Er).addEventListener("change",d);},[d]),react.useEffect(()=>{let p=f=>{f.key==r&&(f.newValue?c(f.newValue):c("system"));};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[c]),react.useEffect(()=>{l(t||o||"system");},[o]),jsxRuntime.jsxs(Lr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:c,...n},children:[t?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ 'use strict';var chunkCKUNYZUA_cjs=require('./chunk-CKUNYZUA.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),core=require('@zuzjs/core'),jsxRuntime=require('react/jsx-runtime'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
2
+ var Cr={Circle:"CIRCLE",Square:"SQUARE"},af={Default:"DEFAULT",Circle:"CIRCLE"},lf={Light:"light",Dark:"dark",System:"system"},Oe={Default:"DEFAULT",Switch:"SWITCH"},pt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},de=pt,ut=hooks.AnchorType,cf=ut,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},mf={Asc:"ASC",Desc:"DESC"},pf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},uf={Dots:"DOTS"},Ke={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Pe={Success:"success",Error:"error",Warning:"warning",Info:"info"},te={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},j={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},ff={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Re={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},et=Re,lo={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Tr=lo,df={Bar:"BAR",Ring:"RING"},co={Default:"range",Text:"number"},mo={Default:"DEFAULT",Card:"CARD"},kt={Gooey:"gooey"},ve={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Pr=Symbol.for("zuz.global.map"),Rr=e=>{globalThis[Pr]=e;},Ma=()=>globalThis[Pr]||{},po=e=>{let r=Array.isArray(e)?e.join(" "):e;if(!r||typeof r!="string")return "";let t=Ma();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${chunkCKUNYZUA_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkCKUNYZUA_cjs.h(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,f]=s;return chunkCKUNYZUA_cjs.h(f).map(c=>{let l=`${i}(${c})`;return t[l]||c}).join(" ")}return t[o]||o}).join(" ")},Mf=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":po(r)},Ir=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=chunkCKUNYZUA_cjs.e[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${chunkCKUNYZUA_cjs.i.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${chunkCKUNYZUA_cjs.i.addUnitsSafely(t,n)}`;}else chunkCKUNYZUA_cjs.d.includes(o)?r[o]=chunkCKUNYZUA_cjs.i.addUnitsSafely(t,n):r[o]=n;}return r},uo=e=>{if(!e)return "linear";switch(e.toUpperCase()){case te.Bounce:return "var(--bounce)";case te.Liquid:return "var(--liquid)";case te.Spring:return "var(--spring)";case te.EaseInOut:return "ease-in-out";case te.EaseOutBack:return "ease-out-back";default:return "linear"}},ft=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case j.SlideInLeft:case j.SlideInRight:n={"--fx-x":e===j.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case j.SlideInTop:case j.SlideInBottom:n={"--fx-y":e===j.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case j.SlideInTopScale:case j.SlideInBottomScale:n={"--fx-y":e===j.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},o={"--fx-y":`${a}px`,scale:1};break;case j.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case j.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},Of=(e,r,t)=>{let{from:n,to:o}=ft(e);return r?{...n,...o}:t?n:o};var Va=(e,r)=>{let t=react.useRef([]),n=react.useRef(false);return react.useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),react.useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(i=>o.style.removeProperty(i)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),react.useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?uo(e.curve):"var(--spring)"}`);},[e,r]),react.useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:i,when:f,duration:c=.3,delay:l=0,curve:d,margin:p=0,offset:u=20,watch:y=[]}=e,C=f===false&&!n.current;f===true&&(n.current=true);let x={},{from:T,to:S}=o?ft(o,u,p):{from:s||{},to:a||{}};x=f===void 0?{...T,...S}:f?{...S}:i||T;let P=uo(d),g=[],v=Ir(x);t.current=Object.keys(v);let h={...v};return Object.keys(v).forEach(b=>{let I=b.startsWith("--")?"all":b;g.includes(I)||g.push(`${I} ${c}s ${P} ${l}s`);}),y.forEach(b=>{g.includes(b)||g.push(`${b} 0.1s ${P} 0s`);}),{style:{...h,transition:C?"none":g.join(", "),opacity:C?0:h.opacity,pointerEvents:C?"none":h.pointerEvents}}},[e,e?.when,e?.watch])},ge=Va;var Lt=null,Da=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:i,className:f,propsToRemove:c,draggable:l,dragOptions:d,style:p,...u}=e||{},y=typeof window<"u",C={},x={};if(l&&y&&!Lt&&(import('@zuzjs/hooks').then(v=>{Lt=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),Lt)){let v=Lt(d);C={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let T=[f,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:P}=ge(S,r),g=po(t??"");return {style:{...p,...P,...x},className:[T,g||"",i?.enabled?"--skeleton":"",l?"--draggable":""].join(" ").trim(),rest:{...C,...chunkCKUNYZUA_cjs.g(u,c?[...c,"skeleton"]:["skeleton"])}}},N=Da;var Er="(prefers-color-scheme: dark)",$a=typeof window>"u",Lr=react.createContext(void 0),yo=e=>{let r=react.useContext(Lr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},Q=yo,za=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Rr(n),jsxRuntime.jsx(Fa,{storageKey:r,forceTheme:t,...o,children:e})),Fa=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=react.useState(()=>t||kr(r,"system")),[a,i]=react.useState(()=>t||kr(r)),f=p=>(p||(p=window.matchMedia(Er)),p.matches?"dark":"light"),c=react.useCallback(p=>{let u=p=="system"?f():p,y=document.documentElement;y.setAttribute("color-scheme",u),y.style.colorScheme=u,i(u);},[f]),l=react.useCallback(p=>{s(p),localStorage.setItem(r,p),c(p);},[o]),d=react.useCallback(p=>{let u=f(p);i(u),o==="system"&&c("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),react.useEffect(()=>{window.matchMedia(Er).addEventListener("change",d);},[d]),react.useEffect(()=>{let p=u=>{u.key==r&&(u.newValue?l(u.newValue):l("system"));};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[l]),react.useEffect(()=>{c(t||o||"system");},[o]),jsxRuntime.jsxs(Lr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:l,...n},children:[t?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
3
3
  const themes = ['light', 'dark']
4
4
  let theme = localStorage.getItem(\`${r}\`) || "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(xo,{children:e})]})},kr=(e,r)=>{if($a)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Mr=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=N(n);return jsxRuntime.jsx("span",{ref:e,style:t,className:s,...a})};Mr.displayName="Zuz.Span";var ae=Mr;var Vr=react.forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...i}=e,{variant:u}=J(true),{className:l,style:c,rest:d}=N(i);return jsxRuntime.jsx("div",{style:{color:s,...c,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||u||W.Small} ${l}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((p,f)=>jsxRuntime.jsx(ae,{className:`path${f+1}`},`${t}-layer-${f}`))})});Vr.displayName="Zuz.Icon";var oe=Vr;var he={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Dr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:i}=N(o),{spinner:u}=J(true),l=()=>{switch(r||u?.type||he.Simple){case he.Simple:return null;case he.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 he.Roller:return null}};return jsxRuntime.jsx(m,{className:`${s} --spinner --${(r||u?.type||he.Simple).toLowerCase()} --${t||u?.variant||W.Small}`.trim(),style:{...a},...i,children:l()})};Dr.displayName="Zuz.Spinner";var Se=Dr;var Vt={Loading:"loading",Normal:"normal"};var Ar=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:i,withLabel:u,spinner:l,state:c,disabled:d,...p}=r,{style:f,className:y,rest:C}=N(p),{variant:x}=J(true);return jsxRuntime.jsxs("button",{className:core.removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${y}`).trim().replace(/\s+/g," "),style:f,ref:e,disabled:c==Vt.Loading||r.skeleton?.enabled||d,...C,children:[c==Vt.Loading&&jsxRuntime.jsx(Se,{variant:o||x,type:l||he.Simple}),(!c||c==Vt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(oe,{variant:a,name:s}),u===true?jsxRuntime.jsx(ae,{children:i}):i]})]})};Ar.displayName="Zuz.Button";var Z=Ar;var $r=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:i=0,duration:u=.5,stagger:l=.05,repeat:c=true,reveal:d=false,hover:p=false,...f}=r,{style:y,className:C,rest:x}=N(f),T=react.useRef(null),[S,P]=react.useState(false),[g]=hooks.useIntersectionObserver([T],{threshold:[1]}),v=react.useMemo(()=>{if(y?.opacity!==void 0)return y.opacity;if(typeof r.as=="string"){let H=r.as.match(/opacity:([\d.]+)/);if(H)return H[1]}return 1},[r.as,y?.opacity]),h=react.useMemo(()=>a?p?S:d?g===1:true:false,[a,p,S,d,g]);react.useEffect(()=>{e&&(typeof e=="function"?e(T.current):e.current=T.current);},[e]);let b=`h${r.h||1}`,I=react.useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),z=react.useMemo(()=>{let H=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof H=="string"&&H.includes("text-clip")},[r.as]);react.useLayoutEffect(()=>{if(!z||!T.current||I===null)return;let H=T.current,k=0,M=0,L=()=>{let B=H.getBoundingClientRect(),G=getComputedStyle(H).backgroundImage,U=B.width;H.querySelectorAll(".--fx-char").forEach(A=>{let K=A.getBoundingClientRect().left-B.left;A.style.backgroundImage=G,A.style.backgroundRepeat="no-repeat",A.style.backgroundSize=`${U}px 100%`,A.style.backgroundPosition=`-${K}px 0`,A.style.backgroundClip="text",A.style.webkitBackgroundClip="text",A.style.color="transparent";});},F=()=>{cancelAnimationFrame(k),cancelAnimationFrame(M),k=requestAnimationFrame(()=>{M=requestAnimationFrame(L);});};F();let R=new ResizeObserver(F);return R.observe(H),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(F),window.addEventListener("resize",F),()=>{cancelAnimationFrame(k),cancelAnimationFrame(M),R.disconnect(),window.removeEventListener("resize",F);}},[z,I,a,h]);let E=react.useMemo(()=>n?jsxRuntime.jsx(ae,{dangerouslySetInnerHTML:{__html:n}}):a&&I!==null?I.split("").map((H,k)=>{let M=H===" ",F=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":c?"infinite":"1";return jsxRuntime.jsx(ae,{"data-char":H,className:`--fx-char -fx ${h?`--fx-${a}`:""}`,style:{"--delay":`${i+k*l}s`,"--duration":`${u}s`,"--iteration":F,"--target-opacity":v,display:M?"inline":"inline-block",whiteSpace:"pre",opacity:!h&&a==="typewriter"?0:void 0},children:H},k)}):o,[o,n,a,I,h,i,l,u,c]);return jsxRuntime.jsx(b,{ref:T,onMouseEnter:()=>p&&P(true),onMouseLeave:()=>p&&P(false),style:a?{...y,display:a?"flex":y?.display,flexWrap:a?"wrap":y?.flexWrap,opacity:a&&!h?0:a?1:y?.opacity,transition:a?"opacity 0.4s ease":void 0}:y,className:`${C} ${a?"--text-fx -fx":""}`.trim(),...x,children:E})};$r.displayName="Zuz.Text";var _=$r;var ei=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:i}=e;return r=="-"?jsxRuntime.jsx(m,{className:"--line"}):jsxRuntime.jsxs(Z,{reset:true,onClick:u=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(m,{as:"--icon",children:jsxRuntime.jsx(oe,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(_,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},zr=ei;var Zr=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:i,event:u,arrow:l,when:c,items:d,header:p,footer:f,origin:y=ut.TopRight,...C}=r,[x,T]=react.useState(false),[S,P]=react.useState(d||[]),{position:g,targetRef:v,calculatedAnchor:h}=hooks.useAnchorPosition(i?.current,u,{offsetX:s,offsetY:a,preferredAnchor:y}),I=i&&g.top>i.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",z=react.useMemo(()=>{let F=h.toLowerCase();return F.includes("left")?"--arrow-left":F.includes("right")?"--arrow-right":"--arrow-center"},[h]),E=g.top!==0||g.left!==0;react.useEffect(()=>{c&&E?T(true):c||T(false);},[c,E]);let{className:H,style:k,rest:M}=N(C),L=ge({...o?.transition?{transition:o.transition??j.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??te.EaseInOut,duration:o?.duration??.05,when:x&&E});return jsxRuntime.jsxs(m,{ref:v,className:`--contextmenu ${l||i!=null?`--has-arrow ${I} ${z}`:""} abs flex cols ${H}`.trim(),"aria-hidden":!x,style:{...k,...L.style,top:g.top,left:g.left,visibility:E?"visible":"hidden",transformOrigin:h},...M,children:[typeof p=="function"?react.createElement(p):p,S.map((F,R)=>jsxRuntime.jsx(zr,{...F,index:R},`context-${F.label.toLowerCase()}-${R}`)),typeof f=="function"?react.createElement(f):f]})};Zr.displayName="Zuz.ContextMenu";var So=Zr;var Kr=react.forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:i,...u}=e,l=J(true),c=hooks.useDelayed(),d=n||l?.group?.fx,p=s||l?.group?.fxDelay,f=a||l?.group?.fxStep,y=i||l?.group?.classToIgnore||"-fx",C=react.useMemo(()=>d?react$1.addPropsToChildren(t,x=>{if(x.type===react.Fragment)return false;let T=x.props||{},S="fx"in T,P="tfx"in T,g=T.as?Array.isArray(T.as)?T.as.join(" "):T.as:T.className||"";return !(typeof g=="string"&&g.includes(y))&&(!S||P)},(x,T)=>{let S=(p??0)+x*(f??.1),P=T.props||{};return "tfx"in P?{delay:(P.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||c)}}}):t,[t,o,c,d,p,f,y,n]);return jsxRuntime.jsx(m,{className:"--group",ref:r,...u,children:C})});Kr.displayName="Zuz.Group";var wo=Kr;var Gr=react.forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:i,...u}=e,{className:l,style:c,rest:d}=N(u),{spinner:p}=J(true);return "when"in e&&e.when==false?null:jsxRuntime.jsxs(wo,{fx:{transition:j.SlideInBottom,curve:te.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...d,children:[jsxRuntime.jsx(Se,{variant:o||p?.variant||W.Small,type:n||p?.type||he.Simple}),!i&&jsxRuntime.jsx(_,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Gr.displayName="Zuz.Cover";var Ee=Gr;var Co=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},Ie=new Co;var Ur=react.forwardRef((e,r)=>{let{when:t,...n}=e;return jsxRuntime.jsx(m,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:j.FadeIn,when:t},...n})});Ur.displayName="Zuz.Overlay";var We=Ur;var yi=({action:e,render:r=true,message:t=""})=>jsxRuntime.jsx(m,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),qr=yi;var bi=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsxRuntime.jsx(m,{as:`--footer flex aic rel ${r?r==Tr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsxRuntime.jsx(Z,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),Yr=bi;var vi={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"})," "]}),[Pe.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"})}),[Pe.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"})}),[Pe.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"})}),[Pe.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"})]})},O=vi;var Si=({title:e="Alert",onClose:r})=>jsxRuntime.jsxs(m,{as:"--head flex aic rel",children:[jsxRuntime.jsx(m,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsxRuntime.jsx(Z,{onClick:t=>r(),className:"--closer abs center-v",children:O.close})]}),Qr=Si;var tn=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:i,speed:u,type:l,action:c,actionPosition:d,spinner:p,loadingMessage:f,variant:y,inBackground:C,forceClose:x,forceLoading:T,onClose:S,onShow:P,onHide:g,...v}=r,h=react.useMemo(()=>core.uuid(12),[]),[b,I]=react.useState(o||""),[z,E]=react.useState(s||""),[H,k]=react.useState(l||et.Dialog),[M,L]=react.useState(false),[F,R]=react.useState(true),[B,G]=react.useState(c||null),[U,D]=react.useState(false),{variant:A,spinner:q,dialog:K}=J(true),Q=y||K?.variant||A||W.Small,{style:ee,className:ie,rest:me}=N(v),ye=react.useRef(null),se=ge({when:M,duration:u||K?.speed||.3,delay:K?.delay||.1,transition:a||K?.transition||j.SlideInBottom,curve:i||K?.curve||te.EaseInOut,watch:["scale","filter","transform"]}),le=()=>{L(false),S(n);},Y=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Ie.isTop(le)&&le();}}],[M]);hooks.useShortcuts(Y),react.useEffect(()=>{k(et.Dialog),E(s),I(b),B&&G(B.reduce((ne,ue)=>(ne.push({...ue,key:ue.key||core.uuid(12)}),ne),[])),L(true),setTimeout(()=>P?P():()=>{},500);},[]),react.useEffect(()=>{x&&le();},[x]),react.useEffect(()=>{T!=null&&D(T);},[T]),react.useEffect(()=>(M?Ie.push(le):Ie.pop(le),()=>Ie.pop(le)),[M]);let re=react.useMemo(()=>1e4+t*10,[t]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(We,{style:{zIndex:re},when:M}),jsxRuntime.jsxs(m,{as:`--dialog --${(l??et.Default).toLowerCase()} ${M?"--visible":""} ${ie} fixed abc`.trim(),style:{...se.style,zIndex:re+1,pointerEvents:C==true?"none":"auto",...C==true?{scale:"0.92",filter:"blur(2px)"}:{}},...me,ref:ye,children:[jsxRuntime.jsx(Qr,{title:b,onClose:le}),jsxRuntime.jsx(qr,{message:z,render:F,action:B}),B&&B.length>0&&jsxRuntime.jsx(Yr,{variant:Q,action:B,dialogID:h,actionPosition:d}),jsxRuntime.jsx(Ee,{when:U,spinner:p||K?.spinner||q?.type||he.Simple,message:f||K?.loadingMessage})]})]})};tn.displayName="Zuz.Dialog";var Po=tn;var on=react.forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:i,containerRef:u,thumbY:l,thumbX:c,onScrollY:d,onScrollX:p}=hooks.useScrollbar(t||1,o,n),{style:f,className:y,rest:C}=N(a);return react.useEffect(()=>{let x=u.current;if(!x)return;let T=()=>{window.dispatchEvent(new Event("resize"));},S=P=>{let g=P.target;if(g.closest(".--allow-scroll")){let h=g.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:I,clientHeight:z}=h,E=P.deltaY<0,H=P.deltaY>0;(E&&b>0||H&&b+z<I)&&P.stopPropagation();}};return x.addEventListener("scroll",T),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",T),x.removeEventListener("wheel",S);}},[u]),jsxRuntime.jsxs(m,{ref:i,className:y.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(m,{as:`--scroll-content ${y}`.trim(),ref:u,style:s||{},children:C.children}),jsxRuntime.jsx(m,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:l,onMouseDown:d})}),jsxRuntime.jsx(m,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:c,onMouseDown:p})})]})});on.displayName="Zuz.ScrollView";var Ro=on;var rn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:i,animation:u,prerender:l,inBackground:c,forceClose:d,forceLoading:p,onClose:f,...y}=r,{drawer:C}=J(true),[x,T]=react.useState(a),[S,P]=react.useState(false),[g,v]=react.useState(l??(C?.prerender||true)),[h,b]=react.useState(false),I=()=>{P(false),f?.(t??-1);},{className:z,style:E,rest:H}=N(y),k=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Ie.isTop(I)&&I();}}],[S]);hooks.useShortcuts(k),react.useEffect(()=>{T(a);},[a]),react.useEffect(()=>(S?Ie.push(I):Ie.pop(I),()=>Ie.pop(I)),[S]),react.useEffect(()=>{P(true);},[]),react.useEffect(()=>{d&&I();},[d]),react.useEffect(()=>{p!=null&&b(p);},[p]);let M=o||C?.from||ve.Left,L=react.useMemo(()=>{switch(M){case ve.Left:return {from:{x:"-100vw"},to:{x:0}};case ve.Right:return {from:{x:"100vw"},to:{x:0}};case ve.Top:return {from:{y:"-100vh"},to:{y:0}};case ve.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,C?.from]),F=ge({from:{...L.from,opacity:0},to:{...L.to,opacity:1},when:S,curve:u||C?.animation||te.EaseInOut,duration:s||C?.speed||.5,watch:["scale","filter"]}),R=react.useMemo(()=>1e4+(n||1)*10,[n]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(We,{onClick:B=>{S&&I();},when:S,style:{zIndex:R}}),jsxRuntime.jsxs(m,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${z} --${M.toLowerCase()} fixed`,style:{...E,...F.style,"--m":`${i||C?.margin||0}px`,zIndex:R+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...H,children:[o==ve.Top||o==ve.Bottom?jsxRuntime.jsx(m,{className:"--handle"}):null,jsxRuntime.jsx(Z,{as:"--close-drawer --abs",onClick:I,children:O.close}),jsxRuntime.jsxs(Ro,{as:"rel",children:[g||S?x:null,jsxRuntime.jsx(Ee,{when:h})]})]})]})};rn.displayName="Zuz.Drawer";var Bo=rn;var sn=react.forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=react.useRef(null);react.useImperativeHandle(r,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.useEffect(()=>{t&&a.current&&(o?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:i,style:u,rest:l}=N(s);return jsxRuntime.jsx(m,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:u,...l,children:jsxRuntime.jsx(m,{ref:a,className:"--bar rel"})})});sn.displayName="Zuz.ProgressBar";var Ue=sn;var zt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(zt||{}),Ft=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Ft||{}),an=(t=>(t.Stack="stack",t.Individual="individual",t))(an||{}),ln={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Ai=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:i,message:u,duration:l,sticky:c=false,actions:d=[],position:p,style:f,isHovered:y,total:C,progress:x,progressValue:T,forceClose:S,variant:P,onClick:g,onClose:v}=e,[h,b]=react.useState(false),[I,z]=react.useState(false),{toast:E}=J(true),H=typeof T=="number",k=H?Math.max(0,Math.min(1,T)):void 0,M=I||S,L=p??E?.position??"TopCenter",F=n??E?.type??"default",R=f??E?.style??"stack",B=l??E?.duration??4,G=x??E?.progress??false,U=react.useRef(B*1e3),D=react.useRef(void 0),A=react.useRef(void 0),q=react.useRef(null),K=ge({when:h&&!M,duration:.3,transition:E?.transition||(L.includes("Top")?j.SlideInTop:L.includes("Bottom")?j.SlideInBottom:L.includes("Left")?j.SlideInLeft:j.SlideInRight),curve:E?.curve||te.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{b(true);let Y=re=>{if(A.current!==void 0){let ne=re-A.current;if(!H&&!y&&!c&&!M&&(U.current-=ne,q.current)){let ue=Math.max(0,U.current/(B*1e3)*100);q.current?.setProgress?.(ue/100);}}A.current=re,U.current<=0?z(true):D.current=requestAnimationFrame(Y);};return D.current=requestAnimationFrame(Y),()=>{D.current&&cancelAnimationFrame(D.current);}},[y,c,M,B]),react.useEffect(()=>{if(M){let Y=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(Y)}},[M,t]);let Q=R==="stack",ee=y?r*65:r*8,ie=y?1:Math.max(.85,1-r*.05),me=y?1:Math.max(.4,1-r*.2),ye=Y=>{g?g(Y):s!==true&&(!d||d.length===0)&&z(true);},se=K.style.transform||"translate(0, 0)",le=M?se:`${se} translateY(${L.includes("Top")?ee:-ee}px) scale(${ie})`;return jsxRuntime.jsxs(m,{onClick:ye,as:`--snack --${M?"hidden":"visible"} --${P||E?.variant||W.Medium} --${F} --${L.toLowerCase()} abs flex aic`,style:{...K.style,zIndex:1e3-r,pointerEvents:M?"none":"auto",opacity:M?K.style.opacity:me,transform:le,filter:!M&&Q&&!y&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${K.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsxs(m,{as:"--ico flex aic jcc rel",children:[o?jsxRuntime.jsx(oe,{name:o}):jsxRuntime.jsx(m,{as:"--no-icon"}),s===true&&jsxRuntime.jsx(Se,{as:"abs abc"})]}),jsxRuntime.jsxs(m,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsxRuntime.jsx(_,{as:"--tt",children:i||ln[n]}),jsxRuntime.jsx(_,{as:"--tm",children:u})]}),d&&d.length>0&&jsxRuntime.jsx(m,{as:"--actions flex gap:5",children:d.map((Y,re)=>jsxRuntime.jsx(Z,{as:"--snack-btn bold",variant:W.XSmall,onClick:ne=>{ne.stopPropagation(),Y.onClick(ne);},children:Y.label},re))}),(G||H)&&jsxRuntime.jsx(Ue,{as:"abs",progress:k,ref:q})]})},ko=Ai;var we=react.createContext(null),Ki=({ref:e,...r})=>{let n=react.useContext(we)?.depth??0,[o,s]=react.useState(null),[a,i]=react.useState(null),[u,l]=react.useState(false),[c,d]=react.useState([]),p=hooks.useDelayed(),f=react.useRef(0),y=()=>++f.current,C=()=>{l(false),setTimeout(()=>i(null),200);};react.useImperativeHandle(e,()=>({add(g){let v=y(),h={id:v,...g};return d(b=>[...b,h]),v},openMenu(g){l(false),setTimeout(()=>{i({id:y(),type:"menu",props:g}),l(true);},16);},update(g,v){d(h=>h.map(b=>b.id!==g?b:{...b,props:{...b.props,...v}}));},remove(g){d(v=>v.map(h=>h.id===g?{...h,props:{...h.props,forceClose:true}}:h)),a?.id===g&&C();},loading(g,v){d(h=>h.map(b=>b.id===g?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===g&&C();},clear(g){d(c.filter(v=>v.type!=g));}})),react.useEffect(()=>{if(a&&u){let g=()=>C();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[a,u,C]);let x=g=>{setTimeout(()=>{d(v=>v.filter(h=>h.id!==g)),a?.id===g&&i(null);},250);},T=react.useMemo(()=>[...c.filter(g=>g.type!="toast")],[c]);if(!p)return null;let S=c.filter(g=>g.type=="toast").reverse(),P=Object.values(Ft);return reactDom.createPortal(jsxRuntime.jsxs(m,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[T.map((g,v)=>{let h=v<T.length-1;return g.type==="dialog"?jsxRuntime.jsx(Po,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsxRuntime.jsx(Bo,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):null}),P.map(g=>{let v=S.filter(h=>(h.props.position||"TopCenter")===g);return v.length===0?null:jsxRuntime.jsx(m,{onMouseEnter:()=>s(g),onMouseLeave:()=>s(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((h,b)=>jsxRuntime.jsx(ko,{index:b,total:v.length,isHovered:o===g,onClose:x,id:h.id,...h.props},h.id))},g)}),a&&jsxRuntime.jsx(m,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(So,{onClose:C,when:u,...a.props},`menu-${a.id}`)})]}),document.body)},Wi=({children:e})=>{let r=react.useContext(we),t=r?r.depth+1:0,n=react.useRef(null),o=react.useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxRuntime.jsxs(we.Provider,{value:o,children:[e,jsxRuntime.jsx(Ki,{ref:n})]})},xo=Wi;var Ui=()=>{let e=react.useContext(we);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:i,transition:u,curve:l,arrow:c,duration:d,header:p,footer:f})=>{e.openMenu({fx:{transition:u,curve:l,duration:d},parent:n,items:o,origin:s||ut.TopCenter,offsetX:a,offsetY:i,arrow:c,header:p,footer:f});},hide:e.clear}},qi=Ui;var Yi=()=>{let e=react.useContext(we);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:et.Dialog}});return {id:a,setLoading:i=>n(a,i),hide:()=>t(a)}},hide:t}},ji=Yi;var Ji=()=>{let e=react.useContext(we);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:ve.Right}),left:s=>o({children:s,from:ve.Left}),top:s=>o({children:s,from:ve.Top}),bottom:s=>o({children:s,from:ve.Bottom}),close:t}},el=Ji;var ol=(e,r,t={})=>{let[n,o]=react.useState(null),[s,a]=react.useState(false),{duration:i=.25,curve:u=te.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=t;return react.useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:ge({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:u,duration:i,when:s&&r}).style,isMeasured:s,sourceRect:n}},rl=ol;var il=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=react.useRef(null),i=react.useCallback(()=>{let u=e.current;if(!u)return;let l=s?.current||u.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=u.getBoundingClientRect(),d=l.getBoundingClientRect(),p,f;o?(p=o.getBoundingClientRect(),f="absolute"):(window.getComputedStyle(u).position==="fixed"?f="fixed":f="absolute",f==="fixed"?p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),u.style.position!==f&&(u.style.position=f),a.current=f;let x=0,T=0;switch(n){case "top":x=d.top-c.height-t,T=d.left,x<p.top&&d.bottom+c.height+t<=p.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,T=d.left,x+c.height>p.bottom&&d.top-c.height-t>=p.top&&(x=d.top-c.height-t);break;case "left":x=d.top,T=d.left-c.width-t,T<p.left&&d.right+c.width+t<=p.right&&(T=d.right+t);break;case "right":x=d.top,T=d.right+t,T+c.width>p.right&&d.left-c.width-t>=p.left&&(T=d.left-c.width-t);break}if(x=Math.max(p.top,Math.min(x,p.bottom-c.height)),T=Math.max(p.left,Math.min(T,p.right-c.width)),a.current==="fixed")u.style.top=`${x}px`,u.style.left=`${T}px`;else {let S;u.offsetParent?S=u.offsetParent.getBoundingClientRect():S={top:0,left:0};let P=x-S.top+window.scrollY,g=T-S.left+window.scrollX;u.style.top=`${P}px`,u.style.left=`${g}px`;}},[e,s,t,n,o]);return react.useEffect(()=>{let u=e.current;if(!u)return;let l=s?.current||u.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(i);return c.observe(u),l&&c.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,o,s]),{postion:a.current,reposition:i}},xt=il;var cl=()=>{let e=react.useContext(we);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(f,y)=>e.add({type:"toast",props:{...y,type:f}}),t=()=>e.clear("toast"),n=f=>e.remove(f),o=(f,y)=>e.update(f,y),s=f=>({id:f,update:y=>o(f,y),setType:y=>o(f,{type:y}),setProgress:y=>o(f,{progress:true,progressValue:y}),setBusy:y=>o(f,{busy:y}),success:()=>o(f,{type:"success"}),error:()=>o(f,{type:"error"}),warn:()=>o(f,{type:"warn"}),promise:()=>o(f,{type:"promise"}),default:()=>o(f,{type:"default"}),hide:()=>n(f)}),a=f=>s(r("default",f)),i=f=>s(r("success",f)),u=f=>s(r("error",f)),l=f=>s(r("warn",f)),c=f=>s(r("promise",f)),d=(f,y,C)=>{let x=r(f,{...y,sticky:y.sticky??false,actions:[{label:C?.label||"Ok",onClick:T=>{C?.onClick?.(T),n(x);}}]});return s(x)},p=(f,y,C,x)=>{let T=r(f,{...y,sticky:true,actions:[{label:C?.label||"Ok",onClick:S=>{C?.onClick?.(S),(C?.hide??false)===true&&n(T);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(T);}}]});return s(T)};return {show:a,hide:n,promise:c,clearAll:t,ok:(f,y)=>d("default",f,y),success:(f,y)=>y?d("success",f,y):i(f),error:(f,y)=>y?d("error",f,y):u(f),confirm:(f,y,C)=>p("default",f,y,C),warn:(f,y)=>y?d("warn",f,y):l(f),succes:(f,y)=>y?d("success",f,y):i(f)}},ml=cl;var ul=()=>{let e=react.useContext(we);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(l,c)=>e.add({type:"toast",props:{...c,type:l}});return {show:(l,c,d,p)=>r("default",{title:l,message:c,icon:d,duration:p}),hide:l=>e.remove(l),success:(l,c,d,p)=>r("success",{title:l,message:c,icon:d,duration:p}),error:(l,c,d,p)=>r("error",{title:l,message:c,icon:d,duration:p}),warn:(l,c,d,p)=>r("warn",{title:l,message:c,icon:d,duration:p}),promise:(l,c,d,p)=>r("promise",{title:l,message:c,icon:d,duration:p}),clearAll:()=>e.clear("toast")}},Lo=ul;var hn=({ref:e,style:r,...t})=>{let n=react.useRef(null),o=react.useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=N(t,o);return jsxRuntime.jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...i})};hn.displayName="Zuz.Box";var m=hn;var xn=react.forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=react.useState(false);return jsxRuntime.jsxs(m,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs(Z,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(_,{className:"--label flex",children:t}),jsxRuntime.jsx(m,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(m,{className:"--detail",children:n})]})});xn.displayName="Zuz.Accordion";var xl=xn;var bl=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsxRuntime.jsx(Z,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsxRuntime.jsx(oe,{name:r}):r}),vn=bl;var Sn=react.forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,i=react.useRef(null),[u,l]=react.useState(o||t[0].tag||0),c=react.useCallback(({x,y:T})=>{if(i.current){let S=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${T-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=react.useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=react.useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",c));},[]);react.useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,T)=>T.label.length>x.length?T.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",p));},[]);let{className:f,style:y,rest:C}=N(a);return jsxRuntime.jsxs(m,{ref:i,style:y,className:[`--actionbar flex aic ${f}`,`${!s||s==de.Auto?"rel":`--${s}`}`].join(" ").trim(),...C,children:[t.map((x,T)=>jsxRuntime.jsx(vn,{selected:u===x.tag||o==T,...x,idx:T},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(m,{className:"--tip abs",children:jsxRuntime.jsx(m,{className:"--track flex aic",children:t.map(({label:x})=>jsxRuntime.jsx(m,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Sn.displayName="Zuz.ActionBar";var Tl=Sn;var Cn=react.forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...i}=e,{className:u,style:l,rest:c}=N(i);return jsxRuntime.jsxs(m,{className:`--alert --${t||Pe.Info} flex aic ${u}`.trim(),style:l,...c,children:[jsxRuntime.jsx(m,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&O[t||Pe.Info]}),jsxRuntime.jsxs(m,{className:"--meta flex cols",children:[jsxRuntime.jsx(_,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(_,{className:"--message",h:2,children:s})]})]})});Cn.displayName="Zuz.Alert";var Il=Cn;var Ho=react.createContext(null),Ao=()=>{let e=react.useContext(Ho);return e?react.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},$o=()=>react.useContext(Ho),De=()=>{let e=$o(),r=Ao();return {...e,...r}},Rn=({children:e,initialValues:r={}})=>{let t=react.useRef({values:r,errors:{},touched:{}}),n=react.useRef(new Set(Object.keys(r))),o=react.useRef(new Set),s=react.useCallback(()=>t.current,[]),a=react.useCallback(l=>(o.current.add(l),()=>o.current.delete(l)),[]),i=()=>{o.current.forEach(l=>l());};react.useEffect(()=>{if(r&&Object.keys(r).length>0){let l=new Set(Object.keys(r)),c=[...n.current].filter(p=>!l.has(p)),d={...t.current.values};c.forEach(p=>delete d[p]),t.current={...t.current,values:{...d,...r}},n.current=l,i();}},[r]);let u=react.useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,c)=>{t.current.values[l]!==c&&(t.current={...t.current,values:{...t.current.values,[l]:c}},i());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:c,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(l,c)=>{t.current={...t.current,errors:{...t.current.errors,[l]:c}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsxRuntime.jsx(Ho.Provider,{value:u,children:e})};var Nn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:i,className:u,rest:l}=N(a),{variant:c}=J(true),d=react.useRef(null),p=De(),f=o?p.errors?.[o]:null,y=o&&p.values&&p.setFieldValue,C=y?p.values?.[o]:void 0,x=hooks.useDebounce(S=>{y&&p.setFieldValue?.(o,S);},500),T=S=>{let P=S.currentTarget.value;n&&(P=P.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=P),x(P),r.onInput?.(S);};return react.useEffect(()=>{d.current&&o&&C!==void 0&&d.current.value!==String(C)&&(d.current.value=String(C));},[C,o]),react.useEffect(()=>()=>{y&&p.deleteFieldValue?.(o);},[]),jsxRuntime.jsx("input",{name:o,className:`--input --${t||c} ${f?"--has-error":""} --flex ${u}`.trim(),style:i,defaultValue:C??r.defaultValue??"",onInput:T,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...l})};Nn.displayName="Zuz.Input";var pe=Nn;var En=e=>{let{meta:r,children:t}=e,n=hooks.useDelayed(),{label:o,icon:s,...a}=react.isValidElement(r)?{}:r,{className:i,style:u,rest:l}=N({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return react.isValidElement(r)?jsxRuntime.jsx("li",{style:u,className:i,children:r}):jsxRuntime.jsxs("li",{style:u,className:i,...l,children:[t,typeof r=="string"?r:o]})};En.displayName="Zuz.ListItem";var kn=En;var Mn=react.forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...i}=e,{className:u,style:l,rest:c}=N(i),d=a==true?"ol":"ul";return react.createElement(d,{className:`--list --${n||W.Small} flex ${o??"cols"} ${u}`.trim(),style:l,ref:r,...c,children:t.map((p,f,y)=>{let C=`${typeof p=="string"?`li-${String(p)}`:react.isValidElement(p)?`li-${p.key}`||`${f}-${core.MD5(p.toString())}`:p.label}-${f}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(kn,{meta:p}),s&&y[f+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${f+1}-${C}`):null]},C)})})});Mn.displayName="Zuz.List";var Xe=Mn;var Vn=react.forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...i}=e,{className:u}=N({as:s||""}),{style:l}=N(i),[c,d]=react.useState(false),[p,f]=react.useState(o||[]),y=react.useRef(null),C=react.useRef(null),x=react.useRef(null),T=react.useMemo(()=>i.name||core.uuid(12),[]),[S,P]=react.useState(null),[g,v]=react.useState(null),[h,b]=react.useState([]),z=hooks.useDebounce(R=>{R.target.value==""?(d(false),f([])):n&&R.target.value.trim()!=""&&core.withPost(n,{query:R.target.value}).then(B=>{"items"in B&&core._(B.items).isArray()?(f(B.items),v(R.target.value),b(B.items)):console.error("Action Response should contain items array"),P(null);}).catch(B=>{P(null),f([]);});},250),E=()=>{if(C.current){let R=C.current.getBoundingClientRect(),B=window.innerHeight-R.bottom,G=R.top;if(x.current){let U=x.current;B<U.offsetHeight&&G>B?(U.style.top="auto",U.style.bottom=`${R.height}px`,U.style.maxHeight=`${G-150}px`):(U.style.top=`${R.height+5}px`,U.style.bottom="auto",U.style.maxHeight=`${B-150}px`);}}},H=R=>{if(p.length>0){if((R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),R.stopPropagation()),R.key==="Escape")P(null),d(false),f([]);else if(R.key==="ArrowDown")P(B=>{let G=B===null||B===p.length-1?0:B+1;return M(G),G});else if(R.key==="ArrowUp")P(B=>{let G=B===null||B===0?p.length-1:B-1;return M(G),G});else if(R.key==="Enter"&&S!==null){let B=p[S];y.current&&(y.current.value=B,d(false),f([]));}}},k=R=>{y.current&&(y.current.value=R,d(false),f([]));},M=R=>{let B=p[R];if(B&&y.current&&(y.current.value=B,y.current.setSelectionRange(B.length,B.length)),x.current){let U=x.current.children[R];U&&U.scrollIntoView({block:"nearest"});}},L=R=>{C.current&&!C.current.contains(R.target)&&(d(false),f([]));},F=()=>{y.current&&y.current.value===g&&(f(h),P(null),E());};return react.useEffect(()=>(window.addEventListener("resize",E),window.addEventListener("scroll",E,true),document.addEventListener("mousedown",L),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),document.removeEventListener("mousedown",L);}),[]),react.useEffect(()=>{E();},[p]),jsxRuntime.jsxs(m,{style:l,ref:C,className:`--autocomplete --${e.size||W.Small} flex aic rel ${u}`.trim(),children:[jsxRuntime.jsx(pe,{ref:y,autoComplete:"off",onChange:z,onKeyDown:H,onFocus:F,...i}),jsxRuntime.jsx(m,{className:"--arrow rel flex aic jcc",children:p.length>0?O.arrowUp:O.arrowDown}),p.length>0&&jsxRuntime.jsx(Xe,{id:T,ref:x,className:"--suggestion-list flex cols abs",items:p.map((R,B)=>({label:R,onClick:G=>{G.preventDefault(),G.stopPropagation(),k(R);},className:S===B?"--current":"",animate:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:core.clamp(.02*B,.02,.5)}}))})]})});Vn.displayName="Zuz.AutoComplete";var Ql=Vn;var Dn=react.forwardRef((e,r)=>{let t=react.useRef(null),n=react.useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=N(e,n);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Dn.displayName="Zuz.Image";var Ye=Dn;var Hn=react.forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:i,as:u,alt:l,color:c,style:d,...p}=e,[f,y,C]=hooks.useImage(t??"",s,a),{className:x,style:T,rest:S}=N({fx:i,as:u});return jsxRuntime.jsx(m,{className:`--avatar --${n||W.Small} --${(o||Cr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:c||"var(--avatar-bg, var(--primary))",...d,...T},...S,children:t?jsxRuntime.jsx(Ye,{src:f,crossOrigin:s,referrerPolicy:a,...p}):jsxRuntime.jsx(_,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});Hn.displayName="Zuz.Avatar";var ac=Hn;var ic=({size:e=5,type:r="dead",label:t="",variant:n=W.Small,loading:o=false,spinner:s,...a})=>{let{style:i,className:u,rest:l}=N(a);return jsxRuntime.jsxs(m,{style:{...core._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${r} rel flex aic jcc ${u}`.trim(),children:[jsxRuntime.jsx(m,{fx:{transition:j.FadeIn,curve:te.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(Se,{type:s})}),core._(t).isEmpty()?jsxRuntime.jsx(m,{as:`--dot --${r}`}):jsxRuntime.jsx(_,{as:"--label",children:t})]})},lc=ic;var wc=[{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 e=new Date,r=e.getDay();return dateFns.addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return dateFns.format(dateFns.addDays(e,(6-r)%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)}],Cc=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},$n=react.forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:i,rest:u}=N(s),[l,c]=react.useState(t||new Date),d=dateFns.startOfMonth(l),p=dateFns.endOfMonth(l),f=dateFns.startOfWeek(d),y=dateFns.endOfWeek(p),C=react.useMemo(()=>dateFns.eachDayOfInterval({start:f,end:y}),[f,y]),x=P=>{o?.(P),c(P);},T=()=>{c(P=>new Date(P.getFullYear(),P.getMonth()-1));},S=()=>{c(P=>new Date(P.getFullYear(),P.getMonth()+1));};return jsxRuntime.jsxs(m,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsxRuntime.jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Cc(wc).map(P=>{let g=P.getDate();return jsxRuntime.jsxs(Z,{onClick:()=>x(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(_,{as:"flex:1",children:P.label}),jsxRuntime.jsx(_,{as:"tar",children:P.getDateFormat()})]},`--dtp-option-label-${P.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(_,{as:"flex:1 --calendar-cm bold",children:dateFns.format(l,"MMMM yyyy")}),jsxRuntime.jsx(Z,{onClick:T,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(Z,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(P=>jsxRuntime.jsx(_,{as:"--calendar-day",children:P},`--calendar-hd-${P}`)),C.map((P,g)=>{let v=dateFns.isSameMonth(P,l),h=dateFns.isSameDay(P,l),b=dateFns.isToday(P);return jsxRuntime.jsx(Z,{disabled:!v,onClick:()=>x(P),as:["--calendar-day --calendar-dd",`${h?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:dateFns.format(P,"d")},`--calendar-day-${g}-${P.getFullYear()}-${P.getMonth()}-${P.getDay()}`)})]})]})]})});$n.displayName="Zuz.Calendar";var Zo=$n;var Ut=(t=>(t.Table="table",t.Gooey="gooey",t))(Ut||{});var Zn=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:u,nextLabel:l,hash:c,loading:d,seperator:p,renderOnZeroPageCount:f,asDots:y,progressBar:C,onPageChange:x,...T}=r,S=react.useRef(null),P=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),g=react.useCallback(R=>`${core.toHash(R,c||6,P)}${p||""}${P}`,[P]),v=react.useMemo(()=>i||"...",[i]),h=react.useRef(null),[b,I]=react.useState({id:c?o?typeof o=="number"?g(o):o:1:o||1,label:o||1});react.useImperativeHandle(e,()=>({setPage:R=>I(R),getPage:R=>b,setProgress:R=>h.current?.setProgress?.(R),getProgress:()=>h.current?.getProgress?.()??0}),[h.current]);let{style:z,className:E,rest:H}=N(T),k=react.useCallback(R=>typeof R=="number"?R:+R.label,[]);if(!t)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(t/n),[t,n]),L=react.useMemo(()=>{let R=[],B=Math.max(k(b)-(s||2),1),G=Math.min(k(b)+(s||2),M);B>1&&R.push({id:c?g(1):1,label:1}),B>2&&R.push({id:-1,label:v});for(let U=B;U<=G;U++)R.push({id:c?g(U):U,label:U});return G<M-1&&R.push({id:-1,label:v}),G<M&&R.push({id:c?g(M):M,label:M}),R},[b]),F=react.useCallback(R=>{let B=R;+B.label<1||+B.label>M||(I(B),x?.(B));},[t,n,b]);return L.length<=1&&(f??false)===false?null:jsxRuntime.jsxs(m,{ref:S,as:`--pagination ${y===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${E}`,children:[jsxRuntime.jsx(m,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:v}]).map((R,B,G)=>{let U=(typeof R=="string"?R:R.label)==k(b);return jsxRuntime.jsx(Z,{disabled:R.id==-1||k(b)==+R.label,className:U?"--current-page":"",onClick:D=>F(R),children:y===true?C===true&&U?jsxRuntime.jsx(Ue,{ref:h}):"":typeof R=="string"?R:R.label},`--pg-${B}-${R.id}`)})}),jsxRuntime.jsx(m,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(k(b)-1)*n+1} - `,`${Math.min(k(b)*n,t)} of ${t} items`].join(" ")}),jsxRuntime.jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(Z,{disabled:k(b)<=1,onClick:R=>F({id:c?g(k(b)-1):k(b)-1,label:k(b)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(Z,{disabled:L.length<=1||k(b)==k(L[L.length-1]),onClick:R=>F({id:c?g(k(b)+1):k(b)+1,label:k(b)+1}),children:O.chevronRightOutline})]})]})};Zn.displayName="Zuz.Pagination";var St=Zn;function kc(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:u=true,useWheel:l=true,spacing:c=160,rotation:d=20,scaleStep:p=.15,blur:f=4,animation:y="power",showDots:C=false,autoPlay:x=false,autoPlaySpeed:T=3,onChange:S,...P}=e,{className:g,style:v}=N(P),h=react.useRef(null),b=T/(T>=1e3?1e3:1),I=hooks.useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:u,useWheel:l,onChange:M=>{h.current?.setPage({id:M+1,label:M+1}),h.current?.setProgress(0),S?.(M);}}),{pause:z,resume:E,reset:H}=hooks.useTimer({duration:b,autoStart:x===true,onProgress:M=>{x===true&&h.current?.setProgress(1-M);},onExpired:()=>{x===true&&I.next(),H();}}),k={...v,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${f}px`,"--carousel-scale-step":p,"--active-index":I.index,"--carousel-transition":`var(--${y})`};return jsxRuntime.jsxs(m,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${g}`.trim(),style:k,children:[jsxRuntime.jsx(m,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((M,L)=>{let F=L-I.index;if(a==="infinite"){let B=t.length;F=((F+B/2)%B+B)%B-B/2;}let R=L===I.index;return jsxRuntime.jsx(m,{onMouseEnter:()=>R&&z(),onMouseLeave:()=>R&&E(),className:`--carousel-item-wrapper abs ${R?"--is-active":""}`,style:{"--offset":F,zIndex:R?100:100-Math.abs(F),display:Math.abs(F)>5?"none":"flex"},children:n(M,L,I.index)},L)})}),C&&jsxRuntime.jsx(St,{ref:h,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:M=>I.goTo(+M.label-1),asDots:true,progressBar:true})]})}var Lc=react.forwardRef(kc),Mc=Lc;var Kn=(r=>(r.Line="line",r))(Kn||{});var Un=react.forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:u,animated:l,animDuration:c=2,animDelay:d=0,padding:p=0,type:f,...y}=e,{className:C,style:x,rest:T}=N(y),S=react.useRef(null),P=hooks.useResizeObserver(S.current?.parentElement||S),g=typeof n=="number"?n:P.width,v=typeof o=="number"?o:P.height,h={width:g,height:v},b=react.useId(),{pathD:I,areaPathD:z}=hooks.useLineChart(t,h,p+(a||2)),E=react.useRef(null),H=react.useRef(null),[k,M]=react.useState(0),[L,F]=react.useState(0);return react.useEffect(()=>{l&&(E.current&&M(E.current.getTotalLength()),H.current&&F(H.current.getTotalLength()));},[l,I,z,g,v]),jsxRuntime.jsx(m,{ref:S,as:`--chart --${f||"line"}-chart ${C}`.trim(),style:{...x,width:n,height:o},...T,children:g>0&&v>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${g} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:i}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:u})]})}),jsxRuntime.jsx("path",{ref:H,d:z,fill:`url(#${b})`,stroke:"none",style:l?{strokeDasharray:L,strokeDashoffset:L}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:E,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:k,strokeDashoffset:k}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:k,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});Un.displayName="Zuz.Chart";var zc=Un;var qn=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(qn||{}),Xn=(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))(Xn||{});var Yn=react.forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:i=true,...u}=e,{className:l,style:c,rest:d}=N(u);return jsxRuntime.jsx(m,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(m,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${l}`.trim(),style:{...c},...d,children:[t&&jsxRuntime.jsx(_,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxRuntime.jsxs(m,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(ae,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(Ue,{progress:.7}),jsxRuntime.jsx(_,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsxRuntime.jsx(m,{as:"--bubble-image",children:jsxRuntime.jsx(Ye,{src:n.source})}):null:null,jsxRuntime.jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(_,{className:"--bubble-stamp tar",children:core.timeSince(a)}),o=="me"&&jsxRuntime.jsx(ae,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});Yn.displayName="Zuz.Bubble";var Zc=Yn;var jn=react.forwardRef((e,r)=>{let{style:t,className:n,rest:o}=N(e);return jsxRuntime.jsx("label",{ref:r,style:t,className:n,...o})});jn.displayName="Zuz.Label";var wt=jn;var Jn=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:i,checked:u,disabled:l,onSwitch:c,...d}=r,p=De(),f=!!(t&&p.values);f?p.errors?.[t]:null;let C=f?p.values?.[t]:void 0,[x,T]=react.useState(u||false),S=react.useRef(null),{variant:P}=J(true),g=react.useMemo(()=>f&&C!=null?typeof C=="string"?C.toLowerCase()!=="false"&&C!=="":!!C:x,[C,x,f]);react.useEffect(()=>{S.current&&S.current.checked!==g&&(S.current.checked=g);},[g]),react.useEffect(()=>{u!==void 0&&T(u);},[u]);let v=h=>{let b=!!h;f&&p.setFieldValue?.(t,b),T(b),c?.(b,s||"cb");};return react.useImperativeHandle(e,()=>({setChecked(h,b=true){v(h);},toggle(h=true){v(!g);}})),jsxRuntime.jsxs(wt,{"aria-hidden":l,className:[`--${(o||Oe.Default).toLowerCase()}`,`${!o||o===Oe.Default?"--checkbox":"--switch"}`,`--${i||P||W.Small}`,`flex aic jcc ${g?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==Oe.Default)&&O.check,jsxRuntime.jsx(pe,{ref:h=>{S.current=h,e&&(e.current=h);},defaultChecked:g,type:"checkbox",className:"abs",name:t,required:n||false,onChange:h=>{h.stopPropagation(),v(h.target.checked);},disabled:l})]})};Jn.displayName="Zuz.CheckBox";var Ct=Jn;var em=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:i,fx:u,...l}=r,c=react.useRef(null),{className:d,style:p,rest:f}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:u},c),y=react.useMemo(()=>{let x=new Set;return a.split(",").forEach(T=>{if(T.includes("-")){let[S,P]=T.split("-").map(Number);for(let g=S;g<=P;g++)x.add(g);}else T&&x.add(Number(T));}),x},[a]),C=react.useMemo(()=>{let x=t.split(`
9
+ document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(xo,{children:e})]})},kr=(e,r)=>{if($a)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Mr=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=N(n);return jsxRuntime.jsx("span",{ref:e,style:t,className:s,...a})};Mr.displayName="Zuz.Span";var ae=Mr;var Vr=react.forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...i}=e,{variant:f}=Q(true),{className:c,style:l,rest:d}=N(i);return jsxRuntime.jsx("div",{style:{color:s,...l,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||f||W.Small} ${c}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((p,u)=>jsxRuntime.jsx(ae,{className:`path${u+1}`},`${t}-layer-${u}`))})});Vr.displayName="Zuz.Icon";var oe=Vr;var he={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Dr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:i}=N(o),{spinner:f}=Q(true),c=()=>{switch(r||f?.type||he.Simple){case he.Simple:return null;case he.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 he.Roller:return null}};return jsxRuntime.jsx(m,{className:`${s} --spinner --${(r||f?.type||he.Simple).toLowerCase()} --${t||f?.variant||W.Small}`.trim(),style:{...a},...i,children:c()})};Dr.displayName="Zuz.Spinner";var Se=Dr;var Vt={Loading:"loading",Normal:"normal"};var Ar=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:i,withLabel:f,spinner:c,state:l,disabled:d,...p}=r,{style:u,className:y,rest:C}=N(p),{variant:x}=Q(true);return jsxRuntime.jsxs("button",{className:core.removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${y}`).trim().replace(/\s+/g," "),style:u,ref:e,disabled:l==Vt.Loading||r.skeleton?.enabled||d,...C,children:[l==Vt.Loading&&jsxRuntime.jsx(Se,{variant:o||x,type:c||he.Simple}),(!l||l==Vt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(oe,{variant:a,name:s}),f===true?jsxRuntime.jsx(ae,{children:i}):i]})]})};Ar.displayName="Zuz.Button";var Z=Ar;var $r=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:i=0,duration:f=.5,stagger:c=.05,repeat:l=true,reveal:d=false,hover:p=false,...u}=r,{style:y,className:C,rest:x}=N(u),T=react.useRef(null),[S,P]=react.useState(false),[g]=hooks.useIntersectionObserver([T],{threshold:[1]}),v=react.useMemo(()=>{if(y?.opacity!==void 0)return y.opacity;if(typeof r.as=="string"){let H=r.as.match(/opacity:([\d.]+)/);if(H)return H[1]}return 1},[r.as,y?.opacity]),h=react.useMemo(()=>a?p?S:d?g===1:true:false,[a,p,S,d,g]);react.useEffect(()=>{e&&(typeof e=="function"?e(T.current):e.current=T.current);},[e]);let b=`h${r.h||1}`,I=react.useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),z=react.useMemo(()=>{let H=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof H=="string"&&H.includes("text-clip")},[r.as]);react.useLayoutEffect(()=>{if(!z||!T.current||I===null)return;let H=T.current,k=0,M=0,L=()=>{let B=H.getBoundingClientRect(),G=getComputedStyle(H).backgroundImage,U=B.width;H.querySelectorAll(".--fx-char").forEach(A=>{let K=A.getBoundingClientRect().left-B.left;A.style.backgroundImage=G,A.style.backgroundRepeat="no-repeat",A.style.backgroundSize=`${U}px 100%`,A.style.backgroundPosition=`-${K}px 0`,A.style.backgroundClip="text",A.style.webkitBackgroundClip="text",A.style.color="transparent";});},F=()=>{cancelAnimationFrame(k),cancelAnimationFrame(M),k=requestAnimationFrame(()=>{M=requestAnimationFrame(L);});};F();let R=new ResizeObserver(F);return R.observe(H),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(F),window.addEventListener("resize",F),()=>{cancelAnimationFrame(k),cancelAnimationFrame(M),R.disconnect(),window.removeEventListener("resize",F);}},[z,I,a,h]);let E=react.useMemo(()=>n?jsxRuntime.jsx(ae,{dangerouslySetInnerHTML:{__html:n}}):a&&I!==null?I.split("").map((H,k)=>{let M=H===" ",F=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":l?"infinite":"1";return jsxRuntime.jsx(ae,{"data-char":H,className:`--fx-char -fx ${h?`--fx-${a}`:""}`,style:{"--delay":`${i+k*c}s`,"--duration":`${f}s`,"--iteration":F,"--target-opacity":v,display:M?"inline":"inline-block",whiteSpace:"pre",opacity:!h&&a==="typewriter"?0:void 0},children:H},k)}):o,[o,n,a,I,h,i,c,f,l]);return jsxRuntime.jsx(b,{ref:T,onMouseEnter:()=>p&&P(true),onMouseLeave:()=>p&&P(false),style:a?{...y,display:a?"flex":y?.display,flexWrap:a?"wrap":y?.flexWrap,opacity:a&&!h?0:a?1:y?.opacity,transition:a?"opacity 0.4s ease":void 0}:y,className:`${C} ${a?"--text-fx -fx":""}`.trim(),...x,children:E})};$r.displayName="Zuz.Text";var _=$r;var ei=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:i}=e;return r=="-"?jsxRuntime.jsx(m,{className:"--line"}):jsxRuntime.jsxs(Z,{reset:true,onClick:f=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(m,{as:"--icon",children:jsxRuntime.jsx(oe,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(_,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},zr=ei;var Zr=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:i,event:f,arrow:c,when:l,items:d,header:p,footer:u,origin:y=ut.TopRight,...C}=r,[x,T]=react.useState(false),[S,P]=react.useState(d||[]),{position:g,targetRef:v,calculatedAnchor:h}=hooks.useAnchorPosition(i?.current,f,{offsetX:s,offsetY:a,preferredAnchor:y}),I=i&&g.top>i.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",z=react.useMemo(()=>{let F=h.toLowerCase();return F.includes("left")?"--arrow-left":F.includes("right")?"--arrow-right":"--arrow-center"},[h]),E=g.top!==0||g.left!==0;react.useEffect(()=>{l&&E?T(true):l||T(false);},[l,E]);let{className:H,style:k,rest:M}=N(C),L=ge({...o?.transition?{transition:o.transition??j.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??te.EaseInOut,duration:o?.duration??.05,when:x&&E});return jsxRuntime.jsxs(m,{ref:v,className:`--contextmenu ${c||i!=null?`--has-arrow ${I} ${z}`:""} abs flex cols ${H}`.trim(),"aria-hidden":!x,style:{...k,...L.style,top:g.top,left:g.left,visibility:E?"visible":"hidden",transformOrigin:h},...M,children:[typeof p=="function"?react.createElement(p):p,S.map((F,R)=>jsxRuntime.jsx(zr,{...F,index:R},`context-${F.label.toLowerCase()}-${R}`)),typeof u=="function"?react.createElement(u):u]})};Zr.displayName="Zuz.ContextMenu";var So=Zr;var Kr=react.forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:i,...f}=e,c=Q(true),l=hooks.useDelayed(),d=n||c?.group?.fx,p=s||c?.group?.fxDelay,u=a||c?.group?.fxStep,y=i||c?.group?.classToIgnore||"-fx",C=react.useMemo(()=>d?react$1.addPropsToChildren(t,x=>{if(x.type===react.Fragment)return false;let T=x.props||{},S="fx"in T,P="tfx"in T,g=T.as?Array.isArray(T.as)?T.as.join(" "):T.as:T.className||"";return !(typeof g=="string"&&g.includes(y))&&(!S||P)},(x,T)=>{let S=(p??0)+x*(u??.1),P=T.props||{};return "tfx"in P?{delay:(P.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||l)}}}):t,[t,o,l,d,p,u,y,n]);return jsxRuntime.jsx(m,{className:"--group",ref:r,...f,children:C})});Kr.displayName="Zuz.Group";var wo=Kr;var Gr=react.forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:i,...f}=e,{className:c,style:l,rest:d}=N(f),{spinner:p}=Q(true);return "when"in e&&e.when==false?null:jsxRuntime.jsxs(wo,{fx:{transition:j.SlideInBottom,curve:te.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${c}`.trim(),style:{...l,backgroundColor:"var(--cover-bg)"},...d,children:[jsxRuntime.jsx(Se,{variant:o||p?.variant||W.Small,type:n||p?.type||he.Simple}),!i&&jsxRuntime.jsx(_,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Gr.displayName="Zuz.Cover";var Ee=Gr;var Co=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},Ie=new Co;var Ur=react.forwardRef((e,r)=>{let{when:t,...n}=e;return jsxRuntime.jsx(m,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:j.FadeIn,when:t},...n})});Ur.displayName="Zuz.Overlay";var We=Ur;var yi=({action:e,render:r=true,message:t=""})=>jsxRuntime.jsx(m,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),qr=yi;var bi=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsxRuntime.jsx(m,{as:`--footer flex aic rel ${r?r==Tr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsxRuntime.jsx(Z,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),Yr=bi;var vi={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"})," "]}),[Pe.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"})}),[Pe.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"})}),[Pe.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"})}),[Pe.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"})]})},O=vi;var Si=({title:e="Alert",onClose:r})=>jsxRuntime.jsxs(m,{as:"--head flex aic rel",children:[jsxRuntime.jsx(m,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsxRuntime.jsx(Z,{onClick:t=>r(),className:"--closer abs center-v",children:O.close})]}),Qr=Si;var tn=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:i,speed:f,type:c,action:l,actionPosition:d,spinner:p,loadingMessage:u,variant:y,inBackground:C,forceClose:x,forceLoading:T,onClose:S,onShow:P,onHide:g,...v}=r,h=react.useMemo(()=>core.uuid(12),[]),[b,I]=react.useState(o||""),[z,E]=react.useState(s||""),[H,k]=react.useState(c||et.Dialog),[M,L]=react.useState(false),[F,R]=react.useState(true),[B,G]=react.useState(l||null),[U,D]=react.useState(false),{variant:A,spinner:q,dialog:K}=Q(true),J=y||K?.variant||A||W.Small,{style:ee,className:ie,rest:me}=N(v),ye=react.useRef(null),se=ge({when:M,duration:f||K?.speed||.3,delay:K?.delay||.1,transition:a||K?.transition||j.SlideInBottom,curve:i||K?.curve||te.EaseInOut,watch:["scale","filter","transform"]}),le=()=>{L(false),S(n);},Y=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Ie.isTop(le)&&le();}}],[M]);hooks.useShortcuts(Y),react.useEffect(()=>{k(et.Dialog),E(s),I(b),B&&G(B.reduce((ne,ue)=>(ne.push({...ue,key:ue.key||core.uuid(12)}),ne),[])),L(true),setTimeout(()=>P?P():()=>{},500);},[]),react.useEffect(()=>{x&&le();},[x]),react.useEffect(()=>{T!=null&&D(T);},[T]),react.useEffect(()=>(M?Ie.push(le):Ie.pop(le),()=>Ie.pop(le)),[M]);let re=react.useMemo(()=>1e4+t*10,[t]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(We,{style:{zIndex:re},when:M}),jsxRuntime.jsxs(m,{as:`--dialog --${(c??et.Default).toLowerCase()} ${M?"--visible":""} ${ie} fixed abc`.trim(),style:{...se.style,zIndex:re+1,pointerEvents:C==true?"none":"auto",...C==true?{scale:"0.92",filter:"blur(2px)"}:{}},...me,ref:ye,children:[jsxRuntime.jsx(Qr,{title:b,onClose:le}),jsxRuntime.jsx(qr,{message:z,render:F,action:B}),B&&B.length>0&&jsxRuntime.jsx(Yr,{variant:J,action:B,dialogID:h,actionPosition:d}),jsxRuntime.jsx(Ee,{when:U,spinner:p||K?.spinner||q?.type||he.Simple,message:u||K?.loadingMessage})]})]})};tn.displayName="Zuz.Dialog";var Po=tn;var on=react.forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:i,containerRef:f,thumbY:c,thumbX:l,onScrollY:d,onScrollX:p}=hooks.useScrollbar(t||1,o,n),{style:u,className:y,rest:C}=N(a);return react.useEffect(()=>{let x=f.current;if(!x)return;let T=()=>{window.dispatchEvent(new Event("resize"));},S=P=>{let g=P.target;if(g.closest(".--allow-scroll")){let h=g.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:I,clientHeight:z}=h,E=P.deltaY<0,H=P.deltaY>0;(E&&b>0||H&&b+z<I)&&P.stopPropagation();}};return x.addEventListener("scroll",T),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",T),x.removeEventListener("wheel",S);}},[f]),jsxRuntime.jsxs(m,{ref:i,className:y.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(m,{as:`--scroll-content ${y}`.trim(),ref:f,style:s||{},children:C.children}),jsxRuntime.jsx(m,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:c,onMouseDown:d})}),jsxRuntime.jsx(m,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:l,onMouseDown:p})})]})});on.displayName="Zuz.ScrollView";var Ro=on;var rn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:i,animation:f,prerender:c,inBackground:l,forceClose:d,forceLoading:p,onClose:u,...y}=r,{drawer:C}=Q(true),[x,T]=react.useState(a),[S,P]=react.useState(false),[g,v]=react.useState(c??(C?.prerender||true)),[h,b]=react.useState(false),I=()=>{P(false),u?.(t??-1);},{className:z,style:E,rest:H}=N(y),k=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Ie.isTop(I)&&I();}}],[S]);hooks.useShortcuts(k),react.useEffect(()=>{T(a);},[a]),react.useEffect(()=>(S?Ie.push(I):Ie.pop(I),()=>Ie.pop(I)),[S]),react.useEffect(()=>{P(true);},[]),react.useEffect(()=>{d&&I();},[d]),react.useEffect(()=>{p!=null&&b(p);},[p]);let M=o||C?.from||ve.Left,L=react.useMemo(()=>{switch(M){case ve.Left:return {from:{x:"-100vw"},to:{x:0}};case ve.Right:return {from:{x:"100vw"},to:{x:0}};case ve.Top:return {from:{y:"-100vh"},to:{y:0}};case ve.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,C?.from]),F=ge({from:{...L.from,opacity:0},to:{...L.to,opacity:1},when:S,curve:f||C?.animation||te.EaseInOut,duration:s||C?.speed||.5,watch:["scale","filter"]}),R=react.useMemo(()=>1e4+(n||1)*10,[n]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(We,{onClick:B=>{S&&I();},when:S,style:{zIndex:R}}),jsxRuntime.jsxs(m,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${z} --${M.toLowerCase()} fixed`,style:{...E,...F.style,"--m":`${i||C?.margin||0}px`,zIndex:R+1,pointerEvents:l==true?"none":"auto",...l==true?{scale:"0.92",filter:"blur(2px)"}:{}},...H,children:[o==ve.Top||o==ve.Bottom?jsxRuntime.jsx(m,{className:"--handle"}):null,jsxRuntime.jsx(Z,{as:"--close-drawer --abs",onClick:I,children:O.close}),jsxRuntime.jsxs(Ro,{as:"rel",children:[g||S?x:null,jsxRuntime.jsx(Ee,{when:h})]})]})]})};rn.displayName="Zuz.Drawer";var Bo=rn;var sn=react.forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=react.useRef(null);react.useImperativeHandle(r,()=>({setProgress:l=>{a.current.style.width=`${l*100}%`,a.current.setAttribute("data-value",l+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.useEffect(()=>{t&&a.current&&(o?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:i,style:f,rest:c}=N(s);return jsxRuntime.jsx(m,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:f,...c,children:jsxRuntime.jsx(m,{ref:a,className:"--bar rel"})})});sn.displayName="Zuz.ProgressBar";var Ue=sn;var zt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(zt||{}),Ft=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Ft||{}),an=(t=>(t.Stack="stack",t.Individual="individual",t))(an||{}),ln={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Ai=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:i,message:f,duration:c,sticky:l=false,actions:d=[],position:p,style:u,isHovered:y,total:C,progress:x,progressValue:T,forceClose:S,variant:P,onClick:g,onClose:v}=e,[h,b]=react.useState(false),[I,z]=react.useState(false),{toast:E}=Q(true),H=typeof T=="number",k=H?Math.max(0,Math.min(1,T)):void 0,M=I||S,L=p??E?.position??"TopCenter",F=n??E?.type??"default",R=u??E?.style??"stack",B=c??E?.duration??4,G=x??E?.progress??false,U=react.useRef(B*1e3),D=react.useRef(void 0),A=react.useRef(void 0),q=react.useRef(null),K=ge({when:h&&!M,duration:.3,transition:E?.transition||(L.includes("Top")?j.SlideInTop:L.includes("Bottom")?j.SlideInBottom:L.includes("Left")?j.SlideInLeft:j.SlideInRight),curve:E?.curve||te.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{b(true);let Y=re=>{if(A.current!==void 0){let ne=re-A.current;if(!H&&!y&&!l&&!M&&(U.current-=ne,q.current)){let ue=Math.max(0,U.current/(B*1e3)*100);q.current?.setProgress?.(ue/100);}}A.current=re,U.current<=0?z(true):D.current=requestAnimationFrame(Y);};return D.current=requestAnimationFrame(Y),()=>{D.current&&cancelAnimationFrame(D.current);}},[y,l,M,B]),react.useEffect(()=>{if(M){let Y=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(Y)}},[M,t]);let J=R==="stack",ee=y?r*65:r*8,ie=y?1:Math.max(.85,1-r*.05),me=y?1:Math.max(.4,1-r*.2),ye=Y=>{g?g(Y):s!==true&&(!d||d.length===0)&&z(true);},se=K.style.transform||"translate(0, 0)",le=M?se:`${se} translateY(${L.includes("Top")?ee:-ee}px) scale(${ie})`;return jsxRuntime.jsxs(m,{onClick:ye,as:`--snack --${M?"hidden":"visible"} --${P||E?.variant||W.Medium} --${F} --${L.toLowerCase()} abs flex aic`,style:{...K.style,zIndex:1e3-r,pointerEvents:M?"none":"auto",opacity:M?K.style.opacity:me,transform:le,filter:!M&&J&&!y&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${K.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsxs(m,{as:"--ico flex aic jcc rel",children:[o?jsxRuntime.jsx(oe,{name:o}):jsxRuntime.jsx(m,{as:"--no-icon"}),s===true&&jsxRuntime.jsx(Se,{as:"abs abc"})]}),jsxRuntime.jsxs(m,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsxRuntime.jsx(_,{as:"--tt",children:i||ln[n]}),jsxRuntime.jsx(_,{as:"--tm",children:f})]}),d&&d.length>0&&jsxRuntime.jsx(m,{as:"--actions flex gap:5",children:d.map((Y,re)=>jsxRuntime.jsx(Z,{as:"--snack-btn bold",variant:W.XSmall,onClick:ne=>{ne.stopPropagation(),Y.onClick(ne);},children:Y.label},re))}),(G||H)&&jsxRuntime.jsx(Ue,{as:"abs",progress:k,ref:q})]})},ko=Ai;var we=react.createContext(null),Ki=({ref:e,...r})=>{let n=react.useContext(we)?.depth??0,[o,s]=react.useState(null),[a,i]=react.useState(null),[f,c]=react.useState(false),[l,d]=react.useState([]),p=hooks.useDelayed(),u=react.useRef(0),y=()=>++u.current,C=()=>{c(false),setTimeout(()=>i(null),200);};react.useImperativeHandle(e,()=>({add(g){let v=y(),h={id:v,...g};return d(b=>[...b,h]),v},openMenu(g){c(false),setTimeout(()=>{i({id:y(),type:"menu",props:g}),c(true);},16);},update(g,v){d(h=>h.map(b=>b.id!==g?b:{...b,props:{...b.props,...v}}));},remove(g){d(v=>v.map(h=>h.id===g?{...h,props:{...h.props,forceClose:true}}:h)),a?.id===g&&C();},loading(g,v){d(h=>h.map(b=>b.id===g?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===g&&C();},clear(g){d(l.filter(v=>v.type!=g));}})),react.useEffect(()=>{if(a&&f){let g=()=>C();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[a,f,C]);let x=g=>{setTimeout(()=>{d(v=>v.filter(h=>h.id!==g)),a?.id===g&&i(null);},250);},T=react.useMemo(()=>[...l.filter(g=>g.type!="toast")],[l]);if(!p)return null;let S=l.filter(g=>g.type=="toast").reverse(),P=Object.values(Ft);return reactDom.createPortal(jsxRuntime.jsxs(m,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[T.map((g,v)=>{let h=v<T.length-1;return g.type==="dialog"?jsxRuntime.jsx(Po,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsxRuntime.jsx(Bo,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):null}),P.map(g=>{let v=S.filter(h=>(h.props.position||"TopCenter")===g);return v.length===0?null:jsxRuntime.jsx(m,{onMouseEnter:()=>s(g),onMouseLeave:()=>s(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((h,b)=>jsxRuntime.jsx(ko,{index:b,total:v.length,isHovered:o===g,onClose:x,id:h.id,...h.props},h.id))},g)}),a&&jsxRuntime.jsx(m,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(So,{onClose:C,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},Wi=({children:e})=>{let r=react.useContext(we),t=r?r.depth+1:0,n=react.useRef(null),o=react.useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxRuntime.jsxs(we.Provider,{value:o,children:[e,jsxRuntime.jsx(Ki,{ref:n})]})},xo=Wi;var Ui=()=>{let e=react.useContext(we);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:i,transition:f,curve:c,arrow:l,duration:d,header:p,footer:u})=>{e.openMenu({fx:{transition:f,curve:c,duration:d},parent:n,items:o,origin:s||ut.TopCenter,offsetX:a,offsetY:i,arrow:l,header:p,footer:u});},hide:e.clear}},qi=Ui;var Yi=()=>{let e=react.useContext(we);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:et.Dialog}});return {id:a,setLoading:i=>n(a,i),hide:()=>t(a)}},hide:t}},ji=Yi;var Ji=()=>{let e=react.useContext(we);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:ve.Right}),left:s=>o({children:s,from:ve.Left}),top:s=>o({children:s,from:ve.Top}),bottom:s=>o({children:s,from:ve.Bottom}),close:t}},el=Ji;var ol=(e,r,t={})=>{let[n,o]=react.useState(null),[s,a]=react.useState(false),{duration:i=.25,curve:f=te.EaseOutBack,borderRadius:c={from:40,to:24},targetWidth:l=320}=t;return react.useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:ge({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:c.from},to:{opacity:1,width:l,height:"auto",borderRadius:c.to},curve:f,duration:i,when:s&&r}).style,isMeasured:s,sourceRect:n}},rl=ol;var il=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=react.useRef(null),i=react.useCallback(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let l=f.getBoundingClientRect(),d=c.getBoundingClientRect(),p,u;o?(p=o.getBoundingClientRect(),u="absolute"):(window.getComputedStyle(f).position==="fixed"?u="fixed":u="absolute",u==="fixed"?p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==u&&(f.style.position=u),a.current=u;let x=0,T=0;switch(n){case "top":x=d.top-l.height-t,T=d.left,x<p.top&&d.bottom+l.height+t<=p.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,T=d.left,x+l.height>p.bottom&&d.top-l.height-t>=p.top&&(x=d.top-l.height-t);break;case "left":x=d.top,T=d.left-l.width-t,T<p.left&&d.right+l.width+t<=p.right&&(T=d.right+t);break;case "right":x=d.top,T=d.right+t,T+l.width>p.right&&d.left-l.width-t>=p.left&&(T=d.left-l.width-t);break}if(x=Math.max(p.top,Math.min(x,p.bottom-l.height)),T=Math.max(p.left,Math.min(T,p.right-l.width)),a.current==="fixed")f.style.top=`${x}px`,f.style.left=`${T}px`;else {let S;f.offsetParent?S=f.offsetParent.getBoundingClientRect():S={top:0,left:0};let P=x-S.top+window.scrollY,g=T-S.left+window.scrollX;f.style.top=`${P}px`,f.style.left=`${g}px`;}},[e,s,t,n,o]);return react.useEffect(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let l=new ResizeObserver(i);return l.observe(f),c&&l.observe(c),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{l.disconnect(),c&&l.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,o,s]),{postion:a.current,reposition:i}},xt=il;var cl=()=>{let e=react.useContext(we);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(u,y)=>e.add({type:"toast",props:{...y,type:u}}),t=()=>e.clear("toast"),n=u=>e.remove(u),o=(u,y)=>e.update(u,y),s=u=>({id:u,update:y=>o(u,y),setType:y=>o(u,{type:y}),setProgress:y=>o(u,{progress:true,progressValue:y}),setBusy:y=>o(u,{busy:y}),success:()=>o(u,{type:"success"}),error:()=>o(u,{type:"error"}),warn:()=>o(u,{type:"warn"}),promise:()=>o(u,{type:"promise"}),default:()=>o(u,{type:"default"}),hide:()=>n(u)}),a=u=>s(r("default",u)),i=u=>s(r("success",u)),f=u=>s(r("error",u)),c=u=>s(r("warn",u)),l=u=>s(r("promise",u)),d=(u,y,C)=>{let x=r(u,{...y,sticky:y.sticky??false,actions:[{label:C?.label||"Ok",onClick:T=>{C?.onClick?.(T),n(x);}}]});return s(x)},p=(u,y,C,x)=>{let T=r(u,{...y,sticky:true,actions:[{label:C?.label||"Ok",onClick:S=>{C?.onClick?.(S),(C?.hide??false)===true&&n(T);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(T);}}]});return s(T)};return {show:a,hide:n,promise:l,clearAll:t,ok:(u,y)=>d("default",u,y),success:(u,y)=>y?d("success",u,y):i(u),error:(u,y)=>y?d("error",u,y):f(u),confirm:(u,y,C)=>p("default",u,y,C),warn:(u,y)=>y?d("warn",u,y):c(u),succes:(u,y)=>y?d("success",u,y):i(u)}},ml=cl;var ul=()=>{let e=react.useContext(we);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(c,l)=>e.add({type:"toast",props:{...l,type:c}});return {show:(c,l,d,p)=>r("default",{title:c,message:l,icon:d,duration:p}),hide:c=>e.remove(c),success:(c,l,d,p)=>r("success",{title:c,message:l,icon:d,duration:p}),error:(c,l,d,p)=>r("error",{title:c,message:l,icon:d,duration:p}),warn:(c,l,d,p)=>r("warn",{title:c,message:l,icon:d,duration:p}),promise:(c,l,d,p)=>r("promise",{title:c,message:l,icon:d,duration:p}),clearAll:()=>e.clear("toast")}},Lo=ul;var hn=({ref:e,style:r,...t})=>{let n=react.useRef(null),o=react.useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=N(t,o);return jsxRuntime.jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...i})};hn.displayName="Zuz.Box";var m=hn;var xn=react.forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=react.useState(false);return jsxRuntime.jsxs(m,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs(Z,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(_,{className:"--label flex",children:t}),jsxRuntime.jsx(m,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(m,{className:"--detail",children:n})]})});xn.displayName="Zuz.Accordion";var xl=xn;var bl=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsxRuntime.jsx(Z,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsxRuntime.jsx(oe,{name:r}):r}),vn=bl;var Sn=react.forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,i=react.useRef(null),[f,c]=react.useState(o||t[0].tag||0),l=react.useCallback(({x,y:T})=>{if(i.current){let S=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${T-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=react.useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",l),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=react.useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",l));},[]);react.useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,T)=>T.label.length>x.length?T.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",p));},[]);let{className:u,style:y,rest:C}=N(a);return jsxRuntime.jsxs(m,{ref:i,style:y,className:[`--actionbar flex aic ${u}`,`${!s||s==de.Auto?"rel":`--${s}`}`].join(" ").trim(),...C,children:[t.map((x,T)=>jsxRuntime.jsx(vn,{selected:f===x.tag||o==T,...x,idx:T},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(m,{className:"--tip abs",children:jsxRuntime.jsx(m,{className:"--track flex aic",children:t.map(({label:x})=>jsxRuntime.jsx(m,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Sn.displayName="Zuz.ActionBar";var Tl=Sn;var Cn=react.forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...i}=e,{className:f,style:c,rest:l}=N(i);return jsxRuntime.jsxs(m,{className:`--alert --${t||Pe.Info} flex aic ${f}`.trim(),style:c,...l,children:[jsxRuntime.jsx(m,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&O[t||Pe.Info]}),jsxRuntime.jsxs(m,{className:"--meta flex cols",children:[jsxRuntime.jsx(_,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(_,{className:"--message",h:2,children:s})]})]})});Cn.displayName="Zuz.Alert";var Il=Cn;var Ho=react.createContext(null),Ao=()=>{let e=react.useContext(Ho);return e?react.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},$o=()=>react.useContext(Ho),De=()=>{let e=$o(),r=Ao();return {...e,...r}},Rn=({children:e,initialValues:r={}})=>{let t=react.useRef({values:r,errors:{},touched:{}}),n=react.useRef(new Set(Object.keys(r))),o=react.useRef(new Set),s=react.useCallback(()=>t.current,[]),a=react.useCallback(c=>(o.current.add(c),()=>o.current.delete(c)),[]),i=()=>{o.current.forEach(c=>c());};react.useEffect(()=>{if(r&&Object.keys(r).length>0){let c=new Set(Object.keys(r)),l=[...n.current].filter(p=>!c.has(p)),d={...t.current.values};l.forEach(p=>delete d[p]),t.current={...t.current,values:{...d,...r}},n.current=c,i();}},[r]);let f=react.useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(c,l)=>{t.current.values[c]!==l&&(t.current={...t.current,values:{...t.current.values,[c]:l}},i());},deleteFieldValue:c=>{if(!(c in t.current.values))return;let{[c]:l,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(c,l)=>{t.current={...t.current,errors:{...t.current.errors,[c]:l}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsxRuntime.jsx(Ho.Provider,{value:f,children:e})};var Nn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:i,className:f,rest:c}=N(a),{variant:l}=Q(true),d=react.useRef(null),p=De(),u=o?p.errors?.[o]:null,y=o&&p.values&&p.setFieldValue,C=y?p.values?.[o]:void 0,x=hooks.useDebounce(S=>{y&&p.setFieldValue?.(o,S);},500),T=S=>{let P=S.currentTarget.value;n&&(P=P.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=P),x(P),r.onInput?.(S);};return react.useEffect(()=>{d.current&&o&&C!==void 0&&d.current.value!==String(C)&&(d.current.value=String(C));},[C,o]),react.useEffect(()=>()=>{y&&p.deleteFieldValue?.(o);},[]),jsxRuntime.jsx("input",{name:o,className:`--input --${t||l} ${u?"--has-error":""} --flex ${f}`.trim(),style:i,defaultValue:C??r.defaultValue??"",onInput:T,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...c})};Nn.displayName="Zuz.Input";var pe=Nn;var En=e=>{let{meta:r,children:t}=e,n=hooks.useDelayed(),{label:o,icon:s,...a}=react.isValidElement(r)?{}:r,{className:i,style:f,rest:c}=N({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return react.isValidElement(r)?jsxRuntime.jsx("li",{style:f,className:i,children:r}):jsxRuntime.jsxs("li",{style:f,className:i,...c,children:[t,typeof r=="string"?r:o]})};En.displayName="Zuz.ListItem";var kn=En;var Mn=react.forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...i}=e,{className:f,style:c,rest:l}=N(i),d=a==true?"ol":"ul";return react.createElement(d,{className:`--list --${n||W.Small} flex ${o??"cols"} ${f}`.trim(),style:c,ref:r,...l,children:t.map((p,u,y)=>{let C=`${typeof p=="string"?`li-${String(p)}`:react.isValidElement(p)?`li-${p.key}`||`${u}-${core.MD5(p.toString())}`:p.label}-${u}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(kn,{meta:p}),s&&y[u+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${u+1}-${C}`):null]},C)})})});Mn.displayName="Zuz.List";var Xe=Mn;var Vn=react.forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...i}=e,{className:f}=N({as:s||""}),{style:c}=N(i),[l,d]=react.useState(false),[p,u]=react.useState(o||[]),y=react.useRef(null),C=react.useRef(null),x=react.useRef(null),T=react.useMemo(()=>i.name||core.uuid(12),[]),[S,P]=react.useState(null),[g,v]=react.useState(null),[h,b]=react.useState([]),z=hooks.useDebounce(R=>{R.target.value==""?(d(false),u([])):n&&R.target.value.trim()!=""&&core.withPost(n,{query:R.target.value}).then(B=>{"items"in B&&core._(B.items).isArray()?(u(B.items),v(R.target.value),b(B.items)):console.error("Action Response should contain items array"),P(null);}).catch(B=>{P(null),u([]);});},250),E=()=>{if(C.current){let R=C.current.getBoundingClientRect(),B=window.innerHeight-R.bottom,G=R.top;if(x.current){let U=x.current;B<U.offsetHeight&&G>B?(U.style.top="auto",U.style.bottom=`${R.height}px`,U.style.maxHeight=`${G-150}px`):(U.style.top=`${R.height+5}px`,U.style.bottom="auto",U.style.maxHeight=`${B-150}px`);}}},H=R=>{if(p.length>0){if((R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),R.stopPropagation()),R.key==="Escape")P(null),d(false),u([]);else if(R.key==="ArrowDown")P(B=>{let G=B===null||B===p.length-1?0:B+1;return M(G),G});else if(R.key==="ArrowUp")P(B=>{let G=B===null||B===0?p.length-1:B-1;return M(G),G});else if(R.key==="Enter"&&S!==null){let B=p[S];y.current&&(y.current.value=B,d(false),u([]));}}},k=R=>{y.current&&(y.current.value=R,d(false),u([]));},M=R=>{let B=p[R];if(B&&y.current&&(y.current.value=B,y.current.setSelectionRange(B.length,B.length)),x.current){let U=x.current.children[R];U&&U.scrollIntoView({block:"nearest"});}},L=R=>{C.current&&!C.current.contains(R.target)&&(d(false),u([]));},F=()=>{y.current&&y.current.value===g&&(u(h),P(null),E());};return react.useEffect(()=>(window.addEventListener("resize",E),window.addEventListener("scroll",E,true),document.addEventListener("mousedown",L),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),document.removeEventListener("mousedown",L);}),[]),react.useEffect(()=>{E();},[p]),jsxRuntime.jsxs(m,{style:c,ref:C,className:`--autocomplete --${e.size||W.Small} flex aic rel ${f}`.trim(),children:[jsxRuntime.jsx(pe,{ref:y,autoComplete:"off",onChange:z,onKeyDown:H,onFocus:F,...i}),jsxRuntime.jsx(m,{className:"--arrow rel flex aic jcc",children:p.length>0?O.arrowUp:O.arrowDown}),p.length>0&&jsxRuntime.jsx(Xe,{id:T,ref:x,className:"--suggestion-list flex cols abs",items:p.map((R,B)=>({label:R,onClick:G=>{G.preventDefault(),G.stopPropagation(),k(R);},className:S===B?"--current":"",animate:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:core.clamp(.02*B,.02,.5)}}))})]})});Vn.displayName="Zuz.AutoComplete";var Ql=Vn;var Dn=react.forwardRef((e,r)=>{let t=react.useRef(null),n=react.useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=N(e,n);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Dn.displayName="Zuz.Image";var Ye=Dn;var Hn=react.forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:i,as:f,alt:c,color:l,style:d,...p}=e,[u,y,C]=hooks.useImage(t??"",s,a),{className:x,style:T,rest:S}=N({fx:i,as:f});return jsxRuntime.jsx(m,{className:`--avatar --${n||W.Small} --${(o||Cr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:l||"var(--avatar-bg, var(--primary))",...d,...T},...S,children:t?jsxRuntime.jsx(Ye,{src:u,crossOrigin:s,referrerPolicy:a,...p}):jsxRuntime.jsx(_,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});Hn.displayName="Zuz.Avatar";var ac=Hn;var ic=({size:e=5,type:r="dead",label:t="",variant:n=W.Small,loading:o=false,spinner:s,...a})=>{let{style:i,className:f,rest:c}=N(a);return jsxRuntime.jsxs(m,{style:{...core._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${r} rel flex aic jcc ${f}`.trim(),children:[jsxRuntime.jsx(m,{fx:{transition:j.FadeIn,curve:te.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(Se,{type:s})}),core._(t).isEmpty()?jsxRuntime.jsx(m,{as:`--dot --${r}`}):jsxRuntime.jsx(_,{as:"--label",children:t})]})},lc=ic;var wc=[{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 e=new Date,r=e.getDay();return dateFns.addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return dateFns.format(dateFns.addDays(e,(6-r)%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)}],Cc=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},$n=react.forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:i,rest:f}=N(s),[c,l]=react.useState(t||new Date),d=dateFns.startOfMonth(c),p=dateFns.endOfMonth(c),u=dateFns.startOfWeek(d),y=dateFns.endOfWeek(p),C=react.useMemo(()=>dateFns.eachDayOfInterval({start:u,end:y}),[u,y]),x=P=>{o?.(P),l(P);},T=()=>{l(P=>new Date(P.getFullYear(),P.getMonth()-1));},S=()=>{l(P=>new Date(P.getFullYear(),P.getMonth()+1));};return jsxRuntime.jsxs(m,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsxRuntime.jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Cc(wc).map(P=>{let g=P.getDate();return jsxRuntime.jsxs(Z,{onClick:()=>x(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(_,{as:"flex:1",children:P.label}),jsxRuntime.jsx(_,{as:"tar",children:P.getDateFormat()})]},`--dtp-option-label-${P.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(_,{as:"flex:1 --calendar-cm bold",children:dateFns.format(c,"MMMM yyyy")}),jsxRuntime.jsx(Z,{onClick:T,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(Z,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(P=>jsxRuntime.jsx(_,{as:"--calendar-day",children:P},`--calendar-hd-${P}`)),C.map((P,g)=>{let v=dateFns.isSameMonth(P,c),h=dateFns.isSameDay(P,c),b=dateFns.isToday(P);return jsxRuntime.jsx(Z,{disabled:!v,onClick:()=>x(P),as:["--calendar-day --calendar-dd",`${h?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:dateFns.format(P,"d")},`--calendar-day-${g}-${P.getFullYear()}-${P.getMonth()}-${P.getDay()}`)})]})]})]})});$n.displayName="Zuz.Calendar";var Zo=$n;var Ut=(t=>(t.Table="table",t.Gooey="gooey",t))(Ut||{});var Zn=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:f,nextLabel:c,hash:l,loading:d,seperator:p,renderOnZeroPageCount:u,asDots:y,progressBar:C,onPageChange:x,...T}=r,S=react.useRef(null),P=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),g=react.useCallback(R=>`${core.toHash(R,l||6,P)}${p||""}${P}`,[P]),v=react.useMemo(()=>i||"...",[i]),h=react.useRef(null),[b,I]=react.useState({id:l?o?typeof o=="number"?g(o):o:1:o||1,label:o||1});react.useImperativeHandle(e,()=>({setPage:R=>I(R),getPage:R=>b,setProgress:R=>h.current?.setProgress?.(R),getProgress:()=>h.current?.getProgress?.()??0}),[h.current]);let{style:z,className:E,rest:H}=N(T),k=react.useCallback(R=>typeof R=="number"?R:+R.label,[]);if(!t)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(t/n),[t,n]),L=react.useMemo(()=>{let R=[],B=Math.max(k(b)-(s||2),1),G=Math.min(k(b)+(s||2),M);B>1&&R.push({id:l?g(1):1,label:1}),B>2&&R.push({id:-1,label:v});for(let U=B;U<=G;U++)R.push({id:l?g(U):U,label:U});return G<M-1&&R.push({id:-1,label:v}),G<M&&R.push({id:l?g(M):M,label:M}),R},[b]),F=react.useCallback(R=>{let B=R;+B.label<1||+B.label>M||(I(B),x?.(B));},[t,n,b]);return L.length<=1&&(u??false)===false?null:jsxRuntime.jsxs(m,{ref:S,as:`--pagination ${y===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${E}`,children:[jsxRuntime.jsx(m,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:v}]).map((R,B,G)=>{let U=(typeof R=="string"?R:R.label)==k(b);return jsxRuntime.jsx(Z,{disabled:R.id==-1||k(b)==+R.label,className:U?"--current-page":"",onClick:D=>F(R),children:y===true?C===true&&U?jsxRuntime.jsx(Ue,{ref:h}):"":typeof R=="string"?R:R.label},`--pg-${B}-${R.id}`)})}),jsxRuntime.jsx(m,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(k(b)-1)*n+1} - `,`${Math.min(k(b)*n,t)} of ${t} items`].join(" ")}),jsxRuntime.jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(Z,{disabled:k(b)<=1,onClick:R=>F({id:l?g(k(b)-1):k(b)-1,label:k(b)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(Z,{disabled:L.length<=1||k(b)==k(L[L.length-1]),onClick:R=>F({id:l?g(k(b)+1):k(b)+1,label:k(b)+1}),children:O.chevronRightOutline})]})]})};Zn.displayName="Zuz.Pagination";var St=Zn;function kc(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:f=true,useWheel:c=true,spacing:l=160,rotation:d=20,scaleStep:p=.15,blur:u=4,animation:y="power",showDots:C=false,autoPlay:x=false,autoPlaySpeed:T=3,onChange:S,...P}=e,{className:g,style:v}=N(P),h=react.useRef(null),b=T/(T>=1e3?1e3:1),I=hooks.useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:f,useWheel:c,onChange:M=>{h.current?.setPage({id:M+1,label:M+1}),h.current?.setProgress(0),S?.(M);}}),{pause:z,resume:E,reset:H}=hooks.useTimer({duration:b,autoStart:x===true,onProgress:M=>{x===true&&h.current?.setProgress(1-M);},onExpired:()=>{x===true&&I.next(),H();}}),k={...v,"--carousel-spacing":`${l}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${u}px`,"--carousel-scale-step":p,"--active-index":I.index,"--carousel-transition":`var(--${y})`};return jsxRuntime.jsxs(m,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${g}`.trim(),style:k,children:[jsxRuntime.jsx(m,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((M,L)=>{let F=L-I.index;if(a==="infinite"){let B=t.length;F=((F+B/2)%B+B)%B-B/2;}let R=L===I.index;return jsxRuntime.jsx(m,{onMouseEnter:()=>R&&z(),onMouseLeave:()=>R&&E(),className:`--carousel-item-wrapper abs ${R?"--is-active":""}`,style:{"--offset":F,zIndex:R?100:100-Math.abs(F),display:Math.abs(F)>5?"none":"flex"},children:n(M,L,I.index)},L)})}),C&&jsxRuntime.jsx(St,{ref:h,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:M=>I.goTo(+M.label-1),asDots:true,progressBar:true})]})}var Lc=react.forwardRef(kc),Mc=Lc;var Kn=(r=>(r.Line="line",r))(Kn||{});var Un=react.forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:f,animated:c,animDuration:l=2,animDelay:d=0,padding:p=0,type:u,...y}=e,{className:C,style:x,rest:T}=N(y),S=react.useRef(null),P=hooks.useResizeObserver(S.current?.parentElement||S),g=typeof n=="number"?n:P.width,v=typeof o=="number"?o:P.height,h={width:g,height:v},b=react.useId(),{pathD:I,areaPathD:z}=hooks.useLineChart(t,h,p+(a||2)),E=react.useRef(null),H=react.useRef(null),[k,M]=react.useState(0),[L,F]=react.useState(0);return react.useEffect(()=>{c&&(E.current&&M(E.current.getTotalLength()),H.current&&F(H.current.getTotalLength()));},[c,I,z,g,v]),jsxRuntime.jsx(m,{ref:S,as:`--chart --${u||"line"}-chart ${C}`.trim(),style:{...x,width:n,height:o},...T,children:g>0&&v>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${g} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:i}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:f})]})}),jsxRuntime.jsx("path",{ref:H,d:z,fill:`url(#${b})`,stroke:"none",style:c?{strokeDasharray:L,strokeDashoffset:L}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${l||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:E,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:k,strokeDashoffset:k}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:k,to:"0",dur:`${l||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});Un.displayName="Zuz.Chart";var zc=Un;var qn=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(qn||{}),Xn=(c=>(c.Image="img",c.Video="vid",c.Audio="audio",c.Link="link",c.Document="doc",c.Location="loc",c.Contact="contact",c.Event="event",c.Poll="poll",c))(Xn||{});var Yn=react.forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:i=true,...f}=e,{className:c,style:l,rest:d}=N(f);return jsxRuntime.jsx(m,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(m,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${c}`.trim(),style:{...l},...d,children:[t&&jsxRuntime.jsx(_,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxRuntime.jsxs(m,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(ae,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(Ue,{progress:.7}),jsxRuntime.jsx(_,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsxRuntime.jsx(m,{as:"--bubble-image",children:jsxRuntime.jsx(Ye,{src:n.source})}):null:null,jsxRuntime.jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(_,{className:"--bubble-stamp tar",children:core.timeSince(a)}),o=="me"&&jsxRuntime.jsx(ae,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});Yn.displayName="Zuz.Bubble";var Zc=Yn;var jn=react.forwardRef((e,r)=>{let{style:t,className:n,rest:o}=N(e);return jsxRuntime.jsx("label",{ref:r,style:t,className:n,...o})});jn.displayName="Zuz.Label";var wt=jn;var Jn=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:i,checked:f,disabled:c,onSwitch:l,...d}=r,p=De(),u=!!(t&&p.values);u?p.errors?.[t]:null;let C=u?p.values?.[t]:void 0,[x,T]=react.useState(f||false),S=react.useRef(null),{variant:P}=Q(true),g=react.useMemo(()=>u&&C!=null?typeof C=="string"?C.toLowerCase()!=="false"&&C!=="":!!C:x,[C,x,u]);react.useEffect(()=>{S.current&&S.current.checked!==g&&(S.current.checked=g);},[g]),react.useEffect(()=>{f!==void 0&&T(f);},[f]);let v=h=>{let b=!!h;u&&p.setFieldValue?.(t,b),T(b),l?.(b,s||"cb");};return react.useImperativeHandle(e,()=>({setChecked(h,b=true){v(h);},toggle(h=true){v(!g);}})),jsxRuntime.jsxs(wt,{"aria-hidden":c,className:[`--${(o||Oe.Default).toLowerCase()}`,`${!o||o===Oe.Default?"--checkbox":"--switch"}`,`--${i||P||W.Small}`,`flex aic jcc ${g?"is-checked":""} rel`,`${c?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==Oe.Default)&&O.check,jsxRuntime.jsx(pe,{ref:h=>{S.current=h,e&&(e.current=h);},defaultChecked:g,type:"checkbox",className:"abs",name:t,required:n||false,onChange:h=>{h.stopPropagation(),v(h.target.checked);},disabled:c})]})};Jn.displayName="Zuz.CheckBox";var Ct=Jn;var em=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:i,fx:f,...c}=r,l=react.useRef(null),{className:d,style:p,rest:u}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:f},l),y=react.useMemo(()=>{let x=new Set;return a.split(",").forEach(T=>{if(T.includes("-")){let[S,P]=T.split("-").map(Number);for(let g=S;g<=P;g++)x.add(g);}else T&&x.add(Number(T));}),x},[a]),C=react.useMemo(()=>{let x=t.split(`
10
10
  `);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let T=x[0]?.match(/^\s*/)?.[0].length||0,S=x.map(g=>{let v=g.match(/^\s*/)?.[0].length||0,h=Math.min(v,T);return g.slice(h)}),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 S.map((g,v)=>{let h=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=y.has(v+1);if(o!="plain"){let I=[];P.forEach(z=>{h=h.replace(z.re,E=>{let H=`ZUZ_ID_${I.length}_ZUZ`;return I.push(`<span class="--token-${z.name}">${E}</span>`),H});});for(let z=I.length-1;z>=0;z--)h=h.replace(`ZUZ_ID_${z}_ZUZ`,I[z]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
11
11
  ${s==true?`<span class="--line-number">${v+1}</span>`:""}
12
12
  <span class="--line-content">${h||" "}</span>
13
- </div>`}).join("")},[t,y]);return jsxRuntime.jsxs(m,{as:`--code-block rel ${d}`,style:p,...l,children:[jsxRuntime.jsx("pre",{ref:e,children:jsxRuntime.jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:C}})}),n&&jsxRuntime.jsx(Z,{as:"--copy-code abs",onClick:()=>{core.copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},tm=em;var ts=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=react.useRef(null),{index:s,icon:a,label:i}=r,[u,l]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.useLayoutEffect(()=>{if(c&&o.current){let{width:d,x:p}=o.current.getBoundingClientRect();l({x:p,width:d}),t&&e(s,d,p,r,true);}},[c,o.current]),react.useEffect(()=>{t&&e(s,u.width,u.x,r,false);},[t]),jsxRuntime.jsxs(Z,{disabled:n,onClick:()=>e(s,u.width,u.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(oe,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(m,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsxRuntime.jsx(m,{className:"--segment-label",children:i||`Item ${s}`})]})};ts.displayName="SelectTabItem";var os=ts;var ns=react.forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:i,...u}=e,[l,c]=react.useState(o||0),d=hooks.useDelayed(50),p=react.useRef(l),{className:f,style:y,rest:C}=N(u),x=react.useRef(null),T=react.useRef(null),{variant:S}=J(true),P=(g,v,h,b,I)=>{if((I||l!=g&&l!=-2)&&(c(g),p.current=l,queueMicrotask(()=>{d&&i?.(b);})),x.current){let z=T.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${z?h-z.left:h}px`);}};return react.useImperativeHandle(r,()=>({setSelected:g=>{typeof g=="number"&&g!=l&&c(g);}}),[l]),jsxRuntime.jsxs(m,{ref:T,"data-selected":l,className:`${f} --segmented --${s||S||W.Medium} flex aic rel`,style:y,...C,children:[jsxRuntime.jsx(m,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((g,v)=>jsxRuntime.jsx(os,{disabled:a,onSelect:P,selected:l==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});ns.displayName="Zuz.SelectTabs";var Tt=ns;var is=react.forwardRef((e,r)=>{let{type:t,...n}=e,o=hooks.useDelayed(),{colorScheme:s,setColorScheme:a}=yo(),i=react.useCallback(()=>{a(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:u,style:l}=N(n),c=react.useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),d=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !o||d==-1?null:t=="system"||t=="switch"?jsxRuntime.jsx(Tt,{className:`--color-scheme --${t}`,onSwitch:({tag:p})=>{a(p);},selected:d,items:c,...n}):jsxRuntime.jsx(Z,{onClick:i,style:l,as:`--color-scheme-switch --${n.variant||W.Small} ${u}`.trim(),children:s=="system"?O.colorSchemeSystem:s=="light"?O.colorSchemeLight:O.colorSchemeDark})});is.displayName="Zuz.ColorScheme";var ym=is;var cs=react.forwardRef((e,r)=>{let[t,n]=react.useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:i,position:u}=e,l=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return react.useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:te.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${u||de.Left} flex cols`,children:[jsxRuntime.jsx(_,{as:"--title",children:o||"This site uses cookies"}),jsxRuntime.jsx(_,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(m,{as:"--footer flex aic",children:[jsxRuntime.jsx(Z,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx(Z,{onClick:c=>l(0),as:"--reject",children:i||"Cancel"})]})]})});cs.displayName="Zuz.CookiesConsent";var Sm=cs;var us=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:u,...l}=r,{style:c,className:d,rest:p}=N(l),f=n||de.Top;react.useRef(null);let [C,x]=react.useState(false);react.useRef(6);let S=i===true||C,g=`--anchor-${react.useId().replace(/:/g,"")}`,{tooltip:v}=J(true),h=react.useMemo(()=>{let I=false;return react$1.addPropsToChildren(a,z=>{let E=z.props.className?.includes(s);return E&&(I=true),E||!I},(z,E)=>{let H=E.props.className?.includes(s),k=z===0,M={};return (H||k)&&(M.style={...E.props.style,anchorName:g}),k&&(M.onMouseEnter=L=>{x(true),E.props.onMouseEnter?.(L);},M.onMouseLeave=L=>{x(false),E.props.onMouseLeave?.(L);}),M})},[a,s,g]),b=ge({transition:f==de.Top?j.SlideInTop:f==de.Bottom?j.SlideInBottom:f==de.Left?j.SlideInLeft:j.SlideInRight,when:S,duration:.2,offset:o+6,margin:f==de.Top||f==de.Left?-o:o,curve:v?.curve||te.EaseInOut});return react.useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h,jsxRuntime.jsx(m,{style:{positionAnchor:g,...b.style,...f===de.Top||f===de.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${u||v?.variant||W.Small} --${f} abs ${d}`.trim(),children:typeof t=="string"?jsxRuntime.jsx(_,{as:"--text rel",children:t}):t})]})};us.displayName="Zuz.ToolTip";var jo=us;var fs=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:i,showGhostBar:u,showKnobOnHover:l,showToolTip:c,roundValue:d,formatValue:p,...f}=r,{className:y,style:C,rest:x}=N(f),T=react.useRef(a||.01).current,S=react.useRef(o||0).current,P=react.useRef(s||1).current,g=react.useRef(n||0).current,v=react.useRef(null),h=react.useRef(null),b=react.useRef(null),I=react.useRef(null);react.useRef(null);let E=react.useRef(null),H=react.useRef(null),k=react.useRef(null),M=react.useRef(null),L=(re,ne,ue)=>(re-ne)/(ue-ne)*100,F=re=>{if(h.current){let ne=parseFloat(re.currentTarget.value);Q(ne);let ue=L(ne,parseFloat(re.currentTarget.min),parseFloat(re.currentTarget.max));h.current.style.setProperty("--value",`${ue}`),h.current.setAttribute("data-value",`${ne}`),i&&i(d?+ne.toFixed(2):ne);}},[R,B]=react.useState(false),[G,U]=react.useState(0),[D,A]=react.useState(0),[q,K]=react.useState(false),Q=async re=>{let ne=p?p(+re):d?(+re).toFixed(2):Math.round(+re);k.current&&(k.current.textContent=String(ne));},ie=re=>{if(R){let ne=re.clientX-G,ue=P-S,$=ne/200*ue,X=Math.max(S,Math.min(D+$,P));if(X=Math.round(X/T)*T,Q(X),h.current){let ce=L(X,S,P);h.current.style.setProperty("--value",`${ce}`),h.current.setAttribute("data-value",`${X}`),H.current&&(H.current.textContent=d?X.toFixed(2):X.toString()),i&&i(X);}}},me=()=>{B(false),document.body.style.cursor="auto";},ye=re=>(re-S)/(P-S)*100,se=re=>{if(!h.current)return;let ne=h.current.getBoundingClientRect(),ue=re.clientX-ne.left,Be=Math.max(0,Math.min(100,ue/ne.width*100));if(c&&k.current){let $=v.current?+v.current.value:n;Q($*100);}if(u){let $=ye(v.current?+v.current.value:n),X=Math.min($,Be),ce=Math.abs(Be-$);h.current.style.setProperty("--ghost-start",`${X}`),h.current.style.setProperty("--ghost-width",`${ce}`);}};react.useEffect(()=>{h.current&&h.current.style.setProperty("--value",v.current?`${L(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:g.toString());},[]),react.useEffect(()=>(R?(document.addEventListener("mousemove",ie),document.addEventListener("mouseup",me)):(document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",me)),()=>{document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",me);}),[R]),react.useEffect(()=>{let re=L(n,S,P);h.current?.style.setProperty("--value",`${re}`),Q(n);},[n,S,P,k.current]);let Y=()=>jsxRuntime.jsxs(m,{ref:h,onMouseEnter:()=>K(true),onMouseLeave:()=>K(false),onMouseMove:se,className:`--slider --${t||co.Default} ${l?"--knob-hover":""} flex rel ${y}`.trim(),style:{...C},children:[jsxRuntime.jsx(m,{ref:E,className:"--slider-track abs fill"}),u&&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:b,className:"--slider-knob --tooltip-knob abs"}),jsxRuntime.jsx(pe,{ref:v,onInput:F,className:"abs fill",tabIndex:0,type:t||co.Default,defaultValue:g||0,step:T,max:P,min:S})]});if(c===true){let re=p?p(n):d?n.toFixed(2):n;return jsxRuntime.jsx(jo,{ref:M,show:R,position:pt.Top,margin:15,anchorName:"--tooltip-knob",title:jsxRuntime.jsx(ae,{ref:k,children:re}),children:Y()})}return Y()};fs.displayName="Zuz.Slider";var ot=fs;var gs=react.forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:i,rest:u}=N(s),{canvasRef:l,crop:c,setScale:d,handleMouseDown:p,handleMouseUp:f,handleMouseMove:y}=hooks.useImageCropper(t,o||200,n||hooks.CropShape.Circle);return react.useImperativeHandle(r,()=>({getCropped(){return c()},setScale(C){d(C);}})),jsxRuntime.jsxs(m,{as:`--cropper --${n||hooks.CropShape.Circle} ${i}`,style:a,...u,children:[jsxRuntime.jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:p,onMouseUp:f,onMouseLeave:f,onMouseMove:y}),jsxRuntime.jsx(m,{as:"--cropper-slider",children:jsxRuntime.jsx(ot,{onChange:C=>d(C),min:0,max:1,step:.01,value:1})})]})});gs.displayName="Zuz.Cropper";var Mm=gs;var Vm=(t=>(t.Circle="circle",t.Square="square",t))(Vm||{});var ys=react.forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=react.useMemo(()=>{let i=typeof t=="string",u=i?[]:t;return i&&t.split(",").forEach(l=>{u.push({label:l});}),u},[t]),a=react.useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsxRuntime.jsx(Xe,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(m,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:a.map((i,u,l)=>i.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-${u}`))}):jsxRuntime.jsxs(Z,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[u+1],children:[i.icon&&jsxRuntime.jsx(oe,{as:"--crumb-icon",name:i.icon}),jsxRuntime.jsx(_,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${u}`))})});ys.displayName="Zuz.Crumb";var Hm=ys;var vs=react.forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:i,type:u,onConfirm:l,...c}=e,[d,p]=react.useState(false),[f,y]=react.useState(n||null),{style:C,className:x,rest:T}=N(c),S=react.useRef(null),P=react.useRef(null),{reposition:g}=xt(P,{direction:de.Bottom,offset:2}),v=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let b=I=>{let z=I.target,E=S.current?.contains(z),H=P.current?.contains(z);!E&&!H&&p(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),react.useEffect(()=>{let b=I=>{I.key==="Escape"&&d&&(p(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let h=()=>{p(true);};return react.useEffect(()=>{d&&g();},[d,g]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(m,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":f?f.toISOString():"",children:[t?typeof t=="string"?jsxRuntime.jsx(oe,{as:"mr:10 c:#666",name:t}):t:jsxRuntime.jsx(ae,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:f?dateFns.format(f,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:C,onFocus:h,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&l?.(b.currentTarget.value);},...T}),jsxRuntime.jsx(m,{"aria-hidden":!d,ref:P,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(Zo,{defaultValue:f,onChange:b=>{y(b),p(false);}})})]})})});vs.displayName="Zuz.DatePicker";var Fm=vs;var Ss=react.forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsxRuntime.jsx(Z,{className:`--fab fixed --${n||W.Large} --${o||"bottomright"}`,children:t||O.plus})});Ss.displayName="Zuz.Fab";var Wm=Ss;var ws=e=>{let{names:r,strength:t}=e,n={[kt.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-${kt.Gooey}`)};return react.useEffect(()=>{},[r]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(r||[kt.Gooey]).map(o=>n[o](t))})})};ws.displayName="Zuz.Filters";var qm=ws;var Cs=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:i,className:u="",style:l,...c})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",u].filter(Boolean).join(" "),p={...l,gap:typeof r=="number"?`${r}px`:r};return jsxRuntime.jsx(m,{...c,className:d,style:p})};Cs.displayName="Zuz.FlexBox";var ze=Cs;var Fe=null,Te=null,Ps=react.forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:i,actionPosition:u,spinner:l,loadingMessage:c,onShow:d,onHide:p,...f}=e,{className:y,style:C,rest:x}=N(f),[T,S]=react.useState(t||""),[P,g]=react.useState(n||""),[v,h]=react.useState(null),[b,I]=react.useState(i||Re.Default),z=react.useMemo(()=>core.uuid(12),[]),[E,H]=react.useState(false),k=react.useRef(null),M=react.useRef(null),[L,F]=react.useState(false),[R,B]=react.useState(true),G=react.useRef(null),U=P;react.useImperativeHandle(r,()=>({setLoading(A){F(A);},showDialog(A,q,K,Q){Fe&&(clearTimeout(Fe),Te&&clearTimeout(Te),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),Te=null;},500)),I(Re.Dialog),q&&g(q),A&&S(A),K&&h(K.reduce((ee,ie)=>(ee.push({...ie,key:ie.key||core.uuid(12)}),ee),[])),H(true),setTimeout(()=>Q?Q():()=>{},1e3);},dialog(A,q,K,Q){Fe&&(clearTimeout(Fe),Te&&clearTimeout(Te),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),Te=null;},500)),I(Re.Dialog),g(q),S(A),K&&h(K.reduce((ee,ie)=>(ee.push({...ie,key:ie.key||core.uuid(12)}),ee),[])),H(true),setTimeout(()=>Q?Q():()=>{},1e3);},error(A,q){this.show(A,q,Re.Error);},warn(A,q){this.show(A,q,Re.Warn);},success(A,q){this.show(A,q,Re.Success);},show(A,q,K){Fe&&(clearTimeout(Fe),Te&&clearTimeout(Te),M.current=k.current.style.transform,k.current.style.transform="",k.current.classList.remove("--wobble"),setTimeout(()=>{k.current.classList.add("--wobble"),k.current.style.transform=`${M.current} scale(.9)`.trim();},50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),k.current.style.transform=M.current||"",Te=null;},500)),Fe=setTimeout(()=>{H(false),Fe=null,Te=null;},(q||4)*1e3),I(K||Re.Default),g(A),H(true),d?.();},hide(){H(false),p?.();}}));let D=react.useMemo(()=>{let A={when:E,duration:a||.3,delay:.1};if(b==Re.Dialog){if(o){let{from:q,to:K}=ft(o,20);return {from:q,to:K,curve:s||te.EaseInOut,...A}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:te.Spring,...A}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:te.Spring,...A}},[E,b]);return react.useEffect(()=>{G.current&&clearTimeout(G.current),E?B(true):G.current=setTimeout(()=>B(false),1e3);},[E]),b==Re.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(We,{when:E}),jsxRuntime.jsxs(m,{className:`--sheet --sheet-${b.toLowerCase()} ${E?"is-visible":""} ${y} fixed`.trim(),style:C,fx:D,...x,ref:k,children:[jsxRuntime.jsx(Ee,{when:L,spinner:l,message:c}),jsxRuntime.jsxs(m,{className:"--head flex aic rel",children:[jsxRuntime.jsx(m,{className:`--${T?"title":"dot"} flex aic rel`,children:T||""}),jsxRuntime.jsx(Z,{onClick:A=>H(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(m,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:R?U:null}),v&&jsxRuntime.jsx(m,{className:`--footer flex aic rel ${u?u==lo.Center?"jcc":"":"jce"}`.trim(),children:v.map((A,q)=>jsxRuntime.jsx(Z,{onClick:K=>A.handler?A.handler():A.onClick?A.onClick():console.log("onClick Handler missing"),className:"--action",children:A.label},`sheet-${z}-action-${A.key}`))})]})]}):jsxRuntime.jsx(m,{className:`--sheet --sheet-${b.toLowerCase()} ${y} abs`.trim(),style:C,...x,fx:D,ref:k,children:E?P:null})}),Rs=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Ps.displayName="Zuz.Sheet";var ep=Ps;var lp=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let i=!isNaN(Number(n[a+1]));o[s]=o[s]||(i?[]:{});}return o[s]},r);}return r},Is=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:i,children:u,withData:l,beforeSubmit:c,onSubmit:d,onError:p,onSuccess:f,resetOnSuccess:y,...C}=r,{className:x,style:T,rest:S}=N(C),[P,g]=react.useState(false),v=react.useRef(null),h=Lo(),b=$o();Ao();let z=react.useRef(null),E=react.useCallback(D=>v.current?v.current.querySelectorAll(D):[],[v.current]),H=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")}),k=D=>{let A=[];return D.querySelectorAll(".--input").forEach(q=>{A.push(q.value);}),A.join("")},M=D=>D.classList.contains("--otp")?k(D):D.classList.contains("--select")?D.querySelector("button.--selected")?.dataset.value:D.classList.contains("--checkbox")||D.getAttribute("type")==="checkbox"?D.checked:D.value,L=react.useCallback(D=>{let{name:A,required:q,with:K}=H(D),Q=M(D);if(t&&t[A]&&b?.getSnapshot()){let ee=t[A](Q,b.getSnapshot().values);if(ee===false||typeof ee=="string")return typeof ee=="string"&&b?.setFieldError(A,ee),false}if(q&&(D.type==="checkbox"&&!D.checked||D.classList.contains("--select")&&(Q==="-1"||!Q)||!Q||Q===""))return false;if(K)switch((K.includes("@")?K.split("@")[0]=="match"?Ke.MatchField:K.split("@")[0]:K).toUpperCase()){case Ke.IPV4:return core._(Q).isIPv4();case Ke.IPV6:return core._(Q).isIPv6();case Ke.Email:return core._(Q).isEmail();case Ke.Uri:try{return new URL(Q),!0}catch{return false}case Ke.MatchField:let[ie,me,ye]=K.split("@"),se=document.querySelector(`[name=${me.trim()}]`);if(!se)return false;switch(ye||"direct-match"){case "if-not-empty":if(se&&!core._(se.value).isEmpty()&&se.value!=D.value)return false;break;case "direct-match":if(se&&se.classList.contains("--otp")&&D.classList.contains("--otp")&&k(se)!=k(D))return false;if(se&&se.value!=D.value)return false;break}break}return true},[t,b]),F=react.useCallback(()=>{let D={},A={...b?.getSnapshot().values||{}},q=null,K=null;if(E("[name]").forEach(ee=>{let{name:ie,required:me,with:ye}=H(ee),se=me||ye?L(ee):true,le=M(ee);D[ie]={valid:se,value:le},A[ie]=le,b?.setFieldError(ie,se?null:a?.[ie]||"Invalid"),se?ee.classList.remove("--with-error"):(ee.classList.add("--with-error"),q||(q=ee),K=a?.[ie]);}),q){let ee=q;if(ee.classList.contains("--otp"))for(let ie of Array.from(ee.querySelectorAll(".--input"))){let me=ie;if(me.value==""){me.focus();break}}else ee.focus();}let Q=lp(A);return {error:q!=null,errorMsg:K||"Fix errors to continue...",data:D,payload:Q}},[v.current,b]),R=react.useCallback((D={})=>{let{error:A,errorMsg:q,payload:K,data:Q}=F();if(A){h.error(q);return}i?react.startTransition(async()=>{g(true),core.withPost(i,{...l,...K,...D}).then(ee=>{g(false),y&&b?.reset(),f?.(ee,{...l,...K,...D}),f||h.success(ee.message||"Redirecting...");}).catch(ee=>{g(false),p?p(ee):h.error(ee.message);});}):d?.(K,Q);},[F,i,l,f,p,y,d]),B=react.useCallback(()=>{let D=E("[type=submit]");!D||D.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):D.forEach(A=>{A.addEventListener("click",R);});},[v.current]),G=react.useMemo(()=>react$1.addPropsToChildren(u,D=>D.props.type=="submit",D=>({ref:z})),[u]),U=react.useRef(R);return react.useImperativeHandle(e,()=>({setLoading:D=>g(D),submit:D=>U.current(D),init:B,hideError:()=>h.clearAll()}),[R,B]),react.useEffect(B,[]),react.useEffect(()=>{U.current=R;},[R]),react.useEffect(()=>{let D=E("[type=submit]"),A=Array.from(D).map(q=>{let K=q;return K.addEventListener("click",R),()=>K.removeEventListener("click",R)});return ()=>A.forEach(q=>q())},[R,E]),jsxRuntime.jsxs(m,{ref:v,style:T,className:`--form flex rel ${x}`,children:[!Rs(o)&&jsxRuntime.jsx(Ee,{when:P,spinner:s,...o}),G]})};Is.displayName="Zuz.FormInternal";var Ns=e=>jsxRuntime.jsx(Rn,{initialValues:e.withData,children:jsxRuntime.jsx(Is,{...e})});Ns.displayName="Zuz.Form";var cp=Ns;var Bs=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:i,justify:u,inline:l,flow:c,autoCols:d,autoRows:p,template:f,...y}=e;react.useRef(null);let {className:x,style:T,rest:S}=N(y),P=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,g={display:l?"inline-grid":"grid",gridTemplateColumns:P(t),gridTemplateRows:P(n),gap:o,columnGap:s,rowGap:a,alignItems:i,justifyContent:u==="between"?"space-between":u==="around"?"space-around":u,gridAutoFlow:c,gridAutoColumns:d,gridAutoRows:p,gridTemplateAreas:f,...T};return jsxRuntime.jsx(m,{ref:r,as:`--grid ${x}`.trim(),style:g,...S})};Bs.displayName="Zuz.Grid";var up=Bs;var Es=e=>typeof e=="string"&&e.includes("+"),ks={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"},Ls={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var Os=react.forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=J(true),i=react.useMemo(()=>{if(Es(r)){let u=null;return {keys:String(r).split("+").reduce((c,d,p,f)=>(f[p+1]?c.push(d):u=d.toUpperCase(),c),[]),children:u}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxRuntime.jsxs(m,{as:`--keyboard-keys --${o||a||W.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(u=>jsxRuntime.jsx("abbr",{title:Ls[u],children:ks[u]},u)),jsxRuntime.jsx(ae,{children:i?.children??e})]})});Os.displayName="Zuz.KeyboardKeys";var ir=Os;var Hs=react.createContext(null),st=()=>{let e=react.useContext(Hs);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},vp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:u,onTrackChange:l,...c}=n,{className:d,style:p,rest:f}=N(c),y=hooks.useMediaPlayer(o,o[0]??void 0),C=react.useMemo(()=>({play:O.play,pause:O.pause,prev:O.prev,next:O.next,volumeHigh:O.volumeHigh,volumeMute:O.volumeMute,...r}),[r]),x=react.useMemo(()=>({...y,mode:s,icons:C}),[y,C]);return jsxRuntime.jsx(Hs.Provider,{value:x,children:jsxRuntime.jsx(m,{className:`--zuz-media-player ${d}`,style:p,children:t})})},As=vp;var $s=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},Qt=e=>typeof e=="string"?jsxRuntime.jsx(oe,{name:e}):e,zs=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=st();return jsxRuntime.jsxs(m,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsxRuntime.jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsxRuntime.jsx("audio",{ref:e}),r.isLoading&&jsxRuntime.jsx(m,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(Se,{})})]})},Fs=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=st();return jsxRuntime.jsxs(m,{as:"--track-info flex aic",children:[jsxRuntime.jsx(Ye,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxRuntime.jsxs(m,{as:"flex cols",children:[jsxRuntime.jsx(m,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsxRuntime.jsx(m,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},_s=()=>{let{state:e,controls:r,icons:t}=st();return jsxRuntime.jsxs(m,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx(Z,{onClick:r.prev,as:"--prev",children:Qt(t?.prev??O.prev)}),jsxRuntime.jsx(Z,{onClick:r.togglePlay,as:"--play-pause",children:Qt(e.isPlaying?t?.pause??O.pause:t?.play??O.play)}),jsxRuntime.jsx(Z,{onClick:r.next,as:"--next",children:Qt(t?.next??O.next)})]})},Zs=()=>{let{state:e,controls:r,mediaRef:t}=st(),n=e.progress*(e.duration||0);return jsxRuntime.jsxs(m,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(m,{as:"--track-current-duration",children:$s(n)}),jsxRuntime.jsx(ot,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsxRuntime.jsx(m,{as:"--track-total-duration",children:$s(e.duration)})]})},Ks=()=>{let{state:e,controls:r,icons:t}=st();return jsxRuntime.jsxs(m,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx(Z,{onClick:()=>r.setIsMuted(),children:Qt(e.isMuted?t?.volumeMute??O.volumeMute:t?.volumeHigh??O.volumeHigh)}),jsxRuntime.jsx(ot,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Sp=({ref:e,...r})=>jsxRuntime.jsx(As,{...r,ref:e}),wp=Object.assign(Sp,{Stage:zs,TrackInfo:Fs,Controls:_s,Progress:Zs,Volume:Ks}),Cp=wp;var Gs=react.forwardRef((e,r)=>{let t=hooks.useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxRuntime.jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:te.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||W.Small} fixed flex`,children:[jsxRuntime.jsx(m,{className:"--ico",children:t?O[Pe.Success]:O[Pe.Error]}),jsxRuntime.jsx(_,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});Gs.displayName="Zuz.NetWorkManager";var Ip=Gs;var qs=react.forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:i}=N(o),[u,l]=react.useState(false),[c,d]=react.useState(""),p=react.useMemo(()=>core.checkPasswordStrength(c),[c]),f=hooks.useDebounce(y=>{t&&d(y.target.value),n&&n(y);},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(pe,{ref:r,type:u?"text":"password",className:a,onChange:f,...i}),jsxRuntime.jsx(Z,{tabIndex:-1,onClick:()=>l(y=>!y),className:"--toggle flex aic jcc abs",children:u?O.eye:O.eyeSlash})]}),t&&jsxRuntime.jsxs(m,{as:`flex aic --password-meter --pb-score-${p.score}`,style:s,children:[jsxRuntime.jsxs(m,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(m,{as:`--pbar ${p.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(_,{as:"--password-meter-label","aria-hidden":true,children:p.result})]})]})});qs.displayName="Zuz.Password";var Op=qs;var Ys=react.forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=react.useRef([]),i="pinput",u=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(u=true,delete s.required);let{style:c}=N(s),d=f=>{let y=f.currentTarget,C=a.current[parseInt(y.dataset.index)+1],x=a.current[parseInt(y.dataset.index)-1];y.value.length===1&&C?C.focus():y.value.length===0&&x&&x.focus();},{variant:p}=J(true);return react.useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsxRuntime.jsx(m,{name:i,style:c,className:`--otp --${s.variant??p??W.Medium} flex aic rel`,"data-required":u,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((f,y)=>jsxRuntime.jsx(pe,{autoComplete:"new-password","data-index":y,ref:C=>{a.current[y]=C;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${y}`))})});Ys.displayName="Zuz.PinInput";var Ap=Ys;var js=react.forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:i,variant:u,checked:l,onSwitch:c,...d}=e,[p,f]=react.useState(l||false),{variant:y}=J(true),C=react.useRef(null);return jsxRuntime.jsxs(wt,{className:`${n} --${(a||mo.Default).toLowerCase()} --radio${!a||a==mo.Default?"":"card"} --${u||y||W.Small} flex aic rel`.trim(),...d,children:[jsxRuntime.jsx(pe,{ref:C,defaultChecked:p,value:i||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{c&&c(x.target.checked,i||"cb"),f(x.target.checked);}}),jsxRuntime.jsx(m,{className:"--dot rel",children:jsxRuntime.jsx(m,{className:"--rod abs abc"})}),jsxRuntime.jsx(m,{className:"--value",children:t})]})});js.displayName="Zuz.Radio";var _p=js;var Qs=react.forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=O.search,hideSearchIcon:i=false,clearIcon:u=O.close,hideClearIcon:l=false,onChange:c,onClear:d,...p}=e,{style:f,className:y}=N({as:e.as}),[C,x]=react.useState(""),{variant:T}=J(true),S=react.useRef(null);"type"in e&&delete e.type;let P=v=>{x(v.target.value),c?.(v.target.value);},g=v=>{C.trim()!==""&&(x(""),c?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return react.useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{style:f,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||T||W.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[jsxRuntime.jsx(pe,{ref:S,onChange:P,...p}),e.shortcut&&jsxRuntime.jsx(ir,{keys:e.shortcut,as:"abs"}),jsxRuntime.jsx(Z,{tabIndex:-1,onClick:v=>g(),className:"--send flex aic jcc",variant:e.variant||W.Medium,children:C!==""?!l&&(typeof u=="string"?jsxRuntime.jsx(oe,{name:u,as:"--search-action"}):u):!i&&(typeof a=="string"?jsxRuntime.jsx(oe,{name:a,as:"--search-action"}):a)})]})});Qs.displayName="Zuz.Search";var lr=Qs;var Yp=({label:e,icon:r})=>jsxRuntime.jsxs(m,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsxRuntime.jsx(oe,{name:r}),jsxRuntime.jsx(_,{as:"--select-group-label",children:e})]}),ea=Yp;var oa=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsxRuntime.jsx(oe,{name:"checkIcon"}):e:O.check,s=n.disabled===true;return jsxRuntime.jsxs(Z,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxRuntime.jsxs(ze,{as:"--option-item-meta --aic",children:[n.icon&&jsxRuntime.jsx(oe,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsxRuntime.jsx(_,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsxRuntime.jsx(ze,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};oa.displayName="Option";var ra=oa;var na=({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:i,searchPlaceholder:u,maxHeight:l,arrowDownIcon:c=O.arrowDown,arrowUpIcon:d=O.arrowUp,expanded:p,multiple:f,tokenizer:y,wrapTokens:C,disabled:x,checkIcon:T,closeIcon:S,onChange:P,required:g,with:v,...h}=r,b=De(),I=s&&b.values&&b.setFieldValue,z=I?b.errors?.[s]:null,E=I?b.values?.[s]:void 0,H=$=>!$&&$!==0?null:f||y?(Array.isArray($)?$:[$]).map(ce=>typeof ce=="string"||typeof ce=="number"?n.find(xe=>String(xe.value)===String(ce)):ce).filter(Boolean):typeof $=="string"||typeof $=="number"?n.find(X=>String(X.value)===String($)):$,[k,M]=react.useState(()=>t?H(t):n.find(X=>String(X.value)==="-1")||null),L=react.useMemo(()=>E?H(E):k,[E,k]),[F,R]=react.useState(false),[B,G]=react.useState(null),U=react.useRef(null),D=react.useRef(null),A=react.useRef(null),q=react.useId(),K=react.useMemo(()=>s||q,[]),{reposition:Q}=xt(A,{direction:pt.Bottom,offset:2}),{variant:ee}=J(true),ie=S?typeof S=="string"?jsxRuntime.jsx(oe,{name:S}):S:O.close,{className:me,style:ye,rest:se}=N(h,void 0),le=$=>Array.isArray(L)?L.some(X=>X.value===$.value):L?.value===$.value,Y=$=>{if(!(x||$.disabled))if(f||y){let X=Array.isArray(L)?L:[],xe=X.find(ao=>ao.value===$.value)?X.filter(ao=>ao.value!==$.value):[...X,$];M(xe),P?.(xe);}else M($),R(false),P?.($);},re=($,X)=>{if($.stopPropagation(),x)return;let ce=L.filter(xe=>xe.value!==X.value);I?b.setFieldValue?.(s,ce.map(xe=>xe.value)):M(ce),R(false),P?.(ce);},ne=$=>{let X=$.currentTarget,ce=X.scrollTop===0&&$.deltaY<0,xe=X.scrollHeight-X.scrollTop===X.clientHeight&&$.deltaY>0;!ce&&!xe||$.preventDefault(),$.stopPropagation();};react.useImperativeHandle(e,()=>({setSelected:$=>{let X=H($);if(I){let ce=Array.isArray(X)?X.map(xe=>xe.value):X?.value;b.setFieldValue?.(s,ce);}else M(X);},getValue:()=>L||null}),[L,n]),react.useEffect(()=>{if(!F)return;let $=()=>{Q();};return window.addEventListener("scroll",$,true),window.addEventListener("resize",Q),()=>{window.removeEventListener("scroll",Q,true),window.removeEventListener("resize",Q);}},[F,Q]),react.useEffect(()=>{if(!F){D.current&&(D.current.value=""),G(null);return}D.current?.focus(),Q();let $=ce=>{A.current&&!A.current.contains(ce.target)&&R(false);},X=setTimeout(()=>{document.addEventListener("click",$);},0);return ()=>{clearTimeout(X),document.removeEventListener("click",$);}},[F,Q]),react.useEffect(()=>()=>{I&&b.deleteFieldValue?.(s);},[]);let ue=hooks.useDebounce($=>G($==""?null:$),300),Be=react.useMemo(()=>{if(L)return core._(L).isArray()?L.length>0?L[0]:void 0:L},[L]);return console.log(z),jsxRuntime.jsxs(m,{"data-required":g?"true":void 0,with:v,className:[`--select ${p==true?"--expanded":""}`,`--${a||ee}`,`${s?`--${s}`:""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:K,children:[jsxRuntime.jsxs(Z,{ref:U,disabled:x,"data-value":Be?.value??"-1",className:`--select-display --selected flex aic rel ${me}`.trim(),withLabel:false,style:ye,onClick:$=>{$.stopPropagation(),x||R(X=>!X);},...se,children:[Be?.icon&&jsxRuntime.jsx(oe,{as:"--selected-icon",name:Be.icon}),jsxRuntime.jsx(ze,{aic:true,as:"--label-wrapper",children:y&&Array.isArray(L)&&L.length>0?jsxRuntime.jsxs(ze,{as:`--tokens-wrap${C===true?" --wrap":""}`,children:[L?.map($=>jsxRuntime.jsxs(ze,{aic:true,as:"--token",children:[jsxRuntime.jsx(_,{as:"--token-label",children:$.label}),jsxRuntime.jsx(m,{as:"--token-remove",onClick:X=>re(X,$),children:ie})]},$.value)),L.length<n.length&&jsxRuntime.jsx(_,{as:"--label",children:o||"Choose"})]}):jsxRuntime.jsx(_,{as:"--label",children:Array.isArray(L)?L.length>0?`${L.length} selected`:o||"Choose":L?.label||o||"Choose"})}),jsxRuntime.jsx(m,{className:"--svg-arrow rel flex aic jcc",children:F?typeof d=="string"?jsxRuntime.jsx(oe,{name:d,as:"--search-action"}):d:typeof c=="string"?jsxRuntime.jsx(oe,{name:c,as:"--search-action"}):c})]}),jsxRuntime.jsxs(m,{id:K,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!F,onWheel:ne,style:{maxHeight:l||"auto"},ref:A,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:F,duration:.05},children:[i&&jsxRuntime.jsx(m,{as:"--select-search --no-shrink flex --sticky",children:jsxRuntime.jsx(lr,{ref:D,variant:W.Small,placeholder:u||"Search...",onChange:ue})}),o&&jsxRuntime.jsx(ea,{label:o}),n?.filter($=>!B||$.label.toLowerCase().includes(B.toLowerCase()))?.map($=>jsxRuntime.jsx(ra,{updateValue:Y,checkIcon:T,selected:le($),o:$},`option-${(typeof $=="string"?$:$.label).replace(/\s+/g,"-")}-${typeof $=="string"?$:$.value}`))]})]})};na.displayName="Zuz.Select";var ou=na;var sa=({ref:e,...r})=>jsxRuntime.jsx(Ct,{type:Oe.Switch,...r,ref:e});sa.displayName="Zuz.Switch";var ru=sa;var ia=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:i,resize:u,sortBy:l,sortable:c,onSort:d}=e,[p,f]=react.useState(0),y=()=>{c&&(d?.(String(t),p==1?-1:1),f(C=>C==1?-1:1));};return jsxRuntime.jsxs(m,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:y,children:[jsxRuntime.jsx(m,{as:"--colv",children:a}),r==-1&&c&&l==t&&jsxRuntime.jsx(m,{as:"--arrow flex aib",children:p==1?O.arrowUp:O.arrowDown})]})};ia.displayName="Zuz.Column";var oo=ia;var ca=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:i,sortBy:u,selectable:l,tableRef:c,loading:d,rowClassName:p,onSort:f,onRowClick:y,onSelect:C,onContextMenu:x}=e,T=hooks.useDelayed(),S=react.useMemo(()=>({transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(r+1)}),[]),P=react.useRef(null),g=(h,b)=>{r==-1?t.emit(`ALL_ROWS_${h?"CHECKED":"UNCHECKED"}`,h):(C&&C(o,h),t.emit(`ROW_${h?"CHECKED":"UNCHECKED"}`,h,b));},v=(h,b,I)=>jsxRuntime.jsx(oo,{idx:h,id:b,as:"--selector",pubsub:t,value:jsxRuntime.jsx(Ct,{value:I,ref:P,onSwitch:g,type:Oe.Default})});return react.useEffect(()=>{let h=(E,H)=>{P.current?.setChecked(E,false);},b=(E,H)=>{let k=false;c?.current&&c.current.querySelectorAll(".--row").forEach(M=>{let L=M;if(!L.classList.contains("--row-head")){let F=L.querySelector(".--selector input[type=checkbox]");F&&F.checked&&!k&&(k=F.checked);}}),P.current.setChecked(k,false);},I=E=>{P.current?.setChecked(E,false),C&&C(o,E);},z=E=>{P.current?.setChecked(E,false),C&&C(o,E);};return r==-1?(t.on("ROW_CHECKED",h),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",h),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",z),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",z);})},[]),jsxRuntime.jsxs(m,{onContextMenu:h=>x?x(h,o):null,onClick:h=>y?y(h,e.data):()=>{},...i?{fx:{...S,when:T}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${r==-1?"--row-head":""} ${p||""}`,children:[r==-1&&n.map((h,b)=>{let{renderWhenHeader:I,render:z,value:E,...H}=h;return jsxRuntime.jsxs(react.Fragment,{children:[l&&b==0&&v(-1,`--selector-${h.id}`,"all"),jsxRuntime.jsx(oo,{idx:-1,onSort:f,sortBy:u,value:E,...H,pubsub:t,style:a[h.id]})]},`--col-${h.id}`)}),d&&r>-1&&jsxRuntime.jsx(m,{as:"--col",children:jsxRuntime.jsx(_,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((h,b)=>jsxRuntime.jsxs(react.Fragment,{children:[l&&b==0&&v(b,`--selector-${h.id}`,h.id.toString()),s.includes(String(h.id))?jsxRuntime.jsx(oo,{pubsub:t,idx:b,id:String(h.id),style:a[String(h.id)],value:h.render?h.render(o,r):o[String(h.id).includes(".")?String(h.id).split(".").reverse()[0]:h.id]}):null]},`--${String(h.id)}-val-${b}`))]})};ca.displayName="Zuz.Row";var ro=ca;var fa=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:u,showPaginationOnZeroPageCount:l,animateRows:c,header:d,rowClassName:p,selectableRows:f,hoverable:y,sortBy:C,loading:x,loadingRowCount:T,loadingMessage:S,spinner:P,emptyMessage:g,onSort:v,onRowClick:h,onRowSelectToggle:b,onPageChange:I,onRowContextMenu:z,...E}=e,H=react.useRef(null),k=react.useMemo(()=>t.reduce((le,Y)=>(le[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},le),{}),[t]),M=react.useMemo(()=>Object.keys(k),[t]),L=react.useMemo(()=>d??true,[d]),{style:F,className:R,rest:B}=N(E),G=react.useRef(null),U=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(n.map(()=>core.uuid(8))),[A,q]=react.useState(C||null),[K,Q]=react.useState(S||"loading"),ee=react.useMemo(()=>!x&&n&&n.length==0,[x,n]),ie=react.useCallback(()=>g?typeof g=="function"?jsxRuntime.jsx(g,{}):g:jsxRuntime.jsx(_,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);react.useEffect(()=>{n.length&&!D.current&&(D.current=n.map(()=>core.uuid(8)));},[n]);let me=(le,Y)=>{q(le),v?.(le,Y);},ye=(o||(n?n.length:0))/(s||10),se=react.useMemo(()=>l||ye>1?jsxRuntime.jsx(St,{hash:u,ref:H,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return react.useImperativeHandle(r,()=>({setLoading(le){}})),jsxRuntime.jsxs(m,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${R}`,ref:G,children:[L==true&&jsxRuntime.jsx(ro,{sortBy:A,onSort:me,tableRef:G,pubsub:U,selectable:f,index:-1,schema:t,loading:true,styles:k}),x&&jsxRuntime.jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(Se,{type:P||he.Simple}),K&&jsxRuntime.jsx(_,{as:"--table-loading-message",children:K})]}),x&&Array(T||5).fill({}).map((le,Y)=>jsxRuntime.jsx(ro,{tableRef:G,index:Y,pubsub:U,schema:t,styles:k,loading:true,animate:c,onRowClick:h},`--trow-loading-${Y}-${t[0].id}`)),!x&&n&&n.map((le,Y)=>jsxRuntime.jsx(ro,{tableRef:G,pubsub:U,loading:false,index:Y,schema:t,ids:M,styles:k,animate:c,data:le,onRowClick:h,rowClassName:p,selectable:f,onSelect:b,onContextMenu:z},`--trow-${D.current[Y]||Y}-${t[0].id}`)),ee&&ie(),i&&se&&jsxRuntime.jsx(m,{"aria-hidden":!i||!se,...c?{fx:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&se!=null}}:{},as:"--row flex aic --row-footer",children:se})]})};fa.displayName="Zuz.Table";var hu=react.forwardRef(fa),yu=hu;var bu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=react.useState(0),a=(i,u,l)=>{i.preventDefault(),s(u),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(m,{ref:e,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(_,{as:"--toc-title",children:t}),jsxRuntime.jsx(Xe,{items:n.map((i,u)=>jsxRuntime.jsx("a",{className:o==u?"--toc-active":"",style:{anchorName:o===u?"--toc-active":"none",color:o==u?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,u,i.tag),href:`#${i.tag}`,children:i.label}))})]})},vu=bu;var da=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let i=react.useRef(null),u=hooks.useResizeObserver(i);react.useEffect(()=>{e&&u.height>0&&a(u.height);},[e,u.height]);let c=react.useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:d},[e,r,n,t]);return jsxRuntime.jsx(m,{ref:i,style:{...c},className:"--content",children:o||e?s:null})};da.displayName="Zuz.TabBody";var ga=da;var xa=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:u="slide",...l}=r,[c,d]=react.useState(0),p=react.useRef(null),f=hooks.useResizeObserver(p),y=react.useMemo(()=>core.uuid(8),[]),[C,x]=react.useState("auto"),T=react.useMemo(()=>f.width>0,[f.width]);react.useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=react.useMemo(()=>t.map(b=>({...b,key:b.key||core.uuid(8)})),[t]),{style:P,className:g,rest:v}=N({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),h=()=>{if(!T)return {opacity:0};switch(u){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${c*f.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(m,{ref:p,style:P,className:`--tabview --${a} flex cols ${g}`,children:[jsxRuntime.jsx(Tt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let I=S.find(z=>z.tag==b.tag);I&&I.onSelect&&(I.onSelect(I,b.index),i?.(I,b.index));},selected:c,items:S.reduce((b,I,z)=>(b.push({icon:I.icon,index:z,label:I.label,tag:I.tag}),b),[])}),jsxRuntime.jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:C,transition:T?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:T?1:0},children:jsxRuntime.jsx(m,{className:"--track",style:{...h()},children:S.map((b,I)=>jsxRuntime.jsx(ga,{isActive:I===c,transitionType:u,speed:n,width:f.width,render:o||I===c,onHeightChange:z=>I===c&&x(z),content:b.body},`tab-body-${b.key||I}-${y}`))})})]})};xa.displayName="Zuz.TabView";var Eu=xa;var Ou=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[i,u]=react.useState([{type:"output",content:n}]),[l,c]=react.useState(""),d=react.useRef(null),p=react.useRef(null),{variant:f}=J(true);react.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let y=g=>{let v=typeof g=="string"?{type:"output",content:g}:g;u(h=>{let b=[...h,v];return b.length>1e3?b.slice(-1e3):b});},C=()=>u([]);react.useImperativeHandle(e,()=>({write:y,clear:C}));let x=async g=>{let[v,...h]=g.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](h):t?await t(g):`command not found: ${v}`},T=g=>{let v=/\u001b\[(\d+)m/g,h=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,z="#d4d4d4",E=false,H;for(;(H=v.exec(g))!==null;){let M=g.slice(I,H.index);M&&h.push({text:M,color:z,bold:E});let L=H[1];L==="0"?(z="#d4d4d4",E=false):L==="1"?E=true:b[L]&&(z=b[L]),I=v.lastIndex;}let k=g.slice(I);return k&&h.push({text:k,color:z,bold:E}),h},S=(g,v)=>g.includes("\x1B")?T(g).map((h,b)=>jsxRuntime.jsx(ae,{style:{color:h.color||"#d4d4d4",fontWeight:h.bold?"bold":"normal"},children:h.text},`--terminal-msg-${b}-${h.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(ae,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:g}),P=async g=>{if(g.key==="Enter"&&l.trim()){let v=l.trim(),h=[...i,{type:"command",content:`${o}${v}`}];c(""),u(h);let b=await x(v);u(I=>[...I,{type:"output",content:b}]);}};return jsxRuntime.jsxs(m,{as:`--zuz-terminal --${s||f||W.Medium} flex cols ${a.className}`,onClick:()=>p.current?.focus(),children:[jsxRuntime.jsx(m,{ref:d,className:"--terminal-log",children:i.map((g,v)=>jsxRuntime.jsx(m,{children:jsxRuntime.jsx(_,{children:S(g.content,g.type)})},v))}),jsxRuntime.jsxs(m,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(_,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(pe,{ref:p,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||f||W.Medium,onChange:g=>c(g.target.value),onKeyDown:P})]})]})},Vu=Ou;var Du=({meta:e})=>jsxRuntime.jsxs(Z,{as:"flex aic --command-item",children:[e.icon&&jsxRuntime.jsx(oe,{name:e.icon,as:"--command-icon"}),jsxRuntime.jsx(_,{children:e.label})]}),Hu=({position:e,onSelect:r,commands:t,visible:n})=>jsxRuntime.jsx(m,{"aria-hidden":!n,fx:{transition:j.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsxRuntime.jsx(Du,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),wa=Hu;var Pa=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:i,name:u,onInput:l,cmd:c,renderDropdown:d,value:p,defaultValue:f,...y}=r,C=react.useRef(null),x=react.useRef(null),{variant:T}=J(true),{style:S,className:P,rest:g}=N(y),v=De();u?v.errors?.[u]:null;let b=u&&v.values&&v.setFieldValue,I=b?v.values?.[u]:void 0,z=hooks.useDebounce(B=>{b&&v.setFieldValue?.(u,B);},500),{showDropdown:E,dropdownPosition:H,handleKeyDown:k,handleInput:M,handleCommandSelect:L}=hooks.useCommandActions({command:a,commands:i,cmd:c,ref:C}),F=react.useCallback(()=>{let B=C.current;!B||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{B.style.height="auto";let G=B.scrollHeight;if(n){let U=parseInt(n.toString(),10);isNaN(U)||(G=Math.min(G,U));}B.style.height=`${G}px`,B.style.overflowY=n&&G>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),R=B=>{z(B.currentTarget.value),l?.(B),M(B),F();};return react.useEffect(()=>{C.current&&u&&I!==void 0&&C.current.value!==String(I)&&(C.current.value=String(I));},[I,u]),react.useEffect(()=>{F();},[p,f,F]),react.useEffect(()=>{t&&C.current&&F();},[t,F]),react.useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),react.useEffect(()=>()=>{b&&v.deleteFieldValue?.(u);},[]),jsxRuntime.jsxs(m,{as:"rel",children:[jsxRuntime.jsx("textarea",{name:u,className:`--input --textarea --${o||T||W.Medium} flex ${P}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:k,onInput:R,ref:B=>{C.current=B,typeof e=="function"?e(B):e&&(e.current=B);},value:p,defaultValue:f,...g}),d?d({show:E,position:H,commands:i||[],onSelect:L}):i&&i.length>0&&jsxRuntime.jsx(wa,{visible:E,commands:i,onSelect:L,position:H})]})};Pa.displayName="Zuz.TextArea";var _u=Pa;var Ia=react.forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,i=react.useRef(null),[u,l]=react.useState(n||0);return react.useImperativeHandle(r,()=>({updateValue(c){u.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),i.current){let d=c.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((p,f)=>{let y=d[f];if(p instanceof HTMLElement){p.setAttribute("data-value",y);let C=p.querySelector(".--wheel-char-track");C instanceof HTMLElement&&(C.style.setProperty("--v",y),C.offsetWidth);}});}}})),react.useEffect(()=>{l(n||0);},[n]),jsxRuntime.jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(u||0).toString().split("").map((c,d)=>isNaN(parseInt(c,10))?jsxRuntime.jsx(ae,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${d}`):jsxRuntime.jsx(ae,{"data-value":c,className:`--wheel-char grid ${d>(u||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(ae,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsxRuntime.jsx(ae,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((p,f)=>jsxRuntime.jsx(ae,{children:p},`${d}--${f}`)),jsxRuntime.jsx(ae,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsxRuntime.jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Ia.displayName="Zuz.TextWheel";var Xu=Ia;var xr=react.forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:i,selected:u,roots:l,expanded:c,...d}=e,{tag:p,label:f,icon:y,under:C,isHead:x}=n,T=react.useMemo(()=>l.includes(p),[l]),[S,P]=react.useState(c),g=()=>{localStorage.setItem(`--tn${i}-${p}`,S?"0":"1"),P(!S);};react.useEffect(()=>{c||T&&!localStorage.getItem(`--tn${i}-${p}`)?(localStorage.setItem(`--tn${i}-${p}`,"1"),P(true)):P(localStorage.getItem(`--tn${i}-${p}`)=="1");},[]);let v=react.useMemo(()=>o.filter(h=>h.under==p),[o,p]);return jsxRuntime.jsxs(m,{className:`--treenode ${T?"--is-root":""} --treenode-${p} flex cols`,children:[jsxRuntime.jsxs(m,{className:`--node --node-${p} flex aic ${u==p?" --selected":""}`,children:[jsxRuntime.jsx(Z,{skeleton:d.skeleton,onClick:g,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(oe,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):v.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(Z,{className:"--node-meta flex aic",onClick:h=>a(p),children:[(s?.nodeOpen&&s?.nodeClose||T&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(oe,{skeleton:d.skeleton,className:`--node-icon ${T?"--icon-root":""}`,name:y||(S?T&&s?.rootOpen||s.nodeOpen:T&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(_,{className:`--node-label ${T?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:f})]})]}),S&&v.length>0&&jsxRuntime.jsx(m,{className:`--sub-node tree-sub-node-${p} flex cols`,children:v.map(h=>jsxRuntime.jsx(xr,{treeTag:i,selected:u,onSelect:a,icons:s,roots:l,expanded:h.expanded||false,meta:h,nodes:o},`--node-${h.tag}`))})]})});xr.displayName="TreeItem";var Ba=xr;var ka=react.forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:i,selected:u,...l}=e,[c,d]=react.useState(u);react.useImperativeHandle(r,()=>({getSelected:()=>c}),[o]);let p=f=>{d(f),o&&o(f);};return react.useEffect(()=>{c!=u&&d(u);},[u]),jsxRuntime.jsx(m,{className:"--treeview flex cols",children:n.filter(f=>i.includes(f.tag)).map(f=>jsxRuntime.jsx(Ba,{treeTag:s?`-${s}`:"",selected:c,onSelect:y=>p(y),icons:a,meta:f,roots:i,expanded:f.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${f.tag}`))})});ka.displayName="Zuz.TreeView";var rf=ka;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
- Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunk7G4O77ED_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunk7G4O77ED_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunk7G4O77ED_cjs.h}});exports.ALERT=Pe;exports.AVATAR=Cr;exports.Accordion=xl;exports.ActionBar=Tl;exports.Alert=Il;exports.AutoComplete=Ql;exports.Avatar=ac;exports.Badge=lc;exports.Box=m;exports.Bubble=Zc;exports.BubbleMediaType=Xn;exports.BubbleStatus=qn;exports.Button=Z;exports.CHART=Kn;exports.CHECKBOX=Oe;exports.COLORTHEME=lf;exports.Calendar=Zo;exports.Carousel=Mc;exports.Chart=zc;exports.CheckBox=Ct;exports.CodeBlock=tm;exports.ColorScheme=ym;exports.ContextMenu=So;exports.CookiesConsent=Sm;exports.Cover=Ee;exports.CropShape=Vm;exports.Cropper=Mm;exports.Crumb=Hm;exports.DATATYPE=pf;exports.DIALOG=et;exports.DIALOG_ACTION_POSITION=Tr;exports.DRAWER_SIDE=ve;exports.DatePicker=Fm;exports.Dialog=Po;exports.Drawer=Bo;exports.FILTER=kt;exports.FORMVALIDATION=Ke;exports.FORMVALIDATION_STYLE=uf;exports.Fab=Wm;exports.Filters=qm;exports.Flex=ze;exports.Form=cp;exports.Grid=up;exports.Group=wo;exports.Icon=oe;exports.Image=Ye;exports.Input=pe;exports.KeyboardKeys=ir;exports.KeysLabelMap=Ls;exports.KeysMap=ks;exports.Label=wt;exports.LayersProvider=xo;exports.List=Xe;exports.MediaPlayer=Cp;exports.NetworkStatus=Ip;exports.ORIGIN=ut;exports.OriginType=cf;exports.Overlay=We;exports.POSITION=pt;exports.PROGRESS=df;exports.Pagination=St;exports.PaginationStyle=Ut;exports.Password=Op;exports.PinInput=Ap;exports.Position=de;exports.ProgressBar=Ue;exports.RADIO=mo;exports.Radio=_p;exports.SHEET=Re;exports.SHEET_ACTION_POSITION=lo;exports.SKELETON=af;exports.SLIDER=co;exports.SORT=mf;exports.SPINNER=he;exports.ScrollView=Ro;exports.Search=lr;exports.Select=ou;exports.SelectTabs=Tt;exports.Sheet=ep;exports.Slider=ot;exports.SnackPosition=Ft;exports.SnackStyle=an;exports.SnackType=zt;exports.Span=ae;exports.Spinner=Se;exports.Status=ff;exports.Switch=ru;exports.TRANSITIONS=j;exports.TRANSITION_CURVES=te;exports.TabView=Eu;exports.Table=yu;exports.TableOfContents=vu;exports.Terminal=Vu;exports.Text=_;exports.TextWheel=Xu;exports.Textarea=_u;exports.ThemeProvider=za;exports.ToastDefaultTitle=ln;exports.ToastPosition=Ft;exports.ToastProvider=ko;exports.ToastStyle=an;exports.ToastType=zt;exports.ToolTip=jo;exports.TreeView=rf;exports.Variant=W;exports.animationTransition=ft;exports.buildClassString=po;exports.buildWithStyles=Ir;exports.css=Mf;exports.getAnimationCurve=uo;exports.getAnimationTransition=Of;exports.getZuzMap=Ma;exports.isKeyCombination=Es;exports.setZuzMap=Rr;exports.useBase=N;exports.useContextMenu=qi;exports.useDialog=ji;exports.useDrawer=el;exports.useFx=ge;exports.useMorph=rl;exports.usePosition=xt;exports.useSnack=ml;exports.useToast=Lo;
13
+ </div>`}).join("")},[t,y]);return jsxRuntime.jsxs(m,{as:`--code-block rel ${d}`,style:p,...c,children:[jsxRuntime.jsx("pre",{ref:e,children:jsxRuntime.jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:C}})}),n&&jsxRuntime.jsx(Z,{as:"--copy-code abs",onClick:()=>{core.copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},tm=em;var ts=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=react.useRef(null),{index:s,icon:a,label:i}=r,[f,c]=react.useState({x:0,width:0}),l=hooks.useDelayed();return react.useLayoutEffect(()=>{if(l&&o.current){let{width:d,x:p}=o.current.getBoundingClientRect();c({x:p,width:d}),t&&e(s,d,p,r,true);}},[l,o.current]),react.useEffect(()=>{t&&e(s,f.width,f.x,r,false);},[t]),jsxRuntime.jsxs(Z,{disabled:n,onClick:()=>e(s,f.width,f.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(oe,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(m,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsxRuntime.jsx(m,{className:"--segment-label",children:i||`Item ${s}`})]})};ts.displayName="SelectTabItem";var os=ts;var ns=react.forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:i,...f}=e,[c,l]=react.useState(o||0),d=hooks.useDelayed(50),p=react.useRef(c),{className:u,style:y,rest:C}=N(f),x=react.useRef(null),T=react.useRef(null),{variant:S}=Q(true),P=(g,v,h,b,I)=>{if((I||c!=g&&c!=-2)&&(l(g),p.current=c,queueMicrotask(()=>{d&&i?.(b);})),x.current){let z=T.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${z?h-z.left:h}px`);}};return react.useImperativeHandle(r,()=>({setSelected:g=>{typeof g=="number"&&g!=c&&l(g);}}),[c]),jsxRuntime.jsxs(m,{ref:T,"data-selected":c,className:`${u} --segmented --${s||S||W.Medium} flex aic rel`,style:y,...C,children:[jsxRuntime.jsx(m,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((g,v)=>jsxRuntime.jsx(os,{disabled:a,onSelect:P,selected:c==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});ns.displayName="Zuz.SelectTabs";var Tt=ns;var is=react.forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=hooks.useDelayed(),{colorScheme:a,setColorScheme:i}=yo(),f=react.useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:c}=Q(true),{className:l,style:d}=N(o),p=react.useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),u=react.useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||u==-1?null:t=="system"||t=="switch"?jsxRuntime.jsx(Tt,{className:`--color-scheme --${t}`,onSwitch:({tag:y})=>{i(y);},selected:u,items:p,...o}):jsxRuntime.jsx(Z,{onClick:f,style:d,variant:n,as:`--color-scheme-switch ${l}`.trim(),children:a=="system"?O.colorSchemeSystem:a=="light"?O.colorSchemeLight:O.colorSchemeDark})});is.displayName="Zuz.ColorScheme";var ym=is;var cs=react.forwardRef((e,r)=>{let[t,n]=react.useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:i,position:f}=e,c=async l=>{n(l==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(l));};return react.useEffect(()=>{let l=localStorage.getItem("--ccnt");n(l?l=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:te.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||de.Left} flex cols`,children:[jsxRuntime.jsx(_,{as:"--title",children:o||"This site uses cookies"}),jsxRuntime.jsx(_,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(m,{as:"--footer flex aic",children:[jsxRuntime.jsx(Z,{onClick:l=>c(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx(Z,{onClick:l=>c(0),as:"--reject",children:i||"Cancel"})]})]})});cs.displayName="Zuz.CookiesConsent";var Sm=cs;var us=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:f,...c}=r,{style:l,className:d,rest:p}=N(c),u=n||de.Top;react.useRef(null);let [C,x]=react.useState(false);react.useRef(6);let S=i===true||C,g=`--anchor-${react.useId().replace(/:/g,"")}`,{tooltip:v}=Q(true),h=react.useMemo(()=>{let I=false;return react$1.addPropsToChildren(a,z=>{let E=z.props.className?.includes(s);return E&&(I=true),E||!I},(z,E)=>{let H=E.props.className?.includes(s),k=z===0,M={};return (H||k)&&(M.style={...E.props.style,anchorName:g}),k&&(M.onMouseEnter=L=>{x(true),E.props.onMouseEnter?.(L);},M.onMouseLeave=L=>{x(false),E.props.onMouseLeave?.(L);}),M})},[a,s,g]),b=ge({transition:u==de.Top?j.SlideInTop:u==de.Bottom?j.SlideInBottom:u==de.Left?j.SlideInLeft:j.SlideInRight,when:S,duration:.2,offset:o+6,margin:u==de.Top||u==de.Left?-o:o,curve:v?.curve||te.EaseInOut});return react.useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h,jsxRuntime.jsx(m,{style:{positionAnchor:g,...b.style,...u===de.Top||u===de.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${f||v?.variant||W.Small} --${u} abs ${d}`.trim(),children:typeof t=="string"?jsxRuntime.jsx(_,{as:"--text rel",children:t}):t})]})};us.displayName="Zuz.ToolTip";var jo=us;var fs=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:i,showGhostBar:f,showKnobOnHover:c,showToolTip:l,roundValue:d,formatValue:p,...u}=r,{className:y,style:C,rest:x}=N(u),T=react.useRef(a||.01).current,S=react.useRef(o||0).current,P=react.useRef(s||1).current,g=react.useRef(n||0).current,v=react.useRef(null),h=react.useRef(null),b=react.useRef(null),I=react.useRef(null);react.useRef(null);let E=react.useRef(null),H=react.useRef(null),k=react.useRef(null),M=react.useRef(null),L=(re,ne,ue)=>(re-ne)/(ue-ne)*100,F=re=>{if(h.current){let ne=parseFloat(re.currentTarget.value);J(ne);let ue=L(ne,parseFloat(re.currentTarget.min),parseFloat(re.currentTarget.max));h.current.style.setProperty("--value",`${ue}`),h.current.setAttribute("data-value",`${ne}`),i&&i(d?+ne.toFixed(2):ne);}},[R,B]=react.useState(false),[G,U]=react.useState(0),[D,A]=react.useState(0),[q,K]=react.useState(false),J=async re=>{let ne=p?p(+re):d?(+re).toFixed(2):Math.round(+re);k.current&&(k.current.textContent=String(ne));},ie=re=>{if(R){let ne=re.clientX-G,ue=P-S,$=ne/200*ue,X=Math.max(S,Math.min(D+$,P));if(X=Math.round(X/T)*T,J(X),h.current){let ce=L(X,S,P);h.current.style.setProperty("--value",`${ce}`),h.current.setAttribute("data-value",`${X}`),H.current&&(H.current.textContent=d?X.toFixed(2):X.toString()),i&&i(X);}}},me=()=>{B(false),document.body.style.cursor="auto";},ye=re=>(re-S)/(P-S)*100,se=re=>{if(!h.current)return;let ne=h.current.getBoundingClientRect(),ue=re.clientX-ne.left,Be=Math.max(0,Math.min(100,ue/ne.width*100));if(l&&k.current){let $=v.current?+v.current.value:n;J($*100);}if(f){let $=ye(v.current?+v.current.value:n),X=Math.min($,Be),ce=Math.abs(Be-$);h.current.style.setProperty("--ghost-start",`${X}`),h.current.style.setProperty("--ghost-width",`${ce}`);}};react.useEffect(()=>{h.current&&h.current.style.setProperty("--value",v.current?`${L(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:g.toString());},[]),react.useEffect(()=>(R?(document.addEventListener("mousemove",ie),document.addEventListener("mouseup",me)):(document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",me)),()=>{document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",me);}),[R]),react.useEffect(()=>{let re=L(n,S,P);h.current?.style.setProperty("--value",`${re}`),J(n);},[n,S,P,k.current]);let Y=()=>jsxRuntime.jsxs(m,{ref:h,onMouseEnter:()=>K(true),onMouseLeave:()=>K(false),onMouseMove:se,className:`--slider --${t||co.Default} ${c?"--knob-hover":""} flex rel ${y}`.trim(),style:{...C},children:[jsxRuntime.jsx(m,{ref:E,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:b,className:"--slider-knob --tooltip-knob abs"}),jsxRuntime.jsx(pe,{ref:v,onInput:F,className:"abs fill",tabIndex:0,type:t||co.Default,defaultValue:g||0,step:T,max:P,min:S})]});if(l===true){let re=p?p(n):d?n.toFixed(2):n;return jsxRuntime.jsx(jo,{ref:M,show:R,position:pt.Top,margin:15,anchorName:"--tooltip-knob",title:jsxRuntime.jsx(ae,{ref:k,children:re}),children:Y()})}return Y()};fs.displayName="Zuz.Slider";var ot=fs;var gs=react.forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:i,rest:f}=N(s),{canvasRef:c,crop:l,setScale:d,handleMouseDown:p,handleMouseUp:u,handleMouseMove:y}=hooks.useImageCropper(t,o||200,n||hooks.CropShape.Circle);return react.useImperativeHandle(r,()=>({getCropped(){return l()},setScale(C){d(C);}})),jsxRuntime.jsxs(m,{as:`--cropper --${n||hooks.CropShape.Circle} ${i}`,style:a,...f,children:[jsxRuntime.jsx("canvas",{ref:c,width:o||200,height:o||200,onMouseDown:p,onMouseUp:u,onMouseLeave:u,onMouseMove:y}),jsxRuntime.jsx(m,{as:"--cropper-slider",children:jsxRuntime.jsx(ot,{onChange:C=>d(C),min:0,max:1,step:.01,value:1})})]})});gs.displayName="Zuz.Cropper";var Mm=gs;var Vm=(t=>(t.Circle="circle",t.Square="square",t))(Vm||{});var ys=react.forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=react.useMemo(()=>{let i=typeof t=="string",f=i?[]:t;return i&&t.split(",").forEach(c=>{f.push({label:c});}),f},[t]),a=react.useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsxRuntime.jsx(Xe,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(m,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:a.map((i,f,c)=>i.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(Z,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!c[f+1],children:[i.icon&&jsxRuntime.jsx(oe,{as:"--crumb-icon",name:i.icon}),jsxRuntime.jsx(_,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});ys.displayName="Zuz.Crumb";var Hm=ys;var vs=react.forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:i,type:f,onConfirm:c,...l}=e,[d,p]=react.useState(false),[u,y]=react.useState(n||null),{style:C,className:x,rest:T}=N(l),S=react.useRef(null),P=react.useRef(null),{reposition:g}=xt(P,{direction:de.Bottom,offset:2}),v=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let b=I=>{let z=I.target,E=S.current?.contains(z),H=P.current?.contains(z);!E&&!H&&p(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),react.useEffect(()=>{let b=I=>{I.key==="Escape"&&d&&(p(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let h=()=>{p(true);};return react.useEffect(()=>{d&&g();},[d,g]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(m,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":u?u.toISOString():"",children:[t?typeof t=="string"?jsxRuntime.jsx(oe,{as:"mr:10 c:#666",name:t}):t:jsxRuntime.jsx(ae,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:u?dateFns.format(u,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:C,onFocus:h,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&c?.(b.currentTarget.value);},...T}),jsxRuntime.jsx(m,{"aria-hidden":!d,ref:P,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(Zo,{defaultValue:u,onChange:b=>{y(b),p(false);}})})]})})});vs.displayName="Zuz.DatePicker";var Fm=vs;var Ss=react.forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsxRuntime.jsx(Z,{className:`--fab fixed --${n||W.Large} --${o||"bottomright"}`,children:t||O.plus})});Ss.displayName="Zuz.Fab";var Wm=Ss;var ws=e=>{let{names:r,strength:t}=e,n={[kt.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-${kt.Gooey}`)};return react.useEffect(()=>{},[r]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(r||[kt.Gooey]).map(o=>n[o](t))})})};ws.displayName="Zuz.Filters";var qm=ws;var Cs=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:i,className:f="",style:c,...l})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",f].filter(Boolean).join(" "),p={...c,gap:typeof r=="number"?`${r}px`:r};return jsxRuntime.jsx(m,{...l,className:d,style:p})};Cs.displayName="Zuz.FlexBox";var ze=Cs;var Fe=null,Te=null,Ps=react.forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:i,actionPosition:f,spinner:c,loadingMessage:l,onShow:d,onHide:p,...u}=e,{className:y,style:C,rest:x}=N(u),[T,S]=react.useState(t||""),[P,g]=react.useState(n||""),[v,h]=react.useState(null),[b,I]=react.useState(i||Re.Default),z=react.useMemo(()=>core.uuid(12),[]),[E,H]=react.useState(false),k=react.useRef(null),M=react.useRef(null),[L,F]=react.useState(false),[R,B]=react.useState(true),G=react.useRef(null),U=P;react.useImperativeHandle(r,()=>({setLoading(A){F(A);},showDialog(A,q,K,J){Fe&&(clearTimeout(Fe),Te&&clearTimeout(Te),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),Te=null;},500)),I(Re.Dialog),q&&g(q),A&&S(A),K&&h(K.reduce((ee,ie)=>(ee.push({...ie,key:ie.key||core.uuid(12)}),ee),[])),H(true),setTimeout(()=>J?J():()=>{},1e3);},dialog(A,q,K,J){Fe&&(clearTimeout(Fe),Te&&clearTimeout(Te),k.current.classList.remove("--wobble"),setTimeout(()=>k.current.classList.add("--wobble"),50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),Te=null;},500)),I(Re.Dialog),g(q),S(A),K&&h(K.reduce((ee,ie)=>(ee.push({...ie,key:ie.key||core.uuid(12)}),ee),[])),H(true),setTimeout(()=>J?J():()=>{},1e3);},error(A,q){this.show(A,q,Re.Error);},warn(A,q){this.show(A,q,Re.Warn);},success(A,q){this.show(A,q,Re.Success);},show(A,q,K){Fe&&(clearTimeout(Fe),Te&&clearTimeout(Te),M.current=k.current.style.transform,k.current.style.transform="",k.current.classList.remove("--wobble"),setTimeout(()=>{k.current.classList.add("--wobble"),k.current.style.transform=`${M.current} scale(.9)`.trim();},50),Te=setTimeout(()=>{k.current.classList.remove("--wobble"),k.current.style.transform=M.current||"",Te=null;},500)),Fe=setTimeout(()=>{H(false),Fe=null,Te=null;},(q||4)*1e3),I(K||Re.Default),g(A),H(true),d?.();},hide(){H(false),p?.();}}));let D=react.useMemo(()=>{let A={when:E,duration:a||.3,delay:.1};if(b==Re.Dialog){if(o){let{from:q,to:K}=ft(o,20);return {from:q,to:K,curve:s||te.EaseInOut,...A}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:te.Spring,...A}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:te.Spring,...A}},[E,b]);return react.useEffect(()=>{G.current&&clearTimeout(G.current),E?B(true):G.current=setTimeout(()=>B(false),1e3);},[E]),b==Re.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(We,{when:E}),jsxRuntime.jsxs(m,{className:`--sheet --sheet-${b.toLowerCase()} ${E?"is-visible":""} ${y} fixed`.trim(),style:C,fx:D,...x,ref:k,children:[jsxRuntime.jsx(Ee,{when:L,spinner:c,message:l}),jsxRuntime.jsxs(m,{className:"--head flex aic rel",children:[jsxRuntime.jsx(m,{className:`--${T?"title":"dot"} flex aic rel`,children:T||""}),jsxRuntime.jsx(Z,{onClick:A=>H(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(m,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:R?U:null}),v&&jsxRuntime.jsx(m,{className:`--footer flex aic rel ${f?f==lo.Center?"jcc":"":"jce"}`.trim(),children:v.map((A,q)=>jsxRuntime.jsx(Z,{onClick:K=>A.handler?A.handler():A.onClick?A.onClick():console.log("onClick Handler missing"),className:"--action",children:A.label},`sheet-${z}-action-${A.key}`))})]})]}):jsxRuntime.jsx(m,{className:`--sheet --sheet-${b.toLowerCase()} ${y} abs`.trim(),style:C,...x,fx:D,ref:k,children:E?P:null})}),Rs=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Ps.displayName="Zuz.Sheet";var ep=Ps;var lp=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let i=!isNaN(Number(n[a+1]));o[s]=o[s]||(i?[]:{});}return o[s]},r);}return r},Is=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:i,children:f,withData:c,beforeSubmit:l,onSubmit:d,onError:p,onSuccess:u,resetOnSuccess:y,...C}=r,{className:x,style:T,rest:S}=N(C),[P,g]=react.useState(false),v=react.useRef(null),h=Lo(),b=$o();Ao();let z=react.useRef(null),E=react.useCallback(D=>v.current?v.current.querySelectorAll(D):[],[v.current]),H=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")}),k=D=>{let A=[];return D.querySelectorAll(".--input").forEach(q=>{A.push(q.value);}),A.join("")},M=D=>D.classList.contains("--otp")?k(D):D.classList.contains("--select")?D.querySelector("button.--selected")?.dataset.value:D.classList.contains("--checkbox")||D.getAttribute("type")==="checkbox"?D.checked:D.value,L=react.useCallback(D=>{let{name:A,required:q,with:K}=H(D),J=M(D);if(t&&t[A]&&b?.getSnapshot()){let ee=t[A](J,b.getSnapshot().values);if(ee===false||typeof ee=="string")return typeof ee=="string"&&b?.setFieldError(A,ee),false}if(q&&(D.type==="checkbox"&&!D.checked||D.classList.contains("--select")&&(J==="-1"||!J)||!J||J===""))return false;if(K)switch((K.includes("@")?K.split("@")[0]=="match"?Ke.MatchField:K.split("@")[0]:K).toUpperCase()){case Ke.IPV4:return core._(J).isIPv4();case Ke.IPV6:return core._(J).isIPv6();case Ke.Email:return core._(J).isEmail();case Ke.Uri:try{return new URL(J),!0}catch{return false}case Ke.MatchField:let[ie,me,ye]=K.split("@"),se=document.querySelector(`[name=${me.trim()}]`);if(!se)return false;switch(ye||"direct-match"){case "if-not-empty":if(se&&!core._(se.value).isEmpty()&&se.value!=D.value)return false;break;case "direct-match":if(se&&se.classList.contains("--otp")&&D.classList.contains("--otp")&&k(se)!=k(D))return false;if(se&&se.value!=D.value)return false;break}break}return true},[t,b]),F=react.useCallback(()=>{let D={},A={...b?.getSnapshot().values||{}},q=null,K=null;if(E("[name]").forEach(ee=>{let{name:ie,required:me,with:ye}=H(ee),se=me||ye?L(ee):true,le=M(ee);D[ie]={valid:se,value:le},A[ie]=le,b?.setFieldError(ie,se?null:a?.[ie]||"Invalid"),se?ee.classList.remove("--with-error"):(ee.classList.add("--with-error"),q||(q=ee),K=a?.[ie]);}),q){let ee=q;if(ee.classList.contains("--otp"))for(let ie of Array.from(ee.querySelectorAll(".--input"))){let me=ie;if(me.value==""){me.focus();break}}else ee.focus();}let J=lp(A);return {error:q!=null,errorMsg:K||"Fix errors to continue...",data:D,payload:J}},[v.current,b]),R=react.useCallback((D={})=>{let{error:A,errorMsg:q,payload:K,data:J}=F();if(A){h.error(q);return}i?react.startTransition(async()=>{g(true),core.withPost(i,{...c,...K,...D}).then(ee=>{g(false),y&&b?.reset(),u?.(ee,{...c,...K,...D}),u||h.success(ee.message||"Redirecting...");}).catch(ee=>{g(false),p?p(ee):h.error(ee.message);});}):d?.(K,J);},[F,i,c,u,p,y,d]),B=react.useCallback(()=>{let D=E("[type=submit]");!D||D.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):D.forEach(A=>{A.addEventListener("click",R);});},[v.current]),G=react.useMemo(()=>react$1.addPropsToChildren(f,D=>D.props.type=="submit",D=>({ref:z})),[f]),U=react.useRef(R);return react.useImperativeHandle(e,()=>({setLoading:D=>g(D),submit:D=>U.current(D),init:B,hideError:()=>h.clearAll()}),[R,B]),react.useEffect(B,[]),react.useEffect(()=>{U.current=R;},[R]),react.useEffect(()=>{let D=E("[type=submit]"),A=Array.from(D).map(q=>{let K=q;return K.addEventListener("click",R),()=>K.removeEventListener("click",R)});return ()=>A.forEach(q=>q())},[R,E]),jsxRuntime.jsxs(m,{ref:v,style:T,className:`--form flex rel ${x}`,children:[!Rs(o)&&jsxRuntime.jsx(Ee,{when:P,spinner:s,...o}),G]})};Is.displayName="Zuz.FormInternal";var Ns=e=>jsxRuntime.jsx(Rn,{initialValues:e.withData,children:jsxRuntime.jsx(Is,{...e})});Ns.displayName="Zuz.Form";var cp=Ns;var Bs=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:i,justify:f,inline:c,flow:l,autoCols:d,autoRows:p,template:u,...y}=e;react.useRef(null);let {className:x,style:T,rest:S}=N(y),P=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,g={display:c?"inline-grid":"grid",gridTemplateColumns:P(t),gridTemplateRows:P(n),gap:o,columnGap:s,rowGap:a,alignItems:i,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:l,gridAutoColumns:d,gridAutoRows:p,gridTemplateAreas:u,...T};return jsxRuntime.jsx(m,{ref:r,as:`--grid ${x}`.trim(),style:g,...S})};Bs.displayName="Zuz.Grid";var up=Bs;var Es=e=>typeof e=="string"&&e.includes("+"),ks={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"},Ls={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var Os=react.forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=Q(true),i=react.useMemo(()=>{if(Es(r)){let f=null;return {keys:String(r).split("+").reduce((l,d,p,u)=>(u[p+1]?l.push(d):f=d.toUpperCase(),l),[]),children:f}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxRuntime.jsxs(m,{as:`--keyboard-keys --${o||a||W.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(f=>jsxRuntime.jsx("abbr",{title:Ls[f],children:ks[f]},f)),jsxRuntime.jsx(ae,{children:i?.children??e})]})});Os.displayName="Zuz.KeyboardKeys";var ir=Os;var Hs=react.createContext(null),st=()=>{let e=react.useContext(Hs);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},vp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:f,onTrackChange:c,...l}=n,{className:d,style:p,rest:u}=N(l),y=hooks.useMediaPlayer(o,o[0]??void 0),C=react.useMemo(()=>({play:O.play,pause:O.pause,prev:O.prev,next:O.next,volumeHigh:O.volumeHigh,volumeMute:O.volumeMute,...r}),[r]),x=react.useMemo(()=>({...y,mode:s,icons:C}),[y,C]);return jsxRuntime.jsx(Hs.Provider,{value:x,children:jsxRuntime.jsx(m,{className:`--zuz-media-player ${d}`,style:p,children:t})})},As=vp;var $s=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},Qt=e=>typeof e=="string"?jsxRuntime.jsx(oe,{name:e}):e,zs=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=st();return jsxRuntime.jsxs(m,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsxRuntime.jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsxRuntime.jsx("audio",{ref:e}),r.isLoading&&jsxRuntime.jsx(m,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(Se,{})})]})},Fs=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=st();return jsxRuntime.jsxs(m,{as:"--track-info flex aic",children:[jsxRuntime.jsx(Ye,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxRuntime.jsxs(m,{as:"flex cols",children:[jsxRuntime.jsx(m,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsxRuntime.jsx(m,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},_s=()=>{let{state:e,controls:r,icons:t}=st();return jsxRuntime.jsxs(m,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx(Z,{onClick:r.prev,as:"--prev",children:Qt(t?.prev??O.prev)}),jsxRuntime.jsx(Z,{onClick:r.togglePlay,as:"--play-pause",children:Qt(e.isPlaying?t?.pause??O.pause:t?.play??O.play)}),jsxRuntime.jsx(Z,{onClick:r.next,as:"--next",children:Qt(t?.next??O.next)})]})},Zs=()=>{let{state:e,controls:r,mediaRef:t}=st(),n=e.progress*(e.duration||0);return jsxRuntime.jsxs(m,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(m,{as:"--track-current-duration",children:$s(n)}),jsxRuntime.jsx(ot,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsxRuntime.jsx(m,{as:"--track-total-duration",children:$s(e.duration)})]})},Ks=()=>{let{state:e,controls:r,icons:t}=st();return jsxRuntime.jsxs(m,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx(Z,{onClick:()=>r.setIsMuted(),children:Qt(e.isMuted?t?.volumeMute??O.volumeMute:t?.volumeHigh??O.volumeHigh)}),jsxRuntime.jsx(ot,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Sp=({ref:e,...r})=>jsxRuntime.jsx(As,{...r,ref:e}),wp=Object.assign(Sp,{Stage:zs,TrackInfo:Fs,Controls:_s,Progress:Zs,Volume:Ks}),Cp=wp;var Gs=react.forwardRef((e,r)=>{let t=hooks.useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxRuntime.jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:te.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||W.Small} fixed flex`,children:[jsxRuntime.jsx(m,{className:"--ico",children:t?O[Pe.Success]:O[Pe.Error]}),jsxRuntime.jsx(_,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});Gs.displayName="Zuz.NetWorkManager";var Ip=Gs;var qs=react.forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:i}=N(o),[f,c]=react.useState(false),[l,d]=react.useState(""),p=react.useMemo(()=>core.checkPasswordStrength(l),[l]),u=hooks.useDebounce(y=>{t&&d(y.target.value),n&&n(y);},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(pe,{ref:r,type:f?"text":"password",className:a,onChange:u,...i}),jsxRuntime.jsx(Z,{tabIndex:-1,onClick:()=>c(y=>!y),className:"--toggle flex aic jcc abs",children:f?O.eye:O.eyeSlash})]}),t&&jsxRuntime.jsxs(m,{as:`flex aic --password-meter --pb-score-${p.score}`,style:s,children:[jsxRuntime.jsxs(m,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(m,{as:`--pbar ${p.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${p.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(_,{as:"--password-meter-label","aria-hidden":true,children:p.result})]})]})});qs.displayName="Zuz.Password";var Op=qs;var Ys=react.forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=react.useRef([]),i="pinput",f=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:l}=N(s),d=u=>{let y=u.currentTarget,C=a.current[parseInt(y.dataset.index)+1],x=a.current[parseInt(y.dataset.index)-1];y.value.length===1&&C?C.focus():y.value.length===0&&x&&x.focus();},{variant:p}=Q(true);return react.useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsxRuntime.jsx(m,{name:i,style:l,className:`--otp --${s.variant??p??W.Medium} flex aic rel`,"data-required":f,"data-size":t||n||4,...c,children:Array(t||n||4).fill(1).map((u,y)=>jsxRuntime.jsx(pe,{autoComplete:"new-password","data-index":y,ref:C=>{a.current[y]=C;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${y}`))})});Ys.displayName="Zuz.PinInput";var Ap=Ys;var js=react.forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:i,variant:f,checked:c,onSwitch:l,...d}=e,[p,u]=react.useState(c||false),{variant:y}=Q(true),C=react.useRef(null);return jsxRuntime.jsxs(wt,{className:`${n} --${(a||mo.Default).toLowerCase()} --radio${!a||a==mo.Default?"":"card"} --${f||y||W.Small} flex aic rel`.trim(),...d,children:[jsxRuntime.jsx(pe,{ref:C,defaultChecked:p,value:i||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{l&&l(x.target.checked,i||"cb"),u(x.target.checked);}}),jsxRuntime.jsx(m,{className:"--dot rel",children:jsxRuntime.jsx(m,{className:"--rod abs abc"})}),jsxRuntime.jsx(m,{className:"--value",children:t})]})});js.displayName="Zuz.Radio";var _p=js;var Qs=react.forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=O.search,hideSearchIcon:i=false,clearIcon:f=O.close,hideClearIcon:c=false,onChange:l,onClear:d,...p}=e,{style:u,className:y}=N({as:e.as}),[C,x]=react.useState(""),{variant:T}=Q(true),S=react.useRef(null);"type"in e&&delete e.type;let P=v=>{x(v.target.value),l?.(v.target.value);},g=v=>{C.trim()!==""&&(x(""),l?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return react.useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{style:u,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||T||W.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[jsxRuntime.jsx(pe,{ref:S,onChange:P,...p}),e.shortcut&&jsxRuntime.jsx(ir,{keys:e.shortcut,as:"abs"}),jsxRuntime.jsx(Z,{tabIndex:-1,onClick:v=>g(),className:"--send flex aic jcc",variant:e.variant||W.Medium,children:C!==""?!c&&(typeof f=="string"?jsxRuntime.jsx(oe,{name:f,as:"--search-action"}):f):!i&&(typeof a=="string"?jsxRuntime.jsx(oe,{name:a,as:"--search-action"}):a)})]})});Qs.displayName="Zuz.Search";var lr=Qs;var Yp=({label:e,icon:r})=>jsxRuntime.jsxs(m,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsxRuntime.jsx(oe,{name:r}),jsxRuntime.jsx(_,{as:"--select-group-label",children:e})]}),ea=Yp;var oa=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsxRuntime.jsx(oe,{name:"checkIcon"}):e:O.check,s=n.disabled===true;return jsxRuntime.jsxs(Z,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxRuntime.jsxs(ze,{as:"--option-item-meta --aic",children:[n.icon&&jsxRuntime.jsx(oe,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsxRuntime.jsx(_,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsxRuntime.jsx(ze,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};oa.displayName="Option";var ra=oa;var na=({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:i,searchPlaceholder:f,maxHeight:c,arrowDownIcon:l=O.arrowDown,arrowUpIcon:d=O.arrowUp,expanded:p,multiple:u,tokenizer:y,wrapTokens:C,disabled:x,checkIcon:T,closeIcon:S,onChange:P,required:g,with:v,...h}=r,b=De(),I=s&&b.values&&b.setFieldValue,z=I?b.errors?.[s]:null,E=I?b.values?.[s]:void 0,H=$=>!$&&$!==0?null:u||y?(Array.isArray($)?$:[$]).map(ce=>typeof ce=="string"||typeof ce=="number"?n.find(xe=>String(xe.value)===String(ce)):ce).filter(Boolean):typeof $=="string"||typeof $=="number"?n.find(X=>String(X.value)===String($)):$,[k,M]=react.useState(()=>t?H(t):n.find(X=>String(X.value)==="-1")||null),L=react.useMemo(()=>E?H(E):k,[E,k]),[F,R]=react.useState(false),[B,G]=react.useState(null),U=react.useRef(null),D=react.useRef(null),A=react.useRef(null),q=react.useId(),K=react.useMemo(()=>s||q,[]),{reposition:J}=xt(A,{direction:pt.Bottom,offset:2}),{variant:ee}=Q(true),ie=S?typeof S=="string"?jsxRuntime.jsx(oe,{name:S}):S:O.close,{className:me,style:ye,rest:se}=N(h,void 0),le=$=>Array.isArray(L)?L.some(X=>X.value===$.value):L?.value===$.value,Y=$=>{if(!(x||$.disabled))if(u||y){let X=Array.isArray(L)?L:[],xe=X.find(ao=>ao.value===$.value)?X.filter(ao=>ao.value!==$.value):[...X,$];M(xe),P?.(xe);}else M($),R(false),P?.($);},re=($,X)=>{if($.stopPropagation(),x)return;let ce=L.filter(xe=>xe.value!==X.value);I?b.setFieldValue?.(s,ce.map(xe=>xe.value)):M(ce),R(false),P?.(ce);},ne=$=>{let X=$.currentTarget,ce=X.scrollTop===0&&$.deltaY<0,xe=X.scrollHeight-X.scrollTop===X.clientHeight&&$.deltaY>0;!ce&&!xe||$.preventDefault(),$.stopPropagation();};react.useImperativeHandle(e,()=>({setSelected:$=>{let X=H($);if(I){let ce=Array.isArray(X)?X.map(xe=>xe.value):X?.value;b.setFieldValue?.(s,ce);}else M(X);},getValue:()=>L||null}),[L,n]),react.useEffect(()=>{if(!F)return;let $=()=>{J();};return window.addEventListener("scroll",$,true),window.addEventListener("resize",J),()=>{window.removeEventListener("scroll",J,true),window.removeEventListener("resize",J);}},[F,J]),react.useEffect(()=>{if(!F){D.current&&(D.current.value=""),G(null);return}D.current?.focus(),J();let $=ce=>{A.current&&!A.current.contains(ce.target)&&R(false);},X=setTimeout(()=>{document.addEventListener("click",$);},0);return ()=>{clearTimeout(X),document.removeEventListener("click",$);}},[F,J]),react.useEffect(()=>()=>{I&&b.deleteFieldValue?.(s);},[]);let ue=hooks.useDebounce($=>G($==""?null:$),300),Be=react.useMemo(()=>{if(L)return core._(L).isArray()?L.length>0?L[0]:void 0:L},[L]);return console.log(z),jsxRuntime.jsxs(m,{"data-required":g?"true":void 0,with:v,className:[`--select ${p==true?"--expanded":""}`,`--${a||ee}`,`${s?`--${s}`:""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:K,children:[jsxRuntime.jsxs(Z,{ref:U,disabled:x,variant:a||ee,"data-value":Be?.value??"-1",className:`--select-display --selected flex aic rel ${me}`.trim(),withLabel:false,style:ye,onClick:$=>{$.stopPropagation(),x||R(X=>!X);},...se,children:[Be?.icon&&jsxRuntime.jsx(oe,{as:"--selected-icon",name:Be.icon}),jsxRuntime.jsx(ze,{aic:true,as:"--label-wrapper",children:y&&Array.isArray(L)&&L.length>0?jsxRuntime.jsxs(ze,{as:`--tokens-wrap${C===true?" --wrap":""}`,children:[L?.map($=>jsxRuntime.jsxs(ze,{aic:true,as:"--token",children:[jsxRuntime.jsx(_,{as:"--token-label",children:$.label}),jsxRuntime.jsx(m,{as:"--token-remove",onClick:X=>re(X,$),children:ie})]},$.value)),L.length<n.length&&jsxRuntime.jsx(_,{as:"--label",children:o||"Choose"})]}):jsxRuntime.jsx(_,{as:"--label",children:Array.isArray(L)?L.length>0?`${L.length} selected`:o||"Choose":L?.label||o||"Choose"})}),jsxRuntime.jsx(m,{className:"--svg-arrow rel flex aic jcc",children:F?typeof d=="string"?jsxRuntime.jsx(oe,{name:d,as:"--search-action"}):d:typeof l=="string"?jsxRuntime.jsx(oe,{name:l,as:"--search-action"}):l})]}),jsxRuntime.jsxs(m,{id:K,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!F,onWheel:ne,style:{maxHeight:c||"auto"},ref:A,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:F,duration:.05},children:[i&&jsxRuntime.jsx(m,{as:"--select-search --no-shrink flex --sticky",children:jsxRuntime.jsx(lr,{ref:D,variant:W.Small,placeholder:f||"Search...",onChange:ue})}),o&&jsxRuntime.jsx(ea,{label:o}),n?.filter($=>!B||$.label.toLowerCase().includes(B.toLowerCase()))?.map($=>jsxRuntime.jsx(ra,{updateValue:Y,checkIcon:T,selected:le($),o:$},`option-${(typeof $=="string"?$:$.label).replace(/\s+/g,"-")}-${typeof $=="string"?$:$.value}`))]})]})};na.displayName="Zuz.Select";var ou=na;var sa=({ref:e,...r})=>jsxRuntime.jsx(Ct,{type:Oe.Switch,...r,ref:e});sa.displayName="Zuz.Switch";var ru=sa;var ia=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:i,resize:f,sortBy:c,sortable:l,onSort:d}=e,[p,u]=react.useState(0),y=()=>{l&&(d?.(String(t),p==1?-1:1),u(C=>C==1?-1:1));};return jsxRuntime.jsxs(m,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${l?"--sortable":""}`,onClick:y,children:[jsxRuntime.jsx(m,{as:"--colv",children:a}),r==-1&&l&&c==t&&jsxRuntime.jsx(m,{as:"--arrow flex aib",children:p==1?O.arrowUp:O.arrowDown})]})};ia.displayName="Zuz.Column";var oo=ia;var ca=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:i,sortBy:f,selectable:c,tableRef:l,loading:d,rowClassName:p,onSort:u,onRowClick:y,onSelect:C,onContextMenu:x}=e,T=hooks.useDelayed(),S=react.useMemo(()=>({transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(r+1)}),[]),P=react.useRef(null),g=(h,b)=>{r==-1?t.emit(`ALL_ROWS_${h?"CHECKED":"UNCHECKED"}`,h):(C&&C(o,h),t.emit(`ROW_${h?"CHECKED":"UNCHECKED"}`,h,b));},v=(h,b,I)=>jsxRuntime.jsx(oo,{idx:h,id:b,as:"--selector",pubsub:t,value:jsxRuntime.jsx(Ct,{value:I,ref:P,onSwitch:g,type:Oe.Default})});return react.useEffect(()=>{let h=(E,H)=>{P.current?.setChecked(E,false);},b=(E,H)=>{let k=false;l?.current&&l.current.querySelectorAll(".--row").forEach(M=>{let L=M;if(!L.classList.contains("--row-head")){let F=L.querySelector(".--selector input[type=checkbox]");F&&F.checked&&!k&&(k=F.checked);}}),P.current.setChecked(k,false);},I=E=>{P.current?.setChecked(E,false),C&&C(o,E);},z=E=>{P.current?.setChecked(E,false),C&&C(o,E);};return r==-1?(t.on("ROW_CHECKED",h),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",h),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",z),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",z);})},[]),jsxRuntime.jsxs(m,{onContextMenu:h=>x?x(h,o):null,onClick:h=>y?y(h,e.data):()=>{},...i?{fx:{...S,when:T}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${r==-1?"--row-head":""} ${p||""}`,children:[r==-1&&n.map((h,b)=>{let{renderWhenHeader:I,render:z,value:E,...H}=h;return jsxRuntime.jsxs(react.Fragment,{children:[c&&b==0&&v(-1,`--selector-${h.id}`,"all"),jsxRuntime.jsx(oo,{idx:-1,onSort:u,sortBy:f,value:E,...H,pubsub:t,style:a[h.id]})]},`--col-${h.id}`)}),d&&r>-1&&jsxRuntime.jsx(m,{as:"--col",children:jsxRuntime.jsx(_,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((h,b)=>jsxRuntime.jsxs(react.Fragment,{children:[c&&b==0&&v(b,`--selector-${h.id}`,h.id.toString()),s.includes(String(h.id))?jsxRuntime.jsx(oo,{pubsub:t,idx:b,id:String(h.id),style:a[String(h.id)],value:h.render?h.render(o,r):o[String(h.id).includes(".")?String(h.id).split(".").reverse()[0]:h.id]}):null]},`--${String(h.id)}-val-${b}`))]})};ca.displayName="Zuz.Row";var ro=ca;var fa=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:f,showPaginationOnZeroPageCount:c,animateRows:l,header:d,rowClassName:p,selectableRows:u,hoverable:y,sortBy:C,loading:x,loadingRowCount:T,loadingMessage:S,spinner:P,emptyMessage:g,onSort:v,onRowClick:h,onRowSelectToggle:b,onPageChange:I,onRowContextMenu:z,...E}=e,H=react.useRef(null),k=react.useMemo(()=>t.reduce((le,Y)=>(le[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},le),{}),[t]),M=react.useMemo(()=>Object.keys(k),[t]),L=react.useMemo(()=>d??true,[d]),{style:F,className:R,rest:B}=N(E),G=react.useRef(null),U=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(n.map(()=>core.uuid(8))),[A,q]=react.useState(C||null),[K,J]=react.useState(S||"loading"),ee=react.useMemo(()=>!x&&n&&n.length==0,[x,n]),ie=react.useCallback(()=>g?typeof g=="function"?jsxRuntime.jsx(g,{}):g:jsxRuntime.jsx(_,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);react.useEffect(()=>{n.length&&!D.current&&(D.current=n.map(()=>core.uuid(8)));},[n]);let me=(le,Y)=>{q(le),v?.(le,Y);},ye=(o||(n?n.length:0))/(s||10),se=react.useMemo(()=>c||ye>1?jsxRuntime.jsx(St,{hash:f,ref:H,renderOnZeroPageCount:c,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return react.useImperativeHandle(r,()=>({setLoading(le){}})),jsxRuntime.jsxs(m,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${R}`,ref:G,children:[L==true&&jsxRuntime.jsx(ro,{sortBy:A,onSort:me,tableRef:G,pubsub:U,selectable:u,index:-1,schema:t,loading:true,styles:k}),x&&jsxRuntime.jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(Se,{type:P||he.Simple}),K&&jsxRuntime.jsx(_,{as:"--table-loading-message",children:K})]}),x&&Array(T||5).fill({}).map((le,Y)=>jsxRuntime.jsx(ro,{tableRef:G,index:Y,pubsub:U,schema:t,styles:k,loading:true,animate:l,onRowClick:h},`--trow-loading-${Y}-${t[0].id}`)),!x&&n&&n.map((le,Y)=>jsxRuntime.jsx(ro,{tableRef:G,pubsub:U,loading:false,index:Y,schema:t,ids:M,styles:k,animate:l,data:le,onRowClick:h,rowClassName:p,selectable:u,onSelect:b,onContextMenu:z},`--trow-${D.current[Y]||Y}-${t[0].id}`)),ee&&ie(),i&&se&&jsxRuntime.jsx(m,{"aria-hidden":!i||!se,...l?{fx:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&se!=null}}:{},as:"--row flex aic --row-footer",children:se})]})};fa.displayName="Zuz.Table";var hu=react.forwardRef(fa),yu=hu;var bu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=react.useState(0),a=(i,f,c)=>{i.preventDefault(),s(f),document.getElementById(c)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(m,{ref:e,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(_,{as:"--toc-title",children:t}),jsxRuntime.jsx(Xe,{items:n.map((i,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:c=>a(c,f,i.tag),href:`#${i.tag}`,children:i.label}))})]})},vu=bu;var da=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let i=react.useRef(null),f=hooks.useResizeObserver(i);react.useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let l=react.useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:d},[e,r,n,t]);return jsxRuntime.jsx(m,{ref:i,style:{...l},className:"--content",children:o||e?s:null})};da.displayName="Zuz.TabBody";var ga=da;var xa=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:f="slide",...c}=r,[l,d]=react.useState(0),p=react.useRef(null),u=hooks.useResizeObserver(p),y=react.useMemo(()=>core.uuid(8),[]),[C,x]=react.useState("auto"),T=react.useMemo(()=>u.width>0,[u.width]);react.useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=react.useMemo(()=>t.map(b=>({...b,key:b.key||core.uuid(8)})),[t]),{style:P,className:g,rest:v}=N({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),h=()=>{if(!T)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${l*u.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(m,{ref:p,style:P,className:`--tabview --${a} flex cols ${g}`,children:[jsxRuntime.jsx(Tt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let I=S.find(z=>z.tag==b.tag);I&&I.onSelect&&(I.onSelect(I,b.index),i?.(I,b.index));},selected:l,items:S.reduce((b,I,z)=>(b.push({icon:I.icon,index:z,label:I.label,tag:I.tag}),b),[])}),jsxRuntime.jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:C,transition:T?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:T?1:0},children:jsxRuntime.jsx(m,{className:"--track",style:{...h()},children:S.map((b,I)=>jsxRuntime.jsx(ga,{isActive:I===l,transitionType:f,speed:n,width:u.width,render:o||I===l,onHeightChange:z=>I===l&&x(z),content:b.body},`tab-body-${b.key||I}-${y}`))})})]})};xa.displayName="Zuz.TabView";var Eu=xa;var Ou=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[i,f]=react.useState([{type:"output",content:n}]),[c,l]=react.useState(""),d=react.useRef(null),p=react.useRef(null),{variant:u}=Q(true);react.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let y=g=>{let v=typeof g=="string"?{type:"output",content:g}:g;f(h=>{let b=[...h,v];return b.length>1e3?b.slice(-1e3):b});},C=()=>f([]);react.useImperativeHandle(e,()=>({write:y,clear:C}));let x=async g=>{let[v,...h]=g.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](h):t?await t(g):`command not found: ${v}`},T=g=>{let v=/\u001b\[(\d+)m/g,h=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,z="#d4d4d4",E=false,H;for(;(H=v.exec(g))!==null;){let M=g.slice(I,H.index);M&&h.push({text:M,color:z,bold:E});let L=H[1];L==="0"?(z="#d4d4d4",E=false):L==="1"?E=true:b[L]&&(z=b[L]),I=v.lastIndex;}let k=g.slice(I);return k&&h.push({text:k,color:z,bold:E}),h},S=(g,v)=>g.includes("\x1B")?T(g).map((h,b)=>jsxRuntime.jsx(ae,{style:{color:h.color||"#d4d4d4",fontWeight:h.bold?"bold":"normal"},children:h.text},`--terminal-msg-${b}-${h.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(ae,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:g}),P=async g=>{if(g.key==="Enter"&&c.trim()){let v=c.trim(),h=[...i,{type:"command",content:`${o}${v}`}];l(""),f(h);let b=await x(v);f(I=>[...I,{type:"output",content:b}]);}};return jsxRuntime.jsxs(m,{as:`--zuz-terminal --${s||u||W.Medium} flex cols ${a.className}`,onClick:()=>p.current?.focus(),children:[jsxRuntime.jsx(m,{ref:d,className:"--terminal-log",children:i.map((g,v)=>jsxRuntime.jsx(m,{children:jsxRuntime.jsx(_,{children:S(g.content,g.type)})},v))}),jsxRuntime.jsxs(m,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(_,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(pe,{ref:p,className:"--zuz-term-input",autoFocus:true,value:c,variant:s||u||W.Medium,onChange:g=>l(g.target.value),onKeyDown:P})]})]})},Vu=Ou;var Du=({meta:e})=>jsxRuntime.jsxs(Z,{as:"flex aic --command-item",children:[e.icon&&jsxRuntime.jsx(oe,{name:e.icon,as:"--command-icon"}),jsxRuntime.jsx(_,{children:e.label})]}),Hu=({position:e,onSelect:r,commands:t,visible:n})=>jsxRuntime.jsx(m,{"aria-hidden":!n,fx:{transition:j.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsxRuntime.jsx(Du,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),wa=Hu;var Pa=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:i,name:f,onInput:c,cmd:l,renderDropdown:d,value:p,defaultValue:u,...y}=r,C=react.useRef(null),x=react.useRef(null),{variant:T}=Q(true),{style:S,className:P,rest:g}=N(y),v=De();f?v.errors?.[f]:null;let b=f&&v.values&&v.setFieldValue,I=b?v.values?.[f]:void 0,z=hooks.useDebounce(B=>{b&&v.setFieldValue?.(f,B);},500),{showDropdown:E,dropdownPosition:H,handleKeyDown:k,handleInput:M,handleCommandSelect:L}=hooks.useCommandActions({command:a,commands:i,cmd:l,ref:C}),F=react.useCallback(()=>{let B=C.current;!B||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{B.style.height="auto";let G=B.scrollHeight;if(n){let U=parseInt(n.toString(),10);isNaN(U)||(G=Math.min(G,U));}B.style.height=`${G}px`,B.style.overflowY=n&&G>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),R=B=>{z(B.currentTarget.value),c?.(B),M(B),F();};return react.useEffect(()=>{C.current&&f&&I!==void 0&&C.current.value!==String(I)&&(C.current.value=String(I));},[I,f]),react.useEffect(()=>{F();},[p,u,F]),react.useEffect(()=>{t&&C.current&&F();},[t,F]),react.useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),react.useEffect(()=>()=>{b&&v.deleteFieldValue?.(f);},[]),jsxRuntime.jsxs(m,{as:"rel",children:[jsxRuntime.jsx("textarea",{name:f,className:`--input --textarea --${o||T||W.Medium} flex ${P}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:k,onInput:R,ref:B=>{C.current=B,typeof e=="function"?e(B):e&&(e.current=B);},value:p,defaultValue:u,...g}),d?d({show:E,position:H,commands:i||[],onSelect:L}):i&&i.length>0&&jsxRuntime.jsx(wa,{visible:E,commands:i,onSelect:L,position:H})]})};Pa.displayName="Zuz.TextArea";var _u=Pa;var Ia=react.forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,i=react.useRef(null),[f,c]=react.useState(n||0);return react.useImperativeHandle(r,()=>({updateValue(l){f.toString().length!==l.toString().length&&c(l);},setValue(l){if(this.updateValue(l),i.current){let d=l.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((p,u)=>{let y=d[u];if(p instanceof HTMLElement){p.setAttribute("data-value",y);let C=p.querySelector(".--wheel-char-track");C instanceof HTMLElement&&(C.style.setProperty("--v",y),C.offsetWidth);}});}}})),react.useEffect(()=>{c(n||0);},[n]),jsxRuntime.jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(f||0).toString().split("").map((l,d)=>isNaN(parseInt(l,10))?jsxRuntime.jsx(ae,{className:"--wheel-char wheel-char-symbol grid",children:l},`wheel-char-symbol-${d}`):jsxRuntime.jsx(ae,{"data-value":l,className:`--wheel-char grid ${d>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(ae,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":l},children:[jsxRuntime.jsx(ae,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((p,u)=>jsxRuntime.jsx(ae,{children:p},`${d}--${u}`)),jsxRuntime.jsx(ae,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsxRuntime.jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Ia.displayName="Zuz.TextWheel";var Xu=Ia;var xr=react.forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:i,selected:f,roots:c,expanded:l,...d}=e,{tag:p,label:u,icon:y,under:C,isHead:x}=n,T=react.useMemo(()=>c.includes(p),[c]),[S,P]=react.useState(l),g=()=>{localStorage.setItem(`--tn${i}-${p}`,S?"0":"1"),P(!S);};react.useEffect(()=>{l||T&&!localStorage.getItem(`--tn${i}-${p}`)?(localStorage.setItem(`--tn${i}-${p}`,"1"),P(true)):P(localStorage.getItem(`--tn${i}-${p}`)=="1");},[]);let v=react.useMemo(()=>o.filter(h=>h.under==p),[o,p]);return jsxRuntime.jsxs(m,{className:`--treenode ${T?"--is-root":""} --treenode-${p} flex cols`,children:[jsxRuntime.jsxs(m,{className:`--node --node-${p} flex aic ${f==p?" --selected":""}`,children:[jsxRuntime.jsx(Z,{skeleton:d.skeleton,onClick:g,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(oe,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):v.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(Z,{className:"--node-meta flex aic",onClick:h=>a(p),children:[(s?.nodeOpen&&s?.nodeClose||T&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(oe,{skeleton:d.skeleton,className:`--node-icon ${T?"--icon-root":""}`,name:y||(S?T&&s?.rootOpen||s.nodeOpen:T&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(_,{className:`--node-label ${T?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:u})]})]}),S&&v.length>0&&jsxRuntime.jsx(m,{className:`--sub-node tree-sub-node-${p} flex cols`,children:v.map(h=>jsxRuntime.jsx(xr,{treeTag:i,selected:f,onSelect:a,icons:s,roots:c,expanded:h.expanded||false,meta:h,nodes:o},`--node-${h.tag}`))})]})});xr.displayName="TreeItem";var Ba=xr;var ka=react.forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:i,selected:f,...c}=e,[l,d]=react.useState(f);react.useImperativeHandle(r,()=>({getSelected:()=>l}),[o]);let p=u=>{d(u),o&&o(u);};return react.useEffect(()=>{l!=f&&d(f);},[f]),jsxRuntime.jsx(m,{className:"--treeview flex cols",children:n.filter(u=>i.includes(u.tag)).map(u=>jsxRuntime.jsx(Ba,{treeTag:s?`-${s}`:"",selected:l,onSelect:y=>p(y),icons:a,meta:u,roots:i,expanded:u.expanded||false,skeleton:c.skeleton,nodes:n},`--node-${u.tag}`))})});ka.displayName="Zuz.TreeView";var rf=ka;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
+ Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkCKUNYZUA_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkCKUNYZUA_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkCKUNYZUA_cjs.h}});exports.ALERT=Pe;exports.AVATAR=Cr;exports.Accordion=xl;exports.ActionBar=Tl;exports.Alert=Il;exports.AutoComplete=Ql;exports.Avatar=ac;exports.Badge=lc;exports.Box=m;exports.Bubble=Zc;exports.BubbleMediaType=Xn;exports.BubbleStatus=qn;exports.Button=Z;exports.CHART=Kn;exports.CHECKBOX=Oe;exports.COLORTHEME=lf;exports.Calendar=Zo;exports.Carousel=Mc;exports.Chart=zc;exports.CheckBox=Ct;exports.CodeBlock=tm;exports.ColorScheme=ym;exports.ContextMenu=So;exports.CookiesConsent=Sm;exports.Cover=Ee;exports.CropShape=Vm;exports.Cropper=Mm;exports.Crumb=Hm;exports.DATATYPE=pf;exports.DIALOG=et;exports.DIALOG_ACTION_POSITION=Tr;exports.DRAWER_SIDE=ve;exports.DatePicker=Fm;exports.Dialog=Po;exports.Drawer=Bo;exports.FILTER=kt;exports.FORMVALIDATION=Ke;exports.FORMVALIDATION_STYLE=uf;exports.Fab=Wm;exports.Filters=qm;exports.Flex=ze;exports.Form=cp;exports.Grid=up;exports.Group=wo;exports.Icon=oe;exports.Image=Ye;exports.Input=pe;exports.KeyboardKeys=ir;exports.KeysLabelMap=Ls;exports.KeysMap=ks;exports.Label=wt;exports.LayersProvider=xo;exports.List=Xe;exports.MediaPlayer=Cp;exports.NetworkStatus=Ip;exports.ORIGIN=ut;exports.OriginType=cf;exports.Overlay=We;exports.POSITION=pt;exports.PROGRESS=df;exports.Pagination=St;exports.PaginationStyle=Ut;exports.Password=Op;exports.PinInput=Ap;exports.Position=de;exports.ProgressBar=Ue;exports.RADIO=mo;exports.Radio=_p;exports.SHEET=Re;exports.SHEET_ACTION_POSITION=lo;exports.SKELETON=af;exports.SLIDER=co;exports.SORT=mf;exports.SPINNER=he;exports.ScrollView=Ro;exports.Search=lr;exports.Select=ou;exports.SelectTabs=Tt;exports.Sheet=ep;exports.Slider=ot;exports.SnackPosition=Ft;exports.SnackStyle=an;exports.SnackType=zt;exports.Span=ae;exports.Spinner=Se;exports.Status=ff;exports.Switch=ru;exports.TRANSITIONS=j;exports.TRANSITION_CURVES=te;exports.TabView=Eu;exports.Table=yu;exports.TableOfContents=vu;exports.Terminal=Vu;exports.Text=_;exports.TextWheel=Xu;exports.Textarea=_u;exports.ThemeProvider=za;exports.ToastDefaultTitle=ln;exports.ToastPosition=Ft;exports.ToastProvider=ko;exports.ToastStyle=an;exports.ToastType=zt;exports.ToolTip=jo;exports.TreeView=rf;exports.Variant=W;exports.animationTransition=ft;exports.buildClassString=po;exports.buildWithStyles=Ir;exports.css=Mf;exports.getAnimationCurve=uo;exports.getAnimationTransition=Of;exports.getZuzMap=Ma;exports.isKeyCombination=Es;exports.setZuzMap=Rr;exports.useBase=N;exports.useContextMenu=qi;exports.useDialog=ji;exports.useDrawer=el;exports.useFx=ge;exports.useMorph=rl;exports.usePosition=xt;exports.useSnack=ml;exports.useToast=Lo;