@zenku/cli-node 0.1.37 → 0.1.38

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/zenku-bundle.cjs DELETED
@@ -1,323 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";var Xb=Object.create;var oa=Object.defineProperty;var Qb=Object.getOwnPropertyDescriptor;var e0=Object.getOwnPropertyNames;var t0=Object.getPrototypeOf,n0=Object.prototype.hasOwnProperty;var lt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rt=(e,t)=>{for(var r in t)oa(e,r,{get:t[r],enumerable:!0})},r0=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of e0(t))!n0.call(e,n)&&n!==r&&oa(e,n,{get:()=>t[n],enumerable:!(i=Qb(t,n))||i.enumerable});return e};var de=(e,t,r)=>(r=e!=null?Xb(t0(e)):{},r0(t||!e||!e.__esModule?oa(r,"default",{value:e,enumerable:!0}):r,e));var nr=lt(aa=>{var li=class extends Error{constructor(t,r,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},sa=class extends li{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};aa.CommanderError=li;aa.InvalidArgumentError=sa});var di=lt(ca=>{var{InvalidArgumentError:i0}=nr(),ua=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new i0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function o0(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}ca.Argument=ua;ca.humanReadableArgName=o0});var pa=lt(da=>{var{humanReadableArgName:s0}=di(),la=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(t){this.helpWidth=this.helpWidth??t.helpWidth??80}visibleCommands(t){let r=t.commands.filter(n=>!n._hidden),i=t._getHelpCommand();return i&&!i._hidden&&r.push(i),this.sortSubcommands&&r.sort((n,o)=>n.name().localeCompare(o.name())),r}compareOptions(t,r){let i=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return i(t).localeCompare(i(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),i=t._getHelpOption();if(i&&!i.hidden){let n=i.short&&t._findOption(i.short),o=i.long&&t._findOption(i.long);!n&&!o?r.push(i):i.long&&!o?r.push(t.createOption(i.long,i.description)):i.short&&!n&&r.push(t.createOption(i.short,i.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let i=t.parent;i;i=i.parent){let n=i.options.filter(o=>!o.hidden);r.push(...n)}return this.sortOptions&&r.sort(this.compareOptions),r}visibleArguments(t){return t._argsDescription&&t.registeredArguments.forEach(r=>{r.description=r.description||t._argsDescription[r.name()]||""}),t.registeredArguments.find(r=>r.description)?t.registeredArguments:[]}subcommandTerm(t){let r=t.registeredArguments.map(i=>s0(i)).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((i,n)=>Math.max(i,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let i="";for(let n=t.parent;n;n=n.parent)i=n.name()+" "+i;return i+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&(t.required||t.optional||t.isBoolean()&&typeof t.defaultValue=="boolean")&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),t.presetArg!==void 0&&t.optional&&r.push(`preset: ${JSON.stringify(t.presetArg)}`),t.envVar!==void 0&&r.push(`env: ${t.envVar}`),r.length>0){let i=`(${r.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let i=`(${r.join(", ")})`;return t.description?`${t.description} ${i}`:i}return t.description}formatItemList(t,r,i){return r.length===0?[]:[i.styleTitle(t),...r,""]}groupItems(t,r,i){let n=new Map;return t.forEach(o=>{let s=i(o);n.has(s)||n.set(s,[])}),r.forEach(o=>{let s=i(o);n.has(s)||n.set(s,[]),n.get(s).push(o)}),n}formatHelp(t,r){let i=r.padWidth(t,r),n=r.helpWidth??80;function o(d,p){return r.formatItem(d,i,p,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],a=r.commandDescription(t);a.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(a),n),""]));let u=r.visibleArguments(t).map(d=>o(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(s=s.concat(this.formatItemList("Arguments:",u,r)),this.groupItems(t.options,r.visibleOptions(t),d=>d.helpGroupHeading??"Options:").forEach((d,p)=>{let f=d.map(y=>o(r.styleOptionTerm(r.optionTerm(y)),r.styleOptionDescription(r.optionDescription(y))));s=s.concat(this.formatItemList(p,f,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(p=>o(r.styleOptionTerm(r.optionTerm(p)),r.styleOptionDescription(r.optionDescription(p))));s=s.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(t.commands,r.visibleCommands(t),d=>d.helpGroup()||"Commands:").forEach((d,p)=>{let f=d.map(y=>o(r.styleSubcommandTerm(r.subcommandTerm(y)),r.styleSubcommandDescription(r.subcommandDescription(y))));s=s.concat(this.formatItemList(p,f,r))}),s.join(`
3
- `)}displayWidth(t){return Sm(t).length}styleTitle(t){return t}styleUsage(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r==="[command]"?this.styleSubcommandText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleCommandText(r)).join(" ")}styleCommandDescription(t){return this.styleDescriptionText(t)}styleOptionDescription(t){return this.styleDescriptionText(t)}styleSubcommandDescription(t){return this.styleDescriptionText(t)}styleArgumentDescription(t){return this.styleDescriptionText(t)}styleDescriptionText(t){return t}styleOptionTerm(t){return this.styleOptionText(t)}styleSubcommandTerm(t){return t.split(" ").map(r=>r==="[options]"?this.styleOptionText(r):r[0]==="["||r[0]==="<"?this.styleArgumentText(r):this.styleSubcommandText(r)).join(" ")}styleArgumentTerm(t){return this.styleArgumentText(t)}styleOptionText(t){return t}styleArgumentText(t){return t}styleSubcommandText(t){return t}styleCommandText(t){return t}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestGlobalOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}preformatted(t){return/\n[^\S\r\n]/.test(t)}formatItem(t,r,i,n){let s=" ".repeat(2);if(!i)return s+t;let a=t.padEnd(r+t.length-n.displayWidth(t)),u=2,l=(this.helpWidth??80)-r-u-2,d;return l<this.minWidthToWrap||n.preformatted(i)?d=i:d=n.boxWrap(i,l).replace(/\n/g,`
4
- `+" ".repeat(r+u)),s+a+" ".repeat(u)+d.replace(/\n/g,`
5
- ${s}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let i=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,o=[];return i.forEach(s=>{let a=s.match(n);if(a===null){o.push("");return}let u=[a.shift()],c=this.displayWidth(u[0]);a.forEach(l=>{let d=this.displayWidth(l);if(c+d<=r){u.push(l),c+=d;return}o.push(u.join(""));let p=l.trimStart();u=[p],c=this.displayWidth(p)}),o.push(u.join(""))}),o.join(`
6
- `)}};function Sm(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}da.Help=la;da.stripColor=Sm});var ga=lt(ha=>{var{InvalidArgumentError:a0}=nr(),fa=class{constructor(t,r){this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;let i=u0(t);this.short=i.shortFlag,this.long=i.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,i)=>{if(!this.argChoices.includes(r))throw new a0(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,i):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Cm(this.name().replace(/^no-/,"")):Cm(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ma=class{constructor(t){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(r=>{r.negate?this.negativeOptions.set(r.attributeName(),r):this.positiveOptions.set(r.attributeName(),r)}),this.negativeOptions.forEach((r,i)=>{this.positiveOptions.has(i)&&this.dualOptions.add(i)})}valueFromOption(t,r){let i=r.attributeName();if(!this.dualOptions.has(i))return!0;let n=this.negativeOptions.get(i).presetArg,o=n!==void 0?n:!1;return r.negate===(o===t)}};function Cm(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function u0(e){let t,r,i=/^-[^-]$/,n=/^--[^-]/,o=e.split(/[ |,]+/).concat("guard");if(i.test(o[0])&&(t=o.shift()),n.test(o[0])&&(r=o.shift()),!t&&i.test(o[0])&&(t=o.shift()),!t&&n.test(o[0])&&(t=r,r=o.shift()),o[0].startsWith("-")){let s=o[0],a=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${a}
7
- - a short flag is a single dash and a single character
8
- - either use a single dash and a single character (for a short flag)
9
- - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):i.test(s)?new Error(`${a}
10
- - too many short flags`):n.test(s)?new Error(`${a}
11
- - too many long flags`):new Error(`${a}
12
- - unrecognised flag format`)}if(t===void 0&&r===void 0)throw new Error(`option creation failed due to no flags found in '${e}'.`);return{shortFlag:t,longFlag:r}}ha.Option=fa;ha.DualOptions=ma});var Em=lt(Im=>{function c0(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let i=0;i<=e.length;i++)r[i]=[i];for(let i=0;i<=t.length;i++)r[0][i]=i;for(let i=1;i<=t.length;i++)for(let n=1;n<=e.length;n++){let o=1;e[n-1]===t[i-1]?o=0:o=1,r[n][i]=Math.min(r[n-1][i]+1,r[n][i-1]+1,r[n-1][i-1]+o),n>1&&i>1&&e[n-1]===t[i-2]&&e[n-2]===t[i-1]&&(r[n][i]=Math.min(r[n][i],r[n-2][i-2]+1))}return r[e.length][t.length]}function l0(e,t){if(!t||t.length===0)return"";t=Array.from(new Set(t));let r=e.startsWith("--");r&&(e=e.slice(2),t=t.map(s=>s.slice(2)));let i=[],n=3,o=.4;return t.forEach(s=>{if(s.length<=1)return;let a=c0(e,s),u=Math.max(e.length,s.length);(u-a)/u>o&&(a<n?(n=a,i=[s]):a===n&&i.push(s))}),i.sort((s,a)=>s.localeCompare(a)),r&&(i=i.map(s=>`--${s}`)),i.length>1?`
13
- (Did you mean one of ${i.join(", ")}?)`:i.length===1?`
14
- (Did you mean ${i[0]}?)`:""}Im.suggestSimilar=l0});var Am=lt($a=>{var d0=require("node:events").EventEmitter,va=require("node:child_process"),dt=require("node:path"),pi=require("node:fs"),M=require("node:process"),{Argument:p0,humanReadableArgName:f0}=di(),{CommanderError:ya}=nr(),{Help:m0,stripColor:h0}=pa(),{Option:Fm,DualOptions:g0}=ga(),{suggestSimilar:Om}=Em(),Da=class e extends d0{constructor(t){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=t||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:r=>M.stdout.write(r),writeErr:r=>M.stderr.write(r),outputError:(r,i)=>i(r),getOutHelpWidth:()=>M.stdout.isTTY?M.stdout.columns:void 0,getErrHelpWidth:()=>M.stderr.isTTY?M.stderr.columns:void 0,getOutHasColors:()=>ba()??(M.stdout.isTTY&&M.stdout.hasColors?.()),getErrHasColors:()=>ba()??(M.stderr.isTTY&&M.stderr.hasColors?.()),stripColor:r=>h0(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,i){let n=r,o=i;typeof n=="object"&&n!==null&&(o=n,n=null),o=o||{};let[,s,a]=t.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return n&&(u.description(n),u._executableHandler=!0),o.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(o.noHelp||o.hidden),u._executableFile=o.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),n?this:u}createCommand(t){return new e(t)}createHelp(){return Object.assign(new m0,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
15
- - specify the name in Command constructor or using .name()`);return r=r||{},r.isDefault&&(this._defaultCommandName=t._name),(r.noHelp||r.hidden)&&(t._hidden=!0),this._registerCommand(t),t.parent=this,t._checkForBrokenPassThrough(),this}createArgument(t,r){return new p0(t,r)}argument(t,r,i,n){let o=this.createArgument(t,r);return typeof i=="function"?o.default(n).argParser(i):o.default(i),this.addArgument(o),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let i=t??"help [command]",[,n,o]=i.match(/([^ ]+) *(.*)/),s=r??"display help for command",a=this.createCommand(n);return a.helpOption(!1),o&&a.arguments(o),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,(t||r)&&this._initCommandGroup(a),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let i=["preSubcommand","preAction","postAction"];if(!i.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
16
- Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[t]?this._lifeCycleHooks[t].push(r):this._lifeCycleHooks[t]=[r],this}exitOverride(t){return t?this._exitCallback=t:this._exitCallback=r=>{if(r.code!=="commander.executeSubCommandAsync")throw r},this}_exit(t,r,i){this._exitCallback&&this._exitCallback(new ya(t,r,i)),M.exit(t)}action(t){let r=i=>{let n=this.registeredArguments.length,o=i.slice(0,n);return this._storeOptionsAsProperties?o[n]=this:o[n]=this.opts(),o.push(this),t.apply(this,o)};return this._actionHandler=r,this}createOption(t,r){return new Fm(t,r)}_callParseArg(t,r,i,n){try{return t.parseArg(r,i)}catch(o){if(o.code==="commander.invalidArgument"){let s=`${n} ${o.message}`;this.error(s,{exitCode:o.exitCode,code:o.code})}throw o}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let i=t.long&&this._findOption(t.long)?t.long:t.short;throw new Error(`Cannot add option '${t.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${i}'
17
- - already used by option '${r.flags}'`)}this._initOptionGroup(t),this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),i=r(t).find(n=>this._findCommand(n));if(i){let n=r(this._findCommand(i)).join("|"),o=r(t).join("|");throw new Error(`cannot add command '${o}' as already have command '${n}'`)}this._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),i=t.attributeName();if(t.negate){let o=t.long.replace(/^--no-/,"--");this._findOption(o)||this.setOptionValueWithSource(i,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(i,t.defaultValue,"default");let n=(o,s,a)=>{o==null&&t.presetArg!==void 0&&(o=t.presetArg);let u=this.getOptionValue(i);o!==null&&t.parseArg?o=this._callParseArg(t,o,u,s):o!==null&&t.variadic&&(o=t._collectValue(o,u)),o==null&&(t.negate?o=!1:t.isBoolean()||t.optional?o=!0:o=""),this.setOptionValueWithSource(i,o,a)};return this.on("option:"+r,o=>{let s=`error: option '${t.flags}' argument '${o}' is invalid.`;n(o,s,"cli")}),t.envVar&&this.on("optionEnv:"+r,o=>{let s=`error: option '${t.flags}' value '${o}' from env '${t.envVar}' is invalid.`;n(o,s,"env")}),this}_optionEx(t,r,i,n,o){if(typeof r=="object"&&r instanceof Fm)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,i);if(s.makeOptionMandatory(!!t.mandatory),typeof n=="function")s.default(o).argParser(n);else if(n instanceof RegExp){let a=n;n=(u,c)=>{let l=a.exec(u);return l?l[0]:c},s.default(o).argParser(n)}else s.default(n);return this.addOption(s)}option(t,r,i,n){return this._optionEx({},t,r,i,n)}requiredOption(t,r,i,n){return this._optionEx({mandatory:!0},t,r,i,n)}combineFlagAndOptionalValue(t=!0){return this._combineFlagAndOptionalValue=!!t,this}allowUnknownOption(t=!0){return this._allowUnknownOption=!!t,this}allowExcessArguments(t=!0){return this._allowExcessArguments=!!t,this}enablePositionalOptions(t=!0){return this._enablePositionalOptions=!!t,this}passThroughOptions(t=!0){return this._passThroughOptions=!!t,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(t=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!t,this}getOptionValue(t){return this._storeOptionsAsProperties?this[t]:this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,void 0)}setOptionValueWithSource(t,r,i){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=i,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(i=>{i.getOptionValueSource(t)!==void 0&&(r=i.getOptionValueSource(t))}),r}_prepareUserArgs(t,r){if(t!==void 0&&!Array.isArray(t))throw new Error("first parameter to parse must be array or undefined");if(r=r||{},t===void 0&&r.from===void 0){M.versions?.electron&&(r.from="electron");let n=M.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=M.argv),this.rawArgs=t.slice();let i;switch(r.from){case void 0:case"node":this._scriptPath=t[1],i=t.slice(2);break;case"electron":M.defaultApp?(this._scriptPath=t[1],i=t.slice(2)):i=t.slice(1);break;case"user":i=t.slice(0);break;case"eval":i=t.slice(1);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",i}parse(t,r){this._prepareForParse();let i=this._prepareUserArgs(t,r);return this._parseCommand([],i),this}async parseAsync(t,r){this._prepareForParse();let i=this._prepareUserArgs(t,r);return await this._parseCommand([],i),this}_prepareForParse(){this._savedState===null?this.saveStateBeforeParse():this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw new Error(`Can not call parse again when storeOptionsAsProperties is true.
18
- - either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(t,r,i){if(pi.existsSync(t))return;let n=r?`searched for local subcommand relative to directory '${r}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",o=`'${t}' does not exist
19
- - if '${i}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
20
- - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
21
- - ${n}`;throw new Error(o)}_executeSubCommand(t,r){r=r.slice();let i=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function o(l,d){let p=dt.resolve(l,d);if(pi.existsSync(p))return p;if(n.includes(dt.extname(d)))return;let f=n.find(y=>pi.existsSync(`${p}${y}`));if(f)return`${p}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let l;try{l=pi.realpathSync(this._scriptPath)}catch{l=this._scriptPath}a=dt.resolve(dt.dirname(l),a)}if(a){let l=o(a,s);if(!l&&!t._executableFile&&this._scriptPath){let d=dt.basename(this._scriptPath,dt.extname(this._scriptPath));d!==this._name&&(l=o(a,`${d}-${t._name}`))}s=l||s}i=n.includes(dt.extname(s));let u;M.platform!=="win32"?i?(r.unshift(s),r=Pm(M.execArgv).concat(r),u=va.spawn(M.argv[0],r,{stdio:"inherit"})):u=va.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,a,t._name),r.unshift(s),r=Pm(M.execArgv).concat(r),u=va.spawn(M.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{M.on(d,()=>{u.killed===!1&&u.exitCode===null&&u.kill(d)})});let c=this._exitCallback;u.on("close",l=>{l=l??1,c?c(new ya(l,"commander.executeSubCommandAsync","(close)")):M.exit(l)}),u.on("error",l=>{if(l.code==="ENOENT")this._checkForMissingExecutable(s,a,t._name);else if(l.code==="EACCES")throw new Error(`'${s}' not executable`);if(!c)M.exit(1);else{let d=new ya(1,"commander.executeSubCommandAsync","(error)");d.nestedError=l,c(d)}}),this.runningCommand=u}_dispatchSubcommand(t,r,i){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let o;return o=this._chainOrCallSubCommandHook(o,n,"preSubcommand"),o=this._chainOrCall(o,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(i));else return n._parseCommand(r,i)}),o}_dispatchHelpCommand(t){t||this.help();let r=this._findCommand(t);return r&&!r._executableHandler&&r.help(),this._dispatchSubcommand(t,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((t,r)=>{t.required&&this.args[r]==null&&this.missingArgument(t.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let t=(i,n,o)=>{let s=n;if(n!==null&&i.parseArg){let a=`error: command-argument value '${n}' is invalid for argument '${i.name()}'.`;s=this._callParseArg(i,n,o,a)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((i,n)=>{let o=i.defaultValue;i.variadic?n<this.args.length?(o=this.args.slice(n),i.parseArg&&(o=o.reduce((s,a)=>t(i,a,s),i.defaultValue))):o===void 0&&(o=[]):n<this.args.length&&(o=this.args[n],i.parseArg&&(o=t(i,o,i.defaultValue))),r[n]=o}),this.processedArgs=r}_chainOrCall(t,r){return t?.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let i=t,n=[];return this._getCommandAndAncestors().reverse().filter(o=>o._lifeCycleHooks[r]!==void 0).forEach(o=>{o._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:o,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(o=>{i=this._chainOrCall(i,()=>o.callback(o.hookedCommand,this))}),i}_chainOrCallSubCommandHook(t,r,i){let n=t;return this._lifeCycleHooks[i]!==void 0&&this._lifeCycleHooks[i].forEach(o=>{n=this._chainOrCall(n,()=>o(this,r))}),n}_parseCommand(t,r){let i=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(i.operands),r=i.unknown,this.args=t.concat(r),t&&this._findCommand(t[0]))return this._dispatchSubcommand(t[0],t.slice(1),r);if(this._getHelpCommand()&&t[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(t[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(r),this._dispatchSubcommand(this._defaultCommandName,t,r);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(i.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{i.unknown.length>0&&this.unknownOption(i.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){n(),this._processArguments();let s;return s=this._chainOrCallHooks(s,"preAction"),s=this._chainOrCall(s,()=>this._actionHandler(this.processedArgs)),this.parent&&(s=this._chainOrCall(s,()=>{this.parent.emit(o,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent?.listenerCount(o))n(),this._processArguments(),this.parent.emit(o,t,r);else if(t.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",t,r);this.listenerCount("command:*")?this.emit("command:*",t,r):this.commands.length?this.unknownCommand():(n(),this._processArguments())}else this.commands.length?(n(),this.help({error:!0})):(n(),this._processArguments())}_findCommand(t){if(t)return this.commands.find(r=>r._name===t||r._aliases.includes(t))}_findOption(t){return this.options.find(r=>r.is(t))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(t=>{t.options.forEach(r=>{r.mandatory&&t.getOptionValue(r.attributeName())===void 0&&t.missingMandatoryOptionValue(r)})})}_checkForConflictingLocalOptions(){let t=this.options.filter(i=>{let n=i.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(i=>i.conflictsWith.length>0).forEach(i=>{let n=t.find(o=>i.conflictsWith.includes(o.attributeName()));n&&this._conflictingOption(i,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],i=[],n=r;function o(l){return l.length>1&&l[0]==="-"}let s=l=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(l)?!this._getCommandAndAncestors().some(d=>d.options.map(p=>p.short).some(p=>/^-\d$/.test(p))):!1,a=null,u=null,c=0;for(;c<t.length||u;){let l=u??t[c++];if(u=null,l==="--"){n===i&&n.push(l),n.push(...t.slice(c));break}if(a&&(!o(l)||s(l))){this.emit(`option:${a.name()}`,l);continue}if(a=null,o(l)){let d=this._findOption(l);if(d){if(d.required){let p=t[c++];p===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,p)}else if(d.optional){let p=null;c<t.length&&(!o(t[c])||s(t[c]))&&(p=t[c++]),this.emit(`option:${d.name()}`,p)}else this.emit(`option:${d.name()}`);a=d.variadic?d:null;continue}}if(l.length>2&&l[0]==="-"&&l[1]!=="-"){let d=this._findOption(`-${l[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,l.slice(2)):(this.emit(`option:${d.name()}`),u=`-${l.slice(2)}`);continue}}if(/^--[^=]+=/.test(l)){let d=l.indexOf("="),p=this._findOption(l.slice(0,d));if(p&&(p.required||p.optional)){this.emit(`option:${p.name()}`,l.slice(d+1));continue}}if(n===r&&o(l)&&!(this.commands.length===0&&s(l))&&(n=i),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(l)){r.push(l),i.push(...t.slice(c));break}else if(this._getHelpCommand()&&l===this._getHelpCommand().name()){r.push(l,...t.slice(c));break}else if(this._defaultCommandName){i.push(l,...t.slice(c));break}}if(this._passThroughOptions){n.push(l,...t.slice(c));break}n.push(l)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let i=0;i<r;i++){let n=this.options[i].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((t,r)=>Object.assign(t,r.opts()),{})}error(t,r){this._outputConfiguration.outputError(`${t}
22
- `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
23
- `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
24
- `),this.outputHelp({error:!0}));let i=r||{},n=i.exitCode||1,o=i.code||"commander.error";this._exit(n,o,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in M.env){let r=t.attributeName();(this.getOptionValue(r)===void 0||["default","config","env"].includes(this.getOptionValueSource(r)))&&(t.required||t.optional?this.emit(`optionEnv:${t.name()}`,M.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new g0(this.options),r=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&r(i.attributeName())&&t.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,i.implied[n],"implied")})})}missingArgument(t){let r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){let r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){let r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){let i=s=>{let a=s.attributeName(),u=this.getOptionValue(a),c=this.options.find(d=>d.negate&&a===d.attributeName()),l=this.options.find(d=>!d.negate&&a===d.attributeName());return c&&(c.presetArg===void 0&&u===!1||c.presetArg!==void 0&&u===c.presetArg)?c:l||s},n=s=>{let a=i(s),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},o=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],o=this;do{let s=o.createHelp().visibleOptions(o).filter(a=>a.long).map(a=>a.long);n=n.concat(s),o=o.parent}while(o&&!o._enablePositionalOptions);r=Om(t,n)}let i=`error: unknown option '${t}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,i=r===1?"":"s",o=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${i} but got ${t.length}.`;this.error(o,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(o=>{n.push(o.name()),o.alias()&&n.push(o.alias())}),r=Om(t,n)}let i=`error: unknown command '${t}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(t,r,i){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",i=i||"output the version number";let n=this.createOption(r,i);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
25
- `),this._exit(0,"commander.version",t)}),this}description(t,r){return t===void 0&&r===void 0?this._description:(this._description=t,r&&(this._argsDescription=r),this)}summary(t){return t===void 0?this._summary:(this._summary=t,this)}alias(t){if(t===void 0)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(r=this.commands[this.commands.length-1]),t===r._name)throw new Error("Command alias can't be the same as its name");let i=this.parent?._findCommand(t);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${t}' to command '${this.name()}' as already have command '${n}'`)}return r._aliases.push(t),this}aliases(t){return t===void 0?this._aliases:(t.forEach(r=>this.alias(r)),this)}usage(t){if(t===void 0){if(this._usage)return this._usage;let r=this.registeredArguments.map(i=>f0(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?r:[]).join(" ")}return this._usage=t,this}name(t){return t===void 0?this._name:(this._name=t,this)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=dt.basename(t,dt.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),i=this._getOutputContext(t);r.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let n=r.formatHelp(this,r);return i.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,i,n,o;return r?(i=a=>this._outputConfiguration.writeErr(a),n=this._outputConfiguration.getErrHasColors(),o=this._outputConfiguration.getErrHelpWidth()):(i=a=>this._outputConfiguration.writeOut(a),n=this._outputConfiguration.getOutHasColors(),o=this._outputConfiguration.getOutHelpWidth()),{error:r,write:a=>(n||(a=this._outputConfiguration.stripColor(a)),i(a)),hasColors:n,helpWidth:o}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let i=this._getOutputContext(t),n={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let o=this.helpInformation({error:i.error});if(r&&(o=r(o),typeof o!="string"&&!Buffer.isBuffer(o)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(o),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(s=>s.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(M.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let i=["beforeAll","before","after","afterAll"];if(!i.includes(t))throw new Error(`Unexpected value for position to addHelpText.
26
- Expecting one of '${i.join("', '")}'`);let n=`${t}Help`;return this.on(n,o=>{let s;typeof r=="function"?s=r({error:o.error,command:o.command}):s=r,s&&o.write(`${s}
27
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Pm(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,i="127.0.0.1",n="9229",o;return(o=t.match(/^(--inspect(-brk)?)$/))!==null?r=o[1]:(o=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=o[1],/^\d+$/.test(o[3])?n=o[3]:i=o[3]):(o=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=o[1],i=o[3],n=o[4]),r&&n!=="0"?`${r}=${i}:${parseInt(n)+1}`:t})}function ba(){if(M.env.NO_COLOR||M.env.FORCE_COLOR==="0"||M.env.FORCE_COLOR==="false")return!1;if(M.env.FORCE_COLOR||M.env.CLICOLOR_FORCE!==void 0)return!0}$a.Command=Da;$a.useColor=ba});var Um=lt(Ze=>{var{Argument:zm}=di(),{Command:_a}=Am(),{CommanderError:v0,InvalidArgumentError:Tm}=nr(),{Help:y0}=pa(),{Option:jm}=ga();Ze.program=new _a;Ze.createCommand=e=>new _a(e);Ze.createOption=(e,t)=>new jm(e,t);Ze.createArgument=(e,t)=>new zm(e,t);Ze.Command=_a;Ze.Option=jm;Ze.Argument=zm;Ze.Help=y0;Ze.CommanderError=v0;Ze.InvalidArgumentError=Tm;Ze.InvalidOptionArgumentError=Tm});var Cp=lt((ZI,Uv)=>{"use strict";var Sp={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},yw={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},Dw={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Sp.up():"");return e&&(t+=Sp.left),t}};Uv.exports={cursor:Sp,scroll:yw,erase:Dw,beep:"\x07"}});var Ep=lt((MI,Ip)=>{var is=process||{},Nv=is.argv||[],rs=is.env||{},bw=!(rs.NO_COLOR||Nv.includes("--no-color"))&&(!!rs.FORCE_COLOR||Nv.includes("--color")||is.platform==="win32"||(is.stdout||{}).isTTY&&rs.TERM!=="dumb"||!!rs.CI),$w=(e,t,r=e)=>i=>{let n=""+i,o=n.indexOf(t,e.length);return~o?e+_w(n,t,r,o)+t:e+n+t},_w=(e,t,r,i)=>{let n="",o=0;do n+=e.substring(o,i)+r,o=i+t.length,i=e.indexOf(t,o);while(~i);return n+e.substring(o)},Rv=(e=bw)=>{let t=e?$w:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Ip.exports=Rv();Ip.exports.createColors=Rv});var Nm=de(Um(),1),{program:A2,createCommand:z2,createArgument:T2,createOption:j2,CommanderError:U2,InvalidArgumentError:N2,InvalidOptionArgumentError:R2,Command:O,Argument:B2,Option:L2,Help:Z2}=Nm.default;var Fv=require("node:http"),jr=require("node:crypto");var ht=require("node:fs"),es=require("node:path"),Ev=require("node:os");var x={};rt(x,{$brand:()=>fi,$input:()=>Zc,$output:()=>Lc,NEVER:()=>wa,TimePrecision:()=>Wc,ZodAny:()=>Td,ZodArray:()=>Rd,ZodBase64:()=>Lo,ZodBase64URL:()=>Zo,ZodBigInt:()=>Un,ZodBigIntFormat:()=>Vo,ZodBoolean:()=>jn,ZodCIDRv4:()=>Ro,ZodCIDRv6:()=>Bo,ZodCUID:()=>Po,ZodCUID2:()=>Ao,ZodCatch:()=>ap,ZodCodec:()=>Qo,ZodCustom:()=>zr,ZodCustomStringFormat:()=>zn,ZodDate:()=>Er,ZodDefault:()=>tp,ZodDiscriminatedUnion:()=>Ld,ZodE164:()=>Mo,ZodEmail:()=>Eo,ZodEmoji:()=>Fo,ZodEnum:()=>Pn,ZodError:()=>W_,ZodExactOptional:()=>Xd,ZodFile:()=>Hd,ZodFirstPartyTypeKind:()=>Dp,ZodFunction:()=>gp,ZodGUID:()=>xr,ZodIPv4:()=>Uo,ZodIPv6:()=>No,ZodISODate:()=>wo,ZodISODateTime:()=>_o,ZodISODuration:()=>ko,ZodISOTime:()=>xo,ZodIntersection:()=>Zd,ZodIssueCode:()=>J_,ZodJWT:()=>qo,ZodKSUID:()=>jo,ZodLazy:()=>fp,ZodLiteral:()=>Kd,ZodMAC:()=>Id,ZodMap:()=>Gd,ZodNaN:()=>cp,ZodNanoID:()=>Oo,ZodNever:()=>Ud,ZodNonOptional:()=>Yo,ZodNull:()=>Ad,ZodNullable:()=>ep,ZodNumber:()=>Tn,ZodNumberFormat:()=>Kt,ZodObject:()=>Or,ZodOptional:()=>Ho,ZodPipe:()=>Xo,ZodPrefault:()=>rp,ZodPromise:()=>hp,ZodReadonly:()=>lp,ZodRealError:()=>Ce,ZodRecord:()=>Ar,ZodSet:()=>Jd,ZodString:()=>An,ZodStringFormat:()=>H,ZodSuccess:()=>sp,ZodSymbol:()=>Od,ZodTemplateLiteral:()=>pp,ZodTransform:()=>Yd,ZodTuple:()=>qd,ZodType:()=>j,ZodULID:()=>zo,ZodURL:()=>Ir,ZodUUID:()=>at,ZodUndefined:()=>Pd,ZodUnion:()=>Pr,ZodUnknown:()=>jd,ZodVoid:()=>Nd,ZodXID:()=>To,ZodXor:()=>Bd,_ZodString:()=>Io,_default:()=>np,_function:()=>vv,any:()=>Kg,array:()=>Fr,base64:()=>Pg,base64url:()=>Ag,bigint:()=>qg,boolean:()=>Fd,catch:()=>up,check:()=>yv,cidrv4:()=>Fg,cidrv6:()=>Og,clone:()=>be,codec:()=>mv,coerce:()=>bp,config:()=>ae,core:()=>mt,cuid:()=>_g,cuid2:()=>wg,custom:()=>Dv,date:()=>Yg,decode:()=>$d,decodeAsync:()=>wd,describe:()=>bv,discriminatedUnion:()=>rv,e164:()=>zg,email:()=>pg,emoji:()=>bg,encode:()=>bd,encodeAsync:()=>_d,endsWith:()=>_n,enum:()=>Jo,exactOptional:()=>Qd,file:()=>lv,flattenError:()=>dr,float32:()=>Bg,float64:()=>Lg,formatError:()=>pr,fromJSONSchema:()=>Cv,function:()=>vv,getErrorMap:()=>H_,globalRegistry:()=>ge,gt:()=>ot,gte:()=>$e,guid:()=>fg,hash:()=>Rg,hex:()=>Ng,hostname:()=>Ug,httpUrl:()=>Dg,includes:()=>bn,instanceof:()=>_v,int:()=>Co,int32:()=>Zg,int64:()=>Vg,intersection:()=>Md,ipv4:()=>Cg,ipv6:()=>Eg,iso:()=>On,json:()=>xv,jwt:()=>Tg,keyof:()=>Xg,ksuid:()=>Sg,lazy:()=>mp,length:()=>Gt,literal:()=>cv,locales:()=>br,looseObject:()=>tv,looseRecord:()=>ov,lowercase:()=>yn,lt:()=>it,lte:()=>ze,mac:()=>Ig,map:()=>sv,maxLength:()=>Wt,maxSize:()=>Ft,meta:()=>$v,mime:()=>wn,minLength:()=>ft,minSize:()=>st,multipleOf:()=>Et,nan:()=>fv,nanoid:()=>$g,nativeEnum:()=>uv,negative:()=>po,never:()=>Wo,nonnegative:()=>mo,nonoptional:()=>op,nonpositive:()=>fo,normalize:()=>xn,null:()=>zd,nullable:()=>Sr,nullish:()=>dv,number:()=>Ed,object:()=>Qg,optional:()=>kr,overwrite:()=>Ke,parse:()=>gd,parseAsync:()=>vd,partialRecord:()=>iv,pipe:()=>Cr,positive:()=>lo,prefault:()=>ip,preprocess:()=>kv,prettifyError:()=>Ta,promise:()=>gv,property:()=>ho,readonly:()=>dp,record:()=>Wd,refine:()=>vp,regex:()=>vn,regexes:()=>qe,registry:()=>Mi,safeDecode:()=>kd,safeDecodeAsync:()=>Cd,safeEncode:()=>xd,safeEncodeAsync:()=>Sd,safeParse:()=>yd,safeParseAsync:()=>Dd,set:()=>av,setErrorMap:()=>K_,size:()=>Vt,slugify:()=>In,startsWith:()=>$n,strictObject:()=>ev,string:()=>So,stringFormat:()=>jg,stringbool:()=>wv,success:()=>pv,superRefine:()=>yp,symbol:()=>Gg,templateLiteral:()=>hv,toJSONSchema:()=>Do,toLowerCase:()=>Sn,toUpperCase:()=>Cn,transform:()=>Ko,treeifyError:()=>za,trim:()=>kn,tuple:()=>Vd,uint32:()=>Mg,uint64:()=>Wg,ulid:()=>xg,undefined:()=>Jg,union:()=>Go,unknown:()=>Jt,uppercase:()=>Dn,url:()=>yg,util:()=>$,uuid:()=>mg,uuidv4:()=>hg,uuidv6:()=>gg,uuidv7:()=>vg,void:()=>Hg,xid:()=>kg,xor:()=>nv});var mt={};rt(mt,{$ZodAny:()=>cc,$ZodArray:()=>mc,$ZodAsyncError:()=>Je,$ZodBase64:()=>Qu,$ZodBase64URL:()=>ec,$ZodBigInt:()=>ji,$ZodBigIntFormat:()=>oc,$ZodBoolean:()=>gr,$ZodCIDRv4:()=>Hu,$ZodCIDRv6:()=>Yu,$ZodCUID:()=>Nu,$ZodCUID2:()=>Ru,$ZodCatch:()=>Pc,$ZodCheck:()=>ee,$ZodCheckBigIntFormat:()=>mu,$ZodCheckEndsWith:()=>Su,$ZodCheckGreaterThan:()=>Ei,$ZodCheckIncludes:()=>xu,$ZodCheckLengthEquals:()=>bu,$ZodCheckLessThan:()=>Ii,$ZodCheckLowerCase:()=>_u,$ZodCheckMaxLength:()=>yu,$ZodCheckMaxSize:()=>hu,$ZodCheckMimeType:()=>Iu,$ZodCheckMinLength:()=>Du,$ZodCheckMinSize:()=>gu,$ZodCheckMultipleOf:()=>pu,$ZodCheckNumberFormat:()=>fu,$ZodCheckOverwrite:()=>Eu,$ZodCheckProperty:()=>Cu,$ZodCheckRegex:()=>$u,$ZodCheckSizeEquals:()=>vu,$ZodCheckStartsWith:()=>ku,$ZodCheckStringFormat:()=>hn,$ZodCheckUpperCase:()=>wu,$ZodCodec:()=>yr,$ZodCustom:()=>Bc,$ZodCustomStringFormat:()=>rc,$ZodDate:()=>fc,$ZodDefault:()=>Ic,$ZodDiscriminatedUnion:()=>vc,$ZodE164:()=>tc,$ZodEmail:()=>zu,$ZodEmoji:()=>ju,$ZodEncodeError:()=>xt,$ZodEnum:()=>_c,$ZodError:()=>lr,$ZodExactOptional:()=>Sc,$ZodFile:()=>xc,$ZodFunction:()=>Uc,$ZodGUID:()=>Pu,$ZodIPv4:()=>Gu,$ZodIPv6:()=>Ju,$ZodISODate:()=>qu,$ZodISODateTime:()=>Mu,$ZodISODuration:()=>Wu,$ZodISOTime:()=>Vu,$ZodIntersection:()=>yc,$ZodJWT:()=>nc,$ZodKSUID:()=>Zu,$ZodLazy:()=>Rc,$ZodLiteral:()=>wc,$ZodMAC:()=>Ku,$ZodMap:()=>bc,$ZodNaN:()=>Ac,$ZodNanoID:()=>Uu,$ZodNever:()=>dc,$ZodNonOptional:()=>Fc,$ZodNull:()=>uc,$ZodNullable:()=>Cc,$ZodNumber:()=>Ti,$ZodNumberFormat:()=>ic,$ZodObject:()=>dh,$ZodObjectJIT:()=>hc,$ZodOptional:()=>Ni,$ZodPipe:()=>zc,$ZodPrefault:()=>Ec,$ZodPromise:()=>Nc,$ZodReadonly:()=>Tc,$ZodRealError:()=>Se,$ZodRecord:()=>Dc,$ZodRegistry:()=>Zi,$ZodSet:()=>$c,$ZodString:()=>qt,$ZodStringFormat:()=>K,$ZodSuccess:()=>Oc,$ZodSymbol:()=>sc,$ZodTemplateLiteral:()=>jc,$ZodTransform:()=>kc,$ZodTuple:()=>Ui,$ZodType:()=>A,$ZodULID:()=>Bu,$ZodURL:()=>Tu,$ZodUUID:()=>Au,$ZodUndefined:()=>ac,$ZodUnion:()=>vr,$ZodUnknown:()=>lc,$ZodVoid:()=>pc,$ZodXID:()=>Lu,$ZodXor:()=>gc,$brand:()=>fi,$constructor:()=>m,$input:()=>Zc,$output:()=>Lc,Doc:()=>hr,JSONSchema:()=>lg,JSONSchemaGenerator:()=>bo,NEVER:()=>wa,TimePrecision:()=>Wc,_any:()=>fl,_array:()=>bl,_base64:()=>so,_base64url:()=>ao,_bigint:()=>sl,_boolean:()=>il,_catch:()=>N_,_check:()=>cg,_cidrv4:()=>io,_cidrv6:()=>oo,_coercedBigint:()=>al,_coercedBoolean:()=>ol,_coercedDate:()=>yl,_coercedNumber:()=>Xc,_coercedString:()=>qc,_cuid:()=>Yi,_cuid2:()=>Xi,_custom:()=>_l,_date:()=>vl,_decode:()=>Di,_decodeAsync:()=>$i,_default:()=>T_,_discriminatedUnion:()=>w_,_e164:()=>uo,_email:()=>qi,_emoji:()=>Ki,_encode:()=>yi,_encodeAsync:()=>bi,_endsWith:()=>_n,_enum:()=>E_,_file:()=>$l,_float32:()=>el,_float64:()=>tl,_gt:()=>ot,_gte:()=>$e,_guid:()=>$r,_includes:()=>bn,_int:()=>Qc,_int32:()=>nl,_int64:()=>ul,_intersection:()=>x_,_ipv4:()=>no,_ipv6:()=>ro,_isoDate:()=>Jc,_isoDateTime:()=>Gc,_isoDuration:()=>Hc,_isoTime:()=>Kc,_jwt:()=>co,_ksuid:()=>to,_lazy:()=>Z_,_length:()=>Gt,_literal:()=>O_,_lowercase:()=>yn,_lt:()=>it,_lte:()=>ze,_mac:()=>Vc,_map:()=>C_,_max:()=>ze,_maxLength:()=>Wt,_maxSize:()=>Ft,_mime:()=>wn,_min:()=>$e,_minLength:()=>ft,_minSize:()=>st,_multipleOf:()=>Et,_nan:()=>Dl,_nanoid:()=>Hi,_nativeEnum:()=>F_,_negative:()=>po,_never:()=>hl,_nonnegative:()=>mo,_nonoptional:()=>j_,_nonpositive:()=>fo,_normalize:()=>xn,_null:()=>pl,_nullable:()=>z_,_number:()=>Yc,_optional:()=>A_,_overwrite:()=>Ke,_parse:()=>dn,_parseAsync:()=>pn,_pipe:()=>R_,_positive:()=>lo,_promise:()=>M_,_property:()=>ho,_readonly:()=>B_,_record:()=>S_,_refine:()=>wl,_regex:()=>vn,_safeDecode:()=>wi,_safeDecodeAsync:()=>ki,_safeEncode:()=>_i,_safeEncodeAsync:()=>xi,_safeParse:()=>fn,_safeParseAsync:()=>mn,_set:()=>I_,_size:()=>Vt,_slugify:()=>In,_startsWith:()=>$n,_string:()=>Mc,_stringFormat:()=>En,_stringbool:()=>Cl,_success:()=>U_,_superRefine:()=>xl,_symbol:()=>ll,_templateLiteral:()=>L_,_toLowerCase:()=>Sn,_toUpperCase:()=>Cn,_transform:()=>P_,_trim:()=>kn,_tuple:()=>k_,_uint32:()=>rl,_uint64:()=>cl,_ulid:()=>Qi,_undefined:()=>dl,_union:()=>$_,_unknown:()=>ml,_uppercase:()=>Dn,_url:()=>_r,_uuid:()=>Vi,_uuidv4:()=>Wi,_uuidv6:()=>Gi,_uuidv7:()=>Ji,_void:()=>gl,_xid:()=>eo,_xor:()=>__,clone:()=>be,config:()=>ae,createStandardJSONSchemaMethod:()=>Fn,createToJSONSchemaMethod:()=>Il,decode:()=>W0,decodeAsync:()=>J0,describe:()=>kl,encode:()=>V0,encodeAsync:()=>G0,extractDefs:()=>Pt,finalize:()=>At,flattenError:()=>dr,formatError:()=>pr,globalConfig:()=>rr,globalRegistry:()=>ge,initializeContext:()=>Ot,isValidBase64:()=>Xu,isValidBase64URL:()=>ah,isValidJWT:()=>uh,locales:()=>br,meta:()=>Sl,parse:()=>gi,parseAsync:()=>vi,prettifyError:()=>Ta,process:()=>V,regexes:()=>qe,registry:()=>Mi,safeDecode:()=>H0,safeDecodeAsync:()=>X0,safeEncode:()=>K0,safeEncodeAsync:()=>Y0,safeParse:()=>ja,safeParseAsync:()=>Ua,toDotPath:()=>Mm,toJSONSchema:()=>Do,treeifyError:()=>za,util:()=>$,version:()=>Fu});var wa=Object.freeze({status:"aborted"});function m(e,t,r){function i(a,u){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,u);let c=s.prototype,l=Object.keys(c);for(let d=0;d<l.length;d++){let p=l[d];p in a||(a[p]=c[p].bind(a))}}let n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function s(a){var u;let c=r?.Parent?new o:this;i(c,a),(u=c._zod).deferred??(u.deferred=[]);for(let l of c._zod.deferred)l();return c}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var fi=Symbol("zod_brand"),Je=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},xt=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},rr={};function ae(e){return e&&Object.assign(rr,e),rr}var $={};rt($,{BIGINT_FORMAT_RANGES:()=>Aa,Class:()=>ka,NUMBER_FORMAT_RANGES:()=>Pa,aborted:()=>It,allowsEval:()=>Ia,assert:()=>w0,assertEqual:()=>D0,assertIs:()=>$0,assertNever:()=>_0,assertNotEqual:()=>b0,assignProp:()=>St,base64ToUint8Array:()=>Bm,base64urlToUint8Array:()=>B0,cached:()=>cn,captureStackTrace:()=>hi,cleanEnum:()=>R0,cleanRegex:()=>sr,clone:()=>be,cloneDef:()=>k0,createTransparentProxy:()=>O0,defineLazy:()=>N,esc:()=>mi,escapeRegex:()=>Me,extend:()=>z0,finalizeIssue:()=>ke,floatSafeRemainder:()=>Sa,getElementAtPath:()=>S0,getEnumValues:()=>or,getLengthableOrigin:()=>cr,getParsedType:()=>F0,getSizableOrigin:()=>ur,hexToUint8Array:()=>Z0,isObject:()=>Zt,isPlainObject:()=>Ct,issue:()=>ln,joinValues:()=>h,jsonStringifyReplacer:()=>un,merge:()=>j0,mergeDefs:()=>pt,normalizeParams:()=>_,nullish:()=>kt,numKeys:()=>E0,objectClone:()=>x0,omit:()=>A0,optionalKeys:()=>Oa,parsedType:()=>b,partial:()=>U0,pick:()=>P0,prefixIssues:()=>Ae,primitiveTypes:()=>Fa,promiseAllObject:()=>C0,propertyKeyTypes:()=>ar,randomString:()=>I0,required:()=>N0,safeExtend:()=>T0,shallowClone:()=>Ea,slugify:()=>Ca,stringifyPrimitive:()=>D,uint8ArrayToBase64:()=>Lm,uint8ArrayToBase64url:()=>L0,uint8ArrayToHex:()=>M0,unwrapMessage:()=>ir});function D0(e){return e}function b0(e){return e}function $0(e){}function _0(e){throw new Error("Unexpected value in exhaustive check")}function w0(e){}function or(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function h(e,t="|"){return e.map(r=>D(r)).join(t)}function un(e,t){return typeof t=="bigint"?t.toString():t}function cn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function kt(e){return e==null}function sr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Sa(e,t){let r=(e.toString().split(".")[1]||"").length,i=t.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let u=i.match(/\d?e-(\d?)/);u?.[1]&&(n=Number.parseInt(u[1]))}let o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return s%a/10**o}var Rm=Symbol("evaluating");function N(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Rm)return i===void 0&&(i=Rm,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function x0(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function St(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function pt(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function k0(e){return pt(e._zod.def)}function S0(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function C0(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function I0(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function mi(e){return JSON.stringify(e)}function Ca(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var hi="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Zt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ia=cn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ct(e){if(Zt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Zt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Ea(e){return Ct(e)?{...e}:Array.isArray(e)?[...e]:e}function E0(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var F0=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ar=new Set(["string","number","symbol"]),Fa=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Me(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function be(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function _(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function O0(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function D(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Oa(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Pa={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Aa={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function P0(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=pt(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=r.shape[a])}return St(this,"shape",s),s},checks:[]});return be(e,o)}function A0(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=pt(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return St(this,"shape",s),s},checks:[]});return be(e,o)}function z0(e,t){if(!Ct(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=pt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return St(this,"shape",o),o}});return be(e,n)}function T0(e,t){if(!Ct(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=pt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return St(this,"shape",i),i}});return be(e,r)}function j0(e,t){let r=pt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return St(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return be(e,r)}function U0(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=pt(t._zod.def,{get shape(){let a=t._zod.def.shape,u={...a};if(r)for(let c in r){if(!(c in a))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(u[c]=e?new e({type:"optional",innerType:a[c]}):a[c])}else for(let c in a)u[c]=e?new e({type:"optional",innerType:a[c]}):a[c];return St(this,"shape",u),u},checks:[]});return be(t,s)}function N0(e,t,r){let i=pt(t._zod.def,{get shape(){let n=t._zod.def.shape,o={...n};if(r)for(let s in r){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(o[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)o[s]=new e({type:"nonoptional",innerType:n[s]});return St(this,"shape",o),o}});return be(t,i)}function It(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Ae(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function ir(e){return typeof e=="string"?e:e?.message}function ke(e,t,r){let i={...e,path:e.path??[]};if(!e.message){let n=ir(e.inst?._zod.def?.error?.(e))??ir(t?.error?.(e))??ir(r.customError?.(e))??ir(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function ur(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function cr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function b(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function ln(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function R0(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Bm(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function Lm(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function B0(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Bm(t+r)}function L0(e){return Lm(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Z0(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function M0(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var ka=class{constructor(...t){}};var Zm=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,un,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lr=m("$ZodError",Zm),Se=m("$ZodError",Zm,{Parent:Error});function dr(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function pr(e,t=r=>r.message){let r={_errors:[]},i=n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(s=>i({issues:s}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else{let s=r,a=0;for(;a<o.path.length;){let u=o.path[a];a===o.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(t(o))):s[u]=s[u]||{_errors:[]},s=s[u],a++}}};return i(e),r}function za(e,t=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var s,a;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>i({issues:c},u.path));else if(u.code==="invalid_key")i({issues:u.issues},u.path);else if(u.code==="invalid_element")i({issues:u.issues},u.path);else{let c=[...o,...u.path];if(c.length===0){r.errors.push(t(u));continue}let l=r,d=0;for(;d<c.length;){let p=c[d],f=d===c.length-1;typeof p=="string"?(l.properties??(l.properties={}),(s=l.properties)[p]??(s[p]={errors:[]}),l=l.properties[p]):(l.items??(l.items=[]),(a=l.items)[p]??(a[p]={errors:[]}),l=l.items[p]),f&&l.errors.push(t(u)),d++}}};return i(e),r}function Mm(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Ta(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${Mm(i.path)}`);return t.join(`
28
- `)}var dn=e=>(t,r,i,n)=>{let o=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Je;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(u=>ke(u,o,ae())));throw hi(a,n?.callee),a}return s.value},gi=dn(Se),pn=e=>async(t,r,i,n)=>{let o=i?Object.assign(i,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(u=>ke(u,o,ae())));throw hi(a,n?.callee),a}return s.value},vi=pn(Se),fn=e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Je;return o.issues.length?{success:!1,error:new(e??lr)(o.issues.map(s=>ke(s,n,ae())))}:{success:!0,data:o.value}},ja=fn(Se),mn=e=>async(t,r,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>ke(s,n,ae())))}:{success:!0,data:o.value}},Ua=mn(Se),yi=e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return dn(e)(t,r,n)},V0=yi(Se),Di=e=>(t,r,i)=>dn(e)(t,r,i),W0=Di(Se),bi=e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return pn(e)(t,r,n)},G0=bi(Se),$i=e=>async(t,r,i)=>pn(e)(t,r,i),J0=$i(Se),_i=e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return fn(e)(t,r,n)},K0=_i(Se),wi=e=>(t,r,i)=>fn(e)(t,r,i),H0=wi(Se),xi=e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return mn(e)(t,r,n)},Y0=xi(Se),ki=e=>async(t,r,i)=>mn(e)(t,r,i),X0=ki(Se);var qe={};rt(qe,{base64:()=>Qa,base64url:()=>Si,bigint:()=>ou,boolean:()=>au,browserEmail:()=>s$,cidrv4:()=>Ya,cidrv6:()=>Xa,cuid:()=>Na,cuid2:()=>Ra,date:()=>tu,datetime:()=>ru,domain:()=>c$,duration:()=>qa,e164:()=>eu,email:()=>Wa,emoji:()=>Ga,extendedDuration:()=>Q0,guid:()=>Va,hex:()=>l$,hostname:()=>u$,html5Email:()=>r$,idnEmail:()=>o$,integer:()=>su,ipv4:()=>Ja,ipv6:()=>Ka,ksuid:()=>Za,lowercase:()=>lu,mac:()=>Ha,md5_base64:()=>p$,md5_base64url:()=>f$,md5_hex:()=>d$,nanoid:()=>Ma,null:()=>uu,number:()=>Ci,rfc5322Email:()=>i$,sha1_base64:()=>h$,sha1_base64url:()=>g$,sha1_hex:()=>m$,sha256_base64:()=>y$,sha256_base64url:()=>D$,sha256_hex:()=>v$,sha384_base64:()=>$$,sha384_base64url:()=>_$,sha384_hex:()=>b$,sha512_base64:()=>x$,sha512_base64url:()=>k$,sha512_hex:()=>w$,string:()=>iu,time:()=>nu,ulid:()=>Ba,undefined:()=>cu,unicodeEmail:()=>qm,uppercase:()=>du,uuid:()=>Mt,uuid4:()=>e$,uuid6:()=>t$,uuid7:()=>n$,xid:()=>La});var Na=/^[cC][^\s-]{8,}$/,Ra=/^[0-9a-z]+$/,Ba=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,La=/^[0-9a-vA-V]{20}$/,Za=/^[A-Za-z0-9]{27}$/,Ma=/^[a-zA-Z0-9_-]{21}$/,qa=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Q0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Va=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Mt=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,e$=Mt(4),t$=Mt(6),n$=Mt(7),Wa=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,r$=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,i$=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,qm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,o$=qm,s$=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,a$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ga(){return new RegExp(a$,"u")}var Ja=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ka=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ha=e=>{let t=Me(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Ya=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Xa=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qa=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Si=/^[A-Za-z0-9_-]*$/,u$=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,c$=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,eu=/^\+[1-9]\d{6,14}$/,Vm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",tu=new RegExp(`^${Vm}$`);function Wm(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nu(e){return new RegExp(`^${Wm(e)}$`)}function ru(e){let t=Wm({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${Vm}T(?:${i})$`)}var iu=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ou=/^-?\d+n?$/,su=/^-?\d+$/,Ci=/^-?\d+(?:\.\d+)?$/,au=/^(?:true|false)$/i,uu=/^null$/i;var cu=/^undefined$/i;var lu=/^[^A-Z]*$/,du=/^[^a-z]*$/,l$=/^[0-9a-fA-F]*$/;function fr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function mr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var d$=/^[0-9a-fA-F]{32}$/,p$=fr(22,"=="),f$=mr(22),m$=/^[0-9a-fA-F]{40}$/,h$=fr(27,"="),g$=mr(27),v$=/^[0-9a-fA-F]{64}$/,y$=fr(43,"="),D$=mr(43),b$=/^[0-9a-fA-F]{96}$/,$$=fr(64,""),_$=mr(64),w$=/^[0-9a-fA-F]{128}$/,x$=fr(86,"=="),k$=mr(86);var ee=m("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Jm={number:"number",bigint:"bigint",object:"date"},Ii=m("$ZodCheckLessThan",(e,t)=>{ee.init(e,t);let r=Jm[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ei=m("$ZodCheckGreaterThan",(e,t)=>{ee.init(e,t);let r=Jm[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pu=m("$ZodCheckMultipleOf",(e,t)=>{ee.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Sa(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),fu=m("$ZodCheckNumberFormat",(e,t)=>{ee.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Pa[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=o,r&&(a.pattern=su)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>o&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),mu=m("$ZodCheckBigIntFormat",(e,t)=>{ee.init(e,t);let[r,i]=Aa[t.format];e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i}),e._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),hu=m("$ZodCheckMaxSize",(e,t)=>{var r;ee.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!kt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:ur(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),gu=m("$ZodCheckMinSize",(e,t)=>{var r;ee.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!kt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:ur(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),vu=m("$ZodCheckSizeEquals",(e,t)=>{var r;ee.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!kt(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{let n=i.value,o=n.size;if(o===t.size)return;let s=o>t.size;i.issues.push({origin:ur(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),yu=m("$ZodCheckMaxLength",(e,t)=>{var r;ee.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!kt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let s=cr(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Du=m("$ZodCheckMinLength",(e,t)=>{var r;ee.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!kt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let s=cr(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),bu=m("$ZodCheckLengthEquals",(e,t)=>{var r;ee.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return!kt(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{let n=i.value,o=n.length;if(o===t.length)return;let s=cr(n),a=o>t.length;i.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),hn=m("$ZodCheckStringFormat",(e,t)=>{var r,i;ee.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),$u=m("$ZodCheckRegex",(e,t)=>{hn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_u=m("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=lu),hn.init(e,t)}),wu=m("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=du),hn.init(e,t)}),xu=m("$ZodCheckIncludes",(e,t)=>{ee.init(e,t);let r=Me(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ku=m("$ZodCheckStartsWith",(e,t)=>{ee.init(e,t);let r=new RegExp(`^${Me(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Su=m("$ZodCheckEndsWith",(e,t)=>{ee.init(e,t);let r=new RegExp(`.*${Me(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Gm(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues))}var Cu=m("$ZodCheckProperty",(e,t)=>{ee.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Gm(n,r,t.property));Gm(i,r,t.property)}}),Iu=m("$ZodCheckMimeType",(e,t)=>{ee.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Eu=m("$ZodCheckOverwrite",(e,t)=>{ee.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var hr=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
29
- `).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
30
- `))}};var Fu={major:4,minor:3,patch:6};var A=m("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Fu;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let n of i)for(let o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,a,u)=>{let c=It(s),l;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(c)continue;let p=s.issues.length,f=d._zod.check(s);if(f instanceof Promise&&u?.async===!1)throw new Je;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,s.issues.length!==p&&(c||(c=It(s,p)))});else{if(s.issues.length===p)continue;c||(c=It(s,p))}}return l?l.then(()=>s):s},o=(s,a,u)=>{if(It(s))return s.aborted=!0,s;let c=n(a,i,u);if(c instanceof Promise){if(u.async===!1)throw new Je;return c.then(l=>e._zod.parse(l,u))}return e._zod.parse(c,u)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let c=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});return c instanceof Promise?c.then(l=>o(l,s,a)):o(c,s,a)}let u=e._zod.parse(s,a);if(u instanceof Promise){if(a.async===!1)throw new Je;return u.then(c=>n(c,i,a))}return n(u,i,a)}}N(e,"~standard",()=>({validate:n=>{try{let o=ja(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Ua(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),qt=m("$ZodString",(e,t)=>{A.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??iu(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),K=m("$ZodStringFormat",(e,t)=>{hn.init(e,t),qt.init(e,t)}),Pu=m("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Va),K.init(e,t)}),Au=m("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Mt(i))}else t.pattern??(t.pattern=Mt());K.init(e,t)}),zu=m("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Wa),K.init(e,t)}),Tu=m("$ZodURL",(e,t)=>{K.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ju=m("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ga()),K.init(e,t)}),Uu=m("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ma),K.init(e,t)}),Nu=m("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Na),K.init(e,t)}),Ru=m("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ra),K.init(e,t)}),Bu=m("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ba),K.init(e,t)}),Lu=m("$ZodXID",(e,t)=>{t.pattern??(t.pattern=La),K.init(e,t)}),Zu=m("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Za),K.init(e,t)}),Mu=m("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ru(t)),K.init(e,t)}),qu=m("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tu),K.init(e,t)}),Vu=m("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=nu(t)),K.init(e,t)}),Wu=m("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=qa),K.init(e,t)}),Gu=m("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ja),K.init(e,t),e._zod.bag.format="ipv4"}),Ju=m("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ka),K.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Ku=m("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ha(t.delimiter)),K.init(e,t),e._zod.bag.format="mac"}),Hu=m("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ya),K.init(e,t)}),Yu=m("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Xa),K.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,o]=i;if(!o)throw new Error;let s=Number(o);if(`${s}`!==o)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Xu(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Qu=m("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qa),K.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Xu(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function ah(e){if(!Si.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Xu(r)}var ec=m("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Si),K.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{ah(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),tc=m("$ZodE164",(e,t)=>{t.pattern??(t.pattern=eu),K.init(e,t)});function uh(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var nc=m("$ZodJWT",(e,t)=>{K.init(e,t),e._zod.check=r=>{uh(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),rc=m("$ZodCustomStringFormat",(e,t)=>{K.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ti=m("$ZodNumber",(e,t)=>{A.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ci,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),ic=m("$ZodNumberFormat",(e,t)=>{fu.init(e,t),Ti.init(e,t)}),gr=m("$ZodBoolean",(e,t)=>{A.init(e,t),e._zod.pattern=au,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),ji=m("$ZodBigInt",(e,t)=>{A.init(e,t),e._zod.pattern=ou,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),oc=m("$ZodBigIntFormat",(e,t)=>{mu.init(e,t),ji.init(e,t)}),sc=m("$ZodSymbol",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),ac=m("$ZodUndefined",(e,t)=>{A.init(e,t),e._zod.pattern=cu,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),uc=m("$ZodNull",(e,t)=>{A.init(e,t),e._zod.pattern=uu,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),cc=m("$ZodAny",(e,t)=>{A.init(e,t),e._zod.parse=r=>r}),lc=m("$ZodUnknown",(e,t)=>{A.init(e,t),e._zod.parse=r=>r}),dc=m("$ZodNever",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),pc=m("$ZodVoid",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),fc=m("$ZodDate",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Hm(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues)),t.value[r]=e.value}var mc=m("$ZodArray",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let o=[];for(let s=0;s<n.length;s++){let a=n[s],u=t.element._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(c=>Hm(c,r,s))):Hm(u,r,s)}return o.length?Promise.all(o).then(()=>r):r}});function zi(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...Ae(r,e.issues))}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function ch(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let r=Oa(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function lh(e,t,r,i,n,o){let s=[],a=n.keySet,u=n.catchall._zod,c=u.def.type,l=u.optout==="optional";for(let d in t){if(a.has(d))continue;if(c==="never"){s.push(d);continue}let p=u.run({value:t[d],issues:[]},i);p instanceof Promise?e.push(p.then(f=>zi(f,r,d,t,l))):zi(p,r,d,t,l)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}var dh=m("$ZodObject",(e,t)=>{if(A.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...a};return Object.defineProperty(t,"shape",{value:u}),u}})}let i=cn(()=>ch(t));N(e._zod,"propValues",()=>{let a=t.shape,u={};for(let c in a){let l=a[c]._zod;if(l.values){u[c]??(u[c]=new Set);for(let d of l.values)u[c].add(d)}}return u});let n=Zt,o=t.catchall,s;e._zod.parse=(a,u)=>{s??(s=i.value);let c=a.value;if(!n(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};let l=[],d=s.shape;for(let p of s.keys){let f=d[p],y=f._zod.optout==="optional",w=f._zod.run({value:c[p],issues:[]},u);w instanceof Promise?l.push(w.then(F=>zi(F,a,p,c,y))):zi(w,a,p,c,y)}return o?lh(l,c,a,u,i.value,e):l.length?Promise.all(l).then(()=>a):a}}),hc=m("$ZodObjectJIT",(e,t)=>{dh.init(e,t);let r=e._zod.parse,i=cn(()=>ch(t)),n=p=>{let f=new hr(["shape","payload","ctx"]),y=i.value,w=z=>{let G=mi(z);return`shape[${G}]._zod.run({ value: input[${G}], issues: [] }, ctx)`};f.write("const input = payload.value;");let F=Object.create(null),R=0;for(let z of y.keys)F[z]=`key_${R++}`;f.write("const newResult = {};");for(let z of y.keys){let G=F[z],De=mi(z),ui=p[z]?._zod?.optout==="optional";f.write(`const ${G} = ${w(z)};`),ui?f.write(`
31
- if (${G}.issues.length) {
32
- if (${De} in input) {
33
- payload.issues = payload.issues.concat(${G}.issues.map(iss => ({
34
- ...iss,
35
- path: iss.path ? [${De}, ...iss.path] : [${De}]
36
- })));
37
- }
38
- }
39
-
40
- if (${G}.value === undefined) {
41
- if (${De} in input) {
42
- newResult[${De}] = undefined;
43
- }
44
- } else {
45
- newResult[${De}] = ${G}.value;
46
- }
47
-
48
- `):f.write(`
49
- if (${G}.issues.length) {
50
- payload.issues = payload.issues.concat(${G}.issues.map(iss => ({
51
- ...iss,
52
- path: iss.path ? [${De}, ...iss.path] : [${De}]
53
- })));
54
- }
55
-
56
- if (${G}.value === undefined) {
57
- if (${De} in input) {
58
- newResult[${De}] = undefined;
59
- }
60
- } else {
61
- newResult[${De}] = ${G}.value;
62
- }
63
-
64
- `)}f.write("payload.value = newResult;"),f.write("return payload;");let Q=f.compile();return(z,G)=>Q(p,z,G)},o,s=Zt,a=!rr.jitless,c=a&&Ia.value,l=t.catchall,d;e._zod.parse=(p,f)=>{d??(d=i.value);let y=p.value;return s(y)?a&&c&&f?.async===!1&&f.jitless!==!0?(o||(o=n(t.shape)),p=o(p,f),l?lh([],y,p,f,d,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),p)}});function Ym(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter(o=>!It(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>ke(s,i,ae())))}),t)}var vr=m("$ZodUnion",(e,t)=>{A.init(e,t),N(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),N(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),N(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),N(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>sr(o.source)).join("|")})$`)}});let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)a.push(c),s=!0;else{if(c.issues.length===0)return c;a.push(c)}}return s?Promise.all(a).then(u=>Ym(u,n,e,o)):Ym(a,n,e,o)}});function Xm(e,t,r,i){let n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(s=>ke(s,i,ae())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var gc=m("$ZodXor",(e,t)=>{vr.init(e,t),t.inclusive=!1;let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let s=!1,a=[];for(let u of t.options){let c=u._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(a.push(c),s=!0):a.push(c)}return s?Promise.all(a).then(u=>Xm(u,n,e,o)):Xm(a,n,e,o)}}),vc=m("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,vr.init(e,t);let r=e._zod.parse;N(e._zod,"propValues",()=>{let n={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,u]of Object.entries(s)){n[a]||(n[a]=new Set);for(let c of u)n[a].add(c)}}return n});let i=cn(()=>{let n=t.options,o=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of a){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,s)}}return o});e._zod.parse=(n,o)=>{let s=n.value;if(!Zt(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=i.value.get(s?.[t.discriminator]);return a?a._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)}}),yc=m("$ZodIntersection",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),s=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([u,c])=>Qm(r,u,c)):Qm(r,o,s)}});function Ou(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ct(e)&&Ct(t)){let r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(let o of i){let s=Ou(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};n[o]=s.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],s=Ou(n,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Qm(e,t,r){let i=new Map,n;for(let a of t.issues)if(a.code==="unrecognized_keys"){n??(n=a);for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&n&&e.issues.push({...n,keys:o}),It(e))return e;let s=Ou(t.value,r.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var Ui=m("$ZodTuple",(e,t)=>{A.init(e,t);let r=t.items;e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),u=a===-1?0:r.length-a;if(!t.rest){let l=o.length>r.length,d=o.length<u-1;if(l||d)return i.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),i}let c=-1;for(let l of r){if(c++,c>=o.length&&c>=u)continue;let d=l._zod.run({value:o[c],issues:[]},n);d instanceof Promise?s.push(d.then(p=>Fi(p,i,c))):Fi(d,i,c)}if(t.rest){let l=o.slice(r.length);for(let d of l){c++;let p=t.rest._zod.run({value:d,issues:[]},n);p instanceof Promise?s.push(p.then(f=>Fi(f,i,c))):Fi(p,i,c)}}return s.length?Promise.all(s).then(()=>i):i}});function Fi(e,t,r){e.issues.length&&t.issues.push(...Ae(r,e.issues)),t.value[r]=e.value}var Dc=m("$ZodRecord",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Ct(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){a.add(typeof c=="number"?c.toString():c);let l=t.valueType._zod.run({value:n[c],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Ae(c,d.issues)),r.value[c]=d.value})):(l.issues.length&&r.issues.push(...Ae(c,l.issues)),r.value[c]=l.value)}let u;for(let c in n)a.has(c)||(u=u??[],u.push(c));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let a of Reflect.ownKeys(n)){if(a==="__proto__")continue;let u=t.keyType._zod.run({value:a,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Ci.test(a)&&u.issues.length){let d=t.keyType._zod.run({value:Number(a),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(u=d)}if(u.issues.length){t.mode==="loose"?r.value[a]=n[a]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(d=>ke(d,i,ae())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:n[a],issues:[]},i);l instanceof Promise?o.push(l.then(d=>{d.issues.length&&r.issues.push(...Ae(a,d.issues)),r.value[u.value]=d.value})):(l.issues.length&&r.issues.push(...Ae(a,l.issues)),r.value[u.value]=l.value)}}return o.length?Promise.all(o).then(()=>r):r}}),bc=m("$ZodMap",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let o=[];r.value=new Map;for(let[s,a]of n){let u=t.keyType._zod.run({value:s,issues:[]},i),c=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||c instanceof Promise?o.push(Promise.all([u,c]).then(([l,d])=>{eh(l,d,r,s,n,e,i)})):eh(u,c,r,s,n,e,i)}return o.length?Promise.all(o).then(()=>r):r}});function eh(e,t,r,i,n,o,s){e.issues.length&&(ar.has(typeof i)?r.issues.push(...Ae(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(a=>ke(a,s,ae()))})),t.issues.length&&(ar.has(typeof i)?r.issues.push(...Ae(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(a=>ke(a,s,ae()))})),r.value.set(e.value,t.value)}var $c=m("$ZodSet",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(u=>th(u,r))):th(a,r)}return o.length?Promise.all(o).then(()=>r):r}});function th(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var _c=m("$ZodEnum",(e,t)=>{A.init(e,t);let r=or(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>ar.has(typeof n)).map(n=>typeof n=="string"?Me(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),wc=m("$ZodLiteral",(e,t)=>{if(A.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Me(i):i?Me(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),xc=m("$ZodFile",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),kc=m("$ZodTransform",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new xt(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Je;return r.value=n,r}});function nh(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Ni=m("$ZodOptional",(e,t)=>{A.init(e,t),e._zod.optin="optional",e._zod.optout="optional",N(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),N(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sr(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>nh(o,r.value)):nh(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)}}),Sc=m("$ZodExactOptional",(e,t)=>{Ni.init(e,t),N(e._zod,"values",()=>t.innerType._zod.values),N(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),Cc=m("$ZodNullable",(e,t)=>{A.init(e,t),N(e._zod,"optin",()=>t.innerType._zod.optin),N(e._zod,"optout",()=>t.innerType._zod.optout),N(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sr(r.source)}|null)$`):void 0}),N(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),Ic=m("$ZodDefault",(e,t)=>{A.init(e,t),e._zod.optin="optional",N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>rh(o,t)):rh(n,t)}});function rh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ec=m("$ZodPrefault",(e,t)=>{A.init(e,t),e._zod.optin="optional",N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),Fc=m("$ZodNonOptional",(e,t)=>{A.init(e,t),N(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>ih(o,e)):ih(n,e)}});function ih(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Oc=m("$ZodSuccess",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new xt("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Pc=m("$ZodCatch",(e,t)=>{A.init(e,t),N(e._zod,"optin",()=>t.innerType._zod.optin),N(e._zod,"optout",()=>t.innerType._zod.optout),N(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(s=>ke(s,i,ae()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>ke(o,i,ae()))},input:r.value}),r.issues=[]),r)}}),Ac=m("$ZodNaN",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),zc=m("$ZodPipe",(e,t)=>{A.init(e,t),N(e._zod,"values",()=>t.in._zod.values),N(e._zod,"optin",()=>t.in._zod.optin),N(e._zod,"optout",()=>t.out._zod.optout),N(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>Oi(s,t.in,i)):Oi(o,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Oi(o,t.out,i)):Oi(n,t.out,i)}});function Oi(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var yr=m("$ZodCodec",(e,t)=>{A.init(e,t),N(e._zod,"values",()=>t.in._zod.values),N(e._zod,"optin",()=>t.in._zod.optin),N(e._zod,"optout",()=>t.out._zod.optout),N(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);return o instanceof Promise?o.then(s=>Pi(s,t,i)):Pi(o,t,i)}else{let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(s=>Pi(s,t,i)):Pi(o,t,i)}}});function Pi(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>Ai(e,o,t.out,r)):Ai(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>Ai(e,o,t.in,r)):Ai(e,n,t.in,r)}}function Ai(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}var Tc=m("$ZodReadonly",(e,t)=>{A.init(e,t),N(e._zod,"propValues",()=>t.innerType._zod.propValues),N(e._zod,"values",()=>t.innerType._zod.values),N(e._zod,"optin",()=>t.innerType?._zod?.optin),N(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(oh):oh(n)}});function oh(e){return e.value=Object.freeze(e.value),e}var jc=m("$ZodTemplateLiteral",(e,t)=>{A.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,s))}else if(i===null||Fa.has(typeof i))r.push(Me(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Uc=m("$ZodFunction",(e,t)=>(A.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=e._def.input?gi(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?gi(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=e._def.input?await vi(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await vi(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Ui({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Nc=m("$ZodPromise",(e,t)=>{A.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),Rc=m("$ZodLazy",(e,t)=>{A.init(e,t),N(e._zod,"innerType",()=>t.getter()),N(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),N(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),N(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),N(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),Bc=m("$ZodCustom",(e,t)=>{ee.init(e,t),A.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>sh(o,r,i,e));sh(n,r,i,e)}});function sh(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(ln(n))}}var br={};rt(br,{ar:()=>ph,az:()=>fh,be:()=>hh,bg:()=>gh,ca:()=>vh,cs:()=>yh,da:()=>Dh,de:()=>bh,en:()=>Ri,eo:()=>$h,es:()=>_h,fa:()=>wh,fi:()=>xh,fr:()=>kh,frCA:()=>Sh,he:()=>Ch,hu:()=>Ih,hy:()=>Fh,id:()=>Oh,is:()=>Ph,it:()=>Ah,ja:()=>zh,ka:()=>Th,kh:()=>jh,km:()=>Bi,ko:()=>Uh,lt:()=>Rh,mk:()=>Bh,ms:()=>Lh,nl:()=>Zh,no:()=>Mh,ota:()=>qh,pl:()=>Wh,ps:()=>Vh,pt:()=>Gh,ru:()=>Kh,sl:()=>Hh,sv:()=>Yh,ta:()=>Xh,th:()=>Qh,tr:()=>eg,ua:()=>tg,uk:()=>Li,ur:()=>ng,uz:()=>rg,vi:()=>ig,yo:()=>ag,zhCN:()=>og,zhTW:()=>sg});var C$=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${D(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${h(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function ph(){return{localeError:C$()}}var I$=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${a}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${D(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${h(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function fh(){return{localeError:I$()}}function mh(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}var E$=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${D(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),u=mh(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),u=mh(a,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${o}${n.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${h(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function hh(){return{localeError:E$()}}var F$=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${D(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${h(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function gh(){return{localeError:F$()}}var O$=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${a}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${D(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${h(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function vh(){return{localeError:O$()}}var P$=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${a}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${D(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${h(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function yh(){return{localeError:P$()}}var A$=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${a}`:`Ugyldigt input: forventede ${o}, fik ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${D(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${o} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;return s?`For lille: forventede ${a} ${s.verb} ${o} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${h(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function Dh(){return{localeError:A$()}}var z$=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${a}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${D(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${h(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function bh(){return{localeError:z$()}}var T$=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return`Invalid input: expected ${o}, received ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`Invalid option: expected one of ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Ri(){return{localeError:T$()}}var j$=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${a}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${D(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function $h(){return{localeError:j$()}}var U$=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${D(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=i[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${o}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function _h(){return{localeError:U$()}}var N$=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${D(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${h(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${h(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function wh(){return{localeError:N$()}}var R$=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${a}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${D(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${h(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function xh(){return{localeError:R$()}}var B$=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${a} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${D(n.values[0])} attendu`:`Option invalide : une valeur parmi ${h(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${h(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function kh(){return{localeError:B$()}}var L$=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${a}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${D(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${h(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Sh(){return{localeError:L$()}}var Z$=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,i=c=>{let l=r(c);return l?l.label:c??e.unknown.label},n=c=>`\u05D4${i(c)}`,o=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=c=>c?t[c]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let l=c.expected,d=u[l??""]??i(l),p=b(c.input),f=u[p]??e[p]?.label??p;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${D(c.values[0])}`;let l=c.values.map(f=>D(f));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=s(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let y=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}`}if(c.origin==="array"||c.origin==="set"){let y=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",w=c.inclusive?`${c.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${w}`.trim()}let p=c.inclusive?"<=":"<",f=o(c.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.maximum.toString()}`}case"too_small":{let l=s(c.origin),d=n(c.origin??"value");if(c.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${l?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let y=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}`}if(c.origin==="array"||c.origin==="set"){let y=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let F=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${F}`}let w=c.inclusive?`${c.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${y} \u05DC\u05D4\u05DB\u05D9\u05DC ${w}`.trim()}let p=c.inclusive?">=":">",f=o(c.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.minimum.toString()}`}case"invalid_format":{let l=c;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let d=a[l.format],p=d?.label??l.format,y=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${y}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${h(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Ch(){return{localeError:Z$()}}var M$=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${a}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${D(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Ih(){return{localeError:M$()}}function Eh(e,t,r){return Math.abs(e)===1?t:r}function gn(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var q$=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${D(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),u=Eh(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${gn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${gn(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),u=Eh(a,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${gn(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${gn(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${h(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${gn(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${gn(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Fh(){return{localeError:q$()}}var V$=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${D(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function Oh(){return{localeError:V$()}}var W$=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${D(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${h(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function Ph(){return{localeError:W$()}}var G$=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${a}`:`Input non valido: atteso ${o}, ricevuto ${a}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${D(n.values[0])}`:`Opzione non valida: atteso uno tra ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${h(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Ah(){return{localeError:G$()}}var J$=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${D(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${h(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${h(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function zh(){return{localeError:J$()}}var K$=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${D(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${h(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${h(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Th(){return{localeError:K$()}}var H$=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${D(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${h(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Bi(){return{localeError:H$()}}function jh(){return Bi()}var Y$=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${D(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${h(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),u=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${s}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),u=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${o}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${s}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${h(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Uh(){return{localeError:Y$()}}var Dr=e=>e.charAt(0).toUpperCase()+e.slice(1);function Nh(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var X$=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(n,o,s,a){let u=e[n]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[a][s?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${D(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${h(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,s=t(n.origin,Nh(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${Dr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Dr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,s=t(n.origin,Nh(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${Dr(o??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let a=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Dr(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${h(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${Dr(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Rh(){return{localeError:X$()}}var Q$=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${D(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${h(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Bh(){return{localeError:Q$()}}var e_=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${a}`:`Input tidak sah: dijangka ${o}, diterima ${a}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${D(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${h(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Lh(){return{localeError:e_()}}var t_=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${o}, ontving ${a}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${D(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin),a=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin),a=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Zh(){return{localeError:t_()}}var n_=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${a}`:`Ugyldig input: forventet ${o}, fikk ${a}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${D(n.values[0])}`:`Ugyldig valg: forventet en av ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${h(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Mh(){return{localeError:n_()}}var r_=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${D(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function qh(){return{localeError:r_()}}var i_=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${D(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${h(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${h(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Vh(){return{localeError:i_()}}var o_=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${a}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${D(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Wh(){return{localeError:o_()}}var s_=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${a}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${D(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${r[o.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${h(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function Gh(){return{localeError:s_()}}function Jh(e,t,r,i){let n=Math.abs(e),o=n%10,s=n%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?r:i}var a_=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${D(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),u=Jh(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),u=Jh(a,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${h(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Kh(){return{localeError:a_()}}var u_=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${a}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${D(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${h(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function Hh(){return{localeError:u_()}}var c_=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${a}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${D(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${h(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Yh(){return{localeError:c_()}}var l_=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${h(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${h(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Xh(){return{localeError:l_()}}var d_=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${D(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${h(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Qh(){return{localeError:d_()}}var p_=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${a}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${D(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${h(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function eg(){return{localeError:p_()}}var f_=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${D(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${h(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Li(){return{localeError:f_()}}function tg(){return Li()}var m_=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${D(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${h(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${h(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function ng(){return{localeError:m_()}}var h_=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${a}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${D(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${h(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function rg(){return{localeError:h_()}}var g_=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${D(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${o}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${o}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${h(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function ig(){return{localeError:g_()}}var v_=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${D(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${h(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function og(){return{localeError:v_()}}var y_=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${a}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${D(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${h(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function sg(){return{localeError:y_()}}var D_=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,s=b(n.input),a=i[s]??s;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${D(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${h(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${o}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${o}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${h(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function ag(){return{localeError:D_()}}var ug,Lc=Symbol("ZodOutput"),Zc=Symbol("ZodInput"),Zi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Mi(){return new Zi}(ug=globalThis).__zod_globalRegistry??(ug.__zod_globalRegistry=Mi());var ge=globalThis.__zod_globalRegistry;function Mc(e,t){return new e({type:"string",..._(t)})}function qc(e,t){return new e({type:"string",coerce:!0,..._(t)})}function qi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._(t)})}function $r(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._(t)})}function Vi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._(t)})}function Wi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._(t)})}function Gi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._(t)})}function Ji(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._(t)})}function _r(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._(t)})}function Ki(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._(t)})}function Hi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._(t)})}function Yi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._(t)})}function Xi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._(t)})}function Qi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._(t)})}function eo(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._(t)})}function to(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._(t)})}function no(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._(t)})}function ro(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._(t)})}function Vc(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,..._(t)})}function io(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._(t)})}function oo(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._(t)})}function so(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._(t)})}function ao(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._(t)})}function uo(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._(t)})}function co(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._(t)})}var Wc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Gc(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._(t)})}function Jc(e,t){return new e({type:"string",format:"date",check:"string_format",..._(t)})}function Kc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._(t)})}function Hc(e,t){return new e({type:"string",format:"duration",check:"string_format",..._(t)})}function Yc(e,t){return new e({type:"number",checks:[],..._(t)})}function Xc(e,t){return new e({type:"number",coerce:!0,checks:[],..._(t)})}function Qc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._(t)})}function el(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",..._(t)})}function tl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",..._(t)})}function nl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",..._(t)})}function rl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",..._(t)})}function il(e,t){return new e({type:"boolean",..._(t)})}function ol(e,t){return new e({type:"boolean",coerce:!0,..._(t)})}function sl(e,t){return new e({type:"bigint",..._(t)})}function al(e,t){return new e({type:"bigint",coerce:!0,..._(t)})}function ul(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",..._(t)})}function cl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",..._(t)})}function ll(e,t){return new e({type:"symbol",..._(t)})}function dl(e,t){return new e({type:"undefined",..._(t)})}function pl(e,t){return new e({type:"null",..._(t)})}function fl(e){return new e({type:"any"})}function ml(e){return new e({type:"unknown"})}function hl(e,t){return new e({type:"never",..._(t)})}function gl(e,t){return new e({type:"void",..._(t)})}function vl(e,t){return new e({type:"date",..._(t)})}function yl(e,t){return new e({type:"date",coerce:!0,..._(t)})}function Dl(e,t){return new e({type:"nan",..._(t)})}function it(e,t){return new Ii({check:"less_than",..._(t),value:e,inclusive:!1})}function ze(e,t){return new Ii({check:"less_than",..._(t),value:e,inclusive:!0})}function ot(e,t){return new Ei({check:"greater_than",..._(t),value:e,inclusive:!1})}function $e(e,t){return new Ei({check:"greater_than",..._(t),value:e,inclusive:!0})}function lo(e){return ot(0,e)}function po(e){return it(0,e)}function fo(e){return ze(0,e)}function mo(e){return $e(0,e)}function Et(e,t){return new pu({check:"multiple_of",..._(t),value:e})}function Ft(e,t){return new hu({check:"max_size",..._(t),maximum:e})}function st(e,t){return new gu({check:"min_size",..._(t),minimum:e})}function Vt(e,t){return new vu({check:"size_equals",..._(t),size:e})}function Wt(e,t){return new yu({check:"max_length",..._(t),maximum:e})}function ft(e,t){return new Du({check:"min_length",..._(t),minimum:e})}function Gt(e,t){return new bu({check:"length_equals",..._(t),length:e})}function vn(e,t){return new $u({check:"string_format",format:"regex",..._(t),pattern:e})}function yn(e){return new _u({check:"string_format",format:"lowercase",..._(e)})}function Dn(e){return new wu({check:"string_format",format:"uppercase",..._(e)})}function bn(e,t){return new xu({check:"string_format",format:"includes",..._(t),includes:e})}function $n(e,t){return new ku({check:"string_format",format:"starts_with",..._(t),prefix:e})}function _n(e,t){return new Su({check:"string_format",format:"ends_with",..._(t),suffix:e})}function ho(e,t,r){return new Cu({check:"property",property:e,schema:t,..._(r)})}function wn(e,t){return new Iu({check:"mime_type",mime:e,..._(t)})}function Ke(e){return new Eu({check:"overwrite",tx:e})}function xn(e){return Ke(t=>t.normalize(e))}function kn(){return Ke(e=>e.trim())}function Sn(){return Ke(e=>e.toLowerCase())}function Cn(){return Ke(e=>e.toUpperCase())}function In(){return Ke(e=>Ca(e))}function bl(e,t,r){return new e({type:"array",element:t,..._(r)})}function $_(e,t,r){return new e({type:"union",options:t,..._(r)})}function __(e,t,r){return new e({type:"union",options:t,inclusive:!1,..._(r)})}function w_(e,t,r,i){return new e({type:"union",options:r,discriminator:t,..._(i)})}function x_(e,t,r){return new e({type:"intersection",left:t,right:r})}function k_(e,t,r,i){let n=r instanceof A,o=n?i:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,..._(o)})}function S_(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,..._(i)})}function C_(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,..._(i)})}function I_(e,t,r){return new e({type:"set",valueType:t,..._(r)})}function E_(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,..._(r)})}function F_(e,t,r){return new e({type:"enum",entries:t,..._(r)})}function O_(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],..._(r)})}function $l(e,t){return new e({type:"file",..._(t)})}function P_(e,t){return new e({type:"transform",transform:t})}function A_(e,t){return new e({type:"optional",innerType:t})}function z_(e,t){return new e({type:"nullable",innerType:t})}function T_(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Ea(r)}})}function j_(e,t,r){return new e({type:"nonoptional",innerType:t,..._(r)})}function U_(e,t){return new e({type:"success",innerType:t})}function N_(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function R_(e,t,r){return new e({type:"pipe",in:t,out:r})}function B_(e,t){return new e({type:"readonly",innerType:t})}function L_(e,t,r){return new e({type:"template_literal",parts:t,..._(r)})}function Z_(e,t){return new e({type:"lazy",getter:t})}function M_(e,t){return new e({type:"promise",innerType:t})}function _l(e,t,r){let i=_(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function wl(e,t,r){return new e({type:"custom",check:"custom",fn:t,..._(r)})}function xl(e){let t=cg(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(ln(i,r.value,t._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(ln(n))}},e(r.value,r)));return t}function cg(e,t){let r=new ee({check:"custom",..._(t)});return r._zod.check=e,r}function kl(e){let t=new ee({check:"describe"});return t._zod.onattach=[r=>{let i=ge.get(r)??{};ge.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function Sl(e){let t=new ee({check:"meta"});return t._zod.onattach=[r=>{let i=ge.get(r)??{};ge.add(r,{...i,...e})}],t._zod.check=()=>{},t}function Cl(e,t){let r=_(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),s=new Set(n),a=e.Codec??yr,u=e.Boolean??gr,c=e.String??qt,l=new c({type:"string",error:r.error}),d=new u({type:"boolean",error:r.error}),p=new a({type:"pipe",in:l,out:d,transform:((f,y)=>{let w=f;return r.case!=="sensitive"&&(w=w.toLowerCase()),o.has(w)?!0:s.has(w)?!1:(y.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:y.value,inst:p,continue:!1}),{})}),reverseTransform:((f,y)=>f===!0?i[0]||"true":n[0]||"false"),error:r.error});return p}function En(e,t,r,i={}){let n=_(i),o={..._(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function Ot(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ge,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function V(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else{let p=s.schema,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,p,l)}let d=e._zod.parent;d&&(s.ref||(s.ref=d),V(d,t,l),t.seen.get(d).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&_e(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Pt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let u=i.get(a);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(a,s[0])}}let n=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(s[0])?.id,p=e.external.uri??(y=>y);if(d)return{ref:p(d)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${p("__shared")}#/${a}/${f}`}}if(s[1]===r)return{ref:"#"};let c=`#/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:c+l}},o=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:u,defId:c}=n(s);a.def={...a.schema},c&&(a.defId=c);let l=a.schema;for(let d in l)delete l[d];l.$ref=u};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
65
-
66
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){o(s);continue}if(e.external){let c=e.external.registry.get(s[0])?.id;if(t!==s[0]&&c){o(s);continue}}if(e.metadataRegistry.get(s[0])?.id){o(s);continue}if(a.cycle){o(s);continue}if(a.count>1&&e.reused==="ref"){o(s);continue}}}function At(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let a=e.seen.get(s);if(a.ref===null)return;let u=a.def??a.schema,c={...u},l=a.ref;if(a.ref=null,l){i(l);let p=e.seen.get(l),f=p.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(f)):Object.assign(u,f),Object.assign(u,c),s._zod.parent===l)for(let w in u)w==="$ref"||w==="allOf"||w in c||delete u[w];if(f.$ref&&p.def)for(let w in u)w==="$ref"||w==="allOf"||w in p.def&&JSON.stringify(u[w])===JSON.stringify(p.def[w])&&delete u[w]}let d=s._zod.parent;if(d&&d!==l){i(d);let p=e.seen.get(d);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(let f in u)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(u[f])===JSON.stringify(p.def[f])&&delete u[f]}e.override({zodSchema:s,jsonSchema:u,path:a.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let o=e.external?.defs??{};for(let s of e.seen.entries()){let a=s[1];a.def&&a.defId&&(o[a.defId]=a.def)}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Fn(t,"input",e.processors),output:Fn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function _e(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return _e(i.element,r);if(i.type==="set")return _e(i.valueType,r);if(i.type==="lazy")return _e(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return _e(i.innerType,r);if(i.type==="intersection")return _e(i.left,r)||_e(i.right,r);if(i.type==="record"||i.type==="map")return _e(i.keyType,r)||_e(i.valueType,r);if(i.type==="pipe")return _e(i.in,r)||_e(i.out,r);if(i.type==="object"){for(let n in i.shape)if(_e(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(_e(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(_e(n,r))return!0;return!!(i.rest&&_e(i.rest,r))}return!1}var Il=(e,t={})=>r=>{let i=Ot({...r,processors:t});return V(e,i),Pt(i,e),At(i,e)},Fn=(e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},s=Ot({...n??{},target:o,io:t,processors:r});return V(e,s),Pt(s,e),At(s,e)};var q_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},El=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:c}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof s=="number"&&(n.maxLength=s),a&&(n.format=q_[a]??a,n.format===""&&delete n.format,a==="time"&&delete n.format),c&&(n.contentEncoding=c),u&&u.size>0){let l=[...u];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Fl=(e,t,r,i)=>{let n=r,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?n.type="integer":n.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l),typeof o=="number"&&(n.minimum=o,typeof l=="number"&&t.target!=="draft-04"&&(l>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c),typeof s=="number"&&(n.maximum=s,typeof c=="number"&&t.target!=="draft-04"&&(c<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof u=="number"&&(n.multipleOf=u)},Ol=(e,t,r,i)=>{r.type="boolean"},Pl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Al=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},zl=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Tl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},jl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Ul=(e,t,r,i)=>{r.not={}},Nl=(e,t,r,i)=>{},Rl=(e,t,r,i)=>{},Bl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Ll=(e,t,r,i)=>{let n=e._zod.def,o=or(n.entries);o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),r.enum=o},Zl=(e,t,r,i)=>{let n=e._zod.def,o=[];for(let s of n.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else o.every(s=>typeof s=="number")&&(r.type="number"),o.every(s=>typeof s=="string")&&(r.type="string"),o.every(s=>typeof s=="boolean")&&(r.type="boolean"),o.every(s=>s===null)&&(r.type="null"),r.enum=o},Ml=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},ql=(e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},Vl=(e,t,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),u?u.length===1?(o.contentMediaType=u[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=u.map(c=>({contentMediaType:c}))):Object.assign(n,o)},Wl=(e,t,r,i)=>{r.type="boolean"},Gl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Jl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Kl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Hl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Yl=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Xl=(e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof a=="number"&&(n.maxItems=a),n.type="array",n.items=V(o.element,t,{...i,path:[...i.path,"items"]})},Ql=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object",n.properties={};let s=o.shape;for(let c in s)n.properties[c]=V(s[c],t,{...i,path:[...i.path,"properties",c]});let a=new Set(Object.keys(s)),u=new Set([...a].filter(c=>{let l=o.shape[c]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));u.size>0&&(n.required=Array.from(u)),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=V(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},vo=(e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,s=n.options.map((a,u)=>V(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?r.oneOf=s:r.anyOf=s},ed=(e,t,r,i)=>{let n=e._zod.def,o=V(n.left,t,{...i,path:[...i.path,"allOf",0]}),s=V(n.right,t,{...i,path:[...i.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];r.allOf=u},td=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((p,f)=>V(p,t,{...i,path:[...i.path,s,f]})),c=o.rest?V(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,c&&(n.items=c)):t.target==="openapi-3.0"?(n.items={anyOf:u},c&&n.items.anyOf.push(c),n.minItems=u.length,c||(n.maxItems=u.length)):(n.items=u,c&&(n.additionalItems=c));let{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},nd=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let s=o.keyType,u=s._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let l=V(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of u)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=V(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=V(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let c=s._zod.values;if(c){let l=[...c].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},rd=(e,t,r,i)=>{let n=e._zod.def,o=V(n.innerType,t,i),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},id=(e,t,r,i)=>{let n=e._zod.def;V(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},od=(e,t,r,i)=>{let n=e._zod.def;V(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},sd=(e,t,r,i)=>{let n=e._zod.def;V(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},ad=(e,t,r,i)=>{let n=e._zod.def;V(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},ud=(e,t,r,i)=>{let n=e._zod.def,o=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;V(o,t,i);let s=t.seen.get(e);s.ref=o},cd=(e,t,r,i)=>{let n=e._zod.def;V(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},ld=(e,t,r,i)=>{let n=e._zod.def;V(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},yo=(e,t,r,i)=>{let n=e._zod.def;V(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},dd=(e,t,r,i)=>{let n=e._zod.innerType;V(n,t,i);let o=t.seen.get(e);o.ref=n},go={string:El,number:Fl,boolean:Ol,bigint:Pl,symbol:Al,null:zl,undefined:Tl,void:jl,never:Ul,any:Nl,unknown:Rl,date:Bl,enum:Ll,literal:Zl,nan:Ml,template_literal:ql,file:Vl,success:Wl,custom:Gl,function:Jl,transform:Kl,map:Hl,set:Yl,array:Xl,object:Ql,union:vo,intersection:ed,tuple:td,record:nd,nullable:rd,nonoptional:id,default:od,prefault:sd,catch:ad,pipe:ud,readonly:cd,promise:ld,optional:yo,lazy:dd};function Do(e,t){if("_idmap"in e){let i=e,n=Ot({...t,processors:go}),o={};for(let u of i._idmap.entries()){let[c,l]=u;V(l,n)}let s={},a={registry:i,uri:t?.uri,defs:o};n.external=a;for(let u of i._idmap.entries()){let[c,l]=u;Pt(n,l),s[c]=At(n,l)}if(Object.keys(o).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let r=Ot({...t,processors:go});return V(e,r),Pt(r,e),At(r,e)}var bo=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Ot({processors:go,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return V(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),Pt(this.ctx,t);let i=At(this.ctx,t),{"~standard":n,...o}=i;return o}};var lg={};var wr={};rt(wr,{ZodAny:()=>Td,ZodArray:()=>Rd,ZodBase64:()=>Lo,ZodBase64URL:()=>Zo,ZodBigInt:()=>Un,ZodBigIntFormat:()=>Vo,ZodBoolean:()=>jn,ZodCIDRv4:()=>Ro,ZodCIDRv6:()=>Bo,ZodCUID:()=>Po,ZodCUID2:()=>Ao,ZodCatch:()=>ap,ZodCodec:()=>Qo,ZodCustom:()=>zr,ZodCustomStringFormat:()=>zn,ZodDate:()=>Er,ZodDefault:()=>tp,ZodDiscriminatedUnion:()=>Ld,ZodE164:()=>Mo,ZodEmail:()=>Eo,ZodEmoji:()=>Fo,ZodEnum:()=>Pn,ZodExactOptional:()=>Xd,ZodFile:()=>Hd,ZodFunction:()=>gp,ZodGUID:()=>xr,ZodIPv4:()=>Uo,ZodIPv6:()=>No,ZodIntersection:()=>Zd,ZodJWT:()=>qo,ZodKSUID:()=>jo,ZodLazy:()=>fp,ZodLiteral:()=>Kd,ZodMAC:()=>Id,ZodMap:()=>Gd,ZodNaN:()=>cp,ZodNanoID:()=>Oo,ZodNever:()=>Ud,ZodNonOptional:()=>Yo,ZodNull:()=>Ad,ZodNullable:()=>ep,ZodNumber:()=>Tn,ZodNumberFormat:()=>Kt,ZodObject:()=>Or,ZodOptional:()=>Ho,ZodPipe:()=>Xo,ZodPrefault:()=>rp,ZodPromise:()=>hp,ZodReadonly:()=>lp,ZodRecord:()=>Ar,ZodSet:()=>Jd,ZodString:()=>An,ZodStringFormat:()=>H,ZodSuccess:()=>sp,ZodSymbol:()=>Od,ZodTemplateLiteral:()=>pp,ZodTransform:()=>Yd,ZodTuple:()=>qd,ZodType:()=>j,ZodULID:()=>zo,ZodURL:()=>Ir,ZodUUID:()=>at,ZodUndefined:()=>Pd,ZodUnion:()=>Pr,ZodUnknown:()=>jd,ZodVoid:()=>Nd,ZodXID:()=>To,ZodXor:()=>Bd,_ZodString:()=>Io,_default:()=>np,_function:()=>vv,any:()=>Kg,array:()=>Fr,base64:()=>Pg,base64url:()=>Ag,bigint:()=>qg,boolean:()=>Fd,catch:()=>up,check:()=>yv,cidrv4:()=>Fg,cidrv6:()=>Og,codec:()=>mv,cuid:()=>_g,cuid2:()=>wg,custom:()=>Dv,date:()=>Yg,describe:()=>bv,discriminatedUnion:()=>rv,e164:()=>zg,email:()=>pg,emoji:()=>bg,enum:()=>Jo,exactOptional:()=>Qd,file:()=>lv,float32:()=>Bg,float64:()=>Lg,function:()=>vv,guid:()=>fg,hash:()=>Rg,hex:()=>Ng,hostname:()=>Ug,httpUrl:()=>Dg,instanceof:()=>_v,int:()=>Co,int32:()=>Zg,int64:()=>Vg,intersection:()=>Md,ipv4:()=>Cg,ipv6:()=>Eg,json:()=>xv,jwt:()=>Tg,keyof:()=>Xg,ksuid:()=>Sg,lazy:()=>mp,literal:()=>cv,looseObject:()=>tv,looseRecord:()=>ov,mac:()=>Ig,map:()=>sv,meta:()=>$v,nan:()=>fv,nanoid:()=>$g,nativeEnum:()=>uv,never:()=>Wo,nonoptional:()=>op,null:()=>zd,nullable:()=>Sr,nullish:()=>dv,number:()=>Ed,object:()=>Qg,optional:()=>kr,partialRecord:()=>iv,pipe:()=>Cr,prefault:()=>ip,preprocess:()=>kv,promise:()=>gv,readonly:()=>dp,record:()=>Wd,refine:()=>vp,set:()=>av,strictObject:()=>ev,string:()=>So,stringFormat:()=>jg,stringbool:()=>wv,success:()=>pv,superRefine:()=>yp,symbol:()=>Gg,templateLiteral:()=>hv,transform:()=>Ko,tuple:()=>Vd,uint32:()=>Mg,uint64:()=>Wg,ulid:()=>xg,undefined:()=>Jg,union:()=>Go,unknown:()=>Jt,url:()=>yg,uuid:()=>mg,uuidv4:()=>hg,uuidv6:()=>gg,uuidv7:()=>vg,void:()=>Hg,xid:()=>kg,xor:()=>nv});var $o={};rt($o,{endsWith:()=>_n,gt:()=>ot,gte:()=>$e,includes:()=>bn,length:()=>Gt,lowercase:()=>yn,lt:()=>it,lte:()=>ze,maxLength:()=>Wt,maxSize:()=>Ft,mime:()=>wn,minLength:()=>ft,minSize:()=>st,multipleOf:()=>Et,negative:()=>po,nonnegative:()=>mo,nonpositive:()=>fo,normalize:()=>xn,overwrite:()=>Ke,positive:()=>lo,property:()=>ho,regex:()=>vn,size:()=>Vt,slugify:()=>In,startsWith:()=>$n,toLowerCase:()=>Sn,toUpperCase:()=>Cn,trim:()=>kn,uppercase:()=>Dn});var On={};rt(On,{ZodISODate:()=>wo,ZodISODateTime:()=>_o,ZodISODuration:()=>ko,ZodISOTime:()=>xo,date:()=>fd,datetime:()=>pd,duration:()=>hd,time:()=>md});var _o=m("ZodISODateTime",(e,t)=>{Mu.init(e,t),H.init(e,t)});function pd(e){return Gc(_o,e)}var wo=m("ZodISODate",(e,t)=>{qu.init(e,t),H.init(e,t)});function fd(e){return Jc(wo,e)}var xo=m("ZodISOTime",(e,t)=>{Vu.init(e,t),H.init(e,t)});function md(e){return Kc(xo,e)}var ko=m("ZodISODuration",(e,t)=>{Wu.init(e,t),H.init(e,t)});function hd(e){return Hc(ko,e)}var dg=(e,t)=>{lr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>pr(e,r)},flatten:{value:r=>dr(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,un,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,un,2)}},isEmpty:{get(){return e.issues.length===0}}})},W_=m("ZodError",dg),Ce=m("ZodError",dg,{Parent:Error});var gd=dn(Ce),vd=pn(Ce),yd=fn(Ce),Dd=mn(Ce),bd=yi(Ce),$d=Di(Ce),_d=bi(Ce),wd=$i(Ce),xd=_i(Ce),kd=wi(Ce),Sd=xi(Ce),Cd=ki(Ce);var j=m("ZodType",(e,t)=>(A.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Fn(e,"input"),output:Fn(e,"output")}}),e.toJSONSchema=Il(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone($.mergeDefs(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),e.with=e.check,e.clone=(r,i)=>be(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>gd(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>yd(e,r,i),e.parseAsync=async(r,i)=>vd(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>Dd(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>bd(e,r,i),e.decode=(r,i)=>$d(e,r,i),e.encodeAsync=async(r,i)=>_d(e,r,i),e.decodeAsync=async(r,i)=>wd(e,r,i),e.safeEncode=(r,i)=>xd(e,r,i),e.safeDecode=(r,i)=>kd(e,r,i),e.safeEncodeAsync=async(r,i)=>Sd(e,r,i),e.safeDecodeAsync=async(r,i)=>Cd(e,r,i),e.refine=(r,i)=>e.check(vp(r,i)),e.superRefine=r=>e.check(yp(r)),e.overwrite=r=>e.check(Ke(r)),e.optional=()=>kr(e),e.exactOptional=()=>Qd(e),e.nullable=()=>Sr(e),e.nullish=()=>kr(Sr(e)),e.nonoptional=r=>op(e,r),e.array=()=>Fr(e),e.or=r=>Go([e,r]),e.and=r=>Md(e,r),e.transform=r=>Cr(e,Ko(r)),e.default=r=>np(e,r),e.prefault=r=>ip(e,r),e.catch=r=>up(e,r),e.pipe=r=>Cr(e,r),e.readonly=()=>dp(e),e.describe=r=>{let i=e.clone();return ge.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return ge.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return ge.get(e);let i=e.clone();return ge.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),Io=m("_ZodString",(e,t)=>{qt.init(e,t),j.init(e,t),e._zod.processJSONSchema=(i,n,o)=>El(e,i,n,o);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(vn(...i)),e.includes=(...i)=>e.check(bn(...i)),e.startsWith=(...i)=>e.check($n(...i)),e.endsWith=(...i)=>e.check(_n(...i)),e.min=(...i)=>e.check(ft(...i)),e.max=(...i)=>e.check(Wt(...i)),e.length=(...i)=>e.check(Gt(...i)),e.nonempty=(...i)=>e.check(ft(1,...i)),e.lowercase=i=>e.check(yn(i)),e.uppercase=i=>e.check(Dn(i)),e.trim=()=>e.check(kn()),e.normalize=(...i)=>e.check(xn(...i)),e.toLowerCase=()=>e.check(Sn()),e.toUpperCase=()=>e.check(Cn()),e.slugify=()=>e.check(In())}),An=m("ZodString",(e,t)=>{qt.init(e,t),Io.init(e,t),e.email=r=>e.check(qi(Eo,r)),e.url=r=>e.check(_r(Ir,r)),e.jwt=r=>e.check(co(qo,r)),e.emoji=r=>e.check(Ki(Fo,r)),e.guid=r=>e.check($r(xr,r)),e.uuid=r=>e.check(Vi(at,r)),e.uuidv4=r=>e.check(Wi(at,r)),e.uuidv6=r=>e.check(Gi(at,r)),e.uuidv7=r=>e.check(Ji(at,r)),e.nanoid=r=>e.check(Hi(Oo,r)),e.guid=r=>e.check($r(xr,r)),e.cuid=r=>e.check(Yi(Po,r)),e.cuid2=r=>e.check(Xi(Ao,r)),e.ulid=r=>e.check(Qi(zo,r)),e.base64=r=>e.check(so(Lo,r)),e.base64url=r=>e.check(ao(Zo,r)),e.xid=r=>e.check(eo(To,r)),e.ksuid=r=>e.check(to(jo,r)),e.ipv4=r=>e.check(no(Uo,r)),e.ipv6=r=>e.check(ro(No,r)),e.cidrv4=r=>e.check(io(Ro,r)),e.cidrv6=r=>e.check(oo(Bo,r)),e.e164=r=>e.check(uo(Mo,r)),e.datetime=r=>e.check(pd(r)),e.date=r=>e.check(fd(r)),e.time=r=>e.check(md(r)),e.duration=r=>e.check(hd(r))});function So(e){return Mc(An,e)}var H=m("ZodStringFormat",(e,t)=>{K.init(e,t),Io.init(e,t)}),Eo=m("ZodEmail",(e,t)=>{zu.init(e,t),H.init(e,t)});function pg(e){return qi(Eo,e)}var xr=m("ZodGUID",(e,t)=>{Pu.init(e,t),H.init(e,t)});function fg(e){return $r(xr,e)}var at=m("ZodUUID",(e,t)=>{Au.init(e,t),H.init(e,t)});function mg(e){return Vi(at,e)}function hg(e){return Wi(at,e)}function gg(e){return Gi(at,e)}function vg(e){return Ji(at,e)}var Ir=m("ZodURL",(e,t)=>{Tu.init(e,t),H.init(e,t)});function yg(e){return _r(Ir,e)}function Dg(e){return _r(Ir,{protocol:/^https?$/,hostname:qe.domain,...$.normalizeParams(e)})}var Fo=m("ZodEmoji",(e,t)=>{ju.init(e,t),H.init(e,t)});function bg(e){return Ki(Fo,e)}var Oo=m("ZodNanoID",(e,t)=>{Uu.init(e,t),H.init(e,t)});function $g(e){return Hi(Oo,e)}var Po=m("ZodCUID",(e,t)=>{Nu.init(e,t),H.init(e,t)});function _g(e){return Yi(Po,e)}var Ao=m("ZodCUID2",(e,t)=>{Ru.init(e,t),H.init(e,t)});function wg(e){return Xi(Ao,e)}var zo=m("ZodULID",(e,t)=>{Bu.init(e,t),H.init(e,t)});function xg(e){return Qi(zo,e)}var To=m("ZodXID",(e,t)=>{Lu.init(e,t),H.init(e,t)});function kg(e){return eo(To,e)}var jo=m("ZodKSUID",(e,t)=>{Zu.init(e,t),H.init(e,t)});function Sg(e){return to(jo,e)}var Uo=m("ZodIPv4",(e,t)=>{Gu.init(e,t),H.init(e,t)});function Cg(e){return no(Uo,e)}var Id=m("ZodMAC",(e,t)=>{Ku.init(e,t),H.init(e,t)});function Ig(e){return Vc(Id,e)}var No=m("ZodIPv6",(e,t)=>{Ju.init(e,t),H.init(e,t)});function Eg(e){return ro(No,e)}var Ro=m("ZodCIDRv4",(e,t)=>{Hu.init(e,t),H.init(e,t)});function Fg(e){return io(Ro,e)}var Bo=m("ZodCIDRv6",(e,t)=>{Yu.init(e,t),H.init(e,t)});function Og(e){return oo(Bo,e)}var Lo=m("ZodBase64",(e,t)=>{Qu.init(e,t),H.init(e,t)});function Pg(e){return so(Lo,e)}var Zo=m("ZodBase64URL",(e,t)=>{ec.init(e,t),H.init(e,t)});function Ag(e){return ao(Zo,e)}var Mo=m("ZodE164",(e,t)=>{tc.init(e,t),H.init(e,t)});function zg(e){return uo(Mo,e)}var qo=m("ZodJWT",(e,t)=>{nc.init(e,t),H.init(e,t)});function Tg(e){return co(qo,e)}var zn=m("ZodCustomStringFormat",(e,t)=>{rc.init(e,t),H.init(e,t)});function jg(e,t,r={}){return En(zn,e,t,r)}function Ug(e){return En(zn,"hostname",qe.hostname,e)}function Ng(e){return En(zn,"hex",qe.hex,e)}function Rg(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=qe[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return En(zn,i,n,t)}var Tn=m("ZodNumber",(e,t)=>{Ti.init(e,t),j.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Fl(e,i,n,o),e.gt=(i,n)=>e.check(ot(i,n)),e.gte=(i,n)=>e.check($e(i,n)),e.min=(i,n)=>e.check($e(i,n)),e.lt=(i,n)=>e.check(it(i,n)),e.lte=(i,n)=>e.check(ze(i,n)),e.max=(i,n)=>e.check(ze(i,n)),e.int=i=>e.check(Co(i)),e.safe=i=>e.check(Co(i)),e.positive=i=>e.check(ot(0,i)),e.nonnegative=i=>e.check($e(0,i)),e.negative=i=>e.check(it(0,i)),e.nonpositive=i=>e.check(ze(0,i)),e.multipleOf=(i,n)=>e.check(Et(i,n)),e.step=(i,n)=>e.check(Et(i,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function Ed(e){return Yc(Tn,e)}var Kt=m("ZodNumberFormat",(e,t)=>{ic.init(e,t),Tn.init(e,t)});function Co(e){return Qc(Kt,e)}function Bg(e){return el(Kt,e)}function Lg(e){return tl(Kt,e)}function Zg(e){return nl(Kt,e)}function Mg(e){return rl(Kt,e)}var jn=m("ZodBoolean",(e,t)=>{gr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ol(e,r,i,n)});function Fd(e){return il(jn,e)}var Un=m("ZodBigInt",(e,t)=>{ji.init(e,t),j.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Pl(e,i,n,o),e.gte=(i,n)=>e.check($e(i,n)),e.min=(i,n)=>e.check($e(i,n)),e.gt=(i,n)=>e.check(ot(i,n)),e.gte=(i,n)=>e.check($e(i,n)),e.min=(i,n)=>e.check($e(i,n)),e.lt=(i,n)=>e.check(it(i,n)),e.lte=(i,n)=>e.check(ze(i,n)),e.max=(i,n)=>e.check(ze(i,n)),e.positive=i=>e.check(ot(BigInt(0),i)),e.negative=i=>e.check(it(BigInt(0),i)),e.nonpositive=i=>e.check(ze(BigInt(0),i)),e.nonnegative=i=>e.check($e(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(Et(i,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function qg(e){return sl(Un,e)}var Vo=m("ZodBigIntFormat",(e,t)=>{oc.init(e,t),Un.init(e,t)});function Vg(e){return ul(Vo,e)}function Wg(e){return cl(Vo,e)}var Od=m("ZodSymbol",(e,t)=>{sc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Al(e,r,i,n)});function Gg(e){return ll(Od,e)}var Pd=m("ZodUndefined",(e,t)=>{ac.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Tl(e,r,i,n)});function Jg(e){return dl(Pd,e)}var Ad=m("ZodNull",(e,t)=>{uc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zl(e,r,i,n)});function zd(e){return pl(Ad,e)}var Td=m("ZodAny",(e,t)=>{cc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nl(e,r,i,n)});function Kg(){return fl(Td)}var jd=m("ZodUnknown",(e,t)=>{lc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rl(e,r,i,n)});function Jt(){return ml(jd)}var Ud=m("ZodNever",(e,t)=>{dc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ul(e,r,i,n)});function Wo(e){return hl(Ud,e)}var Nd=m("ZodVoid",(e,t)=>{pc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jl(e,r,i,n)});function Hg(e){return gl(Nd,e)}var Er=m("ZodDate",(e,t)=>{fc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Bl(e,i,n,o),e.min=(i,n)=>e.check($e(i,n)),e.max=(i,n)=>e.check(ze(i,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Yg(e){return vl(Er,e)}var Rd=m("ZodArray",(e,t)=>{mc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xl(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(ft(r,i)),e.nonempty=r=>e.check(ft(1,r)),e.max=(r,i)=>e.check(Wt(r,i)),e.length=(r,i)=>e.check(Gt(r,i)),e.unwrap=()=>e.element});function Fr(e,t){return bl(Rd,e,t)}function Xg(e){let t=e._zod.def.shape;return Jo(Object.keys(t))}var Or=m("ZodObject",(e,t)=>{hc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ql(e,r,i,n),$.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Jo(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Jt()}),e.loose=()=>e.clone({...e._zod.def,catchall:Jt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wo()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>$.extend(e,r),e.safeExtend=r=>$.safeExtend(e,r),e.merge=r=>$.merge(e,r),e.pick=r=>$.pick(e,r),e.omit=r=>$.omit(e,r),e.partial=(...r)=>$.partial(Ho,e,r[0]),e.required=(...r)=>$.required(Yo,e,r[0])});function Qg(e,t){let r={type:"object",shape:e??{},...$.normalizeParams(t)};return new Or(r)}function ev(e,t){return new Or({type:"object",shape:e,catchall:Wo(),...$.normalizeParams(t)})}function tv(e,t){return new Or({type:"object",shape:e,catchall:Jt(),...$.normalizeParams(t)})}var Pr=m("ZodUnion",(e,t)=>{vr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vo(e,r,i,n),e.options=t.options});function Go(e,t){return new Pr({type:"union",options:e,...$.normalizeParams(t)})}var Bd=m("ZodXor",(e,t)=>{Pr.init(e,t),gc.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vo(e,r,i,n),e.options=t.options});function nv(e,t){return new Bd({type:"union",options:e,inclusive:!1,...$.normalizeParams(t)})}var Ld=m("ZodDiscriminatedUnion",(e,t)=>{Pr.init(e,t),vc.init(e,t)});function rv(e,t,r){return new Ld({type:"union",options:t,discriminator:e,...$.normalizeParams(r)})}var Zd=m("ZodIntersection",(e,t)=>{yc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ed(e,r,i,n)});function Md(e,t){return new Zd({type:"intersection",left:e,right:t})}var qd=m("ZodTuple",(e,t)=>{Ui.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>td(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Vd(e,t,r){let i=t instanceof A,n=i?r:t,o=i?t:null;return new qd({type:"tuple",items:e,rest:o,...$.normalizeParams(n)})}var Ar=m("ZodRecord",(e,t)=>{Dc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>nd(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function Wd(e,t,r){return new Ar({type:"record",keyType:e,valueType:t,...$.normalizeParams(r)})}function iv(e,t,r){let i=be(e);return i._zod.values=void 0,new Ar({type:"record",keyType:i,valueType:t,...$.normalizeParams(r)})}function ov(e,t,r){return new Ar({type:"record",keyType:e,valueType:t,mode:"loose",...$.normalizeParams(r)})}var Gd=m("ZodMap",(e,t)=>{bc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hl(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(st(...r)),e.nonempty=r=>e.check(st(1,r)),e.max=(...r)=>e.check(Ft(...r)),e.size=(...r)=>e.check(Vt(...r))});function sv(e,t,r){return new Gd({type:"map",keyType:e,valueType:t,...$.normalizeParams(r)})}var Jd=m("ZodSet",(e,t)=>{$c.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yl(e,r,i,n),e.min=(...r)=>e.check(st(...r)),e.nonempty=r=>e.check(st(1,r)),e.max=(...r)=>e.check(Ft(...r)),e.size=(...r)=>e.check(Vt(...r))});function av(e,t){return new Jd({type:"set",valueType:e,...$.normalizeParams(t)})}var Pn=m("ZodEnum",(e,t)=>{_c.init(e,t),j.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Ll(e,i,n,o),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let s of i)if(r.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Pn({...t,checks:[],...$.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let s of i)if(r.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new Pn({...t,checks:[],...$.normalizeParams(n),entries:o})}});function Jo(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Pn({type:"enum",entries:r,...$.normalizeParams(t)})}function uv(e,t){return new Pn({type:"enum",entries:e,...$.normalizeParams(t)})}var Kd=m("ZodLiteral",(e,t)=>{wc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zl(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function cv(e,t){return new Kd({type:"literal",values:Array.isArray(e)?e:[e],...$.normalizeParams(t)})}var Hd=m("ZodFile",(e,t)=>{xc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vl(e,r,i,n),e.min=(r,i)=>e.check(st(r,i)),e.max=(r,i)=>e.check(Ft(r,i)),e.mime=(r,i)=>e.check(wn(Array.isArray(r)?r:[r],i))});function lv(e){return $l(Hd,e)}var Yd=m("ZodTransform",(e,t)=>{kc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kl(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new xt(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push($.issue(o,r.value,t));else{let s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push($.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function Ko(e){return new Yd({type:"transform",transform:e})}var Ho=m("ZodOptional",(e,t)=>{Ni.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function kr(e){return new Ho({type:"optional",innerType:e})}var Xd=m("ZodExactOptional",(e,t)=>{Sc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yo(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Qd(e){return new Xd({type:"optional",innerType:e})}var ep=m("ZodNullable",(e,t)=>{Cc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>rd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Sr(e){return new ep({type:"nullable",innerType:e})}function dv(e){return kr(Sr(e))}var tp=m("ZodDefault",(e,t)=>{Ic.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>od(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function np(e,t){return new tp({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}var rp=m("ZodPrefault",(e,t)=>{Ec.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>sd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ip(e,t){return new rp({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():$.shallowClone(t)}})}var Yo=m("ZodNonOptional",(e,t)=>{Fc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>id(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function op(e,t){return new Yo({type:"nonoptional",innerType:e,...$.normalizeParams(t)})}var sp=m("ZodSuccess",(e,t)=>{Oc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wl(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function pv(e){return new sp({type:"success",innerType:e})}var ap=m("ZodCatch",(e,t)=>{Pc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ad(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function up(e,t){return new ap({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var cp=m("ZodNaN",(e,t)=>{Ac.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ml(e,r,i,n)});function fv(e){return Dl(cp,e)}var Xo=m("ZodPipe",(e,t)=>{zc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ud(e,r,i,n),e.in=t.in,e.out=t.out});function Cr(e,t){return new Xo({type:"pipe",in:e,out:t})}var Qo=m("ZodCodec",(e,t)=>{Xo.init(e,t),yr.init(e,t)});function mv(e,t,r){return new Qo({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var lp=m("ZodReadonly",(e,t)=>{Tc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>cd(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function dp(e){return new lp({type:"readonly",innerType:e})}var pp=m("ZodTemplateLiteral",(e,t)=>{jc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ql(e,r,i,n)});function hv(e,t){return new pp({type:"template_literal",parts:e,...$.normalizeParams(t)})}var fp=m("ZodLazy",(e,t)=>{Rc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>dd(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function mp(e){return new fp({type:"lazy",getter:e})}var hp=m("ZodPromise",(e,t)=>{Nc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ld(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function gv(e){return new hp({type:"promise",innerType:e})}var gp=m("ZodFunction",(e,t)=>{Uc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jl(e,r,i,n)});function vv(e){return new gp({type:"function",input:Array.isArray(e?.input)?Vd(e?.input):e?.input??Fr(Jt()),output:e?.output??Jt()})}var zr=m("ZodCustom",(e,t)=>{Bc.init(e,t),j.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gl(e,r,i,n)});function yv(e){let t=new ee({check:"custom"});return t._zod.check=e,t}function Dv(e,t){return _l(zr,e??(()=>!0),t)}function vp(e,t={}){return wl(zr,e,t)}function yp(e){return xl(e)}var bv=kl,$v=Sl;function _v(e,t={}){let r=new zr({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...$.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var wv=(...e)=>Cl({Codec:Qo,Boolean:jn,String:An},...e);function xv(e){let t=mp(()=>Go([So(e),Ed(),Fd(),zd(),Fr(t),Wd(So(),t)]));return t}function kv(e,t){return Cr(Ko(e),t)}var J_={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function K_(e){ae({customError:e})}function H_(){return ae().customError}var Dp;Dp||(Dp={});var k={...wr,...$o,iso:On},Y_=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function X_(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Q_(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function Sv(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return k.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return k.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=Q_(n,t),s=ye(o,t);return t.refs.set(n,s),t.processing.delete(n),s}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return k.null();if(n.length===0)return k.never();if(n.length===1)return k.literal(n[0]);if(n.every(s=>typeof s=="string"))return k.enum(n);let o=n.map(s=>k.literal(s));return o.length<2?o[0]:k.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return k.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let s={...e,type:o};return Sv(s,t)});return n.length===0?k.never():n.length===1?n[0]:k.union(n)}if(!r)return k.any();let i;switch(r){case"string":{let n=k.string();if(e.format){let o=e.format;o==="email"?n=n.check(k.email()):o==="uri"||o==="uri-reference"?n=n.check(k.url()):o==="uuid"||o==="guid"?n=n.check(k.uuid()):o==="date-time"?n=n.check(k.iso.datetime()):o==="date"?n=n.check(k.iso.date()):o==="time"?n=n.check(k.iso.time()):o==="duration"?n=n.check(k.iso.duration()):o==="ipv4"?n=n.check(k.ipv4()):o==="ipv6"?n=n.check(k.ipv6()):o==="mac"?n=n.check(k.mac()):o==="cidr"?n=n.check(k.cidrv4()):o==="cidr-v6"?n=n.check(k.cidrv6()):o==="base64"?n=n.check(k.base64()):o==="base64url"?n=n.check(k.base64url()):o==="e164"?n=n.check(k.e164()):o==="jwt"?n=n.check(k.jwt()):o==="emoji"?n=n.check(k.emoji()):o==="nanoid"?n=n.check(k.nanoid()):o==="cuid"?n=n.check(k.cuid()):o==="cuid2"?n=n.check(k.cuid2()):o==="ulid"?n=n.check(k.ulid()):o==="xid"?n=n.check(k.xid()):o==="ksuid"&&(n=n.check(k.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?k.number().int():k.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=k.boolean();break}case"null":{i=k.null();break}case"object":{let n={},o=e.properties||{},s=new Set(e.required||[]);for(let[u,c]of Object.entries(o)){let l=ye(c,t);n[u]=s.has(u)?l:l.optional()}if(e.propertyNames){let u=ye(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?ye(e.additionalProperties,t):k.any();if(Object.keys(n).length===0){i=k.record(u,c);break}let l=k.object(n).passthrough(),d=k.looseRecord(u,c);i=k.intersection(l,d);break}if(e.patternProperties){let u=e.patternProperties,c=Object.keys(u),l=[];for(let p of c){let f=ye(u[p],t),y=k.string().regex(new RegExp(p));l.push(k.looseRecord(y,f))}let d=[];if(Object.keys(n).length>0&&d.push(k.object(n).passthrough()),d.push(...l),d.length===0)i=k.object({}).passthrough();else if(d.length===1)i=d[0];else{let p=k.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)p=k.intersection(p,d[f]);i=p}break}let a=k.object(n);e.additionalProperties===!1?i=a.strict():typeof e.additionalProperties=="object"?i=a.catchall(ye(e.additionalProperties,t)):i=a.passthrough();break}case"array":{let n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>ye(u,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?ye(o,t):void 0;a?i=k.tuple(s).rest(a):i=k.tuple(s),typeof e.minItems=="number"&&(i=i.check(k.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(k.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(u=>ye(u,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?ye(e.additionalItems,t):void 0;a?i=k.tuple(s).rest(a):i=k.tuple(s),typeof e.minItems=="number"&&(i=i.check(k.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(k.maxLength(e.maxItems)))}else if(o!==void 0){let s=ye(o,t),a=k.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),i=a}else i=k.array(k.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function ye(e,t){if(typeof e=="boolean")return e?k.any():k.never();let r=Sv(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(c=>ye(c,t)),u=k.union(a);r=i?k.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(c=>ye(c,t)),u=k.xor(a);r=i?k.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:k.any();else{let a=i?r:ye(e.allOf[0],t),u=i?0:1;for(let c=u;c<e.allOf.length;c++)a=k.intersection(a,ye(e.allOf[c],t));r=a}e.nullable===!0&&t.version==="openapi-3.0"&&(r=k.nullable(r)),e.readOnly===!0&&(r=k.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(n[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(n[a]=e[a]);for(let a of Object.keys(e))Y_.has(a)||(n[a]=e[a]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function Cv(e,t){if(typeof e=="boolean")return e?k.any():k.never();let r=X_(e,t?.defaultTarget),i=e.$defs||e.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??ge};return ye(e,n)}var bp={};rt(bp,{bigint:()=>rw,boolean:()=>nw,date:()=>iw,number:()=>tw,string:()=>ew});function ew(e){return qc(An,e)}function tw(e){return Xc(Tn,e)}function nw(e){return ol(jn,e)}function rw(e){return al(Un,e)}function iw(e){return yl(Er,e)}ae(Ri());var ow=".zenku",sw="config.json",aw=448,uw=384,cw=x.enum(["latest","stable"]),lw=x.object({enabled:x.boolean().optional().default(!0),channel:cw.optional().default("latest"),checkIntervalMinutes:x.number().int().positive().optional().default(30),notifyInNonInteractive:x.boolean().optional().default(!0),autoApplyStandalone:x.boolean().optional().default(!0)}),dw=x.object({enabled:x.boolean().optional(),checkIntervalMinutes:x.number().int().positive().optional(),notifyInNonInteractive:x.boolean().optional(),autoApplyStandalone:x.boolean().optional()}),pw=x.object({collection:x.string(),services:x.record(x.string(),x.string()).optional().default({}),token:x.string().optional().default(""),userId:x.string().optional().default(""),email:x.string().optional().default(""),tenantId:x.string().optional().default(""),accountId:x.string().optional().default(""),kanbanProject:x.string().optional().default(""),updates:dw.optional()}),Iv=x.object({defaultProfile:x.string().optional().default(""),profiles:x.record(x.string(),pw).optional().default({}),updates:lw.optional().default({enabled:!0,channel:"latest",checkIntervalMinutes:30,notifyInNonInteractive:!0,autoApplyStandalone:!0})}),fw={collection:"users",services:{"auth-pb":"https://pb-agent-api.zenku.app","kanban-pb":"https://pb-kanban.zenku.app",kanban:"https://kanban-api.zenku.app","kanban-web":"https://kanban.zenku.app","library-pb":"https://pb-library.zenku.app",library:"https://library-api.zenku.app","workspace-web":"https://workspace.zenku.app",agent:"https://agent-api.zenku.app","agent-web":"https://agent.zenku.app",jobs:"https://jobs-api.zenku.app","kit-key":"https://kit-key.zenku.app"},token:"",userId:"",email:"",tenantId:"",accountId:"",kanbanProject:""};function He(e){if(e.services["auth-pb"])return e.services["auth-pb"];let t=Object.keys(e.services).find(r=>r.endsWith("-pb"));if(t)return e.services[t];throw new Error('no auth PB URL configured (add "auth-pb" to services, or run `zenku profile create`)')}function Tr(){let e=process.env.ZENKU_CONFIG_PATH;return e||(0,es.join)((0,Ev.homedir)(),ow,sw)}function ts(){return(0,es.dirname)(Tr())}function we(){let e=Tr();if(!(0,ht.existsSync)(e))return Iv.parse({});let t=(0,ht.readFileSync)(e,"utf-8"),r=JSON.parse(t);return Iv.parse(r)}function Ht(e){let t=ts();(0,ht.existsSync)(t)||(0,ht.mkdirSync)(t,{recursive:!0,mode:aw});let r=JSON.stringify(e,null,2);(0,ht.writeFileSync)(Tr(),r,{mode:uw})}function J(e){if(e)return e;let t=process.env.ZENKU_PROFILE;if(t)return t;try{let r=we();if(r.defaultProfile)return r.defaultProfile}catch{}return"default"}function Y(e){let t=we(),r=t.profiles[e];if(!r){if(e==="default")return{cfg:t,profile:{...fw}};throw new Error(`profile "${e}" not found (run \`zenku profile create ${e}\`)`)}return{cfg:t,profile:r}}function pe(e,t,r){e.profiles[t]=r,Ht(e)}function $p(e){if(!e.token)throw new Error("no token in auth response");return{token:e.token,userId:e.record?.id??"",email:e.record?.email??""}}async function Ur(e,t,r){let i=await fetch(`${e}${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(i.status>=400){let n=await i.json().catch(()=>({}));throw new Error(`${i.status}: ${n.message??await i.text()}`)}return await i.json()}async function mw(e,t){let r=await fetch(`${e}${t}`);if(r.status>=400){let i=await r.json().catch(()=>({}));throw new Error(`${r.status}: ${i.message??await r.text()}`)}return r.json()}async function Ov(e,t,r,i){let n=await Ur(e,`/api/collections/${t}/auth-with-password`,{identity:r,password:i});return $p(n)}async function Pv(e,t,r){let i=await Ur(e,`/api/collections/${t}/request-otp`,{email:r});if(!i.otpId)throw new Error("no otpId in response");return i.otpId}async function Av(e,t,r,i){let n=await Ur(e,`/api/collections/${t}/auth-with-otp`,{otpId:r,password:i});return $p(n)}async function _p(e,t){let r=await mw(e,`/api/collections/${t}/auth-methods`);return{password:r.password?.enabled??!1,otp:r.otp?.enabled??!1,oauth2Providers:r.oauth2?.providers??[]}}async function zv(e,t,r){let n=(0,jr.randomBytes)(32).toString("base64url").replace(/=+$/,""),s=(0,jr.createHash)("sha256").update(n).digest().toString("base64url").replace(/=+$/,""),u=(0,jr.randomBytes)(16).toString("base64url").replace(/=+$/,""),{port:c,server:l,waitForCode:d}=await hw(u),p=`http://127.0.0.1:${c}/callback`,f=new URL(r.authUrl);f.searchParams.set("client_id",r.clientId),f.searchParams.set("redirect_uri",p),f.searchParams.set("response_type","code"),f.searchParams.set("state",u),f.searchParams.set("code_challenge",s),f.searchParams.set("code_challenge_method","S256"),r.scope&&f.searchParams.set("scope",r.scope),process.stdout.write(`Opening browser for ${r.displayName} login...
67
- `);let y=await import("node:child_process"),w=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";y.exec(`${w} "${f.toString()}"`),process.stdout.write(`Waiting for callback...
68
- `);try{let F=await d,R=await Ur(e,`/api/collections/${t}/auth-with-oauth2`,{provider:r.name,code:F,codeVerifier:n,redirectURL:p});return $p(R)}finally{l.close()}}function hw(e){return new Promise(t=>{let r,i,n=new Promise((s,a)=>{r=s,i=a}),o=(0,Fv.createServer)((s,a)=>{let u=new URL(s.url??"/",`http://${s.headers.host}`);if(u.pathname!=="/callback"){a.writeHead(404),a.end("Not found");return}if(u.searchParams.get("state")!==e){a.writeHead(400),a.end("State mismatch"),i(new Error("state mismatch"));return}let l=u.searchParams.get("error");if(l){let p=u.searchParams.get("error_description")??"";a.writeHead(200,{"Content-Type":"text/html"}),a.end(`<html><body><h1>Authentication failed</h1><p>${p}</p><p>You can close this window.</p></body></html>`),i(new Error(`${l}: ${p}`));return}let d=u.searchParams.get("code");if(!d){a.writeHead(400),a.end("No code"),i(new Error("no code in callback"));return}a.writeHead(200,{"Content-Type":"text/html"}),a.end("<html><body><h1>Authentication successful</h1><p>You can close this window.</p></body></html>"),r(d)});o.listen(0,"127.0.0.1",()=>{let s=o.address(),a=typeof s=="object"&&s?s.port:0;t({port:a,server:o,waitForCode:n})})})}function Tv(e){let t=e.split(".");if(t.length!==3)throw new Error(`malformed JWT: expected 3 parts, got ${t.length}`);let r=t[1],i=Buffer.from(r,"base64url").toString("utf-8");return JSON.parse(i)}function jv(e){let t=Tv(e);if(!t.exp)throw new Error("token has no exp claim");return new Date(t.exp*1e3)}var gw=1440*60*1e3;async function ns(e,t,r){if(!r.token)throw new Error("not logged in (run `zenku login`)");let i=Tv(r.token),n=i.exp*1e3,o=Date.now();if(o>n)throw new Error("session expired (run `zenku login`)");if(i.refreshable&&n-o<gw)try{let s=await Ur(He(r),`/api/collections/${r.collection}/auth-refresh`,{});if(s.token)return r.token=s.token,pe(e,t,r),s.token}catch{}return r.token}function wp(e){let t=Math.floor(e/1e3),r=Math.floor(t/60),i=Math.floor(r/60),n=Math.floor(i/24);return t<60?`${t}s`:r<60?`${r}m`:i<24?`${i}h ${r%60}m`:`${n}d ${i%24}h`}var xp=null;function kp(e){xp=e}function vw(){return xp||(process.stdout.isTTY?"interactive":"non-interactive")}function le(){return vw()==="interactive"}var je=de(Cp(),1),ds=require("node:process");var Pp=de(require("node:readline"),1),Jv=require("node:stream"),Nr=de(Ep(),1);function ww({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var xw=ww();function Kv(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(xw,"")}function Hv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yv={exports:{}};(function(e){var t={};e.exports=t,t.eastAsianWidth=function(i){var n=i.charCodeAt(0),o=i.length==2?i.charCodeAt(1):0,s=n;return 55296<=n&&n<=56319&&56320<=o&&o<=57343&&(n&=1023,o&=1023,s=n<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},t.characterLength=function(i){var n=this.eastAsianWidth(i);return n=="F"||n=="W"||n=="A"?2:1};function r(i){return i.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}t.length=function(i){for(var n=r(i),o=0,s=0;s<n.length;s++)o=o+this.characterLength(n[s]);return o},t.slice=function(i,n,o){textLen=t.length(i),n=n||0,o=o||1,n<0&&(n=textLen+n),o<0&&(o=textLen+o);for(var s="",a=0,u=r(i),c=0;c<u.length;c++){var l=u[c],d=t.length(l);if(a>=n-(d==2?1:0))if(a+d<=o)s+=l;else break;a+=d}return s}})(Yv);var kw=Yv.exports,Sw=Hv(kw),Cw=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},Iw=Hv(Cw);function Rr(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Kv(e),e.length===0))return 0;e=e.replace(Iw()," ");let r=t.ambiguousIsNarrow?1:2,i=0;for(let n of e){let o=n.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(Sw.eastAsianWidth(n)){case"F":case"W":i+=2;break;case"A":i+=r;break;default:i+=1}}return i}var Fp=10,Bv=(e=0)=>t=>`\x1B[${t+e}m`,Lv=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Zv=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,re={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(re.modifier);var Ew=Object.keys(re.color),Fw=Object.keys(re.bgColor);[...Ew,...Fw];function Ow(){let e=new Map;for(let[t,r]of Object.entries(re)){for(let[i,n]of Object.entries(r))re[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=re[i],e.set(n[0],n[1]);Object.defineProperty(re,t,{value:r,enumerable:!1})}return Object.defineProperty(re,"codes",{value:e,enumerable:!1}),re.color.close="\x1B[39m",re.bgColor.close="\x1B[49m",re.color.ansi=Bv(),re.color.ansi256=Lv(),re.color.ansi16m=Zv(),re.bgColor.ansi=Bv(Fp),re.bgColor.ansi256=Lv(Fp),re.bgColor.ansi16m=Zv(Fp),Object.defineProperties(re,{rgbToAnsi256:{value:(t,r,i)=>t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>re.rgbToAnsi256(...re.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,i=Math.floor(a/6)/5,n=a%6/5}let o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>re.ansi256ToAnsi(re.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>re.ansi256ToAnsi(re.hexToAnsi256(t)),enumerable:!1}}),re}var Pw=Ow(),ps=new Set(["\x1B","\x9B"]),Aw=39,zp="\x07",Xv="[",zw="]",Qv="m",Tp=`${zw}8;;`,Mv=e=>`${ps.values().next().value}${Xv}${e}${Qv}`,qv=e=>`${ps.values().next().value}${Tp}${e}${zp}`,Tw=e=>e.split(" ").map(t=>Rr(t)),Op=(e,t,r)=>{let i=[...t],n=!1,o=!1,s=Rr(Kv(e[e.length-1]));for(let[a,u]of i.entries()){let c=Rr(u);if(s+c<=r?e[e.length-1]+=u:(e.push(u),s=0),ps.has(u)&&(n=!0,o=i.slice(a+1).join("").startsWith(Tp)),n){o?u===zp&&(n=!1,o=!1):u===Qv&&(n=!1);continue}s+=c,s===r&&a<i.length-1&&(e.push(""),s=0)}!s&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},jw=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Rr(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Uw=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let i="",n,o,s=Tw(e),a=[""];for(let[c,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=Rr(a[a.length-1]);if(c!==0&&(d>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),d=0),(d>0||r.trim===!1)&&(a[a.length-1]+=" ",d++)),r.hard&&s[c]>t){let p=t-d,f=1+Math.floor((s[c]-p-1)/t);Math.floor((s[c]-1)/t)<f&&a.push(""),Op(a,l,t);continue}if(d+s[c]>t&&d>0&&s[c]>0){if(r.wordWrap===!1&&d<t){Op(a,l,t);continue}a.push("")}if(d+s[c]>t&&r.wordWrap===!1){Op(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>jw(c)));let u=[...a.join(`
69
- `)];for(let[c,l]of u.entries()){if(i+=l,ps.has(l)){let{groups:p}=new RegExp(`(?:\\${Xv}(?<code>\\d+)m|\\${Tp}(?<uri>.*)${zp})`).exec(u.slice(c).join(""))||{groups:{}};if(p.code!==void 0){let f=Number.parseFloat(p.code);n=f===Aw?void 0:f}else p.uri!==void 0&&(o=p.uri.length===0?void 0:p.uri)}let d=Pw.codes.get(Number(n));u[c+1]===`
70
- `?(o&&(i+=qv("")),n&&d&&(i+=Mv(d))):l===`
71
- `&&(n&&d&&(i+=Mv(n)),o&&(i+=qv(o)))}return i};function Vv(e,t,r){return String(e).normalize().replace(/\r\n/g,`
72
- `).split(`
73
- `).map(i=>Uw(i,t,r)).join(`
74
- `)}var Nw=["up","down","left","right","space","enter","cancel"],ss={actions:new Set(Nw),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function ey(e,t){if(typeof e=="string")return ss.aliases.get(e)===t;for(let r of e)if(r!==void 0&&ey(r,t))return!0;return!1}function Rw(e,t){if(e===t)return;let r=e.split(`
75
- `),i=t.split(`
76
- `),n=[];for(let o=0;o<Math.max(r.length,i.length);o++)r[o]!==i[o]&&n.push(o);return n}var qI=globalThis.process.platform.startsWith("win"),Ap=Symbol("clack:cancel");function Yt(e){return e===Ap}function os(e,t){let r=e;r.isTTY&&r.setRawMode(t)}var Bw=Object.defineProperty,Lw=(e,t,r)=>t in e?Bw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Te=(e,t,r)=>(Lw(e,typeof t!="symbol"?t+"":t,r),r),Nn=class{constructor(t,r=!0){Te(this,"input"),Te(this,"output"),Te(this,"_abortSignal"),Te(this,"rl"),Te(this,"opts"),Te(this,"_render"),Te(this,"_track",!1),Te(this,"_prevFrame",""),Te(this,"_subscribers",new Map),Te(this,"_cursor",0),Te(this,"state","initial"),Te(this,"error",""),Te(this,"value");let{input:i=ds.stdin,output:n=ds.stdout,render:o,signal:s,...a}=t;this.opts=a,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=r,this._abortSignal=s,this.input=i,this.output=n}unsubscribe(){this._subscribers.clear()}setSubscriber(t,r){let i=this._subscribers.get(t)??[];i.push(r),this._subscribers.set(t,i)}on(t,r){this.setSubscriber(t,{cb:r})}once(t,r){this.setSubscriber(t,{cb:r,once:!0})}emit(t,...r){let i=this._subscribers.get(t)??[],n=[];for(let o of i)o.cb(...r),o.once&&n.push(()=>i.splice(i.indexOf(o),1));for(let o of n)o()}prompt(){return new Promise((t,r)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(Ap);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}let i=new Jv.Writable;i._write=(n,o,s)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),s()},this.input.pipe(i),this.rl=Pp.default.createInterface({input:this.input,output:i,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),Pp.default.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),os(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(je.cursor.show),this.output.off("resize",this.render),os(this.input,!1),t(this.value)}),this.once("cancel",()=>{this.output.write(je.cursor.show),this.output.off("resize",this.render),os(this.input,!1),t(Ap)})})}onKeypress(t,r){if(this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&ss.aliases.has(r.name)&&this.emit("cursor",ss.aliases.get(r.name)),ss.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),t===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),t&&this.emit("key",t.toLowerCase()),r?.name==="return"){if(this.opts.validate){let i=this.opts.validate(this.value);i&&(this.error=i instanceof Error?i.message:i,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}ey([t,r?.name,r?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
77
- `),os(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let t=Vv(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
78
- `).length-1;this.output.write(je.cursor.move(-999,t*-1))}render(){let t=Vv(this._render(this)??"",process.stdout.columns,{hard:!0});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(je.cursor.hide);else{let r=Rw(this._prevFrame,t);if(this.restoreCursor(),r&&r?.length===1){let i=r[0];this.output.write(je.cursor.move(0,i)),this.output.write(je.erase.lines(1));let n=t.split(`
79
- `);this.output.write(n[i]),this._prevFrame=t,this.output.write(je.cursor.move(0,n.length-i-1));return}if(r&&r?.length>1){let i=r[0];this.output.write(je.cursor.move(0,i)),this.output.write(je.erase.down());let n=t.split(`
80
- `).slice(i);this.output.write(n.join(`
81
- `)),this._prevFrame=t;return}this.output.write(je.erase.down())}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t}}},as=class extends Nn{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(je.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var Zw;Zw=new WeakMap;var Mw=Object.defineProperty,qw=(e,t,r)=>t in e?Mw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wv=(e,t,r)=>(qw(e,typeof t!="symbol"?t+"":t,r),r),us=class extends Nn{constructor({mask:t,...r}){super(r),Wv(this,"valueWithCursor",""),Wv(this,"_mask","\u2022"),this._mask=t??"\u2022",this.on("finalize",()=>{this.valueWithCursor=this.masked}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.masked}${Nr.default.inverse(Nr.default.hidden("_"))}`;else{let i=this.masked.slice(0,this.cursor),n=this.masked.slice(this.cursor);this.valueWithCursor=`${i}${Nr.default.inverse(n[0])}${n.slice(1)}`}})}get cursor(){return this._cursor}get masked(){return this.value.replaceAll(/./g,this._mask)}},Vw=Object.defineProperty,Ww=(e,t,r)=>t in e?Vw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gv=(e,t,r)=>(Ww(e,typeof t!="symbol"?t+"":t,r),r),cs=class extends Nn{constructor(t){super(t,!1),Gv(this,"options"),Gv(this,"cursor",0),this.options=t.options,this.cursor=this.options.findIndex(({value:r})=>r===t.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",r=>{switch(r){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};var ls=class extends Nn{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;let t=this.value.slice(0,this.cursor),[r,...i]=this.value.slice(this.cursor);return`${t}${Nr.default.inverse(r)}${i.join("")}`}get cursor(){return this._cursor}constructor(t){super(t),this.on("finalize",()=>{this.value||(this.value=t.defaultValue)})}};var Ve=de(require("node:process"),1),I=de(Ep(),1),ty=de(Cp(),1);function Gw(){return Ve.default.platform!=="win32"?Ve.default.env.TERM!=="linux":!!Ve.default.env.CI||!!Ve.default.env.WT_SESSION||!!Ve.default.env.TERMINUS_SUBLIME||Ve.default.env.ConEmuTask==="{cmd::Cmder}"||Ve.default.env.TERM_PROGRAM==="Terminus-Sublime"||Ve.default.env.TERM_PROGRAM==="vscode"||Ve.default.env.TERM==="xterm-256color"||Ve.default.env.TERM==="alacritty"||Ve.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Jw=Gw(),ce=(e,t)=>Jw?e:t,Kw=ce("\u25C6","*"),Hw=ce("\u25A0","x"),Yw=ce("\u25B2","x"),Xw=ce("\u25C7","o"),XI=ce("\u250C","T"),ie=ce("\u2502","|"),Rn=ce("\u2514","\u2014"),jp=ce("\u25CF",">"),Up=ce("\u25CB"," "),QI=ce("\u25FB","[\u2022]"),eE=ce("\u25FC","[+]"),tE=ce("\u25FB","[ ]"),Qw=ce("\u25AA","\u2022"),nE=ce("\u2500","-"),rE=ce("\u256E","+"),iE=ce("\u251C","+"),oE=ce("\u256F","+"),sE=ce("\u25CF","\u2022"),aE=ce("\u25C6","*"),uE=ce("\u25B2","!"),cE=ce("\u25A0","x"),fs=e=>{switch(e){case"initial":case"active":return I.default.cyan(Kw);case"cancel":return I.default.red(Hw);case"error":return I.default.yellow(Yw);case"submit":return I.default.green(Xw)}},ex=e=>{let{cursor:t,options:r,style:i}=e,n=e.maxItems??Number.POSITIVE_INFINITY,o=Math.max(process.stdout.rows-4,0),s=Math.min(o,Math.max(n,5)),a=0;t>=a+s-3?a=Math.max(Math.min(t-s+3,r.length-s),0):t<a+2&&(a=Math.max(t-2,0));let u=s<r.length&&a>0,c=s<r.length&&a+s<r.length;return r.slice(a,a+s).map((l,d,p)=>{let f=d===0&&u,y=d===p.length-1&&c;return f||y?I.default.dim("..."):i(l,d+a===t)})},ny=e=>new ls({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){let t=`${I.default.gray(ie)}
82
- ${fs(this.state)} ${e.message}
83
- `,r=e.placeholder?I.default.inverse(e.placeholder[0])+I.default.dim(e.placeholder.slice(1)):I.default.inverse(I.default.hidden("_")),i=this.value?this.valueWithCursor:r;switch(this.state){case"error":return`${t.trim()}
84
- ${I.default.yellow(ie)} ${i}
85
- ${I.default.yellow(Rn)} ${I.default.yellow(this.error)}
86
- `;case"submit":return`${t}${I.default.gray(ie)} ${I.default.dim(this.value||e.placeholder)}`;case"cancel":return`${t}${I.default.gray(ie)} ${I.default.strikethrough(I.default.dim(this.value??""))}${this.value?.trim()?`
87
- ${I.default.gray(ie)}`:""}`;default:return`${t}${I.default.cyan(ie)} ${i}
88
- ${I.default.cyan(Rn)}
89
- `}}}).prompt(),ry=e=>new us({validate:e.validate,mask:e.mask??Qw,render(){let t=`${I.default.gray(ie)}
90
- ${fs(this.state)} ${e.message}
91
- `,r=this.valueWithCursor,i=this.masked;switch(this.state){case"error":return`${t.trim()}
92
- ${I.default.yellow(ie)} ${i}
93
- ${I.default.yellow(Rn)} ${I.default.yellow(this.error)}
94
- `;case"submit":return`${t}${I.default.gray(ie)} ${I.default.dim(i)}`;case"cancel":return`${t}${I.default.gray(ie)} ${I.default.strikethrough(I.default.dim(i??""))}${i?`
95
- ${I.default.gray(ie)}`:""}`;default:return`${t}${I.default.cyan(ie)} ${r}
96
- ${I.default.cyan(Rn)}
97
- `}}}).prompt(),iy=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new as({active:t,inactive:r,initialValue:e.initialValue??!0,render(){let i=`${I.default.gray(ie)}
98
- ${fs(this.state)} ${e.message}
99
- `,n=this.value?t:r;switch(this.state){case"submit":return`${i}${I.default.gray(ie)} ${I.default.dim(n)}`;case"cancel":return`${i}${I.default.gray(ie)} ${I.default.strikethrough(I.default.dim(n))}
100
- ${I.default.gray(ie)}`;default:return`${i}${I.default.cyan(ie)} ${this.value?`${I.default.green(jp)} ${t}`:`${I.default.dim(Up)} ${I.default.dim(t)}`} ${I.default.dim("/")} ${this.value?`${I.default.dim(Up)} ${I.default.dim(r)}`:`${I.default.green(jp)} ${r}`}
101
- ${I.default.cyan(Rn)}
102
- `}}}).prompt()},oy=e=>{let t=(r,i)=>{let n=r.label??String(r.value);switch(i){case"selected":return`${I.default.dim(n)}`;case"active":return`${I.default.green(jp)} ${n} ${r.hint?I.default.dim(`(${r.hint})`):""}`;case"cancelled":return`${I.default.strikethrough(I.default.dim(n))}`;default:return`${I.default.dim(Up)} ${I.default.dim(n)}`}};return new cs({options:e.options,initialValue:e.initialValue,render(){let r=`${I.default.gray(ie)}
103
- ${fs(this.state)} ${e.message}
104
- `;switch(this.state){case"submit":return`${r}${I.default.gray(ie)} ${t(this.options[this.cursor],"selected")}`;case"cancel":return`${r}${I.default.gray(ie)} ${t(this.options[this.cursor],"cancelled")}
105
- ${I.default.gray(ie)}`;default:return`${r}${I.default.cyan(ie)} ${ex({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(i,n)=>t(i,n?"active":"inactive")}).join(`
106
- ${I.default.cyan(ie)} `)}
107
- ${I.default.cyan(Rn)}
108
- `}}}).prompt()};var lE=`${I.default.gray(ie)} `;var Mn=de(require("node:process"),1),Oy=require("node:util");var sy=(e=0)=>t=>`\x1B[${t+e}m`,ay=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,uy=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,oe={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},pE=Object.keys(oe.modifier),nx=Object.keys(oe.color),rx=Object.keys(oe.bgColor),fE=[...nx,...rx];function ix(){let e=new Map;for(let[t,r]of Object.entries(oe)){for(let[i,n]of Object.entries(r))oe[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=oe[i],e.set(n[0],n[1]);Object.defineProperty(oe,t,{value:r,enumerable:!1})}return Object.defineProperty(oe,"codes",{value:e,enumerable:!1}),oe.color.close="\x1B[39m",oe.bgColor.close="\x1B[49m",oe.color.ansi=sy(),oe.color.ansi256=ay(),oe.color.ansi16m=uy(),oe.bgColor.ansi=sy(10),oe.bgColor.ansi256=ay(10),oe.bgColor.ansi16m=uy(10),Object.defineProperties(oe,{rgbToAnsi256:{value(t,r,i){return t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));let n=Number.parseInt(i,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>oe.rgbToAnsi256(...oe.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,i=Math.floor(a/6)/5,n=a%6/5}let o=Math.max(r,i,n)*2;if(o===0)return 30;let s=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,i)=>oe.ansi256ToAnsi(oe.rgbToAnsi256(t,r,i)),enumerable:!1},hexToAnsi:{value:t=>oe.ansi256ToAnsi(oe.hexToAnsi256(t)),enumerable:!1}}),oe}var ox=ix(),Ye=ox;var hs=de(require("node:process"),1),ly=de(require("node:os"),1),Np=de(require("node:tty"),1);function We(e,t=globalThis.Deno?globalThis.Deno.args:hs.default.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(r+e),n=t.indexOf("--");return i!==-1&&(n===-1||i<n)}var{env:se}=hs.default,ms;We("no-color")||We("no-colors")||We("color=false")||We("color=never")?ms=0:(We("color")||We("colors")||We("color=true")||We("color=always"))&&(ms=1);function sx(){if("FORCE_COLOR"in se)return se.FORCE_COLOR==="true"?1:se.FORCE_COLOR==="false"?0:se.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(se.FORCE_COLOR,10),3)}function ax(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function ux(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let i=sx();i!==void 0&&(ms=i);let n=r?ms:i;if(n===0)return 0;if(r){if(We("color=16m")||We("color=full")||We("color=truecolor"))return 3;if(We("color=256"))return 2}if("TF_BUILD"in se&&"AGENT_NAME"in se)return 1;if(e&&!t&&n===void 0)return 0;let o=n||0;if(se.TERM==="dumb")return o;if(hs.default.platform==="win32"){let s=ly.default.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in se)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in se)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in se)||se.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in se)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(se.TEAMCITY_VERSION)?1:0;if(se.COLORTERM==="truecolor"||se.TERM==="xterm-kitty"||se.TERM==="xterm-ghostty"||se.TERM==="wezterm")return 3;if("TERM_PROGRAM"in se){let s=Number.parseInt((se.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(se.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(se.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(se.TERM)||"COLORTERM"in se?1:o}function cy(e,t={}){let r=ux(e,{streamIsTTY:e&&e.isTTY,...t});return ax(r)}var cx={stdout:cy({isTTY:Np.default.isatty(1)}),stderr:cy({isTTY:Np.default.isatty(2)})},dy=cx;function py(e,t,r){let i=e.indexOf(t);if(i===-1)return e;let n=t.length,o=0,s="";do s+=e.slice(o,i)+t+r,o=i+n,i=e.indexOf(t,o);while(i!==-1);return s+=e.slice(o),s}function fy(e,t,r,i){let n=0,o="";do{let s=e[i-1]==="\r";o+=e.slice(n,s?i-1:i)+t+(s?`\r
109
- `:`
110
- `)+r,n=i+1,i=e.indexOf(`
111
- `,n)}while(i!==-1);return o+=e.slice(n),o}var{stdout:my,stderr:hy}=dy,Rp=Symbol("GENERATOR"),Bn=Symbol("STYLER"),Br=Symbol("IS_EMPTY"),gy=["ansi","ansi","ansi256","ansi16m"],Ln=Object.create(null),lx=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=my?my.level:0;e.level=t.level===void 0?r:t.level};var dx=e=>{let t=(...r)=>r.join(" ");return lx(t,e),Object.setPrototypeOf(t,Lr.prototype),t};function Lr(e){return dx(e)}Object.setPrototypeOf(Lr.prototype,Function.prototype);for(let[e,t]of Object.entries(Ye))Ln[e]={get(){let r=gs(this,Lp(t.open,t.close,this[Bn]),this[Br]);return Object.defineProperty(this,e,{value:r}),r}};Ln.visible={get(){let e=gs(this,this[Bn],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Bp=(e,t,r,...i)=>e==="rgb"?t==="ansi16m"?Ye[r].ansi16m(...i):t==="ansi256"?Ye[r].ansi256(Ye.rgbToAnsi256(...i)):Ye[r].ansi(Ye.rgbToAnsi(...i)):e==="hex"?Bp("rgb",t,r,...Ye.hexToRgb(...i)):Ye[r][e](...i),px=["rgb","hex","ansi256"];for(let e of px){Ln[e]={get(){let{level:r}=this;return function(...i){let n=Lp(Bp(e,gy[r],"color",...i),Ye.color.close,this[Bn]);return gs(this,n,this[Br])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Ln[t]={get(){let{level:r}=this;return function(...i){let n=Lp(Bp(e,gy[r],"bgColor",...i),Ye.bgColor.close,this[Bn]);return gs(this,n,this[Br])}}}}var fx=Object.defineProperties(()=>{},{...Ln,level:{enumerable:!0,get(){return this[Rp].level},set(e){this[Rp].level=e}}}),Lp=(e,t,r)=>{let i,n;return r===void 0?(i=e,n=t):(i=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:i,closeAll:n,parent:r}},gs=(e,t,r)=>{let i=(...n)=>mx(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,fx),i[Rp]=e,i[Bn]=t,i[Br]=r,i},mx=(e,t)=>{if(e.level<=0||!t)return e[Br]?"":t;let r=e[Bn];if(r===void 0)return t;let{openAll:i,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=py(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
112
- `);return o!==-1&&(t=fy(t,n,i,o)),i+t+n};Object.defineProperties(Lr.prototype,Ln);var hx=Lr(),bE=Lr({level:hy?hy.level:0});var vy=hx;var Kp=de(require("node:process"),1);var Zr=de(require("node:process"),1);var gx=(e,t,r,i)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let n=Object.getOwnPropertyDescriptor(e,r),o=Object.getOwnPropertyDescriptor(t,r);!vx(n,o)&&i||Object.defineProperty(e,r,o)},vx=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},yx=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},Dx=(e,t)=>`/* Wrapped ${e}*/
113
- ${t}`,bx=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$x=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),_x=(e,t,r)=>{let i=r===""?"":`with ${r.trim()}() `,n=Dx.bind(null,i,t.toString());Object.defineProperty(n,"name",$x);let{writable:o,enumerable:s,configurable:a}=bx;Object.defineProperty(e,"toString",{value:n,writable:o,enumerable:s,configurable:a})};function Zp(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:i}=e;for(let n of Reflect.ownKeys(t))gx(e,t,n,r);return yx(e,t),_x(e,t,i),e}var vs=new WeakMap,yy=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,i=0,n=e.displayName||e.name||"<anonymous>",o=function(...s){if(vs.set(o,++i),i===1)r=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return r};return Zp(o,e),vs.set(o,i),o};yy.callCount=e=>{if(!vs.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return vs.get(e)};var Dy=yy;var Xt=[];Xt.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Xt.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Xt.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ys=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Mp=Symbol.for("signal-exit emitter"),qp=globalThis,wx=Object.defineProperty.bind(Object),Vp=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(qp[Mp])return qp[Mp];wx(qp,Mp,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let i=this.listeners[t],n=i.indexOf(r);n!==-1&&(n===0&&i.length===1?i.length=0:i.splice(n,1))}emit(t,r,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let n=!1;for(let o of this.listeners[t])n=o(r,i)===!0||n;return t==="exit"&&(n=this.emit("afterExit",r,i)||n),n}},Ds=class{},xx=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Wp=class extends Ds{onExit(){return()=>{}}load(){}unload(){}},Gp=class extends Ds{#o=Jp.platform==="win32"?"SIGINT":"SIGHUP";#r=new Vp;#n;#e;#i;#t={};#s=!1;constructor(t){super(),this.#n=t,this.#t={};for(let r of Xt)this.#t[r]=()=>{let i=this.#n.listeners(r),{count:n}=this.#r,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(n+=o.__signal_exit_emitter__.count),i.length===n){this.unload();let s=this.#r.emit("exit",null,r),a=r==="SIGHUP"?this.#o:r;s||t.kill(t.pid,a)}};this.#i=t.reallyExit,this.#e=t.emit}onExit(t,r){if(!ys(this.#n))return()=>{};this.#s===!1&&this.load();let i=r?.alwaysLast?"afterExit":"exit";return this.#r.on(i,t),()=>{this.#r.removeListener(i,t),this.#r.listeners.exit.length===0&&this.#r.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#s){this.#s=!0,this.#r.count+=1;for(let t of Xt)try{let r=this.#t[t];r&&this.#n.on(t,r)}catch{}this.#n.emit=(t,...r)=>this.#d(t,...r),this.#n.reallyExit=t=>this.#u(t)}}unload(){this.#s&&(this.#s=!1,Xt.forEach(t=>{let r=this.#t[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#n.removeListener(t,r)}catch{}}),this.#n.emit=this.#e,this.#n.reallyExit=this.#i,this.#r.count-=1)}#u(t){return ys(this.#n)?(this.#n.exitCode=t||0,this.#r.emit("exit",this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#d(t,...r){let i=this.#e;if(t==="exit"&&ys(this.#n)){typeof r[0]=="number"&&(this.#n.exitCode=r[0]);let n=i.call(this.#n,t,...r);return this.#r.emit("exit",this.#n.exitCode,null),n}else return i.call(this.#n,t,...r)}},Jp=globalThis.process,{onExit:by,load:CE,unload:IE}=xx(ys(Jp)?new Gp(Jp):new Wp);var $y=Zr.default.stderr.isTTY?Zr.default.stderr:Zr.default.stdout.isTTY?Zr.default.stdout:void 0,kx=$y?Dy(()=>{by(()=>{$y.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},_y=kx;var bs=!1,Zn={};Zn.show=(e=Kp.default.stderr)=>{e.isTTY&&(bs=!1,e.write("\x1B[?25h"))};Zn.hide=(e=Kp.default.stderr)=>{e.isTTY&&(_y(),bs=!0,e.write("\x1B[?25l"))};Zn.toggle=(e,t)=>{e!==void 0&&(bs=e),bs?Zn.show(t):Zn.hide(t)};var Hp=Zn;var Yp={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var Mr=Yp,UE=Object.keys(Yp);var Qt={};rt(Qt,{error:()=>Ox,info:()=>Ix,success:()=>Ex,warning:()=>Fx});var wy=de(require("node:tty"),1),Cx=wy.default?.WriteStream?.prototype?.hasColors?.()??!1,U=(e,t)=>{if(!Cx)return n=>n;let r=`\x1B[${e}m`,i=`\x1B[${t}m`;return n=>{let o=n+"",s=o.indexOf(i);if(s===-1)return r+o+i;let a=r,u=0,l=(t===22?i:"")+r;for(;s!==-1;)a+=o.slice(u,s)+l,u=s+i.length,s=o.indexOf(i,u);return a+=o.slice(u)+i,a}},RE=U(0,0),BE=U(1,22),LE=U(2,22),ZE=U(3,23),ME=U(4,24),qE=U(53,55),VE=U(7,27),WE=U(8,28),GE=U(9,29),JE=U(30,39),xy=U(31,39),ky=U(32,39),Sy=U(33,39),Cy=U(34,39),KE=U(35,39),HE=U(36,39),YE=U(37,39),XE=U(90,39),QE=U(40,49),e6=U(41,49),t6=U(42,49),n6=U(43,49),r6=U(44,49),i6=U(45,49),o6=U(46,49),s6=U(47,49),a6=U(100,49),u6=U(91,39),c6=U(92,39),l6=U(93,39),d6=U(94,39),p6=U(95,39),f6=U(96,39),m6=U(97,39),h6=U(101,49),g6=U(102,49),v6=U(103,49),y6=U(104,49),D6=U(105,49),b6=U(106,49),$6=U(107,49);var Xp=de(require("node:process"),1);function qr(){let{env:e}=Xp.default,{TERM:t,TERM_PROGRAM:r}=e;return Xp.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var $s=qr(),Ix=Cy($s?"\u2139":"i"),Ex=ky($s?"\u2714":"\u221A"),Fx=Sy($s?"\u26A0":"\u203C"),Ox=xy($s?"\u2716":"\xD7");function Qp({onlyFirst:e=!1}={}){let n="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(n,e?void 0:"g")}var Px=Qp();function ef(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Px,"")}function Iy(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Ey(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Fy(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function Ax(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function tf(e,{ambiguousAsWide:t=!1}={}){return Ax(e),Ey(e)||Fy(e)||t&&Iy(e)?2:1}var zx=new Intl.Segmenter,Tx=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),jx=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),Ux=new RegExp("^\\p{RGI_Emoji}$","v");function Nx(e){return e.replace(jx,"")}function Rx(e){return Tx.test(e)}function Bx(e,t){let r=0;if(e.length>1)for(let i of e.slice(1))i>="\uFF00"&&i<="\uFFEF"&&(r+=tf(i.codePointAt(0),t));return r}function nf(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:i=!1}=t,n=e;if(i||(n=ef(n)),n.length===0)return 0;let o=0,s={ambiguousAsWide:!r};for(let{segment:a}of zx.segment(n)){if(Rx(a))continue;if(Ux.test(a)){o+=2;continue}let u=Nx(a).codePointAt(0);o+=tf(u,s),o+=Bx(a,s)}return o}function rf({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var en=de(require("node:process"),1),Lx=3,of=class{#o=0;#r;#n=!1;#e=!1;#i=t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===Lx&&(en.default.listenerCount("SIGINT")>0?en.default.emit("SIGINT"):en.default.kill(en.default.pid,"SIGINT"))};start(){this.#o++,this.#o===1&&this.#t()}stop(){this.#o!==0&&--this.#o===0&&this.#s()}#t(){let{stdin:t}=en.default;if(en.default.platform==="win32"||!t?.isTTY||typeof t.setRawMode!="function"){this.#r=void 0;return}this.#r=t,this.#n=t.isPaused(),this.#e=!!t.isRaw,t.setRawMode(!0),t.prependListener("data",this.#i),this.#n&&t.resume()}#s(){if(!this.#r)return;let t=this.#r;t.off("data",this.#i),t.isTTY&&t.setRawMode?.(this.#e),this.#n&&t.pause(),this.#r=void 0,this.#n=!1,this.#e=!1}},Zx=new of,sf=Object.freeze(Zx);var Mx=200,qx="\x1B[?2026h",Vx="\x1B[?2026l",_s=new Map,af=class{#o=0;#r=-1;#n=0;#e;#i;#t;#s;#u=new Map;#d=!1;#c;#a;#p=!1;color;#l(t){this.#d=!0;try{return t()}finally{this.#d=!1}}#m(){this.isSpinning&&this.render()}#b(t,r){if(t==null)return"";if(typeof t=="string")return t;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){let i=typeof r=="string"&&r&&r!=="buffer"?r:"utf8";return Buffer.from(t).toString(i)}return String(t)}#$(t){if(!t)return!1;let r=t.at(-1);return r===`
114
- `||r==="\r"}#_(){this.#a||(this.#a=setTimeout(()=>{this.#a=void 0,this.isSpinning&&this.#m()},Mx),typeof this.#a?.unref=="function"&&this.#a.unref())}#h(){this.#a&&(clearTimeout(this.#a),this.#a=void 0)}#g(t,r,i,n){let o=this.#y(i," "),a=typeof r=="string"?(t?" ":"")+r:"",u=this.#D(n," ");return o+t+a+u}constructor(t){typeof t=="string"&&(t={text:t}),this.#e={color:"cyan",stream:Mn.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.#t=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=rf({stream:this.#t})),typeof this.#e.isSilent!="boolean"&&(this.#e.isSilent=!1);let r=this.#e.interval;this.spinner=this.#e.spinner,this.#e.interval=r,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.suffixText=this.#e.suffixText,this.indent=this.#e.indent,Mn.default.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#e.isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(i){this.#o=i}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){let i=this.#t.columns??80,n=typeof this.#e.prefixText=="function"?"":this.#e.prefixText,o=typeof this.#e.suffixText=="function"?"":this.#e.suffixText,s=typeof n=="string"&&n!==""?n+" ":"",a=typeof o=="string"&&o!==""?" "+o:"",c=" ".repeat(this.#e.indent)+s+"-"+(typeof this.#e.text=="string"?" "+this.#e.text:"")+a;return this.#f(c,i)}}))}get indent(){return this.#e.indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#e.indent=t}get interval(){return this.#e.interval??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#r=-1,this.#e.interval=void 0,typeof t=="object"){if(!Array.isArray(t.frames)||t.frames.length===0||t.frames.some(r=>typeof r!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(t.interval!==void 0&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");this.#i=t}else if(!qr())this.#i=Mr.line;else if(t===void 0)this.#i=Mr.dots;else if(t!=="default"&&Mr[t])this.#i=Mr[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#e.text}set text(t=""){this.#e.text=t}get prefixText(){return this.#e.prefixText}set prefixText(t=""){this.#e.prefixText=t}get suffixText(){return this.#e.suffixText}set suffixText(t=""){this.#e.suffixText=t}get isSpinning(){return this.#s!==void 0}#v(t,r,i=!1){let n=typeof t=="function"?t():t;return typeof n=="string"&&n!==""?i?r+n:n+r:""}#y(t=this.#e.prefixText,r=" "){return this.#v(t,r,!1)}#D(t=this.#e.suffixText,r=" "){return this.#v(t,r,!0)}#f(t,r){let i=0;for(let n of(0,Oy.stripVTControlCharacters)(t).split(`
115
- `))i+=Math.max(1,Math.ceil(nf(n)/r));return i}get isEnabled(){return this.#e.isEnabled&&!this.#e.isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#e.isEnabled=t}get isSilent(){return this.#e.isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#e.isSilent=t}frame(){let t=Date.now();(this.#r===-1||t-this.#n>=this.interval)&&(this.#r=(this.#r+1)%this.#i.frames.length,this.#n=t);let{frames:r}=this.#i,i=r[this.#r];this.color&&(i=vy[this.color](i));let n=this.#y(this.#e.prefixText," "),o=typeof this.text=="string"?" "+this.text:"",s=this.#D(this.#e.suffixText," ");return n+i+o+s}clear(){return!this.isEnabled||!this.#t.isTTY?this:(this.#l(()=>{this.#t.cursorTo(0);for(let t=0;t<this.#o;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);this.#e.indent&&this.#t.cursorTo(this.#e.indent)}),this.#o=0,this)}#w(t){if(!t||this.#u.has(t)||!t.isTTY||typeof t.write!="function")return;_s.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let r=t.write;this.#u.set(t,r),_s.set(t,this),t.write=(i,n,o)=>this.#S(t,r,i,n,o)}#x(){if(!this.isEnabled||this.#u.size>0)return;let t=new Set([this.#t,Mn.default.stdout,Mn.default.stderr]);for(let r of t)this.#w(r)}#k(){for(let[t,r]of this.#u)t.write=r,_s.get(t)===this&&_s.delete(t);this.#u.clear()}#S(t,r,i,n,o){if(typeof n=="function"&&(o=n,n=void 0),this.#d)return r.call(t,i,n,o);this.clear();let s=this.#b(i,n),a=this.#$(s),u=r.call(t,i,n,o);return a?this.#h():s.length>0&&this.#_(),this.isSpinning&&!this.#a&&this.render(),u}render(){if(!this.isEnabled||this.#c||this.#a)return this;let t=this.#t.isTTY,r=!1;try{t&&(this.#l(()=>this.#t.write(qx)),r=!0),this.clear();let i=this.frame(),n=this.#t.columns??80,o=this.#f(i,n),s=this.#t.rows;if(s&&s>1&&o>s){let u=i.split(`
116
- `),c=s-1;i=[...u.slice(0,c),"... (content truncated to fit terminal)"].join(`
117
- `)}this.#l(()=>this.#t.write(i))===!1&&this.#t.isTTY&&(this.#c=()=>{this.#c=void 0,this.#m()},this.#t.once("drain",this.#c)),this.#o=this.#f(i,n)}finally{r&&this.#l(()=>this.#t.write(Vx))}return this}start(t){if(t&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let r=this.text?"-":"",i=" ".repeat(this.#e.indent)+this.#g(r,this.text,this.#e.prefixText,this.#e.suffixText);return i.trim()!==""&&this.#l(()=>this.#t.write(i+`
118
- `)),this}return this.isSpinning?this:(this.#e.hideCursor&&Hp.hide(this.#t),this.#e.discardStdin&&Mn.default.stdin.isTTY&&(sf.start(),this.#p=!0),this.#x(),this.render(),this.#s=setInterval(this.render.bind(this),this.interval),this)}stop(){return clearInterval(this.#s),this.#s=void 0,this.#r=-1,this.#n=0,this.#h(),this.#k(),this.#c&&(this.#t.removeListener("drain",this.#c),this.#c=void 0),this.isEnabled&&(this.clear(),this.#e.hideCursor&&Hp.show(this.#t)),this.#p&&(this.#p=!1,sf.stop()),this}succeed(t){return this.stopAndPersist({symbol:Qt.success,text:t})}fail(t){return this.stopAndPersist({symbol:Qt.error,text:t})}warn(t){return this.stopAndPersist({symbol:Qt.warning,text:t})}info(t){return this.stopAndPersist({symbol:Qt.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;let r=t.symbol??" ",i=t.text??this.text,n=t.prefixText??this.#e.prefixText,o=t.suffixText??this.#e.suffixText,s=this.#g(r,i,n,o)+`
119
- `;return this.stop(),this.#l(()=>this.#t.write(s)),this}};function uf(e){return new af(e)}var qn=!1;function Ay(e){qn=e}function xe(){return qn}function zy(e){let t=JSON.stringify(e,null,2);process.stdout.write(t+`
120
- `)}function g(e,...t){let r=t.length?e.replace(/%[sv]/g,()=>String(t.shift())):e;if(qn){let i=JSON.stringify({error:r});process.stderr.write(i+`
121
- `)}else process.stderr.write(`Error: ${r}
122
- `);process.exit(1)}function C(e,...t){if(qn)return;let r=t.length?e.replace(/%[sv]/g,()=>String(t.shift())):e;process.stdout.write(`\x1B[32m${r}\x1B[0m
123
- `)}function E(e,...t){if(qn)return;let r=t.length?e.replace(/%[sv]/g,()=>String(t.shift())):e;process.stdout.write(r+`
124
- `)}function Py(e,t){return e.length>=t?e:e+" ".repeat(t-e.length)}function B(e,t){if(t.length===0){E("No results.");return}let r=e.map(o=>o.length);for(let o of t)for(let s=0;s<o.length&&s<r.length;s++)r[s]=Math.max(r[s],o[s].length);let i=e.map((o,s)=>`\x1B[1m\x1B[34m${Py(o,r[s])}\x1B[0m`).join(" ");process.stdout.write(i+`
125
- `);let n=r.map(o=>`\x1B[90m${"\u2500".repeat(o)}\x1B[0m`).join(" ");process.stdout.write(n+`
126
- `);for(let o of t){let s=o.slice(0,r.length).map((a,u)=>Py(a,r[u])).join(" ");process.stdout.write(s+`
127
- `)}}function zt(e){return qn||!le()?null:uf(e).start()}function gt(e){e&&e.stop()}async function Ie(e,t){le()||g("%s is required (use %s)",e,t?.flagHint??"the appropriate flag");let r=await ny({message:e,placeholder:t?.placeholder});return Yt(r)?(E("cancelled"),null):r}async function Ty(e,t){le()||g("%s is required (use %s)",e,t?.flagHint??"the appropriate flag");let r=await ry({message:e});return Yt(r)?(E("cancelled"),null):r}async function tn(e,t,r){le()||g("%s is required (use %s)",e,r?.flagHint??"the appropriate flag");let i=await oy({message:e,options:t});return Yt(i)?(E("cancelled"),null):i}async function cf(e,t){le()||g("%s requires confirmation (use %s)",e,t?.flagHint??"the appropriate flag");let r=await iy({message:e});return Yt(r)?(E("cancelled"),null):r}var lf="",df="";function jy(e){lf=e}function Uy(e){df=e}function Ue(e){return lf||(process.env.ZENKU_TENANT_ID?process.env.ZENKU_TENANT_ID:e.tenantId)}function Ne(e){return df||(process.env.ZENKU_ACCOUNT_ID?process.env.ZENKU_ACCOUNT_ID:e.accountId)}async function ws(e,t,r){try{let i=`user='${r}'`,n=await fetch(`${e}/api/collections/account_members/records?filter=${encodeURIComponent(i)}&expand=account&perPage=100`,{headers:{Authorization:t}});if(!n.ok)return"";let o=await n.json();if(o.items.length===0)return"";if(o.items.length===1)return o.items[0].account;if(!le())return"";let s=o.items.map(u=>({value:u.account,label:u.expand?.account?.name??u.account}));return await tn("Choose account",s,{flagHint:"`zenku context set --account <id>`"})??""}catch{return""}}var Ff=require("node:fs");var Ny=x.object({accountId:x.string().min(1,"accountId is required"),params:x.record(x.string(),x.unknown()),conversationId:x.string().optional(),metadata:x.record(x.string(),x.unknown()).optional()}),Wx=Ny.extend({callbackUrl:x.url().optional(),callbackSecret:x.string().optional()});var Gx=x.object({params:x.record(x.string(),x.unknown()),conversationId:x.string().optional(),callbackUrl:x.url().optional(),callbackSecret:x.string().optional(),metadata:x.record(x.string(),x.unknown()).optional()});var Vn=class Ry extends Error{code;status;data;constructor(t,r,i){super(r),this.name="AgentClientError",this.code=t,this.status=i?.status??0,this.data=i?.data}static async fromResponse(t){let r=Jx(t.status),i=`HTTP ${t.status}`,n;try{let o=await t.text();try{n=JSON.parse(o),i=typeof n.error=="string"?n.error:`HTTP ${t.status}: ${o}`}catch{i=o||i}}catch{}return new Ry(r,i,{status:t.status,data:n})}};function Jx(e){return e===400?"BAD_REQUEST":e===401?"UNAUTHORIZED":e===403?"FORBIDDEN":e===404?"NOT_FOUND":e>=500?"SERVER_ERROR":"UNKNOWN"}function pf(e,t){let r=t.persisted,i=null;switch(e){case"message":i={type:"message",message:t};break;case"agent:metadata":i={type:"agent:metadata",cost:t.cost,durationMs:t.durationMs,numTurns:t.numTurns};break;case"agent:start":i={type:"agent:start",sandboxId:t.sandboxId};break;case"agent:exit":i={type:"agent:exit",exitCode:t.exitCode};break;case"interaction:approval_requested":i={type:"interaction:approval_requested",approval:t.approval};break;case"interaction:approval_resolved":i={type:"interaction:approval_resolved",interactionId:t.interactionId,decision:t.decision};break;case"interaction:a2ui_update":i={type:"interaction:a2ui_update",message:t.message,callbackToken:t.callbackToken};break;case"interaction:client_event":i={type:"interaction:client_event",payload:t.payload};break;case"session:status":i={type:"session:status",status:t.status};break;case"keepalive":i={type:"keepalive"};break;case"error":i={type:"error",message:t.message};break;default:return!e&&t.type?t:null}return i&&r!==void 0&&(i.persisted=r),i}async function*xs(e,t){let r=e.getReader(),i=new TextDecoder,n="",o="",s;try{for(;!t?.aborted;){let{done:a,value:u}=await r.read();if(a)break;n+=i.decode(u,{stream:!0});let c=n.split(`
128
- `);n=c.pop()||"";for(let l of c)if(l.startsWith("event: "))o=l.slice(7).trim();else if(l.startsWith("id: "))s=l.slice(4).trim();else if(l.startsWith("data: ")){let d=l.slice(6);if(d==="[DONE]")continue;let f=Kx({event:o,data:d,id:s});f&&(yield f),o="",s=void 0}else l.trim()===""&&(o="",s=void 0)}}finally{r.releaseLock()}}function Kx(e){if(e.event==="keepalive")return{type:"keepalive"};if(!e.data)return null;try{let t=JSON.parse(e.data);return pf(e.event,t)}catch{return null}}var By=class{baseUrl;auth;_fetch;constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.auth=e.auth,this._fetch=e.fetch??globalThis.fetch.bind(globalThis)}async*stream(e,t){let r=await this.post(this.endpoint("/stream"),this.buildBody(e),t);if(!r.body)throw new Vn("NO_RESPONSE_BODY","No response body for SSE stream",{status:r.status});yield*xs(r.body,t)}async async(e){let t={...this.buildBody(e)};return e.callbackUrl!==void 0&&(t.callbackUrl=e.callbackUrl),e.callbackSecret!==void 0&&(t.callbackSecret=e.callbackSecret),await(await this.post(this.endpoint("/async"),t)).json()}async sync(e){return await(await this.post(this.endpoint("/sync"),this.buildBody(e))).json()}async createConversation(e,t){let r=await this.post(this.endpoint("/conversations"),{conversationId:e,...t?.agentSlug!==void 0&&{agentSlug:t.agentSlug}});return{...await r.json(),isNew:r.status===201}}async sendMessage(e,t,r){return await(await this.post(this.endpoint(`/conversations/${e}/messages`),{prompt:t,...r})).json()}async*subscribe(e,t,r){let i=await this.buildHeaders();t?.lastEventId&&(i["Last-Event-ID"]=t.lastEventId),delete i["Content-Type"];let n=await this.request("GET",this.endpoint(`/conversations/${e}/events`),i,void 0,r);if(!n.body)throw new Vn("NO_RESPONSE_BODY","No response body for SSE subscription",{status:n.status});yield*xs(n.body,r)}async getConversation(e){return await(await this.get(this.endpoint(`/conversations/${e}`))).json()}async resolve(e,t){return await(await this.post(this.endpoint("/resolve"),{callbackToken:e,...t?.decision!==void 0&&{decision:t.decision},...t?.userInput!==void 0&&{userInput:t.userInput}})).json()}async getStatus(e){return await(await this.get(this.endpoint(`/status/${e}`))).json()}get routePrefix(){return this.auth.type==="jwt"?"/api/webhooks":"/api/public"}endpoint(e){return`${this.baseUrl}${this.routePrefix}${e}`}async buildHeaders(){let e={"Content-Type":"application/json"};if(this.auth.type==="jwt"){let t=await Promise.resolve(this.auth.getToken());e.Authorization=`Bearer ${t}`,e["X-Tenant-Id"]=this.auth.tenantId,e["X-Account-Id"]=this.auth.accountId}return e}buildBody(e){let t={params:{prompt:e.prompt,...e.repo!==void 0&&{repo:e.repo},...e.token!==void 0&&{token:e.token},...e.ref!==void 0&&{ref:e.ref},...e.agentSlug!==void 0&&{agentSlug:e.agentSlug}}};return e.conversationId!==void 0&&(t.conversationId=e.conversationId),e.metadata!==void 0&&(t.metadata=e.metadata),this.auth.type==="jwt"&&(t.accountId=this.auth.accountId),t}async request(e,t,r,i,n){let o;try{o=await this._fetch(t,{method:e,headers:r,body:i,signal:n})}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?s:new Vn("NETWORK_ERROR",s instanceof Error?s.message:"Network request failed")}if(!o.ok)throw await Vn.fromResponse(o);return o}async post(e,t,r){let i=await this.buildHeaders();return this.request("POST",e,i,JSON.stringify(t),r)}async get(e,t){let r=await this.buildHeaders();return delete r["Content-Type"],this.request("GET",e,r,void 0,t)}};function ff(e){return new By(e)}var Ee=class e extends Error{constructor(t){super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,e.prototype),t!==null&&typeof t=="object"&&(this.originalError=t.originalError,this.url=typeof t.url=="string"?t.url:"",this.status=typeof t.status=="number"?t.status:0,this.isAbort=!!t.isAbort||t.name==="AbortError"||t.message==="Aborted",t.response!==null&&typeof t.response=="object"?this.response=t.response:t.data!==null&&typeof t.data=="object"?this.response=t.data:this.response={}),this.originalError||t instanceof e||(this.originalError=t),this.name="ClientResponseError "+this.status,this.message=this.response?.message,this.message||(this.isAbort?this.message="The request was aborted (most likely autocancelled; you can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation).":this.originalError?.cause?.message?.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong."),this.cause=this.originalError}get data(){return this.response}toJSON(){return{...this}}},ks=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Hx(e,t){let r={};if(typeof e!="string")return r;let i=Object.assign({},t||{}).decode||Yx,n=0;for(;n<e.length;){let o=e.indexOf("=",n);if(o===-1)break;let s=e.indexOf(";",n);if(s===-1)s=e.length;else if(s<o){n=e.lastIndexOf(";",o-1)+1;continue}let a=e.slice(n,o).trim();if(r[a]===void 0){let u=e.slice(o+1,s).trim();u.charCodeAt(0)===34&&(u=u.slice(1,-1));try{r[a]=i(u)}catch{r[a]=u}}n=s+1}return r}function Ly(e,t,r){let i=Object.assign({},r||{}),n=i.encode||Xx;if(!ks.test(e))throw new TypeError("argument name is invalid");let o=n(t);if(o&&!ks.test(o))throw new TypeError("argument val is invalid");let s=e+"="+o;if(i.maxAge!=null){let a=i.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(i.domain){if(!ks.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain="+i.domain}if(i.path){if(!ks.test(i.path))throw new TypeError("option path is invalid");s+="; Path="+i.path}if(i.expires){if(!(function(u){return Object.prototype.toString.call(u)==="[object Date]"||u instanceof Date})(i.expires)||isNaN(i.expires.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.priority)switch(typeof i.priority=="string"?i.priority.toLowerCase():i.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}function Yx(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Xx(e){return encodeURIComponent(e)}var Qx=typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal,Wy;function Wn(e){if(e)try{let t=decodeURIComponent(Wy(e.split(".")[1]).split("").map((function(r){return"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)})).join(""));return JSON.parse(t)||{}}catch{}return{}}function Gy(e,t=0){let r=Wn(e);return!(Object.keys(r).length>0&&(!r.exp||r.exp-t>Date.now()/1e3))}Wy=typeof atob!="function"||Qx?e=>{let t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,n=0,o=0,s="";i=t.charAt(o++);~i&&(r=n%4?64*r+i:i,n++%4)?s+=String.fromCharCode(255&r>>(-2*n&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s}:atob;var Zy="pb_auth",Vr=class{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get record(){return this.baseModel}get model(){return this.baseModel}get isValid(){return!Gy(this.token)}get isSuperuser(){let t=Wn(this.token);return t.type=="auth"&&(this.record?.collectionName=="_superusers"||!this.record?.collectionName&&t.collectionId=="pbc_3142635823")}get isAdmin(){return console.warn("Please replace pb.authStore.isAdmin with pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),this.isSuperuser}get isAuthRecord(){return console.warn("Please replace pb.authStore.isAuthRecord with !pb.authStore.isSuperuser OR simply check the value of pb.authStore.record?.collectionName"),Wn(this.token).type=="auth"&&!this.isSuperuser}save(t,r){this.baseToken=t||"",this.baseModel=r||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(t,r=Zy){let i=Hx(t||"")[r]||"",n={};try{n=JSON.parse(i),(typeof n===null||typeof n!="object"||Array.isArray(n))&&(n={})}catch{}this.save(n.token||"",n.record||n.model||null)}exportToCookie(t,r=Zy){let i={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},n=Wn(this.token);i.expires=n?.exp?new Date(1e3*n.exp):new Date("1970-01-01"),t=Object.assign({},i,t);let o={token:this.token,record:this.record?JSON.parse(JSON.stringify(this.record)):null},s=Ly(r,JSON.stringify(o),t),a=typeof Blob<"u"?new Blob([s]).size:s.length;if(o.record&&a>4096){o.record={id:o.record?.id,email:o.record?.email};let u=["collectionId","collectionName","verified"];for(let c in this.record)u.includes(c)&&(o.record[c]=this.record[c]);s=Ly(r,JSON.stringify(o),t)}return s}onChange(t,r=!1){return this._onChangeCallbacks.push(t),r&&t(this.token,this.record),()=>{for(let i=this._onChangeCallbacks.length-1;i>=0;i--)if(this._onChangeCallbacks[i]==t)return delete this._onChangeCallbacks[i],void this._onChangeCallbacks.splice(i,1)}}triggerChange(){for(let t of this._onChangeCallbacks)t&&t(this.token,this.record)}},hf=class extends Vr{constructor(t="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=t,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get record(){let t=this._storageGet(this.storageKey)||{};return t.record||t.model||null}get model(){return this.record}save(t,r){this._storageSet(this.storageKey,{token:t,record:r}),super.save(t,r)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(t){if(typeof window<"u"&&window?.localStorage){let r=window.localStorage.getItem(t)||"";try{return JSON.parse(r)}catch{return r}}return this.storageFallback[t]}_storageSet(t,r){if(typeof window<"u"&&window?.localStorage){let i=r;typeof r!="string"&&(i=JSON.stringify(r)),window.localStorage.setItem(t,i)}else this.storageFallback[t]=r}_storageRemove(t){typeof window<"u"&&window?.localStorage&&window.localStorage?.removeItem(t),delete this.storageFallback[t]}_bindStorageEvent(){typeof window<"u"&&window?.localStorage&&window.addEventListener&&window.addEventListener("storage",(t=>{if(t.key!=this.storageKey)return;let r=this._storageGet(this.storageKey)||{};super.save(r.token||"",r.record||r.model||null)}))}},Xe=class{constructor(t){this.client=t}},gf=class extends Xe{async getAll(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/settings",t)}async update(t,r){return r=Object.assign({method:"PATCH",body:t},r),this.client.send("/api/settings",r)}async testS3(t="storage",r){return r=Object.assign({method:"POST",body:{filesystem:t}},r),this.client.send("/api/settings/test/s3",r).then((()=>!0))}async testEmail(t,r,i,n){return n=Object.assign({method:"POST",body:{email:r,template:i,collection:t}},n),this.client.send("/api/settings/test/email",n).then((()=>!0))}async generateAppleClientSecret(t,r,i,n,o,s){return s=Object.assign({method:"POST",body:{clientId:t,teamId:r,keyId:i,privateKey:n,duration:o}},s),this.client.send("/api/settings/apple/generate-client-secret",s)}},ek=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];function If(e){if(e){e.query=e.query||{};for(let t in e)ek.includes(t)||(e.query[t]=e[t],delete e[t])}}function Ef(e){let t=[];for(let r in e){let i=encodeURIComponent(r),n=Array.isArray(e[r])?e[r]:[e[r]];for(let o of n)o=tk(o),o!==null&&t.push(i+"="+o)}return t.join("&")}function tk(e){return e==null?null:e instanceof Date?encodeURIComponent(e.toISOString().replace("T"," ")):encodeURIComponent(typeof e=="object"?JSON.stringify(e):e)}var Ss=class extends Xe{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentSubscriptions=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}async subscribe(t,r,i){if(!t)throw new Error("topic must be set.");let n=t;if(i){If(i=Object.assign({},i));let s="options="+encodeURIComponent(JSON.stringify({query:i.query,headers:i.headers}));n+=(n.includes("?")?"&":"?")+s}let o=function(s){let a=s,u;try{u=JSON.parse(a?.data)}catch{}r(u||{})};return this.subscriptions[n]||(this.subscriptions[n]=[]),this.subscriptions[n].push(o),this.isConnected?this.subscriptions[n].length===1?await this.submitSubscriptions():this.eventSource?.addEventListener(n,o):await this.connect(),async()=>this.unsubscribeByTopicAndListener(t,o)}async unsubscribe(t){let r=!1;if(t){let i=this.getSubscriptionsByTopic(t);for(let n in i)if(this.hasSubscriptionListeners(n)){for(let o of this.subscriptions[n])this.eventSource?.removeEventListener(n,o);delete this.subscriptions[n],r||(r=!0)}}else this.subscriptions={};this.hasSubscriptionListeners()?r&&await this.submitSubscriptions():this.disconnect()}async unsubscribeByPrefix(t){let r=!1;for(let i in this.subscriptions)if((i+"?").startsWith(t)){r=!0;for(let n of this.subscriptions[i])this.eventSource?.removeEventListener(i,n);delete this.subscriptions[i]}r&&(this.hasSubscriptionListeners()?await this.submitSubscriptions():this.disconnect())}async unsubscribeByTopicAndListener(t,r){let i=!1,n=this.getSubscriptionsByTopic(t);for(let o in n){if(!Array.isArray(this.subscriptions[o])||!this.subscriptions[o].length)continue;let s=!1;for(let a=this.subscriptions[o].length-1;a>=0;a--)this.subscriptions[o][a]===r&&(s=!0,delete this.subscriptions[o][a],this.subscriptions[o].splice(a,1),this.eventSource?.removeEventListener(o,r));s&&(this.subscriptions[o].length||delete this.subscriptions[o],i||this.hasSubscriptionListeners(o)||(i=!0))}this.hasSubscriptionListeners()?i&&await this.submitSubscriptions():this.disconnect()}hasSubscriptionListeners(t){if(this.subscriptions=this.subscriptions||{},t)return!!this.subscriptions[t]?.length;for(let r in this.subscriptions)if(this.subscriptions[r]?.length)return!0;return!1}async submitSubscriptions(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentSubscriptions=this.getNonEmptySubscriptionKeys(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentSubscriptions},requestKey:this.getSubscriptionsCancelKey()}).catch((t=>{if(!t?.isAbort)throw t}))}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getSubscriptionsByTopic(t){let r={};t=t.includes("?")?t:t+"?";for(let i in this.subscriptions)(i+"?").startsWith(t)&&(r[i]=this.subscriptions[i]);return r}getNonEmptySubscriptionKeys(){let t=[];for(let r in this.subscriptions)this.subscriptions[r].length&&t.push(r);return t}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.addEventListener(t,r)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let t in this.subscriptions)for(let r of this.subscriptions[t])this.eventSource.removeEventListener(t,r)}async connect(){if(!(this.reconnectAttempts>0))return new Promise(((t,r)=>{this.pendingConnects.push({resolve:t,reject:r}),this.pendingConnects.length>1||this.initConnect()}))}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout((()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))}),this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildURL("/api/realtime")),this.eventSource.onerror=t=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",(t=>{let r=t;this.clientId=r?.lastEventId,this.submitSubscriptions().then((async()=>{let i=3;for(;this.hasUnsentSubscriptions()&&i>0;)i--,await this.submitSubscriptions()})).then((()=>{for(let n of this.pendingConnects)n.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId);let i=this.getSubscriptionsByTopic("PB_CONNECT");for(let n in i)for(let o of i[n])o(t)})).catch((i=>{this.clientId="",this.connectErrorHandler(i)}))}))}hasUnsentSubscriptions(){let t=this.getNonEmptySubscriptionKeys();if(t.length!=this.lastSentSubscriptions.length)return!0;for(let r of t)if(!this.lastSentSubscriptions.includes(r))return!0;return!1}connectErrorHandler(t){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let i of this.pendingConnects)i.reject(new Ee(t));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);let r=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout((()=>{this.initConnect()}),r)}disconnect(t=!1){if(this.clientId&&this.onDisconnect&&this.onDisconnect(Object.keys(this.subscriptions)),clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),this.eventSource?.close(),this.eventSource=null,this.clientId="",!t){this.reconnectAttempts=0;for(let r of this.pendingConnects)r.resolve();this.pendingConnects=[]}}},Cs=class extends Xe{decode(t){return t}async getFullList(t,r){if(typeof t=="number")return this._getFullList(t,r);let i=1e3;return(r=Object.assign({},t,r)).batch&&(i=r.batch,delete r.batch),this._getFullList(i,r)}async getList(t=1,r=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:t,perPage:r},i.query),this.client.send(this.baseCrudPath,i).then((n=>(n.items=n.items?.map((o=>this.decode(o)))||[],n)))}async getFirstListItem(t,r){return(r=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+t},r)).query=Object.assign({filter:t,skipTotal:1},r.query),this.getList(1,1,r).then((i=>{if(!i?.items?.length)throw new Ee({status:404,response:{code:404,message:"The requested resource wasn't found.",data:{}}});return i.items[0]}))}async getOne(t,r){if(!t)throw new Ee({url:this.client.buildURL(this.baseCrudPath+"/"),status:404,response:{code:404,message:"Missing required record id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then((i=>this.decode(i)))}async create(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send(this.baseCrudPath,r).then((i=>this.decode(i)))}async update(t,r,i){return i=Object.assign({method:"PATCH",body:r},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),i).then((n=>this.decode(n)))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t),r).then((()=>!0))}_getFullList(t=1e3,r){(r=r||{}).query=Object.assign({skipTotal:1},r.query);let i=[],n=async o=>this.getList(o,t||1e3,r).then((s=>{let a=s.items;return i=i.concat(a),a.length==s.perPage?n(o+1):i}));return n(1)}};function Tt(e,t,r,i){let n=i!==void 0;return n||r!==void 0?n?(console.warn(e),t.body=Object.assign({},t.body,r),t.query=Object.assign({},t.query,i),t):Object.assign(t,r):t}function mf(e){e._resetAutoRefresh?.()}var vf=class extends Cs{constructor(t,r){super(t),this.collectionIdOrName=r}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}get isSuperusers(){return this.collectionIdOrName=="_superusers"||this.collectionIdOrName=="_pbc_2773867675"}async subscribe(t,r,i){if(!t)throw new Error("Missing topic.");if(!r)throw new Error("Missing subscription callback.");return this.client.realtime.subscribe(this.collectionIdOrName+"/"+t,r,i)}async unsubscribe(t){return t?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+t):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)}async getFullList(t,r){if(typeof t=="number")return super.getFullList(t,r);let i=Object.assign({},t,r);return super.getFullList(i)}async getList(t=1,r=30,i){return super.getList(t,r,i)}async getFirstListItem(t,r){return super.getFirstListItem(t,r)}async getOne(t,r){return super.getOne(t,r)}async create(t,r){return super.create(t,r)}async update(t,r,i){return super.update(t,r,i).then((n=>{if(this.client.authStore.record?.id===n?.id&&(this.client.authStore.record?.collectionId===this.collectionIdOrName||this.client.authStore.record?.collectionName===this.collectionIdOrName)){let o=Object.assign({},this.client.authStore.record.expand),s=Object.assign({},this.client.authStore.record,n);o&&(s.expand=Object.assign(o,n.expand)),this.client.authStore.save(this.client.authStore.token,s)}return n}))}async delete(t,r){return super.delete(t,r).then((i=>(!i||this.client.authStore.record?.id!==t||this.client.authStore.record?.collectionId!==this.collectionIdOrName&&this.client.authStore.record?.collectionName!==this.collectionIdOrName||this.client.authStore.clear(),i)))}authResponse(t){let r=this.decode(t?.record||{});return this.client.authStore.save(t?.token,r),Object.assign({},t,{token:t?.token||"",record:r})}async listAuthMethods(t){return t=Object.assign({method:"GET",fields:"mfa,otp,password,oauth2"},t),this.client.send(this.baseCollectionPath+"/auth-methods",t)}async authWithPassword(t,r,i){let n;i=Object.assign({method:"POST",body:{identity:t,password:r}},i),this.isSuperusers&&(n=i.autoRefreshThreshold,delete i.autoRefreshThreshold,i.autoRefresh||mf(this.client));let o=await this.client.send(this.baseCollectionPath+"/auth-with-password",i);return o=this.authResponse(o),n&&this.isSuperusers&&(function(a,u,c,l){mf(a);let d=a.beforeSend,p=a.authStore.record,f=a.authStore.onChange(((y,w)=>{(!y||w?.id!=p?.id||(w?.collectionId||p?.collectionId)&&w?.collectionId!=p?.collectionId)&&mf(a)}));a._resetAutoRefresh=function(){f(),a.beforeSend=d,delete a._resetAutoRefresh},a.beforeSend=async(y,w)=>{let F=a.authStore.token;if(w.query?.autoRefresh)return d?d(y,w):{url:y,sendOptions:w};let R=a.authStore.isValid;if(R&&Gy(a.authStore.token,u))try{await c()}catch{R=!1}R||await l();let Q=w.headers||{};for(let z in Q)if(z.toLowerCase()=="authorization"&&F==Q[z]&&a.authStore.token){Q[z]=a.authStore.token;break}return w.headers=Q,d?d(y,w):{url:y,sendOptions:w}}})(this.client,n,(()=>this.authRefresh({autoRefresh:!0})),(()=>this.authWithPassword(t,r,Object.assign({autoRefresh:!0},i)))),o}async authWithOAuth2Code(t,r,i,n,o,s,a){let u={method:"POST",body:{provider:t,code:r,codeVerifier:i,redirectURL:n,createData:o}};return u=Tt("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectURL, createData?, options?).",u,s,a),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",u).then((c=>this.authResponse(c)))}authWithOAuth2(...t){if(t.length>1||typeof t?.[0]=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code(t?.[0]||"",t?.[1]||"",t?.[2]||"",t?.[3]||"",t?.[4]||{},t?.[5]||{},t?.[6]||{});let r=t?.[0]||{},i=null;r.urlCallback||(i=My(void 0));let n=new Ss(this.client);function o(){i?.close(),n.unsubscribe()}let s={},a=r.requestKey;return a&&(s.requestKey=a),this.listAuthMethods(s).then((u=>{let c=u.oauth2.providers.find((d=>d.name===r.provider));if(!c)throw new Ee(new Error(`Missing or invalid provider "${r.provider}".`));let l=this.client.buildURL("/api/oauth2-redirect");return new Promise((async(d,p)=>{let f=a?this.client.cancelControllers?.[a]:void 0;f&&(f.signal.onabort=()=>{o(),p(new Ee({isAbort:!0,message:"manually cancelled"}))}),n.onDisconnect=y=>{y.length&&p&&(o(),p(new Ee(new Error("realtime connection interrupted"))))};try{await n.subscribe("@oauth2",(async R=>{let Q=n.clientId;try{if(!R.state||Q!==R.state)throw new Error("State parameters don't match.");if(R.error||!R.code)throw new Error("OAuth2 redirect error or missing code: "+R.error);let z=Object.assign({},r);delete z.provider,delete z.scopes,delete z.createData,delete z.urlCallback,f?.signal?.onabort&&(f.signal.onabort=null);let G=await this.authWithOAuth2Code(c.name,R.code,c.codeVerifier,l,r.createData,z);d(G)}catch(z){p(new Ee(z))}o()}));let y={state:n.clientId};r.scopes?.length&&(y.scope=r.scopes.join(" "));let w=this._replaceQueryParams(c.authURL+l,y);await(r.urlCallback||function(R){i?i.location.href=R:i=My(R)})(w)}catch(y){f?.signal?.onabort&&(f.signal.onabort=null),o(),p(new Ee(y))}}))})).catch((u=>{throw o(),u}))}async authRefresh(t,r){let i={method:"POST"};return i=Tt("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,t,r),this.client.send(this.baseCollectionPath+"/auth-refresh",i).then((n=>this.authResponse(n)))}async requestPasswordReset(t,r,i){let n={method:"POST",body:{email:t}};return n=Tt("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",n,r,i),this.client.send(this.baseCollectionPath+"/request-password-reset",n).then((()=>!0))}async confirmPasswordReset(t,r,i,n,o){let s={method:"POST",body:{token:t,password:r,passwordConfirm:i}};return s=Tt("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",s,n,o),this.client.send(this.baseCollectionPath+"/confirm-password-reset",s).then((()=>!0))}async requestVerification(t,r,i){let n={method:"POST",body:{email:t}};return n=Tt("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",n,r,i),this.client.send(this.baseCollectionPath+"/request-verification",n).then((()=>!0))}async confirmVerification(t,r,i){let n={method:"POST",body:{token:t}};return n=Tt("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",n,r,i),this.client.send(this.baseCollectionPath+"/confirm-verification",n).then((()=>{let o=Wn(t),s=this.client.authStore.record;return s&&!s.verified&&s.id===o.id&&s.collectionId===o.collectionId&&(s.verified=!0,this.client.authStore.save(this.client.authStore.token,s)),!0}))}async requestEmailChange(t,r,i){let n={method:"POST",body:{newEmail:t}};return n=Tt("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",n,r,i),this.client.send(this.baseCollectionPath+"/request-email-change",n).then((()=>!0))}async confirmEmailChange(t,r,i,n){let o={method:"POST",body:{token:t,password:r}};return o=Tt("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",o,i,n),this.client.send(this.baseCollectionPath+"/confirm-email-change",o).then((()=>{let s=Wn(t),a=this.client.authStore.record;return a&&a.id===s.id&&a.collectionId===s.collectionId&&this.client.authStore.clear(),!0}))}async listExternalAuths(t,r){return this.client.collection("_externalAuths").getFullList(Object.assign({},r,{filter:this.client.filter("recordRef = {:id}",{id:t})}))}async unlinkExternalAuth(t,r,i){let n=await this.client.collection("_externalAuths").getFirstListItem(this.client.filter("recordRef = {:recordId} && provider = {:provider}",{recordId:t,provider:r}));return this.client.collection("_externalAuths").delete(n.id,i).then((()=>!0))}async requestOTP(t,r){return r=Object.assign({method:"POST",body:{email:t}},r),this.client.send(this.baseCollectionPath+"/request-otp",r)}async authWithOTP(t,r,i){return i=Object.assign({method:"POST",body:{otpId:t,password:r}},i),this.client.send(this.baseCollectionPath+"/auth-with-otp",i).then((n=>this.authResponse(n)))}async impersonate(t,r,i){(i=Object.assign({method:"POST",body:{duration:r}},i)).headers=i.headers||{},i.headers.Authorization||(i.headers.Authorization=this.client.authStore.token);let n=new Wr(this.client.baseURL,new Vr,this.client.lang),o=await n.send(this.baseCollectionPath+"/impersonate/"+encodeURIComponent(t),i);return n.authStore.save(o?.token,this.decode(o?.record||{})),n}_replaceQueryParams(t,r={}){let i=t,n="";t.indexOf("?")>=0&&(i=t.substring(0,t.indexOf("?")),n=t.substring(t.indexOf("?")+1));let o={},s=n.split("&");for(let a of s){if(a=="")continue;let u=a.split("=");o[decodeURIComponent(u[0].replace(/\+/g," "))]=decodeURIComponent((u[1]||"").replace(/\+/g," "))}for(let a in r)r.hasOwnProperty(a)&&(r[a]==null?delete o[a]:o[a]=r[a]);n="";for(let a in o)o.hasOwnProperty(a)&&(n!=""&&(n+="&"),n+=encodeURIComponent(a.replace(/%20/g,"+"))+"="+encodeURIComponent(o[a].replace(/%20/g,"+")));return n!=""?i+"?"+n:i}};function My(e){if(typeof window>"u"||!window?.open)throw new Ee(new Error("Not in a browser context - please pass a custom urlCallback function."));let t=1024,r=768,i=window.innerWidth,n=window.innerHeight;t=t>i?i:t,r=r>n?n:r;let o=i/2-t/2,s=n/2-r/2;return window.open(e,"popup_window","width="+t+",height="+r+",top="+s+",left="+o+",resizable,menubar=no")}var yf=class extends Cs{get baseCrudPath(){return"/api/collections"}async import(t,r=!1,i){return i=Object.assign({method:"PUT",body:{collections:t,deleteMissing:r}},i),this.client.send(this.baseCrudPath+"/import",i).then((()=>!0))}async getScaffolds(t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/meta/scaffolds",t)}async truncate(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/truncate",r).then((()=>!0))}},Df=class extends Xe{async getList(t=1,r=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:t,perPage:r},i.query),this.client.send("/api/logs",i)}async getOne(t,r){if(!t)throw new Ee({url:this.client.buildURL("/api/logs/"),status:404,response:{code:404,message:"Missing required log id.",data:{}}});return r=Object.assign({method:"GET"},r),this.client.send("/api/logs/"+encodeURIComponent(t),r)}async getStats(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/stats",t)}},bf=class extends Xe{async check(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/health",t)}},$f=class extends Xe{getUrl(t,r,i={}){return console.warn("Please replace pb.files.getUrl() with pb.files.getURL()"),this.getURL(t,r,i)}getURL(t,r,i={}){if(!r||!t?.id||!t?.collectionId&&!t?.collectionName)return"";let n=[];n.push("api"),n.push("files"),n.push(encodeURIComponent(t.collectionId||t.collectionName)),n.push(encodeURIComponent(t.id)),n.push(encodeURIComponent(r));let o=this.client.buildURL(n.join("/"));i.download===!1&&delete i.download;let s=Ef(i);return s&&(o+=(o.includes("?")?"&":"?")+s),o}async getToken(t){return t=Object.assign({method:"POST"},t),this.client.send("/api/files/token",t).then((r=>r?.token||""))}},_f=class extends Xe{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/backups",t)}async create(t,r){return r=Object.assign({method:"POST",body:{name:t}},r),this.client.send("/api/backups",r).then((()=>!0))}async upload(t,r){return r=Object.assign({method:"POST",body:t},r),this.client.send("/api/backups/upload",r).then((()=>!0))}async delete(t,r){return r=Object.assign({method:"DELETE"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}`,r).then((()=>!0))}async restore(t,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/backups/${encodeURIComponent(t)}/restore`,r).then((()=>!0))}getDownloadUrl(t,r){return console.warn("Please replace pb.backups.getDownloadUrl() with pb.backups.getDownloadURL()"),this.getDownloadURL(t,r)}getDownloadURL(t,r){return this.client.buildURL(`/api/backups/${encodeURIComponent(r)}?token=${encodeURIComponent(t)}`)}},wf=class extends Xe{async getFullList(t){return t=Object.assign({method:"GET"},t),this.client.send("/api/crons",t)}async run(t,r){return r=Object.assign({method:"POST"},r),this.client.send(`/api/crons/${encodeURIComponent(t)}`,r).then((()=>!0))}};function xf(e){return typeof Blob<"u"&&e instanceof Blob||typeof File<"u"&&e instanceof File||e!==null&&typeof e=="object"&&e.uri&&(typeof navigator<"u"&&navigator.product==="ReactNative"||typeof global<"u"&&global.HermesInternal)}function kf(e){return e&&(e.constructor?.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)}function qy(e){for(let t in e){let r=Array.isArray(e[t])?e[t]:[e[t]];for(let i of r)if(xf(i))return!0}return!1}var nk=/^[\-\.\d]+$/;function Vy(e){if(typeof e!="string")return e;if(e=="true")return!0;if(e=="false")return!1;if((e[0]==="-"||e[0]>="0"&&e[0]<="9")&&nk.test(e)){let t=+e;if(""+t===e)return t}return e}var Sf=class extends Xe{constructor(){super(...arguments),this.requests=[],this.subs={}}collection(t){return this.subs[t]||(this.subs[t]=new Cf(this.requests,t)),this.subs[t]}async send(t){let r=new FormData,i=[];for(let n=0;n<this.requests.length;n++){let o=this.requests[n];if(i.push({method:o.method,url:o.url,headers:o.headers,body:o.json}),o.files)for(let s in o.files){let a=o.files[s]||[];for(let u of a)r.append("requests."+n+"."+s,u)}}return r.append("@jsonPayload",JSON.stringify({requests:i})),t=Object.assign({method:"POST",body:r},t),this.client.send("/api/batch",t)}},Cf=class{constructor(t,r){this.requests=[],this.requests=t,this.collectionIdOrName=r}upsert(t,r){r=Object.assign({body:t||{}},r);let i={method:"PUT",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(i,r),this.requests.push(i)}create(t,r){r=Object.assign({body:t||{}},r);let i={method:"POST",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records"};this.prepareRequest(i,r),this.requests.push(i)}update(t,r,i){i=Object.assign({body:r||{}},i);let n={method:"PATCH",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(t)};this.prepareRequest(n,i),this.requests.push(n)}delete(t,r){r=Object.assign({},r);let i={method:"DELETE",url:"/api/collections/"+encodeURIComponent(this.collectionIdOrName)+"/records/"+encodeURIComponent(t)};this.prepareRequest(i,r),this.requests.push(i)}prepareRequest(t,r){if(If(r),t.headers=r.headers,t.json={},t.files={},r.query!==void 0){let n=Ef(r.query);n&&(t.url+=(t.url.includes("?")?"&":"?")+n)}let i=r.body;kf(i)&&(i=(function(o){let s={};return o.forEach(((a,u)=>{if(u==="@jsonPayload"&&typeof a=="string")try{let c=JSON.parse(a);Object.assign(s,c)}catch(c){console.warn("@jsonPayload error:",c)}else s[u]!==void 0?(Array.isArray(s[u])||(s[u]=[s[u]]),s[u].push(Vy(a))):s[u]=Vy(a)})),s})(i));for(let n in i){let o=i[n];if(xf(o))t.files[n]=t.files[n]||[],t.files[n].push(o);else if(Array.isArray(o)){let s=[],a=[];for(let u of o)xf(u)?s.push(u):a.push(u);if(s.length>0&&s.length==o.length){t.files[n]=t.files[n]||[];for(let u of s)t.files[n].push(u)}else if(t.json[n]=a,s.length>0){let u=n;n.startsWith("+")||n.endsWith("+")||(u+="+"),t.files[u]=t.files[u]||[];for(let c of s)t.files[u].push(c)}}else t.json[n]=o}}},Wr=class{get baseUrl(){return this.baseURL}set baseUrl(t){this.baseURL=t}constructor(t="/",r,i="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseURL=t,this.lang=i,r?this.authStore=r:typeof window<"u"&&window.Deno?this.authStore=new Vr:this.authStore=new hf,this.collections=new yf(this),this.files=new $f(this),this.logs=new Df(this),this.settings=new gf(this),this.realtime=new Ss(this),this.health=new bf(this),this.backups=new _f(this),this.crons=new wf(this)}get admins(){return this.collection("_superusers")}createBatch(){return new Sf(this)}collection(t){return this.recordServices[t]||(this.recordServices[t]=new vf(this,t)),this.recordServices[t]}autoCancellation(t){return this.enableAutoCancellation=!!t,this}cancelRequest(t){return this.cancelControllers[t]&&(this.cancelControllers[t].abort(),delete this.cancelControllers[t]),this}cancelAllRequests(){for(let t in this.cancelControllers)this.cancelControllers[t].abort();return this.cancelControllers={},this}filter(t,r){if(!r)return t;for(let i in r){let n=r[i];switch(typeof n){case"boolean":case"number":n=""+n;break;case"string":n="'"+n.replace(/'/g,"\\'")+"'";break;default:n=n===null?"null":n instanceof Date?"'"+n.toISOString().replace("T"," ")+"'":"'"+JSON.stringify(n).replace(/'/g,"\\'")+"'"}t=t.replaceAll("{:"+i+"}",n)}return t}getFileUrl(t,r,i={}){return console.warn("Please replace pb.getFileUrl() with pb.files.getURL()"),this.files.getURL(t,r,i)}buildUrl(t){return console.warn("Please replace pb.buildUrl() with pb.buildURL()"),this.buildURL(t)}buildURL(t){let r=this.baseURL;return typeof window>"u"||!window.location||r.startsWith("https://")||r.startsWith("http://")||(r=window.location.origin?.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseURL.startsWith("/")||(r+=window.location.pathname||"/",r+=r.endsWith("/")?"":"/"),r+=this.baseURL),t&&(r+=r.endsWith("/")?"":"/",r+=t.startsWith("/")?t.substring(1):t),r}async send(t,r){r=this.initSendOptions(t,r);let i=this.buildURL(t);if(this.beforeSend){let n=Object.assign({},await this.beforeSend(i,r));n.url!==void 0||n.options!==void 0?(i=n.url||i,r=n.options||r):Object.keys(n).length&&(r=n,console?.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(r.query!==void 0){let n=Ef(r.query);n&&(i+=(i.includes("?")?"&":"?")+n),delete r.query}return this.getHeader(r.headers,"Content-Type")=="application/json"&&r.body&&typeof r.body!="string"&&(r.body=JSON.stringify(r.body)),(r.fetch||fetch)(i,r).then((async n=>{let o={};try{o=await n.json()}catch(s){if(r.signal?.aborted||s?.name=="AbortError"||s?.message=="Aborted")throw s}if(this.afterSend&&(o=await this.afterSend(n,o,r)),n.status>=400)throw new Ee({url:n.url,status:n.status,data:o});return o})).catch((n=>{throw new Ee(n)}))}initSendOptions(t,r){if((r=Object.assign({method:"GET"},r)).body=(function(n){if(typeof FormData>"u"||n===void 0||typeof n!="object"||n===null||kf(n)||!qy(n))return n;let o=new FormData;for(let s in n){let a=n[s];if(a!==void 0)if(typeof a!="object"||qy({data:a})){let u=Array.isArray(a)?a:[a];for(let c of u)o.append(s,c)}else{let u={};u[s]=a,o.append("@jsonPayload",JSON.stringify(u))}}return o})(r.body),If(r),r.query=Object.assign({},r.params,r.query),r.requestKey===void 0&&(r.$autoCancel===!1||r.query.$autoCancel===!1?r.requestKey=null:(r.$cancelKey||r.query.$cancelKey)&&(r.requestKey=r.$cancelKey||r.query.$cancelKey)),delete r.$autoCancel,delete r.query.$autoCancel,delete r.$cancelKey,delete r.query.$cancelKey,this.getHeader(r.headers,"Content-Type")!==null||kf(r.body)||(r.headers=Object.assign({},r.headers,{"Content-Type":"application/json"})),this.getHeader(r.headers,"Accept-Language")===null&&(r.headers=Object.assign({},r.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(r.headers,"Authorization")===null&&(r.headers=Object.assign({},r.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&r.requestKey!==null){let i=r.requestKey||(r.method||"GET")+t;delete r.requestKey,this.cancelRequest(i);let n=new AbortController;this.cancelControllers[i]=n,r.signal=n.signal}return r}getHeader(t,r){t=t||{},r=r.toLowerCase();for(let i in t)if(i.toLowerCase()==r)return t[i];return null}};function Jy(e){let t=new Wr(e.baseUrl);return t.autoCancellation(!1),e.token&&t.authStore.save(e.token),(e.tenantId||e.accountId)&&(t.beforeSend=(r,i)=>{let n=i.headers;return e.tenantId&&(n["X-Tenant-Id"]=e.tenantId),e.accountId&&(n["X-Account-Id"]=e.accountId),{url:r,options:i}}),t}function P(e){return e instanceof Error?e.message:String(e)}async function S(e,t){let r=zt(e);try{let i=await t();return gt(r),i}catch(i){gt(r),g("%s",P(i))}}function v(e){xe()?zy(e.json()):e.human()}function rk(e){let t={};return e.token&&(t.Authorization=`Bearer ${e.token}`),e.tenantId&&(t["X-Tenant-Id"]=e.tenantId),e.accountId&&(t["X-Account-Id"]=e.accountId),t}function Ky(e){if(!e.length)throw new Error("empty batch response");let t=e[0];if(t.error?.message)throw new Error(`tRPC error: ${t.error.message}`);if(!t.result?.data)throw new Error("unexpected response format");return t.result.data.json}var Is=class{baseUrl;headers;constructor(t){this.baseUrl=t.baseUrl.replace(/\/+$/,""),this.headers=rk(t)}async query(t,r){let n=encodeURIComponent(JSON.stringify({0:{json:r}})),o=`${this.baseUrl}/trpc/${t}?batch=1&input=${n}`,s=await fetch(o,{headers:this.headers});s.status>=400&&await this.throwHttpError(s);let a=await s.json();return Ky(a)}async mutate(t,r){let i={0:{json:r}},n=`${this.baseUrl}/trpc/${t}?batch=1`,o=await fetch(n,{method:"POST",headers:{...this.headers,"Content-Type":"application/json"},body:JSON.stringify(i)});o.status>=400&&await this.throwHttpError(o);let s=await o.json();return Ky(s)}async throwHttpError(t){let r;try{let i=await t.json();Array.isArray(i)&&i[0]?.error?.message?r=i[0].error.message:r=JSON.stringify(i)}catch{r=await t.text()}throw new Error(`${t.status}: ${r}`)}};var Of="";function Hy(e){Of=e}function te(){return Of}function ik(e,t){let r=`${t}-pb`,i=e.services[r];return i||g('no PB URL for "%s" (expected services["%s"] in profile)',t,r),i}async function Gr(){let e=J(Of),{cfg:t,profile:r}=Y(e),i=await ns(t,e,r);return{cfg:t,profile:r,token:i}}async function T(e){let{cfg:t,profile:r,token:i}=await Gr(),n=Jy({baseUrl:ik(r,e),token:i,tenantId:Ue(r),accountId:Ne(r)});return{cfg:t,profile:r,client:n}}async function X(e){let{profile:t,token:r}=await Gr(),i=t.services[e];return i||g("no %s API URL configured (run `zenku profile show` to check)",e),new Is({baseUrl:i,token:r,tenantId:Ue(t),accountId:Ne(t)})}async function jt(){let{cfg:e,profile:t,token:r}=await Gr(),i=t.services.agent;return i||g("no agent API URL configured (run `zenku profile show` to check)"),{client:ff({baseUrl:i,auth:{type:"jwt",getToken:()=>r,tenantId:Ue(t),accountId:Ne(t)}}),profile:t,cfg:e}}function W(e){return e==null?"":String(e)}function vt(e,t){return e.length<=t?e:e.slice(0,t-3)+"..."}function Fe(e){if(e==="-")try{return(0,Ff.readFileSync)(0,"utf-8")}catch{g("failed to read from stdin")}if(e.startsWith("@")){let t=e.slice(1);try{return(0,Ff.readFileSync)(t,"utf-8")}catch(r){g("failed to read file %s: %s",t,P(r))}}return e}async function Yy(e,t,r,i){let n=i??await Ty("Password",{flagHint:"--email <email> --password <password>"});if(n===null)return null;if(!n)throw new Error("password is required");let o=zt("Authenticating...");try{return await Ov(e,t,r,n)}finally{gt(o)}}async function Xy(e,t,r,i){let n=zt("Requesting OTP..."),o="";try{o=await Pv(e,t,r)}finally{gt(n)}E("OTP sent to %s",r);let s=i??await Ie("Enter OTP code",{flagHint:"--otp <email> --otp-code <code>"});if(s===null)return null;if(!s)throw new Error("OTP code is required");let a=zt("Verifying OTP...");try{return await Av(e,t,o,s)}finally{gt(a)}}async function Qy(e,t,r){let i=zt("Fetching auth methods..."),n;try{n=await _p(e,t)}finally{gt(i)}if(n.oauth2Providers.length===0)throw new Error("no OAuth2 providers configured");let o;if(r){if(o=n.oauth2Providers.find(s=>s.name===r),!o)throw new Error(`provider "${r}" not found`)}else if(n.oauth2Providers.length===1)o=n.oauth2Providers[0];else{let s=await tn("Choose OAuth provider",n.oauth2Providers.map(a=>({value:a.name,label:a.displayName})),{flagHint:"--provider <name>"});if(s===null)return null;o=n.oauth2Providers.find(a=>a.name===s)}if(!o)throw new Error("provider not found");return zv(e,t,o)}async function ok(e,t){let r=[],i=zt("Fetching auth methods...");try{let s=await _p(e,t);s.password&&r.push({label:"Password",kind:"password"}),s.otp&&r.push({label:"OTP (email code)",kind:"otp"}),s.oauth2Providers.length>0&&r.push({label:"OAuth2 (browser)",kind:"oauth"})}catch{r.push({label:"Password",kind:"password"})}finally{gt(i)}if(r.length===0)throw new Error("no auth methods available");if(r.length>1){let s=await tn("Choose auth method",r.map(u=>({value:u.kind,label:u.label})),{flagHint:"--email, --otp, or --oauth"});if(s===null)return null;let a=r.findIndex(u=>u.kind===s);if(a>0){let u=r[a];r.splice(a,1),r.unshift(u)}}let n=r[0];if(!n)throw new Error("unknown auth method");if(n.kind==="oauth")return Qy(e,t,"");let o=await Ie("Email",{flagHint:"--email <email>"});if(o===null)return null;if(n.kind==="password")return Yy(e,t,o);if(n.kind==="otp")return Xy(e,t,o);throw new Error("unknown auth method")}function eD(e){let t=new O("login").description("Authenticate with a PocketBase instance").option("--email <email>","login with email + password").option("--password <password>","password for non-interactive login").option("--otp <email>","login with OTP (email code)").option("--otp-code <code>","OTP code for non-interactive login").option("--oauth","login with OAuth2 browser flow").option("--provider <provider>","OAuth2 provider name (with --oauth)").action(async r=>{[!!r.email,!!r.otp,!!r.oauth].filter(Boolean).length>1&&g("choose only one auth mode: --email, --otp, or --oauth"),r.password&&!r.email&&g("--password requires --email <email>"),r.otpCode&&!r.otp&&g("--otp-code requires --otp <email>"),r.provider&&!r.oauth&&g("--provider requires --oauth");let n=J(te()),o,s;try{({cfg:o,profile:s}=Y(n))}catch(a){g("%s",P(a))}try{let a;if(r.email?a=await Yy(He(s),s.collection,r.email,r.password):r.otp?a=await Xy(He(s),s.collection,r.otp,r.otpCode):r.oauth?a=await Qy(He(s),s.collection,r.provider??""):a=await ok(He(s),s.collection),!a)return;if(s.token=a.token,s.userId=a.userId,s.email=a.email,pe(o,n,s),!s.accountId&&le()){let u=He(s),c=await ws(u,a.token,a.userId);c&&(s.accountId=c,pe(o,n,s))}v({json:()=>({email:a.email,userId:a.userId}),human:()=>C("Logged in as %s",a.email)})}catch(a){g("%s",P(a))}});e.addCommand(t)}function tD(e){let t=new O("logout").description("Clear authentication token").action(()=>{let r=J(te());try{let{cfg:i,profile:n}=Y(r);n.token="",n.userId="",n.email="",pe(i,r,n),C('Logged out from profile "%s"',r)}catch(i){g("%s",P(i))}});e.addCommand(t)}function nD(e){let t=new O("whoami").description("Show current user and profile").action(()=>{let r=J(te()),i,n;try{({cfg:i,profile:n}=Y(r))}catch(l){g("%s",P(l))}n.token||g("not logged in (run `zenku login`)");let o;try{o=jv(n.token)}catch(l){g("%s",`invalid token: ${P(l)}`)}let s=i.defaultProfile===r,a=o.getTime()-Date.now(),u=Ue(n),c=Ne(n);v({json:()=>({profile:r,default:s,email:n.email,userId:n.userId,authPb:He(n),tenantId:u||null,accountId:c||null,expiresAt:o.toISOString(),expiresIn:wp(Math.max(a,0))}),human:()=>{let l=s?" (default)":"";process.stdout.write(`Profile: ${r}${l}
129
- `),process.stdout.write(`Email: ${n.email}
130
- `),process.stdout.write(`User ID: ${n.userId}
131
- `),process.stdout.write(`Auth PB: ${He(n)}
132
- `),u&&process.stdout.write(`Tenant ID: ${u}
133
- `),c&&process.stdout.write(`Account ID: ${c}
134
- `),a<=0?process.stdout.write("Token: expired (run `zenku login`)\n"):process.stdout.write(`Token: expires in ${wp(a)}
135
- `)}})});e.addCommand(t)}var Es={enabled:!0,channel:"latest",checkIntervalMinutes:30,notifyInNonInteractive:!0,autoApplyStandalone:!0};function Pf(e){if(!e)return;let t=e.trim().toLowerCase();if(["1","true","yes","on"].includes(t))return!0;if(["0","false","no","off"].includes(t))return!1}function sk(e){if(!e)return;let t=Number.parseInt(e,10);if(!(!Number.isInteger(t)||t<=0))return t}function ak(e){if(e&&(e==="latest"||e==="stable"))return e}function Af(e){return!e||!Number.isFinite(e)?Es.checkIntervalMinutes:e<1?1:Math.floor(e)}function uk(e){return{enabled:e.updates.enabled,channel:e.updates.channel,checkIntervalMinutes:Af(e.updates.checkIntervalMinutes),notifyInNonInteractive:e.updates.notifyInNonInteractive,autoApplyStandalone:e.updates.autoApplyStandalone}}function ck(e){return e?.updates??{}}function Ut(e,t){let r=uk(e),i=ck(t),n={enabled:i.enabled??r.enabled,channel:r.channel,checkIntervalMinutes:Af(i.checkIntervalMinutes??r.checkIntervalMinutes),notifyInNonInteractive:i.notifyInNonInteractive??r.notifyInNonInteractive,autoApplyStandalone:i.autoApplyStandalone??r.autoApplyStandalone},o=ak(process.env.ZENKU_UPDATER_CHANNEL),s=sk(process.env.ZENKU_UPDATER_INTERVAL_MINUTES),a=Pf(process.env.ZENKU_UPDATER_NOTIFY_NON_INTERACTIVE),u=Pf(process.env.ZENKU_UPDATER_AUTO_APPLY_STANDALONE),c=Pf(process.env.ZENKU_DISABLE_AUTOUPDATER);return o&&(n.channel=o),s&&(n.checkIntervalMinutes=Af(s)),a!==void 0&&(n.notifyInNonInteractive=a),u!==void 0&&(n.autoApplyStandalone=u),c===!0&&(n.enabled=!1),{global:r,profileOverride:i,effective:n}}function Jr(e){return e.trim().replace(/\/+$/g,"")}function rD(e){return e&&(e.length<=10?`${e}...`:`${e.slice(0,10)}...`)}function zf(e,t){if(e===void 0)return;let r=e.trim().toLowerCase();if(["1","true","yes","on"].includes(r))return!0;if(["0","false","no","off"].includes(r))return!1;g('invalid %s value "%s" (expected true|false)',t,e)}function lk(e){if(e===void 0)return;let t=Number.parseInt(e,10);return(!Number.isInteger(t)||t<=0)&&g('invalid --interval "%s" (expected positive integer)',e),t}function dk(e){if(e!==void 0){if(e==="latest"||e==="stable")return e;g('invalid --channel "%s" (expected latest|stable)',e)}}function pk(e){return e??{}}function fk(){let e=new O("profile").description("Manage connection profiles");e.command("create").description("Create a new profile").argument("<name>","profile name").action(async r=>{try{let i=we();i.profiles[r]&&g('profile "%s" already exists',r);let n=await Ie("Auth collection",{placeholder:"users"});if(n===null)return;let o=await Ie("Auth PB URL (for login/token refresh)",{placeholder:"https://pb-myapp.example.com"});if(o===null)return;let s=await Ie("Kanban PB URL (optional)",{placeholder:"https://pb-kanban.example.com"});if(s===null)return;let a=await Ie("Kanban API URL (optional)",{placeholder:"https://kanban-api.example.com"});if(a===null)return;let u=await Ie("Library PB URL (optional)",{placeholder:"https://pb-library.example.com"});if(u===null)return;let c=await Ie("Library API URL (optional)",{placeholder:"https://library-api.example.com"});if(c===null)return;let l=Jr(o);l||g("Auth PB URL is required");let d=n.trim()||"users",p={"auth-pb":l},f=Jr(s),y=Jr(a),w=Jr(u),F=Jr(c);f&&(p["kanban-pb"]=f),y&&(p.kanban=y),w&&(p["library-pb"]=w),F&&(p.library=F),pe(i,r,{collection:d,services:p,token:"",userId:"",email:"",tenantId:"",accountId:"",kanbanProject:""}),(Object.keys(i.profiles).length===1||!i.defaultProfile)&&(i.defaultProfile=r,Ht(i)),C('Profile "%s" created',r)}catch(i){g("%s",P(i))}}),e.command("list").description("List all profiles").action(()=>{try{let r=we();v({json:()=>r.profiles,human:()=>{let i=Object.entries(r.profiles).map(([n,o])=>[n,n===r.defaultProfile?"*":"",Object.keys(o.services).filter(s=>!s.endsWith("-pb")).join(", ")||"-",o.token?"yes":"no"]);B(["NAME","DEFAULT","SERVICES","LOGGED IN"],i)}})}catch(r){g("%s",P(r))}}),e.command("use").description("Set the default profile").argument("<name>","profile name").action(r=>{try{let i=we();i.profiles[r]||g('profile "%s" not found',r),i.defaultProfile=r,Ht(i),C('Default profile set to "%s"',r)}catch(i){g("%s",P(i))}}),e.command("show").description("Show profile details").argument("[name]","profile name").action(r=>{let i=r&&r.length>0?r:J(te());try{let{cfg:n,profile:o}=Y(i);v({json:()=>{let s={...o,token:rD(o.token)};return{name:i,default:n.defaultProfile===i,profile:s}},human:()=>{let s=n.defaultProfile===i?" (default)":"";process.stdout.write(`Profile: ${i}${s}
136
- `),process.stdout.write(` Collection: ${o.collection}
137
- `);for(let[a,u]of Object.entries(o.services))process.stdout.write(` ${a}: ${u}
138
- `);o.email&&process.stdout.write(` Email: ${o.email}
139
- `),o.token?process.stdout.write(` Token: ${rD(o.token)}
140
- `):process.stdout.write(` Token: (not logged in)
141
- `),o.tenantId&&process.stdout.write(` Tenant ID: ${o.tenantId}
142
- `),o.accountId&&process.stdout.write(` Account ID: ${o.accountId}
143
- `)}})}catch(n){g("%s",P(n))}}),e.command("delete").description("Delete a profile").argument("<name>","profile name").action(r=>{try{let i=we();i.profiles[r]||g('profile "%s" not found',r),delete i.profiles[r],i.defaultProfile===r&&(i.defaultProfile=""),Ht(i),C('Profile "%s" deleted',r)}catch(i){g("%s",P(i))}}),e.command("context").description("Display resolved tenant and account context").action(()=>{let r=J(te()),i;try{({profile:i}=Y(r))}catch(s){g("%s",P(s))}let n=Ue(i),o=Ne(i);v({json:()=>({tenantId:n||null,accountId:o||null,profile:r}),human:()=>{process.stdout.write(`Profile: ${r}
144
- `),process.stdout.write(`Tenant ID: ${n||"(not set)"}
145
- `),process.stdout.write(`Account ID: ${o||"(not set)"}
146
- `)}})}),e.command("set").description("Set tenant and/or account in profile").option("--tenant-id <id>","tenant ID to store").option("--account-id <id>","account ID to store").action(r=>{!r.tenantId&&!r.accountId&&g("specify --tenant-id <id> and/or --account-id <id>");let i=J(te()),n,o;try{({cfg:n,profile:o}=Y(i))}catch(s){g("%s",P(s))}r.tenantId&&(o.tenantId=r.tenantId),r.accountId&&(o.accountId=r.accountId),pe(n,i,o),v({json:()=>({tenantId:o.tenantId||null,accountId:o.accountId||null}),human:()=>{r.tenantId&&C("Tenant ID set to %s",r.tenantId),r.accountId&&C("Account ID set to %s",r.accountId)}})}),e.command("clear").description("Remove tenant and/or account from profile").option("--tenant-id","clear tenant ID").option("--account-id","clear account ID").action(r=>{let i=!r.tenantId&&!r.accountId,n=J(te()),o,s;try{({cfg:o,profile:s}=Y(n))}catch(a){g("%s",P(a))}(i||r.tenantId)&&(s.tenantId=""),(i||r.accountId)&&(s.accountId=""),pe(o,n,s),v({json:()=>({tenantId:s.tenantId||null,accountId:s.accountId||null}),human:()=>{i?C("Tenant and account context cleared."):r.tenantId?C("Tenant ID cleared."):C("Account ID cleared.")}})}),e.command("switch").description("Set account context by ID or pick interactively").option("--account-id <id>","set account context directly (non-interactive)").action(async r=>{if(r.accountId){let u=J(te()),c,l;try{({cfg:c,profile:l}=Y(u))}catch(d){g("%s",P(d))}l.accountId=r.accountId,pe(c,u,l),v({json:()=>({accountId:r.accountId}),human:()=>C("Account set to %s",r.accountId)});return}let{cfg:i,profile:n,client:o}=await T("auth"),s=await ws(o.baseURL,o.authStore.token,n.userId);if(!s){E("No account selected.");return}let a=J(te());n.accountId=s,pe(i,a,n),v({json:()=>({accountId:s}),human:()=>C("Account set to %s",s)})});let t=new O("updates").description("Manage updater settings");return t.command("show").description("Show updater settings (global, profile override, effective)").argument("[name]","profile name").action(r=>{let i=r&&r.length>0?r:J(te());try{let{cfg:n,profile:o}=Y(i),{global:s,profileOverride:a,effective:u}=Ut(n,o);v({json:()=>({profile:i,global:s,profileOverride:a,effective:u}),human:()=>{process.stdout.write(`Profile: ${i}
147
- `),process.stdout.write(`Global channel: ${s.channel}
148
- `),process.stdout.write(`Global enabled: ${String(s.enabled)}
149
- `),process.stdout.write(`Global interval: ${String(s.checkIntervalMinutes)}m
150
- `),process.stdout.write(`Global notify non-interactive: ${String(s.notifyInNonInteractive)}
151
- `),process.stdout.write(`Global auto-apply standalone: ${String(s.autoApplyStandalone)}
152
- `),process.stdout.write(`Profile override enabled: ${String(a.enabled??"(unset)")}
153
- `),process.stdout.write(`Profile override interval: ${String(a.checkIntervalMinutes??"(unset)")}
154
- `),process.stdout.write(`Profile override notify non-interactive: ${String(a.notifyInNonInteractive??"(unset)")}
155
- `),process.stdout.write(`Profile override auto-apply standalone: ${String(a.autoApplyStandalone??"(unset)")}
156
- `),process.stdout.write(`Effective:
157
- `),process.stdout.write(` enabled: ${String(u.enabled)}
158
- `),process.stdout.write(` channel: ${u.channel}
159
- `),process.stdout.write(` interval: ${String(u.checkIntervalMinutes)}m
160
- `),process.stdout.write(` notify non-interactive: ${String(u.notifyInNonInteractive)}
161
- `),process.stdout.write(` auto-apply standalone: ${String(u.autoApplyStandalone)}
162
- `)}})}catch(n){g("%s",P(n))}}),t.command("set").description("Set updater settings globally or for the current profile").option("--global","update global settings instead of profile override").option("--enabled <bool>","enable/disable updater").option("--interval <minutes>","check interval in minutes").option("--notify-non-interactive <bool>","emit update notices in non-interactive mode").option("--auto-apply-standalone <bool>","auto-apply updates for standalone installs").option("--channel <channel>","release channel: latest|stable (global only)").action(r=>{let i=zf(r.enabled,"--enabled"),n=lk(r.interval),o=zf(r.notifyNonInteractive,"--notify-non-interactive"),s=zf(r.autoApplyStandalone,"--auto-apply-standalone"),a=dk(r.channel);if(i!==void 0||n!==void 0||o!==void 0||s!==void 0||a!==void 0||g("specify at least one setting (--enabled/--interval/--notify-non-interactive/--auto-apply-standalone/--channel)"),!r.global&&a!==void 0&&g("--channel can only be set with --global"),r.global){let f=we(),y={...f.updates};i!==void 0&&(y.enabled=i),n!==void 0&&(y.checkIntervalMinutes=n),o!==void 0&&(y.notifyInNonInteractive=o),s!==void 0&&(y.autoApplyStandalone=s),a!==void 0&&(y.channel=a),f.updates=y,Ht(f),v({json:()=>({scope:"global",updates:f.updates}),human:()=>C("Global updater settings updated.")});return}let c=J(te()),l,d;try{({cfg:l,profile:d}=Y(c))}catch(f){g("%s",P(f))}let p=pk(d.updates);i!==void 0&&(p.enabled=i),n!==void 0&&(p.checkIntervalMinutes=n),o!==void 0&&(p.notifyInNonInteractive=o),s!==void 0&&(p.autoApplyStandalone=s),d.updates=p,pe(l,c,d),v({json:()=>({scope:"profile",profile:c,updates:p}),human:()=>C('Updater settings updated for profile "%s".',c)})}),t.command("reset").description("Reset updater settings globally or for the current profile").option("--global","reset global settings to defaults").action(r=>{if(r.global){let s=we();s.updates={...Es},Ht(s),v({json:()=>({scope:"global",updates:s.updates}),human:()=>C("Global updater settings reset to defaults.")});return}let i=J(te()),n,o;try{({cfg:n,profile:o}=Y(i))}catch(s){g("%s",P(s))}delete o.updates,pe(n,i,o),v({json:()=>({scope:"profile",profile:i,updates:{}}),human:()=>C('Updater overrides reset for profile "%s".',i)})}),e.addCommand(t),e}function iD(e){e.addCommand(fk())}function mk(e){let t=e.trim().toLowerCase();return t=t.replace(/[^a-z0-9]+/g,"-"),t=t.replace(/^-+|-+$/g,""),t||"account"}async function oD(e,t){let r=await e.collection("roles").getList(1,1,{filter:`slug='${t}'`});if(r.items.length===0)throw new Error(`role "${t}" not found`);return r.items[0].id}function hk(){let e=new O("accounts").description("Manage RBAC accounts");e.command("list").description("List accounts").action(async()=>{let{client:i}=await T("library"),n=await S("Fetching accounts...",()=>i.collection("accounts").getList(1,200,{sort:"-created"}));v({json:()=>n.items,human:()=>{let o=n.items.map(s=>[s.id,s.name,s.type,s.slug,s.created]);B(["ID","NAME","TYPE","SLUG","CREATED"],o)}})}),e.command("get").description("Get account details").argument("<id>","account ID").action(async i=>{let{client:n}=await T("library"),o=await S("Fetching account...",()=>n.collection("accounts").getOne(i));v({json:()=>o,human:()=>{process.stdout.write(`ID: ${o.id}
163
- `),process.stdout.write(`Name: ${o.name}
164
- `),process.stdout.write(`Type: ${o.type}
165
- `),process.stdout.write(`Slug: ${o.slug}
166
- `),process.stdout.write(`Created: ${o.created}
167
- `)}})}),e.command("create").description("Create an account").requiredOption("--name <name>","account name").option("--type <type>","account type (personal/team)","team").action(async i=>{let{profile:n,client:o}=await T("library"),s=mk(i.name),a=await S("Creating account...",()=>o.collection("accounts").create({name:i.name,type:i.type,slug:s,owner:n.userId}));v({json:()=>a,human:()=>C("Account created: %s (%s)",a.name,a.id)})});let t=new O("members").description("Manage account members");t.command("list").description("List members of an account").argument("<account-id>","account ID").action(async i=>{let{client:n}=await T("library"),o=await S("Fetching members...",()=>n.collection("account_members").getList(1,200,{filter:`account='${i}'`,expand:"role,user",sort:"-created"}));v({json:()=>o.items,human:()=>{let s=o.items.map(a=>{let u="",c="",l=a.expand;return l&&(l.user&&(u=W(l.user.email)),l.role&&(c=W(l.role.name))),[a.id,u,c,a.created]});B(["ID","USER","ROLE","CREATED"],s)}})}),t.command("add").description("Add a member to an account").argument("<account-id>","account ID").requiredOption("--user <id>","user ID to add").requiredOption("--role <slug>","role slug").action(async(i,n)=>{let{client:o}=await T("library"),s=await S("Resolving role...",()=>oD(o,n.role)),a=await S("Adding member...",()=>o.collection("account_members").create({account:i,user:n.user,role:s}));v({json:()=>a,human:()=>C("Member added: %s",a.id)})}),t.command("remove").description("Remove a member from an account").argument("<account-id>","account ID").argument("<member-id>","member ID").action(async(i,n)=>{let{client:o}=await T("library");await S("Removing member...",()=>o.collection("account_members").delete(n)),v({json:()=>({deleted:!0}),human:()=>C("Member removed")})}),e.addCommand(t);let r=new O("invitations").description("Manage account invitations");return r.command("list").description("List invitations for an account").argument("<account-id>","account ID").action(async i=>{let{client:n}=await T("library"),o=await S("Fetching invitations...",()=>n.collection("account_invitations").getList(1,200,{filter:`account='${i}'`,expand:"role",sort:"-created"}));v({json:()=>o.items,human:()=>{let s=o.items.map(a=>{let u="",c=a.expand;return c?.role&&(u=W(c.role.name)),[a.id,a.email,u,a.accepted_at?"accepted":"pending",a.created]});B(["ID","EMAIL","ROLE","STATUS","CREATED"],s)}})}),r.command("create").description("Create an invitation").argument("<account-id>","account ID").requiredOption("--email <email>","email to invite").requiredOption("--role <slug>","role slug").action(async(i,n)=>{let{client:o}=await T("library"),s=await S("Resolving role...",()=>oD(o,n.role)),a=await S("Creating invitation...",()=>o.collection("account_invitations").create({account:i,email:n.email,role:s}));v({json:()=>a,human:()=>C("Invitation sent to %s",n.email)})}),e.addCommand(r),e}function sD(e){e.addCommand(hk())}function gk(){let e=new O("roles").description("Manage RBAC roles");return e.command("list").description("List all roles").action(async()=>{let{client:t}=await T("library"),r=await S("Fetching roles...",()=>t.collection("roles").getList(1,200,{sort:"name"}));v({json:()=>r.items,human:()=>{let i=r.items.map(n=>[n.id,n.name,n.slug,n.is_system?"yes":""]);B(["ID","NAME","SLUG","SYSTEM"],i)}})}),e}function aD(e){e.addCommand(gk())}var uD=require("node:child_process");function Gn(e,t){let r=e.name(),i=`${t?.webService??r}-web`,n=`${t?.pbService??r}-pb`;e.command("web").description(`Open the ${r} web UI in the browser (auto-login if authenticated)`).option("--no-open","print the URL without opening the browser").action(async({open:o})=>{let s=J(te()),{cfg:a,profile:u}=Y(s),c=u.services[i];if(!c){let d=u.services[n];if(d)try{let p=new URL(d);p.hostname=p.hostname.replace(/^pb-/,""),c=p.toString().replace(/\/$/,"")}catch{}}c||g(`no ${i} URL configured (add ${i} to profile services)`);let l=c;if(u.token)try{let d=await ns(a,s,u),p=u.services[n];if(p){let f=new URLSearchParams({token:d,pbUrl:p,collection:u.collection,...u.accountId&&{accountId:u.accountId}}).toString();l=`${c}/auth/token#${f}`}}catch{}if(o){let d=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";(0,uD.exec)(`${d} "${l}"`)}v({json:()=>({url:c,authenticated:l!==c}),human:()=>E("Opening %s",c)})})}function vk(){let e=new O("library").description("Library memory commands (agents, nodes, sessions, messages, summaries)"),t=new O("agents").description("Manage library agents");t.command("list").description("List agents").action(async()=>{let{client:s}=await T("library"),a=await S("Fetching agents...",()=>s.collection("agents").getList(1,200,{sort:"-created"}));v({json:()=>a.items,human:()=>{let u=a.items.map(c=>[c.id,c.name,c.slug,c.created]);B(["ID","NAME","SLUG","CREATED"],u)}})}),t.command("get").description("Get agent details").argument("<id>","agent ID").action(async s=>{let{client:a}=await T("library"),u=await S("Fetching agent...",()=>a.collection("agents").getOne(s));v({json:()=>u,human:()=>{process.stdout.write(`ID: ${u.id}
168
- `),process.stdout.write(`Name: ${u.name}
169
- `),process.stdout.write(`Slug: ${u.slug}
170
- `),process.stdout.write(`Created: ${u.created}
171
- `)}})});let r=new O("nodes").description("Manage library knowledge nodes");r.command("list").description("List knowledge nodes").action(async()=>{let{client:s}=await T("library"),a=await S("Fetching nodes...",()=>s.collection("nodes").getList(1,200,{sort:"-created"}));v({json:()=>a.items,human:()=>{let u=a.items.map(c=>[c.id,c.title,c.type,c.slug,c.created]);B(["ID","TITLE","TYPE","SLUG","CREATED"],u)}})}),r.command("get").description("Get node details").argument("<id>","node ID").action(async s=>{let{client:a}=await T("library"),u=await S("Fetching node...",()=>a.collection("nodes").getOne(s));v({json:()=>u,human:()=>{process.stdout.write(`ID: ${u.id}
172
- `),process.stdout.write(`Title: ${u.title}
173
- `),process.stdout.write(`Type: ${u.type}
174
- `),process.stdout.write(`Slug: ${u.slug}
175
- `),process.stdout.write(`Parent: ${u.parent}
176
- `),process.stdout.write(`Created: ${u.created}
177
- `);let c=u.content;c&&process.stdout.write(`
178
- ${c}
179
- `)}})}),r.command("tree").description("Get node tree").option("--depth <n>","tree depth (1-10)","3").option("--node <id>","root node ID").action(async s=>{let a=await X("library"),u=Number(s.depth),l={depth:Number.isNaN(u)?3:u};s.node&&(l.nodeId=s.node);let d=await S("Fetching tree...",()=>a.query("nodes.getTree",l));v({json:()=>d,human:()=>{process.stdout.write(JSON.stringify(d,null,2)+`
180
- `)}})}),r.command("create").description("Create a knowledge node").requiredOption("--title <title>","node title").option("--type <type>","node type (folder/document)","document").requiredOption("--slug <slug>","node slug").option("--parent <id>","parent node ID").option("--content <content>","node content (use @file or - for stdin)").action(async s=>{let a=await X("library"),u={title:s.title,slug:s.slug,type:s.type};s.parent&&(u.parent=s.parent),s.content&&(u.content=Fe(s.content));let c=await S("Creating node...",()=>a.mutate("nodes.create",u));v({json:()=>c,human:()=>{let l=c;C("Node created: %s (%s)",l.title,l.id)}})}),r.command("update").description("Update a knowledge node").argument("<id>","node ID").option("--title <title>","new title").option("--content <content>","new content (use @file or - for stdin)").action(async(s,a)=>{let u=await X("library"),c={id:s};a.title&&(c.title=a.title),a.content&&(c.content=Fe(a.content));let l=await S("Updating node...",()=>u.mutate("nodes.update",c));v({json:()=>l,human:()=>C("Node updated")})}),r.command("delete").description("Delete a knowledge node").argument("<id>","node ID").action(async s=>{let a=await X("library");await S("Deleting node...",()=>a.mutate("nodes.delete",{id:s})),v({json:()=>({deleted:!0}),human:()=>C("Node deleted")})});let i=new O("sessions").description("Manage library sessions");i.command("list").description("List sessions").option("--status <status>","filter by status").action(async s=>{let{client:a}=await T("library"),u=s.status?`status='${s.status}'`:"",c=await S("Fetching sessions...",()=>a.collection("sessions").getList(1,200,{sort:"-created",filter:u}));v({json:()=>c.items,human:()=>{let l=c.items.map(d=>[d.id,d.session_key,d.agent,d.status,d.created]);B(["ID","SESSION KEY","AGENT","STATUS","CREATED"],l)}})}),i.command("get").description("Get session details").argument("<id>","session ID").action(async s=>{let{client:a}=await T("library"),u=await S("Fetching session...",()=>a.collection("sessions").getOne(s));v({json:()=>u,human:()=>{process.stdout.write(`ID: ${u.id}
181
- `),process.stdout.write(`Session Key: ${u.session_key}
182
- `),process.stdout.write(`Agent: ${u.agent}
183
- `),process.stdout.write(`Status: ${u.status}
184
- `),process.stdout.write(`Channel: ${u.channel}
185
- `),process.stdout.write(`Created: ${u.created}
186
- `)}})});let n=new O("messages").description("View session messages");n.command("list").description("List messages for a session").requiredOption("--session <id>","session ID").action(async s=>{let{client:a}=await T("library"),u=await S("Fetching messages...",()=>a.collection("messages").getList(1,200,{filter:`session='${s.session}'`,sort:"sequence"}));v({json:()=>u.items,human:()=>{let c=u.items.map(l=>[String(l.sequence),l.role,vt(l.content,80),l.created]);B(["SEQ","ROLE","CONTENT","CREATED"],c)}})});let o=new O("summaries").description("View session summaries");return o.command("list").description("List session summaries").option("--session <id>","filter by session ID").action(async s=>{let{client:a}=await T("library"),u=s.session?`session='${s.session}'`:"",c=await S("Fetching summaries...",()=>a.collection("session_summaries").getList(1,200,{sort:"-created",filter:u}));v({json:()=>c.items,human:()=>{let l=c.items.map(d=>[d.id,d.session,vt(d.summary,60),d.created]);B(["ID","SESSION","SUMMARY","CREATED"],l)}})}),e.addCommand(t),e.addCommand(r),e.addCommand(i),e.addCommand(n),e.addCommand(o),Gn(e,{webService:"workspace"}),e}function cD(e){e.addCommand(vk())}function yk(e,t){return[...t,e]}function L(e,t){return e.getOptionValueSource(t)==="cli"}function Re(e){return typeof e=="object"&&e!==null?e:null}function Z(e,t){return W(e[t])}function Hr(e,t){let r=Re(e[t]);return r?Z(r,"name"):""}function lD(e,t){let r=Re(e[t]);if(!r)return"";let i=Z(r,"name");return i!==""?i:Z(r,"email")}function Yr(e,t){let r=Re(e.expand);if(!r)return"";let i=Re(r[t]);return i?Z(i,"name"):""}function dD(e,t){let r=Re(e.expand);if(!r)return"";let i=Re(r[t]);if(!i)return"";let n=Z(i,"name");return n!==""?n:Z(i,"email")}async function nn(e,t){let r=await e.collection("issues").getList(1,1,{filter:`key='${t}'`});return r.items.length===0&&g('issue "%s" not found',t),r.items[0].id}async function Kr(e,t,r){let i=J(te()),{profile:n}=Y(i),s=(L(e,"project")?t.project:void 0)??(n.kanbanProject||"");if(!s)return null;let u=await(r??(await T("kanban")).client).collection("projects").getList(1,1,{filter:`key='${s}'`});return u.items.length===0&&g('project "%s" not found',s),{key:s,id:u.items[0].id}}function Dk(e){let t=[];for(let r of e){let i=Re(r);if(!i)continue;let n=Hr(i,"status");n===""&&(n=Z(i,"status_name")),n===""&&(n=Yr(i,"status_id"));let o=Hr(i,"type");o===""&&(o=Z(i,"type_name")),o===""&&(o=Yr(i,"type_id"));let s=lD(i,"assignee");s===""&&(s=Z(i,"assignee_name")),s===""&&(s=dD(i,"assignee_id"));let a=Z(i,"created");a===""&&(a=Z(i,"createdAt")),t.push([Z(i,"key"),Z(i,"title"),n,o,s,a])}return t}function bk(){let e=new O("kanban").description("Kanban project management commands"),t=new O("projects").description("Manage kanban projects");t.command("list").description("List projects").action(async()=>{let{client:s}=await T("kanban"),a=await S("Fetching projects...",()=>s.collection("projects").getList(1,200,{sort:"-created"}));v({json:()=>a.items,human:()=>{let u=a.items.map(c=>[c.id,c.key,c.name,c.created]);B(["ID","KEY","NAME","CREATED"],u)}})}),t.command("get").description("Get project details").argument("<id-or-key>","project ID or key").action(async s=>{let{client:a}=await T("kanban"),u=await S("Fetching project...",async()=>{try{return await a.collection("projects").getOne(s)}catch(c){let l;try{l=await a.collection("projects").getList(1,1,{filter:`key='${s}'`})}catch{throw c}return l.items.length===0&&g('project "%s" not found',s),l.items[0]}});v({json:()=>u,human:()=>{process.stdout.write(`ID: ${u.id}
187
- `),process.stdout.write(`Key: ${u.key}
188
- `),process.stdout.write(`Name: ${u.name}
189
- `),process.stdout.write(`Created: ${u.created}
190
- `)}})}),t.command("create").description("Create a project").option("--name <name>","project name").option("--key <key>","project key").option("--description <description>","project description").action(async(s,a)=>{let{client:u}=await T("kanban");(!s.name||!s.key)&&g("--name and --key are required");let c={name:s.name,key:s.key};L(a,"description")&&(c.description=s.description??"");let l=await S("Creating project...",()=>u.collection("projects").create(c));v({json:()=>l,human:()=>{B(["ID","KEY","NAME"],[[l.id,l.key,l.name]]),C("Project created: %s (%s)",l.key,l.name)}})}),t.command("update").description("Update a project").argument("<id>","project ID").option("--name <name>","project name").option("--description <description>","project description").option("--archive","archive project").option("--unarchive","unarchive project").action(async(s,a,u)=>{let{client:c}=await T("kanban");a.archive&&a.unarchive&&g("--archive and --unarchive cannot be used together");let l={};L(u,"name")&&(l.name=a.name??""),L(u,"description")&&(l.description=a.description??""),a.archive&&(l.is_archived=!0),a.unarchive&&(l.is_archived=!1),Object.keys(l).length===0&&g("no fields to update");let d=await S("Updating project...",()=>c.collection("projects").update(s,l));v({json:()=>d,human:()=>C("Project updated")})});let r=new O("issues").description("Manage kanban issues");r.command("list").description("List issues").option("--project <key>","filter by project key").option("--status <id>","filter by status ID").option("--priority <id>","filter by priority ID").option("--type <id>","filter by type ID").option("--assignee <id>","filter by assignee ID").option("--parent <id>","filter by parent issue ID").option("--search <query>","search term").option("--page <number>","page number",s=>Number.parseInt(s,10)).option("--per-page <number>","items per page",s=>Number.parseInt(s,10)).action(async(s,a)=>{let u=await X("kanban"),c={},l=await Kr(a,s);l&&(c.projectId=l.id),L(a,"status")&&(c.statusId=s.status??""),L(a,"priority")&&(c.priorityId=s.priority??""),L(a,"type")&&(c.typeId=s.type??""),L(a,"assignee")&&(c.assigneeId=s.assignee??""),L(a,"parent")&&(c.parentId=s.parent??""),L(a,"search")&&(c.search=s.search??""),L(a,"page")&&(c.page=s.page??0),L(a,"per-page")&&(c.perPage=s.perPage??0);let d=await S("Fetching issues...",()=>u.query("issues.list",c));v({json:()=>d,human:()=>{let p=Re(d),f=Array.isArray(p?.items)?p.items:[];B(["KEY","TITLE","STATUS","TYPE","ASSIGNEE","CREATED"],Dk(f))}})}),r.command("get").description("Get issue by key").argument("<key>","issue key").option("--format <format>","description format: json (Block[]), editing ([{id,html}]), text (plain)").option("--no-comments","omit comments").action(async(s,a)=>{let{client:u}=await T("kanban"),c=await X("kanban"),{issue:l,commentItems:d}=await S("Fetching issue...",async()=>{let p=await nn(u,s),f=a.format??(xe()?"json":"text"),y=await c.query("issues.get",{id:p,format:f}),w=[];return a.comments&&(w=(await u.collection("comments").getList(1,200,{filter:`issue='${p}'`,sort:"created"})).items),{issue:Re(y)??{},commentItems:w}});v({json:()=>({...l,...a.comments?{comments:d}:{}}),human:()=>{process.stdout.write(`Key: ${Z(l,"key")}
191
- `),process.stdout.write(`Title: ${Z(l,"title")}
192
- `),process.stdout.write(`Status: ${Z(l,"status_id")}
193
- `),process.stdout.write(`Type: ${Z(l,"type_id")}
194
- `);let p=Z(l,"priority_id");p!==""&&process.stdout.write(`Priority: ${p}
195
- `);let f=Z(l,"assignee_id");f!==""&&process.stdout.write(`Assignee: ${f}
196
- `),process.stdout.write(`Created: ${Z(l,"created")}
197
- `);let y=W(l.description);if(y!==""&&process.stdout.write(`
198
- ${y}
199
- `),d.length>0){process.stdout.write(`
200
- Comments (${d.length}):
201
- `);for(let w of d){let F=Z(w,"author_id"),R=W(w.content),Q=Z(w,"created");process.stdout.write(` [${Q}] ${F}: ${R}
202
- `)}}}})}),r.command("create").description("Create an issue").option("--project <key>","project key").option("--title <title>","issue title").option("--type-id <id>","issue type ID").option("--status-id <id>","issue status ID").option("--description <text>","issue description (use @file or - for stdin)").option("--priority <id>","priority ID").option("--assignee <id>","assignee user ID").option("--parent <id>","parent issue ID").option("--due-date <iso>","due date in ISO 8601").option("--estimate <points>","story points estimate",s=>Number.parseInt(s,10)).action(async(s,a)=>{let u=await X("kanban"),c=await Kr(a,s);c||g("no project set (use --project <key> or `zenku kanban use <key>`)"),s.title||g("--title is required"),(!s.typeId||!s.statusId)&&g("--type-id and --status-id are required");let l={project:c.id,title:s.title,type_id:s.typeId,status_id:s.statusId};L(a,"description")&&(l.description=Fe(s.description??"")),L(a,"priority")&&(l.priority_id=s.priority??""),L(a,"assignee")&&(l.assignee_id=s.assignee??""),L(a,"parent")&&(l.parent=s.parent??""),L(a,"due-date")&&(l.due_date=s.dueDate??""),L(a,"estimate")&&(l.estimate_points=s.estimate??0);let d=await S("Creating issue...",()=>u.mutate("issues.create",l));v({json:()=>d,human:()=>{let p=Re(d)??{};C("Issue created: %s (%s)",Z(p,"key"),Z(p,"title"))}})}),r.command("update").description("Update an issue").argument("<key>","issue key").option("--status <id>","new status ID").option("--title <title>","new title").option("--description <text>","new description (use @file or - for stdin)").option("--type <id>","new type ID").option("--priority <id>","new priority ID").option("--assignee <id>","new assignee user ID").option("--parent <id>","new parent issue ID").option("--due-date <iso>","new due date in ISO 8601").option("--estimate <points>","new story points estimate",s=>Number.parseInt(s,10)).action(async(s,a,u)=>{let{client:c}=await T("kanban"),l=await X("kanban"),p={id:await nn(c,s)};L(u,"status")&&(p.status_id=a.status??""),L(u,"title")&&(p.title=a.title??""),L(u,"description")&&(p.description=Fe(a.description??"")),L(u,"type")&&(p.type_id=a.type??""),L(u,"priority")&&(p.priority_id=a.priority??""),L(u,"assignee")&&(p.assignee_id=a.assignee??""),L(u,"parent")&&(p.parent=a.parent??""),L(u,"due-date")&&(p.due_date=a.dueDate??""),L(u,"estimate")&&(p.estimate_points=a.estimate??0),Object.keys(p).length===1&&g("no fields to update");let f=await S("Updating issue...",()=>l.mutate("issues.update",p));v({json:()=>f,human:()=>C("Issue updated")})}),r.command("ready").description("List ready issues").option("--project <key>","project key").option("--priority <id>","priority ID").option("--type <id>","type ID").option("--assignee <id>","assignee ID").option("--page <number>","page number",s=>Number.parseInt(s,10)).option("--per-page <number>","items per page",s=>Number.parseInt(s,10)).action(async(s,a)=>{let u=await X("kanban"),c={},l=await Kr(a,s);l&&(c.projectId=l.id),s.priority&&(c.priorityId=s.priority),s.type&&(c.typeId=s.type),s.assignee&&(c.assigneeId=s.assignee),L(a,"page")&&(c.page=s.page??0),L(a,"per-page")&&(c.perPage=s.perPage??0);let d=await S("Fetching ready issues...",()=>u.query("issues.listReady",c));v({json:()=>d,human:()=>{let p=Re(d),f=Array.isArray(p?.items)?p.items:[],y=[];for(let w of f){let F=Re(w);if(!F)continue;let R=Hr(F,"status");R===""&&(R=Z(F,"status_name")),R===""&&(R=Yr(F,"status_id"));let Q=Hr(F,"priority");Q===""&&(Q=Z(F,"priority_name")),Q===""&&(Q=Yr(F,"priority_id"));let z=Hr(F,"type");z===""&&(z=Z(F,"type_name")),z===""&&(z=Yr(F,"type_id"));let G=lD(F,"assignee");G===""&&(G=Z(F,"assignee_name")),G===""&&(G=dD(F,"assignee_id")),y.push([Z(F,"key"),Z(F,"title"),R,Q,z,G])}B(["KEY","TITLE","STATUS","PRIORITY","TYPE","ASSIGNEE"],y)}})});let i=new O("links").description("Manage issue links");i.command("add").description("Create an issue link").option("--issue <key>","source issue key").option("--target <key>","target issue key").option("--type <type>","link type").action(async s=>{let{client:a}=await T("kanban");(!s.issue||!s.target||!s.type)&&g("--issue, --target, and --type are required"),new Set(["blocks","blocked_by","relates_to","duplicates","duplicated_by"]).has(s.type)||g('invalid --type "%s"',s.type);let c=await nn(a,s.issue),l=await nn(a,s.target),d=await S("Creating link...",()=>a.collection("issue_links").create({source_issue:c,target_issue:l,link_type:s.type}));v({json:()=>d,human:()=>C("Link created")})}),i.command("remove").description("Remove an issue link").argument("<id>","link ID").action(async s=>{let{client:a}=await T("kanban");await S("Removing link...",()=>a.collection("issue_links").delete(s)),v({json:()=>({id:s,removed:!0}),human:()=>C("Link removed")})}),r.addCommand(i);let n=new O("labels").description("Manage kanban labels");n.command("list").description("List labels").option("--project <key>","project key").action(async(s,a)=>{let{client:u}=await T("kanban"),c=await Kr(a,s,u);c||g("no project set (use --project <key> or `zenku kanban use <key>`)");let l=await S("Fetching labels...",()=>u.collection("labels").getList(1,200,{filter:`project='${c.id}'`,sort:"name"}));v({json:()=>l.items,human:()=>{let d=l.items.map(p=>[p.id,p.name,p.color]);B(["ID","NAME","COLOR"],d)}})}),n.command("add").description("Add a label to an issue (auto-creates the label if needed)").option("--issue <key>","issue key").option("--name <name>","label name").option("--project <key>","project key").option("--color <color>","label color (default: #6b7280)").action(async(s,a)=>{let{client:u}=await T("kanban");(!s.issue||!s.name)&&g("--issue and --name are required");let c=await Kr(a,s,u);c||g("no project set (use --project <key> or `zenku kanban use <key>`)");let l=await nn(u,s.issue),{junction:d,created:p}=await S("Adding label...",async()=>{let f="",y=!1,w=await u.collection("labels").getList(1,1,{filter:`project='${c.id}' && name='${s.name}'`});return w.items.length>0?f=w.items[0].id:(f=(await u.collection("labels").create({project:c.id,name:s.name,color:s.color??"#6b7280"})).id,y=!0),{junction:await u.collection("issue_labels").create({issue:l,label:f}),created:y}});v({json:()=>({...d,label_created:p}),human:()=>C("Label added: %s%s",s.name,p?" (created)":"")})}),n.command("update").description("Update a label").argument("<id>","label ID").option("--name <name>","label name").option("--color <color>","label color").option("--description <description>","label description").action(async(s,a,u)=>{let{client:c}=await T("kanban"),l={};L(u,"name")&&(l.name=a.name??""),L(u,"color")&&(l.color=a.color??""),L(u,"description")&&(l.description=a.description??""),Object.keys(l).length===0&&g("no fields to update");let d=await S("Updating label...",()=>c.collection("labels").update(s,l));v({json:()=>d,human:()=>C("Label updated")})}),n.command("remove").description("Remove labels from an issue").option("--issue <key>","issue key").option("--label <id>","label ID (repeatable)",yk,[]).action(async s=>{let{client:a}=await T("kanban");(!s.issue||s.label.length===0)&&g("--issue and --label are required");let u=await nn(a,s.issue),c=await S("Removing labels...",async()=>{let l=0;for(let d of s.label){let p=await a.collection("issue_labels").getList(1,1,{filter:`issue='${u}' && label='${d}'`});p.items.length===0&&g('issue label not found for issue "%s" and label "%s"',s.issue,d),await a.collection("issue_labels").delete(p.items[0].id),l+=1}return l});v({json:()=>({removed:c}),human:()=>C("Removed %d label(s)",c)})});let o=new O("comments").description("Manage issue comments");return o.command("create").description("Create a comment on an issue").option("--issue <key>","issue key").option("--content <text>","comment content (use @file or - for stdin)").option("--internal","mark as internal comment").action(async(s,a)=>{let{client:u}=await T("kanban"),c=await X("kanban");(!s.issue||!s.content)&&g("--issue and --content are required");let d={issue:await nn(u,s.issue),content:Fe(s.content)};L(a,"internal")&&(d.is_internal=!!s.internal);let p=await S("Creating comment...",()=>c.mutate("comments.create",d));v({json:()=>p,human:()=>C("Comment created")})}),o.command("get").description("Get a comment by ID").argument("<id>","comment ID").option("--format <format>","content format: json (Block[]), editing ([{id,html}]), text (plain)").action(async(s,a)=>{let u=await X("kanban"),c=a.format??(xe()?"json":"text"),l=await S("Fetching comment...",()=>u.query("comments.get",{id:s,format:c}));v({json:()=>l,human:()=>{let d=Re(l)??{};process.stdout.write(`ID: ${Z(d,"id")}
203
- `),process.stdout.write(`Author: ${Z(d,"author_id")}
204
- `),process.stdout.write(`Created: ${Z(d,"created")}
205
- `);let p=W(d.content);p!==""&&process.stdout.write(`
206
- ${p}
207
- `)}})}),o.command("update").description("Update a comment").argument("<id>","comment ID").option("--content <text>","comment content (use @file or - for stdin)").action(async(s,a)=>{let u=await X("kanban");a.content||g("--content is required");let c=await S("Updating comment...",()=>u.mutate("comments.update",{id:s,content:Fe(a.content)}));v({json:()=>c,human:()=>C("Comment updated")})}),e.addCommand(t),e.addCommand(r),e.addCommand(n),e.addCommand(o),e.command("use").description("Set or show the default kanban project").argument("[project-key]","project key to set as default").option("--clear","remove the stored default project").action(async(s,a)=>{let u=J(te()),{cfg:c,profile:l}=Y(u);if(a?.clear){l.kanbanProject="",pe(c,u,l),v({json:()=>({project:null}),human:()=>C("Default project cleared.")});return}if(!s){v({json:()=>({project:l.kanbanProject||null}),human:()=>{l.kanbanProject?E('Default project: "%s"',l.kanbanProject):E("No default project set.")}});return}let{client:d}=await T("kanban");(await d.collection("projects").getList(1,1,{filter:`key='${s}'`})).items.length===0&&g('project "%s" not found',s),l.kanbanProject=s,pe(c,u,l),v({json:()=>({project:s}),human:()=>C('Default project set to "%s"',s)})}),Gn(e),e}function pD(e){e.addCommand(bk())}var $k="\x1B[2m",_k="\x1B[33m",wk="\x1B[31m",Uf="\x1B[0m";function Oe(e){return`${$k}${e}${Uf}`}function xk(e){return`${_k}${e}${Uf}`}function Os(e){return`${wk}${e}${Uf}`}function kk(e){switch(e.type){case"message":{let t=e.message;if(t.role==="assistant"&&t.content)process.stdout.write(t.content);else if(t.role==="assistant"&&t.tool_calls?.length)for(let r of t.tool_calls)process.stderr.write(Oe(`[tool] ${r.name}(${vt(r.arguments,60)})`)+`
208
- `);else if(t.role==="tool"){let r=typeof t.tool_result=="string"?t.tool_result:JSON.stringify(t.tool_result??"");process.stderr.write(Oe(`[result] ${t.tool_name??"?"} \u2192 ${vt(r,80)}`)+`
209
- `)}break}case"agent:start":process.stderr.write(Oe("[agent] started")+`
210
- `);break;case"agent:exit":process.stderr.write(Oe(`[agent] exited (code=${e.exitCode})`)+`
211
- `);break;case"agent:metadata":{let t=[];e.cost!==void 0&&t.push(`cost=$${e.cost.toFixed(4)}`),e.durationMs!==void 0&&t.push(`duration=${(e.durationMs/1e3).toFixed(1)}s`),e.numTurns!==void 0&&t.push(`turns=${e.numTurns}`),t.length>0&&process.stderr.write(Oe(t.join(" "))+`
212
- `);break}case"interaction:approval_requested":process.stderr.write(xk(`[approval] ${e.approval.type}: ${e.approval.summary}`)+`
213
- `);break;case"interaction:approval_resolved":process.stderr.write(Oe(`[resolved] ${e.decision}`)+`
214
- `);break;case"interaction:a2ui_update":{let{display:t}=fD(e.message);t&&process.stderr.write(t+`
215
- `);break}case"session:status":process.stderr.write(Oe(`[session] ${e.status}`)+`
216
- `);break;case"error":process.stderr.write(Os(`[error] ${e.message}`)+`
217
- `);break;case"keepalive":case"interaction:client_event":break}}function Sk(e){process.stdout.write(JSON.stringify(e)+`
218
- `)}async function Ps(e,t,r,i){let n=e.subscribe(t,r,i),o={buffer:[],consumerWaiting:null,producerDone:!1},s,a=new Promise(l=>{s=l}),u=!0;(async()=>{try{for await(let l of n){if(i?.aborted)break;u&&(u=!1,s()),o.buffer.push(l),o.consumerWaiting?.(),o.consumerWaiting=null}}catch{}finally{o.producerDone=!0,s(),o.consumerWaiting?.(),o.consumerWaiting=null}})(),await a;async function*c(){for(;;){if(i?.aborted)return;for(;o.buffer.length>0;)yield o.buffer.shift();if(o.producerDone)return;await new Promise(l=>{o.consumerWaiting=l})}}return c()}async function As(e,t,r,i){for await(let n of e)if(r?.aborted||(n.type==="message"&&n.message.id&&(t.lastEventId=n.message.id),n.type==="interaction:approval_requested"&&(t.lastApproval=n.approval),n.type==="interaction:a2ui_update"&&(t.lastA2UI={message:n.message,callbackToken:n.callbackToken}),xe()?Sk(n):kk(n),i?.breakOnExit&&n.type==="agent:exit"))break}async function Ck(e,t){if(t.type==="input-required"){let i=await Ie(t.summary,{flagHint:"--input"});return i===null?!1:(await e.resolve(t.callbackToken,{decision:"submit",userInput:i}),!0)}let r=await cf(t.summary,{flagHint:"--decision approve|deny"});return r===null?!1:(await e.resolve(t.callbackToken,{decision:r?"approve":"deny"}),!0)}async function Ik(e,t){let{prompts:r}=fD(t.message);if(r.length===0)return!1;let i={};for(let n of r)if(n.type==="select"){let o=await tn(n.label,n.options.map(s=>({value:s.value,label:s.label})));if(o===null)return!1;i[n.id]=o}else if(n.type==="text"){let o=await Ie(n.label);if(o===null)return!1;i[n.id]=o}else if(n.type==="confirm"){let o=await cf(n.label);if(o===null)return!1;i[n.id]=o}else if(n.type==="number"){let o=await Ie(`${n.label} (${n.min??0}\u2013${n.max??100})`);if(o===null)return!1;i[n.id]=Number(o)}return await e.resolve(t.callbackToken,{userInput:JSON.stringify(i)}),!0}async function Fs(e,t,r,i,n){let o=t;for(;!i?.aborted;){let s={};if(await As(o,s,i,{breakOnExit:n?.breakOnExit}),i?.aborted||!s.lastApproval&&!s.lastA2UI||!le()||!r)break;let a=!1;if(s.lastApproval?a=await Ck(e,s.lastApproval):s.lastA2UI&&(a=await Ik(e,s.lastA2UI)),!a)break;o=await Ps(e,r,s.lastEventId?{lastEventId:s.lastEventId}:void 0,i)}}function Jn(e){return e?e.literalString??e.path??"":""}function Tf(e){let t=Object.keys(e.component);if(t.length===0)return null;let r=t[0],i=e.component[r];return{type:r,props:i}}function fD(e){let t=[],r=[];if(!e.surfaceUpdate)return{display:"",prompts:r};let{components:i}=e.surfaceUpdate,n=new Map;for(let a of i)n.set(a.id,a);function o(a){let u=Tf(a);if(!u)return;let{type:c,props:l}=u;switch(c){case"Text":{let d=Jn(l.text),p=l.usageHint;p==="h1"||p==="h2"?t.push(`\x1B[1m${d}\x1B[0m`):p==="caption"?t.push(Oe(d)):t.push(d);break}case"Image":{let d=Jn(l.url);t.push(Oe(`[image] ${d}`));break}case"Divider":t.push("---");break;case"Button":{let d=l.child,p=l.action,f=p?.name??"button";if(d){let y=n.get(d);if(y){let w=Tf(y);w?.type==="Text"&&(f=Jn(w.props.text))}}r.push({id:a.id,type:"select",label:"Action",options:[{value:p?.name??a.id,label:f}]});break}case"TextField":{let d=Jn(l.label);r.push({id:a.id,type:"text",label:d||"Input",options:[]});break}case"CheckBox":{let d=Jn(l.label);r.push({id:a.id,type:"confirm",label:d||"Confirm",options:[]});break}case"MultipleChoice":{let d=l.options?.map(p=>({value:p.value,label:Jn(p.label)}))??[];r.push({id:a.id,type:"select",label:"Choose",options:d});break}case"Slider":{let d=l.minValue,p=l.maxValue;r.push({id:a.id,type:"number",label:"Value",options:[],min:d,max:p});break}case"Row":case"Column":case"List":{let d=l.children;if(d?.explicitList)for(let p of d.explicitList){let f=n.get(p);f&&o(f)}break}case"Card":{let d=l.child;if(d){let p=n.get(d);p&&o(p)}break}default:break}}let s=new Set;for(let a of i){let u=Tf(a);if(!u)continue;let{props:c}=u;typeof c.child=="string"&&s.add(c.child);let l=c.children;if(l?.explicitList)for(let d of l.explicitList)s.add(d)}for(let a of i)s.has(a.id)||o(a);return{display:t.join(`
219
- `),prompts:r}}function jf(){let e=new AbortController,t=()=>{e.abort(),process.exit(130)};return process.on("SIGINT",t),{controller:e,cleanup:()=>process.removeListener("SIGINT",t)}}function Ek(){let e=new O("agent").description("AI agent streaming, chat, and async execution");e.command("stream").description("Stream agent output (one-shot)").requiredOption("--prompt <text>","prompt text (use @file or - for stdin)").option("--agent <slug>","agent slug").option("--conversation <id>","conversation ID").action(async r=>{let{client:i}=await jt(),n=Fe(r.prompt),{controller:o,cleanup:s}=jf();try{let a=i.stream({prompt:n,agentSlug:r.agent,conversationId:r.conversation},o.signal);le()&&!xe()?await Fs(i,a,r.conversation,o.signal):await As(a,{},o.signal)}catch(a){if(a instanceof DOMException&&a.name==="AbortError")return;g("%s",P(a))}finally{o.abort(),s()}});let t=new O("chat").description("Multi-turn conversation with an agent");return t.option("--conversation <id>","reuse an existing conversation").option("--agent <slug>","agent slug").option("--prompt <text>","initial prompt (non-interactive mode)").action(async r=>{let{client:i}=await jt(),{controller:n,cleanup:o}=jf();try{let s=r.conversation??`cli-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,a=await i.createConversation(s,{agentSlug:r.agent});if(xe()||process.stderr.write(Oe(`[chat] conversation: ${a.conversationId}${a.isNew?" (new)":""}`)+`
220
- `),!le()&&!r.prompt&&g("--prompt is required in non-interactive mode"),!le()&&r.prompt){let d=Fe(r.prompt),p=await Ps(i,a.conversationId,void 0,n.signal);await i.sendMessage(a.conversationId,d),await As(p,{},n.signal,{breakOnExit:!0});return}let c=(await import("node:readline")).createInterface({input:process.stdin,output:process.stderr,terminal:!0});if(r.prompt){let d=Fe(r.prompt);process.stderr.write(Oe(`> ${vt(d,80)}`)+`
221
- `);let p=await Ps(i,a.conversationId,void 0,n.signal);await i.sendMessage(a.conversationId,d),await Fs(i,p,a.conversationId,n.signal,{breakOnExit:!0}),process.stdout.write(`
222
- `)}let l=()=>new Promise(d=>{c.question("> ",p=>{d(p)}),c.once("close",()=>d(null))});for(;!n.signal.aborted;){let d=await l();if(d===null)break;let p=d.trim();if(p==="/quit"||p==="/exit"||p==="/q")break;if(!p)continue;let f=await Ps(i,a.conversationId,void 0,n.signal);await i.sendMessage(a.conversationId,p),await Fs(i,f,a.conversationId,n.signal,{breakOnExit:!0}),process.stdout.write(`
223
- `)}c.close()}catch(s){if(s instanceof DOMException&&s.name==="AbortError")return;g("%s",P(s))}finally{n.abort(),o()}}),t.command("info").description("Get conversation details").argument("<conversation-id>","conversation ID").action(async r=>{let{client:i}=await jt();try{let n=await i.getConversation(r);v({json:()=>n,human:()=>{process.stdout.write(`Conversation: ${n.conversationId}
224
- `),process.stdout.write(`Created: ${n.created}
225
- `)}})}catch(n){g("%s",P(n))}}),e.addCommand(t),e.command("run").description("Start async agent execution").requiredOption("--prompt <text>","prompt text (use @file or - for stdin)").option("--agent <slug>","agent slug").option("--conversation <id>","conversation ID").option("--follow","poll for completion").option("--poll-interval <seconds>","polling interval in seconds","5").action(async r=>{let{client:i}=await jt(),n=Fe(r.prompt);try{let o=await i.async({prompt:n,agentSlug:r.agent,conversationId:r.conversation});if(!r.follow){v({json:()=>o,human:()=>{process.stdout.write(`Tracking key: ${o.trackingKey}
226
- `),process.stdout.write(`Status: ${o.status}
227
- `),o.conversationId&&process.stdout.write(`Conversation: ${o.conversationId}
228
- `),o.statusUrl&&process.stdout.write(`Status URL: ${o.statusUrl}
229
- `)}});return}let s=Number(r.pollInterval)*1e3;xe()||process.stderr.write(Oe(`[run] tracking: ${o.trackingKey} (polling every ${r.pollInterval}s)`)+`
230
- `);let a=o;for(;a.status!=="completed"&&a.status!=="failed";)await new Promise(u=>setTimeout(u,s)),a=await i.getStatus(o.trackingKey),xe()||process.stderr.write(Oe(`[run] status: ${a.status}`)+`
231
- `);v({json:()=>a,human:()=>{process.stdout.write(`Status: ${a.status}
232
- `),a.result?.output&&process.stdout.write(a.result.output+`
233
- `),a.error&&process.stderr.write(Os(`Error: ${a.error}`)+`
234
- `)}})}catch(o){g("%s",P(o))}}),e.command("sync").description("Synchronous agent execution (blocks until complete)").requiredOption("--prompt <text>","prompt text (use @file or - for stdin)").option("--agent <slug>","agent slug").option("--conversation <id>","conversation ID").action(async r=>{let{client:i}=await jt(),n=Fe(r.prompt);try{let o=await i.sync({prompt:n,agentSlug:r.agent,conversationId:r.conversation});v({json:()=>o,human:()=>{process.stdout.write(`Status: ${o.status}
235
- `),o.result?.output&&process.stdout.write(o.result.output+`
236
- `),o.error&&process.stderr.write(Os(`Error: ${o.error}`)+`
237
- `)}})}catch(o){g("%s",P(o))}}),e.command("status").description("Check status of an async agent run").argument("<tracking-key>","tracking key from `agent run`").action(async r=>{let{client:i}=await jt();try{let n=await i.getStatus(r);v({json:()=>n,human:()=>{process.stdout.write(`Tracking key: ${n.trackingKey}
238
- `),process.stdout.write(`Status: ${n.status}
239
- `),n.conversationId&&process.stdout.write(`Conversation: ${n.conversationId}
240
- `),n.result?.output&&process.stdout.write(`
241
- ${n.result.output}
242
- `),n.error&&process.stderr.write(Os(`Error: ${n.error}`)+`
243
- `)}})}catch(n){g("%s",P(n))}}),e.command("resolve").description("Resolve a pending interaction (HITL approval, user input, or A2UI form)").argument("<callback-token>","callback token from the pending interaction").option("--decision <value>","decision: approve, deny, submit, or cancel").option("--input <text>","user input text or JSON for A2UI forms").option("--conversation <id>","conversation ID (subscribe to continuation after resolving)").action(async(r,i)=>{let{client:n}=await jt(),{controller:o,cleanup:s}=jf();try{let a=i.decision;a&&!["approve","deny","submit","cancel"].includes(a)&&g("invalid --decision: %s (expected approve, deny, submit, or cancel)",a);let u=await n.resolve(r,{decision:a,userInput:i.input});if(xe()||process.stderr.write(Oe(`[resolved] ${u.decision}`)+`
244
- `),i.conversation){let c=n.subscribe(i.conversation,void 0,o.signal);le()&&!xe()?await Fs(n,c,i.conversation,o.signal,{breakOnExit:!0}):await As(c,{},o.signal,{breakOnExit:!0})}else v({json:()=>u,human:()=>{E("Resolved (use --conversation to stream continuation)")}})}catch(a){if(a instanceof DOMException&&a.name==="AbortError")return;g("%s",P(a))}finally{o.abort(),s()}}),Gn(e,{pbService:"auth"}),e}function mD(e){e.addCommand(Ek())}var ED=require("node:crypto"),ne=require("node:fs"),FD=require("node:os"),ve=require("node:path");var hD=require("module"),Fk=(0,hD.createRequire)("/"),Ok;try{Ok=Fk("worker_threads").Worker}catch{}var Be=Uint8Array,Kn=Uint16Array,Pk=Int32Array,gD=new Be([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),vD=new Be([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ak=new Be([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yD=function(e,t){for(var r=new Kn(31),i=0;i<31;++i)r[i]=t+=1<<e[i-1];for(var n=new Pk(r[30]),i=1;i<30;++i)for(var o=r[i];o<r[i+1];++o)n[o]=o-r[i]<<5|i;return{b:r,r:n}},DD=yD(gD,2),bD=DD.b,zk=DD.r;bD[28]=258,zk[258]=28;var $D=yD(vD,0),Tk=$D.b,uO=$D.r,Lf=new Kn(32768);for(q=0;q<32768;++q)yt=(q&43690)>>1|(q&21845)<<1,yt=(yt&52428)>>2|(yt&13107)<<2,yt=(yt&61680)>>4|(yt&3855)<<4,Lf[q]=((yt&65280)>>8|(yt&255)<<8)>>1;var yt,q,Xr=(function(e,t,r){for(var i=e.length,n=0,o=new Kn(t);n<i;++n)e[n]&&++o[e[n]-1];var s=new Kn(t);for(n=1;n<t;++n)s[n]=s[n-1]+o[n-1]<<1;var a;if(r){a=new Kn(1<<t);var u=15-t;for(n=0;n<i;++n)if(e[n])for(var c=n<<4|e[n],l=t-e[n],d=s[e[n]-1]++<<l,p=d|(1<<l)-1;d<=p;++d)a[Lf[d]>>u]=c}else for(a=new Kn(i),n=0;n<i;++n)e[n]&&(a[n]=Lf[s[e[n]-1]++]>>15-e[n]);return a}),Qr=new Be(288);for(q=0;q<144;++q)Qr[q]=8;var q;for(q=144;q<256;++q)Qr[q]=9;var q;for(q=256;q<280;++q)Qr[q]=7;var q;for(q=280;q<288;++q)Qr[q]=8;var q,_D=new Be(32);for(q=0;q<32;++q)_D[q]=5;var q;var jk=Xr(Qr,9,1);var Uk=Xr(_D,5,1),Nf=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},Qe=function(e,t,r){var i=t/8|0;return(e[i]|e[i+1]<<8)>>(t&7)&r},Rf=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},Nk=function(e){return(e+7)/8|0},Mf=function(e,t,r){return(t==null||t<0)&&(t=0),(r==null||r>e.length)&&(r=e.length),new Be(e.subarray(t,r))};var Rk=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ge=function(e,t,r){var i=new Error(t||Rk[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,Ge),!r)throw i;return i},Bk=function(e,t,r,i){var n=e.length,o=i?i.length:0;if(!n||t.f&&!t.l)return r||new Be(0);var s=!r,a=s||t.i!=2,u=t.i;s&&(r=new Be(n*3));var c=function(wm){var xm=r.length;if(wm>xm){var km=new Be(Math.max(xm*2,wm));km.set(r),r=km}},l=t.f||0,d=t.p||0,p=t.b||0,f=t.l,y=t.d,w=t.m,F=t.n,R=n*8;do{if(!f){l=Qe(e,d,1);var Q=Qe(e,d+1,3);if(d+=3,Q)if(Q==1)f=jk,y=Uk,w=9,F=5;else if(Q==2){var ai=Qe(e,d,31)+257,ui=Qe(e,d+10,15)+4,gm=ai+Qe(e,d+5,31)+1;d+=14;for(var er=new Be(gm),ta=new Be(19),Le=0;Le<ui;++Le)ta[Ak[Le]]=Qe(e,d+Le*3,7);d+=ui*3;for(var vm=Nf(ta),Gb=(1<<vm)-1,Jb=Xr(ta,vm,1),Le=0;Le<gm;){var ym=Jb[Qe(e,d,Gb)];d+=ym&15;var z=ym>>4;if(z<16)er[Le++]=z;else{var sn=0,ci=0;for(z==16?(ci=3+Qe(e,d,3),d+=2,sn=er[Le-1]):z==17?(ci=3+Qe(e,d,7),d+=3):z==18&&(ci=11+Qe(e,d,127),d+=7);ci--;)er[Le++]=sn}}var Dm=er.subarray(0,ai),wt=er.subarray(ai);w=Nf(Dm),F=Nf(wt),f=Xr(Dm,w,1),y=Xr(wt,F,1)}else Ge(1);else{var z=Nk(d)+4,G=e[z-4]|e[z-3]<<8,De=z+G;if(De>n){u&&Ge(0);break}a&&c(p+G),r.set(e.subarray(z,De),p),t.b=p+=G,t.p=d=De*8,t.f=l;continue}if(d>R){u&&Ge(0);break}}a&&c(p+131072);for(var Kb=(1<<w)-1,Hb=(1<<F)-1,na=d;;na=d){var sn=f[Rf(e,d)&Kb],an=sn>>4;if(d+=sn&15,d>R){u&&Ge(0);break}if(sn||Ge(2),an<256)r[p++]=an;else if(an==256){na=d,f=null;break}else{var bm=an-254;if(an>264){var Le=an-257,tr=gD[Le];bm=Qe(e,d,(1<<tr)-1)+bD[Le],d+=tr}var ra=y[Rf(e,d)&Hb],ia=ra>>4;ra||Ge(3),d+=ra&15;var wt=Tk[ia];if(ia>3){var tr=vD[ia];wt+=Rf(e,d)&(1<<tr)-1,d+=tr}if(d>R){u&&Ge(0);break}a&&c(p+131072);var $m=p+bm;if(p<wt){var _m=o-wt,Yb=Math.min(wt,$m);for(_m+p<0&&Ge(3);p<Yb;++p)r[p]=i[_m+p]}for(;p<$m;++p)r[p]=r[p-wt]}}t.l=f,t.p=na,t.b=p,t.f=l,f&&(l=1,t.m=w,t.d=y,t.n=F)}while(!l);return p!=r.length&&s?Mf(r,0,p):r.subarray(0,p)};var Lk=new Be(0);var ut=function(e,t){return e[t]|e[t+1]<<8},et=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Bf=function(e,t){return et(e,t)+et(e,t+4)*4294967296};function Zk(e,t){return Bk(e,{i:2},t&&t.out,t&&t.dictionary)}var Zf=typeof TextDecoder<"u"&&new TextDecoder,Mk=0;try{Zf.decode(Lk,{stream:!0}),Mk=1}catch{}var qk=function(e){for(var t="",r=0;;){var i=e[r++],n=(i>127)+(i>223)+(i>239);if(r+n>e.length)return{s:t,r:Mf(e,r-1)};n?n==3?(i=((i&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023)):n&1?t+=String.fromCharCode((i&31)<<6|e[r++]&63):t+=String.fromCharCode((i&15)<<12|(e[r++]&63)<<6|e[r++]&63):t+=String.fromCharCode(i)}};function Vk(e,t){if(t){for(var r="",i=0;i<e.length;i+=16384)r+=String.fromCharCode.apply(null,e.subarray(i,i+16384));return r}else{if(Zf)return Zf.decode(e);var n=qk(e),o=n.s,r=n.r;return r.length&&Ge(8),o}}var Wk=function(e,t){return t+30+ut(e,t+26)+ut(e,t+28)},Gk=function(e,t,r){var i=ut(e,t+28),n=Vk(e.subarray(t+46,t+46+i),!(ut(e,t+8)&2048)),o=t+46+i,s=et(e,t+20),a=r&&s==4294967295?Jk(e,o):[s,et(e,t+24),et(e,t+42)],u=a[0],c=a[1],l=a[2];return[ut(e,t+10),u,c,n,o+ut(e,t+30)+ut(e,t+32),l]},Jk=function(e,t){for(;ut(e,t)!=1;t+=4+ut(e,t+2));return[Bf(e,t+12),Bf(e,t+4),Bf(e,t+20)]};function zs(e,t){for(var r={},i=e.length-22;et(e,i)!=101010256;--i)(!i||e.length-i>65558)&&Ge(13);var n=ut(e,i+8);if(!n)return{};var o=et(e,i+16),s=o==4294967295||n==65535;if(s){var a=et(e,i-12);s=et(e,a)==101075792,s&&(n=et(e,a+32),o=et(e,a+48))}for(var u=t&&t.filter,c=0;c<n;++c){var l=Gk(e,o,s),d=l[0],p=l[1],f=l[2],y=l[3],w=l[4],F=l[5],R=Wk(e,F);o=w,(!u||u({name:y,size:p,originalSize:f,compression:d}))&&(d?d==8?r[y]=Zk(e.subarray(R,R+p),{out:new Be(f)}):Ge(14,"unknown compression type "+d):r[y]=Mf(e,R,R+p))}return r}var xD="https://unpkg.com/@zenku/agent-kit",Kk=15e3;async function qf(e,t){let r=new AbortController,i=setTimeout(()=>r.abort(),Kk);try{return await fetch(e,{...t,signal:r.signal})}finally{clearTimeout(i)}}async function wD(e){let t=`${xD}@latest/${e}`,r;try{r=await qf(t)}catch(i){throw i instanceof DOMException&&i.name==="AbortError"?new Error("request timed out"):new Error(`failed to fetch ${e}: ${i instanceof Error?i.message:String(i)}`)}if(r.status===404)throw new Error(`@zenku/agent-kit: ${e} not found`);if(!r.ok)throw new Error(`failed to fetch ${e}: HTTP ${r.status}`);return await r.json()}async function Hk(e){let t=`${xD}@latest/${e}`,r;try{r=await qf(t)}catch(i){throw i instanceof DOMException&&i.name==="AbortError"?new Error("request timed out"):new Error(`failed to fetch ${e}: ${i instanceof Error?i.message:String(i)}`)}if(r.status===404)throw new Error(`@zenku/agent-kit: ${e} not found`);if(!r.ok)throw new Error(`failed to fetch ${e}: HTTP ${r.status}`);return new Uint8Array(await r.arrayBuffer())}function Yk(e){if(e)try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}}function Xk(e,t){let r=[];if(e.skills)for(let[n,o]of Object.entries(e.skills))r.push({name:typeof o.name=="string"?o.name:n,type:"skill",description:typeof o.description=="string"?o.description:""});if(e.agents)for(let[n,o]of Object.entries(e.agents))r.push({name:typeof o.name=="string"?o.name:n,type:"agent",description:typeof o.description=="string"?o.description:"",model:typeof o.model=="string"?o.model:void 0,color:typeof o.color=="string"?o.color:void 0,tools:Yk(typeof o.tools=="string"?o.tools:void 0)});if(e.personas)for(let[n,o]of Object.entries(e.personas))r.push({name:typeof o.name=="string"?o.name:n,type:"persona",description:typeof o.description=="string"?o.description:"",model:typeof o.model=="string"?o.model:void 0,color:typeof o.color=="string"?o.color:void 0});let i={skill:0,agent:1,persona:2};return r.sort((n,o)=>{let s=i[n.type]??99,a=i[o.type]??99;return s!==a?s-a:n.name.localeCompare(o.name)}),{version:t,items:r}}async function ei(){let[e,t]=await Promise.all([wD("manifest.json"),wD("package.json")]);return Xk(e,t.version)}function Ts(e,t){return e.items.find(r=>r.name===t)??null}async function js(e,t){let r={skill:".skill",agent:".agent",persona:".persona"};return Hk(`${{skill:"skills",agent:"agents",persona:"personas"}[t]}/${e}${r[t]}`)}async function kD(e,t){let r;try{r=await qf(`${t}/key`,{headers:{Authorization:`Bearer ${e}`}})}catch(n){throw n instanceof DOMException&&n.name==="AbortError"?new Error("encryption key request timed out"):new Error(`failed to fetch encryption key: ${n instanceof Error?n.message:String(n)}`)}if(r.status===401)throw new Error("authentication required to install kit items (run `zenku login` first)");if(!r.ok)throw new Error(`failed to fetch encryption key: HTTP ${r.status}`);let{key:i}=await r.json();return Buffer.from(i,"hex")}var Qk=["claude","opencode"],Gf={claude:".claude",opencode:".opencode"};function Us(e){if(!e||e==="all")return Qk;if(e==="claude"||e==="opencode")return[e];g('invalid --target "%s" (expected: claude, opencode, all)',e)}function eS(){let e=process.cwd();for(;;){if((0,ne.existsSync)((0,ve.join)(e,".claude"))||(0,ne.existsSync)((0,ve.join)(e,".opencode"))||(0,ne.existsSync)((0,ve.join)(e,".git"))||(0,ne.existsSync)((0,ve.join)(e,"package.json")))return e;let t=(0,ve.resolve)(e,"..");if(t===e)return process.cwd();e=t}}function Ns(e){return e?(0,FD.homedir)():eS()}function Rs(e,t,r,i){let n=Gf[i];return r==="skill"?(0,ve.join)(e,n,"skills",t):(0,ve.join)(e,n,"agents",`${t}.md`)}function tS(e,t){let r=(0,ve.join)(e,Gf[t],"skills");return(0,ne.existsSync)(r)?(0,ne.readdirSync)(r,{withFileTypes:!0}).filter(i=>i.isDirectory()&&(0,ne.existsSync)((0,ve.join)(r,i.name,"SKILL.md"))).map(i=>i.name):[]}function nS(e,t){let r=(0,ve.join)(e,Gf[t],"agents");return(0,ne.existsSync)(r)?(0,ne.readdirSync)(r).filter(i=>i.endsWith(".md")).map(i=>i.slice(0,-3)):[]}function SD(e,t){let r=new Map;for(let i of t){for(let n of tS(e,i)){let o=`skill:${n}`,s=r.get(o);s?s.targets.push(i):r.set(o,{name:n,type:"skill",targets:[i]})}for(let n of nS(e,i)){let o=`agent:${n}`,s=r.get(o);s?s.targets.push(i):r.set(o,{name:n,type:"agent",targets:[i]})}}return[...r.values()].sort((i,n)=>i.type!==n.type?i.type==="skill"?-1:1:i.name.localeCompare(n.name))}function CD(e,t){let r=zs(e);for(let i of Object.keys(r)){if(i.endsWith("/"))continue;let n=(0,ve.join)(t,i);(0,ne.mkdirSync)((0,ve.dirname)(n),{recursive:!0}),(0,ne.writeFileSync)(n,r[i])}}function ID(e,t){let r=zs(e),i=Object.keys(r).find(n=>n.endsWith(".md"));if(!i)throw new Error("no .md file found in agent archive");(0,ne.mkdirSync)((0,ve.dirname)(t),{recursive:!0}),(0,ne.writeFileSync)(t,r[i])}function Vf(e,t){let r=e.slice(0,12),i=e.slice(12,28),n=e.slice(28),o=(0,ED.createDecipheriv)("aes-256-gcm",t,Buffer.from(r));return o.setAuthTag(Buffer.from(i)),new Uint8Array(Buffer.concat([o.update(Buffer.from(n)),o.final()]))}async function Wf(){let e=process.env.AGENT_KIT_ENCRYPTION_KEY;if(e)return Buffer.from(e,"hex");let{profile:t,token:r}=await Gr(),i=t.services["kit-key"];return i||g("no kit-key service URL configured in profile"),kD(r,i)}var Bs=["--target <value>","install target: claude, opencode, all (default: all)"];function rS(){let e=new O("agent-kit").description("Manage skills, agents, and personas from @zenku/agent-kit");return e.command("list").description("List available skills, agents, and personas from @zenku/agent-kit").option("--skills","show skills only").option("--agents","show agents only").option("--personas","show personas only").action(async t=>{let r=await S("Fetching kit catalog...",()=>ei()),i=r.items;t.skills&&(i=i.filter(n=>n.type==="skill")),t.agents&&(i=i.filter(n=>n.type==="agent")),t.personas&&(i=i.filter(n=>n.type==="persona")),v({json:()=>({version:r.version,items:i}),human:()=>{E("@zenku/agent-kit v%s",r.version),B(["NAME","TYPE","DESCRIPTION"],i.map(n=>[n.name,n.type,vt(n.description,60)]))}})}),e.command("info").description("Show metadata for a skill, agent, or persona").argument("<name>","skill, agent, or persona name").action(async t=>{let r=await S("Authenticating...",()=>Wf()),{item:i,files:n,version:o}=await S("Fetching kit catalog...",async()=>{let s=await ei(),a=Ts(s,t);a||g('"%s" not found in agent-kit (run `zenku agent-kit list` to see available items)',t);let u=await js(a.name,a.type),c=Vf(u,r),l=zs(c),d=Object.keys(l).filter(p=>!p.endsWith("/")).sort();return{item:a,files:d,version:s.version}});v({json:()=>({version:o,...i,files:n}),human:()=>{process.stdout.write(`Name: ${i.name}
245
- `),process.stdout.write(`Type: ${i.type}
246
- `),process.stdout.write(`Kit version: ${o}
247
- `),i.model&&process.stdout.write(`Model: ${i.model}
248
- `),i.color&&process.stdout.write(`Color: ${i.color}
249
- `),i.tools&&process.stdout.write(`Tools: ${i.tools.join(", ")}
250
- `),process.stdout.write(`Description: ${i.description}
251
- `),process.stdout.write(`
252
- Contents:
253
- `);for(let s of n)process.stdout.write(` ${s}
254
- `)}})}),e.command("install").description("Install a skill, agent, or persona into the current project").argument("<name>","skill, agent, or persona name").option("--force","overwrite existing installation").option("--global","install to home directory (~/) instead of project root").option(...Bs).action(async(t,r)=>{let i=Us(r.target),n=await S("Authenticating...",()=>Wf()),{item:o,zipBytes:s,version:a}=await S("Fetching kit catalog...",async()=>{let l=await ei(),d=Ts(l,t);d||g('"%s" not found in agent-kit (run `zenku agent-kit list` to see available items)',t);let p=await js(d.name,d.type);return{item:d,zipBytes:Vf(p,n),version:l.version}}),u=Ns(r.global),c=i.map(l=>Rs(u,o.name,o.type,l));if(!r.force){let l=c.filter(d=>(0,ne.existsSync)(d));l.length>0&&g('"%s" is already installed at %s (use --force to overwrite)',t,l.join(", "))}for(let l of c)o.type==="skill"?((0,ne.existsSync)(l)&&(0,ne.rmSync)(l,{recursive:!0}),CD(s,l)):ID(s,l);v({json:()=>({installed:o.name,type:o.type,version:a,targets:i,paths:c}),human:()=>{for(let l of c)C("Installed %s (%s) -> %s",o.name,o.type,l)}})}),e.command("uninstall").description("Remove an installed skill, agent, or persona").argument("<name>","skill, agent, or persona name").option("--global","uninstall from home directory (~/) instead of project root").option(...Bs).action(async(t,r)=>{try{let i=Us(r.target),n=Ns(r.global),o=[];for(let s of i){let a=Rs(n,t,"skill",s),u=Rs(n,t,"agent",s),c=(0,ne.existsSync)((0,ve.join)(a,"SKILL.md")),l=(0,ne.existsSync)(u);c&&((0,ne.rmSync)(a,{recursive:!0}),o.push({target:s,type:"skill"})),l&&((0,ne.rmSync)(u),o.push({target:s,type:"agent"}))}o.length===0&&g('"%s" is not installed (run `zenku agent-kit installed` to see installed items)',t),v({json:()=>({uninstalled:t,type:o[0].type,targets:[...new Set(o.map(s=>s.target))]}),human:()=>C("Uninstalled %s",t)})}catch(i){g("%s",P(i))}}),e.command("installed").description("List installed skills and agents").option("--skills","show skills only").option("--agents","show agents only").option("--global","list installed items in home directory (~/) instead of project root").option(...Bs).action(async t=>{try{let r=Us(t.target),i=Ns(t.global),n=SD(i,r);if(t.skills&&(n=n.filter(o=>o.type==="skill")),t.agents&&(n=n.filter(o=>o.type==="agent")),n.length===0){v({json:()=>({items:[]}),human:()=>E("No skills or agents installed.")});return}v({json:()=>({items:n}),human:()=>{B(["NAME","TYPE","TARGETS"],n.map(o=>[o.name,o.type,o.targets.join(", ")]))}})}catch(r){g("%s",P(r))}}),e.command("update").description("Update installed items to the latest kit version").argument("[name]","skill, agent, or persona name (omit with --all)").option("--all","update all installed items").option("--global","update items in home directory (~/) instead of project root").option(...Bs).action(async(t,r)=>{!t&&!r.all&&g("provide <name> or use --all"),t&&r.all&&g("use either <name> or --all, not both");let i=Us(r.target),n=Ns(r.global),o=await S("Authenticating...",()=>Wf()),s=await S("Checking for updates...",()=>ei()),a;if(r.all){a=new Map;let c=SD(n,i),l=new Set(s.items.map(d=>d.name));for(let d of c)l.has(d.name)&&a.set(d.name,d.targets)}else a=new Map([[t,i]]);if(a.size===0){E("No kit items installed to update.");return}let u=[];for(let[c,l]of a){let d=Ts(s,c);if(!d){u.push({name:c,action:"not-found"});continue}let p=await S(`Updating ${c}...`,async()=>{let f=await js(d.name,d.type);return Vf(f,o)});for(let f of l){let y=Rs(n,c,d.type,f);d.type==="skill"?((0,ne.existsSync)(y)&&(0,ne.rmSync)(y,{recursive:!0}),CD(p,y)):ID(p,y)}u.push({name:c,action:"updated",targets:l})}v({json:()=>({version:s.version,results:u}),human:()=>{for(let c of u)c.action==="updated"?C("%s: updated to v%s",c.name,s.version):E("%s: not found in agent-kit (may have been removed)",c.name)}})}),e}function OD(e){e.addCommand(rS())}var PD=require("node:child_process");function rn(e){if(e==null||e===0)return"";let t=Number(e);return Number.isNaN(t)?"":new Date(t).toISOString().replace("T"," ").slice(0,19)}function iS(){let e=new O("jobs").description("Job queue management (BullMQ via jobs-api)");e.command("queues").description("List all discovered queues").action(async()=>{let r=await X("jobs"),i=await S("Discovering queues...",()=>r.query("jobs.queues",{}));v({json:()=>i,human:()=>{let n=i.queues.map(o=>[o]);B(["QUEUE"],n)}})}),e.command("counts").description("Show job counts by state for a queue").requiredOption("-q, --queue <name>","queue name").action(async r=>{let i=await X("jobs"),n=await S("Fetching counts...",()=>i.query("jobs.counts",{queue:r.queue}));v({json:()=>n,human:()=>{let o=Object.entries(n).map(([s,a])=>[s,String(a)]);B(["STATE","COUNT"],o)}})}),e.command("list").description("List jobs in a queue by state").requiredOption("-q, --queue <name>","queue name").option("--state <state>","job state (completed|failed|delayed|active|waiting|prioritized|paused)","completed").option("--start <n>","start index","0").option("--end <n>","end index","49").action(async r=>{let i=await X("jobs"),n=await S("Fetching jobs...",()=>i.query("jobs.list",{queue:r.queue,state:r.state,start:Number(r.start),end:Number(r.end)}));v({json:()=>n,human:()=>{let o=n.map(s=>[W(s.id),W(s.name),String(s.attemptsMade??0),rn(s.timestamp),rn(s.finishedOn)]);B(["ID","NAME","ATTEMPTS","CREATED","FINISHED"],o)}})}),e.command("get").description("Get job details").requiredOption("-q, --queue <name>","queue name").argument("<jobId>","job ID").action(async(r,i)=>{let n=await X("jobs"),o=await S("Fetching job...",()=>n.query("jobs.get",{queue:i.queue,jobId:r}));v({json:()=>o,human:()=>{process.stdout.write(`ID: ${W(o.id)}
255
- `),process.stdout.write(`Name: ${W(o.name)}
256
- `),process.stdout.write(`State: ${W(o.state)}
257
- `),process.stdout.write(`Progress: ${W(o.progress)}
258
- `),process.stdout.write(`Attempts: ${W(o.attemptsMade)}
259
- `),o.failedReason&&process.stdout.write(`Failed: ${W(o.failedReason)}
260
- `),process.stdout.write(`Created: ${rn(o.timestamp)}
261
- `),o.processedOn&&process.stdout.write(`Processed: ${rn(o.processedOn)}
262
- `),o.finishedOn&&process.stdout.write(`Finished: ${rn(o.finishedOn)}
263
- `),o.data&&typeof o.data=="object"&&Object.keys(o.data).length>0&&process.stdout.write(`
264
- Data:
265
- ${JSON.stringify(o.data,null,2)}
266
- `)}})}),e.command("enqueue").description("Enqueue a job").requiredOption("-q, --queue <name>","queue name").requiredOption("--name <jobName>","job name").requiredOption("--data <json>","job data as JSON string").option("--delay <ms>","delay in milliseconds").option("--priority <n>","job priority").option("--attempts <n>","max retry attempts").action(async r=>{let i;try{i=JSON.parse(r.data)}catch{g("invalid JSON for --data")}let n={queue:r.queue,jobName:r.name,data:i},o={};r.delay&&(o.delay=Number(r.delay)),r.priority&&(o.priority=Number(r.priority)),r.attempts&&(o.attempts=Number(r.attempts)),Object.keys(o).length>0&&(n.options=o);let s=await X("jobs"),a=await S("Enqueuing job...",()=>s.mutate("jobs.enqueue",n));v({json:()=>a,human:()=>C("Job enqueued: %s (queue: %s)",a.jobId,a.queue)})}),e.command("retry").description("Retry a failed job").requiredOption("-q, --queue <name>","queue name").argument("<jobId>","job ID").action(async(r,i)=>{let n=await X("jobs");await S("Retrying job...",()=>n.mutate("jobs.retry",{queue:i.queue,jobId:r})),v({json:()=>({success:!0,jobId:r,queue:i.queue}),human:()=>C("Job %s retried",r)})}),e.command("remove").description("Remove a job").requiredOption("-q, --queue <name>","queue name").argument("<jobId>","job ID").action(async(r,i)=>{let n=await X("jobs");await S("Removing job...",()=>n.mutate("jobs.remove",{queue:i.queue,jobId:r})),v({json:()=>({success:!0,jobId:r,queue:i.queue}),human:()=>C("Job %s removed",r)})}),e.command("pause").description("Pause a queue").requiredOption("-q, --queue <name>","queue name").action(async r=>{let i=await X("jobs");await S("Pausing queue...",()=>i.mutate("jobs.pause",{queue:r.queue})),v({json:()=>({success:!0,queue:r.queue}),human:()=>C("Queue %s paused",r.queue)})}),e.command("resume").description("Resume a paused queue").requiredOption("-q, --queue <name>","queue name").action(async r=>{let i=await X("jobs");await S("Resuming queue...",()=>i.mutate("jobs.resume",{queue:r.queue})),v({json:()=>({success:!0,queue:r.queue}),human:()=>C("Queue %s resumed",r.queue)})});let t=new O("schedulers").description("Manage cron schedulers");return t.command("list").description("List schedulers for a queue").requiredOption("-q, --queue <name>","queue name").action(async r=>{let i=await X("jobs"),n=await S("Fetching schedulers...",()=>i.query("schedulers.list",{queue:r.queue}));v({json:()=>n,human:()=>{let o=n.map(s=>[W(s.id),W(s.name),W(s.pattern),W(s.timezone),rn(s.next)]);B(["ID","NAME","PATTERN","TIMEZONE","NEXT RUN"],o)}})}),t.command("get").description("Get scheduler details").requiredOption("-q, --queue <name>","queue name").argument("<id>","scheduler ID").action(async(r,i)=>{let n=await X("jobs"),o=await S("Fetching scheduler...",()=>n.query("schedulers.get",{queue:i.queue,id:r}));v({json:()=>o,human:()=>{process.stdout.write(`ID: ${W(o.id)}
267
- `),process.stdout.write(`Name: ${W(o.name)}
268
- `),process.stdout.write(`Pattern: ${W(o.pattern)}
269
- `),process.stdout.write(`Timezone: ${W(o.timezone)}
270
- `),process.stdout.write(`Next Run: ${rn(o.next)}
271
- `)}})}),t.command("upsert").description("Create or update a scheduler").requiredOption("-q, --queue <name>","queue name").requiredOption("--id <id>","scheduler ID").requiredOption("--pattern <cron>","cron pattern").option("--timezone <tz>","timezone (e.g., America/New_York)").option("--data <json>","job data as JSON string").action(async r=>{let i={queue:r.queue,id:r.id,pattern:r.pattern};if(r.timezone&&(i.timezone=r.timezone),r.data)try{i.data=JSON.parse(r.data)}catch{g("invalid JSON for --data")}let n=await X("jobs"),o=await S("Upserting scheduler...",()=>n.mutate("schedulers.upsert",i));v({json:()=>o,human:()=>C("Scheduler upserted: %s",o.schedulerId)})}),t.command("remove").description("Remove a scheduler").requiredOption("-q, --queue <name>","queue name").argument("<id>","scheduler ID").action(async(r,i)=>{let n=await X("jobs");await S("Removing scheduler...",()=>n.mutate("schedulers.remove",{queue:i.queue,id:r})),v({json:()=>({success:!0,id:r,queue:i.queue}),human:()=>C("Scheduler %s removed",r)})}),e.addCommand(t),e.command("web").description("Open the Bull Board dashboard in the browser").option("--no-open","print the URL without opening the browser").action(async({open:r})=>{let i=J(te()),{profile:n}=Y(i),o=n.services.jobs;o||g("no jobs API URL configured (run `zenku profile show` to check)");let s=`${o.replace(/\/+$/,"")}/dashboard`;if(r){let a=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";(0,PD.exec)(`${a} "${s}"`)}v({json:()=>({url:s}),human:()=>E("Opening %s",s)})}),e}function AD(e){e.addCommand(iS())}var Kf={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},zD=new Map,TD=new Map;function Jf(e,t){let r=e.toLowerCase();if(t&&r in t)return t[r];if(!/^\d+$/.test(e))throw new Error(`invalid numeric token: ${e}`);return Number(e)}function jD(e,t,r,i,n,o){if(e<i||e>n||t<i||t>n)throw new Error(`value out of range (${i}-${n})`);if(t<e)throw new Error(`range end ${t} must be >= start ${e}`);if(r<=0)throw new Error("step must be > 0");let s=[];for(let a=e;a<=t;a+=r)o&&a===7?s.push(0):s.push(a);return s}function ti(e,t,r,i,n=!1){if(e==="*")return{any:!0,values:new Set};let o=new Set,s=e.split(",").map(a=>a.trim());if(s.some(a=>a.length===0))throw new Error(`invalid cron field: ${e}`);for(let a of s){let[u,c]=a.split("/");if(a.split("/").length>2)throw new Error(`invalid step syntax: ${a}`);let l=c?Number(c):1;if(Number.isNaN(l)||!Number.isInteger(l)||l<=0)throw new Error(`invalid step value: ${a}`);if(u==="*"){for(let p of jD(t,r,l,t,r,n))o.add(p);continue}if(u.includes("-")){let[p,f]=u.split("-");if(!p||!f)throw new Error(`invalid range syntax: ${a}`);let y=Jf(p,i),w=Jf(f,i);for(let F of jD(y,w,l,t,r,n))o.add(F);continue}let d=Jf(u,i);if(d<t||d>r)throw new Error(`value ${d} out of range (${t}-${r})`);o.add(n&&d===7?0:d)}if(o.size===0)throw new Error(`no values resolved from field: ${e}`);return{any:!1,values:o}}function ND(e){let t=zD.get(e);if(t)return t;let r=e.trim().split(/\s+/);if(r.length!==5)throw new Error("cron expression must have exactly 5 fields");let i={minute:ti(r[0],0,59),hour:ti(r[1],0,23),dayOfMonth:ti(r[2],1,31),month:ti(r[3],1,12),dayOfWeek:ti(r[4],0,7,Kf,!0)};return zD.set(e,i),i}function RD(e){try{Intl.DateTimeFormat("en-US",{timeZone:e}).format(new Date)}catch{throw new Error(`invalid timezone: ${e}`)}}function oS(e){let t=TD.get(e);if(t)return t;let r=new Intl.DateTimeFormat("en-US",{timeZone:e,minute:"2-digit",hour:"2-digit",day:"2-digit",month:"2-digit",weekday:"short",year:"numeric",hour12:!1});return TD.set(e,r),r}var UD={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function BD(e,t){RD(t);let i=oS(t).formatToParts(e),n=new Map(i.map(d=>[d.type,d.value])),o=n.get("weekday");if(!o||!(o in UD))throw new Error(`failed to resolve weekday for timezone: ${t}`);let s=Number(n.get("year")),a=Number(n.get("month")),u=Number(n.get("day")),c=Number(n.get("hour")),l=Number(n.get("minute"));if([s,a,u,c,l].some(d=>Number.isNaN(d)||!Number.isInteger(d)))throw new Error(`failed to parse date parts for timezone: ${t}`);return{year:s,month:a,day:u,hour:c,minute:l,dayOfWeek:UD[o]}}function ni(e,t){return e.any||e.values.has(t)}function LD(e){ND(e)}function ZD(e){RD(e)}function MD(e,t,r){let i=ND(e),n=BD(t,r);if(!ni(i.minute,n.minute)||!ni(i.hour,n.hour)||!ni(i.month,n.month))return!1;let o=ni(i.dayOfMonth,n.day),s=ni(i.dayOfWeek,n.dayOfWeek);return i.dayOfMonth.any&&i.dayOfWeek.any?!0:i.dayOfMonth.any?s:i.dayOfWeek.any?o:o||s}function Hf(e,t){let r=BD(e,t),i=String(r.year).padStart(4,"0"),n=String(r.month).padStart(2,"0"),o=String(r.day).padStart(2,"0"),s=String(r.hour).padStart(2,"0"),a=String(r.minute).padStart(2,"0");return`${i}-${n}-${o}T${s}:${a}`}function sS(e){if(e===void 0)return 0;if(!Number.isInteger(e)||e<0||e>59)throw new Error("minute must be an integer between 0 and 59");return e}function aS(e){if(e===void 0)return 0;if(!Number.isInteger(e)||e<0||e>23)throw new Error("hour must be an integer between 0 and 23");return e}function uS(e){let t=e.split(",").map(i=>i.trim()).filter(i=>i.length>0);if(t.length===0)throw new Error("weekday is required for weekly preset");let r=t.map(i=>{let n=i.toLowerCase();if(n in Kf)return String(Kf[n]);if(!/^\d+$/.test(i))throw new Error(`invalid weekday token: ${i}`);let o=Number(i);if(!Number.isInteger(o)||o<0||o>7)throw new Error(`weekday out of range: ${i}`);return String(o===7?0:o)});return Array.from(new Set(r)).join(",")}function qD(e){let t=sS(e.minute);if(e.preset==="hourly")return`${t} * * * *`;let r=aS(e.hour);if(e.preset==="daily")return`${t} ${r} * * *`;let i=e.weekday?.trim();if(!i)throw new Error("--weekday is required for weekly preset");let n=uS(i);return`${t} ${r} * * ${n}`}var Qf=require("node:child_process"),Nt=require("node:fs"),GD=require("node:os"),ri=require("node:path");var Yf=require("node:path");function cS(e){let t=e.toLowerCase();return t==="node"||t==="node.exe"||t==="bun"}function lS(e){let t=e.toLowerCase();return t==="zenku"||t==="zenku.exe"||t==="zenku-test"||t==="zenku-test.exe"}function Hn(e){let t=process.argv[1]??"",r=process.execPath;return t.length>0&&!t.startsWith("-")&&(t.endsWith(".js")||t.endsWith(".cjs")||t.endsWith(".mjs")||t.includes("zenku"))?{executable:r,args:[t,"schedule","tick","--scope",e,"--non-interactive"]}:{executable:r,args:["schedule","tick","--scope",e,"--non-interactive"]}}function dS(e){return e.includes("--interactive")||e.includes("--non-interactive")}function pS(e){let t=(0,Yf.basename)(e.executable);return!!(lS(t)||cS(t)&&e.args.length>0&&(0,Yf.basename)(e.args[0]).toLowerCase().includes("zenku"))}function VD(e){return!pS(e)||dS(e.args)?e:{executable:e.executable,args:[...e.args,"--non-interactive"]}}function Yn(e){return`app.zenku.schedule.${e}`}function em(e){return e==="user"?(0,ri.join)((0,GD.homedir)(),"Library","LaunchAgents",`${Yn(e)}.plist`):(0,ri.join)("/Library","LaunchDaemons",`${Yn(e)}.plist`)}function WD(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function fS(e){let t=Yn(e),r=Hn(e),i=[r.executable,...r.args].map(n=>` <string>${WD(n)}</string>`).join(`
272
- `);return`<?xml version="1.0" encoding="UTF-8"?>
273
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
274
- <plist version="1.0">
275
- <dict>
276
- <key>Label</key>
277
- <string>${WD(t)}</string>
278
- <key>ProgramArguments</key>
279
- <array>
280
- ${i}
281
- </array>
282
- <key>StartInterval</key>
283
- <integer>60</integer>
284
- <key>RunAtLoad</key>
285
- <true/>
286
- </dict>
287
- </plist>
288
- `}function Xf(e,t,r=!1){try{(0,Qf.execFileSync)(e,t,{stdio:"ignore"})}catch(i){if(!r)throw i}}function tm(e){if(e==="system")return"system";let t=process.getuid?.();if(t===void 0)throw new Error("failed to resolve uid for user LaunchAgent");return`gui/${t}`}function mS(e,t){let r=em(e),i=Yn(e),n=tm(e),o=fS(e),s=[`write ${r}`,`launchctl bootout ${n} ${r} (ignore errors if not loaded)`,`launchctl bootstrap ${n} ${r}`];return t?{scope:e,platform:"darwin",dryRun:!0,actions:s,files:{[r]:o},details:{label:i,domain:n,plistPath:r}}:((0,Nt.mkdirSync)((0,ri.dirname)(r),{recursive:!0}),(0,Nt.writeFileSync)(r,o,"utf8"),Xf("launchctl",["bootout",n,r],!0),Xf("launchctl",["bootstrap",n,r]),{scope:e,platform:"darwin",dryRun:!1,actions:s,details:{label:i,domain:n,plistPath:r}})}function hS(e,t){let r=em(e),i=Yn(e),n=tm(e),o=[`launchctl bootout ${n} ${r}`,`remove ${r}`];return t?{scope:e,platform:"darwin",dryRun:!0,actions:o,details:{label:i,domain:n,plistPath:r}}:(Xf("launchctl",["bootout",n,r],!0),(0,Nt.rmSync)(r,{force:!0}),{scope:e,platform:"darwin",dryRun:!1,actions:o,details:{label:i,domain:n,plistPath:r}})}function gS(e){let t=em(e),r=Yn(e),i=tm(e),n=(0,Nt.existsSync)(t),o=!1;try{(0,Qf.execFileSync)("launchctl",["print",`${i}/${r}`],{stdio:"ignore"}),o=!0}catch{o=!1}return{scope:e,installed:n,platform:"darwin",details:{plistPath:t,label:r,domain:i,loaded:o}}}var JD={install:mS,uninstall:hS,status:gS};var Ls=require("node:child_process"),tt=require("node:fs"),KD=require("node:os"),Rt=require("node:path");function nm(e){return e==="user"?(0,Rt.join)((0,KD.homedir)(),".config","systemd","user"):"/etc/systemd/system"}function Ms(e){return`zenku-schedule-${e}.service`}function Dt(e){return`zenku-schedule-${e}.timer`}function vS(e){return`"${e.replace(/(["\\`$])/g,"\\$1")}"`}function yS(e){let t=Hn(e),r=[t.executable,...t.args].map(i=>vS(i)).join(" ");return`[Unit]
289
- Description=Zenku schedule dispatcher (${e})
290
- After=network-online.target
291
-
292
- [Service]
293
- Type=oneshot
294
- ExecStart=${r}
295
- `}function DS(e){let t=Ms(e);return`[Unit]
296
- Description=Zenku schedule timer (${e})
297
-
298
- [Timer]
299
- OnCalendar=*-*-* *:*:00
300
- AccuracySec=1s
301
- Persistent=true
302
- Unit=${t}
303
-
304
- [Install]
305
- WantedBy=timers.target
306
- `}function Zs(e,t,r=!1){let i=t==="user"?["--user",...e]:e;try{(0,Ls.execFileSync)("systemctl",i,{stdio:"ignore"})}catch(n){if(!r)throw n}}function bS(e,t){let r=nm(e),i=(0,Rt.join)(r,Ms(e)),n=(0,Rt.join)(r,Dt(e)),o=yS(e),s=DS(e),a=[`write ${i}`,`write ${n}`,`systemctl ${e==="user"?"--user ":""}daemon-reload`,`systemctl ${e==="user"?"--user ":""}enable --now ${Dt(e)}`];return t?{scope:e,platform:"linux",dryRun:!0,actions:a,files:{[i]:o,[n]:s},details:{servicePath:i,timerPath:n}}:((0,tt.mkdirSync)(r,{recursive:!0}),(0,tt.writeFileSync)(i,o,"utf8"),(0,tt.writeFileSync)(n,s,"utf8"),Zs(["daemon-reload"],e),Zs(["enable","--now",Dt(e)],e),{scope:e,platform:"linux",dryRun:!1,actions:a,details:{servicePath:i,timerPath:n}})}function $S(e,t){let r=nm(e),i=(0,Rt.join)(r,Ms(e)),n=(0,Rt.join)(r,Dt(e)),o=[`systemctl ${e==="user"?"--user ":""}disable --now ${Dt(e)}`,`remove ${i}`,`remove ${n}`,`systemctl ${e==="user"?"--user ":""}daemon-reload`];return t?{scope:e,platform:"linux",dryRun:!0,actions:o,details:{servicePath:i,timerPath:n}}:(Zs(["disable","--now",Dt(e)],e,!0),(0,tt.rmSync)(i,{force:!0}),(0,tt.rmSync)(n,{force:!0}),Zs(["daemon-reload"],e,!0),{scope:e,platform:"linux",dryRun:!1,actions:o,details:{servicePath:i,timerPath:n}})}function _S(e){let t=nm(e),r=(0,Rt.join)(t,Ms(e)),i=(0,Rt.join)(t,Dt(e)),n=(0,tt.existsSync)(r)&&(0,tt.existsSync)(i),o=e==="user"?["--user"]:[],s=!1,a=!1;try{(0,Ls.execFileSync)("systemctl",[...o,"is-enabled",Dt(e)],{stdio:"ignore"}),s=!0}catch{s=!1}try{(0,Ls.execFileSync)("systemctl",[...o,"is-active",Dt(e)],{stdio:"ignore"}),a=!0}catch{a=!1}return{scope:e,installed:n,platform:"linux",details:{servicePath:r,timerPath:i,enabled:s,active:a}}}var HD={install:bS,uninstall:$S,status:_S};var rm=require("node:child_process");function im(e){return e==="system"?"ZenkuScheduleSystem":"ZenkuScheduleUser"}function wS(e){return`"${e.replace(/"/g,'\\"')}"`}function xS(e){let t=Hn(e);return[t.executable,...t.args].map(r=>wS(r)).join(" ")}function YD(e,t=!1){try{(0,rm.execFileSync)("schtasks",e,{stdio:"ignore"})}catch(r){if(!t)throw r}}function kS(e,t){let r=im(e),i=xS(e),n=["/Create","/F","/TN",r,"/SC","MINUTE","/MO","1","/TR",i];e==="system"&&n.push("/RU","SYSTEM");let o=[`schtasks ${n.join(" ")}`];return t?{scope:e,platform:"win32",dryRun:!0,actions:o,details:{taskName:r,command:i}}:(YD(n),{scope:e,platform:"win32",dryRun:!1,actions:o,details:{taskName:r,command:i}})}function SS(e,t){let r=im(e),i=["/Delete","/F","/TN",r],n=[`schtasks ${i.join(" ")}`];return t?{scope:e,platform:"win32",dryRun:!0,actions:n,details:{taskName:r}}:(YD(i,!0),{scope:e,platform:"win32",dryRun:!1,actions:n,details:{taskName:r}})}function CS(e){let t=im(e),r=!1;try{(0,rm.execFileSync)("schtasks",["/Query","/TN",t],{stdio:"ignore"}),r=!0}catch{r=!1}return{scope:e,installed:r,platform:"win32",details:{taskName:t}}}var XD={install:kS,uninstall:SS,status:CS};function qs(){if(process.platform==="darwin")return JD;if(process.platform==="linux")return HD;if(process.platform==="win32")return XD;throw new Error(`unsupported platform: ${process.platform}`)}var fe=require("node:fs"),Bt=require("node:path");var IS=x.enum(["user","system"]),ES=x.object({profile:x.string().min(1),tenantId:x.string().optional(),accountId:x.string().optional()}),FS=x.object({executable:x.string().min(1),args:x.array(x.string()).default([])}),om=x.object({id:x.string().min(1).max(100).regex(/^[A-Za-z0-9._:-]+$/,"id can only contain A-Z, a-z, 0-9, ., _, :, -"),scope:IS,enabled:x.boolean().default(!0),cron:x.string().min(1),timezone:x.string().min(1),context:ES,command:FS,createdAt:x.string().datetime(),updatedAt:x.string().datetime()}),QD=x.array(om),OS=x.object({lastRunAt:x.string().datetime().optional(),lastExitCode:x.number().int().nullable().optional(),lastDurationMs:x.number().int().nonnegative().optional(),lastError:x.string().optional(),lastTriggeredMinute:x.string().regex(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/).optional()}),sm=x.object({version:x.literal(1),schedules:x.record(x.string(),OS).default({})});var PS=448,AS=384,zS=493,TS=420,eb="schedules.json",tb="schedule-state.json",jS="locks";function US(){let e=process.env.ZENKU_SCHEDULE_SYSTEM_DIR;if(e)return e;if(process.platform==="darwin")return"/Library/Application Support/zenku";if(process.platform==="linux")return"/var/lib/zenku";if(process.platform==="win32")return(0,Bt.join)(process.env.ProgramData||"C:\\ProgramData","zenku");throw new Error(`unsupported platform: ${process.platform}`)}function am(e){if(e==="user"){let t=Tr();return(0,Bt.dirname)(t)}return US()}function Vs(e){return e==="user"?{dirMode:PS,fileMode:AS}:{dirMode:zS,fileMode:TS}}function Lt(e,t){if(!(e!=="system"||t)&&process.platform!=="win32"){let r=process.getuid?.();if(r!==void 0&&r!==0)throw new Error("system scope requires elevated privileges (run as root/Administrator)")}}function nb(e,t){(0,fe.existsSync)(e)||(0,fe.mkdirSync)(e,{recursive:!0,mode:t})}function rb(e,t,r){let i=`${e}.tmp-${process.pid}-${Date.now()}`;(0,fe.writeFileSync)(i,JSON.stringify(t,null,2),{mode:r}),(0,fe.renameSync)(i,e)}function ib(e,t){if(!(0,fe.existsSync)(e))return t;let r=(0,fe.readFileSync)(e,"utf8");return JSON.parse(r)}function Ws(e,t){return(0,Bt.join)(am(e),t)}function ob(e){let t=am(e),{dirMode:r}=Vs(e);nb(t,r)}function sb(e){let t=am(e),{dirMode:r}=Vs(e),i=(0,Bt.join)(t,jS);return nb(i,r),i}function bt(e){let t=Ws(e,eb),r=ib(t,[]),i=QD.parse(r);for(let n of i)if(n.scope!==e)throw new Error(`schedule ${n.id} has scope ${n.scope}, expected ${e}`);return i}function Gs(e,t){ob(e);let r=Ws(e,eb),{fileMode:i}=Vs(e),n=t.map(o=>om.parse(o));rb(r,n,i)}function on(e){let t=Ws(e,tb),r=ib(t,{version:1,schedules:{}});return sm.parse(r)}function ii(e,t){ob(e);let r=Ws(e,tb),{fileMode:i}=Vs(e),n=sm.parse(t);rb(r,n,i)}function NS(e){return`run-${e.replace(/[^A-Za-z0-9._-]/g,"_")}.lock`}function ab(e){let t;try{t=(0,fe.openSync)(e,"wx",384)}catch{return null}return(0,fe.writeFileSync)(t,`${process.pid}
307
- ${new Date().toISOString()}
308
- `,{encoding:"utf8"}),{release:()=>{try{(0,fe.closeSync)(t)}catch{}(0,fe.rmSync)(e,{force:!0})}}}function ub(e){let t=sb(e),r=(0,Bt.join)(t,"tick.lock");return ab(r)}function cb(e,t){let r=sb(e),i=(0,Bt.join)(r,NS(t));return ab(i)}function lb(e,t){let r=e.schedules[t];if(r)return r;let i={};return e.schedules[t]=i,i}function db(e,t){delete e.schedules[t]}var pb=require("node:child_process");function RS(e){let t={ZENKU_SCHEDULED:"1",ZENKU_SCHEDULE_ID:e.id};return t.ZENKU_PROFILE=e.context.profile,e.context.tenantId&&(t.ZENKU_TENANT_ID=e.context.tenantId),e.context.accountId&&(t.ZENKU_ACCOUNT_ID=e.context.accountId),t}function BS(e,t){return{...e,...t}}function LS(e,t,r){return new Promise((i,n)=>{let o=(0,pb.spawn)(e.executable,e.args,{env:t,stdio:r,shell:!1});o.once("error",s=>{n(s)}),o.once("exit",(s,a)=>{i({code:s,signal:a})})})}function ZS(e){return VD(e)}async function fb(e,t,r,i){let n=lb(r,t.id),o=i.minuteKey;if(o&&n.lastTriggeredMinute===o)return{id:t.id,executed:!1,skippedReason:"already_triggered"};let s=cb(e,t.id);if(!s)return o&&(n.lastTriggeredMinute=o),{id:t.id,executed:!1,skippedReason:"overlap"};let a=ZS(t.command),u=RS(t);if(i.dryRun)return s.release(),{id:t.id,executed:!1,dryRun:!0,command:a,env:u};let c=Date.now(),l=i.now.toISOString();try{let d=await LS(a,BS(process.env,u),i.stdio??"ignore"),p=Date.now()-c,f=d.code===0?void 0:d.code===null?`process exited via signal ${d.signal??"unknown"}`:`process exited with code ${d.code}`;return n.lastRunAt=l,n.lastExitCode=d.code,n.lastDurationMs=p,n.lastError=f,o&&(n.lastTriggeredMinute=o),{id:t.id,executed:!0,exitCode:d.code,durationMs:p,error:f}}catch(d){let p=Date.now()-c,f=d instanceof Error?d.message:String(d);return n.lastRunAt=l,n.lastExitCode=null,n.lastDurationMs=p,n.lastError=f,o&&(n.lastTriggeredMinute=o),{id:t.id,executed:!0,exitCode:null,durationMs:p,error:f}}finally{s.release()}}async function mb(e){let t=ub(e);if(!t)return{scope:e,locked:!0,minuteKey:"",executed:0,skipped:0,results:[]};let r=bt(e),i=on(e),n=new Date,o=[];try{for(let s of r){if(!s.enabled){o.push({id:s.id,executed:!1,skippedReason:"not_due"});continue}if(!MD(s.cron,n,s.timezone)){o.push({id:s.id,executed:!1,skippedReason:"not_due"});continue}let a=Hf(n,s.timezone),u=await fb(e,s,i,{now:n,minuteKey:a,stdio:"ignore"});o.push(u)}ii(e,i)}finally{t.release()}return{scope:e,locked:!1,minuteKey:Hf(n,"UTC"),executed:o.filter(s=>s.executed).length,skipped:o.filter(s=>!s.executed).length,results:o}}async function hb(e,t,r){let i=on(e),n=await fb(e,t,i,{now:new Date,dryRun:r,stdio:"inherit"});return r||ii(e,i),n}function nt(e){if(!e||e.length===0)return"user";if(e==="user"||e==="system")return e;g('invalid scope "%s" (expected user|system)',e)}function MS(e){if(e==="hourly"||e==="daily"||e==="weekly")return e;g('invalid preset "%s" (expected hourly|daily|weekly)',e||"")}function gb(e,t){if(e===void 0)return;let r=Number(e);return Number.isInteger(r)||g("%s must be an integer",t),r}function vb(e){if(!e)return"-";try{return new Date(String(e)).toISOString()}catch{return String(e)}}function um(e){return[e.command.executable,...e.command.args].map(t=>/\s/.test(t)?JSON.stringify(t):t).join(" ")}function cm(e,t){let r=e.find(i=>i.id===t);return r||g('schedule "%s" not found',t),r}function qS(e,t){e==="hourly"&&t.hour!==void 0&&g("--hour is not valid with --preset hourly"),(e==="hourly"||e==="daily")&&t.weekday&&g("--weekday is only valid with --preset weekly")}function VS(){let e=new O("schedule").description("Manage local offline schedules");e.command("add").description("Create a local schedule").requiredOption("--id <id>","schedule ID").option("--cron <expr>","cron expression").option("--preset <name>","preset: hourly|daily|weekly").option("--minute <0-59>","minute for preset-based schedules").option("--hour <0-23>","hour for daily/weekly presets").option("--weekday <day>","weekday for weekly preset (0-6, 7, or mon,tue,...)").option("--timezone <tz>","IANA timezone","UTC").option("--scope <scope>","scope: user|system","user").option("--profile <name>","profile to pin for scheduled runs").option("--tenant <id>","tenant ID to pin").option("--account <id>","account ID to pin").argument("<command...>","executable and args (use -- before command)").action((i,n)=>{try{let o=nt(n.scope);Lt(o,!1),(!n.cron&&!n.preset||n.cron&&n.preset)&&g("provide exactly one of --cron or --preset"),i.length||g("command is required (use -- <executable> [args...])");let s=n.timezone.trim()||"UTC";ZD(s);let a="";if(n.cron)(n.minute!==void 0||n.hour!==void 0||n.weekday)&&g("preset flags (--minute/--hour/--weekday) require --preset"),a=n.cron.trim();else{let w=MS(n.preset);qS(w,{hour:n.hour,weekday:n.weekday}),a=qD({preset:w,minute:gb(n.minute,"--minute"),hour:gb(n.hour,"--hour"),weekday:n.weekday})}LD(a);let u=n.profile||J(te()),{profile:c}=Y(u),l=n.tenant??Ue(c),d=n.account??Ne(c),p=bt(o);p.some(w=>w.id===n.id)&&g('schedule "%s" already exists',n.id);let f=new Date().toISOString(),y={id:n.id,scope:o,enabled:!0,cron:a,timezone:s,context:{profile:u,...l?{tenantId:l}:{},...d?{accountId:d}:{}},command:{executable:i[0],args:i.slice(1)},createdAt:f,updatedAt:f};p.push(y),Gs(o,p),v({json:()=>y,human:()=>C('Schedule "%s" created',n.id)})}catch(o){g("%s",P(o))}}),e.command("list").description("List schedules").option("--scope <scope>","scope: user|system","user").action(i=>{try{let n=nt(i.scope),o=bt(n),s=on(n),a=o.map(u=>({...u,state:s.schedules[u.id]||null}));v({json:()=>a,human:()=>{let u=a.map(c=>[c.id,c.enabled?"yes":"no",c.cron,c.timezone,um(c),vb(c.state?.lastRunAt),W(c.state?.lastExitCode??"-")]);B(["ID","ENABLED","CRON","TIMEZONE","COMMAND","LAST RUN","EXIT"],u)}})}catch(n){g("%s",P(n))}}),e.command("get").description("Get schedule details").option("--scope <scope>","scope: user|system","user").argument("<id>","schedule ID").action((i,n)=>{try{let o=nt(n.scope),s=bt(o),a=cm(s,i),u=on(o);v({json:()=>({...a,state:u.schedules[i]||null}),human:()=>{process.stdout.write(`ID: ${a.id}
309
- `),process.stdout.write(`Scope: ${a.scope}
310
- `),process.stdout.write(`Enabled: ${a.enabled?"yes":"no"}
311
- `),process.stdout.write(`Cron: ${a.cron}
312
- `),process.stdout.write(`Timezone: ${a.timezone}
313
- `),process.stdout.write(`Profile: ${a.context.profile}
314
- `),process.stdout.write(`Tenant ID: ${a.context.tenantId||"-"}
315
- `),process.stdout.write(`Account ID:${a.context.accountId||"-"}
316
- `),process.stdout.write(`Command: ${um(a)}
317
- `);let c=u.schedules[i];process.stdout.write(`Last Run: ${c?.lastRunAt?vb(c.lastRunAt):"-"}
318
- `),process.stdout.write(`Last Exit: ${c?.lastExitCode??"-"}
319
- `),process.stdout.write(`Last Err: ${c?.lastError||"-"}
320
- `)}})}catch(o){g("%s",P(o))}}),e.command("remove").description("Remove a schedule").option("--scope <scope>","scope: user|system","user").argument("<id>","schedule ID").action((i,n)=>{try{let o=nt(n.scope);Lt(o,!1);let s=bt(o),a=s.findIndex(c=>c.id===i);a===-1&&g('schedule "%s" not found',i),s.splice(a,1),Gs(o,s);let u=on(o);db(u,i),ii(o,u),v({json:()=>({success:!0,id:i,scope:o}),human:()=>C('Schedule "%s" removed',i)})}catch(o){g("%s",P(o))}});function t(i,n,o){Lt(n,!1);let s=bt(n),a=cm(s,i);a.enabled=o,a.updatedAt=new Date().toISOString(),Gs(n,s)}e.command("enable").description("Enable a schedule").option("--scope <scope>","scope: user|system","user").argument("<id>","schedule ID").action((i,n)=>{try{let o=nt(n.scope);t(i,o,!0),v({json:()=>({success:!0,id:i,enabled:!0,scope:o}),human:()=>C('Schedule "%s" enabled',i)})}catch(o){g("%s",P(o))}}),e.command("disable").description("Disable a schedule").option("--scope <scope>","scope: user|system","user").argument("<id>","schedule ID").action((i,n)=>{try{let o=nt(n.scope);t(i,o,!1),v({json:()=>({success:!0,id:i,enabled:!1,scope:o}),human:()=>C('Schedule "%s" disabled',i)})}catch(o){g("%s",P(o))}}),e.command("run").description("Run a schedule immediately").option("--scope <scope>","scope: user|system","user").option("--dry-run","print execution details without running").argument("<id>","schedule ID").action(async(i,n)=>{try{let o=nt(n.scope),s=!!n.dryRun;Lt(o,s);let a=bt(o),u=cm(a,i),c=await hb(o,u,s);v({json:()=>c,human:()=>{if(c.dryRun){E("Dry run: %s",um(u));return}(c.exitCode??1)===0?C('Schedule "%s" ran successfully',i):E('Schedule "%s" finished with exit code %s',i,W(c.exitCode??"null"))}})}catch(o){g("%s",P(o))}}),e.command("tick").description("Run one scheduler tick (intended for host scheduler integration)").option("--scope <scope>","scope: user|system","user").action(async i=>{try{let n=nt(i.scope);Lt(n,!1);let o=await mb(n);v({json:()=>o,human:()=>{o.locked?E("Tick skipped: another tick is already running."):E("Tick completed: executed=%s skipped=%s",String(o.executed),String(o.skipped))}})}catch(n){g("%s",P(n))}});let r=new O("host").description("Manage host scheduler integration");return r.command("install").description("Install host scheduler integration").option("--scope <scope>","scope: user|system","user").option("--dry-run","show generated artifacts and commands").action(i=>{try{let n=nt(i.scope),o=!!i.dryRun;Lt(n,o);let a=qs().install(n,o);v({json:()=>a,human:()=>{C("%s host scheduler %s",o?"Previewed":"Installed",n);for(let u of a.actions)E("- %s",u)}})}catch(n){g("%s",P(n))}}),r.command("uninstall").description("Remove host scheduler integration").option("--scope <scope>","scope: user|system","user").option("--dry-run","show generated commands").action(i=>{try{let n=nt(i.scope),o=!!i.dryRun;Lt(n,o);let a=qs().uninstall(n,o);v({json:()=>a,human:()=>{C("%s host scheduler %s",o?"Previewed uninstall for":"Uninstalled",n);for(let u of a.actions)E("- %s",u)}})}catch(n){g("%s",P(n))}}),r.command("status").description("Show host scheduler status").option("--scope <scope>","scope: user|system","user").action(i=>{try{let n=nt(i.scope),s=qs().status(n);v({json:()=>s,human:()=>{E("Platform: %s",s.platform),E("Scope: %s",s.scope),E("Installed: %s",s.installed?"yes":"no");for(let[a,u]of Object.entries(s.details))E("%s: %s",a,W(u))}})}catch(n){g("%s",P(n))}}),e.addCommand(r),e}function yb(e){e.addCommand(VS())}var me=require("node:fs"),Pe=require("node:path"),oi=require("node:os");function lm(e){return e||(process.env.CLAUDE_CONFIG_DIR?process.env.CLAUDE_CONFIG_DIR:(0,Pe.join)((0,oi.homedir)(),".claude"))}function Db(e){return e||(process.env.ZENKU_MACHINE_ID?process.env.ZENKU_MACHINE_ID:(0,oi.hostname)())}function dm(e){let t=[],r;try{r=(0,me.readdirSync)(e,{withFileTypes:!0})}catch{return t}for(let i of r){let n=(0,Pe.join)(e,i.name);i.isDirectory()?t.push(...dm(n)):i.isFile()&&i.name.endsWith(".jsonl")&&t.push(n)}return t}function ct(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function WS(e,t){let r=(0,me.statSync)(e);return Date.now()-r.mtimeMs>=t*86400*1e3}function bb(e,t,r){let i=(0,Pe.relative)(t,e);return`${r}/${i}`}function pm(e){return e.replace(/'/g,"\\'")}async function $b(e,t,r,i,n,o,s){let u=(0,me.statSync)(t).size,c=null;try{let p=await e.collection("session_files").getFirstListItem(`key='${pm(r)}'`);c={id:p.id,size:p.size}}catch{}if(c&&c.size===u)return{status:"skipped",key:r,size:u};if(s)return c?E("[DRY-RUN] Would update: %s (%s -> %s)",r,ct(c.size),ct(u)):E("[DRY-RUN] Would upload: %s (%s)",r,ct(u)),{status:c?"updated":"uploaded",key:r,size:u};let l=(0,me.readFileSync)(t),d=new File([l],(0,Pe.basename)(t),{type:"application/x-ndjson"});try{return c?(await e.collection("session_files").update(c.id,{size:u,file:d}),C("Updated: %s (%s -> %s)",r,ct(c.size),ct(u)),{status:"updated",key:r,size:u}):(await e.collection("session_files").create({key:r,machine_id:i,size:u,tenant_id:n,account_id:o,file:d}),C("Uploaded: %s (%s)",r,ct(u)),{status:"uploaded",key:r,size:u})}catch(p){let f=p instanceof Error?p.message:String(p);return{status:"failed",key:r,size:u,error:f}}}function GS(){let e=new O("sessions").description("Upload and manage Claude Code session transcripts");return e.command("sync").description("Scan local Claude Code sessions and upload new/changed files").option("--machine-id <id>","machine identifier for R2 key namespacing").option("--claude-dir <path>","Claude config directory").option("--dry-run","show what would be uploaded without uploading").option("--cleanup-days <days>","delete local files older than N days after successful upload").action(async t=>{let r=lm(t.claudeDir),i=Db(t.machineId),n=t.dryRun??!1,o=t.cleanupDays?Number(t.cleanupDays):0;o&&(Number.isNaN(o)||o<1)&&g("--cleanup-days requires a positive integer");let s=(0,Pe.join)(r,"projects"),a=dm(s);if(a.length===0){E("No session files found in %s",s);return}let{client:u,profile:c}=await T("library"),l=Ue(c),d=Ne(c);o>0&&E("Cleanup mode: syncing files older than %s days",o),E("Scanning %s sessions in %s",a.length,s);let p=0,f=0,y=0,w=0,F=0,R=0;for(let Q of a){if(o>0&&!WS(Q,o)){R++;continue}let z=bb(Q,s,i),G=await $b(u,Q,z,i,l,d,n);switch(G.status){case"uploaded":p++;break;case"updated":f++;break;case"skipped":y++;break;case"failed":E("Failed: %s \u2014 %s",z,G.error),w++;continue}if(o>0)if(n)E("[DRY-RUN] Would delete local: %s",Q);else try{(0,me.unlinkSync)(Q),F++}catch{E("Failed to delete local: %s",Q)}}E(""),o>0?E("Summary: %s total, %s too new (<%sd), %s uploaded, %s updated, %s unchanged, %s deleted locally, %s failed",a.length,R,o,p,f,y,F,w):E("Summary: %s total, %s uploaded, %s updated, %s unchanged, %s failed",a.length,p,f,y,w)}),e.command("list").description("List Claude Code session files").option("--remote","list uploaded session files from PocketBase").option("--claude-dir <path>","Claude config directory").action(async t=>{if(t.remote){let{client:r}=await T("library"),i=await S("Fetching session files...",()=>r.collection("session_files").getList(1,200,{sort:"-created"}));v({json:()=>i.items,human:()=>{let n=i.items.map(o=>[o.id,o.key,o.machine_id,ct(o.size),o.created]);B(["ID","KEY","MACHINE","SIZE","CREATED"],n)}})}else{let r=lm(t.claudeDir),i=(0,Pe.join)(r,"projects"),n=dm(i);v({json:()=>n.map(o=>{let s=(0,me.statSync)(o);return{path:o,size:s.size,modified:s.mtime}}),human:()=>{let o=n.map(s=>{let a=(0,me.statSync)(s);return[(0,Pe.relative)(i,s),ct(a.size),a.mtime.toISOString().slice(0,19)]});B(["PATH","SIZE","MODIFIED"],o),E(`
321
- %s files, %s total`,n.length,ct(n.reduce((s,a)=>s+(0,me.statSync)(a).size,0)))}})}}),e.command("upload").description("Upload a single session file").option("--hook","hook mode: read session path from stdin JSON").option("--machine-id <id>","machine identifier for R2 key namespacing").option("--claude-dir <path>","Claude config directory").argument("[file]","path to .jsonl file (when not using --hook)").action(async(t,r)=>{let i=lm(r.claudeDir),n=Db(r.machineId),o=(0,Pe.join)(i,"projects"),s;if(r.hook){let f;try{f=(0,me.readFileSync)(0,"utf-8")}catch{g("failed to read from stdin")}let y;try{y=JSON.parse(f)}catch{g("invalid JSON on stdin")}let w=y.transcript_path;w||g("no transcript_path in hook input"),s=w.replace(/^~/,(0,oi.homedir)())}else t?s=t:g("provide a file path or use --hook to read from stdin");try{(0,me.statSync)(s)}catch{g("file not found: %s",s)}let a=bb(s,o,n),{client:u,profile:c}=await T("library"),l=Ue(c),d=Ne(c),p=await $b(u,s,a,n,l,d,!1);p.status==="failed"&&g("upload failed: %s",p.error),v({json:()=>p,human:()=>{p.status==="skipped"&&E("Skipped (unchanged): %s",a)}})}),e.command("download").description("Download session files from PocketBase").argument("[dir]","output directory",".").option("--key <key>","download a specific file by key").option("--machine-id <id>","download all files from a specific machine").action(async(t,r)=>{let{client:i}=await T("library"),n=[];r.key&&n.push(`key='${pm(r.key)}'`),r.machineId&&n.push(`machine_id='${pm(r.machineId)}'`);let o=n.length>0?n.join(" && "):"",s=await S("Fetching session files...",()=>i.collection("session_files").getFullList({sort:"key",filter:o}));if(s.length===0){E("No session files found");return}E("Downloading %s files to %s",s.length,t);let a=await i.files.getToken(),u=0,c=0;for(let l of s){let d=l.key,p=l.file,f=(0,Pe.join)(t,d),y=i.files.getURL(l,p,{token:a});try{let w=await fetch(y);if(!w.ok){E("Failed: %s \u2014 HTTP %s",d,w.status),c++;continue}let F=Buffer.from(await w.arrayBuffer());(0,me.mkdirSync)((0,Pe.dirname)(f),{recursive:!0}),(0,me.writeFileSync)(f,F),C("Downloaded: %s (%s)",d,ct(F.length)),u++}catch(w){let F=w instanceof Error?w.message:String(w);E("Failed: %s \u2014 %s",d,F),c++}}E(""),E("Summary: %s total, %s downloaded, %s failed",s.length,u,c),v({json:()=>s.map(l=>({id:l.id,key:l.key,machine_id:l.machine_id,size:l.size})),human:()=>{}})}),e}function _b(e){e.addCommand(GS())}var wb=require("node:fs"),Js=require("node:path"),xb=require("node:url"),JS={};function Xn(){return"0.1.37"}var Cb=require("node:path");function kb(){return!0}var KS="@zenku";function Sb(e){return e.replace(/\\/g,"/")}function HS(e){let t=e.toLowerCase();return t==="node"||t==="node.exe"||t==="bun"}function Ks(){let{platform:e,arch:t}=process,r=new Set(["darwin-arm64","darwin-x64","linux-arm64","linux-x64"]),i=`${e}-${t}`;if(!r.has(i))throw new Error(`Unsupported platform: ${i}`);return`cli-${i}`}function Ib(e){return`${KS}/${e}`}function Hs(){if(kb())return"bundle";let e=Sb(process.execPath),t=Sb(process.argv[1]??""),r=(0,Cb.basename)(process.execPath).toLowerCase();return r==="zenku-test"||r==="zenku-test.exe"||r.includes("zenku-test")||t.length>0&&(t.endsWith(".js")||t.endsWith(".cjs")||t.endsWith(".mjs"))||HS(r)?"development":e.includes("/node_modules/")&&e.includes("/@zenku/")&&e.includes("/cli-")?"npm-managed":e.includes("/apps/zenku-cli/")||e.includes("/apps\\zenku-cli\\")?"development":"standalone"}function Qn(e){return e==="bundle"?{command:"npm update -g @zenku/cli-node",message:"Self-upgrade is not available in bundle mode. Update via npm: npm update -g @zenku/cli-node"}:e==="npm-managed"?{command:"npm update -g @zenku/cli",message:"This install is npm-managed. Update via npm: npm update -g @zenku/cli"}:e==="development"?{command:"pnpm --filter @hikari/zenku-cli compile",message:"Development/test builds are not self-updated. Rebuild locally: pnpm --filter @hikari/zenku-cli compile"}:{command:"zenku upgrade",message:"Run `zenku upgrade` to install the latest binary."}}var fm=require("node:child_process"),Eb=require("node:crypto"),ue=require("node:fs"),Fb=require("node:os"),$t=require("node:path");function YS(e){let t=e.trim().split(/\s+/)[0]??"",r=t.indexOf("-");if(r<=0||r>=t.length-1)throw new Error("invalid integrity format");let i=t.slice(0,r),n=t.slice(r+1);return{algo:i,hash:n}}function XS(e,t){let{algo:r,hash:i}=YS(t),n=(0,ue.readFileSync)(e);if((0,Eb.createHash)(r).update(n).digest("base64")!==i)throw new Error("checksum mismatch")}function Ob(e){try{return(0,ue.accessSync)(e,ue.constants.W_OK),!0}catch{return!1}}function QS(e,t){let r=(0,$t.dirname)(t),i=(0,$t.join)(r,`.zenku-upgrade-${process.pid}`);(0,ue.copyFileSync)(e,i),(0,ue.chmodSync)(i,493);try{(0,ue.renameSync)(i,t)}catch{try{(0,ue.unlinkSync)(i)}catch{}throw new Error(`failed to replace binary at ${t}`)}}async function e2(e,t){let r=await fetch(e);if(!r.ok)throw new Error(`download failed: HTTP ${r.status}`);let i=Buffer.from(await r.arrayBuffer());(0,ue.writeFileSync)(t,i)}function Pb(e){return Ob((0,$t.dirname)(e))}async function Ys(e,t,r){let i=`${e.version}.tgz`,n=(0,ue.mkdtempSync)((0,$t.join)((0,Fb.tmpdir)(),"zenku-upgrade-")),o=(0,$t.join)(n,i);try{await e2(e.tarball,o),XS(o,e.integrity),(0,fm.execFileSync)("tar",["xzf",o,"-C",n],{stdio:"pipe"});let s=(0,$t.join)(n,"package","zenku");if(!(0,ue.existsSync)(s))throw new Error("downloaded package is missing binary");let a=(0,$t.dirname)(t);if(Ob(a)){QS(s,t);return}if(!r.allowSudo)throw new Error(`no write permission for ${a}`);(0,fm.execFileSync)("sudo",["install","-m","755",s,t],{stdio:"inherit"})}finally{(0,ue.rmSync)(n,{recursive:!0,force:!0})}}var Ab="https://registry.npmjs.org",t2=15e3;async function zb(e){let t=new AbortController,r=setTimeout(()=>t.abort(),t2);try{let i=await fetch(e,{signal:t.signal});if(!i.ok)throw new Error(`HTTP ${i.status}`);return await i.json()}catch(i){throw i instanceof DOMException&&i.name==="AbortError"?new Error("request timed out"):i}finally{clearTimeout(r)}}function Tb(e,t){if(!e.version)throw new Error(`registry response missing version for tag "${t}"`);if(!e.dist?.tarball)throw new Error(`registry response missing dist.tarball for v${e.version}`);if(!e.dist?.integrity)throw new Error(`registry response missing dist.integrity for v${e.version}`);return{version:e.version,tarball:e.dist.tarball,integrity:e.dist.integrity,tag:t}}async function Xs(e,t){let r=Ib(e),i=encodeURIComponent(r),n=t==="stable"?"stable":"latest";try{let o=await zb(`${Ab}/${i}/${n}`);return Tb(o,n)}catch(o){if(t==="stable"){let s=await zb(`${Ab}/${i}/latest`);return Tb(s,"latest")}throw o}}function n2(){try{let e=we(),{effective:t}=Ut(e,void 0);return t.channel}catch{return"latest"}}function r2(e){return e==="bundle"?"cli-node":Ks()}function jb(e){e.addCommand(new O("upgrade").description("Upgrade zenku to the latest version").action(async()=>{let t=Hs(),r=Qn(t),i=Xn(),n=n2();if(t==="development"){v({json:()=>({mode:t,message:r.message,previous:i,latest:i,upgraded:!1,command:r.command}),human:()=>{E("%s",r.message)}});return}let o=r2(t),s=await S("Checking for updates...",()=>Xs(o,n));if(i===s.version){let a=`Already up to date (v${i}).`;v({json:()=>({previous:i,latest:s.version,upgraded:!1,mode:t,message:a}),human:()=>E("%s",a)});return}if(t!=="standalone"){v({json:()=>({previous:i,latest:s.version,upgraded:!1,mode:t,command:r.command,message:r.message}),human:()=>{E("v%s -> v%s",i,s.version),E("%s",r.message),E("Run: %s",r.command)}});return}E("v%s -> v%s",i,s.version),await S(`Downloading v${s.version}...`,async()=>{await Ys(s,process.execPath,{allowSudo:!0})}),v({json:()=>({previous:i,latest:s.version,upgraded:!0,mode:t}),human:()=>E("Upgraded zenku to v%s.",s.version)})}))}function i2(e){return{name:e.name(),description:e.description??"",required:e.required,variadic:e.variadic,defaultValue:e.defaultValue}}function o2(e){return{name:e.name(),flags:e.flags,description:e.description??"",short:e.short,long:e.long,required:e.required,optional:e.optional,variadic:e.variadic,mandatory:e.mandatory,defaultValue:e.defaultValue}}function Ub(e,t){let r=[...t,e.name()].filter(Boolean),i=e.commands.map(n=>Ub(n,r)).sort((n,o)=>n.commandPath.localeCompare(o.commandPath));return{name:e.name(),commandPath:r.join(" "),summary:e.summary(),description:e.description(),aliases:e.aliases(),usage:e.usage(),arguments:e.registeredArguments.map(i2),options:e.options.filter(n=>n.long!=="--help").map(o2),subcommands:i}}function Nb(e){let t=new O("meta").description("Machine-readable metadata for CLI integrations");t.command("commands").description("Print CLI command tree metadata").action(()=>{v({json:()=>Ub(e,[]),human:()=>{process.stdout.write("Use `zenku --json meta commands` for command metadata.\n")}})}),e.addCommand(t)}var he=require("node:fs"),si=require("node:path");var s2="update-state.json",a2="update.lock",Rb={version:1,lastCheckedAt:"",lastSeenLatestVersion:"",pendingNotice:null,lastNotifiedVersion:"",lastNotifiedAt:""};function mm(){return(0,si.join)(ts(),s2)}function u2(){return(0,si.join)(ts(),a2)}function Bb(){let e=(0,si.dirname)(mm());(0,he.existsSync)(e)||(0,he.mkdirSync)(e,{recursive:!0,mode:448})}function Qs(){let e=mm();if(!(0,he.existsSync)(e))return{...Rb};try{let t=JSON.parse((0,he.readFileSync)(e,"utf-8"));return{version:1,lastCheckedAt:t.lastCheckedAt??"",lastSeenLatestVersion:t.lastSeenLatestVersion??"",pendingNotice:t.pendingNotice??null,lastNotifiedVersion:t.lastNotifiedVersion??"",lastNotifiedAt:t.lastNotifiedAt??""}}catch{return{...Rb}}}function _t(e){Bb();let t=mm(),r=`${t}.${process.pid}.tmp`;(0,he.writeFileSync)(r,JSON.stringify(e,null,2),{encoding:"utf-8",mode:384}),(0,he.renameSync)(r,t)}function Lb(){Bb();let e=u2(),t;try{t=(0,he.openSync)(e,"wx",384)}catch{return null}return(0,he.writeFileSync)(t,String(process.pid),{encoding:"utf-8"}),{release:()=>{try{(0,he.closeSync)(t)}catch{}(0,he.rmSync)(e,{force:!0})}}}function hm(){return new Date().toISOString()}function c2(){let e=we(),t=J(te()),r;try{({profile:r}=Y(t))}catch{r=e.profiles[t]}return{cfg:e,profileName:t,profile:r}}function l2(e,t,r=Date.now()){if(!e.lastCheckedAt)return!0;let i=Date.parse(e.lastCheckedAt);return Number.isFinite(i)?r-i>=t*6e4:!0}function ea(e,t,r,i){return{version:e,message:t,command:r,channel:i,createdAt:hm()}}function d2(e){return e==="bundle"?"cli-node":e==="standalone"||e==="npm-managed"?Ks():null}function p2(e){return e==="development"}async function Zb(){if(process.env.ZENKU_SCHEDULED==="1")return;let e;try{e=c2()}catch{return}let{cfg:t,profile:r}=e,{effective:i}=Ut(t,r);if(!i.enabled)return;let n=Lb();if(n)try{let o=Qs();if(!l2(o,i.checkIntervalMinutes))return;let s=Hs(),a=Xn();if(p2(s)){o.lastCheckedAt=hm(),o.pendingNotice=null,_t(o);return}let u=d2(s);if(!u)return;let c=await Xs(u,i.channel);if(o.lastCheckedAt=hm(),o.lastSeenLatestVersion=c.version,c.version===a){o.pendingNotice=null,_t(o);return}if(s==="standalone"&&i.autoApplyStandalone){if(Pb(process.execPath))try{await Ys(c,process.execPath,{allowSudo:!1}),o.pendingNotice=ea(c.version,`Updated zenku to v${c.version}. Restart to use the new version.`,"",s),_t(o);return}catch{let p=Qn("standalone");o.pendingNotice=ea(c.version,`Update available: v${a} -> v${c.version}. ${p.message}`,p.command,s),_t(o);return}let d=Qn("standalone");o.pendingNotice=ea(c.version,`Update available: v${a} -> v${c.version}. ${d.message}`,d.command,s),_t(o);return}let l=Qn(s);o.pendingNotice=ea(c.version,`Update available: v${a} -> v${c.version}. ${l.message}`,l.command,s),_t(o)}catch{}finally{n.release()}}function Mb(e){e.command("_update-check",{hidden:!0}).description("Internal updater worker command").action(async()=>{await Zb()})}var qb=require("node:child_process");function f2(e){let t=[],r=e;for(;r&&r.parent;)t.unshift(r.name()),r=r.parent;return t}function m2(){let e=process.argv[1]??"";return!e||e.startsWith("-")?!1:e.endsWith(".js")||e.endsWith(".cjs")||e.endsWith(".mjs")||e.includes("zenku")}function h2(e){let t=process.execPath,r=m2()?[process.argv[1],"_update-check","--non-interactive"]:["_update-check","--non-interactive"];return e&&r.push("--profile",e),{executable:t,args:r}}function g2(e){let t=f2(e);return!!(t.includes("_update-check")||t[0]==="upgrade"||process.env.ZENKU_SCHEDULED==="1"||process.env.ZENKU_INTERNAL_UPDATE_CHECK==="1")}function v2(e,t){return t||(process.env.ZENKU_PROFILE?process.env.ZENKU_PROFILE:e.defaultProfile?e.defaultProfile:"default")}function y2(e,t){let r=e.trim();return!t||r.includes(t)?r:`${r} Run: ${t}`}function D2(e,t,r){return e&&!t?"interactive":!e&&r?"stderr":"none"}function b2(e,t,r=Date.now()){let i=e.pendingNotice;if(!i)return!1;if(!e.lastNotifiedVersion||e.lastNotifiedVersion!==i.version||!e.lastNotifiedAt)return!0;let n=Date.parse(e.lastNotifiedAt);return Number.isFinite(n)?r-n>=t*6e4:!0}function $2(e,t){let r=D2(le(),xe(),t);if(r==="interactive"){process.stdout.write(`${e}
322
- `);return}r==="stderr"&&process.stderr.write(`[zenku update] ${e}
323
- `)}function _2(e,t){let r=Qs();if(!b2(r,e))return;let i=r.pendingNotice;i&&($2(y2(i.message,i.command),t),r.lastNotifiedVersion=i.version,r.lastNotifiedAt=new Date().toISOString(),_t(r))}function w2(e){let{executable:t,args:r}=h2(e);(0,qb.spawn)(t,r,{detached:!0,stdio:"ignore",env:{...process.env,ZENKU_INTERNAL_UPDATE_CHECK:"1"}}).unref()}function Vb(e,t){if(g2(e))return;let r;try{r=we()}catch{return}let i=v2(r,t.profile),n=r.profiles[i],{effective:o}=Ut(r,n);if(o.enabled){try{_2(o.checkIntervalMinutes,o.notifyInNonInteractive)}catch{}try{w2(i)}catch{}}}function Wb(){let e=new O;return e.name("zenku").description("Zenku CLI \u2014 manage PocketBase services from the terminal.").version(Xn()).option("--profile <name>","config profile to use").option("--tenant <id>","override tenant ID for this command").option("--account <id>","override account ID for this command").option("--json","output as JSON").option("--interactive","force interactive mode").option("--non-interactive","force non-interactive mode").hook("preAction",t=>{let r=t.optsWithGlobals();Hy(r.profile??""),jy(r.tenant??""),Uy(r.account??""),Ay(!!r.json),r.interactive&&r.nonInteractive&&g("--interactive and --non-interactive cannot be used together"),r.interactive?kp("interactive"):r.nonInteractive&&kp("non-interactive"),Vb(t,{profile:r.profile})}),e.commandsGroup("Core Commands:"),cD(e),pD(e),mD(e),OD(e),e.commandsGroup("Platform Commands:"),sD(e),aD(e),AD(e),yb(e),e.commandsGroup("Auth & Config:"),eD(e),tD(e),nD(e),iD(e),e.commandsGroup("Other:"),Nb(e),_b(e),jb(e),Mb(e),e.addHelpCommand(new O("help").argument("[command]")),e}var x2=Wb();x2.parse();