@zuzjs/ui 1.0.21 → 1.0.23

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 chunkEDVIEQHU_cjs=require('./chunk-EDVIEQHU.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
2
- var zo={Circle:"CIRCLE",Square:"SQUARE"},Bp={Default:"DEFAULT",Circle:"CIRCLE"},Lp={Light:"light",Dark:"dark",System:"system"},ye={Default:"DEFAULT",Switch:"SWITCH"},Bt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ee=Bt,Ke=hooks.AnchorType,Mp=Ke,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},kp={Asc:"ASC",Desc:"DESC"},Op={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Dp={Dots:"DOTS"},be={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},le={Success:"success",Error:"error",Warning:"warning",Info:"info"},F={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},G={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Hp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},He=me,Lt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},_o=Lt,Vp={Bar:"BAR",Ring:"RING"},mt={Default:"range",Text:"number"},Mt={Default:"DEFAULT",Card:"CARD"},ct={Gooey:"gooey"},se={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Fo=Symbol.for("zuz.global.map"),Zo=o=>{globalThis[Fo]=o;},Ds=()=>globalThis[Fo]||{},kt=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e=Ds();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkEDVIEQHU_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkEDVIEQHU_cjs.h(n).filter(Boolean).map(t=>{let s=t.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[u,l,m]=s;return chunkEDVIEQHU_cjs.h(m).map(i=>{let a=`${l}(${i})`;return e[a]||i}).join(" ")}return e[t]||t}).join(" ")},ru=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":kt(n)},Ko=o=>{let n={};for(let e in o){let r=o[e];if(e.startsWith("--")){n[e]=r;continue}let t=chunkEDVIEQHU_cjs.e[e]?.toString()??e;if(t==="x"||t==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkEDVIEQHU_cjs.i.addUnitsSafely(e,r)} ${s[1]??"0px"}`;}else if(t==="y"||t==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunkEDVIEQHU_cjs.i.addUnitsSafely(e,r)}`;}else chunkEDVIEQHU_cjs.d.includes(t)?n[t]=chunkEDVIEQHU_cjs.i.addUnitsSafely(e,r):n[t]=r;}return n},Ot=o=>{if(!o)return "linear";switch(o.toUpperCase()){case F.Bounce:return "var(--bounce)";case F.Liquid:return "var(--liquid)";case F.Spring:return "var(--spring)";case F.EaseInOut:return "ease-in-out";case F.EaseOutBack:return "ease-out-back";default:return "linear"}},We=(o,n=0)=>{let e={},r={},t=n||20;switch(o){case G.SlideInLeft:case G.SlideInRight:e={"--fx-x":o===G.SlideInLeft?`-${t}px`:`${t}px`,opacity:0},r={"--fx-x":"0px",opacity:1};break;case G.SlideInTop:case G.SlideInBottom:e={"--fx-y":o===G.SlideInTop?`-${t}px`:`${t}px`,opacity:0},r={"--fx-y":"0px",opacity:1};break;case G.ScaleIn:e={scale:0,opacity:0},r={scale:1,opacity:1};break;case G.FadeIn:e={opacity:0},r={opacity:1};break}return {from:e,to:r}},nu=(o,n,e)=>{let{from:r,to:t}=We(o);return n?{...r,...t}:e?r:t};var Vs=(o,n)=>{let e=react.useRef([]),r=react.useRef(false);return react.useEffect(()=>{o?.when||(r.current=false);},[o?.transition]),react.useEffect(()=>{let t=n?.current;if(!t||!o||!o.clearAtEnd)return;let s=u=>{e.current.includes(u.propertyName)&&o.clearAtEnd===true&&(t.style.transform="",t.style.filter="",e.current.forEach(l=>t.style.removeProperty(l)));};return t.addEventListener("transitionend",s),()=>t.removeEventListener("transitionend",s)},[o,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let t=n.current;(o?.scroll||o?.mouse)&&(t.style.willChange="transform",t.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",t.style.transition=`translate 0.1s ${o.curve?Ot(o.curve):"var(--spring)"}`);},[o,n]),react.useMemo(()=>{if(!o)return {style:{}};let{transition:t,from:s,to:u,exit:l,when:m,duration:i=.3,delay:a=0,curve:f,watch:p=[]}=o,d=m===false&&!r.current;m===true&&(r.current=true);let b={},{from:w,to:x}=t?We(t):{from:s||{},to:u||{}};b=m===void 0?{...w,...x}:m?{...x}:l||w;let h=Ot(f),S=[],g=Ko(b);e.current=Object.keys(g);let v={...g};return Object.keys(g).forEach(I=>{let T=I.startsWith("--")?"all":I;S.includes(T)||S.push(`${T} ${i}s ${h} ${a}s`);}),p.forEach(I=>{S.includes(I)||S.push(`${I} 0.1s ${h} 0s`);}),{style:{...v,transition:d?"none":S.join(", "),opacity:d?0:v.opacity,pointerEvents:d?"none":v.pointerEvents}}},[o,o?.when,o?.watch])},ae=Vs;var As=(o,n)=>{let{as:e,fx:r,transition:t,skeleton:s,className:u,propsToRemove:l,style:m,...i}=o||{},a=t?{transition:t,duration:.3}:r||{},{style:f}=ae(a,n),p=kt(e??"");return {style:{...m,...f},className:[u||"",p||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...chunkEDVIEQHU_cjs.g(i,l?[...l,"skeleton"]:["skeleton"])}}},R=As;var Fs=(o,n={})=>{let{offset:e=8,direction:r="bottom",container:t=null,triggerRef:s=null}=n,u=react.useRef(null),l=react.useCallback(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=m.getBoundingClientRect(),f=i.getBoundingClientRect(),p,d;t?(p=t.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(m).position==="fixed"?d="fixed":d="absolute",d==="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}),m.style.position!==d&&(m.style.position=d),u.current=d;let x=0,h=0;switch(r){case "top":x=f.top-a.height-e,h=f.left,x<p.top&&f.bottom+a.height+e<=p.bottom&&(x=f.bottom+e);break;case "bottom":x=f.bottom+e,h=f.left,x+a.height>p.bottom&&f.top-a.height-e>=p.top&&(x=f.top-a.height-e);break;case "left":x=f.top,h=f.left-a.width-e,h<p.left&&f.right+a.width+e<=p.right&&(h=f.right+e);break;case "right":x=f.top,h=f.right+e,h+a.width>p.right&&f.left-a.width-e>=p.left&&(h=f.left-a.width-e);break}if(x=Math.max(p.top,Math.min(x,p.bottom-a.height)),h=Math.max(p.left,Math.min(h,p.right-a.width)),u.current==="fixed")m.style.top=`${x}px`,m.style.left=`${h}px`;else {let S;m.offsetParent?S=m.offsetParent.getBoundingClientRect():S={top:0,left:0};let g=x-S.top+window.scrollY,v=h-S.left+window.scrollX;m.style.top=`${g}px`,m.style.left=`${v}px`;}},[o,s,e,r,t]);return react.useEffect(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=new ResizeObserver(l);return a.observe(m),i&&a.observe(i),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{a.disconnect(),i&&a.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[o,r,e,t,s]),{postion:u.current,reposition:l}},Ue=Fs;var Go="(prefers-color-scheme: dark)",Ws=typeof window>"u",Xo=react.createContext(void 0),At=o=>{let n=react.useContext(Xo);if(!n){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},X=At,Us=({children:o,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...t})=>(r&&Zo(r),jsxRuntime.jsx(Gs,{storageKey:n,forceTheme:e,...t,children:o})),Gs=({children:o,storageKey:n,forceTheme:e,...r})=>{let[t,s]=react.useState(()=>e||qo(n,"system")),[u,l]=react.useState(()=>e||qo(n)),m=p=>(p||(p=window.matchMedia(Go)),p.matches?"dark":"light"),i=react.useCallback(p=>{let d=p=="system"?m():p,b=document.documentElement;b.setAttribute("color-scheme",d),b.style.colorScheme=d,l(d);},[m]),a=react.useCallback(p=>{s(p),localStorage.setItem(n,p),i(p);},[t]),f=react.useCallback(p=>{let d=m(p);l(d),t==="system"&&i("system");},[t]);return react.useEffect(()=>{t==null&&window.localStorage.getItem(n);},[t]),react.useEffect(()=>{window.matchMedia(Go).addEventListener("change",f);},[f]),react.useEffect(()=>{let p=d=>{d.key==n&&(d.newValue?a(d.newValue):a("system"));};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[a]),react.useEffect(()=>{i(e||t||"system");},[t]),jsxRuntime.jsxs(Xo,{value:{colorScheme:t,resolvedScheme:u,setColorScheme:a,...r},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ 'use strict';var chunkEA4UJ6EJ_cjs=require('./chunk-EA4UJ6EJ.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
2
+ var _o={Circle:"CIRCLE",Square:"SQUARE"},Lp={Default:"DEFAULT",Circle:"CIRCLE"},Mp={Light:"light",Dark:"dark",System:"system"},ye={Default:"DEFAULT",Switch:"SWITCH"},Lt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ee=Lt,Ke=hooks.AnchorType,kp=Ke,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Op={Asc:"ASC",Desc:"DESC"},Dp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Hp={Dots:"DOTS"},be={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},le={Success:"success",Error:"error",Warning:"warning",Info:"info"},F={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},G={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Vp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},He=me,Mt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Fo=Mt,Ap={Bar:"BAR",Ring:"RING"},mt={Default:"range",Text:"number"},kt={Default:"DEFAULT",Card:"CARD"},ct={Gooey:"gooey"},se={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Zo=Symbol.for("zuz.global.map"),Ko=o=>{globalThis[Zo]=o;},Vs=()=>globalThis[Zo]||{},Ot=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e=Vs();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkEA4UJ6EJ_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkEA4UJ6EJ_cjs.h(n).filter(Boolean).map(t=>{let s=t.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[u,l,m]=s;return chunkEA4UJ6EJ_cjs.h(m).map(i=>{let a=`${l}(${i})`;return e[a]||i}).join(" ")}return e[t]||t}).join(" ")},nu=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":Ot(n)},Wo=o=>{let n={};for(let e in o){let r=o[e];if(e.startsWith("--")){n[e]=r;continue}let t=chunkEA4UJ6EJ_cjs.e[e]?.toString()??e;if(t==="x"||t==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkEA4UJ6EJ_cjs.i.addUnitsSafely(e,r)} ${s[1]??"0px"}`;}else if(t==="y"||t==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunkEA4UJ6EJ_cjs.i.addUnitsSafely(e,r)}`;}else chunkEA4UJ6EJ_cjs.d.includes(t)?n[t]=chunkEA4UJ6EJ_cjs.i.addUnitsSafely(e,r):n[t]=r;}return n},Dt=o=>{if(!o)return "linear";switch(o.toUpperCase()){case F.Bounce:return "var(--bounce)";case F.Liquid:return "var(--liquid)";case F.Spring:return "var(--spring)";case F.EaseInOut:return "ease-in-out";case F.EaseOutBack:return "ease-out-back";default:return "linear"}},We=(o,n=0)=>{let e={},r={},t=n||20;switch(o){case G.SlideInLeft:case G.SlideInRight:e={"--fx-x":o===G.SlideInLeft?`-${t}px`:`${t}px`,opacity:0},r={"--fx-x":"0px",opacity:1};break;case G.SlideInTop:case G.SlideInBottom:e={"--fx-y":o===G.SlideInTop?`-${t}px`:`${t}px`,opacity:0},r={"--fx-y":"0px",opacity:1};break;case G.ScaleIn:e={scale:0,opacity:0},r={scale:1,opacity:1};break;case G.FadeIn:e={opacity:0},r={opacity:1};break}return {from:e,to:r}},su=(o,n,e)=>{let{from:r,to:t}=We(o);return n?{...r,...t}:e?r:t};var $s=(o,n)=>{let e=react.useRef([]),r=react.useRef(false);return react.useEffect(()=>{o?.when||(r.current=false);},[o?.transition]),react.useEffect(()=>{let t=n?.current;if(!t||!o||!o.clearAtEnd)return;let s=u=>{e.current.includes(u.propertyName)&&o.clearAtEnd===true&&(t.style.transform="",t.style.filter="",e.current.forEach(l=>t.style.removeProperty(l)));};return t.addEventListener("transitionend",s),()=>t.removeEventListener("transitionend",s)},[o,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let t=n.current;(o?.scroll||o?.mouse)&&(t.style.willChange="transform",t.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",t.style.transition=`translate 0.1s ${o.curve?Dt(o.curve):"var(--spring)"}`);},[o,n]),react.useMemo(()=>{if(!o)return {style:{}};let{transition:t,from:s,to:u,exit:l,when:m,duration:i=.3,delay:a=0,curve:f,watch:p=[]}=o,d=m===false&&!r.current;m===true&&(r.current=true);let y={},{from:w,to:b}=t?We(t):{from:s||{},to:u||{}};y=m===void 0?{...w,...b}:m?{...b}:l||w;let h=Dt(f),S=[],g=Wo(y);e.current=Object.keys(g);let v={...g};return Object.keys(g).forEach(R=>{let T=R.startsWith("--")?"all":R;S.includes(T)||S.push(`${T} ${i}s ${h} ${a}s`);}),p.forEach(R=>{S.includes(R)||S.push(`${R} 0.1s ${h} 0s`);}),{style:{...v,transition:d?"none":S.join(", "),opacity:d?0:v.opacity,pointerEvents:d?"none":v.pointerEvents}}},[o,o?.when,o?.watch])},ae=$s;var zs=(o,n)=>{let{as:e,fx:r,transition:t,skeleton:s,className:u,propsToRemove:l,style:m,...i}=o||{},a=t?{transition:t,duration:.3}:r||{},{style:f}=ae(a,n),p=Ot(e??"");return {style:{...m,...f},className:[u||"",p||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...chunkEA4UJ6EJ_cjs.g(i,l?[...l,"skeleton"]:["skeleton"])}}},I=zs;var Ks=(o,n={})=>{let{offset:e=8,direction:r="bottom",container:t=null,triggerRef:s=null}=n,u=react.useRef(null),l=react.useCallback(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=m.getBoundingClientRect(),f=i.getBoundingClientRect(),p,d;t?(p=t.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(m).position==="fixed"?d="fixed":d="absolute",d==="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}),m.style.position!==d&&(m.style.position=d),u.current=d;let b=0,h=0;switch(r){case "top":b=f.top-a.height-e,h=f.left,b<p.top&&f.bottom+a.height+e<=p.bottom&&(b=f.bottom+e);break;case "bottom":b=f.bottom+e,h=f.left,b+a.height>p.bottom&&f.top-a.height-e>=p.top&&(b=f.top-a.height-e);break;case "left":b=f.top,h=f.left-a.width-e,h<p.left&&f.right+a.width+e<=p.right&&(h=f.right+e);break;case "right":b=f.top,h=f.right+e,h+a.width>p.right&&f.left-a.width-e>=p.left&&(h=f.left-a.width-e);break}if(b=Math.max(p.top,Math.min(b,p.bottom-a.height)),h=Math.max(p.left,Math.min(h,p.right-a.width)),u.current==="fixed")m.style.top=`${b}px`,m.style.left=`${h}px`;else {let S;m.offsetParent?S=m.offsetParent.getBoundingClientRect():S={top:0,left:0};let g=b-S.top+window.scrollY,v=h-S.left+window.scrollX;m.style.top=`${g}px`,m.style.left=`${v}px`;}},[o,s,e,r,t]);return react.useEffect(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=new ResizeObserver(l);return a.observe(m),i&&a.observe(i),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{a.disconnect(),i&&a.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[o,r,e,t,s]),{postion:u.current,reposition:l}},Ue=Ks;var qo="(prefers-color-scheme: dark)",Gs=typeof window>"u",Yo=react.createContext(void 0),$t=o=>{let n=react.useContext(Yo);if(!n){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},X=$t,qs=({children:o,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...t})=>(r&&Ko(r),jsxRuntime.jsx(Xs,{storageKey:n,forceTheme:e,...t,children:o})),Xs=({children:o,storageKey:n,forceTheme:e,...r})=>{let[t,s]=react.useState(()=>e||Xo(n,"system")),[u,l]=react.useState(()=>e||Xo(n)),m=p=>(p||(p=window.matchMedia(qo)),p.matches?"dark":"light"),i=react.useCallback(p=>{let d=p=="system"?m():p,y=document.documentElement;y.setAttribute("color-scheme",d),y.style.colorScheme=d,l(d);},[m]),a=react.useCallback(p=>{s(p),localStorage.setItem(n,p),i(p);},[t]),f=react.useCallback(p=>{let d=m(p);l(d),t==="system"&&i("system");},[t]);return react.useEffect(()=>{t==null&&window.localStorage.getItem(n);},[t]),react.useEffect(()=>{window.matchMedia(qo).addEventListener("change",f);},[f]),react.useEffect(()=>{let p=d=>{d.key==n&&(d.newValue?a(d.newValue):a("system"));};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[a]),react.useEffect(()=>{i(e||t||"system");},[t]),jsxRuntime.jsxs(Yo,{value:{colorScheme:t,resolvedScheme:u,setColorScheme:a,...r},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
3
3
  const themes = ['light', 'dark']
4
4
  let theme = localStorage.getItem(\`${n}\`) || "system";
5
5
  if (theme === "system") {
6
6
  theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
7
7
  }
8
8
  document.documentElement.setAttribute("color-scheme", theme);
9
- document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx($t,{children:o})]})},qo=(o,n)=>{if(Ws)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Yo=({ref:o,...n})=>{let{style:e,...r}=n,{style:t,className:s,rest:u}=R(r);return jsxRuntime.jsx("span",{ref:o,style:e,className:s,...u})};Yo.displayName="Zuz.Span";var J=Yo;var Jo=react.forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:l}=X(true),{className:m,style:i,rest:a}=R(u);return jsxRuntime.jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${t||l||W.Small} ${m}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,p)=>jsxRuntime.jsx(J,{className:`path${p+1}`},`${e}-layer-${p}`))})});Jo.displayName="Zuz.Icon";var Y=Jo;var re={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var jo=o=>{let{type:n,variant:e,color:r,...t}=o,{className:s,style:u,rest:l}=R(t),{spinner:m}=X(true),i=()=>{switch(n||m?.type||re.Simple){case re.Simple:return null;case re.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{as:"--bar --bar1"}),jsxRuntime.jsx(c,{as:"--bar --bar2"}),jsxRuntime.jsx(c,{as:"--bar --bar3"})]});case re.Roller:return null}};return jsxRuntime.jsx(c,{className:`${s} --spinner --${(n||m?.type||re.Simple).toLowerCase()} --${e||m?.variant||W.Small}`.trim(),style:{...u},...l,children:i()})};jo.displayName="Zuz.Spinner";var ge=jo;var ft={Loading:"loading",Normal:"normal"};var tr=({ref:o,...n})=>{let{reset:e,kind:r="solid",variant:t,icon:s,iconSize:u,children:l,withLabel:m,spinner:i,state:a,disabled:f,...p}=n,{style:d,className:b,rest:w}=R(p),{variant:x}=X(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${t||x} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${b}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:a==ft.Loading||n.skeleton?.enabled||f,...w,children:[a==ft.Loading&&jsxRuntime.jsx(ge,{variant:t||x,type:i||re.Simple}),(!a||a==ft.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(Y,{variant:u,name:s}),m===true?jsxRuntime.jsx(J,{children:l}):l]})]})};tr.displayName="Zuz.Button";var z=tr;var rr=react.forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:l,className:m,rest:i}=R(u),a=`h${o.h||1}`;return jsxRuntime.jsx(a,{ref:n,style:l,className:m,...i,children:r?jsxRuntime.jsx(J,{dangerouslySetInnerHTML:{__html:r}}):t})});rr.displayName="Zuz.Text";var H=rr;var ta=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:l}=o;return n=="-"?jsxRuntime.jsx(c,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:m=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsxRuntime.jsx(c,{as:"--icon",children:jsxRuntime.jsx(Y,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},nr=ta;var ir=({ref:o,...n})=>{let{id:e,as:r,fx:t,offsetX:s,offsetY:u,parent:l,event:m,arrow:i,when:a,items:f,header:p,footer:d,origin:b=Ke.TopRight,...w}=n,[x,h]=react.useState(false),[S,g]=react.useState(f||[]),{position:v,targetRef:I,calculatedAnchor:T}=hooks.useAnchorPosition(l?.current,m,{offsetX:s,offsetY:u,preferredAnchor:b}),N=l&&v.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",M=react.useMemo(()=>{let k=T.toLowerCase();return k.includes("left")?"--arrow-left":k.includes("right")?"--arrow-right":"--arrow-center"},[T]),L=v.top!==0||v.left!==0;react.useEffect(()=>{a&&L?h(true):a||h(false);},[a,L]);let{className:V,style:E,rest:_}=R(w),U=ae({...t?.transition?{transition:t.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:t?.curve??F.EaseInOut,duration:t?.duration??.05,when:x&&L});return jsxRuntime.jsxs(c,{ref:I,className:`--contextmenu ${i||l!=null?`--has-arrow ${N} ${M}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!x,style:{...E,...U.style,top:v.top,left:v.left,visibility:L?"visible":"hidden",transformOrigin:T},..._,children:[typeof p=="function"?react.createElement(p):p,S.map((k,C)=>jsxRuntime.jsx(nr,{...k,index:C},`context-${k.label.toLowerCase()}-${C}`)),typeof d=="function"?react.createElement(d):d]})};ir.displayName="Zuz.ContextMenu";var _t=ir;var lr=react.forwardRef((o,n)=>{let{children:e,fx:r,when:t,fxDelay:s,fxStep:u,classToIgnore:l,...m}=o,i=X(true),a=hooks.useDelayed(),f=r||i?.group?.fx,p=s||i?.group?.fxDelay,d=u||i?.group?.fxStep,b=l||i?.group?.classToIgnore||"--ignore",w=react.useMemo(()=>f?react$1.addPropsToChildren(e,x=>{if(x.type===react.Fragment)return false;let h=x.props||{},S="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",v=typeof g=="string"&&g.includes(b);return !S&&!v},x=>({fx:{...f,delay:(p||0)+x*(d||.1),when:t??(r?.when||a)}})):e,[e,t,a,f]);return jsxRuntime.jsx(c,{className:"--group",ref:n,...m,children:w})});lr.displayName="Zuz.Group";var Ft=lr;var cr=react.forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:l,...m}=o,{className:i,style:a,rest:f}=R(m),{spinner:p}=X(true);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(Ft,{fx:{transition:G.SlideInBottom,curve:F.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:t||p?.variant||W.Small,type:r||p?.type||re.Simple}),!l&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});cr.displayName="Zuz.Cover";var Ne=cr;var pr=react.forwardRef((o,n)=>{let{when:e,...r}=o;return jsxRuntime.jsx(c,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...r})});pr.displayName="Zuz.Overlay";var Ee=pr;var ya=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),ur=ya;var wa=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(c,{as:`--footer flex aic rel ${n?n==_o.Center?"jcc":"":"jce"}`.trim(),children:o.map((t,s)=>jsxRuntime.jsx(z,{variant:r,onClick:u=>t.handler?t.handler():t.onClick?t.onClick():console.log("onClick Handler missing"),as:"--action",children:t.label},`dialog-${e}-action-${t.key}`))}),dr=wa;var va={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"})," "]}),[le.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"})}),[le.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"})}),[le.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"})}),[le.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},O=va;var Sa=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(c,{as:"--head flex aic rel",children:[jsxRuntime.jsx(c,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(z,{onClick:e=>n(),className:"--closer abs center-v",children:O.close})]}),hr=Sa;var wr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:l,speed:m,type:i,action:a,actionPosition:f,spinner:p,loadingMessage:d,variant:b,inBackground:w,closeDelay:x=200,onClose:h,onShow:S,onHide:g,...v}=n,I=react.useMemo(()=>core.uuid(12),[]),[T,P]=react.useState(t||""),[N,M]=react.useState(s||""),[L,V]=react.useState(i||He.Dialog),[E,_]=react.useState(false),[U,k]=react.useState(true),[C,A]=react.useState(a||null),[$,K]=react.useState(false),{variant:D,spinner:Z,dialog:q}=X(true),te=b||q?.variant||D||W.Small,{style:j,className:pe,rest:de}=R(v),It=react.useRef(null),Nt=ae({when:E,duration:m||q?.speed||.3,delay:q?.delay||.1,transition:u||q?.transition||G.SlideInBottom,curve:l||q?.curve||F.EaseInOut,watch:["scale","filter","transform"]});react.useEffect(()=>{V(He.Dialog),M(s),P(T),C&&A(C.reduce((ne,Q)=>(ne.push({...Q,key:Q.key||core.uuid(12)}),ne),[])),_(true),setTimeout(()=>S?S():()=>{},500);},[]);let Ie=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{style:{zIndex:Ie},when:E}),jsxRuntime.jsxs(c,{as:`--dialog --${(i??He.Default).toLowerCase()} ${E?"--visible":""} ${pe} fixed abc`.trim(),style:{...Nt.style,zIndex:Ie+1,pointerEvents:w==true?"none":"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...de,ref:It,children:[jsxRuntime.jsx(Ne,{when:$,spinner:p||q?.spinner||Z?.type||re.Simple,message:d||q?.loadingMessage}),jsxRuntime.jsx(hr,{title:T,onClose:()=>{_(false),h(r);}}),jsxRuntime.jsx(ur,{message:N,render:U,action:C}),C&&C.length>0&&jsxRuntime.jsx(dr,{variant:te,action:C,dialogID:I,actionPosition:f})]})]})};wr.displayName="Zuz.Dialog";var Zt=wr;var Kt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},qe=new Kt;var vr=react.forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:m,onScrollY:i,onScrollX:a}=hooks.useScrollbar(e||1),{style:f,className:p,rest:d}=R(t);return react.useEffect(()=>{let b=u.current;if(!b)return;let w=()=>{window.dispatchEvent(new Event("resize"));};return b.addEventListener("scroll",w),()=>b.removeEventListener("scroll",w)},[]),jsxRuntime.jsxs(c,{ref:s,className:p.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(c,{as:`--scroll-content ${p}`.trim(),ref:u,style:r||{},children:d.children}),jsxRuntime.jsx(c,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:l,onMouseDown:i})}),jsxRuntime.jsx(c,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})})]})});vr.displayName="Zuz.ScrollView";var Wt=vr;var Cr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:l,animation:m,prerender:i,inBackground:a,onClose:f,...p}=n,{drawer:d}=X(true),[b,w]=react.useState(u),[x,h]=react.useState(false),[S,g]=react.useState(i??(d?.prerender||true)),v=()=>{h(false),f?.(e??-1);},{className:I,style:T,rest:P}=R(p),N=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(v)&&v();}}],[x]);hooks.useShortcuts(N),react.useEffect(()=>{w(u);},[u]),react.useEffect(()=>(x?qe.push(v):qe.pop(v),()=>qe.pop(v)),[x]),react.useEffect(()=>{h(true);},[]);let M=t||d?.from||se.Left,L=react.useMemo(()=>{switch(M){case se.Left:return {from:{x:"-100vw"},to:{x:0}};case se.Right:return {from:{x:"100vw"},to:{x:0}};case se.Top:return {from:{y:"-100vh"},to:{y:0}};case se.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,d?.from]),V=ae({from:{...L.from,opacity:0},to:{...L.to,opacity:1},when:x,curve:m||d?.animation||F.EaseInOut,duration:s||d?.speed||.5,watch:["scale","filter"]}),E=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{onClick:_=>{x&&v();},when:x,style:{zIndex:E}}),jsxRuntime.jsxs(c,{ref:o,"aria-hidden":!x,className:`--drawer flex cols ${I} --${M.toLowerCase()} fixed`,style:{...T,...V.style,"--m":`${l||d?.margin||0}px`,zIndex:E+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...P,children:[t==se.Top||t==se.Bottom?jsxRuntime.jsx(c,{className:"--handle"}):null,jsxRuntime.jsx(Wt,{children:S||x?b:null})]})]})};Cr.displayName="Zuz.Drawer";var Yt=Cr;var Tr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Tr||{}),Pr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Da=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:l})=>{let m=hooks.useDelayed(),i=hooks.useDelayed(((u||4)-1)*1e3),{toast:a}=X(true),f=ae({when:m&&!i,duration:a?.duration||.2,transition:G.SlideInTop,curve:a?.curve||F.EaseInOut});return react.useEffect(()=>{i&&n&&l?.(n);},[i,n]),jsxRuntime.jsxs(c,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(c,{as:"--ico flex aic jcc",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.2,when:m&&!i},children:r?jsxRuntime.jsx(Y,{name:r,fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}}):jsxRuntime.jsx(c,{as:"--no-icon",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}})}),jsxRuntime.jsxs(c,{as:"--meta",children:[jsxRuntime.jsx(H,{as:"--tt",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.3,when:m},children:t||Pr[e]}),jsxRuntime.jsx(H,{as:"--tm",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.4,duration:.5,when:m},children:s})]})]})},Qt=Da;var ce=react.createContext(null),_a=({ref:o,...n})=>{let r=react.useContext(ce)?.depth??0,[t,s]=react.useState(null),[u,l]=react.useState(false),[m,i]=react.useState([]),a=hooks.useDelayed(),f=react.useRef(0),p=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};react.useImperativeHandle(o,()=>({add(h){let S=p(),g={id:S,...h};return i(v=>[...v,g]),S},openMenu(h){l(false),setTimeout(()=>{s({id:p(),type:"menu",props:h}),l(true);},16);},remove(h){i(S=>S.filter(g=>g.id!==h)),t?.id===h&&d();},clear(){i([]);}})),react.useEffect(()=>{if(t&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,d]);let b=h=>{setTimeout(()=>{i(S=>S.filter(g=>g.id!==h)),t?.id===h&&s(null);},250);},w=react.useMemo(()=>[...m.filter(h=>h.type!="toast")],[m]);if(!a)return null;let x=m.filter(h=>h.type=="toast").reverse();return reactDom.createPortal(jsxRuntime.jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[w.map((h,S)=>{let g=S<w.length-1;return h.type==="dialog"?jsxRuntime.jsx(Zt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(Yt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),x.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:x.map((h,S)=>jsxRuntime.jsx(Qt,{onClose:b,index:S,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsxRuntime.jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(_t,{onClose:d,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},Fa=({children:o})=>{let n=react.useContext(ce),e=n?n.depth+1:0,r=react.useRef(null),t=react.useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),clear:()=>r.current?.clear(),depth:e,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(ce.Provider,{value:t,children:[o,jsxRuntime.jsx(_a,{ref:r})]})},$t=Fa;var Ka=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t);return {clearAll:n,show:t=>{let s=o.add({type:"dialog",props:{...t,type:He.Dialog}});return {id:s,hide:()=>e(s)}},hide:e}},Wa=Ka;var Ga=()=>{let o=react.useContext(ce);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,a)=>o.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,p)=>n("default",{title:i,message:a,icon:f,duration:p}),hide:i=>o.remove(i),success:(i,a,f,p)=>n("success",{title:i,message:a,icon:f,duration:p}),error:(i,a,f,p)=>n("error",{title:i,message:a,icon:f,duration:p}),warn:(i,a,f,p)=>n("warn",{title:i,message:a,icon:f,duration:p}),promise:(i,a,f,p)=>n("promise",{title:i,message:a,icon:f,duration:p}),clearAll:()=>o.clear()}},jt=Ga;var Xa=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>{let s=o.add({type:"drawer",props:t});return {id:s,hide:()=>e(s)}};return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:se.Right}),left:t=>r({children:t,from:se.Left}),top:t=>r({children:t,from:se.Top}),bottom:t=>r({children:t,from:se.Bottom}),close:e}},Ya=Xa;var Ja=(o,n,e={})=>{let[r,t]=react.useState(null),[s,u]=react.useState(false),{duration:l=.25,curve:m=F.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return react.useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ae({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:m,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},ja=Ja;var ti=()=>{let o=react.useContext(ce);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,t,s)=>{r.preventDefault(),o.openMenu({event:r,items:t,origin:s});},showMenu:(r,{items:t,origin:s,offsetX:u,offsetY:l,transition:m,curve:i,arrow:a,duration:f,header:p,footer:d})=>{o.openMenu({fx:{transition:m,curve:i,duration:f},parent:r,items:t,origin:s||Ke.TopCenter,offsetX:u,offsetY:l,arrow:a,header:p,footer:d});},hide:o.clear}},oi=ti;var kr=({ref:o,style:n,...e})=>{let r=react.useRef(null),t=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=R(e,t);return jsxRuntime.jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};kr.displayName="Zuz.Box";var c=kr;var Dr=react.forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=react.useState(false);return jsxRuntime.jsxs(c,{className:"--accordion flex cols",...t,children:[jsxRuntime.jsxs(z,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(c,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(c,{className:"--detail",children:r})]})});Dr.displayName="Zuz.Accordion";var li=Dr;var mi=({label:o,icon:n,onClick:e,idx:r,selected:t})=>jsxRuntime.jsx(z,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${t?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(Y,{name:n}):n}),Vr=mi;var Ar=react.forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(t||e[0].tag||0),a=react.useCallback(({x,y:h})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${h-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=react.useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",a));},[]);react.useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((x,h)=>h.label.length>x.length?h.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),l.current?.addEventListener("pointerenter",p));},[]);let{className:d,style:b,rest:w}=R(u);return jsxRuntime.jsxs(c,{ref:l,style:b,className:[`--actionbar flex aic ${d}`,`${!s||s==ee.Auto?"rel":`--${s}`}`].join(" ").trim(),...w,children:[e.map((x,h)=>jsxRuntime.jsx(Vr,{selected:m===x.tag||t==h,...x,idx:h},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(c,{className:"--tip abs",children:jsxRuntime.jsx(c,{className:"--track flex aic",children:e.map(({label:x})=>jsxRuntime.jsx(c,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Ar.displayName="Zuz.ActionBar";var di=Ar;var zr=react.forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...l}=o,{className:m,style:i,rest:a}=R(l);return jsxRuntime.jsxs(c,{className:`--alert --${e||le.Info} flex aic ${m}`.trim(),style:i,...a,children:[jsxRuntime.jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&O[e||le.Info]}),jsxRuntime.jsxs(c,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(H,{className:"--message",h:2,children:s})]})]})});zr.displayName="Zuz.Alert";var xi=zr;var _r=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:l,rest:m}=R(s),{variant:i}=X(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||i} flex ${l}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...m})};_r.displayName="Zuz.Input";var oe=_r;var Zr=o=>{let{meta:n,children:e}=o,r=hooks.useDelayed(),{label:t,icon:s,...u}=react.isValidElement(n)?{}:n,{className:l,style:m,rest:i}=R({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:m,className:l,children:n}):jsxRuntime.jsxs("li",{style:m,className:l,...i,children:[e,typeof n=="string"?n:t]})};Zr.displayName="Zuz.ListItem";var Kr=Zr;var Ur=react.forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...l}=o,{className:m,style:i,rest:a}=R(l),f=u==true?"ol":"ul";return react.createElement(f,{className:`--list --${r||W.Small} flex ${t??"cols"} ${m}`.trim(),style:i,ref:n,...a,children:e.map((p,d,b)=>{let w=`${typeof p=="string"?`li-${String(p)}`:react.isValidElement(p)?`li-${p.key}`||`${d}-${core.MD5(p.toString())}`:p.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Kr,{meta:p}),s&&b[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${w}`):null]},w)})})});Ur.displayName="Zuz.List";var Me=Ur;var qr=react.forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...l}=o,{className:m}=R({as:s||""}),{style:i}=R(l),[a,f]=react.useState(false),[p,d]=react.useState(t||[]),b=react.useRef(null),w=react.useRef(null),x=react.useRef(null),h=react.useMemo(()=>l.name||core.uuid(12),[]),[S,g]=react.useState(null),[v,I]=react.useState(null),[T,P]=react.useState([]),M=hooks.useDebounce(C=>{C.target.value==""?(f(false),d([])):r&&C.target.value.trim()!=""&&core.withPost(r,{query:C.target.value}).then(A=>{"items"in A&&core._(A.items).isArray()?(d(A.items),I(C.target.value),P(A.items)):console.error("Action Response should contain items array"),g(null);}).catch(A=>{g(null),d([]);});},250),L=()=>{if(w.current){let C=w.current.getBoundingClientRect(),A=window.innerHeight-C.bottom,$=C.top;if(x.current){let K=x.current;A<K.offsetHeight&&$>A?(K.style.top="auto",K.style.bottom=`${C.height}px`,K.style.maxHeight=`${$-150}px`):(K.style.top=`${C.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${A-150}px`);}}},V=C=>{if(p.length>0){if((C.key==="ArrowDown"||C.key==="ArrowUp")&&(C.preventDefault(),C.stopPropagation()),C.key==="Escape")g(null),f(false),d([]);else if(C.key==="ArrowDown")g(A=>{let $=A===null||A===p.length-1?0:A+1;return _($),$});else if(C.key==="ArrowUp")g(A=>{let $=A===null||A===0?p.length-1:A-1;return _($),$});else if(C.key==="Enter"&&S!==null){let A=p[S];b.current&&(b.current.value=A,f(false),d([]));}}},E=C=>{b.current&&(b.current.value=C,f(false),d([]));},_=C=>{let A=p[C];if(A&&b.current&&(b.current.value=A,b.current.setSelectionRange(A.length,A.length)),x.current){let K=x.current.children[C];K&&K.scrollIntoView({block:"nearest"});}},U=C=>{w.current&&!w.current.contains(C.target)&&(f(false),d([]));},k=()=>{b.current&&b.current.value===v&&(d(T),g(null),L());};return react.useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",U),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",U);}),[]),react.useEffect(()=>{L();},[p]),jsxRuntime.jsxs(c,{style:i,ref:w,className:`--autocomplete --${o.size||W.Small} flex aic rel ${m}`.trim(),children:[jsxRuntime.jsx(oe,{ref:b,autoComplete:"off",onChange:M,onKeyDown:V,onFocus:k,...l}),jsxRuntime.jsx(c,{className:"--arrow rel flex aic jcc",children:p.length>0?O.arrowUp:O.arrowDown}),p.length>0&&jsxRuntime.jsx(Me,{id:h,ref:x,className:"--suggestion-list flex cols abs",items:p.map((C,A)=>({label:C,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(C);},className:S===A?"--current":"",animate:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:core.clamp(.02*A,.02,.5)}}))})]})});qr.displayName="Zuz.AutoComplete";var Di=qr;var Xr=react.forwardRef((o,n)=>{let e=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:t,className:s,rest:u}=R(o,r);return !u.src||u.src==""?null:jsxRuntime.jsx("img",{ref:r,style:t,className:`${s} flex`,...u})});Xr.displayName="Zuz.Image";var Je=Xr;var Yr=react.forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:l,as:m,alt:i,color:a,style:f,...p}=o,[d,b,w]=hooks.useImage(e??"",s,u),{className:x,style:h,rest:S}=R({fx:l,as:m});return jsxRuntime.jsx(c,{className:`--avatar --${r||W.Small} --${(t||zo.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:a||"var(--primary)",...f,...h},...S,children:e?jsxRuntime.jsx(Je,{src:d,crossOrigin:s,referrerPolicy:u,...p}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Yr.displayName="Zuz.Avatar";var Zi=Yr;var Ki=({size:o=5,type:n="dead",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:l}=R(t);return jsxRuntime.jsxs(c,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsxRuntime.jsx(c,{fx:{transition:G.FadeIn,curve:F.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(ge,{})}),jsxRuntime.jsx(c,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Wi=Ki;var sl=[{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 o=new Date,n=o.getDay();return dateFns.addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return dateFns.format(dateFns.addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],al=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Qr=react.forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:l,rest:m}=R(s),[i,a]=react.useState(e||new Date),f=dateFns.startOfMonth(i),p=dateFns.endOfMonth(i),d=dateFns.startOfWeek(f),b=dateFns.endOfWeek(p),w=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:b}),[d,b]),x=g=>{t?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},S=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(c,{as:`--calendar flex --${r||"sm"} ${l}`,style:u,children:[jsxRuntime.jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:al(sl).map(g=>{let v=g.getDate();return jsxRuntime.jsxs(z,{onClick:()=>x(v),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:g.label}),jsxRuntime.jsx(H,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(c,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(H,{as:"flex:1 --calendar-cm bold",children:dateFns.format(i,"MMMM yyyy")}),jsxRuntime.jsx(z,{onClick:h,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(H,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),w.map((g,v)=>{let I=dateFns.isSameMonth(g,i),T=dateFns.isSameDay(g,i),P=dateFns.isToday(g);return jsxRuntime.jsx(z,{disabled:!I,onClick:()=>x(g),as:["--calendar-day --calendar-dd",`${T?"--calendar-dd-selected":""}`,`${P?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${v}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Qr.displayName="Zuz.Calendar";var io=Qr;var Jr=(n=>(n.Line="line",n))(Jr||{});var tn=react.forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:m,animated:i,animDuration:a=2,animDelay:f=0,padding:p=0,type:d,...b}=o,{className:w,style:x,rest:h}=R(b),S=react.useRef(null),g=hooks.useResizeObserver(S.current?.parentElement||S),v=typeof r=="number"?r:g.width,I=typeof t=="number"?t:g.height,T={width:v,height:I},P=react.useId(),{pathD:N,areaPathD:M}=hooks.useLineChart(e,T,p+(u||2)),L=react.useRef(null),V=react.useRef(null),[E,_]=react.useState(0),[U,k]=react.useState(0);return react.useEffect(()=>{i&&(L.current&&_(L.current.getTotalLength()),V.current&&k(V.current.getTotalLength()));},[i,N,M,v,I]),jsxRuntime.jsx(c,{ref:S,as:`--chart --${d||"line"}-chart ${w}`.trim(),style:{...x,width:r,height:t},...h,children:v>0&&I>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${v} ${I}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:P,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:l}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:m})]})}),jsxRuntime.jsx("path",{ref:V,d:M,fill:`url(#${P})`,stroke:"none",style:i?{strokeDasharray:U,strokeDashoffset:U}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:U,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:N,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:E,strokeDashoffset:E}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});tn.displayName="Zuz.Chart";var ul=tn;var on=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(on||{}),rn=(i=>(i.Image="img",i.Video="vid",i.Audio="audio",i.Link="link",i.Document="doc",i.Location="loc",i.Contact="contact",i.Event="event",i.Poll="poll",i))(rn||{});var sn=react.forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),react.useEffect(()=>{e&&u.current&&(t?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:l,style:m,rest:i}=R(s);return jsxRuntime.jsx(c,{className:`--progress ${t?"--animated":""} flex rel ${l}`.trim(),style:m,...i,children:jsxRuntime.jsx(c,{ref:u,className:"--bar rel"})})});sn.displayName="Zuz.ProgressBar";var mo=sn;var an=react.forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...m}=o,{className:i,style:a,rest:f}=R(m);return jsxRuntime.jsx(c,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxRuntime.jsxs(c,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(c,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(J,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(mo,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(c,{as:"--bubble-image",children:jsxRuntime.jsx(Je,{src:r.source})}):null:null,jsxRuntime.jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(u)}),t=="me"&&jsxRuntime.jsx(J,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});an.displayName="Zuz.Bubble";var bl=an;var ln=react.forwardRef((o,n)=>{let{style:e,className:r,rest:t}=R(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...t})});ln.displayName="Zuz.Label";var et=ln;var mn=react.forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:l,checked:m,onSwitch:i,...a}=o,[f,p]=react.useState(m||false),d=react.useRef(null),{variant:b}=X(true);return react.useImperativeHandle(n,()=>({setChecked(w,x=true){p(w),d.current&&(d.current.checked=w),x&&i&&i(w,s||"cb");},toggle(w=true){d.current&&(d.current.checked=!f),w&&i&&i&&i(!f,s||"cb"),p(!f);}})),jsxRuntime.jsxs(et,{className:`--${(t||ye.Default).toLowerCase()} ${!t||t==ye.Default?"--checkbox":"--switch"} --${l||b||W.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!t||t==ye.Default)&&O.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:w=>{i&&i(w.target.checked,s||"cb"),p(w.target.checked);}})]})});mn.displayName="Zuz.CheckBox";var tt=mn;var El=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:l,...m}=n,i=react.useRef(null),{className:a,style:f,rest:p}=R({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},i),d=react.useMemo(()=>{let w=new Set;return s.split(",").forEach(x=>{if(x.includes("-")){let[h,S]=x.split("-").map(Number);for(let g=h;g<=S;g++)w.add(g);}else x&&w.add(Number(x));}),w},[s]),b=react.useMemo(()=>{let w=e.split(`
10
- `);for(;w.length>0&&w[0].trim()==="";)w.shift();for(;w.length>0&&w[w.length-1].trim()==="";)w.pop();let x=w[0]?.match(/^\s*/)?.[0].length||0,h=w.map(g=>{let v=g.match(/^\s*/)?.[0].length||0,I=Math.min(v,x);return g.slice(I)}),S=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(&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 h.map((g,v)=>{let I=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),T=d.has(v+1),P=[];S.forEach(N=>{I=I.replace(N.re,M=>{let L=`ZUZ_ID_${P.length}_ZUZ`;return P.push(`<span class="--token-${N.name}">${M}</span>`),L});});for(let N=P.length-1;N>=0;N--)I=I.replace(`ZUZ_ID_${N}_ZUZ`,P[N]);return `<div class="--code-line ${t==true?"--with-ln":""} ${T?"--is-highlighted":""}">
9
+ document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(zt,{children:o})]})},Xo=(o,n)=>{if(Gs)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Qo=({ref:o,...n})=>{let{style:e,...r}=n,{style:t,className:s,rest:u}=I(r);return jsxRuntime.jsx("span",{ref:o,style:e,className:s,...u})};Qo.displayName="Zuz.Span";var J=Qo;var jo=react.forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:l}=X(true),{className:m,style:i,rest:a}=I(u);return jsxRuntime.jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${t||l||W.Small} ${m}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,p)=>jsxRuntime.jsx(J,{className:`path${p+1}`},`${e}-layer-${p}`))})});jo.displayName="Zuz.Icon";var Y=jo;var re={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var er=o=>{let{type:n,variant:e,color:r,...t}=o,{className:s,style:u,rest:l}=I(t),{spinner:m}=X(true),i=()=>{switch(n||m?.type||re.Simple){case re.Simple:return null;case re.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{as:"--bar --bar1"}),jsxRuntime.jsx(c,{as:"--bar --bar2"}),jsxRuntime.jsx(c,{as:"--bar --bar3"})]});case re.Roller:return null}};return jsxRuntime.jsx(c,{className:`${s} --spinner --${(n||m?.type||re.Simple).toLowerCase()} --${e||m?.variant||W.Small}`.trim(),style:{...u},...l,children:i()})};er.displayName="Zuz.Spinner";var ge=er;var ft={Loading:"loading",Normal:"normal"};var or=({ref:o,...n})=>{let{reset:e,kind:r="solid",variant:t,icon:s,iconSize:u,children:l,withLabel:m,spinner:i,state:a,disabled:f,...p}=n,{style:d,className:y,rest:w}=I(p),{variant:b}=X(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${t||b} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${y}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:a==ft.Loading||n.skeleton?.enabled||f,...w,children:[a==ft.Loading&&jsxRuntime.jsx(ge,{variant:t||b,type:i||re.Simple}),(!a||a==ft.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(Y,{variant:u,name:s}),m===true?jsxRuntime.jsx(J,{children:l}):l]})]})};or.displayName="Zuz.Button";var z=or;var nr=react.forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:l,className:m,rest:i}=I(u),a=`h${o.h||1}`;return jsxRuntime.jsx(a,{ref:n,style:l,className:m,...i,children:r?jsxRuntime.jsx(J,{dangerouslySetInnerHTML:{__html:r}}):t})});nr.displayName="Zuz.Text";var H=nr;var ra=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:l}=o;return n=="-"?jsxRuntime.jsx(c,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:m=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsxRuntime.jsx(c,{as:"--icon",children:jsxRuntime.jsx(Y,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},sr=ra;var lr=({ref:o,...n})=>{let{id:e,as:r,fx:t,offsetX:s,offsetY:u,parent:l,event:m,arrow:i,when:a,items:f,header:p,footer:d,origin:y=Ke.TopRight,...w}=n,[b,h]=react.useState(false),[S,g]=react.useState(f||[]),{position:v,targetRef:R,calculatedAnchor:T}=hooks.useAnchorPosition(l?.current,m,{offsetX:s,offsetY:u,preferredAnchor:y}),N=l&&v.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",M=react.useMemo(()=>{let k=T.toLowerCase();return k.includes("left")?"--arrow-left":k.includes("right")?"--arrow-right":"--arrow-center"},[T]),L=v.top!==0||v.left!==0;react.useEffect(()=>{a&&L?h(true):a||h(false);},[a,L]);let{className:V,style:E,rest:_}=I(w),U=ae({...t?.transition?{transition:t.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:t?.curve??F.EaseInOut,duration:t?.duration??.05,when:b&&L});return jsxRuntime.jsxs(c,{ref:R,className:`--contextmenu ${i||l!=null?`--has-arrow ${N} ${M}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!b,style:{...E,...U.style,top:v.top,left:v.left,visibility:L?"visible":"hidden",transformOrigin:T},..._,children:[typeof p=="function"?react.createElement(p):p,S.map((k,C)=>jsxRuntime.jsx(sr,{...k,index:C},`context-${k.label.toLowerCase()}-${C}`)),typeof d=="function"?react.createElement(d):d]})};lr.displayName="Zuz.ContextMenu";var Ft=lr;var mr=react.forwardRef((o,n)=>{let{children:e,fx:r,when:t,fxDelay:s,fxStep:u,classToIgnore:l,...m}=o,i=X(true),a=hooks.useDelayed(),f=r||i?.group?.fx,p=s||i?.group?.fxDelay,d=u||i?.group?.fxStep,y=l||i?.group?.classToIgnore||"--ignore",w=react.useMemo(()=>f?react$1.addPropsToChildren(e,b=>{if(b.type===react.Fragment)return false;let h=b.props||{},S="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",v=typeof g=="string"&&g.includes(y);return !S&&!v},b=>({fx:{...f,delay:(p||0)+b*(d||.1),when:t??(r?.when||a)}})):e,[e,t,a,f]);return jsxRuntime.jsx(c,{className:"--group",ref:n,...m,children:w})});mr.displayName="Zuz.Group";var Zt=mr;var pr=react.forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:l,...m}=o,{className:i,style:a,rest:f}=I(m),{spinner:p}=X(true);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(Zt,{fx:{transition:G.SlideInBottom,curve:F.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:t||p?.variant||W.Small,type:r||p?.type||re.Simple}),!l&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});pr.displayName="Zuz.Cover";var Ne=pr;var ur=react.forwardRef((o,n)=>{let{when:e,...r}=o;return jsxRuntime.jsx(c,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...r})});ur.displayName="Zuz.Overlay";var Ee=ur;var wa=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),fr=wa;var Sa=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(c,{as:`--footer flex aic rel ${n?n==Fo.Center?"jcc":"":"jce"}`.trim(),children:o.map((t,s)=>jsxRuntime.jsx(z,{variant:r,onClick:u=>t.handler?t.handler():t.onClick?t.onClick():console.log("onClick Handler missing"),as:"--action",children:t.label},`dialog-${e}-action-${t.key}`))}),gr=Sa;var Ca={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"})," "]}),[le.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"})}),[le.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"})}),[le.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"})}),[le.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},O=Ca;var Ta=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(c,{as:"--head flex aic rel",children:[jsxRuntime.jsx(c,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(z,{onClick:e=>n(),className:"--closer abs center-v",children:O.close})]}),xr=Ta;var Sr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:l,speed:m,type:i,action:a,actionPosition:f,spinner:p,loadingMessage:d,variant:y,inBackground:w,forceClose:b,onClose:h,onShow:S,onHide:g,...v}=n,R=react.useMemo(()=>core.uuid(12),[]),[T,P]=react.useState(t||""),[N,M]=react.useState(s||""),[L,V]=react.useState(i||He.Dialog),[E,_]=react.useState(false),[U,k]=react.useState(true),[C,A]=react.useState(a||null),[$,K]=react.useState(false),{variant:D,spinner:Z,dialog:q}=X(true),te=y||q?.variant||D||W.Small,{style:j,className:pe,rest:de}=I(v),Nt=react.useRef(null),Et=ae({when:E,duration:m||q?.speed||.3,delay:q?.delay||.1,transition:u||q?.transition||G.SlideInBottom,curve:l||q?.curve||F.EaseInOut,watch:["scale","filter","transform"]}),Ie=()=>{_(false),h(r);};react.useEffect(()=>{V(He.Dialog),M(s),P(T),C&&A(C.reduce((Q,Ho)=>(Q.push({...Ho,key:Ho.key||core.uuid(12)}),Q),[])),_(true),setTimeout(()=>S?S():()=>{},500);},[]),react.useEffect(()=>{b&&Ie();},[b]);let ne=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{style:{zIndex:ne},when:E}),jsxRuntime.jsxs(c,{as:`--dialog --${(i??He.Default).toLowerCase()} ${E?"--visible":""} ${pe} fixed abc`.trim(),style:{...Et.style,zIndex:ne+1,pointerEvents:w==true?"none":"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...de,ref:Nt,children:[jsxRuntime.jsx(Ne,{when:$,spinner:p||q?.spinner||Z?.type||re.Simple,message:d||q?.loadingMessage}),jsxRuntime.jsx(xr,{title:T,onClose:Ie}),jsxRuntime.jsx(fr,{message:N,render:U,action:C}),C&&C.length>0&&jsxRuntime.jsx(gr,{variant:te,action:C,dialogID:R,actionPosition:f})]})]})};Sr.displayName="Zuz.Dialog";var Kt=Sr;var Wt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},qe=new Wt;var Cr=react.forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:m,onScrollY:i,onScrollX:a}=hooks.useScrollbar(e||1),{style:f,className:p,rest:d}=I(t);return react.useEffect(()=>{let y=u.current;if(!y)return;let w=()=>{window.dispatchEvent(new Event("resize"));};return y.addEventListener("scroll",w),()=>y.removeEventListener("scroll",w)},[]),jsxRuntime.jsxs(c,{ref:s,className:p.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(c,{as:`--scroll-content ${p}`.trim(),ref:u,style:r||{},children:d.children}),jsxRuntime.jsx(c,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:l,onMouseDown:i})}),jsxRuntime.jsx(c,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})})]})});Cr.displayName="Zuz.ScrollView";var Ut=Cr;var Pr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:l,animation:m,prerender:i,inBackground:a,forceClose:f,onClose:p,...d}=n,{drawer:y}=X(true),[w,b]=react.useState(u),[h,S]=react.useState(false),[g,v]=react.useState(i??(y?.prerender||true)),R=()=>{S(false),p?.(e??-1);},{className:T,style:P,rest:N}=I(d),M=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(R)&&R();}}],[h]);hooks.useShortcuts(M),react.useEffect(()=>{b(u);},[u]),react.useEffect(()=>(h?qe.push(R):qe.pop(R),()=>qe.pop(R)),[h]),react.useEffect(()=>{S(true);},[]),react.useEffect(()=>{f&&R();},[f]);let L=t||y?.from||se.Left,V=react.useMemo(()=>{switch(L){case se.Left:return {from:{x:"-100vw"},to:{x:0}};case se.Right:return {from:{x:"100vw"},to:{x:0}};case se.Top:return {from:{y:"-100vh"},to:{y:0}};case se.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,y?.from]),E=ae({from:{...V.from,opacity:0},to:{...V.to,opacity:1},when:h,curve:m||y?.animation||F.EaseInOut,duration:s||y?.speed||.5,watch:["scale","filter"]}),_=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{onClick:U=>{h&&R();},when:h,style:{zIndex:_}}),jsxRuntime.jsxs(c,{ref:o,"aria-hidden":!h,className:`--drawer flex cols ${T} --${L.toLowerCase()} fixed`,style:{...P,...E.style,"--m":`${l||y?.margin||0}px`,zIndex:_+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...N,children:[t==se.Top||t==se.Bottom?jsxRuntime.jsx(c,{className:"--handle"}):null,jsxRuntime.jsx(Ut,{children:g||h?w:null})]})]})};Pr.displayName="Zuz.Drawer";var Yt=Pr;var Rr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Rr||{}),Ir={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Ha=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:l})=>{let m=hooks.useDelayed(),i=hooks.useDelayed(((u||4)-1)*1e3),{toast:a}=X(true),f=ae({when:m&&!i,duration:a?.duration||.2,transition:G.SlideInTop,curve:a?.curve||F.EaseInOut});return react.useEffect(()=>{i&&n&&l?.(n);},[i,n]),jsxRuntime.jsxs(c,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(c,{as:"--ico flex aic jcc",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.2,when:m&&!i},children:r?jsxRuntime.jsx(Y,{name:r,fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}}):jsxRuntime.jsx(c,{as:"--no-icon",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}})}),jsxRuntime.jsxs(c,{as:"--meta",children:[jsxRuntime.jsx(H,{as:"--tt",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.3,when:m},children:t||Ir[e]}),jsxRuntime.jsx(H,{as:"--tm",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.4,duration:.5,when:m},children:s})]})]})},Qt=Ha;var ce=react.createContext(null),Fa=({ref:o,...n})=>{let r=react.useContext(ce)?.depth??0,[t,s]=react.useState(null),[u,l]=react.useState(false),[m,i]=react.useState([]),a=hooks.useDelayed(),f=react.useRef(0),p=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};react.useImperativeHandle(o,()=>({add(h){let S=p(),g={id:S,...h};return i(v=>[...v,g]),S},openMenu(h){l(false),setTimeout(()=>{s({id:p(),type:"menu",props:h}),l(true);},16);},remove(h){i(S=>S.map(g=>g.id===h?{...g,props:{...g.props,forceClose:true}}:g)),t?.id===h&&d();},clear(){i([]);}})),react.useEffect(()=>{if(t&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,d]);let y=h=>{setTimeout(()=>{i(S=>S.filter(g=>g.id!==h)),t?.id===h&&s(null);},250);},w=react.useMemo(()=>[...m.filter(h=>h.type!="toast")],[m]);if(!a)return null;let b=m.filter(h=>h.type=="toast").reverse();return reactDom.createPortal(jsxRuntime.jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[w.map((h,S)=>{let g=S<w.length-1;return h.type==="dialog"?jsxRuntime.jsx(Kt,{onClose:y,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(Yt,{onClose:y,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),b.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:b.map((h,S)=>jsxRuntime.jsx(Qt,{onClose:y,index:S,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsxRuntime.jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(Ft,{onClose:d,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},Za=({children:o})=>{let n=react.useContext(ce),e=n?n.depth+1:0,r=react.useRef(null),t=react.useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),clear:()=>r.current?.clear(),depth:e,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(ce.Provider,{value:t,children:[o,jsxRuntime.jsx(Fa,{ref:r})]})},zt=Za;var Wa=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t);return {clearAll:n,show:t=>{let s=o.add({type:"dialog",props:{...t,type:He.Dialog}});return {id:s,hide:()=>e(s)}},hide:e}},Ua=Wa;var qa=()=>{let o=react.useContext(ce);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,a)=>o.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,p)=>n("default",{title:i,message:a,icon:f,duration:p}),hide:i=>o.remove(i),success:(i,a,f,p)=>n("success",{title:i,message:a,icon:f,duration:p}),error:(i,a,f,p)=>n("error",{title:i,message:a,icon:f,duration:p}),warn:(i,a,f,p)=>n("warn",{title:i,message:a,icon:f,duration:p}),promise:(i,a,f,p)=>n("promise",{title:i,message:a,icon:f,duration:p}),clearAll:()=>o.clear()}},jt=qa;var Ya=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>{let s=o.add({type:"drawer",props:t});return {id:s,close:()=>e(s)}};return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:se.Right}),left:t=>r({children:t,from:se.Left}),top:t=>r({children:t,from:se.Top}),bottom:t=>r({children:t,from:se.Bottom}),close:e}},Qa=Ya;var ja=(o,n,e={})=>{let[r,t]=react.useState(null),[s,u]=react.useState(false),{duration:l=.25,curve:m=F.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return react.useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ae({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:m,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},ei=ja;var oi=()=>{let o=react.useContext(ce);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,t,s)=>{r.preventDefault(),o.openMenu({event:r,items:t,origin:s});},showMenu:(r,{items:t,origin:s,offsetX:u,offsetY:l,transition:m,curve:i,arrow:a,duration:f,header:p,footer:d})=>{o.openMenu({fx:{transition:m,curve:i,duration:f},parent:r,items:t,origin:s||Ke.TopCenter,offsetX:u,offsetY:l,arrow:a,header:p,footer:d});},hide:o.clear}},ri=oi;var Dr=({ref:o,style:n,...e})=>{let r=react.useRef(null),t=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=I(e,t);return jsxRuntime.jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};Dr.displayName="Zuz.Box";var c=Dr;var Vr=react.forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=react.useState(false);return jsxRuntime.jsxs(c,{className:"--accordion flex cols",...t,children:[jsxRuntime.jsxs(z,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(c,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(c,{className:"--detail",children:r})]})});Vr.displayName="Zuz.Accordion";var mi=Vr;var ci=({label:o,icon:n,onClick:e,idx:r,selected:t})=>jsxRuntime.jsx(z,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${t?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(Y,{name:n}):n}),$r=ci;var zr=react.forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(t||e[0].tag||0),a=react.useCallback(({x:b,y:h})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${b-S.left}`),document.documentElement.style.setProperty("--tip-y",`${h-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=react.useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",a));},[]);react.useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((b,h)=>h.label.length>b.length?h.label:b,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),l.current?.addEventListener("pointerenter",p));},[]);let{className:d,style:y,rest:w}=I(u);return jsxRuntime.jsxs(c,{ref:l,style:y,className:[`--actionbar flex aic ${d}`,`${!s||s==ee.Auto?"rel":`--${s}`}`].join(" ").trim(),...w,children:[e.map((b,h)=>jsxRuntime.jsx($r,{selected:m===b.tag||t==h,...b,idx:h},`actionbar-action-${b.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(c,{className:"--tip abs",children:jsxRuntime.jsx(c,{className:"--track flex aic",children:e.map(({label:b})=>jsxRuntime.jsx(c,{className:"--lb",children:b},`tool-tip-${b.toLowerCase().replace(/\s+/g,"-")}`))})})]})});zr.displayName="Zuz.ActionBar";var gi=zr;var Fr=react.forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...l}=o,{className:m,style:i,rest:a}=I(l);return jsxRuntime.jsxs(c,{className:`--alert --${e||le.Info} flex aic ${m}`.trim(),style:i,...a,children:[jsxRuntime.jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&O[e||le.Info]}),jsxRuntime.jsxs(c,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(H,{className:"--message",h:2,children:s})]})]})});Fr.displayName="Zuz.Alert";var yi=Fr;var Zr=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:l,rest:m}=I(s),{variant:i}=X(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||i} flex ${l}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...m})};Zr.displayName="Zuz.Input";var oe=Zr;var Wr=o=>{let{meta:n,children:e}=o,r=hooks.useDelayed(),{label:t,icon:s,...u}=react.isValidElement(n)?{}:n,{className:l,style:m,rest:i}=I({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:m,className:l,children:n}):jsxRuntime.jsxs("li",{style:m,className:l,...i,children:[e,typeof n=="string"?n:t]})};Wr.displayName="Zuz.ListItem";var Ur=Wr;var qr=react.forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...l}=o,{className:m,style:i,rest:a}=I(l),f=u==true?"ol":"ul";return react.createElement(f,{className:`--list --${r||W.Small} flex ${t??"cols"} ${m}`.trim(),style:i,ref:n,...a,children:e.map((p,d,y)=>{let w=`${typeof p=="string"?`li-${String(p)}`:react.isValidElement(p)?`li-${p.key}`||`${d}-${core.MD5(p.toString())}`:p.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Ur,{meta:p}),s&&y[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${w}`):null]},w)})})});qr.displayName="Zuz.List";var Me=qr;var Yr=react.forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...l}=o,{className:m}=I({as:s||""}),{style:i}=I(l),[a,f]=react.useState(false),[p,d]=react.useState(t||[]),y=react.useRef(null),w=react.useRef(null),b=react.useRef(null),h=react.useMemo(()=>l.name||core.uuid(12),[]),[S,g]=react.useState(null),[v,R]=react.useState(null),[T,P]=react.useState([]),M=hooks.useDebounce(C=>{C.target.value==""?(f(false),d([])):r&&C.target.value.trim()!=""&&core.withPost(r,{query:C.target.value}).then(A=>{"items"in A&&core._(A.items).isArray()?(d(A.items),R(C.target.value),P(A.items)):console.error("Action Response should contain items array"),g(null);}).catch(A=>{g(null),d([]);});},250),L=()=>{if(w.current){let C=w.current.getBoundingClientRect(),A=window.innerHeight-C.bottom,$=C.top;if(b.current){let K=b.current;A<K.offsetHeight&&$>A?(K.style.top="auto",K.style.bottom=`${C.height}px`,K.style.maxHeight=`${$-150}px`):(K.style.top=`${C.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${A-150}px`);}}},V=C=>{if(p.length>0){if((C.key==="ArrowDown"||C.key==="ArrowUp")&&(C.preventDefault(),C.stopPropagation()),C.key==="Escape")g(null),f(false),d([]);else if(C.key==="ArrowDown")g(A=>{let $=A===null||A===p.length-1?0:A+1;return _($),$});else if(C.key==="ArrowUp")g(A=>{let $=A===null||A===0?p.length-1:A-1;return _($),$});else if(C.key==="Enter"&&S!==null){let A=p[S];y.current&&(y.current.value=A,f(false),d([]));}}},E=C=>{y.current&&(y.current.value=C,f(false),d([]));},_=C=>{let A=p[C];if(A&&y.current&&(y.current.value=A,y.current.setSelectionRange(A.length,A.length)),b.current){let K=b.current.children[C];K&&K.scrollIntoView({block:"nearest"});}},U=C=>{w.current&&!w.current.contains(C.target)&&(f(false),d([]));},k=()=>{y.current&&y.current.value===v&&(d(T),g(null),L());};return react.useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",U),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",U);}),[]),react.useEffect(()=>{L();},[p]),jsxRuntime.jsxs(c,{style:i,ref:w,className:`--autocomplete --${o.size||W.Small} flex aic rel ${m}`.trim(),children:[jsxRuntime.jsx(oe,{ref:y,autoComplete:"off",onChange:M,onKeyDown:V,onFocus:k,...l}),jsxRuntime.jsx(c,{className:"--arrow rel flex aic jcc",children:p.length>0?O.arrowUp:O.arrowDown}),p.length>0&&jsxRuntime.jsx(Me,{id:h,ref:b,className:"--suggestion-list flex cols abs",items:p.map((C,A)=>({label:C,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(C);},className:S===A?"--current":"",animate:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:core.clamp(.02*A,.02,.5)}}))})]})});Yr.displayName="Zuz.AutoComplete";var Hi=Yr;var Qr=react.forwardRef((o,n)=>{let e=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:t,className:s,rest:u}=I(o,r);return !u.src||u.src==""?null:jsxRuntime.jsx("img",{ref:r,style:t,className:`${s} flex`,...u})});Qr.displayName="Zuz.Image";var Je=Qr;var Jr=react.forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:l,as:m,alt:i,color:a,style:f,...p}=o,[d,y,w]=hooks.useImage(e??"",s,u),{className:b,style:h,rest:S}=I({fx:l,as:m});return jsxRuntime.jsx(c,{className:`--avatar --${r||W.Small} --${(t||_o.Circle).toLowerCase()} rel flex aic jcc ${b}`.trim(),style:{background:a||"var(--primary)",...f,...h},...S,children:e?jsxRuntime.jsx(Je,{src:d,crossOrigin:s,referrerPolicy:u,...p}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Jr.displayName="Zuz.Avatar";var Ki=Jr;var Wi=({size:o=5,type:n="dead",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:l}=I(t);return jsxRuntime.jsxs(c,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsxRuntime.jsx(c,{fx:{transition:G.FadeIn,curve:F.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(ge,{})}),jsxRuntime.jsx(c,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Ui=Wi;var al=[{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 o=new Date,n=o.getDay();return dateFns.addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return dateFns.format(dateFns.addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],il=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},jr=react.forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:l,rest:m}=I(s),[i,a]=react.useState(e||new Date),f=dateFns.startOfMonth(i),p=dateFns.endOfMonth(i),d=dateFns.startOfWeek(f),y=dateFns.endOfWeek(p),w=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:y}),[d,y]),b=g=>{t?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},S=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(c,{as:`--calendar flex --${r||"sm"} ${l}`,style:u,children:[jsxRuntime.jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:il(al).map(g=>{let v=g.getDate();return jsxRuntime.jsxs(z,{onClick:()=>b(v),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:g.label}),jsxRuntime.jsx(H,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(c,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(H,{as:"flex:1 --calendar-cm bold",children:dateFns.format(i,"MMMM yyyy")}),jsxRuntime.jsx(z,{onClick:h,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(H,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),w.map((g,v)=>{let R=dateFns.isSameMonth(g,i),T=dateFns.isSameDay(g,i),P=dateFns.isToday(g);return jsxRuntime.jsx(z,{disabled:!R,onClick:()=>b(g),as:["--calendar-day --calendar-dd",`${T?"--calendar-dd-selected":""}`,`${P?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${v}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});jr.displayName="Zuz.Calendar";var io=jr;var en=(n=>(n.Line="line",n))(en||{});var rn=react.forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:m,animated:i,animDuration:a=2,animDelay:f=0,padding:p=0,type:d,...y}=o,{className:w,style:b,rest:h}=I(y),S=react.useRef(null),g=hooks.useResizeObserver(S.current?.parentElement||S),v=typeof r=="number"?r:g.width,R=typeof t=="number"?t:g.height,T={width:v,height:R},P=react.useId(),{pathD:N,areaPathD:M}=hooks.useLineChart(e,T,p+(u||2)),L=react.useRef(null),V=react.useRef(null),[E,_]=react.useState(0),[U,k]=react.useState(0);return react.useEffect(()=>{i&&(L.current&&_(L.current.getTotalLength()),V.current&&k(V.current.getTotalLength()));},[i,N,M,v,R]),jsxRuntime.jsx(c,{ref:S,as:`--chart --${d||"line"}-chart ${w}`.trim(),style:{...b,width:r,height:t},...h,children:v>0&&R>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${v} ${R}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:P,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:l}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:m})]})}),jsxRuntime.jsx("path",{ref:V,d:M,fill:`url(#${P})`,stroke:"none",style:i?{strokeDasharray:U,strokeDashoffset:U}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:U,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:N,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:E,strokeDashoffset:E}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});rn.displayName="Zuz.Chart";var fl=rn;var nn=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(nn||{}),sn=(i=>(i.Image="img",i.Video="vid",i.Audio="audio",i.Link="link",i.Document="doc",i.Location="loc",i.Contact="contact",i.Event="event",i.Poll="poll",i))(sn||{});var ln=react.forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),react.useEffect(()=>{e&&u.current&&(t?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:l,style:m,rest:i}=I(s);return jsxRuntime.jsx(c,{className:`--progress ${t?"--animated":""} flex rel ${l}`.trim(),style:m,...i,children:jsxRuntime.jsx(c,{ref:u,className:"--bar rel"})})});ln.displayName="Zuz.ProgressBar";var mo=ln;var mn=react.forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...m}=o,{className:i,style:a,rest:f}=I(m);return jsxRuntime.jsx(c,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxRuntime.jsxs(c,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(c,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(J,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(mo,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(c,{as:"--bubble-image",children:jsxRuntime.jsx(Je,{src:r.source})}):null:null,jsxRuntime.jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(u)}),t=="me"&&jsxRuntime.jsx(J,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});mn.displayName="Zuz.Bubble";var wl=mn;var cn=react.forwardRef((o,n)=>{let{style:e,className:r,rest:t}=I(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...t})});cn.displayName="Zuz.Label";var et=cn;var pn=react.forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:l,checked:m,onSwitch:i,...a}=o,[f,p]=react.useState(m||false),d=react.useRef(null),{variant:y}=X(true);return react.useImperativeHandle(n,()=>({setChecked(w,b=true){p(w),d.current&&(d.current.checked=w),b&&i&&i(w,s||"cb");},toggle(w=true){d.current&&(d.current.checked=!f),w&&i&&i&&i(!f,s||"cb"),p(!f);}})),jsxRuntime.jsxs(et,{className:`--${(t||ye.Default).toLowerCase()} ${!t||t==ye.Default?"--checkbox":"--switch"} --${l||y||W.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!t||t==ye.Default)&&O.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:w=>{i&&i(w.target.checked,s||"cb"),p(w.target.checked);}})]})});pn.displayName="Zuz.CheckBox";var tt=pn;var Bl=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:l,...m}=n,i=react.useRef(null),{className:a,style:f,rest:p}=I({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},i),d=react.useMemo(()=>{let w=new Set;return s.split(",").forEach(b=>{if(b.includes("-")){let[h,S]=b.split("-").map(Number);for(let g=h;g<=S;g++)w.add(g);}else b&&w.add(Number(b));}),w},[s]),y=react.useMemo(()=>{let w=e.split(`
10
+ `);for(;w.length>0&&w[0].trim()==="";)w.shift();for(;w.length>0&&w[w.length-1].trim()==="";)w.pop();let b=w[0]?.match(/^\s*/)?.[0].length||0,h=w.map(g=>{let v=g.match(/^\s*/)?.[0].length||0,R=Math.min(v,b);return g.slice(R)}),S=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(&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 h.map((g,v)=>{let R=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),T=d.has(v+1),P=[];S.forEach(N=>{R=R.replace(N.re,M=>{let L=`ZUZ_ID_${P.length}_ZUZ`;return P.push(`<span class="--token-${N.name}">${M}</span>`),L});});for(let N=P.length-1;N>=0;N--)R=R.replace(`ZUZ_ID_${N}_ZUZ`,P[N]);return `<div class="--code-line ${t==true?"--with-ln":""} ${T?"--is-highlighted":""}">
11
11
  ${t==true?`<span class="--line-number">${v+1}</span>`:""}
12
- <span class="--line-content">${I||" "}</span>
13
- </div>`}).join("")},[e,d]);return jsxRuntime.jsx(c,{as:`--code-block ${a}`,style:f,...m,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:b}})})})},Bl=El;var pn=({onSelect:o,meta:n,selected:e})=>{let r=react.useRef(null),{index:t,icon:s,label:u}=n,[l,m]=react.useState({x:0,width:0}),i=hooks.useDelayed();return react.useLayoutEffect(()=>{if(i&&r.current){let{width:a,x:f}=r.current.getBoundingClientRect();m({x:f,width:a}),e&&o(t,a,f,n,true);}},[i,r.current]),react.useEffect(()=>{e&&o(t,l.width,l.x,n,false);},[e]),jsxRuntime.jsxs(z,{onClick:()=>o(t,l.width,l.x,n,false),ref:r,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(Y,{name:s,as:"--segment-icon"}):jsxRuntime.jsx(c,{as:"--segment-icon flex aic jcc",children:s}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(c,{className:"--segment-label",children:u||`Item ${t}`})]})};pn.displayName="SelectTabItem";var un=pn;var dn=react.forwardRef((o,n)=>{let{fx:e,items:r,selected:t,variant:s,onSwitch:u,...l}=o,[m,i]=react.useState(t||0),a=react.useRef(false),f=react.useRef(m),{className:p,style:d,rest:b}=R(l),w=react.useRef(null),x=react.useRef(null),{variant:h}=X(true),S=(g,v,I,T,P)=>{if((P||m!=g&&m!=-2)&&(i(g),f.current=m,a.current&&u?.(T)),w.current){let N=x.current?.getBoundingClientRect();w.current.style.setProperty("--w",`${v}px`),w.current.style.setProperty("--x",`${N?I-N.left:I}px`);}};return react.useImperativeHandle(n,()=>({setSelected:g=>{typeof g=="number"&&g!=m&&i(g);}}),[m]),react.useEffect(()=>{a.current=true;},[]),jsxRuntime.jsxs(c,{ref:x,"data-selected":m,className:`${p} --segmented --${s||h||W.Medium} flex aic rel`,style:d,...b,children:[jsxRuntime.jsx(c,{ref:w,className:"--segment-tab abs"}),r.map((g,v)=>jsxRuntime.jsx(un,{onSelect:S,selected:m==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});dn.displayName="Zuz.SelectTabs";var ot=dn;var xn=react.forwardRef((o,n)=>{let{type:e,...r}=o,t=hooks.useDelayed(),{colorScheme:s,setColorScheme:u}=At(),l=react.useCallback(()=>{u(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:m,style:i}=R(r),a=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !t||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(ot,{className:`--color-scheme --${e}`,onSwitch:({tag:p})=>{u(p);},selected:f,items:a,...r}):jsxRuntime.jsx(z,{onClick:l,style:i,as:`--color-scheme-switch --${r.variant||W.Small} ${m}`.trim(),children:s=="system"?O.colorSchemeSystem:s=="light"?O.colorSchemeLight:O.colorSchemeDark})});xn.displayName="Zuz.ColorScheme";var Wl=xn;var bn=react.forwardRef((o,n)=>{let[e,r]=react.useState("wait"),{title:t,message:s,acceptLabel:u,rejectLabel:l,position:m}=o,i=async a=>{r(a==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(a));};return react.useEffect(()=>{let a=localStorage.getItem("--ccnt");r(a?a=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(c,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:F.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${m||ee.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:t||"This site uses cookies"}),jsxRuntime.jsx(H,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(c,{as:"--footer flex aic",children:[jsxRuntime.jsx(z,{onClick:a=>i(1),as:"--accept",children:u||"Accept All"}),jsxRuntime.jsx(z,{onClick:a=>i(0),as:"--reject",children:l||"Cancel"})]})]})});bn.displayName="Zuz.CookiesConsent";var Xl=bn;var Sn=react.forwardRef((o,n)=>{let {type:e,value:r,min:t,max:s,step:u,onChange:l,roundValue:m,...i}=o,{className:a,style:f,rest:p}=R(i),d=react.useRef(u||.01).current,b=react.useRef(t||0).current,w=react.useRef(s||1).current,x=react.useRef(r||0).current,h=react.useRef(null),S=react.useRef(null),g=react.useRef(null);react.useRef(null);let I=react.useRef(null),T=react.useRef(null),P=($,K,D)=>($-K)/(D-K)*100,N=$=>{if(S.current){let K=parseFloat($.currentTarget.value),D=P(K,parseFloat($.currentTarget.min),parseFloat($.currentTarget.max));S.current.style.setProperty("--value",`${D}`),S.current.setAttribute("data-value",`${K}`),l&&l(m?+K.toFixed(2):K);}},[M,L]=react.useState(false),[V,E]=react.useState(0),[_,U]=react.useState(0),k=$=>{L(true),E($.clientX),U(S.current?parseFloat(S.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},C=$=>{if(M){let K=$.clientX-V,D=Math.max(b,Math.min(_+K*d,w));S.current&&(S.current.setAttribute("data-value",`${D}`),T.current.textContent=m?D.toFixed(2):D.toString(),l&&l(m?+D.toFixed(2):D));}},A=()=>{L(false),document.body.style.cursor="auto";};return react.useEffect(()=>{S.current&&S.current.style.setProperty("--value",h.current?`${P(parseFloat(h.current.value),parseFloat(h.current.min),parseFloat(h.current.max))}`:x.toString());},[]),react.useEffect(()=>(M?(document.addEventListener("mousemove",C),document.addEventListener("mouseup",A)):(document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A)),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A);}),[M]),jsxRuntime.jsx(c,{ref:S,"data-value":x||0,className:`--slider --${e||mt.Default} flex rel ${a}`.trim(),style:{...f},children:mt.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(H,{ref:T,onMouseDown:k,className:"--slider-text",children:x||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{ref:I,className:"--slider-track abs fill"}),jsxRuntime.jsx(c,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:h,onInput:N,className:"abs fill",tabIndex:0,type:e||mt.Default,defaultValue:x||0,step:d,max:w,min:b})]})})});Sn.displayName="Zuz.Slider";var go=Sn;var Tn=react.forwardRef((o,n)=>{let{src:e,shape:r,size:t,...s}=o,{style:u,className:l,rest:m}=R(s),{canvasRef:i,crop:a,setScale:f,handleMouseDown:p,handleMouseUp:d,handleMouseMove:b}=hooks.useImageCropper(e,t||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return a()},setScale(w){f(w);}})),jsxRuntime.jsxs(c,{as:`--cropper --${r||hooks.CropShape.Circle} ${l}`,style:u,...m,children:[jsxRuntime.jsx("canvas",{ref:i,width:t||200,height:t||200,onMouseDown:p,onMouseUp:d,onMouseLeave:d,onMouseMove:b}),jsxRuntime.jsx(c,{as:"--cropper-slider",children:jsxRuntime.jsx(go,{onChange:w=>f(w),min:0,max:1,step:.01,value:1})})]})});Tn.displayName="Zuz.Cropper";var tm=Tn;var rm=(e=>(e.Circle="circle",e.Square="square",e))(rm||{});var Rn=react.forwardRef((o,n)=>{let{items:e,maxItems:r}=o,t=react.useMemo(()=>{let l=typeof e=="string",m=l?[]:e;return l&&e.split(",").forEach(i=>{m.push({label:i});}),m},[e]),u=react.useMemo(()=>r&&r>0&&t.length>r-1,[t,r])?[...t.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...t.slice(-r)]:t;return jsxRuntime.jsx(Me,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(c,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:u.map((l,m,i)=>l.ID=="."?jsxRuntime.jsx(c,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(c,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${m}`))}):jsxRuntime.jsxs(z,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!i[m+1],children:[l.icon&&jsxRuntime.jsx(Y,{as:"--crumb-icon",name:l.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${m}`))})});Rn.displayName="Zuz.Crumb";var sm=Rn;var En=react.forwardRef((o,n)=>{let{icon:e,defaultValue:r,value:t,size:s,variant:u,numeric:l,type:m,onConfirm:i,...a}=o,[f,p]=react.useState(false),[d,b]=react.useState(r||null),{style:w,className:x,rest:h}=R(a),S=react.useRef(null),g=react.useRef(null),{reposition:v}=Ue(g,{direction:ee.Bottom,offset:2}),I=P=>{l&&(P.currentTarget.value=P.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let P=N=>{let M=N.target,L=S.current?.contains(M),V=g.current?.contains(M);!L&&!V&&p(false);};return f&&document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P);}},[f]),react.useEffect(()=>{let P=N=>{N.key==="Escape"&&f&&(p(false),S.current?.focus());};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[f]);let T=()=>{p(true);};return react.useEffect(()=>{f&&v();},[f,v]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(c,{as:`--date-picker ${u?`--${u}`:""} rel flex aic ${x}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(Y,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(J,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):t||"",className:`--input ${u?`--${u}`:""} flex`.trim(),style:w,onFocus:T,onInput:I,autoComplete:"new-password",onKeyDown:P=>{P.key=="Enter"&&i?.(P.currentTarget.value);},...h}),jsxRuntime.jsx(c,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${u?`--${u}`:""}`,children:jsxRuntime.jsx(io,{defaultValue:d,onChange:P=>{b(P),p(false);}})})]})})});En.displayName="Zuz.DatePicker";var mm=En;var Bn=react.forwardRef((o,n)=>{let{icon:e,variant:r,position:t}=o;return jsxRuntime.jsx(z,{className:`--fab fixed --${r||W.Large} --${t||"bottomright"}`,children:e||O.plus})});Bn.displayName="Zuz.Fab";var fm=Bn;var Ln=o=>{let{names:n,strength:e}=o,r={[ct.Gooey]:t=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:t||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${ct.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[ct.Gooey]).map(t=>r[t](e))})})};Ln.displayName="Zuz.Filters";var hm=Ln;var Te=null,ie=null,kn=react.forwardRef((o,n)=>{let{title:e,message:r,transition:t,curve:s,speed:u,type:l,actionPosition:m,spinner:i,loadingMessage:a,onShow:f,onHide:p,...d}=o,{className:b,style:w,rest:x}=R(d),[h,S]=react.useState(e||""),[g,v]=react.useState(r||""),[I,T]=react.useState(null),[P,N]=react.useState(l||me.Default),M=react.useMemo(()=>core.uuid(12),[]),[L,V]=react.useState(false),E=react.useRef(null),_=react.useRef(null),[U,k]=react.useState(false),[C,A]=react.useState(true),$=react.useRef(null),K=g;react.useImperativeHandle(n,()=>({setLoading(Z){k(Z);},showDialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),q&&v(q),Z&&S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),v(q),S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},error(Z,q){this.show(Z,q,me.Error);},warn(Z,q){this.show(Z,q,me.Warn);},success(Z,q){this.show(Z,q,me.Success);},show(Z,q,te){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),_.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${_.current} scale(.9)`.trim();},50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=_.current||"",ie=null;},500)),Te=setTimeout(()=>{V(false),Te=null,ie=null;},(q||4)*1e3),N(te||me.Default),v(Z),V(true),f?.();},hide(){V(false),p?.();}}));let D=react.useMemo(()=>{let Z={when:L,duration:u||.3,delay:.1};if(P==me.Dialog){if(t){let{from:q,to:te}=We(t,20);return {from:q,to:te,curve:s||F.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:F.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:F.Spring,...Z}},[L,P]);return react.useEffect(()=>{$.current&&clearTimeout($.current),L?A(true):$.current=setTimeout(()=>A(false),1e3);},[L]),P==me.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{when:L}),jsxRuntime.jsxs(c,{className:`--sheet --sheet-${P.toLowerCase()} ${L?"is-visible":""} ${b} fixed`.trim(),style:w,fx:D,...x,ref:E,children:[jsxRuntime.jsx(Ne,{when:U,spinner:i,message:a}),jsxRuntime.jsxs(c,{className:"--head flex aic rel",children:[jsxRuntime.jsx(c,{className:`--${h?"title":"dot"} flex aic rel`,children:h||""}),jsxRuntime.jsx(z,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(c,{className:`--body flex aic rel ${I?"":"--no-action"}`.trim(),children:C?K:null}),I&&jsxRuntime.jsx(c,{className:`--footer flex aic rel ${m?m==Lt.Center?"jcc":"":"jce"}`.trim(),children:I.map((Z,q)=>jsxRuntime.jsx(z,{onClick:te=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${M}-action-${Z.key}`))})]})]}):jsxRuntime.jsx(c,{className:`--sheet --sheet-${P.toLowerCase()} ${b} abs`.trim(),style:w,...x,fx:D,ref:E,children:L?g:null})}),nt=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;kn.displayName="Zuz.Sheet";var vm=kn;var On=({ref:o,...n})=>{let{name:e,cover:r,spinner:t,errors:s,action:u,children:l,withData:m,beforeSubmit:i,onSubmit:a,onError:f,onSuccess:p,resetOnSuccess:d,...b}=n,{className:w,style:x,rest:h}=R(b),[S,g]=react.useState(false),v=react.useRef(null),I=react.useRef(null),T=react.useRef(null),P=jt(),N=react.useCallback(C=>v.current?v.current.querySelectorAll(C):[],[v.current]),M=C=>({name:C.name||C.getAttribute("name")||C.getAttribute("data-name"),required:C.required?true:C.getAttribute("data-required")?C.getAttribute("data-required")=="true":false,with:C.with||C.getAttribute("with")}),L=C=>{let A=[];return C.querySelectorAll(".--input").forEach($=>{A.push($.value);}),A.join("")},V=react.useCallback(C=>{let{required:$}=M(C);if($){if(C.type=="checkbox"&&C.checked==false)return false;if(C.classList.contains("--otp")){let D=L(C);if(D==""||D.length<parseInt(C.getAttribute("data-size")))return false}if(C.classList.contains("--select")&&C.querySelector("button.--selected").dataset.value=="-1"||C.value=="")return false}if(C.getAttribute("with")){let D=C.getAttribute("with");switch(D.includes("@")&&(D=D.split("@")[0],D=="match"&&(D=be.MatchField)),D.toUpperCase()){case be.IPV4:return core._(C.value).isIPv4();case be.IPV6:return core._(C.value).isIPv6();case be.Email:return core._(C.value).isEmail();case be.Uri:try{return new URL(C.value),!0}catch{return false}case be.Password:return console.log("Add FORMVALIDATION.Password"),false;case be.MatchField:let[Z,q,te]=C.getAttribute("with").split("@"),j=document.querySelector(`[name=${q.trim()}]`);if(!j)return false;switch(te||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=C.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&C.classList.contains("--otp")&&L(j)!=L(C))return false;if(j&&j.value!=C.value)return false;break}break;default:return true}}return true},[v.current]),E=react.useCallback(()=>{let C={},A={},$=null,K=null;if(Array.from(N("[name]")).forEach(D=>{let{name:Z,required:q,with:te}=M(D),j=true;(q||te)&&(j=V(D)),C[Z]={valid:j,value:D.type=="checkbox"?D.checked==true?D.value:false:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value},A[Z]=D.type=="checkbox"?D.checked==true:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value,j?D.classList.remove("input-with-error"):($==null&&s&&($=D,K=s[Z]),D.classList.add("input-with-error"));}),$){let D=$;if(D.classList.contains("--otp"))for(let Z of Array.from(D.querySelectorAll(".--input"))){let q=Z;if(q.value==""){q.focus();break}}else D.focus();}return {error:$!=null,errorMsg:K||"Fix errors to continue...",data:C,payload:A}},[v.current]),_=react.useCallback(()=>{let{error:C,errorMsg:A,payload:$}=E();C?P.error(A):u?react.startTransition(async()=>{i&&i($),nt(r)?r.setLoading(true):g(true),P.clearAll(),core.withPost(u,{...$,...m||{}}).then(K=>{let D=K;nt(r)?r.setLoading(false):g(false),d&&Array.from(N("[name]")).forEach(Z=>{Z instanceof HTMLInputElement&&(Z.value="");}),p?p(D):(P.clearAll(),P.success(D.message||"Redirecting..."));}).catch(K=>{nt(r)?r.setLoading(false):g(false),f?f(K):P.error(K.message||"We cannot process your request at this time.");});}):a&&a($);},[u,I.current,v.current]),U=react.useCallback(()=>{let C=N("[type=submit]");!C||C.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):C.forEach(A=>{A.addEventListener("click",_);});},[v.current]),k=react.useMemo(()=>react$1.addPropsToChildren(l,C=>C.props.type=="submit",C=>({ref:T})),[l]);return react.useImperativeHandle(o,()=>({setLoading(C){if(C){I.current?.hide();try{P.clearAll();}catch{}}g(C);},showError(C){typeof C=="string"?P.error(C):I.current.error(C,4);},hideError(){I.current.hide();try{P.clearAll();}catch{}},init(){U();},submit(){_();}})),react.useEffect(U,[]),jsxRuntime.jsxs(c,{ref:v,style:x,className:`--form flex rel ${w} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!nt(r)&&jsxRuntime.jsx(Ne,{message:r?r.message||void 0:"working",spinner:t,color:r&&"color"in r?r.color:"#ffffff",when:S}),k]})};On.displayName="Zuz.Form";var Bm=On;var Dn=o=>{let {ref:n,cols:e,rows:r,gap:t,gapX:s,gapY:u,align:l,justify:m,inline:i,flow:a,autoCols:f,autoRows:p,template:d,...b}=o;react.useRef(null);let {className:x,style:h,rest:S}=R(b),g=I=>typeof I=="number"?`repeat(${I}, 1fr)`:I,v={display:i?"inline-grid":"grid",gridTemplateColumns:g(e),gridTemplateRows:g(r),gap:t,columnGap:s,rowGap:u,alignItems:l,justifyContent:m==="between"?"space-between":m==="around"?"space-around":m,gridAutoFlow:a,gridAutoColumns:f,gridAutoRows:p,gridTemplateAreas:d,...h};return jsxRuntime.jsx(c,{ref:n,as:`--grid ${x}`.trim(),style:v,...S})};Dn.displayName="Zuz.Grid";var Om=Dn;var Hn=o=>typeof o=="string"&&o.includes("+"),Vn={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"},An={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 zn=react.forwardRef(({children:o,keys:n,variant:e},r)=>{let t=react.useMemo(()=>{if(Hn(n)){let s=null;return {keys:String(n).split("+").reduce((l,m,i,a)=>(a[i+1]?l.push(m):s=m.toUpperCase(),l),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(c,{as:`--keyboard-keys --${e||W.Small} flex aic`,children:[(Array.isArray(t.keys)?t.keys:[t.keys]).map(s=>jsxRuntime.jsx("abbr",{title:An[s],children:Vn[s]},s)),jsxRuntime.jsx(J,{children:t?.children??o})]})});zn.displayName="Zuz.KeyboardKeys";var So=zn;var Fn=react.forwardRef((o,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:t,variant:s}=o;return jsxRuntime.jsxs(c,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:F.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||W.Small} fixed flex`,children:[jsxRuntime.jsx(c,{className:"--ico",children:e?O[le.Success]:O[le.Error]}),jsxRuntime.jsx(H,{as:"--message",children:e?r||"internet connection restored :)":t||"no internet connection"})]})});Fn.displayName="Zuz.NetWorkManager";var _m=Fn;var Co=(e=>(e.Table="table",e.Gooey="gooey",e))(Co||{});var Wn=react.forwardRef((o,n)=>{let{itemCount:e,itemsPerPage:r,startPage:t,pageRange:s,paginationStyle:u,breakLabel:l,prevLabel:m,nextLabel:i,hash:a,loading:f,seperator:p,renderOnZeroPageCount:d,onPageChange:b,...w}=o,x=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(E=>`${core.toHash(E,a||6,x)}${p||""}${x}`,[x]),S=react.useMemo(()=>l||"...",[l]),[g,v]=react.useState({id:a?t?typeof t=="number"?h(t):t:1:t||1,label:t||1}),{style:I,className:T,rest:P}=R(w),N=react.useCallback(E=>typeof E=="number"?E:+E.label,[]);if(!e)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(e/r),[e,r]),L=react.useMemo(()=>{let E=[],_=Math.max(N(g)-(s||2),1),U=Math.min(N(g)+(s||2),M);_>1&&E.push({id:a?h(1):1,label:1}),_>2&&E.push({id:-1,label:S});for(let k=_;k<=U;k++)E.push({id:a?h(k):k,label:k});return U<M-1&&E.push({id:-1,label:S}),U<M&&E.push({id:a?h(M):M,label:M}),E},[g]),V=react.useCallback(E=>{let _=E;+_.label<1||+_.label>M||(v(_),b?.(_));},[e,r,g]);return L.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(c,{ref:n,as:`--pagination --pgt-${u||"table"} flex aic w:100% jcc ${T}`,children:[jsxRuntime.jsx(c,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:S}]).map((E,_,U)=>jsxRuntime.jsx(z,{disabled:E.id==-1||N(g)==+E.label,className:(typeof E=="string"?E:E.label)==N(g)?"--current-page":"",onClick:k=>V(E),children:typeof E=="string"?E:E.label},`--pg-${_}-${E.id}`))}),jsxRuntime.jsx(c,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(N(g)-1)*r+1} - `,`${Math.min(N(g)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(c,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(z,{disabled:N(g)<=1,onClick:E=>V({id:a?h(N(g)-1):N(g)-1,label:N(g)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(z,{disabled:L.length<=1||N(g)==N(L[L.length-1]),onClick:E=>V({id:a?h(N(g)+1):N(g)+1,label:N(g)+1}),children:O.chevronRightOutline})]})]})});Wn.displayName="Zuz.Pagination";var Po=Wn;var Gn=react.forwardRef((o,n)=>{let{strenthMeter:e,onChange:r,...t}=o;"type"in t&&delete t.type;let{style:s,className:u,rest:l}=R(t),[m,i]=react.useState(false),[a,f]=react.useState(""),p=react.useMemo(()=>core.checkPasswordStrength(a),[a]),d=hooks.useDebounce(b=>{e&&f(b.target.value),r&&r(b);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(c,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:n,type:m?"text":"password",className:u,onChange:d,...l}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:()=>i(b=>!b),className:"--toggle flex aic jcc abs",children:m?O.eye:O.eyeSlash})]}),e&&jsxRuntime.jsxs(c,{as:`flex aic --password-meter --pb-score-${p.score}`,style:s,children:[jsxRuntime.jsxs(c,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(c,{as:`--pbar ${p.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:p.result})]})]})});Gn.displayName="Zuz.Password";var Qm=Gn;var Xn=react.forwardRef((o,n)=>{let{size:e,length:r,mask:t,...s}=o,u=react.useRef([]),l="pinput",m=false,i={};"with"in s&&(i={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(m=true,delete s.required);let{style:a}=R(s),f=p=>{let d=p.currentTarget,b=u.current[parseInt(d.dataset.index)+1],w=u.current[parseInt(d.dataset.index)-1];d.value.length===1&&b?b.focus():d.value.length===0&&w&&w.focus();};return react.useEffect(()=>{u.current=u.current.slice(0,e||r);},[e||r]),jsxRuntime.jsx(c,{name:l,style:a,className:"--otp flex aic rel","data-required":m,"data-size":e||r||4,...i,children:Array(e||r||4).fill(1).map((p,d)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":d,ref:b=>{u.current[d]=b;},numeric:true,onChange:f,maxLength:1,placeholder:t?"\xB7":"0",type:t?"password":"text",...s},`pin-${d}`))})});Xn.displayName="Zuz.PinInput";var tc=Xn;var Yn=react.forwardRef((o,n)=>{let{children:e,className:r,name:t,required:s,type:u,value:l,variant:m,checked:i,onSwitch:a,...f}=o,[p,d]=react.useState(i||false),{variant:b}=X(true),w=react.useRef(null);return jsxRuntime.jsxs(et,{className:`${r} --${(u||Mt.Default).toLowerCase()} --radio${!u||u==Mt.Default?"":"card"} --${m||b||W.Small} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(oe,{ref:w,defaultChecked:p,value:l||"rd",type:"radio",className:"abs",name:t,required:s||false,onChange:x=>{a&&a(x.target.checked,l||"cb"),d(x.target.checked);}}),jsxRuntime.jsx(c,{className:"--dot rel",children:jsxRuntime.jsx(c,{className:"--rod abs abc"})}),jsxRuntime.jsx(c,{className:"--value",children:e})]})});Yn.displayName="Zuz.Radio";var sc=Yn;var Qn=react.forwardRef((o,n)=>{let{fx:e,withStyle:r,as:t,reverse:s=false,searchIcon:u=O.search,hideSearchIcon:l=false,clearIcon:m=O.close,hideClearIcon:i=false,onChange:a,onClear:f,...p}=o,{style:d,className:b}=R({as:o.as}),[w,x]=react.useState(""),{variant:h}=X(true),S=react.useRef(null),g=react.useMemo(()=>jsxRuntime.jsx(z,{tabIndex:-1,onClick:T=>I(),className:"--send flex aic jcc",variant:o.variant||W.Small,children:w!==""?!i&&(typeof m=="string"?jsxRuntime.jsx(Y,{name:m,as:"--search-action"}):m):!l&&(typeof u=="string"?jsxRuntime.jsx(Y,{name:u,as:"--search-action"}):u)}),[s,u,i,m,l]);"type"in o&&delete o.type;let v=T=>{x(T.target.value),a?.(T.target.value);},I=T=>{w.trim()!==""&&(x(""),a?.(""),S.current&&(S.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{style:d,className:`--search ${s?"--search-rev":""} --${o.variant||h||W.Medium} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${b}`.trim(),children:[s&&g,jsxRuntime.jsx(oe,{ref:S,onChange:v,...p}),o.shortcut&&jsxRuntime.jsx(So,{keys:o.shortcut,as:"abs"}),!s&&g]})});Qn.displayName="Zuz.Search";var fc=Qn;var jn=({value:o,updateValue:n,o:e})=>jsxRuntime.jsxs(z,{onClick:r=>n(e),as:"--select-option-item",className:o&&(typeof e=="string"?e:e.value)==(typeof o=="string"?o:o.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(Y,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(H,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});jn.displayName="Option";var es=jn;var os=({ref:o,...n})=>{let{selected:e,options:r,label:t,name:s,variant:u,search:l,searchPlaceholder:m,maxHeight:i,arrowDownIcon:a=O.arrowDown,arrowUpIcon:f=O.arrowUp,onChange:p,...d}=n,[b,w]=react.useState(e?typeof e=="string"?r.find(k=>k.value===e):e:r[0]),[x,h]=react.useState(false),[S,g]=react.useState(null),v=react.useRef(null),I=react.useRef(null),T=react.useRef(null),P=react.useId(),N=react.useMemo(()=>s||P,[]),{reposition:M}=Ue(T,{direction:Bt.Bottom,offset:2}),{variant:L}=X(true),{className:V,style:E,rest:_}=R(d),U=k=>{w(k),h(false),p&&p(k);};return react.useImperativeHandle(o,()=>({setSelected:k=>{if(typeof k=="string"){let C=r.find(A=>A.value===k);C&&w(C);}else w(k);},getValue:()=>b||null})),react.useEffect(()=>{if(!x)return;let k=()=>{M();};return window.addEventListener("scroll",k,true),window.addEventListener("resize",M),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",M);}},[x,M]),react.useEffect(()=>{if(!x){I.current&&(I.current.value=""),g(null);return}I.current?.focus(),M();let k=A=>{T.current&&!T.current.contains(A.target)&&h(false);},C=setTimeout(()=>{document.addEventListener("click",k);},0);return ()=>{clearTimeout(C),document.removeEventListener("click",k);}},[x,M]),jsxRuntime.jsxs(c,{className:`--select --${u||L} ${s?`--${s}`:""} rel`.trim(),name:N,children:[jsxRuntime.jsxs(z,{ref:v,"data-value":b?typeof b=="string"?b:b.value:b||"-1",className:`--selected flex aic rel ${V}`.trim(),withLabel:false,style:E,onClick:k=>{k.stopPropagation(),h(C=>!C);},..._,children:[jsxRuntime.jsx(H,{className:"--label",children:b?typeof b=="string"?b:b.label:t||"Choose"}),jsxRuntime.jsx(c,{className:"--svg-arrow rel flex aic jcc",children:x?typeof f=="string"?jsxRuntime.jsx(Y,{name:f,as:"--search-action"}):f:typeof a=="string"?jsxRuntime.jsx(Y,{name:a,as:"--search-action"}):a})]}),jsxRuntime.jsxs(c,{id:N,className:"--options-list flex cols abs","aria-hidden":!x,style:{maxHeight:i||"auto"},ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:x,duration:.05},children:[l&&jsxRuntime.jsx(c,{as:"--select-search --sticky",children:jsxRuntime.jsx(oe,{ref:I,onChange:k=>{g(k.target.value==""?null:k.target.value);},className:"--search-input",placeholder:m||"Search..."})}),(S==null?r:r.filter(k=>k.label.toLowerCase().includes(S.toLowerCase())||k.value.toLowerCase().includes(S.toLowerCase()))).map(k=>jsxRuntime.jsx(es,{updateValue:U,value:b,o:k},`option-${(typeof k=="string"?k:k.label).replace(/\s+/g,"-")}-${typeof k=="string"?k:k.value}`))]})]})};os.displayName="Zuz.Select";var bc=os;var rs=react.forwardRef((o,n)=>jsxRuntime.jsx(tt,{type:ye.Switch,...o,ref:n}));rs.displayName="Zuz.Switch";var vc=rs;var ss=o=>{let{idx:n,id:e,as:r,weight:t,style:s,value:u,render:l,resize:m,sortBy:i,sortable:a,onSort:f}=o,[p,d]=react.useState(0),b=()=>{a&&(f?.(String(e),p==1?-1:1),d(w=>w==1?-1:1));};return jsxRuntime.jsxs(c,{style:{flex:t||1,...s},as:`--col flex aic ${r||""} ${a?"--sortable":""}`,onClick:b,children:[jsxRuntime.jsx(c,{children:u}),n==-1&&a&&i==e&&jsxRuntime.jsx(c,{as:"--arrow flex aib",children:p==1?O.arrowUp:O.arrowDown})]})};ss.displayName="Zuz.Column";var Ct=ss;var is=o=>{let{index:n,pubsub:e,schema:r,data:t,ids:s,styles:u,animate:l,sortBy:m,selectable:i,tableRef:a,loading:f,rowClassName:p,onSort:d,onRowClick:b,onSelect:w,onContextMenu:x}=o,h=hooks.useDelayed(),S=react.useMemo(()=>({transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(n+1)}),[]),g=react.useRef(null),v=(T,P)=>{n==-1?e.emit(`ALL_ROWS_${T?"CHECKED":"UNCHECKED"}`,T):(w&&w(t,T),e.emit(`ROW_${T?"CHECKED":"UNCHECKED"}`,T,P));},I=(T,P,N)=>jsxRuntime.jsx(Ct,{idx:T,id:P,as:"--selector",pubsub:e,value:jsxRuntime.jsx(tt,{value:N,ref:g,onSwitch:v,type:ye.Default})});return react.useEffect(()=>{let T=(L,V)=>{g.current?.setChecked(L,false);},P=(L,V)=>{let E=false;a?.current&&a.current.querySelectorAll(".--row").forEach(_=>{let U=_;if(!U.classList.contains("--row-head")){let k=U.querySelector(".--selector input[type=checkbox]");k&&k.checked&&!E&&(E=k.checked);}}),g.current.setChecked(E,false);},N=L=>{g.current?.setChecked(L,false),w&&w(t,L);},M=L=>{g.current?.setChecked(L,false),w&&w(t,L);};return n==-1?(e.on("ROW_CHECKED",T),e.on("ROW_UNCHECKED",P),()=>{e.off("ROW_CHECKED",T),e.off("ROW_UNCHECKED",P);}):(e.on("ALL_ROWS_CHECKED",N),e.on("ALL_ROWS_UNCHECKED",M),()=>{e.off("ALL_ROWS_CHECKED",N),e.off("ALL_ROWS_UNCHECKED",M);})},[]),jsxRuntime.jsxs(c,{onContextMenu:T=>x?x(T,t):null,onClick:T=>b?b(T,o.data):()=>{},...l?{fx:{...S,when:h}}:{},as:`--row flex aic ${b?"--row-clickable":""} ${n==-1?"--row-head":""} ${p||""}`,children:[n==-1&&r.map((T,P)=>{let{renderWhenHeader:N,render:M,value:L,...V}=T;return jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&I(-1,`--selector-${T.id}`,"all"),jsxRuntime.jsx(Ct,{idx:-1,onSort:d,sortBy:m,value:L,...V,pubsub:e,style:u[T.id]})]},`--col-${T.id}`)}),f&&n>-1&&jsxRuntime.jsx(c,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&t&&r.map((T,P)=>jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&I(P,`--selector-${T.id}`,T.id.toString()),s.includes(String(T.id))?jsxRuntime.jsx(Ct,{pubsub:e,idx:P,id:String(T.id),style:u[String(T.id)],value:T.render?T.render(t,n):t[String(T.id).includes(".")?String(T.id).split(".").reverse()[0]:T.id]}):null]},`--${String(T.id)}-val-${P}`))]})};is.displayName="Zuz.Row";var Tt=is;var ps=(o,n)=>{let{schema:e,rows:r,rowCount:t,rowsPerPage:s,currentPage:u,pagination:l,paginationHash:m,showPaginationOnZeroPageCount:i,animateRows:a,header:f,rowClassName:p,selectableRows:d,hoverable:b,sortBy:w,loading:x,loadingRowCount:h,loadingMessage:S,spinner:g,emptyMessage:v,onSort:I,onRowClick:T,onRowSelectToggle:P,onPageChange:N,onRowContextMenu:M,...L}=o,V=react.useRef(null),E=react.useMemo(()=>e.reduce((ne,Q)=>(ne[Q.id]={flex:Q.weight||1,...Q.w&&{width:Q.w},...Q.maxW&&{maxWidth:Q.maxW},...Q.minW&&{minWidth:Q.minW},...Q.h&&{height:Q.h},...Q.maxH&&{maxHeight:Q.maxH},...Q.minH&&{minHeight:Q.minH}},ne),{}),[e]),_=react.useMemo(()=>Object.keys(E),[e]),U=react.useMemo(()=>f??true,[f]),{style:k,className:C,rest:A}=R(L),$=react.useRef(null),K=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(r.map(()=>core.uuid(8))),[Z,q]=react.useState(w||null),[te,j]=react.useState(S||"loading"),pe=react.useMemo(()=>!x&&r&&r.length==0,[x,r]),de=react.useCallback(()=>v?typeof v=="function"?jsxRuntime.jsx(v,{}):v:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,r]);react.useEffect(()=>{D.current=r.map(()=>core.uuid(8));},[r]);let It=(ne,Q)=>{q(ne),I?.(ne,Q);},Nt=(t||(r?r.length:0))/(s||10),Ie=react.useMemo(()=>i||Nt>1?jsxRuntime.jsx(Po,{hash:m,ref:V,renderOnZeroPageCount:i,onPageChange:N,paginationStyle:"table",startPage:u,itemCount:t||(r?r.length:0),itemsPerPage:s||10}):null,[u,t]);return react.useImperativeHandle(n,()=>({setLoading(ne){}})),jsxRuntime.jsxs(c,{as:`--table ${b??true?"--hoverable":""} flex cols rel ${C}`,ref:$,children:[U==true&&jsxRuntime.jsx(Tt,{sortBy:Z,onSort:It,tableRef:$,pubsub:K,selectable:d,index:-1,schema:e,loading:true,styles:E}),x&&jsxRuntime.jsxs(c,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:g||re.Simple}),te&&jsxRuntime.jsx(H,{as:"--table-loading-message",children:te})]}),x&&Array(h||5).fill({}).map((ne,Q)=>jsxRuntime.jsx(Tt,{tableRef:$,index:Q,pubsub:K,schema:e,styles:E,loading:true,animate:a,onRowClick:T},`--trow-loading-${Q}-${e[0].id}`)),!x&&r&&r.map((ne,Q)=>jsxRuntime.jsx(Tt,{tableRef:$,pubsub:K,loading:false,index:Q,schema:e,ids:_,styles:E,animate:a,data:ne,onRowClick:T,rowClassName:p,selectable:d,onSelect:P,onContextMenu:M},`--trow-${D.current[Q]||Q}-${e[0].id}`)),pe&&de(),jsxRuntime.jsx(c,{"aria-hidden":!l||!Ie,...a?{fx:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(r.length+1),when:!x&&r&&l&&Ie!=null}}:{},as:"--row flex aic --row-footer",children:l&&Ie?Ie:null})]})};ps.displayName="Zuz.Table";var Oc=react.forwardRef(ps),Dc=Oc;var Vc=({ref:o,...n})=>{let{title:e,items:r}=n,[t,s]=react.useState(0),u=(l,m,i)=>{l.preventDefault(),s(m),document.getElementById(i)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(c,{ref:o,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:e}),jsxRuntime.jsx(Me,{items:r.map((l,m)=>jsxRuntime.jsx("a",{className:t==m?"--toc-active":"",style:{anchorName:t===m?"--toc-active":"none",color:t==m?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:i=>u(i,m,l.tag),href:`#${l.tag}`,children:l.label}))})]})},Ac=Vc;var us=({isActive:o,transitionType:n,speed:e,width:r,render:t,content:s,onHeightChange:u})=>{let l=react.useRef(null),m=hooks.useResizeObserver(l);react.useEffect(()=>{o&&m.height>0&&u(m.height);},[o,m.height]);let i=react.useMemo(()=>{let a={flexShrink:0,height:"fit-content"};return n==="fade"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:o?1:0}:n==="scale"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:a},[o,n,r,e]);return jsxRuntime.jsx(c,{ref:l,style:{...i},className:"--content",children:t||o?s:null})};us.displayName="Zuz.TabBody";var fs=us;var hs=({ref:o,...n})=>{let{tabs:e,speed:r=.3,prerender:t=true,variant:s,tabStyle:u="fixed",onChange:l,transitionType:m="slide",...i}=n,[a,f]=react.useState(0),p=react.useRef(null),d=hooks.useResizeObserver(p),b=react.useMemo(()=>core.uuid(8),[]),[w,x]=react.useState("auto"),h=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(o,()=>({setTab:P=>f(P)}));let S=react.useMemo(()=>e.map(P=>({...P,key:P.key||core.uuid(8)})),[e]),{style:g,className:v,rest:I}=R({as:`flex cols w-full no-overflow ${i.as||""}`,...i}),T=()=>{if(!h)return {opacity:0};switch(m){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${a*d.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(c,{ref:p,style:g,className:`--tabview --${u} flex cols ${v}`,children:[jsxRuntime.jsx(ot,{as:"--tabview-head",onSwitch:P=>{f(P.index);let N=S.find(M=>M.tag==P.tag);N&&N.onSelect&&(N.onSelect(N,P.index),l?.(N,P.index));},selected:a,items:S.reduce((P,N,M)=>(P.push({icon:N.icon,index:M,label:N.label,tag:N.tag}),P),[])}),jsxRuntime.jsx(c,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:w,transition:h?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:h?1:0},children:jsxRuntime.jsx(c,{className:"--track",style:{...T()},children:S.map((P,N)=>jsxRuntime.jsx(fs,{isActive:N===a,transitionType:m,speed:r,width:d.width,render:t||N===a,onHeightChange:M=>N===a&&x(M),content:P.body},`tab-body-${P.key||N}-${b}`))})})]})};hs.displayName="Zuz.TabView";var qc=hs;var Jc=({ref:o,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:t="zuz ~ ",variant:s,...u})=>{let[l,m]=react.useState([{type:"output",content:r}]),[i,a]=react.useState(""),f=react.useRef(null),p=react.useRef(null),{variant:d}=X(true);react.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[l]);let b=v=>{let I=typeof v=="string"?{type:"output",content:v}:v;m(T=>{let P=[...T,I];return P.length>1e3?P.slice(-1e3):P});},w=()=>m([]);react.useImperativeHandle(o,()=>({write:b,clear:w}));let x=async v=>{let[I,...T]=v.split(" "),P=I.toLowerCase();return n&&n[P]?await n[P](T):e?await e(v):`command not found: ${I}`},h=v=>{let I=/\u001b\[(\d+)m/g,T=[],P={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},N=0,M="#d4d4d4",L=false,V;for(;(V=I.exec(v))!==null;){let _=v.slice(N,V.index);_&&T.push({text:_,color:M,bold:L});let U=V[1];U==="0"?(M="#d4d4d4",L=false):U==="1"?L=true:P[U]&&(M=P[U]),N=I.lastIndex;}let E=v.slice(N);return E&&T.push({text:E,color:M,bold:L}),T},S=(v,I)=>v.includes("\x1B")?h(v).map((T,P)=>jsxRuntime.jsx(J,{style:{color:T.color||"#d4d4d4",fontWeight:T.bold?"bold":"normal"},children:T.text},`--terminal-msg-${P}-${T.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(J,{style:{color:I==="error"?"#ff5f56":I==="command"?"#00ff00":"#d4d4d4"},children:v}),g=async v=>{if(v.key==="Enter"&&i.trim()){let I=i.trim(),T=[...l,{type:"command",content:`${t}${I}`}];a(""),m(T);let P=await x(I);m(N=>[...N,{type:"output",content:P}]);}};return jsxRuntime.jsxs(c,{as:`--zuz-terminal --${s||d||W.Medium} flex cols ${u.className}`,onClick:()=>p.current?.focus(),children:[jsxRuntime.jsx(c,{ref:f,className:"--terminal-log",children:l.map((v,I)=>jsxRuntime.jsx(c,{children:jsxRuntime.jsx(H,{children:S(v.content,v.type)})},I))}),jsxRuntime.jsxs(c,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:t}),jsxRuntime.jsx(oe,{ref:p,className:"--zuz-term-input",autoFocus:true,value:i,variant:s||d||W.Medium,onChange:v=>a(v.target.value),onKeyDown:g})]})]})},jc=Jc;var ep=({meta:o})=>jsxRuntime.jsxs(z,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(Y,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:o.label})]}),tp=({position:o,onSelect:n,commands:e,visible:r})=>jsxRuntime.jsx(c,{"aria-hidden":!r,fx:{transition:G.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...o},children:e.map(t=>jsxRuntime.jsx(ep,{meta:t},`cmd-${t.label.replace(/\s+/,"-")}`))}),ws=tp;var Cs=react.forwardRef((o,n)=>{let{autoResize:e,maxHeight:r,variant:t,resize:s="none",command:u,commands:l,onInput:m,cmd:i,renderDropdown:a,value:f,defaultValue:p,...d}=o,b=react.useRef(null),w=react.useRef(null),{variant:x}=X(true),{style:h,className:S,rest:g}=R(d),{showDropdown:v,dropdownPosition:I,handleKeyDown:T,handleInput:P,handleCommandSelect:N}=hooks.useCommandActions({command:u,commands:l,cmd:i,ref:b}),M=react.useCallback(()=>{let V=b.current;!V||!e||(w.current&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(r){let _=parseInt(r.toString(),10);isNaN(_)||(E=Math.min(E,_));}V.style.height=`${E}px`,V.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),L=V=>{m?.(V),P(V),M();};return react.useEffect(()=>{M();},[f,p,M]),react.useEffect(()=>{e&&b.current&&M();},[e,M]),react.useEffect(()=>()=>{w.current&&cancelAnimationFrame(w.current);},[]),jsxRuntime.jsxs(c,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${t||x||W.Medium} flex ${S}`.trim(),style:{...h,resize:s,height:e?"auto":h?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:T,onInput:L,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),b.current=V;},value:f,defaultValue:p,...g}),a?a({show:v,position:I,commands:l||[],onSelect:N}):l&&l.length>0&&jsxRuntime.jsx(ws,{visible:v,commands:l,onSelect:N,position:I})]})});Cs.displayName="Zuz.TextArea";var ap=Cs;var Ps=react.forwardRef((o,n)=>{let{as:e,value:r,color:t,direction:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(a){m.toString().length!==a.toString().length&&i(a);},setValue(a){if(this.updateValue(a),l.current){let f=a.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((p,d)=>{let b=f[d];if(p instanceof HTMLElement){p.setAttribute("data-value",b);let w=p.querySelector(".--wheel-char-track");w instanceof HTMLElement&&(w.style.setProperty("--v",b),w.offsetWidth);}});}}})),react.useEffect(()=>{i(r||0);},[r]),jsxRuntime.jsxs(c,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:l,...u,children:[(m||0).toString().split("").map((a,f)=>isNaN(parseInt(a,10))?jsxRuntime.jsx(J,{className:"--wheel-char wheel-char-symbol grid",children:a},`wheel-char-symbol-${f}`):jsxRuntime.jsx(J,{"data-value":a,className:`--wheel-char grid ${f>(m||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(J,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":a},children:[jsxRuntime.jsx(J,{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,d)=>jsxRuntime.jsx(J,{children:p},`${f}--${d}`)),jsxRuntime.jsx(J,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),t&&jsxRuntime.jsx(c,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${t}, transparent, transparent, transparent, ${t})`}})]})});Ps.displayName="Zuz.TextWheel";var fp=Ps;var Es=react.forwardRef((o,n)=>{let{title:e,position:r,margin:t,children:s,...u}=o,{style:l,className:m,rest:i}=R(u),[a,f]=react.useState(false),p=react.useMemo(()=>r||ee.Top,[]),d=react.useRef(null),b=react.useRef(null),w=g=>{},x=typeof ResizeObserver<"u"?new ResizeObserver(w):{observe:()=>{},unobserve:()=>{}},h=hooks.useDimensions(),S=react.useMemo(()=>{if(!b.current)return {left:0,top:0};let g=b.current.previousElementSibling;if(g){let v=g.getBoundingClientRect();switch(x.observe(g),p){case ee.Top:return {left:v.left+v.width/2,top:v.top-(t||25)};case ee.Bottom:return {left:v.left+v.width/2,top:v.top+(t||25)};case ee.Left:return {left:v.left-v.width/2,top:v.top+v.height/2};case ee.Right:return {left:v.right,top:v.top+v.height/2};default:return {left:0,top:0}}}},[b.current,h,x]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[s,jsxRuntime.jsx(c,{ref:b,style:{left:S?.left+"px",top:S?.top+"px"},className:`--tooltip --${r||ee.Top} fixed ${m}`.trim(),fx:{from:p==ee.Bottom||p==ee.Top?{opacity:0,x:"-50%",y:p==ee.Top?-5:5}:{opacity:0,y:"-50%",x:p==ee.Right?15:-25},to:p==ee.Bottom||p==ee.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:p==ee.Right?10:-20},curve:F.EaseInOut,when:a},children:jsxRuntime.jsx(H,{className:"--text rel",children:e})})]})});Es.displayName="Zuz.ToolTip";var yp=Es;var Do=react.forwardRef((o,n)=>{let{as:e,meta:r,nodes:t,icons:s,onSelect:u,treeTag:l,selected:m,roots:i,expanded:a,...f}=o,{tag:p,label:d,icon:b,under:w,isHead:x}=r,h=react.useMemo(()=>i.includes(p),[i]),[S,g]=react.useState(a),v=()=>{localStorage.setItem(`--tn${l}-${p}`,S?"0":"1"),g(!S);};react.useEffect(()=>{a||h&&!localStorage.getItem(`--tn${l}-${p}`)?(localStorage.setItem(`--tn${l}-${p}`,"1"),g(true)):g(localStorage.getItem(`--tn${l}-${p}`)=="1");},[]);let I=react.useMemo(()=>t.filter(T=>T.under==p),[t,p]);return jsxRuntime.jsxs(c,{className:`--treenode ${h?"--is-root":""} --treenode-${p} flex cols`,children:[jsxRuntime.jsxs(c,{className:`--node --node-${p} flex aic ${m==p?" --selected":""}`,children:[jsxRuntime.jsx(z,{skeleton:f.skeleton,onClick:v,className:"--node-aro-btn",disabled:I.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:"--node-aro-icon",name:I.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):I.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(z,{className:"--node-meta flex aic",onClick:T=>u(p),children:[(s?.nodeOpen&&s?.nodeClose||h&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:`--node-icon ${h?"--icon-root":""}`,name:b||(S?h&&s?.rootOpen||s.nodeOpen:h&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${h?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),S&&I.length>0&&jsxRuntime.jsx(c,{className:`--sub-node tree-sub-node-${p} flex cols`,children:I.map(T=>jsxRuntime.jsx(Do,{treeTag:l,selected:m,onSelect:u,icons:s,roots:i,expanded:T.expanded||false,meta:T,nodes:t},`--node-${T.tag}`))})]})});Do.displayName="TreeItem";var Ls=Do;var ks=react.forwardRef((o,n)=>{let{as:e,nodes:r,onNodeSelect:t,tag:s,icons:u,roots:l,selected:m,...i}=o,[a,f]=react.useState(m);react.useImperativeHandle(n,()=>({getSelected:()=>a}),[t]);let p=d=>{f(d),t&&t(d);};return react.useEffect(()=>{a!=m&&f(m);},[m]),jsxRuntime.jsx(c,{className:"--treeview flex cols",children:r.filter(d=>l.includes(d.tag)).map(d=>jsxRuntime.jsx(Ls,{treeTag:s?`-${s}`:"",selected:a,onSelect:b=>p(b),icons:u,meta:d,roots:l,expanded:d.expanded||false,skeleton:i.skeleton,nodes:r},`--node-${d.tag}`))})});ks.displayName="Zuz.TreeView";var Ip=ks;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
- Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkEDVIEQHU_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkEDVIEQHU_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkEDVIEQHU_cjs.h}});exports.ALERT=le;exports.AVATAR=zo;exports.Accordion=li;exports.ActionBar=di;exports.Alert=xi;exports.AutoComplete=Di;exports.Avatar=Zi;exports.Badge=Wi;exports.Box=c;exports.Bubble=bl;exports.BubbleMediaType=rn;exports.BubbleStatus=on;exports.Button=z;exports.CHART=Jr;exports.CHECKBOX=ye;exports.COLORTHEME=Lp;exports.Calendar=io;exports.Chart=ul;exports.CheckBox=tt;exports.CodeBlock=Bl;exports.ColorScheme=Wl;exports.ContextMenu=_t;exports.CookiesConsent=Xl;exports.Cover=Ne;exports.CropShape=rm;exports.Cropper=tm;exports.Crumb=sm;exports.DATATYPE=Op;exports.DIALOG=He;exports.DIALOG_ACTION_POSITION=_o;exports.DRAWER_SIDE=se;exports.DatePicker=mm;exports.Dialog=Zt;exports.Drawer=Yt;exports.FILTER=ct;exports.FORMVALIDATION=be;exports.FORMVALIDATION_STYLE=Dp;exports.Fab=fm;exports.Filters=hm;exports.Form=Bm;exports.Grid=Om;exports.Group=Ft;exports.Icon=Y;exports.Image=Je;exports.Input=oe;exports.KeyboardKeys=So;exports.KeysLabelMap=An;exports.KeysMap=Vn;exports.Label=et;exports.LayersProvider=$t;exports.List=Me;exports.NetworkStatus=_m;exports.ORIGIN=Ke;exports.OriginType=Mp;exports.Overlay=Ee;exports.POSITION=Bt;exports.PROGRESS=Vp;exports.Pagination=Po;exports.PaginationStyle=Co;exports.Password=Qm;exports.PinInput=tc;exports.Position=ee;exports.ProgressBar=mo;exports.RADIO=Mt;exports.Radio=sc;exports.SHEET=me;exports.SHEET_ACTION_POSITION=Lt;exports.SKELETON=Bp;exports.SLIDER=mt;exports.SORT=kp;exports.SPINNER=re;exports.ScrollView=Wt;exports.Search=fc;exports.Select=bc;exports.SelectTabs=ot;exports.Sheet=vm;exports.Slider=go;exports.Span=J;exports.Spinner=ge;exports.Status=Hp;exports.Switch=vc;exports.TRANSITIONS=G;exports.TRANSITION_CURVES=F;exports.TabView=qc;exports.Table=Dc;exports.TableOfContents=Ac;exports.Terminal=jc;exports.Text=H;exports.TextWheel=fp;exports.Textarea=ap;exports.ThemeProvider=Us;exports.ToastDefaultTitle=Pr;exports.ToastProvider=Qt;exports.ToastType=Tr;exports.ToolTip=yp;exports.TreeView=Ip;exports.Variant=W;exports.animationTransition=We;exports.buildClassString=kt;exports.buildWithStyles=Ko;exports.css=ru;exports.getAnimationCurve=Ot;exports.getAnimationTransition=nu;exports.getZuzMap=Ds;exports.isKeyCombination=Hn;exports.setZuzMap=Zo;exports.useBase=R;exports.useContextMenu=oi;exports.useDialog=Wa;exports.useDrawer=Ya;exports.useFx=ae;exports.useMorph=ja;exports.usePosition=Ue;exports.useToast=jt;
12
+ <span class="--line-content">${R||" "}</span>
13
+ </div>`}).join("")},[e,d]);return jsxRuntime.jsx(c,{as:`--code-block ${a}`,style:f,...m,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:y}})})})},Ll=Bl;var fn=({onSelect:o,meta:n,selected:e})=>{let r=react.useRef(null),{index:t,icon:s,label:u}=n,[l,m]=react.useState({x:0,width:0}),i=hooks.useDelayed();return react.useLayoutEffect(()=>{if(i&&r.current){let{width:a,x:f}=r.current.getBoundingClientRect();m({x:f,width:a}),e&&o(t,a,f,n,true);}},[i,r.current]),react.useEffect(()=>{e&&o(t,l.width,l.x,n,false);},[e]),jsxRuntime.jsxs(z,{onClick:()=>o(t,l.width,l.x,n,false),ref:r,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(Y,{name:s,as:"--segment-icon"}):jsxRuntime.jsx(c,{as:"--segment-icon flex aic jcc",children:s}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(c,{className:"--segment-label",children:u||`Item ${t}`})]})};fn.displayName="SelectTabItem";var dn=fn;var hn=react.forwardRef((o,n)=>{let{fx:e,items:r,selected:t,variant:s,onSwitch:u,...l}=o,[m,i]=react.useState(t||0),a=react.useRef(false),f=react.useRef(m),{className:p,style:d,rest:y}=I(l),w=react.useRef(null),b=react.useRef(null),{variant:h}=X(true),S=(g,v,R,T,P)=>{if((P||m!=g&&m!=-2)&&(i(g),f.current=m,a.current&&u?.(T)),w.current){let N=b.current?.getBoundingClientRect();w.current.style.setProperty("--w",`${v}px`),w.current.style.setProperty("--x",`${N?R-N.left:R}px`);}};return react.useImperativeHandle(n,()=>({setSelected:g=>{typeof g=="number"&&g!=m&&i(g);}}),[m]),react.useEffect(()=>{a.current=true;},[]),jsxRuntime.jsxs(c,{ref:b,"data-selected":m,className:`${p} --segmented --${s||h||W.Medium} flex aic rel`,style:d,...y,children:[jsxRuntime.jsx(c,{ref:w,className:"--segment-tab abs"}),r.map((g,v)=>jsxRuntime.jsx(dn,{onSelect:S,selected:m==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});hn.displayName="Zuz.SelectTabs";var ot=hn;var bn=react.forwardRef((o,n)=>{let{type:e,...r}=o,t=hooks.useDelayed(),{colorScheme:s,setColorScheme:u}=$t(),l=react.useCallback(()=>{u(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:m,style:i}=I(r),a=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !t||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(ot,{className:`--color-scheme --${e}`,onSwitch:({tag:p})=>{u(p);},selected:f,items:a,...r}):jsxRuntime.jsx(z,{onClick:l,style:i,as:`--color-scheme-switch --${r.variant||W.Small} ${m}`.trim(),children:s=="system"?O.colorSchemeSystem:s=="light"?O.colorSchemeLight:O.colorSchemeDark})});bn.displayName="Zuz.ColorScheme";var Ul=bn;var vn=react.forwardRef((o,n)=>{let[e,r]=react.useState("wait"),{title:t,message:s,acceptLabel:u,rejectLabel:l,position:m}=o,i=async a=>{r(a==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(a));};return react.useEffect(()=>{let a=localStorage.getItem("--ccnt");r(a?a=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(c,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:F.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${m||ee.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:t||"This site uses cookies"}),jsxRuntime.jsx(H,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(c,{as:"--footer flex aic",children:[jsxRuntime.jsx(z,{onClick:a=>i(1),as:"--accept",children:u||"Accept All"}),jsxRuntime.jsx(z,{onClick:a=>i(0),as:"--reject",children:l||"Cancel"})]})]})});vn.displayName="Zuz.CookiesConsent";var Yl=vn;var Tn=react.forwardRef((o,n)=>{let {type:e,value:r,min:t,max:s,step:u,onChange:l,roundValue:m,...i}=o,{className:a,style:f,rest:p}=I(i),d=react.useRef(u||.01).current,y=react.useRef(t||0).current,w=react.useRef(s||1).current,b=react.useRef(r||0).current,h=react.useRef(null),S=react.useRef(null),g=react.useRef(null);react.useRef(null);let R=react.useRef(null),T=react.useRef(null),P=($,K,D)=>($-K)/(D-K)*100,N=$=>{if(S.current){let K=parseFloat($.currentTarget.value),D=P(K,parseFloat($.currentTarget.min),parseFloat($.currentTarget.max));S.current.style.setProperty("--value",`${D}`),S.current.setAttribute("data-value",`${K}`),l&&l(m?+K.toFixed(2):K);}},[M,L]=react.useState(false),[V,E]=react.useState(0),[_,U]=react.useState(0),k=$=>{L(true),E($.clientX),U(S.current?parseFloat(S.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},C=$=>{if(M){let K=$.clientX-V,D=Math.max(y,Math.min(_+K*d,w));S.current&&(S.current.setAttribute("data-value",`${D}`),T.current.textContent=m?D.toFixed(2):D.toString(),l&&l(m?+D.toFixed(2):D));}},A=()=>{L(false),document.body.style.cursor="auto";};return react.useEffect(()=>{S.current&&S.current.style.setProperty("--value",h.current?`${P(parseFloat(h.current.value),parseFloat(h.current.min),parseFloat(h.current.max))}`:b.toString());},[]),react.useEffect(()=>(M?(document.addEventListener("mousemove",C),document.addEventListener("mouseup",A)):(document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A)),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A);}),[M]),jsxRuntime.jsx(c,{ref:S,"data-value":b||0,className:`--slider --${e||mt.Default} flex rel ${a}`.trim(),style:{...f},children:mt.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(H,{ref:T,onMouseDown:k,className:"--slider-text",children:b||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{ref:R,className:"--slider-track abs fill"}),jsxRuntime.jsx(c,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:h,onInput:N,className:"abs fill",tabIndex:0,type:e||mt.Default,defaultValue:b||0,step:d,max:w,min:y})]})})});Tn.displayName="Zuz.Slider";var go=Tn;var Rn=react.forwardRef((o,n)=>{let{src:e,shape:r,size:t,...s}=o,{style:u,className:l,rest:m}=I(s),{canvasRef:i,crop:a,setScale:f,handleMouseDown:p,handleMouseUp:d,handleMouseMove:y}=hooks.useImageCropper(e,t||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return a()},setScale(w){f(w);}})),jsxRuntime.jsxs(c,{as:`--cropper --${r||hooks.CropShape.Circle} ${l}`,style:u,...m,children:[jsxRuntime.jsx("canvas",{ref:i,width:t||200,height:t||200,onMouseDown:p,onMouseUp:d,onMouseLeave:d,onMouseMove:y}),jsxRuntime.jsx(c,{as:"--cropper-slider",children:jsxRuntime.jsx(go,{onChange:w=>f(w),min:0,max:1,step:.01,value:1})})]})});Rn.displayName="Zuz.Cropper";var om=Rn;var nm=(e=>(e.Circle="circle",e.Square="square",e))(nm||{});var Nn=react.forwardRef((o,n)=>{let{items:e,maxItems:r}=o,t=react.useMemo(()=>{let l=typeof e=="string",m=l?[]:e;return l&&e.split(",").forEach(i=>{m.push({label:i});}),m},[e]),u=react.useMemo(()=>r&&r>0&&t.length>r-1,[t,r])?[...t.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...t.slice(-r)]:t;return jsxRuntime.jsx(Me,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(c,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:u.map((l,m,i)=>l.ID=="."?jsxRuntime.jsx(c,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(c,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${m}`))}):jsxRuntime.jsxs(z,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!i[m+1],children:[l.icon&&jsxRuntime.jsx(Y,{as:"--crumb-icon",name:l.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${m}`))})});Nn.displayName="Zuz.Crumb";var am=Nn;var Ln=react.forwardRef((o,n)=>{let{icon:e,defaultValue:r,value:t,size:s,variant:u,numeric:l,type:m,onConfirm:i,...a}=o,[f,p]=react.useState(false),[d,y]=react.useState(r||null),{style:w,className:b,rest:h}=I(a),S=react.useRef(null),g=react.useRef(null),{reposition:v}=Ue(g,{direction:ee.Bottom,offset:2}),R=P=>{l&&(P.currentTarget.value=P.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let P=N=>{let M=N.target,L=S.current?.contains(M),V=g.current?.contains(M);!L&&!V&&p(false);};return f&&document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P);}},[f]),react.useEffect(()=>{let P=N=>{N.key==="Escape"&&f&&(p(false),S.current?.focus());};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[f]);let T=()=>{p(true);};return react.useEffect(()=>{f&&v();},[f,v]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(c,{as:`--date-picker ${u?`--${u}`:""} rel flex aic ${b}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(Y,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(J,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):t||"",className:`--input ${u?`--${u}`:""} flex`.trim(),style:w,onFocus:T,onInput:R,autoComplete:"new-password",onKeyDown:P=>{P.key=="Enter"&&i?.(P.currentTarget.value);},...h}),jsxRuntime.jsx(c,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${u?`--${u}`:""}`,children:jsxRuntime.jsx(io,{defaultValue:d,onChange:P=>{y(P),p(false);}})})]})})});Ln.displayName="Zuz.DatePicker";var cm=Ln;var Mn=react.forwardRef((o,n)=>{let{icon:e,variant:r,position:t}=o;return jsxRuntime.jsx(z,{className:`--fab fixed --${r||W.Large} --${t||"bottomright"}`,children:e||O.plus})});Mn.displayName="Zuz.Fab";var dm=Mn;var kn=o=>{let{names:n,strength:e}=o,r={[ct.Gooey]:t=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:t||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${ct.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[ct.Gooey]).map(t=>r[t](e))})})};kn.displayName="Zuz.Filters";var xm=kn;var Te=null,ie=null,Dn=react.forwardRef((o,n)=>{let{title:e,message:r,transition:t,curve:s,speed:u,type:l,actionPosition:m,spinner:i,loadingMessage:a,onShow:f,onHide:p,...d}=o,{className:y,style:w,rest:b}=I(d),[h,S]=react.useState(e||""),[g,v]=react.useState(r||""),[R,T]=react.useState(null),[P,N]=react.useState(l||me.Default),M=react.useMemo(()=>core.uuid(12),[]),[L,V]=react.useState(false),E=react.useRef(null),_=react.useRef(null),[U,k]=react.useState(false),[C,A]=react.useState(true),$=react.useRef(null),K=g;react.useImperativeHandle(n,()=>({setLoading(Z){k(Z);},showDialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),q&&v(q),Z&&S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),v(q),S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},error(Z,q){this.show(Z,q,me.Error);},warn(Z,q){this.show(Z,q,me.Warn);},success(Z,q){this.show(Z,q,me.Success);},show(Z,q,te){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),_.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${_.current} scale(.9)`.trim();},50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=_.current||"",ie=null;},500)),Te=setTimeout(()=>{V(false),Te=null,ie=null;},(q||4)*1e3),N(te||me.Default),v(Z),V(true),f?.();},hide(){V(false),p?.();}}));let D=react.useMemo(()=>{let Z={when:L,duration:u||.3,delay:.1};if(P==me.Dialog){if(t){let{from:q,to:te}=We(t,20);return {from:q,to:te,curve:s||F.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:F.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:F.Spring,...Z}},[L,P]);return react.useEffect(()=>{$.current&&clearTimeout($.current),L?A(true):$.current=setTimeout(()=>A(false),1e3);},[L]),P==me.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{when:L}),jsxRuntime.jsxs(c,{className:`--sheet --sheet-${P.toLowerCase()} ${L?"is-visible":""} ${y} fixed`.trim(),style:w,fx:D,...b,ref:E,children:[jsxRuntime.jsx(Ne,{when:U,spinner:i,message:a}),jsxRuntime.jsxs(c,{className:"--head flex aic rel",children:[jsxRuntime.jsx(c,{className:`--${h?"title":"dot"} flex aic rel`,children:h||""}),jsxRuntime.jsx(z,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(c,{className:`--body flex aic rel ${R?"":"--no-action"}`.trim(),children:C?K:null}),R&&jsxRuntime.jsx(c,{className:`--footer flex aic rel ${m?m==Mt.Center?"jcc":"":"jce"}`.trim(),children:R.map((Z,q)=>jsxRuntime.jsx(z,{onClick:te=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${M}-action-${Z.key}`))})]})]}):jsxRuntime.jsx(c,{className:`--sheet --sheet-${P.toLowerCase()} ${y} abs`.trim(),style:w,...b,fx:D,ref:E,children:L?g:null})}),nt=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;Dn.displayName="Zuz.Sheet";var Sm=Dn;var Hn=({ref:o,...n})=>{let{name:e,cover:r,spinner:t,errors:s,action:u,children:l,withData:m,beforeSubmit:i,onSubmit:a,onError:f,onSuccess:p,resetOnSuccess:d,...y}=n,{className:w,style:b,rest:h}=I(y),[S,g]=react.useState(false),v=react.useRef(null),R=react.useRef(null),T=react.useRef(null),P=jt(),N=react.useCallback(C=>v.current?v.current.querySelectorAll(C):[],[v.current]),M=C=>({name:C.name||C.getAttribute("name")||C.getAttribute("data-name"),required:C.required?true:C.getAttribute("data-required")?C.getAttribute("data-required")=="true":false,with:C.with||C.getAttribute("with")}),L=C=>{let A=[];return C.querySelectorAll(".--input").forEach($=>{A.push($.value);}),A.join("")},V=react.useCallback(C=>{let{required:$}=M(C);if($){if(C.type=="checkbox"&&C.checked==false)return false;if(C.classList.contains("--otp")){let D=L(C);if(D==""||D.length<parseInt(C.getAttribute("data-size")))return false}if(C.classList.contains("--select")&&C.querySelector("button.--selected").dataset.value=="-1"||C.value=="")return false}if(C.getAttribute("with")){let D=C.getAttribute("with");switch(D.includes("@")&&(D=D.split("@")[0],D=="match"&&(D=be.MatchField)),D.toUpperCase()){case be.IPV4:return core._(C.value).isIPv4();case be.IPV6:return core._(C.value).isIPv6();case be.Email:return core._(C.value).isEmail();case be.Uri:try{return new URL(C.value),!0}catch{return false}case be.Password:return console.log("Add FORMVALIDATION.Password"),false;case be.MatchField:let[Z,q,te]=C.getAttribute("with").split("@"),j=document.querySelector(`[name=${q.trim()}]`);if(!j)return false;switch(te||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=C.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&C.classList.contains("--otp")&&L(j)!=L(C))return false;if(j&&j.value!=C.value)return false;break}break;default:return true}}return true},[v.current]),E=react.useCallback(()=>{let C={},A={},$=null,K=null;if(Array.from(N("[name]")).forEach(D=>{let{name:Z,required:q,with:te}=M(D),j=true;(q||te)&&(j=V(D)),C[Z]={valid:j,value:D.type=="checkbox"?D.checked==true?D.value:false:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value},A[Z]=D.type=="checkbox"?D.checked==true:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value,j?D.classList.remove("input-with-error"):($==null&&s&&($=D,K=s[Z]),D.classList.add("input-with-error"));}),$){let D=$;if(D.classList.contains("--otp"))for(let Z of Array.from(D.querySelectorAll(".--input"))){let q=Z;if(q.value==""){q.focus();break}}else D.focus();}return {error:$!=null,errorMsg:K||"Fix errors to continue...",data:C,payload:A}},[v.current]),_=react.useCallback(()=>{let{error:C,errorMsg:A,payload:$}=E();C?P.error(A):u?react.startTransition(async()=>{i&&i($),nt(r)?r.setLoading(true):g(true),P.clearAll(),core.withPost(u,{...$,...m||{}}).then(K=>{let D=K;nt(r)?r.setLoading(false):g(false),d&&Array.from(N("[name]")).forEach(Z=>{Z instanceof HTMLInputElement&&(Z.value="");}),p?p(D):(P.clearAll(),P.success(D.message||"Redirecting..."));}).catch(K=>{nt(r)?r.setLoading(false):g(false),f?f(K):P.error(K.message||"We cannot process your request at this time.");});}):a&&a($);},[u,R.current,v.current]),U=react.useCallback(()=>{let C=N("[type=submit]");!C||C.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):C.forEach(A=>{A.addEventListener("click",_);});},[v.current]),k=react.useMemo(()=>react$1.addPropsToChildren(l,C=>C.props.type=="submit",C=>({ref:T})),[l]);return react.useImperativeHandle(o,()=>({setLoading(C){if(C){R.current?.hide();try{P.clearAll();}catch{}}g(C);},showError(C){typeof C=="string"?P.error(C):R.current.error(C,4);},hideError(){R.current.hide();try{P.clearAll();}catch{}},init(){U();},submit(){_();}})),react.useEffect(U,[]),jsxRuntime.jsxs(c,{ref:v,style:b,className:`--form flex rel ${w} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!nt(r)&&jsxRuntime.jsx(Ne,{message:r?r.message||void 0:"working",spinner:t,color:r&&"color"in r?r.color:"#ffffff",when:S}),k]})};Hn.displayName="Zuz.Form";var Lm=Hn;var Vn=o=>{let {ref:n,cols:e,rows:r,gap:t,gapX:s,gapY:u,align:l,justify:m,inline:i,flow:a,autoCols:f,autoRows:p,template:d,...y}=o;react.useRef(null);let {className:b,style:h,rest:S}=I(y),g=R=>typeof R=="number"?`repeat(${R}, 1fr)`:R,v={display:i?"inline-grid":"grid",gridTemplateColumns:g(e),gridTemplateRows:g(r),gap:t,columnGap:s,rowGap:u,alignItems:l,justifyContent:m==="between"?"space-between":m==="around"?"space-around":m,gridAutoFlow:a,gridAutoColumns:f,gridAutoRows:p,gridTemplateAreas:d,...h};return jsxRuntime.jsx(c,{ref:n,as:`--grid ${b}`.trim(),style:v,...S})};Vn.displayName="Zuz.Grid";var Dm=Vn;var An=o=>typeof o=="string"&&o.includes("+"),$n={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"},zn={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 Fn=react.forwardRef(({children:o,keys:n,variant:e},r)=>{let t=react.useMemo(()=>{if(An(n)){let s=null;return {keys:String(n).split("+").reduce((l,m,i,a)=>(a[i+1]?l.push(m):s=m.toUpperCase(),l),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(c,{as:`--keyboard-keys --${e||W.Small} flex aic`,children:[(Array.isArray(t.keys)?t.keys:[t.keys]).map(s=>jsxRuntime.jsx("abbr",{title:zn[s],children:$n[s]},s)),jsxRuntime.jsx(J,{children:t?.children??o})]})});Fn.displayName="Zuz.KeyboardKeys";var So=Fn;var Kn=react.forwardRef((o,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:t,variant:s}=o;return jsxRuntime.jsxs(c,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:F.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||W.Small} fixed flex`,children:[jsxRuntime.jsx(c,{className:"--ico",children:e?O[le.Success]:O[le.Error]}),jsxRuntime.jsx(H,{as:"--message",children:e?r||"internet connection restored :)":t||"no internet connection"})]})});Kn.displayName="Zuz.NetWorkManager";var Fm=Kn;var Co=(e=>(e.Table="table",e.Gooey="gooey",e))(Co||{});var Gn=react.forwardRef((o,n)=>{let{itemCount:e,itemsPerPage:r,startPage:t,pageRange:s,paginationStyle:u,breakLabel:l,prevLabel:m,nextLabel:i,hash:a,loading:f,seperator:p,renderOnZeroPageCount:d,onPageChange:y,...w}=o,b=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(E=>`${core.toHash(E,a||6,b)}${p||""}${b}`,[b]),S=react.useMemo(()=>l||"...",[l]),[g,v]=react.useState({id:a?t?typeof t=="number"?h(t):t:1:t||1,label:t||1}),{style:R,className:T,rest:P}=I(w),N=react.useCallback(E=>typeof E=="number"?E:+E.label,[]);if(!e)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(e/r),[e,r]),L=react.useMemo(()=>{let E=[],_=Math.max(N(g)-(s||2),1),U=Math.min(N(g)+(s||2),M);_>1&&E.push({id:a?h(1):1,label:1}),_>2&&E.push({id:-1,label:S});for(let k=_;k<=U;k++)E.push({id:a?h(k):k,label:k});return U<M-1&&E.push({id:-1,label:S}),U<M&&E.push({id:a?h(M):M,label:M}),E},[g]),V=react.useCallback(E=>{let _=E;+_.label<1||+_.label>M||(v(_),y?.(_));},[e,r,g]);return L.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(c,{ref:n,as:`--pagination --pgt-${u||"table"} flex aic w:100% jcc ${T}`,children:[jsxRuntime.jsx(c,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:S}]).map((E,_,U)=>jsxRuntime.jsx(z,{disabled:E.id==-1||N(g)==+E.label,className:(typeof E=="string"?E:E.label)==N(g)?"--current-page":"",onClick:k=>V(E),children:typeof E=="string"?E:E.label},`--pg-${_}-${E.id}`))}),jsxRuntime.jsx(c,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(N(g)-1)*r+1} - `,`${Math.min(N(g)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(c,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(z,{disabled:N(g)<=1,onClick:E=>V({id:a?h(N(g)-1):N(g)-1,label:N(g)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(z,{disabled:L.length<=1||N(g)==N(L[L.length-1]),onClick:E=>V({id:a?h(N(g)+1):N(g)+1,label:N(g)+1}),children:O.chevronRightOutline})]})]})});Gn.displayName="Zuz.Pagination";var Po=Gn;var Xn=react.forwardRef((o,n)=>{let{strenthMeter:e,onChange:r,...t}=o;"type"in t&&delete t.type;let{style:s,className:u,rest:l}=I(t),[m,i]=react.useState(false),[a,f]=react.useState(""),p=react.useMemo(()=>core.checkPasswordStrength(a),[a]),d=hooks.useDebounce(y=>{e&&f(y.target.value),r&&r(y);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(c,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:n,type:m?"text":"password",className:u,onChange:d,...l}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:()=>i(y=>!y),className:"--toggle flex aic jcc abs",children:m?O.eye:O.eyeSlash})]}),e&&jsxRuntime.jsxs(c,{as:`flex aic --password-meter --pb-score-${p.score}`,style:s,children:[jsxRuntime.jsxs(c,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(c,{as:`--pbar ${p.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:p.result})]})]})});Xn.displayName="Zuz.Password";var Jm=Xn;var Qn=react.forwardRef((o,n)=>{let{size:e,length:r,mask:t,...s}=o,u=react.useRef([]),l="pinput",m=false,i={};"with"in s&&(i={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(m=true,delete s.required);let{style:a}=I(s),f=p=>{let d=p.currentTarget,y=u.current[parseInt(d.dataset.index)+1],w=u.current[parseInt(d.dataset.index)-1];d.value.length===1&&y?y.focus():d.value.length===0&&w&&w.focus();};return react.useEffect(()=>{u.current=u.current.slice(0,e||r);},[e||r]),jsxRuntime.jsx(c,{name:l,style:a,className:"--otp flex aic rel","data-required":m,"data-size":e||r||4,...i,children:Array(e||r||4).fill(1).map((p,d)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":d,ref:y=>{u.current[d]=y;},numeric:true,onChange:f,maxLength:1,placeholder:t?"\xB7":"0",type:t?"password":"text",...s},`pin-${d}`))})});Qn.displayName="Zuz.PinInput";var oc=Qn;var Jn=react.forwardRef((o,n)=>{let{children:e,className:r,name:t,required:s,type:u,value:l,variant:m,checked:i,onSwitch:a,...f}=o,[p,d]=react.useState(i||false),{variant:y}=X(true),w=react.useRef(null);return jsxRuntime.jsxs(et,{className:`${r} --${(u||kt.Default).toLowerCase()} --radio${!u||u==kt.Default?"":"card"} --${m||y||W.Small} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(oe,{ref:w,defaultChecked:p,value:l||"rd",type:"radio",className:"abs",name:t,required:s||false,onChange:b=>{a&&a(b.target.checked,l||"cb"),d(b.target.checked);}}),jsxRuntime.jsx(c,{className:"--dot rel",children:jsxRuntime.jsx(c,{className:"--rod abs abc"})}),jsxRuntime.jsx(c,{className:"--value",children:e})]})});Jn.displayName="Zuz.Radio";var ac=Jn;var jn=react.forwardRef((o,n)=>{let{fx:e,withStyle:r,as:t,reverse:s=false,searchIcon:u=O.search,hideSearchIcon:l=false,clearIcon:m=O.close,hideClearIcon:i=false,onChange:a,onClear:f,...p}=o,{style:d,className:y}=I({as:o.as}),[w,b]=react.useState(""),{variant:h}=X(true),S=react.useRef(null),g=react.useMemo(()=>jsxRuntime.jsx(z,{tabIndex:-1,onClick:T=>R(),className:"--send flex aic jcc",variant:o.variant||W.Small,children:w!==""?!i&&(typeof m=="string"?jsxRuntime.jsx(Y,{name:m,as:"--search-action"}):m):!l&&(typeof u=="string"?jsxRuntime.jsx(Y,{name:u,as:"--search-action"}):u)}),[s,u,i,m,l]);"type"in o&&delete o.type;let v=T=>{b(T.target.value),a?.(T.target.value);},R=T=>{w.trim()!==""&&(b(""),a?.(""),S.current&&(S.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{style:d,className:`--search ${s?"--search-rev":""} --${o.variant||h||W.Medium} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[s&&g,jsxRuntime.jsx(oe,{ref:S,onChange:v,...p}),o.shortcut&&jsxRuntime.jsx(So,{keys:o.shortcut,as:"abs"}),!s&&g]})});jn.displayName="Zuz.Search";var dc=jn;var ts=({value:o,updateValue:n,o:e})=>jsxRuntime.jsxs(z,{onClick:r=>n(e),as:"--select-option-item",className:o&&(typeof e=="string"?e:e.value)==(typeof o=="string"?o:o.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(Y,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(H,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});ts.displayName="Option";var os=ts;var ns=({ref:o,...n})=>{let{selected:e,options:r,label:t,name:s,variant:u,search:l,searchPlaceholder:m,maxHeight:i,arrowDownIcon:a=O.arrowDown,arrowUpIcon:f=O.arrowUp,onChange:p,...d}=n,[y,w]=react.useState(e?typeof e=="string"?r.find(k=>k.value===e):e:r[0]),[b,h]=react.useState(false),[S,g]=react.useState(null),v=react.useRef(null),R=react.useRef(null),T=react.useRef(null),P=react.useId(),N=react.useMemo(()=>s||P,[]),{reposition:M}=Ue(T,{direction:Lt.Bottom,offset:2}),{variant:L}=X(true),{className:V,style:E,rest:_}=I(d),U=k=>{w(k),h(false),p&&p(k);};return react.useImperativeHandle(o,()=>({setSelected:k=>{if(typeof k=="string"){let C=r.find(A=>A.value===k);C&&w(C);}else w(k);},getValue:()=>y||null})),react.useEffect(()=>{if(!b)return;let k=()=>{M();};return window.addEventListener("scroll",k,true),window.addEventListener("resize",M),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",M);}},[b,M]),react.useEffect(()=>{if(!b){R.current&&(R.current.value=""),g(null);return}R.current?.focus(),M();let k=A=>{T.current&&!T.current.contains(A.target)&&h(false);},C=setTimeout(()=>{document.addEventListener("click",k);},0);return ()=>{clearTimeout(C),document.removeEventListener("click",k);}},[b,M]),jsxRuntime.jsxs(c,{className:`--select --${u||L} ${s?`--${s}`:""} rel`.trim(),name:N,children:[jsxRuntime.jsxs(z,{ref:v,"data-value":y?typeof y=="string"?y:y.value:y||"-1",className:`--selected flex aic rel ${V}`.trim(),withLabel:false,style:E,onClick:k=>{k.stopPropagation(),h(C=>!C);},..._,children:[jsxRuntime.jsx(H,{className:"--label",children:y?typeof y=="string"?y:y.label:t||"Choose"}),jsxRuntime.jsx(c,{className:"--svg-arrow rel flex aic jcc",children:b?typeof f=="string"?jsxRuntime.jsx(Y,{name:f,as:"--search-action"}):f:typeof a=="string"?jsxRuntime.jsx(Y,{name:a,as:"--search-action"}):a})]}),jsxRuntime.jsxs(c,{id:N,className:"--options-list flex cols abs","aria-hidden":!b,style:{maxHeight:i||"auto"},ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:b,duration:.05},children:[l&&jsxRuntime.jsx(c,{as:"--select-search --sticky",children:jsxRuntime.jsx(oe,{ref:R,onChange:k=>{g(k.target.value==""?null:k.target.value);},className:"--search-input",placeholder:m||"Search..."})}),(S==null?r:r.filter(k=>k.label.toLowerCase().includes(S.toLowerCase())||k.value.toLowerCase().includes(S.toLowerCase()))).map(k=>jsxRuntime.jsx(os,{updateValue:U,value:y,o:k},`option-${(typeof k=="string"?k:k.label).replace(/\s+/g,"-")}-${typeof k=="string"?k:k.value}`))]})]})};ns.displayName="Zuz.Select";var wc=ns;var ss=react.forwardRef((o,n)=>jsxRuntime.jsx(tt,{type:ye.Switch,...o,ref:n}));ss.displayName="Zuz.Switch";var Sc=ss;var is=o=>{let{idx:n,id:e,as:r,weight:t,style:s,value:u,render:l,resize:m,sortBy:i,sortable:a,onSort:f}=o,[p,d]=react.useState(0),y=()=>{a&&(f?.(String(e),p==1?-1:1),d(w=>w==1?-1:1));};return jsxRuntime.jsxs(c,{style:{flex:t||1,...s},as:`--col flex aic ${r||""} ${a?"--sortable":""}`,onClick:y,children:[jsxRuntime.jsx(c,{children:u}),n==-1&&a&&i==e&&jsxRuntime.jsx(c,{as:"--arrow flex aib",children:p==1?O.arrowUp:O.arrowDown})]})};is.displayName="Zuz.Column";var Tt=is;var ms=o=>{let{index:n,pubsub:e,schema:r,data:t,ids:s,styles:u,animate:l,sortBy:m,selectable:i,tableRef:a,loading:f,rowClassName:p,onSort:d,onRowClick:y,onSelect:w,onContextMenu:b}=o,h=hooks.useDelayed(),S=react.useMemo(()=>({transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(n+1)}),[]),g=react.useRef(null),v=(T,P)=>{n==-1?e.emit(`ALL_ROWS_${T?"CHECKED":"UNCHECKED"}`,T):(w&&w(t,T),e.emit(`ROW_${T?"CHECKED":"UNCHECKED"}`,T,P));},R=(T,P,N)=>jsxRuntime.jsx(Tt,{idx:T,id:P,as:"--selector",pubsub:e,value:jsxRuntime.jsx(tt,{value:N,ref:g,onSwitch:v,type:ye.Default})});return react.useEffect(()=>{let T=(L,V)=>{g.current?.setChecked(L,false);},P=(L,V)=>{let E=false;a?.current&&a.current.querySelectorAll(".--row").forEach(_=>{let U=_;if(!U.classList.contains("--row-head")){let k=U.querySelector(".--selector input[type=checkbox]");k&&k.checked&&!E&&(E=k.checked);}}),g.current.setChecked(E,false);},N=L=>{g.current?.setChecked(L,false),w&&w(t,L);},M=L=>{g.current?.setChecked(L,false),w&&w(t,L);};return n==-1?(e.on("ROW_CHECKED",T),e.on("ROW_UNCHECKED",P),()=>{e.off("ROW_CHECKED",T),e.off("ROW_UNCHECKED",P);}):(e.on("ALL_ROWS_CHECKED",N),e.on("ALL_ROWS_UNCHECKED",M),()=>{e.off("ALL_ROWS_CHECKED",N),e.off("ALL_ROWS_UNCHECKED",M);})},[]),jsxRuntime.jsxs(c,{onContextMenu:T=>b?b(T,t):null,onClick:T=>y?y(T,o.data):()=>{},...l?{fx:{...S,when:h}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${n==-1?"--row-head":""} ${p||""}`,children:[n==-1&&r.map((T,P)=>{let{renderWhenHeader:N,render:M,value:L,...V}=T;return jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&R(-1,`--selector-${T.id}`,"all"),jsxRuntime.jsx(Tt,{idx:-1,onSort:d,sortBy:m,value:L,...V,pubsub:e,style:u[T.id]})]},`--col-${T.id}`)}),f&&n>-1&&jsxRuntime.jsx(c,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&t&&r.map((T,P)=>jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&R(P,`--selector-${T.id}`,T.id.toString()),s.includes(String(T.id))?jsxRuntime.jsx(Tt,{pubsub:e,idx:P,id:String(T.id),style:u[String(T.id)],value:T.render?T.render(t,n):t[String(T.id).includes(".")?String(T.id).split(".").reverse()[0]:T.id]}):null]},`--${String(T.id)}-val-${P}`))]})};ms.displayName="Zuz.Row";var Pt=ms;var fs=(o,n)=>{let{schema:e,rows:r,rowCount:t,rowsPerPage:s,currentPage:u,pagination:l,paginationHash:m,showPaginationOnZeroPageCount:i,animateRows:a,header:f,rowClassName:p,selectableRows:d,hoverable:y,sortBy:w,loading:b,loadingRowCount:h,loadingMessage:S,spinner:g,emptyMessage:v,onSort:R,onRowClick:T,onRowSelectToggle:P,onPageChange:N,onRowContextMenu:M,...L}=o,V=react.useRef(null),E=react.useMemo(()=>e.reduce((ne,Q)=>(ne[Q.id]={flex:Q.weight||1,...Q.w&&{width:Q.w},...Q.maxW&&{maxWidth:Q.maxW},...Q.minW&&{minWidth:Q.minW},...Q.h&&{height:Q.h},...Q.maxH&&{maxHeight:Q.maxH},...Q.minH&&{minHeight:Q.minH}},ne),{}),[e]),_=react.useMemo(()=>Object.keys(E),[e]),U=react.useMemo(()=>f??true,[f]),{style:k,className:C,rest:A}=I(L),$=react.useRef(null),K=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(r.map(()=>core.uuid(8))),[Z,q]=react.useState(w||null),[te,j]=react.useState(S||"loading"),pe=react.useMemo(()=>!b&&r&&r.length==0,[b,r]),de=react.useCallback(()=>v?typeof v=="function"?jsxRuntime.jsx(v,{}):v:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[b,r]);react.useEffect(()=>{D.current=r.map(()=>core.uuid(8));},[r]);let Nt=(ne,Q)=>{q(ne),R?.(ne,Q);},Et=(t||(r?r.length:0))/(s||10),Ie=react.useMemo(()=>i||Et>1?jsxRuntime.jsx(Po,{hash:m,ref:V,renderOnZeroPageCount:i,onPageChange:N,paginationStyle:"table",startPage:u,itemCount:t||(r?r.length:0),itemsPerPage:s||10}):null,[u,t]);return react.useImperativeHandle(n,()=>({setLoading(ne){}})),jsxRuntime.jsxs(c,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${C}`,ref:$,children:[U==true&&jsxRuntime.jsx(Pt,{sortBy:Z,onSort:Nt,tableRef:$,pubsub:K,selectable:d,index:-1,schema:e,loading:true,styles:E}),b&&jsxRuntime.jsxs(c,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:g||re.Simple}),te&&jsxRuntime.jsx(H,{as:"--table-loading-message",children:te})]}),b&&Array(h||5).fill({}).map((ne,Q)=>jsxRuntime.jsx(Pt,{tableRef:$,index:Q,pubsub:K,schema:e,styles:E,loading:true,animate:a,onRowClick:T},`--trow-loading-${Q}-${e[0].id}`)),!b&&r&&r.map((ne,Q)=>jsxRuntime.jsx(Pt,{tableRef:$,pubsub:K,loading:false,index:Q,schema:e,ids:_,styles:E,animate:a,data:ne,onRowClick:T,rowClassName:p,selectable:d,onSelect:P,onContextMenu:M},`--trow-${D.current[Q]||Q}-${e[0].id}`)),pe&&de(),jsxRuntime.jsx(c,{"aria-hidden":!l||!Ie,...a?{fx:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(r.length+1),when:!b&&r&&l&&Ie!=null}}:{},as:"--row flex aic --row-footer",children:l&&Ie?Ie:null})]})};fs.displayName="Zuz.Table";var Dc=react.forwardRef(fs),Hc=Dc;var Ac=({ref:o,...n})=>{let{title:e,items:r}=n,[t,s]=react.useState(0),u=(l,m,i)=>{l.preventDefault(),s(m),document.getElementById(i)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(c,{ref:o,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:e}),jsxRuntime.jsx(Me,{items:r.map((l,m)=>jsxRuntime.jsx("a",{className:t==m?"--toc-active":"",style:{anchorName:t===m?"--toc-active":"none",color:t==m?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:i=>u(i,m,l.tag),href:`#${l.tag}`,children:l.label}))})]})},$c=Ac;var ds=({isActive:o,transitionType:n,speed:e,width:r,render:t,content:s,onHeightChange:u})=>{let l=react.useRef(null),m=hooks.useResizeObserver(l);react.useEffect(()=>{o&&m.height>0&&u(m.height);},[o,m.height]);let i=react.useMemo(()=>{let a={flexShrink:0,height:"fit-content"};return n==="fade"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:o?1:0}:n==="scale"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:a},[o,n,r,e]);return jsxRuntime.jsx(c,{ref:l,style:{...i},className:"--content",children:t||o?s:null})};ds.displayName="Zuz.TabBody";var gs=ds;var ys=({ref:o,...n})=>{let{tabs:e,speed:r=.3,prerender:t=true,variant:s,tabStyle:u="fixed",onChange:l,transitionType:m="slide",...i}=n,[a,f]=react.useState(0),p=react.useRef(null),d=hooks.useResizeObserver(p),y=react.useMemo(()=>core.uuid(8),[]),[w,b]=react.useState("auto"),h=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(o,()=>({setTab:P=>f(P)}));let S=react.useMemo(()=>e.map(P=>({...P,key:P.key||core.uuid(8)})),[e]),{style:g,className:v,rest:R}=I({as:`flex cols w-full no-overflow ${i.as||""}`,...i}),T=()=>{if(!h)return {opacity:0};switch(m){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${a*d.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(c,{ref:p,style:g,className:`--tabview --${u} flex cols ${v}`,children:[jsxRuntime.jsx(ot,{as:"--tabview-head",onSwitch:P=>{f(P.index);let N=S.find(M=>M.tag==P.tag);N&&N.onSelect&&(N.onSelect(N,P.index),l?.(N,P.index));},selected:a,items:S.reduce((P,N,M)=>(P.push({icon:N.icon,index:M,label:N.label,tag:N.tag}),P),[])}),jsxRuntime.jsx(c,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:w,transition:h?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:h?1:0},children:jsxRuntime.jsx(c,{className:"--track",style:{...T()},children:S.map((P,N)=>jsxRuntime.jsx(gs,{isActive:N===a,transitionType:m,speed:r,width:d.width,render:t||N===a,onHeightChange:M=>N===a&&b(M),content:P.body},`tab-body-${P.key||N}-${y}`))})})]})};ys.displayName="Zuz.TabView";var Xc=ys;var jc=({ref:o,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:t="zuz ~ ",variant:s,...u})=>{let[l,m]=react.useState([{type:"output",content:r}]),[i,a]=react.useState(""),f=react.useRef(null),p=react.useRef(null),{variant:d}=X(true);react.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[l]);let y=v=>{let R=typeof v=="string"?{type:"output",content:v}:v;m(T=>{let P=[...T,R];return P.length>1e3?P.slice(-1e3):P});},w=()=>m([]);react.useImperativeHandle(o,()=>({write:y,clear:w}));let b=async v=>{let[R,...T]=v.split(" "),P=R.toLowerCase();return n&&n[P]?await n[P](T):e?await e(v):`command not found: ${R}`},h=v=>{let R=/\u001b\[(\d+)m/g,T=[],P={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},N=0,M="#d4d4d4",L=false,V;for(;(V=R.exec(v))!==null;){let _=v.slice(N,V.index);_&&T.push({text:_,color:M,bold:L});let U=V[1];U==="0"?(M="#d4d4d4",L=false):U==="1"?L=true:P[U]&&(M=P[U]),N=R.lastIndex;}let E=v.slice(N);return E&&T.push({text:E,color:M,bold:L}),T},S=(v,R)=>v.includes("\x1B")?h(v).map((T,P)=>jsxRuntime.jsx(J,{style:{color:T.color||"#d4d4d4",fontWeight:T.bold?"bold":"normal"},children:T.text},`--terminal-msg-${P}-${T.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(J,{style:{color:R==="error"?"#ff5f56":R==="command"?"#00ff00":"#d4d4d4"},children:v}),g=async v=>{if(v.key==="Enter"&&i.trim()){let R=i.trim(),T=[...l,{type:"command",content:`${t}${R}`}];a(""),m(T);let P=await b(R);m(N=>[...N,{type:"output",content:P}]);}};return jsxRuntime.jsxs(c,{as:`--zuz-terminal --${s||d||W.Medium} flex cols ${u.className}`,onClick:()=>p.current?.focus(),children:[jsxRuntime.jsx(c,{ref:f,className:"--terminal-log",children:l.map((v,R)=>jsxRuntime.jsx(c,{children:jsxRuntime.jsx(H,{children:S(v.content,v.type)})},R))}),jsxRuntime.jsxs(c,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:t}),jsxRuntime.jsx(oe,{ref:p,className:"--zuz-term-input",autoFocus:true,value:i,variant:s||d||W.Medium,onChange:v=>a(v.target.value),onKeyDown:g})]})]})},ep=jc;var tp=({meta:o})=>jsxRuntime.jsxs(z,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(Y,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:o.label})]}),op=({position:o,onSelect:n,commands:e,visible:r})=>jsxRuntime.jsx(c,{"aria-hidden":!r,fx:{transition:G.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...o},children:e.map(t=>jsxRuntime.jsx(tp,{meta:t},`cmd-${t.label.replace(/\s+/,"-")}`))}),Ss=op;var Ps=react.forwardRef((o,n)=>{let{autoResize:e,maxHeight:r,variant:t,resize:s="none",command:u,commands:l,onInput:m,cmd:i,renderDropdown:a,value:f,defaultValue:p,...d}=o,y=react.useRef(null),w=react.useRef(null),{variant:b}=X(true),{style:h,className:S,rest:g}=I(d),{showDropdown:v,dropdownPosition:R,handleKeyDown:T,handleInput:P,handleCommandSelect:N}=hooks.useCommandActions({command:u,commands:l,cmd:i,ref:y}),M=react.useCallback(()=>{let V=y.current;!V||!e||(w.current&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(r){let _=parseInt(r.toString(),10);isNaN(_)||(E=Math.min(E,_));}V.style.height=`${E}px`,V.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),L=V=>{m?.(V),P(V),M();};return react.useEffect(()=>{M();},[f,p,M]),react.useEffect(()=>{e&&y.current&&M();},[e,M]),react.useEffect(()=>()=>{w.current&&cancelAnimationFrame(w.current);},[]),jsxRuntime.jsxs(c,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${t||b||W.Medium} flex ${S}`.trim(),style:{...h,resize:s,height:e?"auto":h?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:T,onInput:L,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),y.current=V;},value:f,defaultValue:p,...g}),a?a({show:v,position:R,commands:l||[],onSelect:N}):l&&l.length>0&&jsxRuntime.jsx(Ss,{visible:v,commands:l,onSelect:N,position:R})]})});Ps.displayName="Zuz.TextArea";var ip=Ps;var Is=react.forwardRef((o,n)=>{let{as:e,value:r,color:t,direction:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(a){m.toString().length!==a.toString().length&&i(a);},setValue(a){if(this.updateValue(a),l.current){let f=a.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((p,d)=>{let y=f[d];if(p instanceof HTMLElement){p.setAttribute("data-value",y);let w=p.querySelector(".--wheel-char-track");w instanceof HTMLElement&&(w.style.setProperty("--v",y),w.offsetWidth);}});}}})),react.useEffect(()=>{i(r||0);},[r]),jsxRuntime.jsxs(c,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:l,...u,children:[(m||0).toString().split("").map((a,f)=>isNaN(parseInt(a,10))?jsxRuntime.jsx(J,{className:"--wheel-char wheel-char-symbol grid",children:a},`wheel-char-symbol-${f}`):jsxRuntime.jsx(J,{"data-value":a,className:`--wheel-char grid ${f>(m||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(J,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":a},children:[jsxRuntime.jsx(J,{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,d)=>jsxRuntime.jsx(J,{children:p},`${f}--${d}`)),jsxRuntime.jsx(J,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),t&&jsxRuntime.jsx(c,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${t}, transparent, transparent, transparent, ${t})`}})]})});Is.displayName="Zuz.TextWheel";var dp=Is;var Ls=react.forwardRef((o,n)=>{let{title:e,position:r,margin:t,children:s,...u}=o,{style:l,className:m,rest:i}=I(u),[a,f]=react.useState(false),p=react.useMemo(()=>r||ee.Top,[]),d=react.useRef(null),y=react.useRef(null),w=g=>{},b=typeof ResizeObserver<"u"?new ResizeObserver(w):{observe:()=>{},unobserve:()=>{}},h=hooks.useDimensions(),S=react.useMemo(()=>{if(!y.current)return {left:0,top:0};let g=y.current.previousElementSibling;if(g){let v=g.getBoundingClientRect();switch(b.observe(g),p){case ee.Top:return {left:v.left+v.width/2,top:v.top-(t||25)};case ee.Bottom:return {left:v.left+v.width/2,top:v.top+(t||25)};case ee.Left:return {left:v.left-v.width/2,top:v.top+v.height/2};case ee.Right:return {left:v.right,top:v.top+v.height/2};default:return {left:0,top:0}}}},[y.current,h,b]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[s,jsxRuntime.jsx(c,{ref:y,style:{left:S?.left+"px",top:S?.top+"px"},className:`--tooltip --${r||ee.Top} fixed ${m}`.trim(),fx:{from:p==ee.Bottom||p==ee.Top?{opacity:0,x:"-50%",y:p==ee.Top?-5:5}:{opacity:0,y:"-50%",x:p==ee.Right?15:-25},to:p==ee.Bottom||p==ee.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:p==ee.Right?10:-20},curve:F.EaseInOut,when:a},children:jsxRuntime.jsx(H,{className:"--text rel",children:e})})]})});Ls.displayName="Zuz.ToolTip";var bp=Ls;var Do=react.forwardRef((o,n)=>{let{as:e,meta:r,nodes:t,icons:s,onSelect:u,treeTag:l,selected:m,roots:i,expanded:a,...f}=o,{tag:p,label:d,icon:y,under:w,isHead:b}=r,h=react.useMemo(()=>i.includes(p),[i]),[S,g]=react.useState(a),v=()=>{localStorage.setItem(`--tn${l}-${p}`,S?"0":"1"),g(!S);};react.useEffect(()=>{a||h&&!localStorage.getItem(`--tn${l}-${p}`)?(localStorage.setItem(`--tn${l}-${p}`,"1"),g(true)):g(localStorage.getItem(`--tn${l}-${p}`)=="1");},[]);let R=react.useMemo(()=>t.filter(T=>T.under==p),[t,p]);return jsxRuntime.jsxs(c,{className:`--treenode ${h?"--is-root":""} --treenode-${p} flex cols`,children:[jsxRuntime.jsxs(c,{className:`--node --node-${p} flex aic ${m==p?" --selected":""}`,children:[jsxRuntime.jsx(z,{skeleton:f.skeleton,onClick:v,className:"--node-aro-btn",disabled:R.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:"--node-aro-icon",name:R.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):R.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(z,{className:"--node-meta flex aic",onClick:T=>u(p),children:[(s?.nodeOpen&&s?.nodeClose||h&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:`--node-icon ${h?"--icon-root":""}`,name:y||(S?h&&s?.rootOpen||s.nodeOpen:h&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${h?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),S&&R.length>0&&jsxRuntime.jsx(c,{className:`--sub-node tree-sub-node-${p} flex cols`,children:R.map(T=>jsxRuntime.jsx(Do,{treeTag:l,selected:m,onSelect:u,icons:s,roots:i,expanded:T.expanded||false,meta:T,nodes:t},`--node-${T.tag}`))})]})});Do.displayName="TreeItem";var ks=Do;var Ds=react.forwardRef((o,n)=>{let{as:e,nodes:r,onNodeSelect:t,tag:s,icons:u,roots:l,selected:m,...i}=o,[a,f]=react.useState(m);react.useImperativeHandle(n,()=>({getSelected:()=>a}),[t]);let p=d=>{f(d),t&&t(d);};return react.useEffect(()=>{a!=m&&f(m);},[m]),jsxRuntime.jsx(c,{className:"--treeview flex cols",children:r.filter(d=>l.includes(d.tag)).map(d=>jsxRuntime.jsx(ks,{treeTag:s?`-${s}`:"",selected:a,onSelect:y=>p(y),icons:u,meta:d,roots:l,expanded:d.expanded||false,skeleton:i.skeleton,nodes:r},`--node-${d.tag}`))})});Ds.displayName="Zuz.TreeView";var Np=Ds;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
+ Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkEA4UJ6EJ_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkEA4UJ6EJ_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkEA4UJ6EJ_cjs.h}});exports.ALERT=le;exports.AVATAR=_o;exports.Accordion=mi;exports.ActionBar=gi;exports.Alert=yi;exports.AutoComplete=Hi;exports.Avatar=Ki;exports.Badge=Ui;exports.Box=c;exports.Bubble=wl;exports.BubbleMediaType=sn;exports.BubbleStatus=nn;exports.Button=z;exports.CHART=en;exports.CHECKBOX=ye;exports.COLORTHEME=Mp;exports.Calendar=io;exports.Chart=fl;exports.CheckBox=tt;exports.CodeBlock=Ll;exports.ColorScheme=Ul;exports.ContextMenu=Ft;exports.CookiesConsent=Yl;exports.Cover=Ne;exports.CropShape=nm;exports.Cropper=om;exports.Crumb=am;exports.DATATYPE=Dp;exports.DIALOG=He;exports.DIALOG_ACTION_POSITION=Fo;exports.DRAWER_SIDE=se;exports.DatePicker=cm;exports.Dialog=Kt;exports.Drawer=Yt;exports.FILTER=ct;exports.FORMVALIDATION=be;exports.FORMVALIDATION_STYLE=Hp;exports.Fab=dm;exports.Filters=xm;exports.Form=Lm;exports.Grid=Dm;exports.Group=Zt;exports.Icon=Y;exports.Image=Je;exports.Input=oe;exports.KeyboardKeys=So;exports.KeysLabelMap=zn;exports.KeysMap=$n;exports.Label=et;exports.LayersProvider=zt;exports.List=Me;exports.NetworkStatus=Fm;exports.ORIGIN=Ke;exports.OriginType=kp;exports.Overlay=Ee;exports.POSITION=Lt;exports.PROGRESS=Ap;exports.Pagination=Po;exports.PaginationStyle=Co;exports.Password=Jm;exports.PinInput=oc;exports.Position=ee;exports.ProgressBar=mo;exports.RADIO=kt;exports.Radio=ac;exports.SHEET=me;exports.SHEET_ACTION_POSITION=Mt;exports.SKELETON=Lp;exports.SLIDER=mt;exports.SORT=Op;exports.SPINNER=re;exports.ScrollView=Ut;exports.Search=dc;exports.Select=wc;exports.SelectTabs=ot;exports.Sheet=Sm;exports.Slider=go;exports.Span=J;exports.Spinner=ge;exports.Status=Vp;exports.Switch=Sc;exports.TRANSITIONS=G;exports.TRANSITION_CURVES=F;exports.TabView=Xc;exports.Table=Hc;exports.TableOfContents=$c;exports.Terminal=ep;exports.Text=H;exports.TextWheel=dp;exports.Textarea=ip;exports.ThemeProvider=qs;exports.ToastDefaultTitle=Ir;exports.ToastProvider=Qt;exports.ToastType=Rr;exports.ToolTip=bp;exports.TreeView=Np;exports.Variant=W;exports.animationTransition=We;exports.buildClassString=Ot;exports.buildWithStyles=Wo;exports.css=nu;exports.getAnimationCurve=Dt;exports.getAnimationTransition=su;exports.getZuzMap=Vs;exports.isKeyCombination=An;exports.setZuzMap=Ko;exports.useBase=I;exports.useContextMenu=ri;exports.useDialog=Ua;exports.useDrawer=Qa;exports.useFx=ae;exports.useMorph=ei;exports.usePosition=Ue;exports.useToast=jt;