@zuzjs/ui 1.0.12 → 1.0.14

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 chunkX4NXRKUY_cjs=require('./chunk-X4NXRKUY.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),reactDom=require('react-dom'),dateFns=require('date-fns'),react$1=require('@zuzjs/core/react');/* ZuzJS UI CLI */
2
- var Et={Circle:"CIRCLE",Square:"SQUARE"},Pp={Default:"DEFAULT",Circle:"CIRCLE"},Rp={Light:"light",Dark:"dark",System:"system"},be={Default:"DEFAULT",Switch:"SWITCH"},Bt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ee=Bt,Ze=hooks.AnchorType,Np=Ze,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Ip={Asc:"ASC",Desc:"DESC"},Ep={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Bp={Dots:"DOTS"},ve={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},ae={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"},Lp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},ie={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},ke=ie,Lt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Ao=Lt,Mp={Bar:"BAR",Ring:"RING"},pt={Default:"range",Text:"number"},Mt={Default:"DEFAULT",Card:"CARD"},ut={Gooey:"gooey"},re={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Vo=Symbol.for("zuz.global.map"),$o=o=>{globalThis[Vo]=o;},Es=()=>globalThis[Vo]||{},Ot=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e=Es();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkX4NXRKUY_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkX4NXRKUY_cjs.h(n).filter(Boolean).map(t=>{let s=t.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[u,m,p]=s;return chunkX4NXRKUY_cjs.h(p).map(a=>{let i=`${m}(${a})`;return e[i]||a}).join(" ")}return e[t]||t}).join(" ")},Jp=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":Ot(n)},zo=o=>{let n={};for(let e in o){let r=o[e];if(e.startsWith("--")){n[e]=r;continue}let t=chunkX4NXRKUY_cjs.e[e]?.toString()??e;if(t==="x"||t==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkX4NXRKUY_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"} ${chunkX4NXRKUY_cjs.i.addUnitsSafely(e,r)}`;}else chunkX4NXRKUY_cjs.d.includes(t)?n[t]=chunkX4NXRKUY_cjs.i.addUnitsSafely(e,r):n[t]=r;}return n},kt=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"}},Ke=(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}},jp=(o,n,e)=>{let{from:r,to:t}=Ke(o);return n?{...r,...t}:e?r:t};var Ms=(o,n)=>{let e=react.useRef([]);return react.useEffect(()=>{let r=n?.current;if(!r||!o||!o.clearAtEnd)return;let t=s=>{e.current.includes(s.propertyName)&&o.clearAtEnd===true&&(r.style.transform="",r.style.filter="",e.current.forEach(u=>r.style.removeProperty(u)));};return r.addEventListener("transitionend",t),()=>r.removeEventListener("transitionend",t)},[o,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let r=n.current;(o?.scroll||o?.mouse)&&(r.style.willChange="transform",r.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",r.style.transition=`translate 0.1s ${o.curve?kt(o.curve):"var(--spring)"}`);},[o,n]),react.useMemo(()=>{if(!o)return {style:{}};let{transition:r,from:t,to:s,exit:u,when:m,duration:p=.3,delay:a=0,curve:i}=o,f={},{from:c,to:g}=r?Ke(r):{from:t||{},to:s||{}};f=m===void 0?{...c,...g}:m?{...g}:u||c;let v=kt(i),x=[],b=zo(f);e.current=Object.keys(b);let P={...b};return Object.keys(b).forEach(h=>{let d=h.startsWith("--")?"all":h;x.includes(d)||x.push(`${d} ${p}s ${v} ${a}s`);}),{style:{...P,transition:x.join(", ")}}},[o])},ne=Ms;var Os=(o,n)=>{let{as:e,fx:r,transition:t,skeleton:s,className:u,propsToRemove:m,style:p,...a}=o||{},i=t?{transition:t,duration:.3}:r||{},{style:f}=ne(i,n),c=Ot(e??"");return {style:{...p,...f},className:[u||"",c||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...chunkX4NXRKUY_cjs.g(a,m?[...m,"skeleton"]:["skeleton"])}}},R=Os;var As=(o,n={})=>{let{offset:e=8,direction:r="bottom",container:t=null,triggerRef:s=null}=n,u=react.useRef(null),m=react.useCallback(()=>{let p=o.current;if(!p)return;let a=s?.current||p.parentElement;if(!a){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=p.getBoundingClientRect(),f=a.getBoundingClientRect(),c,g;t?(c=t.getBoundingClientRect(),g="absolute"):(window.getComputedStyle(p).position==="fixed"?g="fixed":g="absolute",g==="fixed"?c={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:c={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),p.style.position!==g&&(p.style.position=g),u.current=g;let b=0,P=0;switch(r){case "top":b=f.top-i.height-e,P=f.left,b<c.top&&f.bottom+i.height+e<=c.bottom&&(b=f.bottom+e);break;case "bottom":b=f.bottom+e,P=f.left,b+i.height>c.bottom&&f.top-i.height-e>=c.top&&(b=f.top-i.height-e);break;case "left":b=f.top,P=f.left-i.width-e,P<c.left&&f.right+i.width+e<=c.right&&(P=f.right+e);break;case "right":b=f.top,P=f.right+e,P+i.width>c.right&&f.left-i.width-e>=c.left&&(P=f.left-i.width-e);break}if(b=Math.max(c.top,Math.min(b,c.bottom-i.height)),P=Math.max(c.left,Math.min(P,c.right-i.width)),u.current==="fixed")p.style.top=`${b}px`,p.style.left=`${P}px`;else {let h;p.offsetParent?h=p.offsetParent.getBoundingClientRect():h={top:0,left:0};let d=b-h.top+window.scrollY,w=P-h.left+window.scrollX;p.style.top=`${d}px`,p.style.left=`${w}px`;}},[o,s,e,r,t]);return react.useEffect(()=>{let p=o.current;if(!p)return;let a=s?.current||p.parentElement;if(!a){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(m);return i.observe(p),a&&i.observe(a),m(),window.addEventListener("resize",m),window.addEventListener("scroll",m,true),()=>{i.disconnect(),a&&i.disconnect(),window.removeEventListener("resize",m),window.removeEventListener("scroll",m,true);}},[o,r,e,t,s]),{postion:u.current,reposition:m}},Ue=As;var Fo=react.forwardRef((o,n)=>{let{when:e,...r}=o;return jsxRuntime.jsx(l,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...r})});Fo.displayName="Zuz.Overlay";var Ie=Fo;var Zo=({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})};Zo.displayName="Zuz.Span";var Y=Zo;var Uo="(prefers-color-scheme: dark)",Zs=typeof window>"u",Go=react.createContext(void 0),At=o=>{let n=react.useContext(Go);if(!n){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},Q=At,Ks=({children:o,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...t})=>(r&&$o(r),jsxRuntime.jsx(Us,{storageKey:n,forceTheme:e,...t,children:o})),Us=({children:o,storageKey:n,forceTheme:e,...r})=>{let[t,s]=react.useState(()=>e||Wo(n,"system")),[u,m]=react.useState(()=>e||Wo(n)),p=c=>(c||(c=window.matchMedia(Uo)),c.matches?"dark":"light"),a=react.useCallback(c=>{let g=c=="system"?p():c,v=document.documentElement;v.setAttribute("color-scheme",g),v.style.colorScheme=g,m(g);},[p]),i=react.useCallback(c=>{s(c),localStorage.setItem(n,c),a(c);},[t]),f=react.useCallback(c=>{let g=p(c);m(g),t==="system"&&a("system");},[t]);return react.useEffect(()=>{t==null&&window.localStorage.getItem(n);},[t]),react.useEffect(()=>{window.matchMedia(Uo).addEventListener("change",f);},[f]),react.useEffect(()=>{let c=g=>{g.key==n&&(g.newValue?i(g.newValue):i("system"));};return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[i]),react.useEffect(()=>{a(e||t||"system");},[t]),jsxRuntime.jsxs(Go,{value:{colorScheme:t,resolvedScheme:u,setColorScheme:i,...r},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ 'use strict';var chunkB55QHQO2_cjs=require('./chunk-B55QHQO2.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),react$1=require('@zuzjs/core/react'),reactDom=require('react-dom'),dateFns=require('date-fns');/* ZuzJS UI CLI */
2
+ var $o={Circle:"CIRCLE",Square:"SQUARE"},Rp={Default:"DEFAULT",Circle:"CIRCLE"},Ip={Light:"light",Dark:"dark",System:"system"},be={Default:"DEFAULT",Switch:"SWITCH"},Bt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ee=Bt,Ke=hooks.AnchorType,Np=Ke,U={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Ep={Asc:"ASC",Desc:"DESC"},Bp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Lp={Dots:"DOTS"},ve={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},ie={Success:"success",Error:"error",Warning:"warning",Info:"info"},_={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"},Mp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},le={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},De=le,Lt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},zo=Lt,Op={Bar:"BAR",Ring:"RING"},pt={Default:"range",Text:"number"},Mt={Default:"DEFAULT",Card:"CARD"},ut={Gooey:"gooey"},ne={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var _o=Symbol.for("zuz.global.map"),Fo=o=>{globalThis[_o]=o;},Ms=()=>globalThis[_o]||{},Ot=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let t=Ms();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${chunkB55QHQO2_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkB55QHQO2_cjs.h(n).filter(Boolean).map(e=>{let s=e.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[u,l,p]=s;return chunkB55QHQO2_cjs.h(p).map(a=>{let i=`${l}(${a})`;return t[i]||a}).join(" ")}return t[e]||e}).join(" ")},jp=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":Ot(n)},Ko=o=>{let n={};for(let t in o){let r=o[t];if(t.startsWith("--")){n[t]=r;continue}let e=chunkB55QHQO2_cjs.e[t]?.toString()??t;if(e==="x"||e==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkB55QHQO2_cjs.i.addUnitsSafely(t,r)} ${s[1]??"0px"}`;}else if(e==="y"||e==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunkB55QHQO2_cjs.i.addUnitsSafely(t,r)}`;}else chunkB55QHQO2_cjs.d.includes(e)?n[e]=chunkB55QHQO2_cjs.i.addUnitsSafely(t,r):n[e]=r;}return n},kt=o=>{if(!o)return "linear";switch(o.toUpperCase()){case _.Bounce:return "var(--bounce)";case _.Liquid:return "var(--liquid)";case _.Spring:return "var(--spring)";case _.EaseInOut:return "ease-in-out";case _.EaseOutBack:return "ease-out-back";default:return "linear"}},Ze=(o,n=0)=>{let t={},r={},e=n||20;switch(o){case G.SlideInLeft:case G.SlideInRight:t={"--fx-x":o===G.SlideInLeft?`-${e}px`:`${e}px`,opacity:0},r={"--fx-x":"0px",opacity:1};break;case G.SlideInTop:case G.SlideInBottom:t={"--fx-y":o===G.SlideInTop?`-${e}px`:`${e}px`,opacity:0},r={"--fx-y":"0px",opacity:1};break;case G.ScaleIn:t={scale:0,opacity:0},r={scale:1,opacity:1};break;case G.FadeIn:t={opacity:0},r={opacity:1};break}return {from:t,to:r}},eu=(o,n,t)=>{let{from:r,to:e}=Ze(o);return n?{...r,...e}:t?r:e};var ks=(o,n)=>{let t=react.useRef([]),r=react.useRef(false);return react.useEffect(()=>{o?.when||(r.current=false);},[o?.transition]),react.useEffect(()=>{let e=n?.current;if(!e||!o||!o.clearAtEnd)return;let s=u=>{t.current.includes(u.propertyName)&&o.clearAtEnd===true&&(e.style.transform="",e.style.filter="",t.current.forEach(l=>e.style.removeProperty(l)));};return e.addEventListener("transitionend",s),()=>e.removeEventListener("transitionend",s)},[o,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let e=n.current;(o?.scroll||o?.mouse)&&(e.style.willChange="transform",e.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",e.style.transition=`translate 0.1s ${o.curve?kt(o.curve):"var(--spring)"}`);},[o,n]),react.useMemo(()=>{if(!o)return {style:{}};let {transition:e,from:s,to:u,exit:l,when:p,duration:a=.3,delay:i=0,curve:f}=o,m=p===false&&!r.current;p===false&&r.current;p===true&&(r.current=true);let v={},{from:y,to:b}=e?Ze(e):{from:s||{},to:u||{}};v=p===void 0?{...y,...b}:p?{...b}:l||y;let P=kt(f),h=[],g=Ko(v);t.current=Object.keys(g);let w={...g};Object.keys(g).forEach(C=>{let S=C.startsWith("--")?"all":C;h.includes(S)||h.push(`${S} ${a}s ${P} ${i}s`);});return {style:{...w,transition:m?"none":h.join(", "),opacity:m?0:w.opacity,pointerEvents:m?"none":w.pointerEvents}}},[o,o?.when])},se=ks;var Ds=(o,n)=>{let{as:t,fx:r,transition:e,skeleton:s,className:u,propsToRemove:l,style:p,...a}=o||{},i=e?{transition:e,duration:.3}:r||{},{style:f}=se(i,n),m=Ot(t??"");return {style:{...p,...f},className:[u||"",m||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...chunkB55QHQO2_cjs.g(a,l?[...l,"skeleton"]:["skeleton"])}}},R=Ds;var $s=(o,n={})=>{let{offset:t=8,direction:r="bottom",container:e=null,triggerRef:s=null}=n,u=react.useRef(null),l=react.useCallback(()=>{let p=o.current;if(!p)return;let a=s?.current||p.parentElement;if(!a){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=p.getBoundingClientRect(),f=a.getBoundingClientRect(),m,d;e?(m=e.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(p).position==="fixed"?d="fixed":d="absolute",d==="fixed"?m={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:m={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),p.style.position!==d&&(p.style.position=d),u.current=d;let b=0,P=0;switch(r){case "top":b=f.top-i.height-t,P=f.left,b<m.top&&f.bottom+i.height+t<=m.bottom&&(b=f.bottom+t);break;case "bottom":b=f.bottom+t,P=f.left,b+i.height>m.bottom&&f.top-i.height-t>=m.top&&(b=f.top-i.height-t);break;case "left":b=f.top,P=f.left-i.width-t,P<m.left&&f.right+i.width+t<=m.right&&(P=f.right+t);break;case "right":b=f.top,P=f.right+t,P+i.width>m.right&&f.left-i.width-t>=m.left&&(P=f.left-i.width-t);break}if(b=Math.max(m.top,Math.min(b,m.bottom-i.height)),P=Math.max(m.left,Math.min(P,m.right-i.width)),u.current==="fixed")p.style.top=`${b}px`,p.style.left=`${P}px`;else {let h;p.offsetParent?h=p.offsetParent.getBoundingClientRect():h={top:0,left:0};let g=b-h.top+window.scrollY,w=P-h.left+window.scrollX;p.style.top=`${g}px`,p.style.left=`${w}px`;}},[o,s,t,r,e]);return react.useEffect(()=>{let p=o.current;if(!p)return;let a=s?.current||p.parentElement;if(!a){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(l);return i.observe(p),a&&i.observe(a),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{i.disconnect(),a&&i.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[o,r,t,e,s]),{postion:u.current,reposition:l}},We=$s;var Wo=react.forwardRef((o,n)=>{let{when:t,...r}=o;return jsxRuntime.jsx(c,{ref:n,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:t},...r})});Wo.displayName="Zuz.Overlay";var Ne=Wo;var Go="(prefers-color-scheme: dark)",Zs=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},q=At,Ws=({children:o,storageKey:n="--ucs",forceTheme:t,zuzMap:r,...e})=>(r&&Fo(r),jsxRuntime.jsx(Us,{storageKey:n,forceTheme:t,...e,children:o})),Us=({children:o,storageKey:n,forceTheme:t,...r})=>{let[e,s]=react.useState(()=>t||qo(n,"system")),[u,l]=react.useState(()=>t||qo(n)),p=m=>(m||(m=window.matchMedia(Go)),m.matches?"dark":"light"),a=react.useCallback(m=>{let d=m=="system"?p():m,v=document.documentElement;v.setAttribute("color-scheme",d),v.style.colorScheme=d,l(d);},[p]),i=react.useCallback(m=>{s(m),localStorage.setItem(n,m),a(m);},[e]),f=react.useCallback(m=>{let d=p(m);l(d),e==="system"&&a("system");},[e]);return react.useEffect(()=>{e==null&&window.localStorage.getItem(n);},[e]),react.useEffect(()=>{window.matchMedia(Go).addEventListener("change",f);},[f]),react.useEffect(()=>{let m=d=>{d.key==n&&(d.newValue?i(d.newValue):i("system"));};return window.addEventListener("storage",m),()=>window.removeEventListener("storage",m)},[i]),react.useEffect(()=>{a(t||e||"system");},[e]),jsxRuntime.jsxs(Xo,{value:{colorScheme:e,resolvedScheme:u,setColorScheme:i,...r},children:[t?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
3
3
  const themes = ['light', 'dark']
4
4
  let theme = localStorage.getItem(\`${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(Vt,{children:o})]})},Wo=(o,n)=>{if(Zs)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Xo=react.forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:m}=Q(true),{className:p,style:a,rest:i}=R(u);return jsxRuntime.jsx("div",{style:{color:s,...a},className:`icon-${e} --icon --${t||m||W.Small} ${p}`.trim(),ref:n,...i,children:Array(r||0).fill(0).map((f,c)=>jsxRuntime.jsx(Y,{className:`path${c+1}`},`${e}-layer-${c}`))})});Xo.displayName="Zuz.Icon";var q=Xo;var le={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Yo=o=>{let {type:n,variant:e,width:r,speed:t,color:s,background:u,foreground:m,...p}=o,{className:i,style:f,rest:c}=R(p);return jsxRuntime.jsx(l,{className:`${i} --spinner --${(n||le.Simple).toLowerCase()} --${e}`.trim(),style:{...f},...c})};Yo.displayName="Zuz.Spinner";var ge=Yo;var dt={Loading:"loading",Normal:"normal"};var Jo=({ref:o,...n})=>{let{reset:e,variant:r,icon:t,iconSize:s,children:u,withLabel:m,spinner:p,state:a,disabled:i,...f}=n,{style:c,className:g,rest:v}=R(f),{variant:x}=Q(true);return jsxRuntime.jsxs("button",{className:`--button --${r||x} flex aic ${e?"":"jcc"} ${t?"--with-icon":""} ${g}`.trim().replace(/\s+/g," "),style:c,ref:o,disabled:a==dt.Loading||n.skeleton?.enabled||i,...v,children:[a==dt.Loading&&jsxRuntime.jsx(ge,{variant:r||x,type:p||le.Simple}),(!a||a==dt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[t&&jsxRuntime.jsx(q,{variant:s,name:t}),m===true?jsxRuntime.jsx(Y,{children:u}):u]})]})};Jo.displayName="Zuz.Button";var z=Jo;var Ys={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"})," "]}),[ae.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"})}),[ae.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"})}),[ae.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"})}),[ae.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"})]})},k=Ys;var Qs=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(l,{as:"--head flex aic rel",children:[jsxRuntime.jsx(l,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(z,{onClick:e=>n(),className:"--closer abs center-v",children:k.close})]}),er=Qs;var js=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(l,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),tr=js;var ta=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(l,{as:`--footer flex aic rel ${n?n==Ao.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}`))}),rr=ta;var sr=react.forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:m,className:p,rest:a}=R(u),i=`h${o.h||1}`;return jsxRuntime.jsx(i,{ref:n,style:m,className:p,...a,children:r?jsxRuntime.jsx(Y,{dangerouslySetInnerHTML:{__html:r}}):t})});sr.displayName="Zuz.Text";var D=sr;var ir=react.forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:m,...p}=o,{className:a,style:i,rest:f}=R(p);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(l,{className:`--cover flex aic jcc cols abs fillx nope nous ${a}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:t||W.Small,type:r||le.Simple}),!m&&jsxRuntime.jsx(D,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});ir.displayName="Zuz.Cover";var Ee=ir;var cr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:m,speed:p,type:a,action:i,actionPosition:f,spinner:c,loadingMessage:g,variant:v,onClose:x,onShow:b,onHide:P,...h}=n,d=react.useMemo(()=>core.uuid(12),[]),[w,N]=react.useState(t||""),[T,S]=react.useState(s||""),[I,M]=react.useState(a||ke.Dialog),[L,V]=react.useState(false),[E,Z]=react.useState(true),[U,H]=react.useState(i||null),[C,A]=react.useState(false),{variant:$,spinner:K,dialog:O}=Q(true),_=v||O?.variant||$||W.Small,{style:X,className:te,rest:j}=R(h),ce=react.useRef(null),de=ne({when:L,duration:p||O?.speed||.3,delay:O?.delay||.1,transition:u||O?.transition||G.SlideInBottom,curve:m||O?.curve||F.EaseInOut});return react.useEffect(()=>{M(ke.Dialog),S(s),N(w),U&&H(U.reduce((it,lt)=>(it.push({...lt,key:lt.key||core.uuid(12)}),it),[])),V(true),setTimeout(()=>b?b():()=>{},1e3);},[]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ie,{when:L}),jsxRuntime.jsxs(l,{as:`--dialog --${(a??ke.Default).toLowerCase()} ${L?"--visible":""} ${te} fixed abc`.trim(),style:de.style,...j,ref:ce,children:[jsxRuntime.jsx(Ee,{when:C,spinner:c||O?.spinner||K?.type||le.Simple,message:g||O?.loadingMessage}),jsxRuntime.jsx(er,{title:w,onClose:()=>{x(r),V(false);}}),jsxRuntime.jsx(tr,{message:T,render:E,action:U}),U&&jsxRuntime.jsx(rr,{variant:_,action:U,dialogID:d,actionPosition:f})]})]})};cr.displayName="Zuz.Dialog";var zt=cr;var pr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(pr||{}),ur={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var ca=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:m})=>{let p=hooks.useDelayed(),a=hooks.useDelayed(((u||4)-1)*1e3),{toast:i}=Q(true),f=ne({when:p&&!a,duration:i?.duration||.2,transition:G.SlideInTop,curve:i?.curve||F.EaseInOut});return react.useEffect(()=>{console.log("--expired",a,n),a&&n&&m?.(n);},[a,n]),jsxRuntime.jsxs(l,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(l,{as:"--ico flex aic jcc",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.2,when:p&&!a},children:r?jsxRuntime.jsx(q,{name:r,fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:p&&!a}}):jsxRuntime.jsx(l,{as:"--no-icon",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:p&&!a}})}),jsxRuntime.jsxs(l,{as:"--meta",children:[jsxRuntime.jsx(D,{as:"--tt",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.3,when:p},children:t||ur[e]}),jsxRuntime.jsx(D,{as:"--tm",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.4,duration:.5,when:p},children:s})]})]})},_t=ca;var Ft=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 Ft;var gr=react.forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:m,thumbX:p,onScrollY:a,onScrollX:i}=hooks.useScrollbar(e||1),{style:f,className:c,rest:g}=R(t);return react.useEffect(()=>{let v=u.current;if(!v)return;let x=()=>{window.dispatchEvent(new Event("resize"));};return v.addEventListener("scroll",x),()=>v.removeEventListener("scroll",x)},[]),jsxRuntime.jsxs(l,{ref:s,className:c.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(l,{as:`--scroll-content ${c}`.trim(),ref:u,style:r||{},children:g.children}),jsxRuntime.jsx(l,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(l,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})}),jsxRuntime.jsx(l,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(l,{as:"--scroll-thumb --abs",ref:p,onMouseDown:i})})]})});gr.displayName="Zuz.ScrollView";var Zt=gr;var yr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:m,animation:p,prerender:a,onClose:i,...f}=n,{drawer:c}=Q(true),[g,v]=react.useState(u),[x,b]=react.useState(false),[P,h]=react.useState(a??(c?.prerender||true)),d=()=>{b(false),i?.(e??-1);},{className:w,style:N,rest:T}=R(f),S=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(d)&&d();}}],[x]);hooks.useShortcuts(S),react.useEffect(()=>{v(u);},[u]),react.useEffect(()=>(x?qe.push(d):qe.pop(d),()=>qe.pop(d)),[x]),react.useEffect(()=>{b(true);},[]);let I=t||c?.from||re.Left,M=react.useMemo(()=>{switch(I){case re.Left:return {from:{x:"-100vw"},to:{x:0}};case re.Right:return {from:{x:"100vw"},to:{x:0}};case re.Top:return {from:{y:"-100vh"},to:{y:0}};case re.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,c?.from]),L=ne({from:{...M.from,opacity:0},to:{...M.to,opacity:1},when:x,curve:p||c?.animation||F.EaseInOut,duration:s||c?.speed||.5});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ie,{onClick:V=>{x&&d();},when:x}),jsxRuntime.jsxs(l,{ref:o,"aria-hidden":!x,className:`--drawer flex cols ${w} --${I.toLowerCase()} fixed`,style:{...N,...L.style,"--m":`${m||c?.margin||0}px`},...T,children:[t==re.Top||t==re.Bottom?jsxRuntime.jsx(l,{className:"--handle"}):null,jsxRuntime.jsx(Zt,{children:P||x?g:null})]})]})};yr.displayName="Zuz.Drawer";var Gt=yr;var ya=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:m}=o;return n=="-"?jsxRuntime.jsx(l,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:p=>m(),className:`--item ${u||""}`.trim(),children:[jsxRuntime.jsx(l,{as:"--icon",children:jsxRuntime.jsx(q,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsxRuntime.jsx(D,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},br=ya;var Sr=({ref:o,...n})=>{let{id:e,as:r,offsetX:t,offsetY:s,parent:u,event:m,when:p,items:a,header:i,footer:f,origin:c=Ze.TopRight,...g}=n,[v,x]=react.useState(false),[b,P]=react.useState(a||[]),{position:h,targetRef:d,calculatedAnchor:w}=hooks.useAnchorPosition(u?.current,m,{offsetX:t,offsetY:s,preferredAnchor:c});react.useEffect(()=>{p&&h.top!==0?x(true):p||x(false);},[p,h]);let{className:N,style:T,rest:S}=R(g),I=ne({from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0},curve:F.EaseInOut,duration:.05,when:v});return jsxRuntime.jsxs(l,{className:`--contextmenu abs flex cols ${N}`.trim(),"aria-hidden":!v,style:{...T,...I.style,top:h.top,left:h.left,overflow:"hidden",transformOrigin:w},...S,children:[typeof i=="function"?react.createElement(i):i,b.map((M,L)=>jsxRuntime.jsx(br,{...M,index:L},`context-${M.label.toLowerCase()}-${L}`)),typeof f=="function"?react.createElement(f):f]})};Sr.displayName="Zuz.ContextMenu";var qt=Sr;var me=react.createContext(null),Ba=({ref:o,...n})=>{let r=react.useContext(me)?.depth??0,[t,s]=react.useState(null),[u,m]=react.useState(false),[p,a]=react.useState([]),i=hooks.useDelayed(),f=react.useRef(0),c=()=>++f.current,g=()=>{m(false),setTimeout(()=>s(null),200);};react.useImperativeHandle(o,()=>({add(h){let d=c(),w={id:d,...h};return a(N=>[w,...N.slice(0,20)]),d},openMenu(h){m(false),setTimeout(()=>{s({id:c(),type:"menu",props:h}),m(true);},16);},remove(h){a(d=>d.filter(w=>w.id!==h)),t?.id===h&&g();},clear(){a([]);}})),react.useEffect(()=>{if(t&&u){let h=()=>g();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,g]);let v=h=>{setTimeout(()=>{a(d=>d.filter(w=>w.id!==h)),t?.id===h&&s(null);},1e3);};if(!i)return null;let x=p.filter(h=>h.type=="dialog").reverse(),b=p.filter(h=>h.type=="drawer").reverse(),P=p.filter(h=>h.type=="toast");return reactDom.createPortal(jsxRuntime.jsxs(l,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[x.length>0&&jsxRuntime.jsx(l,{as:"--zuz-layer-dialogs fixed fill nope",children:x.map((h,d)=>jsxRuntime.jsx(zt,{onClose:v,index:d,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),b.length>0&&jsxRuntime.jsx(l,{as:"--zuz-layer-drawers fixed fill nope",children:b.map((h,d)=>jsxRuntime.jsx(Gt,{onClose:v,index:d,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),P.length>0&&jsxRuntime.jsx(l,{as:"--zuz-layer-toasts fixed fill nope",children:P.map((h,d)=>jsxRuntime.jsx(_t,{onClose:v,index:d,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsxRuntime.jsx(l,{as:"--zuz-layer-menus fixed fill nope",children:jsxRuntime.jsx(qt,{onClose:g,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},La=({children:o})=>{let n=react.useContext(me),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(me.Provider,{value:t,children:[o,jsxRuntime.jsx(Ba,{ref:r})]})},Vt=La;var Oa=()=>{let o=react.useContext(me);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");return {clearAll:()=>o.clear(),show:t=>o.add({type:"dialog",props:{...t,type:ke.Dialog}}),hide:t=>o.remove(t)}},ka=Oa;var Ha=()=>{let o=react.useContext(me);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(a,i)=>o.add({type:"toast",props:{...i,type:a}});return {show:(a,i,f,c)=>n("default",{title:a,message:i,icon:f,duration:c}),hide:a=>o.remove(a),success:(a,i,f,c)=>n("success",{title:a,message:i,icon:f,duration:c}),error:(a,i,f,c)=>n("error",{title:a,message:i,icon:f,duration:c}),warn:(a,i,f,c)=>n("warn",{title:a,message:i,icon:f,duration:c}),promise:(a,i,f,c)=>n("promise",{title:a,message:i,icon:f,duration:c}),clearAll:()=>o.clear()}},Yt=Ha;var Va=()=>{let o=react.useContext(me);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>o.add({type:"drawer",props:t});return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:re.Right}),left:t=>r({children:t,from:re.Left}),top:t=>r({children:t,from:re.Top}),bottom:t=>r({children:t,from:re.Bottom}),close:e}},$a=Va;var _a=(o,n,e={})=>{let[r,t]=react.useState(null),[s,u]=react.useState(false),{duration:m=.25,curve:p=F.EaseOutBack,borderRadius:a={from:40,to:24},targetWidth:i=320}=e;return react.useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ne({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:a.from},to:{opacity:1,width:i,height:"auto",borderRadius:a.to},curve:p,duration:m,when:s&&n}).style,isMeasured:s,sourceRect:r}},Fa=_a;var Ka=()=>{let o=react.useContext(me);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,t,s)=>{o.openMenu({parent:r,items:t,origin:s||Ze.TopCenter});},hide:o.clear}},Ua=Ka;var Nr=({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:m}=R(e,t);return jsxRuntime.jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...m})};Nr.displayName="Zuz.Box";var l=Nr;var Er=react.forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=react.useState(false);return jsxRuntime.jsxs(l,{className:"--accordion flex cols",...t,children:[jsxRuntime.jsxs(z,{onClick:m=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(D,{className:"--label flex",children:e}),jsxRuntime.jsx(l,{className:"--arrow flex",children:s?k.arrowUp:k.arrowDown})]}),s&&jsxRuntime.jsx(l,{className:"--detail",children:r})]})});Er.displayName="Zuz.Accordion";var Qa=Er;var Ja=({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(q,{name:n}):n}),Lr=Ja;var Mr=react.forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,m=react.useRef(null),[p,a]=react.useState(t||e[0].tag||0),i=react.useCallback(({x:b,y:P})=>{if(m.current){let h=m.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${b-h.left}`),document.documentElement.style.setProperty("--tip-y",`${P-h.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{m.current&&(m.current.removeEventListener("pointerleave",f),m.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),c=react.useCallback(()=>{m.current&&(m.current.addEventListener("pointerleave",f),m.current.addEventListener("pointermove",i));},[]);react.useEffect(()=>{m.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((b,P)=>P.label.length>b.length?P.label:b,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),m.current?.addEventListener("pointerenter",c));},[]);let{className:g,style:v,rest:x}=R(u);return jsxRuntime.jsxs(l,{ref:m,style:v,className:[`--actionbar flex aic ${g}`,`${!s||s==ee.Auto?"rel":`--${s}`}`].join(" ").trim(),...x,children:[e.map((b,P)=>jsxRuntime.jsx(Lr,{selected:p===b.tag||t==P,...b,idx:P},`actionbar-action-${b.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(l,{className:"--tip abs",children:jsxRuntime.jsx(l,{className:"--track flex aic",children:e.map(({label:b})=>jsxRuntime.jsx(l,{className:"--lb",children:b},`tool-tip-${b.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Mr.displayName="Zuz.ActionBar";var ri=Mr;var kr=react.forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...m}=o,{className:p,style:a,rest:i}=R(m);return jsxRuntime.jsxs(l,{className:`--alert --${e||ae.Info} flex aic ${p}`.trim(),style:a,...i,children:[jsxRuntime.jsx(l,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&k[e||ae.Info]}),jsxRuntime.jsxs(l,{className:"--meta flex cols",children:[jsxRuntime.jsx(D,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(D,{className:"--message",h:2,children:s})]})]})});kr.displayName="Zuz.Alert";var ai=kr;var Dr=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:m,rest:p}=R(s),{variant:a}=Q(true),i=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||a} flex ${m}`.trim(),style:u,onInput:i,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...p})};Dr.displayName="Zuz.Input";var oe=Dr;var Ar=o=>{let{meta:n,children:e}=o,r=hooks.useDelayed(),{label:t,icon:s,...u}=react.isValidElement(n)?{}:n,{className:m,style:p,rest:a}=R({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:p,className:m,children:n}):jsxRuntime.jsxs("li",{style:p,className:m,...a,children:[e,typeof n=="string"?n:t]})};Ar.displayName="Zuz.ListItem";var Vr=Ar;var zr=react.forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...m}=o,{className:p,style:a,rest:i}=R(m),f=u==true?"ol":"ul";return react.createElement(f,{className:`--list --${r||W.Small} flex ${t??"cols"} ${p}`.trim(),style:a,ref:n,...i,children:e.map((c,g,v)=>{let x=`${typeof c=="string"?`li-${String(c)}`:react.isValidElement(c)?`li-${c.key}`||`${g}-${core.MD5(c.toString())}`:c.label}-${g}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Vr,{meta:c}),s&&v[g+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${g+1}-${x}`):null]},x)})})});zr.displayName="Zuz.List";var Le=zr;var Fr=react.forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...m}=o,{className:p}=R({as:s||""}),{style:a}=R(m),[i,f]=react.useState(false),[c,g]=react.useState(t||[]),v=react.useRef(null),x=react.useRef(null),b=react.useRef(null),P=react.useMemo(()=>m.name||core.uuid(12),[]),[h,d]=react.useState(null),[w,N]=react.useState(null),[T,S]=react.useState([]),M=hooks.useDebounce(C=>{C.target.value==""?(f(false),g([])):r&&C.target.value.trim()!=""&&core.withPost(r,{query:C.target.value}).then(A=>{"items"in A&&core._(A.items).isArray()?(g(A.items),N(C.target.value),S(A.items)):console.error("Action Response should contain items array"),d(null);}).catch(A=>{d(null),g([]);});},250),L=()=>{if(x.current){let C=x.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(c.length>0){if((C.key==="ArrowDown"||C.key==="ArrowUp")&&(C.preventDefault(),C.stopPropagation()),C.key==="Escape")d(null),f(false),g([]);else if(C.key==="ArrowDown")d(A=>{let $=A===null||A===c.length-1?0:A+1;return Z($),$});else if(C.key==="ArrowUp")d(A=>{let $=A===null||A===0?c.length-1:A-1;return Z($),$});else if(C.key==="Enter"&&h!==null){let A=c[h];v.current&&(v.current.value=A,f(false),g([]));}}},E=C=>{v.current&&(v.current.value=C,f(false),g([]));},Z=C=>{let A=c[C];if(A&&v.current&&(v.current.value=A,v.current.setSelectionRange(A.length,A.length)),b.current){let K=b.current.children[C];K&&K.scrollIntoView({block:"nearest"});}},U=C=>{x.current&&!x.current.contains(C.target)&&(f(false),g([]));},H=()=>{v.current&&v.current.value===w&&(g(T),d(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();},[c]),jsxRuntime.jsxs(l,{style:a,ref:x,className:`--autocomplete --${o.size||W.Small} flex aic rel ${p}`.trim(),children:[jsxRuntime.jsx(oe,{ref:v,autoComplete:"off",onChange:M,onKeyDown:V,onFocus:H,...m}),jsxRuntime.jsx(l,{className:"--arrow rel flex aic jcc",children:c.length>0?k.arrowUp:k.arrowDown}),c.length>0&&jsxRuntime.jsx(Le,{id:P,ref:b,className:"--suggestion-list flex cols abs",items:c.map((C,A)=>({label:C,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(C);},className:h===A?"--current":"",animate:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:core.clamp(.02*A,.02,.5)}}))})]})});Fr.displayName="Zuz.AutoComplete";var Ti=Fr;var Zr=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})});Zr.displayName="Zuz.Image";var Qe=Zr;var Kr=react.forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:m,as:p,alt:a,color:i,style:f,...c}=o,[g,v,x]=hooks.useImage(e??"",s,u),{className:b,style:P,rest:h}=R({fx:m,as:p});return react.useEffect(()=>{if(t==Et.Square&&!document.getElementById("squareRadiusClipPath")){let d="http://www.w3.org/2000/svg",w=document.createElementNS(d,"svg");w.setAttribute("width","0"),w.setAttribute("height","0");let N=document.createElementNS(d,"defs"),T=document.createElementNS(d,"clipPath");T.setAttribute("id","squareRadiusClipPath"),T.setAttribute("clipPathUnits","objectBoundingBox");let S=document.createElementNS(d,"path");S.setAttribute("d","M0.986 0.347C0.951 0.11 0.777 -0.002 0.5 0C0.223 -0.002 0.049 0.11 0.014 0.347C0.005 0.404 0 0.452 0 0.5C0 0.548 0.005 0.596 0.014 0.653C0.049 0.89 0.223 1.002 0.5 1C0.777 1.002 0.951 0.89 0.986 0.653C0.995 0.596 1 0.548 1 0.5C1 0.452 0.995 0.404 0.986 0.347Z"),T.appendChild(S),N.appendChild(T),w.appendChild(N),document.body.appendChild(w);}},[e]),jsxRuntime.jsx(l,{className:`--avatar --${r||W.Small} --${(t||Et.Circle).toLowerCase()} rel flex aic jcc ${b}`.trim(),style:{background:i||"var(--primary)",...f,...P},...h,children:e?jsxRuntime.jsx(Qe,{src:g,crossOrigin:s,referrerPolicy:u,...c}):jsxRuntime.jsx(D,{className:"--avatar-label",children:(a?a.charAt(0):"A").toUpperCase()})})});Kr.displayName="Zuz.Avatar";var Oi=Kr;var ki=({size:o=6,type:n="idle",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:m}=R(t);return jsxRuntime.jsxs(l,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsxRuntime.jsx(l,{fx:{transition:G.FadeIn,curve:F.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(ge,{})}),jsxRuntime.jsx(l,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Di=ki;var Xi=[{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)}],Yi=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)})},Ur=react.forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:m,rest:p}=R(s),[a,i]=react.useState(e||new Date),f=dateFns.startOfMonth(a),c=dateFns.endOfMonth(a),g=dateFns.startOfWeek(f),v=dateFns.endOfWeek(c),x=react.useMemo(()=>dateFns.eachDayOfInterval({start:g,end:v}),[g,v]),b=d=>{t?.(d),i(d);},P=()=>{i(d=>new Date(d.getFullYear(),d.getMonth()-1));},h=()=>{i(d=>new Date(d.getFullYear(),d.getMonth()+1));};return jsxRuntime.jsxs(l,{as:`--calendar flex --${r||"sm"} ${m}`,style:u,children:[jsxRuntime.jsx(l,{as:"--calendar-quick-select flex cols flex:1",children:Yi(Xi).map(d=>{let w=d.getDate();return jsxRuntime.jsxs(z,{onClick:()=>b(w),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(D,{as:"flex:1",children:d.label}),jsxRuntime.jsx(D,{as:"tar",children:d.getDateFormat()})]},`--dtp-option-label-${d.label}`)})}),jsxRuntime.jsxs(l,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(l,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(D,{as:"flex:1 --calendar-cm bold",children:dateFns.format(a,"MMMM yyyy")}),jsxRuntime.jsx(z,{onClick:P,as:"--calendar-chevron",children:k.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:h,as:"--calendar-chevron",children:k.chevronDownOutline})]}),jsxRuntime.jsxs(l,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(d=>jsxRuntime.jsx(D,{as:"--calendar-day",children:d},`--calendar-hd-${d}`)),x.map((d,w)=>{let N=dateFns.isSameMonth(d,a),T=dateFns.isSameDay(d,a),S=dateFns.isToday(d);return jsxRuntime.jsx(z,{disabled:!N,onClick:()=>b(d),as:["--calendar-day --calendar-dd",`${T?"--calendar-dd-selected":""}`,`${S?"--calendar-dd-current":""}`],children:dateFns.format(d,"d")},`--calendar-day-${w}-${d.getFullYear()}-${d.getMonth()}-${d.getDay()}`)})]})]})]})});Ur.displayName="Zuz.Calendar";var no=Ur;var Wr=(n=>(n.Line="line",n))(Wr||{});var Xr=react.forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:m,gradientEndColor:p,animated:a,animDuration:i=2,animDelay:f=0,padding:c=0,type:g,...v}=o,{className:x,style:b,rest:P}=R(v),h=react.useRef(null),d=hooks.useResizeObserver(h.current?.parentElement||h),w=typeof r=="number"?r:d.width,N=typeof t=="number"?t:d.height,T={width:w,height:N},S=react.useId(),{pathD:I,areaPathD:M}=hooks.useLineChart(e,T,c+(u||2)),L=react.useRef(null),V=react.useRef(null),[E,Z]=react.useState(0),[U,H]=react.useState(0);return react.useEffect(()=>{a&&(L.current&&Z(L.current.getTotalLength()),V.current&&H(V.current.getTotalLength()));},[a,I,M,w,N]),jsxRuntime.jsx(l,{ref:h,as:`--chart --${g||"line"}-chart ${x}`.trim(),style:{...b,width:r,height:t},...P,children:w>0&&N>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${w} ${N}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:m}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:p})]})}),jsxRuntime.jsx("path",{ref:V,d:M,fill:`url(#${S})`,stroke:"none",style:a?{strokeDasharray:U,strokeDashoffset:U}:{},children:a&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:U,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:I,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:a?{strokeDasharray:E,strokeDashoffset:E}:{},children:a&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});Xr.displayName="Zuz.Chart";var ol=Xr;var Yr=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(Yr||{}),Qr=(a=>(a.Image="img",a.Video="vid",a.Audio="audio",a.Link="link",a.Document="doc",a.Location="loc",a.Contact="contact",a.Event="event",a.Poll="poll",a))(Qr||{});var jr=react.forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:i=>{u.current.style.width=`${i*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:m,style:p,rest:a}=R(s);return jsxRuntime.jsx(l,{className:`--progress ${t?"--animated":""} flex rel ${m}`.trim(),style:p,...a,children:jsxRuntime.jsx(l,{ref:u,className:"--bar rel"})})});jr.displayName="Zuz.ProgressBar";var ao=jr;var en=react.forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:m=true,...p}=o,{className:a,style:i,rest:f}=R(p);return jsxRuntime.jsx(l,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxRuntime.jsxs(l,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${m==true?"--b-arrow":""} ${a}`.trim(),style:{...i},...f,children:[e&&jsxRuntime.jsx(D,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(l,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(Y,{className:"--bm-action",children:k.play}),jsxRuntime.jsx(ao,{progress:.7}),jsxRuntime.jsx(D,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(l,{as:"--bubble-image",children:jsxRuntime.jsx(Qe,{src:r.source})}):null:null,jsxRuntime.jsxs(l,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(D,{className:"--bubble-stamp tar",children:core.timeSince(u)}),t=="me"&&jsxRuntime.jsx(Y,{className:`--bubble-status --bs-${s}`,children:s==0?k.pending:s==1?k.done:s==2?k.doneAll:k.doneAll})]})]})})});en.displayName="Zuz.Bubble";var ml=en;var tn=react.forwardRef((o,n)=>{let{style:e,className:r,rest:t}=R(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...t})});tn.displayName="Zuz.Label";var je=tn;var on=react.forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:m,checked:p,onSwitch:a,...i}=o,[f,c]=react.useState(p||false),g=react.useRef(null),{variant:v}=Q(true);return react.useImperativeHandle(n,()=>({setChecked(x,b=true){c(x),g.current&&(g.current.checked=x),b&&a&&a(x,s||"cb");},toggle(x=true){g.current&&(g.current.checked=!f),x&&a&&a&&a(!f,s||"cb"),c(!f);}})),jsxRuntime.jsxs(je,{className:`--${(t||be.Default).toLowerCase()} ${!t||t==be.Default?"--checkbox":"--switch"} --${m||v||W.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...i,children:[(!t||t==be.Default)&&k.check,jsxRuntime.jsx(oe,{ref:g,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:x=>{a&&a(x.target.checked,s||"cb"),c(x.target.checked);}})]})});on.displayName="Zuz.CheckBox";var et=on;var bl=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:m,...p}=n,a=react.useRef(null),{className:i,style:f,rest:c}=R({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:m},a),g=react.useMemo(()=>{let x=new Set;return s.split(",").forEach(b=>{if(b.includes("-")){let[P,h]=b.split("-").map(Number);for(let d=P;d<=h;d++)x.add(d);}else b&&x.add(Number(b));}),x},[s]),v=react.useMemo(()=>{let x=e.split(`
10
- `);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let b=x[0]?.match(/^\s*/)?.[0].length||0,P=x.map(d=>{let w=d.match(/^\s*/)?.[0].length||0,N=Math.min(w,b);return d.slice(N)}),h=[{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 P.map((d,w)=>{let N=d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),T=g.has(w+1),S=[];h.forEach(I=>{N=N.replace(I.re,M=>{let L=`ZUZ_ID_${S.length}_ZUZ`;return S.push(`<span class="--token-${I.name}">${M}</span>`),L});});for(let I=S.length-1;I>=0;I--)N=N.replace(`ZUZ_ID_${I}_ZUZ`,S[I]);return `<div class="--code-line ${t==true?"--with-ln":""} ${T?"--is-highlighted":""}">
11
- ${t==true?`<span class="--line-number">${w+1}</span>`:""}
9
+ document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx($t,{children:o})]})},qo=(o,n)=>{if(Zs)return;let t;try{t=localStorage.getItem(o)||void 0;}catch{}return t||n};var Yo=({ref:o,...n})=>{let{style:t,...r}=n,{style:e,className:s,rest:u}=R(r);return jsxRuntime.jsx("span",{ref:o,style:t,className:s,...u})};Yo.displayName="Zuz.Span";var Q=Yo;var Jo=react.forwardRef((o,n)=>{let{name:t,pathCount:r,variant:e,color:s,...u}=o,{variant:l}=q(true),{className:p,style:a,rest:i}=R(u);return jsxRuntime.jsx("div",{style:{color:s,...a},className:`icon-${t} --icon --${e||l||U.Small} ${p}`.trim(),ref:n,...i,children:Array(r||0).fill(0).map((f,m)=>jsxRuntime.jsx(Q,{className:`path${m+1}`},`${t}-layer-${m}`))})});Jo.displayName="Zuz.Icon";var X=Jo;var re={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var jo=o=>{let{type:n,variant:t,color:r,...e}=o,{className:s,style:u,rest:l}=R(e),{spinner:p}=q(true),a=()=>{switch(n||p?.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||p?.type||re.Simple).toLowerCase()} --${t||p?.variant||U.Small}`.trim(),style:{...u},...l,children:a()})};jo.displayName="Zuz.Spinner";var ge=jo;var gt={Loading:"loading",Normal:"normal"};var tr=({ref:o,...n})=>{let{reset:t,kind:r="solid",variant:e,icon:s,iconSize:u,children:l,withLabel:p,spinner:a,state:i,disabled:f,...m}=n,{style:d,className:v,rest:y}=R(m),{variant:b}=q(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${e||b} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${v}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:i==gt.Loading||n.skeleton?.enabled||f,...y,children:[i==gt.Loading&&jsxRuntime.jsx(ge,{variant:e||b,type:a||re.Simple}),(!i||i==gt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(X,{variant:u,name:s}),p===true?jsxRuntime.jsx(Q,{children:l}):l]})]})};tr.displayName="Zuz.Button";var z=tr;var js={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"})," "]}),[ie.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"})}),[ie.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"})}),[ie.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"})}),[ie.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"})]})},D=js;var ea=({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:t=>n(),className:"--closer abs center-v",children:D.close})]}),rr=ea;var oa=({action:o,render:n=true,message:t=""})=>jsxRuntime.jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?t:null}),nr=oa;var na=({action:o,actionPosition:n,dialogID:t,variant:r})=>jsxRuntime.jsx(c,{as:`--footer flex aic rel ${n?n==zo.Center?"jcc":"":"jce"}`.trim(),children:o.map((e,s)=>jsxRuntime.jsx(z,{variant:r,onClick:u=>e.handler?e.handler():e.onClick?e.onClick():console.log("onClick Handler missing"),as:"--action",children:e.label},`dialog-${t}-action-${e.key}`))}),ar=na;var ir=react.forwardRef((o,n)=>{let{children:t,fx:r,when:e,fxDelay:s,fxStep:u,classToIgnore:l,...p}=o,a=q(true),i=hooks.useDelayed(),f=r||a?.group?.fx,m=s||a?.group?.fxDelay,d=u||a?.group?.fxStep,v=l||a?.group?.classToIgnore||"--ignore",y=react.useMemo(()=>f?react$1.addPropsToChildren(t,b=>{if(b.type===react.Fragment)return false;let P=b.props||{},h="fx"in P,g=P.as?Array.isArray(P.as)?P.as.join(" "):P.as:P.className||"",w=typeof g=="string"&&g.includes(v);return !h&&!w},b=>({fx:{...f,delay:(m||0)+b*(d||.1),when:e??(r?.when||i)}})):t,[t,e,i,f]);return jsxRuntime.jsx(c,{className:"--group",ref:n,...p,children:y})});ir.displayName="Zuz.Group";var _t=ir;var mr=react.forwardRef((o,n)=>{let{h:t,html:r,children:e,lines:s,...u}=o,{style:l,className:p,rest:a}=R(u),i=`h${o.h||1}`;return jsxRuntime.jsx(i,{ref:n,style:l,className:p,...a,children:r?jsxRuntime.jsx(Q,{dangerouslySetInnerHTML:{__html:r}}):e})});mr.displayName="Zuz.Text";var H=mr;var pr=react.forwardRef((o,n)=>{let{message:t,spinner:r,spinnerSize:e,color:s,when:u,hideMessage:l,...p}=o,{className:a,style:i,rest:f}=R(p),{spinner:m}=q(true);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(_t,{fx:{transition:G.SlideInBottom,curve:_.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${a}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:e||m?.variant||U.Small,type:r||m?.type||re.Simple}),!l&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:t||"loading"})]})});pr.displayName="Zuz.Cover";var Ee=pr;var dr=({ref:o,...n})=>{let{index:t,id:r,title:e,message:s,transition:u,curve:l,speed:p,type:a,action:i,actionPosition:f,spinner:m,loadingMessage:d,variant:v,onClose:y,onShow:b,onHide:P,...h}=n,g=react.useMemo(()=>core.uuid(12),[]),[w,N]=react.useState(e||""),[C,S]=react.useState(s||""),[I,M]=react.useState(a||De.Dialog),[L,V]=react.useState(false),[E,K]=react.useState(true),[Z,k]=react.useState(i||null),[T,A]=react.useState(false),{variant:$,spinner:W,dialog:O}=q(true),F=v||O?.variant||$||U.Small,{style:Y,className:te,rest:j}=R(h),ce=react.useRef(null),de=se({when:L,duration:p||O?.speed||.3,delay:O?.delay||.1,transition:u||O?.transition||G.SlideInBottom,curve:l||O?.curve||_.EaseInOut});return react.useEffect(()=>{M(De.Dialog),S(s),N(w),Z&&k(Z.reduce((it,lt)=>(it.push({...lt,key:lt.key||core.uuid(12)}),it),[])),V(true),setTimeout(()=>b?b():()=>{},1e3);},[]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ne,{when:L}),jsxRuntime.jsxs(c,{as:`--dialog --${(a??De.Default).toLowerCase()} ${L?"--visible":""} ${te} fixed abc`.trim(),style:de.style,...j,ref:ce,children:[jsxRuntime.jsx(Ee,{when:T,spinner:m||O?.spinner||W?.type||re.Simple,message:d||O?.loadingMessage}),jsxRuntime.jsx(rr,{title:w,onClose:()=>{y(r),V(false);}}),jsxRuntime.jsx(nr,{message:C,render:E,action:Z}),Z&&jsxRuntime.jsx(ar,{variant:F,action:Z,dialogID:g,actionPosition:f})]})]})};dr.displayName="Zuz.Dialog";var Ft=dr;var gr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(gr||{}),hr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var ba=({index:o,id:n,type:t,icon:r,title:e,message:s,duration:u,onClose:l})=>{let p=hooks.useDelayed(),a=hooks.useDelayed(((u||4)-1)*1e3),{toast:i}=q(true),f=se({when:p&&!a,duration:i?.duration||.2,transition:G.SlideInTop,curve:i?.curve||_.EaseInOut});return react.useEffect(()=>{console.log("--expired",a,n),a&&n&&l?.(n);},[a,n]),jsxRuntime.jsxs(c,{as:`--snack --${t} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(c,{as:"--ico flex aic jcc",fx:{transition:G.ScaleIn,curve:_.Spring,delay:.2,when:p&&!a},children:r?jsxRuntime.jsx(X,{name:r,fx:{transition:G.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:p&&!a}}):jsxRuntime.jsx(c,{as:"--no-icon",fx:{transition:G.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:p&&!a}})}),jsxRuntime.jsxs(c,{as:"--meta",children:[jsxRuntime.jsx(H,{as:"--tt",fx:{transition:G.SlideInTop,curve:_.Spring,delay:.3,when:p},children:e||hr[t]}),jsxRuntime.jsx(H,{as:"--tm",fx:{transition:G.SlideInTop,curve:_.Spring,delay:.4,duration:.5,when:p},children:s})]})]})},Kt=ba;var Zt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(t=>t!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},qe=new Zt;var br=react.forwardRef((o,n)=>{let{speed:t,style:r,...e}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:p,onScrollY:a,onScrollX:i}=hooks.useScrollbar(t||1),{style:f,className:m,rest:d}=R(e);return react.useEffect(()=>{let v=u.current;if(!v)return;let y=()=>{window.dispatchEvent(new Event("resize"));};return v.addEventListener("scroll",y),()=>v.removeEventListener("scroll",y)},[]),jsxRuntime.jsxs(c,{ref:s,className:m.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(c,{as:`--scroll-content ${m}`.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:a})}),jsxRuntime.jsx(c,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:p,onMouseDown:i})})]})});br.displayName="Zuz.ScrollView";var Wt=br;var Sr=({ref:o,...n})=>{let{id:t,index:r,from:e,speed:s,children:u,margin:l,animation:p,prerender:a,onClose:i,...f}=n,{drawer:m}=q(true),[d,v]=react.useState(u),[y,b]=react.useState(false),[P,h]=react.useState(a??(m?.prerender||true)),g=()=>{b(false),i?.(t??-1);},{className:w,style:N,rest:C}=R(f),S=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(g)&&g();}}],[y]);hooks.useShortcuts(S),react.useEffect(()=>{v(u);},[u]),react.useEffect(()=>(y?qe.push(g):qe.pop(g),()=>qe.pop(g)),[y]),react.useEffect(()=>{b(true);},[]);let I=e||m?.from||ne.Left,M=react.useMemo(()=>{switch(I){case ne.Left:return {from:{x:"-100vw"},to:{x:0}};case ne.Right:return {from:{x:"100vw"},to:{x:0}};case ne.Top:return {from:{y:"-100vh"},to:{y:0}};case ne.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[e,m?.from]),L=se({from:{...M.from,opacity:0},to:{...M.to,opacity:1},when:y,curve:p||m?.animation||_.EaseInOut,duration:s||m?.speed||.5});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ne,{onClick:V=>{y&&g();},when:y}),jsxRuntime.jsxs(c,{ref:o,"aria-hidden":!y,className:`--drawer flex cols ${w} --${I.toLowerCase()} fixed`,style:{...N,...L.style,"--m":`${l||m?.margin||0}px`},...C,children:[e==ne.Top||e==ne.Bottom?jsxRuntime.jsx(c,{className:"--handle"}):null,jsxRuntime.jsx(Wt,{children:P||y?d:null})]})]})};Sr.displayName="Zuz.Drawer";var Xt=Sr;var Ia=o=>{let{label:n,labelColor:t,icon:r,iconColor:e,index:s,className:u,onSelect:l}=o;return n=="-"?jsxRuntime.jsx(c,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:p=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsxRuntime.jsx(c,{as:"--icon",children:jsxRuntime.jsx(X,{name:r,className:"--ico",style:e?{color:e}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:t?{color:t}:{},children:n})]})},Cr=Ia;var Rr=({ref:o,...n})=>{let{id:t,as:r,fx:e,offsetX:s,offsetY:u,parent:l,event:p,arrow:a,when:i,items:f,header:m,footer:d,origin:v=Ke.TopRight,...y}=n,[b,P]=react.useState(false),[h,g]=react.useState(f||[]),{position:w,targetRef:N,calculatedAnchor:C}=hooks.useAnchorPosition(l?.current,p,{offsetX:s,offsetY:u,preferredAnchor:v}),I=l&&w.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",M=react.useMemo(()=>{let k=C.toLowerCase();return k.includes("left")?"--arrow-left":k.includes("right")?"--arrow-right":"--arrow-center"},[C]),L=w.top!==0||w.left!==0;react.useEffect(()=>{i&&L?P(true):i||P(false);},[i,L]);let{className:V,style:E,rest:K}=R(y),Z=se({...e?.transition?{transition:e.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:e?.curve??_.EaseInOut,duration:e?.duration??.05,when:b&&L});return jsxRuntime.jsxs(c,{ref:N,className:`--contextmenu ${a||l!=null?`--has-arrow ${I} ${M}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!b,style:{...E,...Z.style,top:w.top,left:w.left,visibility:L?"visible":"hidden",transformOrigin:C},...K,children:[typeof m=="function"?react.createElement(m):m,h.map((k,T)=>jsxRuntime.jsx(Cr,{...k,index:T},`context-${k.label.toLowerCase()}-${T}`)),typeof d=="function"?react.createElement(d):d]})};Rr.displayName="Zuz.ContextMenu";var Yt=Rr;var me=react.createContext(null),za=({ref:o,...n})=>{let r=react.useContext(me)?.depth??0,[e,s]=react.useState(null),[u,l]=react.useState(false),[p,a]=react.useState([]),i=hooks.useDelayed(),f=react.useRef(0),m=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};react.useImperativeHandle(o,()=>({add(h){let g=m(),w={id:g,...h};return a(N=>[w,...N.slice(0,20)]),g},openMenu(h){l(false),setTimeout(()=>{s({id:m(),type:"menu",props:h}),l(true);},16);},remove(h){a(g=>g.filter(w=>w.id!==h)),e?.id===h&&d();},clear(){a([]);}})),react.useEffect(()=>{if(e&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[e,u,d]);let v=h=>{setTimeout(()=>{a(g=>g.filter(w=>w.id!==h)),e?.id===h&&s(null);},1e3);};if(!i)return null;let y=p.filter(h=>h.type=="dialog").reverse(),b=p.filter(h=>h.type=="drawer").reverse(),P=p.filter(h=>h.type=="toast");return reactDom.createPortal(jsxRuntime.jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[y.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-dialogs fixed fill nope",children:y.map((h,g)=>jsxRuntime.jsx(Ft,{onClose:v,index:g,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),b.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-drawers fixed fill nope",children:b.map((h,g)=>jsxRuntime.jsx(Xt,{onClose:v,index:g,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),P.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-toasts fixed fill nope",children:P.map((h,g)=>jsxRuntime.jsx(Kt,{onClose:v,index:g,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),e&&jsxRuntime.jsx(c,{as:"--zuz-layer-menus fixed fill nope",children:jsxRuntime.jsx(Yt,{onClose:d,when:u,...e.props},`menu-${e.id}`)})]}),document.body)},_a=({children:o})=>{let n=react.useContext(me),t=n?n.depth+1:0,r=react.useRef(null),e=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:t,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(me.Provider,{value:e,children:[o,jsxRuntime.jsx(za,{ref:r})]})},$t=_a;var Ka=()=>{let o=react.useContext(me);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");return {clearAll:()=>o.clear(),show:e=>o.add({type:"dialog",props:{...e,type:De.Dialog}}),hide:e=>o.remove(e)}},Za=Ka;var Ua=()=>{let o=react.useContext(me);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(a,i)=>o.add({type:"toast",props:{...i,type:a}});return {show:(a,i,f,m)=>n("default",{title:a,message:i,icon:f,duration:m}),hide:a=>o.remove(a),success:(a,i,f,m)=>n("success",{title:a,message:i,icon:f,duration:m}),error:(a,i,f,m)=>n("error",{title:a,message:i,icon:f,duration:m}),warn:(a,i,f,m)=>n("warn",{title:a,message:i,icon:f,duration:m}),promise:(a,i,f,m)=>n("promise",{title:a,message:i,icon:f,duration:m}),clearAll:()=>o.clear()}},Jt=Ua;var qa=()=>{let o=react.useContext(me);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),t=e=>o.remove(e),r=e=>o.add({type:"drawer",props:e});return {clearAll:n,open:e=>r({children:e}),right:e=>r({children:e,from:ne.Right}),left:e=>r({children:e,from:ne.Left}),top:e=>r({children:e,from:ne.Top}),bottom:e=>r({children:e,from:ne.Bottom}),close:t}},Xa=qa;var Qa=(o,n,t={})=>{let[r,e]=react.useState(null),[s,u]=react.useState(false),{duration:l=.25,curve:p=_.EaseOutBack,borderRadius:a={from:40,to:24},targetWidth:i=320}=t;return react.useLayoutEffect(()=>{n&&o.current?(e(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:se({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:a.from},to:{opacity:1,width:i,height:"auto",borderRadius:a.to},curve:p,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},Ja=Qa;var ei=()=>{let o=react.useContext(me);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,e,s)=>{r.preventDefault(),o.openMenu({event:r,items:e,origin:s});},showMenu:(r,{items:e,origin:s,offsetX:u,offsetY:l,transition:p,curve:a,arrow:i,duration:f,header:m,footer:d})=>{o.openMenu({fx:{transition:p,curve:a,duration:f},parent:r,items:e,origin:s||Ke.TopCenter,offsetX:u,offsetY:l,arrow:i,header:m,footer:d});},hide:o.clear}},ti=ei;var Lr=({ref:o,style:n,...t})=>{let r=react.useRef(null),e=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=R(t,e);return jsxRuntime.jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};Lr.displayName="Zuz.Box";var c=Lr;var Or=react.forwardRef((o,n)=>{let{title:t,message:r,...e}=o,[s,u]=react.useState(false);return jsxRuntime.jsxs(c,{className:"--accordion flex cols",...e,children:[jsxRuntime.jsxs(z,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:t}),jsxRuntime.jsx(c,{className:"--arrow flex",children:s?D.arrowUp:D.arrowDown})]}),s&&jsxRuntime.jsx(c,{className:"--detail",children:r})]})});Or.displayName="Zuz.Accordion";var ii=Or;var li=({label:o,icon:n,onClick:t,idx:r,selected:e})=>jsxRuntime.jsx(z,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${e?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(X,{name:n}):n}),Dr=li;var Hr=react.forwardRef((o,n)=>{let{items:t,name:r,selected:e,position:s,...u}=o,l=react.useRef(null),[p,a]=react.useState(e||t[0].tag||0),i=react.useCallback(({x:b,y:P})=>{if(l.current){let h=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${b-h.left}`),document.documentElement.style.setProperty("--tip-y",`${P-h.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),m=react.useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",i));},[]);react.useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((b,P)=>P.label.length>b.length?P.label:b,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),l.current?.addEventListener("pointerenter",m));},[]);let{className:d,style:v,rest:y}=R(u);return jsxRuntime.jsxs(c,{ref:l,style:v,className:[`--actionbar flex aic ${d}`,`${!s||s==ee.Auto?"rel":`--${s}`}`].join(" ").trim(),...y,children:[t.map((b,P)=>jsxRuntime.jsx(Dr,{selected:p===b.tag||e==P,...b,idx:P},`actionbar-action-${b.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(c,{className:"--tip abs",children:jsxRuntime.jsx(c,{className:"--track flex aic",children:t.map(({label:b})=>jsxRuntime.jsx(c,{className:"--lb",children:b},`tool-tip-${b.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Hr.displayName="Zuz.ActionBar";var fi=Hr;var Ar=react.forwardRef((o,n)=>{let{type:t,icon:r,title:e,message:s,iconSize:u,...l}=o,{className:p,style:a,rest:i}=R(l);return jsxRuntime.jsxs(c,{className:`--alert --${t||ie.Info} flex aic ${p}`.trim(),style:a,...i,children:[jsxRuntime.jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&D[t||ie.Info]}),jsxRuntime.jsxs(c,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${s?"--tm":""}`,children:e||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(H,{className:"--message",h:2,children:s})]})]})});Ar.displayName="Zuz.Alert";var hi=Ar;var $r=({ref:o,...n})=>{let{variant:t,numeric:r,onConfirm:e,...s}=n,{style:u,className:l,rest:p}=R(s),{variant:a}=q(true),i=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${t||a} flex ${l}`.trim(),style:u,onInput:i,onKeyDown:f=>{f.key=="Enter"&&e?.(f.currentTarget.value);},ref:o,...p})};$r.displayName="Zuz.Input";var oe=$r;var _r=o=>{let{meta:n,children:t}=o,r=hooks.useDelayed(),{label:e,icon:s,...u}=react.isValidElement(n)?{}:n,{className:l,style:p,rest:a}=R({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:p,className:l,children:n}):jsxRuntime.jsxs("li",{style:p,className:l,...a,children:[t,typeof n=="string"?n:e]})};_r.displayName="Zuz.ListItem";var Fr=_r;var Zr=react.forwardRef((o,n)=>{let{items:t,variant:r,direction:e,seperator:s,ol:u,...l}=o,{className:p,style:a,rest:i}=R(l),f=u==true?"ol":"ul";return react.createElement(f,{className:`--list --${r||U.Small} flex ${e??"cols"} ${p}`.trim(),style:a,ref:n,...i,children:t.map((m,d,v)=>{let y=`${typeof m=="string"?`li-${String(m)}`:react.isValidElement(m)?`li-${m.key}`||`${d}-${core.MD5(m.toString())}`:m.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Fr,{meta:m}),s&&v[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${y}`):null]},y)})})});Zr.displayName="Zuz.List";var Le=Zr;var Ur=react.forwardRef((o,n)=>{let{fx:t,action:r,data:e,withStyle:s,onChange:u,...l}=o,{className:p}=R({as:s||""}),{style:a}=R(l),[i,f]=react.useState(false),[m,d]=react.useState(e||[]),v=react.useRef(null),y=react.useRef(null),b=react.useRef(null),P=react.useMemo(()=>l.name||core.uuid(12),[]),[h,g]=react.useState(null),[w,N]=react.useState(null),[C,S]=react.useState([]),M=hooks.useDebounce(T=>{T.target.value==""?(f(false),d([])):r&&T.target.value.trim()!=""&&core.withPost(r,{query:T.target.value}).then(A=>{"items"in A&&core._(A.items).isArray()?(d(A.items),N(T.target.value),S(A.items)):console.error("Action Response should contain items array"),g(null);}).catch(A=>{g(null),d([]);});},250),L=()=>{if(y.current){let T=y.current.getBoundingClientRect(),A=window.innerHeight-T.bottom,$=T.top;if(b.current){let W=b.current;A<W.offsetHeight&&$>A?(W.style.top="auto",W.style.bottom=`${T.height}px`,W.style.maxHeight=`${$-150}px`):(W.style.top=`${T.height+5}px`,W.style.bottom="auto",W.style.maxHeight=`${A-150}px`);}}},V=T=>{if(m.length>0){if((T.key==="ArrowDown"||T.key==="ArrowUp")&&(T.preventDefault(),T.stopPropagation()),T.key==="Escape")g(null),f(false),d([]);else if(T.key==="ArrowDown")g(A=>{let $=A===null||A===m.length-1?0:A+1;return K($),$});else if(T.key==="ArrowUp")g(A=>{let $=A===null||A===0?m.length-1:A-1;return K($),$});else if(T.key==="Enter"&&h!==null){let A=m[h];v.current&&(v.current.value=A,f(false),d([]));}}},E=T=>{v.current&&(v.current.value=T,f(false),d([]));},K=T=>{let A=m[T];if(A&&v.current&&(v.current.value=A,v.current.setSelectionRange(A.length,A.length)),b.current){let W=b.current.children[T];W&&W.scrollIntoView({block:"nearest"});}},Z=T=>{y.current&&!y.current.contains(T.target)&&(f(false),d([]));},k=()=>{v.current&&v.current.value===w&&(d(C),g(null),L());};return react.useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",Z),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",Z);}),[]),react.useEffect(()=>{L();},[m]),jsxRuntime.jsxs(c,{style:a,ref:y,className:`--autocomplete --${o.size||U.Small} flex aic rel ${p}`.trim(),children:[jsxRuntime.jsx(oe,{ref:v,autoComplete:"off",onChange:M,onKeyDown:V,onFocus:k,...l}),jsxRuntime.jsx(c,{className:"--arrow rel flex aic jcc",children:m.length>0?D.arrowUp:D.arrowDown}),m.length>0&&jsxRuntime.jsx(Le,{id:P,ref:b,className:"--suggestion-list flex cols abs",items:m.map((T,A)=>({label:T,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(T);},className:h===A?"--current":"",animate:{transition:G.SlideInBottom,curve:_.EaseInOut,delay:core.clamp(.02*A,.02,.5)}}))})]})});Ur.displayName="Zuz.AutoComplete";var ki=Ur;var Gr=react.forwardRef((o,n)=>{let t=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:t,[n]),{style:e,className:s,rest:u}=R(o,r);return !u.src||u.src==""?null:jsxRuntime.jsx("img",{ref:r,style:e,className:`${s} flex`,...u})});Gr.displayName="Zuz.Image";var Qe=Gr;var qr=react.forwardRef((o,n)=>{let{src:t,variant:r,type:e,crossOrigin:s,referrerPolicy:u,fx:l,as:p,alt:a,color:i,style:f,...m}=o,[d,v,y]=hooks.useImage(t??"",s,u),{className:b,style:P,rest:h}=R({fx:l,as:p});return jsxRuntime.jsx(c,{className:`--avatar --${r||U.Small} --${(e||$o.Circle).toLowerCase()} rel flex aic jcc ${b}`.trim(),style:{background:i||"var(--primary)",...f,...P},...h,children:t?jsxRuntime.jsx(Qe,{src:d,crossOrigin:s,referrerPolicy:u,...m}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(a?a.charAt(0):"A").toUpperCase()})})});qr.displayName="Zuz.Avatar";var Fi=qr;var Ki=({size:o=6,type:n="idle",label:t="",loading:r=false,...e})=>{let{style:s,className:u,rest:l}=R(e);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:_.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}`})]})},Zi=Ki;var nl=[{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)}],sl=o=>{let n=new Set;return o.filter(t=>{if(t.label=="Later")return true;let r=t.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Xr=react.forwardRef((o,n)=>{let{defaultValue:t,variant:r,onChange:e,...s}=o,{style:u,className:l,rest:p}=R(s),[a,i]=react.useState(t||new Date),f=dateFns.startOfMonth(a),m=dateFns.endOfMonth(a),d=dateFns.startOfWeek(f),v=dateFns.endOfWeek(m),y=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:v}),[d,v]),b=g=>{e?.(g),i(g);},P=()=>{i(g=>new Date(g.getFullYear(),g.getMonth()-1));},h=()=>{i(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:sl(nl).map(g=>{let w=g.getDate();return jsxRuntime.jsxs(z,{onClick:()=>b(w),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(a,"MMMM yyyy")}),jsxRuntime.jsx(z,{onClick:P,as:"--calendar-chevron",children:D.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:h,as:"--calendar-chevron",children:D.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}`)),y.map((g,w)=>{let N=dateFns.isSameMonth(g,a),C=dateFns.isSameDay(g,a),S=dateFns.isToday(g);return jsxRuntime.jsx(z,{disabled:!N,onClick:()=>b(g),as:["--calendar-day --calendar-dd",`${C?"--calendar-dd-selected":""}`,`${S?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${w}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Xr.displayName="Zuz.Calendar";var ao=Xr;var Yr=(n=>(n.Line="line",n))(Yr||{});var jr=react.forwardRef((o,n)=>{let{data:t,width:r,height:e,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:p,animated:a,animDuration:i=2,animDelay:f=0,padding:m=0,type:d,...v}=o,{className:y,style:b,rest:P}=R(v),h=react.useRef(null),g=hooks.useResizeObserver(h.current?.parentElement||h),w=typeof r=="number"?r:g.width,N=typeof e=="number"?e:g.height,C={width:w,height:N},S=react.useId(),{pathD:I,areaPathD:M}=hooks.useLineChart(t,C,m+(u||2)),L=react.useRef(null),V=react.useRef(null),[E,K]=react.useState(0),[Z,k]=react.useState(0);return react.useEffect(()=>{a&&(L.current&&K(L.current.getTotalLength()),V.current&&k(V.current.getTotalLength()));},[a,I,M,w,N]),jsxRuntime.jsx(c,{ref:h,as:`--chart --${d||"line"}-chart ${y}`.trim(),style:{...b,width:r,height:e},...P,children:w>0&&N>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${w} ${N}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:l}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:p})]})}),jsxRuntime.jsx("path",{ref:V,d:M,fill:`url(#${S})`,stroke:"none",style:a?{strokeDasharray:Z,strokeDashoffset:Z}:{},children:a&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:Z,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:I,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:a?{strokeDasharray:E,strokeDashoffset:E}:{},children:a&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});jr.displayName="Zuz.Chart";var pl=jr;var en=(e=>(e[e.Sending=0]="Sending",e[e.Sent=1]="Sent",e[e.Delivered=2]="Delivered",e[e.Read=3]="Read",e))(en||{}),tn=(a=>(a.Image="img",a.Video="vid",a.Audio="audio",a.Link="link",a.Document="doc",a.Location="loc",a.Contact="contact",a.Event="event",a.Poll="poll",a))(tn||{});var rn=react.forwardRef((o,n)=>{let{progress:t,type:r,animated:e,...s}=o,u=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:i=>{u.current.style.width=`${i*100}%`;}}),[]),react.useEffect(()=>{t&&u.current&&(e?setTimeout(()=>u.current.style.width=`${t*100}%`,500):u.current.style.width=`${t*100}%`);},[t,u.current]);let{className:l,style:p,rest:a}=R(s);return jsxRuntime.jsx(c,{className:`--progress ${e?"--animated":""} flex rel ${l}`.trim(),style:p,...a,children:jsxRuntime.jsx(c,{ref:u,className:"--bar rel"})})});rn.displayName="Zuz.ProgressBar";var lo=rn;var nn=react.forwardRef((o,n)=>{let{text:t,media:r,side:e="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...p}=o,{className:a,style:i,rest:f}=R(p);return jsxRuntime.jsx(c,{className:`--bubble-wrapper flex --bw-${e}`.trim(),children:jsxRuntime.jsxs(c,{className:`--bubble --bubble-${e} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${a}`.trim(),style:{...i},...f,children:[t&&jsxRuntime.jsx(H,{className:"--bubble-text",children:t}),r?r.type=="audio"?jsxRuntime.jsxs(c,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(Q,{className:"--bm-action",children:D.play}),jsxRuntime.jsx(lo,{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(Qe,{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)}),e=="me"&&jsxRuntime.jsx(Q,{className:`--bubble-status --bs-${s}`,children:s==0?D.pending:s==1?D.done:s==2?D.doneAll:D.doneAll})]})]})})});nn.displayName="Zuz.Bubble";var yl=nn;var sn=react.forwardRef((o,n)=>{let{style:t,className:r,rest:e}=R(o);return jsxRuntime.jsx("label",{ref:n,style:t,className:r,...e})});sn.displayName="Zuz.Label";var je=sn;var an=react.forwardRef((o,n)=>{let{name:t,required:r,type:e,value:s,size:u,variant:l,checked:p,onSwitch:a,...i}=o,[f,m]=react.useState(p||false),d=react.useRef(null),{variant:v}=q(true);return react.useImperativeHandle(n,()=>({setChecked(y,b=true){m(y),d.current&&(d.current.checked=y),b&&a&&a(y,s||"cb");},toggle(y=true){d.current&&(d.current.checked=!f),y&&a&&a&&a(!f,s||"cb"),m(!f);}})),jsxRuntime.jsxs(je,{className:`--${(e||be.Default).toLowerCase()} ${!e||e==be.Default?"--checkbox":"--switch"} --${l||v||U.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...i,children:[(!e||e==be.Default)&&D.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:t,required:r||false,onChange:y=>{a&&a(y.target.checked,s||"cb"),m(y.target.checked);}})]})});an.displayName="Zuz.CheckBox";var et=an;var Nl=({ref:o,...n})=>{let{code:t,lang:r="tsx",showLines:e=false,highlight:s="",as:u,fx:l,...p}=n,a=react.useRef(null),{className:i,style:f,rest:m}=R({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},a),d=react.useMemo(()=>{let y=new Set;return s.split(",").forEach(b=>{if(b.includes("-")){let[P,h]=b.split("-").map(Number);for(let g=P;g<=h;g++)y.add(g);}else b&&y.add(Number(b));}),y},[s]),v=react.useMemo(()=>{let y=t.split(`
10
+ `);for(;y.length>0&&y[0].trim()==="";)y.shift();for(;y.length>0&&y[y.length-1].trim()==="";)y.pop();let b=y[0]?.match(/^\s*/)?.[0].length||0,P=y.map(g=>{let w=g.match(/^\s*/)?.[0].length||0,N=Math.min(w,b);return g.slice(N)}),h=[{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 P.map((g,w)=>{let N=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),C=d.has(w+1),S=[];h.forEach(I=>{N=N.replace(I.re,M=>{let L=`ZUZ_ID_${S.length}_ZUZ`;return S.push(`<span class="--token-${I.name}">${M}</span>`),L});});for(let I=S.length-1;I>=0;I--)N=N.replace(`ZUZ_ID_${I}_ZUZ`,S[I]);return `<div class="--code-line ${e==true?"--with-ln":""} ${C?"--is-highlighted":""}">
11
+ ${e==true?`<span class="--line-number">${w+1}</span>`:""}
12
12
  <span class="--line-content">${N||" "}</span>
13
- </div>`}).join("")},[e,g]);return jsxRuntime.jsx(l,{as:`--code-block ${i}`,style:f,...p,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:v}})})})},vl=bl;var nn=({onSelect:o,meta:n,selected:e})=>{let r=react.useRef(null),{index:t,icon:s,label:u}=n,[m,p]=react.useState({x:0,width:0}),a=hooks.useDelayed();return react.useLayoutEffect(()=>{if(a&&r.current){let{width:i,x:f}=r.current.getBoundingClientRect();p({x:f,width:i}),e&&o(t,i,f,n,true);}},[a,r.current]),react.useEffect(()=>{e&&o(t,m.width,m.x,n,false);},[e]),jsxRuntime.jsxs(z,{onClick:()=>o(t,m.width,m.x,n,false),ref:r,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(q,{name:s,as:"--segment-icon"}):jsxRuntime.jsx(l,{as:"--segment-icon flex aic jcc",children:s}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(l,{className:"--segment-label",children:u||`Item ${t}`})]})};nn.displayName="SelectTabItem";var sn=nn;var ln=react.forwardRef((o,n)=>{let{fx:e,items:r,selected:t,variant:s,onSwitch:u,...m}=o,[p,a]=react.useState(t||0),i=react.useRef(false),f=react.useRef(p),{className:c,style:g,rest:v}=R(m),x=react.useRef(null),b=react.useRef(null),P=(h,d,w,N,T)=>{if((T||p!=h&&p!=-2)&&(a(h),f.current=p,i.current&&u?.(N)),x.current){let S=b.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${d}px`),x.current.style.setProperty("--x",`${S?w-S.left:w}px`);}};return react.useImperativeHandle(n,()=>({setSelected:h=>{typeof h=="number"&&h!=p&&a(h);}}),[p]),react.useEffect(()=>{i.current=true;},[]),jsxRuntime.jsxs(l,{ref:b,"data-selected":p,className:`${c} --segmented --${s||W.Small} flex aic rel`,style:g,...v,children:[jsxRuntime.jsx(l,{ref:x,className:"--segment-tab abs"}),r.map((h,d)=>jsxRuntime.jsx(sn,{onSelect:P,selected:p==d,meta:{...h,index:d}},`segment-${h.label}-${d}`))]})});ln.displayName="Zuz.SelectTabs";var tt=ln;var pn=react.forwardRef((o,n)=>{let{type:e,...r}=o,t=hooks.useDelayed(),{colorScheme:s,setColorScheme:u}=At(),m=react.useCallback(()=>{u(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:p,style:a}=R(r),i=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"system",index:1,label:"",icon:k.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !t||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(tt,{className:`--color-scheme --${e}`,onSwitch:({tag:c})=>{u(c);},selected:f,items:i,...r}):jsxRuntime.jsx(z,{onClick:m,style:a,as:`--color-scheme-switch --${r.variant||W.Small} ${p}`.trim(),children:s=="system"?k.colorSchemeSystem:s=="light"?k.colorSchemeLight:k.colorSchemeDark})});pn.displayName="Zuz.ColorScheme";var Dl=pn;var fn=react.forwardRef((o,n)=>{let[e,r]=react.useState("wait"),{title:t,message:s,acceptLabel:u,rejectLabel:m,position:p}=o,a=async i=>{r(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return react.useEffect(()=>{let i=localStorage.getItem("--ccnt");r(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(l,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:F.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${p||ee.Left} flex cols`,children:[jsxRuntime.jsx(D,{as:"--title",children:t||"This site uses cookies"}),jsxRuntime.jsx(D,{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(l,{as:"--footer flex aic",children:[jsxRuntime.jsx(z,{onClick:i=>a(1),as:"--accept",children:u||"Accept All"}),jsxRuntime.jsx(z,{onClick:i=>a(0),as:"--reject",children:m||"Cancel"})]})]})});fn.displayName="Zuz.CookiesConsent";var $l=fn;var hn=react.forwardRef((o,n)=>{let {type:e,value:r,min:t,max:s,step:u,onChange:m,roundValue:p,...a}=o,{className:i,style:f,rest:c}=R(a),g=react.useRef(u||.01).current,v=react.useRef(t||0).current,x=react.useRef(s||1).current,b=react.useRef(r||0).current,P=react.useRef(null),h=react.useRef(null),d=react.useRef(null);react.useRef(null);let N=react.useRef(null),T=react.useRef(null),S=($,K,O)=>($-K)/(O-K)*100,I=$=>{if(h.current){let K=parseFloat($.currentTarget.value),O=S(K,parseFloat($.currentTarget.min),parseFloat($.currentTarget.max));h.current.style.setProperty("--value",`${O}`),h.current.setAttribute("data-value",`${K}`),m&&m(p?+K.toFixed(2):K);}},[M,L]=react.useState(false),[V,E]=react.useState(0),[Z,U]=react.useState(0),H=$=>{L(true),E($.clientX),U(h.current?parseFloat(h.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},C=$=>{if(M){let K=$.clientX-V,O=Math.max(v,Math.min(Z+K*g,x));h.current&&(h.current.setAttribute("data-value",`${O}`),T.current.textContent=p?O.toFixed(2):O.toString(),m&&m(p?+O.toFixed(2):O));}},A=()=>{L(false),document.body.style.cursor="auto";};return react.useEffect(()=>{h.current&&h.current.style.setProperty("--value",P.current?`${S(parseFloat(P.current.value),parseFloat(P.current.min),parseFloat(P.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(l,{ref:h,"data-value":b||0,className:`--slider --${e||pt.Default} flex rel ${i}`.trim(),style:{...f},children:pt.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(D,{ref:T,onMouseDown:H,className:"--slider-text",children:b||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(l,{ref:N,className:"--slider-track abs fill"}),jsxRuntime.jsx(l,{ref:d,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:P,onInput:I,className:"abs fill",tabIndex:0,type:e||pt.Default,defaultValue:b||0,step:g,max:x,min:v})]})})});hn.displayName="Zuz.Slider";var po=hn;var yn=react.forwardRef((o,n)=>{let{src:e,shape:r,size:t,...s}=o,{style:u,className:m,rest:p}=R(s),{canvasRef:a,crop:i,setScale:f,handleMouseDown:c,handleMouseUp:g,handleMouseMove:v}=hooks.useImageCropper(e,t||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return i()},setScale(x){f(x);}})),jsxRuntime.jsxs(l,{as:`--cropper --${r||hooks.CropShape.Circle} ${m}`,style:u,...p,children:[jsxRuntime.jsx("canvas",{ref:a,width:t||200,height:t||200,onMouseDown:c,onMouseUp:g,onMouseLeave:g,onMouseMove:v}),jsxRuntime.jsx(l,{as:"--cropper-slider",children:jsxRuntime.jsx(po,{onChange:x=>f(x),min:0,max:1,step:.01,value:1})})]})});yn.displayName="Zuz.Cropper";var Ul=yn;var Gl=(e=>(e.Circle="circle",e.Square="square",e))(Gl||{});var vn=react.forwardRef((o,n)=>{let{items:e,maxItems:r}=o,t=react.useMemo(()=>{let m=typeof e=="string",p=m?[]:e;return m&&e.split(",").forEach(a=>{p.push({label:a});}),p},[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(Le,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(l,{as:"--crumb-chevron",children:k.chevronRightOutline}),items:u.map((m,p,a)=>m.ID=="."?jsxRuntime.jsx(l,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(l,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${p}`))}):jsxRuntime.jsxs(z,{onClick:()=>m.action?.(),className:"--crumb-item",disabled:!a[p+1],children:[m.icon&&jsxRuntime.jsx(q,{as:"--crumb-icon",name:m.icon}),jsxRuntime.jsx(D,{as:"--crumb-label",children:m.label})]},`${m.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});vn.displayName="Zuz.Crumb";var Xl=vn;var Cn=react.forwardRef((o,n)=>{let{icon:e,defaultValue:r,value:t,size:s,variant:u,numeric:m,type:p,onConfirm:a,...i}=o,[f,c]=react.useState(false),[g,v]=react.useState(r||null),{style:x,className:b,rest:P}=R(i),h=react.useRef(null),d=react.useRef(null),{reposition:w}=Ue(d,{direction:ee.Bottom,offset:2}),N=S=>{m&&(S.currentTarget.value=S.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let S=I=>{let M=I.target,L=h.current?.contains(M),V=d.current?.contains(M);!L&&!V&&c(false);};return f&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S);}},[f]),react.useEffect(()=>{let S=I=>{I.key==="Escape"&&f&&(c(false),h.current?.focus());};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[f]);let T=()=>{c(true);};return react.useEffect(()=>{f&&w();},[f,w]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(l,{as:`--date-picker ${u?`--${u}`:""} rel flex aic ${b}`,"data-value":g?g.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(q,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(Y,{as:"--date-picker-icon flex aic jcc",children:k.calendar}),jsxRuntime.jsx("input",{ref:h,value:g?dateFns.format(g,"EEE, MMM d YYY hh:mm a"):t||"",className:`--input ${u?`--${u}`:""} flex`.trim(),style:x,onFocus:T,onInput:N,autoComplete:"new-password",onKeyDown:S=>{S.key=="Enter"&&a?.(S.currentTarget.value);},...P}),jsxRuntime.jsx(l,{"aria-hidden":!f,ref:d,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(no,{defaultValue:g,onChange:S=>{v(S),c(false);}})})]})})});Cn.displayName="Zuz.DatePicker";var jl=Cn;var Tn=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||k.plus})});Tn.displayName="Zuz.Fab";var rm=Tn;var Pn=o=>{let{names:n,strength:e}=o,r={[ut.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-${ut.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[ut.Gooey]).map(t=>r[t](e))})})};Pn.displayName="Zuz.Filters";var am=Pn;var Pe=null,se=null,Nn=react.forwardRef((o,n)=>{let{title:e,message:r,transition:t,curve:s,speed:u,type:m,actionPosition:p,spinner:a,loadingMessage:i,onShow:f,onHide:c,...g}=o,{className:v,style:x,rest:b}=R(g),[P,h]=react.useState(e||""),[d,w]=react.useState(r||""),[N,T]=react.useState(null),[S,I]=react.useState(m||ie.Default),M=react.useMemo(()=>core.uuid(12),[]),[L,V]=react.useState(false),E=react.useRef(null),Z=react.useRef(null),[U,H]=react.useState(false),[C,A]=react.useState(true),$=react.useRef(null),K=d;react.useImperativeHandle(n,()=>({setLoading(_){H(_);},showDialog(_,X,te,j){Pe&&(clearTimeout(Pe),se&&clearTimeout(se),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),se=setTimeout(()=>{E.current.classList.remove("--wobble"),se=null;},500)),I(ie.Dialog),X&&w(X),_&&h(_),te&&T(te.reduce((ce,de)=>(ce.push({...de,key:de.key||core.uuid(12)}),ce),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(_,X,te,j){Pe&&(clearTimeout(Pe),se&&clearTimeout(se),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),se=setTimeout(()=>{E.current.classList.remove("--wobble"),se=null;},500)),I(ie.Dialog),w(X),h(_),te&&T(te.reduce((ce,de)=>(ce.push({...de,key:de.key||core.uuid(12)}),ce),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},error(_,X){this.show(_,X,ie.Error);},warn(_,X){this.show(_,X,ie.Warn);},success(_,X){this.show(_,X,ie.Success);},show(_,X,te){Pe&&(clearTimeout(Pe),se&&clearTimeout(se),Z.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${Z.current} scale(.9)`.trim();},50),se=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=Z.current||"",se=null;},500)),Pe=setTimeout(()=>{V(false),Pe=null,se=null;},(X||4)*1e3),I(te||ie.Default),w(_),V(true),f?.();},hide(){V(false),c?.();}}));let O=react.useMemo(()=>{let _={when:L,duration:u||.3,delay:.1};if(S==ie.Dialog){if(t){let{from:X,to:te}=Ke(t,20);return {from:X,to:te,curve:s||F.EaseInOut,..._}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:F.Spring,..._}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:F.Spring,..._}},[L,S]);return react.useEffect(()=>{$.current&&clearTimeout($.current),L?A(true):$.current=setTimeout(()=>A(false),1e3);},[L]),S==ie.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ie,{when:L}),jsxRuntime.jsxs(l,{className:`--sheet --sheet-${S.toLowerCase()} ${L?"is-visible":""} ${v} fixed`.trim(),style:x,fx:O,...b,ref:E,children:[jsxRuntime.jsx(Ee,{when:U,spinner:a,message:i}),jsxRuntime.jsxs(l,{className:"--head flex aic rel",children:[jsxRuntime.jsx(l,{className:`--${P?"title":"dot"} flex aic rel`,children:P||""}),jsxRuntime.jsx(z,{onClick:_=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(l,{className:`--body flex aic rel ${N?"":"--no-action"}`.trim(),children:C?K:null}),N&&jsxRuntime.jsx(l,{className:`--footer flex aic rel ${p?p==Lt.Center?"jcc":"":"jce"}`.trim(),children:N.map((_,X)=>jsxRuntime.jsx(z,{onClick:te=>_.handler?_.handler():_.onClick?_.onClick():console.log("onClick Handler missing"),className:"--action",children:_.label},`sheet-${M}-action-${_.key}`))})]})]}):jsxRuntime.jsx(l,{className:`--sheet --sheet-${S.toLowerCase()} ${v} abs`.trim(),style:x,...b,fx:O,ref:E,children:L?d:null})}),rt=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;Nn.displayName="Zuz.Sheet";var pm=Nn;var In=react.forwardRef((o,n)=>{let{name:e,cover:r,spinner:t,errors:s,action:u,children:m,withData:p,beforeSubmit:a,onSubmit:i,onError:f,onSuccess:c,resetOnSuccess:g,...v}=o,{className:x,style:b,rest:P}=R(v),[h,d]=react.useState(false),w=react.useRef(null),N=react.useRef(null),T=react.useRef(null),S=Yt(),I=react.useCallback(C=>w.current?w.current.querySelectorAll(C):[],[w.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 O=L(C);if(O==""||O.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 O=C.getAttribute("with");switch(O.includes("@")&&(O=O.split("@")[0],O=="match"&&(O=ve.MatchField)),O.toUpperCase()){case ve.IPV4:return core._(C.value).isIPv4();case ve.IPV6:return core._(C.value).isIPv6();case ve.Email:return core._(C.value).isEmail();case ve.Uri:try{return new URL(C.value),!0}catch{return false}case ve.Password:return console.log("Add FORMVALIDATION.Password"),false;case ve.MatchField:let[_,X,te]=C.getAttribute("with").split("@"),j=document.querySelector(`[name=${X.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},[w.current]),E=react.useCallback(()=>{let C={},A={},$=null,K=null;if(Array.from(I("[name]")).forEach(O=>{let{name:_,required:X,with:te}=M(O),j=true;(X||te)&&(j=V(O)),C[_]={valid:j,value:O.type=="checkbox"?O.checked==true?O.value:false:O.classList.contains("--otp")?L(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value},A[_]=O.type=="checkbox"?O.checked==true:O.classList.contains("--otp")?L(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value,j?O.classList.remove("input-with-error"):($==null&&s&&($=O,K=s[_]),O.classList.add("input-with-error"));}),$){let O=$;if(O.classList.contains("--otp"))for(let _ of Array.from(O.querySelectorAll(".--input"))){let X=_;if(X.value==""){X.focus();break}}else O.focus();}return {error:$!=null,errorMsg:K||"Fix errors to continue...",data:C,payload:A}},[w.current]),Z=react.useCallback(()=>{let{error:C,errorMsg:A,payload:$}=E();C?S.error(A):u?react.startTransition(async()=>{a&&a($),rt(r)?r.setLoading(true):d(true),S.clearAll(),core.withPost(u,{...$,...p||{}}).then(K=>{let O=K;rt(r)?r.setLoading(false):d(false),g&&Array.from(I("[name]")).forEach(_=>{_ instanceof HTMLInputElement&&(_.value="");}),c?c(O):(S.clearAll(),S.success(O.message||"Redirecting..."));}).catch(K=>{rt(r)?r.setLoading(false):d(false),f?f(K):S.error(K.message||"We cannot process your request at this time.");});}):i&&i($);},[u,N.current,w.current]),U=react.useCallback(()=>{let C=I("[type=submit]");!C||C.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):C.forEach(A=>{A.addEventListener("click",Z);});},[w.current]),H=react.useMemo(()=>react$1.addPropsToChildren(m,C=>C.props.type=="submit",C=>({ref:T})),[m]);return react.useImperativeHandle(n,()=>({setLoading(C){if(C){N.current.hide();try{S.clearAll();}catch{}}d(C);},showError(C){typeof C=="string"?S.error(C):N.current.error(C,4);},hideError(){N.current.hide();try{S.clearAll();}catch{}},init(){U();},submit(){Z();}})),react.useEffect(U,[]),jsxRuntime.jsxs(l,{ref:w,style:b,className:`--form flex rel ${x} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!rt(r)&&jsxRuntime.jsx(Ee,{message:r?r.message||void 0:"working",spinner:t,color:r&&"color"in r?r.color:"#ffffff",when:h}),H]})});In.displayName="Zuz.Form";var wm=In;var En=react.forwardRef((o,n)=>{let {children:e,fx:r,fxDelay:t,fxStep:s,classToIgnore:u,...m}=o,p=Q(true),a=hooks.useDelayed(),i=r||p?.group?.fx,f=t||p?.group?.fxDelay,c=s||p?.group?.fxStep;u||p?.group?.classToIgnore;let v=react.useMemo(()=>i?react$1.addPropsToChildren(e,x=>{if(x.type===react.Fragment)return false;let b=x.props||{},P="fx"in b,h=b.as?Array.isArray(b.as)?b.as.join(" "):b.as:b.className||"",d=typeof h=="string"&&h.includes(u||"--ignore");return !P&&!d},x=>({fx:{...i,delay:(f||0)+x*(c||.1),when:a}})):e,[e,a,i]);return jsxRuntime.jsx(l,{className:"--group",ref:n,...m,children:v})});En.displayName="Zuz.Group";var Em=En;var Bn=o=>typeof o=="string"&&o.includes("+"),Ln={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"},Mn={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 kn=react.forwardRef(({children:o,keys:n,variant:e},r)=>{let t=react.useMemo(()=>{if(Bn(n)){let s=null;return {keys:String(n).split("+").reduce((m,p,a,i)=>(i[a+1]?m.push(p):s=p.toUpperCase(),m),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(l,{as:`--keyboard-keys --${e||W.Small} flex aic`,children:[(Array.isArray(t.keys)?t.keys:[t.keys]).map(s=>jsxRuntime.jsx("abbr",{title:Mn[s],children:Ln[s]},s)),jsxRuntime.jsx(Y,{children:t?.children??o})]})});kn.displayName="Zuz.KeyboardKeys";var bo=kn;var Hn=react.forwardRef((o,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:t,variant:s}=o;return jsxRuntime.jsxs(l,{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(l,{className:"--ico",children:e?k[ae.Success]:k[ae.Error]}),jsxRuntime.jsx(D,{as:"--message",children:e?r||"internet connection restored :)":t||"no internet connection"})]})});Hn.displayName="Zuz.NetWorkManager";var Hm=Hn;var vo=(e=>(e.Table="table",e.Gooey="gooey",e))(vo||{});var $n=react.forwardRef((o,n)=>{let{itemCount:e,itemsPerPage:r,startPage:t,pageRange:s,paginationStyle:u,breakLabel:m,prevLabel:p,nextLabel:a,hash:i,loading:f,seperator:c,renderOnZeroPageCount:g,onPageChange:v,...x}=o,b=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),P=react.useCallback(E=>`${core.toHash(E,i||6,b)}${c||""}${b}`,[b]),h=react.useMemo(()=>m||"...",[m]),[d,w]=react.useState({id:i?t?typeof t=="number"?P(t):t:1:t||1,label:t||1}),{style:N,className:T,rest:S}=R(x),I=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=[],Z=Math.max(I(d)-(s||2),1),U=Math.min(I(d)+(s||2),M);Z>1&&E.push({id:i?P(1):1,label:1}),Z>2&&E.push({id:-1,label:h});for(let H=Z;H<=U;H++)E.push({id:i?P(H):H,label:H});return U<M-1&&E.push({id:-1,label:h}),U<M&&E.push({id:i?P(M):M,label:M}),E},[d]),V=react.useCallback(E=>{let Z=E;+Z.label<1||+Z.label>M||(w(Z),v?.(Z));},[e,r,d]);return L.length<=1&&(g??false)===false?null:jsxRuntime.jsxs(l,{ref:n,as:`--pagination --pgt-${u||"table"} flex aic w:100% jcc ${T}`,children:[jsxRuntime.jsx(l,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:h}]).map((E,Z,U)=>jsxRuntime.jsx(z,{disabled:E.id==-1||I(d)==+E.label,className:(typeof E=="string"?E:E.label)==I(d)?"--current-page":"",onClick:H=>V(E),children:typeof E=="string"?E:E.label},`--pg-${Z}-${E.id}`))}),jsxRuntime.jsx(l,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(d)-1)*r+1} - `,`${Math.min(I(d)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(l,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(z,{disabled:I(d)<=1,onClick:E=>V({id:i?P(I(d)-1):I(d)-1,label:I(d)-1}),children:k.chevronLeftOutline}),jsxRuntime.jsx(z,{disabled:L.length<=1||I(d)==I(L[L.length-1]),onClick:E=>V({id:i?P(I(d)+1):I(d)+1,label:I(d)+1}),children:k.chevronRightOutline})]})]})});$n.displayName="Zuz.Pagination";var So=$n;var _n=react.forwardRef((o,n)=>{let{strenthMeter:e,onChange:r,...t}=o;"type"in t&&delete t.type;let{style:s,className:u,rest:m}=R(t),[p,a]=react.useState(false),[i,f]=react.useState(""),c=react.useMemo(()=>core.checkPasswordStrength(i),[i]),g=hooks.useDebounce(v=>{e&&f(v.target.value),r&&r(v);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(l,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(l,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:n,type:p?"text":"password",className:u,onChange:g,...m}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:()=>a(v=>!v),className:"--toggle flex aic jcc abs",children:p?k.eye:k.eyeSlash})]}),e&&jsxRuntime.jsxs(l,{as:`flex aic --password-meter --pb-score-${c.score}`,style:s,children:[jsxRuntime.jsxs(l,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(l,{as:`--pbar ${c.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(l,{as:`--pbar ${c.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(l,{as:`--pbar ${c.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(l,{as:`--pbar ${c.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(l,{as:`--pbar ${c.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(D,{as:"--password-meter-label","aria-hidden":true,children:c.result})]})]})});_n.displayName="Zuz.Password";var Wm=_n;var Zn=react.forwardRef((o,n)=>{let{size:e,length:r,mask:t,...s}=o,u=react.useRef([]),m="pinput",p=false,a={};"with"in s&&(a={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(m=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:i}=R(s),f=c=>{let g=c.currentTarget,v=u.current[parseInt(g.dataset.index)+1],x=u.current[parseInt(g.dataset.index)-1];g.value.length===1&&v?v.focus():g.value.length===0&&x&&x.focus();};return react.useEffect(()=>{u.current=u.current.slice(0,e||r);},[e||r]),jsxRuntime.jsx(l,{name:m,style:i,className:"--otp flex aic rel","data-required":p,"data-size":e||r||4,...a,children:Array(e||r||4).fill(1).map((c,g)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":g,ref:v=>{u.current[g]=v;},numeric:true,onChange:f,maxLength:1,placeholder:t?"\xB7":"0",type:t?"password":"text",...s},`pin-${g}`))})});Zn.displayName="Zuz.PinInput";var Ym=Zn;var Kn=react.forwardRef((o,n)=>{let{children:e,className:r,name:t,required:s,type:u,value:m,variant:p,checked:a,onSwitch:i,...f}=o,[c,g]=react.useState(a||false),{variant:v}=Q(true),x=react.useRef(null);return jsxRuntime.jsxs(je,{className:`${r} --${(u||Mt.Default).toLowerCase()} --radio${!u||u==Mt.Default?"":"card"} --${p||v||W.Small} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(oe,{ref:x,defaultChecked:c,value:m||"rd",type:"radio",className:"abs",name:t,required:s||false,onChange:b=>{i&&i(b.target.checked,m||"cb"),g(b.target.checked);}}),jsxRuntime.jsx(l,{className:"--dot rel",children:jsxRuntime.jsx(l,{className:"--rod abs abc"})}),jsxRuntime.jsx(l,{className:"--value",children:e})]})});Kn.displayName="Zuz.Radio";var ec=Kn;var Un=react.forwardRef((o,n)=>{let{fx:e,withStyle:r,as:t,reverse:s=false,searchIcon:u=k.search,hideSearchIcon:m=false,clearIcon:p=k.close,hideClearIcon:a=false,onChange:i,onClear:f,...c}=o,{style:g,className:v}=R({as:o.as}),[x,b]=react.useState(""),P=react.useRef(null),h=react.useMemo(()=>jsxRuntime.jsx(z,{tabIndex:-1,onClick:N=>w(),className:"--send flex aic jcc",variant:o.variant||W.Small,children:x!==""?!a&&(typeof p=="string"?jsxRuntime.jsx(q,{name:p,as:"--search-action"}):p):!m&&(typeof u=="string"?jsxRuntime.jsx(q,{name:u,as:"--search-action"}):u)}),[s,u,a,p,m]);"type"in o&&delete o.type;let d=N=>{b(N.target.value),i?.(N.target.value);},w=N=>{x.trim()!==""&&(b(""),i?.(""),P.current&&(P.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>P.current?.focus(),value:()=>P.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(l,{style:g,className:`--search ${s?"--search-rev":""} --${o.variant||W.Small} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${v}`.trim(),children:[s&&h,jsxRuntime.jsx(oe,{ref:P,onChange:d,className:`--${o.variant||W.Small}`,...c}),o.shortcut&&jsxRuntime.jsx(bo,{keys:o.shortcut,as:"abs"}),!s&&h]})});Un.displayName="Zuz.Search";var lc=Un;var Gn=({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(q,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(D,{children:typeof e=="string"?e:e.label})]});Gn.displayName="Option";var qn=Gn;var Yn=({ref:o,...n})=>{let {selected:e,options:r,label:t,name:s,variant:u,search:m,searchPlaceholder:p,maxHeight:a,arrowDownIcon:i=k.arrowDown,arrowUpIcon:f=k.arrowUp,onChange:c,...g}=n,[v,x]=react.useState(e?typeof e=="string"?r.find(H=>H.value===e):e:r[0]),[b,P]=react.useState(false),[h,d]=react.useState(null);react.useRef(null);let N=react.useRef(null),T=react.useRef(null),S=react.useId(),I=react.useMemo(()=>s||S,[]),{reposition:M}=Ue(T,{direction:Bt.Bottom,offset:2}),{variant:L}=Q(true),{className:V,style:E,rest:Z}=R(g),U=H=>{x(H),c&&c(H);};return react.useImperativeHandle(o,()=>({setSelected:H=>{if(typeof H=="string"){let C=r.find(A=>A.value===H);C&&x(C);}else x(H);},getValue:()=>v||null})),react.useEffect(()=>{if(!b)return;let H=()=>{M();};return window.addEventListener("scroll",H,true),window.addEventListener("resize",M),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",M);}},[b,M]),react.useEffect(()=>{if(!b){N.current&&(N.current.value=""),d(null);return}N.current?.focus(),M();let H=A=>{T.current&&!T.current.contains(A.target)&&P(false);},C=setTimeout(()=>{document.addEventListener("click",H);},0);return ()=>{clearTimeout(C),document.removeEventListener("click",H);}},[b,M]),jsxRuntime.jsxs(l,{className:`--select --${u||L} ${s?`--${s}`:""} rel`.trim(),name:I,children:[jsxRuntime.jsxs(z,{"data-value":v?typeof v=="string"?v:v.value:v||"-1",className:`--selected flex aic rel ${V}`.trim(),withLabel:false,style:E,onClick:H=>{H.stopPropagation(),P(C=>!C);},...Z,children:[jsxRuntime.jsx(D,{className:"--label",children:v?typeof v=="string"?v:v.label:t||"Choose"}),jsxRuntime.jsx(l,{className:"--svg-arrow rel flex aic jcc",children:b?typeof f=="string"?jsxRuntime.jsx(q,{name:f,as:"--search-action"}):f:typeof i=="string"?jsxRuntime.jsx(q,{name:i,as:"--search-action"}):i})]}),jsxRuntime.jsxs(l,{id:I,className:"--options-list flex cols abs","aria-hidden":!b,style:{maxHeight:a||"auto"},ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:b,duration:.05},children:[m&&jsxRuntime.jsx(oe,{ref:N,onChange:H=>{d(H.target.value==""?null:H.target.value);},className:"--select-search",placeholder:p||"Search..."}),(h==null?r:r.filter(H=>H.label.toLowerCase().includes(h.toLowerCase())||H.value.toLowerCase().includes(h.toLowerCase()))).map(H=>jsxRuntime.jsx(qn,{updateValue:U,value:v,o:H},`option-${(typeof H=="string"?H:H.label).replace(/\s+/g,"-")}-${typeof H=="string"?H:H.value}`))]})]})};Yn.displayName="Zuz.Select";var dc=Yn;var Qn=react.forwardRef((o,n)=>jsxRuntime.jsx(et,{type:be.Switch,...o,ref:n}));Qn.displayName="Zuz.Switch";var hc=Qn;var jn=o=>{let{idx:n,id:e,as:r,weight:t,style:s,value:u,render:m,resize:p,sortBy:a,sortable:i,onSort:f}=o,[c,g]=react.useState(0),v=()=>{i&&(f?.(String(e),c==1?-1:1),g(x=>x==1?-1:1));};return jsxRuntime.jsxs(l,{style:{flex:t||1,...s},as:`--col flex aic ${r||""} ${i?"--sortable":""}`,onClick:v,children:[jsxRuntime.jsx(l,{children:u}),n==-1&&i&&a==e&&jsxRuntime.jsx(l,{as:"--arrow flex aib",children:c==1?k.arrowUp:k.arrowDown})]})};jn.displayName="Zuz.Column";var Tt=jn;var ts=o=>{let{index:n,pubsub:e,schema:r,data:t,ids:s,styles:u,animate:m,sortBy:p,selectable:a,tableRef:i,loading:f,rowClassName:c,onSort:g,onRowClick:v,onSelect:x,onContextMenu:b}=o,P=hooks.useDelayed(),h=react.useMemo(()=>({transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(n+1)}),[]),d=react.useRef(null),w=(T,S)=>{n==-1?e.emit(`ALL_ROWS_${T?"CHECKED":"UNCHECKED"}`,T):(x&&x(t,T),e.emit(`ROW_${T?"CHECKED":"UNCHECKED"}`,T,S));},N=(T,S,I)=>jsxRuntime.jsx(Tt,{idx:T,id:S,as:"--selector",pubsub:e,value:jsxRuntime.jsx(et,{value:I,ref:d,onSwitch:w,type:be.Default})});return react.useEffect(()=>{let T=(L,V)=>{d.current?.setChecked(L,false);},S=(L,V)=>{let E=false;i?.current&&i.current.querySelectorAll(".--row").forEach(Z=>{let U=Z;if(!U.classList.contains("--row-head")){let H=U.querySelector(".--selector input[type=checkbox]");H&&H.checked&&!E&&(E=H.checked);}}),d.current.setChecked(E,false);},I=L=>{d.current?.setChecked(L,false),x&&x(t,L);},M=L=>{d.current?.setChecked(L,false),x&&x(t,L);};return n==-1?(e.on("ROW_CHECKED",T),e.on("ROW_UNCHECKED",S),()=>{e.off("ROW_CHECKED",T),e.off("ROW_UNCHECKED",S);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",M),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",M);})},[]),jsxRuntime.jsxs(l,{onContextMenu:T=>b?b(T,t):null,onClick:T=>v?v(T,o.data):()=>{},...m?{fx:{...h,when:P}}:{},as:`--row flex aic ${v?"--row-clickable":""} ${n==-1?"--row-head":""} ${c||""}`,children:[n==-1&&r.map((T,S)=>{let{renderWhenHeader:I,render:M,value:L,...V}=T;return jsxRuntime.jsxs(react.Fragment,{children:[a&&S==0&&N(-1,`--selector-${T.id}`,"all"),jsxRuntime.jsx(Tt,{idx:-1,onSort:g,sortBy:p,value:L,...V,pubsub:e,style:u[T.id]})]},`--col-${T.id}`)}),f&&n>-1&&jsxRuntime.jsx(l,{as:"--col",children:jsxRuntime.jsx(D,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&t&&r.map((T,S)=>jsxRuntime.jsxs(react.Fragment,{children:[a&&S==0&&N(S,`--selector-${T.id}`,T.id.toString()),s.includes(String(T.id))?jsxRuntime.jsx(Tt,{pubsub:e,idx:S,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-${S}`))]})};ts.displayName="Zuz.Row";var Pt=ts;var ss=(o,n)=>{let{schema:e,rows:r,rowCount:t,rowsPerPage:s,currentPage:u,pagination:m,paginationHash:p,showPaginationOnZeroPageCount:a,animateRows:i,header:f,rowClassName:c,selectableRows:g,hoverable:v,sortBy:x,loading:b,loadingRowCount:P,loadingMessage:h,spinner:d,emptyMessage:w,onSort:N,onRowClick:T,onRowSelectToggle:S,onPageChange:I,onRowContextMenu:M,...L}=o,V=react.useRef(null),E=react.useMemo(()=>e.reduce((pe,J)=>(pe[J.id]={flex:J.weight||1,...J.w&&{width:J.w},...J.maxW&&{maxWidth:J.maxW},...J.minW&&{minWidth:J.minW},...J.h&&{height:J.h},...J.maxH&&{maxHeight:J.maxH},...J.minH&&{minHeight:J.minH}},pe),{}),[e]),Z=react.useMemo(()=>Object.keys(E),[e]),U=react.useMemo(()=>f??true,[f]),{style:H,className:C,rest:A}=R(L),$=react.useRef(null),K=react.useMemo(()=>new core.PubSub,[]),O=react.useRef(r.map(()=>core.uuid(8))),[_,X]=react.useState(x||null),[te,j]=react.useState(h||"loading"),ce=react.useMemo(()=>!b&&r&&r.length==0,[b,r]),de=react.useCallback(()=>w?typeof w=="function"?jsxRuntime.jsx(w,{}):w:jsxRuntime.jsx(D,{as:"tac s:18 mt:75",children:"No Record Found"}),[b,r]);react.useEffect(()=>{O.current=r.map(()=>core.uuid(8));},[r]);let it=(pe,J)=>{X(pe),N?.(pe,J);},lt=(t||(r?r.length:0))/(s||10),mt=react.useMemo(()=>a||lt>1?jsxRuntime.jsx(So,{hash:p,ref:V,renderOnZeroPageCount:a,onPageChange:I,paginationStyle:"table",startPage:u,itemCount:t||(r?r.length:0),itemsPerPage:s||10}):null,[u,t]);return react.useImperativeHandle(n,()=>({setLoading(pe){}})),jsxRuntime.jsxs(l,{as:`--table ${v??true?"--hoverable":""} flex cols rel ${C}`,ref:$,children:[U==true&&jsxRuntime.jsx(Pt,{sortBy:_,onSort:it,tableRef:$,pubsub:K,selectable:g,index:-1,schema:e,loading:true,styles:E}),b&&jsxRuntime.jsxs(l,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:d||le.Simple}),te&&jsxRuntime.jsx(D,{as:"--table-loading-message",children:te})]}),b&&Array(P||5).fill({}).map((pe,J)=>jsxRuntime.jsx(Pt,{tableRef:$,index:J,pubsub:K,schema:e,styles:E,loading:true,animate:i,onRowClick:T},`--trow-loading-${J}-${e[0].id}`)),!b&&r&&r.map((pe,J)=>jsxRuntime.jsx(Pt,{tableRef:$,pubsub:K,loading:false,index:J,schema:e,ids:Z,styles:E,animate:i,data:pe,onRowClick:T,rowClassName:c,selectable:g,onSelect:S,onContextMenu:M},`--trow-${O.current[J]||J}-${e[0].id}`)),ce&&de(),jsxRuntime.jsx(l,{"aria-hidden":!m||!mt,...i?{fx:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(r.length+1),when:!b&&r&&m&&mt!=null}}:{},as:"--row flex aic --row-footer",children:m&&mt?mt:null})]})};ss.displayName="Zuz.Table";var Ec=react.forwardRef(ss),Bc=Ec;var Mc=({ref:o,...n})=>{let{title:e,items:r}=n,[t,s]=react.useState(0),u=(m,p,a)=>{m.preventDefault(),s(p),document.getElementById(a)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(l,{ref:o,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(D,{as:"--toc-title",children:e}),jsxRuntime.jsx(Le,{items:r.map((m,p)=>jsxRuntime.jsx("a",{className:t==p?"--toc-active":"",style:{anchorName:t===p?"--toc-active":"none",color:t==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:a=>u(a,p,m.tag),href:`#${m.tag}`,children:m.label}))})]})},Oc=Mc;var as=({isActive:o,transitionType:n,speed:e,width:r,render:t,content:s,onHeightChange:u})=>{let m=react.useRef(null),p=hooks.useResizeObserver(m);react.useEffect(()=>{o&&p.height>0&&u(p.height);},[o,p.height]);let a=react.useMemo(()=>{let i={flexShrink:0,height:"fit-content"};return n==="fade"?{...i,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"?{...i,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}:i},[o,n,r,e]);return jsxRuntime.jsx(l,{ref:m,style:{...a},className:"--content",children:t||o?s:null})};as.displayName="Zuz.TabBody";var is=as;var cs=({ref:o,...n})=>{let{tabs:e,speed:r=.3,prerender:t=true,variant:s,tabStyle:u="fixed",onChange:m,transitionType:p="slide",...a}=n,[i,f]=react.useState(0),c=react.useRef(null),g=hooks.useResizeObserver(c),v=react.useMemo(()=>core.uuid(8),[]),[x,b]=react.useState("auto"),P=react.useMemo(()=>g.width>0,[g.width]);react.useImperativeHandle(o,()=>({setTab:S=>f(S)}));let h=react.useMemo(()=>e.map(S=>({...S,key:S.key||core.uuid(8)})),[e]),{style:d,className:w,rest:N}=R({as:`flex cols w-full no-overflow ${a.as||""}`,...a}),T=()=>{if(!P)return {opacity:0};switch(p){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${i*g.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(l,{ref:c,style:d,className:`--tabview --${u} flex cols ${w}`,children:[jsxRuntime.jsx(tt,{as:"--tabview-head",onSwitch:S=>{f(S.index);let I=h.find(M=>M.tag==S.tag);I&&I.onSelect&&(I.onSelect(I,S.index),m?.(I,S.index));},selected:i,items:h.reduce((S,I,M)=>(S.push({icon:I.icon,index:M,label:I.label,tag:I.tag}),S),[])}),jsxRuntime.jsx(l,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:x,transition:P?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:P?1:0},children:jsxRuntime.jsx(l,{className:"--track",style:{...T()},children:h.map((S,I)=>jsxRuntime.jsx(is,{isActive:I===i,transitionType:p,speed:r,width:g.width,render:t||I===i,onHeightChange:M=>I===i&&b(M),content:S.body},`tab-body-${S.key||I}-${v}`))})})]})};cs.displayName="Zuz.TabView";var Zc=cs;var Gc=({ref:o,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:t="zuz ~ ",variant:s,...u})=>{let[m,p]=react.useState([{type:"output",content:r}]),[a,i]=react.useState(""),f=react.useRef(null),c=react.useRef(null),{variant:g}=Q(true);react.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[m]);let v=w=>{let N=typeof w=="string"?{type:"output",content:w}:w;p(T=>{let S=[...T,N];return S.length>1e3?S.slice(-1e3):S});},x=()=>p([]);react.useImperativeHandle(o,()=>({write:v,clear:x}));let b=async w=>{let[N,...T]=w.split(" "),S=N.toLowerCase();return n&&n[S]?await n[S](T):e?await e(w):`command not found: ${N}`},P=w=>{let N=/\u001b\[(\d+)m/g,T=[],S={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,M="#d4d4d4",L=false,V;for(;(V=N.exec(w))!==null;){let Z=w.slice(I,V.index);Z&&T.push({text:Z,color:M,bold:L});let U=V[1];U==="0"?(M="#d4d4d4",L=false):U==="1"?L=true:S[U]&&(M=S[U]),I=N.lastIndex;}let E=w.slice(I);return E&&T.push({text:E,color:M,bold:L}),T},h=(w,N)=>w.includes("\x1B")?P(w).map((T,S)=>jsxRuntime.jsx(Y,{style:{color:T.color||"#d4d4d4",fontWeight:T.bold?"bold":"normal"},children:T.text},`--terminal-msg-${S}-${T.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(Y,{style:{color:N==="error"?"#ff5f56":N==="command"?"#00ff00":"#d4d4d4"},children:w}),d=async w=>{if(w.key==="Enter"&&a.trim()){let N=a.trim(),T=[...m,{type:"command",content:`${t}${N}`}];i(""),p(T);let S=await b(N);p(I=>[...I,{type:"output",content:S}]);}};return jsxRuntime.jsxs(l,{as:`--zuz-terminal --${s||g||W.Medium} flex cols ${u.className}`,onClick:()=>c.current?.focus(),children:[jsxRuntime.jsx(l,{ref:f,className:"--terminal-log",children:m.map((w,N)=>jsxRuntime.jsx(l,{children:jsxRuntime.jsx(D,{children:h(w.content,w.type)})},N))}),jsxRuntime.jsxs(l,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(D,{as:"--terminal-prompt",children:t}),jsxRuntime.jsx(oe,{ref:c,className:"--zuz-term-input",autoFocus:true,value:a,variant:s||g||W.Medium,onChange:w=>i(w.target.value),onKeyDown:d})]})]})},qc=Gc;var Xc=({meta:o})=>jsxRuntime.jsxs(z,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(q,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(D,{children:o.label})]}),Yc=({position:o,onSelect:n,commands:e,visible:r})=>jsxRuntime.jsx(l,{"aria-hidden":!r,fx:{transition:G.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...o},children:e.map(t=>jsxRuntime.jsx(Xc,{meta:t},`cmd-${t.label.replace(/\s+/,"-")}`))}),ds=Yc;var xs=react.forwardRef((o,n)=>{let{autoResize:e,maxHeight:r,variant:t,resize:s="none",command:u,commands:m,onInput:p,cmd:a,renderDropdown:i,value:f,defaultValue:c,...g}=o,v=react.useRef(null),x=react.useRef(null),{variant:b}=Q(true),{style:P,className:h,rest:d}=R(g),{showDropdown:w,dropdownPosition:N,handleKeyDown:T,handleInput:S,handleCommandSelect:I}=hooks.useCommandActions({command:u,commands:m,cmd:a,ref:v}),M=react.useCallback(()=>{let V=v.current;!V||!e||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(r){let Z=parseInt(r.toString(),10);isNaN(Z)||(E=Math.min(E,Z));}V.style.height=`${E}px`,V.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),L=V=>{p?.(V),S(V),M();};return react.useEffect(()=>{M();},[f,c,M]),react.useEffect(()=>{e&&v.current&&M();},[e,M]),react.useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),jsxRuntime.jsxs(l,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${t||b||W.Medium} flex ${h}`.trim(),style:{...P,resize:s,height:e?"auto":P?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:T,onInput:L,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),v.current=V;},value:f,defaultValue:c,...d}),i?i({show:w,position:N,commands:m||[],onSelect:I}):m&&m.length>0&&jsxRuntime.jsx(ds,{visible:w,commands:m,onSelect:I,position:N})]})});xs.displayName="Zuz.TextArea";var tp=xs;var bs=react.forwardRef((o,n)=>{let{as:e,value:r,color:t,direction:s,...u}=o,m=react.useRef(null),[p,a]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(i){p.toString().length!==i.toString().length&&a(i);},setValue(i){if(this.updateValue(i),m.current){let f=i.toString().split("");m.current.querySelectorAll(".--wheel-char").forEach((c,g)=>{let v=f[g];if(c instanceof HTMLElement){c.setAttribute("data-value",v);let x=c.querySelector(".--wheel-char-track");x instanceof HTMLElement&&(x.style.setProperty("--v",v),x.offsetWidth);}});}}})),react.useEffect(()=>{a(r||0);},[r]),jsxRuntime.jsxs(l,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:m,...u,children:[(p||0).toString().split("").map((i,f)=>isNaN(parseInt(i,10))?jsxRuntime.jsx(Y,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${f}`):jsxRuntime.jsx(Y,{"data-value":i,className:`--wheel-char grid ${f>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(Y,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":i},children:[jsxRuntime.jsx(Y,{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((c,g)=>jsxRuntime.jsx(Y,{children:c},`${f}--${g}`)),jsxRuntime.jsx(Y,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),t&&jsxRuntime.jsx(l,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${t}, transparent, transparent, transparent, ${t})`}})]})});bs.displayName="Zuz.TextWheel";var lp=bs;var Cs=react.forwardRef((o,n)=>{let{title:e,position:r,margin:t,children:s,...u}=o,{style:m,className:p,rest:a}=R(u),[i,f]=react.useState(false),c=react.useMemo(()=>r||ee.Top,[]),g=react.useRef(null),v=react.useRef(null),x=d=>{},b=typeof ResizeObserver<"u"?new ResizeObserver(x):{observe:()=>{},unobserve:()=>{}},P=hooks.useDimensions(),h=react.useMemo(()=>{if(!v.current)return {left:0,top:0};let d=v.current.previousElementSibling;if(d){let w=d.getBoundingClientRect();switch(b.observe(d),c){case ee.Top:return {left:w.left+w.width/2,top:w.top-(t||25)};case ee.Bottom:return {left:w.left+w.width/2,top:w.top+(t||25)};case ee.Left:return {left:w.left-w.width/2,top:w.top+w.height/2};case ee.Right:return {left:w.right,top:w.top+w.height/2};default:return {left:0,top:0}}}},[v.current,P,b]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(l,{ref:g,className:"--with-tooltip rel",onMouseEnter:d=>f(true),onMouseLeave:d=>f(false),children:[s,jsxRuntime.jsx(l,{ref:v,style:{left:h?.left+"px",top:h?.top+"px"},className:`--tooltip --${r||ee.Top} fixed ${p}`.trim(),fx:{from:c==ee.Bottom||c==ee.Top?{opacity:0,x:"-50%",y:c==ee.Top?-5:5}:{opacity:0,y:"-50%",x:c==ee.Right?15:-25},to:c==ee.Bottom||c==ee.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:c==ee.Right?10:-20},curve:F.EaseInOut,when:i},children:jsxRuntime.jsx(D,{className:"--text rel",children:e})})]})});Cs.displayName="Zuz.ToolTip";var fp=Cs;var Mo=react.forwardRef((o,n)=>{let{as:e,meta:r,nodes:t,icons:s,onSelect:u,treeTag:m,selected:p,roots:a,expanded:i,...f}=o,{tag:c,label:g,icon:v,under:x,isHead:b}=r,P=react.useMemo(()=>a.includes(c),[a]),[h,d]=react.useState(i),w=()=>{localStorage.setItem(`--tn${m}-${c}`,h?"0":"1"),d(!h);};react.useEffect(()=>{i||P&&!localStorage.getItem(`--tn${m}-${c}`)?(localStorage.setItem(`--tn${m}-${c}`,"1"),d(true)):d(localStorage.getItem(`--tn${m}-${c}`)=="1");},[]);let N=react.useMemo(()=>t.filter(T=>T.under==c),[t,c]);return jsxRuntime.jsxs(l,{className:`--treenode ${P?"--is-root":""} --treenode-${c} flex cols`,children:[jsxRuntime.jsxs(l,{className:`--node --node-${c} flex aic ${p==c?" --selected":""}`,children:[jsxRuntime.jsx(z,{skeleton:f.skeleton,onClick:w,className:"--node-aro-btn",disabled:N.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(q,{skeleton:f.skeleton,className:"--node-aro-icon",name:N.length==0?s?.arrowDisabled||s?.arrowClose:h?s?.arrowOpen:s?.arrowClose}):N.length==0?k.chevronBottom:h?k.chevronBottom:k.chevronRight}),jsxRuntime.jsxs(z,{className:"--node-meta flex aic",onClick:T=>u(c),children:[(s?.nodeOpen&&s?.nodeClose||P&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(q,{skeleton:f.skeleton,className:`--node-icon ${P?"--icon-root":""}`,name:v||(h?P&&s?.rootOpen||s.nodeOpen:P&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(D,{className:`--node-label ${P?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:g})]})]}),h&&N.length>0&&jsxRuntime.jsx(l,{className:`--sub-node tree-sub-node-${c} flex cols`,children:N.map(T=>jsxRuntime.jsx(Mo,{treeTag:m,selected:p,onSelect:u,icons:s,roots:a,expanded:T.expanded||false,meta:T,nodes:t},`--node-${T.tag}`))})]})});Mo.displayName="TreeItem";var Ps=Mo;var Ns=react.forwardRef((o,n)=>{let{as:e,nodes:r,onNodeSelect:t,tag:s,icons:u,roots:m,selected:p,...a}=o,[i,f]=react.useState(p);react.useImperativeHandle(n,()=>({getSelected:()=>i}),[t]);let c=g=>{f(g),t&&t(g);};return react.useEffect(()=>{i!=p&&f(p);},[p]),jsxRuntime.jsx(l,{className:"--treeview flex cols",children:r.filter(g=>m.includes(g.tag)).map(g=>jsxRuntime.jsx(Ps,{treeTag:s?`-${s}`:"",selected:i,onSelect:v=>c(v),icons:u,meta:g,roots:m,expanded:g.expanded||false,skeleton:a.skeleton,nodes:r},`--node-${g.tag}`))})});Ns.displayName="Zuz.TreeView";var Sp=Ns;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
- Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkX4NXRKUY_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkX4NXRKUY_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkX4NXRKUY_cjs.h}});exports.ALERT=ae;exports.AVATAR=Et;exports.Accordion=Qa;exports.ActionBar=ri;exports.Alert=ai;exports.AutoComplete=Ti;exports.Avatar=Oi;exports.Badge=Di;exports.Box=l;exports.Bubble=ml;exports.BubbleMediaType=Qr;exports.BubbleStatus=Yr;exports.Button=z;exports.CHART=Wr;exports.CHECKBOX=be;exports.COLORTHEME=Rp;exports.Calendar=no;exports.Chart=ol;exports.CheckBox=et;exports.CodeBlock=vl;exports.ColorScheme=Dl;exports.ContextMenu=qt;exports.CookiesConsent=$l;exports.Cover=Ee;exports.CropShape=Gl;exports.Cropper=Ul;exports.Crumb=Xl;exports.DATATYPE=Ep;exports.DIALOG=ke;exports.DIALOG_ACTION_POSITION=Ao;exports.DRAWER_SIDE=re;exports.DatePicker=jl;exports.Dialog=zt;exports.Drawer=Gt;exports.FILTER=ut;exports.FORMVALIDATION=ve;exports.FORMVALIDATION_STYLE=Bp;exports.Fab=rm;exports.Filters=am;exports.Form=wm;exports.Group=Em;exports.Icon=q;exports.Image=Qe;exports.Input=oe;exports.KeyboardKeys=bo;exports.KeysLabelMap=Mn;exports.KeysMap=Ln;exports.Label=je;exports.LayersProvider=Vt;exports.List=Le;exports.NetworkStatus=Hm;exports.ORIGIN=Ze;exports.OriginType=Np;exports.Overlay=Ie;exports.POSITION=Bt;exports.PROGRESS=Mp;exports.Pagination=So;exports.PaginationStyle=vo;exports.Password=Wm;exports.PinInput=Ym;exports.Position=ee;exports.ProgressBar=ao;exports.RADIO=Mt;exports.Radio=ec;exports.SHEET=ie;exports.SHEET_ACTION_POSITION=Lt;exports.SKELETON=Pp;exports.SLIDER=pt;exports.SORT=Ip;exports.SPINNER=le;exports.ScrollView=Zt;exports.Search=lc;exports.Select=dc;exports.SelectTabs=tt;exports.Sheet=pm;exports.Slider=po;exports.Span=Y;exports.Spinner=ge;exports.Status=Lp;exports.Switch=hc;exports.TRANSITIONS=G;exports.TRANSITION_CURVES=F;exports.TabView=Zc;exports.Table=Bc;exports.TableOfContents=Oc;exports.Terminal=qc;exports.Text=D;exports.TextWheel=lp;exports.Textarea=tp;exports.ThemeProvider=Ks;exports.ToastDefaultTitle=ur;exports.ToastProvider=_t;exports.ToastType=pr;exports.ToolTip=fp;exports.TreeView=Sp;exports.Variant=W;exports.animationTransition=Ke;exports.buildClassString=Ot;exports.buildWithStyles=zo;exports.css=Jp;exports.getAnimationCurve=kt;exports.getAnimationTransition=jp;exports.getZuzMap=Es;exports.isKeyCombination=Bn;exports.setZuzMap=$o;exports.useBase=R;exports.useContextMenu=Ua;exports.useDialog=ka;exports.useDrawer=$a;exports.useFx=ne;exports.useMorph=Fa;exports.usePosition=Ue;exports.useToast=Yt;
13
+ </div>`}).join("")},[t,d]);return jsxRuntime.jsx(c,{as:`--code-block ${i}`,style:f,...p,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:v}})})})},El=Nl;var mn=({onSelect:o,meta:n,selected:t})=>{let r=react.useRef(null),{index:e,icon:s,label:u}=n,[l,p]=react.useState({x:0,width:0}),a=hooks.useDelayed();return react.useLayoutEffect(()=>{if(a&&r.current){let{width:i,x:f}=r.current.getBoundingClientRect();p({x:f,width:i}),t&&o(e,i,f,n,true);}},[a,r.current]),react.useEffect(()=>{t&&o(e,l.width,l.x,n,false);},[t]),jsxRuntime.jsxs(z,{onClick:()=>o(e,l.width,l.x,n,false),ref:r,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(X,{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 ${e}`})]})};mn.displayName="SelectTabItem";var cn=mn;var un=react.forwardRef((o,n)=>{let{fx:t,items:r,selected:e,variant:s,onSwitch:u,...l}=o,[p,a]=react.useState(e||0),i=react.useRef(false),f=react.useRef(p),{className:m,style:d,rest:v}=R(l),y=react.useRef(null),b=react.useRef(null),P=(h,g,w,N,C)=>{if((C||p!=h&&p!=-2)&&(a(h),f.current=p,i.current&&u?.(N)),y.current){let S=b.current?.getBoundingClientRect();y.current.style.setProperty("--w",`${g}px`),y.current.style.setProperty("--x",`${S?w-S.left:w}px`);}};return react.useImperativeHandle(n,()=>({setSelected:h=>{typeof h=="number"&&h!=p&&a(h);}}),[p]),react.useEffect(()=>{i.current=true;},[]),jsxRuntime.jsxs(c,{ref:b,"data-selected":p,className:`${m} --segmented --${s||U.Small} flex aic rel`,style:d,...v,children:[jsxRuntime.jsx(c,{ref:y,className:"--segment-tab abs"}),r.map((h,g)=>jsxRuntime.jsx(cn,{onSelect:P,selected:p==g,meta:{...h,index:g}},`segment-${h.label}-${g}`))]})});un.displayName="Zuz.SelectTabs";var tt=un;var gn=react.forwardRef((o,n)=>{let{type:t,...r}=o,e=hooks.useDelayed(),{colorScheme:s,setColorScheme:u}=At(),l=react.useCallback(()=>{u(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:p,style:a}=R(r),i=react.useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:D.colorSchemeLight},{tag:"system",index:1,label:"",icon:D.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:D.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:D.colorSchemeLight},{tag:"dark",index:2,label:"",icon:D.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !e||f==-1?null:t=="system"||t=="switch"?jsxRuntime.jsx(tt,{className:`--color-scheme --${t}`,onSwitch:({tag:m})=>{u(m);},selected:f,items:i,...r}):jsxRuntime.jsx(z,{onClick:l,style:a,as:`--color-scheme-switch --${r.variant||U.Small} ${p}`.trim(),children:s=="system"?D.colorSchemeSystem:s=="light"?D.colorSchemeLight:D.colorSchemeDark})});gn.displayName="Zuz.ColorScheme";var Zl=gn;var xn=react.forwardRef((o,n)=>{let[t,r]=react.useState("wait"),{title:e,message:s,acceptLabel:u,rejectLabel:l,position:p}=o,a=async i=>{r(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return react.useEffect(()=>{let i=localStorage.getItem("--ccnt");r(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(c,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:_.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${p||ee.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:e||"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:i=>a(1),as:"--accept",children:u||"Accept All"}),jsxRuntime.jsx(z,{onClick:i=>a(0),as:"--reject",children:l||"Cancel"})]})]})});xn.displayName="Zuz.CookiesConsent";var ql=xn;var vn=react.forwardRef((o,n)=>{let {type:t,value:r,min:e,max:s,step:u,onChange:l,roundValue:p,...a}=o,{className:i,style:f,rest:m}=R(a),d=react.useRef(u||.01).current,v=react.useRef(e||0).current,y=react.useRef(s||1).current,b=react.useRef(r||0).current,P=react.useRef(null),h=react.useRef(null),g=react.useRef(null);react.useRef(null);let N=react.useRef(null),C=react.useRef(null),S=($,W,O)=>($-W)/(O-W)*100,I=$=>{if(h.current){let W=parseFloat($.currentTarget.value),O=S(W,parseFloat($.currentTarget.min),parseFloat($.currentTarget.max));h.current.style.setProperty("--value",`${O}`),h.current.setAttribute("data-value",`${W}`),l&&l(p?+W.toFixed(2):W);}},[M,L]=react.useState(false),[V,E]=react.useState(0),[K,Z]=react.useState(0),k=$=>{L(true),E($.clientX),Z(h.current?parseFloat(h.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},T=$=>{if(M){let W=$.clientX-V,O=Math.max(v,Math.min(K+W*d,y));h.current&&(h.current.setAttribute("data-value",`${O}`),C.current.textContent=p?O.toFixed(2):O.toString(),l&&l(p?+O.toFixed(2):O));}},A=()=>{L(false),document.body.style.cursor="auto";};return react.useEffect(()=>{h.current&&h.current.style.setProperty("--value",P.current?`${S(parseFloat(P.current.value),parseFloat(P.current.min),parseFloat(P.current.max))}`:b.toString());},[]),react.useEffect(()=>(M?(document.addEventListener("mousemove",T),document.addEventListener("mouseup",A)):(document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",A)),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",A);}),[M]),jsxRuntime.jsx(c,{ref:h,"data-value":b||0,className:`--slider --${t||pt.Default} flex rel ${i}`.trim(),style:{...f},children:pt.Text===t?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(H,{ref:C,onMouseDown:k,className:"--slider-text",children:b||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{ref:N,className:"--slider-track abs fill"}),jsxRuntime.jsx(c,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:P,onInput:I,className:"abs fill",tabIndex:0,type:t||pt.Default,defaultValue:b||0,step:d,max:y,min:v})]})})});vn.displayName="Zuz.Slider";var fo=vn;var Sn=react.forwardRef((o,n)=>{let{src:t,shape:r,size:e,...s}=o,{style:u,className:l,rest:p}=R(s),{canvasRef:a,crop:i,setScale:f,handleMouseDown:m,handleMouseUp:d,handleMouseMove:v}=hooks.useImageCropper(t,e||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return i()},setScale(y){f(y);}})),jsxRuntime.jsxs(c,{as:`--cropper --${r||hooks.CropShape.Circle} ${l}`,style:u,...p,children:[jsxRuntime.jsx("canvas",{ref:a,width:e||200,height:e||200,onMouseDown:m,onMouseUp:d,onMouseLeave:d,onMouseMove:v}),jsxRuntime.jsx(c,{as:"--cropper-slider",children:jsxRuntime.jsx(fo,{onChange:y=>f(y),min:0,max:1,step:.01,value:1})})]})});Sn.displayName="Zuz.Cropper";var em=Sn;var om=(t=>(t.Circle="circle",t.Square="square",t))(om||{});var Tn=react.forwardRef((o,n)=>{let{items:t,maxItems:r}=o,e=react.useMemo(()=>{let l=typeof t=="string",p=l?[]:t;return l&&t.split(",").forEach(a=>{p.push({label:a});}),p},[t]),u=react.useMemo(()=>r&&r>0&&e.length>r-1,[e,r])?[...e.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...e.slice(-r)]:e;return jsxRuntime.jsx(Le,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(c,{as:"--crumb-chevron",children:D.chevronRightOutline}),items:u.map((l,p,a)=>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-${p}`))}):jsxRuntime.jsxs(z,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!a[p+1],children:[l.icon&&jsxRuntime.jsx(X,{as:"--crumb-icon",name:l.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});Tn.displayName="Zuz.Crumb";var nm=Tn;var In=react.forwardRef((o,n)=>{let{icon:t,defaultValue:r,value:e,size:s,variant:u,numeric:l,type:p,onConfirm:a,...i}=o,[f,m]=react.useState(false),[d,v]=react.useState(r||null),{style:y,className:b,rest:P}=R(i),h=react.useRef(null),g=react.useRef(null),{reposition:w}=We(g,{direction:ee.Bottom,offset:2}),N=S=>{l&&(S.currentTarget.value=S.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let S=I=>{let M=I.target,L=h.current?.contains(M),V=g.current?.contains(M);!L&&!V&&m(false);};return f&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S);}},[f]),react.useEffect(()=>{let S=I=>{I.key==="Escape"&&f&&(m(false),h.current?.focus());};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[f]);let C=()=>{m(true);};return react.useEffect(()=>{f&&w();},[f,w]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(c,{as:`--date-picker ${u?`--${u}`:""} rel flex aic ${b}`,"data-value":d?d.toISOString():"",children:[t?typeof t=="string"?jsxRuntime.jsx(X,{as:"mr:10 c:#666",name:t}):t:jsxRuntime.jsx(Q,{as:"--date-picker-icon flex aic jcc",children:D.calendar}),jsxRuntime.jsx("input",{ref:h,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):e||"",className:`--input ${u?`--${u}`:""} flex`.trim(),style:y,onFocus:C,onInput:N,autoComplete:"new-password",onKeyDown:S=>{S.key=="Enter"&&a?.(S.currentTarget.value);},...P}),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(ao,{defaultValue:d,onChange:S=>{v(S),m(false);}})})]})})});In.displayName="Zuz.DatePicker";var lm=In;var Nn=react.forwardRef((o,n)=>{let{icon:t,variant:r,position:e}=o;return jsxRuntime.jsx(z,{className:`--fab fixed --${r||U.Large} --${e||"bottomright"}`,children:t||D.plus})});Nn.displayName="Zuz.Fab";var um=Nn;var En=o=>{let{names:n,strength:t}=o,r={[ut.Gooey]:e=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:e||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-${ut.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[ut.Gooey]).map(e=>r[e](t))})})};En.displayName="Zuz.Filters";var gm=En;var Pe=null,ae=null,Ln=react.forwardRef((o,n)=>{let{title:t,message:r,transition:e,curve:s,speed:u,type:l,actionPosition:p,spinner:a,loadingMessage:i,onShow:f,onHide:m,...d}=o,{className:v,style:y,rest:b}=R(d),[P,h]=react.useState(t||""),[g,w]=react.useState(r||""),[N,C]=react.useState(null),[S,I]=react.useState(l||le.Default),M=react.useMemo(()=>core.uuid(12),[]),[L,V]=react.useState(false),E=react.useRef(null),K=react.useRef(null),[Z,k]=react.useState(false),[T,A]=react.useState(true),$=react.useRef(null),W=g;react.useImperativeHandle(n,()=>({setLoading(F){k(F);},showDialog(F,Y,te,j){Pe&&(clearTimeout(Pe),ae&&clearTimeout(ae),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ae=setTimeout(()=>{E.current.classList.remove("--wobble"),ae=null;},500)),I(le.Dialog),Y&&w(Y),F&&h(F),te&&C(te.reduce((ce,de)=>(ce.push({...de,key:de.key||core.uuid(12)}),ce),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(F,Y,te,j){Pe&&(clearTimeout(Pe),ae&&clearTimeout(ae),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ae=setTimeout(()=>{E.current.classList.remove("--wobble"),ae=null;},500)),I(le.Dialog),w(Y),h(F),te&&C(te.reduce((ce,de)=>(ce.push({...de,key:de.key||core.uuid(12)}),ce),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},error(F,Y){this.show(F,Y,le.Error);},warn(F,Y){this.show(F,Y,le.Warn);},success(F,Y){this.show(F,Y,le.Success);},show(F,Y,te){Pe&&(clearTimeout(Pe),ae&&clearTimeout(ae),K.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${K.current} scale(.9)`.trim();},50),ae=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=K.current||"",ae=null;},500)),Pe=setTimeout(()=>{V(false),Pe=null,ae=null;},(Y||4)*1e3),I(te||le.Default),w(F),V(true),f?.();},hide(){V(false),m?.();}}));let O=react.useMemo(()=>{let F={when:L,duration:u||.3,delay:.1};if(S==le.Dialog){if(e){let{from:Y,to:te}=Ze(e,20);return {from:Y,to:te,curve:s||_.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:_.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:_.Spring,...F}},[L,S]);return react.useEffect(()=>{$.current&&clearTimeout($.current),L?A(true):$.current=setTimeout(()=>A(false),1e3);},[L]),S==le.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ne,{when:L}),jsxRuntime.jsxs(c,{className:`--sheet --sheet-${S.toLowerCase()} ${L?"is-visible":""} ${v} fixed`.trim(),style:y,fx:O,...b,ref:E,children:[jsxRuntime.jsx(Ee,{when:Z,spinner:a,message:i}),jsxRuntime.jsxs(c,{className:"--head flex aic rel",children:[jsxRuntime.jsx(c,{className:`--${P?"title":"dot"} flex aic rel`,children:P||""}),jsxRuntime.jsx(z,{onClick:F=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(c,{className:`--body flex aic rel ${N?"":"--no-action"}`.trim(),children:T?W:null}),N&&jsxRuntime.jsx(c,{className:`--footer flex aic rel ${p?p==Lt.Center?"jcc":"":"jce"}`.trim(),children:N.map((F,Y)=>jsxRuntime.jsx(z,{onClick:te=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${M}-action-${F.key}`))})]})]}):jsxRuntime.jsx(c,{className:`--sheet --sheet-${S.toLowerCase()} ${v} abs`.trim(),style:y,...b,fx:O,ref:E,children:L?g:null})}),rt=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;Ln.displayName="Zuz.Sheet";var vm=Ln;var Mn=({ref:o,...n})=>{let{name:t,cover:r,spinner:e,errors:s,action:u,children:l,withData:p,beforeSubmit:a,onSubmit:i,onError:f,onSuccess:m,resetOnSuccess:d,...v}=n,{className:y,style:b,rest:P}=R(v),[h,g]=react.useState(false),w=react.useRef(null),N=react.useRef(null),C=react.useRef(null),S=Jt(),I=react.useCallback(T=>w.current?w.current.querySelectorAll(T):[],[w.current]),M=T=>({name:T.name||T.getAttribute("name")||T.getAttribute("data-name"),required:T.required?true:T.getAttribute("data-required")?T.getAttribute("data-required")=="true":false,with:T.with||T.getAttribute("with")}),L=T=>{let A=[];return T.querySelectorAll(".--input").forEach($=>{A.push($.value);}),A.join("")},V=react.useCallback(T=>{let{required:$}=M(T);if($){if(T.type=="checkbox"&&T.checked==false)return false;if(T.classList.contains("--otp")){let O=L(T);if(O==""||O.length<parseInt(T.getAttribute("data-size")))return false}if(T.classList.contains("--select")&&T.querySelector("button.--selected").dataset.value=="-1"||T.value=="")return false}if(T.getAttribute("with")){let O=T.getAttribute("with");switch(O.includes("@")&&(O=O.split("@")[0],O=="match"&&(O=ve.MatchField)),O.toUpperCase()){case ve.IPV4:return core._(T.value).isIPv4();case ve.IPV6:return core._(T.value).isIPv6();case ve.Email:return core._(T.value).isEmail();case ve.Uri:try{return new URL(T.value),!0}catch{return false}case ve.Password:return console.log("Add FORMVALIDATION.Password"),false;case ve.MatchField:let[F,Y,te]=T.getAttribute("with").split("@"),j=document.querySelector(`[name=${Y.trim()}]`);if(!j)return false;switch(te||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=T.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&T.classList.contains("--otp")&&L(j)!=L(T))return false;if(j&&j.value!=T.value)return false;break}break;default:return true}}return true},[w.current]),E=react.useCallback(()=>{let T={},A={},$=null,W=null;if(Array.from(I("[name]")).forEach(O=>{let{name:F,required:Y,with:te}=M(O),j=true;(Y||te)&&(j=V(O)),T[F]={valid:j,value:O.type=="checkbox"?O.checked==true?O.value:false:O.classList.contains("--otp")?L(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value},A[F]=O.type=="checkbox"?O.checked==true:O.classList.contains("--otp")?L(O):O.classList.contains("--select")?O.querySelector("button.--selected").dataset.value:O.value,j?O.classList.remove("input-with-error"):($==null&&s&&($=O,W=s[F]),O.classList.add("input-with-error"));}),$){let O=$;if(O.classList.contains("--otp"))for(let F of Array.from(O.querySelectorAll(".--input"))){let Y=F;if(Y.value==""){Y.focus();break}}else O.focus();}return {error:$!=null,errorMsg:W||"Fix errors to continue...",data:T,payload:A}},[w.current]),K=react.useCallback(()=>{let{error:T,errorMsg:A,payload:$}=E();T?S.error(A):u?react.startTransition(async()=>{a&&a($),rt(r)?r.setLoading(true):g(true),S.clearAll(),core.withPost(u,{...$,...p||{}}).then(W=>{let O=W;rt(r)?r.setLoading(false):g(false),d&&Array.from(I("[name]")).forEach(F=>{F instanceof HTMLInputElement&&(F.value="");}),m?m(O):(S.clearAll(),S.success(O.message||"Redirecting..."));}).catch(W=>{rt(r)?r.setLoading(false):g(false),f?f(W):S.error(W.message||"We cannot process your request at this time.");});}):i&&i($);},[u,N.current,w.current]),Z=react.useCallback(()=>{let T=I("[type=submit]");!T||T.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):T.forEach(A=>{A.addEventListener("click",K);});},[w.current]),k=react.useMemo(()=>react$1.addPropsToChildren(l,T=>T.props.type=="submit",T=>({ref:C})),[l]);return react.useImperativeHandle(o,()=>({setLoading(T){if(T){N.current?.hide();try{S.clearAll();}catch{}}g(T);},showError(T){typeof T=="string"?S.error(T):N.current.error(T,4);},hideError(){N.current.hide();try{S.clearAll();}catch{}},init(){Z();},submit(){K();}})),react.useEffect(Z,[]),jsxRuntime.jsxs(c,{ref:w,style:b,className:`--form flex rel ${y} ${t?`--form-${t.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!rt(r)&&jsxRuntime.jsx(Ee,{message:r?r.message||void 0:"working",spinner:e,color:r&&"color"in r?r.color:"#ffffff",when:h}),k]})};Mn.displayName="Zuz.Form";var Em=Mn;var On=o=>typeof o=="string"&&o.includes("+"),kn={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"},Dn={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 Vn=react.forwardRef(({children:o,keys:n,variant:t},r)=>{let e=react.useMemo(()=>{if(On(n)){let s=null;return {keys:String(n).split("+").reduce((l,p,a,i)=>(i[a+1]?l.push(p):s=p.toUpperCase(),l),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(c,{as:`--keyboard-keys --${t||U.Small} flex aic`,children:[(Array.isArray(e.keys)?e.keys:[e.keys]).map(s=>jsxRuntime.jsx("abbr",{title:Dn[s],children:kn[s]},s)),jsxRuntime.jsx(Q,{children:e?.children??o})]})});Vn.displayName="Zuz.KeyboardKeys";var wo=Vn;var $n=react.forwardRef((o,n)=>{let t=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:e,variant:s}=o;return jsxRuntime.jsxs(c,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:_.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||U.Small} fixed flex`,children:[jsxRuntime.jsx(c,{className:"--ico",children:t?D[ie.Success]:D[ie.Error]}),jsxRuntime.jsx(H,{as:"--message",children:t?r||"internet connection restored :)":e||"no internet connection"})]})});$n.displayName="Zuz.NetWorkManager";var Vm=$n;var So=(t=>(t.Table="table",t.Gooey="gooey",t))(So||{});var Fn=react.forwardRef((o,n)=>{let{itemCount:t,itemsPerPage:r,startPage:e,pageRange:s,paginationStyle:u,breakLabel:l,prevLabel:p,nextLabel:a,hash:i,loading:f,seperator:m,renderOnZeroPageCount:d,onPageChange:v,...y}=o,b=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),P=react.useCallback(E=>`${core.toHash(E,i||6,b)}${m||""}${b}`,[b]),h=react.useMemo(()=>l||"...",[l]),[g,w]=react.useState({id:i?e?typeof e=="number"?P(e):e:1:e||1,label:e||1}),{style:N,className:C,rest:S}=R(y),I=react.useCallback(E=>typeof E=="number"?E:+E.label,[]);if(!t)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(t/r),[t,r]),L=react.useMemo(()=>{let E=[],K=Math.max(I(g)-(s||2),1),Z=Math.min(I(g)+(s||2),M);K>1&&E.push({id:i?P(1):1,label:1}),K>2&&E.push({id:-1,label:h});for(let k=K;k<=Z;k++)E.push({id:i?P(k):k,label:k});return Z<M-1&&E.push({id:-1,label:h}),Z<M&&E.push({id:i?P(M):M,label:M}),E},[g]),V=react.useCallback(E=>{let K=E;+K.label<1||+K.label>M||(w(K),v?.(K));},[t,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 ${C}`,children:[jsxRuntime.jsx(c,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:h}]).map((E,K,Z)=>jsxRuntime.jsx(z,{disabled:E.id==-1||I(g)==+E.label,className:(typeof E=="string"?E:E.label)==I(g)?"--current-page":"",onClick:k=>V(E),children:typeof E=="string"?E:E.label},`--pg-${K}-${E.id}`))}),jsxRuntime.jsx(c,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(g)-1)*r+1} - `,`${Math.min(I(g)*r,t)} of ${t} items`].join(" ")}),jsxRuntime.jsxs(c,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(z,{disabled:I(g)<=1,onClick:E=>V({id:i?P(I(g)-1):I(g)-1,label:I(g)-1}),children:D.chevronLeftOutline}),jsxRuntime.jsx(z,{disabled:L.length<=1||I(g)==I(L[L.length-1]),onClick:E=>V({id:i?P(I(g)+1):I(g)+1,label:I(g)+1}),children:D.chevronRightOutline})]})]})});Fn.displayName="Zuz.Pagination";var To=Fn;var Zn=react.forwardRef((o,n)=>{let{strenthMeter:t,onChange:r,...e}=o;"type"in e&&delete e.type;let{style:s,className:u,rest:l}=R(e),[p,a]=react.useState(false),[i,f]=react.useState(""),m=react.useMemo(()=>core.checkPasswordStrength(i),[i]),d=hooks.useDebounce(v=>{t&&f(v.target.value),r&&r(v);},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:p?"text":"password",className:u,onChange:d,...l}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:()=>a(v=>!v),className:"--toggle flex aic jcc abs",children:p?D.eye:D.eyeSlash})]}),t&&jsxRuntime.jsxs(c,{as:`flex aic --password-meter --pb-score-${m.score}`,style:s,children:[jsxRuntime.jsxs(c,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(c,{as:`--pbar ${m.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${m.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${m.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${m.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${m.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:m.result})]})]})});Zn.displayName="Zuz.Password";var Gm=Zn;var Un=react.forwardRef((o,n)=>{let{size:t,length:r,mask:e,...s}=o,u=react.useRef([]),l="pinput",p=false,a={};"with"in s&&(a={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:i}=R(s),f=m=>{let d=m.currentTarget,v=u.current[parseInt(d.dataset.index)+1],y=u.current[parseInt(d.dataset.index)-1];d.value.length===1&&v?v.focus():d.value.length===0&&y&&y.focus();};return react.useEffect(()=>{u.current=u.current.slice(0,t||r);},[t||r]),jsxRuntime.jsx(c,{name:l,style:i,className:"--otp flex aic rel","data-required":p,"data-size":t||r||4,...a,children:Array(t||r||4).fill(1).map((m,d)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":d,ref:v=>{u.current[d]=v;},numeric:true,onChange:f,maxLength:1,placeholder:e?"\xB7":"0",type:e?"password":"text",...s},`pin-${d}`))})});Un.displayName="Zuz.PinInput";var Qm=Un;var Gn=react.forwardRef((o,n)=>{let{children:t,className:r,name:e,required:s,type:u,value:l,variant:p,checked:a,onSwitch:i,...f}=o,[m,d]=react.useState(a||false),{variant:v}=q(true),y=react.useRef(null);return jsxRuntime.jsxs(je,{className:`${r} --${(u||Mt.Default).toLowerCase()} --radio${!u||u==Mt.Default?"":"card"} --${p||v||U.Small} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(oe,{ref:y,defaultChecked:m,value:l||"rd",type:"radio",className:"abs",name:e,required:s||false,onChange:b=>{i&&i(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:t})]})});Gn.displayName="Zuz.Radio";var tc=Gn;var qn=react.forwardRef((o,n)=>{let{fx:t,withStyle:r,as:e,reverse:s=false,searchIcon:u=D.search,hideSearchIcon:l=false,clearIcon:p=D.close,hideClearIcon:a=false,onChange:i,onClear:f,...m}=o,{style:d,className:v}=R({as:o.as}),[y,b]=react.useState(""),{variant:P}=q(true),h=react.useRef(null),g=react.useMemo(()=>jsxRuntime.jsx(z,{tabIndex:-1,onClick:C=>N(),className:"--send flex aic jcc",variant:o.variant||U.Small,children:y!==""?!a&&(typeof p=="string"?jsxRuntime.jsx(X,{name:p,as:"--search-action"}):p):!l&&(typeof u=="string"?jsxRuntime.jsx(X,{name:u,as:"--search-action"}):u)}),[s,u,a,p,l]);"type"in o&&delete o.type;let w=C=>{b(C.target.value),i?.(C.target.value);},N=C=>{y.trim()!==""&&(b(""),i?.(""),h.current&&(h.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>h.current?.focus(),value:()=>h.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{style:d,className:`--search ${s?"--search-rev":""} --${o.variant||P||U.Medium} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${v}`.trim(),children:[s&&g,jsxRuntime.jsx(oe,{ref:h,onChange:w,...m}),o.shortcut&&jsxRuntime.jsx(wo,{keys:o.shortcut,as:"abs"}),!s&&g]})});qn.displayName="Zuz.Search";var mc=qn;var Yn=({value:o,updateValue:n,o:t})=>jsxRuntime.jsxs(z,{onClick:r=>n(t),as:"--select-option-item",className:o&&(typeof t=="string"?t:t.value)==(typeof o=="string"?o:o.value)?"selected":"",children:[t.icon&&jsxRuntime.jsx(X,{name:t.icon,as:`--select-option-icon --icon-${t.value}`,color:t.iconColor||void 0}),jsxRuntime.jsx(H,{suppressHydrationWarning:true,children:typeof t=="string"?t:t.label})]});Yn.displayName="Option";var Qn=Yn;var jn=({ref:o,...n})=>{let{selected:t,options:r,label:e,name:s,variant:u,search:l,searchPlaceholder:p,maxHeight:a,arrowDownIcon:i=D.arrowDown,arrowUpIcon:f=D.arrowUp,onChange:m,...d}=n,[v,y]=react.useState(t?typeof t=="string"?r.find(k=>k.value===t):t:r[0]),[b,P]=react.useState(false),[h,g]=react.useState(null),w=react.useRef(null),N=react.useRef(null),C=react.useRef(null),S=react.useId(),I=react.useMemo(()=>s||S,[]),{reposition:M}=We(C,{direction:Bt.Bottom,offset:2}),{variant:L}=q(true),{className:V,style:E,rest:K}=R(d),Z=k=>{y(k),P(false),m&&m(k);};return react.useImperativeHandle(o,()=>({setSelected:k=>{if(typeof k=="string"){let T=r.find(A=>A.value===k);T&&y(T);}else y(k);},getValue:()=>v||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){N.current&&(N.current.value=""),g(null);return}N.current?.focus(),M();let k=A=>{C.current&&!C.current.contains(A.target)&&P(false);},T=setTimeout(()=>{document.addEventListener("click",k);},0);return ()=>{clearTimeout(T),document.removeEventListener("click",k);}},[b,M]),jsxRuntime.jsxs(c,{className:`--select --${u||L} ${s?`--${s}`:""} rel`.trim(),name:I,children:[jsxRuntime.jsxs(z,{ref:w,"data-value":v?typeof v=="string"?v:v.value:v||"-1",className:`--selected flex aic rel ${V}`.trim(),withLabel:false,style:E,onClick:k=>{k.stopPropagation(),P(T=>!T);},...K,children:[jsxRuntime.jsx(H,{className:"--label",children:v?typeof v=="string"?v:v.label:e||"Choose"}),jsxRuntime.jsx(c,{className:"--svg-arrow rel flex aic jcc",children:b?typeof f=="string"?jsxRuntime.jsx(X,{name:f,as:"--search-action"}):f:typeof i=="string"?jsxRuntime.jsx(X,{name:i,as:"--search-action"}):i})]}),jsxRuntime.jsxs(c,{id:I,className:"--options-list flex cols abs","aria-hidden":!b,style:{maxHeight:a||"auto"},ref:C,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:N,onChange:k=>{g(k.target.value==""?null:k.target.value);},className:"--search-input",placeholder:p||"Search..."})}),(h==null?r:r.filter(k=>k.label.toLowerCase().includes(h.toLowerCase())||k.value.toLowerCase().includes(h.toLowerCase()))).map(k=>jsxRuntime.jsx(Qn,{updateValue:Z,value:v,o:k},`option-${(typeof k=="string"?k:k.label).replace(/\s+/g,"-")}-${typeof k=="string"?k:k.value}`))]})]})};jn.displayName="Zuz.Select";var gc=jn;var es=react.forwardRef((o,n)=>jsxRuntime.jsx(et,{type:be.Switch,...o,ref:n}));es.displayName="Zuz.Switch";var xc=es;var os=o=>{let{idx:n,id:t,as:r,weight:e,style:s,value:u,render:l,resize:p,sortBy:a,sortable:i,onSort:f}=o,[m,d]=react.useState(0),v=()=>{i&&(f?.(String(t),m==1?-1:1),d(y=>y==1?-1:1));};return jsxRuntime.jsxs(c,{style:{flex:e||1,...s},as:`--col flex aic ${r||""} ${i?"--sortable":""}`,onClick:v,children:[jsxRuntime.jsx(c,{children:u}),n==-1&&i&&a==t&&jsxRuntime.jsx(c,{as:"--arrow flex aib",children:m==1?D.arrowUp:D.arrowDown})]})};os.displayName="Zuz.Column";var Pt=os;var ns=o=>{let{index:n,pubsub:t,schema:r,data:e,ids:s,styles:u,animate:l,sortBy:p,selectable:a,tableRef:i,loading:f,rowClassName:m,onSort:d,onRowClick:v,onSelect:y,onContextMenu:b}=o,P=hooks.useDelayed(),h=react.useMemo(()=>({transition:G.SlideInBottom,curve:_.EaseInOut,delay:.02*(n+1)}),[]),g=react.useRef(null),w=(C,S)=>{n==-1?t.emit(`ALL_ROWS_${C?"CHECKED":"UNCHECKED"}`,C):(y&&y(e,C),t.emit(`ROW_${C?"CHECKED":"UNCHECKED"}`,C,S));},N=(C,S,I)=>jsxRuntime.jsx(Pt,{idx:C,id:S,as:"--selector",pubsub:t,value:jsxRuntime.jsx(et,{value:I,ref:g,onSwitch:w,type:be.Default})});return react.useEffect(()=>{let C=(L,V)=>{g.current?.setChecked(L,false);},S=(L,V)=>{let E=false;i?.current&&i.current.querySelectorAll(".--row").forEach(K=>{let Z=K;if(!Z.classList.contains("--row-head")){let k=Z.querySelector(".--selector input[type=checkbox]");k&&k.checked&&!E&&(E=k.checked);}}),g.current.setChecked(E,false);},I=L=>{g.current?.setChecked(L,false),y&&y(e,L);},M=L=>{g.current?.setChecked(L,false),y&&y(e,L);};return n==-1?(t.on("ROW_CHECKED",C),t.on("ROW_UNCHECKED",S),()=>{t.off("ROW_CHECKED",C),t.off("ROW_UNCHECKED",S);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",M),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",M);})},[]),jsxRuntime.jsxs(c,{onContextMenu:C=>b?b(C,e):null,onClick:C=>v?v(C,o.data):()=>{},...l?{fx:{...h,when:P}}:{},as:`--row flex aic ${v?"--row-clickable":""} ${n==-1?"--row-head":""} ${m||""}`,children:[n==-1&&r.map((C,S)=>{let{renderWhenHeader:I,render:M,value:L,...V}=C;return jsxRuntime.jsxs(react.Fragment,{children:[a&&S==0&&N(-1,`--selector-${C.id}`,"all"),jsxRuntime.jsx(Pt,{idx:-1,onSort:d,sortBy:p,value:L,...V,pubsub:t,style:u[C.id]})]},`--col-${C.id}`)}),f&&n>-1&&jsxRuntime.jsx(c,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&e&&r.map((C,S)=>jsxRuntime.jsxs(react.Fragment,{children:[a&&S==0&&N(S,`--selector-${C.id}`,C.id.toString()),s.includes(String(C.id))?jsxRuntime.jsx(Pt,{pubsub:t,idx:S,id:String(C.id),style:u[String(C.id)],value:C.render?C.render(e,n):e[String(C.id).includes(".")?String(C.id).split(".").reverse()[0]:C.id]}):null]},`--${String(C.id)}-val-${S}`))]})};ns.displayName="Zuz.Row";var Rt=ns;var ls=(o,n)=>{let{schema:t,rows:r,rowCount:e,rowsPerPage:s,currentPage:u,pagination:l,paginationHash:p,showPaginationOnZeroPageCount:a,animateRows:i,header:f,rowClassName:m,selectableRows:d,hoverable:v,sortBy:y,loading:b,loadingRowCount:P,loadingMessage:h,spinner:g,emptyMessage:w,onSort:N,onRowClick:C,onRowSelectToggle:S,onPageChange:I,onRowContextMenu:M,...L}=o,V=react.useRef(null),E=react.useMemo(()=>t.reduce((pe,J)=>(pe[J.id]={flex:J.weight||1,...J.w&&{width:J.w},...J.maxW&&{maxWidth:J.maxW},...J.minW&&{minWidth:J.minW},...J.h&&{height:J.h},...J.maxH&&{maxHeight:J.maxH},...J.minH&&{minHeight:J.minH}},pe),{}),[t]),K=react.useMemo(()=>Object.keys(E),[t]),Z=react.useMemo(()=>f??true,[f]),{style:k,className:T,rest:A}=R(L),$=react.useRef(null),W=react.useMemo(()=>new core.PubSub,[]),O=react.useRef(r.map(()=>core.uuid(8))),[F,Y]=react.useState(y||null),[te,j]=react.useState(h||"loading"),ce=react.useMemo(()=>!b&&r&&r.length==0,[b,r]),de=react.useCallback(()=>w?typeof w=="function"?jsxRuntime.jsx(w,{}):w:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[b,r]);react.useEffect(()=>{O.current=r.map(()=>core.uuid(8));},[r]);let it=(pe,J)=>{Y(pe),N?.(pe,J);},lt=(e||(r?r.length:0))/(s||10),mt=react.useMemo(()=>a||lt>1?jsxRuntime.jsx(To,{hash:p,ref:V,renderOnZeroPageCount:a,onPageChange:I,paginationStyle:"table",startPage:u,itemCount:e||(r?r.length:0),itemsPerPage:s||10}):null,[u,e]);return react.useImperativeHandle(n,()=>({setLoading(pe){}})),jsxRuntime.jsxs(c,{as:`--table ${v??true?"--hoverable":""} flex cols rel ${T}`,ref:$,children:[Z==true&&jsxRuntime.jsx(Rt,{sortBy:F,onSort:it,tableRef:$,pubsub:W,selectable:d,index:-1,schema:t,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(P||5).fill({}).map((pe,J)=>jsxRuntime.jsx(Rt,{tableRef:$,index:J,pubsub:W,schema:t,styles:E,loading:true,animate:i,onRowClick:C},`--trow-loading-${J}-${t[0].id}`)),!b&&r&&r.map((pe,J)=>jsxRuntime.jsx(Rt,{tableRef:$,pubsub:W,loading:false,index:J,schema:t,ids:K,styles:E,animate:i,data:pe,onRowClick:C,rowClassName:m,selectable:d,onSelect:S,onContextMenu:M},`--trow-${O.current[J]||J}-${t[0].id}`)),ce&&de(),jsxRuntime.jsx(c,{"aria-hidden":!l||!mt,...i?{fx:{transition:G.SlideInBottom,curve:_.EaseInOut,delay:.02*(r.length+1),when:!b&&r&&l&&mt!=null}}:{},as:"--row flex aic --row-footer",children:l&&mt?mt:null})]})};ls.displayName="Zuz.Table";var Bc=react.forwardRef(ls),Lc=Bc;var Oc=({ref:o,...n})=>{let{title:t,items:r}=n,[e,s]=react.useState(0),u=(l,p,a)=>{l.preventDefault(),s(p),document.getElementById(a)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(c,{ref:o,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:t}),jsxRuntime.jsx(Le,{items:r.map((l,p)=>jsxRuntime.jsx("a",{className:e==p?"--toc-active":"",style:{anchorName:e===p?"--toc-active":"none",color:e==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:a=>u(a,p,l.tag),href:`#${l.tag}`,children:l.label}))})]})},kc=Oc;var ms=({isActive:o,transitionType:n,speed:t,width:r,render:e,content:s,onHeightChange:u})=>{let l=react.useRef(null),p=hooks.useResizeObserver(l);react.useEffect(()=>{o&&p.height>0&&u(p.height);},[o,p.height]);let a=react.useMemo(()=>{let i={flexShrink:0,height:"fit-content"};return n==="fade"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:o?1:0}:n==="scale"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:i},[o,n,r,t]);return jsxRuntime.jsx(c,{ref:l,style:{...a},className:"--content",children:e||o?s:null})};ms.displayName="Zuz.TabBody";var cs=ms;var fs=({ref:o,...n})=>{let{tabs:t,speed:r=.3,prerender:e=true,variant:s,tabStyle:u="fixed",onChange:l,transitionType:p="slide",...a}=n,[i,f]=react.useState(0),m=react.useRef(null),d=hooks.useResizeObserver(m),v=react.useMemo(()=>core.uuid(8),[]),[y,b]=react.useState("auto"),P=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(o,()=>({setTab:S=>f(S)}));let h=react.useMemo(()=>t.map(S=>({...S,key:S.key||core.uuid(8)})),[t]),{style:g,className:w,rest:N}=R({as:`flex cols w-full no-overflow ${a.as||""}`,...a}),C=()=>{if(!P)return {opacity:0};switch(p){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${i*d.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(c,{ref:m,style:g,className:`--tabview --${u} flex cols ${w}`,children:[jsxRuntime.jsx(tt,{as:"--tabview-head",onSwitch:S=>{f(S.index);let I=h.find(M=>M.tag==S.tag);I&&I.onSelect&&(I.onSelect(I,S.index),l?.(I,S.index));},selected:i,items:h.reduce((S,I,M)=>(S.push({icon:I.icon,index:M,label:I.label,tag:I.tag}),S),[])}),jsxRuntime.jsx(c,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:y,transition:P?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:P?1:0},children:jsxRuntime.jsx(c,{className:"--track",style:{...C()},children:h.map((S,I)=>jsxRuntime.jsx(cs,{isActive:I===i,transitionType:p,speed:r,width:d.width,render:e||I===i,onHeightChange:M=>I===i&&b(M),content:S.body},`tab-body-${S.key||I}-${v}`))})})]})};fs.displayName="Zuz.TabView";var Zc=fs;var qc=({ref:o,commands:n,onCommand:t,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:e="zuz ~ ",variant:s,...u})=>{let[l,p]=react.useState([{type:"output",content:r}]),[a,i]=react.useState(""),f=react.useRef(null),m=react.useRef(null),{variant:d}=q(true);react.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[l]);let v=w=>{let N=typeof w=="string"?{type:"output",content:w}:w;p(C=>{let S=[...C,N];return S.length>1e3?S.slice(-1e3):S});},y=()=>p([]);react.useImperativeHandle(o,()=>({write:v,clear:y}));let b=async w=>{let[N,...C]=w.split(" "),S=N.toLowerCase();return n&&n[S]?await n[S](C):t?await t(w):`command not found: ${N}`},P=w=>{let N=/\u001b\[(\d+)m/g,C=[],S={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,M="#d4d4d4",L=false,V;for(;(V=N.exec(w))!==null;){let K=w.slice(I,V.index);K&&C.push({text:K,color:M,bold:L});let Z=V[1];Z==="0"?(M="#d4d4d4",L=false):Z==="1"?L=true:S[Z]&&(M=S[Z]),I=N.lastIndex;}let E=w.slice(I);return E&&C.push({text:E,color:M,bold:L}),C},h=(w,N)=>w.includes("\x1B")?P(w).map((C,S)=>jsxRuntime.jsx(Q,{style:{color:C.color||"#d4d4d4",fontWeight:C.bold?"bold":"normal"},children:C.text},`--terminal-msg-${S}-${C.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(Q,{style:{color:N==="error"?"#ff5f56":N==="command"?"#00ff00":"#d4d4d4"},children:w}),g=async w=>{if(w.key==="Enter"&&a.trim()){let N=a.trim(),C=[...l,{type:"command",content:`${e}${N}`}];i(""),p(C);let S=await b(N);p(I=>[...I,{type:"output",content:S}]);}};return jsxRuntime.jsxs(c,{as:`--zuz-terminal --${s||d||U.Medium} flex cols ${u.className}`,onClick:()=>m.current?.focus(),children:[jsxRuntime.jsx(c,{ref:f,className:"--terminal-log",children:l.map((w,N)=>jsxRuntime.jsx(c,{children:jsxRuntime.jsx(H,{children:h(w.content,w.type)})},N))}),jsxRuntime.jsxs(c,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:e}),jsxRuntime.jsx(oe,{ref:m,className:"--zuz-term-input",autoFocus:true,value:a,variant:s||d||U.Medium,onChange:w=>i(w.target.value),onKeyDown:g})]})]})},Xc=qc;var Yc=({meta:o})=>jsxRuntime.jsxs(z,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(X,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:o.label})]}),Qc=({position:o,onSelect:n,commands:t,visible:r})=>jsxRuntime.jsx(c,{"aria-hidden":!r,fx:{transition:G.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...o},children:t.map(e=>jsxRuntime.jsx(Yc,{meta:e},`cmd-${e.label.replace(/\s+/,"-")}`))}),xs=Qc;var vs=react.forwardRef((o,n)=>{let{autoResize:t,maxHeight:r,variant:e,resize:s="none",command:u,commands:l,onInput:p,cmd:a,renderDropdown:i,value:f,defaultValue:m,...d}=o,v=react.useRef(null),y=react.useRef(null),{variant:b}=q(true),{style:P,className:h,rest:g}=R(d),{showDropdown:w,dropdownPosition:N,handleKeyDown:C,handleInput:S,handleCommandSelect:I}=hooks.useCommandActions({command:u,commands:l,cmd:a,ref:v}),M=react.useCallback(()=>{let V=v.current;!V||!t||(y.current&&cancelAnimationFrame(y.current),y.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(r){let K=parseInt(r.toString(),10);isNaN(K)||(E=Math.min(E,K));}V.style.height=`${E}px`,V.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[t,r]),L=V=>{p?.(V),S(V),M();};return react.useEffect(()=>{M();},[f,m,M]),react.useEffect(()=>{t&&v.current&&M();},[t,M]),react.useEffect(()=>()=>{y.current&&cancelAnimationFrame(y.current);},[]),jsxRuntime.jsxs(c,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${e||b||U.Medium} flex ${h}`.trim(),style:{...P,resize:s,height:t?"auto":P?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:C,onInput:L,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),v.current=V;},value:f,defaultValue:m,...g}),i?i({show:w,position:N,commands:l||[],onSelect:I}):l&&l.length>0&&jsxRuntime.jsx(xs,{visible:w,commands:l,onSelect:I,position:N})]})});vs.displayName="Zuz.TextArea";var op=vs;var Ss=react.forwardRef((o,n)=>{let{as:t,value:r,color:e,direction:s,...u}=o,l=react.useRef(null),[p,a]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(i){p.toString().length!==i.toString().length&&a(i);},setValue(i){if(this.updateValue(i),l.current){let f=i.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((m,d)=>{let v=f[d];if(m instanceof HTMLElement){m.setAttribute("data-value",v);let y=m.querySelector(".--wheel-char-track");y instanceof HTMLElement&&(y.style.setProperty("--v",v),y.offsetWidth);}});}}})),react.useEffect(()=>{a(r||0);},[r]),jsxRuntime.jsxs(c,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:l,...u,children:[(p||0).toString().split("").map((i,f)=>isNaN(parseInt(i,10))?jsxRuntime.jsx(Q,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${f}`):jsxRuntime.jsx(Q,{"data-value":i,className:`--wheel-char grid ${f>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(Q,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":i},children:[jsxRuntime.jsx(Q,{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((m,d)=>jsxRuntime.jsx(Q,{children:m},`${f}--${d}`)),jsxRuntime.jsx(Q,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),e&&jsxRuntime.jsx(c,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${e}, transparent, transparent, transparent, ${e})`}})]})});Ss.displayName="Zuz.TextWheel";var mp=Ss;var Rs=react.forwardRef((o,n)=>{let{title:t,position:r,margin:e,children:s,...u}=o,{style:l,className:p,rest:a}=R(u),[i,f]=react.useState(false),m=react.useMemo(()=>r||ee.Top,[]),d=react.useRef(null),v=react.useRef(null),y=g=>{},b=typeof ResizeObserver<"u"?new ResizeObserver(y):{observe:()=>{},unobserve:()=>{}},P=hooks.useDimensions(),h=react.useMemo(()=>{if(!v.current)return {left:0,top:0};let g=v.current.previousElementSibling;if(g){let w=g.getBoundingClientRect();switch(b.observe(g),m){case ee.Top:return {left:w.left+w.width/2,top:w.top-(e||25)};case ee.Bottom:return {left:w.left+w.width/2,top:w.top+(e||25)};case ee.Left:return {left:w.left-w.width/2,top:w.top+w.height/2};case ee.Right:return {left:w.right,top:w.top+w.height/2};default:return {left:0,top:0}}}},[v.current,P,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:v,style:{left:h?.left+"px",top:h?.top+"px"},className:`--tooltip --${r||ee.Top} fixed ${p}`.trim(),fx:{from:m==ee.Bottom||m==ee.Top?{opacity:0,x:"-50%",y:m==ee.Top?-5:5}:{opacity:0,y:"-50%",x:m==ee.Right?15:-25},to:m==ee.Bottom||m==ee.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:m==ee.Right?10:-20},curve:_.EaseInOut,when:i},children:jsxRuntime.jsx(H,{className:"--text rel",children:t})})]})});Rs.displayName="Zuz.ToolTip";var dp=Rs;var ko=react.forwardRef((o,n)=>{let{as:t,meta:r,nodes:e,icons:s,onSelect:u,treeTag:l,selected:p,roots:a,expanded:i,...f}=o,{tag:m,label:d,icon:v,under:y,isHead:b}=r,P=react.useMemo(()=>a.includes(m),[a]),[h,g]=react.useState(i),w=()=>{localStorage.setItem(`--tn${l}-${m}`,h?"0":"1"),g(!h);};react.useEffect(()=>{i||P&&!localStorage.getItem(`--tn${l}-${m}`)?(localStorage.setItem(`--tn${l}-${m}`,"1"),g(true)):g(localStorage.getItem(`--tn${l}-${m}`)=="1");},[]);let N=react.useMemo(()=>e.filter(C=>C.under==m),[e,m]);return jsxRuntime.jsxs(c,{className:`--treenode ${P?"--is-root":""} --treenode-${m} flex cols`,children:[jsxRuntime.jsxs(c,{className:`--node --node-${m} flex aic ${p==m?" --selected":""}`,children:[jsxRuntime.jsx(z,{skeleton:f.skeleton,onClick:w,className:"--node-aro-btn",disabled:N.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(X,{skeleton:f.skeleton,className:"--node-aro-icon",name:N.length==0?s?.arrowDisabled||s?.arrowClose:h?s?.arrowOpen:s?.arrowClose}):N.length==0?D.chevronBottom:h?D.chevronBottom:D.chevronRight}),jsxRuntime.jsxs(z,{className:"--node-meta flex aic",onClick:C=>u(m),children:[(s?.nodeOpen&&s?.nodeClose||P&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(X,{skeleton:f.skeleton,className:`--node-icon ${P?"--icon-root":""}`,name:v||(h?P&&s?.rootOpen||s.nodeOpen:P&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${P?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),h&&N.length>0&&jsxRuntime.jsx(c,{className:`--sub-node tree-sub-node-${m} flex cols`,children:N.map(C=>jsxRuntime.jsx(ko,{treeTag:l,selected:p,onSelect:u,icons:s,roots:a,expanded:C.expanded||false,meta:C,nodes:e},`--node-${C.tag}`))})]})});ko.displayName="TreeItem";var Ns=ko;var Bs=react.forwardRef((o,n)=>{let{as:t,nodes:r,onNodeSelect:e,tag:s,icons:u,roots:l,selected:p,...a}=o,[i,f]=react.useState(p);react.useImperativeHandle(n,()=>({getSelected:()=>i}),[e]);let m=d=>{f(d),e&&e(d);};return react.useEffect(()=>{i!=p&&f(p);},[p]),jsxRuntime.jsx(c,{className:"--treeview flex cols",children:r.filter(d=>l.includes(d.tag)).map(d=>jsxRuntime.jsx(Ns,{treeTag:s?`-${s}`:"",selected:i,onSelect:v=>m(v),icons:u,meta:d,roots:l,expanded:d.expanded||false,skeleton:a.skeleton,nodes:r},`--node-${d.tag}`))})});Bs.displayName="Zuz.TreeView";var Cp=Bs;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
+ Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkB55QHQO2_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkB55QHQO2_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkB55QHQO2_cjs.h}});exports.ALERT=ie;exports.AVATAR=$o;exports.Accordion=ii;exports.ActionBar=fi;exports.Alert=hi;exports.AutoComplete=ki;exports.Avatar=Fi;exports.Badge=Zi;exports.Box=c;exports.Bubble=yl;exports.BubbleMediaType=tn;exports.BubbleStatus=en;exports.Button=z;exports.CHART=Yr;exports.CHECKBOX=be;exports.COLORTHEME=Ip;exports.Calendar=ao;exports.Chart=pl;exports.CheckBox=et;exports.CodeBlock=El;exports.ColorScheme=Zl;exports.ContextMenu=Yt;exports.CookiesConsent=ql;exports.Cover=Ee;exports.CropShape=om;exports.Cropper=em;exports.Crumb=nm;exports.DATATYPE=Bp;exports.DIALOG=De;exports.DIALOG_ACTION_POSITION=zo;exports.DRAWER_SIDE=ne;exports.DatePicker=lm;exports.Dialog=Ft;exports.Drawer=Xt;exports.FILTER=ut;exports.FORMVALIDATION=ve;exports.FORMVALIDATION_STYLE=Lp;exports.Fab=um;exports.Filters=gm;exports.Form=Em;exports.Group=_t;exports.Icon=X;exports.Image=Qe;exports.Input=oe;exports.KeyboardKeys=wo;exports.KeysLabelMap=Dn;exports.KeysMap=kn;exports.Label=je;exports.LayersProvider=$t;exports.List=Le;exports.NetworkStatus=Vm;exports.ORIGIN=Ke;exports.OriginType=Np;exports.Overlay=Ne;exports.POSITION=Bt;exports.PROGRESS=Op;exports.Pagination=To;exports.PaginationStyle=So;exports.Password=Gm;exports.PinInput=Qm;exports.Position=ee;exports.ProgressBar=lo;exports.RADIO=Mt;exports.Radio=tc;exports.SHEET=le;exports.SHEET_ACTION_POSITION=Lt;exports.SKELETON=Rp;exports.SLIDER=pt;exports.SORT=Ep;exports.SPINNER=re;exports.ScrollView=Wt;exports.Search=mc;exports.Select=gc;exports.SelectTabs=tt;exports.Sheet=vm;exports.Slider=fo;exports.Span=Q;exports.Spinner=ge;exports.Status=Mp;exports.Switch=xc;exports.TRANSITIONS=G;exports.TRANSITION_CURVES=_;exports.TabView=Zc;exports.Table=Lc;exports.TableOfContents=kc;exports.Terminal=Xc;exports.Text=H;exports.TextWheel=mp;exports.Textarea=op;exports.ThemeProvider=Ws;exports.ToastDefaultTitle=hr;exports.ToastProvider=Kt;exports.ToastType=gr;exports.ToolTip=dp;exports.TreeView=Cp;exports.Variant=U;exports.animationTransition=Ze;exports.buildClassString=Ot;exports.buildWithStyles=Ko;exports.css=jp;exports.getAnimationCurve=kt;exports.getAnimationTransition=eu;exports.getZuzMap=Ms;exports.isKeyCombination=On;exports.setZuzMap=Fo;exports.useBase=R;exports.useContextMenu=ti;exports.useDialog=Za;exports.useDrawer=Xa;exports.useFx=se;exports.useMorph=Ja;exports.usePosition=We;exports.useToast=Jt;