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