@zuzjs/ui 1.0.19 → 1.0.20
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
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';var
|
|
3
|
-
var k=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new tsMorph.Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(e,t=""){if(e.asKind(tsMorph.SyntaxKind.JsxExpression)){let s=e.getExpression();s&&this.extractStyles(s,t);return}if(e.asKind(tsMorph.SyntaxKind.StringLiteral)||e.asKind(tsMorph.SyntaxKind.NoSubstitutionTemplateLiteral)||e.asKind(tsMorph.SyntaxKind.NumericLiteral))this.stylesToGenerate.add(t+e.getLiteralValue().toString());else if(e.asKind(tsMorph.SyntaxKind.TemplateExpression)){let s=e.getHead().getLiteralText();e.getTemplateSpans().forEach(l=>{this.extractStyles(l.getExpression(),t+s);});}else e.asKind(tsMorph.SyntaxKind.ConditionalExpression)?(this.extractStyles(e.getWhenTrue(),t),this.extractStyles(e.getWhenFalse(),t)):e.asKind(tsMorph.SyntaxKind.ArrayLiteralExpression)?e.getElements().forEach(s=>this.extractStyles(s,t)):e.asKind(tsMorph.SyntaxKind.BinaryExpression)&&(this.extractStyles(e.getLeft(),t),this.extractStyles(e.getRight(),t));}processFile(e){this.stylesToGenerate.clear();let t=e.endsWith(".mdx")||e.endsWith(".md"),s;if(t){let n=u__default.default.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,n,{overwrite:true,scriptKind:tsMorph.ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxSelfClosingElement)].forEach(n=>{let a=n.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();a&&this.extractStyles(a);}),s.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression).filter(n=>n.getExpression().getText()==="css").forEach(n=>{let c=n.getArguments();c.length>0&&this.extractStyles(c[0]);}),this.stylesToGenerate.forEach(n=>{
|
|
4
|
-
export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u__default.default.writeFileSync(e,g);}},y=new k;commander.program.opts();var S=process.cwd(),O=false,J=p__default.default.join(S,"src","app","css"),R=p__default.default.join(J,"zuz.scss"),W=p__default.default.join(J,"zuzmap.ts"),G=()=>{
|
|
2
|
+
'use strict';var chunkWRPYWAQK_cjs=require('./chunk-WRPYWAQK.cjs'),commander=require('commander'),Z=require('chokidar'),p=require('path'),i=require('picocolors'),u=require('fs'),tsMorph=require('ts-morph'),url=require('url');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Z__default=/*#__PURE__*/_interopDefault(Z);var p__default=/*#__PURE__*/_interopDefault(p);var i__default=/*#__PURE__*/_interopDefault(i);var u__default=/*#__PURE__*/_interopDefault(u);/* ZuzJS UI CLI */
|
|
3
|
+
var k=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new tsMorph.Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(e,t=""){if(e.asKind(tsMorph.SyntaxKind.JsxExpression)){let s=e.getExpression();s&&this.extractStyles(s,t);return}if(e.asKind(tsMorph.SyntaxKind.StringLiteral)||e.asKind(tsMorph.SyntaxKind.NoSubstitutionTemplateLiteral)||e.asKind(tsMorph.SyntaxKind.NumericLiteral))this.stylesToGenerate.add(t+e.getLiteralValue().toString());else if(e.asKind(tsMorph.SyntaxKind.TemplateExpression)){let s=e.getHead().getLiteralText();e.getTemplateSpans().forEach(l=>{this.extractStyles(l.getExpression(),t+s);});}else e.asKind(tsMorph.SyntaxKind.ConditionalExpression)?(this.extractStyles(e.getWhenTrue(),t),this.extractStyles(e.getWhenFalse(),t)):e.asKind(tsMorph.SyntaxKind.ArrayLiteralExpression)?e.getElements().forEach(s=>this.extractStyles(s,t)):e.asKind(tsMorph.SyntaxKind.BinaryExpression)&&(this.extractStyles(e.getLeft(),t),this.extractStyles(e.getRight(),t));}processFile(e){this.stylesToGenerate.clear();let t=e.endsWith(".mdx")||e.endsWith(".md"),s;if(t){let n=u__default.default.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,n,{overwrite:true,scriptKind:tsMorph.ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxSelfClosingElement)].forEach(n=>{let a=n.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();a&&this.extractStyles(a);}),s.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression).filter(n=>n.getExpression().getText()==="css").forEach(n=>{let c=n.getArguments();c.length>0&&this.extractStyles(c[0]);}),this.stylesToGenerate.forEach(n=>{chunkWRPYWAQK_cjs.h(n).filter(Boolean).forEach(a=>{let x=a.match(/^([&@][\w-]+)\((.*)\)$/);if(x){let[h,z,F]=x;chunkWRPYWAQK_cjs.h(F).filter(Boolean).forEach(b=>{let v=`${z}(${b})`,w=chunkWRPYWAQK_cjs.i.parseAndGenerate(v,e);w.length>0&&(this.manifest[v]=w.join(" "));});let j=chunkWRPYWAQK_cjs.i.parseAndGenerate(a,e);j.length>0&&(this.manifest[a]=j.join(" "));}else {let h=chunkWRPYWAQK_cjs.i.parseAndGenerate(a,e);h.length>0&&(this.manifest[a]=h.join(" "));}});}),t&&this.project.removeSourceFile(s);}isSupportedFile(e){return this.supportedExtensions.some(t=>e.endsWith(t))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let e=process.cwd(),t=[p__default.default.join(e,"src/app/css"),p__default.default.join(e,"app/css"),p__default.default.join(e,"src/css"),p__default.default.join(e,"css")],s=t.find(l=>u__default.default.existsSync(l))||t[0];return u__default.default.existsSync(s)||u__default.default.mkdirSync(s,{recursive:true}),p__default.default.join(s,"zuzmap.ts")};saveManifest(e){let t=p__default.default.dirname(e);u__default.default.existsSync(t)||u__default.default.mkdirSync(t,{recursive:true});let s=chunkWRPYWAQK_cjs.i.getCache(),l={};for(let[n,c]of Object.entries(this.manifest))s.has(c)&&(l[n]=c);this.manifest=l;let g=`/* Zuz Generated Manifest - Do not edit */
|
|
4
|
+
export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u__default.default.writeFileSync(e,g);}},y=new k;commander.program.opts();var S=process.cwd(),O=false,J=p__default.default.join(S,"src","app","css"),R=p__default.default.join(J,"zuz.scss"),W=p__default.default.join(J,"zuzmap.ts"),G=()=>{chunkWRPYWAQK_cjs.i.writeToDisk(R),y.saveManifest(W);},P=async()=>{try{let o=p__default.default.dirname(url.fileURLToPath(chunkWRPYWAQK_cjs.a)),e=p__default.default.resolve(o,"../package.json"),t=JSON.parse(u__default.default.readFileSync(e,"utf8")),g=(await(await fetch("https://registry.npmjs.org/@zuzjs/ui/latest")).json()).version.trim();if(g!==t.version.trim()){let n=` Update available! ${i__default.default.dim(t.version)} \u2192 ${i__default.default.green(g)} `,c=` Run: ${i__default.default.cyan(`npm i ${t.name}@latest`)} `,a=b=>b.replace(/\u001b\[[0-9;]*m/g,"").length,x=a(n),h=a(c),z=Math.max(x,h),F=i__default.default.yellow(`\u250C${"\u2500".repeat(z+2)}\u2510`),C=i__default.default.yellow(`\u2514${"\u2500".repeat(z+2)}\u2518`),j=(b,v)=>{let w=" ".repeat(z-v);return `${i__default.default.yellow("\u2502")} ${b}${w} ${i__default.default.yellow("\u2502")}`};console.log(`
|
|
5
5
|
${F}`),console.log(j(n,x)),console.log(j(c,h)),console.log(`${C}
|
|
6
|
-
`);}}catch{}};commander.program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p__default.default.join(S,".vscode"),e=p__default.default.join(o,"zuz.code-snippets"),t=p__default.default.join(o,"settings.json"),s=Object.keys(
|
|
6
|
+
`);}}catch{}};commander.program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p__default.default.join(S,".vscode"),e=p__default.default.join(o,"zuz.code-snippets"),t=p__default.default.join(o,"settings.json"),s=Object.keys(chunkWRPYWAQK_cjs.b).join(","),l=Object.keys(chunkWRPYWAQK_cjs.c).join(","),g={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${l}|}$0"`],description:"Zuz Direct Shortcut"}},n={};if(u__default.default.existsSync(t))try{n=JSON.parse(u__default.default.readFileSync(t,"utf-8"));}catch{n={};}n["editor.suggest.snippetsPreventQuickSuggestions"]=false,n["editor.quickSuggestions"]={...typeof n["editor.quickSuggestions"]=="object"?n["editor.quickSuggestions"]:{},strings:true},u__default.default.existsSync(o)||u__default.default.mkdirSync(o,{recursive:true}),u__default.default.writeFileSync(e,JSON.stringify(g,null,2)),u__default.default.writeFileSync(t,JSON.stringify(n,null,2)),console.log(i__default.default.green("\u2714 Zuz VS Code configuration initialized!")),console.log(i__default.default.cyan(" - .vscode/zuz.code-snippets (Splitted zp/zs)")),console.log(i__default.default.cyan(" - .vscode/settings.json (QuickSuggestions enabled)"));});commander.program.command("watch").alias("w").description("Start ZuzJS watcher").action(()=>{P();let o=Z__default.default.watch(".",{cwd:S,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});o.on("add",e=>{y.isSupportedFile(e)&&y.processFile(p__default.default.resolve(S,e)),O&&console.log(i__default.default.gray(`\u25CB File added: ${e}`));}),o.on("change",e=>{if(y.isSupportedFile(e)){console.log(i__default.default.gray(`\u25CB File changed: ${e}`));let t=p__default.default.resolve(S,e);chunkWRPYWAQK_cjs.i.clearFileCache(t),y.processFile(t),G(),console.log(i__default.default.blue("\u26A1 Zuz CSS updated."));}}),o.on("ready",()=>{O=true,G(),console.log(i__default.default.green(`
|
|
7
7
|
\u2713 Initial Build Complete.`)),console.log(i__default.default.cyan(`\u25CB Watching: ${p.basename(S)}
|
|
8
8
|
`));}),o.on("error",e=>console.error(i__default.default.red(`Watcher Error: ${e}`)));});commander.program.parse(process.argv);
|
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {a,b,h,g}from'./chunk-
|
|
2
|
+
import {a,b,h,g}from'./chunk-IWMLQYPP.js';import {program}from'commander';import D from'chokidar';import p,{basename}from'path';import i from'picocolors';import u from'fs';import {Project,SyntaxKind,ScriptKind}from'ts-morph';import {fileURLToPath}from'url';var T=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(e,t=""){if(e.asKind(SyntaxKind.JsxExpression)){let s=e.getExpression();s&&this.extractStyles(s,t);return}if(e.asKind(SyntaxKind.StringLiteral)||e.asKind(SyntaxKind.NoSubstitutionTemplateLiteral)||e.asKind(SyntaxKind.NumericLiteral))this.stylesToGenerate.add(t+e.getLiteralValue().toString());else if(e.asKind(SyntaxKind.TemplateExpression)){let s=e.getHead().getLiteralText();e.getTemplateSpans().forEach(l=>{this.extractStyles(l.getExpression(),t+s);});}else e.asKind(SyntaxKind.ConditionalExpression)?(this.extractStyles(e.getWhenTrue(),t),this.extractStyles(e.getWhenFalse(),t)):e.asKind(SyntaxKind.ArrayLiteralExpression)?e.getElements().forEach(s=>this.extractStyles(s,t)):e.asKind(SyntaxKind.BinaryExpression)&&(this.extractStyles(e.getLeft(),t),this.extractStyles(e.getRight(),t));}processFile(e){this.stylesToGenerate.clear();let t=e.endsWith(".mdx")||e.endsWith(".md"),s;if(t){let n=u.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,n,{overwrite:true,scriptKind:ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(SyntaxKind.JsxSelfClosingElement)].forEach(n=>{let a=n.getAttribute("as")?.asKind(SyntaxKind.JsxAttribute)?.getInitializer();a&&this.extractStyles(a);}),s.getDescendantsOfKind(SyntaxKind.CallExpression).filter(n=>n.getExpression().getText()==="css").forEach(n=>{let c=n.getArguments();c.length>0&&this.extractStyles(c[0]);}),this.stylesToGenerate.forEach(n=>{g(n).filter(Boolean).forEach(a=>{let x=a.match(/^([&@][\w-]+)\((.*)\)$/);if(x){let[h$1,z,F]=x;g(F).filter(Boolean).forEach(b=>{let v=`${z}(${b})`,w=h.parseAndGenerate(v,e);w.length>0&&(this.manifest[v]=w.join(" "));});let j=h.parseAndGenerate(a,e);j.length>0&&(this.manifest[a]=j.join(" "));}else {let h$1=h.parseAndGenerate(a,e);h$1.length>0&&(this.manifest[a]=h$1.join(" "));}});}),t&&this.project.removeSourceFile(s);}isSupportedFile(e){return this.supportedExtensions.some(t=>e.endsWith(t))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let e=process.cwd(),t=[p.join(e,"src/app/css"),p.join(e,"app/css"),p.join(e,"src/css"),p.join(e,"css")],s=t.find(l=>u.existsSync(l))||t[0];return u.existsSync(s)||u.mkdirSync(s,{recursive:true}),p.join(s,"zuzmap.ts")};saveManifest(e){let t=p.dirname(e);u.existsSync(t)||u.mkdirSync(t,{recursive:true});let s=h.getCache(),l={};for(let[n,c]of Object.entries(this.manifest))s.has(c)&&(l[n]=c);this.manifest=l;let g=`/* Zuz Generated Manifest - Do not edit */
|
|
3
3
|
export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u.writeFileSync(e,g);}},y=new T;program.opts();var S=process.cwd(),A=false,G=p.join(S,"src","app","css"),W=p.join(G,"zuz.scss"),P=p.join(G,"zuzmap.ts"),O=()=>{h.writeToDisk(W),y.saveManifest(P);},I=async()=>{try{let o=p.dirname(fileURLToPath(import.meta.url)),e=p.resolve(o,"../package.json"),t=JSON.parse(u.readFileSync(e,"utf8")),g=(await(await fetch("https://registry.npmjs.org/@zuzjs/ui/latest")).json()).version.trim();if(g!==t.version.trim()){let n=` Update available! ${i.dim(t.version)} \u2192 ${i.green(g)} `,c=` Run: ${i.cyan(`npm i ${t.name}@latest`)} `,a=b=>b.replace(/\u001b\[[0-9;]*m/g,"").length,x=a(n),h=a(c),z=Math.max(x,h),F=i.yellow(`\u250C${"\u2500".repeat(z+2)}\u2510`),k=i.yellow(`\u2514${"\u2500".repeat(z+2)}\u2518`),j=(b,v)=>{let w=" ".repeat(z-v);return `${i.yellow("\u2502")} ${b}${w} ${i.yellow("\u2502")}`};console.log(`
|
|
4
4
|
${F}`),console.log(j(n,x)),console.log(j(c,h)),console.log(`${k}
|
|
5
5
|
`);}}catch{}};program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p.join(S,".vscode"),e=p.join(o,"zuz.code-snippets"),t=p.join(o,"settings.json"),s=Object.keys(a).join(","),l=Object.keys(b).join(","),g={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${l}|}$0"`],description:"Zuz Direct Shortcut"}},n={};if(u.existsSync(t))try{n=JSON.parse(u.readFileSync(t,"utf-8"));}catch{n={};}n["editor.suggest.snippetsPreventQuickSuggestions"]=false,n["editor.quickSuggestions"]={...typeof n["editor.quickSuggestions"]=="object"?n["editor.quickSuggestions"]:{},strings:true},u.existsSync(o)||u.mkdirSync(o,{recursive:true}),u.writeFileSync(e,JSON.stringify(g,null,2)),u.writeFileSync(t,JSON.stringify(n,null,2)),console.log(i.green("\u2714 Zuz VS Code configuration initialized!")),console.log(i.cyan(" - .vscode/zuz.code-snippets (Splitted zp/zs)")),console.log(i.cyan(" - .vscode/settings.json (QuickSuggestions enabled)"));});program.command("watch").alias("w").description("Start ZuzJS watcher").action(()=>{I();let o=D.watch(".",{cwd:S,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});o.on("add",e=>{y.isSupportedFile(e)&&y.processFile(p.resolve(S,e)),A&&console.log(i.gray(`\u25CB File added: ${e}`));}),o.on("change",e=>{if(y.isSupportedFile(e)){console.log(i.gray(`\u25CB File changed: ${e}`));let t=p.resolve(S,e);h.clearFileCache(t),y.processFile(t),O(),console.log(i.blue("\u26A1 Zuz CSS updated."));}}),o.on("ready",()=>{A=true,O(),console.log(i.green(`
|
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
var zo={Circle:"CIRCLE",Square:"SQUARE"},Bp={Default:"DEFAULT",Circle:"CIRCLE"},Lp={Light:"light",Dark:"dark",System:"system"},ye={Default:"DEFAULT",Switch:"SWITCH"},Bt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ee=Bt,Ke=hooks.AnchorType,Mp=Ke,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},kp={Asc:"ASC",Desc:"DESC"},Op={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Dp={Dots:"DOTS"},be={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},le={Success:"success",Error:"error",Warning:"warning",Info:"info"},F={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},G={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Hp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},He=me,Lt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},_o=Lt,Vp={Bar:"BAR",Ring:"RING"},mt={Default:"range",Text:"number"},Mt={Default:"DEFAULT",Card:"CARD"},ct={Gooey:"gooey"},se={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Fo=Symbol.for("zuz.global.map"),Zo=o=>{globalThis[Fo]=o;},Ds=()=>globalThis[Fo]||{},kt=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e=Ds();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${
|
|
1
|
+
'use strict';var chunkWRPYWAQK_cjs=require('./chunk-WRPYWAQK.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
|
|
2
|
+
var zo={Circle:"CIRCLE",Square:"SQUARE"},Bp={Default:"DEFAULT",Circle:"CIRCLE"},Lp={Light:"light",Dark:"dark",System:"system"},ye={Default:"DEFAULT",Switch:"SWITCH"},Bt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ee=Bt,Ke=hooks.AnchorType,Mp=Ke,W={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},kp={Asc:"ASC",Desc:"DESC"},Op={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Dp={Dots:"DOTS"},be={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},le={Success:"success",Error:"error",Warning:"warning",Info:"info"},F={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},G={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Hp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},me={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},He=me,Lt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},_o=Lt,Vp={Bar:"BAR",Ring:"RING"},mt={Default:"range",Text:"number"},Mt={Default:"DEFAULT",Card:"CARD"},ct={Gooey:"gooey"},se={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Fo=Symbol.for("zuz.global.map"),Zo=o=>{globalThis[Fo]=o;},Ds=()=>globalThis[Fo]||{},kt=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e=Ds();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${chunkWRPYWAQK_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkWRPYWAQK_cjs.h(n).filter(Boolean).map(t=>{let s=t.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[u,l,m]=s;return chunkWRPYWAQK_cjs.h(m).map(i=>{let a=`${l}(${i})`;return e[a]||i}).join(" ")}return e[t]||t}).join(" ")},ru=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":kt(n)},Ko=o=>{let n={};for(let e in o){let r=o[e];if(e.startsWith("--")){n[e]=r;continue}let t=chunkWRPYWAQK_cjs.e[e]?.toString()??e;if(t==="x"||t==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkWRPYWAQK_cjs.i.addUnitsSafely(e,r)} ${s[1]??"0px"}`;}else if(t==="y"||t==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunkWRPYWAQK_cjs.i.addUnitsSafely(e,r)}`;}else chunkWRPYWAQK_cjs.d.includes(t)?n[t]=chunkWRPYWAQK_cjs.i.addUnitsSafely(e,r):n[t]=r;}return n},Ot=o=>{if(!o)return "linear";switch(o.toUpperCase()){case F.Bounce:return "var(--bounce)";case F.Liquid:return "var(--liquid)";case F.Spring:return "var(--spring)";case F.EaseInOut:return "ease-in-out";case F.EaseOutBack:return "ease-out-back";default:return "linear"}},We=(o,n=0)=>{let e={},r={},t=n||20;switch(o){case G.SlideInLeft:case G.SlideInRight:e={"--fx-x":o===G.SlideInLeft?`-${t}px`:`${t}px`,opacity:0},r={"--fx-x":"0px",opacity:1};break;case G.SlideInTop:case G.SlideInBottom:e={"--fx-y":o===G.SlideInTop?`-${t}px`:`${t}px`,opacity:0},r={"--fx-y":"0px",opacity:1};break;case G.ScaleIn:e={scale:0,opacity:0},r={scale:1,opacity:1};break;case G.FadeIn:e={opacity:0},r={opacity:1};break}return {from:e,to:r}},nu=(o,n,e)=>{let{from:r,to:t}=We(o);return n?{...r,...t}:e?r:t};var Vs=(o,n)=>{let e=react.useRef([]),r=react.useRef(false);return react.useEffect(()=>{o?.when||(r.current=false);},[o?.transition]),react.useEffect(()=>{let t=n?.current;if(!t||!o||!o.clearAtEnd)return;let s=u=>{e.current.includes(u.propertyName)&&o.clearAtEnd===true&&(t.style.transform="",t.style.filter="",e.current.forEach(l=>t.style.removeProperty(l)));};return t.addEventListener("transitionend",s),()=>t.removeEventListener("transitionend",s)},[o,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let t=n.current;(o?.scroll||o?.mouse)&&(t.style.willChange="transform",t.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",t.style.transition=`translate 0.1s ${o.curve?Ot(o.curve):"var(--spring)"}`);},[o,n]),react.useMemo(()=>{if(!o)return {style:{}};let{transition:t,from:s,to:u,exit:l,when:m,duration:i=.3,delay:a=0,curve:f,watch:p=[]}=o,d=m===false&&!r.current;m===true&&(r.current=true);let b={},{from:w,to:x}=t?We(t):{from:s||{},to:u||{}};b=m===void 0?{...w,...x}:m?{...x}:l||w;let h=Ot(f),S=[],g=Ko(b);e.current=Object.keys(g);let v={...g};return Object.keys(g).forEach(I=>{let T=I.startsWith("--")?"all":I;S.includes(T)||S.push(`${T} ${i}s ${h} ${a}s`);}),p.forEach(I=>{S.includes(I)||S.push(`${I} 0.1s ${h} 0s`);}),{style:{...v,transition:d?"none":S.join(", "),opacity:d?0:v.opacity,pointerEvents:d?"none":v.pointerEvents}}},[o,o?.when,o?.watch])},ae=Vs;var As=(o,n)=>{let{as:e,fx:r,transition:t,skeleton:s,className:u,propsToRemove:l,style:m,...i}=o||{},a=t?{transition:t,duration:.3}:r||{},{style:f}=ae(a,n),p=kt(e??"");return {style:{...m,...f},className:[u||"",p||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...chunkWRPYWAQK_cjs.g(i,l?[...l,"skeleton"]:["skeleton"])}}},R=As;var Fs=(o,n={})=>{let{offset:e=8,direction:r="bottom",container:t=null,triggerRef:s=null}=n,u=react.useRef(null),l=react.useCallback(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=m.getBoundingClientRect(),f=i.getBoundingClientRect(),p,d;t?(p=t.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(m).position==="fixed"?d="fixed":d="absolute",d==="fixed"?p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),m.style.position!==d&&(m.style.position=d),u.current=d;let x=0,h=0;switch(r){case "top":x=f.top-a.height-e,h=f.left,x<p.top&&f.bottom+a.height+e<=p.bottom&&(x=f.bottom+e);break;case "bottom":x=f.bottom+e,h=f.left,x+a.height>p.bottom&&f.top-a.height-e>=p.top&&(x=f.top-a.height-e);break;case "left":x=f.top,h=f.left-a.width-e,h<p.left&&f.right+a.width+e<=p.right&&(h=f.right+e);break;case "right":x=f.top,h=f.right+e,h+a.width>p.right&&f.left-a.width-e>=p.left&&(h=f.left-a.width-e);break}if(x=Math.max(p.top,Math.min(x,p.bottom-a.height)),h=Math.max(p.left,Math.min(h,p.right-a.width)),u.current==="fixed")m.style.top=`${x}px`,m.style.left=`${h}px`;else {let S;m.offsetParent?S=m.offsetParent.getBoundingClientRect():S={top:0,left:0};let g=x-S.top+window.scrollY,v=h-S.left+window.scrollX;m.style.top=`${g}px`,m.style.left=`${v}px`;}},[o,s,e,r,t]);return react.useEffect(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=new ResizeObserver(l);return a.observe(m),i&&a.observe(i),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{a.disconnect(),i&&a.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[o,r,e,t,s]),{postion:u.current,reposition:l}},Ue=Fs;var Go="(prefers-color-scheme: dark)",Ws=typeof window>"u",Xo=react.createContext(void 0),At=o=>{let n=react.useContext(Xo);if(!n){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},X=At,Us=({children:o,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...t})=>(r&&Zo(r),jsxRuntime.jsx(Gs,{storageKey:n,forceTheme:e,...t,children:o})),Gs=({children:o,storageKey:n,forceTheme:e,...r})=>{let[t,s]=react.useState(()=>e||qo(n,"system")),[u,l]=react.useState(()=>e||qo(n)),m=p=>(p||(p=window.matchMedia(Go)),p.matches?"dark":"light"),i=react.useCallback(p=>{let d=p=="system"?m():p,b=document.documentElement;b.setAttribute("color-scheme",d),b.style.colorScheme=d,l(d);},[m]),a=react.useCallback(p=>{s(p),localStorage.setItem(n,p),i(p);},[t]),f=react.useCallback(p=>{let d=m(p);l(d),t==="system"&&i("system");},[t]);return react.useEffect(()=>{t==null&&window.localStorage.getItem(n);},[t]),react.useEffect(()=>{window.matchMedia(Go).addEventListener("change",f);},[f]),react.useEffect(()=>{let p=d=>{d.key==n&&(d.newValue?a(d.newValue):a("system"));};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[a]),react.useEffect(()=>{i(e||t||"system");},[t]),jsxRuntime.jsxs(Xo,{value:{colorScheme:t,resolvedScheme:u,setColorScheme:a,...r},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
3
3
|
const themes = ['light', 'dark']
|
|
4
4
|
let theme = localStorage.getItem(\`${n}\`) || "system";
|
|
5
5
|
if (theme === "system") {
|
|
6
6
|
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
7
7
|
}
|
|
8
8
|
document.documentElement.setAttribute("color-scheme", theme);
|
|
9
|
-
document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx($t,{children:o})]})},qo=(o,n)=>{if(Ws)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Yo=({ref:o,...n})=>{let{style:e,...r}=n,{style:t,className:s,rest:u}=R(r);return jsxRuntime.jsx("span",{ref:o,style:e,className:s,...u})};Yo.displayName="Zuz.Span";var J=Yo;var Jo=react.forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:l}=X(true),{className:m,style:i,rest:a}=R(u);return jsxRuntime.jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${t||l||W.Small} ${m}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,p)=>jsxRuntime.jsx(J,{className:`path${p+1}`},`${e}-layer-${p}`))})});Jo.displayName="Zuz.Icon";var Y=Jo;var re={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var jo=o=>{let{type:n,variant:e,color:r,...t}=o,{className:s,style:u,rest:l}=R(t),{spinner:m}=X(true),i=()=>{switch(n||m?.type||re.Simple){case re.Simple:return null;case re.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{as:"--bar --bar1"}),jsxRuntime.jsx(c,{as:"--bar --bar2"}),jsxRuntime.jsx(c,{as:"--bar --bar3"})]});case re.Roller:return null}};return jsxRuntime.jsx(c,{className:`${s} --spinner --${(n||m?.type||re.Simple).toLowerCase()} --${e||m?.variant||W.Small}`.trim(),style:{...u},...l,children:i()})};jo.displayName="Zuz.Spinner";var ge=jo;var ft={Loading:"loading",Normal:"normal"};var tr=({ref:o,...n})=>{let{reset:e,kind:r="solid",variant:t,icon:s,iconSize:u,children:l,withLabel:m,spinner:i,state:a,disabled:f,...p}=n,{style:d,className:b,rest:w}=R(p),{variant:x}=X(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${t||x} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${b}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:a==ft.Loading||n.skeleton?.enabled||f,...w,children:[a==ft.Loading&&jsxRuntime.jsx(ge,{variant:t||x,type:i||re.Simple}),(!a||a==ft.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(Y,{variant:u,name:s}),m===true?jsxRuntime.jsx(J,{children:l}):l]})]})};tr.displayName="Zuz.Button";var z=tr;var rr=react.forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:l,className:m,rest:i}=R(u),a=`h${o.h||1}`;return jsxRuntime.jsx(a,{ref:n,style:l,className:m,...i,children:r?jsxRuntime.jsx(J,{dangerouslySetInnerHTML:{__html:r}}):t})});rr.displayName="Zuz.Text";var H=rr;var ta=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:l}=o;return n=="-"?jsxRuntime.jsx(c,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:m=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsxRuntime.jsx(c,{as:"--icon",children:jsxRuntime.jsx(Y,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},nr=ta;var ir=({ref:o,...n})=>{let{id:e,as:r,fx:t,offsetX:s,offsetY:u,parent:l,event:m,arrow:i,when:a,items:f,header:p,footer:d,origin:b=Ke.TopRight,...w}=n,[x,h]=react.useState(false),[S,g]=react.useState(f||[]),{position:v,targetRef:I,calculatedAnchor:T}=hooks.useAnchorPosition(l?.current,m,{offsetX:s,offsetY:u,preferredAnchor:b}),N=l&&v.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",M=react.useMemo(()=>{let k=T.toLowerCase();return k.includes("left")?"--arrow-left":k.includes("right")?"--arrow-right":"--arrow-center"},[T]),L=v.top!==0||v.left!==0;react.useEffect(()=>{a&&L?h(true):a||h(false);},[a,L]);let{className:V,style:E,rest:_}=R(w),U=ae({...t?.transition?{transition:t.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:t?.curve??F.EaseInOut,duration:t?.duration??.05,when:x&&L});return jsxRuntime.jsxs(c,{ref:I,className:`--contextmenu ${i||l!=null?`--has-arrow ${N} ${M}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!x,style:{...E,...U.style,top:v.top,left:v.left,visibility:L?"visible":"hidden",transformOrigin:T},..._,children:[typeof p=="function"?react.createElement(p):p,S.map((k,C)=>jsxRuntime.jsx(nr,{...k,index:C},`context-${k.label.toLowerCase()}-${C}`)),typeof d=="function"?react.createElement(d):d]})};ir.displayName="Zuz.ContextMenu";var _t=ir;var lr=react.forwardRef((o,n)=>{let{children:e,fx:r,when:t,fxDelay:s,fxStep:u,classToIgnore:l,...m}=o,i=X(true),a=hooks.useDelayed(),f=r||i?.group?.fx,p=s||i?.group?.fxDelay,d=u||i?.group?.fxStep,b=l||i?.group?.classToIgnore||"--ignore",w=react.useMemo(()=>f?react$1.addPropsToChildren(e,x=>{if(x.type===react.Fragment)return false;let h=x.props||{},S="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",v=typeof g=="string"&&g.includes(b);return !S&&!v},x=>({fx:{...f,delay:(p||0)+x*(d||.1),when:t??(r?.when||a)}})):e,[e,t,a,f]);return jsxRuntime.jsx(c,{className:"--group",ref:n,...m,children:w})});lr.displayName="Zuz.Group";var Ft=lr;var cr=react.forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:l,...m}=o,{className:i,style:a,rest:f}=R(m),{spinner:p}=X(true);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(Ft,{fx:{transition:G.SlideInBottom,curve:F.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:t||p?.variant||W.Small,type:r||p?.type||re.Simple}),!l&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});cr.displayName="Zuz.Cover";var Ne=cr;var pr=react.forwardRef((o,n)=>{let{when:e,...r}=o;return jsxRuntime.jsx(c,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...r})});pr.displayName="Zuz.Overlay";var Ee=pr;var ya=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),ur=ya;var wa=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(c,{as:`--footer flex aic rel ${n?n==_o.Center?"jcc":"":"jce"}`.trim(),children:o.map((t,s)=>jsxRuntime.jsx(z,{variant:r,onClick:u=>t.handler?t.handler():t.onClick?t.onClick():console.log("onClick Handler missing"),as:"--action",children:t.label},`dialog-${e}-action-${t.key}`))}),dr=wa;var va={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[le.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[le.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[le.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[le.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},O=va;var Sa=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(c,{as:"--head flex aic rel",children:[jsxRuntime.jsx(c,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(z,{onClick:e=>n(),className:"--closer abs center-v",children:O.close})]}),hr=Sa;var wr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:l,speed:m,type:i,action:a,actionPosition:f,spinner:p,loadingMessage:d,variant:b,inBackground:w,closeDelay:x=200,onClose:h,onShow:S,onHide:g,...v}=n,I=react.useMemo(()=>core.uuid(12),[]),[T,P]=react.useState(t||""),[N,M]=react.useState(s||""),[L,V]=react.useState(i||He.Dialog),[E,_]=react.useState(false),[U,k]=react.useState(true),[C,A]=react.useState(a||null),[$,K]=react.useState(false),{variant:D,spinner:Z,dialog:q}=X(true),te=b||q?.variant||D||W.Small,{style:j,className:pe,rest:de}=R(v),It=react.useRef(null),Nt=ae({when:E,duration:m||q?.speed||.3,delay:q?.delay||.1,transition:u||q?.transition||G.SlideInBottom,curve:l||q?.curve||F.EaseInOut,watch:["scale","filter","transform"]});react.useEffect(()=>{V(He.Dialog),M(s),P(T),C&&A(C.reduce((ne,Q)=>(ne.push({...Q,key:Q.key||core.uuid(12)}),ne),[])),_(true),setTimeout(()=>S?S():()=>{},500);},[]);let Ie=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{style:{zIndex:Ie},when:E}),jsxRuntime.jsxs(c,{as:`--dialog --${(i??He.Default).toLowerCase()} ${E?"--visible":""} ${pe} fixed abc`.trim(),style:{...Nt.style,zIndex:Ie+1,pointerEvents:w==true?"none":"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...de,ref:It,children:[jsxRuntime.jsx(Ne,{when:$,spinner:p||q?.spinner||Z?.type||re.Simple,message:d||q?.loadingMessage}),jsxRuntime.jsx(hr,{title:T,onClose:()=>{_(false),h(r);}}),jsxRuntime.jsx(ur,{message:N,render:U,action:C}),C&&C.length>0&&jsxRuntime.jsx(dr,{variant:te,action:C,dialogID:I,actionPosition:f})]})]})};wr.displayName="Zuz.Dialog";var Zt=wr;var Kt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},qe=new Kt;var vr=react.forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:m,onScrollY:i,onScrollX:a}=hooks.useScrollbar(e||1),{style:f,className:p,rest:d}=R(t);return react.useEffect(()=>{let b=u.current;if(!b)return;let w=()=>{window.dispatchEvent(new Event("resize"));};return b.addEventListener("scroll",w),()=>b.removeEventListener("scroll",w)},[]),jsxRuntime.jsxs(c,{ref:s,className:p.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(c,{as:`--scroll-content ${p}`.trim(),ref:u,style:r||{},children:d.children}),jsxRuntime.jsx(c,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:l,onMouseDown:i})}),jsxRuntime.jsx(c,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})})]})});vr.displayName="Zuz.ScrollView";var Wt=vr;var Cr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:l,animation:m,prerender:i,inBackground:a,onClose:f,...p}=n,{drawer:d}=X(true),[b,w]=react.useState(u),[x,h]=react.useState(false),[S,g]=react.useState(i??(d?.prerender||true)),v=()=>{h(false),f?.(e??-1);},{className:I,style:T,rest:P}=R(p),N=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(v)&&v();}}],[x]);hooks.useShortcuts(N),react.useEffect(()=>{w(u);},[u]),react.useEffect(()=>(x?qe.push(v):qe.pop(v),()=>qe.pop(v)),[x]),react.useEffect(()=>{h(true);},[]);let M=t||d?.from||se.Left,L=react.useMemo(()=>{switch(M){case se.Left:return {from:{x:"-100vw"},to:{x:0}};case se.Right:return {from:{x:"100vw"},to:{x:0}};case se.Top:return {from:{y:"-100vh"},to:{y:0}};case se.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,d?.from]),V=ae({from:{...L.from,opacity:0},to:{...L.to,opacity:1},when:x,curve:m||d?.animation||F.EaseInOut,duration:s||d?.speed||.5,watch:["scale","filter"]}),E=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{onClick:_=>{x&&v();},when:x,style:{zIndex:E}}),jsxRuntime.jsxs(c,{ref:o,"aria-hidden":!x,className:`--drawer flex cols ${I} --${M.toLowerCase()} fixed`,style:{...T,...V.style,"--m":`${l||d?.margin||0}px`,zIndex:E+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...P,children:[t==se.Top||t==se.Bottom?jsxRuntime.jsx(c,{className:"--handle"}):null,jsxRuntime.jsx(Wt,{children:S||x?b:null})]})]})};Cr.displayName="Zuz.Drawer";var Yt=Cr;var Tr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Tr||{}),Pr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Da=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:l})=>{let m=hooks.useDelayed(),i=hooks.useDelayed(((u||4)-1)*1e3),{toast:a}=X(true),f=ae({when:m&&!i,duration:a?.duration||.2,transition:G.SlideInTop,curve:a?.curve||F.EaseInOut});return react.useEffect(()=>{i&&n&&l?.(n);},[i,n]),jsxRuntime.jsxs(c,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(c,{as:"--ico flex aic jcc",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.2,when:m&&!i},children:r?jsxRuntime.jsx(Y,{name:r,fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}}):jsxRuntime.jsx(c,{as:"--no-icon",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}})}),jsxRuntime.jsxs(c,{as:"--meta",children:[jsxRuntime.jsx(H,{as:"--tt",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.3,when:m},children:t||Pr[e]}),jsxRuntime.jsx(H,{as:"--tm",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.4,duration:.5,when:m},children:s})]})]})},Qt=Da;var ce=react.createContext(null),_a=({ref:o,...n})=>{let r=react.useContext(ce)?.depth??0,[t,s]=react.useState(null),[u,l]=react.useState(false),[m,i]=react.useState([]),a=hooks.useDelayed(),f=react.useRef(0),p=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};react.useImperativeHandle(o,()=>({add(h){let S=p(),g={id:S,...h};return i(v=>[...v,g]),S},openMenu(h){l(false),setTimeout(()=>{s({id:p(),type:"menu",props:h}),l(true);},16);},remove(h){i(S=>S.filter(g=>g.id!==h)),t?.id===h&&d();},clear(){i([]);}})),react.useEffect(()=>{if(t&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,d]);let b=h=>{setTimeout(()=>{i(S=>S.filter(g=>g.id!==h)),t?.id===h&&s(null);},250);},w=react.useMemo(()=>[...m.filter(h=>h.type!="toast")],[m]);if(!a)return null;let x=m.filter(h=>h.type=="toast").reverse();return reactDom.createPortal(jsxRuntime.jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[w.map((h,S)=>{let g=S<w.length-1;return h.type==="dialog"?jsxRuntime.jsx(Zt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(Yt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),x.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:1001},children:x.map((h,S)=>jsxRuntime.jsx(Qt,{onClose:b,index:S,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsxRuntime.jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:2147483647},children:jsxRuntime.jsx(_t,{onClose:d,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},Fa=({children:o})=>{let n=react.useContext(ce),e=n?n.depth+1:0,r=react.useRef(null),t=react.useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),clear:()=>r.current?.clear(),depth:e,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(ce.Provider,{value:t,children:[o,jsxRuntime.jsx(_a,{ref:r})]})},$t=Fa;var Ka=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t);return {clearAll:n,show:t=>{let s=o.add({type:"dialog",props:{...t,type:He.Dialog}});return {id:s,hide:()=>e(s)}},hide:e}},Wa=Ka;var Ga=()=>{let o=react.useContext(ce);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,a)=>o.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,p)=>n("default",{title:i,message:a,icon:f,duration:p}),hide:i=>o.remove(i),success:(i,a,f,p)=>n("success",{title:i,message:a,icon:f,duration:p}),error:(i,a,f,p)=>n("error",{title:i,message:a,icon:f,duration:p}),warn:(i,a,f,p)=>n("warn",{title:i,message:a,icon:f,duration:p}),promise:(i,a,f,p)=>n("promise",{title:i,message:a,icon:f,duration:p}),clearAll:()=>o.clear()}},jt=Ga;var Xa=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>{let s=o.add({type:"drawer",props:t});return {id:s,hide:()=>e(s)}};return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:se.Right}),left:t=>r({children:t,from:se.Left}),top:t=>r({children:t,from:se.Top}),bottom:t=>r({children:t,from:se.Bottom}),close:e}},Ya=Xa;var Ja=(o,n,e={})=>{let[r,t]=react.useState(null),[s,u]=react.useState(false),{duration:l=.25,curve:m=F.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return react.useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ae({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:m,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},ja=Ja;var ti=()=>{let o=react.useContext(ce);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,t,s)=>{r.preventDefault(),o.openMenu({event:r,items:t,origin:s});},showMenu:(r,{items:t,origin:s,offsetX:u,offsetY:l,transition:m,curve:i,arrow:a,duration:f,header:p,footer:d})=>{o.openMenu({fx:{transition:m,curve:i,duration:f},parent:r,items:t,origin:s||Ke.TopCenter,offsetX:u,offsetY:l,arrow:a,header:p,footer:d});},hide:o.clear}},oi=ti;var kr=({ref:o,style:n,...e})=>{let r=react.useRef(null),t=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=R(e,t);return jsxRuntime.jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};kr.displayName="Zuz.Box";var c=kr;var Dr=react.forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=react.useState(false);return jsxRuntime.jsxs(c,{className:"--accordion flex cols",...t,children:[jsxRuntime.jsxs(z,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(c,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(c,{className:"--detail",children:r})]})});Dr.displayName="Zuz.Accordion";var li=Dr;var mi=({label:o,icon:n,onClick:e,idx:r,selected:t})=>jsxRuntime.jsx(z,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${t?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(Y,{name:n}):n}),Vr=mi;var Ar=react.forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(t||e[0].tag||0),a=react.useCallback(({x,y:h})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${h-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=react.useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",a));},[]);react.useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((x,h)=>h.label.length>x.length?h.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),l.current?.addEventListener("pointerenter",p));},[]);let{className:d,style:b,rest:w}=R(u);return jsxRuntime.jsxs(c,{ref:l,style:b,className:[`--actionbar flex aic ${d}`,`${!s||s==ee.Auto?"rel":`--${s}`}`].join(" ").trim(),...w,children:[e.map((x,h)=>jsxRuntime.jsx(Vr,{selected:m===x.tag||t==h,...x,idx:h},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(c,{className:"--tip abs",children:jsxRuntime.jsx(c,{className:"--track flex aic",children:e.map(({label:x})=>jsxRuntime.jsx(c,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Ar.displayName="Zuz.ActionBar";var di=Ar;var zr=react.forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...l}=o,{className:m,style:i,rest:a}=R(l);return jsxRuntime.jsxs(c,{className:`--alert --${e||le.Info} flex aic ${m}`.trim(),style:i,...a,children:[jsxRuntime.jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&O[e||le.Info]}),jsxRuntime.jsxs(c,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(H,{className:"--message",h:2,children:s})]})]})});zr.displayName="Zuz.Alert";var xi=zr;var _r=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:l,rest:m}=R(s),{variant:i}=X(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||i} flex ${l}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...m})};_r.displayName="Zuz.Input";var oe=_r;var Zr=o=>{let{meta:n,children:e}=o,r=hooks.useDelayed(),{label:t,icon:s,...u}=react.isValidElement(n)?{}:n,{className:l,style:m,rest:i}=R({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:m,className:l,children:n}):jsxRuntime.jsxs("li",{style:m,className:l,...i,children:[e,typeof n=="string"?n:t]})};Zr.displayName="Zuz.ListItem";var Kr=Zr;var Ur=react.forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...l}=o,{className:m,style:i,rest:a}=R(l),f=u==true?"ol":"ul";return react.createElement(f,{className:`--list --${r||W.Small} flex ${t??"cols"} ${m}`.trim(),style:i,ref:n,...a,children:e.map((p,d,b)=>{let w=`${typeof p=="string"?`li-${String(p)}`:react.isValidElement(p)?`li-${p.key}`||`${d}-${core.MD5(p.toString())}`:p.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Kr,{meta:p}),s&&b[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${w}`):null]},w)})})});Ur.displayName="Zuz.List";var Me=Ur;var qr=react.forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...l}=o,{className:m}=R({as:s||""}),{style:i}=R(l),[a,f]=react.useState(false),[p,d]=react.useState(t||[]),b=react.useRef(null),w=react.useRef(null),x=react.useRef(null),h=react.useMemo(()=>l.name||core.uuid(12),[]),[S,g]=react.useState(null),[v,I]=react.useState(null),[T,P]=react.useState([]),M=hooks.useDebounce(C=>{C.target.value==""?(f(false),d([])):r&&C.target.value.trim()!=""&&core.withPost(r,{query:C.target.value}).then(A=>{"items"in A&&core._(A.items).isArray()?(d(A.items),I(C.target.value),P(A.items)):console.error("Action Response should contain items array"),g(null);}).catch(A=>{g(null),d([]);});},250),L=()=>{if(w.current){let C=w.current.getBoundingClientRect(),A=window.innerHeight-C.bottom,$=C.top;if(x.current){let K=x.current;A<K.offsetHeight&&$>A?(K.style.top="auto",K.style.bottom=`${C.height}px`,K.style.maxHeight=`${$-150}px`):(K.style.top=`${C.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${A-150}px`);}}},V=C=>{if(p.length>0){if((C.key==="ArrowDown"||C.key==="ArrowUp")&&(C.preventDefault(),C.stopPropagation()),C.key==="Escape")g(null),f(false),d([]);else if(C.key==="ArrowDown")g(A=>{let $=A===null||A===p.length-1?0:A+1;return _($),$});else if(C.key==="ArrowUp")g(A=>{let $=A===null||A===0?p.length-1:A-1;return _($),$});else if(C.key==="Enter"&&S!==null){let A=p[S];b.current&&(b.current.value=A,f(false),d([]));}}},E=C=>{b.current&&(b.current.value=C,f(false),d([]));},_=C=>{let A=p[C];if(A&&b.current&&(b.current.value=A,b.current.setSelectionRange(A.length,A.length)),x.current){let K=x.current.children[C];K&&K.scrollIntoView({block:"nearest"});}},U=C=>{w.current&&!w.current.contains(C.target)&&(f(false),d([]));},k=()=>{b.current&&b.current.value===v&&(d(T),g(null),L());};return react.useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",U),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",U);}),[]),react.useEffect(()=>{L();},[p]),jsxRuntime.jsxs(c,{style:i,ref:w,className:`--autocomplete --${o.size||W.Small} flex aic rel ${m}`.trim(),children:[jsxRuntime.jsx(oe,{ref:b,autoComplete:"off",onChange:M,onKeyDown:V,onFocus:k,...l}),jsxRuntime.jsx(c,{className:"--arrow rel flex aic jcc",children:p.length>0?O.arrowUp:O.arrowDown}),p.length>0&&jsxRuntime.jsx(Me,{id:h,ref:x,className:"--suggestion-list flex cols abs",items:p.map((C,A)=>({label:C,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(C);},className:S===A?"--current":"",animate:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:core.clamp(.02*A,.02,.5)}}))})]})});qr.displayName="Zuz.AutoComplete";var Di=qr;var Xr=react.forwardRef((o,n)=>{let e=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:t,className:s,rest:u}=R(o,r);return !u.src||u.src==""?null:jsxRuntime.jsx("img",{ref:r,style:t,className:`${s} flex`,...u})});Xr.displayName="Zuz.Image";var Je=Xr;var Yr=react.forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:l,as:m,alt:i,color:a,style:f,...p}=o,[d,b,w]=hooks.useImage(e??"",s,u),{className:x,style:h,rest:S}=R({fx:l,as:m});return jsxRuntime.jsx(c,{className:`--avatar --${r||W.Small} --${(t||zo.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:a||"var(--primary)",...f,...h},...S,children:e?jsxRuntime.jsx(Je,{src:d,crossOrigin:s,referrerPolicy:u,...p}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Yr.displayName="Zuz.Avatar";var Zi=Yr;var Ki=({size:o=5,type:n="dead",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:l}=R(t);return jsxRuntime.jsxs(c,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsxRuntime.jsx(c,{fx:{transition:G.FadeIn,curve:F.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(ge,{})}),jsxRuntime.jsx(c,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Wi=Ki;var sl=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let o=new Date,n=o.getDay();return dateFns.addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return dateFns.format(dateFns.addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],al=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Qr=react.forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:l,rest:m}=R(s),[i,a]=react.useState(e||new Date),f=dateFns.startOfMonth(i),p=dateFns.endOfMonth(i),d=dateFns.startOfWeek(f),b=dateFns.endOfWeek(p),w=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:b}),[d,b]),x=g=>{t?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},S=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(c,{as:`--calendar flex --${r||"sm"} ${l}`,style:u,children:[jsxRuntime.jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:al(sl).map(g=>{let v=g.getDate();return jsxRuntime.jsxs(z,{onClick:()=>x(v),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:g.label}),jsxRuntime.jsx(H,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(c,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(H,{as:"flex:1 --calendar-cm bold",children:dateFns.format(i,"MMMM yyyy")}),jsxRuntime.jsx(z,{onClick:h,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(H,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),w.map((g,v)=>{let I=dateFns.isSameMonth(g,i),T=dateFns.isSameDay(g,i),P=dateFns.isToday(g);return jsxRuntime.jsx(z,{disabled:!I,onClick:()=>x(g),as:["--calendar-day --calendar-dd",`${T?"--calendar-dd-selected":""}`,`${P?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${v}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Qr.displayName="Zuz.Calendar";var io=Qr;var Jr=(n=>(n.Line="line",n))(Jr||{});var tn=react.forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:m,animated:i,animDuration:a=2,animDelay:f=0,padding:p=0,type:d,...b}=o,{className:w,style:x,rest:h}=R(b),S=react.useRef(null),g=hooks.useResizeObserver(S.current?.parentElement||S),v=typeof r=="number"?r:g.width,I=typeof t=="number"?t:g.height,T={width:v,height:I},P=react.useId(),{pathD:N,areaPathD:M}=hooks.useLineChart(e,T,p+(u||2)),L=react.useRef(null),V=react.useRef(null),[E,_]=react.useState(0),[U,k]=react.useState(0);return react.useEffect(()=>{i&&(L.current&&_(L.current.getTotalLength()),V.current&&k(V.current.getTotalLength()));},[i,N,M,v,I]),jsxRuntime.jsx(c,{ref:S,as:`--chart --${d||"line"}-chart ${w}`.trim(),style:{...x,width:r,height:t},...h,children:v>0&&I>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${v} ${I}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:P,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:l}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:m})]})}),jsxRuntime.jsx("path",{ref:V,d:M,fill:`url(#${P})`,stroke:"none",style:i?{strokeDasharray:U,strokeDashoffset:U}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:U,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:N,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:E,strokeDashoffset:E}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});tn.displayName="Zuz.Chart";var ul=tn;var on=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(on||{}),rn=(i=>(i.Image="img",i.Video="vid",i.Audio="audio",i.Link="link",i.Document="doc",i.Location="loc",i.Contact="contact",i.Event="event",i.Poll="poll",i))(rn||{});var sn=react.forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),react.useEffect(()=>{e&&u.current&&(t?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:l,style:m,rest:i}=R(s);return jsxRuntime.jsx(c,{className:`--progress ${t?"--animated":""} flex rel ${l}`.trim(),style:m,...i,children:jsxRuntime.jsx(c,{ref:u,className:"--bar rel"})})});sn.displayName="Zuz.ProgressBar";var mo=sn;var an=react.forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...m}=o,{className:i,style:a,rest:f}=R(m);return jsxRuntime.jsx(c,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxRuntime.jsxs(c,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(c,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(J,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(mo,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(c,{as:"--bubble-image",children:jsxRuntime.jsx(Je,{src:r.source})}):null:null,jsxRuntime.jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(u)}),t=="me"&&jsxRuntime.jsx(J,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});an.displayName="Zuz.Bubble";var bl=an;var ln=react.forwardRef((o,n)=>{let{style:e,className:r,rest:t}=R(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...t})});ln.displayName="Zuz.Label";var et=ln;var mn=react.forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:l,checked:m,onSwitch:i,...a}=o,[f,p]=react.useState(m||false),d=react.useRef(null),{variant:b}=X(true);return react.useImperativeHandle(n,()=>({setChecked(w,x=true){p(w),d.current&&(d.current.checked=w),x&&i&&i(w,s||"cb");},toggle(w=true){d.current&&(d.current.checked=!f),w&&i&&i&&i(!f,s||"cb"),p(!f);}})),jsxRuntime.jsxs(et,{className:`--${(t||ye.Default).toLowerCase()} ${!t||t==ye.Default?"--checkbox":"--switch"} --${l||b||W.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!t||t==ye.Default)&&O.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:w=>{i&&i(w.target.checked,s||"cb"),p(w.target.checked);}})]})});mn.displayName="Zuz.CheckBox";var tt=mn;var El=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:l,...m}=n,i=react.useRef(null),{className:a,style:f,rest:p}=R({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},i),d=react.useMemo(()=>{let w=new Set;return s.split(",").forEach(x=>{if(x.includes("-")){let[h,S]=x.split("-").map(Number);for(let g=h;g<=S;g++)w.add(g);}else x&&w.add(Number(x));}),w},[s]),b=react.useMemo(()=>{let w=e.split(`
|
|
9
|
+
document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx($t,{children:o})]})},qo=(o,n)=>{if(Ws)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Yo=({ref:o,...n})=>{let{style:e,...r}=n,{style:t,className:s,rest:u}=R(r);return jsxRuntime.jsx("span",{ref:o,style:e,className:s,...u})};Yo.displayName="Zuz.Span";var J=Yo;var Jo=react.forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:l}=X(true),{className:m,style:i,rest:a}=R(u);return jsxRuntime.jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${t||l||W.Small} ${m}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,p)=>jsxRuntime.jsx(J,{className:`path${p+1}`},`${e}-layer-${p}`))})});Jo.displayName="Zuz.Icon";var Y=Jo;var re={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var jo=o=>{let{type:n,variant:e,color:r,...t}=o,{className:s,style:u,rest:l}=R(t),{spinner:m}=X(true),i=()=>{switch(n||m?.type||re.Simple){case re.Simple:return null;case re.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{as:"--bar --bar1"}),jsxRuntime.jsx(c,{as:"--bar --bar2"}),jsxRuntime.jsx(c,{as:"--bar --bar3"})]});case re.Roller:return null}};return jsxRuntime.jsx(c,{className:`${s} --spinner --${(n||m?.type||re.Simple).toLowerCase()} --${e||m?.variant||W.Small}`.trim(),style:{...u},...l,children:i()})};jo.displayName="Zuz.Spinner";var ge=jo;var ft={Loading:"loading",Normal:"normal"};var tr=({ref:o,...n})=>{let{reset:e,kind:r="solid",variant:t,icon:s,iconSize:u,children:l,withLabel:m,spinner:i,state:a,disabled:f,...p}=n,{style:d,className:b,rest:w}=R(p),{variant:x}=X(true);return jsxRuntime.jsxs("button",{className:`--button --${r} --${t||x} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${b}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:a==ft.Loading||n.skeleton?.enabled||f,...w,children:[a==ft.Loading&&jsxRuntime.jsx(ge,{variant:t||x,type:i||re.Simple}),(!a||a==ft.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(Y,{variant:u,name:s}),m===true?jsxRuntime.jsx(J,{children:l}):l]})]})};tr.displayName="Zuz.Button";var z=tr;var rr=react.forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:l,className:m,rest:i}=R(u),a=`h${o.h||1}`;return jsxRuntime.jsx(a,{ref:n,style:l,className:m,...i,children:r?jsxRuntime.jsx(J,{dangerouslySetInnerHTML:{__html:r}}):t})});rr.displayName="Zuz.Text";var H=rr;var ta=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:l}=o;return n=="-"?jsxRuntime.jsx(c,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:m=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsxRuntime.jsx(c,{as:"--icon",children:jsxRuntime.jsx(Y,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsxRuntime.jsx(H,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},nr=ta;var ir=({ref:o,...n})=>{let{id:e,as:r,fx:t,offsetX:s,offsetY:u,parent:l,event:m,arrow:i,when:a,items:f,header:p,footer:d,origin:b=Ke.TopRight,...w}=n,[x,h]=react.useState(false),[S,g]=react.useState(f||[]),{position:v,targetRef:I,calculatedAnchor:T}=hooks.useAnchorPosition(l?.current,m,{offsetX:s,offsetY:u,preferredAnchor:b}),N=l&&v.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",M=react.useMemo(()=>{let k=T.toLowerCase();return k.includes("left")?"--arrow-left":k.includes("right")?"--arrow-right":"--arrow-center"},[T]),L=v.top!==0||v.left!==0;react.useEffect(()=>{a&&L?h(true):a||h(false);},[a,L]);let{className:V,style:E,rest:_}=R(w),U=ae({...t?.transition?{transition:t.transition??G.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:t?.curve??F.EaseInOut,duration:t?.duration??.05,when:x&&L});return jsxRuntime.jsxs(c,{ref:I,className:`--contextmenu ${i||l!=null?`--has-arrow ${N} ${M}`:""} abs flex cols ${V}`.trim(),"aria-hidden":!x,style:{...E,...U.style,top:v.top,left:v.left,visibility:L?"visible":"hidden",transformOrigin:T},..._,children:[typeof p=="function"?react.createElement(p):p,S.map((k,C)=>jsxRuntime.jsx(nr,{...k,index:C},`context-${k.label.toLowerCase()}-${C}`)),typeof d=="function"?react.createElement(d):d]})};ir.displayName="Zuz.ContextMenu";var _t=ir;var lr=react.forwardRef((o,n)=>{let{children:e,fx:r,when:t,fxDelay:s,fxStep:u,classToIgnore:l,...m}=o,i=X(true),a=hooks.useDelayed(),f=r||i?.group?.fx,p=s||i?.group?.fxDelay,d=u||i?.group?.fxStep,b=l||i?.group?.classToIgnore||"--ignore",w=react.useMemo(()=>f?react$1.addPropsToChildren(e,x=>{if(x.type===react.Fragment)return false;let h=x.props||{},S="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",v=typeof g=="string"&&g.includes(b);return !S&&!v},x=>({fx:{...f,delay:(p||0)+x*(d||.1),when:t??(r?.when||a)}})):e,[e,t,a,f]);return jsxRuntime.jsx(c,{className:"--group",ref:n,...m,children:w})});lr.displayName="Zuz.Group";var Ft=lr;var cr=react.forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:l,...m}=o,{className:i,style:a,rest:f}=R(m),{spinner:p}=X(true);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(Ft,{fx:{transition:G.SlideInBottom,curve:F.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ge,{variant:t||p?.variant||W.Small,type:r||p?.type||re.Simple}),!l&&jsxRuntime.jsx(H,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});cr.displayName="Zuz.Cover";var Ne=cr;var pr=react.forwardRef((o,n)=>{let{when:e,...r}=o;return jsxRuntime.jsx(c,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:G.FadeIn,when:e},...r})});pr.displayName="Zuz.Overlay";var Ee=pr;var ya=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),ur=ya;var wa=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsxRuntime.jsx(c,{as:`--footer flex aic rel ${n?n==_o.Center?"jcc":"":"jce"}`.trim(),children:o.map((t,s)=>jsxRuntime.jsx(z,{variant:r,onClick:u=>t.handler?t.handler():t.onClick?t.onClick():console.log("onClick Handler missing"),as:"--action",children:t.label},`dialog-${e}-action-${t.key}`))}),dr=wa;var va={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[le.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[le.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[le.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[le.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},O=va;var Sa=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(c,{as:"--head flex aic rel",children:[jsxRuntime.jsx(c,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(z,{onClick:e=>n(),className:"--closer abs center-v",children:O.close})]}),hr=Sa;var wr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:l,speed:m,type:i,action:a,actionPosition:f,spinner:p,loadingMessage:d,variant:b,inBackground:w,closeDelay:x=200,onClose:h,onShow:S,onHide:g,...v}=n,I=react.useMemo(()=>core.uuid(12),[]),[T,P]=react.useState(t||""),[N,M]=react.useState(s||""),[L,V]=react.useState(i||He.Dialog),[E,_]=react.useState(false),[U,k]=react.useState(true),[C,A]=react.useState(a||null),[$,K]=react.useState(false),{variant:D,spinner:Z,dialog:q}=X(true),te=b||q?.variant||D||W.Small,{style:j,className:pe,rest:de}=R(v),It=react.useRef(null),Nt=ae({when:E,duration:m||q?.speed||.3,delay:q?.delay||.1,transition:u||q?.transition||G.SlideInBottom,curve:l||q?.curve||F.EaseInOut,watch:["scale","filter","transform"]});react.useEffect(()=>{V(He.Dialog),M(s),P(T),C&&A(C.reduce((ne,Q)=>(ne.push({...Q,key:Q.key||core.uuid(12)}),ne),[])),_(true),setTimeout(()=>S?S():()=>{},500);},[]);let Ie=react.useMemo(()=>1e4+e*10,[e]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{style:{zIndex:Ie},when:E}),jsxRuntime.jsxs(c,{as:`--dialog --${(i??He.Default).toLowerCase()} ${E?"--visible":""} ${pe} fixed abc`.trim(),style:{...Nt.style,zIndex:Ie+1,pointerEvents:w==true?"none":"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...de,ref:It,children:[jsxRuntime.jsx(Ne,{when:$,spinner:p||q?.spinner||Z?.type||re.Simple,message:d||q?.loadingMessage}),jsxRuntime.jsx(hr,{title:T,onClose:()=>{_(false),h(r);}}),jsxRuntime.jsx(ur,{message:N,render:U,action:C}),C&&C.length>0&&jsxRuntime.jsx(dr,{variant:te,action:C,dialogID:I,actionPosition:f})]})]})};wr.displayName="Zuz.Dialog";var Zt=wr;var Kt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},qe=new Kt;var vr=react.forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:m,onScrollY:i,onScrollX:a}=hooks.useScrollbar(e||1),{style:f,className:p,rest:d}=R(t);return react.useEffect(()=>{let b=u.current;if(!b)return;let w=()=>{window.dispatchEvent(new Event("resize"));};return b.addEventListener("scroll",w),()=>b.removeEventListener("scroll",w)},[]),jsxRuntime.jsxs(c,{ref:s,className:p.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(c,{as:`--scroll-content ${p}`.trim(),ref:u,style:r||{},children:d.children}),jsxRuntime.jsx(c,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:l,onMouseDown:i})}),jsxRuntime.jsx(c,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})})]})});vr.displayName="Zuz.ScrollView";var Wt=vr;var Cr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:l,animation:m,prerender:i,inBackground:a,onClose:f,...p}=n,{drawer:d}=X(true),[b,w]=react.useState(u),[x,h]=react.useState(false),[S,g]=react.useState(i??(d?.prerender||true)),v=()=>{h(false),f?.(e??-1);},{className:I,style:T,rest:P}=R(p),N=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{qe.isTop(v)&&v();}}],[x]);hooks.useShortcuts(N),react.useEffect(()=>{w(u);},[u]),react.useEffect(()=>(x?qe.push(v):qe.pop(v),()=>qe.pop(v)),[x]),react.useEffect(()=>{h(true);},[]);let M=t||d?.from||se.Left,L=react.useMemo(()=>{switch(M){case se.Left:return {from:{x:"-100vw"},to:{x:0}};case se.Right:return {from:{x:"100vw"},to:{x:0}};case se.Top:return {from:{y:"-100vh"},to:{y:0}};case se.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,d?.from]),V=ae({from:{...L.from,opacity:0},to:{...L.to,opacity:1},when:x,curve:m||d?.animation||F.EaseInOut,duration:s||d?.speed||.5,watch:["scale","filter"]}),E=react.useMemo(()=>1e4+(r||1)*10,[r]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{onClick:_=>{x&&v();},when:x,style:{zIndex:E}}),jsxRuntime.jsxs(c,{ref:o,"aria-hidden":!x,className:`--drawer flex cols ${I} --${M.toLowerCase()} fixed`,style:{...T,...V.style,"--m":`${l||d?.margin||0}px`,zIndex:E+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...P,children:[t==se.Top||t==se.Bottom?jsxRuntime.jsx(c,{className:"--handle"}):null,jsxRuntime.jsx(Wt,{children:S||x?b:null})]})]})};Cr.displayName="Zuz.Drawer";var Yt=Cr;var Tr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Tr||{}),Pr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Da=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:l})=>{let m=hooks.useDelayed(),i=hooks.useDelayed(((u||4)-1)*1e3),{toast:a}=X(true),f=ae({when:m&&!i,duration:a?.duration||.2,transition:G.SlideInTop,curve:a?.curve||F.EaseInOut});return react.useEffect(()=>{i&&n&&l?.(n);},[i,n]),jsxRuntime.jsxs(c,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsxRuntime.jsx(c,{as:"--ico flex aic jcc",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.2,when:m&&!i},children:r?jsxRuntime.jsx(Y,{name:r,fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}}):jsxRuntime.jsx(c,{as:"--no-icon",fx:{transition:G.ScaleIn,curve:F.Spring,delay:.4,duration:.5,when:m&&!i}})}),jsxRuntime.jsxs(c,{as:"--meta",children:[jsxRuntime.jsx(H,{as:"--tt",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.3,when:m},children:t||Pr[e]}),jsxRuntime.jsx(H,{as:"--tm",fx:{transition:G.SlideInTop,curve:F.Spring,delay:.4,duration:.5,when:m},children:s})]})]})},Qt=Da;var ce=react.createContext(null),_a=({ref:o,...n})=>{let r=react.useContext(ce)?.depth??0,[t,s]=react.useState(null),[u,l]=react.useState(false),[m,i]=react.useState([]),a=hooks.useDelayed(),f=react.useRef(0),p=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};react.useImperativeHandle(o,()=>({add(h){let S=p(),g={id:S,...h};return i(v=>[...v,g]),S},openMenu(h){l(false),setTimeout(()=>{s({id:p(),type:"menu",props:h}),l(true);},16);},remove(h){i(S=>S.filter(g=>g.id!==h)),t?.id===h&&d();},clear(){i([]);}})),react.useEffect(()=>{if(t&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,d]);let b=h=>{setTimeout(()=>{i(S=>S.filter(g=>g.id!==h)),t?.id===h&&s(null);},250);},w=react.useMemo(()=>[...m.filter(h=>h.type!="toast")],[m]);if(!a)return null;let x=m.filter(h=>h.type=="toast").reverse();return reactDom.createPortal(jsxRuntime.jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[w.map((h,S)=>{let g=S<w.length-1;return h.type==="dialog"?jsxRuntime.jsx(Zt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(Yt,{onClose:b,index:S,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),x.length>0&&jsxRuntime.jsx(c,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:x.map((h,S)=>jsxRuntime.jsx(Qt,{onClose:b,index:S,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsxRuntime.jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(_t,{onClose:d,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},Fa=({children:o})=>{let n=react.useContext(ce),e=n?n.depth+1:0,r=react.useRef(null),t=react.useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),clear:()=>r.current?.clear(),depth:e,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(ce.Provider,{value:t,children:[o,jsxRuntime.jsx(_a,{ref:r})]})},$t=Fa;var Ka=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t);return {clearAll:n,show:t=>{let s=o.add({type:"dialog",props:{...t,type:He.Dialog}});return {id:s,hide:()=>e(s)}},hide:e}},Wa=Ka;var Ga=()=>{let o=react.useContext(ce);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,a)=>o.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,p)=>n("default",{title:i,message:a,icon:f,duration:p}),hide:i=>o.remove(i),success:(i,a,f,p)=>n("success",{title:i,message:a,icon:f,duration:p}),error:(i,a,f,p)=>n("error",{title:i,message:a,icon:f,duration:p}),warn:(i,a,f,p)=>n("warn",{title:i,message:a,icon:f,duration:p}),promise:(i,a,f,p)=>n("promise",{title:i,message:a,icon:f,duration:p}),clearAll:()=>o.clear()}},jt=Ga;var Xa=()=>{let o=react.useContext(ce);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>{let s=o.add({type:"drawer",props:t});return {id:s,hide:()=>e(s)}};return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:se.Right}),left:t=>r({children:t,from:se.Left}),top:t=>r({children:t,from:se.Top}),bottom:t=>r({children:t,from:se.Bottom}),close:e}},Ya=Xa;var Ja=(o,n,e={})=>{let[r,t]=react.useState(null),[s,u]=react.useState(false),{duration:l=.25,curve:m=F.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return react.useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ae({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:m,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},ja=Ja;var ti=()=>{let o=react.useContext(ce);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,t,s)=>{r.preventDefault(),o.openMenu({event:r,items:t,origin:s});},showMenu:(r,{items:t,origin:s,offsetX:u,offsetY:l,transition:m,curve:i,arrow:a,duration:f,header:p,footer:d})=>{o.openMenu({fx:{transition:m,curve:i,duration:f},parent:r,items:t,origin:s||Ke.TopCenter,offsetX:u,offsetY:l,arrow:a,header:p,footer:d});},hide:o.clear}},oi=ti;var kr=({ref:o,style:n,...e})=>{let r=react.useRef(null),t=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=R(e,t);return jsxRuntime.jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};kr.displayName="Zuz.Box";var c=kr;var Dr=react.forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=react.useState(false);return jsxRuntime.jsxs(c,{className:"--accordion flex cols",...t,children:[jsxRuntime.jsxs(z,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(H,{className:"--label flex",children:e}),jsxRuntime.jsx(c,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(c,{className:"--detail",children:r})]})});Dr.displayName="Zuz.Accordion";var li=Dr;var mi=({label:o,icon:n,onClick:e,idx:r,selected:t})=>jsxRuntime.jsx(z,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${t?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(Y,{name:n}):n}),Vr=mi;var Ar=react.forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(t||e[0].tag||0),a=react.useCallback(({x,y:h})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${h-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=react.useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",a));},[]);react.useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((x,h)=>h.label.length>x.length?h.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),l.current?.addEventListener("pointerenter",p));},[]);let{className:d,style:b,rest:w}=R(u);return jsxRuntime.jsxs(c,{ref:l,style:b,className:[`--actionbar flex aic ${d}`,`${!s||s==ee.Auto?"rel":`--${s}`}`].join(" ").trim(),...w,children:[e.map((x,h)=>jsxRuntime.jsx(Vr,{selected:m===x.tag||t==h,...x,idx:h},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(c,{className:"--tip abs",children:jsxRuntime.jsx(c,{className:"--track flex aic",children:e.map(({label:x})=>jsxRuntime.jsx(c,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Ar.displayName="Zuz.ActionBar";var di=Ar;var zr=react.forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...l}=o,{className:m,style:i,rest:a}=R(l);return jsxRuntime.jsxs(c,{className:`--alert --${e||le.Info} flex aic ${m}`.trim(),style:i,...a,children:[jsxRuntime.jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&O[e||le.Info]}),jsxRuntime.jsxs(c,{className:"--meta flex cols",children:[jsxRuntime.jsx(H,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(H,{className:"--message",h:2,children:s})]})]})});zr.displayName="Zuz.Alert";var xi=zr;var _r=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:l,rest:m}=R(s),{variant:i}=X(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e||i} flex ${l}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...m})};_r.displayName="Zuz.Input";var oe=_r;var Zr=o=>{let{meta:n,children:e}=o,r=hooks.useDelayed(),{label:t,icon:s,...u}=react.isValidElement(n)?{}:n,{className:l,style:m,rest:i}=R({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:m,className:l,children:n}):jsxRuntime.jsxs("li",{style:m,className:l,...i,children:[e,typeof n=="string"?n:t]})};Zr.displayName="Zuz.ListItem";var Kr=Zr;var Ur=react.forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...l}=o,{className:m,style:i,rest:a}=R(l),f=u==true?"ol":"ul";return react.createElement(f,{className:`--list --${r||W.Small} flex ${t??"cols"} ${m}`.trim(),style:i,ref:n,...a,children:e.map((p,d,b)=>{let w=`${typeof p=="string"?`li-${String(p)}`:react.isValidElement(p)?`li-${p.key}`||`${d}-${core.MD5(p.toString())}`:p.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Kr,{meta:p}),s&&b[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${w}`):null]},w)})})});Ur.displayName="Zuz.List";var Me=Ur;var qr=react.forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...l}=o,{className:m}=R({as:s||""}),{style:i}=R(l),[a,f]=react.useState(false),[p,d]=react.useState(t||[]),b=react.useRef(null),w=react.useRef(null),x=react.useRef(null),h=react.useMemo(()=>l.name||core.uuid(12),[]),[S,g]=react.useState(null),[v,I]=react.useState(null),[T,P]=react.useState([]),M=hooks.useDebounce(C=>{C.target.value==""?(f(false),d([])):r&&C.target.value.trim()!=""&&core.withPost(r,{query:C.target.value}).then(A=>{"items"in A&&core._(A.items).isArray()?(d(A.items),I(C.target.value),P(A.items)):console.error("Action Response should contain items array"),g(null);}).catch(A=>{g(null),d([]);});},250),L=()=>{if(w.current){let C=w.current.getBoundingClientRect(),A=window.innerHeight-C.bottom,$=C.top;if(x.current){let K=x.current;A<K.offsetHeight&&$>A?(K.style.top="auto",K.style.bottom=`${C.height}px`,K.style.maxHeight=`${$-150}px`):(K.style.top=`${C.height+5}px`,K.style.bottom="auto",K.style.maxHeight=`${A-150}px`);}}},V=C=>{if(p.length>0){if((C.key==="ArrowDown"||C.key==="ArrowUp")&&(C.preventDefault(),C.stopPropagation()),C.key==="Escape")g(null),f(false),d([]);else if(C.key==="ArrowDown")g(A=>{let $=A===null||A===p.length-1?0:A+1;return _($),$});else if(C.key==="ArrowUp")g(A=>{let $=A===null||A===0?p.length-1:A-1;return _($),$});else if(C.key==="Enter"&&S!==null){let A=p[S];b.current&&(b.current.value=A,f(false),d([]));}}},E=C=>{b.current&&(b.current.value=C,f(false),d([]));},_=C=>{let A=p[C];if(A&&b.current&&(b.current.value=A,b.current.setSelectionRange(A.length,A.length)),x.current){let K=x.current.children[C];K&&K.scrollIntoView({block:"nearest"});}},U=C=>{w.current&&!w.current.contains(C.target)&&(f(false),d([]));},k=()=>{b.current&&b.current.value===v&&(d(T),g(null),L());};return react.useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",U),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",U);}),[]),react.useEffect(()=>{L();},[p]),jsxRuntime.jsxs(c,{style:i,ref:w,className:`--autocomplete --${o.size||W.Small} flex aic rel ${m}`.trim(),children:[jsxRuntime.jsx(oe,{ref:b,autoComplete:"off",onChange:M,onKeyDown:V,onFocus:k,...l}),jsxRuntime.jsx(c,{className:"--arrow rel flex aic jcc",children:p.length>0?O.arrowUp:O.arrowDown}),p.length>0&&jsxRuntime.jsx(Me,{id:h,ref:x,className:"--suggestion-list flex cols abs",items:p.map((C,A)=>({label:C,onClick:$=>{$.preventDefault(),$.stopPropagation(),E(C);},className:S===A?"--current":"",animate:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:core.clamp(.02*A,.02,.5)}}))})]})});qr.displayName="Zuz.AutoComplete";var Di=qr;var Xr=react.forwardRef((o,n)=>{let e=react.useRef(null),r=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:t,className:s,rest:u}=R(o,r);return !u.src||u.src==""?null:jsxRuntime.jsx("img",{ref:r,style:t,className:`${s} flex`,...u})});Xr.displayName="Zuz.Image";var Je=Xr;var Yr=react.forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:l,as:m,alt:i,color:a,style:f,...p}=o,[d,b,w]=hooks.useImage(e??"",s,u),{className:x,style:h,rest:S}=R({fx:l,as:m});return jsxRuntime.jsx(c,{className:`--avatar --${r||W.Small} --${(t||zo.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:a||"var(--primary)",...f,...h},...S,children:e?jsxRuntime.jsx(Je,{src:d,crossOrigin:s,referrerPolicy:u,...p}):jsxRuntime.jsx(H,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Yr.displayName="Zuz.Avatar";var Zi=Yr;var Ki=({size:o=5,type:n="dead",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:l}=R(t);return jsxRuntime.jsxs(c,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsxRuntime.jsx(c,{fx:{transition:G.FadeIn,curve:F.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(ge,{})}),jsxRuntime.jsx(c,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Wi=Ki;var sl=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let o=new Date,n=o.getDay();return dateFns.addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return dateFns.format(dateFns.addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],al=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Qr=react.forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:l,rest:m}=R(s),[i,a]=react.useState(e||new Date),f=dateFns.startOfMonth(i),p=dateFns.endOfMonth(i),d=dateFns.startOfWeek(f),b=dateFns.endOfWeek(p),w=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:b}),[d,b]),x=g=>{t?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},S=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(c,{as:`--calendar flex --${r||"sm"} ${l}`,style:u,children:[jsxRuntime.jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:al(sl).map(g=>{let v=g.getDate();return jsxRuntime.jsxs(z,{onClick:()=>x(v),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(H,{as:"flex:1",children:g.label}),jsxRuntime.jsx(H,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(c,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(H,{as:"flex:1 --calendar-cm bold",children:dateFns.format(i,"MMMM yyyy")}),jsxRuntime.jsx(z,{onClick:h,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(H,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),w.map((g,v)=>{let I=dateFns.isSameMonth(g,i),T=dateFns.isSameDay(g,i),P=dateFns.isToday(g);return jsxRuntime.jsx(z,{disabled:!I,onClick:()=>x(g),as:["--calendar-day --calendar-dd",`${T?"--calendar-dd-selected":""}`,`${P?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${v}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Qr.displayName="Zuz.Calendar";var io=Qr;var Jr=(n=>(n.Line="line",n))(Jr||{});var tn=react.forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:m,animated:i,animDuration:a=2,animDelay:f=0,padding:p=0,type:d,...b}=o,{className:w,style:x,rest:h}=R(b),S=react.useRef(null),g=hooks.useResizeObserver(S.current?.parentElement||S),v=typeof r=="number"?r:g.width,I=typeof t=="number"?t:g.height,T={width:v,height:I},P=react.useId(),{pathD:N,areaPathD:M}=hooks.useLineChart(e,T,p+(u||2)),L=react.useRef(null),V=react.useRef(null),[E,_]=react.useState(0),[U,k]=react.useState(0);return react.useEffect(()=>{i&&(L.current&&_(L.current.getTotalLength()),V.current&&k(V.current.getTotalLength()));},[i,N,M,v,I]),jsxRuntime.jsx(c,{ref:S,as:`--chart --${d||"line"}-chart ${w}`.trim(),style:{...x,width:r,height:t},...h,children:v>0&&I>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${v} ${I}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:P,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:l}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:m})]})}),jsxRuntime.jsx("path",{ref:V,d:M,fill:`url(#${P})`,stroke:"none",style:i?{strokeDasharray:U,strokeDashoffset:U}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:U,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:N,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:E,strokeDashoffset:E}:{},children:i&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:E,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});tn.displayName="Zuz.Chart";var ul=tn;var on=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(on||{}),rn=(i=>(i.Image="img",i.Video="vid",i.Audio="audio",i.Link="link",i.Document="doc",i.Location="loc",i.Contact="contact",i.Event="event",i.Poll="poll",i))(rn||{});var sn=react.forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),react.useEffect(()=>{e&&u.current&&(t?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:l,style:m,rest:i}=R(s);return jsxRuntime.jsx(c,{className:`--progress ${t?"--animated":""} flex rel ${l}`.trim(),style:m,...i,children:jsxRuntime.jsx(c,{ref:u,className:"--bar rel"})})});sn.displayName="Zuz.ProgressBar";var mo=sn;var an=react.forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...m}=o,{className:i,style:a,rest:f}=R(m);return jsxRuntime.jsx(c,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxRuntime.jsxs(c,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsxRuntime.jsx(H,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxRuntime.jsxs(c,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(J,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(mo,{progress:.7}),jsxRuntime.jsx(H,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsxRuntime.jsx(c,{as:"--bubble-image",children:jsxRuntime.jsx(Je,{src:r.source})}):null:null,jsxRuntime.jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(H,{className:"--bubble-stamp tar",children:core.timeSince(u)}),t=="me"&&jsxRuntime.jsx(J,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});an.displayName="Zuz.Bubble";var bl=an;var ln=react.forwardRef((o,n)=>{let{style:e,className:r,rest:t}=R(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:r,...t})});ln.displayName="Zuz.Label";var et=ln;var mn=react.forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:l,checked:m,onSwitch:i,...a}=o,[f,p]=react.useState(m||false),d=react.useRef(null),{variant:b}=X(true);return react.useImperativeHandle(n,()=>({setChecked(w,x=true){p(w),d.current&&(d.current.checked=w),x&&i&&i(w,s||"cb");},toggle(w=true){d.current&&(d.current.checked=!f),w&&i&&i&&i(!f,s||"cb"),p(!f);}})),jsxRuntime.jsxs(et,{className:`--${(t||ye.Default).toLowerCase()} ${!t||t==ye.Default?"--checkbox":"--switch"} --${l||b||W.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!t||t==ye.Default)&&O.check,jsxRuntime.jsx(oe,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:w=>{i&&i(w.target.checked,s||"cb"),p(w.target.checked);}})]})});mn.displayName="Zuz.CheckBox";var tt=mn;var El=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:l,...m}=n,i=react.useRef(null),{className:a,style:f,rest:p}=R({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},i),d=react.useMemo(()=>{let w=new Set;return s.split(",").forEach(x=>{if(x.includes("-")){let[h,S]=x.split("-").map(Number);for(let g=h;g<=S;g++)w.add(g);}else x&&w.add(Number(x));}),w},[s]),b=react.useMemo(()=>{let w=e.split(`
|
|
10
10
|
`);for(;w.length>0&&w[0].trim()==="";)w.shift();for(;w.length>0&&w[w.length-1].trim()==="";)w.pop();let x=w[0]?.match(/^\s*/)?.[0].length||0,h=w.map(g=>{let v=g.match(/^\s*/)?.[0].length||0,I=Math.min(v,x);return g.slice(I)}),S=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(<\/?[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 h.map((g,v)=>{let I=g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),T=d.has(v+1),P=[];S.forEach(N=>{I=I.replace(N.re,M=>{let L=`ZUZ_ID_${P.length}_ZUZ`;return P.push(`<span class="--token-${N.name}">${M}</span>`),L});});for(let N=P.length-1;N>=0;N--)I=I.replace(`ZUZ_ID_${N}_ZUZ`,P[N]);return `<div class="--code-line ${t==true?"--with-ln":""} ${T?"--is-highlighted":""}">
|
|
11
11
|
${t==true?`<span class="--line-number">${v+1}</span>`:""}
|
|
12
12
|
<span class="--line-content">${I||" "}</span>
|
|
13
13
|
</div>`}).join("")},[e,d]);return jsxRuntime.jsx(c,{as:`--code-block ${a}`,style:f,...m,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:b}})})})},Bl=El;var pn=({onSelect:o,meta:n,selected:e})=>{let r=react.useRef(null),{index:t,icon:s,label:u}=n,[l,m]=react.useState({x:0,width:0}),i=hooks.useDelayed();return react.useLayoutEffect(()=>{if(i&&r.current){let{width:a,x:f}=r.current.getBoundingClientRect();m({x:f,width:a}),e&&o(t,a,f,n,true);}},[i,r.current]),react.useEffect(()=>{e&&o(t,l.width,l.x,n,false);},[e]),jsxRuntime.jsxs(z,{onClick:()=>o(t,l.width,l.x,n,false),ref:r,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(Y,{name:s,as:"--segment-icon"}):jsxRuntime.jsx(c,{as:"--segment-icon flex aic jcc",children:s}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(c,{className:"--segment-label",children:u||`Item ${t}`})]})};pn.displayName="SelectTabItem";var un=pn;var dn=react.forwardRef((o,n)=>{let{fx:e,items:r,selected:t,variant:s,onSwitch:u,...l}=o,[m,i]=react.useState(t||0),a=react.useRef(false),f=react.useRef(m),{className:p,style:d,rest:b}=R(l),w=react.useRef(null),x=react.useRef(null),{variant:h}=X(true),S=(g,v,I,T,P)=>{if((P||m!=g&&m!=-2)&&(i(g),f.current=m,a.current&&u?.(T)),w.current){let N=x.current?.getBoundingClientRect();w.current.style.setProperty("--w",`${v}px`),w.current.style.setProperty("--x",`${N?I-N.left:I}px`);}};return react.useImperativeHandle(n,()=>({setSelected:g=>{typeof g=="number"&&g!=m&&i(g);}}),[m]),react.useEffect(()=>{a.current=true;},[]),jsxRuntime.jsxs(c,{ref:x,"data-selected":m,className:`${p} --segmented --${s||h||W.Medium} flex aic rel`,style:d,...b,children:[jsxRuntime.jsx(c,{ref:w,className:"--segment-tab abs"}),r.map((g,v)=>jsxRuntime.jsx(un,{onSelect:S,selected:m==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});dn.displayName="Zuz.SelectTabs";var ot=dn;var xn=react.forwardRef((o,n)=>{let{type:e,...r}=o,t=hooks.useDelayed(),{colorScheme:s,setColorScheme:u}=At(),l=react.useCallback(()=>{u(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:m,style:i}=R(r),a=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !t||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(ot,{className:`--color-scheme --${e}`,onSwitch:({tag:p})=>{u(p);},selected:f,items:a,...r}):jsxRuntime.jsx(z,{onClick:l,style:i,as:`--color-scheme-switch --${r.variant||W.Small} ${m}`.trim(),children:s=="system"?O.colorSchemeSystem:s=="light"?O.colorSchemeLight:O.colorSchemeDark})});xn.displayName="Zuz.ColorScheme";var Wl=xn;var bn=react.forwardRef((o,n)=>{let[e,r]=react.useState("wait"),{title:t,message:s,acceptLabel:u,rejectLabel:l,position:m}=o,i=async a=>{r(a==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(a));};return react.useEffect(()=>{let a=localStorage.getItem("--ccnt");r(a?a=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(c,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:F.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${m||ee.Left} flex cols`,children:[jsxRuntime.jsx(H,{as:"--title",children:t||"This site uses cookies"}),jsxRuntime.jsx(H,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(c,{as:"--footer flex aic",children:[jsxRuntime.jsx(z,{onClick:a=>i(1),as:"--accept",children:u||"Accept All"}),jsxRuntime.jsx(z,{onClick:a=>i(0),as:"--reject",children:l||"Cancel"})]})]})});bn.displayName="Zuz.CookiesConsent";var Xl=bn;var Sn=react.forwardRef((o,n)=>{let {type:e,value:r,min:t,max:s,step:u,onChange:l,roundValue:m,...i}=o,{className:a,style:f,rest:p}=R(i),d=react.useRef(u||.01).current,b=react.useRef(t||0).current,w=react.useRef(s||1).current,x=react.useRef(r||0).current,h=react.useRef(null),S=react.useRef(null),g=react.useRef(null);react.useRef(null);let I=react.useRef(null),T=react.useRef(null),P=($,K,D)=>($-K)/(D-K)*100,N=$=>{if(S.current){let K=parseFloat($.currentTarget.value),D=P(K,parseFloat($.currentTarget.min),parseFloat($.currentTarget.max));S.current.style.setProperty("--value",`${D}`),S.current.setAttribute("data-value",`${K}`),l&&l(m?+K.toFixed(2):K);}},[M,L]=react.useState(false),[V,E]=react.useState(0),[_,U]=react.useState(0),k=$=>{L(true),E($.clientX),U(S.current?parseFloat(S.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},C=$=>{if(M){let K=$.clientX-V,D=Math.max(b,Math.min(_+K*d,w));S.current&&(S.current.setAttribute("data-value",`${D}`),T.current.textContent=m?D.toFixed(2):D.toString(),l&&l(m?+D.toFixed(2):D));}},A=()=>{L(false),document.body.style.cursor="auto";};return react.useEffect(()=>{S.current&&S.current.style.setProperty("--value",h.current?`${P(parseFloat(h.current.value),parseFloat(h.current.min),parseFloat(h.current.max))}`:x.toString());},[]),react.useEffect(()=>(M?(document.addEventListener("mousemove",C),document.addEventListener("mouseup",A)):(document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A)),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",A);}),[M]),jsxRuntime.jsx(c,{ref:S,"data-value":x||0,className:`--slider --${e||mt.Default} flex rel ${a}`.trim(),style:{...f},children:mt.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(H,{ref:T,onMouseDown:k,className:"--slider-text",children:x||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{ref:I,className:"--slider-track abs fill"}),jsxRuntime.jsx(c,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(oe,{ref:h,onInput:N,className:"abs fill",tabIndex:0,type:e||mt.Default,defaultValue:x||0,step:d,max:w,min:b})]})})});Sn.displayName="Zuz.Slider";var go=Sn;var Tn=react.forwardRef((o,n)=>{let{src:e,shape:r,size:t,...s}=o,{style:u,className:l,rest:m}=R(s),{canvasRef:i,crop:a,setScale:f,handleMouseDown:p,handleMouseUp:d,handleMouseMove:b}=hooks.useImageCropper(e,t||200,r||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return a()},setScale(w){f(w);}})),jsxRuntime.jsxs(c,{as:`--cropper --${r||hooks.CropShape.Circle} ${l}`,style:u,...m,children:[jsxRuntime.jsx("canvas",{ref:i,width:t||200,height:t||200,onMouseDown:p,onMouseUp:d,onMouseLeave:d,onMouseMove:b}),jsxRuntime.jsx(c,{as:"--cropper-slider",children:jsxRuntime.jsx(go,{onChange:w=>f(w),min:0,max:1,step:.01,value:1})})]})});Tn.displayName="Zuz.Cropper";var tm=Tn;var rm=(e=>(e.Circle="circle",e.Square="square",e))(rm||{});var Rn=react.forwardRef((o,n)=>{let{items:e,maxItems:r}=o,t=react.useMemo(()=>{let l=typeof e=="string",m=l?[]:e;return l&&e.split(",").forEach(i=>{m.push({label:i});}),m},[e]),u=react.useMemo(()=>r&&r>0&&t.length>r-1,[t,r])?[...t.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...t.slice(-r)]:t;return jsxRuntime.jsx(Me,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(c,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:u.map((l,m,i)=>l.ID=="."?jsxRuntime.jsx(c,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(c,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${m}`))}):jsxRuntime.jsxs(z,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!i[m+1],children:[l.icon&&jsxRuntime.jsx(Y,{as:"--crumb-icon",name:l.icon}),jsxRuntime.jsx(H,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${m}`))})});Rn.displayName="Zuz.Crumb";var sm=Rn;var En=react.forwardRef((o,n)=>{let{icon:e,defaultValue:r,value:t,size:s,variant:u,numeric:l,type:m,onConfirm:i,...a}=o,[f,p]=react.useState(false),[d,b]=react.useState(r||null),{style:w,className:x,rest:h}=R(a),S=react.useRef(null),g=react.useRef(null),{reposition:v}=Ue(g,{direction:ee.Bottom,offset:2}),I=P=>{l&&(P.currentTarget.value=P.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let P=N=>{let M=N.target,L=S.current?.contains(M),V=g.current?.contains(M);!L&&!V&&p(false);};return f&&document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P);}},[f]),react.useEffect(()=>{let P=N=>{N.key==="Escape"&&f&&(p(false),S.current?.focus());};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[f]);let T=()=>{p(true);};return react.useEffect(()=>{f&&v();},[f,v]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(c,{as:`--date-picker ${u?`--${u}`:""} rel flex aic ${x}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(Y,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(J,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):t||"",className:`--input ${u?`--${u}`:""} flex`.trim(),style:w,onFocus:T,onInput:I,autoComplete:"new-password",onKeyDown:P=>{P.key=="Enter"&&i?.(P.currentTarget.value);},...h}),jsxRuntime.jsx(c,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${u?`--${u}`:""}`,children:jsxRuntime.jsx(io,{defaultValue:d,onChange:P=>{b(P),p(false);}})})]})})});En.displayName="Zuz.DatePicker";var mm=En;var Bn=react.forwardRef((o,n)=>{let{icon:e,variant:r,position:t}=o;return jsxRuntime.jsx(z,{className:`--fab fixed --${r||W.Large} --${t||"bottomright"}`,children:e||O.plus})});Bn.displayName="Zuz.Fab";var fm=Bn;var Ln=o=>{let{names:n,strength:e}=o,r={[ct.Gooey]:t=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:t||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${ct.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[ct.Gooey]).map(t=>r[t](e))})})};Ln.displayName="Zuz.Filters";var hm=Ln;var Te=null,ie=null,kn=react.forwardRef((o,n)=>{let{title:e,message:r,transition:t,curve:s,speed:u,type:l,actionPosition:m,spinner:i,loadingMessage:a,onShow:f,onHide:p,...d}=o,{className:b,style:w,rest:x}=R(d),[h,S]=react.useState(e||""),[g,v]=react.useState(r||""),[I,T]=react.useState(null),[P,N]=react.useState(l||me.Default),M=react.useMemo(()=>core.uuid(12),[]),[L,V]=react.useState(false),E=react.useRef(null),_=react.useRef(null),[U,k]=react.useState(false),[C,A]=react.useState(true),$=react.useRef(null),K=g;react.useImperativeHandle(n,()=>({setLoading(Z){k(Z);},showDialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),q&&v(q),Z&&S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(Z,q,te,j){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),E.current.classList.remove("--wobble"),setTimeout(()=>E.current.classList.add("--wobble"),50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),ie=null;},500)),N(me.Dialog),v(q),S(Z),te&&T(te.reduce((pe,de)=>(pe.push({...de,key:de.key||core.uuid(12)}),pe),[])),V(true),setTimeout(()=>j?j():()=>{},1e3);},error(Z,q){this.show(Z,q,me.Error);},warn(Z,q){this.show(Z,q,me.Warn);},success(Z,q){this.show(Z,q,me.Success);},show(Z,q,te){Te&&(clearTimeout(Te),ie&&clearTimeout(ie),_.current=E.current.style.transform,E.current.style.transform="",E.current.classList.remove("--wobble"),setTimeout(()=>{E.current.classList.add("--wobble"),E.current.style.transform=`${_.current} scale(.9)`.trim();},50),ie=setTimeout(()=>{E.current.classList.remove("--wobble"),E.current.style.transform=_.current||"",ie=null;},500)),Te=setTimeout(()=>{V(false),Te=null,ie=null;},(q||4)*1e3),N(te||me.Default),v(Z),V(true),f?.();},hide(){V(false),p?.();}}));let D=react.useMemo(()=>{let Z={when:L,duration:u||.3,delay:.1};if(P==me.Dialog){if(t){let{from:q,to:te}=We(t,20);return {from:q,to:te,curve:s||F.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:F.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:F.Spring,...Z}},[L,P]);return react.useEffect(()=>{$.current&&clearTimeout($.current),L?A(true):$.current=setTimeout(()=>A(false),1e3);},[L]),P==me.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Ee,{when:L}),jsxRuntime.jsxs(c,{className:`--sheet --sheet-${P.toLowerCase()} ${L?"is-visible":""} ${b} fixed`.trim(),style:w,fx:D,...x,ref:E,children:[jsxRuntime.jsx(Ne,{when:U,spinner:i,message:a}),jsxRuntime.jsxs(c,{className:"--head flex aic rel",children:[jsxRuntime.jsx(c,{className:`--${h?"title":"dot"} flex aic rel`,children:h||""}),jsxRuntime.jsx(z,{onClick:Z=>V(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(c,{className:`--body flex aic rel ${I?"":"--no-action"}`.trim(),children:C?K:null}),I&&jsxRuntime.jsx(c,{className:`--footer flex aic rel ${m?m==Lt.Center?"jcc":"":"jce"}`.trim(),children:I.map((Z,q)=>jsxRuntime.jsx(z,{onClick:te=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${M}-action-${Z.key}`))})]})]}):jsxRuntime.jsx(c,{className:`--sheet --sheet-${P.toLowerCase()} ${b} abs`.trim(),style:w,...x,fx:D,ref:E,children:L?g:null})}),nt=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;kn.displayName="Zuz.Sheet";var vm=kn;var On=({ref:o,...n})=>{let{name:e,cover:r,spinner:t,errors:s,action:u,children:l,withData:m,beforeSubmit:i,onSubmit:a,onError:f,onSuccess:p,resetOnSuccess:d,...b}=n,{className:w,style:x,rest:h}=R(b),[S,g]=react.useState(false),v=react.useRef(null),I=react.useRef(null),T=react.useRef(null),P=jt(),N=react.useCallback(C=>v.current?v.current.querySelectorAll(C):[],[v.current]),M=C=>({name:C.name||C.getAttribute("name")||C.getAttribute("data-name"),required:C.required?true:C.getAttribute("data-required")?C.getAttribute("data-required")=="true":false,with:C.with||C.getAttribute("with")}),L=C=>{let A=[];return C.querySelectorAll(".--input").forEach($=>{A.push($.value);}),A.join("")},V=react.useCallback(C=>{let{required:$}=M(C);if($){if(C.type=="checkbox"&&C.checked==false)return false;if(C.classList.contains("--otp")){let D=L(C);if(D==""||D.length<parseInt(C.getAttribute("data-size")))return false}if(C.classList.contains("--select")&&C.querySelector("button.--selected").dataset.value=="-1"||C.value=="")return false}if(C.getAttribute("with")){let D=C.getAttribute("with");switch(D.includes("@")&&(D=D.split("@")[0],D=="match"&&(D=be.MatchField)),D.toUpperCase()){case be.IPV4:return core._(C.value).isIPv4();case be.IPV6:return core._(C.value).isIPv6();case be.Email:return core._(C.value).isEmail();case be.Uri:try{return new URL(C.value),!0}catch{return false}case be.Password:return console.log("Add FORMVALIDATION.Password"),false;case be.MatchField:let[Z,q,te]=C.getAttribute("with").split("@"),j=document.querySelector(`[name=${q.trim()}]`);if(!j)return false;switch(te||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=C.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&C.classList.contains("--otp")&&L(j)!=L(C))return false;if(j&&j.value!=C.value)return false;break}break;default:return true}}return true},[v.current]),E=react.useCallback(()=>{let C={},A={},$=null,K=null;if(Array.from(N("[name]")).forEach(D=>{let{name:Z,required:q,with:te}=M(D),j=true;(q||te)&&(j=V(D)),C[Z]={valid:j,value:D.type=="checkbox"?D.checked==true?D.value:false:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value},A[Z]=D.type=="checkbox"?D.checked==true:D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value,j?D.classList.remove("input-with-error"):($==null&&s&&($=D,K=s[Z]),D.classList.add("input-with-error"));}),$){let D=$;if(D.classList.contains("--otp"))for(let Z of Array.from(D.querySelectorAll(".--input"))){let q=Z;if(q.value==""){q.focus();break}}else D.focus();}return {error:$!=null,errorMsg:K||"Fix errors to continue...",data:C,payload:A}},[v.current]),_=react.useCallback(()=>{let{error:C,errorMsg:A,payload:$}=E();C?P.error(A):u?react.startTransition(async()=>{i&&i($),nt(r)?r.setLoading(true):g(true),P.clearAll(),core.withPost(u,{...$,...m||{}}).then(K=>{let D=K;nt(r)?r.setLoading(false):g(false),d&&Array.from(N("[name]")).forEach(Z=>{Z instanceof HTMLInputElement&&(Z.value="");}),p?p(D):(P.clearAll(),P.success(D.message||"Redirecting..."));}).catch(K=>{nt(r)?r.setLoading(false):g(false),f?f(K):P.error(K.message||"We cannot process your request at this time.");});}):a&&a($);},[u,I.current,v.current]),U=react.useCallback(()=>{let C=N("[type=submit]");!C||C.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):C.forEach(A=>{A.addEventListener("click",_);});},[v.current]),k=react.useMemo(()=>react$1.addPropsToChildren(l,C=>C.props.type=="submit",C=>({ref:T})),[l]);return react.useImperativeHandle(o,()=>({setLoading(C){if(C){I.current?.hide();try{P.clearAll();}catch{}}g(C);},showError(C){typeof C=="string"?P.error(C):I.current.error(C,4);},hideError(){I.current.hide();try{P.clearAll();}catch{}},init(){U();},submit(){_();}})),react.useEffect(U,[]),jsxRuntime.jsxs(c,{ref:v,style:x,className:`--form flex rel ${w} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!nt(r)&&jsxRuntime.jsx(Ne,{message:r?r.message||void 0:"working",spinner:t,color:r&&"color"in r?r.color:"#ffffff",when:S}),k]})};On.displayName="Zuz.Form";var Bm=On;var Dn=o=>{let {ref:n,cols:e,rows:r,gap:t,gapX:s,gapY:u,align:l,justify:m,inline:i,flow:a,autoCols:f,autoRows:p,template:d,...b}=o;react.useRef(null);let {className:x,style:h,rest:S}=R(b),g=I=>typeof I=="number"?`repeat(${I}, 1fr)`:I,v={display:i?"inline-grid":"grid",gridTemplateColumns:g(e),gridTemplateRows:g(r),gap:t,columnGap:s,rowGap:u,alignItems:l,justifyContent:m==="between"?"space-between":m==="around"?"space-around":m,gridAutoFlow:a,gridAutoColumns:f,gridAutoRows:p,gridTemplateAreas:d,...h};return jsxRuntime.jsx(c,{ref:n,as:`--grid ${x}`.trim(),style:v,...S})};Dn.displayName="Zuz.Grid";var Om=Dn;var Hn=o=>typeof o=="string"&&o.includes("+"),Vn={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},An={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var zn=react.forwardRef(({children:o,keys:n,variant:e},r)=>{let t=react.useMemo(()=>{if(Hn(n)){let s=null;return {keys:String(n).split("+").reduce((l,m,i,a)=>(a[i+1]?l.push(m):s=m.toUpperCase(),l),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(c,{as:`--keyboard-keys --${e||W.Small} flex aic`,children:[(Array.isArray(t.keys)?t.keys:[t.keys]).map(s=>jsxRuntime.jsx("abbr",{title:An[s],children:Vn[s]},s)),jsxRuntime.jsx(J,{children:t?.children??o})]})});zn.displayName="Zuz.KeyboardKeys";var So=zn;var Fn=react.forwardRef((o,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:r,offlineMessage:t,variant:s}=o;return jsxRuntime.jsxs(c,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:F.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||W.Small} fixed flex`,children:[jsxRuntime.jsx(c,{className:"--ico",children:e?O[le.Success]:O[le.Error]}),jsxRuntime.jsx(H,{as:"--message",children:e?r||"internet connection restored :)":t||"no internet connection"})]})});Fn.displayName="Zuz.NetWorkManager";var _m=Fn;var Co=(e=>(e.Table="table",e.Gooey="gooey",e))(Co||{});var Wn=react.forwardRef((o,n)=>{let{itemCount:e,itemsPerPage:r,startPage:t,pageRange:s,paginationStyle:u,breakLabel:l,prevLabel:m,nextLabel:i,hash:a,loading:f,seperator:p,renderOnZeroPageCount:d,onPageChange:b,...w}=o,x=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(E=>`${core.toHash(E,a||6,x)}${p||""}${x}`,[x]),S=react.useMemo(()=>l||"...",[l]),[g,v]=react.useState({id:a?t?typeof t=="number"?h(t):t:1:t||1,label:t||1}),{style:I,className:T,rest:P}=R(w),N=react.useCallback(E=>typeof E=="number"?E:+E.label,[]);if(!e)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(e/r),[e,r]),L=react.useMemo(()=>{let E=[],_=Math.max(N(g)-(s||2),1),U=Math.min(N(g)+(s||2),M);_>1&&E.push({id:a?h(1):1,label:1}),_>2&&E.push({id:-1,label:S});for(let k=_;k<=U;k++)E.push({id:a?h(k):k,label:k});return U<M-1&&E.push({id:-1,label:S}),U<M&&E.push({id:a?h(M):M,label:M}),E},[g]),V=react.useCallback(E=>{let _=E;+_.label<1||+_.label>M||(v(_),b?.(_));},[e,r,g]);return L.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(c,{ref:n,as:`--pagination --pgt-${u||"table"} flex aic w:100% jcc ${T}`,children:[jsxRuntime.jsx(c,{as:"flex flex:1 aic --pgt-btns",children:(L.length>1?L:[{id:1,label:1},{id:-1,label:S}]).map((E,_,U)=>jsxRuntime.jsx(z,{disabled:E.id==-1||N(g)==+E.label,className:(typeof E=="string"?E:E.label)==N(g)?"--current-page":"",onClick:k=>V(E),children:typeof E=="string"?E:E.label},`--pg-${_}-${E.id}`))}),jsxRuntime.jsx(c,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(N(g)-1)*r+1} - `,`${Math.min(N(g)*r,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(c,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(z,{disabled:N(g)<=1,onClick:E=>V({id:a?h(N(g)-1):N(g)-1,label:N(g)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(z,{disabled:L.length<=1||N(g)==N(L[L.length-1]),onClick:E=>V({id:a?h(N(g)+1):N(g)+1,label:N(g)+1}),children:O.chevronRightOutline})]})]})});Wn.displayName="Zuz.Pagination";var Po=Wn;var Gn=react.forwardRef((o,n)=>{let{strenthMeter:e,onChange:r,...t}=o;"type"in t&&delete t.type;let{style:s,className:u,rest:l}=R(t),[m,i]=react.useState(false),[a,f]=react.useState(""),p=react.useMemo(()=>core.checkPasswordStrength(a),[a]),d=hooks.useDebounce(b=>{e&&f(b.target.value),r&&r(b);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(c,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(oe,{ref:n,type:m?"text":"password",className:u,onChange:d,...l}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:()=>i(b=>!b),className:"--toggle flex aic jcc abs",children:m?O.eye:O.eyeSlash})]}),e&&jsxRuntime.jsxs(c,{as:`flex aic --password-meter --pb-score-${p.score}`,style:s,children:[jsxRuntime.jsxs(c,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(c,{as:`--pbar ${p.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${p.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(H,{as:"--password-meter-label","aria-hidden":true,children:p.result})]})]})});Gn.displayName="Zuz.Password";var Qm=Gn;var Xn=react.forwardRef((o,n)=>{let{size:e,length:r,mask:t,...s}=o,u=react.useRef([]),l="pinput",m=false,i={};"with"in s&&(i={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(m=true,delete s.required);let{style:a}=R(s),f=p=>{let d=p.currentTarget,b=u.current[parseInt(d.dataset.index)+1],w=u.current[parseInt(d.dataset.index)-1];d.value.length===1&&b?b.focus():d.value.length===0&&w&&w.focus();};return react.useEffect(()=>{u.current=u.current.slice(0,e||r);},[e||r]),jsxRuntime.jsx(c,{name:l,style:a,className:"--otp flex aic rel","data-required":m,"data-size":e||r||4,...i,children:Array(e||r||4).fill(1).map((p,d)=>jsxRuntime.jsx(oe,{autoComplete:"new-password","data-index":d,ref:b=>{u.current[d]=b;},numeric:true,onChange:f,maxLength:1,placeholder:t?"\xB7":"0",type:t?"password":"text",...s},`pin-${d}`))})});Xn.displayName="Zuz.PinInput";var tc=Xn;var Yn=react.forwardRef((o,n)=>{let{children:e,className:r,name:t,required:s,type:u,value:l,variant:m,checked:i,onSwitch:a,...f}=o,[p,d]=react.useState(i||false),{variant:b}=X(true),w=react.useRef(null);return jsxRuntime.jsxs(et,{className:`${r} --${(u||Mt.Default).toLowerCase()} --radio${!u||u==Mt.Default?"":"card"} --${m||b||W.Small} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(oe,{ref:w,defaultChecked:p,value:l||"rd",type:"radio",className:"abs",name:t,required:s||false,onChange:x=>{a&&a(x.target.checked,l||"cb"),d(x.target.checked);}}),jsxRuntime.jsx(c,{className:"--dot rel",children:jsxRuntime.jsx(c,{className:"--rod abs abc"})}),jsxRuntime.jsx(c,{className:"--value",children:e})]})});Yn.displayName="Zuz.Radio";var sc=Yn;var Qn=react.forwardRef((o,n)=>{let{fx:e,withStyle:r,as:t,reverse:s=false,searchIcon:u=O.search,hideSearchIcon:l=false,clearIcon:m=O.close,hideClearIcon:i=false,onChange:a,onClear:f,...p}=o,{style:d,className:b}=R({as:o.as}),[w,x]=react.useState(""),{variant:h}=X(true),S=react.useRef(null),g=react.useMemo(()=>jsxRuntime.jsx(z,{tabIndex:-1,onClick:T=>I(),className:"--send flex aic jcc",variant:o.variant||W.Small,children:w!==""?!i&&(typeof m=="string"?jsxRuntime.jsx(Y,{name:m,as:"--search-action"}):m):!l&&(typeof u=="string"?jsxRuntime.jsx(Y,{name:u,as:"--search-action"}):u)}),[s,u,i,m,l]);"type"in o&&delete o.type;let v=T=>{x(T.target.value),a?.(T.target.value);},I=T=>{w.trim()!==""&&(x(""),a?.(""),S.current&&(S.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{style:d,className:`--search ${s?"--search-rev":""} --${o.variant||h||W.Medium} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${b}`.trim(),children:[s&&g,jsxRuntime.jsx(oe,{ref:S,onChange:v,...p}),o.shortcut&&jsxRuntime.jsx(So,{keys:o.shortcut,as:"abs"}),!s&&g]})});Qn.displayName="Zuz.Search";var fc=Qn;var jn=({value:o,updateValue:n,o:e})=>jsxRuntime.jsxs(z,{onClick:r=>n(e),as:"--select-option-item",className:o&&(typeof e=="string"?e:e.value)==(typeof o=="string"?o:o.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(Y,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(H,{suppressHydrationWarning:true,children:typeof e=="string"?e:e.label})]});jn.displayName="Option";var es=jn;var os=({ref:o,...n})=>{let{selected:e,options:r,label:t,name:s,variant:u,search:l,searchPlaceholder:m,maxHeight:i,arrowDownIcon:a=O.arrowDown,arrowUpIcon:f=O.arrowUp,onChange:p,...d}=n,[b,w]=react.useState(e?typeof e=="string"?r.find(k=>k.value===e):e:r[0]),[x,h]=react.useState(false),[S,g]=react.useState(null),v=react.useRef(null),I=react.useRef(null),T=react.useRef(null),P=react.useId(),N=react.useMemo(()=>s||P,[]),{reposition:M}=Ue(T,{direction:Bt.Bottom,offset:2}),{variant:L}=X(true),{className:V,style:E,rest:_}=R(d),U=k=>{w(k),h(false),p&&p(k);};return react.useImperativeHandle(o,()=>({setSelected:k=>{if(typeof k=="string"){let C=r.find(A=>A.value===k);C&&w(C);}else w(k);},getValue:()=>b||null})),react.useEffect(()=>{if(!x)return;let k=()=>{M();};return window.addEventListener("scroll",k,true),window.addEventListener("resize",M),()=>{window.removeEventListener("scroll",M,true),window.removeEventListener("resize",M);}},[x,M]),react.useEffect(()=>{if(!x){I.current&&(I.current.value=""),g(null);return}I.current?.focus(),M();let k=A=>{T.current&&!T.current.contains(A.target)&&h(false);},C=setTimeout(()=>{document.addEventListener("click",k);},0);return ()=>{clearTimeout(C),document.removeEventListener("click",k);}},[x,M]),jsxRuntime.jsxs(c,{className:`--select --${u||L} ${s?`--${s}`:""} rel`.trim(),name:N,children:[jsxRuntime.jsxs(z,{ref:v,"data-value":b?typeof b=="string"?b:b.value:b||"-1",className:`--selected flex aic rel ${V}`.trim(),withLabel:false,style:E,onClick:k=>{k.stopPropagation(),h(C=>!C);},..._,children:[jsxRuntime.jsx(H,{className:"--label",children:b?typeof b=="string"?b:b.label:t||"Choose"}),jsxRuntime.jsx(c,{className:"--svg-arrow rel flex aic jcc",children:x?typeof f=="string"?jsxRuntime.jsx(Y,{name:f,as:"--search-action"}):f:typeof a=="string"?jsxRuntime.jsx(Y,{name:a,as:"--search-action"}):a})]}),jsxRuntime.jsxs(c,{id:N,className:"--options-list flex cols abs","aria-hidden":!x,style:{maxHeight:i||"auto"},ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:x,duration:.05},children:[l&&jsxRuntime.jsx(c,{as:"--select-search --sticky",children:jsxRuntime.jsx(oe,{ref:I,onChange:k=>{g(k.target.value==""?null:k.target.value);},className:"--search-input",placeholder:m||"Search..."})}),(S==null?r:r.filter(k=>k.label.toLowerCase().includes(S.toLowerCase())||k.value.toLowerCase().includes(S.toLowerCase()))).map(k=>jsxRuntime.jsx(es,{updateValue:U,value:b,o:k},`option-${(typeof k=="string"?k:k.label).replace(/\s+/g,"-")}-${typeof k=="string"?k:k.value}`))]})]})};os.displayName="Zuz.Select";var bc=os;var rs=react.forwardRef((o,n)=>jsxRuntime.jsx(tt,{type:ye.Switch,...o,ref:n}));rs.displayName="Zuz.Switch";var vc=rs;var ss=o=>{let{idx:n,id:e,as:r,weight:t,style:s,value:u,render:l,resize:m,sortBy:i,sortable:a,onSort:f}=o,[p,d]=react.useState(0),b=()=>{a&&(f?.(String(e),p==1?-1:1),d(w=>w==1?-1:1));};return jsxRuntime.jsxs(c,{style:{flex:t||1,...s},as:`--col flex aic ${r||""} ${a?"--sortable":""}`,onClick:b,children:[jsxRuntime.jsx(c,{children:u}),n==-1&&a&&i==e&&jsxRuntime.jsx(c,{as:"--arrow flex aib",children:p==1?O.arrowUp:O.arrowDown})]})};ss.displayName="Zuz.Column";var Ct=ss;var is=o=>{let{index:n,pubsub:e,schema:r,data:t,ids:s,styles:u,animate:l,sortBy:m,selectable:i,tableRef:a,loading:f,rowClassName:p,onSort:d,onRowClick:b,onSelect:w,onContextMenu:x}=o,h=hooks.useDelayed(),S=react.useMemo(()=>({transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(n+1)}),[]),g=react.useRef(null),v=(T,P)=>{n==-1?e.emit(`ALL_ROWS_${T?"CHECKED":"UNCHECKED"}`,T):(w&&w(t,T),e.emit(`ROW_${T?"CHECKED":"UNCHECKED"}`,T,P));},I=(T,P,N)=>jsxRuntime.jsx(Ct,{idx:T,id:P,as:"--selector",pubsub:e,value:jsxRuntime.jsx(tt,{value:N,ref:g,onSwitch:v,type:ye.Default})});return react.useEffect(()=>{let T=(L,V)=>{g.current?.setChecked(L,false);},P=(L,V)=>{let E=false;a?.current&&a.current.querySelectorAll(".--row").forEach(_=>{let U=_;if(!U.classList.contains("--row-head")){let k=U.querySelector(".--selector input[type=checkbox]");k&&k.checked&&!E&&(E=k.checked);}}),g.current.setChecked(E,false);},N=L=>{g.current?.setChecked(L,false),w&&w(t,L);},M=L=>{g.current?.setChecked(L,false),w&&w(t,L);};return n==-1?(e.on("ROW_CHECKED",T),e.on("ROW_UNCHECKED",P),()=>{e.off("ROW_CHECKED",T),e.off("ROW_UNCHECKED",P);}):(e.on("ALL_ROWS_CHECKED",N),e.on("ALL_ROWS_UNCHECKED",M),()=>{e.off("ALL_ROWS_CHECKED",N),e.off("ALL_ROWS_UNCHECKED",M);})},[]),jsxRuntime.jsxs(c,{onContextMenu:T=>x?x(T,t):null,onClick:T=>b?b(T,o.data):()=>{},...l?{fx:{...S,when:h}}:{},as:`--row flex aic ${b?"--row-clickable":""} ${n==-1?"--row-head":""} ${p||""}`,children:[n==-1&&r.map((T,P)=>{let{renderWhenHeader:N,render:M,value:L,...V}=T;return jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&I(-1,`--selector-${T.id}`,"all"),jsxRuntime.jsx(Ct,{idx:-1,onSort:d,sortBy:m,value:L,...V,pubsub:e,style:u[T.id]})]},`--col-${T.id}`)}),f&&n>-1&&jsxRuntime.jsx(c,{as:"--col",children:jsxRuntime.jsx(H,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&t&&r.map((T,P)=>jsxRuntime.jsxs(react.Fragment,{children:[i&&P==0&&I(P,`--selector-${T.id}`,T.id.toString()),s.includes(String(T.id))?jsxRuntime.jsx(Ct,{pubsub:e,idx:P,id:String(T.id),style:u[String(T.id)],value:T.render?T.render(t,n):t[String(T.id).includes(".")?String(T.id).split(".").reverse()[0]:T.id]}):null]},`--${String(T.id)}-val-${P}`))]})};is.displayName="Zuz.Row";var Tt=is;var ps=(o,n)=>{let{schema:e,rows:r,rowCount:t,rowsPerPage:s,currentPage:u,pagination:l,paginationHash:m,showPaginationOnZeroPageCount:i,animateRows:a,header:f,rowClassName:p,selectableRows:d,hoverable:b,sortBy:w,loading:x,loadingRowCount:h,loadingMessage:S,spinner:g,emptyMessage:v,onSort:I,onRowClick:T,onRowSelectToggle:P,onPageChange:N,onRowContextMenu:M,...L}=o,V=react.useRef(null),E=react.useMemo(()=>e.reduce((ne,Q)=>(ne[Q.id]={flex:Q.weight||1,...Q.w&&{width:Q.w},...Q.maxW&&{maxWidth:Q.maxW},...Q.minW&&{minWidth:Q.minW},...Q.h&&{height:Q.h},...Q.maxH&&{maxHeight:Q.maxH},...Q.minH&&{minHeight:Q.minH}},ne),{}),[e]),_=react.useMemo(()=>Object.keys(E),[e]),U=react.useMemo(()=>f??true,[f]),{style:k,className:C,rest:A}=R(L),$=react.useRef(null),K=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(r.map(()=>core.uuid(8))),[Z,q]=react.useState(w||null),[te,j]=react.useState(S||"loading"),pe=react.useMemo(()=>!x&&r&&r.length==0,[x,r]),de=react.useCallback(()=>v?typeof v=="function"?jsxRuntime.jsx(v,{}):v:jsxRuntime.jsx(H,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,r]);react.useEffect(()=>{D.current=r.map(()=>core.uuid(8));},[r]);let It=(ne,Q)=>{q(ne),I?.(ne,Q);},Nt=(t||(r?r.length:0))/(s||10),Ie=react.useMemo(()=>i||Nt>1?jsxRuntime.jsx(Po,{hash:m,ref:V,renderOnZeroPageCount:i,onPageChange:N,paginationStyle:"table",startPage:u,itemCount:t||(r?r.length:0),itemsPerPage:s||10}):null,[u,t]);return react.useImperativeHandle(n,()=>({setLoading(ne){}})),jsxRuntime.jsxs(c,{as:`--table ${b??true?"--hoverable":""} flex cols rel ${C}`,ref:$,children:[U==true&&jsxRuntime.jsx(Tt,{sortBy:Z,onSort:It,tableRef:$,pubsub:K,selectable:d,index:-1,schema:e,loading:true,styles:E}),x&&jsxRuntime.jsxs(c,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ge,{type:g||re.Simple}),te&&jsxRuntime.jsx(H,{as:"--table-loading-message",children:te})]}),x&&Array(h||5).fill({}).map((ne,Q)=>jsxRuntime.jsx(Tt,{tableRef:$,index:Q,pubsub:K,schema:e,styles:E,loading:true,animate:a,onRowClick:T},`--trow-loading-${Q}-${e[0].id}`)),!x&&r&&r.map((ne,Q)=>jsxRuntime.jsx(Tt,{tableRef:$,pubsub:K,loading:false,index:Q,schema:e,ids:_,styles:E,animate:a,data:ne,onRowClick:T,rowClassName:p,selectable:d,onSelect:P,onContextMenu:M},`--trow-${D.current[Q]||Q}-${e[0].id}`)),pe&&de(),jsxRuntime.jsx(c,{"aria-hidden":!l||!Ie,...a?{fx:{transition:G.SlideInBottom,curve:F.EaseInOut,delay:.02*(r.length+1),when:!x&&r&&l&&Ie!=null}}:{},as:"--row flex aic --row-footer",children:l&&Ie?Ie:null})]})};ps.displayName="Zuz.Table";var Oc=react.forwardRef(ps),Dc=Oc;var Vc=({ref:o,...n})=>{let{title:e,items:r}=n,[t,s]=react.useState(0),u=(l,m,i)=>{l.preventDefault(),s(m),document.getElementById(i)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(c,{ref:o,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(H,{as:"--toc-title",children:e}),jsxRuntime.jsx(Me,{items:r.map((l,m)=>jsxRuntime.jsx("a",{className:t==m?"--toc-active":"",style:{anchorName:t===m?"--toc-active":"none",color:t==m?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:i=>u(i,m,l.tag),href:`#${l.tag}`,children:l.label}))})]})},Ac=Vc;var us=({isActive:o,transitionType:n,speed:e,width:r,render:t,content:s,onHeightChange:u})=>{let l=react.useRef(null),m=hooks.useResizeObserver(l);react.useEffect(()=>{o&&m.height>0&&u(m.height);},[o,m.height]);let i=react.useMemo(()=>{let a={flexShrink:0,height:"fit-content"};return n==="fade"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:o?1:0}:n==="scale"?{...a,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:a},[o,n,r,e]);return jsxRuntime.jsx(c,{ref:l,style:{...i},className:"--content",children:t||o?s:null})};us.displayName="Zuz.TabBody";var fs=us;var hs=({ref:o,...n})=>{let{tabs:e,speed:r=.3,prerender:t=true,variant:s,tabStyle:u="fixed",onChange:l,transitionType:m="slide",...i}=n,[a,f]=react.useState(0),p=react.useRef(null),d=hooks.useResizeObserver(p),b=react.useMemo(()=>core.uuid(8),[]),[w,x]=react.useState("auto"),h=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(o,()=>({setTab:P=>f(P)}));let S=react.useMemo(()=>e.map(P=>({...P,key:P.key||core.uuid(8)})),[e]),{style:g,className:v,rest:I}=R({as:`flex cols w-full no-overflow ${i.as||""}`,...i}),T=()=>{if(!h)return {opacity:0};switch(m){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${a*d.width}px, 0, 0)`,transition:`transform ${r}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(c,{ref:p,style:g,className:`--tabview --${u} flex cols ${v}`,children:[jsxRuntime.jsx(ot,{as:"--tabview-head",onSwitch:P=>{f(P.index);let N=S.find(M=>M.tag==P.tag);N&&N.onSelect&&(N.onSelect(N,P.index),l?.(N,P.index));},selected:a,items:S.reduce((P,N,M)=>(P.push({icon:N.icon,index:M,label:N.label,tag:N.tag}),P),[])}),jsxRuntime.jsx(c,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:w,transition:h?`height ${r}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:h?1:0},children:jsxRuntime.jsx(c,{className:"--track",style:{...T()},children:S.map((P,N)=>jsxRuntime.jsx(fs,{isActive:N===a,transitionType:m,speed:r,width:d.width,render:t||N===a,onHeightChange:M=>N===a&&x(M),content:P.body},`tab-body-${P.key||N}-${b}`))})})]})};hs.displayName="Zuz.TabView";var qc=hs;var Jc=({ref:o,commands:n,onCommand:e,welcomeMessage:r="Welcome to Zuz Terminal v1.0.0",prompt:t="zuz ~ ",variant:s,...u})=>{let[l,m]=react.useState([{type:"output",content:r}]),[i,a]=react.useState(""),f=react.useRef(null),p=react.useRef(null),{variant:d}=X(true);react.useEffect(()=>{f.current&&(f.current.scrollTop=f.current.scrollHeight);},[l]);let b=v=>{let I=typeof v=="string"?{type:"output",content:v}:v;m(T=>{let P=[...T,I];return P.length>1e3?P.slice(-1e3):P});},w=()=>m([]);react.useImperativeHandle(o,()=>({write:b,clear:w}));let x=async v=>{let[I,...T]=v.split(" "),P=I.toLowerCase();return n&&n[P]?await n[P](T):e?await e(v):`command not found: ${I}`},h=v=>{let I=/\u001b\[(\d+)m/g,T=[],P={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},N=0,M="#d4d4d4",L=false,V;for(;(V=I.exec(v))!==null;){let _=v.slice(N,V.index);_&&T.push({text:_,color:M,bold:L});let U=V[1];U==="0"?(M="#d4d4d4",L=false):U==="1"?L=true:P[U]&&(M=P[U]),N=I.lastIndex;}let E=v.slice(N);return E&&T.push({text:E,color:M,bold:L}),T},S=(v,I)=>v.includes("\x1B")?h(v).map((T,P)=>jsxRuntime.jsx(J,{style:{color:T.color||"#d4d4d4",fontWeight:T.bold?"bold":"normal"},children:T.text},`--terminal-msg-${P}-${T.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(J,{style:{color:I==="error"?"#ff5f56":I==="command"?"#00ff00":"#d4d4d4"},children:v}),g=async v=>{if(v.key==="Enter"&&i.trim()){let I=i.trim(),T=[...l,{type:"command",content:`${t}${I}`}];a(""),m(T);let P=await x(I);m(N=>[...N,{type:"output",content:P}]);}};return jsxRuntime.jsxs(c,{as:`--zuz-terminal --${s||d||W.Medium} flex cols ${u.className}`,onClick:()=>p.current?.focus(),children:[jsxRuntime.jsx(c,{ref:f,className:"--terminal-log",children:l.map((v,I)=>jsxRuntime.jsx(c,{children:jsxRuntime.jsx(H,{children:S(v.content,v.type)})},I))}),jsxRuntime.jsxs(c,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(H,{as:"--terminal-prompt",children:t}),jsxRuntime.jsx(oe,{ref:p,className:"--zuz-term-input",autoFocus:true,value:i,variant:s||d||W.Medium,onChange:v=>a(v.target.value),onKeyDown:g})]})]})},jc=Jc;var ep=({meta:o})=>jsxRuntime.jsxs(z,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(Y,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(H,{children:o.label})]}),tp=({position:o,onSelect:n,commands:e,visible:r})=>jsxRuntime.jsx(c,{"aria-hidden":!r,fx:{transition:G.SlideInBottom,duration:.1,when:r},className:"--command-box abs grid",style:{...o},children:e.map(t=>jsxRuntime.jsx(ep,{meta:t},`cmd-${t.label.replace(/\s+/,"-")}`))}),ws=tp;var Cs=react.forwardRef((o,n)=>{let{autoResize:e,maxHeight:r,variant:t,resize:s="none",command:u,commands:l,onInput:m,cmd:i,renderDropdown:a,value:f,defaultValue:p,...d}=o,b=react.useRef(null),w=react.useRef(null),{variant:x}=X(true),{style:h,className:S,rest:g}=R(d),{showDropdown:v,dropdownPosition:I,handleKeyDown:T,handleInput:P,handleCommandSelect:N}=hooks.useCommandActions({command:u,commands:l,cmd:i,ref:b}),M=react.useCallback(()=>{let V=b.current;!V||!e||(w.current&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{V.style.height="auto";let E=V.scrollHeight;if(r){let _=parseInt(r.toString(),10);isNaN(_)||(E=Math.min(E,_));}V.style.height=`${E}px`,V.style.overflowY=r&&E>=parseInt(r.toString(),10)?"auto":"hidden";}));},[e,r]),L=V=>{m?.(V),P(V),M();};return react.useEffect(()=>{M();},[f,p,M]),react.useEffect(()=>{e&&b.current&&M();},[e,M]),react.useEffect(()=>()=>{w.current&&cancelAnimationFrame(w.current);},[]),jsxRuntime.jsxs(c,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${t||x||W.Medium} flex ${S}`.trim(),style:{...h,resize:s,height:e?"auto":h?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:T,onInput:L,ref:V=>{typeof n=="function"?n(V):n&&(n.current=V),b.current=V;},value:f,defaultValue:p,...g}),a?a({show:v,position:I,commands:l||[],onSelect:N}):l&&l.length>0&&jsxRuntime.jsx(ws,{visible:v,commands:l,onSelect:N,position:I})]})});Cs.displayName="Zuz.TextArea";var ap=Cs;var Ps=react.forwardRef((o,n)=>{let{as:e,value:r,color:t,direction:s,...u}=o,l=react.useRef(null),[m,i]=react.useState(r||0);return react.useImperativeHandle(n,()=>({updateValue(a){m.toString().length!==a.toString().length&&i(a);},setValue(a){if(this.updateValue(a),l.current){let f=a.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((p,d)=>{let b=f[d];if(p instanceof HTMLElement){p.setAttribute("data-value",b);let w=p.querySelector(".--wheel-char-track");w instanceof HTMLElement&&(w.style.setProperty("--v",b),w.offsetWidth);}});}}})),react.useEffect(()=>{i(r||0);},[r]),jsxRuntime.jsxs(c,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:l,...u,children:[(m||0).toString().split("").map((a,f)=>isNaN(parseInt(a,10))?jsxRuntime.jsx(J,{className:"--wheel-char wheel-char-symbol grid",children:a},`wheel-char-symbol-${f}`):jsxRuntime.jsx(J,{"data-value":a,className:`--wheel-char grid ${f>(m||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(J,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":a},children:[jsxRuntime.jsx(J,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((p,d)=>jsxRuntime.jsx(J,{children:p},`${f}--${d}`)),jsxRuntime.jsx(J,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),t&&jsxRuntime.jsx(c,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${t}, transparent, transparent, transparent, ${t})`}})]})});Ps.displayName="Zuz.TextWheel";var fp=Ps;var Es=react.forwardRef((o,n)=>{let{title:e,position:r,margin:t,children:s,...u}=o,{style:l,className:m,rest:i}=R(u),[a,f]=react.useState(false),p=react.useMemo(()=>r||ee.Top,[]),d=react.useRef(null),b=react.useRef(null),w=g=>{},x=typeof ResizeObserver<"u"?new ResizeObserver(w):{observe:()=>{},unobserve:()=>{}},h=hooks.useDimensions(),S=react.useMemo(()=>{if(!b.current)return {left:0,top:0};let g=b.current.previousElementSibling;if(g){let v=g.getBoundingClientRect();switch(x.observe(g),p){case ee.Top:return {left:v.left+v.width/2,top:v.top-(t||25)};case ee.Bottom:return {left:v.left+v.width/2,top:v.top+(t||25)};case ee.Left:return {left:v.left-v.width/2,top:v.top+v.height/2};case ee.Right:return {left:v.right,top:v.top+v.height/2};default:return {left:0,top:0}}}},[b.current,h,x]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[s,jsxRuntime.jsx(c,{ref:b,style:{left:S?.left+"px",top:S?.top+"px"},className:`--tooltip --${r||ee.Top} fixed ${m}`.trim(),fx:{from:p==ee.Bottom||p==ee.Top?{opacity:0,x:"-50%",y:p==ee.Top?-5:5}:{opacity:0,y:"-50%",x:p==ee.Right?15:-25},to:p==ee.Bottom||p==ee.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:p==ee.Right?10:-20},curve:F.EaseInOut,when:a},children:jsxRuntime.jsx(H,{className:"--text rel",children:e})})]})});Es.displayName="Zuz.ToolTip";var yp=Es;var Do=react.forwardRef((o,n)=>{let{as:e,meta:r,nodes:t,icons:s,onSelect:u,treeTag:l,selected:m,roots:i,expanded:a,...f}=o,{tag:p,label:d,icon:b,under:w,isHead:x}=r,h=react.useMemo(()=>i.includes(p),[i]),[S,g]=react.useState(a),v=()=>{localStorage.setItem(`--tn${l}-${p}`,S?"0":"1"),g(!S);};react.useEffect(()=>{a||h&&!localStorage.getItem(`--tn${l}-${p}`)?(localStorage.setItem(`--tn${l}-${p}`,"1"),g(true)):g(localStorage.getItem(`--tn${l}-${p}`)=="1");},[]);let I=react.useMemo(()=>t.filter(T=>T.under==p),[t,p]);return jsxRuntime.jsxs(c,{className:`--treenode ${h?"--is-root":""} --treenode-${p} flex cols`,children:[jsxRuntime.jsxs(c,{className:`--node --node-${p} flex aic ${m==p?" --selected":""}`,children:[jsxRuntime.jsx(z,{skeleton:f.skeleton,onClick:v,className:"--node-aro-btn",disabled:I.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:"--node-aro-icon",name:I.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):I.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(z,{className:"--node-meta flex aic",onClick:T=>u(p),children:[(s?.nodeOpen&&s?.nodeClose||h&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(Y,{skeleton:f.skeleton,className:`--node-icon ${h?"--icon-root":""}`,name:b||(S?h&&s?.rootOpen||s.nodeOpen:h&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(H,{className:`--node-label ${h?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),S&&I.length>0&&jsxRuntime.jsx(c,{className:`--sub-node tree-sub-node-${p} flex cols`,children:I.map(T=>jsxRuntime.jsx(Do,{treeTag:l,selected:m,onSelect:u,icons:s,roots:i,expanded:T.expanded||false,meta:T,nodes:t},`--node-${T.tag}`))})]})});Do.displayName="TreeItem";var Ls=Do;var ks=react.forwardRef((o,n)=>{let{as:e,nodes:r,onNodeSelect:t,tag:s,icons:u,roots:l,selected:m,...i}=o,[a,f]=react.useState(m);react.useImperativeHandle(n,()=>({getSelected:()=>a}),[t]);let p=d=>{f(d),t&&t(d);};return react.useEffect(()=>{a!=m&&f(m);},[m]),jsxRuntime.jsx(c,{className:"--treeview flex cols",children:r.filter(d=>l.includes(d.tag)).map(d=>jsxRuntime.jsx(Ls,{treeTag:s?`-${s}`:"",selected:a,onSelect:b=>p(b),icons:u,meta:d,roots:l,expanded:d.expanded||false,skeleton:i.skeleton,nodes:r},`--node-${d.tag}`))})});ks.displayName="Zuz.TreeView";var Ip=ks;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
-
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return
|
|
14
|
+
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkWRPYWAQK_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkWRPYWAQK_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkWRPYWAQK_cjs.h}});exports.ALERT=le;exports.AVATAR=zo;exports.Accordion=li;exports.ActionBar=di;exports.Alert=xi;exports.AutoComplete=Di;exports.Avatar=Zi;exports.Badge=Wi;exports.Box=c;exports.Bubble=bl;exports.BubbleMediaType=rn;exports.BubbleStatus=on;exports.Button=z;exports.CHART=Jr;exports.CHECKBOX=ye;exports.COLORTHEME=Lp;exports.Calendar=io;exports.Chart=ul;exports.CheckBox=tt;exports.CodeBlock=Bl;exports.ColorScheme=Wl;exports.ContextMenu=_t;exports.CookiesConsent=Xl;exports.Cover=Ne;exports.CropShape=rm;exports.Cropper=tm;exports.Crumb=sm;exports.DATATYPE=Op;exports.DIALOG=He;exports.DIALOG_ACTION_POSITION=_o;exports.DRAWER_SIDE=se;exports.DatePicker=mm;exports.Dialog=Zt;exports.Drawer=Yt;exports.FILTER=ct;exports.FORMVALIDATION=be;exports.FORMVALIDATION_STYLE=Dp;exports.Fab=fm;exports.Filters=hm;exports.Form=Bm;exports.Grid=Om;exports.Group=Ft;exports.Icon=Y;exports.Image=Je;exports.Input=oe;exports.KeyboardKeys=So;exports.KeysLabelMap=An;exports.KeysMap=Vn;exports.Label=et;exports.LayersProvider=$t;exports.List=Me;exports.NetworkStatus=_m;exports.ORIGIN=Ke;exports.OriginType=Mp;exports.Overlay=Ee;exports.POSITION=Bt;exports.PROGRESS=Vp;exports.Pagination=Po;exports.PaginationStyle=Co;exports.Password=Qm;exports.PinInput=tc;exports.Position=ee;exports.ProgressBar=mo;exports.RADIO=Mt;exports.Radio=sc;exports.SHEET=me;exports.SHEET_ACTION_POSITION=Lt;exports.SKELETON=Bp;exports.SLIDER=mt;exports.SORT=kp;exports.SPINNER=re;exports.ScrollView=Wt;exports.Search=fc;exports.Select=bc;exports.SelectTabs=ot;exports.Sheet=vm;exports.Slider=go;exports.Span=J;exports.Spinner=ge;exports.Status=Hp;exports.Switch=vc;exports.TRANSITIONS=G;exports.TRANSITION_CURVES=F;exports.TabView=qc;exports.Table=Dc;exports.TableOfContents=Ac;exports.Terminal=jc;exports.Text=H;exports.TextWheel=fp;exports.Textarea=ap;exports.ThemeProvider=Us;exports.ToastDefaultTitle=Pr;exports.ToastProvider=Qt;exports.ToastType=Tr;exports.ToolTip=yp;exports.TreeView=Ip;exports.Variant=W;exports.animationTransition=We;exports.buildClassString=kt;exports.buildWithStyles=Ko;exports.css=ru;exports.getAnimationCurve=Ot;exports.getAnimationTransition=nu;exports.getZuzMap=Ds;exports.isKeyCombination=Hn;exports.setZuzMap=Zo;exports.useBase=R;exports.useContextMenu=oi;exports.useDialog=Wa;exports.useDrawer=Ya;exports.useFx=ae;exports.useMorph=ja;exports.usePosition=Ue;exports.useToast=jt;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {f,e,g,d,h,c as c$1}from'./chunk-
|
|
1
|
+
import {f,e,g,d,h,c as c$1}from'./chunk-IWMLQYPP.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-IWMLQYPP.js';import {createContext,forwardRef,useMemo,Fragment,useEffect,useRef,useState,useCallback,createElement,isValidElement,useId,useImperativeHandle,useLayoutEffect,useContext,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useCommandActions,useDimensions,AnchorType,useAnchorPosition,KeyCode,useShortcuts}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {MD5,uuid,withPost,_ as _$1,clamp,timeSince,toHash,numberInRange,checkPasswordStrength,PubSub}from'@zuzjs/core';import {addPropsToChildren}from'@zuzjs/core/react';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var _o={Circle:"CIRCLE",Square:"SQUARE"},Lp={Default:"DEFAULT",Circle:"CIRCLE"},Mp={Light:"light",Dark:"dark",System:"system"},be={Default:"DEFAULT",Switch:"SWITCH"},Lt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},te=Lt,We=AnchorType,kp=We,U={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Op={Asc:"ASC",Desc:"DESC"},Dp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Hp={Dots:"DOTS"},we={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},me={Success:"success",Error:"error",Warning:"warning",Info:"info"},Z={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},q={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Vp={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},ce={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},Ve=ce,Mt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Fo=Mt,Ap={Bar:"BAR",Ring:"RING"},ct={Default:"range",Text:"number"},kt={Default:"DEFAULT",Card:"CARD"},pt={Gooey:"gooey"},ae={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Zo=Symbol.for("zuz.global.map"),Ko=o=>{globalThis[Zo]=o;},Hs=()=>globalThis[Zo]||{},Ot=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e$1=Hs();return process.env.NODE_ENV==="development"&&Object.keys(e$1).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(n).filter(Boolean).map(t=>{let s=t.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[u,l,m]=s;return g(m).map(i=>{let a=`${l}(${i})`;return e$1[a]||i}).join(" ")}return e$1[t]||t}).join(" ")},nu=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":Ot(n)},Wo=o=>{let n={};for(let e in o){let r=o[e];if(e.startsWith("--")){n[e]=r;continue}let t=d[e]?.toString()??e;if(t==="x"||t==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${h.addUnitsSafely(e,r)} ${s[1]??"0px"}`;}else if(t==="y"||t==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${h.addUnitsSafely(e,r)}`;}else c$1.includes(t)?n[t]=h.addUnitsSafely(e,r):n[t]=r;}return n},Dt=o=>{if(!o)return "linear";switch(o.toUpperCase()){case Z.Bounce:return "var(--bounce)";case Z.Liquid:return "var(--liquid)";case Z.Spring:return "var(--spring)";case Z.EaseInOut:return "ease-in-out";case Z.EaseOutBack:return "ease-out-back";default:return "linear"}},Ue=(o,n=0)=>{let e={},r={},t=n||20;switch(o){case q.SlideInLeft:case q.SlideInRight:e={"--fx-x":o===q.SlideInLeft?`-${t}px`:`${t}px`,opacity:0},r={"--fx-x":"0px",opacity:1};break;case q.SlideInTop:case q.SlideInBottom:e={"--fx-y":o===q.SlideInTop?`-${t}px`:`${t}px`,opacity:0},r={"--fx-y":"0px",opacity:1};break;case q.ScaleIn:e={scale:0,opacity:0},r={scale:1,opacity:1};break;case q.FadeIn:e={opacity:0},r={opacity:1};break}return {from:e,to:r}},su=(o,n,e)=>{let{from:r,to:t}=Ue(o);return n?{...r,...t}:e?r:t};var As=(o,n)=>{let e=useRef([]),r=useRef(false);return useEffect(()=>{o?.when||(r.current=false);},[o?.transition]),useEffect(()=>{let t=n?.current;if(!t||!o||!o.clearAtEnd)return;let s=u=>{e.current.includes(u.propertyName)&&o.clearAtEnd===true&&(t.style.transform="",t.style.filter="",e.current.forEach(l=>t.style.removeProperty(l)));};return t.addEventListener("transitionend",s),()=>t.removeEventListener("transitionend",s)},[o,n]),useEffect(()=>{if(typeof window>"u"||!n?.current)return;let t=n.current;(o?.scroll||o?.mouse)&&(t.style.willChange="transform",t.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",t.style.transition=`translate 0.1s ${o.curve?Dt(o.curve):"var(--spring)"}`);},[o,n]),useMemo(()=>{if(!o)return {style:{}};let{transition:t,from:s,to:u,exit:l,when:m,duration:i=.3,delay:a=0,curve:f,watch:p=[]}=o,d=m===false&&!r.current;m===true&&(r.current=true);let w={},{from:v,to:x}=t?Ue(t):{from:s||{},to:u||{}};w=m===void 0?{...v,...x}:m?{...x}:l||v;let h=Dt(f),C=[],g=Wo(w);e.current=Object.keys(g);let S={...g};return Object.keys(g).forEach(N=>{let P=N.startsWith("--")?"all":N;C.includes(P)||C.push(`${P} ${i}s ${h} ${a}s`);}),p.forEach(N=>{C.includes(N)||C.push(`${N} 0.1s ${h} 0s`);}),{style:{...S,transition:d?"none":C.join(", "),opacity:d?0:S.opacity,pointerEvents:d?"none":S.pointerEvents}}},[o,o?.when,o?.watch])},ie=As;var $s=(o,n)=>{let{as:e,fx:r,transition:t,skeleton:s,className:u,propsToRemove:l,style:m,...i}=o||{},a=t?{transition:t,duration:.3}:r||{},{style:f$1}=ie(a,n),p=Ot(e??"");return {style:{...m,...f$1},className:[u||"",p||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...f(i,l?[...l,"skeleton"]:["skeleton"])}}},I=$s;var Zs=(o,n={})=>{let{offset:e=8,direction:r="bottom",container:t=null,triggerRef:s=null}=n,u=useRef(null),l=useCallback(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=m.getBoundingClientRect(),f=i.getBoundingClientRect(),p,d;t?(p=t.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(m).position==="fixed"?d="fixed":d="absolute",d==="fixed"?p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),m.style.position!==d&&(m.style.position=d),u.current=d;let x=0,h=0;switch(r){case "top":x=f.top-a.height-e,h=f.left,x<p.top&&f.bottom+a.height+e<=p.bottom&&(x=f.bottom+e);break;case "bottom":x=f.bottom+e,h=f.left,x+a.height>p.bottom&&f.top-a.height-e>=p.top&&(x=f.top-a.height-e);break;case "left":x=f.top,h=f.left-a.width-e,h<p.left&&f.right+a.width+e<=p.right&&(h=f.right+e);break;case "right":x=f.top,h=f.right+e,h+a.width>p.right&&f.left-a.width-e>=p.left&&(h=f.left-a.width-e);break}if(x=Math.max(p.top,Math.min(x,p.bottom-a.height)),h=Math.max(p.left,Math.min(h,p.right-a.width)),u.current==="fixed")m.style.top=`${x}px`,m.style.left=`${h}px`;else {let C;m.offsetParent?C=m.offsetParent.getBoundingClientRect():C={top:0,left:0};let g=x-C.top+window.scrollY,S=h-C.left+window.scrollX;m.style.top=`${g}px`,m.style.left=`${S}px`;}},[o,s,e,r,t]);return useEffect(()=>{let m=o.current;if(!m)return;let i=s?.current||m.parentElement;if(!i){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let a=new ResizeObserver(l);return a.observe(m),i&&a.observe(i),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{a.disconnect(),i&&a.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[o,r,e,t,s]),{postion:u.current,reposition:l}},Ge=Zs;var qo="(prefers-color-scheme: dark)",Us=typeof window>"u",Yo=createContext(void 0),$t=o=>{let n=useContext(Yo);if(!n){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},Y=$t,Gs=({children:o,storageKey:n="--ucs",forceTheme:e,zuzMap:r,...t})=>(r&&Ko(r),jsx(qs,{storageKey:n,forceTheme:e,...t,children:o})),qs=({children:o,storageKey:n,forceTheme:e,...r})=>{let[t,s]=useState(()=>e||Xo(n,"system")),[u,l]=useState(()=>e||Xo(n)),m=p=>(p||(p=window.matchMedia(qo)),p.matches?"dark":"light"),i=useCallback(p=>{let d=p=="system"?m():p,w=document.documentElement;w.setAttribute("color-scheme",d),w.style.colorScheme=d,l(d);},[m]),a=useCallback(p=>{s(p),localStorage.setItem(n,p),i(p);},[t]),f=useCallback(p=>{let d=m(p);l(d),t==="system"&&i("system");},[t]);return useEffect(()=>{t==null&&window.localStorage.getItem(n);},[t]),useEffect(()=>{window.matchMedia(qo).addEventListener("change",f);},[f]),useEffect(()=>{let p=d=>{d.key==n&&(d.newValue?a(d.newValue):a("system"));};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[a]),useEffect(()=>{i(e||t||"system");},[t]),jsxs(Yo,{value:{colorScheme:t,resolvedScheme:u,setColorScheme:a,...r},children:[e?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
2
2
|
const themes = ['light', 'dark']
|
|
3
3
|
let theme = localStorage.getItem(\`${n}\`) || "system";
|
|
4
4
|
if (theme === "system") {
|
|
5
5
|
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
6
6
|
}
|
|
7
7
|
document.documentElement.setAttribute("color-scheme", theme);
|
|
8
|
-
document.documentElement.style.colorScheme = theme;`}}),jsx(zt,{children:o})]})},Xo=(o,n)=>{if(Us)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Qo=({ref:o,...n})=>{let{style:e,...r}=n,{style:t,className:s,rest:u}=I(r);return jsx("span",{ref:o,style:e,className:s,...u})};Qo.displayName="Zuz.Span";var j=Qo;var jo=forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:l}=Y(true),{className:m,style:i,rest:a}=I(u);return jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${t||l||U.Small} ${m}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,p)=>jsx(j,{className:`path${p+1}`},`${e}-layer-${p}`))})});jo.displayName="Zuz.Icon";var Q=jo;var ne={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var er=o=>{let{type:n,variant:e,color:r,...t}=o,{className:s,style:u,rest:l}=I(t),{spinner:m}=Y(true),i=()=>{switch(n||m?.type||ne.Simple){case ne.Simple:return null;case ne.Wave:return jsxs(Fragment$1,{children:[jsx(c,{as:"--bar --bar1"}),jsx(c,{as:"--bar --bar2"}),jsx(c,{as:"--bar --bar3"})]});case ne.Roller:return null}};return jsx(c,{className:`${s} --spinner --${(n||m?.type||ne.Simple).toLowerCase()} --${e||m?.variant||U.Small}`.trim(),style:{...u},...l,children:i()})};er.displayName="Zuz.Spinner";var he=er;var dt={Loading:"loading",Normal:"normal"};var or=({ref:o,...n})=>{let{reset:e,kind:r="solid",variant:t,icon:s,iconSize:u,children:l,withLabel:m,spinner:i,state:a,disabled:f,...p}=n,{style:d,className:w,rest:v}=I(p),{variant:x}=Y(true);return jsxs("button",{className:`--button --${r} --${t||x} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${w}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:a==dt.Loading||n.skeleton?.enabled||f,...v,children:[a==dt.Loading&&jsx(he,{variant:t||x,type:i||ne.Simple}),(!a||a==dt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(Q,{variant:u,name:s}),m===true?jsx(j,{children:l}):l]})]})};or.displayName="Zuz.Button";var _=or;var nr=forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:l,className:m,rest:i}=I(u),a=`h${o.h||1}`;return jsx(a,{ref:n,style:l,className:m,...i,children:r?jsx(j,{dangerouslySetInnerHTML:{__html:r}}):t})});nr.displayName="Zuz.Text";var V=nr;var oa=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:l}=o;return n=="-"?jsx(c,{className:"--line"}):jsxs(_,{reset:true,onClick:m=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsx(c,{as:"--icon",children:jsx(Q,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsx(V,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},sr=oa;var lr=({ref:o,...n})=>{let{id:e,as:r,fx:t,offsetX:s,offsetY:u,parent:l,event:m,arrow:i,when:a,items:f,header:p,footer:d,origin:w=We.TopRight,...v}=n,[x,h]=useState(false),[C,g]=useState(f||[]),{position:S,targetRef:N,calculatedAnchor:P}=useAnchorPosition(l?.current,m,{offsetX:s,offsetY:u,preferredAnchor:w}),E=l&&S.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",k=useMemo(()=>{let O=P.toLowerCase();return O.includes("left")?"--arrow-left":O.includes("right")?"--arrow-right":"--arrow-center"},[P]),M=S.top!==0||S.left!==0;useEffect(()=>{a&&M?h(true):a||h(false);},[a,M]);let{className:A,style:B,rest:F}=I(v),G=ie({...t?.transition?{transition:t.transition??q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:t?.curve??Z.EaseInOut,duration:t?.duration??.05,when:x&&M});return jsxs(c,{ref:N,className:`--contextmenu ${i||l!=null?`--has-arrow ${E} ${k}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!x,style:{...B,...G.style,top:S.top,left:S.left,visibility:M?"visible":"hidden",transformOrigin:P},...F,children:[typeof p=="function"?createElement(p):p,C.map((O,T)=>jsx(sr,{...O,index:T},`context-${O.label.toLowerCase()}-${T}`)),typeof d=="function"?createElement(d):d]})};lr.displayName="Zuz.ContextMenu";var Ft=lr;var mr=forwardRef((o,n)=>{let{children:e,fx:r,when:t,fxDelay:s,fxStep:u,classToIgnore:l,...m}=o,i=Y(true),a=useDelayed(),f=r||i?.group?.fx,p=s||i?.group?.fxDelay,d=u||i?.group?.fxStep,w=l||i?.group?.classToIgnore||"--ignore",v=useMemo(()=>f?addPropsToChildren(e,x=>{if(x.type===Fragment)return false;let h=x.props||{},C="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",S=typeof g=="string"&&g.includes(w);return !C&&!S},x=>({fx:{...f,delay:(p||0)+x*(d||.1),when:t??(r?.when||a)}})):e,[e,t,a,f]);return jsx(c,{className:"--group",ref:n,...m,children:v})});mr.displayName="Zuz.Group";var Zt=mr;var pr=forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:l,...m}=o,{className:i,style:a,rest:f}=I(m),{spinner:p}=Y(true);return "when"in o&&o.when==false?null:jsxs(Zt,{fx:{transition:q.SlideInBottom,curve:Z.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsx(he,{variant:t||p?.variant||U.Small,type:r||p?.type||ne.Simple}),!l&&jsx(V,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});pr.displayName="Zuz.Cover";var Ee=pr;var ur=forwardRef((o,n)=>{let{when:e,...r}=o;return jsx(c,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:q.FadeIn,when:e},...r})});ur.displayName="Zuz.Overlay";var Be=ur;var ba=({action:o,render:n=true,message:e=""})=>jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),fr=ba;var va=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsx(c,{as:`--footer flex aic rel ${n?n==Fo.Center?"jcc":"":"jce"}`.trim(),children:o.map((t,s)=>jsx(_,{variant:r,onClick:u=>t.handler?t.handler():t.onClick?t.onClick():console.log("onClick Handler missing"),as:"--action",children:t.label},`dialog-${e}-action-${t.key}`))}),gr=va;var Sa={colorSchemeLight: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:[jsx("circle",{cx:"12",cy:"12",r:"5"}),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: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:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark: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:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[me.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[me.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[me.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[me.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[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"}),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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[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"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},D=Sa;var Ca=({title:o="Alert",onClose:n})=>jsxs(c,{as:"--head flex aic rel",children:[jsx(c,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsx(_,{onClick:e=>n(),className:"--closer abs center-v",children:D.close})]}),xr=Ca;var vr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:l,speed:m,type:i,action:a,actionPosition:f,spinner:p,loadingMessage:d,variant:w,inBackground:v,closeDelay:x=200,onClose:h,onShow:C,onHide:g,...S}=n,N=useMemo(()=>uuid(12),[]),[P,R]=useState(t||""),[E,k]=useState(s||""),[M,A]=useState(i||Ve.Dialog),[B,F]=useState(false),[G,O]=useState(true),[T,$]=useState(a||null),[z,W]=useState(false),{variant:H,spinner:K,dialog:X}=Y(true),oe=w||X?.variant||H||U.Small,{style:ee,className:ue,rest:ge}=I(S),Nt=useRef(null),Et=ie({when:B,duration:m||X?.speed||.3,delay:X?.delay||.1,transition:u||X?.transition||q.SlideInBottom,curve:l||X?.curve||Z.EaseInOut,watch:["scale","filter","transform"]});useEffect(()=>{A(Ve.Dialog),k(s),R(P),T&&$(T.reduce((se,J)=>(se.push({...J,key:J.key||uuid(12)}),se),[])),F(true),setTimeout(()=>C?C():()=>{},500);},[]);let Ne=useMemo(()=>1e4+e*10,[e]);return jsxs(Fragment$1,{children:[jsx(Be,{style:{zIndex:Ne},when:B}),jsxs(c,{as:`--dialog --${(i??Ve.Default).toLowerCase()} ${B?"--visible":""} ${ue} fixed abc`.trim(),style:{...Et.style,zIndex:Ne+1,pointerEvents:v==true?"none":"auto",...v==true?{scale:"0.92",filter:"blur(2px)"}:{}},...ge,ref:Nt,children:[jsx(Ee,{when:z,spinner:p||X?.spinner||K?.type||ne.Simple,message:d||X?.loadingMessage}),jsx(xr,{title:P,onClose:()=>{F(false),h(r);}}),jsx(fr,{message:E,render:G,action:T}),T&&T.length>0&&jsx(gr,{variant:oe,action:T,dialogID:N,actionPosition:f})]})]})};vr.displayName="Zuz.Dialog";var Kt=vr;var Wt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},Xe=new Wt;var Sr=forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:m,onScrollY:i,onScrollX:a}=useScrollbar(e||1),{style:f,className:p,rest:d}=I(t);return useEffect(()=>{let w=u.current;if(!w)return;let v=()=>{window.dispatchEvent(new Event("resize"));};return w.addEventListener("scroll",v),()=>w.removeEventListener("scroll",v)},[]),jsxs(c,{ref:s,className:p.trim(),as:"--scrollview rel",children:[jsx(c,{as:`--scroll-content ${p}`.trim(),ref:u,style:r||{},children:d.children}),jsx(c,{as:"--scroll-track --track-y --abs",children:jsx(c,{as:"--scroll-thumb --abs",ref:l,onMouseDown:i})}),jsx(c,{as:"--scroll-track --track-x --abs",children:jsx(c,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})})]})});Sr.displayName="Zuz.ScrollView";var Ut=Sr;var Tr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:l,animation:m,prerender:i,inBackground:a,onClose:f,...p}=n,{drawer:d}=Y(true),[w,v]=useState(u),[x,h]=useState(false),[C,g]=useState(i??(d?.prerender||true)),S=()=>{h(false),f?.(e??-1);},{className:N,style:P,rest:R}=I(p),E=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Xe.isTop(S)&&S();}}],[x]);useShortcuts(E),useEffect(()=>{v(u);},[u]),useEffect(()=>(x?Xe.push(S):Xe.pop(S),()=>Xe.pop(S)),[x]),useEffect(()=>{h(true);},[]);let k=t||d?.from||ae.Left,M=useMemo(()=>{switch(k){case ae.Left:return {from:{x:"-100vw"},to:{x:0}};case ae.Right:return {from:{x:"100vw"},to:{x:0}};case ae.Top:return {from:{y:"-100vh"},to:{y:0}};case ae.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,d?.from]),A=ie({from:{...M.from,opacity:0},to:{...M.to,opacity:1},when:x,curve:m||d?.animation||Z.EaseInOut,duration:s||d?.speed||.5,watch:["scale","filter"]}),B=useMemo(()=>1e4+(r||1)*10,[r]);return jsxs(Fragment$1,{children:[jsx(Be,{onClick:F=>{x&&S();},when:x,style:{zIndex:B}}),jsxs(c,{ref:o,"aria-hidden":!x,className:`--drawer flex cols ${N} --${k.toLowerCase()} fixed`,style:{...P,...A.style,"--m":`${l||d?.margin||0}px`,zIndex:B+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...R,children:[t==ae.Top||t==ae.Bottom?jsx(c,{className:"--handle"}):null,jsx(Ut,{children:C||x?w:null})]})]})};Tr.displayName="Zuz.Drawer";var Qt=Tr;var Pr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Pr||{}),Rr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Ha=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:l})=>{let m=useDelayed(),i=useDelayed(((u||4)-1)*1e3),{toast:a}=Y(true),f=ie({when:m&&!i,duration:a?.duration||.2,transition:q.SlideInTop,curve:a?.curve||Z.EaseInOut});return useEffect(()=>{i&&n&&l?.(n);},[i,n]),jsxs(c,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsx(c,{as:"--ico flex aic jcc",fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.2,when:m&&!i},children:r?jsx(Q,{name:r,fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.4,duration:.5,when:m&&!i}}):jsx(c,{as:"--no-icon",fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.4,duration:.5,when:m&&!i}})}),jsxs(c,{as:"--meta",children:[jsx(V,{as:"--tt",fx:{transition:q.SlideInTop,curve:Z.Spring,delay:.3,when:m},children:t||Rr[e]}),jsx(V,{as:"--tm",fx:{transition:q.SlideInTop,curve:Z.Spring,delay:.4,duration:.5,when:m},children:s})]})]})},Jt=Ha;var pe=createContext(null),Fa=({ref:o,...n})=>{let r=useContext(pe)?.depth??0,[t,s]=useState(null),[u,l]=useState(false),[m,i]=useState([]),a=useDelayed(),f=useRef(0),p=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};useImperativeHandle(o,()=>({add(h){let C=p(),g={id:C,...h};return i(S=>[...S,g]),C},openMenu(h){l(false),setTimeout(()=>{s({id:p(),type:"menu",props:h}),l(true);},16);},remove(h){i(C=>C.filter(g=>g.id!==h)),t?.id===h&&d();},clear(){i([]);}})),useEffect(()=>{if(t&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,d]);let w=h=>{setTimeout(()=>{i(C=>C.filter(g=>g.id!==h)),t?.id===h&&s(null);},250);},v=useMemo(()=>[...m.filter(h=>h.type!="toast")],[m]);if(!a)return null;let x=m.filter(h=>h.type=="toast").reverse();return createPortal(jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[v.map((h,C)=>{let g=C<v.length-1;return h.type==="dialog"?jsx(Kt,{onClose:w,index:C,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsx(Qt,{onClose:w,index:C,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),x.length>0&&jsx(c,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:1001},children:x.map((h,C)=>jsx(Jt,{onClose:w,index:C,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:2147483647},children:jsx(Ft,{onClose:d,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},Za=({children:o})=>{let n=useContext(pe),e=n?n.depth+1:0,r=useRef(null),t=useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),clear:()=>r.current?.clear(),depth:e,isSubLayer:!!n}),[n]);return jsxs(pe.Provider,{value:t,children:[o,jsx(Fa,{ref:r})]})},zt=Za;var Wa=()=>{let o=useContext(pe);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t);return {clearAll:n,show:t=>{let s=o.add({type:"dialog",props:{...t,type:Ve.Dialog}});return {id:s,hide:()=>e(s)}},hide:e}},Ua=Wa;var qa=()=>{let o=useContext(pe);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,a)=>o.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,p)=>n("default",{title:i,message:a,icon:f,duration:p}),hide:i=>o.remove(i),success:(i,a,f,p)=>n("success",{title:i,message:a,icon:f,duration:p}),error:(i,a,f,p)=>n("error",{title:i,message:a,icon:f,duration:p}),warn:(i,a,f,p)=>n("warn",{title:i,message:a,icon:f,duration:p}),promise:(i,a,f,p)=>n("promise",{title:i,message:a,icon:f,duration:p}),clearAll:()=>o.clear()}},eo=qa;var Ya=()=>{let o=useContext(pe);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>{let s=o.add({type:"drawer",props:t});return {id:s,hide:()=>e(s)}};return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:ae.Right}),left:t=>r({children:t,from:ae.Left}),top:t=>r({children:t,from:ae.Top}),bottom:t=>r({children:t,from:ae.Bottom}),close:e}},Qa=Ya;var ja=(o,n,e={})=>{let[r,t]=useState(null),[s,u]=useState(false),{duration:l=.25,curve:m=Z.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ie({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:m,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},ei=ja;var oi=()=>{let o=useContext(pe);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,t,s)=>{r.preventDefault(),o.openMenu({event:r,items:t,origin:s});},showMenu:(r,{items:t,origin:s,offsetX:u,offsetY:l,transition:m,curve:i,arrow:a,duration:f,header:p,footer:d})=>{o.openMenu({fx:{transition:m,curve:i,duration:f},parent:r,items:t,origin:s||We.TopCenter,offsetX:u,offsetY:l,arrow:a,header:p,footer:d});},hide:o.clear}},ri=oi;var Or=({ref:o,style:n,...e})=>{let r=useRef(null),t=useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=I(e,t);return jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};Or.displayName="Zuz.Box";var c=Or;var Hr=forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=useState(false);return jsxs(c,{className:"--accordion flex cols",...t,children:[jsxs(_,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(V,{className:"--label flex",children:e}),jsx(c,{className:"--arrow flex",children:s?D.arrowUp:D.arrowDown})]}),s&&jsx(c,{className:"--detail",children:r})]})});Hr.displayName="Zuz.Accordion";var mi=Hr;var ci=({label:o,icon:n,onClick:e,idx:r,selected:t})=>jsx(_,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${t?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsx(Q,{name:n}):n}),Ar=ci;var $r=forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,l=useRef(null),[m,i]=useState(t||e[0].tag||0),a=useCallback(({x,y:h})=>{if(l.current){let C=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-C.left}`),document.documentElement.style.setProperty("--tip-y",`${h-C.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",a));},[]);useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((x,h)=>h.label.length>x.length?h.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),l.current?.addEventListener("pointerenter",p));},[]);let{className:d,style:w,rest:v}=I(u);return jsxs(c,{ref:l,style:w,className:[`--actionbar flex aic ${d}`,`${!s||s==te.Auto?"rel":`--${s}`}`].join(" ").trim(),...v,children:[e.map((x,h)=>jsx(Ar,{selected:m===x.tag||t==h,...x,idx:h},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(c,{className:"--tip abs",children:jsx(c,{className:"--track flex aic",children:e.map(({label:x})=>jsx(c,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});$r.displayName="Zuz.ActionBar";var gi=$r;var _r=forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...l}=o,{className:m,style:i,rest:a}=I(l);return jsxs(c,{className:`--alert --${e||me.Info} flex aic ${m}`.trim(),style:i,...a,children:[jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&D[e||me.Info]}),jsxs(c,{className:"--meta flex cols",children:[jsx(V,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(V,{className:"--message",h:2,children:s})]})]})});_r.displayName="Zuz.Alert";var yi=_r;var Fr=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:l,rest:m}=I(s),{variant:i}=Y(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsx("input",{className:`--input --${e||i} flex ${l}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...m})};Fr.displayName="Zuz.Input";var re=Fr;var Kr=o=>{let{meta:n,children:e}=o,r=useDelayed(),{label:t,icon:s,...u}=isValidElement(n)?{}:n,{className:l,style:m,rest:i}=I({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return isValidElement(n)?jsx("li",{style:m,className:l,children:n}):jsxs("li",{style:m,className:l,...i,children:[e,typeof n=="string"?n:t]})};Kr.displayName="Zuz.ListItem";var Wr=Kr;var Gr=forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...l}=o,{className:m,style:i,rest:a}=I(l),f=u==true?"ol":"ul";return createElement(f,{className:`--list --${r||U.Small} flex ${t??"cols"} ${m}`.trim(),style:i,ref:n,...a,children:e.map((p,d,w)=>{let v=`${typeof p=="string"?`li-${String(p)}`:isValidElement(p)?`li-${p.key}`||`${d}-${MD5(p.toString())}`:p.label}-${d}`;return jsxs(Fragment,{children:[jsx(Wr,{meta:p}),s&&w[d+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${v}`):null]},v)})})});Gr.displayName="Zuz.List";var ke=Gr;var Xr=forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...l}=o,{className:m}=I({as:s||""}),{style:i}=I(l),[a,f]=useState(false),[p,d]=useState(t||[]),w=useRef(null),v=useRef(null),x=useRef(null),h=useMemo(()=>l.name||uuid(12),[]),[C,g]=useState(null),[S,N]=useState(null),[P,R]=useState([]),k=useDebounce(T=>{T.target.value==""?(f(false),d([])):r&&T.target.value.trim()!=""&&withPost(r,{query:T.target.value}).then($=>{"items"in $&&_$1($.items).isArray()?(d($.items),N(T.target.value),R($.items)):console.error("Action Response should contain items array"),g(null);}).catch($=>{g(null),d([]);});},250),M=()=>{if(v.current){let T=v.current.getBoundingClientRect(),$=window.innerHeight-T.bottom,z=T.top;if(x.current){let W=x.current;$<W.offsetHeight&&z>$?(W.style.top="auto",W.style.bottom=`${T.height}px`,W.style.maxHeight=`${z-150}px`):(W.style.top=`${T.height+5}px`,W.style.bottom="auto",W.style.maxHeight=`${$-150}px`);}}},A=T=>{if(p.length>0){if((T.key==="ArrowDown"||T.key==="ArrowUp")&&(T.preventDefault(),T.stopPropagation()),T.key==="Escape")g(null),f(false),d([]);else if(T.key==="ArrowDown")g($=>{let z=$===null||$===p.length-1?0:$+1;return F(z),z});else if(T.key==="ArrowUp")g($=>{let z=$===null||$===0?p.length-1:$-1;return F(z),z});else if(T.key==="Enter"&&C!==null){let $=p[C];w.current&&(w.current.value=$,f(false),d([]));}}},B=T=>{w.current&&(w.current.value=T,f(false),d([]));},F=T=>{let $=p[T];if($&&w.current&&(w.current.value=$,w.current.setSelectionRange($.length,$.length)),x.current){let W=x.current.children[T];W&&W.scrollIntoView({block:"nearest"});}},G=T=>{v.current&&!v.current.contains(T.target)&&(f(false),d([]));},O=()=>{w.current&&w.current.value===S&&(d(P),g(null),M());};return useEffect(()=>(window.addEventListener("resize",M),window.addEventListener("scroll",M,true),document.addEventListener("mousedown",G),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true),document.removeEventListener("mousedown",G);}),[]),useEffect(()=>{M();},[p]),jsxs(c,{style:i,ref:v,className:`--autocomplete --${o.size||U.Small} flex aic rel ${m}`.trim(),children:[jsx(re,{ref:w,autoComplete:"off",onChange:k,onKeyDown:A,onFocus:O,...l}),jsx(c,{className:"--arrow rel flex aic jcc",children:p.length>0?D.arrowUp:D.arrowDown}),p.length>0&&jsx(ke,{id:h,ref:x,className:"--suggestion-list flex cols abs",items:p.map((T,$)=>({label:T,onClick:z=>{z.preventDefault(),z.stopPropagation(),B(T);},className:C===$?"--current":"",animate:{transition:q.SlideInBottom,curve:Z.EaseInOut,delay:clamp(.02*$,.02,.5)}}))})]})});Xr.displayName="Zuz.AutoComplete";var Hi=Xr;var Yr=forwardRef((o,n)=>{let e=useRef(null),r=useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:t,className:s,rest:u}=I(o,r);return !u.src||u.src==""?null:jsx("img",{ref:r,style:t,className:`${s} flex`,...u})});Yr.displayName="Zuz.Image";var je=Yr;var Qr=forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:l,as:m,alt:i,color:a,style:f,...p}=o,[d,w,v]=useImage(e??"",s,u),{className:x,style:h,rest:C}=I({fx:l,as:m});return jsx(c,{className:`--avatar --${r||U.Small} --${(t||_o.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:a||"var(--primary)",...f,...h},...C,children:e?jsx(je,{src:d,crossOrigin:s,referrerPolicy:u,...p}):jsx(V,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Qr.displayName="Zuz.Avatar";var Ki=Qr;var Wi=({size:o=5,type:n="dead",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:l}=I(t);return jsxs(c,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsx(c,{fx:{transition:q.FadeIn,curve:Z.Liquid,duration:.5,when:r},as:"abs abc",children:jsx(he,{})}),jsx(c,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Ui=Wi;var al=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let o=new Date,n=o.getDay();return addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return format(addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],il=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Jr=forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:l,rest:m}=I(s),[i,a]=useState(e||new Date),f=startOfMonth(i),p=endOfMonth(i),d=startOfWeek(f),w=endOfWeek(p),v=useMemo(()=>eachDayOfInterval({start:d,end:w}),[d,w]),x=g=>{t?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},C=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxs(c,{as:`--calendar flex --${r||"sm"} ${l}`,style:u,children:[jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:il(al).map(g=>{let S=g.getDate();return jsxs(_,{onClick:()=>x(S),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(V,{as:"flex:1",children:g.label}),jsx(V,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxs(c,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(V,{as:"flex:1 --calendar-cm bold",children:format(i,"MMMM yyyy")}),jsx(_,{onClick:h,as:"--calendar-chevron",children:D.chevronUpOutline}),jsx(_,{onClick:C,as:"--calendar-chevron",children:D.chevronDownOutline})]}),jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsx(V,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),v.map((g,S)=>{let N=isSameMonth(g,i),P=isSameDay(g,i),R=isToday(g);return jsx(_,{disabled:!N,onClick:()=>x(g),as:["--calendar-day --calendar-dd",`${P?"--calendar-dd-selected":""}`,`${R?"--calendar-dd-current":""}`],children:format(g,"d")},`--calendar-day-${S}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Jr.displayName="Zuz.Calendar";var lo=Jr;var jr=(n=>(n.Line="line",n))(jr||{});var on=forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:m,animated:i,animDuration:a=2,animDelay:f=0,padding:p=0,type:d,...w}=o,{className:v,style:x,rest:h}=I(w),C=useRef(null),g=useResizeObserver(C.current?.parentElement||C),S=typeof r=="number"?r:g.width,N=typeof t=="number"?t:g.height,P={width:S,height:N},R=useId(),{pathD:E,areaPathD:k}=useLineChart(e,P,p+(u||2)),M=useRef(null),A=useRef(null),[B,F]=useState(0),[G,O]=useState(0);return useEffect(()=>{i&&(M.current&&F(M.current.getTotalLength()),A.current&&O(A.current.getTotalLength()));},[i,E,k,S,N]),jsx(c,{ref:C,as:`--chart --${d||"line"}-chart ${v}`.trim(),style:{...x,width:r,height:t},...h,children:S>0&&N>0&&jsxs("svg",{viewBox:`0 0 ${S} ${N}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:R,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:l}),jsx("stop",{offset:"100%",stopColor:m})]})}),jsx("path",{ref:A,d:k,fill:`url(#${R})`,stroke:"none",style:i?{strokeDasharray:G,strokeDashoffset:G}:{},children:i&&jsx("animate",{attributeName:"stroke-dashoffset",from:G,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsx("path",{ref:M,d:E,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:B,strokeDashoffset:B}:{},children:i&&jsx("animate",{attributeName:"stroke-dashoffset",from:B,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});on.displayName="Zuz.Chart";var fl=on;var rn=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(rn||{}),nn=(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))(nn||{});var an=forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=useRef(null);useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),useEffect(()=>{e&&u.current&&(t?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:l,style:m,rest:i}=I(s);return jsx(c,{className:`--progress ${t?"--animated":""} flex rel ${l}`.trim(),style:m,...i,children:jsx(c,{ref:u,className:"--bar rel"})})});an.displayName="Zuz.ProgressBar";var co=an;var ln=forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...m}=o,{className:i,style:a,rest:f}=I(m);return jsx(c,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxs(c,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsx(V,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxs(c,{as:"flex aic --bubble-audio",children:[jsx(j,{className:"--bm-action",children:D.play}),jsx(co,{progress:.7}),jsx(V,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsx(c,{as:"--bubble-image",children:jsx(je,{src:r.source})}):null:null,jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsx(V,{className:"--bubble-stamp tar",children:timeSince(u)}),t=="me"&&jsx(j,{className:`--bubble-status --bs-${s}`,children:s==0?D.pending:s==1?D.done:s==2?D.doneAll:D.doneAll})]})]})})});ln.displayName="Zuz.Bubble";var wl=ln;var mn=forwardRef((o,n)=>{let{style:e,className:r,rest:t}=I(o);return jsx("label",{ref:n,style:e,className:r,...t})});mn.displayName="Zuz.Label";var tt=mn;var cn=forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:l,checked:m,onSwitch:i,...a}=o,[f,p]=useState(m||false),d=useRef(null),{variant:w}=Y(true);return useImperativeHandle(n,()=>({setChecked(v,x=true){p(v),d.current&&(d.current.checked=v),x&&i&&i(v,s||"cb");},toggle(v=true){d.current&&(d.current.checked=!f),v&&i&&i&&i(!f,s||"cb"),p(!f);}})),jsxs(tt,{className:`--${(t||be.Default).toLowerCase()} ${!t||t==be.Default?"--checkbox":"--switch"} --${l||w||U.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!t||t==be.Default)&&D.check,jsx(re,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:v=>{i&&i(v.target.checked,s||"cb"),p(v.target.checked);}})]})});cn.displayName="Zuz.CheckBox";var ot=cn;var Bl=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:l,...m}=n,i=useRef(null),{className:a,style:f,rest:p}=I({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},i),d=useMemo(()=>{let v=new Set;return s.split(",").forEach(x=>{if(x.includes("-")){let[h,C]=x.split("-").map(Number);for(let g=h;g<=C;g++)v.add(g);}else x&&v.add(Number(x));}),v},[s]),w=useMemo(()=>{let v=e.split(`
|
|
8
|
+
document.documentElement.style.colorScheme = theme;`}}),jsx(zt,{children:o})]})},Xo=(o,n)=>{if(Us)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var Qo=({ref:o,...n})=>{let{style:e,...r}=n,{style:t,className:s,rest:u}=I(r);return jsx("span",{ref:o,style:e,className:s,...u})};Qo.displayName="Zuz.Span";var j=Qo;var jo=forwardRef((o,n)=>{let{name:e,pathCount:r,variant:t,color:s,...u}=o,{variant:l}=Y(true),{className:m,style:i,rest:a}=I(u);return jsx("div",{style:{color:s,...i},className:`icon-${e} --icon --${t||l||U.Small} ${m}`.trim(),ref:n,...a,children:Array(r||0).fill(0).map((f,p)=>jsx(j,{className:`path${p+1}`},`${e}-layer-${p}`))})});jo.displayName="Zuz.Icon";var Q=jo;var ne={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var er=o=>{let{type:n,variant:e,color:r,...t}=o,{className:s,style:u,rest:l}=I(t),{spinner:m}=Y(true),i=()=>{switch(n||m?.type||ne.Simple){case ne.Simple:return null;case ne.Wave:return jsxs(Fragment$1,{children:[jsx(c,{as:"--bar --bar1"}),jsx(c,{as:"--bar --bar2"}),jsx(c,{as:"--bar --bar3"})]});case ne.Roller:return null}};return jsx(c,{className:`${s} --spinner --${(n||m?.type||ne.Simple).toLowerCase()} --${e||m?.variant||U.Small}`.trim(),style:{...u},...l,children:i()})};er.displayName="Zuz.Spinner";var he=er;var dt={Loading:"loading",Normal:"normal"};var or=({ref:o,...n})=>{let{reset:e,kind:r="solid",variant:t,icon:s,iconSize:u,children:l,withLabel:m,spinner:i,state:a,disabled:f,...p}=n,{style:d,className:w,rest:v}=I(p),{variant:x}=Y(true);return jsxs("button",{className:`--button --${r} --${t||x} flex aic ${e?"":"jcc"} ${s?"--with-icon":""} ${w}`.trim().replace(/\s+/g," "),style:d,ref:o,disabled:a==dt.Loading||n.skeleton?.enabled||f,...v,children:[a==dt.Loading&&jsx(he,{variant:t||x,type:i||ne.Simple}),(!a||a==dt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(Q,{variant:u,name:s}),m===true?jsx(j,{children:l}):l]})]})};or.displayName="Zuz.Button";var _=or;var nr=forwardRef((o,n)=>{let{h:e,html:r,children:t,lines:s,...u}=o,{style:l,className:m,rest:i}=I(u),a=`h${o.h||1}`;return jsx(a,{ref:n,style:l,className:m,...i,children:r?jsx(j,{dangerouslySetInnerHTML:{__html:r}}):t})});nr.displayName="Zuz.Text";var V=nr;var oa=o=>{let{label:n,labelColor:e,icon:r,iconColor:t,index:s,className:u,onSelect:l}=o;return n=="-"?jsx(c,{className:"--line"}):jsxs(_,{reset:true,onClick:m=>l?.(o),className:`--item ${u||""}`.trim(),children:[jsx(c,{as:"--icon",children:jsx(Q,{name:r,className:"--ico",style:t?{color:t}:{}})}),jsx(V,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},sr=oa;var lr=({ref:o,...n})=>{let{id:e,as:r,fx:t,offsetX:s,offsetY:u,parent:l,event:m,arrow:i,when:a,items:f,header:p,footer:d,origin:w=We.TopRight,...v}=n,[x,h]=useState(false),[C,g]=useState(f||[]),{position:S,targetRef:N,calculatedAnchor:P}=useAnchorPosition(l?.current,m,{offsetX:s,offsetY:u,preferredAnchor:w}),E=l&&S.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",k=useMemo(()=>{let O=P.toLowerCase();return O.includes("left")?"--arrow-left":O.includes("right")?"--arrow-right":"--arrow-center"},[P]),M=S.top!==0||S.left!==0;useEffect(()=>{a&&M?h(true):a||h(false);},[a,M]);let{className:A,style:B,rest:F}=I(v),G=ie({...t?.transition?{transition:t.transition??q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:t?.curve??Z.EaseInOut,duration:t?.duration??.05,when:x&&M});return jsxs(c,{ref:N,className:`--contextmenu ${i||l!=null?`--has-arrow ${E} ${k}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!x,style:{...B,...G.style,top:S.top,left:S.left,visibility:M?"visible":"hidden",transformOrigin:P},...F,children:[typeof p=="function"?createElement(p):p,C.map((O,T)=>jsx(sr,{...O,index:T},`context-${O.label.toLowerCase()}-${T}`)),typeof d=="function"?createElement(d):d]})};lr.displayName="Zuz.ContextMenu";var Ft=lr;var mr=forwardRef((o,n)=>{let{children:e,fx:r,when:t,fxDelay:s,fxStep:u,classToIgnore:l,...m}=o,i=Y(true),a=useDelayed(),f=r||i?.group?.fx,p=s||i?.group?.fxDelay,d=u||i?.group?.fxStep,w=l||i?.group?.classToIgnore||"--ignore",v=useMemo(()=>f?addPropsToChildren(e,x=>{if(x.type===Fragment)return false;let h=x.props||{},C="fx"in h,g=h.as?Array.isArray(h.as)?h.as.join(" "):h.as:h.className||"",S=typeof g=="string"&&g.includes(w);return !C&&!S},x=>({fx:{...f,delay:(p||0)+x*(d||.1),when:t??(r?.when||a)}})):e,[e,t,a,f]);return jsx(c,{className:"--group",ref:n,...m,children:v})});mr.displayName="Zuz.Group";var Zt=mr;var pr=forwardRef((o,n)=>{let{message:e,spinner:r,spinnerSize:t,color:s,when:u,hideMessage:l,...m}=o,{className:i,style:a,rest:f}=I(m),{spinner:p}=Y(true);return "when"in o&&o.when==false?null:jsxs(Zt,{fx:{transition:q.SlideInBottom,curve:Z.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fillx nope nous ${i}`.trim(),style:{...a,backgroundColor:"var(--cover-bg)"},...f,children:[jsx(he,{variant:t||p?.variant||U.Small,type:r||p?.type||ne.Simple}),!l&&jsx(V,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});pr.displayName="Zuz.Cover";var Ee=pr;var ur=forwardRef((o,n)=>{let{when:e,...r}=o;return jsx(c,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:q.FadeIn,when:e},...r})});ur.displayName="Zuz.Overlay";var Be=ur;var ba=({action:o,render:n=true,message:e=""})=>jsx(c,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),fr=ba;var va=({action:o,actionPosition:n,dialogID:e,variant:r})=>jsx(c,{as:`--footer flex aic rel ${n?n==Fo.Center?"jcc":"":"jce"}`.trim(),children:o.map((t,s)=>jsx(_,{variant:r,onClick:u=>t.handler?t.handler():t.onClick?t.onClick():console.log("onClick Handler missing"),as:"--action",children:t.label},`dialog-${e}-action-${t.key}`))}),gr=va;var Sa={colorSchemeLight: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:[jsx("circle",{cx:"12",cy:"12",r:"5"}),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: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:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark: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:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[me.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[me.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[me.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[me.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[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"}),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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[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"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},D=Sa;var Ca=({title:o="Alert",onClose:n})=>jsxs(c,{as:"--head flex aic rel",children:[jsx(c,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsx(_,{onClick:e=>n(),className:"--closer abs center-v",children:D.close})]}),xr=Ca;var vr=({ref:o,...n})=>{let{index:e,id:r,title:t,message:s,transition:u,curve:l,speed:m,type:i,action:a,actionPosition:f,spinner:p,loadingMessage:d,variant:w,inBackground:v,closeDelay:x=200,onClose:h,onShow:C,onHide:g,...S}=n,N=useMemo(()=>uuid(12),[]),[P,R]=useState(t||""),[E,k]=useState(s||""),[M,A]=useState(i||Ve.Dialog),[B,F]=useState(false),[G,O]=useState(true),[T,$]=useState(a||null),[z,W]=useState(false),{variant:H,spinner:K,dialog:X}=Y(true),oe=w||X?.variant||H||U.Small,{style:ee,className:ue,rest:ge}=I(S),Nt=useRef(null),Et=ie({when:B,duration:m||X?.speed||.3,delay:X?.delay||.1,transition:u||X?.transition||q.SlideInBottom,curve:l||X?.curve||Z.EaseInOut,watch:["scale","filter","transform"]});useEffect(()=>{A(Ve.Dialog),k(s),R(P),T&&$(T.reduce((se,J)=>(se.push({...J,key:J.key||uuid(12)}),se),[])),F(true),setTimeout(()=>C?C():()=>{},500);},[]);let Ne=useMemo(()=>1e4+e*10,[e]);return jsxs(Fragment$1,{children:[jsx(Be,{style:{zIndex:Ne},when:B}),jsxs(c,{as:`--dialog --${(i??Ve.Default).toLowerCase()} ${B?"--visible":""} ${ue} fixed abc`.trim(),style:{...Et.style,zIndex:Ne+1,pointerEvents:v==true?"none":"auto",...v==true?{scale:"0.92",filter:"blur(2px)"}:{}},...ge,ref:Nt,children:[jsx(Ee,{when:z,spinner:p||X?.spinner||K?.type||ne.Simple,message:d||X?.loadingMessage}),jsx(xr,{title:P,onClose:()=>{F(false),h(r);}}),jsx(fr,{message:E,render:G,action:T}),T&&T.length>0&&jsx(gr,{variant:oe,action:T,dialogID:N,actionPosition:f})]})]})};vr.displayName="Zuz.Dialog";var Kt=vr;var Wt=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},Xe=new Wt;var Sr=forwardRef((o,n)=>{let{speed:e,style:r,...t}=o,{rootRef:s,containerRef:u,thumbY:l,thumbX:m,onScrollY:i,onScrollX:a}=useScrollbar(e||1),{style:f,className:p,rest:d}=I(t);return useEffect(()=>{let w=u.current;if(!w)return;let v=()=>{window.dispatchEvent(new Event("resize"));};return w.addEventListener("scroll",v),()=>w.removeEventListener("scroll",v)},[]),jsxs(c,{ref:s,className:p.trim(),as:"--scrollview rel",children:[jsx(c,{as:`--scroll-content ${p}`.trim(),ref:u,style:r||{},children:d.children}),jsx(c,{as:"--scroll-track --track-y --abs",children:jsx(c,{as:"--scroll-thumb --abs",ref:l,onMouseDown:i})}),jsx(c,{as:"--scroll-track --track-x --abs",children:jsx(c,{as:"--scroll-thumb --abs",ref:m,onMouseDown:a})})]})});Sr.displayName="Zuz.ScrollView";var Ut=Sr;var Tr=({ref:o,...n})=>{let{id:e,index:r,from:t,speed:s,children:u,margin:l,animation:m,prerender:i,inBackground:a,onClose:f,...p}=n,{drawer:d}=Y(true),[w,v]=useState(u),[x,h]=useState(false),[C,g]=useState(i??(d?.prerender||true)),S=()=>{h(false),f?.(e??-1);},{className:N,style:P,rest:R}=I(p),E=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Xe.isTop(S)&&S();}}],[x]);useShortcuts(E),useEffect(()=>{v(u);},[u]),useEffect(()=>(x?Xe.push(S):Xe.pop(S),()=>Xe.pop(S)),[x]),useEffect(()=>{h(true);},[]);let k=t||d?.from||ae.Left,M=useMemo(()=>{switch(k){case ae.Left:return {from:{x:"-100vw"},to:{x:0}};case ae.Right:return {from:{x:"100vw"},to:{x:0}};case ae.Top:return {from:{y:"-100vh"},to:{y:0}};case ae.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[t,d?.from]),A=ie({from:{...M.from,opacity:0},to:{...M.to,opacity:1},when:x,curve:m||d?.animation||Z.EaseInOut,duration:s||d?.speed||.5,watch:["scale","filter"]}),B=useMemo(()=>1e4+(r||1)*10,[r]);return jsxs(Fragment$1,{children:[jsx(Be,{onClick:F=>{x&&S();},when:x,style:{zIndex:B}}),jsxs(c,{ref:o,"aria-hidden":!x,className:`--drawer flex cols ${N} --${k.toLowerCase()} fixed`,style:{...P,...A.style,"--m":`${l||d?.margin||0}px`,zIndex:B+1,pointerEvents:a==true?"none":"auto",...a==true?{scale:"0.92",filter:"blur(2px)"}:{}},...R,children:[t==ae.Top||t==ae.Bottom?jsx(c,{className:"--handle"}):null,jsx(Ut,{children:C||x?w:null})]})]})};Tr.displayName="Zuz.Drawer";var Qt=Tr;var Pr=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Pr||{}),Rr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Ha=({index:o,id:n,type:e,icon:r,title:t,message:s,duration:u,onClose:l})=>{let m=useDelayed(),i=useDelayed(((u||4)-1)*1e3),{toast:a}=Y(true),f=ie({when:m&&!i,duration:a?.duration||.2,transition:q.SlideInTop,curve:a?.curve||Z.EaseInOut});return useEffect(()=>{i&&n&&l?.(n);},[i,n]),jsxs(c,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,style:f.style,children:[jsx(c,{as:"--ico flex aic jcc",fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.2,when:m&&!i},children:r?jsx(Q,{name:r,fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.4,duration:.5,when:m&&!i}}):jsx(c,{as:"--no-icon",fx:{transition:q.ScaleIn,curve:Z.Spring,delay:.4,duration:.5,when:m&&!i}})}),jsxs(c,{as:"--meta",children:[jsx(V,{as:"--tt",fx:{transition:q.SlideInTop,curve:Z.Spring,delay:.3,when:m},children:t||Rr[e]}),jsx(V,{as:"--tm",fx:{transition:q.SlideInTop,curve:Z.Spring,delay:.4,duration:.5,when:m},children:s})]})]})},Jt=Ha;var pe=createContext(null),Fa=({ref:o,...n})=>{let r=useContext(pe)?.depth??0,[t,s]=useState(null),[u,l]=useState(false),[m,i]=useState([]),a=useDelayed(),f=useRef(0),p=()=>++f.current,d=()=>{l(false),setTimeout(()=>s(null),200);};useImperativeHandle(o,()=>({add(h){let C=p(),g={id:C,...h};return i(S=>[...S,g]),C},openMenu(h){l(false),setTimeout(()=>{s({id:p(),type:"menu",props:h}),l(true);},16);},remove(h){i(C=>C.filter(g=>g.id!==h)),t?.id===h&&d();},clear(){i([]);}})),useEffect(()=>{if(t&&u){let h=()=>d();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[t,u,d]);let w=h=>{setTimeout(()=>{i(C=>C.filter(g=>g.id!==h)),t?.id===h&&s(null);},250);},v=useMemo(()=>[...m.filter(h=>h.type!="toast")],[m]);if(!a)return null;let x=m.filter(h=>h.type=="toast").reverse();return createPortal(jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+r},children:[v.map((h,C)=>{let g=C<v.length-1;return h.type==="dialog"?jsx(Kt,{onClose:w,index:C,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsx(Qt,{onClose:w,index:C,id:h.id,...h.props,inBackground:g},`layer-${h.type}-${h.id}`):null}),x.length>0&&jsx(c,{as:"--zuz-layer-toasts fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:x.map((h,C)=>jsx(Jt,{onClose:w,index:C,id:h.id,...h.props},`layer-${h.type}-${h.id}`))}),t&&jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(Ft,{onClose:d,when:u,...t.props},`menu-${t.id}`)})]}),document.body)},Za=({children:o})=>{let n=useContext(pe),e=n?n.depth+1:0,r=useRef(null),t=useMemo(()=>({add:s=>r.current?.add(s),openMenu:s=>r.current?.openMenu(s),remove:s=>r.current?.remove(s),clear:()=>r.current?.clear(),depth:e,isSubLayer:!!n}),[n]);return jsxs(pe.Provider,{value:t,children:[o,jsx(Fa,{ref:r})]})},zt=Za;var Wa=()=>{let o=useContext(pe);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t);return {clearAll:n,show:t=>{let s=o.add({type:"dialog",props:{...t,type:Ve.Dialog}});return {id:s,hide:()=>e(s)}},hide:e}},Ua=Wa;var qa=()=>{let o=useContext(pe);if(!o)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,a)=>o.add({type:"toast",props:{...a,type:i}});return {show:(i,a,f,p)=>n("default",{title:i,message:a,icon:f,duration:p}),hide:i=>o.remove(i),success:(i,a,f,p)=>n("success",{title:i,message:a,icon:f,duration:p}),error:(i,a,f,p)=>n("error",{title:i,message:a,icon:f,duration:p}),warn:(i,a,f,p)=>n("warn",{title:i,message:a,icon:f,duration:p}),promise:(i,a,f,p)=>n("promise",{title:i,message:a,icon:f,duration:p}),clearAll:()=>o.clear()}},eo=qa;var Ya=()=>{let o=useContext(pe);if(!o)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>o.clear(),e=t=>o.remove(t),r=t=>{let s=o.add({type:"drawer",props:t});return {id:s,hide:()=>e(s)}};return {clearAll:n,open:t=>r({children:t}),right:t=>r({children:t,from:ae.Right}),left:t=>r({children:t,from:ae.Left}),top:t=>r({children:t,from:ae.Top}),bottom:t=>r({children:t,from:ae.Bottom}),close:e}},Qa=Ya;var ja=(o,n,e={})=>{let[r,t]=useState(null),[s,u]=useState(false),{duration:l=.25,curve:m=Z.EaseOutBack,borderRadius:i={from:40,to:24},targetWidth:a=320}=e;return useLayoutEffect(()=>{n&&o.current?(t(o.current.getBoundingClientRect()),u(true)):n||u(false);},[n,o]),{style:ie({from:{opacity:0,width:r?.width,height:r?.height,borderRadius:i.from},to:{opacity:1,width:a,height:"auto",borderRadius:i.to},curve:m,duration:l,when:s&&n}).style,isMeasured:s,sourceRect:r}},ei=ja;var oi=()=>{let o=useContext(pe);if(!o)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(r,t,s)=>{r.preventDefault(),o.openMenu({event:r,items:t,origin:s});},showMenu:(r,{items:t,origin:s,offsetX:u,offsetY:l,transition:m,curve:i,arrow:a,duration:f,header:p,footer:d})=>{o.openMenu({fx:{transition:m,curve:i,duration:f},parent:r,items:t,origin:s||We.TopCenter,offsetX:u,offsetY:l,arrow:a,header:p,footer:d});},hide:o.clear}},ri=oi;var Or=({ref:o,style:n,...e})=>{let r=useRef(null),t=useMemo(()=>o&&typeof o!="function"&&o.current?o:r,[o]),{style:s,className:u,rest:l}=I(e,t);return jsx("div",{ref:o||r,style:{...s,...n||{}},className:u,...l})};Or.displayName="Zuz.Box";var c=Or;var Hr=forwardRef((o,n)=>{let{title:e,message:r,...t}=o,[s,u]=useState(false);return jsxs(c,{className:"--accordion flex cols",...t,children:[jsxs(_,{onClick:l=>u(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(V,{className:"--label flex",children:e}),jsx(c,{className:"--arrow flex",children:s?D.arrowUp:D.arrowDown})]}),s&&jsx(c,{className:"--detail",children:r})]})});Hr.displayName="Zuz.Accordion";var mi=Hr;var ci=({label:o,icon:n,onClick:e,idx:r,selected:t})=>jsx(_,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${r}`),className:`--action ${t?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsx(Q,{name:n}):n}),Ar=ci;var $r=forwardRef((o,n)=>{let{items:e,name:r,selected:t,position:s,...u}=o,l=useRef(null),[m,i]=useState(t||e[0].tag||0),a=useCallback(({x,y:h})=>{if(l.current){let C=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-C.left}`),document.documentElement.style.setProperty("--tip-y",`${h-C.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",f),l.current.removeEventListener("pointermove",a),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",f),l.current.addEventListener("pointermove",a));},[]);useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((x,h)=>h.label.length>x.length?h.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),l.current?.addEventListener("pointerenter",p));},[]);let{className:d,style:w,rest:v}=I(u);return jsxs(c,{ref:l,style:w,className:[`--actionbar flex aic ${d}`,`${!s||s==te.Auto?"rel":`--${s}`}`].join(" ").trim(),...v,children:[e.map((x,h)=>jsx(Ar,{selected:m===x.tag||t==h,...x,idx:h},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(c,{className:"--tip abs",children:jsx(c,{className:"--track flex aic",children:e.map(({label:x})=>jsx(c,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});$r.displayName="Zuz.ActionBar";var gi=$r;var _r=forwardRef((o,n)=>{let{type:e,icon:r,title:t,message:s,iconSize:u,...l}=o,{className:m,style:i,rest:a}=I(l);return jsxs(c,{className:`--alert --${e||me.Info} flex aic ${m}`.trim(),style:i,...a,children:[jsx(c,{className:`--icon icon-${r||"auto-matic"}`,style:u?{fontSize:u,width:u,height:u}:{},children:!r&&D[e||me.Info]}),jsxs(c,{className:"--meta flex cols",children:[jsx(V,{className:`--title ${s?"--tm":""}`,children:t||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(V,{className:"--message",h:2,children:s})]})]})});_r.displayName="Zuz.Alert";var yi=_r;var Fr=({ref:o,...n})=>{let{variant:e,numeric:r,onConfirm:t,...s}=n,{style:u,className:l,rest:m}=I(s),{variant:i}=Y(true),a=f=>{r&&(f.currentTarget.value=f.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsx("input",{className:`--input --${e||i} flex ${l}`.trim(),style:u,onInput:a,onKeyDown:f=>{f.key=="Enter"&&t?.(f.currentTarget.value);},ref:o,...m})};Fr.displayName="Zuz.Input";var re=Fr;var Kr=o=>{let{meta:n,children:e}=o,r=useDelayed(),{label:t,icon:s,...u}=isValidElement(n)?{}:n,{className:l,style:m,rest:i}=I({...u,...u.animate?{animate:{...u.animate,when:r}}:{}});return isValidElement(n)?jsx("li",{style:m,className:l,children:n}):jsxs("li",{style:m,className:l,...i,children:[e,typeof n=="string"?n:t]})};Kr.displayName="Zuz.ListItem";var Wr=Kr;var Gr=forwardRef((o,n)=>{let{items:e,variant:r,direction:t,seperator:s,ol:u,...l}=o,{className:m,style:i,rest:a}=I(l),f=u==true?"ol":"ul";return createElement(f,{className:`--list --${r||U.Small} flex ${t??"cols"} ${m}`.trim(),style:i,ref:n,...a,children:e.map((p,d,w)=>{let v=`${typeof p=="string"?`li-${String(p)}`:isValidElement(p)?`li-${p.key}`||`${d}-${MD5(p.toString())}`:p.label}-${d}`;return jsxs(Fragment,{children:[jsx(Wr,{meta:p}),s&&w[d+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${v}`):null]},v)})})});Gr.displayName="Zuz.List";var ke=Gr;var Xr=forwardRef((o,n)=>{let{fx:e,action:r,data:t,withStyle:s,onChange:u,...l}=o,{className:m}=I({as:s||""}),{style:i}=I(l),[a,f]=useState(false),[p,d]=useState(t||[]),w=useRef(null),v=useRef(null),x=useRef(null),h=useMemo(()=>l.name||uuid(12),[]),[C,g]=useState(null),[S,N]=useState(null),[P,R]=useState([]),k=useDebounce(T=>{T.target.value==""?(f(false),d([])):r&&T.target.value.trim()!=""&&withPost(r,{query:T.target.value}).then($=>{"items"in $&&_$1($.items).isArray()?(d($.items),N(T.target.value),R($.items)):console.error("Action Response should contain items array"),g(null);}).catch($=>{g(null),d([]);});},250),M=()=>{if(v.current){let T=v.current.getBoundingClientRect(),$=window.innerHeight-T.bottom,z=T.top;if(x.current){let W=x.current;$<W.offsetHeight&&z>$?(W.style.top="auto",W.style.bottom=`${T.height}px`,W.style.maxHeight=`${z-150}px`):(W.style.top=`${T.height+5}px`,W.style.bottom="auto",W.style.maxHeight=`${$-150}px`);}}},A=T=>{if(p.length>0){if((T.key==="ArrowDown"||T.key==="ArrowUp")&&(T.preventDefault(),T.stopPropagation()),T.key==="Escape")g(null),f(false),d([]);else if(T.key==="ArrowDown")g($=>{let z=$===null||$===p.length-1?0:$+1;return F(z),z});else if(T.key==="ArrowUp")g($=>{let z=$===null||$===0?p.length-1:$-1;return F(z),z});else if(T.key==="Enter"&&C!==null){let $=p[C];w.current&&(w.current.value=$,f(false),d([]));}}},B=T=>{w.current&&(w.current.value=T,f(false),d([]));},F=T=>{let $=p[T];if($&&w.current&&(w.current.value=$,w.current.setSelectionRange($.length,$.length)),x.current){let W=x.current.children[T];W&&W.scrollIntoView({block:"nearest"});}},G=T=>{v.current&&!v.current.contains(T.target)&&(f(false),d([]));},O=()=>{w.current&&w.current.value===S&&(d(P),g(null),M());};return useEffect(()=>(window.addEventListener("resize",M),window.addEventListener("scroll",M,true),document.addEventListener("mousedown",G),()=>{window.removeEventListener("resize",M),window.removeEventListener("scroll",M,true),document.removeEventListener("mousedown",G);}),[]),useEffect(()=>{M();},[p]),jsxs(c,{style:i,ref:v,className:`--autocomplete --${o.size||U.Small} flex aic rel ${m}`.trim(),children:[jsx(re,{ref:w,autoComplete:"off",onChange:k,onKeyDown:A,onFocus:O,...l}),jsx(c,{className:"--arrow rel flex aic jcc",children:p.length>0?D.arrowUp:D.arrowDown}),p.length>0&&jsx(ke,{id:h,ref:x,className:"--suggestion-list flex cols abs",items:p.map((T,$)=>({label:T,onClick:z=>{z.preventDefault(),z.stopPropagation(),B(T);},className:C===$?"--current":"",animate:{transition:q.SlideInBottom,curve:Z.EaseInOut,delay:clamp(.02*$,.02,.5)}}))})]})});Xr.displayName="Zuz.AutoComplete";var Hi=Xr;var Yr=forwardRef((o,n)=>{let e=useRef(null),r=useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:t,className:s,rest:u}=I(o,r);return !u.src||u.src==""?null:jsx("img",{ref:r,style:t,className:`${s} flex`,...u})});Yr.displayName="Zuz.Image";var je=Yr;var Qr=forwardRef((o,n)=>{let{src:e,variant:r,type:t,crossOrigin:s,referrerPolicy:u,fx:l,as:m,alt:i,color:a,style:f,...p}=o,[d,w,v]=useImage(e??"",s,u),{className:x,style:h,rest:C}=I({fx:l,as:m});return jsx(c,{className:`--avatar --${r||U.Small} --${(t||_o.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:a||"var(--primary)",...f,...h},...C,children:e?jsx(je,{src:d,crossOrigin:s,referrerPolicy:u,...p}):jsx(V,{className:"--avatar-label",children:(i?i.charAt(0):"A").toUpperCase()})})});Qr.displayName="Zuz.Avatar";var Ki=Qr;var Wi=({size:o=5,type:n="dead",label:e="",loading:r=false,...t})=>{let{style:s,className:u,rest:l}=I(t);return jsxs(c,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${u}`.trim(),children:[jsx(c,{fx:{transition:q.FadeIn,curve:Z.Liquid,duration:.5,when:r},as:"abs abc",children:jsx(he,{})}),jsx(c,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},Ui=Wi;var al=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let o=new Date,n=o.getDay();return addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return format(addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],il=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let r=e.getDate().toISOString().split("T")[0];return n.has(r)?false:(n.add(r),true)})},Jr=forwardRef((o,n)=>{let{defaultValue:e,variant:r,onChange:t,...s}=o,{style:u,className:l,rest:m}=I(s),[i,a]=useState(e||new Date),f=startOfMonth(i),p=endOfMonth(i),d=startOfWeek(f),w=endOfWeek(p),v=useMemo(()=>eachDayOfInterval({start:d,end:w}),[d,w]),x=g=>{t?.(g),a(g);},h=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()-1));},C=()=>{a(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxs(c,{as:`--calendar flex --${r||"sm"} ${l}`,style:u,children:[jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:il(al).map(g=>{let S=g.getDate();return jsxs(_,{onClick:()=>x(S),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(V,{as:"flex:1",children:g.label}),jsx(V,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxs(c,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(V,{as:"flex:1 --calendar-cm bold",children:format(i,"MMMM yyyy")}),jsx(_,{onClick:h,as:"--calendar-chevron",children:D.chevronUpOutline}),jsx(_,{onClick:C,as:"--calendar-chevron",children:D.chevronDownOutline})]}),jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsx(V,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),v.map((g,S)=>{let N=isSameMonth(g,i),P=isSameDay(g,i),R=isToday(g);return jsx(_,{disabled:!N,onClick:()=>x(g),as:["--calendar-day --calendar-dd",`${P?"--calendar-dd-selected":""}`,`${R?"--calendar-dd-current":""}`],children:format(g,"d")},`--calendar-day-${S}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Jr.displayName="Zuz.Calendar";var lo=Jr;var jr=(n=>(n.Line="line",n))(jr||{});var on=forwardRef((o,n)=>{let{data:e,width:r,height:t,lineColor:s,strokeWidth:u=2,gradientStartColor:l,gradientEndColor:m,animated:i,animDuration:a=2,animDelay:f=0,padding:p=0,type:d,...w}=o,{className:v,style:x,rest:h}=I(w),C=useRef(null),g=useResizeObserver(C.current?.parentElement||C),S=typeof r=="number"?r:g.width,N=typeof t=="number"?t:g.height,P={width:S,height:N},R=useId(),{pathD:E,areaPathD:k}=useLineChart(e,P,p+(u||2)),M=useRef(null),A=useRef(null),[B,F]=useState(0),[G,O]=useState(0);return useEffect(()=>{i&&(M.current&&F(M.current.getTotalLength()),A.current&&O(A.current.getTotalLength()));},[i,E,k,S,N]),jsx(c,{ref:C,as:`--chart --${d||"line"}-chart ${v}`.trim(),style:{...x,width:r,height:t},...h,children:S>0&&N>0&&jsxs("svg",{viewBox:`0 0 ${S} ${N}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:R,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:l}),jsx("stop",{offset:"100%",stopColor:m})]})}),jsx("path",{ref:A,d:k,fill:`url(#${R})`,stroke:"none",style:i?{strokeDasharray:G,strokeDashoffset:G}:{},children:i&&jsx("animate",{attributeName:"stroke-dashoffset",from:G,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsx("path",{ref:M,d:E,fill:"none",stroke:s,strokeWidth:u,strokeLinecap:"round",strokeLinejoin:"round",style:i?{strokeDasharray:B,strokeDashoffset:B}:{},children:i&&jsx("animate",{attributeName:"stroke-dashoffset",from:B,to:"0",dur:`${a||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});on.displayName="Zuz.Chart";var fl=on;var rn=(t=>(t[t.Sending=0]="Sending",t[t.Sent=1]="Sent",t[t.Delivered=2]="Delivered",t[t.Read=3]="Read",t))(rn||{}),nn=(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))(nn||{});var an=forwardRef((o,n)=>{let{progress:e,type:r,animated:t,...s}=o,u=useRef(null);useImperativeHandle(n,()=>({setProgress:a=>{u.current.style.width=`${a*100}%`;}}),[]),useEffect(()=>{e&&u.current&&(t?setTimeout(()=>u.current.style.width=`${e*100}%`,500):u.current.style.width=`${e*100}%`);},[e,u.current]);let{className:l,style:m,rest:i}=I(s);return jsx(c,{className:`--progress ${t?"--animated":""} flex rel ${l}`.trim(),style:m,...i,children:jsx(c,{ref:u,className:"--bar rel"})})});an.displayName="Zuz.ProgressBar";var co=an;var ln=forwardRef((o,n)=>{let{text:e,media:r,side:t="me",status:s=1,timeStamp:u=Date.now(),arrow:l=true,...m}=o,{className:i,style:a,rest:f}=I(m);return jsx(c,{className:`--bubble-wrapper flex --bw-${t}`.trim(),children:jsxs(c,{className:`--bubble --bubble-${t} ${r?`--with-media --bma-${r.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${i}`.trim(),style:{...a},...f,children:[e&&jsx(V,{className:"--bubble-text",children:e}),r?r.type=="audio"?jsxs(c,{as:"flex aic --bubble-audio",children:[jsx(j,{className:"--bm-action",children:D.play}),jsx(co,{progress:.7}),jsx(V,{className:"--bm-dur",children:r.duration??"00:13"})]}):r.type=="img"?jsx(c,{as:"--bubble-image",children:jsx(je,{src:r.source})}):null:null,jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsx(V,{className:"--bubble-stamp tar",children:timeSince(u)}),t=="me"&&jsx(j,{className:`--bubble-status --bs-${s}`,children:s==0?D.pending:s==1?D.done:s==2?D.doneAll:D.doneAll})]})]})})});ln.displayName="Zuz.Bubble";var wl=ln;var mn=forwardRef((o,n)=>{let{style:e,className:r,rest:t}=I(o);return jsx("label",{ref:n,style:e,className:r,...t})});mn.displayName="Zuz.Label";var tt=mn;var cn=forwardRef((o,n)=>{let{name:e,required:r,type:t,value:s,size:u,variant:l,checked:m,onSwitch:i,...a}=o,[f,p]=useState(m||false),d=useRef(null),{variant:w}=Y(true);return useImperativeHandle(n,()=>({setChecked(v,x=true){p(v),d.current&&(d.current.checked=v),x&&i&&i(v,s||"cb");},toggle(v=true){d.current&&(d.current.checked=!f),v&&i&&i&&i(!f,s||"cb"),p(!f);}})),jsxs(tt,{className:`--${(t||be.Default).toLowerCase()} ${!t||t==be.Default?"--checkbox":"--switch"} --${l||w||U.Small} flex aic jcc ${f?"is-checked":""} rel`.trim(),...a,children:[(!t||t==be.Default)&&D.check,jsx(re,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:r||false,onChange:v=>{i&&i(v.target.checked,s||"cb"),p(v.target.checked);}})]})});cn.displayName="Zuz.CheckBox";var ot=cn;var Bl=({ref:o,...n})=>{let{code:e,lang:r="tsx",showLines:t=false,highlight:s="",as:u,fx:l,...m}=n,i=useRef(null),{className:a,style:f,rest:p}=I({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:l},i),d=useMemo(()=>{let v=new Set;return s.split(",").forEach(x=>{if(x.includes("-")){let[h,C]=x.split("-").map(Number);for(let g=h;g<=C;g++)v.add(g);}else x&&v.add(Number(x));}),v},[s]),w=useMemo(()=>{let v=e.split(`
|
|
9
9
|
`);for(;v.length>0&&v[0].trim()==="";)v.shift();for(;v.length>0&&v[v.length-1].trim()==="";)v.pop();let x=v[0]?.match(/^\s*/)?.[0].length||0,h=v.map(g=>{let S=g.match(/^\s*/)?.[0].length||0,N=Math.min(S,x);return g.slice(N)}),C=[{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 h.map((g,S)=>{let N=g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),P=d.has(S+1),R=[];C.forEach(E=>{N=N.replace(E.re,k=>{let M=`ZUZ_ID_${R.length}_ZUZ`;return R.push(`<span class="--token-${E.name}">${k}</span>`),M});});for(let E=R.length-1;E>=0;E--)N=N.replace(`ZUZ_ID_${E}_ZUZ`,R[E]);return `<div class="--code-line ${t==true?"--with-ln":""} ${P?"--is-highlighted":""}">
|
|
10
10
|
${t==true?`<span class="--line-number">${S+1}</span>`:""}
|
|
11
11
|
<span class="--line-content">${N||" "}</span>
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|