@farthershore/cli 0.14.0 → 0.14.1

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.
Files changed (3) hide show
  1. package/dist/index.js +81 -98
  2. package/dist/mcp.js +40 -29
  3. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,135 +1,117 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire as __createRequire } from "node:module";const require=__createRequire(import.meta.url);
3
- var k_=Object.create;var Hi=Object.defineProperty;var S_=Object.getOwnPropertyDescriptor;var $_=Object.getOwnPropertyNames;var I_=Object.getPrototypeOf,E_=Object.prototype.hasOwnProperty;var Kt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ie=(e,t)=>{for(var r in t)Hi(e,r,{get:t[r],enumerable:!0})},w_=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $_(t))!E_.call(e,n)&&n!==r&&Hi(e,n,{get:()=>t[n],enumerable:!(o=S_(t,n))||o.enumerable});return e};var O_=(e,t,r)=>(r=e!=null?k_(I_(e)):{},w_(t||!e||!e.__esModule?Hi(r,"default",{value:e,enumerable:!0}):r,e));var Wt=Be(Ki=>{var Mn=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Gi=class extends Mn{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ki.CommanderError=Mn;Ki.InvalidArgumentError=Gi});var Zn=Be(qi=>{var{InvalidArgumentError:T_}=Wt(),Wi=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.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}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,o)=>{if(!this.argChoices.includes(r))throw new T_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function A_(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}qi.Argument=Wi;qi.humanReadableArgName=A_});var Xi=Be(Yi=>{var{humanReadableArgName:P_}=Zn(),Ji=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),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),o=t._getHelpOption();if(o&&!o.hidden){let n=o.short&&t._findOption(o.short),i=o.long&&t._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(t.createOption(o.long,o.description)):o.short&&!n&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let n=o.options.filter(i=>!i.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(o=>P_(o)).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((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let n=t.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).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?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(m,g){return r.formatItem(m,o,g,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],c=r.commandDescription(t);c.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(c),n),""]));let u=r.visibleArguments(t).map(m=>i(r.styleArgumentTerm(r.argumentTerm(m)),r.styleArgumentDescription(r.argumentDescription(m))));u.length>0&&(s=s.concat([r.styleTitle("Arguments:"),...u,""]));let l=r.visibleOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));if(l.length>0&&(s=s.concat([r.styleTitle("Options:"),...l,""])),r.showGlobalOptions){let m=r.visibleGlobalOptions(t).map(g=>i(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));m.length>0&&(s=s.concat([r.styleTitle("Global Options:"),...m,""]))}let d=r.visibleCommands(t).map(m=>i(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));return d.length>0&&(s=s.concat([r.styleTitle("Commands:"),...d,""])),s.join(`
4
- `)}displayWidth(t){return cd(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,o,n){let s=" ".repeat(2);if(!o)return s+t;let c=t.padEnd(r+t.length-n.displayWidth(t)),u=2,d=(this.helpWidth??80)-r-u-2,m;return d<this.minWidthToWrap||n.preformatted(o)?m=o:m=n.boxWrap(o,d).replace(/\n/g,`
3
+ var m_=Object.create;var Hi=Object.defineProperty;var p_=Object.getOwnPropertyDescriptor;var f_=Object.getOwnPropertyNames;var g_=Object.getPrototypeOf,h_=Object.prototype.hasOwnProperty;var Ht=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ve=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Se=(e,t)=>{for(var r in t)Hi(e,r,{get:t[r],enumerable:!0})},__=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of f_(t))!h_.call(e,n)&&n!==r&&Hi(e,n,{get:()=>t[n],enumerable:!(o=p_(t,n))||o.enumerable});return e};var v_=(e,t,r)=>(r=e!=null?m_(g_(e)):{},__(t||!e||!e.__esModule?Hi(r,"default",{value:e,enumerable:!0}):r,e));var Gt=Ve(Ki=>{var Fn=class extends Error{constructor(t,r,o){super(o),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=r,this.exitCode=t,this.nestedError=void 0}},Gi=class extends Fn{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Ki.CommanderError=Fn;Ki.InvalidArgumentError=Gi});var Mn=Ve(qi=>{var{InvalidArgumentError:b_}=Gt(),Wi=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.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}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,o)=>{if(!this.argChoices.includes(r))throw new b_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function y_(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}qi.Argument=Wi;qi.humanReadableArgName=y_});var Xi=Ve(Yi=>{var{humanReadableArgName:x_}=Mn(),Ji=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),o=t._getHelpCommand();return o&&!o._hidden&&r.push(o),this.sortSubcommands&&r.sort((n,i)=>n.name().localeCompare(i.name())),r}compareOptions(t,r){let o=n=>n.short?n.short.replace(/^-/,""):n.long.replace(/^--/,"");return o(t).localeCompare(o(r))}visibleOptions(t){let r=t.options.filter(n=>!n.hidden),o=t._getHelpOption();if(o&&!o.hidden){let n=o.short&&t._findOption(o.short),i=o.long&&t._findOption(o.long);!n&&!i?r.push(o):o.long&&!i?r.push(t.createOption(o.long,o.description)):o.short&&!n&&r.push(t.createOption(o.short,o.description))}return this.sortOptions&&r.sort(this.compareOptions),r}visibleGlobalOptions(t){if(!this.showGlobalOptions)return[];let r=[];for(let o=t.parent;o;o=o.parent){let n=o.options.filter(i=>!i.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(o=>x_(o)).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((o,n)=>Math.max(o,this.displayWidth(r.styleSubcommandTerm(r.subcommandTerm(n)))),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestGlobalOptionTermLength(t,r){return r.visibleGlobalOptions(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleOptionTerm(r.optionTerm(n)))),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce((o,n)=>Math.max(o,this.displayWidth(r.styleArgumentTerm(r.argumentTerm(n)))),0)}commandUsage(t){let r=t._name;t._aliases[0]&&(r=r+"|"+t._aliases[0]);let o="";for(let n=t.parent;n;n=n.parent)o=n.name()+" "+o;return o+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){let r=[];return t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).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?`${t.description} (${r.join(", ")})`:t.description}argumentDescription(t){let r=[];if(t.argChoices&&r.push(`choices: ${t.argChoices.map(o=>JSON.stringify(o)).join(", ")}`),t.defaultValue!==void 0&&r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`),r.length>0){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return t.description}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(m,g){return r.formatItem(m,o,g,r)}let s=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],c=r.commandDescription(t);c.length>0&&(s=s.concat([r.boxWrap(r.styleCommandDescription(c),n),""]));let u=r.visibleArguments(t).map(m=>i(r.styleArgumentTerm(r.argumentTerm(m)),r.styleArgumentDescription(r.argumentDescription(m))));u.length>0&&(s=s.concat([r.styleTitle("Arguments:"),...u,""]));let l=r.visibleOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));if(l.length>0&&(s=s.concat([r.styleTitle("Options:"),...l,""])),r.showGlobalOptions){let m=r.visibleGlobalOptions(t).map(g=>i(r.styleOptionTerm(r.optionTerm(g)),r.styleOptionDescription(r.optionDescription(g))));m.length>0&&(s=s.concat([r.styleTitle("Global Options:"),...m,""]))}let d=r.visibleCommands(t).map(m=>i(r.styleSubcommandTerm(r.subcommandTerm(m)),r.styleSubcommandDescription(r.subcommandDescription(m))));return d.length>0&&(s=s.concat([r.styleTitle("Commands:"),...d,""])),s.join(`
4
+ `)}displayWidth(t){return id(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,o,n){let s=" ".repeat(2);if(!o)return s+t;let c=t.padEnd(r+t.length-n.displayWidth(t)),u=2,d=(this.helpWidth??80)-r-u-2,m;return d<this.minWidthToWrap||n.preformatted(o)?m=o:m=n.boxWrap(o,d).replace(/\n/g,`
5
5
  `+" ".repeat(r+u)),s+c+" ".repeat(u)+m.replace(/\n/g,`
6
6
  ${s}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,i=[];return o.forEach(s=>{let c=s.match(n);if(c===null){i.push("");return}let u=[c.shift()],l=this.displayWidth(u[0]);c.forEach(d=>{let m=this.displayWidth(d);if(l+m<=r){u.push(d),l+=m;return}i.push(u.join(""));let g=d.trimStart();u=[g],l=this.displayWidth(g)}),i.push(u.join(""))}),i.join(`
7
- `)}};function cd(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Yi.Help=Ji;Yi.stripColor=cd});var no=Be(to=>{var{InvalidArgumentError:C_}=Wt(),Qi=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 o=N_(t);this.short=o.shortFlag,this.long=o.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}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}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new C_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?ud(this.name().replace(/^no-/,"")):ud(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},eo=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,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let n=this.negativeOptions.get(o).presetArg,i=n!==void 0?n:!1;return r.negate===(i===t)}};function ud(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function N_(e){let t,r,o=/^-[^-]$/,n=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(t=i.shift()),n.test(i[0])&&(r=i.shift()),!t&&o.test(i[0])&&(t=i.shift()),!t&&n.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let s=i[0],c=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${c}
7
+ `)}};function id(e){let t=/\x1b\[\d*(;\d*)*m/g;return e.replace(t,"")}Yi.Help=Ji;Yi.stripColor=id});var no=Ve(to=>{var{InvalidArgumentError:k_}=Gt(),Qi=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 o=S_(t);this.short=o.shortFlag,this.long=o.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}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}_concatValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:r.concat(t)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new k_(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?od(this.name().replace(/^no-/,"")):od(this.name())}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},eo=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,o)=>{this.positiveOptions.has(o)&&this.dualOptions.add(o)})}valueFromOption(t,r){let o=r.attributeName();if(!this.dualOptions.has(o))return!0;let n=this.negativeOptions.get(o).presetArg,i=n!==void 0?n:!1;return r.negate===(i===t)}};function od(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function S_(e){let t,r,o=/^-[^-]$/,n=/^--[^-]/,i=e.split(/[ |,]+/).concat("guard");if(o.test(i[0])&&(t=i.shift()),n.test(i[0])&&(r=i.shift()),!t&&o.test(i[0])&&(t=i.shift()),!t&&n.test(i[0])&&(t=r,r=i.shift()),i[0].startsWith("-")){let s=i[0],c=`option creation failed due to '${s}' in option flags '${e}'`;throw/^-[^-][^-]/.test(s)?new Error(`${c}
8
8
  - a short flag is a single dash and a single character
9
9
  - either use a single dash and a single character (for a short flag)
10
10
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(s)?new Error(`${c}
11
11
  - too many short flags`):n.test(s)?new Error(`${c}
12
12
  - too many long flags`):new Error(`${c}
13
- - 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}}to.Option=Qi;to.DualOptions=eo});var dd=Be(ld=>{function R_(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let n=1;n<=e.length;n++){let i=1;e[n-1]===t[o-1]?i=0:i=1,r[n][o]=Math.min(r[n-1][o]+1,r[n][o-1]+1,r[n-1][o-1]+i),n>1&&o>1&&e[n-1]===t[o-2]&&e[n-2]===t[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[e.length][t.length]}function D_(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 o=[],n=3,i=.4;return t.forEach(s=>{if(s.length<=1)return;let c=R_(e,s),u=Math.max(e.length,s.length);(u-c)/u>i&&(c<n?(n=c,o=[s]):c===n&&o.push(s))}),o.sort((s,c)=>s.localeCompare(c)),r&&(o=o.map(s=>`--${s}`)),o.length>1?`
13
+ - 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}}to.Option=Qi;to.DualOptions=eo});var sd=Ve(ad=>{function $_(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let r=[];for(let o=0;o<=e.length;o++)r[o]=[o];for(let o=0;o<=t.length;o++)r[0][o]=o;for(let o=1;o<=t.length;o++)for(let n=1;n<=e.length;n++){let i=1;e[n-1]===t[o-1]?i=0:i=1,r[n][o]=Math.min(r[n-1][o]+1,r[n][o-1]+1,r[n-1][o-1]+i),n>1&&o>1&&e[n-1]===t[o-2]&&e[n-2]===t[o-1]&&(r[n][o]=Math.min(r[n][o],r[n-2][o-2]+1))}return r[e.length][t.length]}function I_(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 o=[],n=3,i=.4;return t.forEach(s=>{if(s.length<=1)return;let c=$_(e,s),u=Math.max(e.length,s.length);(u-c)/u>i&&(c<n?(n=c,o=[s]):c===n&&o.push(s))}),o.sort((s,c)=>s.localeCompare(c)),r&&(o=o.map(s=>`--${s}`)),o.length>1?`
14
14
  (Did you mean one of ${o.join(", ")}?)`:o.length===1?`
15
- (Did you mean ${o[0]}?)`:""}ld.suggestSimilar=D_});var gd=Be(so=>{var z_=Kt("node:events").EventEmitter,ro=Kt("node:child_process"),Ee=Kt("node:path"),Vn=Kt("node:fs"),A=Kt("node:process"),{Argument:U_,humanReadableArgName:j_}=Zn(),{CommanderError:io}=Wt(),{Help:L_,stripColor:F_}=Xi(),{Option:md,DualOptions:M_}=no(),{suggestSimilar:pd}=dd(),oo=class e extends z_{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=>A.stdout.write(r),writeErr:r=>A.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>A.stdout.isTTY?A.stdout.columns:void 0,getErrHelpWidth:()=>A.stderr.isTTY?A.stderr.columns:void 0,getOutHasColors:()=>ao()??(A.stdout.isTTY&&A.stdout.hasColors?.()),getErrHasColors:()=>ao()??(A.stderr.isTTY&&A.stderr.hasColors?.()),stripColor:r=>F_(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}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,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,s,c]=t.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return n&&(u.description(n),u._executableHandler=!0),i.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(i.noHelp||i.hidden),u._executableFile=i.executableFile||null,c&&u.arguments(c),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),n?this:u}createCommand(t){return new e(t)}createHelp(){return Object.assign(new L_,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(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
16
- - 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 U_(t,r)}argument(t,r,o,n){let i=this.createArgument(t,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&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,this;t=t??"help [command]";let[,o,n]=t.match(/([^ ]+) *(.*)/),i=r??"display help for command",s=this.createCommand(o);return s.helpOption(!1),n&&s.arguments(n),i&&s.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=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 o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
17
- Expecting one of '${o.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,o){this._exitCallback&&this._exitCallback(new io(t,r,o)),A.exit(t)}action(t){let r=o=>{let n=this.registeredArguments.length,i=o.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new md(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let s=`${n} ${i.message}`;this.error(s,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=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 '${o}'
18
- - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),o=r(t).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,s,c)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let u=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,u,s):i!==null&&t.variadic&&(i=t._concatValue(i,u)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,c)};return this.on("option:"+r,i=>{let s=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,s,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let s=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,s,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof md)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,o);if(s.makeOptionMandatory(!!t.mandatory),typeof n=="function")s.default(i).argParser(n);else if(n instanceof RegExp){let c=n;n=(u,l)=>{let d=c.exec(u);return d?d[0]:l},s.default(i).argParser(n)}else s.default(n);return this.addOption(s)}option(t,r,o,n){return this._optionEx({},t,r,o,n)}requiredOption(t,r,o,n){return this._optionEx({mandatory:!0},t,r,o,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,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.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){A.versions?.electron&&(r.from="electron");let n=A.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=A.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":A.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=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",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),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.
19
- - 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,o){if(Vn.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",i=`'${t}' does not exist
15
+ (Did you mean ${o[0]}?)`:""}ad.suggestSimilar=I_});var dd=Ve(so=>{var E_=Ht("node:events").EventEmitter,ro=Ht("node:child_process"),$e=Ht("node:path"),Zn=Ht("node:fs"),A=Ht("node:process"),{Argument:w_,humanReadableArgName:O_}=Mn(),{CommanderError:io}=Gt(),{Help:T_,stripColor:A_}=Xi(),{Option:cd,DualOptions:P_}=no(),{suggestSimilar:ud}=sd(),oo=class e extends E_{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=>A.stdout.write(r),writeErr:r=>A.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>A.stdout.isTTY?A.stdout.columns:void 0,getErrHelpWidth:()=>A.stderr.isTTY?A.stderr.columns:void 0,getOutHasColors:()=>ao()??(A.stdout.isTTY&&A.stdout.hasColors?.()),getErrHasColors:()=>ao()??(A.stderr.isTTY&&A.stderr.hasColors?.()),stripColor:r=>A_(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}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,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,s,c]=t.match(/([^ ]+) *(.*)/),u=this.createCommand(s);return n&&(u.description(n),u._executableHandler=!0),i.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(i.noHelp||i.hidden),u._executableFile=i.executableFile||null,c&&u.arguments(c),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),n?this:u}createCommand(t){return new e(t)}createHelp(){return Object.assign(new T_,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(Object.assign(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
16
+ - 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 w_(t,r)}argument(t,r,o,n){let i=this.createArgument(t,r);return typeof o=="function"?i.default(n).argParser(o):i.default(o),this.addArgument(i),this}arguments(t){return t.trim().split(/ +/).forEach(r=>{this.argument(r)}),this}addArgument(t){let r=this.registeredArguments.slice(-1)[0];if(r&&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,this;t=t??"help [command]";let[,o,n]=t.match(/([^ ]+) *(.*)/),i=r??"display help for command",s=this.createCommand(o);return s.helpOption(!1),n&&s.arguments(n),i&&s.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=s,this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=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 o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
17
+ Expecting one of '${o.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,o){this._exitCallback&&this._exitCallback(new io(t,r,o)),A.exit(t)}action(t){let r=o=>{let n=this.registeredArguments.length,i=o.slice(0,n);return this._storeOptionsAsProperties?i[n]=this:i[n]=this.opts(),i.push(this),t.apply(this,i)};return this._actionHandler=r,this}createOption(t,r){return new cd(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let s=`${n} ${i.message}`;this.error(s,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(t){let r=t.short&&this._findOption(t.short)||t.long&&this._findOption(t.long);if(r){let o=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 '${o}'
18
+ - already used by option '${r.flags}'`)}this.options.push(t)}_registerCommand(t){let r=n=>[n.name()].concat(n.aliases()),o=r(t).find(n=>this._findCommand(n));if(o){let n=r(this._findCommand(o)).join("|"),i=r(t).join("|");throw new Error(`cannot add command '${i}' as already have command '${n}'`)}this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();if(t.negate){let i=t.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(o,t.defaultValue===void 0?!0:t.defaultValue,"default")}else t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,s,c)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let u=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,u,s):i!==null&&t.variadic&&(i=t._concatValue(i,u)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,c)};return this.on("option:"+r,i=>{let s=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,s,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let s=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,s,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof cd)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let s=this.createOption(r,o);if(s.makeOptionMandatory(!!t.mandatory),typeof n=="function")s.default(i).argParser(n);else if(n instanceof RegExp){let c=n;n=(u,l)=>{let d=c.exec(u);return d?d[0]:l},s.default(i).argParser(n)}else s.default(n);return this.addOption(s)}option(t,r,o,n){return this._optionEx({},t,r,o,n)}requiredOption(t,r,o,n){return this._optionEx({mandatory:!0},t,r,o,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,o){return this._storeOptionsAsProperties?this[t]=r:this._optionValues[t]=r,this._optionValueSources[t]=o,this}getOptionValueSource(t){return this._optionValueSources[t]}getOptionValueSourceWithGlobals(t){let r;return this._getCommandAndAncestors().forEach(o=>{o.getOptionValueSource(t)!==void 0&&(r=o.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){A.versions?.electron&&(r.from="electron");let n=A.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=A.argv),this.rawArgs=t.slice();let o;switch(r.from){case void 0:case"node":this._scriptPath=t[1],o=t.slice(2);break;case"electron":A.defaultApp?(this._scriptPath=t[1],o=t.slice(2)):o=t.slice(1);break;case"user":o=t.slice(0);break;case"eval":o=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",o}parse(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return this._parseCommand([],o),this}async parseAsync(t,r){this._prepareForParse();let o=this._prepareUserArgs(t,r);return await this._parseCommand([],o),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.
19
+ - 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,o){if(Zn.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",i=`'${t}' does not exist
20
20
  - if '${o}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
21
21
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
22
- - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function i(d,m){let g=Ee.resolve(d,m);if(Vn.existsSync(g))return g;if(n.includes(Ee.extname(m)))return;let h=n.find(S=>Vn.existsSync(`${g}${S}`));if(h)return`${g}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,c=this._executableDir||"";if(this._scriptPath){let d;try{d=Vn.realpathSync(this._scriptPath)}catch{d=this._scriptPath}c=Ee.resolve(Ee.dirname(d),c)}if(c){let d=i(c,s);if(!d&&!t._executableFile&&this._scriptPath){let m=Ee.basename(this._scriptPath,Ee.extname(this._scriptPath));m!==this._name&&(d=i(c,`${m}-${t._name}`))}s=d||s}o=n.includes(Ee.extname(s));let u;A.platform!=="win32"?o?(r.unshift(s),r=fd(A.execArgv).concat(r),u=ro.spawn(A.argv[0],r,{stdio:"inherit"})):u=ro.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,c,t._name),r.unshift(s),r=fd(A.execArgv).concat(r),u=ro.spawn(A.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(m=>{A.on(m,()=>{u.killed===!1&&u.exitCode===null&&u.kill(m)})});let l=this._exitCallback;u.on("close",d=>{d=d??1,l?l(new io(d,"commander.executeSubCommandAsync","(close)")):A.exit(d)}),u.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,c,t._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)A.exit(1);else{let m=new io(1,"commander.executeSubCommandAsync","(error)");m.nestedError=d,l(m)}}),this.runningCommand=u}_dispatchSubcommand(t,r,o){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,n,"preSubcommand"),i=this._chainOrCall(i,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(o));else return n._parseCommand(r,o)}),i}_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=(o,n,i)=>{let s=n;if(n!==null&&o.parseArg){let c=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;s=this._callParseArg(o,n,i,c)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,n)=>{let i=o.defaultValue;o.variadic?n<this.args.length?(i=this.args.slice(n),o.parseArg&&(i=i.reduce((s,c)=>t(o,c,s),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=t(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,n=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:i,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let n=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.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(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`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(i,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,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(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=t.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],n=r,i=t.slice();function s(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){n===o&&n.push(u),n.push(...i);break}if(c&&!s(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,s(u)){let l=this._findOption(u);if(l){if(l.required){let d=i.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;i.length>0&&!s(i[0])&&(d=i.shift()),this.emit(`option:${l.name()}`,d)}else this.emit(`option:${l.name()}`);c=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),d=this._findOption(u.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,u.slice(l+1));continue}}if(s(u)&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(u)){r.push(u),i.length>0&&o.push(...i);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u),i.length>0&&r.push(...i);break}else if(this._defaultCommandName){o.push(u),i.length>0&&o.push(...i);break}}if(this._passThroughOptions){n.push(u),i.length>0&&n.push(...i);break}n.push(u)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].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
+ - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=!1,n=[".js",".ts",".tsx",".mjs",".cjs"];function i(d,m){let g=$e.resolve(d,m);if(Zn.existsSync(g))return g;if(n.includes($e.extname(m)))return;let h=n.find(S=>Zn.existsSync(`${g}${S}`));if(h)return`${g}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=t._executableFile||`${this._name}-${t._name}`,c=this._executableDir||"";if(this._scriptPath){let d;try{d=Zn.realpathSync(this._scriptPath)}catch{d=this._scriptPath}c=$e.resolve($e.dirname(d),c)}if(c){let d=i(c,s);if(!d&&!t._executableFile&&this._scriptPath){let m=$e.basename(this._scriptPath,$e.extname(this._scriptPath));m!==this._name&&(d=i(c,`${m}-${t._name}`))}s=d||s}o=n.includes($e.extname(s));let u;A.platform!=="win32"?o?(r.unshift(s),r=ld(A.execArgv).concat(r),u=ro.spawn(A.argv[0],r,{stdio:"inherit"})):u=ro.spawn(s,r,{stdio:"inherit"}):(this._checkForMissingExecutable(s,c,t._name),r.unshift(s),r=ld(A.execArgv).concat(r),u=ro.spawn(A.execPath,r,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(m=>{A.on(m,()=>{u.killed===!1&&u.exitCode===null&&u.kill(m)})});let l=this._exitCallback;u.on("close",d=>{d=d??1,l?l(new io(d,"commander.executeSubCommandAsync","(close)")):A.exit(d)}),u.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(s,c,t._name);else if(d.code==="EACCES")throw new Error(`'${s}' not executable`);if(!l)A.exit(1);else{let m=new io(1,"commander.executeSubCommandAsync","(error)");m.nestedError=d,l(m)}}),this.runningCommand=u}_dispatchSubcommand(t,r,o){let n=this._findCommand(t);n||this.help({error:!0}),n._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,n,"preSubcommand"),i=this._chainOrCall(i,()=>{if(n._executableHandler)this._executeSubCommand(n,r.concat(o));else return n._parseCommand(r,o)}),i}_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=(o,n,i)=>{let s=n;if(n!==null&&o.parseArg){let c=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;s=this._callParseArg(o,n,i,c)}return s};this._checkNumberOfArguments();let r=[];this.registeredArguments.forEach((o,n)=>{let i=o.defaultValue;o.variadic?n<this.args.length?(i=this.args.slice(n),o.parseArg&&(i=i.reduce((s,c)=>t(o,c,s),o.defaultValue))):i===void 0&&(i=[]):n<this.args.length&&(i=this.args[n],o.parseArg&&(i=t(o,i,o.defaultValue))),r[n]=i}),this.processedArgs=r}_chainOrCall(t,r){return t&&t.then&&typeof t.then=="function"?t.then(()=>r()):r()}_chainOrCallHooks(t,r){let o=t,n=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[r]!==void 0).forEach(i=>{i._lifeCycleHooks[r].forEach(s=>{n.push({hookedCommand:i,callback:s})})}),r==="postAction"&&n.reverse(),n.forEach(i=>{o=this._chainOrCall(o,()=>i.callback(i.hookedCommand,this))}),o}_chainOrCallSubCommandHook(t,r,o){let n=t;return this._lifeCycleHooks[o]!==void 0&&this._lifeCycleHooks[o].forEach(i=>{n=this._chainOrCall(n,()=>i(this,r))}),n}_parseCommand(t,r){let o=this.parseOptions(r);if(this._parseOptionsEnv(),this._parseOptionsImplied(),t=t.concat(o.operands),r=o.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(o.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let n=()=>{o.unknown.length>0&&this.unknownOption(o.unknown[0])},i=`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(i,t,r)})),s=this._chainOrCallHooks(s,"postAction"),s}if(this.parent&&this.parent.listenerCount(i))n(),this._processArguments(),this.parent.emit(i,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(o=>{let n=o.attributeName();return this.getOptionValue(n)===void 0?!1:this.getOptionValueSource(n)!=="default"});t.filter(o=>o.conflictsWith.length>0).forEach(o=>{let n=t.find(i=>o.conflictsWith.includes(i.attributeName()));n&&this._conflictingOption(o,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(t=>{t._checkForConflictingLocalOptions()})}parseOptions(t){let r=[],o=[],n=r,i=t.slice();function s(u){return u.length>1&&u[0]==="-"}let c=null;for(;i.length;){let u=i.shift();if(u==="--"){n===o&&n.push(u),n.push(...i);break}if(c&&!s(u)){this.emit(`option:${c.name()}`,u);continue}if(c=null,s(u)){let l=this._findOption(u);if(l){if(l.required){let d=i.shift();d===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,d)}else if(l.optional){let d=null;i.length>0&&!s(i[0])&&(d=i.shift()),this.emit(`option:${l.name()}`,d)}else this.emit(`option:${l.name()}`);c=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),i.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),d=this._findOption(u.slice(0,l));if(d&&(d.required||d.optional)){this.emit(`option:${d.name()}`,u.slice(l+1));continue}}if(s(u)&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(u)){r.push(u),i.length>0&&o.push(...i);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){r.push(u),i.length>0&&r.push(...i);break}else if(this._defaultCommandName){o.push(u),i.length>0&&o.push(...i);break}}if(this._passThroughOptions){n.push(u),i.length>0&&n.push(...i);break}n.push(u)}return{operands:r,unknown:o}}opts(){if(this._storeOptionsAsProperties){let t={},r=this.options.length;for(let o=0;o<r;o++){let n=this.options[o].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}
23
23
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
24
24
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
25
- `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in A.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()}`,A.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new M_(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.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 o=s=>{let c=s.attributeName(),u=this.getOptionValue(c),l=this.options.find(m=>m.negate&&c===m.attributeName()),d=this.options.find(m=>!m.negate&&c===m.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:d||s},n=s=>{let c=o(s),u=c.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${c.envVar}'`:`option '${c.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let s=i.createHelp().visibleOptions(i).filter(c=>c.long).map(c=>c.long);n=n.concat(s),i=i.parent}while(i&&!i._enablePositionalOptions);r=pd(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${o} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=pd(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
26
- `),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 o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.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(o=>j_(o));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)}nameFromFilename(t){return this._name=Ee.basename(t,Ee.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=c=>this._outputConfiguration.writeErr(c),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=c=>this._outputConfiguration.writeOut(c),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:c=>(n||(c=this._outputConfiguration.stripColor(c)),o(c)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),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=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(A.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
25
+ `),this.outputHelp({error:!0}));let o=r||{},n=o.exitCode||1,i=o.code||"commander.error";this._exit(n,i,t)}_parseOptionsEnv(){this.options.forEach(t=>{if(t.envVar&&t.envVar in A.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()}`,A.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new P_(this.options),r=o=>this.getOptionValue(o)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(o));this.options.filter(o=>o.implied!==void 0&&r(o.attributeName())&&t.valueFromOption(this.getOptionValue(o.attributeName()),o)).forEach(o=>{Object.keys(o.implied).filter(n=>!r(n)).forEach(n=>{this.setOptionValueWithSource(n,o.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 o=s=>{let c=s.attributeName(),u=this.getOptionValue(c),l=this.options.find(m=>m.negate&&c===m.attributeName()),d=this.options.find(m=>!m.negate&&c===m.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:d||s},n=s=>{let c=o(s),u=c.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${c.envVar}'`:`option '${c.flags}'`},i=`error: ${n(t)} cannot be used with ${n(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let n=[],i=this;do{let s=i.createHelp().visibleOptions(i).filter(c=>c.long).map(c=>c.long);n=n.concat(s),i=i.parent}while(i&&!i._enablePositionalOptions);r=ud(t,n)}let o=`error: unknown option '${t}'${r}`;this.error(o,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;let r=this.registeredArguments.length,o=r===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${r} argument${o} but got ${t.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let t=this.args[0],r="";if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(i=>{n.push(i.name()),i.alias()&&n.push(i.alias())}),r=ud(t,n)}let o=`error: unknown command '${t}'${r}`;this.error(o,{code:"commander.unknownCommand"})}version(t,r,o){if(t===void 0)return this._version;this._version=t,r=r||"-V, --version",o=o||"output the version number";let n=this.createOption(r,o);return this._versionOptionName=n.attributeName(),this._registerOption(n),this.on("option:"+n.name(),()=>{this._outputConfiguration.writeOut(`${t}
26
+ `),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 o=this.parent?._findCommand(t);if(o){let n=[o.name()].concat(o.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(o=>O_(o));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)}nameFromFilename(t){return this._name=$e.basename(t,$e.extname(t)),this}executableDir(t){return t===void 0?this._executableDir:(this._executableDir=t,this)}helpInformation(t){let r=this.createHelp(),o=this._getOutputContext(t);r.prepareContext({error:o.error,helpWidth:o.helpWidth,outputHasColors:o.hasColors});let n=r.formatHelp(this,r);return o.hasColors?n:this._outputConfiguration.stripColor(n)}_getOutputContext(t){t=t||{};let r=!!t.error,o,n,i;return r?(o=c=>this._outputConfiguration.writeErr(c),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=c=>this._outputConfiguration.writeOut(c),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:c=>(n||(c=this._outputConfiguration.stripColor(c)),o(c)),hasColors:n,helpWidth:i}}outputHelp(t){let r;typeof t=="function"&&(r=t,t=void 0);let o=this._getOutputContext(t),n={error:o.error,write:o.write,command:this};this._getCommandAndAncestors().reverse().forEach(s=>s.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation({error:o.error});if(r&&(i=r(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");o.write(i),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=this._helpOption??void 0:this._helpOption=null,this):(t=t??"-h, --help",r=r??"display help for command",this._helpOption=this.createOption(t,r),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this}help(t){this.outputHelp(t);let r=Number(A.exitCode??0);r===0&&t&&typeof t!="function"&&t.error&&(r=1),this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){let o=["beforeAll","before","after","afterAll"];if(!o.includes(t))throw new Error(`Unexpected value for position to addHelpText.
27
27
  Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let s;typeof r=="function"?s=r({error:i.error,command:i.command}):s=r,s&&i.write(`${s}
28
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function fd(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function ao(){if(A.env.NO_COLOR||A.env.FORCE_COLOR==="0"||A.env.FORCE_COLOR==="false")return!1;if(A.env.FORCE_COLOR||A.env.CLICOLOR_FORCE!==void 0)return!0}so.Command=oo;so.useColor=ao});var bd=Be(ae=>{var{Argument:hd}=Zn(),{Command:co}=gd(),{CommanderError:Z_,InvalidArgumentError:_d}=Wt(),{Help:V_}=Xi(),{Option:vd}=no();ae.program=new co;ae.createCommand=e=>new co(e);ae.createOption=(e,t)=>new vd(e,t);ae.createArgument=(e,t)=>new hd(e,t);ae.Command=co;ae.Option=vd;ae.Argument=hd;ae.Help=V_;ae.CommanderError=Z_;ae.InvalidArgumentError=_d;ae.InvalidOptionArgumentError=_d});var yd=O_(bd(),1),{program:rE,createCommand:iE,createArgument:oE,createOption:aE,CommanderError:sE,InvalidArgumentError:cE,InvalidOptionArgumentError:uE,Command:xd,Argument:lE,Option:dE,Help:mE}=yd.default;import{readFile as FI}from"node:fs/promises";import{fileURLToPath as MI}from"node:url";import{dirname as ZI,join as VI}from"node:path";var k=class extends Error{constructor(r,o,n){super(r);this.status=o;this.name="CliError",this.code=n?.code,this.details=n?.details,this.param=n?.param}status;code;details;param};var qt="x-fs-surface",Jt="cli",B_="management";function it(e,t){let r=new URLSearchParams;for(let[n,i]of Object.entries(t))i&&r.set(n,i);let o=r.toString();return o?`${e}?${o}`:e}function H_(e){let t=e.includes("?")?"&":"?";return`${e}${t}dry_run=true`}function kd(e){let t=null;async function r(){let s=await fetch(`${e.apiUrl}/auth/cli/exchange`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[qt]:Jt}});if(!s.ok){let u=(await s.json().catch(()=>null))?.error,l=typeof u=="string"?{message:u}:u;throw new k(l?.message??s.statusText,s.status,{code:l?.code,details:l?.details})}return t=await s.json(),t}function o(s){return s.split("/",3)[1]===B_}async function n(s){if(!e.token.startsWith("mk_")||o(s))return e.token;let c=t?Date.parse(t.expiresAt):0;return(!t||c-Date.now()<6e4)&&await r(),t.accessToken}async function i(s,c,u,l){let d=await n(c),m=l?.dryRun?H_(c):c,g={Authorization:`Bearer ${d}`,"Content-Type":"application/json",[qt]:Jt};l?.idempotencyKey&&(g["Idempotency-Key"]=l.idempotencyKey);let h=await fetch(`${e.apiUrl}${m}`,{method:s,headers:g,body:u?JSON.stringify(u):void 0});if(!h.ok){let R=(await h.json().catch(()=>null))?.error,P=typeof R=="string"?{message:R}:R;throw new k(P?.message??h.statusText,h.status,{code:P?.code,details:P?.details})}if(h.status!==204)return h.json()}return{exchangeCliToken:r,bootstrap:()=>i("POST","/builder/context/bootstrap"),listProducts:()=>i("GET","/products"),initProduct:(s,c)=>i("POST","/products/init",s,c),updateProduct:(s,c,u)=>i("PATCH",it(`/products/${s}`,{env:u?.env}),c),publishProduct:(s,c)=>i("POST",`/products/${s}/publish`,void 0,c),createPlan:(s,c,u,l)=>i("POST",it(`/products/${s}/plans`,{env:u?.env}),c,l),updatePlan:(s,c,u,l)=>i("PATCH",it(`/products/${s}/plans/${c}`,{env:l?.env}),u),deletePlan:(s,c,u)=>i("DELETE",it(`/products/${s}/plans/${c}`,{env:u?.env})),getProduct:(s,c)=>i("GET",it(`/products/${s}`,{env:c?.env})),listEnvironments:s=>i("GET",`/products/${s}/environments`),createEnvironment:(s,c,u)=>i("POST",`/products/${s}/environments`,c,u),deleteEnvironment:(s,c)=>i("DELETE",`/products/${s}/environments/${encodeURIComponent(c)}`),deleteProduct:s=>i("DELETE",`/products/${s}`),managementListPlans:s=>i("GET",`/management/products/${s}/plans`),managementGetUsage:s=>i("GET",`/management/products/${s}/usage`),managementListMakerTokens:()=>i("GET","/maker-tokens"),managementCreateMakerToken:(s,c)=>i("POST","/maker-tokens",s,c),managementRevokeMakerToken:s=>i("DELETE",`/maker-tokens/${s}`),builderListBackends:s=>i("GET",`/products/${s}/backends`),builderCreateBackend:(s,c,u)=>i("POST",`/products/${s}/backends`,c,u),builderDeleteBackend:(s,c)=>i("DELETE",`/products/${s}/backends/${c}`),builderListRuntimeTokens:s=>i("GET",`/products/${s}/runtime-tokens`),builderCreateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens`,c,u),builderRotateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens/${c}/rotate`,void 0,u),builderRevokeRuntimeToken:(s,c)=>i("DELETE",`/products/${s}/runtime-tokens/${c}`),builderFrontendDeploy:(s,c,u)=>i("POST",`/products/${s}/frontend/deploy`,c,u),builderFrontendStatus:(s,c)=>i("GET",`/products/${s}/frontend/status${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendReleases:(s,c)=>i("GET",`/products/${s}/frontend/releases${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendRollback:(s,c,u)=>i("POST",`/products/${s}/frontend/rollback`,c,u),builderGitHubStatus:()=>i("GET","/builder/git/github/status"),productStripeStatus:s=>i("GET",`/products/${s}/stripe/status`),issuePersonaBootstrapKey:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/bootstrap-key`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[qt]:Jt},body:JSON.stringify(u??{})});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},listPersonas:async(s,c)=>{let u=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas`,{method:"GET",headers:{Authorization:`Bearer ${e.token}`,[qt]:Jt}});if(!u.ok){let d=(await u.json().catch(()=>null))?.error,m=typeof d=="string"?{message:d}:d;throw new k(m?.message??u.statusText,u.status,{code:m?.code,details:m?.details})}return u.json()},revokePersona:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas/${u}`,{method:"DELETE",headers:{Authorization:`Bearer ${e.token}`,[qt]:Jt}});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},getProductConfig:(s,c)=>i("GET",it(`/products/${s}/config`,{format:"json",env:c?.env,state:c?.state})),updateProductConfigDraft:(s,c,u)=>i("PATCH",`/products/${s}/config/draft`,{spec:c,env:u?.env,branch:u?.branch,source:u?.source,baseDraftHash:u?.baseDraftHash})}}import{existsSync as Bn,mkdirSync as G_,readFileSync as Id,writeFileSync as Ed}from"node:fs";import{homedir as K_}from"node:os";import{join as lo}from"node:path";var Sd="https://core.farthershore.com";var Hn=lo(K_(),".farthershore"),$d=lo(Hn,"config.json"),Yt=lo(Hn,"credentials.json");function wd(e){Bn(e)||G_(e,{recursive:!0,mode:448})}var uo={apiUrl:Sd};function Od(){if(wd(Hn),!Bn($d))return uo;try{let e=JSON.parse(Id($d,"utf-8"));return{...uo,...e}}catch{return uo}}function Gn(){if(!Bn(Yt))return null;try{return JSON.parse(Id(Yt,"utf-8"))}catch{return null}}function Td(e){wd(Hn),Ed(Yt,JSON.stringify(e,null,2)+`
29
- `,{mode:384})}function Ad(){Bn(Yt)&&Ed(Yt,"{}")}function Pd(e){if(e)return e;let t=process.env.FARTHERSHORE_TOKEN;if(t)return t;let r=Gn();if(r?.token)return r.token;throw new k("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as dS}from"node:readline";var Cd=(e=0)=>t=>`\x1B[${t+e}m`,Nd=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Rd=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,L={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]}},EE=Object.keys(L.modifier),W_=Object.keys(L.color),q_=Object.keys(L.bgColor),wE=[...W_,...q_];function J_(){let e=new Map;for(let[t,r]of Object.entries(L)){for(let[o,n]of Object.entries(r))L[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=L[o],e.set(n[0],n[1]);Object.defineProperty(L,t,{value:r,enumerable:!1})}return Object.defineProperty(L,"codes",{value:e,enumerable:!1}),L.color.close="\x1B[39m",L.bgColor.close="\x1B[49m",L.color.ansi=Cd(),L.color.ansi256=Nd(),L.color.ansi16m=Rd(),L.bgColor.ansi=Cd(10),L.bgColor.ansi256=Nd(10),L.bgColor.ansi16m=Rd(10),Object.defineProperties(L,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?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(o/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[o]=r;o.length===3&&(o=[...o].map(i=>i+i).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>L.rgbToAnsi256(...L.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,n;if(t>=232)r=((t-232)*10+8)/255,o=r,n=r;else{t-=16;let c=t%36;r=Math.floor(t/36)/5,o=Math.floor(c/6)/5,n=c%6/5}let i=Math.max(r,o,n)*2;if(i===0)return 30;let s=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(r));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>L.ansi256ToAnsi(L.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>L.ansi256ToAnsi(L.hexToAnsi256(t)),enumerable:!1}}),L}var Y_=J_(),ue=Y_;import mo from"node:process";import X_ from"node:os";import Dd from"node:tty";function se(e,t=globalThis.Deno?globalThis.Deno.args:mo.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:F}=mo,Kn;se("no-color")||se("no-colors")||se("color=false")||se("color=never")?Kn=0:(se("color")||se("colors")||se("color=true")||se("color=always"))&&(Kn=1);function Q_(){if("FORCE_COLOR"in F)return F.FORCE_COLOR==="true"?1:F.FORCE_COLOR==="false"?0:F.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(F.FORCE_COLOR,10),3)}function ev(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function tv(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=Q_();o!==void 0&&(Kn=o);let n=r?Kn:o;if(n===0)return 0;if(r){if(se("color=16m")||se("color=full")||se("color=truecolor"))return 3;if(se("color=256"))return 2}if("TF_BUILD"in F&&"AGENT_NAME"in F)return 1;if(e&&!t&&n===void 0)return 0;let i=n||0;if(F.TERM==="dumb")return i;if(mo.platform==="win32"){let s=X_.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in F)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in F)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in F)||F.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in F)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(F.TEAMCITY_VERSION)?1:0;if(F.COLORTERM==="truecolor"||F.TERM==="xterm-kitty"||F.TERM==="xterm-ghostty"||F.TERM==="wezterm")return 3;if("TERM_PROGRAM"in F){let s=Number.parseInt((F.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(F.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(F.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(F.TERM)||"COLORTERM"in F?1:i}function zd(e,t={}){let r=tv(e,{streamIsTTY:e&&e.isTTY,...t});return ev(r)}var nv={stdout:zd({isTTY:Dd.isatty(1)}),stderr:zd({isTTY:Dd.isatty(2)})},Ud=nv;function jd(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let n=t.length,i=0,s="";do s+=e.slice(i,o)+t+r,i=o+n,o=e.indexOf(t,i);while(o!==-1);return s+=e.slice(i),s}function Ld(e,t,r,o){let n=0,i="";do{let s=e[o-1]==="\r";i+=e.slice(n,s?o-1:o)+t+(s?`\r
28
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function ld(e){return e.map(t=>{if(!t.startsWith("--inspect"))return t;let r,o="127.0.0.1",n="9229",i;return(i=t.match(/^(--inspect(-brk)?)$/))!==null?r=i[1]:(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:o=i[3]):(i=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(r=i[1],o=i[3],n=i[4]),r&&n!=="0"?`${r}=${o}:${parseInt(n)+1}`:t})}function ao(){if(A.env.NO_COLOR||A.env.FORCE_COLOR==="0"||A.env.FORCE_COLOR==="false")return!1;if(A.env.FORCE_COLOR||A.env.CLICOLOR_FORCE!==void 0)return!0}so.Command=oo;so.useColor=ao});var gd=Ve(oe=>{var{Argument:md}=Mn(),{Command:co}=dd(),{CommanderError:N_,InvalidArgumentError:pd}=Gt(),{Help:C_}=Xi(),{Option:fd}=no();oe.program=new co;oe.createCommand=e=>new co(e);oe.createOption=(e,t)=>new fd(e,t);oe.createArgument=(e,t)=>new md(e,t);oe.Command=co;oe.Option=fd;oe.Argument=md;oe.Help=C_;oe.CommanderError=N_;oe.InvalidArgumentError=pd;oe.InvalidOptionArgumentError=pd});var hd=v_(gd(),1),{program:mI,createCommand:pI,createArgument:fI,createOption:gI,CommanderError:hI,InvalidArgumentError:_I,InvalidOptionArgumentError:vI,Command:_d,Argument:bI,Option:yI,Help:xI}=hd.default;import{readFile as q$}from"node:fs/promises";import{fileURLToPath as J$}from"node:url";import{dirname as Y$,join as X$}from"node:path";var k=class extends Error{constructor(r,o,n){super(r);this.status=o;this.name="CliError",this.code=n?.code,this.details=n?.details,this.param=n?.param}status;code;details;param};var Kt="x-fs-surface",Wt="cli",R_="management";function rt(e,t){let r=new URLSearchParams;for(let[n,i]of Object.entries(t))i&&r.set(n,i);let o=r.toString();return o?`${e}?${o}`:e}function D_(e){let t=e.includes("?")?"&":"?";return`${e}${t}dry_run=true`}function vd(e){let t=null;async function r(){let s=await fetch(`${e.apiUrl}/auth/cli/exchange`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[Kt]:Wt}});if(!s.ok){let u=(await s.json().catch(()=>null))?.error,l=typeof u=="string"?{message:u}:u;throw new k(l?.message??s.statusText,s.status,{code:l?.code,details:l?.details})}return t=await s.json(),t}function o(s){return s.split("/",3)[1]===R_}async function n(s){if(!e.token.startsWith("mk_")||o(s))return e.token;let c=t?Date.parse(t.expiresAt):0;return(!t||c-Date.now()<6e4)&&await r(),t.accessToken}async function i(s,c,u,l){let d=await n(c),m=l?.dryRun?D_(c):c,g={Authorization:`Bearer ${d}`,"Content-Type":"application/json",[Kt]:Wt};l?.idempotencyKey&&(g["Idempotency-Key"]=l.idempotencyKey);let h=await fetch(`${e.apiUrl}${m}`,{method:s,headers:g,body:u?JSON.stringify(u):void 0});if(!h.ok){let C=(await h.json().catch(()=>null))?.error,P=typeof C=="string"?{message:C}:C;throw new k(P?.message??h.statusText,h.status,{code:P?.code,details:P?.details})}if(h.status!==204)return h.json()}return{exchangeCliToken:r,bootstrap:()=>i("POST","/builder/context/bootstrap"),listProducts:()=>i("GET","/products"),initProduct:(s,c)=>i("POST","/products/init",s,c),updateProduct:(s,c,u)=>i("PATCH",rt(`/products/${s}`,{env:u?.env}),c),publishProduct:(s,c,u)=>i("POST",`/products/${s}/publish`,c&&Object.keys(c).length>0?c:void 0,u),createPlan:(s,c,u,l)=>i("POST",rt(`/products/${s}/plans`,{env:u?.env}),c,l),updatePlan:(s,c,u,l)=>i("PATCH",rt(`/products/${s}/plans/${c}`,{env:l?.env}),u),deletePlan:(s,c,u)=>i("DELETE",rt(`/products/${s}/plans/${c}`,{env:u?.env})),migratePlan:(s,c,u,l)=>i("POST",`/products/${s}/plans/${encodeURIComponent(c)}/migration-batches`,u,l),getProduct:(s,c)=>i("GET",rt(`/products/${s}`,{env:c?.env})),getDeployments:s=>i("GET",`/products/${s}/deployments`),listEnvironments:s=>i("GET",`/products/${s}/environments`),createEnvironment:(s,c,u)=>i("POST",`/products/${s}/environments`,c,u),deleteEnvironment:(s,c)=>i("DELETE",`/products/${s}/environments/${encodeURIComponent(c)}`),deleteProduct:s=>i("DELETE",`/products/${s}`),managementListPlans:s=>i("GET",`/management/products/${s}/plans`),managementGetUsage:s=>i("GET",`/management/products/${s}/usage`),managementListMakerTokens:()=>i("GET","/maker-tokens"),managementCreateMakerToken:(s,c)=>i("POST","/maker-tokens",s,c),managementRevokeMakerToken:s=>i("DELETE",`/maker-tokens/${s}`),builderListBackends:s=>i("GET",`/products/${s}/backends`),builderCreateBackend:(s,c,u)=>i("POST",`/products/${s}/backends`,c,u),builderDeleteBackend:(s,c)=>i("DELETE",`/products/${s}/backends/${c}`),builderListRuntimeTokens:s=>i("GET",`/products/${s}/runtime-tokens`),builderCreateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens`,c,u),builderRotateRuntimeToken:(s,c,u)=>i("POST",`/products/${s}/runtime-tokens/${c}/rotate`,void 0,u),builderRevokeRuntimeToken:(s,c)=>i("DELETE",`/products/${s}/runtime-tokens/${c}`),builderFrontendDeploy:(s,c,u)=>i("POST",`/products/${s}/frontend/deploy`,c,u),builderFrontendStatus:(s,c)=>i("GET",`/products/${s}/frontend/status${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendReleases:(s,c)=>i("GET",`/products/${s}/frontend/releases${c?`?environmentId=${encodeURIComponent(c)}`:""}`),builderFrontendRollback:(s,c,u)=>i("POST",`/products/${s}/frontend/rollback`,c,u),builderGitHubStatus:()=>i("GET","/builder/git/github/status"),productStripeStatus:s=>i("GET",`/products/${s}/stripe/status`),issuePersonaBootstrapKey:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/bootstrap-key`,{method:"POST",headers:{Authorization:`Bearer ${e.token}`,"Content-Type":"application/json",[Kt]:Wt},body:JSON.stringify(u??{})});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},listPersonas:async(s,c)=>{let u=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas`,{method:"GET",headers:{Authorization:`Bearer ${e.token}`,[Kt]:Wt}});if(!u.ok){let d=(await u.json().catch(()=>null))?.error,m=typeof d=="string"?{message:d}:d;throw new k(m?.message??u.statusText,u.status,{code:m?.code,details:m?.details})}return u.json()},revokePersona:async(s,c,u)=>{let l=await fetch(`${e.apiUrl}/portal/products/${s}/environments/${c}/test/personas/${u}`,{method:"DELETE",headers:{Authorization:`Bearer ${e.token}`,[Kt]:Wt}});if(!l.ok){let m=(await l.json().catch(()=>null))?.error,g=typeof m=="string"?{message:m}:m;throw new k(g?.message??l.statusText,l.status,{code:g?.code,details:g?.details})}return l.json()},getProductConfig:(s,c)=>i("GET",rt(`/products/${s}/config`,{format:"json",env:c?.env,state:c?.state})),updateProductConfigDraft:(s,c,u)=>i("PATCH",`/products/${s}/config/draft`,{spec:c,env:u?.env,branch:u?.branch,source:u?.source,baseDraftHash:u?.baseDraftHash})}}import{existsSync as Vn,mkdirSync as z_,readFileSync as xd,writeFileSync as kd}from"node:fs";import{homedir as U_}from"node:os";import{join as lo}from"node:path";var bd="https://core.farthershore.com";var Bn=lo(U_(),".farthershore"),yd=lo(Bn,"config.json"),qt=lo(Bn,"credentials.json");function Sd(e){Vn(e)||z_(e,{recursive:!0,mode:448})}var uo={apiUrl:bd};function $d(){if(Sd(Bn),!Vn(yd))return uo;try{let e=JSON.parse(xd(yd,"utf-8"));return{...uo,...e}}catch{return uo}}function Hn(){if(!Vn(qt))return null;try{return JSON.parse(xd(qt,"utf-8"))}catch{return null}}function Id(e){Sd(Bn),kd(qt,JSON.stringify(e,null,2)+`
29
+ `,{mode:384})}function Ed(){Vn(qt)&&kd(qt,"{}")}function wd(e){if(e)return e;let t=process.env.FARTHERSHORE_TOKEN;if(t)return t;let r=Hn();if(r?.token)return r.token;throw new k("Not authenticated. Run `farthershore auth login` or set FARTHERSHORE_TOKEN environment variable.")}import{createInterface as Qk}from"node:readline";var Od=(e=0)=>t=>`\x1B[${t+e}m`,Td=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Ad=(e=0)=>(t,r,o)=>`\x1B[${38+e};2;${t};${r};${o}m`,j={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]}},DI=Object.keys(j.modifier),j_=Object.keys(j.color),L_=Object.keys(j.bgColor),zI=[...j_,...L_];function F_(){let e=new Map;for(let[t,r]of Object.entries(j)){for(let[o,n]of Object.entries(r))j[o]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[o]=j[o],e.set(n[0],n[1]);Object.defineProperty(j,t,{value:r,enumerable:!1})}return Object.defineProperty(j,"codes",{value:e,enumerable:!1}),j.color.close="\x1B[39m",j.bgColor.close="\x1B[49m",j.color.ansi=Od(),j.color.ansi256=Td(),j.color.ansi16m=Ad(),j.bgColor.ansi=Od(10),j.bgColor.ansi256=Td(10),j.bgColor.ansi16m=Ad(10),Object.defineProperties(j,{rgbToAnsi256:{value(t,r,o){return t===r&&r===o?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(o/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[o]=r;o.length===3&&(o=[...o].map(i=>i+i).join(""));let n=Number.parseInt(o,16);return[n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>j.rgbToAnsi256(...j.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,o,n;if(t>=232)r=((t-232)*10+8)/255,o=r,n=r;else{t-=16;let c=t%36;r=Math.floor(t/36)/5,o=Math.floor(c/6)/5,n=c%6/5}let i=Math.max(r,o,n)*2;if(i===0)return 30;let s=30+(Math.round(n)<<2|Math.round(o)<<1|Math.round(r));return i===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,o)=>j.ansi256ToAnsi(j.rgbToAnsi256(t,r,o)),enumerable:!1},hexToAnsi:{value:t=>j.ansi256ToAnsi(j.hexToAnsi256(t)),enumerable:!1}}),j}var M_=F_(),ce=M_;import mo from"node:process";import Z_ from"node:os";import Pd from"node:tty";function ae(e,t=globalThis.Deno?globalThis.Deno.args:mo.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",o=t.indexOf(r+e),n=t.indexOf("--");return o!==-1&&(n===-1||o<n)}var{env:L}=mo,Gn;ae("no-color")||ae("no-colors")||ae("color=false")||ae("color=never")?Gn=0:(ae("color")||ae("colors")||ae("color=true")||ae("color=always"))&&(Gn=1);function V_(){if("FORCE_COLOR"in L)return L.FORCE_COLOR==="true"?1:L.FORCE_COLOR==="false"?0:L.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(L.FORCE_COLOR,10),3)}function B_(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function H_(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let o=V_();o!==void 0&&(Gn=o);let n=r?Gn:o;if(n===0)return 0;if(r){if(ae("color=16m")||ae("color=full")||ae("color=truecolor"))return 3;if(ae("color=256"))return 2}if("TF_BUILD"in L&&"AGENT_NAME"in L)return 1;if(e&&!t&&n===void 0)return 0;let i=n||0;if(L.TERM==="dumb")return i;if(mo.platform==="win32"){let s=Z_.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in L)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(s=>s in L)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(s=>s in L)||L.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in L)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(L.TEAMCITY_VERSION)?1:0;if(L.COLORTERM==="truecolor"||L.TERM==="xterm-kitty"||L.TERM==="xterm-ghostty"||L.TERM==="wezterm")return 3;if("TERM_PROGRAM"in L){let s=Number.parseInt((L.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(L.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(L.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(L.TERM)||"COLORTERM"in L?1:i}function Nd(e,t={}){let r=H_(e,{streamIsTTY:e&&e.isTTY,...t});return B_(r)}var G_={stdout:Nd({isTTY:Pd.isatty(1)}),stderr:Nd({isTTY:Pd.isatty(2)})},Cd=G_;function Rd(e,t,r){let o=e.indexOf(t);if(o===-1)return e;let n=t.length,i=0,s="";do s+=e.slice(i,o)+t+r,i=o+n,o=e.indexOf(t,i);while(o!==-1);return s+=e.slice(i),s}function Dd(e,t,r,o){let n=0,i="";do{let s=e[o-1]==="\r";i+=e.slice(n,s?o-1:o)+t+(s?`\r
30
30
  `:`
31
31
  `)+r,n=o+1,o=e.indexOf(`
32
- `,n)}while(o!==-1);return i+=e.slice(n),i}var{stdout:Fd,stderr:Md}=Ud,po=Symbol("GENERATOR"),ot=Symbol("STYLER"),Xt=Symbol("IS_EMPTY"),Zd=["ansi","ansi","ansi256","ansi16m"],at=Object.create(null),rv=(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=Fd?Fd.level:0;e.level=t.level===void 0?r:t.level};var iv=e=>{let t=(...r)=>r.join(" ");return rv(t,e),Object.setPrototypeOf(t,Qt.prototype),t};function Qt(e){return iv(e)}Object.setPrototypeOf(Qt.prototype,Function.prototype);for(let[e,t]of Object.entries(ue))at[e]={get(){let r=Wn(this,go(t.open,t.close,this[ot]),this[Xt]);return Object.defineProperty(this,e,{value:r}),r}};at.visible={get(){let e=Wn(this,this[ot],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var fo=(e,t,r,...o)=>e==="rgb"?t==="ansi16m"?ue[r].ansi16m(...o):t==="ansi256"?ue[r].ansi256(ue.rgbToAnsi256(...o)):ue[r].ansi(ue.rgbToAnsi(...o)):e==="hex"?fo("rgb",t,r,...ue.hexToRgb(...o)):ue[r][e](...o),ov=["rgb","hex","ansi256"];for(let e of ov){at[e]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,Zd[r],"color",...o),ue.color.close,this[ot]);return Wn(this,n,this[Xt])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);at[t]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,Zd[r],"bgColor",...o),ue.bgColor.close,this[ot]);return Wn(this,n,this[Xt])}}}}var av=Object.defineProperties(()=>{},{...at,level:{enumerable:!0,get(){return this[po].level},set(e){this[po].level=e}}}),go=(e,t,r)=>{let o,n;return r===void 0?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},Wn=(e,t,r)=>{let o=(...n)=>sv(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,av),o[po]=e,o[ot]=t,o[Xt]=r,o},sv=(e,t)=>{if(e.level<=0||!t)return e[Xt]?"":t;let r=e[ot];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=jd(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
33
- `);return i!==-1&&(t=Ld(t,n,o,i)),o+t+n};Object.defineProperties(Qt.prototype,at);var cv=Qt(),UE=Qt({level:Md?Md.level:0});var j=cv;var Vd;function Bd(e){Vd=qn(e)}function le(){return Vd??qn(void 0)}function ho(){return le()==="json"}function Hd(e){ho()||console.log(j.green(`\u2713 ${e}`))}function Gd(e){ho()||console.error(j.red(`\u2717 ${e}`))}function He(e){ho()||console.log(j.dim(e))}function _o(){return process.stdout.isTTY===!0}function qn(e){return e==="json"||e==="table"?e:_o()?"table":"json"}var a={};Ie(a,{$brand:()=>bo,$input:()=>Fs,$output:()=>Ls,NEVER:()=>vo,TimePrecision:()=>Bs,ZodAny:()=>Nu,ZodArray:()=>Uu,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>jt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Ut,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>ol,ZodCodec:()=>Cn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Dt,ZodDate:()=>wn,ZodDefault:()=>Qu,ZodDiscriminatedUnion:()=>Lu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Nt,ZodError:()=>Ly,ZodExactOptional:()=>Ju,ZodFile:()=>Wu,ZodFirstPartyTypeKind:()=>vl,ZodFunction:()=>gl,ZodGUID:()=>kn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,ZodIntersection:()=>Fu,ZodIssueCode:()=>My,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ml,ZodLiteral:()=>Ku,ZodMAC:()=>Eu,ZodMap:()=>Hu,ZodNaN:()=>sl,ZodNanoID:()=>mi,ZodNever:()=>Du,ZodNonOptional:()=>Ci,ZodNull:()=>Pu,ZodNullable:()=>Xu,ZodNumber:()=>zt,ZodNumberFormat:()=>et,ZodObject:()=>Tn,ZodOptional:()=>Pi,ZodPipe:()=>Pn,ZodPrefault:()=>tl,ZodPreprocess:()=>cl,ZodPromise:()=>fl,ZodReadonly:()=>ul,ZodRealError:()=>te,ZodRecord:()=>Ct,ZodSet:()=>Gu,ZodString:()=>Rt,ZodStringFormat:()=>z,ZodSuccess:()=>il,ZodSymbol:()=>Tu,ZodTemplateLiteral:()=>dl,ZodTransform:()=>qu,ZodTuple:()=>Zu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>En,ZodUUID:()=>Se,ZodUndefined:()=>Au,ZodUnion:()=>An,ZodUnknown:()=>Ru,ZodVoid:()=>zu,ZodXID:()=>hi,ZodXor:()=>ju,_ZodString:()=>ui,_default:()=>el,_function:()=>Df,any:()=>mf,array:()=>On,base64:()=>Wp,base64url:()=>qp,bigint:()=>sf,boolean:()=>Ou,catch:()=>al,check:()=>zf,cidrv4:()=>Gp,cidrv6:()=>Kp,clone:()=>q,codec:()=>Pf,coerce:()=>bl,config:()=>Z,core:()=>Te,cuid:()=>jp,cuid2:()=>Lp,custom:()=>Uf,date:()=>ff,decode:()=>bu,decodeAsync:()=>xu,describe:()=>jf,discriminatedUnion:()=>yf,e164:()=>Jp,email:()=>Op,emoji:()=>zp,encode:()=>vu,encodeAsync:()=>yu,endsWith:()=>kt,enum:()=>Ti,exactOptional:()=>Yu,file:()=>wf,flattenError:()=>cn,float32:()=>nf,float64:()=>rf,formatError:()=>un,fromJSONSchema:()=>Hf,function:()=>Df,getErrorMap:()=>Vy,globalRegistry:()=>G,gt:()=>xe,gte:()=>Y,guid:()=>Tp,hash:()=>tf,hex:()=>ef,hostname:()=>Qp,httpUrl:()=>Dp,includes:()=>yt,instanceof:()=>Ff,int:()=>si,int32:()=>of,int64:()=>cf,intersection:()=>Mu,invertCodec:()=>Cf,ipv4:()=>Vp,ipv6:()=>Hp,iso:()=>Pt,json:()=>Zf,jwt:()=>Yp,keyof:()=>gf,ksuid:()=>Zp,lazy:()=>pl,length:()=>Xe,literal:()=>Ef,locales:()=>_n,looseObject:()=>vf,looseRecord:()=>kf,lowercase:()=>vt,lt:()=>ye,lte:()=>oe,mac:()=>Bp,map:()=>Sf,maxLength:()=>Ye,maxSize:()=>je,meta:()=>Lf,mime:()=>St,minLength:()=>Oe,minSize:()=>ke,multipleOf:()=>Ue,nan:()=>Af,nanoid:()=>Up,nativeEnum:()=>If,negative:()=>Kr,never:()=>wi,nonnegative:()=>qr,nonoptional:()=>rl,nonpositive:()=>Wr,normalize:()=>$t,null:()=>Cu,nullable:()=>$n,nullish:()=>Of,number:()=>wu,object:()=>hf,optional:()=>Sn,overwrite:()=>me,parse:()=>fu,parseAsync:()=>gu,partialRecord:()=>xf,pipe:()=>ci,positive:()=>Gr,prefault:()=>nl,preprocess:()=>Vf,prettifyError:()=>Co,promise:()=>Rf,property:()=>Jr,readonly:()=>ll,record:()=>Bu,refine:()=>hl,regex:()=>_t,regexes:()=>ie,registry:()=>Ir,safeDecode:()=>Su,safeDecodeAsync:()=>Iu,safeEncode:()=>ku,safeEncodeAsync:()=>$u,safeParse:()=>hu,safeParseAsync:()=>_u,set:()=>$f,setErrorMap:()=>Zy,size:()=>Je,slugify:()=>Ot,startsWith:()=>xt,strictObject:()=>_f,string:()=>xn,stringFormat:()=>Xp,stringbool:()=>Mf,success:()=>Tf,superRefine:()=>_l,symbol:()=>lf,templateLiteral:()=>Nf,toJSONSchema:()=>ei,toLowerCase:()=>Et,toUpperCase:()=>wt,transform:()=>Ai,treeifyError:()=>Po,trim:()=>It,tuple:()=>Vu,uint32:()=>af,uint64:()=>uf,ulid:()=>Fp,undefined:()=>df,union:()=>Oi,unknown:()=>Qe,uppercase:()=>bt,url:()=>Rp,util:()=>b,uuid:()=>Ap,uuidv4:()=>Pp,uuidv6:()=>Cp,uuidv7:()=>Np,void:()=>pf,xid:()=>Mp,xor:()=>bf});var Te={};Ie(Te,{$ZodAny:()=>ss,$ZodArray:()=>ms,$ZodAsyncError:()=>de,$ZodBase64:()=>Ya,$ZodBase64URL:()=>Xa,$ZodBigInt:()=>_r,$ZodBigIntFormat:()=>rs,$ZodBoolean:()=>pn,$ZodCIDRv4:()=>Wa,$ZodCIDRv6:()=>qa,$ZodCUID:()=>za,$ZodCUID2:()=>Ua,$ZodCatch:()=>As,$ZodCheck:()=>U,$ZodCheckBigIntFormat:()=>ma,$ZodCheckEndsWith:()=>$a,$ZodCheckGreaterThan:()=>dr,$ZodCheckIncludes:()=>ka,$ZodCheckLengthEquals:()=>va,$ZodCheckLessThan:()=>lr,$ZodCheckLowerCase:()=>ya,$ZodCheckMaxLength:()=>ha,$ZodCheckMaxSize:()=>pa,$ZodCheckMimeType:()=>Ea,$ZodCheckMinLength:()=>_a,$ZodCheckMinSize:()=>fa,$ZodCheckMultipleOf:()=>la,$ZodCheckNumberFormat:()=>da,$ZodCheckOverwrite:()=>wa,$ZodCheckProperty:()=>Ia,$ZodCheckRegex:()=>ba,$ZodCheckSizeEquals:()=>ga,$ZodCheckStartsWith:()=>Sa,$ZodCheckStringFormat:()=>gt,$ZodCheckUpperCase:()=>xa,$ZodCodec:()=>gn,$ZodCustom:()=>js,$ZodCustomStringFormat:()=>ts,$ZodDate:()=>ds,$ZodDefault:()=>Es,$ZodDiscriminatedUnion:()=>gs,$ZodE164:()=>Qa,$ZodEmail:()=>Ca,$ZodEmoji:()=>Ra,$ZodEncodeError:()=>Ce,$ZodEnum:()=>ys,$ZodError:()=>sn,$ZodExactOptional:()=>$s,$ZodFile:()=>ks,$ZodFunction:()=>Ds,$ZodGUID:()=>Aa,$ZodIPv4:()=>Ha,$ZodIPv6:()=>Ga,$ZodISODate:()=>Za,$ZodISODateTime:()=>Ma,$ZodISODuration:()=>Ba,$ZodISOTime:()=>Va,$ZodIntersection:()=>hs,$ZodJWT:()=>es,$ZodKSUID:()=>Fa,$ZodLazy:()=>Us,$ZodLiteral:()=>xs,$ZodMAC:()=>Ka,$ZodMap:()=>vs,$ZodNaN:()=>Ps,$ZodNanoID:()=>Da,$ZodNever:()=>us,$ZodNonOptional:()=>Os,$ZodNull:()=>as,$ZodNullable:()=>Is,$ZodNumber:()=>hr,$ZodNumberFormat:()=>ns,$ZodObject:()=>Sm,$ZodObjectJIT:()=>ps,$ZodOptional:()=>br,$ZodPipe:()=>yr,$ZodPrefault:()=>ws,$ZodPreprocess:()=>Cs,$ZodPromise:()=>zs,$ZodReadonly:()=>Ns,$ZodRealError:()=>ee,$ZodRecord:()=>_s,$ZodRegistry:()=>$r,$ZodSet:()=>bs,$ZodString:()=>qe,$ZodStringFormat:()=>D,$ZodSuccess:()=>Ts,$ZodSymbol:()=>is,$ZodTemplateLiteral:()=>Rs,$ZodTransform:()=>Ss,$ZodTuple:()=>vr,$ZodType:()=>$,$ZodULID:()=>ja,$ZodURL:()=>Na,$ZodUUID:()=>Pa,$ZodUndefined:()=>os,$ZodUnion:()=>fn,$ZodUnknown:()=>cs,$ZodVoid:()=>ls,$ZodXID:()=>La,$ZodXor:()=>fs,$brand:()=>bo,$constructor:()=>p,$input:()=>Fs,$output:()=>Ls,Doc:()=>mn,JSONSchema:()=>Ip,JSONSchemaGenerator:()=>ti,NEVER:()=>vo,TimePrecision:()=>Bs,_any:()=>dc,_array:()=>vc,_base64:()=>Zr,_base64url:()=>Vr,_bigint:()=>ic,_boolean:()=>nc,_catch:()=>Py,_check:()=>$p,_cidrv4:()=>Fr,_cidrv6:()=>Mr,_coercedBigint:()=>oc,_coercedBoolean:()=>rc,_coercedDate:()=>hc,_coercedNumber:()=>Js,_coercedString:()=>Zs,_cuid:()=>Nr,_cuid2:()=>Rr,_custom:()=>yc,_date:()=>gc,_decode:()=>tr,_decodeAsync:()=>rr,_default:()=>Oy,_discriminatedUnion:()=>hy,_e164:()=>Br,_email:()=>Er,_emoji:()=>Pr,_encode:()=>er,_encodeAsync:()=>nr,_endsWith:()=>kt,_enum:()=>ky,_file:()=>bc,_float32:()=>Xs,_float64:()=>Qs,_gt:()=>xe,_gte:()=>Y,_guid:()=>vn,_includes:()=>yt,_int:()=>Ys,_int32:()=>ec,_int64:()=>ac,_intersection:()=>_y,_ipv4:()=>jr,_ipv6:()=>Lr,_isoDate:()=>Gs,_isoDateTime:()=>Hs,_isoDuration:()=>Ws,_isoTime:()=>Ks,_jwt:()=>Hr,_ksuid:()=>Ur,_lazy:()=>Dy,_length:()=>Xe,_literal:()=>$y,_lowercase:()=>vt,_lt:()=>ye,_lte:()=>oe,_mac:()=>Vs,_map:()=>yy,_max:()=>oe,_maxLength:()=>Ye,_maxSize:()=>je,_mime:()=>St,_min:()=>Y,_minLength:()=>Oe,_minSize:()=>ke,_multipleOf:()=>Ue,_nan:()=>_c,_nanoid:()=>Cr,_nativeEnum:()=>Sy,_negative:()=>Kr,_never:()=>pc,_nonnegative:()=>qr,_nonoptional:()=>Ty,_nonpositive:()=>Wr,_normalize:()=>$t,_null:()=>lc,_nullable:()=>wy,_number:()=>qs,_optional:()=>Ey,_overwrite:()=>me,_parse:()=>dt,_parseAsync:()=>mt,_pipe:()=>Cy,_positive:()=>Gr,_promise:()=>zy,_property:()=>Jr,_readonly:()=>Ny,_record:()=>by,_refine:()=>xc,_regex:()=>_t,_safeDecode:()=>or,_safeDecodeAsync:()=>sr,_safeEncode:()=>ir,_safeEncodeAsync:()=>ar,_safeParse:()=>pt,_safeParseAsync:()=>ft,_set:()=>xy,_size:()=>Je,_slugify:()=>Ot,_startsWith:()=>xt,_string:()=>Ms,_stringFormat:()=>Tt,_stringbool:()=>Ic,_success:()=>Ay,_superRefine:()=>kc,_symbol:()=>cc,_templateLiteral:()=>Ry,_toLowerCase:()=>Et,_toUpperCase:()=>wt,_transform:()=>Iy,_trim:()=>It,_tuple:()=>vy,_uint32:()=>tc,_uint64:()=>sc,_ulid:()=>Dr,_undefined:()=>uc,_union:()=>fy,_unknown:()=>mc,_uppercase:()=>bt,_url:()=>bn,_uuid:()=>wr,_uuidv4:()=>Or,_uuidv6:()=>Tr,_uuidv7:()=>Ar,_void:()=>fc,_xid:()=>zr,_xor:()=>gy,clone:()=>q,config:()=>Z,createStandardJSONSchemaMethod:()=>At,createToJSONSchemaMethod:()=>Ec,decode:()=>zv,decodeAsync:()=>jv,describe:()=>Sc,encode:()=>Dv,encodeAsync:()=>Uv,extractDefs:()=>Fe,finalize:()=>Me,flattenError:()=>cn,formatError:()=>un,globalConfig:()=>Ge,globalRegistry:()=>G,initializeContext:()=>Le,isValidBase64:()=>Ja,isValidBase64URL:()=>bm,isValidJWT:()=>ym,locales:()=>_n,meta:()=>$c,parse:()=>Xn,parseAsync:()=>Qn,prettifyError:()=>Co,process:()=>C,regexes:()=>ie,registry:()=>Ir,safeDecode:()=>Fv,safeDecodeAsync:()=>Zv,safeEncode:()=>Lv,safeEncodeAsync:()=>Mv,safeParse:()=>No,safeParseAsync:()=>Ro,toDotPath:()=>Xd,toJSONSchema:()=>ei,treeifyError:()=>Po,util:()=>b,version:()=>Oa});var Kd,vo=Object.freeze({status:"aborted"});function p(e,t,r){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=s.prototype,d=Object.keys(l);for(let m=0;m<d.length;m++){let g=d[m];g in c||(c[g]=l[g].bind(c))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(c){var u;let l=r?.Parent?new i:this;o(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var bo=Symbol("zod_brand"),de=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ce=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Kd=globalThis).__zod_globalConfig??(Kd.__zod_globalConfig={});var Ge=globalThis.__zod_globalConfig;function Z(e){return e&&Object.assign(Ge,e),Ge}var b={};Ie(b,{BIGINT_FORMAT_RANGES:()=>To,Class:()=>xo,NUMBER_FORMAT_RANGES:()=>Oo,aborted:()=>ze,allowsEval:()=>$o,assert:()=>pv,assertEqual:()=>uv,assertIs:()=>dv,assertNever:()=>mv,assertNotEqual:()=>lv,assignProp:()=>Re,base64ToUint8Array:()=>qd,base64urlToUint8Array:()=>Av,cached:()=>ut,captureStackTrace:()=>Yn,cleanEnum:()=>Tv,cleanRegex:()=>nn,clone:()=>q,cloneDef:()=>gv,createTransparentProxy:()=>xv,defineLazy:()=>E,esc:()=>Jn,escapeRegex:()=>ce,explicitlyAborted:()=>Ao,extend:()=>$v,finalizeIssue:()=>J,floatSafeRemainder:()=>ko,getElementAtPath:()=>hv,getEnumValues:()=>tn,getLengthableOrigin:()=>an,getParsedType:()=>yv,getSizableOrigin:()=>on,hexToUint8Array:()=>Cv,isObject:()=>Ke,isPlainObject:()=>De,issue:()=>lt,joinValues:()=>f,jsonStringifyReplacer:()=>ct,merge:()=>Ev,mergeDefs:()=>we,normalizeParams:()=>y,nullish:()=>Ne,numKeys:()=>bv,objectClone:()=>fv,omit:()=>Sv,optionalKeys:()=>wo,parsedType:()=>v,partial:()=>wv,pick:()=>kv,prefixIssues:()=>Q,primitiveTypes:()=>Eo,promiseAllObject:()=>_v,propertyKeyTypes:()=>rn,randomString:()=>vv,required:()=>Ov,safeExtend:()=>Iv,shallowClone:()=>Io,slugify:()=>So,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Jd,uint8ArrayToBase64url:()=>Pv,uint8ArrayToHex:()=>Nv,unwrapMessage:()=>en});function uv(e){return e}function lv(e){return e}function dv(e){}function mv(e){throw new Error("Unexpected value in exhaustive check")}function pv(e){}function tn(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function f(e,t="|"){return e.map(r=>_(r)).join(t)}function ct(e,t){return typeof t=="bigint"?t.toString():t}function ut(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ne(e){return e==null}function nn(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ko(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Wd=Symbol("evaluating");function E(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Wd)return o===void 0&&(o=Wd,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function fv(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Re(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function we(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function gv(e){return we(e._zod.def)}function hv(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function _v(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function vv(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Jn(e){return JSON.stringify(e)}function So(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Yn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ke(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var $o=ut(()=>{if(Ge.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function De(e){if(Ke(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ke(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Io(e){return De(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function bv(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var yv=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}`)}},rn=new Set(["string","number","symbol"]),Eo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ce(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function y(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 xv(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function wo(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Oo={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]},To={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function kv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=we(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=r.shape[c])}return Re(this,"shape",s),s},checks:[]});return q(e,i)}function Sv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=we(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return Re(this,"shape",s),s},checks:[]});return q(e,i)}function $v(e,t){if(!De(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=we(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Re(this,"shape",i),i}});return q(e,n)}function Iv(e,t){if(!De(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=we(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Re(this,"shape",o),o}});return q(e,r)}function Ev(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=we(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Re(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return q(e,r)}function wv(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=we(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(r)for(let l in r){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Re(this,"shape",u),u},checks:[]});return q(t,s)}function Ov(e,t,r){let o=we(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Re(this,"shape",i),i}});return q(t,o)}function ze(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 Ao(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Q(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function en(e){return typeof e=="string"?e:e?.message}function J(e,t,r){let o=e.message?e.message:en(e.inst?._zod.def?.error?.(e))??en(t?.error?.(e))??en(r.customError?.(e))??en(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:s,...c}=e;return c.path??(c.path=[]),c.message=o,t?.reportInput&&(c.input=s),c}function on(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function an(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function v(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 lt(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function Tv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function qd(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Jd(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Av(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return qd(t+r)}function Pv(e){return Jd(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Cv(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 o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function Nv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var xo=class{constructor(...t){}};var Yd=(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,ct,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},sn=p("$ZodError",Yd),ee=p("$ZodError",Yd,{Parent:Error});function cn(e,t=r=>r.message){let r={},o=[];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))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function un(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>o({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)r._errors.push(t(s));else{let u=r,l=0;for(;l<c.length;){let d=c[l];l===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return o(e),r}function Po(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,c;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>o({issues:l},[...i,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...i,...u.path]);else{let l=[...i,...u.path];if(l.length===0){r.errors.push(t(u));continue}let d=r,m=0;for(;m<l.length;){let g=l[m],h=m===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(s=d.properties)[g]??(s[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(c=d.items)[g]??(c[g]={errors:[]}),d=d.items[g]),h&&d.errors.push(t(u)),m++}}};return o(e),r}function Xd(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Co(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Xd(o.path)}`);return t.join(`
34
- `)}var dt=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new de;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>J(u,i,Z())));throw Yn(c,n?.callee),c}return s.value},Xn=dt(ee),mt=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>J(u,i,Z())));throw Yn(c,n?.callee),c}return s.value},Qn=mt(ee),pt=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new de;return i.issues.length?{success:!1,error:new(e??sn)(i.issues.map(s=>J(s,n,Z())))}:{success:!0,data:i.value}},No=pt(ee),ft=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>J(s,n,Z())))}:{success:!0,data:i.value}},Ro=ft(ee),er=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return dt(e)(t,r,n)},Dv=er(ee),tr=e=>(t,r,o)=>dt(e)(t,r,o),zv=tr(ee),nr=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return mt(e)(t,r,n)},Uv=nr(ee),rr=e=>async(t,r,o)=>mt(e)(t,r,o),jv=rr(ee),ir=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return pt(e)(t,r,n)},Lv=ir(ee),or=e=>(t,r,o)=>pt(e)(t,r,o),Fv=or(ee),ar=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ft(e)(t,r,n)},Mv=ar(ee),sr=e=>async(t,r,o)=>ft(e)(t,r,o),Zv=sr(ee);var ie={};Ie(ie,{base64:()=>Jo,base64url:()=>cr,bigint:()=>ra,boolean:()=>oa,browserEmail:()=>Jv,cidrv4:()=>Wo,cidrv6:()=>qo,cuid:()=>Do,cuid2:()=>zo,date:()=>Qo,datetime:()=>ta,domain:()=>Qv,duration:()=>Mo,e164:()=>Xo,email:()=>Vo,emoji:()=>Bo,extendedDuration:()=>Vv,guid:()=>Zo,hex:()=>eb,hostname:()=>Xv,html5Email:()=>Kv,httpProtocol:()=>Yo,idnEmail:()=>qv,integer:()=>ia,ipv4:()=>Ho,ipv6:()=>Go,ksuid:()=>Lo,lowercase:()=>ca,mac:()=>Ko,md5_base64:()=>nb,md5_base64url:()=>rb,md5_hex:()=>tb,nanoid:()=>Fo,null:()=>aa,number:()=>ur,rfc5322Email:()=>Wv,sha1_base64:()=>ob,sha1_base64url:()=>ab,sha1_hex:()=>ib,sha256_base64:()=>cb,sha256_base64url:()=>ub,sha256_hex:()=>sb,sha384_base64:()=>db,sha384_base64url:()=>mb,sha384_hex:()=>lb,sha512_base64:()=>fb,sha512_base64url:()=>gb,sha512_hex:()=>pb,string:()=>na,time:()=>ea,ulid:()=>Uo,undefined:()=>sa,unicodeEmail:()=>Qd,uppercase:()=>ua,uuid:()=>We,uuid4:()=>Bv,uuid6:()=>Hv,uuid7:()=>Gv,xid:()=>jo});var Do=/^[cC][0-9a-z]{6,}$/,zo=/^[0-9a-z]+$/,Uo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,jo=/^[0-9a-vA-V]{20}$/,Lo=/^[A-Za-z0-9]{27}$/,Fo=/^[a-zA-Z0-9_-]{21}$/,Mo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Vv=/^[-+]?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)?)??$/,Zo=/^([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})$/,We=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)$/,Bv=We(4),Hv=We(6),Gv=We(7),Vo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Kv=/^[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])?)*$/,Wv=/^(([^<>()\[\]\\.,;:\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,}))$/,Qd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,qv=Qd,Jv=/^[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])?)*$/,Yv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bo(){return new RegExp(Yv,"u")}var Ho=/^(?:(?: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])$/,Go=/^(([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}|:))$/,Ko=e=>{let t=ce(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Wo=/^((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])$/,qo=/^(([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])$/,Jo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cr=/^[A-Za-z0-9_-]*$/,Xv=/^(?=.{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])?)*\.?$/,Qv=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Yo=/^https?$/,Xo=/^\+[1-9]\d{6,14}$/,em="(?:(?:\\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])))",Qo=new RegExp(`^${em}$`);function tm(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 ea(e){return new RegExp(`^${tm(e)}$`)}function ta(e){let t=tm({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${em}T(?:${o})$`)}var na=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ra=/^-?\d+n?$/,ia=/^-?\d+$/,ur=/^-?\d+(?:\.\d+)?$/,oa=/^(?:true|false)$/i,aa=/^null$/i;var sa=/^undefined$/i;var ca=/^[^A-Z]*$/,ua=/^[^a-z]*$/,eb=/^[0-9a-fA-F]*$/;function ln(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function dn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var tb=/^[0-9a-fA-F]{32}$/,nb=ln(22,"=="),rb=dn(22),ib=/^[0-9a-fA-F]{40}$/,ob=ln(27,"="),ab=dn(27),sb=/^[0-9a-fA-F]{64}$/,cb=ln(43,"="),ub=dn(43),lb=/^[0-9a-fA-F]{96}$/,db=ln(64,""),mb=dn(64),pb=/^[0-9a-fA-F]{128}$/,fb=ln(86,"=="),gb=dn(86);var U=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),rm={number:"number",bigint:"bigint",object:"date"},lr=p("$ZodCheckLessThan",(e,t)=>{U.init(e,t);let r=rm[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),dr=p("$ZodCheckGreaterThan",(e,t)=>{U.init(e,t);let r=rm[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),la=p("$ZodCheckMultipleOf",(e,t)=>{U.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.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):ko(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})}}),da=p("$ZodCheckNumberFormat",(e,t)=>{U.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=Oo[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=n,c.maximum=i,r&&(c.pattern=ia)}),e._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ma=p("$ZodCheckBigIntFormat",(e,t)=>{U.init(e,t);let[r,o]=To[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),pa=p("$ZodCheckMaxSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:on(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),fa=p("$ZodCheckMinSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:on(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ga=p("$ZodCheckSizeEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:on(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),ha=p("$ZodCheckMaxLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=an(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),_a=p("$ZodCheckMinLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=an(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),va=p("$ZodCheckLengthEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=an(n),c=i>t.length;o.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),gt=p("$ZodCheckStringFormat",(e,t)=>{var r,o;U.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.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})}):(o=e._zod).check??(o.check=()=>{})}),ba=p("$ZodCheckRegex",(e,t)=>{gt.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})}}),ya=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ca),gt.init(e,t)}),xa=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ua),gt.init(e,t)}),ka=p("$ZodCheckIncludes",(e,t)=>{U.init(e,t);let r=ce(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),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})}}),Sa=p("$ZodCheckStartsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`^${ce(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),$a=p("$ZodCheckEndsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`.*${ce(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function nm(e,t,r){e.issues.length&&t.issues.push(...Q(r,e.issues))}var Ia=p("$ZodCheckProperty",(e,t)=>{U.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>nm(n,r,t.property));nm(o,r,t.property)}}),Ea=p("$ZodCheckMimeType",(e,t)=>{U.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),wa=p("$ZodCheckOverwrite",(e,t)=>{U.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var mn=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 o=t.split(`
32
+ `,n)}while(o!==-1);return i+=e.slice(n),i}var{stdout:zd,stderr:Ud}=Cd,po=Symbol("GENERATOR"),it=Symbol("STYLER"),Jt=Symbol("IS_EMPTY"),jd=["ansi","ansi","ansi256","ansi16m"],ot=Object.create(null),K_=(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=zd?zd.level:0;e.level=t.level===void 0?r:t.level};var W_=e=>{let t=(...r)=>r.join(" ");return K_(t,e),Object.setPrototypeOf(t,Yt.prototype),t};function Yt(e){return W_(e)}Object.setPrototypeOf(Yt.prototype,Function.prototype);for(let[e,t]of Object.entries(ce))ot[e]={get(){let r=Kn(this,go(t.open,t.close,this[it]),this[Jt]);return Object.defineProperty(this,e,{value:r}),r}};ot.visible={get(){let e=Kn(this,this[it],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var fo=(e,t,r,...o)=>e==="rgb"?t==="ansi16m"?ce[r].ansi16m(...o):t==="ansi256"?ce[r].ansi256(ce.rgbToAnsi256(...o)):ce[r].ansi(ce.rgbToAnsi(...o)):e==="hex"?fo("rgb",t,r,...ce.hexToRgb(...o)):ce[r][e](...o),q_=["rgb","hex","ansi256"];for(let e of q_){ot[e]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,jd[r],"color",...o),ce.color.close,this[it]);return Kn(this,n,this[Jt])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);ot[t]={get(){let{level:r}=this;return function(...o){let n=go(fo(e,jd[r],"bgColor",...o),ce.bgColor.close,this[it]);return Kn(this,n,this[Jt])}}}}var J_=Object.defineProperties(()=>{},{...ot,level:{enumerable:!0,get(){return this[po].level},set(e){this[po].level=e}}}),go=(e,t,r)=>{let o,n;return r===void 0?(o=e,n=t):(o=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:o,closeAll:n,parent:r}},Kn=(e,t,r)=>{let o=(...n)=>Y_(o,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(o,J_),o[po]=e,o[it]=t,o[Jt]=r,o},Y_=(e,t)=>{if(e.level<=0||!t)return e[Jt]?"":t;let r=e[it];if(r===void 0)return t;let{openAll:o,closeAll:n}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Rd(t,r.close,r.open),r=r.parent;let i=t.indexOf(`
33
+ `);return i!==-1&&(t=Dd(t,n,o,i)),o+t+n};Object.defineProperties(Yt.prototype,ot);var X_=Yt(),GI=Yt({level:Ud?Ud.level:0});var z=X_;var Ld;function Fd(e){Ld=qn(e)}function ue(){return Ld??qn(void 0)}function Wn(){return ue()==="json"}function Md(e){Wn()||console.log(z.green(`\u2713 ${e}`))}function Zd(e){Wn()||console.error(z.red(`\u2717 ${e}`))}function Ie(e){Wn()||console.log(z.dim(e))}function Vd(e){Wn()||console.log(z.bold(e))}function Xt(){return process.stdout.isTTY===!0}function qn(e){return e==="json"||e==="table"?e:Xt()?"table":"json"}var a={};Se(a,{$brand:()=>_o,$input:()=>js,$output:()=>Us,NEVER:()=>ho,TimePrecision:()=>Zs,ZodAny:()=>Pu,ZodArray:()=>Du,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>zt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Dt,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>rl,ZodCodec:()=>Pn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Ct,ZodDate:()=>En,ZodDefault:()=>Yu,ZodDiscriminatedUnion:()=>Uu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Pt,ZodError:()=>Ty,ZodExactOptional:()=>Wu,ZodFile:()=>Gu,ZodFirstPartyTypeKind:()=>hl,ZodFunction:()=>pl,ZodGUID:()=>xn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,ZodIntersection:()=>ju,ZodIssueCode:()=>Py,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ll,ZodLiteral:()=>Hu,ZodMAC:()=>$u,ZodMap:()=>Vu,ZodNaN:()=>ol,ZodNanoID:()=>mi,ZodNever:()=>Cu,ZodNonOptional:()=>Ni,ZodNull:()=>Tu,ZodNullable:()=>Ju,ZodNumber:()=>Rt,ZodNumberFormat:()=>Qe,ZodObject:()=>On,ZodOptional:()=>Pi,ZodPipe:()=>An,ZodPrefault:()=>Qu,ZodPreprocess:()=>al,ZodPromise:()=>ml,ZodReadonly:()=>sl,ZodRealError:()=>ee,ZodRecord:()=>At,ZodSet:()=>Bu,ZodString:()=>Nt,ZodStringFormat:()=>D,ZodSuccess:()=>nl,ZodSymbol:()=>wu,ZodTemplateLiteral:()=>ul,ZodTransform:()=>Ku,ZodTuple:()=>Fu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>In,ZodUUID:()=>xe,ZodUndefined:()=>Ou,ZodUnion:()=>Tn,ZodUnknown:()=>Nu,ZodVoid:()=>Ru,ZodXID:()=>hi,ZodXor:()=>zu,_ZodString:()=>ui,_default:()=>Xu,_function:()=>Nf,any:()=>uf,array:()=>wn,base64:()=>Hp,base64url:()=>Gp,bigint:()=>rf,boolean:()=>Eu,catch:()=>il,check:()=>Cf,cidrv4:()=>Vp,cidrv6:()=>Bp,clone:()=>W,codec:()=>Of,coerce:()=>_l,config:()=>M,core:()=>Oe,cuid:()=>Dp,cuid2:()=>zp,custom:()=>Rf,date:()=>df,decode:()=>_u,decodeAsync:()=>bu,describe:()=>Df,discriminatedUnion:()=>_f,e164:()=>Kp,email:()=>Ip,emoji:()=>Cp,encode:()=>hu,encodeAsync:()=>vu,endsWith:()=>yt,enum:()=>Ti,exactOptional:()=>qu,file:()=>$f,flattenError:()=>sn,float32:()=>Qp,float64:()=>ef,formatError:()=>cn,fromJSONSchema:()=>Zf,function:()=>Nf,getErrorMap:()=>Cy,globalRegistry:()=>H,gt:()=>be,gte:()=>J,guid:()=>Ep,hash:()=>Xp,hex:()=>Yp,hostname:()=>Jp,httpUrl:()=>Np,includes:()=>vt,instanceof:()=>Uf,int:()=>si,int32:()=>tf,int64:()=>of,intersection:()=>Lu,invertCodec:()=>Tf,ipv4:()=>Fp,ipv6:()=>Zp,iso:()=>Tt,json:()=>Lf,jwt:()=>Wp,keyof:()=>mf,ksuid:()=>Lp,lazy:()=>dl,length:()=>Ye,literal:()=>Sf,locales:()=>hn,looseObject:()=>gf,looseRecord:()=>bf,lowercase:()=>ht,lt:()=>ve,lte:()=>re,mac:()=>Mp,map:()=>yf,maxLength:()=>Je,maxSize:()=>Ue,meta:()=>zf,mime:()=>xt,minLength:()=>we,minSize:()=>ye,multipleOf:()=>ze,nan:()=>wf,nanoid:()=>Rp,nativeEnum:()=>kf,negative:()=>Kr,never:()=>wi,nonnegative:()=>qr,nonoptional:()=>tl,nonpositive:()=>Wr,normalize:()=>kt,null:()=>Au,nullable:()=>Sn,nullish:()=>If,number:()=>Iu,object:()=>pf,optional:()=>kn,overwrite:()=>de,parse:()=>mu,parseAsync:()=>pu,partialRecord:()=>vf,pipe:()=>ci,positive:()=>Gr,prefault:()=>el,preprocess:()=>Ff,prettifyError:()=>Ao,promise:()=>Pf,property:()=>Jr,readonly:()=>cl,record:()=>Zu,refine:()=>fl,regex:()=>gt,regexes:()=>ne,registry:()=>Ir,safeDecode:()=>xu,safeDecodeAsync:()=>Su,safeEncode:()=>yu,safeEncodeAsync:()=>ku,safeParse:()=>fu,safeParseAsync:()=>gu,set:()=>xf,setErrorMap:()=>Ny,size:()=>qe,slugify:()=>Et,startsWith:()=>bt,strictObject:()=>ff,string:()=>yn,stringFormat:()=>qp,stringbool:()=>jf,success:()=>Ef,superRefine:()=>gl,symbol:()=>sf,templateLiteral:()=>Af,toJSONSchema:()=>ei,toLowerCase:()=>$t,toUpperCase:()=>It,transform:()=>Ai,treeifyError:()=>To,trim:()=>St,tuple:()=>Mu,uint32:()=>nf,uint64:()=>af,ulid:()=>Up,undefined:()=>cf,union:()=>Oi,unknown:()=>Xe,uppercase:()=>_t,url:()=>Pp,util:()=>b,uuid:()=>wp,uuidv4:()=>Op,uuidv6:()=>Tp,uuidv7:()=>Ap,void:()=>lf,xid:()=>jp,xor:()=>hf});var Oe={};Se(Oe,{$ZodAny:()=>os,$ZodArray:()=>ls,$ZodAsyncError:()=>le,$ZodBase64:()=>qa,$ZodBase64URL:()=>Ja,$ZodBigInt:()=>_r,$ZodBigIntFormat:()=>ts,$ZodBoolean:()=>mn,$ZodCIDRv4:()=>Ga,$ZodCIDRv6:()=>Ka,$ZodCUID:()=>Ra,$ZodCUID2:()=>Da,$ZodCatch:()=>Os,$ZodCheck:()=>U,$ZodCheckBigIntFormat:()=>la,$ZodCheckEndsWith:()=>ka,$ZodCheckGreaterThan:()=>dr,$ZodCheckIncludes:()=>ya,$ZodCheckLengthEquals:()=>ha,$ZodCheckLessThan:()=>lr,$ZodCheckLowerCase:()=>va,$ZodCheckMaxLength:()=>fa,$ZodCheckMaxSize:()=>da,$ZodCheckMimeType:()=>$a,$ZodCheckMinLength:()=>ga,$ZodCheckMinSize:()=>ma,$ZodCheckMultipleOf:()=>ca,$ZodCheckNumberFormat:()=>ua,$ZodCheckOverwrite:()=>Ia,$ZodCheckProperty:()=>Sa,$ZodCheckRegex:()=>_a,$ZodCheckSizeEquals:()=>pa,$ZodCheckStartsWith:()=>xa,$ZodCheckStringFormat:()=>pt,$ZodCheckUpperCase:()=>ba,$ZodCodec:()=>fn,$ZodCustom:()=>zs,$ZodCustomStringFormat:()=>Qa,$ZodDate:()=>us,$ZodDefault:()=>$s,$ZodDiscriminatedUnion:()=>ps,$ZodE164:()=>Ya,$ZodEmail:()=>Aa,$ZodEmoji:()=>Na,$ZodEncodeError:()=>Pe,$ZodEnum:()=>vs,$ZodError:()=>an,$ZodExactOptional:()=>ks,$ZodFile:()=>ys,$ZodFunction:()=>Cs,$ZodGUID:()=>Oa,$ZodIPv4:()=>Va,$ZodIPv6:()=>Ba,$ZodISODate:()=>Fa,$ZodISODateTime:()=>La,$ZodISODuration:()=>Za,$ZodISOTime:()=>Ma,$ZodIntersection:()=>fs,$ZodJWT:()=>Xa,$ZodKSUID:()=>ja,$ZodLazy:()=>Ds,$ZodLiteral:()=>bs,$ZodMAC:()=>Ha,$ZodMap:()=>hs,$ZodNaN:()=>Ts,$ZodNanoID:()=>Ca,$ZodNever:()=>ss,$ZodNonOptional:()=>Es,$ZodNull:()=>is,$ZodNullable:()=>Ss,$ZodNumber:()=>hr,$ZodNumberFormat:()=>es,$ZodObject:()=>ym,$ZodObjectJIT:()=>ds,$ZodOptional:()=>br,$ZodPipe:()=>yr,$ZodPrefault:()=>Is,$ZodPreprocess:()=>As,$ZodPromise:()=>Rs,$ZodReadonly:()=>Ps,$ZodRealError:()=>Q,$ZodRecord:()=>gs,$ZodRegistry:()=>$r,$ZodSet:()=>_s,$ZodString:()=>We,$ZodStringFormat:()=>R,$ZodSuccess:()=>ws,$ZodSymbol:()=>ns,$ZodTemplateLiteral:()=>Ns,$ZodTransform:()=>xs,$ZodTuple:()=>vr,$ZodType:()=>$,$ZodULID:()=>za,$ZodURL:()=>Pa,$ZodUUID:()=>Ta,$ZodUndefined:()=>rs,$ZodUnion:()=>pn,$ZodUnknown:()=>as,$ZodVoid:()=>cs,$ZodXID:()=>Ua,$ZodXor:()=>ms,$brand:()=>_o,$constructor:()=>p,$input:()=>js,$output:()=>Us,Doc:()=>dn,JSONSchema:()=>kp,JSONSchemaGenerator:()=>ti,NEVER:()=>ho,TimePrecision:()=>Zs,_any:()=>uc,_array:()=>hc,_base64:()=>Zr,_base64url:()=>Vr,_bigint:()=>nc,_boolean:()=>ec,_catch:()=>xy,_check:()=>xp,_cidrv4:()=>Fr,_cidrv6:()=>Mr,_coercedBigint:()=>rc,_coercedBoolean:()=>tc,_coercedDate:()=>fc,_coercedNumber:()=>Ws,_coercedString:()=>Fs,_cuid:()=>Cr,_cuid2:()=>Rr,_custom:()=>vc,_date:()=>pc,_decode:()=>tr,_decodeAsync:()=>rr,_default:()=>vy,_discriminatedUnion:()=>ay,_e164:()=>Br,_email:()=>Er,_emoji:()=>Pr,_encode:()=>er,_encodeAsync:()=>nr,_endsWith:()=>yt,_enum:()=>my,_file:()=>_c,_float32:()=>Js,_float64:()=>Ys,_gt:()=>be,_gte:()=>J,_guid:()=>_n,_includes:()=>vt,_int:()=>qs,_int32:()=>Xs,_int64:()=>ic,_intersection:()=>sy,_ipv4:()=>jr,_ipv6:()=>Lr,_isoDate:()=>Bs,_isoDateTime:()=>Vs,_isoDuration:()=>Gs,_isoTime:()=>Hs,_jwt:()=>Hr,_ksuid:()=>Ur,_lazy:()=>Iy,_length:()=>Ye,_literal:()=>fy,_lowercase:()=>ht,_lt:()=>ve,_lte:()=>re,_mac:()=>Ms,_map:()=>ly,_max:()=>re,_maxLength:()=>Je,_maxSize:()=>Ue,_mime:()=>xt,_min:()=>J,_minLength:()=>we,_minSize:()=>ye,_multipleOf:()=>ze,_nan:()=>gc,_nanoid:()=>Nr,_nativeEnum:()=>py,_negative:()=>Kr,_never:()=>dc,_nonnegative:()=>qr,_nonoptional:()=>by,_nonpositive:()=>Wr,_normalize:()=>kt,_null:()=>cc,_nullable:()=>_y,_number:()=>Ks,_optional:()=>hy,_overwrite:()=>de,_parse:()=>ut,_parseAsync:()=>lt,_pipe:()=>ky,_positive:()=>Gr,_promise:()=>Ey,_property:()=>Jr,_readonly:()=>Sy,_record:()=>uy,_refine:()=>bc,_regex:()=>gt,_safeDecode:()=>or,_safeDecodeAsync:()=>sr,_safeEncode:()=>ir,_safeEncodeAsync:()=>ar,_safeParse:()=>dt,_safeParseAsync:()=>mt,_set:()=>dy,_size:()=>qe,_slugify:()=>Et,_startsWith:()=>bt,_string:()=>Ls,_stringFormat:()=>wt,_stringbool:()=>Sc,_success:()=>yy,_superRefine:()=>yc,_symbol:()=>ac,_templateLiteral:()=>$y,_toLowerCase:()=>$t,_toUpperCase:()=>It,_transform:()=>gy,_trim:()=>St,_tuple:()=>cy,_uint32:()=>Qs,_uint64:()=>oc,_ulid:()=>Dr,_undefined:()=>sc,_union:()=>iy,_unknown:()=>lc,_uppercase:()=>_t,_url:()=>vn,_uuid:()=>wr,_uuidv4:()=>Or,_uuidv6:()=>Tr,_uuidv7:()=>Ar,_void:()=>mc,_xid:()=>zr,_xor:()=>oy,clone:()=>W,config:()=>M,createStandardJSONSchemaMethod:()=>Ot,createToJSONSchemaMethod:()=>$c,decode:()=>Ev,decodeAsync:()=>Ov,describe:()=>xc,encode:()=>Iv,encodeAsync:()=>wv,extractDefs:()=>Le,finalize:()=>Fe,flattenError:()=>sn,formatError:()=>cn,globalConfig:()=>He,globalRegistry:()=>H,initializeContext:()=>je,isValidBase64:()=>Wa,isValidBase64URL:()=>hm,isValidJWT:()=>_m,locales:()=>hn,meta:()=>kc,parse:()=>Xn,parseAsync:()=>Qn,prettifyError:()=>Ao,process:()=>N,regexes:()=>ne,registry:()=>Ir,safeDecode:()=>Av,safeDecodeAsync:()=>Nv,safeEncode:()=>Tv,safeEncodeAsync:()=>Pv,safeParse:()=>Po,safeParseAsync:()=>No,toDotPath:()=>qd,toJSONSchema:()=>ei,treeifyError:()=>To,util:()=>b,version:()=>Ea});var Bd,ho=Object.freeze({status:"aborted"});function p(e,t,r){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=s.prototype,d=Object.keys(l);for(let m=0;m<d.length;m++){let g=d[m];g in c||(c[g]=l[g].bind(c))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(c){var u;let l=r?.Parent?new i:this;o(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>r?.Parent&&c instanceof r.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var _o=Symbol("zod_brand"),le=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Pe=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Bd=globalThis).__zod_globalConfig??(Bd.__zod_globalConfig={});var He=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(He,e),He}var b={};Se(b,{BIGINT_FORMAT_RANGES:()=>wo,Class:()=>bo,NUMBER_FORMAT_RANGES:()=>Eo,aborted:()=>De,allowsEval:()=>ko,assert:()=>rv,assertEqual:()=>Q_,assertIs:()=>tv,assertNever:()=>nv,assertNotEqual:()=>ev,assignProp:()=>Ce,base64ToUint8Array:()=>Gd,base64urlToUint8Array:()=>yv,cached:()=>st,captureStackTrace:()=>Yn,cleanEnum:()=>bv,cleanRegex:()=>tn,clone:()=>W,cloneDef:()=>ov,createTransparentProxy:()=>dv,defineLazy:()=>E,esc:()=>Jn,escapeRegex:()=>se,explicitlyAborted:()=>Oo,extend:()=>fv,finalizeIssue:()=>q,floatSafeRemainder:()=>yo,getElementAtPath:()=>av,getEnumValues:()=>en,getLengthableOrigin:()=>on,getParsedType:()=>lv,getSizableOrigin:()=>rn,hexToUint8Array:()=>kv,isObject:()=>Ge,isPlainObject:()=>Re,issue:()=>ct,joinValues:()=>f,jsonStringifyReplacer:()=>at,merge:()=>hv,mergeDefs:()=>Ee,normalizeParams:()=>y,nullish:()=>Ne,numKeys:()=>uv,objectClone:()=>iv,omit:()=>pv,optionalKeys:()=>Io,parsedType:()=>v,partial:()=>_v,pick:()=>mv,prefixIssues:()=>X,primitiveTypes:()=>$o,promiseAllObject:()=>sv,propertyKeyTypes:()=>nn,randomString:()=>cv,required:()=>vv,safeExtend:()=>gv,shallowClone:()=>So,slugify:()=>xo,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Kd,uint8ArrayToBase64url:()=>xv,uint8ArrayToHex:()=>Sv,unwrapMessage:()=>Qt});function Q_(e){return e}function ev(e){return e}function tv(e){}function nv(e){throw new Error("Unexpected value in exhaustive check")}function rv(e){}function en(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function f(e,t="|"){return e.map(r=>_(r)).join(t)}function at(e,t){return typeof t=="bigint"?t.toString():t}function st(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Ne(e){return e==null}function tn(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function yo(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var Hd=Symbol("evaluating");function E(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Hd)return o===void 0&&(o=Hd,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function iv(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ce(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Ee(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function ov(e){return Ee(e._zod.def)}function av(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function sv(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function cv(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Jn(e){return JSON.stringify(e)}function xo(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Yn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ge(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var ko=st(()=>{if(He.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Re(e){if(Ge(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ge(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function So(e){return Re(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function uv(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var lv=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}`)}},nn=new Set(["string","number","symbol"]),$o=new Set(["string","number","bigint","boolean","symbol","undefined"]);function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function W(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function y(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 dv(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function _(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Io(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Eo={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]},wo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function mv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Ee(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=r.shape[c])}return Ce(this,"shape",s),s},checks:[]});return W(e,i)}function pv(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Ee(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in r.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return Ce(this,"shape",s),s},checks:[]});return W(e,i)}function fv(e,t){if(!Re(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=Ee(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ce(this,"shape",i),i}});return W(e,n)}function gv(e,t){if(!Re(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=Ee(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ce(this,"shape",o),o}});return W(e,r)}function hv(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Ee(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Ce(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return W(e,r)}function _v(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=Ee(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(r)for(let l in r){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Ce(this,"shape",u),u},checks:[]});return W(t,s)}function vv(e,t,r){let o=Ee(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Ce(this,"shape",i),i}});return W(t,o)}function De(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 Oo(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function X(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Qt(e){return typeof e=="string"?e:e?.message}function q(e,t,r){let o=e.message?e.message:Qt(e.inst?._zod.def?.error?.(e))??Qt(t?.error?.(e))??Qt(r.customError?.(e))??Qt(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:s,...c}=e;return c.path??(c.path=[]),c.message=o,t?.reportInput&&(c.input=s),c}function rn(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function on(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function v(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 ct(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function bv(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Gd(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Kd(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function yv(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Gd(t+r)}function xv(e){return Kd(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function kv(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 o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function Sv(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var bo=class{constructor(...t){}};var Wd=(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,at,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},an=p("$ZodError",Wd),Q=p("$ZodError",Wd,{Parent:Error});function sn(e,t=r=>r.message){let r={},o=[];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))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function cn(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>o({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)r._errors.push(t(s));else{let u=r,l=0;for(;l<c.length;){let d=c[l];l===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(s))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return o(e),r}function To(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,c;for(let u of n.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>o({issues:l},[...i,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...i,...u.path]);else{let l=[...i,...u.path];if(l.length===0){r.errors.push(t(u));continue}let d=r,m=0;for(;m<l.length;){let g=l[m],h=m===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(s=d.properties)[g]??(s[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(c=d.items)[g]??(c[g]={errors:[]}),d=d.items[g]),h&&d.errors.push(t(u)),m++}}};return o(e),r}function qd(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Ao(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${qd(o.path)}`);return t.join(`
34
+ `)}var ut=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new le;if(s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>q(u,i,M())));throw Yn(c,n?.callee),c}return s.value},Xn=ut(Q),lt=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(n?.Err??e)(s.issues.map(u=>q(u,i,M())));throw Yn(c,n?.callee),c}return s.value},Qn=lt(Q),dt=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new le;return i.issues.length?{success:!1,error:new(e??an)(i.issues.map(s=>q(s,n,M())))}:{success:!0,data:i.value}},Po=dt(Q),mt=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>q(s,n,M())))}:{success:!0,data:i.value}},No=mt(Q),er=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return ut(e)(t,r,n)},Iv=er(Q),tr=e=>(t,r,o)=>ut(e)(t,r,o),Ev=tr(Q),nr=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return lt(e)(t,r,n)},wv=nr(Q),rr=e=>async(t,r,o)=>lt(e)(t,r,o),Ov=rr(Q),ir=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return dt(e)(t,r,n)},Tv=ir(Q),or=e=>(t,r,o)=>dt(e)(t,r,o),Av=or(Q),ar=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return mt(e)(t,r,n)},Pv=ar(Q),sr=e=>async(t,r,o)=>mt(e)(t,r,o),Nv=sr(Q);var ne={};Se(ne,{base64:()=>Wo,base64url:()=>cr,bigint:()=>ta,boolean:()=>ra,browserEmail:()=>Fv,cidrv4:()=>Go,cidrv6:()=>Ko,cuid:()=>Co,cuid2:()=>Ro,date:()=>Yo,datetime:()=>Qo,domain:()=>Vv,duration:()=>Lo,e164:()=>Jo,email:()=>Mo,emoji:()=>Zo,extendedDuration:()=>Cv,guid:()=>Fo,hex:()=>Bv,hostname:()=>Zv,html5Email:()=>Uv,httpProtocol:()=>qo,idnEmail:()=>Lv,integer:()=>na,ipv4:()=>Vo,ipv6:()=>Bo,ksuid:()=>Uo,lowercase:()=>aa,mac:()=>Ho,md5_base64:()=>Gv,md5_base64url:()=>Kv,md5_hex:()=>Hv,nanoid:()=>jo,null:()=>ia,number:()=>ur,rfc5322Email:()=>jv,sha1_base64:()=>qv,sha1_base64url:()=>Jv,sha1_hex:()=>Wv,sha256_base64:()=>Xv,sha256_base64url:()=>Qv,sha256_hex:()=>Yv,sha384_base64:()=>tb,sha384_base64url:()=>nb,sha384_hex:()=>eb,sha512_base64:()=>ib,sha512_base64url:()=>ob,sha512_hex:()=>rb,string:()=>ea,time:()=>Xo,ulid:()=>Do,undefined:()=>oa,unicodeEmail:()=>Jd,uppercase:()=>sa,uuid:()=>Ke,uuid4:()=>Rv,uuid6:()=>Dv,uuid7:()=>zv,xid:()=>zo});var Co=/^[cC][0-9a-z]{6,}$/,Ro=/^[0-9a-z]+$/,Do=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zo=/^[0-9a-vA-V]{20}$/,Uo=/^[A-Za-z0-9]{27}$/,jo=/^[a-zA-Z0-9_-]{21}$/,Lo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cv=/^[-+]?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)?)??$/,Fo=/^([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})$/,Ke=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)$/,Rv=Ke(4),Dv=Ke(6),zv=Ke(7),Mo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Uv=/^[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])?)*$/,jv=/^(([^<>()\[\]\\.,;:\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,}))$/,Jd=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Lv=Jd,Fv=/^[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])?)*$/,Mv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Zo(){return new RegExp(Mv,"u")}var Vo=/^(?:(?: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])$/,Bo=/^(([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}|:))$/,Ho=e=>{let t=se(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Go=/^((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])$/,Ko=/^(([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])$/,Wo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cr=/^[A-Za-z0-9_-]*$/,Zv=/^(?=.{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])?)*\.?$/,Vv=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,qo=/^https?$/,Jo=/^\+[1-9]\d{6,14}$/,Yd="(?:(?:\\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])))",Yo=new RegExp(`^${Yd}$`);function Xd(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 Xo(e){return new RegExp(`^${Xd(e)}$`)}function Qo(e){let t=Xd({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${Yd}T(?:${o})$`)}var ea=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ta=/^-?\d+n?$/,na=/^-?\d+$/,ur=/^-?\d+(?:\.\d+)?$/,ra=/^(?:true|false)$/i,ia=/^null$/i;var oa=/^undefined$/i;var aa=/^[^A-Z]*$/,sa=/^[^a-z]*$/,Bv=/^[0-9a-fA-F]*$/;function un(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ln(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Hv=/^[0-9a-fA-F]{32}$/,Gv=un(22,"=="),Kv=ln(22),Wv=/^[0-9a-fA-F]{40}$/,qv=un(27,"="),Jv=ln(27),Yv=/^[0-9a-fA-F]{64}$/,Xv=un(43,"="),Qv=ln(43),eb=/^[0-9a-fA-F]{96}$/,tb=un(64,""),nb=ln(64),rb=/^[0-9a-fA-F]{128}$/,ib=un(86,"=="),ob=ln(86);var U=p("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),em={number:"number",bigint:"bigint",object:"date"},lr=p("$ZodCheckLessThan",(e,t)=>{U.init(e,t);let r=em[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),dr=p("$ZodCheckGreaterThan",(e,t)=>{U.init(e,t);let r=em[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ca=p("$ZodCheckMultipleOf",(e,t)=>{U.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.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):yo(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})}}),ua=p("$ZodCheckNumberFormat",(e,t)=>{U.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=Eo[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=n,c.maximum=i,r&&(c.pattern=na)}),e._zod.check=s=>{let c=s.value;if(r){if(!Number.isInteger(c)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}c<n&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),la=p("$ZodCheckBigIntFormat",(e,t)=>{U.init(e,t);let[r,o]=wo[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),da=p("$ZodCheckMaxSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:rn(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ma=p("$ZodCheckMinSize",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:rn(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),pa=p("$ZodCheckSizeEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:rn(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),fa=p("$ZodCheckMaxLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=on(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ga=p("$ZodCheckMinLength",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=on(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ha=p("$ZodCheckLengthEquals",(e,t)=>{var r;U.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Ne(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=on(n),c=i>t.length;o.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),pt=p("$ZodCheckStringFormat",(e,t)=>{var r,o;U.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.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})}):(o=e._zod).check??(o.check=()=>{})}),_a=p("$ZodCheckRegex",(e,t)=>{pt.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})}}),va=p("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=aa),pt.init(e,t)}),ba=p("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=sa),pt.init(e,t)}),ya=p("$ZodCheckIncludes",(e,t)=>{U.init(e,t);let r=se(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),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})}}),xa=p("$ZodCheckStartsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`^${se(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),ka=p("$ZodCheckEndsWith",(e,t)=>{U.init(e,t);let r=new RegExp(`.*${se(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Qd(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues))}var Sa=p("$ZodCheckProperty",(e,t)=>{U.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Qd(n,r,t.property));Qd(o,r,t.property)}}),$a=p("$ZodCheckMimeType",(e,t)=>{U.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Ia=p("$ZodCheckOverwrite",(e,t)=>{U.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var dn=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 o=t.split(`
35
35
  `).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
36
- `))}};var Oa={major:4,minor:4,patch:3};var $=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Oa;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,c,u)=>{let l=ze(s),d;for(let m of c){if(m._zod.def.when){if(Ao(s)||!m._zod.def.when(s))continue}else if(l)continue;let g=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new de;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=ze(s,g)))});else{if(s.issues.length===g)continue;l||(l=ze(s,g))}}return d?d.then(()=>s):s},i=(s,c,u)=>{if(ze(s))return s.aborted=!0,s;let l=n(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new de;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,c)):i(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new de;return u.then(l=>n(l,o,c))}return n(u,o,c)}}E(e,"~standard",()=>({validate:n=>{try{let i=No(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Ro(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),qe=p("$ZodString",(e,t)=>{$.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??na(e._zod.bag),e._zod.parse=(r,o)=>{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}}),D=p("$ZodStringFormat",(e,t)=>{gt.init(e,t),qe.init(e,t)}),Aa=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Zo),D.init(e,t)}),Pa=p("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=We(o))}else t.pattern??(t.pattern=We());D.init(e,t)}),Ca=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Vo),D.init(e,t)}),Na=p("$ZodURL",(e,t)=>{D.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Yo.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);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=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ra=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Bo()),D.init(e,t)}),Da=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Fo),D.init(e,t)}),za=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Do),D.init(e,t)}),Ua=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=zo),D.init(e,t)}),ja=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Uo),D.init(e,t)}),La=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=jo),D.init(e,t)}),Fa=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Lo),D.init(e,t)}),Ma=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=ta(t)),D.init(e,t)}),Za=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Qo),D.init(e,t)}),Va=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ea(t)),D.init(e,t)}),Ba=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Mo),D.init(e,t)}),Ha=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ho),D.init(e,t),e._zod.bag.format="ipv4"}),Ga=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Go),D.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})}}}),Ka=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ko(t.delimiter)),D.init(e,t),e._zod.bag.format="mac"}),Wa=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Wo),D.init(e,t)}),qa=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=qo),D.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)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 Ja(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ya=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Jo),D.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ja(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function bm(e){if(!cr.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ja(r)}var Xa=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cr),D.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{bm(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Qa=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Xo),D.init(e,t)});function ym(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var es=p("$ZodJWT",(e,t)=>{D.init(e,t),e._zod.check=r=>{ym(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ts=p("$ZodCustomStringFormat",(e,t)=>{D.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})}}),hr=p("$ZodNumber",(e,t)=>{$.init(e,t),e._zod.pattern=e._zod.bag.pattern??ur,e._zod.parse=(r,o)=>{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 i=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,...i?{received:i}:{}}),r}}),ns=p("$ZodNumberFormat",(e,t)=>{da.init(e,t),hr.init(e,t)}),pn=p("$ZodBoolean",(e,t)=>{$.init(e,t),e._zod.pattern=oa,e._zod.parse=(r,o)=>{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}}),_r=p("$ZodBigInt",(e,t)=>{$.init(e,t),e._zod.pattern=ra,e._zod.parse=(r,o)=>{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}}),rs=p("$ZodBigIntFormat",(e,t)=>{ma.init(e,t),_r.init(e,t)}),is=p("$ZodSymbol",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),os=p("$ZodUndefined",(e,t)=>{$.init(e,t),e._zod.pattern=sa,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),as=p("$ZodNull",(e,t)=>{$.init(e,t),e._zod.pattern=aa,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),ss=p("$ZodAny",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),cs=p("$ZodUnknown",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),us=p("$ZodNever",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),ls=p("$ZodVoid",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),ds=p("$ZodDate",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function om(e,t,r){e.issues.length&&t.issues.push(...Q(r,e.issues)),t.value[r]=e.value}var ms=p("$ZodArray",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{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 i=[];for(let s=0;s<n.length;s++){let c=n[s],u=t.element._zod.run({value:c,issues:[]},o);u instanceof Promise?i.push(u.then(l=>om(l,r,s))):om(u,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function gr(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...Q(r,e.issues))}if(!s&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function xm(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=wo(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function km(e,t,r,o,n,i){let s=[],c=n.keySet,u=n.catchall._zod,l=u.def.type,d=u.optin==="optional",m=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){s.push(g);continue}let h=u.run({value:t[g],issues:[]},o);h instanceof Promise?e.push(h.then(S=>gr(S,r,g,t,d,m))):gr(h,r,g,t,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var Sm=p("$ZodObject",(e,t)=>{if($.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let o=ut(()=>xm(t));E(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let m of d.values)u[l].add(m)}}return u});let n=Ke,i=t.catchall,s;e._zod.parse=(c,u)=>{s??(s=o.value);let l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let d=[],m=s.shape;for(let g of s.keys){let h=m[g],S=h._zod.optin==="optional",R=h._zod.optout==="optional",P=h._zod.run({value:l[g],issues:[]},u);P instanceof Promise?d.push(P.then(rt=>gr(rt,c,g,l,S,R))):gr(P,c,g,l,S,R)}return i?km(d,l,c,u,o.value,e):d.length?Promise.all(d).then(()=>c):c}}),ps=p("$ZodObjectJIT",(e,t)=>{Sm.init(e,t);let r=e._zod.parse,o=ut(()=>xm(t)),n=g=>{let h=new mn(["shape","payload","ctx"]),S=o.value,R=be=>{let M=Jn(be);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};h.write("const input = payload.value;");let P=Object.create(null),rt=0;for(let be of S.keys)P[be]=`key_${rt++}`;h.write("const newResult = {};");for(let be of S.keys){let M=P[be],H=Jn(be),ad=g[be],sd=ad?._zod?.optin==="optional",x_=ad?._zod?.optout==="optional";h.write(`const ${M} = ${R(be)};`),sd&&x_?h.write(`
37
- if (${M}.issues.length) {
38
- if (${H} in input) {
39
- payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
36
+ `))}};var Ea={major:4,minor:4,patch:3};var $=p("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ea;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(s,c,u)=>{let l=De(s),d;for(let m of c){if(m._zod.def.when){if(Oo(s)||!m._zod.def.when(s))continue}else if(l)continue;let g=s.issues.length,h=m._zod.check(s);if(h instanceof Promise&&u?.async===!1)throw new le;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(l||(l=De(s,g)))});else{if(s.issues.length===g)continue;l||(l=De(s,g))}}return d?d.then(()=>s):s},i=(s,c,u)=>{if(De(s))return s.aborted=!0,s;let l=n(c,o,u);if(l instanceof Promise){if(u.async===!1)throw new le;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,s,c)):i(l,s,c)}let u=e._zod.parse(s,c);if(u instanceof Promise){if(c.async===!1)throw new le;return u.then(l=>n(l,o,c))}return n(u,o,c)}}E(e,"~standard",()=>({validate:n=>{try{let i=Po(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return No(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),We=p("$ZodString",(e,t)=>{$.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ea(e._zod.bag),e._zod.parse=(r,o)=>{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}}),R=p("$ZodStringFormat",(e,t)=>{pt.init(e,t),We.init(e,t)}),Oa=p("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fo),R.init(e,t)}),Ta=p("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ke(o))}else t.pattern??(t.pattern=Ke());R.init(e,t)}),Aa=p("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mo),R.init(e,t)}),Pa=p("$ZodURL",(e,t)=>{R.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===qo.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);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=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Na=p("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Zo()),R.init(e,t)}),Ca=p("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=jo),R.init(e,t)}),Ra=p("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Co),R.init(e,t)}),Da=p("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ro),R.init(e,t)}),za=p("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Do),R.init(e,t)}),Ua=p("$ZodXID",(e,t)=>{t.pattern??(t.pattern=zo),R.init(e,t)}),ja=p("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Uo),R.init(e,t)}),La=p("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Qo(t)),R.init(e,t)}),Fa=p("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Yo),R.init(e,t)}),Ma=p("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Xo(t)),R.init(e,t)}),Za=p("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Lo),R.init(e,t)}),Va=p("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Vo),R.init(e,t),e._zod.bag.format="ipv4"}),Ba=p("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bo),R.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})}}}),Ha=p("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ho(t.delimiter)),R.init(e,t),e._zod.bag.format="mac"}),Ga=p("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Go),R.init(e,t)}),Ka=p("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ko),R.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)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 Wa(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var qa=p("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Wo),R.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Wa(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function hm(e){if(!cr.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Wa(r)}var Ja=p("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=cr),R.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{hm(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Ya=p("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Jo),R.init(e,t)});function _m(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Xa=p("$ZodJWT",(e,t)=>{R.init(e,t),e._zod.check=r=>{_m(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Qa=p("$ZodCustomStringFormat",(e,t)=>{R.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})}}),hr=p("$ZodNumber",(e,t)=>{$.init(e,t),e._zod.pattern=e._zod.bag.pattern??ur,e._zod.parse=(r,o)=>{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 i=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,...i?{received:i}:{}}),r}}),es=p("$ZodNumberFormat",(e,t)=>{ua.init(e,t),hr.init(e,t)}),mn=p("$ZodBoolean",(e,t)=>{$.init(e,t),e._zod.pattern=ra,e._zod.parse=(r,o)=>{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}}),_r=p("$ZodBigInt",(e,t)=>{$.init(e,t),e._zod.pattern=ta,e._zod.parse=(r,o)=>{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}}),ts=p("$ZodBigIntFormat",(e,t)=>{la.init(e,t),_r.init(e,t)}),ns=p("$ZodSymbol",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),rs=p("$ZodUndefined",(e,t)=>{$.init(e,t),e._zod.pattern=oa,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),is=p("$ZodNull",(e,t)=>{$.init(e,t),e._zod.pattern=ia,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),os=p("$ZodAny",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),as=p("$ZodUnknown",(e,t)=>{$.init(e,t),e._zod.parse=r=>r}),ss=p("$ZodNever",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),cs=p("$ZodVoid",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),us=p("$ZodDate",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function nm(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues)),t.value[r]=e.value}var ls=p("$ZodArray",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{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 i=[];for(let s=0;s<n.length;s++){let c=n[s],u=t.element._zod.run({value:c,issues:[]},o);u instanceof Promise?i.push(u.then(l=>nm(l,r,s))):nm(u,r,s)}return i.length?Promise.all(i).then(()=>r):r}});function gr(e,t,r,o,n,i){let s=r in o;if(e.issues.length){if(n&&i&&!s)return;t.issues.push(...X(r,e.issues))}if(!s&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}function vm(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=Io(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function bm(e,t,r,o,n,i){let s=[],c=n.keySet,u=n.catchall._zod,l=u.def.type,d=u.optin==="optional",m=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){s.push(g);continue}let h=u.run({value:t[g],issues:[]},o);h instanceof Promise?e.push(h.then(S=>gr(S,r,g,t,d,m))):gr(h,r,g,t,d,m)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var ym=p("$ZodObject",(e,t)=>{if($.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let o=st(()=>vm(t));E(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let m of d.values)u[l].add(m)}}return u});let n=Ge,i=t.catchall,s;e._zod.parse=(c,u)=>{s??(s=o.value);let l=c.value;if(!n(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let d=[],m=s.shape;for(let g of s.keys){let h=m[g],S=h._zod.optin==="optional",C=h._zod.optout==="optional",P=h._zod.run({value:l[g],issues:[]},u);P instanceof Promise?d.push(P.then(nt=>gr(nt,c,g,l,S,C))):gr(P,c,g,l,S,C)}return i?bm(d,l,c,u,o.value,e):d.length?Promise.all(d).then(()=>c):c}}),ds=p("$ZodObjectJIT",(e,t)=>{ym.init(e,t);let r=e._zod.parse,o=st(()=>vm(t)),n=g=>{let h=new dn(["shape","payload","ctx"]),S=o.value,C=_e=>{let F=Jn(_e);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};h.write("const input = payload.value;");let P=Object.create(null),nt=0;for(let _e of S.keys)P[_e]=`key_${nt++}`;h.write("const newResult = {};");for(let _e of S.keys){let F=P[_e],B=Jn(_e),nd=g[_e],rd=nd?._zod?.optin==="optional",d_=nd?._zod?.optout==="optional";h.write(`const ${F} = ${C(_e)};`),rd&&d_?h.write(`
37
+ if (${F}.issues.length) {
38
+ if (${B} in input) {
39
+ payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
40
40
  ...iss,
41
- path: iss.path ? [${H}, ...iss.path] : [${H}]
41
+ path: iss.path ? [${B}, ...iss.path] : [${B}]
42
42
  })));
43
43
  }
44
44
  }
45
45
 
46
- if (${M}.value === undefined) {
47
- if (${H} in input) {
48
- newResult[${H}] = undefined;
46
+ if (${F}.value === undefined) {
47
+ if (${B} in input) {
48
+ newResult[${B}] = undefined;
49
49
  }
50
50
  } else {
51
- newResult[${H}] = ${M}.value;
51
+ newResult[${B}] = ${F}.value;
52
52
  }
53
53
 
54
- `):sd?h.write(`
55
- if (${M}.issues.length) {
56
- payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
54
+ `):rd?h.write(`
55
+ if (${F}.issues.length) {
56
+ payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
57
57
  ...iss,
58
- path: iss.path ? [${H}, ...iss.path] : [${H}]
58
+ path: iss.path ? [${B}, ...iss.path] : [${B}]
59
59
  })));
60
60
  }
61
61
 
62
- if (${M}.value === undefined) {
63
- if (${H} in input) {
64
- newResult[${H}] = undefined;
62
+ if (${F}.value === undefined) {
63
+ if (${B} in input) {
64
+ newResult[${B}] = undefined;
65
65
  }
66
66
  } else {
67
- newResult[${H}] = ${M}.value;
67
+ newResult[${B}] = ${F}.value;
68
68
  }
69
69
 
70
70
  `):h.write(`
71
- const ${M}_present = ${H} in input;
72
- if (${M}.issues.length) {
73
- payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
71
+ const ${F}_present = ${B} in input;
72
+ if (${F}.issues.length) {
73
+ payload.issues = payload.issues.concat(${F}.issues.map(iss => ({
74
74
  ...iss,
75
- path: iss.path ? [${H}, ...iss.path] : [${H}]
75
+ path: iss.path ? [${B}, ...iss.path] : [${B}]
76
76
  })));
77
77
  }
78
- if (!${M}_present && !${M}.issues.length) {
78
+ if (!${F}_present && !${F}.issues.length) {
79
79
  payload.issues.push({
80
80
  code: "invalid_type",
81
81
  expected: "nonoptional",
82
82
  input: undefined,
83
- path: [${H}]
83
+ path: [${B}]
84
84
  });
85
85
  }
86
86
 
87
- if (${M}_present) {
88
- if (${M}.value === undefined) {
89
- newResult[${H}] = undefined;
87
+ if (${F}_present) {
88
+ if (${F}.value === undefined) {
89
+ newResult[${B}] = undefined;
90
90
  } else {
91
- newResult[${H}] = ${M}.value;
91
+ newResult[${B}] = ${F}.value;
92
92
  }
93
93
  }
94
94
 
95
- `)}h.write("payload.value = newResult;"),h.write("return payload;");let y_=h.compile();return(be,M)=>y_(g,be,M)},i,s=Ke,c=!Ge.jitless,l=c&&$o.value,d=t.catchall,m;e._zod.parse=(g,h)=>{m??(m=o.value);let S=g.value;return s(S)?c&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=n(t.shape)),g=i(g,h),d?km([],S,g,h,m,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g)}});function am(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!ze(i));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(i=>i.issues.map(s=>J(s,o,Z())))}),t)}var fn=p("$ZodUnion",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),E(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),E(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),E(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>nn(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>am(c,o,e,n)):am(s,o,e,n)}});function sm(e,t,r,o){let n=e.filter(i=>i.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(i=>i.issues.map(s=>J(s,o,Z())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var fs=p("$ZodXor",(e,t)=>{fn.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(c=>sm(c,o,e,n)):sm(s,o,e,n)}}),gs=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,fn.init(e,t);let r=e._zod.parse;E(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[c,u]of Object.entries(s)){n[c]||(n[c]=new Set);for(let l of u)n[c].add(l)}}return n});let o=ut(()=>{let n=t.options,i=new Map;for(let s of n){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ke(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=o.value.get(s?.[t.discriminator]);return c?c._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n)}}),hs=p("$ZodIntersection",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,l])=>cm(r,u,l)):cm(r,i,s)}});function Ta(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(De(e)&&De(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=Ta(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=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 o=0;o<e.length;o++){let n=e[o],i=t[o],s=Ta(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function cm(e,t,r){let o=new Map,n;for(let c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).l=!0}else e.issues.push(c);for(let c of r.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).r=!0;else e.issues.push(c);let i=[...o].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&e.issues.push({...n,keys:i}),ze(e))return e;let s=Ta(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 vr=p("$ZodTuple",(e,t)=>{$.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],c=um(r,"optin"),u=um(r,"optout");if(!t.rest){if(i.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(r.length);for(let d=0;d<r.length;d++){let m=r[d]._zod.run({value:i[d],issues:[]},n);m instanceof Promise?s.push(m.then(g=>{l[d]=g})):l[d]=m}if(t.rest){let d=r.length-1,m=i.slice(r.length);for(let g of m){d++;let h=t.rest._zod.run({value:g,issues:[]},n);h instanceof Promise?s.push(h.then(S=>lm(S,o,d))):lm(h,o,d)}}return s.length?Promise.all(s).then(()=>dm(l,o,r,i,u)):dm(l,o,r,i,u)}});function um(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function lm(e,t,r){e.issues.length&&t.issues.push(...Q(r,e.issues)),t.value[r]=e.value}function dm(e,t,r,o,n){for(let i=0;i<r.length;i++){let s=e[i],c=i<o.length;if(s.issues.length){if(!c&&i>=n){t.value.length=i;break}t.issues.push(...Q(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var _s=p("$ZodRecord",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!De(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>J(h,o,Z())),input:l,path:[l],inst:e});continue}let m=d.value,g=t.valueType._zod.run({value:n[l],issues:[]},o);g instanceof Promise?i.push(g.then(h=>{h.issues.length&&r.issues.push(...Q(l,h.issues)),r.value[m]=h.value})):(g.issues.length&&r.issues.push(...Q(l,g.issues)),r.value[m]=g.value)}let u;for(let l in n)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&ur.test(c)&&u.issues.length){let m=t.keyType._zod.run({value:Number(c),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>J(m,o,Z())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:n[c],issues:[]},o);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...Q(c,m.issues)),r.value[u.value]=m.value})):(d.issues.length&&r.issues.push(...Q(c,d.issues)),r.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),vs=p("$ZodMap",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,c]of n){let u=t.keyType._zod.run({value:s,issues:[]},o),l=t.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,m])=>{mm(d,m,r,s,n,e,o)})):mm(u,l,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function mm(e,t,r,o,n,i,s){e.issues.length&&(rn.has(typeof o)?r.issues.push(...Q(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(c=>J(c,s,Z()))})),t.issues.length&&(rn.has(typeof o)?r.issues.push(...Q(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(c=>J(c,s,Z()))})),r.value.set(e.value,t.value)}var bs=p("$ZodSet",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let c=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>pm(u,r))):pm(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function pm(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var ys=p("$ZodEnum",(e,t)=>{$.init(e,t);let r=tn(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>rn.has(typeof n)).map(n=>typeof n=="string"?ce(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),xs=p("$ZodLiteral",(e,t)=>{if($.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(o=>typeof o=="string"?ce(o):o?ce(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),ks=p("$ZodFile",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Ss=p("$ZodTransform",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ce(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new de;return r.value=n,r.fallback=!0,r}});function fm(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var br=p("$ZodOptional",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.optout="optional",E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${nn(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(s=>fm(s,n)):fm(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),$s=p("$ZodExactOptional",(e,t)=>{br.init(e,t),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Is=p("$ZodNullable",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${nn(r.source)}|null)$`):void 0}),E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Es=p("$ZodDefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>gm(i,t)):gm(n,t)}});function gm(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ws=p("$ZodPrefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Os=p("$ZodNonOptional",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>hm(i,e)):hm(n,e)}});function hm(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 Ts=p("$ZodSuccess",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ce("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),As=p("$ZodCatch",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>J(s,o,Z()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>J(i,o,Z()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Ps=p("$ZodNaN",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),yr=p("$ZodPipe",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>mr(s,t.in,o)):mr(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>mr(i,t.out,o)):mr(n,t.out,o)}});function mr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var gn=p("$ZodCodec",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>pr(s,t,o)):pr(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>pr(s,t,o)):pr(i,t,o)}}});function pr(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(i=>fr(e,i,t.out,r)):fr(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>fr(e,i,t.in,r)):fr(e,n,t.in,r)}}function fr(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var Cs=p("$ZodPreprocess",(e,t)=>{yr.init(e,t)}),Ns=p("$ZodReadonly",(e,t)=>{$.init(e,t),E(e._zod,"propValues",()=>t.innerType._zod.propValues),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"optin",()=>t.innerType?._zod?.optin),E(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(_m):_m(n)}});function _m(e){return e.value=Object.freeze(e.value),e}var Rs=p("$ZodTemplateLiteral",(e,t)=>{$.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||Eo.has(typeof o))r.push(ce(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Ds=p("$ZodFunction",(e,t)=>($.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(...o){let n=e._def.input?Xn(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Xn(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Qn(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Qn(e._def.output,i):i}},e._zod.parse=(r,o)=>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 o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new vr({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),zs=p("$ZodPromise",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Us=p("$ZodLazy",(e,t)=>{$.init(e,t),E(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),E(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),E(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),E(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),E(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),js=p("$ZodCustom",(e,t)=>{U.init(e,t),$.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>vm(i,r,o,e));vm(n,r,o,e)}});function vm(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(lt(n))}}var _n={};Ie(_n,{ar:()=>$m,az:()=>Im,be:()=>wm,bg:()=>Om,ca:()=>Tm,cs:()=>Am,da:()=>Pm,de:()=>Cm,el:()=>Nm,en:()=>xr,eo:()=>Rm,es:()=>Dm,fa:()=>zm,fi:()=>Um,fr:()=>jm,frCA:()=>Lm,he:()=>Fm,hr:()=>Mm,hu:()=>Zm,hy:()=>Bm,id:()=>Hm,is:()=>Gm,it:()=>Km,ja:()=>Wm,ka:()=>qm,kh:()=>Jm,km:()=>kr,ko:()=>Ym,lt:()=>Qm,mk:()=>ep,ms:()=>tp,nl:()=>np,no:()=>rp,ota:()=>ip,pl:()=>ap,ps:()=>op,pt:()=>sp,ro:()=>cp,ru:()=>lp,sl:()=>dp,sv:()=>mp,ta:()=>pp,th:()=>fp,tr:()=>gp,ua:()=>hp,uk:()=>Sr,ur:()=>_p,uz:()=>vp,vi:()=>bp,yo:()=>kp,zhCN:()=>yp,zhTW:()=>xp});var _b=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}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 ${_(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: ${f(n.values,"|")}`;case"too_big":{let i=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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=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 ${i} ${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 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`${r[i.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":""}: ${f(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 $m(){return{localeError:_b()}}var vb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.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":""}: ${f(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 Im(){return{localeError:vb()}}function Em(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var bb=()=>{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"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Em(c,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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Em(c,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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.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"}: ${f(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 wm(){return{localeError:bb()}}var yb=()=>{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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.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 "${i.prefix}"`;if(i.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 "${i.suffix}"`;if(i.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 "${i.includes}"`;if(i.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 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[i.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":""}: ${f(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 Om(){return{localeError:yb()}}var xb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${_(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${f(n.values," o ")}`;case"too_big":{let i=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 ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.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":""}: ${f(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 Tm(){return{localeError:xb()}}var kb=()=>{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"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.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: ${f(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 Am(){return{localeError:kb()}}var Sb=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 Pm(){return{localeError:Sb()}}var $b=()=>{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"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.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"}: ${f(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 Cm(){return{localeError:$b()}}var Ib=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${_(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Nm(){return{localeError:Ib()}}var Eb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`Invalid option: expected one of ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function xr(){return{localeError:Eb()}}var wb=()=>{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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.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":""}: ${f(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 Rm(){return{localeError:wb()}}var Ob=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function Dm(){return{localeError:Ob()}}var Tb=()=>{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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \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 ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \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 ${_(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 ${f(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.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: ${f(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 zm(){return{localeError:Tb()}}var Ab=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.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"}: ${f(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 Um(){return{localeError:Ab()}}var Pb=()=>{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"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${_(n.values[0])} attendu`:`Option invalide : une valeur parmi ${f(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.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":""} : ${f(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 jm(){return{localeError:Pb()}}var Cb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${_(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.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":""} : ${f(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 Lm(){return{localeError:Cb()}}var Nb=()=>{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=l=>l?e[l]:void 0,o=l=>{let d=r(l);return d?d.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=l=>l?t[l]??null:null,c={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 l=>{switch(l.code){case"invalid_type":{let d=l.expected,m=u[d??""]??o(d),g=v(l.input),h=u[g]??e[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.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 ${_(l.values[0])}`;let d=l.values.map(h=>_(h));if(l.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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let m=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let S=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",R=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let g=l.inclusive?"<=":"<",h=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let S=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let P=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`}let R=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let g=l.inclusive?">=":">",h=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let m=c[d.format],g=m?.label??d.format,S=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${S}`}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 ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${f(l.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(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Fm(){return{localeError:Nb()}}var Rb=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${_(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${n.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${n.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${f(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function Mm(){return{localeError:Rb()}}var Db=()=>{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"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.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":""}: ${f(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 Zm(){return{localeError:Db()}}function Vm(e,t,r){return Math.abs(e)===1?t:r}function ht(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 zb=()=>{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"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Vm(c,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 ${ht(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${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 ${ht(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Vm(c,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 ${ht(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${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 ${ht(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.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 ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.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":""}. ${f(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ht(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 ${ht(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Bm(){return{localeError:zb()}}var Ub=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${_(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.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":""}: ${f(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 Hm(){return{localeError:Ub()}}var jb=()=>{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"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${_(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.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"}: ${f(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 Gm(){return{localeError:jb()}}var Lb=()=>{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"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${_(n.values[0])}`:`Opzione non valida: atteso uno tra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.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"}: ${f(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 Km(){return{localeError:Lb()}}var Fb=()=>{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"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${_(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${f(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=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"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=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}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.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":""}: ${f(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 Wm(){return{localeError:Fb()}}var Mb=()=>{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 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}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 ${_(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 ${f(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\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 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.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"}: ${f(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 qm(){return{localeError:Mb()}}var Zb=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=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} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.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 ${f(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 kr(){return{localeError:Zb()}}function Jm(){return kr()}var Vb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${f(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.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: ${f(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 Ym(){return{localeError:Vb()}}var hn=e=>e.charAt(0).toUpperCase()+e.slice(1);function Xm(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var Bb=()=>{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,i,s,c){let u=e[n]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[c][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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${_(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${f(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,s=t(n.origin,Xm(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${hn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${hn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,s=t(n.origin,Xm(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${hn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${hn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.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"}: ${f(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${hn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Qm(){return{localeError:Bb()}}var Hb=()=>{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"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`Invalid ${r[i.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"}: ${f(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 ep(){return{localeError:Hb()}}var Gb=()=>{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"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${_(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${f(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 tp(){return{localeError:Gb()}}var Kb=()=>{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"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${_(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.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":""}: ${f(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 np(){return{localeError:Kb()}}var Wb=()=>{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"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${_(n.values[0])}`:`Ugyldig valg: forventet en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 rp(){return{localeError:Wb()}}var qb=()=>{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"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${_(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.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":""}: ${f(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 ip(){return{localeError:qb()}}var Jb=()=>{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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \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 ${_(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${f(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.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"}: ${f(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 op(){return{localeError:Jb()}}var Yb=()=>{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"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${f(n.values,"|")}`;case"too_big":{let i=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 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=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 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.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":""}: ${f(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 ap(){return{localeError:Yb()}}var Xb=()=>{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"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${_(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.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":""}: ${f(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 sp(){return{localeError:Xb()}}var Qb=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${_(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Prea mic: a\u0219teptat ca ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${f(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function cp(){return{localeError:Qb()}}function up(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var ey=()=>{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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=up(c,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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=up(c,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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.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":""}: ${f(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 lp(){return{localeError:ey()}}var ty=()=>{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"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.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"}: ${f(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 dp(){return{localeError:ty()}}var ny=()=>{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"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.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"}: ${f(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 mp(){return{localeError:ny()}}var ry=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}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 ${_(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 ${f(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=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"} ${i}${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"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=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} ${i}${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} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.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[i.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":""}: ${f(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 pp(){return{localeError:ry()}}var iy=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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${i} ${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${i} ${n.maximum.toString()}`}case"too_small":{let i=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${i} ${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${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.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 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.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: ${f(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 fp(){return{localeError:iy()}}var oy=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.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":""}: ${f(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 gp(){return{localeError:oy()}}var ay=()=>{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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.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":""}: ${f(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 Sr(){return{localeError:ay()}}function hp(){return Sr()}var sy=()=>{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"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${_(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${f(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${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 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${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 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.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":""}: ${f(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 _p(){return{localeError:sy()}}var cy=()=>{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"},map:{unit:"yozuv",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"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.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":""}: ${f(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 vp(){return{localeError:cy()}}var uy=()=>{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"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.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: ${f(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 bp(){return{localeError:uy()}}var ly=()=>{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"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.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): ${f(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 yp(){return{localeError:ly()}}var dy=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.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${f(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 xp(){return{localeError:dy()}}var my=()=>{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"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${_(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${f(n.values,"|")}`;case"too_big":{let i=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} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=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} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.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: ${f(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 kp(){return{localeError:my()}}var Sp,Ls=Symbol("ZodOutput"),Fs=Symbol("ZodInput"),$r=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.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 o={...this.get(r)??{}};delete o.id;let n={...o,...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 Ir(){return new $r}(Sp=globalThis).__zod_globalRegistry??(Sp.__zod_globalRegistry=Ir());var G=globalThis.__zod_globalRegistry;function Ms(e,t){return new e({type:"string",...y(t)})}function Zs(e,t){return new e({type:"string",coerce:!0,...y(t)})}function Er(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function vn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function wr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function Or(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function Tr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function bn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Pr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function Cr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Nr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Rr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function Dr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function zr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Ur(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function jr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Lr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function Vs(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...y(t)})}function Fr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function Mr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(t)})}function Zr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(t)})}function Vr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Br(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Hr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}var Bs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Hs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function Gs(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Ks(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function Ws(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function qs(e,t){return new e({type:"number",checks:[],...y(t)})}function Js(e,t){return new e({type:"number",coerce:!0,checks:[],...y(t)})}function Ys(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Xs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...y(t)})}function Qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...y(t)})}function ec(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...y(t)})}function tc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...y(t)})}function nc(e,t){return new e({type:"boolean",...y(t)})}function rc(e,t){return new e({type:"boolean",coerce:!0,...y(t)})}function ic(e,t){return new e({type:"bigint",...y(t)})}function oc(e,t){return new e({type:"bigint",coerce:!0,...y(t)})}function ac(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(t)})}function sc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(t)})}function cc(e,t){return new e({type:"symbol",...y(t)})}function uc(e,t){return new e({type:"undefined",...y(t)})}function lc(e,t){return new e({type:"null",...y(t)})}function dc(e){return new e({type:"any"})}function mc(e){return new e({type:"unknown"})}function pc(e,t){return new e({type:"never",...y(t)})}function fc(e,t){return new e({type:"void",...y(t)})}function gc(e,t){return new e({type:"date",...y(t)})}function hc(e,t){return new e({type:"date",coerce:!0,...y(t)})}function _c(e,t){return new e({type:"nan",...y(t)})}function ye(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!1})}function oe(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!0})}function xe(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!1})}function Y(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!0})}function Gr(e){return xe(0,e)}function Kr(e){return ye(0,e)}function Wr(e){return oe(0,e)}function qr(e){return Y(0,e)}function Ue(e,t){return new la({check:"multiple_of",...y(t),value:e})}function je(e,t){return new pa({check:"max_size",...y(t),maximum:e})}function ke(e,t){return new fa({check:"min_size",...y(t),minimum:e})}function Je(e,t){return new ga({check:"size_equals",...y(t),size:e})}function Ye(e,t){return new ha({check:"max_length",...y(t),maximum:e})}function Oe(e,t){return new _a({check:"min_length",...y(t),minimum:e})}function Xe(e,t){return new va({check:"length_equals",...y(t),length:e})}function _t(e,t){return new ba({check:"string_format",format:"regex",...y(t),pattern:e})}function vt(e){return new ya({check:"string_format",format:"lowercase",...y(e)})}function bt(e){return new xa({check:"string_format",format:"uppercase",...y(e)})}function yt(e,t){return new ka({check:"string_format",format:"includes",...y(t),includes:e})}function xt(e,t){return new Sa({check:"string_format",format:"starts_with",...y(t),prefix:e})}function kt(e,t){return new $a({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Jr(e,t,r){return new Ia({check:"property",property:e,schema:t,...y(r)})}function St(e,t){return new Ea({check:"mime_type",mime:e,...y(t)})}function me(e){return new wa({check:"overwrite",tx:e})}function $t(e){return me(t=>t.normalize(e))}function It(){return me(e=>e.trim())}function Et(){return me(e=>e.toLowerCase())}function wt(){return me(e=>e.toUpperCase())}function Ot(){return me(e=>So(e))}function vc(e,t,r){return new e({type:"array",element:t,...y(r)})}function fy(e,t,r){return new e({type:"union",options:t,...y(r)})}function gy(e,t,r){return new e({type:"union",options:t,inclusive:!1,...y(r)})}function hy(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...y(o)})}function _y(e,t,r){return new e({type:"intersection",left:t,right:r})}function vy(e,t,r,o){let n=r instanceof $,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...y(i)})}function by(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...y(o)})}function yy(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...y(o)})}function xy(e,t,r){return new e({type:"set",valueType:t,...y(r)})}function ky(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...y(r)})}function Sy(e,t,r){return new e({type:"enum",entries:t,...y(r)})}function $y(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...y(r)})}function bc(e,t){return new e({type:"file",...y(t)})}function Iy(e,t){return new e({type:"transform",transform:t})}function Ey(e,t){return new e({type:"optional",innerType:t})}function wy(e,t){return new e({type:"nullable",innerType:t})}function Oy(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Io(r)}})}function Ty(e,t,r){return new e({type:"nonoptional",innerType:t,...y(r)})}function Ay(e,t){return new e({type:"success",innerType:t})}function Py(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Cy(e,t,r){return new e({type:"pipe",in:t,out:r})}function Ny(e,t){return new e({type:"readonly",innerType:t})}function Ry(e,t,r){return new e({type:"template_literal",parts:t,...y(r)})}function Dy(e,t){return new e({type:"lazy",getter:t})}function zy(e,t){return new e({type:"promise",innerType:t})}function yc(e,t,r){let o=y(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function xc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...y(r)})}function kc(e,t){let r=$p(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(lt(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(lt(i))}},e(o.value,o)),t);return r}function $p(e,t){let r=new U({check:"custom",...y(t)});return r._zod.check=e,r}function Sc(e){let t=new U({check:"describe"});return t._zod.onattach=[r=>{let o=G.get(r)??{};G.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function $c(e){let t=new U({check:"meta"});return t._zod.onattach=[r=>{let o=G.get(r)??{};G.add(r,{...o,...e})}],t._zod.check=()=>{},t}function Ic(e,t){let r=y(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),c=e.Codec??gn,u=e.Boolean??pn,l=e.String??qe,d=new l({type:"string",error:r.error}),m=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:d,out:m,transform:((h,S)=>{let R=h;return r.case!=="sensitive"&&(R=R.toLowerCase()),i.has(R)?!0:s.has(R)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:S.value,inst:g,continue:!1}),{})}),reverseTransform:((h,S)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return g}function Tt(e,t,r,o={}){let n=y(o),i={...y(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Le(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??G,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 C(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let g=s.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,d)}let m=e._zod.parent;m&&(s.ref||(s.ref=m),C(m,t,d),t.seen.get(m).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&X(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Fe(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let u=o.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,s[0])}}let n=s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,g=e.external.uri??(S=>S);if(m)return{ref:g(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${c}/${h}`}}if(s[1]===r)return{ref:"#"};let l=`#/${c}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:l}=n(s);c.def={...c.schema},l&&(c.defId=l);let d=c.schema;for(let m in d)delete d[m];d.$ref=u};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
95
+ `)}h.write("payload.value = newResult;"),h.write("return payload;");let l_=h.compile();return(_e,F)=>l_(g,_e,F)},i,s=Ge,c=!He.jitless,l=c&&ko.value,d=t.catchall,m;e._zod.parse=(g,h)=>{m??(m=o.value);let S=g.value;return s(S)?c&&l&&h?.async===!1&&h.jitless!==!0?(i||(i=n(t.shape)),g=i(g,h),d?bm([],S,g,h,m,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),g)}});function rm(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!De(i));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(i=>i.issues.map(s=>q(s,o,M())))}),t)}var pn=p("$ZodUnion",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),E(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),E(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),E(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>tn(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>rm(c,o,e,n)):rm(s,o,e,n)}});function im(e,t,r,o){let n=e.filter(i=>i.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(i=>i.issues.map(s=>q(s,o,M())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var ms=p("$ZodXor",(e,t)=>{pn.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,s=[];for(let c of t.options){let u=c._zod.run({value:o.value,issues:[]},n);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(c=>im(c,o,e,n)):im(s,o,e,n)}}),ps=p("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,pn.init(e,t);let r=e._zod.parse;E(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[c,u]of Object.entries(s)){n[c]||(n[c]=new Set);for(let l of u)n[c].add(l)}}return n});let o=st(()=>{let n=t.options,i=new Map;for(let s of n){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ge(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let c=o.value.get(s?.[t.discriminator]);return c?c._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),n)}}),fs=p("$ZodIntersection",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,l])=>om(r,u,l)):om(r,i,s)}});function wa(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(Re(e)&&Re(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=wa(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=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 o=0;o<e.length;o++){let n=e[o],i=t[o],s=wa(n,i);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function om(e,t,r){let o=new Map,n;for(let c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).l=!0}else e.issues.push(c);for(let c of r.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)o.has(u)||o.set(u,{}),o.get(u).r=!0;else e.issues.push(c);let i=[...o].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&e.issues.push({...n,keys:i}),De(e))return e;let s=wa(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 vr=p("$ZodTuple",(e,t)=>{$.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],c=am(r,"optin"),u=am(r,"optout");if(!t.rest){if(i.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}let l=new Array(r.length);for(let d=0;d<r.length;d++){let m=r[d]._zod.run({value:i[d],issues:[]},n);m instanceof Promise?s.push(m.then(g=>{l[d]=g})):l[d]=m}if(t.rest){let d=r.length-1,m=i.slice(r.length);for(let g of m){d++;let h=t.rest._zod.run({value:g,issues:[]},n);h instanceof Promise?s.push(h.then(S=>sm(S,o,d))):sm(h,o,d)}}return s.length?Promise.all(s).then(()=>cm(l,o,r,i,u)):cm(l,o,r,i,u)}});function am(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function sm(e,t,r){e.issues.length&&t.issues.push(...X(r,e.issues)),t.value[r]=e.value}function cm(e,t,r,o,n){for(let i=0;i<r.length;i++){let s=e[i],c=i<o.length;if(s.issues.length){if(!c&&i>=n){t.value.length=i;break}t.issues.push(...X(i,s.issues))}t.value[i]=s.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var gs=p("$ZodRecord",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Re(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let c=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>q(h,o,M())),input:l,path:[l],inst:e});continue}let m=d.value,g=t.valueType._zod.run({value:n[l],issues:[]},o);g instanceof Promise?i.push(g.then(h=>{h.issues.length&&r.issues.push(...X(l,h.issues)),r.value[m]=h.value})):(g.issues.length&&r.issues.push(...X(l,g.issues)),r.value[m]=g.value)}let u;for(let l in n)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{r.value={};for(let c of Reflect.ownKeys(n)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&ur.test(c)&&u.issues.length){let m=t.keyType._zod.run({value:Number(c),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?r.value[c]=n[c]:r.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>q(m,o,M())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:n[c],issues:[]},o);d instanceof Promise?i.push(d.then(m=>{m.issues.length&&r.issues.push(...X(c,m.issues)),r.value[u.value]=m.value})):(d.issues.length&&r.issues.push(...X(c,d.issues)),r.value[u.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),hs=p("$ZodMap",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,c]of n){let u=t.keyType._zod.run({value:s,issues:[]},o),l=t.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||l instanceof Promise?i.push(Promise.all([u,l]).then(([d,m])=>{um(d,m,r,s,n,e,o)})):um(u,l,r,s,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function um(e,t,r,o,n,i,s){e.issues.length&&(nn.has(typeof o)?r.issues.push(...X(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(c=>q(c,s,M()))})),t.issues.length&&(nn.has(typeof o)?r.issues.push(...X(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(c=>q(c,s,M()))})),r.value.set(e.value,t.value)}var _s=p("$ZodSet",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let c=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>lm(u,r))):lm(c,r)}return i.length?Promise.all(i).then(()=>r):r}});function lm(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var vs=p("$ZodEnum",(e,t)=>{$.init(e,t);let r=en(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>nn.has(typeof n)).map(n=>typeof n=="string"?se(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n}}),bs=p("$ZodLiteral",(e,t)=>{if($.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(o=>typeof o=="string"?se(o):o?se(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),ys=p("$ZodFile",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),xs=p("$ZodTransform",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Pe(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r.fallback=!0,r));if(n instanceof Promise)throw new le;return r.value=n,r.fallback=!0,r}});function dm(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var br=p("$ZodOptional",(e,t)=>{$.init(e,t),e._zod.optin="optional",e._zod.optout="optional",E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tn(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(s=>dm(s,n)):dm(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),ks=p("$ZodExactOptional",(e,t)=>{br.init(e,t),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Ss=p("$ZodNullable",(e,t)=>{$.init(e,t),E(e._zod,"optin",()=>t.innerType._zod.optin),E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${tn(r.source)}|null)$`):void 0}),E(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),$s=p("$ZodDefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>mm(i,t)):mm(n,t)}});function mm(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Is=p("$ZodPrefault",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Es=p("$ZodNonOptional",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>pm(i,e)):pm(n,e)}});function pm(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 ws=p("$ZodSuccess",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Pe("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Os=p("$ZodCatch",(e,t)=>{$.init(e,t),e._zod.optin="optional",E(e._zod,"optout",()=>t.innerType._zod.optout),E(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>q(s,o,M()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>q(i,o,M()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),Ts=p("$ZodNaN",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),yr=p("$ZodPipe",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>mr(s,t.in,o)):mr(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>mr(i,t.out,o)):mr(n,t.out,o)}});function mr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var fn=p("$ZodCodec",(e,t)=>{$.init(e,t),E(e._zod,"values",()=>t.in._zod.values),E(e._zod,"optin",()=>t.in._zod.optin),E(e._zod,"optout",()=>t.out._zod.optout),E(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>pr(s,t,o)):pr(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>pr(s,t,o)):pr(i,t,o)}}});function pr(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(i=>fr(e,i,t.out,r)):fr(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>fr(e,i,t.in,r)):fr(e,n,t.in,r)}}function fr(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var As=p("$ZodPreprocess",(e,t)=>{yr.init(e,t)}),Ps=p("$ZodReadonly",(e,t)=>{$.init(e,t),E(e._zod,"propValues",()=>t.innerType._zod.propValues),E(e._zod,"values",()=>t.innerType._zod.values),E(e._zod,"optin",()=>t.innerType?._zod?.optin),E(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(fm):fm(n)}});function fm(e){return e.value=Object.freeze(e.value),e}var Ns=p("$ZodTemplateLiteral",(e,t)=>{$.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s))}else if(o===null||$o.has(typeof o))r.push(se(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),Cs=p("$ZodFunction",(e,t)=>($.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(...o){let n=e._def.input?Xn(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Xn(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Qn(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Qn(e._def.output,i):i}},e._zod.parse=(r,o)=>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 o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new vr({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),Rs=p("$ZodPromise",(e,t)=>{$.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),Ds=p("$ZodLazy",(e,t)=>{$.init(e,t),E(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),E(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),E(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),E(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),E(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),zs=p("$ZodCustom",(e,t)=>{U.init(e,t),$.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>gm(i,r,o,e));gm(n,r,o,e)}});function gm(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(ct(n))}}var hn={};Se(hn,{ar:()=>xm,az:()=>km,be:()=>$m,bg:()=>Im,ca:()=>Em,cs:()=>wm,da:()=>Om,de:()=>Tm,el:()=>Am,en:()=>xr,eo:()=>Pm,es:()=>Nm,fa:()=>Cm,fi:()=>Rm,fr:()=>Dm,frCA:()=>zm,he:()=>Um,hr:()=>jm,hu:()=>Lm,hy:()=>Mm,id:()=>Zm,is:()=>Vm,it:()=>Bm,ja:()=>Hm,ka:()=>Gm,kh:()=>Km,km:()=>kr,ko:()=>Wm,lt:()=>Jm,mk:()=>Ym,ms:()=>Xm,nl:()=>Qm,no:()=>ep,ota:()=>tp,pl:()=>rp,ps:()=>np,pt:()=>ip,ro:()=>op,ru:()=>sp,sl:()=>cp,sv:()=>up,ta:()=>lp,th:()=>dp,tr:()=>mp,ua:()=>pp,uk:()=>Sr,ur:()=>fp,uz:()=>gp,vi:()=>hp,yo:()=>bp,zhCN:()=>_p,zhTW:()=>vp});var sb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}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 ${_(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: ${f(n.values,"|")}`;case"too_big":{let i=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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=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 ${i} ${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 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`${r[i.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":""}: ${f(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 xm(){return{localeError:sb()}}var cb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${_(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.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":""}: ${f(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 km(){return{localeError:cb()}}function Sm(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var ub=()=>{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"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Sm(c,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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Sm(c,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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.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"}: ${f(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 $m(){return{localeError:ub()}}var lb=()=>{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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.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 "${i.prefix}"`;if(i.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 "${i.suffix}"`;if(i.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 "${i.includes}"`;if(i.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 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${r[i.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":""}: ${f(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 Im(){return{localeError:lb()}}var db=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${_(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${f(n.values," o ")}`;case"too_big":{let i=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 ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.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":""}: ${f(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 Em(){return{localeError:db()}}var mb=()=>{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"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${_(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.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: ${f(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 wm(){return{localeError:mb()}}var pb=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 Om(){return{localeError:pb()}}var fb=()=>{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"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.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"}: ${f(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 Tm(){return{localeError:fb()}}var gb=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 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:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${_(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${f(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Am(){return{localeError:gb()}}var hb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`Invalid option: expected one of ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function xr(){return{localeError:hb()}}var _b=()=>{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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.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":""}: ${f(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 Pm(){return{localeError:_b()}}var vb=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${n.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.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":""}: ${f(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function Nm(){return{localeError:vb()}}var bb=()=>{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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \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 ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \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 ${_(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 ${f(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.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: ${f(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 Cm(){return{localeError:bb()}}var yb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.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"}: ${f(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 Rm(){return{localeError:yb()}}var xb=()=>{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"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${_(n.values[0])} attendu`:`Option invalide : une valeur parmi ${f(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${o[n.origin]??"valeur"} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.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":""} : ${f(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 Dm(){return{localeError:xb()}}var kb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${_(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.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":""} : ${f(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 zm(){return{localeError:kb()}}var Sb=()=>{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=l=>l?e[l]:void 0,o=l=>{let d=r(l);return d?d.label:l??e.unknown.label},n=l=>`\u05D4${o(l)}`,i=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=l=>l?t[l]??null:null,c={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 l=>{switch(l.code){case"invalid_type":{let d=l.expected,m=u[d??""]??o(d),g=v(l.input),h=u[g]??e[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(l.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 ${_(l.values[0])}`;let d=l.values.map(h=>_(h));if(l.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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let m=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let S=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",C=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`.trim()}let g=l.inclusive?"<=":"<",h=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.maximum.toString()}`}case"too_small":{let d=s(l.origin),m=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let S=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(l.origin==="array"||l.origin==="set"){let S=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let P=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${P}`}let C=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${C}`.trim()}let g=l.inclusive?">=":">",h=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${g}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let m=c[d.format],g=m?.label??d.format,S=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${S}`}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 ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${f(l.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(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Um(){return{localeError:Sb()}}var $b=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email 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:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${_(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${n.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=o[n.origin]??n.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${n.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${f(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function jm(){return{localeError:$b()}}var Ib=()=>{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"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${_(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.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":""}: ${f(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 Lm(){return{localeError:Ib()}}function Fm(e,t,r){return Math.abs(e)===1?t:r}function ft(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 Eb=()=>{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"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=Fm(c,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 ${ft(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${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 ${ft(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=Fm(c,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 ${ft(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${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 ${ft(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.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 ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.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":""}. ${f(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ft(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 ${ft(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Mm(){return{localeError:Eb()}}var wb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${_(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.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":""}: ${f(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 Zm(){return{localeError:wb()}}var Ob=()=>{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"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${_(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.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"}: ${f(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 Vm(){return{localeError:Ob()}}var Tb=()=>{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"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${_(n.values[0])}`:`Opzione non valida: atteso uno tra ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.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"}: ${f(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 Bm(){return{localeError:Tb()}}var Ab=()=>{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"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${_(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${f(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=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"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=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}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.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":""}: ${f(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 Hm(){return{localeError:Ab()}}var Pb=()=>{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 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}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 ${_(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 ${f(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\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 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.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"}: ${f(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 Gm(){return{localeError:Pb()}}var Nb=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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"} ${i} ${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"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=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} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.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 ${f(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 kr(){return{localeError:Nb()}}function Km(){return kr()}var Cb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${_(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${f(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(n.origin),u=c?.unit??"\uC694\uC18C";return c?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${u} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.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: ${f(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 Wm(){return{localeError:Cb()}}var gn=e=>e.charAt(0).toUpperCase()+e.slice(1);function qm(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var Rb=()=>{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,i,s,c){let u=e[n]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[c][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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${_(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${f(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,s=t(n.origin,qm(Number(n.maximum)),n.inclusive??!1,"smaller");if(s?.verb)return`${gn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.maximum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${gn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.maximum.toString()} ${s?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,s=t(n.origin,qm(Number(n.minimum)),n.inclusive??!1,"bigger");if(s?.verb)return`${gn(i??n.origin??"reik\u0161m\u0117")} ${s.verb} ${n.minimum.toString()} ${s.unit??"element\u0173"}`;let c=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${gn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${n.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.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"}: ${f(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${gn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Jm(){return{localeError:Rb()}}var Db=()=>{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"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`Invalid ${r[i.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"}: ${f(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 Ym(){return{localeError:Db()}}var zb=()=>{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"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${_(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${f(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 Xm(){return{localeError:zb()}}var Ub=()=>{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"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${_(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin),c=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin),c=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.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":""}: ${f(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 Qm(){return{localeError:Ub()}}var jb=()=>{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"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${_(n.values[0])}`:`Ugyldig valg: forventet en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.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"}: ${f(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 ep(){return{localeError:jb()}}var Lb=()=>{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"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${_(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.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":""}: ${f(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 tp(){return{localeError:Lb()}}var Fb=()=>{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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \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 ${_(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${f(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=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 ${i}${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 ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.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"}: ${f(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 np(){return{localeError:Fb()}}var Mb=()=>{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"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${_(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${f(n.values,"|")}`;case"too_big":{let i=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 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=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 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.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":""}: ${f(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 rp(){return{localeError:Mb()}}var Zb=()=>{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"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${c}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${_(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.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":""}: ${f(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 ip(){return{localeError:Zb()}}var Vb=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de 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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${_(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Prea mic: a\u0219teptat ca ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${f(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function op(){return{localeError:Vb()}}function ap(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var Bb=()=>{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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let c=Number(n.maximum),u=ap(c,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 ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let c=Number(n.minimum),u=ap(c,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 ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.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":""}: ${f(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 sp(){return{localeError:Bb()}}var Hb=()=>{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"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.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"}: ${f(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 cp(){return{localeError:Hb()}}var Gb=()=>{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"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.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"}: ${f(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 up(){return{localeError:Gb()}}var Kb=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}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 ${_(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 ${f(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=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"} ${i}${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"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=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} ${i}${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} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.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[i.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":""}: ${f(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 lp(){return{localeError:Kb()}}var Wb=()=>{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"},o={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 i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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${i} ${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${i} ${n.maximum.toString()}`}case"too_small":{let i=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${i} ${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${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.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 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.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: ${f(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 dp(){return{localeError:Wb()}}var qb=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.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":""}: ${f(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 mp(){return{localeError:qb()}}var Jb=()=>{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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\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 ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}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 ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=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} ${i}${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 ${i}${n.maximum.toString()}`}case"too_small":{let i=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} ${i}${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 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.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 "${i.suffix}"`:i.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 "${i.includes}"`:i.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 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.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":""}: ${f(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 Sr(){return{localeError:Jb()}}function pp(){return Sr()}var Yb=()=>{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"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${_(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${f(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${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 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${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 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.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":""}: ${f(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 fp(){return{localeError:Yb()}}var Xb=()=>{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"},map:{unit:"yozuv",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"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.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":""}: ${f(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 gp(){return{localeError:Xb()}}var Qb=()=>{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"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${_(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 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.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: ${f(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 hp(){return{localeError:Qb()}}var ey=()=>{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"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[s]??s;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${_(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.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): ${f(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 _p(){return{localeError:ey()}}var ty=()=>{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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${_(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${f(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.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${f(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 vp(){return{localeError:ty()}}var ny=()=>{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"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,s=v(n.input),c=o[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 ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${_(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${f(n.values,"|")}`;case"too_big":{let i=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} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=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} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.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: ${f(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 bp(){return{localeError:ny()}}var yp,Us=Symbol("ZodOutput"),js=Symbol("ZodInput"),$r=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.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 o={...this.get(r)??{}};delete o.id;let n={...o,...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 Ir(){return new $r}(yp=globalThis).__zod_globalRegistry??(yp.__zod_globalRegistry=Ir());var H=globalThis.__zod_globalRegistry;function Ls(e,t){return new e({type:"string",...y(t)})}function Fs(e,t){return new e({type:"string",coerce:!0,...y(t)})}function Er(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(t)})}function _n(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(t)})}function wr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(t)})}function Or(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(t)})}function Tr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(t)})}function Ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(t)})}function vn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(t)})}function Pr(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(t)})}function Nr(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(t)})}function Cr(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(t)})}function Rr(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(t)})}function Dr(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(t)})}function zr(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(t)})}function Ur(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(t)})}function jr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(t)})}function Lr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(t)})}function Ms(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...y(t)})}function Fr(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(t)})}function Mr(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(t)})}function Zr(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(t)})}function Vr(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(t)})}function Br(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(t)})}function Hr(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(t)})}var Zs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Vs(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(t)})}function Bs(e,t){return new e({type:"string",format:"date",check:"string_format",...y(t)})}function Hs(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(t)})}function Gs(e,t){return new e({type:"string",format:"duration",check:"string_format",...y(t)})}function Ks(e,t){return new e({type:"number",checks:[],...y(t)})}function Ws(e,t){return new e({type:"number",coerce:!0,checks:[],...y(t)})}function qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(t)})}function Js(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...y(t)})}function Ys(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...y(t)})}function Xs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...y(t)})}function Qs(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...y(t)})}function ec(e,t){return new e({type:"boolean",...y(t)})}function tc(e,t){return new e({type:"boolean",coerce:!0,...y(t)})}function nc(e,t){return new e({type:"bigint",...y(t)})}function rc(e,t){return new e({type:"bigint",coerce:!0,...y(t)})}function ic(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(t)})}function oc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(t)})}function ac(e,t){return new e({type:"symbol",...y(t)})}function sc(e,t){return new e({type:"undefined",...y(t)})}function cc(e,t){return new e({type:"null",...y(t)})}function uc(e){return new e({type:"any"})}function lc(e){return new e({type:"unknown"})}function dc(e,t){return new e({type:"never",...y(t)})}function mc(e,t){return new e({type:"void",...y(t)})}function pc(e,t){return new e({type:"date",...y(t)})}function fc(e,t){return new e({type:"date",coerce:!0,...y(t)})}function gc(e,t){return new e({type:"nan",...y(t)})}function ve(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!1})}function re(e,t){return new lr({check:"less_than",...y(t),value:e,inclusive:!0})}function be(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!1})}function J(e,t){return new dr({check:"greater_than",...y(t),value:e,inclusive:!0})}function Gr(e){return be(0,e)}function Kr(e){return ve(0,e)}function Wr(e){return re(0,e)}function qr(e){return J(0,e)}function ze(e,t){return new ca({check:"multiple_of",...y(t),value:e})}function Ue(e,t){return new da({check:"max_size",...y(t),maximum:e})}function ye(e,t){return new ma({check:"min_size",...y(t),minimum:e})}function qe(e,t){return new pa({check:"size_equals",...y(t),size:e})}function Je(e,t){return new fa({check:"max_length",...y(t),maximum:e})}function we(e,t){return new ga({check:"min_length",...y(t),minimum:e})}function Ye(e,t){return new ha({check:"length_equals",...y(t),length:e})}function gt(e,t){return new _a({check:"string_format",format:"regex",...y(t),pattern:e})}function ht(e){return new va({check:"string_format",format:"lowercase",...y(e)})}function _t(e){return new ba({check:"string_format",format:"uppercase",...y(e)})}function vt(e,t){return new ya({check:"string_format",format:"includes",...y(t),includes:e})}function bt(e,t){return new xa({check:"string_format",format:"starts_with",...y(t),prefix:e})}function yt(e,t){return new ka({check:"string_format",format:"ends_with",...y(t),suffix:e})}function Jr(e,t,r){return new Sa({check:"property",property:e,schema:t,...y(r)})}function xt(e,t){return new $a({check:"mime_type",mime:e,...y(t)})}function de(e){return new Ia({check:"overwrite",tx:e})}function kt(e){return de(t=>t.normalize(e))}function St(){return de(e=>e.trim())}function $t(){return de(e=>e.toLowerCase())}function It(){return de(e=>e.toUpperCase())}function Et(){return de(e=>xo(e))}function hc(e,t,r){return new e({type:"array",element:t,...y(r)})}function iy(e,t,r){return new e({type:"union",options:t,...y(r)})}function oy(e,t,r){return new e({type:"union",options:t,inclusive:!1,...y(r)})}function ay(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...y(o)})}function sy(e,t,r){return new e({type:"intersection",left:t,right:r})}function cy(e,t,r,o){let n=r instanceof $,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...y(i)})}function uy(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...y(o)})}function ly(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...y(o)})}function dy(e,t,r){return new e({type:"set",valueType:t,...y(r)})}function my(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...y(r)})}function py(e,t,r){return new e({type:"enum",entries:t,...y(r)})}function fy(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...y(r)})}function _c(e,t){return new e({type:"file",...y(t)})}function gy(e,t){return new e({type:"transform",transform:t})}function hy(e,t){return new e({type:"optional",innerType:t})}function _y(e,t){return new e({type:"nullable",innerType:t})}function vy(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():So(r)}})}function by(e,t,r){return new e({type:"nonoptional",innerType:t,...y(r)})}function yy(e,t){return new e({type:"success",innerType:t})}function xy(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function ky(e,t,r){return new e({type:"pipe",in:t,out:r})}function Sy(e,t){return new e({type:"readonly",innerType:t})}function $y(e,t,r){return new e({type:"template_literal",parts:t,...y(r)})}function Iy(e,t){return new e({type:"lazy",getter:t})}function Ey(e,t){return new e({type:"promise",innerType:t})}function vc(e,t,r){let o=y(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function bc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...y(r)})}function yc(e,t){let r=xp(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(ct(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(ct(i))}},e(o.value,o)),t);return r}function xp(e,t){let r=new U({check:"custom",...y(t)});return r._zod.check=e,r}function xc(e){let t=new U({check:"describe"});return t._zod.onattach=[r=>{let o=H.get(r)??{};H.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function kc(e){let t=new U({check:"meta"});return t._zod.onattach=[r=>{let o=H.get(r)??{};H.add(r,{...o,...e})}],t._zod.check=()=>{},t}function Sc(e,t){let r=y(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),c=e.Codec??fn,u=e.Boolean??mn,l=e.String??We,d=new l({type:"string",error:r.error}),m=new u({type:"boolean",error:r.error}),g=new c({type:"pipe",in:d,out:m,transform:((h,S)=>{let C=h;return r.case!=="sensitive"&&(C=C.toLowerCase()),i.has(C)?!0:s.has(C)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:S.value,inst:g,continue:!1}),{})}),reverseTransform:((h,S)=>h===!0?o[0]||"true":n[0]||"false"),error:r.error});return g}function wt(e,t,r,o={}){let n=y(o),i={...y(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:c=>r.test(c),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function je(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??H,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 N(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,d);else{let g=s.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,g,d)}let m=e._zod.parent;m&&(s.ref||(s.ref=m),N(m,t,d),t.seen.get(m).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&Y(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Le(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let u=o.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,s[0])}}let n=s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,g=e.external.uri??(S=>S);if(m)return{ref:g(m)};let h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${g("__shared")}#/${c}/${h}`}}if(s[1]===r)return{ref:"#"};let l=`#/${c}/`,d=s[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:l}=n(s);c.def={...c.schema},l&&(c.defId=l);let d=c.schema;for(let m in d)delete d[m];d.$ref=u};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
96
96
 
97
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function Me(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,d={...l},m=u.ref;if(u.ref=null,m){o(m);let h=e.seen.get(m),S=h.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(S)):Object.assign(l,S),Object.assign(l,d),c._zod.parent===m)for(let P in l)P==="$ref"||P==="allOf"||P in d||delete l[P];if(S.$ref&&h.def)for(let P in l)P==="$ref"||P==="allOf"||P in h.def&&JSON.stringify(l[P])===JSON.stringify(h.def[P])&&delete l[P]}let g=c._zod.parent;if(g&&g!==m){o(g);let h=e.seen.get(g);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let S in l)S==="$ref"||S==="allOf"||S in h.def&&JSON.stringify(l[S])===JSON.stringify(h.def[S])&&delete l[S]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())o(c[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 c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let s=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?n.$defs=s:n.definitions=s);try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:At(t,"input",e.processors),output:At(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function X(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return X(o.element,r);if(o.type==="set")return X(o.valueType,r);if(o.type==="lazy")return X(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return X(o.innerType,r);if(o.type==="intersection")return X(o.left,r)||X(o.right,r);if(o.type==="record"||o.type==="map")return X(o.keyType,r)||X(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:X(o.in,r)||X(o.out,r);if(o.type==="object"){for(let n in o.shape)if(X(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(X(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(X(n,r))return!0;return!!(o.rest&&X(o.rest,r))}return!1}var Ec=(e,t={})=>r=>{let o=Le({...r,processors:t});return C(e,o),Fe(o,e),Me(o,e)},At=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=Le({...n??{},target:i,io:t,processors:r});return C(e,s),Fe(s,e),Me(s,e)};var Uy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wc=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),c&&(n.format=Uy[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),l&&(n.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Oc=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number";let m=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";m?h?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d:typeof i=="number"&&(n.minimum=i),g?h?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof s=="number"&&(n.maximum=s),typeof u=="number"&&(n.multipleOf=u)},Tc=(e,t,r,o)=>{r.type="boolean"},Ac=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Pc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Cc=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Nc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Rc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Dc=(e,t,r,o)=>{r.not={}},zc=(e,t,r,o)=>{},Uc=(e,t,r,o)=>{},jc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Lc=(e,t,r,o)=>{let n=e._zod.def,i=tn(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},Fc=(e,t,r,o)=>{let n=e._zod.def,i=[];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");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},Mc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Zc=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},Vc=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=e._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Bc=(e,t,r,o)=>{r.type="boolean"},Hc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Gc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Kc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Wc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},qc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Jc=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=C(i.element,t,{...o,path:[...o.path,"items"]})},Yc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let s=i.shape;for(let l in s)n.properties[l]=C(s[l],t,{...o,path:[...o.path,"properties",l]});let c=new Set(Object.keys(s)),u=new Set([...c].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=C(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Xr=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((c,u)=>C(c,t,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=s:r.anyOf=s},Xc=(e,t,r,o)=>{let n=e._zod.def,i=C(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=C(n.right,t,{...o,path:[...o.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];r.allOf=u},Qc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>C(g,t,{...o,path:[...o.path,s,h]})),l=i.rest?C(i.rest,t,{...o,path:[...o.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:u},l&&n.items.anyOf.push(l),n.minItems=u.length,l||(n.maxItems=u.length)):(n.items=u,l&&(n.additionalItems=l));let{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof m=="number"&&(n.maxItems=m)},eu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let d=C(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let m of u)n.patternProperties[m.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=C(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=C(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(n.required=d)}},tu=(e,t,r,o)=>{let n=e._zod.def,i=C(n.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},nu=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},ru=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},iu=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},ou=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.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},au=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?n.out:n.in:n.out;C(s,t,o);let c=t.seen.get(e);c.ref=s},su=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},cu=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Qr=(e,t,r,o)=>{let n=e._zod.def;C(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},uu=(e,t,r,o)=>{let n=e._zod.innerType;C(n,t,o);let i=t.seen.get(e);i.ref=n},Yr={string:wc,number:Oc,boolean:Tc,bigint:Ac,symbol:Pc,null:Cc,undefined:Nc,void:Rc,never:Dc,any:zc,unknown:Uc,date:jc,enum:Lc,literal:Fc,nan:Mc,template_literal:Zc,file:Vc,success:Bc,custom:Hc,function:Gc,transform:Kc,map:Wc,set:qc,array:Jc,object:Yc,union:Xr,intersection:Xc,tuple:Qc,record:eu,nullable:tu,nonoptional:nu,default:ru,prefault:iu,catch:ou,pipe:au,readonly:su,promise:cu,optional:Qr,lazy:uu};function ei(e,t){if("_idmap"in e){let o=e,n=Le({...t,processors:Yr}),i={};for(let u of o._idmap.entries()){let[l,d]=u;C(d,n)}let s={},c={registry:o,uri:t?.uri,defs:i};n.external=c;for(let u of o._idmap.entries()){let[l,d]=u;Fe(n,d),s[l]=Me(n,d)}if(Object.keys(i).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:i}}return{schemas:s}}let r=Le({...t,processors:Yr});return C(e,r),Fe(r,e),Me(r,e)}var ti=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=Le({processors:Yr,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 C(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)),Fe(this.ctx,t);let o=Me(this.ctx,t),{"~standard":n,...i}=o;return i}};var Ip={};var yn={};Ie(yn,{ZodAny:()=>Nu,ZodArray:()=>Uu,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>jt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Ut,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>ol,ZodCodec:()=>Cn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Dt,ZodDate:()=>wn,ZodDefault:()=>Qu,ZodDiscriminatedUnion:()=>Lu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Nt,ZodExactOptional:()=>Ju,ZodFile:()=>Wu,ZodFunction:()=>gl,ZodGUID:()=>kn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodIntersection:()=>Fu,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ml,ZodLiteral:()=>Ku,ZodMAC:()=>Eu,ZodMap:()=>Hu,ZodNaN:()=>sl,ZodNanoID:()=>mi,ZodNever:()=>Du,ZodNonOptional:()=>Ci,ZodNull:()=>Pu,ZodNullable:()=>Xu,ZodNumber:()=>zt,ZodNumberFormat:()=>et,ZodObject:()=>Tn,ZodOptional:()=>Pi,ZodPipe:()=>Pn,ZodPrefault:()=>tl,ZodPreprocess:()=>cl,ZodPromise:()=>fl,ZodReadonly:()=>ul,ZodRecord:()=>Ct,ZodSet:()=>Gu,ZodString:()=>Rt,ZodStringFormat:()=>z,ZodSuccess:()=>il,ZodSymbol:()=>Tu,ZodTemplateLiteral:()=>dl,ZodTransform:()=>qu,ZodTuple:()=>Zu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>En,ZodUUID:()=>Se,ZodUndefined:()=>Au,ZodUnion:()=>An,ZodUnknown:()=>Ru,ZodVoid:()=>zu,ZodXID:()=>hi,ZodXor:()=>ju,_ZodString:()=>ui,_default:()=>el,_function:()=>Df,any:()=>mf,array:()=>On,base64:()=>Wp,base64url:()=>qp,bigint:()=>sf,boolean:()=>Ou,catch:()=>al,check:()=>zf,cidrv4:()=>Gp,cidrv6:()=>Kp,codec:()=>Pf,cuid:()=>jp,cuid2:()=>Lp,custom:()=>Uf,date:()=>ff,describe:()=>jf,discriminatedUnion:()=>yf,e164:()=>Jp,email:()=>Op,emoji:()=>zp,enum:()=>Ti,exactOptional:()=>Yu,file:()=>wf,float32:()=>nf,float64:()=>rf,function:()=>Df,guid:()=>Tp,hash:()=>tf,hex:()=>ef,hostname:()=>Qp,httpUrl:()=>Dp,instanceof:()=>Ff,int:()=>si,int32:()=>of,int64:()=>cf,intersection:()=>Mu,invertCodec:()=>Cf,ipv4:()=>Vp,ipv6:()=>Hp,json:()=>Zf,jwt:()=>Yp,keyof:()=>gf,ksuid:()=>Zp,lazy:()=>pl,literal:()=>Ef,looseObject:()=>vf,looseRecord:()=>kf,mac:()=>Bp,map:()=>Sf,meta:()=>Lf,nan:()=>Af,nanoid:()=>Up,nativeEnum:()=>If,never:()=>wi,nonoptional:()=>rl,null:()=>Cu,nullable:()=>$n,nullish:()=>Of,number:()=>wu,object:()=>hf,optional:()=>Sn,partialRecord:()=>xf,pipe:()=>ci,prefault:()=>nl,preprocess:()=>Vf,promise:()=>Rf,readonly:()=>ll,record:()=>Bu,refine:()=>hl,set:()=>$f,strictObject:()=>_f,string:()=>xn,stringFormat:()=>Xp,stringbool:()=>Mf,success:()=>Tf,superRefine:()=>_l,symbol:()=>lf,templateLiteral:()=>Nf,transform:()=>Ai,tuple:()=>Vu,uint32:()=>af,uint64:()=>uf,ulid:()=>Fp,undefined:()=>df,union:()=>Oi,unknown:()=>Qe,url:()=>Rp,uuid:()=>Ap,uuidv4:()=>Pp,uuidv6:()=>Cp,uuidv7:()=>Np,void:()=>pf,xid:()=>Mp,xor:()=>bf});var ni={};Ie(ni,{endsWith:()=>kt,gt:()=>xe,gte:()=>Y,includes:()=>yt,length:()=>Xe,lowercase:()=>vt,lt:()=>ye,lte:()=>oe,maxLength:()=>Ye,maxSize:()=>je,mime:()=>St,minLength:()=>Oe,minSize:()=>ke,multipleOf:()=>Ue,negative:()=>Kr,nonnegative:()=>qr,nonpositive:()=>Wr,normalize:()=>$t,overwrite:()=>me,positive:()=>Gr,property:()=>Jr,regex:()=>_t,size:()=>Je,slugify:()=>Ot,startsWith:()=>xt,toLowerCase:()=>Et,toUpperCase:()=>wt,trim:()=>It,uppercase:()=>bt});var Pt={};Ie(Pt,{ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,date:()=>du,datetime:()=>lu,duration:()=>pu,time:()=>mu});var ri=p("ZodISODateTime",(e,t)=>{Ma.init(e,t),z.init(e,t)});function lu(e){return Hs(ri,e)}var ii=p("ZodISODate",(e,t)=>{Za.init(e,t),z.init(e,t)});function du(e){return Gs(ii,e)}var oi=p("ZodISOTime",(e,t)=>{Va.init(e,t),z.init(e,t)});function mu(e){return Ks(oi,e)}var ai=p("ZodISODuration",(e,t)=>{Ba.init(e,t),z.init(e,t)});function pu(e){return Ws(ai,e)}var Ep=(e,t)=>{sn.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>un(e,r)},flatten:{value:r=>cn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ct,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ct,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ly=p("ZodError",Ep),te=p("ZodError",Ep,{Parent:Error});var fu=dt(te),gu=mt(te),hu=pt(te),_u=ft(te),vu=er(te),bu=tr(te),yu=nr(te),xu=rr(te),ku=ir(te),Su=or(te),$u=ar(te),Iu=sr(te);var wp=new WeakMap;function In(e,t,r){let o=Object.getPrototypeOf(e),n=wp.get(o);if(n||(n=new Set,wp.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var I=p("ZodType",(e,t)=>($.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:At(e,"input"),output:At(e,"output")}}),e.toJSONSchema=Ec(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>fu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>hu(e,r,o),e.parseAsync=async(r,o)=>gu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>_u(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>vu(e,r,o),e.decode=(r,o)=>bu(e,r,o),e.encodeAsync=async(r,o)=>yu(e,r,o),e.decodeAsync=async(r,o)=>xu(e,r,o),e.safeEncode=(r,o)=>ku(e,r,o),e.safeDecode=(r,o)=>Su(e,r,o),e.safeEncodeAsync=async(r,o)=>$u(e,r,o),e.safeDecodeAsync=async(r,o)=>Iu(e,r,o),In(e,"ZodType",{check(...r){let o=this.def;return this.clone(b.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return q(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(hl(r,o))},superRefine(r,o){return this.check(_l(r,o))},overwrite(r){return this.check(me(r))},optional(){return Sn(this)},exactOptional(){return Yu(this)},nullable(){return $n(this)},nullish(){return Sn($n(this))},nonoptional(r){return rl(this,r)},array(){return On(this)},or(r){return Oi([this,r])},and(r){return Mu(this,r)},transform(r){return ci(this,Ai(r))},default(r){return el(this,r)},prefault(r){return nl(this,r)},catch(r){return al(this,r)},pipe(r){return ci(this,r)},readonly(){return ll(this)},describe(r){let o=this.clone();return G.add(o,{description:r}),o},meta(...r){if(r.length===0)return G.get(this);let o=this.clone();return G.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return G.get(e)?.description},configurable:!0}),e)),ui=p("_ZodString",(e,t)=>{qe.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>wc(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,In(e,"_ZodString",{regex(...o){return this.check(_t(...o))},includes(...o){return this.check(yt(...o))},startsWith(...o){return this.check(xt(...o))},endsWith(...o){return this.check(kt(...o))},min(...o){return this.check(Oe(...o))},max(...o){return this.check(Ye(...o))},length(...o){return this.check(Xe(...o))},nonempty(...o){return this.check(Oe(1,...o))},lowercase(o){return this.check(vt(o))},uppercase(o){return this.check(bt(o))},trim(){return this.check(It())},normalize(...o){return this.check($t(...o))},toLowerCase(){return this.check(Et())},toUpperCase(){return this.check(wt())},slugify(){return this.check(Ot())}})}),Rt=p("ZodString",(e,t)=>{qe.init(e,t),ui.init(e,t),e.email=r=>e.check(Er(li,r)),e.url=r=>e.check(bn(En,r)),e.jwt=r=>e.check(Hr(Ii,r)),e.emoji=r=>e.check(Pr(di,r)),e.guid=r=>e.check(vn(kn,r)),e.uuid=r=>e.check(wr(Se,r)),e.uuidv4=r=>e.check(Or(Se,r)),e.uuidv6=r=>e.check(Tr(Se,r)),e.uuidv7=r=>e.check(Ar(Se,r)),e.nanoid=r=>e.check(Cr(mi,r)),e.guid=r=>e.check(vn(kn,r)),e.cuid=r=>e.check(Nr(pi,r)),e.cuid2=r=>e.check(Rr(fi,r)),e.ulid=r=>e.check(Dr(gi,r)),e.base64=r=>e.check(Zr(ki,r)),e.base64url=r=>e.check(Vr(Si,r)),e.xid=r=>e.check(zr(hi,r)),e.ksuid=r=>e.check(Ur(_i,r)),e.ipv4=r=>e.check(jr(vi,r)),e.ipv6=r=>e.check(Lr(bi,r)),e.cidrv4=r=>e.check(Fr(yi,r)),e.cidrv6=r=>e.check(Mr(xi,r)),e.e164=r=>e.check(Br($i,r)),e.datetime=r=>e.check(lu(r)),e.date=r=>e.check(du(r)),e.time=r=>e.check(mu(r)),e.duration=r=>e.check(pu(r))});function xn(e){return Ms(Rt,e)}var z=p("ZodStringFormat",(e,t)=>{D.init(e,t),ui.init(e,t)}),li=p("ZodEmail",(e,t)=>{Ca.init(e,t),z.init(e,t)});function Op(e){return Er(li,e)}var kn=p("ZodGUID",(e,t)=>{Aa.init(e,t),z.init(e,t)});function Tp(e){return vn(kn,e)}var Se=p("ZodUUID",(e,t)=>{Pa.init(e,t),z.init(e,t)});function Ap(e){return wr(Se,e)}function Pp(e){return Or(Se,e)}function Cp(e){return Tr(Se,e)}function Np(e){return Ar(Se,e)}var En=p("ZodURL",(e,t)=>{Na.init(e,t),z.init(e,t)});function Rp(e){return bn(En,e)}function Dp(e){return bn(En,{protocol:ie.httpProtocol,hostname:ie.domain,...b.normalizeParams(e)})}var di=p("ZodEmoji",(e,t)=>{Ra.init(e,t),z.init(e,t)});function zp(e){return Pr(di,e)}var mi=p("ZodNanoID",(e,t)=>{Da.init(e,t),z.init(e,t)});function Up(e){return Cr(mi,e)}var pi=p("ZodCUID",(e,t)=>{za.init(e,t),z.init(e,t)});function jp(e){return Nr(pi,e)}var fi=p("ZodCUID2",(e,t)=>{Ua.init(e,t),z.init(e,t)});function Lp(e){return Rr(fi,e)}var gi=p("ZodULID",(e,t)=>{ja.init(e,t),z.init(e,t)});function Fp(e){return Dr(gi,e)}var hi=p("ZodXID",(e,t)=>{La.init(e,t),z.init(e,t)});function Mp(e){return zr(hi,e)}var _i=p("ZodKSUID",(e,t)=>{Fa.init(e,t),z.init(e,t)});function Zp(e){return Ur(_i,e)}var vi=p("ZodIPv4",(e,t)=>{Ha.init(e,t),z.init(e,t)});function Vp(e){return jr(vi,e)}var Eu=p("ZodMAC",(e,t)=>{Ka.init(e,t),z.init(e,t)});function Bp(e){return Vs(Eu,e)}var bi=p("ZodIPv6",(e,t)=>{Ga.init(e,t),z.init(e,t)});function Hp(e){return Lr(bi,e)}var yi=p("ZodCIDRv4",(e,t)=>{Wa.init(e,t),z.init(e,t)});function Gp(e){return Fr(yi,e)}var xi=p("ZodCIDRv6",(e,t)=>{qa.init(e,t),z.init(e,t)});function Kp(e){return Mr(xi,e)}var ki=p("ZodBase64",(e,t)=>{Ya.init(e,t),z.init(e,t)});function Wp(e){return Zr(ki,e)}var Si=p("ZodBase64URL",(e,t)=>{Xa.init(e,t),z.init(e,t)});function qp(e){return Vr(Si,e)}var $i=p("ZodE164",(e,t)=>{Qa.init(e,t),z.init(e,t)});function Jp(e){return Br($i,e)}var Ii=p("ZodJWT",(e,t)=>{es.init(e,t),z.init(e,t)});function Yp(e){return Hr(Ii,e)}var Dt=p("ZodCustomStringFormat",(e,t)=>{ts.init(e,t),z.init(e,t)});function Xp(e,t,r={}){return Tt(Dt,e,t,r)}function Qp(e){return Tt(Dt,"hostname",ie.hostname,e)}function ef(e){return Tt(Dt,"hex",ie.hex,e)}function tf(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=ie[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Tt(Dt,o,n,t)}var zt=p("ZodNumber",(e,t)=>{hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Oc(e,o,n,i),In(e,"ZodNumber",{gt(o,n){return this.check(xe(o,n))},gte(o,n){return this.check(Y(o,n))},min(o,n){return this.check(Y(o,n))},lt(o,n){return this.check(ye(o,n))},lte(o,n){return this.check(oe(o,n))},max(o,n){return this.check(oe(o,n))},int(o){return this.check(si(o))},safe(o){return this.check(si(o))},positive(o){return this.check(xe(0,o))},nonnegative(o){return this.check(Y(0,o))},negative(o){return this.check(ye(0,o))},nonpositive(o){return this.check(oe(0,o))},multipleOf(o,n){return this.check(Ue(o,n))},step(o,n){return this.check(Ue(o,n))},finite(){return this}});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 wu(e){return qs(zt,e)}var et=p("ZodNumberFormat",(e,t)=>{ns.init(e,t),zt.init(e,t)});function si(e){return Ys(et,e)}function nf(e){return Xs(et,e)}function rf(e){return Qs(et,e)}function of(e){return ec(et,e)}function af(e){return tc(et,e)}var Ut=p("ZodBoolean",(e,t)=>{pn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tc(e,r,o,n)});function Ou(e){return nc(Ut,e)}var jt=p("ZodBigInt",(e,t)=>{_r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Ac(e,o,n,i),e.gte=(o,n)=>e.check(Y(o,n)),e.min=(o,n)=>e.check(Y(o,n)),e.gt=(o,n)=>e.check(xe(o,n)),e.gte=(o,n)=>e.check(Y(o,n)),e.min=(o,n)=>e.check(Y(o,n)),e.lt=(o,n)=>e.check(ye(o,n)),e.lte=(o,n)=>e.check(oe(o,n)),e.max=(o,n)=>e.check(oe(o,n)),e.positive=o=>e.check(xe(BigInt(0),o)),e.negative=o=>e.check(ye(BigInt(0),o)),e.nonpositive=o=>e.check(oe(BigInt(0),o)),e.nonnegative=o=>e.check(Y(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Ue(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function sf(e){return ic(jt,e)}var Ei=p("ZodBigIntFormat",(e,t)=>{rs.init(e,t),jt.init(e,t)});function cf(e){return ac(Ei,e)}function uf(e){return sc(Ei,e)}var Tu=p("ZodSymbol",(e,t)=>{is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pc(e,r,o,n)});function lf(e){return cc(Tu,e)}var Au=p("ZodUndefined",(e,t)=>{os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nc(e,r,o,n)});function df(e){return uc(Au,e)}var Pu=p("ZodNull",(e,t)=>{as.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cc(e,r,o,n)});function Cu(e){return lc(Pu,e)}var Nu=p("ZodAny",(e,t)=>{ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zc(e,r,o,n)});function mf(){return dc(Nu)}var Ru=p("ZodUnknown",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uc(e,r,o,n)});function Qe(){return mc(Ru)}var Du=p("ZodNever",(e,t)=>{us.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dc(e,r,o,n)});function wi(e){return pc(Du,e)}var zu=p("ZodVoid",(e,t)=>{ls.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rc(e,r,o,n)});function pf(e){return fc(zu,e)}var wn=p("ZodDate",(e,t)=>{ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>jc(e,o,n,i),e.min=(o,n)=>e.check(Y(o,n)),e.max=(o,n)=>e.check(oe(o,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 ff(e){return gc(wn,e)}var Uu=p("ZodArray",(e,t)=>{ms.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jc(e,r,o,n),e.element=t.element,In(e,"ZodArray",{min(r,o){return this.check(Oe(r,o))},nonempty(r){return this.check(Oe(1,r))},max(r,o){return this.check(Ye(r,o))},length(r,o){return this.check(Xe(r,o))},unwrap(){return this.element}})});function On(e,t){return vc(Uu,e,t)}function gf(e){let t=e._zod.def.shape;return Ti(Object.keys(t))}var Tn=p("ZodObject",(e,t)=>{ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yc(e,r,o,n),b.defineLazy(e,"shape",()=>t.shape),In(e,"ZodObject",{keyof(){return Ti(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Qe()})},loose(){return this.clone({...this._zod.def,catchall:Qe()})},strict(){return this.clone({...this._zod.def,catchall:wi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return b.extend(this,r)},safeExtend(r){return b.safeExtend(this,r)},merge(r){return b.merge(this,r)},pick(r){return b.pick(this,r)},omit(r){return b.omit(this,r)},partial(...r){return b.partial(Pi,this,r[0])},required(...r){return b.required(Ci,this,r[0])}})});function hf(e,t){let r={type:"object",shape:e??{},...b.normalizeParams(t)};return new Tn(r)}function _f(e,t){return new Tn({type:"object",shape:e,catchall:wi(),...b.normalizeParams(t)})}function vf(e,t){return new Tn({type:"object",shape:e,catchall:Qe(),...b.normalizeParams(t)})}var An=p("ZodUnion",(e,t)=>{fn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function Oi(e,t){return new An({type:"union",options:e,...b.normalizeParams(t)})}var ju=p("ZodXor",(e,t)=>{An.init(e,t),fs.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function bf(e,t){return new ju({type:"union",options:e,inclusive:!1,...b.normalizeParams(t)})}var Lu=p("ZodDiscriminatedUnion",(e,t)=>{An.init(e,t),gs.init(e,t)});function yf(e,t,r){return new Lu({type:"union",options:t,discriminator:e,...b.normalizeParams(r)})}var Fu=p("ZodIntersection",(e,t)=>{hs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xc(e,r,o,n)});function Mu(e,t){return new Fu({type:"intersection",left:e,right:t})}var Zu=p("ZodTuple",(e,t)=>{vr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qc(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Vu(e,t,r){let o=t instanceof $,n=o?r:t,i=o?t:null;return new Zu({type:"tuple",items:e,rest:i,...b.normalizeParams(n)})}var Ct=p("ZodRecord",(e,t)=>{_s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eu(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Bu(e,t,r){return!t||!t._zod?new Ct({type:"record",keyType:xn(),valueType:e,...b.normalizeParams(t)}):new Ct({type:"record",keyType:e,valueType:t,...b.normalizeParams(r)})}function xf(e,t,r){let o=q(e);return o._zod.values=void 0,new Ct({type:"record",keyType:o,valueType:t,...b.normalizeParams(r)})}function kf(e,t,r){return new Ct({type:"record",keyType:e,valueType:t,mode:"loose",...b.normalizeParams(r)})}var Hu=p("ZodMap",(e,t)=>{vs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ke(...r)),e.nonempty=r=>e.check(ke(1,r)),e.max=(...r)=>e.check(je(...r)),e.size=(...r)=>e.check(Je(...r))});function Sf(e,t,r){return new Hu({type:"map",keyType:e,valueType:t,...b.normalizeParams(r)})}var Gu=p("ZodSet",(e,t)=>{bs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qc(e,r,o,n),e.min=(...r)=>e.check(ke(...r)),e.nonempty=r=>e.check(ke(1,r)),e.max=(...r)=>e.check(je(...r)),e.size=(...r)=>e.check(Je(...r))});function $f(e,t){return new Gu({type:"set",valueType:e,...b.normalizeParams(t)})}var Nt=p("ZodEnum",(e,t)=>{ys.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Lc(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Nt({...t,checks:[],...b.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Nt({...t,checks:[],...b.normalizeParams(n),entries:i})}});function Ti(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Nt({type:"enum",entries:r,...b.normalizeParams(t)})}function If(e,t){return new Nt({type:"enum",entries:e,...b.normalizeParams(t)})}var Ku=p("ZodLiteral",(e,t)=>{xs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fc(e,r,o,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 Ef(e,t){return new Ku({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(t)})}var Wu=p("ZodFile",(e,t)=>{ks.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vc(e,r,o,n),e.min=(r,o)=>e.check(ke(r,o)),e.max=(r,o)=>e.check(je(r,o)),e.mime=(r,o)=>e.check(St(Array.isArray(r)?r:[r],o))});function wf(e){return bc(Wu,e)}var qu=p("ZodTransform",(e,t)=>{Ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kc(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ce(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(b.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(b.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function Ai(e){return new qu({type:"transform",transform:e})}var Pi=p("ZodOptional",(e,t)=>{br.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Sn(e){return new Pi({type:"optional",innerType:e})}var Ju=p("ZodExactOptional",(e,t)=>{$s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Yu(e){return new Ju({type:"optional",innerType:e})}var Xu=p("ZodNullable",(e,t)=>{Is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function $n(e){return new Xu({type:"nullable",innerType:e})}function Of(e){return Sn($n(e))}var Qu=p("ZodDefault",(e,t)=>{Es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ru(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function el(e,t){return new Qu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var tl=p("ZodPrefault",(e,t)=>{ws.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>iu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function nl(e,t){return new tl({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Ci=p("ZodNonOptional",(e,t)=>{Os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function rl(e,t){return new Ci({type:"nonoptional",innerType:e,...b.normalizeParams(t)})}var il=p("ZodSuccess",(e,t)=>{Ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Tf(e){return new il({type:"success",innerType:e})}var ol=p("ZodCatch",(e,t)=>{As.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ou(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function al(e,t){return new ol({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var sl=p("ZodNaN",(e,t)=>{Ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n)});function Af(e){return _c(sl,e)}var Pn=p("ZodPipe",(e,t)=>{yr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>au(e,r,o,n),e.in=t.in,e.out=t.out});function ci(e,t){return new Pn({type:"pipe",in:e,out:t})}var Cn=p("ZodCodec",(e,t)=>{Pn.init(e,t),gn.init(e,t)});function Pf(e,t,r){return new Cn({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Cf(e){let t=e._zod.def;return new Cn({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var cl=p("ZodPreprocess",(e,t)=>{Pn.init(e,t),Cs.init(e,t)}),ul=p("ZodReadonly",(e,t)=>{Ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>su(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function ll(e){return new ul({type:"readonly",innerType:e})}var dl=p("ZodTemplateLiteral",(e,t)=>{Rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zc(e,r,o,n)});function Nf(e,t){return new dl({type:"template_literal",parts:e,...b.normalizeParams(t)})}var ml=p("ZodLazy",(e,t)=>{Us.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>uu(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function pl(e){return new ml({type:"lazy",getter:e})}var fl=p("ZodPromise",(e,t)=>{zs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Rf(e){return new fl({type:"promise",innerType:e})}var gl=p("ZodFunction",(e,t)=>{Ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gc(e,r,o,n)});function Df(e){return new gl({type:"function",input:Array.isArray(e?.input)?Vu(e?.input):e?.input??On(Qe()),output:e?.output??Qe()})}var Nn=p("ZodCustom",(e,t)=>{js.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hc(e,r,o,n)});function zf(e){let t=new U({check:"custom"});return t._zod.check=e,t}function Uf(e,t){return yc(Nn,e??(()=>!0),t)}function hl(e,t={}){return xc(Nn,e,t)}function _l(e,t){return kc(e,t)}var jf=Sc,Lf=$c;function Ff(e,t={}){let r=new Nn({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...b.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Mf=(...e)=>Ic({Codec:Cn,Boolean:Ut,String:Rt},...e);function Zf(e){let t=pl(()=>Oi([xn(e),wu(),Ou(),Cu(),On(t),Bu(xn(),t)]));return t}function Vf(e,t){return new cl({type:"pipe",in:Ai(e),out:t})}var My={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 Zy(e){Z({customError:e})}function Vy(){return Z().customError}var vl;vl||(vl={});var x={...yn,...ni,iso:Pt},By=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 Hy(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 Gy(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 o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){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 Bf(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.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 x.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=Gy(n,t),s=K(i,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 x.null();if(n.length===0)return x.never();if(n.length===1)return x.literal(n[0]);if(n.every(s=>typeof s=="string"))return x.enum(n);let i=n.map(s=>x.literal(s));return i.length<2?i[0]:x.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...e,type:i};return Bf(s,t)});return n.length===0?x.never():n.length===1?n[0]:x.union(n)}if(!r)return x.any();let o;switch(r){case"string":{let n=x.string();if(e.format){let i=e.format;i==="email"?n=n.check(x.email()):i==="uri"||i==="uri-reference"?n=n.check(x.url()):i==="uuid"||i==="guid"?n=n.check(x.uuid()):i==="date-time"?n=n.check(x.iso.datetime()):i==="date"?n=n.check(x.iso.date()):i==="time"?n=n.check(x.iso.time()):i==="duration"?n=n.check(x.iso.duration()):i==="ipv4"?n=n.check(x.ipv4()):i==="ipv6"?n=n.check(x.ipv6()):i==="mac"?n=n.check(x.mac()):i==="cidr"?n=n.check(x.cidrv4()):i==="cidr-v6"?n=n.check(x.cidrv6()):i==="base64"?n=n.check(x.base64()):i==="base64url"?n=n.check(x.base64url()):i==="e164"?n=n.check(x.e164()):i==="jwt"?n=n.check(x.jwt()):i==="emoji"?n=n.check(x.emoji()):i==="nanoid"?n=n.check(x.nanoid()):i==="cuid"?n=n.check(x.cuid()):i==="cuid2"?n=n.check(x.cuid2()):i==="ulid"?n=n.check(x.ulid()):i==="xid"?n=n.check(x.xid()):i==="ksuid"&&(n=n.check(x.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))),o=n;break}case"number":case"integer":{let n=r==="integer"?x.number().int():x.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)),o=n;break}case"boolean":{o=x.boolean();break}case"null":{o=x.null();break}case"object":{let n={},i=e.properties||{},s=new Set(e.required||[]);for(let[u,l]of Object.entries(i)){let d=K(l,t);n[u]=s.has(u)?d:d.optional()}if(e.propertyNames){let u=K(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?K(e.additionalProperties,t):x.any();if(Object.keys(n).length===0){o=x.record(u,l);break}let d=x.object(n).passthrough(),m=x.looseRecord(u,l);o=x.intersection(d,m);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),d=[];for(let g of l){let h=K(u[g],t),S=x.string().regex(new RegExp(g));d.push(x.looseRecord(S,h))}let m=[];if(Object.keys(n).length>0&&m.push(x.object(n).passthrough()),m.push(...d),m.length===0)o=x.object({}).passthrough();else if(m.length===1)o=m[0];else{let g=x.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=x.intersection(g,m[h]);o=g}break}let c=x.object(n);e.additionalProperties===!1?o=c.strict():typeof e.additionalProperties=="object"?o=c.catchall(K(e.additionalProperties,t)):o=c.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>K(u,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?K(i,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(u=>K(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?K(e.additionalItems,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(i!==void 0){let s=K(i,t),c=x.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=x.array(x.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function K(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r=Bf(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>K(l,t)),u=x.union(c);r=o?x.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>K(l,t)),u=x.xor(c);r=o?x.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:x.any();else{let c=o?r:K(e.allOf[0],t),u=o?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,K(e.allOf[l],t));r=c}e.nullable===!0&&t.version==="openapi-3.0"&&(r=x.nullable(r)),e.readOnly===!0&&(r=x.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(n[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(n[c]=e[c]);for(let c of Object.keys(e))By.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Hf(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=Hy(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??G};return K(r,i)}var bl={};Ie(bl,{bigint:()=>Jy,boolean:()=>qy,date:()=>Yy,number:()=>Wy,string:()=>Ky});function Ky(e){return Zs(Rt,e)}function Wy(e){return Js(zt,e)}function qy(e){return rc(Ut,e)}function Jy(e){return oc(jt,e)}function Yy(e){return hc(wn,e)}Z(xr());var Gf=a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),yl=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),c:a.number().nonnegative(),agg:Gf.default("COUNT").optional(),valueProperty:a.string().optional(),uniqueProperty:a.string().optional()}),Xy=a.object({kind:a.literal("credential_validity")}),Qy=a.object({kind:a.literal("track_only_bypass")}),ex=a.object({kind:a.literal("lifecycle_block"),blockOn:a.array(a.string()).default(["SUSPENDED","CANCELLED","INACTIVE"]),code:a.string().default("subscription_inactive")}),tx=a.object({kind:a.literal("identity_requirement"),require:a.enum(["org_only","org_and_user"]).default("org_only")}),nx=a.object({kind:a.literal("scope"),requireExplicit:a.boolean().default(!0)}),rx=a.object({kind:a.literal("feature_gate"),feature:a.string().min(1).max(120)}),ix=a.object({kind:a.literal("geo_restriction"),allow:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional(),block:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional()}).refine(e=>e.allow!==void 0||e.block!==void 0,{message:"geo_restriction requires either `allow` or `block`"}),ox=a.enum(["fixed_window","sliding_window","token_bucket"]),ax=yl.extend({kind:a.literal("rate_limit"),m:a.enum(["e","t"]).default("e"),strategy:ox.default("fixed_window"),bucket_capacity:a.number().positive().optional(),refill_rate_per_second:a.number().positive().optional()}).superRefine((e,t)=>{e.strategy==="token_bucket"?(e.bucket_capacity===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `bucket_capacity` (positive number)",path:["bucket_capacity"]}),e.refill_rate_per_second===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `refill_rate_per_second` (positive number)",path:["refill_rate_per_second"]})):(e.bucket_capacity!==void 0&&t.addIssue({code:"custom",message:`bucket_capacity is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["bucket_capacity"]}),e.refill_rate_per_second!==void 0&&t.addIssue({code:"custom",message:`refill_rate_per_second is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["refill_rate_per_second"]}))}),sx=a.enum(["fixed_window","sliding_window"]),cx=yl.extend({kind:a.literal("quota"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"]),strategy:sx.default("fixed_window")}),ux=yl.extend({kind:a.literal("credit_balance"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"])}),lx=a.object({kind:a.literal("concurrency"),capability:a.string().min(1).max(120),limit:a.number().int().positive(),lease_ttl_seconds:a.number().int().positive().max(3600).default(60)}),dx=a.object({kind:a.literal("capability_limit"),capability:a.string().min(1).max(120),limit:a.union([a.number().int().nonnegative(),a.boolean()])}),mx=a.object({kind:a.literal("resource_count"),resource:a.string().min(1).max(120),limit:a.number().int().nonnegative(),actionId:a.string().min(1).max(160).optional()}),px=a.object({kind:a.literal("reservation"),dimension:a.string().min(1).max(120),max_outstanding:a.number().int().positive(),hold_seconds:a.number().int().positive().max(86400)}),xl=a.discriminatedUnion("kind",[Xy,Qy,ex,tx,nx,rx,ix,ax,cx,ux,dx,mx,lx,px]);var WT=a.object({keyId:a.string().min(1),orgId:a.string().min(1),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),productId:a.string().min(1),compiledPlanId:a.string().min(1),entitlementHash:a.string().optional(),subjectKey:a.string().min(1),subscriptionId:a.string().min(1),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().optional(),subscriberId:a.string().min(1),apiKeyId:a.string().nullable(),entitlementVersion:a.number(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),expiresAt:a.number().nullable().optional(),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string().min(1),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).readonly().optional(),entitlement:a.record(a.string(),a.unknown()).nullable().optional()});var Kf=a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()}),fx=a.object({id:a.string().min(1),slug:a.string().optional(),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]),verificationRequired:a.boolean().optional(),originUrl:a.string().optional(),originHostname:a.string().optional(),mtlsClientCertRef:a.string().optional(),accessCredentialRef:a.string().optional(),policyVersion:a.string().optional()}),qT=a.object({id:a.string().min(1),origin:a.string().min(1),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.object({requests:a.number().optional(),tokens:a.number().optional(),computeMs:a.number().optional(),per_request:a.number().optional()}).catchall(a.number().optional()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(Kf).readonly().optional(),userLimits:a.array(Kf).readonly().optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional(),backends:a.array(fx).optional(),defaultBackendId:a.string().optional(),verificationRequired:a.boolean().optional()});var gx=a.object({perRequestMinUnitsByDim:a.record(a.string(),a.number()).optional(),creditPoolMicros:a.number().optional(),perDimUnitCostMicros:a.record(a.string(),a.number()).optional()}),hx=a.object({source:a.enum(["fixed","provider_catalog"]),meterKey:a.string(),selector:a.string().optional(),measures:a.array(a.string()),catalog:a.string().optional(),pricePolicy:a.string().optional(),markupPercent:a.number().optional(),fixedRatesMicros:a.record(a.string(),a.record(a.string(),a.number())).optional()}),_x=a.object({key:a.string(),display:a.string(),unit:a.string().optional(),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),window:a.enum(["minute","hour","day","month","billing_period"]),enforcementType:a.string()}),vx=a.object({feature:a.string(),method:a.string(),path:a.string(),meters:a.array(a.string()).optional()}),JT=a.object({v:a.number(),sub:a.string(),compiledPlanId:a.string().min(1),planType:a.string(),ts:a.number(),constraints:a.array(xl),cv:a.number(),dm:a.record(a.string(),a.number()),dmv:a.number().optional(),floor:gx.nullable().optional(),displayDims:a.array(a.number()).optional(),meterSemantics:a.record(a.string(),_x).optional(),rp:a.record(a.string(),hx).optional(),fr:a.array(vx).optional(),sig:a.string().min(1),sigKid:a.string().optional(),environmentId:a.string().optional()}).passthrough();var YT=a.object({subscriptionId:a.string().min(1),activePeriodId:a.string().optional(),activeCompiledPlanId:a.string().min(1),activeEntitlementHash:a.string().optional(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),gracePeriodEndsAt:a.string().optional(),trialEndsAt:a.string().optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),scheduledTransition:a.object({kind:a.string(),timing:a.string(),scheduledFor:a.string(),toCompiledPlanId:a.string().nullable()}).optional(),creditPool:a.object({periodStartMs:a.number(),periodEndMs:a.number(),grantedCents:a.number(),policy:a.enum(["block","allow"]),epoch:a.number()}).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),generation:a.number(),updatedAt:a.string()});var bx=["DRAFT","ACTIVE"],eA=a.enum(bx),yx=["ONBOARDING","ACTIVE","SUSPENDED"],Wf=a.enum(yx),xx=["ACTIVE","REVOKED"],tA=a.enum(xx),kx=["BLOCK","ALLOW_AND_BILL"],qf=a.enum(kx),Sx=["ACTIVE","ARCHIVED"],nA=a.enum(Sx),$x=["ACTIVE","EXPERIMENTAL","LEGACY_STABLE","PHASING_OUT","SUPERSEDED","ARCHIVED"],rA=a.enum($x);var Ni=[{id:"requests",label:"API requests",description:"Count every call \u2014 the right default for most APIs.",meters:[{key:"requests",display:"Requests",unit:"request"}]},{id:"ai-tokens",label:"AI tokens",description:"LLM-style token metering alongside calls. The gateway can estimate tokens per request and settle actuals from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"tokens_used",display:"Tokens Used",unit:"token"}]},{id:"credits",label:"Credits",description:"Price work in abstract credits (e.g. one image = 5 credits). Report each call's dynamic credit cost through @farthershore/backend.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"credits",display:"Credits",unit:"credit"}]},{id:"spend",label:"Metered spend",description:"Pass-through spend in cents (OpenRouter-style) reported through @farthershore/backend. Pairs with prepaid credit wallets.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"dollars",display:"Spend",unit:"cent"}]},{id:"compute",label:"Compute time",description:"Bill milliseconds of compute, settled from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function Jf(e){let t=e.trim().toLowerCase();return Ni.find(r=>r.id===t)}function Yf(){return Ni.map(e=>e.id)}var Ix="FS_RUNTIME_TOKEN";var Ex={payload:"x-fs-metering",signature:"x-fs-metering-sig",token:"x-fs-metering-token"};var cA={environmentVariable:Ix,presentation:Ex.token,storage:"sha256-hash-only"};var Xf={missingSignature:"missing_signature",malformedSignature:"malformed_signature",unknownKeyId:"unknown_key_id",jwksUnavailable:"jwks_unavailable",badSignature:"bad_signature",bodyHashMismatch:"body_hash_mismatch",routeMismatch:"route_mismatch",clockSkew:"clock_skew",expiredSignature:"expired_signature",replayedNonce:"replayed_nonce",bodyTooLarge:"body_too_large",environmentMismatch:"environment_mismatch",missingToken:"missing_token",invalidToken:"invalid_token"};var uA=10*1024*1024;var wx=["CHECKOUT_COMPLETED","PLAN_CHANGED","CANCELLED","RESTORED","UNSCHEDULED_CANCELLATION","PRICE_ROLLOVER","PAUSED","RESUMED","PLAN_CHANGE_SCHEDULED","PLAN_CHANGE_ABORTED","SCHEDULE_CREATED","SCHEDULE_UPDATED","SCHEDULE_RELEASED","SCHEDULE_COMPLETED","SCHEDULE_ABORTED","CANCEL_SCHEDULED","PAYMENT_FAILED","PAYMENT_RECOVERED","PAYMENT_RECOVERED_FROM_SUSPENDED","PAYMENT_ACTION_REQUIRED","RECURRING_PAYMENT","REFUND_PROCESSED","DISPUTE_OPENED","DISPUTE_FUNDS_WITHDRAWN","DISPUTE_CLOSED","MIN_SPEND_TRUE_UP"],mA=a.enum(wx);var hA=a.object({fontFamily:a.enum(["sans","serif","mono","system"]).optional(),radius:a.enum(["none","sm","md","lg","full"]).optional(),density:a.enum(["compact","default","comfortable"]).optional(),colorScheme:a.enum(["system","light","dark"]).optional()}).strict().optional();var Ox=a.object({d:a.number(),w:a.number(),capacity:a.number(),remaining:a.number(),windowStart:a.number(),windowEnd:a.number()}),Tx=a.record(a.string(),Ox),Ax=a.object({allocations:a.array(a.number()),expiresAt:a.number()}),Px=a.record(a.string(),Ax),Cx=a.record(a.string(),a.bigint()),xA=a.object({subscriptionId:a.string(),handoffToken:a.string(),targetShardId:a.string(),policyVersion:a.number(),entitlementVersion:a.number().nullable(),windowStates:Tx,activeLeases:Px,totalsByDimension:Cx.optional(),billingCycleId:a.string().nullable().optional(),billingCycleStartMs:a.number().optional()});var Nx={gatewayProjectRead:"gateway:project:read",gatewayResourceWrite:"gateway:resource:write",usageWrite:"usage:write",authzDeniedWrite:"authz-denied:write",reservationAuthorize:"reservation:authorize",reservationFinalize:"reservation:finalize",internalCronRun:"internal:cron:run",personaManage:"persona:manage"},EA=Object.values(Nx);var Rx=["managed_frontend","custom_frontend","embedded_sdk","public_api","cli","agent","webhook","admin","internal"],eg=a.enum(Rx),Qf=a.string().min(1).max(128),Dx=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),rem:a.number(),cap:a.number()}).strict(),tg=a.object({v:a.literal(1),entV:a.number().int().nonnegative().optional(),entHash:Qf.optional(),featureGrant:a.boolean().optional(),gates:a.array(Qf).max(16).optional(),limits:a.array(Dx).max(16).optional()}).strict();var zx=a.object({requestId:a.string(),eventId:a.string(),tenantId:a.string(),slug:a.string(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),compiledPlanId:a.string(),subscriberStatus:Wf,subscriptionStatus:a.string(),productId:a.string(),statusCode:a.number(),path:a.string(),latencyMs:a.number(),rawDimsUnits:a.record(a.string(),a.number()),meterSettlements:a.array(a.object({meterId:a.string(),meterType:a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),reserved:a.number(),actual:a.number(),delta:a.number(),dimension:a.number().int().nonnegative(),leaseId:a.string()})).optional(),reportingAttested:a.boolean(),billable:a.boolean(),measureContext:a.record(a.string(),a.unknown()).optional(),creditUnitsConsumed:a.record(a.string(),a.number()).optional(),timestamp:a.number(),environmentId:a.string().nullable().optional(),orgId:a.string().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),subjectKey:a.string().optional(),overageBehavior:qf.optional(),environment:a.enum(["production","sandbox"]).optional(),surface:eg.optional(),actionId:a.string().min(1).max(128).optional(),subjectType:a.string().min(1).max(128).optional(),subjectId:a.string().min(1).max(256).optional(),decision:tg.optional(),leaseId:a.string(),transactionId:a.string(),gatewayMetadata:a.object({shardId:a.string(),policyVersion:a.number().int().nonnegative().optional(),artifactVersion:a.number().int().nonnegative().default(0),artifactHash:a.string().regex(/^sha256_[a-f0-9]{64}$/).optional(),leaseTelemetry:a.object({consumeRequests:a.number().int().nonnegative(),localLeaseHits:a.number().int().nonnegative(),doAllocationAttempts:a.number().int().nonnegative(),doAllocationGrants:a.number().int().nonnegative(),doAllocationDenials:a.number().int().nonnegative(),doUnavailable:a.number().int().nonnegative(),doCircuitOpen:a.number().int().nonnegative(),leaseRefreshSingleflightJoins:a.number().int().nonnegative(),leaseRefreshSingleflightJoinRate:a.number().min(0).max(1),expiredLeasesReaped:a.number().int().nonnegative(),expiredLeaseReclaimedGrant:a.array(a.number().nonnegative()),reconcileRequests:a.number().int().nonnegative(),reconcilePositiveDeltas:a.number().int().nonnegative(),reconcileNoLocalLease:a.number().int().nonnegative(),doReconcileAttempts:a.number().int().nonnegative(),doReconcileFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturns:a.number().int().nonnegative(),unspentLeaseRemainderReturnFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturnedGrant:a.array(a.number().nonnegative()),maxObservedPositiveReconcileDelta:a.array(a.number().nonnegative()),requestToDoRatio:a.number().nonnegative(),localLeaseHitRate:a.number().min(0).max(1),localSpendRate:a.number().min(0).max(1),maxObservedActiveLeases:a.number().int().nonnegative(),maxObservedOutstandingGrant:a.array(a.number().nonnegative()),maxObservedOutstandingGrantRatio:a.number().nonnegative(),maxObservedEmergencyReserveGrant:a.array(a.number().nonnegative()),maxObservedEmergencyReserveGrantRatio:a.number().nonnegative(),maxObservedLeaseGrant:a.array(a.number().nonnegative()),maxObservedLeaseGrantRatio:a.number().nonnegative(),maxObservedLeaseTtlMs:a.number().int().nonnegative()}).optional(),artifactCacheTelemetry:a.object({reads:a.number().int().nonnegative(),l0FreshHits:a.number().int().nonnegative(),l0Misses:a.number().int().nonnegative(),l0StaleServes:a.number().int().nonnegative(),l0StaleIfErrorServes:a.number().int().nonnegative(),l0BlockingRefreshes:a.number().int().nonnegative(),l0SingleflightJoins:a.number().int().nonnegative(),l0EarlyRefreshes:a.number().int().nonnegative(),l1Hits:a.number().int().nonnegative(),l1Misses:a.number().int().nonnegative(),l1Rejected:a.number().int().nonnegative(),l1WriteFailures:a.number().int().nonnegative(),kvHits:a.number().int().nonnegative(),kvMisses:a.number().int().nonnegative(),kvTimeouts:a.number().int().nonnegative(),kvCircuitOpenReads:a.number().int().nonnegative(),resultHits:a.number().int().nonnegative(),resultMisses:a.number().int().nonnegative(),resultDenied:a.number().int().nonnegative(),resultUnavailable:a.number().int().nonnegative(),backgroundRefreshErrors:a.number().int().nonnegative(),l0HitRate:a.number().min(0).max(1),l0SingleflightJoinRate:a.number().min(0).max(1),l0EarlyRefreshRate:a.number().min(0).max(1),l1HitRate:a.number().min(0).max(1),kvHitRate:a.number().min(0).max(1),resultHitRate:a.number().min(0).max(1),staleServeRate:a.number().min(0).max(1)}).optional(),gatewayVersion:a.string()}).passthrough()}).passthrough();var Ux=a.object({path:a.string(),code:a.string(),message:a.string()}),DA=a.object({reason:a.literal("schema_validation_failed"),receivedAt:a.string(),rawPayload:a.unknown(),issues:a.array(Ux),consumerVersion:a.string().optional(),originalMessageId:a.string().optional()});var kl=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Lt=a.enum(kl);var pe=a.enum(["immediate","period_end"]),Rn=a.object({default:pe.default("period_end"),when:a.object({price_increase:pe.optional(),price_decrease:pe.optional(),feature_added:pe.optional(),feature_removed:pe.optional(),limit_increased:pe.optional(),limit_reduced:pe.optional(),credit_increased:pe.optional(),credit_reduced:pe.optional(),rating_changed:pe.optional()}).strict().default({price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"}),allowImmediatePriceIncrease:a.boolean().default(!1),allowImmediateEntitlementReduction:a.boolean().default(!1)}).strict().superRefine((e,t)=>{(e.when.price_increase??e.default)==="immediate"&&!e.allowImmediatePriceIncrease&&t.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let r of["feature_removed","limit_reduced","credit_reduced"])(e.when[r]??e.default)==="immediate"&&!e.allowImmediateEntitlementReduction&&t.addIssue({code:"custom",path:["when",r],message:`${r} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var jx=a.object({kind:a.literal("credit"),amount_cents:a.number().int().nonnegative(),recurs:a.boolean().optional(),expires_after_days:a.number().int().positive().optional(),label:a.string().min(1).max(120).optional()}),Lx=a.object({kind:a.literal("top_up"),sku:a.string().min(1).max(120),label:a.string().min(1).max(200),price_cents:a.number().int().positive(),credit_cents:a.number().int().positive()}),fe=a.discriminatedUnion("kind",[jx,Lx]);function ng(e){return e.kind==="credit"&&e.recurs===!0&&e.label===void 0}function rg(e){return e.kind==="credit"&&e.recurs!==!0&&e.label===void 0}function Sl(e,t,r=["grants"]){if(!e)return;let o=0,n=0;for(let i of e)ng(i)?o+=1:rg(i)&&(n+=1);o>1&&t.addIssue({code:"custom",message:"At most one recurring `credit` grant (recurs:true, no label) is allowed \u2014 recurring credit is a single canonical entry.",path:r}),n>1&&t.addIssue({code:"custom",message:"At most one one-time `credit` grant (recurs:false, no label) is allowed \u2014 one-time credit is a single canonical entry.",path:r})}function ig(e){return e.grants&&e.grants.length>0?[...e.grants]:[]}function Dn(e){return ig(e).find(ng)?.amount_cents??0}function Ft(e){return ig(e).find(rg)?.amount_cents??0}var Fx=a.object({percent:a.number().int().min(0).max(100)}),Mx=a.object({threshold_cents:a.number().int().nonnegative(),refill_cents:a.number().int().positive()}),Ae=a.object({rollover:Fx.optional(),auto_recharge:Mx.optional()});var og=a.enum(["linear","active_count"]);var Zx=a.object({up_to:a.number().int().positive().nullable(),price_per_unit_micros:a.number().int().nonnegative()}),Vx=a.object({strategy:a.enum(["graduated","volume"]),tiers:a.array(Zx).min(1).max(20)}),ge=a.object({dimension:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:og.default("linear"),price_per_unit_micros:a.number().int().nonnegative().default(0),tiered:Vx.optional(),included_units:a.number().int().positive().optional()}).superRefine((e,t)=>{if(e.tiered&&e.price_per_unit_micros>0&&t.addIssue({code:"custom",message:"`tiered` is mutually exclusive with a non-zero `price_per_unit_micros` \u2014 drop one",path:["tiered"]}),e.included_units!==void 0&&e.tiered&&t.addIssue({code:"custom",message:"`included_units` is mutually exclusive with `tiered` \u2014 a tiered schedule already expresses the included allotment as a zero-priced first tier",path:["included_units"]}),e.tiered){let r=0,o=!1;for(let n=0;n<e.tiered.tiers.length;n++){let i=e.tiered.tiers[n];if(o){t.addIssue({code:"custom",message:"Open-ended tier (`up_to: null`) must be the final tier",path:["tiered","tiers",n,"up_to"]});break}if(i.up_to===null){o=!0;continue}i.up_to<=r&&t.addIssue({code:"custom",message:`Tier upper bounds must be strictly ascending (tier ${n} = ${i.up_to} <= previous ${r})`,path:["tiered","tiers",n,"up_to"]}),r=i.up_to}o||t.addIssue({code:"custom",message:"The final tier of a `tiered` schedule must be open-ended (`up_to: null`)",path:["tiered","tiers",e.tiered.tiers.length-1,"up_to"]})}}),Pe=a.enum(["month","year"]),Bx=a.object({meters:a.array(ge).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Pe.default("month"),grants:a.array(fe).max(40).default([]),creditPolicy:Ae.optional(),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional()});var Hx=a.string().min(1),Gx=a.object({type:a.literal("named"),name:a.enum(["second","minute","hour","day","week","month"])}),Kx=a.object({type:a.literal("custom"),seconds:a.number().int().positive(),label:a.string().optional()}),Wx=a.discriminatedUnion("type",[Gx,Kx]),Ze=a.object({dimension:Hx,window:Wx,capacity:a.number().nonnegative(),enforcement:a.enum(["enforce","track"]).optional(),acknowledgeUnreachable:a.boolean().optional()}),JA=a.array(Ze).max(20);var qx=a.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),Jx={meters:a.array(ge).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Pe.default("month"),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(fe).max(40).default([]),creditPolicy:Ae.optional()},Yx={meters:a.array(ge).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Pe.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(fe).max(40).optional(),creditPolicy:Ae.optional()},Xx=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Variant id must be lowercase alphanumeric with hyphens/underscores"),label:a.string().max(200).optional(),rolloutPercent:a.number().int().min(0).max(100),assignmentSeed:a.string().min(1).max(100).default("default"),prorationOnRollback:qx,...Yx,limits:a.array(Ze).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional()}),ag=Xx.superRefine((e,t)=>{Sl(e.grants,t)}),sg=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),details:a.array(a.string().max(200)).max(10).optional(),...Jx,free:a.boolean().default(!1),limits:a.array(Ze).max(20).default([]),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),overageBehavior:a.enum(["block","allow_and_bill"]).default("block"),selfServeEnabled:a.boolean().default(!0),legacy:a.boolean().optional().default(!1),variants:a.array(ag).max(4).optional(),archive:a.object({at:a.string().datetime().optional(),transitionTo:a.string().optional(),strategy:a.enum(["auto","explicit","block"]).default("auto")}).optional()}),Ri=sg.superRefine((e,t)=>{Sl(e.grants,t)});var Qx=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,$l=a.string().min(3).max(200).refine(e=>Qx.test(e),{message:"secret must use ${VAR} interpolation syntax (e.g. ${WEBHOOK_SECRET}); raw secrets in YAML are rejected. Define the env var in the per-product secret store and reference it here."}),Il=a.object({maxAttempts:a.number().int().min(1).max(20).default(5),backoff:a.enum(["exponential","fixed"]).default("exponential")}),El=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Webhook endpoint id must be lowercase alphanumeric with hyphens/underscores"),url:a.string().url("webhooks.endpoints[].url must be a valid URL"),secret:$l,events:a.array(Lt).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:a.boolean().default(!0),retryPolicy:Il.default({maxAttempts:5,backoff:"exponential"})}),wl=a.object({endpoints:a.array(El).max(50).default([])});var ek=a.object({meters:a.array(ge).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Pe.optional(),grants:a.array(fe).max(40).optional(),creditPolicy:Ae.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),limits:a.array(Ze).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional(),selfServeEnabled:a.boolean().optional(),legacy:a.boolean().optional()}).strict(),tk=a.object({url:a.string().url().optional(),secret:$l.optional(),events:a.array(Lt).optional(),enabled:a.boolean().optional(),retryPolicy:Il.partial().optional()}).strict(),nk=a.object({plans:a.record(a.string(),ek).optional(),webhooks:a.object({endpoints:a.record(a.string(),tk).optional()}).strict().optional()}).strict(),Ol=a.record(a.string().min(1).max(64),nk);var cg=1,ug=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","product_docs","audit_log","team_panel","markdown"],lg=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],dg=a.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),Tl=a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),mg=a.object({label:a.string().min(1).max(80),path:dg,capability:Tl.optional()}),pg=a.enum(ug),fg=a.object({component:pg,props:a.record(a.string().min(1).max(80),a.unknown()).optional(),capability:Tl.optional(),gateMode:a.enum(["hide","disable","upsell"]).default("hide")}),gg=a.object({path:dg,title:a.string().min(1).max(120),requiresAuth:a.boolean(),capability:Tl.optional(),components:a.array(fg).max(12).default([])}),Al=a.object({version:a.literal(cg),nav:a.array(mg).max(12).default([]),pages:a.array(gg).max(24).default([])}).superRefine((e,t)=>{let r=new Set;e.pages.forEach((o,n)=>{r.has(o.path)&&t.addIssue({code:"custom",message:`duplicate frontend page path "${o.path}"`,path:["pages",n,"path"]}),r.add(o.path),hg(o.path)&&t.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",n,"path"]})})});function hg(e){return lg.some(t=>{if(t.endsWith("/*")){let r=t.slice(0,-2);return e===r||e.startsWith(`${r}/`)}return e===t})}var Pl=a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),_g=a.union([a.literal("head"),a.string().regex(/^[1-9][0-9]*$/,'version must be "head" or a positive integer')]),rk=a.object({plan:Pl,version:_g.optional()}),ik=a.object({plan:Pl,version:a.literal("head").default("head")}),ok=a.object({plan:Pl,version:_g}),vg=a.enum(["grandfather","next_renewal","by_date","immediate","opt_in"]),bg=a.enum(["none","prorate","credit"]),yg=a.object({effective:vg,date:a.string().datetime().optional(),proration:bg.optional()}).superRefine((e,t)=>{e.effective==="by_date"&&e.date===void 0&&t.addIssue({code:"custom",path:["date"],message:"existingCustomers.date is required when effective is by_date"})}),xg=a.object({subscriber:a.string().min(1).max(200),pinTo:ok,until:a.string().datetime().optional(),notes:a.string().max(1e3).optional()}),kg=a.object({id:a.string().min(1).max(120).regex(/^[a-z0-9][a-z0-9_.-]*$/,"Migration id must be lowercase alphanumeric with dots, hyphens, or underscores"),from:rk,to:ik,newCustomers:a.literal("immediate").default("immediate"),existingCustomers:yg,pins:a.array(xg).max(50).default([])}),Cl=a.array(kg).superRefine((e,t)=>{let r=new Set;e.forEach((o,n)=>{r.has(o.id)&&t.addIssue({code:"custom",path:[n,"id"],message:`duplicate migration id "${o.id}"`}),r.add(o.id)})});var Sg=a.enum(["subscription","subject"]),$g=a.enum(["reported","action_inferred"]),Ig=a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Eg=a.object({name:Ig,display:a.string().min(1).max(120).optional(),scope:Sg.default("subscription"),subjectType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:$g.default("reported")}).superRefine((e,t)=>{e.scope==="subject"&&!e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is required when resource scope is subject"}),e.scope==="subscription"&&e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is only valid for subject-scoped counted resources"})}),Nl=a.array(Eg).max(100).default([]);var ak=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"AddOn key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Pe.default("month"),meters:a.array(ge).default([]),grants:a.array(fe).max(40).default([]),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),featureGates:a.record(a.string(),a.boolean()).optional(),selfServeEnabled:a.boolean().default(!0)}),wg=a.record(a.string().min(1).max(64),ak).default({}),sk=a.enum(["active","canceled","paused","pending_activation"]),$P=a.object({addOnKey:a.string().min(1).max(64),status:sk.default("active"),activatedAt:a.string().datetime().optional(),canceledAt:a.string().datetime().nullable().optional(),stripeSubscriptionItemId:a.string().optional()});var Og=/^[a-z0-9][a-z0-9_-]*$/,Rl=a.string().min(1).max(64).regex(Og,"backend id must be a lowercase slug ([a-z0-9][a-z0-9_-]*)"),Tg=a.enum(["public_origin","mtls","cloudflare_tunnel"]),Ag=a.enum(["managed_cloudflared","sidecar"]);var Pg=a.object({mode:Tg.default("public_origin"),runner:Ag.optional()}).strict(),Cg=a.object({required:a.boolean().default(!1)}).strict(),Ng=a.object({name:a.string().min(1).max(120).optional(),slug:Rl.optional(),transport:Pg.default({mode:"public_origin"}),verification:Cg.default({required:!1}),meters:a.array(a.string().min(1).max(64)).max(100).optional(),default:a.boolean().optional(),originUrl:a.string().url().optional(),originHostname:a.string().min(1).max(255).optional()}).strict(),Dl=a.record(Rl,Ng),Mt=Rl,Zt={unknownBackendInRoute:"UNKNOWN_BACKEND_IN_ROUTE",ambiguousDefaultBackend:"AMBIGUOUS_DEFAULT_BACKEND",routeMeterNotAllowedByBackend:"ROUTE_METER_NOT_ALLOWED_BY_BACKEND",unknownMeterInBackend:"UNKNOWN_METER_IN_BACKEND"};function zl(e){let t=Object.keys(e??{});if(t.length===0)return{defaultId:null,ambiguous:!1};if(t.length===1)return{defaultId:t[0],ambiguous:!1};let r=t.filter(o=>e[o]?.default===!0);return r.length===1?{defaultId:r[0],ambiguous:!1}:{defaultId:null,ambiguous:!0}}var ck=a.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),Rg=a.object({strategy:a.enum(["token_bucket","sliding_window","fixed_window"]).default("token_bucket"),dimensions:a.array(a.enum(["subscription","credential","ip","route"])).min(1).max(4).default(["subscription"]),limits:a.array(a.object({window:ck,max:a.number().int().positive().max(1e7)})).min(1).max(10),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(100),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(50),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:100,max_window_seconds:60,recovery_threshold:50,degraded_mode:"safe_mode_throttle"})}),Dg=a.object({header_name:a.string().min(1).max(100).default("x-api-key"),upstream_token_source:a.discriminatedUnion("type",[a.object({type:a.literal("none")}),a.object({type:a.literal("static_bearer"),token_secret_ref:a.string().min(1).max(200).describe("Reference into the secret store (e.g. CF Secret name); not the raw token")})]).default({type:"none"}),scope_mode:a.enum(["strict","advisory","off"]).default("strict")}),zg=a.object({max_in_flight:a.number().int().positive().max(1e4),dimensions:a.array(a.enum(["subscription","credential","capability"])).min(1).max(3).default(["subscription"]),capability:a.string().min(1).max(120).optional(),lease_ttl_seconds:a.number().int().positive().max(600).default(30),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(50),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(20),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:50,max_window_seconds:60,recovery_threshold:20,degraded_mode:"safe_mode_throttle"})}),Ug=a.object({max_attempts:a.number().int().min(1).max(5).default(2),retry_on_status:a.array(a.number().int().min(400).max(599)).min(1).max(20).default([502,503,504]),backoff:a.object({initial_ms:a.number().int().positive().max(5e3).default(100),multiplier:a.number().positive().max(10).default(2),jitter:a.enum(["none","full","equal"]).default("equal"),total_budget_ms:a.number().int().positive().max(3e4).default(5e3)}).default({initial_ms:100,multiplier:2,jitter:"equal",total_budget_ms:5e3})}),jg=a.object({applies_to:a.enum(["request","response","both"]).default("request"),rewrites:a.array(a.object({source:a.string().min(1).max(200),target:a.string().min(1).max(200).nullable()})).min(1).max(20)});var Ul=a.discriminatedUnion("type",[a.object({type:a.literal("rate_limit"),config:Rg}),a.object({type:a.literal("auth"),config:Dg}),a.object({type:a.literal("concurrency"),config:zg}),a.object({type:a.literal("retry"),config:Ug}),a.object({type:a.literal("transform"),config:jg})]);var Di=a.enum(["long","short","blocking"]).default("long"),Lg=a.object({route_types:a.array(a.enum(["http"])).max(5).optional(),meters:a.array(a.string().min(1).max(64)).max(20).optional(),auth_modes:a.array(a.enum(["api_key","oauth2","anonymous"])).max(5).optional()});var jl=a.intersection(a.object({name:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Policy name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),compatible_with:Lg.default({}),mutation_class:a.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Di}),Ul);var uk=a.enum(["query","mutation"]),lk=a.enum(["none","metadata","full"]),dk=a.object({type:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/),from:a.enum(["header","path_param"]),name:a.string().min(1).max(120)}),mk=a.object({resource:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:a.enum(["create","delete"])}),Fg=a.object({id:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:a.string().min(1).max(160).optional(),kind:uk,actorType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:dk.optional(),inputSchemaRef:a.string().min(1).max(240).optional(),audit:lk.default("metadata"),resource:mk.optional()});var Mg=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]")});function pk(e){let t=e.trim();if(!t)return!1;let[r,o,n]=t.split("-");if(n!==void 0||!/^\d{3}$/.test(r??""))return!1;let i=Number(r),s=o===void 0?i:Number(o);return o!==void 0&&!/^\d{3}$/.test(o)?!1:i>=100&&i<=599&&s>=100&&s<=599&&i<=s}function Zg(e){return e.split(",").every(pk)}var zi=a.union([a.string().min(1).max(100).refine(Zg,{message:"onStatusCodes must be comma-separated HTTP status codes or numeric ranges, e.g. 200-299,304"}),a.array(a.number().int().min(100).max(599)).min(1).max(100)]),Vg=a.object({match:Mg,metering:a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:zi.optional()}).optional(),unmetered:a.boolean().optional(),inheritDefaultMeters:a.boolean().optional(),action:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional(),backend:Mt.optional()}).strict(),Bg=a.object({override_origin:a.string().url("override_origin must be a valid URL").nullable().default(null)}),Hg=a.object({rollout_key:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"rollout_key must be lowercase alphanumeric with hyphens/underscores").optional(),required_flags:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}),Ll=a.object({feature:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/,"feature key must be lowercase alphanumeric with [_.:-]"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),cacheProfile:Di,routes:a.array(Vg).min(1).max(50),upstream:Bg.default({override_origin:null}),policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:Hg.default({}),plans:a.array(a.string().min(1).max(64)).max(20).default([]),actions:a.array(Fg).max(100).optional(),backend:Mt.optional()}).strict();function Gg(e,t){e.usagePricing!==void 0&&t.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function Kg(e,t){e.filter(o=>o.free).length>1&&t.addIssue({code:"custom",path:["plans"],message:"Only one free plan is allowed per product"}),e.forEach((o,n)=>{o.free&&(fk(o,n,t),gk(o,n,t))})}function fk(e,t,r){(eh(e)??0)!==0&&r.addIssue({code:"custom",path:["plans",t,"recurring_fee_cents"],message:"Free plans must have zero price"})}function gk(e,t,r){e.limits.some(n=>!n.enforcement||n.enforcement==="enforce")||r.addIssue({code:"custom",path:["plans",t,"limits"],message:"Free plans must include at least one hard enforced limit"})}function Wg(e,t){let r=new Map;e.forEach((o,n)=>{if(o.free)return;let i=eh(o);if(i===void 0||i<=0)return;let s=yk(o,i),c=r.get(s);if(c){t.addIssue({code:"custom",path:["plans",n,"recurring_fee_cents"],message:`Paid plan price duplicates plan "${c}" (${s})`});return}r.set(s,o.key)})}function qg(e,t){let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=new Set(Object.keys(e.usage?.meters??{}));e.plans.forEach((n,i)=>{let s=n.meters;s&&s.forEach((c,u)=>{let l=c.dimension;typeof l!="string"||l.length===0||r.has(l)||o.has(l)||t.addIssue({code:"custom",path:["plans",i,"meters",u,"dimension"],message:`Plan "${n.key}" prices meter "${l}" but no metering.meters[] entry and no usage.meters[] entry declares it.`})})})}function Jg(e,t){if(!e.features)return;let r=new Set(e.plans.map(o=>o.key));for(let[o,n]of Object.entries(e.features)){if(!n.plans)continue;n.plans.forEach((s,c)=>{r.has(s)||t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" references unknown plan "${s}"`})});let i=new Set;n.plans.forEach((s,c)=>{i.has(s)&&t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" lists plan "${s}" more than once`}),i.add(s)})}}function Yg(e,t){if(!e.features)return;let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=!1;for(let[n,i]of Object.entries(e.features))(i.routes??[]).forEach((c,u)=>{let l=Fl(c);l.length!==0&&(o=!0,l.forEach((d,m)=>{r.has(d)||t.addIssue({code:"custom",path:["features",n,"routes",u,"metering",m],message:`Route references unknown meter "${d}". Declare it in metering.meters[].`})}))});o&&r.size===0&&t.addIssue({code:"custom",path:["metering","meters"],message:"One or more routes declare metering keys but `metering.meters[]` is empty. Declare meters at the product level first."})}function hk(e,t){let r=new Map;for(let o of e.plans)r.set(o.key,new Set);if(!e.features){for(let o of r.values())for(let n of t)o.add(n);return r}for(let o of Object.values(e.features))_k(o,r);return r}function _k(e,t){let r=e.plans??[],o=e.routes??[];for(let n of r){let i=t.get(n);if(i)for(let s of o){if(s.unmetered===!0)continue;let c=Fl(s);if(c.length>0){for(let u of c)i.add(u);continue}}}}function Fl(e){let t=new Set;for(let r of Object.keys(e.metering?.defaults??{}))t.add(r);for(let r of e.metering?.reports??[])t.add(r);for(let r of Object.keys(e.metering?.estimates??{}))t.add(r);return[...t]}function vk(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.dimension=="string"?t.dimension:null}var bk=new Set(["credits"]);function Xg(e,t){if(!e.plans||e.plans.length===0)return;let r=new Set((e.metering?.meters??[]).map(i=>i.key).filter(i=>typeof i=="string"&&i.length>0)),o=new Set(Object.keys(e.usage?.meters??{})),n=hk(e,r);e.plans.forEach((i,s)=>{let c=i.limits??[],u=n.get(i.key)??new Set;c.forEach((l,d)=>{if(l&&typeof l=="object"?l.acknowledgeUnreachable===!0:!1)return;let g=vk(l);g&&(u.has(g)||o.has(g)||bk.has(g)||t.addIssue({code:"custom",path:["plans",s,"limits",d,"meter"],message:`Plan "${i.key}" limits meter "${g}" but no route in any granted feature emits this meter, and the meter is not declared under usage.meters either. Either grant a feature whose routes meter "${g}" to this plan, declare the meter under metering.meters[] or usage.meters, or set acknowledgeUnreachable: true if the limit is intentional (e.g. soft budget).`}))})})}function Qg(e,t){let r=e.backend;if(!r||Object.keys(r).length===0)return;let o=new Set(Object.keys(r)),n=new Set((e.metering?.meters??[]).map(u=>u.key).filter(u=>typeof u=="string"&&u.length>0));for(let[u,l]of Object.entries(r))(l.meters??[]).forEach((d,m)=>{n.has(d)||t.addIssue({code:"custom",path:["backend",u,"meters",m],message:`${Zt.unknownMeterInBackend}: backend "${u}" allows meter "${d}" but no metering.meters[] entry declares it.`})});let{defaultId:i,ambiguous:s}=zl(r),c=!1;for(let u of Object.values(e.features??{}))for(let l of u.routes??[])l.backend===void 0&&(c=!0);s&&c&&t.addIssue({code:"custom",path:["backend"],message:`${Zt.ambiguousDefaultBackend}: product declares ${o.size} backends but no single default \u2014 mark exactly one backend \`default: true\` or bind every route explicitly.`});for(let[u,l]of Object.entries(e.features??{}))(l.routes??[]).forEach((d,m)=>{let g=d.backend??i;if(d.backend!==void 0&&!o.has(d.backend)){t.addIssue({code:"custom",path:["features",u,"routes",m,"backend"],message:`${Zt.unknownBackendInRoute}: route binds backend "${d.backend}" which is not declared in the product \`backend\` block.`});return}if(!g)return;let S=r[g]?.meters;if(!S)return;let R=new Set(S);for(let P of Fl(d))R.has(P)||t.addIssue({code:"custom",path:["features",u,"routes",m,"metering"],message:`${Zt.routeMeterNotAllowedByBackend}: route meters "${P}" but backend "${g}" does not allow it (backend.meters[] = [${S.join(", ")}]).`})})}function eh(e){return e.recurring_fee_cents}function yk(e,t){return`USD:month:${t}`}var xk=a.object({subdomain:a.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"Subdomain must be lowercase alphanumeric with optional hyphens")}),th=a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),Ml=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter key must be lowercase alphanumeric with underscores"),display:a.string().min(1).max(100),unit:a.string().max(20).optional(),estimate:a.number().finite().nonnegative().optional(),routeDefault:a.number().finite().nonnegative().optional(),enforcementType:th.default("estimated_then_settled"),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]).default("COUNT"),window:a.enum(["minute","hour","day","month","billing_period"]).default("billing_period"),valueProperty:a.string().optional(),uniqueProperty:a.string().optional(),groupBy:a.array(a.string()).optional(),eventCode:a.string().optional()}),nh=a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),kk=a.enum(["pass_through","markup"]),Sk=a.object({source:a.literal("fixed"),rates:a.record(a.string().min(1),a.record(nh,a.number().int().nonnegative()))}),$k=a.object({source:a.literal("provider_catalog"),catalog:a.string().min(1).max(100),pricePolicy:kk.default("pass_through"),markupPercent:a.number().nonnegative().max(1e4).optional(),marginMicros:a.number().int().nonnegative().optional()}),rh=a.discriminatedUnion("source",[Sk,$k]),ih=a.object({selector:a.string().min(1).max(100).optional(),measures:a.array(nh).min(1).max(20),rating:rh.optional()}),oh=a.object({meters:a.record(a.string().min(1).max(64).regex(/^[a-z0-9_]+$/),ih)}),Ik=a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:zi.optional()}),ah=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]"),unmetered:a.boolean().optional(),metering:Ik.optional(),inheritDefaultMeters:a.boolean().optional(),backend:Mt.optional()}).strict(),Zl=a.object({description:a.string().max(500).optional(),routes:a.array(ah).min(1).max(50),plans:a.array(a.string().min(1)).min(1).max(20)}),sh=a.record(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),Zl),ch=a.enum(["report","pull_request"]),uh=a.enum(["safe","non_blocking","economic_risk","blocking"]),lh=a.object({cleanup:a.object({enabled:a.boolean().default(!1),mode:ch.default("report")}).default({enabled:!1,mode:"report"}),change_approval:a.object({auto_merge_max_risk:a.enum(["none","safe","non_blocking"]).default("none"),require_human_for:a.array(uh).default(["economic_risk","blocking"])}).default({auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]})}).default({cleanup:{enabled:!1,mode:"report"},change_approval:{auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]}}),dh=a.enum(["org_only","org_and_user"]),mh=a.enum(["clerk","test-personas"]),ph=a.object({identity_requirement:dh.optional(),context_tokens:a.object({enabled:a.boolean().default(!0)}).optional(),portal_auth:a.object({strategy:mh}).optional()}),fh=a.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),gh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:fh,display:a.string().min(1).max(100).optional(),description:a.string().max(500).optional()}),hh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Entitlement key must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),featureGates:a.record(a.string().min(1),a.boolean()).optional(),limits:a.array(Ze).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional()}),_h=a.array(gh).max(20).default([]),vh=a.array(hh).max(100).default([]),bh=a.enum(["async_job","agent_task","scheduled","lifecycle","background"]),yh=a.discriminatedUnion("type",[a.object({type:a.literal("manual")}),a.object({type:a.literal("schedule"),cron:a.string().min(1).max(120)}),a.object({type:a.literal("event"),event:a.string().min(1).max(120)}),a.object({type:a.literal("api"),path:a.string().min(1).max(240).regex(/^\//,"path must start with /")}),a.object({type:a.literal("lifecycle"),event:a.string().min(1).max(120)})]),xh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Workflow key must be lowercase alphanumeric with hyphens/underscores"),title:a.string().min(1).max(120).optional(),description:a.string().max(1e3).optional(),kind:bh,trigger:yh,capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite()).optional(),metadata:a.record(a.string().min(1),a.unknown()).optional()}),kh=a.array(xh).max(100).default([]),tt=a.object({product:a.object({name:a.string().min(1).max(100),displayName:a.string().max(200).optional(),description:a.string().max(2e3).optional(),baseUrl:a.string().url("baseUrl must be a valid URL"),sandboxBaseUrl:a.string().url("sandboxBaseUrl must be a valid URL").optional(),visibility:a.enum(["public","private"]).default("public"),logoUrl:a.string().url().optional(),primaryColor:a.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),envBranchPrefix:a.string().max(50).nullable().optional()}),gateway:a.object({authHeader:a.string().min(1).max(100).default("x-api-key"),upstreamAuth:a.object({type:a.enum(["none","static_bearer"]),token:a.string().optional()}).default({type:"none"})}),metering:a.object({meters:a.array(Ml).max(10).default([]),billOn4xx:a.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),backend:Dl.optional(),usage:oh.optional(),usagePricing:a.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:sh.optional(),resources:Nl,policies:lh,customer_context:ph.optional(),surfaces:_h,entitlements:vh,workflows:kh,frontend:Al.optional(),migrations:Cl.optional(),billing:a.object({applyLimitUpgradesInstantly:a.boolean().optional(),subscriberChangePolicy:Rn.default({default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({subscriberChangePolicy:{default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:a.array(Ri).max(4).default([]),add_ons:wg,lifecycle:a.object({breaking_changes:a.object({require_deprecation_window_days:a.number().int().nonnegative().default(0),require_successor_route:a.boolean().default(!1)}).default({require_deprecation_window_days:0,require_successor_route:!1})}).default({breaking_changes:{require_deprecation_window_days:0,require_successor_route:!1}}),webhooks:wl.optional(),environments:Ol.optional(),ephemeral:a.object({defaultPlan:a.string().min(1).optional()}).optional()}).superRefine((e,t)=>{Gg(e,t),Kg(e.plans,t),Wg(e.plans,t),qg(e,t),Jg(e,t),Yg(e,t),Xg(e,t),Qg(e,t)}),Ek=a.object({product:tt.shape.product}),wk=a.object({gateway:tt.shape.gateway}),Ok=a.object({metering:tt.shape.metering}),Tk=a.object({plans:tt.shape.plans});var Vl=a.object({capability:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"capability name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),includes_features:a.array(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/)).max(20).default([]),includes_policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),includes_capabilities:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([])});var Ui=1;var Bl=a.object({irVersion:a.literal(Ui),sdkVersion:a.string().min(1).max(64),product:tt,routes:a.array(Ll).max(200).default([]),policies:a.array(jl).max(200).default([]),capabilities:a.array(Vl).max(200).default([])}).strict();var LC=a.object({subscriberChangePolicy:Rn.optional()}),FC=a.object({code:a.string(),kind:a.enum(["percent_off","amount_off","free_months"]),amount:a.number().optional(),durationMonths:a.number(),applicablePlanIds:a.array(a.string()).optional(),maxRedemptions:a.number().optional(),activeFrom:a.string().optional(),activeUntil:a.string().optional(),status:a.enum(["ACTIVE","ARCHIVED"]).optional()}),MC=a.object({id:a.string(),actorUserId:a.string().optional(),action:a.string(),decision:a.string().optional(),timestamp:a.string(),details:a.unknown().optional()}),ZC=a.object({name:a.string(),branch:a.string().optional(),isProduction:a.boolean().optional()}),VC=a.object({id:a.string(),name:a.string(),apiKeyId:a.string().optional()});var Ak=["IMMEDIATE_NO_PRORATE","IMMEDIATE_PRORATE_CHARGE_NEW","IMMEDIATE_PRORATE_REFUND_OLD","IMMEDIATE_PRORATE_BOTH","DEFER_TO_PERIOD_END"],JC=a.enum(Ak);var Sh=a.object({id:a.string(),billingCycleId:a.string(),effectiveStart:a.string(),effectiveEnd:a.string(),compiledPlanId:a.string()}),$h=a.object({currentPeriod:Sh,priorPeriod:Sh.optional()});var Pk=a.object({subjectKey:a.string(),subscriptionId:a.string(),subscriberId:a.string(),productId:a.string(),organizationId:a.string(),compiledPlanId:a.string(),activeEntitlementHash:a.string().optional(),generation:a.number(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),subscriptionStatus:a.string(),subscriberStatus:a.string(),scopes:a.array(a.string()),periods:$h,expiresAt:a.number().optional(),trialEndsAt:a.string().optional()}),Ck=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),state:Pk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),nN=a.object({environmentId:a.string().nullable(),subjectKeys:a.array(a.string()).min(1).max(500)}),rN=a.object({results:a.array(a.object({subjectKey:a.string(),result:Ck}))}),Nk=a.object({keyId:a.string(),orgId:a.string(),productId:a.string(),compiledPlanId:a.string(),entitlementHash:a.string().optional(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),subjectKey:a.string(),entitlementVersion:a.number().int(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string(),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).default([]),entitlement:a.unknown().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().int().nonnegative().optional(),expiresAt:a.number().nullable().optional()}),iN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),record:Nk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),oN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),entitlement:a.unknown(),expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),Rk=a.object({id:a.string(),origin:a.string(),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.record(a.string(),a.number()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),userLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional()}),aN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),tenant:Rk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]);var ji=["consumer_api_key","consumer_session_token","test_persona_session_token","builder_master_key","builder_session_token","maker_jwt","service_jwt","internal_service","context_token"],Ih=a.enum(ji);var Dk=a.object({fromIssuer:a.string().min(1),fromTokenId:a.string().min(1),intent:a.string().min(1)}),Eh=a.object({issuer:a.string().min(1),issuedAt:a.number().int().nonnegative(),expiresAt:a.number().int().nonnegative().optional(),tokenId:a.string().min(1).optional(),delegationChain:a.array(Dk)});var Hl=["template","embedded","provisioned","agent"],zk=a.enum(Hl),Uk=["builder_user","builder_org","maker","consumer_subject","internal_service","service_jwt","agent_runtime"],jk=a.enum(Uk),wh=a.object({kind:jk,id:a.string().min(1),label:a.string().optional()}),Lk=["subscription","organization","platform"],Fk=a.enum(Lk),Mk=a.object({kind:Fk,id:a.string().min(1)}),Zk=a.object({type:Ih,id:a.string().min(1),hint:a.string().max(8).optional()}),Vk=a.object({compiledPlanId:a.string().min(1),fromCache:a.boolean().optional()}),Oh=a.object({requestId:a.string().min(1),surface:zk,builderOrgId:a.string().min(1),productId:a.string().min(1).optional(),runtimeId:a.string().min(1).optional(),template:a.string().optional(),caller:wh,actor:wh,billingSubject:Mk,credential:Zk,capability:a.string().min(1),scopes:a.array(a.string()),entitlement:Vk.optional(),trust:Eh});var zn;(function(e){e.AUTHZ_DECISION="authz_decision",e.ENTITLEMENT_DECISION="entitlement_decision",e.RUNTIME_LIMIT_DECISION="runtime_limit_decision",e.RESOURCE_GOVERNANCE_DECISION="resource_governance_decision",e.RESOURCE_MUTATION="resource_mutation",e.LIFECYCLE_EVENT="lifecycle_event",e.RUNTIME_CONTEXT_CREATED="runtime_context_created",e.SYSTEM_ACTION="system_action"})(zn||(zn={}));var Th=Object.values(zn),IN=a.enum(Th),Ah=a.object({decisionId:a.string().optional(),ctx:Oh,details:a.record(a.string(),a.unknown()).optional(),createdAt:a.string().min(1)}),Bk=Th.filter(e=>e!==zn.SYSTEM_ACTION),Hk=Ah.extend({kind:a.enum(Bk)}),Gk=Ah.extend({kind:a.literal(zn.SYSTEM_ACTION),actorType:a.string().min(1),action:a.string().min(1)}),EN=a.discriminatedUnion("kind",[Hk,Gk]);var O=["template","agent"],Kk=["provisioned"],Ph=[...Hl],T=["builder_master_key","builder_session_token","maker_jwt"],Vt=["service_jwt","internal_service"],Gl=["consumer_api_key","consumer_session_token","test_persona_session_token","context_token"],Ch=[...ji],Un="subscriptions:write",Wk=[{id:"products.create",operation:"Create a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a new product in the builder org"},{id:"products.update",operation:"Update a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update product metadata or compiled config"},{id:"products.delete",operation:"Delete a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a product (soft-archive if subscriptions exist)"},{id:"products.read",operation:"Read a product",requiredScopes:["products:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read product metadata + compiled config"},{id:"products.publish",operation:"Publish a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Compile + publish the product to the gateway"},{id:"plans.create",operation:"Create a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a new plan to a product"},{id:"plans.update",operation:"Update a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update plan pricing, limits, or features"},{id:"plans.delete",operation:"Delete a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a plan (denied if subscriptions are attached)"},{id:"plans.publish",operation:"Publish a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mark a plan as available for new subscriptions"},{id:"subscriptions.create",operation:"Create a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Provision a new subscription for a subscriber"},{id:"subscriptions.update",operation:"Update a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Change plan, enforcement mode, or schedule"},{id:"subscriptions.cancel",operation:"Cancel a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Cancel a subscription (immediate or end-of-period)"},{id:"subscriptions.pause",operation:"Pause a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Pause a subscription (no usage, no billing)"},{id:"subscriptions.resume",operation:"Resume a subscription",requiredScopes:[Un],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Resume a paused subscription"},{id:"subscriptions.read",operation:"Read a subscription",requiredScopes:["subscriptions:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Vt],description:"Read subscription state and usage"},{id:"webhooks.create",operation:"Create a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Register a new webhook endpoint URL"},{id:"webhooks.update",operation:"Update a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update endpoint URL, secret, or subscribed events"},{id:"webhooks.delete",operation:"Delete a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a webhook endpoint"},{id:"webhooks.test",operation:"Send a test webhook payload",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Trigger a synthetic payload to verify an endpoint"},{id:"api-keys.create",operation:"Create an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mint a new consumer or master API key"},{id:"api-keys.revoke",operation:"Revoke an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke an API key (immediate invalidation)"},{id:"api-keys.read",operation:"Read API key metadata",requiredScopes:["api-keys:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read key id + hint + scopes (never the secret)"},{id:"organizations.create",operation:"Create an organization",requiredScopes:["orgs:write"],allowedSurfaces:["template"],allowedCredentialTypes:["builder_session_token"],description:"Create a builder org (top-level signup)"},{id:"organizations.update",operation:"Update an organization",requiredScopes:["orgs:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update org metadata or billing email"},{id:"members.invite",operation:"Invite a member to an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Send an invitation to join the org"},{id:"members.remove",operation:"Remove a member from an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke a member's access to the org"},{id:"projects.create",operation:"Create a project",requiredScopes:["projects:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a project (groups products + environments)"},{id:"environments.create",operation:"Create an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a deployment environment (stage / branch)"},{id:"environments.delete",operation:"Delete an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a deployment environment"},{id:"billing.portal-redirect",operation:"Generate Stripe customer-portal redirect",requiredScopes:["billing:portal"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Gl],description:"Mint a one-time Stripe portal-session redirect URL"},{id:"billing.read",operation:"Read billing state",requiredScopes:["billing:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Gl],description:"Read invoices, balances, scheduled changes"},{id:"runtime-context.read",operation:"Read the caller's runtime context",requiredScopes:[],allowedSurfaces:Ph,allowedCredentialTypes:Ch,description:"Introspect the resolved RuntimeContext (minus secrets)"},{id:"capabilities.list",operation:"List registered capabilities",requiredScopes:[],allowedSurfaces:Ph,allowedCredentialTypes:Ch,description:"List all capabilities the registry knows about"},{id:"explain-denial.read",operation:"Explain a denial decision",requiredScopes:["audit:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Look up a decision id + return the full ctx + reason"},{id:"replay.execute",operation:"Replay a historical billing period",requiredScopes:["replay:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Re-run billing for a past period; verify deltas"},{id:"rollback.execute",operation:"Execute a GitHub-driven product rollback",requiredScopes:["rollback:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revert product.config.ts to a previous commit (dry-run capable)"},{id:"api.invoke",operation:"Invoke a consumer-facing gateway route",requiredScopes:[],allowedSurfaces:Kk,allowedCredentialTypes:Gl,description:"Consumer-side traffic into a deployed product (catch-all). The EntitlementEngine + RuntimeLimitEngine handle the fine-grained gating; this capability is the umbrella entry-point."}],AN=Object.freeze(Wk);var qk=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","SubscriptionTransitionWorkflow","CompiledPlanLifecycleWorkflow","ShardReshardWorkflow","MaintenanceJobWorkflow"],RN=a.enum(qk),Jk=["transient","permanent","rollback-required","human-intervention"],DN=a.enum(Jk);var Yk=["SAFE_AUTOMATIC","REQUIRES_APPROVAL","IRREVERSIBLE","BILLING_IMPACTING","EDGE_BREAKING"],zN=a.enum(Yk);var ZN=a.object({workflowExecutionId:a.string().min(1),eventType:a.string().min(1),phase:a.string().min(1).optional(),stepId:a.string().min(1).optional(),cohortKey:a.string().min(1).optional(),payload:a.record(a.string(),a.unknown()),occurredAt:a.string().min(1),correlationId:a.string().min(1).optional()}).transform(e=>({...e,workflowExecutionId:e.workflowExecutionId,stepId:e.stepId===void 0?void 0:e.stepId}));var Xk=["GATEWAY","HOSTED_UI_PAGE","HOSTED_UI_PROXY"],Qk=["platform_requests"],eS=a.object({requestId:a.string().optional(),productId:a.string().optional(),route:a.string().optional(),usageEventId:a.string().optional()}).strict(),tS=a.object({organizationId:a.string().min(1),source:a.enum(Xk),dimension:a.enum(Qk),quantity:a.number().int().positive(),idempotencyKey:a.string().min(1).max(512),occurredAt:a.string().datetime(),metadata:eS.optional()}).strict(),lR=a.object({entries:a.array(tS).min(1).max(500)});var ne={VALIDATION_ERROR:"VALIDATION_ERROR",CONFLICT:"CONFLICT",NOT_FOUND:"NOT_FOUND",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",NOT_CONFIGURED:"NOT_CONFIGURED",INTERNAL_ERROR:"INTERNAL_ERROR",SERVICE_UNAVAILABLE:"SERVICE_UNAVAILABLE",RATE_LIMIT_EXCEEDED:"RATE_LIMIT_EXCEEDED",DELETE_CONFIRMATION_REQUIRED:"DELETE_CONFIRMATION_REQUIRED",MISSING_HOST:"MISSING_HOST",MISSING_CONNECTIONS:"MISSING_CONNECTIONS",SECRET_NOT_CONFIGURED:"SECRET_NOT_CONFIGURED",UNAUTHORIZED:"UNAUTHORIZED",FORBIDDEN:"FORBIDDEN",INVALID_ACCESS_KEY:"INVALID_ACCESS_KEY",AUTO_KEY_CREATION_FAILED:"AUTO_KEY_CREATION_FAILED",PERSONA_NOT_FOUND:"PERSONA_NOT_FOUND",PERSONA_REVOKED:"PERSONA_REVOKED",PERSONA_SESSIONS_NOT_SUPPORTED:"PERSONA_SESSIONS_NOT_SUPPORTED",NOT_TEST_PERSONA_ENV:"NOT_TEST_PERSONA_ENV",PERSONA_AUTH_DISABLED_IN_PROD:"PERSONA_AUTH_DISABLED_IN_PROD",MAKER_TOKEN_NOT_FOUND:"MAKER_TOKEN_NOT_FOUND",MAKER_TOKEN_NOT_REVOKED:"MAKER_TOKEN_NOT_REVOKED",MAKER_TOKEN_NO_PRODUCT:"MAKER_TOKEN_NO_PRODUCT",MAKER_TOKEN_REVOKED:"MAKER_TOKEN_REVOKED",ORGANIZATION_NOT_FOUND:"ORGANIZATION_NOT_FOUND",ORG_HAS_ACTIVE_SUBSCRIPTIONS:"ORG_HAS_ACTIVE_SUBSCRIPTIONS",ORG_HAS_OUTSTANDING_BALANCE:"ORG_HAS_OUTSTANDING_BALANCE",PERSONAL_ORG_NOT_DELETABLE:"PERSONAL_ORG_NOT_DELETABLE",MEMBER_NOT_FOUND:"MEMBER_NOT_FOUND",INVITATION_NOT_FOUND:"INVITATION_NOT_FOUND",CUSTOMER_NOT_FOUND:"CUSTOMER_NOT_FOUND",PRODUCT_NOT_FOUND:"PRODUCT_NOT_FOUND",PRODUCT_DELETE_BLOCKED:"PRODUCT_DELETE_BLOCKED",PRODUCT_REPO_NOT_LINKED:"PRODUCT_REPO_NOT_LINKED",PRODUCT_SCOPE_MISMATCH:"PRODUCT_SCOPE_MISMATCH",YAML_PARSE_ERROR:"YAML_PARSE_ERROR",COMPILATION_NOT_FOUND:"COMPILATION_NOT_FOUND",PLAN_NOT_FOUND:"PLAN_NOT_FOUND",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"PLAN_HAS_ACTIVE_SUBSCRIPTIONS",PLAN_SLUG_CONFLICT:"PLAN_SLUG_CONFLICT",PLAN_UPGRADE_REQUIRED:"PLAN_UPGRADE_REQUIRED",SLUG_CONFLICT:"SLUG_CONFLICT",SLUG_BLOCKED:"SLUG_BLOCKED",SLUG_OFFENSIVE:"SLUG_OFFENSIVE",SLUG_RESERVED:"SLUG_RESERVED",SLUG_IMPERSONATION:"SLUG_IMPERSONATION",SLUG_INVALID_FORMAT:"SLUG_INVALID_FORMAT",SLUG_VALIDATOR_NOT_READY:"SLUG_VALIDATOR_NOT_READY",PRICING_PREVIEW_FAILED:"PRICING_PREVIEW_FAILED",PRICING_REPLAY_FAILED:"PRICING_REPLAY_FAILED",RESERVATION_NOT_FOUND:"RESERVATION_NOT_FOUND",PROMO_CODE_NOT_FOUND:"PROMO_CODE_NOT_FOUND",PROMO_CODE_INVALID:"PROMO_CODE_INVALID",BILLING_EVENT_NOT_FOUND:"BILLING_EVENT_NOT_FOUND",BILLING_NOT_CONFIGURED:"BILLING_NOT_CONFIGURED",SUBSCRIPTION_NOT_READY:"SUBSCRIPTION_NOT_READY",SUBSCRIPTION_FETCH_FAILED:"SUBSCRIPTION_FETCH_FAILED",INVALID_STATE:"INVALID_STATE",DUPLICATE_TRANSITION:"DUPLICATE_TRANSITION",LEGACY_STABLE_NOT_SELF_SERVICE:"LEGACY_STABLE_NOT_SELF_SERVICE",ARCHIVED_TARGET:"ARCHIVED_TARGET",FREE_TO_PAID_VIA_CHECKOUT_ONLY:"FREE_TO_PAID_VIA_CHECKOUT_ONLY",CAPABILITY_LIMIT_EXCEEDED:"CAPABILITY_LIMIT_EXCEEDED",CAPABILITY_CHECK_UNAVAILABLE:"CAPABILITY_CHECK_UNAVAILABLE",STRIPE_NOT_CONFIGURED:"STRIPE_NOT_CONFIGURED",STRIPE_BALANCE_OUTSTANDING:"STRIPE_BALANCE_OUTSTANDING",STRIPE_OPERATION_FAILED:"STRIPE_OPERATION_FAILED",STRIPE_RESYNC_FAILED:"STRIPE_RESYNC_FAILED",CHECKOUT_SESSION_FAILED:"CHECKOUT_SESSION_FAILED",POLAR_PRODUCT_NOT_CONFIGURED:"POLAR_PRODUCT_NOT_CONFIGURED",BILLING_TAX_NOT_ENROLLED:"BILLING_TAX_NOT_ENROLLED",WEBHOOK_NOT_FOUND:"WEBHOOK_NOT_FOUND",WEBHOOK_DISPATCH_FAILED:"WEBHOOK_DISPATCH_FAILED",WEBHOOK_SECRET_NOT_CONFIGURED:"WEBHOOK_SECRET_NOT_CONFIGURED",INVALID_WEBHOOK_SIGNATURE:"INVALID_WEBHOOK_SIGNATURE",MISSING_RAW_BODY:"MISSING_RAW_BODY",WEBHOOK_REDIRECTED:"WEBHOOK_REDIRECTED",MANAGED_BY_CODE:"MANAGED_BY_CODE",GITHUB_CONNECTION_NOT_FOUND:"GITHUB_CONNECTION_NOT_FOUND",GITHUB_NOT_CONNECTED:"GITHUB_NOT_CONNECTED",GITHUB_SYNC_FAILED:"GITHUB_SYNC_FAILED",GITHUB_SYNC_UNAVAILABLE:"GITHUB_SYNC_UNAVAILABLE",GITHUB_TOKEN_FAILED:"GITHUB_TOKEN_FAILED",GIT_PROVIDER_NOT_CONFIGURED:"GIT_PROVIDER_NOT_CONFIGURED",ENVIRONMENT_NOT_FOUND:"ENVIRONMENT_NOT_FOUND",ENVIRONMENT_CLEANUP_FAILED:"ENVIRONMENT_CLEANUP_FAILED",DEPLOYMENT_RUN_NOT_FOUND:"DEPLOYMENT_RUN_NOT_FOUND",BRANCH_NO_MATCHING_ENV:"BRANCH_NO_MATCHING_ENV",APPLY_SPEC_FAILED:"APPLY_SPEC_FAILED",BOOTSTRAP_FAILED:"BOOTSTRAP_FAILED",JOB_ALREADY_RUNNING:"JOB_ALREADY_RUNNING",LOGO_DELETE_FAILED:"LOGO_DELETE_FAILED",LOGO_UPLOAD_FAILED:"LOGO_UPLOAD_FAILED",INVALID_LOGO_FORMAT:"INVALID_LOGO_FORMAT"};var gR={missing_token:ne.UNAUTHORIZED,invalid_token:ne.UNAUTHORIZED,missing_signature:ne.UNAUTHORIZED,malformed_signature:ne.UNAUTHORIZED,unknown_key_id:ne.UNAUTHORIZED,bad_signature:ne.UNAUTHORIZED,expired_signature:ne.UNAUTHORIZED,clock_skew:ne.UNAUTHORIZED,replayed_nonce:ne.UNAUTHORIZED,body_hash_mismatch:ne.UNAUTHORIZED,route_mismatch:ne.UNAUTHORIZED,environment_mismatch:ne.UNAUTHORIZED,jwks_unavailable:ne.SERVICE_UNAVAILABLE,body_too_large:ne.VALIDATION_ERROR};var hR=Object.values(Xf);var Nh={limit_allocator_unavailable:{statuses:[503],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:471"]},limit_exceeded:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:326","engine/enforcement/constraints/quota.ts:69"]},rate_limited:{statuses:[429],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:328","engine/enforcement/constraints/rate-limit.ts:74","engine/pipeline/rate-limit.ts:83"]},credit_exhausted:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:333"]},enforcement_denied:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:335"]},feature_not_enabled:{statuses:[403],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:188"]},invalid_entitlement_shape:{statuses:[503],source:"runtime-inline",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:144"]},unsupported_constraint_schema:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:154"]},enforcement_error:{statuses:[500],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:342"]},enforcement_dependency_unavailable:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:427"]},concurrency_limit_exceeded:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:314"]},concurrency_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:291"]},concurrency_coordinator_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:305"]},key_expired:{statuses:[401],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/credential-validity.ts:33"]},geo_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:44"]},geo_blocked:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:51"]},geo_not_allowed:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:58"]},resource_count_limit_exceeded:{statuses:[403,402],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/resource-count.ts:95","apps/core:routes/internal/gateway-resources.ts:144"]},resolver_rate_limited:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:55"]},resolver_unavailable:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:73"]},credential_resolver_miss_rate_limited:{statuses:[429],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:89"]}},nS=Object.keys(Nh);var rS=new Set([429,503]),vR=new Set(nS.filter(e=>Nh[e].statuses.every(t=>rS.has(t))));var iS=[402,403,429],yR=new Set(iS);var oS={MANAGED_BY_CODE:"This product's contract is managed as code. Edit the Product SDK program in its GitHub repo (product/) and push \u2014 do NOT retry the API. (Branding stays editable via `farthershore product update`.)",UNAUTHORIZED:"Token is invalid or revoked. Run `farthershore auth login` to update it.",FORBIDDEN:"Your token doesn't have access to this resource. Check the org / product scope.",INVALID_ACCESS_KEY:"Token format is wrong. Generate a new one at https://farthershore.com/settings/tokens.",MAKER_TOKEN_REVOKED:"This maker token was revoked. Mint a new one in the product settings.",MAKER_TOKEN_NO_PRODUCT:"Maker token is not bound to a product. Re-create it from the product page.",AUTH_NO_TOKEN:"Pass --token <mk_...> or set FARTHERSHORE_TOKEN, or run interactively in a TTY.",AUTH_INVALID_TOKEN:"Token format is malformed. Maker tokens start with `mk_` and are 30+ characters.",DESTRUCTIVE_OP_REQUIRES_YES:"Destructive ops (delete) require an explicit `--yes` to proceed. This is intentional safety.",PRODUCT_UPDATE_NO_FIELDS:"Pass at least one field flag (--display-name, --origin, --description).",PLAN_UPDATE_NO_FIELDS:"Pass at least one of --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",ENV_NOT_FOUND:"Environment doesn't exist. Use `farthershore env list <product>` to see available envs, or create one with `farthershore env create`.",STRIPE_NOT_CONFIGURED:"Stripe isn't connected on this product. Connect it in the dashboard before running billing operations.",STRIPE_NOT_CONNECTED:"Publishing requires a connected Stripe account. Connect one on the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_NOT_VERIFIED:"Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then re-run `farthershore product publish`.",BILLING_TAX_NOT_ENROLLED:"Stripe Tax isn't enrolled for this account. Enable it from the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_BALANCE_OUTSTANDING:"Customer has an outstanding balance. Resolve the invoice in Stripe before retrying.",CHECKOUT_SESSION_FAILED:"Stripe rejected the checkout request. Check that the plan exists and Stripe credentials are valid.",PRODUCT_NOT_FOUND:"Check the product slug. Run `farthershore` (no args) for a list of products you can see.",PRODUCT_REPO_NOT_LINKED:"Link a GitHub repo to this product before publishing or validating product manifests.",YAML_PARSE_ERROR:"Product manifest is not valid. Run `farthershore build` locally, fix product/ source, then push again for bot validation.",GITHUB_NOT_CONNECTED:"Connect GitHub on the org page before running `init` (it provisions the repo).",BRANCH_NO_MATCHING_ENV:"The current branch isn't mapped to an environment. Add a branch rule in product settings or pass --branch explicitly.",PLAN_NOT_FOUND:"Plan key doesn't exist on this product. Check the `plans` block in your local product manifest.",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"Plan has active subscribers and can't be deleted. Migrate them to another plan first.",PLAN_SLUG_CONFLICT:"Another plan already uses this key. Pick a unique plan key in your manifest.",SLUG_CONFLICT:"This product slug is taken. Pick a different name.",SLUG_BLOCKED:"This slug is reserved or blocked. Pick a different name.",SLUG_RESERVED:"This slug is reserved by Farther Shore. Pick a different name.",SLUG_INVALID_FORMAT:"Slug must be lowercase letters, digits, and hyphens (no leading/trailing hyphen).",DECISION_NOT_FOUND:"No DenialEvent recorded for that decisionId. Verify the id from the original deny response or audit log.",AUTH_UNAUTHORIZED:"Token is missing, expired, or lacks the audit:read scope required to read denial events.",RATE_LIMIT_EXCEEDED:"You've hit the rate limit. Wait a moment and retry.",VALIDATION_ERROR:"Request is malformed. The `details` field has the field-level errors.",CONFLICT:"The resource is in a state that conflicts with the request. Inspect `details` to learn more."};function Kl(e){if(e)return oS[e]}function Dh(e){process.stdout.write(`${JSON.stringify(e,null,2)}
98
- `)}function aS(e,t){return{schema_version:1,ok:!0,op:e,data:t}}function sS(e,t){let r=t.status??0;return{schema_version:1,ok:!1,op:e,error:{code:t.code??"INTERNAL_ERROR",message:t.message,status:r,param:t.param,retryable:lS(r,t.code),details:t.details,hint:Kl(t.code)}}}function B(e,t,r=jh()){if(le()==="json"){Dh(aS(r,e));return}t&&Hd(t)}function cS(e){return e===0?1:e===400||e===422?2:e===401||e===403?3:e===409?4:e>=500?5:1}var uS=new Set(["RATE_LIMIT_EXCEEDED","SERVICE_UNAVAILABLE"]);function lS(e,t){return e>=500||e===429||e===503?!0:t?uS.has(t):!1}function Wl(e,t=jh()){let r=e.status??0;if(le()==="json")Dh(sS(t,e));else{let o=Kl(e.code),n=e.code?` [${e.code}]`:"";process.stderr.write(`Error${n}: ${e.message}
97
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function Fe(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,d={...l},m=u.ref;if(u.ref=null,m){o(m);let h=e.seen.get(m),S=h.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(S)):Object.assign(l,S),Object.assign(l,d),c._zod.parent===m)for(let P in l)P==="$ref"||P==="allOf"||P in d||delete l[P];if(S.$ref&&h.def)for(let P in l)P==="$ref"||P==="allOf"||P in h.def&&JSON.stringify(l[P])===JSON.stringify(h.def[P])&&delete l[P]}let g=c._zod.parent;if(g&&g!==m){o(g);let h=e.seen.get(g);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let S in l)S==="$ref"||S==="allOf"||S in h.def&&JSON.stringify(l[S])===JSON.stringify(h.def[S])&&delete l[S]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())o(c[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 c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(c)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let s=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,s[u.defId]=u.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?n.$defs=s:n.definitions=s);try{let c=JSON.parse(JSON.stringify(n));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ot(t,"input",e.processors),output:Ot(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Y(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Y(o.element,r);if(o.type==="set")return Y(o.valueType,r);if(o.type==="lazy")return Y(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Y(o.innerType,r);if(o.type==="intersection")return Y(o.left,r)||Y(o.right,r);if(o.type==="record"||o.type==="map")return Y(o.keyType,r)||Y(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Y(o.in,r)||Y(o.out,r);if(o.type==="object"){for(let n in o.shape)if(Y(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(Y(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(Y(n,r))return!0;return!!(o.rest&&Y(o.rest,r))}return!1}var $c=(e,t={})=>r=>{let o=je({...r,processors:t});return N(e,o),Le(o,e),Fe(o,e)},Ot=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},s=je({...n??{},target:i,io:t,processors:r});return N(e,s),Le(s,e),Fe(s,e)};var wy={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ic=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof s=="number"&&(n.maxLength=s),c&&(n.format=wy[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),l&&(n.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},Ec=(e,t,r,o)=>{let n=r,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number";let m=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";m?h?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d:typeof i=="number"&&(n.minimum=i),g?h?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof s=="number"&&(n.maximum=s),typeof u=="number"&&(n.multipleOf=u)},wc=(e,t,r,o)=>{r.type="boolean"},Oc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Tc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ac=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Pc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Nc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Cc=(e,t,r,o)=>{r.not={}},Rc=(e,t,r,o)=>{},Dc=(e,t,r,o)=>{},zc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Uc=(e,t,r,o)=>{let n=e._zod.def,i=en(n.entries);i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},jc=(e,t,r,o)=>{let n=e._zod.def,i=[];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");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},Lc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Fc=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},Mc=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=e._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Zc=(e,t,r,o)=>{r.type="boolean"},Vc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Bc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Hc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Gc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Kc=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Wc=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(n.minItems=s),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=N(i.element,t,{...o,path:[...o.path,"items"]})},qc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let s=i.shape;for(let l in s)n.properties[l]=N(s[l],t,{...o,path:[...o.path,"properties",l]});let c=new Set(Object.keys(s)),u=new Set([...c].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=N(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Xr=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,s=n.options.map((c,u)=>N(c,t,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=s:r.anyOf=s},Jc=(e,t,r,o)=>{let n=e._zod.def,i=N(n.left,t,{...o,path:[...o.path,"allOf",0]}),s=N(n.right,t,{...o,path:[...o.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];r.allOf=u},Yc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((g,h)=>N(g,t,{...o,path:[...o.path,s,h]})),l=i.rest?N(i.rest,t,{...o,path:[...o.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:u},l&&n.items.anyOf.push(l),n.minItems=u.length,l||(n.maxItems=u.length)):(n.items=u,l&&(n.additionalItems=l));let{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof m=="number"&&(n.maxItems=m)},Xc=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let d=N(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let m of u)n.patternProperties[m.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=N(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=N(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=s._zod.values;if(l){let d=[...l].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(n.required=d)}},Qc=(e,t,r,o)=>{let n=e._zod.def,i=N(n.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},eu=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},tu=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},nu=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},ru=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.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},iu=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?n.out:n.in:n.out;N(s,t,o);let c=t.seen.get(e);c.ref=s},ou=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},au=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Qr=(e,t,r,o)=>{let n=e._zod.def;N(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},su=(e,t,r,o)=>{let n=e._zod.innerType;N(n,t,o);let i=t.seen.get(e);i.ref=n},Yr={string:Ic,number:Ec,boolean:wc,bigint:Oc,symbol:Tc,null:Ac,undefined:Pc,void:Nc,never:Cc,any:Rc,unknown:Dc,date:zc,enum:Uc,literal:jc,nan:Lc,template_literal:Fc,file:Mc,success:Zc,custom:Vc,function:Bc,transform:Hc,map:Gc,set:Kc,array:Wc,object:qc,union:Xr,intersection:Jc,tuple:Yc,record:Xc,nullable:Qc,nonoptional:eu,default:tu,prefault:nu,catch:ru,pipe:iu,readonly:ou,promise:au,optional:Qr,lazy:su};function ei(e,t){if("_idmap"in e){let o=e,n=je({...t,processors:Yr}),i={};for(let u of o._idmap.entries()){let[l,d]=u;N(d,n)}let s={},c={registry:o,uri:t?.uri,defs:i};n.external=c;for(let u of o._idmap.entries()){let[l,d]=u;Le(n,d),s[l]=Fe(n,d)}if(Object.keys(i).length>0){let u=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:i}}return{schemas:s}}let r=je({...t,processors:Yr});return N(e,r),Le(r,e),Fe(r,e)}var ti=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=je({processors:Yr,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 N(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)),Le(this.ctx,t);let o=Fe(this.ctx,t),{"~standard":n,...i}=o;return i}};var kp={};var bn={};Se(bn,{ZodAny:()=>Pu,ZodArray:()=>Du,ZodBase64:()=>ki,ZodBase64URL:()=>Si,ZodBigInt:()=>zt,ZodBigIntFormat:()=>Ei,ZodBoolean:()=>Dt,ZodCIDRv4:()=>yi,ZodCIDRv6:()=>xi,ZodCUID:()=>pi,ZodCUID2:()=>fi,ZodCatch:()=>rl,ZodCodec:()=>Pn,ZodCustom:()=>Nn,ZodCustomStringFormat:()=>Ct,ZodDate:()=>En,ZodDefault:()=>Yu,ZodDiscriminatedUnion:()=>Uu,ZodE164:()=>$i,ZodEmail:()=>li,ZodEmoji:()=>di,ZodEnum:()=>Pt,ZodExactOptional:()=>Wu,ZodFile:()=>Gu,ZodFunction:()=>pl,ZodGUID:()=>xn,ZodIPv4:()=>vi,ZodIPv6:()=>bi,ZodIntersection:()=>ju,ZodJWT:()=>Ii,ZodKSUID:()=>_i,ZodLazy:()=>ll,ZodLiteral:()=>Hu,ZodMAC:()=>$u,ZodMap:()=>Vu,ZodNaN:()=>ol,ZodNanoID:()=>mi,ZodNever:()=>Cu,ZodNonOptional:()=>Ni,ZodNull:()=>Tu,ZodNullable:()=>Ju,ZodNumber:()=>Rt,ZodNumberFormat:()=>Qe,ZodObject:()=>On,ZodOptional:()=>Pi,ZodPipe:()=>An,ZodPrefault:()=>Qu,ZodPreprocess:()=>al,ZodPromise:()=>ml,ZodReadonly:()=>sl,ZodRecord:()=>At,ZodSet:()=>Bu,ZodString:()=>Nt,ZodStringFormat:()=>D,ZodSuccess:()=>nl,ZodSymbol:()=>wu,ZodTemplateLiteral:()=>ul,ZodTransform:()=>Ku,ZodTuple:()=>Fu,ZodType:()=>I,ZodULID:()=>gi,ZodURL:()=>In,ZodUUID:()=>xe,ZodUndefined:()=>Ou,ZodUnion:()=>Tn,ZodUnknown:()=>Nu,ZodVoid:()=>Ru,ZodXID:()=>hi,ZodXor:()=>zu,_ZodString:()=>ui,_default:()=>Xu,_function:()=>Nf,any:()=>uf,array:()=>wn,base64:()=>Hp,base64url:()=>Gp,bigint:()=>rf,boolean:()=>Eu,catch:()=>il,check:()=>Cf,cidrv4:()=>Vp,cidrv6:()=>Bp,codec:()=>Of,cuid:()=>Dp,cuid2:()=>zp,custom:()=>Rf,date:()=>df,describe:()=>Df,discriminatedUnion:()=>_f,e164:()=>Kp,email:()=>Ip,emoji:()=>Cp,enum:()=>Ti,exactOptional:()=>qu,file:()=>$f,float32:()=>Qp,float64:()=>ef,function:()=>Nf,guid:()=>Ep,hash:()=>Xp,hex:()=>Yp,hostname:()=>Jp,httpUrl:()=>Np,instanceof:()=>Uf,int:()=>si,int32:()=>tf,int64:()=>of,intersection:()=>Lu,invertCodec:()=>Tf,ipv4:()=>Fp,ipv6:()=>Zp,json:()=>Lf,jwt:()=>Wp,keyof:()=>mf,ksuid:()=>Lp,lazy:()=>dl,literal:()=>Sf,looseObject:()=>gf,looseRecord:()=>bf,mac:()=>Mp,map:()=>yf,meta:()=>zf,nan:()=>wf,nanoid:()=>Rp,nativeEnum:()=>kf,never:()=>wi,nonoptional:()=>tl,null:()=>Au,nullable:()=>Sn,nullish:()=>If,number:()=>Iu,object:()=>pf,optional:()=>kn,partialRecord:()=>vf,pipe:()=>ci,prefault:()=>el,preprocess:()=>Ff,promise:()=>Pf,readonly:()=>cl,record:()=>Zu,refine:()=>fl,set:()=>xf,strictObject:()=>ff,string:()=>yn,stringFormat:()=>qp,stringbool:()=>jf,success:()=>Ef,superRefine:()=>gl,symbol:()=>sf,templateLiteral:()=>Af,transform:()=>Ai,tuple:()=>Mu,uint32:()=>nf,uint64:()=>af,ulid:()=>Up,undefined:()=>cf,union:()=>Oi,unknown:()=>Xe,url:()=>Pp,uuid:()=>wp,uuidv4:()=>Op,uuidv6:()=>Tp,uuidv7:()=>Ap,void:()=>lf,xid:()=>jp,xor:()=>hf});var ni={};Se(ni,{endsWith:()=>yt,gt:()=>be,gte:()=>J,includes:()=>vt,length:()=>Ye,lowercase:()=>ht,lt:()=>ve,lte:()=>re,maxLength:()=>Je,maxSize:()=>Ue,mime:()=>xt,minLength:()=>we,minSize:()=>ye,multipleOf:()=>ze,negative:()=>Kr,nonnegative:()=>qr,nonpositive:()=>Wr,normalize:()=>kt,overwrite:()=>de,positive:()=>Gr,property:()=>Jr,regex:()=>gt,size:()=>qe,slugify:()=>Et,startsWith:()=>bt,toLowerCase:()=>$t,toUpperCase:()=>It,trim:()=>St,uppercase:()=>_t});var Tt={};Se(Tt,{ZodISODate:()=>ii,ZodISODateTime:()=>ri,ZodISODuration:()=>ai,ZodISOTime:()=>oi,date:()=>uu,datetime:()=>cu,duration:()=>du,time:()=>lu});var ri=p("ZodISODateTime",(e,t)=>{La.init(e,t),D.init(e,t)});function cu(e){return Vs(ri,e)}var ii=p("ZodISODate",(e,t)=>{Fa.init(e,t),D.init(e,t)});function uu(e){return Bs(ii,e)}var oi=p("ZodISOTime",(e,t)=>{Ma.init(e,t),D.init(e,t)});function lu(e){return Hs(oi,e)}var ai=p("ZodISODuration",(e,t)=>{Za.init(e,t),D.init(e,t)});function du(e){return Gs(ai,e)}var Sp=(e,t)=>{an.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>cn(e,r)},flatten:{value:r=>sn(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,at,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,at,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ty=p("ZodError",Sp),ee=p("ZodError",Sp,{Parent:Error});var mu=ut(ee),pu=lt(ee),fu=dt(ee),gu=mt(ee),hu=er(ee),_u=tr(ee),vu=nr(ee),bu=rr(ee),yu=ir(ee),xu=or(ee),ku=ar(ee),Su=sr(ee);var $p=new WeakMap;function $n(e,t,r){let o=Object.getPrototypeOf(e),n=$p.get(o);if(n||(n=new Set,$p.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let s=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var I=p("ZodType",(e,t)=>($.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ot(e,"input"),output:Ot(e,"output")}}),e.toJSONSchema=$c(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>mu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>fu(e,r,o),e.parseAsync=async(r,o)=>pu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>gu(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>hu(e,r,o),e.decode=(r,o)=>_u(e,r,o),e.encodeAsync=async(r,o)=>vu(e,r,o),e.decodeAsync=async(r,o)=>bu(e,r,o),e.safeEncode=(r,o)=>yu(e,r,o),e.safeDecode=(r,o)=>xu(e,r,o),e.safeEncodeAsync=async(r,o)=>ku(e,r,o),e.safeDecodeAsync=async(r,o)=>Su(e,r,o),$n(e,"ZodType",{check(...r){let o=this.def;return this.clone(b.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return W(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(fl(r,o))},superRefine(r,o){return this.check(gl(r,o))},overwrite(r){return this.check(de(r))},optional(){return kn(this)},exactOptional(){return qu(this)},nullable(){return Sn(this)},nullish(){return kn(Sn(this))},nonoptional(r){return tl(this,r)},array(){return wn(this)},or(r){return Oi([this,r])},and(r){return Lu(this,r)},transform(r){return ci(this,Ai(r))},default(r){return Xu(this,r)},prefault(r){return el(this,r)},catch(r){return il(this,r)},pipe(r){return ci(this,r)},readonly(){return cl(this)},describe(r){let o=this.clone();return H.add(o,{description:r}),o},meta(...r){if(r.length===0)return H.get(this);let o=this.clone();return H.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return H.get(e)?.description},configurable:!0}),e)),ui=p("_ZodString",(e,t)=>{We.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Ic(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,$n(e,"_ZodString",{regex(...o){return this.check(gt(...o))},includes(...o){return this.check(vt(...o))},startsWith(...o){return this.check(bt(...o))},endsWith(...o){return this.check(yt(...o))},min(...o){return this.check(we(...o))},max(...o){return this.check(Je(...o))},length(...o){return this.check(Ye(...o))},nonempty(...o){return this.check(we(1,...o))},lowercase(o){return this.check(ht(o))},uppercase(o){return this.check(_t(o))},trim(){return this.check(St())},normalize(...o){return this.check(kt(...o))},toLowerCase(){return this.check($t())},toUpperCase(){return this.check(It())},slugify(){return this.check(Et())}})}),Nt=p("ZodString",(e,t)=>{We.init(e,t),ui.init(e,t),e.email=r=>e.check(Er(li,r)),e.url=r=>e.check(vn(In,r)),e.jwt=r=>e.check(Hr(Ii,r)),e.emoji=r=>e.check(Pr(di,r)),e.guid=r=>e.check(_n(xn,r)),e.uuid=r=>e.check(wr(xe,r)),e.uuidv4=r=>e.check(Or(xe,r)),e.uuidv6=r=>e.check(Tr(xe,r)),e.uuidv7=r=>e.check(Ar(xe,r)),e.nanoid=r=>e.check(Nr(mi,r)),e.guid=r=>e.check(_n(xn,r)),e.cuid=r=>e.check(Cr(pi,r)),e.cuid2=r=>e.check(Rr(fi,r)),e.ulid=r=>e.check(Dr(gi,r)),e.base64=r=>e.check(Zr(ki,r)),e.base64url=r=>e.check(Vr(Si,r)),e.xid=r=>e.check(zr(hi,r)),e.ksuid=r=>e.check(Ur(_i,r)),e.ipv4=r=>e.check(jr(vi,r)),e.ipv6=r=>e.check(Lr(bi,r)),e.cidrv4=r=>e.check(Fr(yi,r)),e.cidrv6=r=>e.check(Mr(xi,r)),e.e164=r=>e.check(Br($i,r)),e.datetime=r=>e.check(cu(r)),e.date=r=>e.check(uu(r)),e.time=r=>e.check(lu(r)),e.duration=r=>e.check(du(r))});function yn(e){return Ls(Nt,e)}var D=p("ZodStringFormat",(e,t)=>{R.init(e,t),ui.init(e,t)}),li=p("ZodEmail",(e,t)=>{Aa.init(e,t),D.init(e,t)});function Ip(e){return Er(li,e)}var xn=p("ZodGUID",(e,t)=>{Oa.init(e,t),D.init(e,t)});function Ep(e){return _n(xn,e)}var xe=p("ZodUUID",(e,t)=>{Ta.init(e,t),D.init(e,t)});function wp(e){return wr(xe,e)}function Op(e){return Or(xe,e)}function Tp(e){return Tr(xe,e)}function Ap(e){return Ar(xe,e)}var In=p("ZodURL",(e,t)=>{Pa.init(e,t),D.init(e,t)});function Pp(e){return vn(In,e)}function Np(e){return vn(In,{protocol:ne.httpProtocol,hostname:ne.domain,...b.normalizeParams(e)})}var di=p("ZodEmoji",(e,t)=>{Na.init(e,t),D.init(e,t)});function Cp(e){return Pr(di,e)}var mi=p("ZodNanoID",(e,t)=>{Ca.init(e,t),D.init(e,t)});function Rp(e){return Nr(mi,e)}var pi=p("ZodCUID",(e,t)=>{Ra.init(e,t),D.init(e,t)});function Dp(e){return Cr(pi,e)}var fi=p("ZodCUID2",(e,t)=>{Da.init(e,t),D.init(e,t)});function zp(e){return Rr(fi,e)}var gi=p("ZodULID",(e,t)=>{za.init(e,t),D.init(e,t)});function Up(e){return Dr(gi,e)}var hi=p("ZodXID",(e,t)=>{Ua.init(e,t),D.init(e,t)});function jp(e){return zr(hi,e)}var _i=p("ZodKSUID",(e,t)=>{ja.init(e,t),D.init(e,t)});function Lp(e){return Ur(_i,e)}var vi=p("ZodIPv4",(e,t)=>{Va.init(e,t),D.init(e,t)});function Fp(e){return jr(vi,e)}var $u=p("ZodMAC",(e,t)=>{Ha.init(e,t),D.init(e,t)});function Mp(e){return Ms($u,e)}var bi=p("ZodIPv6",(e,t)=>{Ba.init(e,t),D.init(e,t)});function Zp(e){return Lr(bi,e)}var yi=p("ZodCIDRv4",(e,t)=>{Ga.init(e,t),D.init(e,t)});function Vp(e){return Fr(yi,e)}var xi=p("ZodCIDRv6",(e,t)=>{Ka.init(e,t),D.init(e,t)});function Bp(e){return Mr(xi,e)}var ki=p("ZodBase64",(e,t)=>{qa.init(e,t),D.init(e,t)});function Hp(e){return Zr(ki,e)}var Si=p("ZodBase64URL",(e,t)=>{Ja.init(e,t),D.init(e,t)});function Gp(e){return Vr(Si,e)}var $i=p("ZodE164",(e,t)=>{Ya.init(e,t),D.init(e,t)});function Kp(e){return Br($i,e)}var Ii=p("ZodJWT",(e,t)=>{Xa.init(e,t),D.init(e,t)});function Wp(e){return Hr(Ii,e)}var Ct=p("ZodCustomStringFormat",(e,t)=>{Qa.init(e,t),D.init(e,t)});function qp(e,t,r={}){return wt(Ct,e,t,r)}function Jp(e){return wt(Ct,"hostname",ne.hostname,e)}function Yp(e){return wt(Ct,"hex",ne.hex,e)}function Xp(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=ne[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return wt(Ct,o,n,t)}var Rt=p("ZodNumber",(e,t)=>{hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Ec(e,o,n,i),$n(e,"ZodNumber",{gt(o,n){return this.check(be(o,n))},gte(o,n){return this.check(J(o,n))},min(o,n){return this.check(J(o,n))},lt(o,n){return this.check(ve(o,n))},lte(o,n){return this.check(re(o,n))},max(o,n){return this.check(re(o,n))},int(o){return this.check(si(o))},safe(o){return this.check(si(o))},positive(o){return this.check(be(0,o))},nonnegative(o){return this.check(J(0,o))},negative(o){return this.check(ve(0,o))},nonpositive(o){return this.check(re(0,o))},multipleOf(o,n){return this.check(ze(o,n))},step(o,n){return this.check(ze(o,n))},finite(){return this}});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 Iu(e){return Ks(Rt,e)}var Qe=p("ZodNumberFormat",(e,t)=>{es.init(e,t),Rt.init(e,t)});function si(e){return qs(Qe,e)}function Qp(e){return Js(Qe,e)}function ef(e){return Ys(Qe,e)}function tf(e){return Xs(Qe,e)}function nf(e){return Qs(Qe,e)}var Dt=p("ZodBoolean",(e,t)=>{mn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wc(e,r,o,n)});function Eu(e){return ec(Dt,e)}var zt=p("ZodBigInt",(e,t)=>{_r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Oc(e,o,n,i),e.gte=(o,n)=>e.check(J(o,n)),e.min=(o,n)=>e.check(J(o,n)),e.gt=(o,n)=>e.check(be(o,n)),e.gte=(o,n)=>e.check(J(o,n)),e.min=(o,n)=>e.check(J(o,n)),e.lt=(o,n)=>e.check(ve(o,n)),e.lte=(o,n)=>e.check(re(o,n)),e.max=(o,n)=>e.check(re(o,n)),e.positive=o=>e.check(be(BigInt(0),o)),e.negative=o=>e.check(ve(BigInt(0),o)),e.nonpositive=o=>e.check(re(BigInt(0),o)),e.nonnegative=o=>e.check(J(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(ze(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function rf(e){return nc(zt,e)}var Ei=p("ZodBigIntFormat",(e,t)=>{ts.init(e,t),zt.init(e,t)});function of(e){return ic(Ei,e)}function af(e){return oc(Ei,e)}var wu=p("ZodSymbol",(e,t)=>{ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tc(e,r,o,n)});function sf(e){return ac(wu,e)}var Ou=p("ZodUndefined",(e,t)=>{rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pc(e,r,o,n)});function cf(e){return sc(Ou,e)}var Tu=p("ZodNull",(e,t)=>{is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ac(e,r,o,n)});function Au(e){return cc(Tu,e)}var Pu=p("ZodAny",(e,t)=>{os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rc(e,r,o,n)});function uf(){return uc(Pu)}var Nu=p("ZodUnknown",(e,t)=>{as.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dc(e,r,o,n)});function Xe(){return lc(Nu)}var Cu=p("ZodNever",(e,t)=>{ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cc(e,r,o,n)});function wi(e){return dc(Cu,e)}var Ru=p("ZodVoid",(e,t)=>{cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nc(e,r,o,n)});function lf(e){return mc(Ru,e)}var En=p("ZodDate",(e,t)=>{us.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>zc(e,o,n,i),e.min=(o,n)=>e.check(J(o,n)),e.max=(o,n)=>e.check(re(o,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 df(e){return pc(En,e)}var Du=p("ZodArray",(e,t)=>{ls.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wc(e,r,o,n),e.element=t.element,$n(e,"ZodArray",{min(r,o){return this.check(we(r,o))},nonempty(r){return this.check(we(1,r))},max(r,o){return this.check(Je(r,o))},length(r,o){return this.check(Ye(r,o))},unwrap(){return this.element}})});function wn(e,t){return hc(Du,e,t)}function mf(e){let t=e._zod.def.shape;return Ti(Object.keys(t))}var On=p("ZodObject",(e,t)=>{ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>qc(e,r,o,n),b.defineLazy(e,"shape",()=>t.shape),$n(e,"ZodObject",{keyof(){return Ti(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Xe()})},loose(){return this.clone({...this._zod.def,catchall:Xe()})},strict(){return this.clone({...this._zod.def,catchall:wi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return b.extend(this,r)},safeExtend(r){return b.safeExtend(this,r)},merge(r){return b.merge(this,r)},pick(r){return b.pick(this,r)},omit(r){return b.omit(this,r)},partial(...r){return b.partial(Pi,this,r[0])},required(...r){return b.required(Ni,this,r[0])}})});function pf(e,t){let r={type:"object",shape:e??{},...b.normalizeParams(t)};return new On(r)}function ff(e,t){return new On({type:"object",shape:e,catchall:wi(),...b.normalizeParams(t)})}function gf(e,t){return new On({type:"object",shape:e,catchall:Xe(),...b.normalizeParams(t)})}var Tn=p("ZodUnion",(e,t)=>{pn.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function Oi(e,t){return new Tn({type:"union",options:e,...b.normalizeParams(t)})}var zu=p("ZodXor",(e,t)=>{Tn.init(e,t),ms.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xr(e,r,o,n),e.options=t.options});function hf(e,t){return new zu({type:"union",options:e,inclusive:!1,...b.normalizeParams(t)})}var Uu=p("ZodDiscriminatedUnion",(e,t)=>{Tn.init(e,t),ps.init(e,t)});function _f(e,t,r){return new Uu({type:"union",options:t,discriminator:e,...b.normalizeParams(r)})}var ju=p("ZodIntersection",(e,t)=>{fs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Jc(e,r,o,n)});function Lu(e,t){return new ju({type:"intersection",left:e,right:t})}var Fu=p("ZodTuple",(e,t)=>{vr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yc(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Mu(e,t,r){let o=t instanceof $,n=o?r:t,i=o?t:null;return new Fu({type:"tuple",items:e,rest:i,...b.normalizeParams(n)})}var At=p("ZodRecord",(e,t)=>{gs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Xc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Zu(e,t,r){return!t||!t._zod?new At({type:"record",keyType:yn(),valueType:e,...b.normalizeParams(t)}):new At({type:"record",keyType:e,valueType:t,...b.normalizeParams(r)})}function vf(e,t,r){let o=W(e);return o._zod.values=void 0,new At({type:"record",keyType:o,valueType:t,...b.normalizeParams(r)})}function bf(e,t,r){return new At({type:"record",keyType:e,valueType:t,mode:"loose",...b.normalizeParams(r)})}var Vu=p("ZodMap",(e,t)=>{hs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gc(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ye(...r)),e.nonempty=r=>e.check(ye(1,r)),e.max=(...r)=>e.check(Ue(...r)),e.size=(...r)=>e.check(qe(...r))});function yf(e,t,r){return new Vu({type:"map",keyType:e,valueType:t,...b.normalizeParams(r)})}var Bu=p("ZodSet",(e,t)=>{_s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kc(e,r,o,n),e.min=(...r)=>e.check(ye(...r)),e.nonempty=r=>e.check(ye(1,r)),e.max=(...r)=>e.check(Ue(...r)),e.size=(...r)=>e.check(qe(...r))});function xf(e,t){return new Bu({type:"set",valueType:e,...b.normalizeParams(t)})}var Pt=p("ZodEnum",(e,t)=>{vs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Uc(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Pt({...t,checks:[],...b.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Pt({...t,checks:[],...b.normalizeParams(n),entries:i})}});function Ti(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Pt({type:"enum",entries:r,...b.normalizeParams(t)})}function kf(e,t){return new Pt({type:"enum",entries:e,...b.normalizeParams(t)})}var Hu=p("ZodLiteral",(e,t)=>{bs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jc(e,r,o,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 Sf(e,t){return new Hu({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(t)})}var Gu=p("ZodFile",(e,t)=>{ys.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mc(e,r,o,n),e.min=(r,o)=>e.check(ye(r,o)),e.max=(r,o)=>e.check(Ue(r,o)),e.mime=(r,o)=>e.check(xt(Array.isArray(r)?r:[r],o))});function $f(e){return _c(Gu,e)}var Ku=p("ZodTransform",(e,t)=>{xs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Hc(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Pe(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(b.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(b.issue(s))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function Ai(e){return new Ku({type:"transform",transform:e})}var Pi=p("ZodOptional",(e,t)=>{br.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function kn(e){return new Pi({type:"optional",innerType:e})}var Wu=p("ZodExactOptional",(e,t)=>{ks.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qr(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function qu(e){return new Wu({type:"optional",innerType:e})}var Ju=p("ZodNullable",(e,t)=>{Ss.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Sn(e){return new Ju({type:"nullable",innerType:e})}function If(e){return kn(Sn(e))}var Yu=p("ZodDefault",(e,t)=>{$s.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xu(e,t){return new Yu({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Qu=p("ZodPrefault",(e,t)=>{Is.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function el(e,t){return new Qu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():b.shallowClone(t)}})}var Ni=p("ZodNonOptional",(e,t)=>{Es.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>eu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function tl(e,t){return new Ni({type:"nonoptional",innerType:e,...b.normalizeParams(t)})}var nl=p("ZodSuccess",(e,t)=>{ws.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zc(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ef(e){return new nl({type:"success",innerType:e})}var rl=p("ZodCatch",(e,t)=>{Os.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ru(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function il(e,t){return new rl({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var ol=p("ZodNaN",(e,t)=>{Ts.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lc(e,r,o,n)});function wf(e){return gc(ol,e)}var An=p("ZodPipe",(e,t)=>{yr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>iu(e,r,o,n),e.in=t.in,e.out=t.out});function ci(e,t){return new An({type:"pipe",in:e,out:t})}var Pn=p("ZodCodec",(e,t)=>{An.init(e,t),fn.init(e,t)});function Of(e,t,r){return new Pn({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Tf(e){let t=e._zod.def;return new Pn({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var al=p("ZodPreprocess",(e,t)=>{An.init(e,t),As.init(e,t)}),sl=p("ZodReadonly",(e,t)=>{Ps.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ou(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function cl(e){return new sl({type:"readonly",innerType:e})}var ul=p("ZodTemplateLiteral",(e,t)=>{Ns.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fc(e,r,o,n)});function Af(e,t){return new ul({type:"template_literal",parts:e,...b.normalizeParams(t)})}var ll=p("ZodLazy",(e,t)=>{Ds.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>su(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function dl(e){return new ll({type:"lazy",getter:e})}var ml=p("ZodPromise",(e,t)=>{Rs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>au(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Pf(e){return new ml({type:"promise",innerType:e})}var pl=p("ZodFunction",(e,t)=>{Cs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bc(e,r,o,n)});function Nf(e){return new pl({type:"function",input:Array.isArray(e?.input)?Mu(e?.input):e?.input??wn(Xe()),output:e?.output??Xe()})}var Nn=p("ZodCustom",(e,t)=>{zs.init(e,t),I.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vc(e,r,o,n)});function Cf(e){let t=new U({check:"custom"});return t._zod.check=e,t}function Rf(e,t){return vc(Nn,e??(()=>!0),t)}function fl(e,t={}){return bc(Nn,e,t)}function gl(e,t){return yc(e,t)}var Df=xc,zf=kc;function Uf(e,t={}){let r=new Nn({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...b.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var jf=(...e)=>Sc({Codec:Pn,Boolean:Dt,String:Nt},...e);function Lf(e){let t=dl(()=>Oi([yn(e),Iu(),Eu(),Au(),wn(t),Zu(yn(),t)]));return t}function Ff(e,t){return new al({type:"pipe",in:Ai(e),out:t})}var Py={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 Ny(e){M({customError:e})}function Cy(){return M().customError}var hl;hl||(hl={});var x={...bn,...ni,iso:Tt},Ry=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 Dy(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 zy(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 o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){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 Mf(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.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 x.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=zy(n,t),s=G(i,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 x.null();if(n.length===0)return x.never();if(n.length===1)return x.literal(n[0]);if(n.every(s=>typeof s=="string"))return x.enum(n);let i=n.map(s=>x.literal(s));return i.length<2?i[0]:x.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let s={...e,type:i};return Mf(s,t)});return n.length===0?x.never():n.length===1?n[0]:x.union(n)}if(!r)return x.any();let o;switch(r){case"string":{let n=x.string();if(e.format){let i=e.format;i==="email"?n=n.check(x.email()):i==="uri"||i==="uri-reference"?n=n.check(x.url()):i==="uuid"||i==="guid"?n=n.check(x.uuid()):i==="date-time"?n=n.check(x.iso.datetime()):i==="date"?n=n.check(x.iso.date()):i==="time"?n=n.check(x.iso.time()):i==="duration"?n=n.check(x.iso.duration()):i==="ipv4"?n=n.check(x.ipv4()):i==="ipv6"?n=n.check(x.ipv6()):i==="mac"?n=n.check(x.mac()):i==="cidr"?n=n.check(x.cidrv4()):i==="cidr-v6"?n=n.check(x.cidrv6()):i==="base64"?n=n.check(x.base64()):i==="base64url"?n=n.check(x.base64url()):i==="e164"?n=n.check(x.e164()):i==="jwt"?n=n.check(x.jwt()):i==="emoji"?n=n.check(x.emoji()):i==="nanoid"?n=n.check(x.nanoid()):i==="cuid"?n=n.check(x.cuid()):i==="cuid2"?n=n.check(x.cuid2()):i==="ulid"?n=n.check(x.ulid()):i==="xid"?n=n.check(x.xid()):i==="ksuid"&&(n=n.check(x.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))),o=n;break}case"number":case"integer":{let n=r==="integer"?x.number().int():x.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)),o=n;break}case"boolean":{o=x.boolean();break}case"null":{o=x.null();break}case"object":{let n={},i=e.properties||{},s=new Set(e.required||[]);for(let[u,l]of Object.entries(i)){let d=G(l,t);n[u]=s.has(u)?d:d.optional()}if(e.propertyNames){let u=G(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?G(e.additionalProperties,t):x.any();if(Object.keys(n).length===0){o=x.record(u,l);break}let d=x.object(n).passthrough(),m=x.looseRecord(u,l);o=x.intersection(d,m);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),d=[];for(let g of l){let h=G(u[g],t),S=x.string().regex(new RegExp(g));d.push(x.looseRecord(S,h))}let m=[];if(Object.keys(n).length>0&&m.push(x.object(n).passthrough()),m.push(...d),m.length===0)o=x.object({}).passthrough();else if(m.length===1)o=m[0];else{let g=x.intersection(m[0],m[1]);for(let h=2;h<m.length;h++)g=x.intersection(g,m[h]);o=g}break}let c=x.object(n);e.additionalProperties===!1?o=c.strict():typeof e.additionalProperties=="object"?o=c.catchall(G(e.additionalProperties,t)):o=c.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let s=n.map(u=>G(u,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?G(i,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(u=>G(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?G(e.additionalItems,t):void 0;c?o=x.tuple(s).rest(c):o=x.tuple(s),typeof e.minItems=="number"&&(o=o.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(x.maxLength(e.maxItems)))}else if(i!==void 0){let s=G(i,t),c=x.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=x.array(x.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function G(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r=Mf(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>G(l,t)),u=x.union(c);r=o?x.intersection(r,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>G(l,t)),u=x.xor(c);r=o?x.intersection(r,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:x.any();else{let c=o?r:G(e.allOf[0],t),u=o?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,G(e.allOf[l],t));r=c}e.nullable===!0&&t.version==="openapi-3.0"&&(r=x.nullable(r)),e.readOnly===!0&&(r=x.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(n[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(n[c]=e[c]);for(let c of Object.keys(e))Ry.has(c)||(n[c]=e[c]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Zf(e,t){if(typeof e=="boolean")return e?x.any():x.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=Dy(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??H};return G(r,i)}var _l={};Se(_l,{bigint:()=>Fy,boolean:()=>Ly,date:()=>My,number:()=>jy,string:()=>Uy});function Uy(e){return Fs(Nt,e)}function jy(e){return Ws(Rt,e)}function Ly(e){return tc(Dt,e)}function Fy(e){return rc(zt,e)}function My(e){return fc(En,e)}M(xr());var Vf=a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),vl=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),c:a.number().nonnegative(),agg:Vf.default("COUNT").optional(),valueProperty:a.string().optional(),uniqueProperty:a.string().optional()}),Zy=a.object({kind:a.literal("credential_validity")}),Vy=a.object({kind:a.literal("track_only_bypass")}),By=a.object({kind:a.literal("lifecycle_block"),blockOn:a.array(a.string()).default(["SUSPENDED","CANCELLED","INACTIVE"]),code:a.string().default("subscription_inactive")}),Hy=a.object({kind:a.literal("identity_requirement"),require:a.enum(["org_only","org_and_user"]).default("org_only")}),Gy=a.object({kind:a.literal("scope"),requireExplicit:a.boolean().default(!0)}),Ky=a.object({kind:a.literal("feature_gate"),feature:a.string().min(1).max(120)}),Wy=a.object({kind:a.literal("geo_restriction"),allow:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional(),block:a.array(a.string().length(2).regex(/^[A-Z]{2}$/)).optional()}).refine(e=>e.allow!==void 0||e.block!==void 0,{message:"geo_restriction requires either `allow` or `block`"}),qy=a.enum(["fixed_window","sliding_window","token_bucket"]),Jy=vl.extend({kind:a.literal("rate_limit"),m:a.enum(["e","t"]).default("e"),strategy:qy.default("fixed_window"),bucket_capacity:a.number().positive().optional(),refill_rate_per_second:a.number().positive().optional()}).superRefine((e,t)=>{e.strategy==="token_bucket"?(e.bucket_capacity===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `bucket_capacity` (positive number)",path:["bucket_capacity"]}),e.refill_rate_per_second===void 0&&t.addIssue({code:"custom",message:"token_bucket strategy requires `refill_rate_per_second` (positive number)",path:["refill_rate_per_second"]})):(e.bucket_capacity!==void 0&&t.addIssue({code:"custom",message:`bucket_capacity is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["bucket_capacity"]}),e.refill_rate_per_second!==void 0&&t.addIssue({code:"custom",message:`refill_rate_per_second is only valid when strategy === 'token_bucket' (got '${e.strategy}')`,path:["refill_rate_per_second"]}))}),Yy=a.enum(["fixed_window","sliding_window"]),Xy=vl.extend({kind:a.literal("quota"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"]),strategy:Yy.default("fixed_window")}),Qy=vl.extend({kind:a.literal("credit_balance"),ovr:a.enum(["BLOCK","ALLOW_AND_BILL"])}),ex=a.object({kind:a.literal("concurrency"),capability:a.string().min(1).max(120),limit:a.number().int().positive(),lease_ttl_seconds:a.number().int().positive().max(3600).default(60)}),tx=a.object({kind:a.literal("capability_limit"),capability:a.string().min(1).max(120),limit:a.union([a.number().int().nonnegative(),a.boolean()])}),nx=a.object({kind:a.literal("resource_count"),resource:a.string().min(1).max(120),limit:a.number().int().nonnegative(),actionId:a.string().min(1).max(160).optional()}),rx=a.object({kind:a.literal("reservation"),dimension:a.string().min(1).max(120),max_outstanding:a.number().int().positive(),hold_seconds:a.number().int().positive().max(86400)}),bl=a.discriminatedUnion("kind",[Zy,Vy,By,Hy,Gy,Ky,Wy,Jy,Xy,Qy,tx,nx,ex,rx]);var rT=a.object({keyId:a.string().min(1),orgId:a.string().min(1),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),productId:a.string().min(1),compiledPlanId:a.string().min(1),entitlementHash:a.string().optional(),subjectKey:a.string().min(1),subscriptionId:a.string().min(1),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().optional(),subscriberId:a.string().min(1),apiKeyId:a.string().nullable(),entitlementVersion:a.number(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),expiresAt:a.number().nullable().optional(),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string().min(1),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).readonly().optional(),entitlement:a.record(a.string(),a.unknown()).nullable().optional()});var Bf=a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()}),ix=a.object({id:a.string().min(1),slug:a.string().optional(),transportMode:a.enum(["direct","tunnel"]),verificationRequired:a.boolean().optional(),originUrl:a.string().optional(),originHostname:a.string().optional(),accessCredentialRef:a.string().optional(),policyVersion:a.string().optional()}),iT=a.object({id:a.string().min(1),origin:a.string().min(1),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.object({requests:a.number().optional(),tokens:a.number().optional(),computeMs:a.number().optional(),per_request:a.number().optional()}).catchall(a.number().optional()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(Bf).readonly().optional(),userLimits:a.array(Bf).readonly().optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional(),backends:a.array(ix).optional(),defaultBackendId:a.string().optional(),verificationRequired:a.boolean().optional()});var ox=a.object({perRequestMinUnitsByDim:a.record(a.string(),a.number()).optional(),creditPoolMicros:a.number().optional(),perDimUnitCostMicros:a.record(a.string(),a.number()).optional()}),ax=a.object({source:a.enum(["fixed","provider_catalog"]),meterKey:a.string(),selector:a.string().optional(),measures:a.array(a.string()),catalog:a.string().optional(),pricePolicy:a.string().optional(),markupPercent:a.number().optional(),fixedRatesMicros:a.record(a.string(),a.record(a.string(),a.number())).optional()}),sx=a.object({key:a.string(),display:a.string(),unit:a.string().optional(),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]),window:a.enum(["minute","hour","day","month","billing_period"]),enforcementType:a.string()}),cx=a.object({feature:a.string(),method:a.string(),path:a.string(),meters:a.array(a.string()).optional()}),oT=a.object({v:a.number(),sub:a.string(),compiledPlanId:a.string().min(1),planType:a.string(),ts:a.number(),constraints:a.array(bl),cv:a.number(),dm:a.record(a.string(),a.number()),dmv:a.number().optional(),floor:ox.nullable().optional(),displayDims:a.array(a.number()).optional(),meterSemantics:a.record(a.string(),sx).optional(),rp:a.record(a.string(),ax).optional(),fr:a.array(cx).optional(),sig:a.string().min(1),sigKid:a.string().optional(),environmentId:a.string().optional()}).passthrough();var aT=a.object({subscriptionId:a.string().min(1),activePeriodId:a.string().optional(),activeCompiledPlanId:a.string().min(1),activeEntitlementHash:a.string().optional(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),gracePeriodEndsAt:a.string().optional(),trialEndsAt:a.string().optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),scheduledTransition:a.object({kind:a.string(),timing:a.string(),scheduledFor:a.string(),toCompiledPlanId:a.string().nullable()}).optional(),creditPool:a.object({periodStartMs:a.number(),periodEndMs:a.number(),grantedCents:a.number(),policy:a.enum(["block","allow"]),epoch:a.number()}).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),generation:a.number(),updatedAt:a.string()});var ux=["DRAFT","ACTIVE"],uT=a.enum(ux),lx=["ONBOARDING","ACTIVE","SUSPENDED"],Hf=a.enum(lx),dx=["ACTIVE","REVOKED"],lT=a.enum(dx),mx=["BLOCK","ALLOW_AND_BILL"],Gf=a.enum(mx),px=["ACTIVE","ARCHIVED"],dT=a.enum(px),fx=["ACTIVE","EXPERIMENTAL","LEGACY_STABLE","PHASING_OUT","SUPERSEDED","ARCHIVED"],mT=a.enum(fx);var Ci=[{id:"requests",label:"API requests",description:"Count every call \u2014 the right default for most APIs.",meters:[{key:"requests",display:"Requests",unit:"request"}]},{id:"ai-tokens",label:"AI tokens",description:"LLM-style token metering alongside calls. The gateway can estimate tokens per request and settle actuals from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"tokens_used",display:"Tokens Used",unit:"token"}]},{id:"credits",label:"Credits",description:"Price work in abstract credits (e.g. one image = 5 credits). Report each call's dynamic credit cost through @farthershore/backend.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"credits",display:"Credits",unit:"credit"}]},{id:"spend",label:"Metered spend",description:"Pass-through spend in cents (OpenRouter-style) reported through @farthershore/backend. Pairs with prepaid credit wallets.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"dollars",display:"Spend",unit:"cent"}]},{id:"compute",label:"Compute time",description:"Bill milliseconds of compute, settled from @farthershore/backend reports.",meters:[{key:"requests",display:"Requests",unit:"request"},{key:"compute_ms",display:"Compute Time",unit:"ms"}]}];function Kf(e){let t=e.trim().toLowerCase();return Ci.find(r=>r.id===t)}function Wf(){return Ci.map(e=>e.id)}var gx="FS_RUNTIME_TOKEN";var hx={payload:"x-fs-metering",signature:"x-fs-metering-sig",token:"x-fs-metering-token"};var _T={environmentVariable:gx,presentation:hx.token,storage:"sha256-hash-only"};var qf={missingSignature:"missing_signature",malformedSignature:"malformed_signature",unknownKeyId:"unknown_key_id",jwksUnavailable:"jwks_unavailable",badSignature:"bad_signature",bodyHashMismatch:"body_hash_mismatch",routeMismatch:"route_mismatch",clockSkew:"clock_skew",expiredSignature:"expired_signature",replayedNonce:"replayed_nonce",bodyTooLarge:"body_too_large",environmentMismatch:"environment_mismatch",missingToken:"missing_token",invalidToken:"invalid_token"};var vT=10*1024*1024;var _x=["CHECKOUT_COMPLETED","PLAN_CHANGED","CANCELLED","RESTORED","UNSCHEDULED_CANCELLATION","PRICE_ROLLOVER","PAUSED","RESUMED","PLAN_CHANGE_SCHEDULED","PLAN_CHANGE_ABORTED","SCHEDULE_CREATED","SCHEDULE_UPDATED","SCHEDULE_RELEASED","SCHEDULE_COMPLETED","SCHEDULE_ABORTED","CANCEL_SCHEDULED","PAYMENT_FAILED","PAYMENT_RECOVERED","PAYMENT_RECOVERED_FROM_SUSPENDED","PAYMENT_ACTION_REQUIRED","RECURRING_PAYMENT","REFUND_PROCESSED","DISPUTE_OPENED","DISPUTE_FUNDS_WITHDRAWN","DISPUTE_CLOSED","MIN_SPEND_TRUE_UP"],xT=a.enum(_x);var IT=a.object({fontFamily:a.enum(["sans","serif","mono","system"]).optional(),radius:a.enum(["none","sm","md","lg","full"]).optional(),density:a.enum(["compact","default","comfortable"]).optional(),colorScheme:a.enum(["system","light","dark"]).optional()}).strict().optional();var vx=a.object({d:a.number(),w:a.number(),capacity:a.number(),remaining:a.number(),windowStart:a.number(),windowEnd:a.number()}),bx=a.record(a.string(),vx),yx=a.object({allocations:a.array(a.number()),expiresAt:a.number()}),xx=a.record(a.string(),yx),kx=a.record(a.string(),a.bigint()),AT=a.object({subscriptionId:a.string(),handoffToken:a.string(),targetShardId:a.string(),policyVersion:a.number(),entitlementVersion:a.number().nullable(),windowStates:bx,activeLeases:xx,totalsByDimension:kx.optional(),billingCycleId:a.string().nullable().optional(),billingCycleStartMs:a.number().optional()});var Sx={gatewayProjectRead:"gateway:project:read",gatewayResourceWrite:"gateway:resource:write",usageWrite:"usage:write",authzDeniedWrite:"authz-denied:write",reservationAuthorize:"reservation:authorize",reservationFinalize:"reservation:finalize",internalCronRun:"internal:cron:run",personaManage:"persona:manage"},DT=Object.values(Sx);var $x=["managed_frontend","custom_frontend","embedded_sdk","public_api","cli","agent","webhook","admin","internal"],Yf=a.enum($x),Jf=a.string().min(1).max(128),Ix=a.object({d:a.number().int().nonnegative(),w:a.number().int().positive(),rem:a.number(),cap:a.number()}).strict(),Xf=a.object({v:a.literal(1),entV:a.number().int().nonnegative().optional(),entHash:Jf.optional(),featureGrant:a.boolean().optional(),gates:a.array(Jf).max(16).optional(),limits:a.array(Ix).max(16).optional()}).strict();var Ex=a.object({requestId:a.string(),eventId:a.string(),tenantId:a.string(),slug:a.string(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),compiledPlanId:a.string(),subscriberStatus:Hf,subscriptionStatus:a.string(),productId:a.string(),statusCode:a.number(),path:a.string(),latencyMs:a.number(),rawDimsUnits:a.record(a.string(),a.number()),meterSettlements:a.array(a.object({meterId:a.string(),meterType:a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),reserved:a.number(),actual:a.number(),delta:a.number(),dimension:a.number().int().nonnegative(),leaseId:a.string()})).optional(),reportingAttested:a.boolean(),billable:a.boolean(),measureContext:a.record(a.string(),a.unknown()).optional(),creditUnitsConsumed:a.record(a.string(),a.number()).optional(),timestamp:a.number(),environmentId:a.string().nullable().optional(),orgId:a.string().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),subjectKey:a.string().optional(),overageBehavior:Gf.optional(),environment:a.enum(["production","sandbox"]).optional(),surface:Yf.optional(),actionId:a.string().min(1).max(128).optional(),subjectType:a.string().min(1).max(128).optional(),subjectId:a.string().min(1).max(256).optional(),decision:Xf.optional(),leaseId:a.string(),transactionId:a.string(),gatewayMetadata:a.object({shardId:a.string(),policyVersion:a.number().int().nonnegative().optional(),artifactVersion:a.number().int().nonnegative().default(0),artifactHash:a.string().regex(/^sha256_[a-f0-9]{64}$/).optional(),leaseTelemetry:a.object({consumeRequests:a.number().int().nonnegative(),localLeaseHits:a.number().int().nonnegative(),doAllocationAttempts:a.number().int().nonnegative(),doAllocationGrants:a.number().int().nonnegative(),doAllocationDenials:a.number().int().nonnegative(),doUnavailable:a.number().int().nonnegative(),doCircuitOpen:a.number().int().nonnegative(),leaseRefreshSingleflightJoins:a.number().int().nonnegative(),leaseRefreshSingleflightJoinRate:a.number().min(0).max(1),expiredLeasesReaped:a.number().int().nonnegative(),expiredLeaseReclaimedGrant:a.array(a.number().nonnegative()),reconcileRequests:a.number().int().nonnegative(),reconcilePositiveDeltas:a.number().int().nonnegative(),reconcileNoLocalLease:a.number().int().nonnegative(),doReconcileAttempts:a.number().int().nonnegative(),doReconcileFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturns:a.number().int().nonnegative(),unspentLeaseRemainderReturnFailures:a.number().int().nonnegative(),unspentLeaseRemainderReturnedGrant:a.array(a.number().nonnegative()),maxObservedPositiveReconcileDelta:a.array(a.number().nonnegative()),requestToDoRatio:a.number().nonnegative(),localLeaseHitRate:a.number().min(0).max(1),localSpendRate:a.number().min(0).max(1),maxObservedActiveLeases:a.number().int().nonnegative(),maxObservedOutstandingGrant:a.array(a.number().nonnegative()),maxObservedOutstandingGrantRatio:a.number().nonnegative(),maxObservedEmergencyReserveGrant:a.array(a.number().nonnegative()),maxObservedEmergencyReserveGrantRatio:a.number().nonnegative(),maxObservedLeaseGrant:a.array(a.number().nonnegative()),maxObservedLeaseGrantRatio:a.number().nonnegative(),maxObservedLeaseTtlMs:a.number().int().nonnegative()}).optional(),artifactCacheTelemetry:a.object({reads:a.number().int().nonnegative(),l0FreshHits:a.number().int().nonnegative(),l0Misses:a.number().int().nonnegative(),l0StaleServes:a.number().int().nonnegative(),l0StaleIfErrorServes:a.number().int().nonnegative(),l0BlockingRefreshes:a.number().int().nonnegative(),l0SingleflightJoins:a.number().int().nonnegative(),l0EarlyRefreshes:a.number().int().nonnegative(),l1Hits:a.number().int().nonnegative(),l1Misses:a.number().int().nonnegative(),l1Rejected:a.number().int().nonnegative(),l1WriteFailures:a.number().int().nonnegative(),kvHits:a.number().int().nonnegative(),kvMisses:a.number().int().nonnegative(),kvTimeouts:a.number().int().nonnegative(),kvCircuitOpenReads:a.number().int().nonnegative(),resultHits:a.number().int().nonnegative(),resultMisses:a.number().int().nonnegative(),resultDenied:a.number().int().nonnegative(),resultUnavailable:a.number().int().nonnegative(),backgroundRefreshErrors:a.number().int().nonnegative(),l0HitRate:a.number().min(0).max(1),l0SingleflightJoinRate:a.number().min(0).max(1),l0EarlyRefreshRate:a.number().min(0).max(1),l1HitRate:a.number().min(0).max(1),kvHitRate:a.number().min(0).max(1),resultHitRate:a.number().min(0).max(1),staleServeRate:a.number().min(0).max(1)}).optional(),gatewayVersion:a.string()}).passthrough()}).passthrough();var wx=a.object({path:a.string(),code:a.string(),message:a.string()}),BT=a.object({reason:a.literal("schema_validation_failed"),receivedAt:a.string(),rawPayload:a.unknown(),issues:a.array(wx),consumerVersion:a.string().optional(),originalMessageId:a.string().optional()});var yl=["subscription.created","subscription.updated","subscription.canceled","payment.succeeded","payment.failed","rate_limit.exceeded","entitlement.changed","usage.threshold_reached"],Ut=a.enum(yl);var me=a.enum(["immediate","period_end"]),Cn=a.object({default:me.default("period_end"),when:a.object({price_increase:me.optional(),price_decrease:me.optional(),feature_added:me.optional(),feature_removed:me.optional(),limit_increased:me.optional(),limit_reduced:me.optional(),credit_increased:me.optional(),credit_reduced:me.optional(),rating_changed:me.optional()}).strict().default({price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"}),allowImmediatePriceIncrease:a.boolean().default(!1),allowImmediateEntitlementReduction:a.boolean().default(!1)}).strict().superRefine((e,t)=>{(e.when.price_increase??e.default)==="immediate"&&!e.allowImmediatePriceIncrease&&t.addIssue({code:"custom",path:["when","price_increase"],message:"price_increase cannot switch immediately without allowImmediatePriceIncrease: true"});for(let r of["feature_removed","limit_reduced","credit_reduced"])(e.when[r]??e.default)==="immediate"&&!e.allowImmediateEntitlementReduction&&t.addIssue({code:"custom",path:["when",r],message:`${r} cannot switch immediately without allowImmediateEntitlementReduction: true`})});var Ox=a.object({kind:a.literal("credit"),amount_cents:a.number().int().nonnegative(),recurs:a.boolean().optional(),expires_after_days:a.number().int().positive().optional(),label:a.string().min(1).max(120).optional()}),Tx=a.object({kind:a.literal("top_up"),sku:a.string().min(1).max(120),label:a.string().min(1).max(200),price_cents:a.number().int().positive(),credit_cents:a.number().int().positive()}),pe=a.discriminatedUnion("kind",[Ox,Tx]);function Qf(e){return e.kind==="credit"&&e.recurs===!0&&e.label===void 0}function eg(e){return e.kind==="credit"&&e.recurs!==!0&&e.label===void 0}function xl(e,t,r=["grants"]){if(!e)return;let o=0,n=0;for(let i of e)Qf(i)?o+=1:eg(i)&&(n+=1);o>1&&t.addIssue({code:"custom",message:"At most one recurring `credit` grant (recurs:true, no label) is allowed \u2014 recurring credit is a single canonical entry.",path:r}),n>1&&t.addIssue({code:"custom",message:"At most one one-time `credit` grant (recurs:false, no label) is allowed \u2014 one-time credit is a single canonical entry.",path:r})}function tg(e){return e.grants&&e.grants.length>0?[...e.grants]:[]}function Rn(e){return tg(e).find(Qf)?.amount_cents??0}function jt(e){return tg(e).find(eg)?.amount_cents??0}var Ax=a.object({percent:a.number().int().min(0).max(100)}),Px=a.object({threshold_cents:a.number().int().nonnegative(),refill_cents:a.number().int().positive()}),Te=a.object({rollover:Ax.optional(),auto_recharge:Px.optional()});var ng=a.enum(["linear","active_count"]);var Nx=a.object({up_to:a.number().int().positive().nullable(),price_per_unit_micros:a.number().int().nonnegative()}),Cx=a.object({strategy:a.enum(["graduated","volume"]),tiers:a.array(Nx).min(1).max(20)}),fe=a.object({dimension:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter dimension must be lowercase alphanumeric with underscores"),kind:ng.default("linear"),price_per_unit_micros:a.number().int().nonnegative().default(0),tiered:Cx.optional(),included_units:a.number().int().positive().optional()}).superRefine((e,t)=>{if(e.tiered&&e.price_per_unit_micros>0&&t.addIssue({code:"custom",message:"`tiered` is mutually exclusive with a non-zero `price_per_unit_micros` \u2014 drop one",path:["tiered"]}),e.included_units!==void 0&&e.tiered&&t.addIssue({code:"custom",message:"`included_units` is mutually exclusive with `tiered` \u2014 a tiered schedule already expresses the included allotment as a zero-priced first tier",path:["included_units"]}),e.tiered){let r=0,o=!1;for(let n=0;n<e.tiered.tiers.length;n++){let i=e.tiered.tiers[n];if(o){t.addIssue({code:"custom",message:"Open-ended tier (`up_to: null`) must be the final tier",path:["tiered","tiers",n,"up_to"]});break}if(i.up_to===null){o=!0;continue}i.up_to<=r&&t.addIssue({code:"custom",message:`Tier upper bounds must be strictly ascending (tier ${n} = ${i.up_to} <= previous ${r})`,path:["tiered","tiers",n,"up_to"]}),r=i.up_to}o||t.addIssue({code:"custom",message:"The final tier of a `tiered` schedule must be open-ended (`up_to: null`)",path:["tiered","tiers",e.tiered.tiers.length-1,"up_to"]})}}),Ae=a.enum(["month","year"]),Rx=a.object({meters:a.array(fe).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Ae.default("month"),grants:a.array(pe).max(40).default([]),creditPolicy:Te.optional(),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional()});var Dx=a.string().min(1),zx=a.object({type:a.literal("named"),name:a.enum(["second","minute","hour","day","week","month"])}),Ux=a.object({type:a.literal("custom"),seconds:a.number().int().positive(),label:a.string().optional()}),jx=a.discriminatedUnion("type",[zx,Ux]),Me=a.object({dimension:Dx,window:jx,capacity:a.number().nonnegative(),enforcement:a.enum(["enforce","track"]).optional(),acknowledgeUnreachable:a.boolean().optional()}),oA=a.array(Me).max(20);var Lx=a.enum(["NONE","PRORATE","CREDIT"]).default("NONE"),Fx={meters:a.array(fe).default([]),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Ae.default("month"),trial_days:a.number().int().nonnegative().default(0),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(pe).max(40).default([]),creditPolicy:Te.optional()},Mx={meters:a.array(fe).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Ae.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),grants:a.array(pe).max(40).optional(),creditPolicy:Te.optional()},Zx=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Variant id must be lowercase alphanumeric with hyphens/underscores"),label:a.string().max(200).optional(),rolloutPercent:a.number().int().min(0).max(100),assignmentSeed:a.string().min(1).max(100).default("default"),prorationOnRollback:Lx,...Mx,limits:a.array(Me).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional()}),rg=Zx.superRefine((e,t)=>{xl(e.grants,t)}),ig=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Plan key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),details:a.array(a.string().max(200)).max(10).optional(),...Fx,free:a.boolean().default(!1),limits:a.array(Me).max(20).default([]),featureGates:a.record(a.string(),a.boolean()).optional(),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),overageBehavior:a.enum(["block","allow_and_bill"]).default("block"),selfServeEnabled:a.boolean().default(!0),legacy:a.boolean().optional().default(!1),variants:a.array(rg).max(4).optional(),archive:a.object({at:a.string().datetime().optional(),transitionTo:a.string().optional(),strategy:a.enum(["auto","explicit","block"]).default("auto")}).optional()}),Ri=ig.superRefine((e,t)=>{xl(e.grants,t)});var Vx=/^\$\{[A-Z][A-Z0-9_]{0,127}\}$/,kl=a.string().min(3).max(200).refine(e=>Vx.test(e),{message:"secret must use ${VAR} interpolation syntax (e.g. ${WEBHOOK_SECRET}); raw secrets in YAML are rejected. Define the env var in the per-product secret store and reference it here."}),Sl=a.object({maxAttempts:a.number().int().min(1).max(20).default(5),backoff:a.enum(["exponential","fixed"]).default("exponential")}),$l=a.object({id:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Webhook endpoint id must be lowercase alphanumeric with hyphens/underscores"),url:a.string().url("webhooks.endpoints[].url must be a valid URL"),secret:kl,events:a.array(Ut).min(1,"webhooks.endpoints[].events must subscribe to \u2265 1 event"),enabled:a.boolean().default(!0),retryPolicy:Sl.default({maxAttempts:5,backoff:"exponential"})}),Il=a.object({endpoints:a.array($l).max(50).default([])});var Bx=a.object({meters:a.array(fe).optional(),recurring_fee_cents:a.number().int().nonnegative().optional(),billing_interval:Ae.optional(),grants:a.array(pe).max(40).optional(),creditPolicy:Te.optional(),trial_days:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),limits:a.array(Me).max(20).optional(),featureGates:a.record(a.string(),a.boolean()).optional(),overageBehavior:a.enum(["block","allow_and_bill"]).optional(),selfServeEnabled:a.boolean().optional(),legacy:a.boolean().optional()}).strict(),Hx=a.object({url:a.string().url().optional(),secret:kl.optional(),events:a.array(Ut).optional(),enabled:a.boolean().optional(),retryPolicy:Sl.partial().optional()}).strict(),Gx=a.object({plans:a.record(a.string(),Bx).optional(),webhooks:a.object({endpoints:a.record(a.string(),Hx).optional()}).strict().optional()}).strict(),El=a.record(a.string().min(1).max(64),Gx);var og=1,ag=["plans_table","usage_card","api_keys_panel","billing_summary","credit_balance","feature_panel","product_docs","audit_log","team_panel","markdown"],sg=["/","/pricing","/dashboard","/dashboard/*","/settings","/settings/*","/team","/audit-log","/docs","/docs/*","/terms","/privacy","/persona","/persona-sign-in"],cg=a.string().min(1).max(200).regex(/^\/[a-zA-Z0-9_./-]*$/,"path must start with / and contain only [a-zA-Z0-9_./-]"),wl=a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/),ug=a.object({label:a.string().min(1).max(80),path:cg,capability:wl.optional()}),lg=a.enum(ag),dg=a.object({component:lg,props:a.record(a.string().min(1).max(80),a.unknown()).optional(),capability:wl.optional(),gateMode:a.enum(["hide","disable","upsell"]).default("hide")}),mg=a.object({path:cg,title:a.string().min(1).max(120),requiresAuth:a.boolean(),capability:wl.optional(),components:a.array(dg).max(12).default([])}),Ol=a.object({version:a.literal(og),nav:a.array(ug).max(12).default([]),pages:a.array(mg).max(24).default([])}).superRefine((e,t)=>{let r=new Set;e.pages.forEach((o,n)=>{r.has(o.path)&&t.addIssue({code:"custom",message:`duplicate frontend page path "${o.path}"`,path:["pages",n,"path"]}),r.add(o.path),pg(o.path)&&t.addIssue({code:"custom",message:`frontend page path "${o.path}" is reserved by the template`,path:["pages",n,"path"]})})});function pg(e){return sg.some(t=>{if(t.endsWith("/*")){let r=t.slice(0,-2);return e===r||e.startsWith(`${r}/`)}return e===t})}var fg=a.enum(["subscription","subject"]),gg=a.enum(["reported","action_inferred"]),hg=a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),_g=a.object({name:hg,display:a.string().min(1).max(120).optional(),scope:fg.default("subscription"),subjectType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),countSource:gg.default("reported")}).superRefine((e,t)=>{e.scope==="subject"&&!e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is required when resource scope is subject"}),e.scope==="subscription"&&e.subjectType&&t.addIssue({code:"custom",path:["subjectType"],message:"subjectType is only valid for subject-scoped counted resources"})}),Tl=a.array(_g).max(100).default([]);var Kx=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"AddOn key must be lowercase alphanumeric with hyphens/underscores"),name:a.string().min(1).max(100),description:a.string().max(500).optional(),recurring_fee_cents:a.number().int().nonnegative().default(0),billing_interval:Ae.default("month"),meters:a.array(fe).default([]),grants:a.array(pe).max(40).default([]),capability_limits:a.record(a.string().min(1).max(120),a.union([a.number().int().nonnegative(),a.boolean()])).default({}),featureGates:a.record(a.string(),a.boolean()).optional(),selfServeEnabled:a.boolean().default(!0)}),vg=a.record(a.string().min(1).max(64),Kx).default({}),Wx=a.enum(["active","canceled","paused","pending_activation"]),PA=a.object({addOnKey:a.string().min(1).max(64),status:Wx.default("active"),activatedAt:a.string().datetime().optional(),canceledAt:a.string().datetime().nullable().optional(),stripeSubscriptionItemId:a.string().optional()});var bg=/^[a-z0-9][a-z0-9_-]*$/,Al=a.string().min(1).max(64).regex(bg,"backend id must be a lowercase slug ([a-z0-9][a-z0-9_-]*)"),yg=a.enum(["direct","tunnel"]),xg=a.enum(["embedded","sidecar"]);var kg=a.object({mode:yg.default("direct"),runner:xg.optional()}).strict(),Sg=a.object({required:a.boolean().default(!1)}).strict(),$g=a.object({name:a.string().min(1).max(120).optional(),slug:Al.optional(),transport:kg.default({mode:"direct"}),verification:Sg.default({required:!1}),meters:a.array(a.string().min(1).max(64)).max(100).optional(),default:a.boolean().optional(),originUrl:a.string().url().optional(),originHostname:a.string().min(1).max(255).optional()}).strict(),Pl=a.record(Al,$g),Lt=Al,Ft={unknownBackendInRoute:"UNKNOWN_BACKEND_IN_ROUTE",ambiguousDefaultBackend:"AMBIGUOUS_DEFAULT_BACKEND",routeMeterNotAllowedByBackend:"ROUTE_METER_NOT_ALLOWED_BY_BACKEND",unknownMeterInBackend:"UNKNOWN_METER_IN_BACKEND"};function Nl(e){let t=Object.keys(e??{});if(t.length===0)return{defaultId:null,ambiguous:!1};if(t.length===1)return{defaultId:t[0],ambiguous:!1};let r=t.filter(o=>e[o]?.default===!0);return r.length===1?{defaultId:r[0],ambiguous:!1}:{defaultId:null,ambiguous:!0}}var qx=a.string().min(2).max(20).regex(/^\d+(ms|s|m|h)$/,"rate_limit window must look like `60s`, `5m`, `1h`"),Ig=a.object({strategy:a.enum(["token_bucket","sliding_window","fixed_window"]).default("token_bucket"),dimensions:a.array(a.enum(["subscription","credential","ip","route"])).min(1).max(4).default(["subscription"]),limits:a.array(a.object({window:qx,max:a.number().int().positive().max(1e7)})).min(1).max(10),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(100),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(50),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:100,max_window_seconds:60,recovery_threshold:50,degraded_mode:"safe_mode_throttle"})}),Eg=a.object({header_name:a.string().min(1).max(100).default("x-api-key"),upstream_token_source:a.discriminatedUnion("type",[a.object({type:a.literal("none")}),a.object({type:a.literal("static_bearer"),token_secret_ref:a.string().min(1).max(200).describe("Reference into the secret store (e.g. CF Secret name); not the raw token")})]).default({type:"none"}),scope_mode:a.enum(["strict","advisory","off"]).default("strict")}),wg=a.object({max_in_flight:a.number().int().positive().max(1e4),dimensions:a.array(a.enum(["subscription","credential","capability"])).min(1).max(3).default(["subscription"]),capability:a.string().min(1).max(120).optional(),lease_ttl_seconds:a.number().int().positive().max(600).default(30),fail_open:a.object({max_consecutive_failures:a.number().int().positive().default(50),max_window_seconds:a.number().int().positive().default(60),recovery_threshold:a.number().int().positive().default(20),degraded_mode:a.enum(["safe_mode_block","safe_mode_throttle","runtime_killswitch_trigger"]).default("safe_mode_throttle")}).default({max_consecutive_failures:50,max_window_seconds:60,recovery_threshold:20,degraded_mode:"safe_mode_throttle"})}),Og=a.object({max_attempts:a.number().int().min(1).max(5).default(2),retry_on_status:a.array(a.number().int().min(400).max(599)).min(1).max(20).default([502,503,504]),backoff:a.object({initial_ms:a.number().int().positive().max(5e3).default(100),multiplier:a.number().positive().max(10).default(2),jitter:a.enum(["none","full","equal"]).default("equal"),total_budget_ms:a.number().int().positive().max(3e4).default(5e3)}).default({initial_ms:100,multiplier:2,jitter:"equal",total_budget_ms:5e3})}),Tg=a.object({applies_to:a.enum(["request","response","both"]).default("request"),rewrites:a.array(a.object({source:a.string().min(1).max(200),target:a.string().min(1).max(200).nullable()})).min(1).max(20)});var Cl=a.discriminatedUnion("type",[a.object({type:a.literal("rate_limit"),config:Ig}),a.object({type:a.literal("auth"),config:Eg}),a.object({type:a.literal("concurrency"),config:wg}),a.object({type:a.literal("retry"),config:Og}),a.object({type:a.literal("transform"),config:Tg})]);var Di=a.enum(["long","short","blocking"]).default("long"),Ag=a.object({route_types:a.array(a.enum(["http"])).max(5).optional(),meters:a.array(a.string().min(1).max(64)).max(20).optional(),auth_modes:a.array(a.enum(["api_key","oauth2","anonymous"])).max(5).optional()});var Rl=a.intersection(a.object({name:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Policy name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),compatible_with:Ag.default({}),mutation_class:a.enum(["runtime","contractual"]).default("runtime"),cacheProfile:Di}),Cl);var Jx=a.enum(["query","mutation"]),Yx=a.enum(["none","metadata","full"]),Xx=a.object({type:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/),from:a.enum(["header","path_param"]),name:a.string().min(1).max(120)}),Qx=a.object({resource:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),effect:a.enum(["create","delete"])}),Pg=a.object({id:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/),title:a.string().min(1).max(160).optional(),kind:Jx,actorType:a.string().min(1).max(64).regex(/^[a-zA-Z0-9_.:-]+$/).optional(),subject:Xx.optional(),inputSchemaRef:a.string().min(1).max(240).optional(),audit:Yx.default("metadata"),resource:Qx.optional()});var Ng=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]")});function ek(e){let t=e.trim();if(!t)return!1;let[r,o,n]=t.split("-");if(n!==void 0||!/^\d{3}$/.test(r??""))return!1;let i=Number(r),s=o===void 0?i:Number(o);return o!==void 0&&!/^\d{3}$/.test(o)?!1:i>=100&&i<=599&&s>=100&&s<=599&&i<=s}function Cg(e){return e.split(",").every(ek)}var zi=a.union([a.string().min(1).max(100).refine(Cg,{message:"onStatusCodes must be comma-separated HTTP status codes or numeric ranges, e.g. 200-299,304"}),a.array(a.number().int().min(100).max(599)).min(1).max(100)]),Rg=a.object({match:Ng,metering:a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:zi.optional()}).optional(),unmetered:a.boolean().optional(),inheritDefaultMeters:a.boolean().optional(),action:a.string().min(1).max(160).regex(/^[a-z0-9_.:-]+$/).optional(),backend:Lt.optional()}).strict(),Dg=a.object({override_origin:a.string().url("override_origin must be a valid URL").nullable().default(null)}),zg=a.object({rollout_key:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"rollout_key must be lowercase alphanumeric with hyphens/underscores").optional(),required_flags:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(10).optional()}),Dl=a.object({feature:a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/,"feature key must be lowercase alphanumeric with [_.:-]"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),cacheProfile:Di,routes:a.array(Rg).min(1).max(50),upstream:Dg.default({override_origin:null}),policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),runtime:zg.default({}),plans:a.array(a.string().min(1).max(64)).max(20).default([]),actions:a.array(Pg).max(100).optional(),backend:Lt.optional()}).strict();function Ug(e,t){e.usagePricing!==void 0&&t.addIssue({code:"custom",path:["usagePricing"],message:"usagePricing is not supported. Define usage.meters.<key>.rating instead."})}function jg(e,t){e.filter(o=>o.free).length>1&&t.addIssue({code:"custom",path:["plans"],message:"Only one free plan is allowed per product"}),e.forEach((o,n)=>{o.free&&(tk(o,n,t),nk(o,n,t))})}function tk(e,t,r){(Hg(e)??0)!==0&&r.addIssue({code:"custom",path:["plans",t,"recurring_fee_cents"],message:"Free plans must have zero price"})}function nk(e,t,r){e.limits.some(n=>!n.enforcement||n.enforcement==="enforce")||r.addIssue({code:"custom",path:["plans",t,"limits"],message:"Free plans must include at least one hard enforced limit"})}function Lg(e,t){let r=new Map;e.forEach((o,n)=>{if(o.free)return;let i=Hg(o);if(i===void 0||i<=0)return;let s=sk(o,i),c=r.get(s);if(c){t.addIssue({code:"custom",path:["plans",n,"recurring_fee_cents"],message:`Paid plan price duplicates plan "${c}" (${s})`});return}r.set(s,o.key)})}function Fg(e,t){let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=new Set(Object.keys(e.usage?.meters??{}));e.plans.forEach((n,i)=>{let s=n.meters;s&&s.forEach((c,u)=>{let l=c.dimension;typeof l!="string"||l.length===0||r.has(l)||o.has(l)||t.addIssue({code:"custom",path:["plans",i,"meters",u,"dimension"],message:`Plan "${n.key}" prices meter "${l}" but no metering.meters[] entry and no usage.meters[] entry declares it.`})})})}function Mg(e,t){if(!e.features)return;let r=new Set(e.plans.map(o=>o.key));for(let[o,n]of Object.entries(e.features)){if(!n.plans)continue;n.plans.forEach((s,c)=>{r.has(s)||t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" references unknown plan "${s}"`})});let i=new Set;n.plans.forEach((s,c)=>{i.has(s)&&t.addIssue({code:"custom",path:["features",o,"plans",c],message:`Feature "${o}" lists plan "${s}" more than once`}),i.add(s)})}}function Zg(e,t){if(!e.features)return;let r=new Set((e.metering?.meters??[]).map(n=>n.key).filter(n=>typeof n=="string"&&n.length>0)),o=!1;for(let[n,i]of Object.entries(e.features))(i.routes??[]).forEach((c,u)=>{let l=zl(c);l.length!==0&&(o=!0,l.forEach((d,m)=>{r.has(d)||t.addIssue({code:"custom",path:["features",n,"routes",u,"metering",m],message:`Route references unknown meter "${d}". Declare it in metering.meters[].`})}))});o&&r.size===0&&t.addIssue({code:"custom",path:["metering","meters"],message:"One or more routes declare metering keys but `metering.meters[]` is empty. Declare meters at the product level first."})}function rk(e,t){let r=new Map;for(let o of e.plans)r.set(o.key,new Set);if(!e.features){for(let o of r.values())for(let n of t)o.add(n);return r}for(let o of Object.values(e.features))ik(o,r);return r}function ik(e,t){let r=e.plans??[],o=e.routes??[];for(let n of r){let i=t.get(n);if(i)for(let s of o){if(s.unmetered===!0)continue;let c=zl(s);if(c.length>0){for(let u of c)i.add(u);continue}}}}function zl(e){let t=new Set;for(let r of Object.keys(e.metering?.defaults??{}))t.add(r);for(let r of e.metering?.reports??[])t.add(r);for(let r of Object.keys(e.metering?.estimates??{}))t.add(r);return[...t]}function ok(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.dimension=="string"?t.dimension:null}var ak=new Set(["credits"]);function Vg(e,t){if(!e.plans||e.plans.length===0)return;let r=new Set((e.metering?.meters??[]).map(i=>i.key).filter(i=>typeof i=="string"&&i.length>0)),o=new Set(Object.keys(e.usage?.meters??{})),n=rk(e,r);e.plans.forEach((i,s)=>{let c=i.limits??[],u=n.get(i.key)??new Set;c.forEach((l,d)=>{if(l&&typeof l=="object"?l.acknowledgeUnreachable===!0:!1)return;let g=ok(l);g&&(u.has(g)||o.has(g)||ak.has(g)||t.addIssue({code:"custom",path:["plans",s,"limits",d,"meter"],message:`Plan "${i.key}" limits meter "${g}" but no route in any granted feature emits this meter, and the meter is not declared under usage.meters either. Either grant a feature whose routes meter "${g}" to this plan, declare the meter under metering.meters[] or usage.meters, or set acknowledgeUnreachable: true if the limit is intentional (e.g. soft budget).`}))})})}function Bg(e,t){let r=e.backend;if(!r||Object.keys(r).length===0)return;let o=new Set(Object.keys(r)),n=new Set((e.metering?.meters??[]).map(u=>u.key).filter(u=>typeof u=="string"&&u.length>0));for(let[u,l]of Object.entries(r))(l.meters??[]).forEach((d,m)=>{n.has(d)||t.addIssue({code:"custom",path:["backend",u,"meters",m],message:`${Ft.unknownMeterInBackend}: backend "${u}" allows meter "${d}" but no metering.meters[] entry declares it.`})});let{defaultId:i,ambiguous:s}=Nl(r),c=!1;for(let u of Object.values(e.features??{}))for(let l of u.routes??[])l.backend===void 0&&(c=!0);s&&c&&t.addIssue({code:"custom",path:["backend"],message:`${Ft.ambiguousDefaultBackend}: product declares ${o.size} backends but no single default \u2014 mark exactly one backend \`default: true\` or bind every route explicitly.`});for(let[u,l]of Object.entries(e.features??{}))(l.routes??[]).forEach((d,m)=>{let g=d.backend??i;if(d.backend!==void 0&&!o.has(d.backend)){t.addIssue({code:"custom",path:["features",u,"routes",m,"backend"],message:`${Ft.unknownBackendInRoute}: route binds backend "${d.backend}" which is not declared in the product \`backend\` block.`});return}if(!g)return;let S=r[g]?.meters;if(!S)return;let C=new Set(S);for(let P of zl(d))C.has(P)||t.addIssue({code:"custom",path:["features",u,"routes",m,"metering"],message:`${Ft.routeMeterNotAllowedByBackend}: route meters "${P}" but backend "${g}" does not allow it (backend.meters[] = [${S.join(", ")}]).`})})}function Hg(e){return e.recurring_fee_cents}function sk(e,t){return`USD:month:${t}`}var ck=a.object({subdomain:a.string().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,"Subdomain must be lowercase alphanumeric with optional hyphens")}),Gg=a.enum(["exact_pre_request","estimated_then_settled","postpaid","strict_concurrency"]),Ul=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Meter key must be lowercase alphanumeric with underscores"),display:a.string().min(1).max(100),unit:a.string().max(20).optional(),estimate:a.number().finite().nonnegative().optional(),routeDefault:a.number().finite().nonnegative().optional(),enforcementType:Gg.default("estimated_then_settled"),aggregation:a.enum(["SUM","COUNT","MAX","UNIQUE_COUNT","LATEST"]).default("COUNT"),window:a.enum(["minute","hour","day","month","billing_period"]).default("billing_period"),valueProperty:a.string().optional(),uniqueProperty:a.string().optional(),groupBy:a.array(a.string()).optional(),eventCode:a.string().optional()}),Kg=a.string().min(1).max(64).regex(/^[a-z0-9_]+$/,"Usage measure must be lowercase alphanumeric with underscores"),uk=a.enum(["pass_through","markup"]),lk=a.object({source:a.literal("fixed"),rates:a.record(a.string().min(1),a.record(Kg,a.number().int().nonnegative()))}),dk=a.object({source:a.literal("provider_catalog"),catalog:a.string().min(1).max(100),pricePolicy:uk.default("pass_through"),markupPercent:a.number().nonnegative().max(1e4).optional(),marginMicros:a.number().int().nonnegative().optional()}),Wg=a.discriminatedUnion("source",[lk,dk]),qg=a.object({selector:a.string().min(1).max(100).optional(),measures:a.array(Kg).min(1).max(20),rating:Wg.optional()}),Jg=a.object({meters:a.record(a.string().min(1).max(64).regex(/^[a-z0-9_]+$/),qg)}),mk=a.object({defaults:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),reports:a.array(a.string().min(1).max(64)).max(20).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite().nonnegative()).optional(),onStatusCodes:zi.optional()}),Yg=a.object({method:a.enum(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","*"]).default("*"),path:a.string().min(1).max(500).regex(/^\/[a-zA-Z0-9_/:.{}*-]*$/,"path must start with / and contain only [a-zA-Z0-9_/:.{}*-]"),unmetered:a.boolean().optional(),metering:mk.optional(),inheritDefaultMeters:a.boolean().optional(),backend:Lt.optional()}).strict(),jl=a.object({description:a.string().max(500).optional(),routes:a.array(Yg).min(1).max(50),plans:a.array(a.string().min(1)).min(1).max(20)}),Xg=a.record(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/),jl),Qg=a.enum(["report","pull_request"]),eh=a.enum(["safe","non_blocking","economic_risk","blocking"]),th=a.object({cleanup:a.object({enabled:a.boolean().default(!1),mode:Qg.default("report")}).default({enabled:!1,mode:"report"}),change_approval:a.object({auto_merge_max_risk:a.enum(["none","safe","non_blocking"]).default("none"),require_human_for:a.array(eh).default(["economic_risk","blocking"])}).default({auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]})}).default({cleanup:{enabled:!1,mode:"report"},change_approval:{auto_merge_max_risk:"none",require_human_for:["economic_risk","blocking"]}}),nh=a.enum(["org_only","org_and_user"]),rh=a.enum(["clerk","test-personas"]),ih=a.object({identity_requirement:nh.optional(),context_tokens:a.object({enabled:a.boolean().default(!0)}).optional(),portal_auth:a.object({strategy:rh}).optional()}),oh=a.enum(["frontend","api","docs","widget","dashboard","webhook","worker","agent"]),ah=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Surface key must be lowercase alphanumeric with hyphens/underscores"),type:oh,display:a.string().min(1).max(100).optional(),description:a.string().max(500).optional()}),sh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Entitlement key must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),featureGates:a.record(a.string().min(1),a.boolean()).optional(),limits:a.array(Me).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional()}),ch=a.array(ah).max(20).default([]),uh=a.array(sh).max(100).default([]),lh=a.enum(["async_job","agent_task","scheduled","lifecycle","background"]),dh=a.discriminatedUnion("type",[a.object({type:a.literal("manual")}),a.object({type:a.literal("schedule"),cron:a.string().min(1).max(120)}),a.object({type:a.literal("event"),event:a.string().min(1).max(120)}),a.object({type:a.literal("api"),path:a.string().min(1).max(240).regex(/^\//,"path must start with /")}),a.object({type:a.literal("lifecycle"),event:a.string().min(1).max(120)})]),mh=a.object({key:a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/,"Workflow key must be lowercase alphanumeric with hyphens/underscores"),title:a.string().min(1).max(120).optional(),description:a.string().max(1e3).optional(),kind:lh,trigger:dh,capabilities:a.array(a.string().min(1).max(100)).max(100).optional(),meters:a.array(a.string().min(1).max(64)).max(100).optional(),estimates:a.record(a.string().min(1).max(64),a.number().finite()).optional(),metadata:a.record(a.string().min(1),a.unknown()).optional()}),ph=a.array(mh).max(100).default([]),et=a.object({product:a.object({name:a.string().min(1).max(100),displayName:a.string().max(200).optional(),description:a.string().max(2e3).optional(),baseUrl:a.string().url("baseUrl must be a valid URL"),sandboxBaseUrl:a.string().url("sandboxBaseUrl must be a valid URL").optional(),visibility:a.enum(["public","private"]).default("public"),logoUrl:a.string().url().optional(),primaryColor:a.string().regex(/^#[0-9a-fA-F]{6}$/).optional(),envBranchPrefix:a.string().max(50).nullable().optional()}),gateway:a.object({authHeader:a.string().min(1).max(100).default("x-api-key"),upstreamAuth:a.object({type:a.enum(["none","static_bearer"]),token:a.string().optional()}).default({type:"none"})}),metering:a.object({meters:a.array(Ul).max(10).default([]),billOn4xx:a.boolean().default(!1)}).default({meters:[],billOn4xx:!1}),backend:Pl.optional(),usage:Jg.optional(),usagePricing:a.never({error:"usagePricing is not supported. Define usage.meters.<key>.rating instead."}).optional(),features:Xg.optional(),resources:Tl,policies:th,customer_context:ih.optional(),surfaces:ch,entitlements:uh,workflows:ph,frontend:Ol.optional(),billing:a.object({applyLimitUpgradesInstantly:a.boolean().optional(),subscriberChangePolicy:Cn.default({default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1})}).default({subscriberChangePolicy:{default:"period_end",when:{price_increase:"period_end",price_decrease:"immediate",feature_added:"immediate",feature_removed:"period_end",limit_increased:"immediate",limit_reduced:"period_end",credit_increased:"immediate",credit_reduced:"period_end",rating_changed:"period_end"},allowImmediatePriceIncrease:!1,allowImmediateEntitlementReduction:!1}}),plans:a.array(Ri).max(4).default([]),add_ons:vg,lifecycle:a.object({breaking_changes:a.object({require_deprecation_window_days:a.number().int().nonnegative().default(0),require_successor_route:a.boolean().default(!1)}).default({require_deprecation_window_days:0,require_successor_route:!1})}).default({breaking_changes:{require_deprecation_window_days:0,require_successor_route:!1}}),webhooks:Il.optional(),environments:El.optional(),ephemeral:a.object({defaultPlan:a.string().min(1).optional()}).optional()}).superRefine((e,t)=>{Ug(e,t),jg(e.plans,t),Lg(e.plans,t),Fg(e,t),Mg(e,t),Zg(e,t),Vg(e,t),Bg(e,t)}),pk=a.object({product:et.shape.product}),fk=a.object({gateway:et.shape.gateway}),gk=a.object({metering:et.shape.metering}),hk=a.object({plans:et.shape.plans});var Ll=a.object({capability:a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/,"capability name must be lowercase alphanumeric with hyphens/underscores"),description:a.string().max(500).optional(),mutation_class:a.enum(["runtime","contractual"]).default("contractual"),includes_features:a.array(a.string().min(1).max(100).regex(/^[a-z0-9_.:-]+$/)).max(20).default([]),includes_policies:a.array(a.string().min(1).max(64).regex(/^[a-z0-9_-]+$/)).max(20).default([]),includes_capabilities:a.array(a.string().min(1).max(120).regex(/^[a-z0-9_-]+$/)).max(20).default([])});var fh=1;var _k=a.object({irVersion:a.literal(fh),sdkVersion:a.string().min(1).max(64),product:et,routes:a.array(Dl).max(200).default([]),policies:a.array(Rl).max(200).default([]),capabilities:a.array(Ll).max(200).default([])}).strict();var BP=a.object({subscriberChangePolicy:Cn.optional()}),HP=a.object({code:a.string(),kind:a.enum(["percent_off","amount_off","free_months"]),amount:a.number().optional(),durationMonths:a.number(),applicablePlanIds:a.array(a.string()).optional(),maxRedemptions:a.number().optional(),activeFrom:a.string().optional(),activeUntil:a.string().optional(),status:a.enum(["ACTIVE","ARCHIVED"]).optional()}),GP=a.object({id:a.string(),actorUserId:a.string().optional(),action:a.string(),decision:a.string().optional(),timestamp:a.string(),details:a.unknown().optional()}),KP=a.object({name:a.string(),branch:a.string().optional(),isProduction:a.boolean().optional()}),WP=a.object({id:a.string(),name:a.string(),apiKeyId:a.string().optional()});var vk=["IMMEDIATE_NO_PRORATE","IMMEDIATE_PRORATE_CHARGE_NEW","IMMEDIATE_PRORATE_REFUND_OLD","IMMEDIATE_PRORATE_BOTH","DEFER_TO_PERIOD_END"],tN=a.enum(vk);var gh=a.object({id:a.string(),billingCycleId:a.string(),effectiveStart:a.string(),effectiveEnd:a.string(),compiledPlanId:a.string()}),hh=a.object({currentPeriod:gh,priorPeriod:gh.optional()});var bk=a.object({subjectKey:a.string(),subscriptionId:a.string(),subscriberId:a.string(),productId:a.string(),organizationId:a.string(),compiledPlanId:a.string(),activeEntitlementHash:a.string().optional(),generation:a.number(),enforcementMode:a.enum(["STRICT","GRACE","TRACK_ONLY"]),dedicatedShard:a.enum(["ACTIVE","DRAINING"]).optional(),resourceCounts:a.record(a.string(),a.number()).optional(),overrides:a.object({featureGateOverrides:a.record(a.string(),a.boolean()).optional()}).optional(),subscriptionStatus:a.string(),subscriberStatus:a.string(),scopes:a.array(a.string()),periods:hh,expiresAt:a.number().optional(),trialEndsAt:a.string().optional()}),yk=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),state:bk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),sN=a.object({environmentId:a.string().nullable(),subjectKeys:a.array(a.string()).min(1).max(500)}),cN=a.object({results:a.array(a.object({subjectKey:a.string(),result:yk}))}),xk=a.object({keyId:a.string(),orgId:a.string(),productId:a.string(),compiledPlanId:a.string(),entitlementHash:a.string().optional(),subscriptionId:a.string(),subscriberId:a.string(),apiKeyId:a.string().nullable(),subjectKey:a.string(),entitlementVersion:a.number().int(),identityRequirement:a.enum(["org_only","org_and_user"]),status:a.enum(["active","revoked"]),subscriberStatus:a.enum(["ONBOARDING","ACTIVE","SUSPENDED"]),subscriptionStatus:a.string(),environment:a.enum(["production","sandbox"]).optional(),environmentId:a.string().optional(),scopes:a.array(a.string()).default([]),entitlement:a.unknown().optional(),actorType:a.enum(["org","user"]).optional(),actorId:a.string().nullable().optional(),currentPeriodId:a.string().optional(),currentPeriodStartMs:a.number().int().nonnegative().optional(),expiresAt:a.number().nullable().optional()}),uN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),record:xk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("revoked"),negativeCacheTtlSeconds:a.number().default(300),reason:a.string().optional()}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),lN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),entitlement:a.unknown(),expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]),kk=a.object({id:a.string(),origin:a.string(),sandboxOrigin:a.string().nullable().optional(),authHeader:a.string().optional(),pricing:a.record(a.string(),a.number()).optional(),metering:a.object({tokens:a.object({estimatePerRequest:a.number().optional()}).optional(),computeMs:a.object({estimatePerRequest:a.number().optional()}).optional(),billOn4xx:a.boolean().optional()}).optional(),tenantLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),userLimits:a.array(a.object({unit:a.enum(["requests","tokens","computeMs","dollars"]),window:a.enum(["second","minute","hour","day","week","month"]),capacity:a.number()})).optional(),environmentId:a.string().optional(),contextTokenSecret:a.string().nullable().optional(),timeoutMs:a.number().positive().optional(),idleTimeoutMs:a.number().positive().optional()}),dN=a.discriminatedUnion("kind",[a.object({kind:a.literal("found"),tenant:kk,expiresAt:a.number(),ttlSeconds:a.number()}),a.object({kind:a.literal("not_found"),negativeCacheTtlSeconds:a.number().default(60)}),a.object({kind:a.literal("rate_limited"),retryAfterSeconds:a.number().default(10)})]);var Ui=["consumer_api_key","consumer_session_token","test_persona_session_token","builder_master_key","builder_session_token","maker_jwt","service_jwt","internal_service","context_token"],_h=a.enum(Ui);var Sk=a.object({fromIssuer:a.string().min(1),fromTokenId:a.string().min(1),intent:a.string().min(1)}),vh=a.object({issuer:a.string().min(1),issuedAt:a.number().int().nonnegative(),expiresAt:a.number().int().nonnegative().optional(),tokenId:a.string().min(1).optional(),delegationChain:a.array(Sk)});var Fl=["template","embedded","provisioned","agent"],$k=a.enum(Fl),Ik=["builder_user","builder_org","maker","consumer_subject","internal_service","service_jwt","agent_runtime"],Ek=a.enum(Ik),bh=a.object({kind:Ek,id:a.string().min(1),label:a.string().optional()}),wk=["subscription","organization","platform"],Ok=a.enum(wk),Tk=a.object({kind:Ok,id:a.string().min(1)}),Ak=a.object({type:_h,id:a.string().min(1),hint:a.string().max(8).optional()}),Pk=a.object({compiledPlanId:a.string().min(1),fromCache:a.boolean().optional()}),yh=a.object({requestId:a.string().min(1),surface:$k,builderOrgId:a.string().min(1),productId:a.string().min(1).optional(),runtimeId:a.string().min(1).optional(),template:a.string().optional(),caller:bh,actor:bh,billingSubject:Tk,credential:Ak,capability:a.string().min(1),scopes:a.array(a.string()),entitlement:Pk.optional(),trust:vh});var Dn;(function(e){e.AUTHZ_DECISION="authz_decision",e.ENTITLEMENT_DECISION="entitlement_decision",e.RUNTIME_LIMIT_DECISION="runtime_limit_decision",e.RESOURCE_GOVERNANCE_DECISION="resource_governance_decision",e.RESOURCE_MUTATION="resource_mutation",e.LIFECYCLE_EVENT="lifecycle_event",e.RUNTIME_CONTEXT_CREATED="runtime_context_created",e.SYSTEM_ACTION="system_action"})(Dn||(Dn={}));var xh=Object.values(Dn),AN=a.enum(xh),kh=a.object({decisionId:a.string().optional(),ctx:yh,details:a.record(a.string(),a.unknown()).optional(),createdAt:a.string().min(1)}),Nk=xh.filter(e=>e!==Dn.SYSTEM_ACTION),Ck=kh.extend({kind:a.enum(Nk)}),Rk=kh.extend({kind:a.literal(Dn.SYSTEM_ACTION),actorType:a.string().min(1),action:a.string().min(1)}),PN=a.discriminatedUnion("kind",[Ck,Rk]);var O=["template","agent"],Dk=["provisioned"],Sh=[...Fl],T=["builder_master_key","builder_session_token","maker_jwt"],Mt=["service_jwt","internal_service"],Ml=["consumer_api_key","consumer_session_token","test_persona_session_token","context_token"],$h=[...Ui],zn="subscriptions:write",zk=[{id:"products.create",operation:"Create a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a new product in the builder org"},{id:"products.update",operation:"Update a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update product metadata or compiled config"},{id:"products.delete",operation:"Delete a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a product (soft-archive if subscriptions exist)"},{id:"products.read",operation:"Read a product",requiredScopes:["products:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read product metadata + compiled config"},{id:"products.publish",operation:"Publish a product",requiredScopes:["products:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Compile + publish the product to the gateway"},{id:"plans.create",operation:"Create a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a new plan to a product"},{id:"plans.update",operation:"Update a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update plan pricing, limits, or features"},{id:"plans.delete",operation:"Delete a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Delete a plan (denied if subscriptions are attached)"},{id:"plans.publish",operation:"Publish a plan",requiredScopes:["plans:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mark a plan as available for new subscriptions"},{id:"subscriptions.create",operation:"Create a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Provision a new subscription for a subscriber"},{id:"subscriptions.update",operation:"Update a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Change plan, enforcement mode, or schedule"},{id:"subscriptions.cancel",operation:"Cancel a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Cancel a subscription (immediate or end-of-period)"},{id:"subscriptions.pause",operation:"Pause a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Pause a subscription (no usage, no billing)"},{id:"subscriptions.resume",operation:"Resume a subscription",requiredScopes:[zn],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Resume a paused subscription"},{id:"subscriptions.read",operation:"Read a subscription",requiredScopes:["subscriptions:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Mt],description:"Read subscription state and usage"},{id:"webhooks.create",operation:"Create a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Register a new webhook endpoint URL"},{id:"webhooks.update",operation:"Update a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update endpoint URL, secret, or subscribed events"},{id:"webhooks.delete",operation:"Delete a webhook endpoint",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a webhook endpoint"},{id:"webhooks.test",operation:"Send a test webhook payload",requiredScopes:["webhooks:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Trigger a synthetic payload to verify an endpoint"},{id:"api-keys.create",operation:"Create an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Mint a new consumer or master API key"},{id:"api-keys.revoke",operation:"Revoke an API key",requiredScopes:["api-keys:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke an API key (immediate invalidation)"},{id:"api-keys.read",operation:"Read API key metadata",requiredScopes:["api-keys:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Read key id + hint + scopes (never the secret)"},{id:"organizations.create",operation:"Create an organization",requiredScopes:["orgs:write"],allowedSurfaces:["template"],allowedCredentialTypes:["builder_session_token"],description:"Create a builder org (top-level signup)"},{id:"organizations.update",operation:"Update an organization",requiredScopes:["orgs:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Update org metadata or billing email"},{id:"members.invite",operation:"Invite a member to an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Send an invitation to join the org"},{id:"members.remove",operation:"Remove a member from an organization",requiredScopes:["members:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revoke a member's access to the org"},{id:"projects.create",operation:"Create a project",requiredScopes:["projects:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Create a project (groups products + environments)"},{id:"environments.create",operation:"Create an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Add a deployment environment (stage / branch)"},{id:"environments.delete",operation:"Delete an environment",requiredScopes:["environments:write"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Remove a deployment environment"},{id:"billing.portal-redirect",operation:"Generate Stripe customer-portal redirect",requiredScopes:["billing:portal"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Ml],description:"Mint a one-time Stripe portal-session redirect URL"},{id:"billing.read",operation:"Read billing state",requiredScopes:["billing:read"],allowedSurfaces:O,allowedCredentialTypes:[...T,...Ml],description:"Read invoices, balances, scheduled changes"},{id:"runtime-context.read",operation:"Read the caller's runtime context",requiredScopes:[],allowedSurfaces:Sh,allowedCredentialTypes:$h,description:"Introspect the resolved RuntimeContext (minus secrets)"},{id:"capabilities.list",operation:"List registered capabilities",requiredScopes:[],allowedSurfaces:Sh,allowedCredentialTypes:$h,description:"List all capabilities the registry knows about"},{id:"explain-denial.read",operation:"Explain a denial decision",requiredScopes:["audit:read"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Look up a decision id + return the full ctx + reason"},{id:"replay.execute",operation:"Replay a historical billing period",requiredScopes:["replay:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Re-run billing for a past period; verify deltas"},{id:"rollback.execute",operation:"Execute a GitHub-driven product rollback",requiredScopes:["rollback:execute"],allowedSurfaces:O,allowedCredentialTypes:T,description:"Revert product.config.ts to a previous commit (dry-run capable)"},{id:"api.invoke",operation:"Invoke a consumer-facing gateway route",requiredScopes:[],allowedSurfaces:Dk,allowedCredentialTypes:Ml,description:"Consumer-side traffic into a deployed product (catch-all). The EntitlementEngine + RuntimeLimitEngine handle the fine-grained gating; this capability is the umbrella entry-point."}],DN=Object.freeze(zk);var Uk=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow","SubscriptionTransitionWorkflow","CompiledPlanLifecycleWorkflow","ShardReshardWorkflow","MaintenanceJobWorkflow"],LN=a.enum(Uk),jk=["transient","permanent","rollback-required","human-intervention"],FN=a.enum(jk);var Lk=["SAFE_AUTOMATIC","REQUIRES_APPROVAL","IRREVERSIBLE","BILLING_IMPACTING","EDGE_BREAKING"],MN=a.enum(Lk);var KN=a.object({workflowExecutionId:a.string().min(1),eventType:a.string().min(1),phase:a.string().min(1).optional(),stepId:a.string().min(1).optional(),cohortKey:a.string().min(1).optional(),payload:a.record(a.string(),a.unknown()),occurredAt:a.string().min(1),correlationId:a.string().min(1).optional()}).transform(e=>({...e,workflowExecutionId:e.workflowExecutionId,stepId:e.stepId===void 0?void 0:e.stepId}));var Fk=["GATEWAY","HOSTED_UI_PAGE","HOSTED_UI_PROXY"],Mk=["platform_requests"],Zk=a.object({requestId:a.string().optional(),productId:a.string().optional(),route:a.string().optional(),usageEventId:a.string().optional()}).strict(),Vk=a.object({organizationId:a.string().min(1),source:a.enum(Fk),dimension:a.enum(Mk),quantity:a.number().int().positive(),idempotencyKey:a.string().min(1).max(512),occurredAt:a.string().datetime(),metadata:Zk.optional()}).strict(),gC=a.object({entries:a.array(Vk).min(1).max(500)});var te={VALIDATION_ERROR:"VALIDATION_ERROR",CONFLICT:"CONFLICT",NOT_FOUND:"NOT_FOUND",NOT_IMPLEMENTED:"NOT_IMPLEMENTED",NOT_CONFIGURED:"NOT_CONFIGURED",INTERNAL_ERROR:"INTERNAL_ERROR",SERVICE_UNAVAILABLE:"SERVICE_UNAVAILABLE",RATE_LIMIT_EXCEEDED:"RATE_LIMIT_EXCEEDED",DELETE_CONFIRMATION_REQUIRED:"DELETE_CONFIRMATION_REQUIRED",MISSING_HOST:"MISSING_HOST",MISSING_CONNECTIONS:"MISSING_CONNECTIONS",SECRET_NOT_CONFIGURED:"SECRET_NOT_CONFIGURED",UNAUTHORIZED:"UNAUTHORIZED",FORBIDDEN:"FORBIDDEN",INVALID_ACCESS_KEY:"INVALID_ACCESS_KEY",AUTO_KEY_CREATION_FAILED:"AUTO_KEY_CREATION_FAILED",PERSONA_NOT_FOUND:"PERSONA_NOT_FOUND",PERSONA_REVOKED:"PERSONA_REVOKED",PERSONA_SESSIONS_NOT_SUPPORTED:"PERSONA_SESSIONS_NOT_SUPPORTED",NOT_TEST_PERSONA_ENV:"NOT_TEST_PERSONA_ENV",PERSONA_AUTH_DISABLED_IN_PROD:"PERSONA_AUTH_DISABLED_IN_PROD",MAKER_TOKEN_NOT_FOUND:"MAKER_TOKEN_NOT_FOUND",MAKER_TOKEN_NOT_REVOKED:"MAKER_TOKEN_NOT_REVOKED",MAKER_TOKEN_NO_PRODUCT:"MAKER_TOKEN_NO_PRODUCT",MAKER_TOKEN_REVOKED:"MAKER_TOKEN_REVOKED",ORGANIZATION_NOT_FOUND:"ORGANIZATION_NOT_FOUND",ORG_HAS_ACTIVE_SUBSCRIPTIONS:"ORG_HAS_ACTIVE_SUBSCRIPTIONS",ORG_HAS_OUTSTANDING_BALANCE:"ORG_HAS_OUTSTANDING_BALANCE",PERSONAL_ORG_NOT_DELETABLE:"PERSONAL_ORG_NOT_DELETABLE",MEMBER_NOT_FOUND:"MEMBER_NOT_FOUND",INVITATION_NOT_FOUND:"INVITATION_NOT_FOUND",CUSTOMER_NOT_FOUND:"CUSTOMER_NOT_FOUND",PRODUCT_NOT_FOUND:"PRODUCT_NOT_FOUND",PRODUCT_DELETE_BLOCKED:"PRODUCT_DELETE_BLOCKED",PRODUCT_REPO_NOT_LINKED:"PRODUCT_REPO_NOT_LINKED",PRODUCT_SCOPE_MISMATCH:"PRODUCT_SCOPE_MISMATCH",YAML_PARSE_ERROR:"YAML_PARSE_ERROR",COMPILATION_NOT_FOUND:"COMPILATION_NOT_FOUND",PLAN_NOT_FOUND:"PLAN_NOT_FOUND",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"PLAN_HAS_ACTIVE_SUBSCRIPTIONS",PLAN_SLUG_CONFLICT:"PLAN_SLUG_CONFLICT",PLAN_UPGRADE_REQUIRED:"PLAN_UPGRADE_REQUIRED",SLUG_CONFLICT:"SLUG_CONFLICT",SLUG_BLOCKED:"SLUG_BLOCKED",SLUG_OFFENSIVE:"SLUG_OFFENSIVE",SLUG_RESERVED:"SLUG_RESERVED",SLUG_IMPERSONATION:"SLUG_IMPERSONATION",SLUG_INVALID_FORMAT:"SLUG_INVALID_FORMAT",SLUG_VALIDATOR_NOT_READY:"SLUG_VALIDATOR_NOT_READY",PRICING_PREVIEW_FAILED:"PRICING_PREVIEW_FAILED",PRICING_REPLAY_FAILED:"PRICING_REPLAY_FAILED",RESERVATION_NOT_FOUND:"RESERVATION_NOT_FOUND",PROMO_CODE_NOT_FOUND:"PROMO_CODE_NOT_FOUND",PROMO_CODE_INVALID:"PROMO_CODE_INVALID",BILLING_EVENT_NOT_FOUND:"BILLING_EVENT_NOT_FOUND",BILLING_NOT_CONFIGURED:"BILLING_NOT_CONFIGURED",SUBSCRIPTION_NOT_READY:"SUBSCRIPTION_NOT_READY",SUBSCRIPTION_FETCH_FAILED:"SUBSCRIPTION_FETCH_FAILED",INVALID_STATE:"INVALID_STATE",DUPLICATE_TRANSITION:"DUPLICATE_TRANSITION",LEGACY_STABLE_NOT_SELF_SERVICE:"LEGACY_STABLE_NOT_SELF_SERVICE",ARCHIVED_TARGET:"ARCHIVED_TARGET",FREE_TO_PAID_VIA_CHECKOUT_ONLY:"FREE_TO_PAID_VIA_CHECKOUT_ONLY",CAPABILITY_LIMIT_EXCEEDED:"CAPABILITY_LIMIT_EXCEEDED",CAPABILITY_CHECK_UNAVAILABLE:"CAPABILITY_CHECK_UNAVAILABLE",STRIPE_NOT_CONFIGURED:"STRIPE_NOT_CONFIGURED",STRIPE_BALANCE_OUTSTANDING:"STRIPE_BALANCE_OUTSTANDING",STRIPE_OPERATION_FAILED:"STRIPE_OPERATION_FAILED",STRIPE_RESYNC_FAILED:"STRIPE_RESYNC_FAILED",CHECKOUT_SESSION_FAILED:"CHECKOUT_SESSION_FAILED",POLAR_PRODUCT_NOT_CONFIGURED:"POLAR_PRODUCT_NOT_CONFIGURED",BILLING_TAX_NOT_ENROLLED:"BILLING_TAX_NOT_ENROLLED",WEBHOOK_NOT_FOUND:"WEBHOOK_NOT_FOUND",WEBHOOK_DISPATCH_FAILED:"WEBHOOK_DISPATCH_FAILED",WEBHOOK_SECRET_NOT_CONFIGURED:"WEBHOOK_SECRET_NOT_CONFIGURED",INVALID_WEBHOOK_SIGNATURE:"INVALID_WEBHOOK_SIGNATURE",MISSING_RAW_BODY:"MISSING_RAW_BODY",WEBHOOK_REDIRECTED:"WEBHOOK_REDIRECTED",MANAGED_BY_CODE:"MANAGED_BY_CODE",GITHUB_CONNECTION_NOT_FOUND:"GITHUB_CONNECTION_NOT_FOUND",GITHUB_NOT_CONNECTED:"GITHUB_NOT_CONNECTED",GITHUB_SYNC_FAILED:"GITHUB_SYNC_FAILED",GITHUB_SYNC_UNAVAILABLE:"GITHUB_SYNC_UNAVAILABLE",GITHUB_TOKEN_FAILED:"GITHUB_TOKEN_FAILED",GIT_PROVIDER_NOT_CONFIGURED:"GIT_PROVIDER_NOT_CONFIGURED",ENVIRONMENT_NOT_FOUND:"ENVIRONMENT_NOT_FOUND",ENVIRONMENT_CLEANUP_FAILED:"ENVIRONMENT_CLEANUP_FAILED",DEPLOYMENT_RUN_NOT_FOUND:"DEPLOYMENT_RUN_NOT_FOUND",BRANCH_NO_MATCHING_ENV:"BRANCH_NO_MATCHING_ENV",APPLY_SPEC_FAILED:"APPLY_SPEC_FAILED",BOOTSTRAP_FAILED:"BOOTSTRAP_FAILED",JOB_ALREADY_RUNNING:"JOB_ALREADY_RUNNING",LOGO_DELETE_FAILED:"LOGO_DELETE_FAILED",LOGO_UPLOAD_FAILED:"LOGO_UPLOAD_FAILED",INVALID_LOGO_FORMAT:"INVALID_LOGO_FORMAT"};var yC={missing_token:te.UNAUTHORIZED,invalid_token:te.UNAUTHORIZED,missing_signature:te.UNAUTHORIZED,malformed_signature:te.UNAUTHORIZED,unknown_key_id:te.UNAUTHORIZED,bad_signature:te.UNAUTHORIZED,expired_signature:te.UNAUTHORIZED,clock_skew:te.UNAUTHORIZED,replayed_nonce:te.UNAUTHORIZED,body_hash_mismatch:te.UNAUTHORIZED,route_mismatch:te.UNAUTHORIZED,environment_mismatch:te.UNAUTHORIZED,jwks_unavailable:te.SERVICE_UNAVAILABLE,body_too_large:te.VALIDATION_ERROR};var xC=Object.values(qf);var Ih={limit_allocator_unavailable:{statuses:[503],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:471"]},limit_exceeded:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:326","engine/enforcement/constraints/quota.ts:69"]},rate_limited:{statuses:[429],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:328","engine/enforcement/constraints/rate-limit.ts:74","engine/pipeline/rate-limit.ts:83"]},credit_exhausted:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:333"]},enforcement_denied:{statuses:[402],source:"batcher-enum",retryAfter:!0,verifiedAt:["engine/enforcement/batcher.ts:335"]},feature_not_enabled:{statuses:[403],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:188"]},invalid_entitlement_shape:{statuses:[503],source:"runtime-inline",retryAfter:!0,verifiedAt:["engine/enforcement/runtime.ts:144"]},unsupported_constraint_schema:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:154"]},enforcement_error:{statuses:[500],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:342"]},enforcement_dependency_unavailable:{statuses:[503],source:"runtime-inline",retryAfter:!1,verifiedAt:["engine/enforcement/runtime.ts:427"]},concurrency_limit_exceeded:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:314"]},concurrency_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:291"]},concurrency_coordinator_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/concurrency.ts:305"]},key_expired:{statuses:[401],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/credential-validity.ts:33"]},geo_context_unavailable:{statuses:[503],source:"constraint",retryAfter:!0,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:44"]},geo_blocked:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:51"]},geo_not_allowed:{statuses:[403],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/geo-restriction.ts:58"]},resource_count_limit_exceeded:{statuses:[403,402],source:"constraint",retryAfter:!1,verifiedAt:["engine/enforcement/constraints/resource-count.ts:95","apps/core:routes/internal/gateway-resources.ts:144"]},resolver_rate_limited:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:55"]},resolver_unavailable:{statuses:[503],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:73"]},credential_resolver_miss_rate_limited:{statuses:[429],source:"gateway-error",retryAfter:!0,verifiedAt:["engine/errors.ts:89"]}},Bk=Object.keys(Ih);var Hk=new Set([429,503]),SC=new Set(Bk.filter(e=>Ih[e].statuses.every(t=>Hk.has(t))));var Gk=[402,403,429],IC=new Set(Gk);var Kk={MANAGED_BY_CODE:"This product's contract is managed as code. Edit the Product SDK program in its GitHub repo (product/) and push \u2014 do NOT retry the API. (Branding stays editable via `farthershore product update`.)",UNAUTHORIZED:"Token is invalid or revoked. Run `farthershore auth login` to update it.",FORBIDDEN:"Your token doesn't have access to this resource. Check the org / product scope.",INVALID_ACCESS_KEY:"Token format is wrong. Generate a new one at https://farthershore.com/settings/tokens.",MAKER_TOKEN_REVOKED:"This maker token was revoked. Mint a new one in the product settings.",MAKER_TOKEN_NO_PRODUCT:"Maker token is not bound to a product. Re-create it from the product page.",AUTH_NO_TOKEN:"Pass --token <mk_...> or set FARTHERSHORE_TOKEN, or run interactively in a TTY.",AUTH_INVALID_TOKEN:"Token format is malformed. Maker tokens start with `mk_` and are 30+ characters.",DESTRUCTIVE_OP_REQUIRES_YES:"Destructive ops (delete) require an explicit `--yes` to proceed. This is intentional safety.",PRODUCT_UPDATE_NO_FIELDS:"Pass at least one field flag (--display-name, --origin, --description).",PLAN_UPDATE_NO_FIELDS:"Pass at least one of --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",ENV_NOT_FOUND:"Environment doesn't exist. Use `farthershore env list <product>` to see available envs, or create one with `farthershore env create`.",STRIPE_NOT_CONFIGURED:"Stripe isn't connected on this product. Connect it in the dashboard before running billing operations.",STRIPE_NOT_CONNECTED:"Publishing requires a connected Stripe account. Connect one on the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_NOT_VERIFIED:"Your Stripe account isn't fully verified yet. Finish Stripe onboarding, then re-run `farthershore product publish`.",BILLING_TAX_NOT_ENROLLED:"Stripe Tax isn't enrolled for this account. Enable it from the dashboard Connections page, then re-run `farthershore product publish`.",STRIPE_BALANCE_OUTSTANDING:"Customer has an outstanding balance. Resolve the invoice in Stripe before retrying.",CHECKOUT_SESSION_FAILED:"Stripe rejected the checkout request. Check that the plan exists and Stripe credentials are valid.",PRODUCT_NOT_FOUND:"Check the product slug. Run `farthershore` (no args) for a list of products you can see.",PRODUCT_REPO_NOT_LINKED:"Link a GitHub repo to this product before publishing or validating product manifests.",YAML_PARSE_ERROR:"Product manifest is not valid. Run `farthershore build` locally, fix product/ source, then push again for bot validation.",GITHUB_NOT_CONNECTED:"Connect GitHub on the org page before running `init` (it provisions the repo).",BRANCH_NO_MATCHING_ENV:"The current branch isn't mapped to an environment. Add a branch rule in product settings or pass --branch explicitly.",PLAN_NOT_FOUND:"Plan key doesn't exist on this product. Check the `plans` block in your local product manifest.",PLAN_HAS_ACTIVE_SUBSCRIPTIONS:"Plan has active subscribers and can't be deleted. Migrate them to another plan first.",PLAN_SLUG_CONFLICT:"Another plan already uses this key. Pick a unique plan key in your manifest.",SLUG_CONFLICT:"This product slug is taken. Pick a different name.",SLUG_BLOCKED:"This slug is reserved or blocked. Pick a different name.",SLUG_RESERVED:"This slug is reserved by Farther Shore. Pick a different name.",SLUG_INVALID_FORMAT:"Slug must be lowercase letters, digits, and hyphens (no leading/trailing hyphen).",DECISION_NOT_FOUND:"No DenialEvent recorded for that decisionId. Verify the id from the original deny response or audit log.",AUTH_UNAUTHORIZED:"Token is missing, expired, or lacks the audit:read scope required to read denial events.",RATE_LIMIT_EXCEEDED:"You've hit the rate limit. Wait a moment and retry.",VALIDATION_ERROR:"Request is malformed. The `details` field has the field-level errors.",CONFLICT:"The resource is in a state that conflicts with the request. Inspect `details` to learn more."};function Zl(e){if(e)return Kk[e]}function wh(e){process.stdout.write(`${JSON.stringify(e,null,2)}
98
+ `)}function Wk(e,t){return{schema_version:1,ok:!0,op:e,data:t}}function qk(e,t){let r=t.status??0;return{schema_version:1,ok:!1,op:e,error:{code:t.code??"INTERNAL_ERROR",message:t.message,status:r,param:t.param,retryable:Xk(r,t.code),details:t.details,hint:Zl(t.code)}}}function V(e,t,r=Ah()){if(ue()==="json"){wh(Wk(r,e));return}t&&Md(t)}function Jk(e){return e===0?1:e===400||e===422?2:e===401||e===403?3:e===409?4:e>=500?5:1}var Yk=new Set(["RATE_LIMIT_EXCEEDED","SERVICE_UNAVAILABLE"]);function Xk(e,t){return e>=500||e===429||e===503?!0:t?Yk.has(t):!1}function Vl(e,t=Ah()){let r=e.status??0;if(ue()==="json")wh(qk(t,e));else{let o=Zl(e.code),n=e.code?` [${e.code}]`:"";process.stderr.write(`Error${n}: ${e.message}
99
99
  `),o&&process.stderr.write(`Hint: ${o}
100
- `)}return cS(r)}var zh="unknown";function Uh(e){zh=e}function jh(){return zh}async function mS(e){if(!_o())throw new k("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let t=dS({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(r=>{t.question(e,o=>{t.close(),r(o.trim())})})}function Lh(e,t){let r=e.command("auth").description("Manage CLI auth credentials");r.command("login").description("Store a maker token in ~/.farthershore/credentials.json").option("--token <token>","Maker token (mk_...). Falls back to FARTHERSHORE_TOKEN env, then prompt.").action(async o=>{let n=o.token??process.env.FARTHERSHORE_TOKEN??await mS("Maker token: ");if(!n||n.length<10)throw new k("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=Gn();Td({...i??{},token:n}),B({},"Token stored.")}),r.command("whoami").description("Show current auth identity (org, role, scopes)").action(async()=>{let n=await t().bootstrap(),i=n.memberships.find(s=>s.organization.id===n.activeOrganization.id);B({userId:n.user.id,clerkUserId:n.user.clerkUserId,organizationId:n.activeOrganization.id,organizationName:n.activeOrganization.name??null,organizationSlug:n.activeOrganization.slug??null,role:i?.role??null,memberships:n.memberships.map(s=>({organizationId:s.organization.id,organizationName:s.organization.name??null,role:s.role}))},`Authenticated as ${n.user.id}`)}),r.command("logout").description("Clear stored credentials").action(()=>{Ad(),B({},"Logged out.")})}var he={idempotencyKey:a.string().optional().describe("A UUID you generate; REUSE the same value when retrying so the retry replays the first result instead of double-provisioning.")};import{randomUUID as pS}from"node:crypto";async function Li(e,t){if(t){if(t.length===36)return t;let o=(await e.listProducts()).find(n=>n.id===t||n.name.toLowerCase()===t.toLowerCase());if(o)return o.id}throw new Error("No product selected. Pass --product <id-or-name> or run `farthershore product create` first.")}async function Fi(e,t,r){let n=await e.listEnvironments(t),s=(Array.isArray(n.data)?n.data:Array.isArray(n.environments)?n.environments:[]).find(c=>c.name.toLowerCase()===r.toLowerCase()||c.id===r);if(!s)throw new Error(`Environment "${r}" not found on product ${t}.`);return s.id}var fS="Reuse the same key on retry so it replays instead of double-creating (auto-generated if omitted).",gS="Preview the change without applying it.",hS="Skip confirmation; required for this destructive action";function _S(e,t){let r=typeof t.parser=="function",o=t.defaultValue!==void 0,n=[t.token];(t.describe!==void 0||r||o)&&n.push(t.describe??""),r&&n.push(t.parser),o&&n.push(t.defaultValue),t.required?e.requiredOption(...n):e.option(...n)}function Fh(e,t,r){let o=r.cli.args.filter(c=>c.kind==="positional"),n=r.cli.args.filter(c=>c.kind==="flag"),i=[r.cli.command,...o.map(c=>c.token)].join(" "),s=e.command(i).description(r.cli.summary);for(let c of n)_S(s,c);r.cli.destructive&&s.option("--yes",hS),r.cli.idempotent&&(s.option("--idempotency-key <key>",fS),s.option("--dry-run",gS)),r.cli.helpTextAfter&&s.addHelpText("after",r.cli.helpTextAfter),s.action(async(...c)=>{let u=c[c.length-2]??{},l=c.slice(0,c.length-2);if(r.cli.destructive&&u.yes!==!0)throw new k(r.cli.yesMessage??"Pass --yes to confirm this destructive action.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let d=t(),m={...u};for(let R=0;R<o.length;R++){let P=o[R],rt=l[R];m[P.field]=P.resolveProduct?await Li(d,rt):rt}let g=r.cli.idempotent?{idempotencyKey:u.idempotencyKey??pS(),dryRun:u.dryRun}:{},S={client:d,args:m,opts:u,reqOpts:g,emit:B,emitDryRunPreview:R=>R?.dryRun===!0?(B({preview:R.wouldHave,dryRun:!0},"Dry run \u2014 no changes applied."),!0):!1};await r.cli.handler(S)})}var vS={product:"Product lifecycle: list, show, create, update, delete",plan:"Plan management: list, create, update, delete",env:"Manage product environments (preview branches, prod)",backend:"Manage BYO backends and their runtime tokens","backend tokens":"Manage runtime tokens (fsrt_) for BYO backends",frontend:"Managed Frontend Hosting: deploy/status/rollback (+ local preview)",persona:"Mint and manage test-env personas (test API keys)",usage:"Usage observability for a product",token:"Maker-token management (list, create, revoke)"};function bS(e,t){let r=t.split(" "),o=e,n="";for(let i of r){n=n?`${n} ${i}`:i;let s=o.commands.find(l=>l.name()===i);if(s){o=s;continue}let c=vS[n],u=o.command(i);c&&u.description(c),o=u}return o}function W(e,t,r){for(let o of r){let n=bS(e,o.cli.group);Fh(n,t,o)}}var Bt=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],yS=["frontend","api"];function Mh(e){let t=e.trim().toLowerCase();if(!Bt.includes(t))throw new k(`Unknown product surface "${e}". Available: ${Bt.join(", ")}.`,void 0,{code:"UNKNOWN_PRODUCT_SURFACE"});return t}function jn(e){let t=(e.surface??[]).map(Mh);if(t.length===0)return;if(new Set(t).size!==t.length)throw new k("Duplicate product surfaces in --surface flags.",void 0,{code:"INVALID_PRODUCT_SURFACES"});return t}function ql(e){return e&&e.length>0?e:[...yS]}function xS(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function kS(e){let[t="",r,o]=e.split(":");if(!/^[a-z0-9_]+$/.test(t))throw new k(`Invalid meter key in "--meter ${e}" \u2014 keys are lowercase letters, digits, and underscores (e.g. input_tokens).`,void 0,{code:"INVALID_METER_SPEC"});return{key:t,display:r?.trim()||xS(t),unit:o?.trim()||void 0}}function SS(e){let t=e.meter??[];if(t.length>0&&e.meters)throw new k("Pass either --meters <template> or repeated --meter entries, not both.",void 0,{code:"CONFLICTING_METER_FLAGS"});if(t.length>0){let r=t.map(kS);if(new Set(r.map(n=>n.key)).size!==r.length)throw new k("Duplicate meter keys in --meter flags.",void 0,{code:"INVALID_METER_SPEC"});return r}if(e.meters){let r=Jf(e.meters);if(!r)throw new k(`Unknown meter template "${e.meters}". Available: ${Yf().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return r.meters.map(o=>({...o}))}}function $S(e){return{...e,product:e.product}}var IS=[{opKey:"product.list",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"list",summary:"List products in the current org",args:[],handler:async({client:e,emit:t})=>{let r=await e.listProducts();t({count:r.length,products:r.map(o=>({...o,displayName:o.displayName??null,status:o.status??null}))},`${r.length} product(s)`)}},mcp:{tool:"fs_product_list",title:"List products",description:"List every product in the authenticated FartherShore workspace (id, name, status). Read-only; use this to discover product ids for the other tools.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>{let t=await e.listProducts();return{count:t.length,products:t.map(r=>({id:r.id,name:r.name,status:r.status??null}))}}}},{opKey:"product.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"show",summary:"Show a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope (preview branch name)"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.getProduct(o,{env:t.env});r({product:n},`Product ${o}`)}},mcp:null},{opKey:"product.create",operationClass:"dual",scope:["products:create"],sideEffect:"write",cli:{group:"product",command:"create",summary:"Create a new product and provision the frontend starter repo",idempotent:!0,args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Product slug (becomes the subdomain)",required:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>",describe:"Human-friendly product name"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>",describe:"Builder-owned product origin Farther Shore calls for customer-facing actions",required:!0},{field:"repoOwner",kind:"flag",token:"--repo-owner <owner>",describe:"Connected GitHub account that will own the product repo",required:!0},{field:"repoName",kind:"flag",token:"--repo-name <name>",describe:"GitHub repository name to create",required:!0},{field:"meters",kind:"flag",token:"--meters <template>",describe:`Meter template: ${Ni.map(e=>`${e.id} (${e.label})`).join(", ")}. Default: requests.`},{field:"meter",kind:"flag",token:"--meter <key[:display[:unit]]>",describe:"Custom meter, repeatable (e.g. --meter input_tokens:'Input Tokens':token). Overrides --meters.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"surface",kind:"flag",token:"--surface <surface>",describe:`Initial Product SDK surface, repeatable. Available: ${Bt.join(", ")}.`,parser:(e,t)=>[...t,e],defaultValue:[]}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=SS({meters:t.meters,meter:t.meter}),s=jn({surface:t.surface}),c=await e.initProduct({name:t.name,origin:t.origin,repoTarget:{owner:t.repoOwner,name:t.repoName},description:t.description,displayName:t.displayName,meters:i,surfaces:s},r);n(c)||o({result:$S(c)},`Product created: ${t.name}`)}},mcp:null},{opKey:"brand.update",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"update",summary:"Update product metadata (name, origin, description, etc.)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>"},{field:"confirmOriginChange",kind:"flag",token:"--confirm-origin-change",describe:"Confirm changing the origin on a live (ACTIVE) product. Without it core 409s to guard accidental origin changes."},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n={};if(t.displayName!==void 0&&(n.displayName=t.displayName),t.description!==void 0&&(n.description=t.description),t.origin!==void 0&&(n.origin=t.origin),t.confirmOriginChange&&(n.confirmOriginChange=!0),Object.keys(n).length===0)throw new k("No fields to update. Pass --display-name / --origin / --description.",void 0,{code:"PRODUCT_UPDATE_NO_FIELDS"});let i=await e.updateProduct(o,n,{env:t.env});r({product:i},`Product ${o} updated`)}},mcp:{tool:"fs_brand_update",title:"Update product brand",description:"Update a product's BRAND/presentation only \u2014 display name, description, icon, logo (wordmark), primary color. Plans, pricing, and routes are managed as code in the product repo and are NOT editable here. Only the fields you pass are changed.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to update."),displayName:a.string().optional().describe("Display name."),description:a.string().optional().describe("Short product description."),iconUrl:a.string().optional().describe("Square icon/favicon URL."),logoUrl:a.string().optional().describe("Wordmark/logo URL."),primaryColor:a.string().optional().describe("Primary brand color (hex).")},handler:async(e,t)=>{let r={};return t.displayName!==void 0&&(r.displayName=t.displayName),t.description!==void 0&&(r.description=t.description),t.iconUrl!==void 0&&(r.iconUrl=t.iconUrl),t.logoUrl!==void 0&&(r.logoUrl=t.logoUrl),t.primaryColor!==void 0&&(r.primaryColor=t.primaryColor),e.updateProduct(t.productId,r)}}},{opKey:"product.publish",operationClass:"dual",scope:["products:publish"],sideEffect:"write",cli:{group:"product",command:"publish",summary:"Publish a draft product (make it live). Requires at least one plan, an origin, and a verified Stripe connection.",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.publishProduct(i,r);n(s)||o({product:s},`Product ${i} published`)}},mcp:{tool:"fs_product_publish",title:"Publish a product",description:"Publish a product \u2014 deploy its current spec live. Equivalent to a repo-driven deploy (operationClass=dual); both reconcile to the same published state.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to publish."),...he},handler:async(e,t)=>e.publishProduct(t.productId,{idempotencyKey:t.idempotencyKey})}},{opKey:"product.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"delete",summary:"Permanently delete a product. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm product deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId;try{await e.deleteProduct(o)}catch(n){throw n instanceof k&&(n.status===403||n.code==="FORBIDDEN")?new k("Deleting a whole product requires a builder/browser session \u2014 open the product in the dashboard to delete it. (Preview environments CAN be deleted via the CLI: `farthershore env delete`.)",n.status,{code:n.code??"FORBIDDEN"}):n}r({deleted:o},`Product ${o} deleted`)}},mcp:null}];function Zh(e,t){W(e,t,IS)}function ES(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.environments)?t.environments:[]}var wS=[{opKey:"environment.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"env",command:"list",summary:"List environments for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=ES(await e.listEnvironments(o));r({productId:o,count:n.length,environments:n.map(i=>({id:i.id,name:i.name,branch:i.branch??null,portalHostname:i.portalHostname??null,runtimeHostname:i.runtimeHostname??null,status:i.status??null}))},`${n.length} environment(s)`)}},mcp:{tool:"fs_env_list",title:"List environments",description:"List a product's preview environments (name, branch, hostnames). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose environments to list.")},handler:async(e,{productId:t})=>e.listEnvironments(t)}},{opKey:"environment.create",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"create",summary:"Create a preview environment bound to a git branch",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Environment name (e.g. preview, staging)",required:!0},{field:"branch",kind:"flag",token:"--branch <branch>",describe:"Git branch to track (e.g. env/preview)",required:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.createEnvironment(i,{name:t.name,branch:t.branch},r);n(s)||o({productId:i,environment:s},`Environment ${t.name} created`)}},mcp:{tool:"fs_env_create",title:"Create preview environment",description:"Create a preview environment bound to a git branch. Equivalent to pushing the branch \u2014 both reconcile to the same environment (operationClass=dual). Provide a name and the git branch it tracks.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the environment in."),name:a.string().describe("Environment name (e.g. 'staging', 'preview-pr-42')."),branch:a.string().describe("The git branch this environment tracks."),...he},handler:async(e,t)=>{let r=await e.createEnvironment(t.productId,{name:t.name,branch:t.branch},{idempotencyKey:t.idempotencyKey});return{ok:!0,productId:t.productId,environment:r}}}},{opKey:"environment.delete",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"delete",summary:"Delete an environment by name. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm environment deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"envName",kind:"positional",token:"<envName>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.envName;await e.deleteEnvironment(o,n),r({productId:o,deleted:n},`Environment ${n} deleted`)}},mcp:null}];function Vh(e,t){W(e,t,wS)}var _e=["free","starter","pro","prepaid","metered"],OS={kind:"free",label:"Free",description:"No recurring fee and no metered usage. Pure freemium tier.",pricing:{meters:[],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},TS={kind:"starter",label:"Starter \u2014 $20/mo + $20 included",description:"$20/month subscription with $20 of usage credit each period. Stripe-style minimum-spend; overage billed at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:2e3,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e3,recurs:!0}],trial_days:0}},AS={kind:"pro",label:"Pro \u2014 $100/mo + $200 included",description:"$100/month subscription with $200 of usage credit each period and a 14-day trial. Overage billed at $0.0005/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:500}],recurring_fee_cents:1e4,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e4,recurs:!0}],trial_days:14}},PS={kind:"prepaid",label:"Prepaid \u2014 $50 sign-up credit, then PAYG",description:"$50 one-time credit at signup. Once depleted the subscriber pays-as-they-go at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[{kind:"credit",amount_cents:5e3,recurs:!1}],trial_days:0}},CS={kind:"metered",label:"Metered (pay-as-you-go)",description:"No subscription fee. Pure usage billing at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},Bh=Object.freeze({free:OS,starter:TS,pro:AS,prepaid:PS,metered:CS});function Mi(e){return Bh[e]}function Jl(){return _e.map(e=>Bh[e])}var o0=a.object({recurring_fee_cents:a.number().int().nonnegative().optional(),grants:a.array(fe).max(40).optional(),creditPolicy:Ae.optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),meters:a.array(ge).optional(),notes:a.string().max(2e3).optional()});function NS(e){return(e??[]).some(t=>t.kind==="credit"?t.amount_cents>0:t.kind==="top_up"?t.price_cents>0:!1)}function Hh(e){let t=e.meters&&e.meters.length>0?e.meters:void 0,r=e.grants&&e.grants.length>0?e.grants:void 0,o=NS(r);if(e.free&&((e.recurringFeeCents??0)>0||o||(t?.length??0)>0))throw new k("A free plan cannot be combined with a fee, credit grant, or usage meter.",void 0,{code:"FREE_PLAN_HAS_REVENUE"});if(!e.free&&(e.recurringFeeCents??0)<=0&&!o&&(t?.length??0)===0)throw new k("Plan has no revenue and isn't free \u2014 set free=true, a recurring fee, a credit grant, or a usage meter.",void 0,{code:"PLAN_HAS_NO_REVENUE"});let n={key:e.key,name:e.name};if(e.free&&(n.free=!0),t&&(n.meters=t),e.rateLimit!==!1){let i=typeof e.rateLimit=="number"?e.rateLimit:600,s=e.rateWindow??"minute";if(!["second","minute","hour"].includes(s))throw new k(`Invalid rate window "${s}" \u2014 use second, minute, or hour.`,void 0,{code:"INVALID_RATE_WINDOW"});n.limits=[{dimension:"requests",window:{type:"named",name:s},capacity:i,enforcement:"enforce"}]}return typeof e.recurringFeeCents=="number"&&(n.recurring_fee_cents=e.recurringFeeCents),r&&(n.grants=r),typeof e.trialDays=="number"&&(n.trial_days=e.trialDays),typeof e.maxMonthlySpendCents=="number"&&(n.max_monthly_spend_cents=e.maxMonthlySpendCents),n}function RS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(!/^[a-z0-9_]+$/.test(r))throw new k(`Invalid meter dimension in "--meter ${e}" \u2014 dimensions are lowercase letters, digits, and underscores (e.g. requests, input_tokens).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid price in "--meter ${e}" \u2014 expected <dimension>:<price_per_unit_micros> with a non-negative integer price (e.g. requests:1000).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});return{dimension:r,price_per_unit_micros:Number.parseInt(o.trim(),10),kind:"linear"}}function Gh(e){let t=e??[];if(t.length===0)return;let r=t.map(RS);if(new Set(r.map(n=>n.dimension)).size!==r.length)throw new k("Duplicate meter dimensions in --meter flags.",void 0,{code:"INVALID_PLAN_METER_SPEC"});return r}function DS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(r!=="recurring"&&r!=="one_time")throw new k(`Invalid grant kind in "--grant ${e}" \u2014 use recurring:<amount_cents> or one_time:<amount_cents>.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid grant amount in "--grant ${e}" \u2014 expected ${r}:<amount_cents> with a non-negative integer amount.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});let n=Number.parseInt(o.trim(),10);return{grant:r==="recurring"?{kind:"credit",amount_cents:n,recurs:!0}:{kind:"credit",amount_cents:n},flavour:r}}function Kh(e){let t=e??[];if(t.length===0)return;let r=t.map(DS),o=r.map(n=>n.flavour);if(new Set(o).size!==o.length)throw new k("Duplicate canonical grant kinds in --grant flags.",void 0,{code:"INVALID_PLAN_GRANT_SPEC"});return r.map(n=>n.grant)}function zS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.plans)?t.plans:Array.isArray(e)?e:[]}function US(e){if(e.length===0)return"(no plans)";let t=["KEY","NAME","FREE","FEE\xA2","RECURRING\xA2","ONE_TIME\xA2","TRIAL_D","MAX_SPEND\xA2","STATUS"],r=c=>c===null?"\u2014":c.toLocaleString("en-US"),o=e.map(c=>[c.key,c.name,c.free?"Y":"N",r(c.recurring_fee_cents),r(c.recurring_grant_cents),r(c.one_time_grant_cents),r(c.trial_days),r(c.max_monthly_spend_cents),c.status]),n=t.map((c,u)=>Math.max(c.length,...o.map(l=>l[u]?.length??0))),i=c=>c.map((u,l)=>u.padEnd(n[l]??u.length)).join(" "),s=n.map(c=>"-".repeat(c)).join(" ");return[i(t),s,...o.map(i)].join(`
101
- `)}var jS=[{opKey:"plan.read",operationClass:"contract",scope:["products:read"],sideEffect:"read",cli:{group:"plan",command:"list",summary:"List plans for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],helpTextAfter:`
100
+ `)}return Jk(r)}var Oh="unknown";function Th(e){Oh=e}function Ah(){return Oh}async function eS(e){if(!Xt())throw new k("No token provided. Pass --token, set FARTHERSHORE_TOKEN, or run interactively.",void 0,{code:"AUTH_NO_TOKEN"});let t=Qk({input:process.stdin,output:process.stdout,terminal:!0});return new Promise(r=>{t.question(e,o=>{t.close(),r(o.trim())})})}function Ph(e,t){let r=e.command("auth").description("Manage CLI auth credentials");r.command("login").description("Store a maker token in ~/.farthershore/credentials.json").option("--token <token>","Maker token (mk_...). Falls back to FARTHERSHORE_TOKEN env, then prompt.").action(async o=>{let n=o.token??process.env.FARTHERSHORE_TOKEN??await eS("Maker token: ");if(!n||n.length<10)throw new k("Token looks malformed.",void 0,{code:"AUTH_INVALID_TOKEN"});let i=Hn();Id({...i??{},token:n}),V({},"Token stored.")}),r.command("whoami").description("Show current auth identity (org, role, scopes)").action(async()=>{let n=await t().bootstrap(),i=n.memberships.find(s=>s.organization.id===n.activeOrganization.id);V({userId:n.user.id,clerkUserId:n.user.clerkUserId,organizationId:n.activeOrganization.id,organizationName:n.activeOrganization.name??null,organizationSlug:n.activeOrganization.slug??null,role:i?.role??null,memberships:n.memberships.map(s=>({organizationId:s.organization.id,organizationName:s.organization.name??null,role:s.role}))},`Authenticated as ${n.user.id}`)}),r.command("logout").description("Clear stored credentials").action(()=>{Ed(),V({},"Logged out.")})}import{createInterface as uS}from"node:readline";var ie={idempotencyKey:a.string().optional().describe("A UUID you generate; REUSE the same value when retrying so the retry replays the first result instead of double-provisioning.")};import{randomUUID as tS}from"node:crypto";async function ji(e,t){if(t){if(t.length===36)return t;let o=(await e.listProducts()).find(n=>n.id===t||n.name.toLowerCase()===t.toLowerCase());if(o)return o.id}throw new Error("No product selected. Pass --product <id-or-name> or run `farthershore product create` first.")}async function Li(e,t,r){let n=await e.listEnvironments(t),s=(Array.isArray(n.data)?n.data:Array.isArray(n.environments)?n.environments:[]).find(c=>c.name.toLowerCase()===r.toLowerCase()||c.id===r);if(!s)throw new Error(`Environment "${r}" not found on product ${t}.`);return s.id}var nS="Reuse the same key on retry so it replays instead of double-creating (auto-generated if omitted).",rS="Preview the change without applying it.",iS="Skip confirmation; required for this destructive action";function oS(e,t){let r=typeof t.parser=="function",o=t.defaultValue!==void 0,n=[t.token];(t.describe!==void 0||r||o)&&n.push(t.describe??""),r&&n.push(t.parser),o&&n.push(t.defaultValue),t.required?e.requiredOption(...n):e.option(...n)}function Nh(e,t,r){let o=r.cli.args.filter(c=>c.kind==="positional"),n=r.cli.args.filter(c=>c.kind==="flag"),i=[r.cli.command,...o.map(c=>c.token)].join(" "),s=e.command(i).description(r.cli.summary);for(let c of n)oS(s,c);r.cli.destructive&&s.option("--yes",iS),r.cli.idempotent&&(s.option("--idempotency-key <key>",nS),s.option("--dry-run",rS)),r.cli.helpTextAfter&&s.addHelpText("after",r.cli.helpTextAfter),s.action(async(...c)=>{let u=c[c.length-2]??{},l=c.slice(0,c.length-2);if(r.cli.destructive&&u.yes!==!0)throw new k(r.cli.yesMessage??"Pass --yes to confirm this destructive action.",void 0,{code:"DESTRUCTIVE_OP_REQUIRES_YES"});let d=t(),m={...u};for(let C=0;C<o.length;C++){let P=o[C],nt=l[C];m[P.field]=P.resolveProduct?await ji(d,nt):nt}let g=r.cli.idempotent?{idempotencyKey:u.idempotencyKey??tS(),dryRun:u.dryRun}:{},S={client:d,args:m,opts:u,reqOpts:g,emit:V,emitDryRunPreview:C=>C?.dryRun===!0?(V({preview:C.wouldHave,dryRun:!0},"Dry run \u2014 no changes applied."),!0):!1};await r.cli.handler(S)})}var aS={product:"Product lifecycle: list, show, create, update, delete",plan:"Plan management: list, create, update, delete",env:"Manage product environments (preview branches, prod)",backend:"Manage BYO backends and their runtime tokens","backend tokens":"Manage runtime tokens (fsrt_) for BYO backends",frontend:"Managed Frontend Hosting: deploy/status/rollback (+ local preview)",persona:"Mint and manage test-env personas (test API keys)",usage:"Usage observability for a product",token:"Maker-token management (list, create, revoke)"};function sS(e,t){let r=t.split(" "),o=e,n="";for(let i of r){n=n?`${n} ${i}`:i;let s=o.commands.find(l=>l.name()===i);if(s){o=s;continue}let c=aS[n],u=o.command(i);c&&u.description(c),o=u}return o}function K(e,t,r){for(let o of r){let n=sS(e,o.cli.group);Nh(n,t,o)}}var Zt=["frontend","api","docs","widget","dashboard","webhook","worker","agent"],cS=["frontend","api"];function Ch(e){let t=e.trim().toLowerCase();if(!Zt.includes(t))throw new k(`Unknown product surface "${e}". Available: ${Zt.join(", ")}.`,void 0,{code:"UNKNOWN_PRODUCT_SURFACE"});return t}function Un(e){let t=(e.surface??[]).map(Ch);if(t.length===0)return;if(new Set(t).size!==t.length)throw new k("Duplicate product surfaces in --surface flags.",void 0,{code:"INVALID_PRODUCT_SURFACES"});return t}function Bl(e){return e&&e.length>0?e:[...cS]}function Rh(e){let t={};return typeof e.bump=="string"&&(t.bump=e.bump),typeof e.version=="string"&&(t.version=e.version),e.acceptBreaking===!0&&(t.acceptBreaking=!0),t}async function lS(e){let t=uS({input:process.stdin,output:process.stderr,terminal:!0});return new Promise(r=>{t.question(`Cut release ${e}? [y/N] `,o=>{t.close(),r(/^y(es)?$/i.test(o.trim()))})})}function dS(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function mS(e){let[t="",r,o]=e.split(":");if(!/^[a-z0-9_]+$/.test(t))throw new k(`Invalid meter key in "--meter ${e}" \u2014 keys are lowercase letters, digits, and underscores (e.g. input_tokens).`,void 0,{code:"INVALID_METER_SPEC"});return{key:t,display:r?.trim()||dS(t),unit:o?.trim()||void 0}}function pS(e){let t=e.meter??[];if(t.length>0&&e.meters)throw new k("Pass either --meters <template> or repeated --meter entries, not both.",void 0,{code:"CONFLICTING_METER_FLAGS"});if(t.length>0){let r=t.map(mS);if(new Set(r.map(n=>n.key)).size!==r.length)throw new k("Duplicate meter keys in --meter flags.",void 0,{code:"INVALID_METER_SPEC"});return r}if(e.meters){let r=Kf(e.meters);if(!r)throw new k(`Unknown meter template "${e.meters}". Available: ${Wf().join(", ")}.`,void 0,{code:"UNKNOWN_METER_TEMPLATE"});return r.meters.map(o=>({...o}))}}function fS(e){return{...e,product:e.product}}var gS=[{opKey:"product.list",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"list",summary:"List products in the current org",args:[],handler:async({client:e,emit:t})=>{let r=await e.listProducts();t({count:r.length,products:r.map(o=>({...o,displayName:o.displayName??null,status:o.status??null}))},`${r.length} product(s)`)}},mcp:{tool:"fs_product_list",title:"List products",description:"List every product in the authenticated FartherShore workspace (id, name, status). Read-only; use this to discover product ids for the other tools.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>{let t=await e.listProducts();return{count:t.length,products:t.map(r=>({id:r.id,name:r.name,status:r.status??null}))}}}},{opKey:"product.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"show",summary:"Show a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope (preview branch name)"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.getProduct(o,{env:t.env});r({product:n},`Product ${o}`)}},mcp:null},{opKey:"product.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"product",command:"status",summary:"Show a product's lifecycle/release/live state (status, latest release version, latest deployment, and a derived `live` boolean) \u2014 verify a product is serving after publish.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.getDeployments(o),i=n.data[0]??null,s={id:n.product.id,status:n.product.status,latestReleaseVersion:n.product.latestReleaseVersion,live:n.live,latestDeployment:i?{id:i.id,status:i.status,edgePublishStatus:i.edgePublishStatus,createdAt:i.createdAt}:null};r(s,`Product ${o}: ${n.product.status}${n.product.latestReleaseVersion?` @ ${n.product.latestReleaseVersion}`:""} (${n.live?"live":"not live"})`)}},mcp:{tool:"fs_product_status",title:"Product status",description:"Verify a product's lifecycle/release state: its status (DRAFT|ACTIVE), latest release version, latest deployment run, and a derived `live` boolean (ACTIVE + a real non-bootstrap release applied + the edge serving the snapshot). Read-only; use this to confirm a product is live after publishing.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to check.")},handler:async(e,t)=>{let r=await e.getDeployments(t.productId),o=r.data[0]??null;return{id:r.product.id,status:r.product.status,latestReleaseVersion:r.product.latestReleaseVersion,live:r.live,latestDeployment:o?{id:o.id,status:o.status,edgePublishStatus:o.edgePublishStatus,createdAt:o.createdAt}:null}}}},{opKey:"product.create",operationClass:"dual",scope:["products:create"],sideEffect:"write",cli:{group:"product",command:"create",summary:"Create a new product and provision the frontend starter repo",idempotent:!0,args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Product slug (becomes the subdomain)",required:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>",describe:"Human-friendly product name"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>",describe:"Builder-owned product origin Farther Shore calls for customer-facing actions",required:!0},{field:"repoOwner",kind:"flag",token:"--repo-owner <owner>",describe:"Connected GitHub account that will own the product repo",required:!0},{field:"repoName",kind:"flag",token:"--repo-name <name>",describe:"GitHub repository name to create",required:!0},{field:"meters",kind:"flag",token:"--meters <template>",describe:`Meter template: ${Ci.map(e=>`${e.id} (${e.label})`).join(", ")}. Default: requests.`},{field:"meter",kind:"flag",token:"--meter <key[:display[:unit]]>",describe:"Custom meter, repeatable (e.g. --meter input_tokens:'Input Tokens':token). Overrides --meters.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"surface",kind:"flag",token:"--surface <surface>",describe:`Initial Product SDK surface, repeatable. Available: ${Zt.join(", ")}.`,parser:(e,t)=>[...t,e],defaultValue:[]}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=pS({meters:t.meters,meter:t.meter}),s=Un({surface:t.surface}),c=await e.initProduct({name:t.name,origin:t.origin,repoTarget:{owner:t.repoOwner,name:t.repoName},description:t.description,displayName:t.displayName,meters:i,surfaces:s},r);n(c)||o({result:fS(c)},`Product created: ${t.name}`)}},mcp:null},{opKey:"brand.update",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"update",summary:"Update product metadata (name, origin, description, etc.)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"displayName",kind:"flag",token:"--display-name <displayName>"},{field:"description",kind:"flag",token:"--description <description>"},{field:"origin",kind:"flag",token:"--origin <url>"},{field:"confirmOriginChange",kind:"flag",token:"--confirm-origin-change",describe:"Confirm changing the origin on a live (ACTIVE) product. Without it core 409s to guard accidental origin changes."},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n={};if(t.displayName!==void 0&&(n.displayName=t.displayName),t.description!==void 0&&(n.description=t.description),t.origin!==void 0&&(n.origin=t.origin),t.confirmOriginChange&&(n.confirmOriginChange=!0),Object.keys(n).length===0)throw new k("No fields to update. Pass --display-name / --origin / --description.",void 0,{code:"PRODUCT_UPDATE_NO_FIELDS"});let i=await e.updateProduct(o,n,{env:t.env});r({product:i},`Product ${o} updated`)}},mcp:{tool:"fs_brand_update",title:"Update product brand",description:"Update a product's BRAND/presentation only \u2014 display name, description, icon, logo (wordmark), primary color. Plans, pricing, and routes are managed as code in the product repo and are NOT editable here. Only the fields you pass are changed.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to update."),displayName:a.string().optional().describe("Display name."),description:a.string().optional().describe("Short product description."),iconUrl:a.string().optional().describe("Square icon/favicon URL."),logoUrl:a.string().optional().describe("Wordmark/logo URL."),primaryColor:a.string().optional().describe("Primary brand color (hex).")},handler:async(e,t)=>{let r={};return t.displayName!==void 0&&(r.displayName=t.displayName),t.description!==void 0&&(r.description=t.description),t.iconUrl!==void 0&&(r.iconUrl=t.iconUrl),t.logoUrl!==void 0&&(r.logoUrl=t.logoUrl),t.primaryColor!==void 0&&(r.primaryColor=t.primaryColor),e.updateProduct(t.productId,r)}}},{opKey:"product.publish",operationClass:"dual",scope:["products:publish"],sideEffect:"write",cli:{group:"product",command:"publish",summary:"Publish a draft product (make it live) and cut a versioned release with an auto-computed semver. Requires at least one plan, an origin, and a verified Stripe connection.",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"bump",kind:"flag",token:"--bump <bump>",describe:"Force the semver bump (major|minor|patch). Omit to auto-derive from the change."},{field:"version",kind:"flag",token:"--version <version>",describe:"Pin the exact next release tag (vX.Y.Z), skipping derivation."},{field:"acceptBreaking",kind:"flag",token:"--accept-breaking",describe:"Consent to publish a breaking (blocking-risk) change as a major release."}],helpTextAfter:`
101
+ Publish auto-derives the semver bump from the change and cuts a vX.Y.Z release.
102
+ Use --dry-run to preview the computed bump + reasons without cutting a tag.
103
+ A blocking-risk (breaking) change is refused unless --accept-breaking is passed.`,handler:async({client:e,args:t,opts:r,reqOpts:o,emit:n,emitDryRunPreview:i})=>{let s=t.productId,c=Rh(r);if(o.dryRun){let l=await e.publishProduct(s,c,o);if(i(l))return}if(Xt()&&r.input!==!1){let d=(await e.publishProduct(s,c,{...o,dryRun:!0,idempotencyKey:void 0})).wouldHave?._release;if(d){Vd(`Publishing ${s}: ${d.computedBump} \u2192 ${d.version}`+(d.previousVersion?` (from ${d.previousVersion})`:" (first release)"));for(let g of d.reasons)Ie(` \u2022 ${g}`);if(!await lS(d.version)){n({cancelled:!0},"Publish cancelled.");return}}}let u=await e.publishProduct(s,c,o);n({product:u,_release:u._release??null},`Product ${s} published`)}},mcp:{tool:"fs_product_publish",title:"Publish a product",description:"Publish a product \u2014 deploy its current spec live and cut a versioned release with an auto-computed semver. Equivalent to a repo-driven deploy (operationClass=dual); both reconcile to the same published state.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to publish."),bump:a.enum(["major","minor","patch"]).optional().describe("Force the semver bump. Omit to auto-derive from the change."),version:a.string().optional().describe("Pin the exact next release tag (vX.Y.Z)."),acceptBreaking:a.boolean().optional().describe("Consent to publish a breaking (blocking-risk) change as major."),dryRun:a.boolean().optional().describe("Preview the change (computed semver + reasons) without cutting a release."),...ie},handler:async(e,t)=>{let r=Rh({bump:t.bump,version:t.version,acceptBreaking:t.acceptBreaking});return e.publishProduct(t.productId,r,{idempotencyKey:t.idempotencyKey,dryRun:t.dryRun})}}},{opKey:"product.delete",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"product",command:"delete",summary:"Permanently delete a product. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm product deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId;try{await e.deleteProduct(o)}catch(n){throw n instanceof k&&(n.status===403||n.code==="FORBIDDEN")?new k("Deleting a whole product requires a builder/browser session \u2014 open the product in the dashboard to delete it. (Preview environments CAN be deleted via the CLI: `farthershore env delete`.)",n.status,{code:n.code??"FORBIDDEN"}):n}r({deleted:o},`Product ${o} deleted`)}},mcp:null}];function Dh(e,t){K(e,t,gS)}function hS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.environments)?t.environments:[]}var _S=[{opKey:"environment.read",operationClass:"dual",scope:["products:read"],sideEffect:"read",cli:{group:"env",command:"list",summary:"List environments for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=hS(await e.listEnvironments(o));r({productId:o,count:n.length,environments:n.map(i=>({id:i.id,name:i.name,branch:i.branch??null,portalHostname:i.portalHostname??null,runtimeHostname:i.runtimeHostname??null,status:i.status??null}))},`${n.length} environment(s)`)}},mcp:{tool:"fs_env_list",title:"List environments",description:"List a product's preview environments (name, branch, hostnames). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose environments to list.")},handler:async(e,{productId:t})=>e.listEnvironments(t)}},{opKey:"environment.create",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"create",summary:"Create a preview environment bound to a git branch",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Environment name (e.g. preview, staging)",required:!0},{field:"branch",kind:"flag",token:"--branch <branch>",describe:"Git branch to track (e.g. env/preview)",required:!0}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e.createEnvironment(i,{name:t.name,branch:t.branch},r);n(s)||o({productId:i,environment:s},`Environment ${t.name} created`)}},mcp:{tool:"fs_env_create",title:"Create preview environment",description:"Create a preview environment bound to a git branch. Equivalent to pushing the branch \u2014 both reconcile to the same environment (operationClass=dual). Provide a name and the git branch it tracks.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the environment in."),name:a.string().describe("Environment name (e.g. 'staging', 'preview-pr-42')."),branch:a.string().describe("The git branch this environment tracks."),...ie},handler:async(e,t)=>{let r=await e.createEnvironment(t.productId,{name:t.name,branch:t.branch},{idempotencyKey:t.idempotencyKey});return{ok:!0,productId:t.productId,environment:r}}}},{opKey:"environment.delete",operationClass:"dual",scope:["products:update"],sideEffect:"write",cli:{group:"env",command:"delete",summary:"Delete an environment by name. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm environment deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"envName",kind:"positional",token:"<envName>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.envName;await e.deleteEnvironment(o,n),r({productId:o,deleted:n},`Environment ${n} deleted`)}},mcp:null}];function zh(e,t){K(e,t,_S)}var ge=["free","starter","pro","prepaid","metered"],vS={kind:"free",label:"Free",description:"No recurring fee and no metered usage. Pure freemium tier.",pricing:{meters:[],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},bS={kind:"starter",label:"Starter \u2014 $20/mo + $20 included",description:"$20/month subscription with $20 of usage credit each period. Stripe-style minimum-spend; overage billed at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:2e3,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e3,recurs:!0}],trial_days:0}},yS={kind:"pro",label:"Pro \u2014 $100/mo + $200 included",description:"$100/month subscription with $200 of usage credit each period and a 14-day trial. Overage billed at $0.0005/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:500}],recurring_fee_cents:1e4,billing_interval:"month",grants:[{kind:"credit",amount_cents:2e4,recurs:!0}],trial_days:14}},xS={kind:"prepaid",label:"Prepaid \u2014 $50 sign-up credit, then PAYG",description:"$50 one-time credit at signup. Once depleted the subscriber pays-as-they-go at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[{kind:"credit",amount_cents:5e3,recurs:!1}],trial_days:0}},kS={kind:"metered",label:"Metered (pay-as-you-go)",description:"No subscription fee. Pure usage billing at $0.001/request by default.",pricing:{meters:[{dimension:"requests",kind:"linear",price_per_unit_micros:1e3}],recurring_fee_cents:0,billing_interval:"month",grants:[],trial_days:0}},Uh=Object.freeze({free:vS,starter:bS,pro:yS,prepaid:xS,metered:kS});function Fi(e){return Uh[e]}function Hl(){return ge.map(e=>Uh[e])}var mD=a.object({recurring_fee_cents:a.number().int().nonnegative().optional(),grants:a.array(pe).max(40).optional(),creditPolicy:Te.optional(),min_monthly_spend_cents:a.number().int().nonnegative().optional(),max_monthly_spend_cents:a.number().int().nonnegative().optional(),meters:a.array(fe).optional(),notes:a.string().max(2e3).optional()});function SS(e){return(e??[]).some(t=>t.kind==="credit"?t.amount_cents>0:t.kind==="top_up"?t.price_cents>0:!1)}function jh(e){let t=e.meters&&e.meters.length>0?e.meters:void 0,r=e.grants&&e.grants.length>0?e.grants:void 0,o=SS(r);if(e.free&&((e.recurringFeeCents??0)>0||o||(t?.length??0)>0))throw new k("A free plan cannot be combined with a fee, credit grant, or usage meter.",void 0,{code:"FREE_PLAN_HAS_REVENUE"});if(!e.free&&(e.recurringFeeCents??0)<=0&&!o&&(t?.length??0)===0)throw new k("Plan has no revenue and isn't free \u2014 set free=true, a recurring fee, a credit grant, or a usage meter.",void 0,{code:"PLAN_HAS_NO_REVENUE"});let n={key:e.key,name:e.name};if(e.free&&(n.free=!0),t&&(n.meters=t),e.rateLimit!==!1){let i=typeof e.rateLimit=="number"?e.rateLimit:600,s=e.rateWindow??"minute";if(!["second","minute","hour"].includes(s))throw new k(`Invalid rate window "${s}" \u2014 use second, minute, or hour.`,void 0,{code:"INVALID_RATE_WINDOW"});n.limits=[{dimension:"requests",window:{type:"named",name:s},capacity:i,enforcement:"enforce"}]}return typeof e.recurringFeeCents=="number"&&(n.recurring_fee_cents=e.recurringFeeCents),r&&(n.grants=r),typeof e.trialDays=="number"&&(n.trial_days=e.trialDays),typeof e.maxMonthlySpendCents=="number"&&(n.max_monthly_spend_cents=e.maxMonthlySpendCents),n}var Mi=["grandfather","next_renewal","immediate","by_date","opt_in"];function $S(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(!/^[a-z0-9_]+$/.test(r))throw new k(`Invalid meter dimension in "--meter ${e}" \u2014 dimensions are lowercase letters, digits, and underscores (e.g. requests, input_tokens).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid price in "--meter ${e}" \u2014 expected <dimension>:<price_per_unit_micros> with a non-negative integer price (e.g. requests:1000).`,void 0,{code:"INVALID_PLAN_METER_SPEC"});return{dimension:r,price_per_unit_micros:Number.parseInt(o.trim(),10),kind:"linear"}}function Lh(e){let t=e??[];if(t.length===0)return;let r=t.map($S);if(new Set(r.map(n=>n.dimension)).size!==r.length)throw new k("Duplicate meter dimensions in --meter flags.",void 0,{code:"INVALID_PLAN_METER_SPEC"});return r}function IS(e){let t=e.indexOf(":"),r=t===-1?e:e.slice(0,t),o=t===-1?"":e.slice(t+1);if(r!=="recurring"&&r!=="one_time")throw new k(`Invalid grant kind in "--grant ${e}" \u2014 use recurring:<amount_cents> or one_time:<amount_cents>.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});if(!/^\d+$/.test(o.trim()))throw new k(`Invalid grant amount in "--grant ${e}" \u2014 expected ${r}:<amount_cents> with a non-negative integer amount.`,void 0,{code:"INVALID_PLAN_GRANT_SPEC"});let n=Number.parseInt(o.trim(),10);return{grant:r==="recurring"?{kind:"credit",amount_cents:n,recurs:!0}:{kind:"credit",amount_cents:n},flavour:r}}function Fh(e){let t=e??[];if(t.length===0)return;let r=t.map(IS),o=r.map(n=>n.flavour);if(new Set(o).size!==o.length)throw new k("Duplicate canonical grant kinds in --grant flags.",void 0,{code:"INVALID_PLAN_GRANT_SPEC"});return r.map(n=>n.grant)}function ES(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.plans)?t.plans:Array.isArray(e)?e:[]}function wS(e){if(e.length===0)return"(no plans)";let t=["KEY","NAME","FREE","FEE\xA2","RECURRING\xA2","ONE_TIME\xA2","TRIAL_D","MAX_SPEND\xA2","STATUS"],r=c=>c===null?"\u2014":c.toLocaleString("en-US"),o=e.map(c=>[c.key,c.name,c.free?"Y":"N",r(c.recurring_fee_cents),r(c.recurring_grant_cents),r(c.one_time_grant_cents),r(c.trial_days),r(c.max_monthly_spend_cents),c.status]),n=t.map((c,u)=>Math.max(c.length,...o.map(l=>l[u]?.length??0))),i=c=>c.map((u,l)=>u.padEnd(n[l]??u.length)).join(" "),s=n.map(c=>"-".repeat(c)).join(" ");return[i(t),s,...o.map(i)].join(`
104
+ `)}var OS=[{opKey:"plan.read",operationClass:"contract",scope:["products:read"],sideEffect:"read",cli:{group:"plan",command:"list",summary:"List plans for a product",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],helpTextAfter:`
102
105
  Output:
103
106
  --format json \u2014 stable agent-friendly JSON envelope (default for non-TTY)
104
107
  --format table \u2014 human-readable summary table (default for TTY)
105
- `,handler:async({client:e,args:t,emit:r})=>{let o=t.productId,i=zS(await e.managementListPlans(o)).map(s=>({id:s.id,key:s.planKey??s.key??"",name:s.name??"",version:s.version??null,free:s.free??!1,recurring_fee_cents:s.recurring_fee_cents??0,grants:s.grants??[],recurring_grant_cents:Dn({grants:s.grants}),one_time_grant_cents:Ft({grants:s.grants}),trial_days:s.trial_days??0,max_monthly_spend_cents:s.max_monthly_spend_cents??null,status:s.status??(s.isActive===!1?"INACTIVE":"ACTIVE")}));r({productId:o,count:i.length,plans:i},`${i.length} plan(s) for product ${o}`),le()!=="json"&&console.log(US(i))}},mcp:{tool:"fs_plan_list",title:"List plans",description:"List a product's pricing plans (read-only). Plans are managed as code in the product's GitHub repo \u2014 to add/change/remove a plan, edit the manifest (product/) and push; this tool only reads the current state. Pass the product id (from fs_product_list).",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose plans to list.")},handler:async(e,{productId:t})=>e.managementListPlans(t)}},{opKey:"plan.create",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"create",summary:"Create a plan on a product (canonical plan spec)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"key",kind:"flag",token:"--key <key>",describe:"Stable plan key (e.g. starter, pro)",required:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name",required:!0},{field:"free",kind:"flag",token:"--free",describe:"Mark this as the free plan (requires hard-enforced limits)"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--rate-limit <maxPerWindow>",describe:"Burst-protection rate limit on requests (default: 600). Publishing requires every plan to carry one \u2014 pass --no-rate-limit only for drafts.",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--no-rate-limit",describe:"Create the plan without a burst rate limit"},{field:"rateWindow",kind:"flag",token:"--rate-window <window>",describe:"Rate limit window: second | minute | hour (default: minute)"},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Counts as revenue for the no-revenue check.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=Gh(t.meter),c=Kh(t.grant),u=Hh({key:t.key,name:t.name,free:t.free,recurringFeeCents:t.recurringFeeCents,grants:c,trialDays:t.trialDays,maxMonthlySpendCents:t.maxMonthlySpendCents,rateLimit:t.rateLimit,rateWindow:t.rateWindow,meters:s}),l=await e.createPlan(i,u,{env:t.env},r);n(l)||o({productId:i,plan:l},`Plan ${t.key} created`)}},mcp:null},{opKey:"plan.update",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"update",summary:"Update a plan (canonical plan spec)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000. Replaces the plan's grants[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Replaces the plan's meters[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId,i={};t.name!==void 0&&(i.name=t.name),typeof t.recurringFeeCents=="number"&&(i.recurring_fee_cents=t.recurringFeeCents);let s=Kh(t.grant);s&&(i.grants=s);let c=Gh(t.meter);if(c&&(i.meters=c),typeof t.trialDays=="number"&&(i.trial_days=t.trialDays),typeof t.maxMonthlySpendCents=="number"&&(i.max_monthly_spend_cents=t.maxMonthlySpendCents),Object.keys(i).length===0)throw new k("No fields to update. Pass --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",void 0,{code:"PLAN_UPDATE_NO_FIELDS"});let u=await e.updatePlan(o,n,i,{env:t.env});r({productId:o,plan:u},`Plan ${n} updated`)}},mcp:null},{opKey:"plan.delete",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"delete",summary:"Delete a plan. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm plan deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId;await e.deletePlan(o,n,{env:t.env}),r({productId:o,deleted:n},`Plan ${n} deleted`)}},mcp:null}];function Wh(e,t){W(e,t,jS)}var LS=[{opKey:"persona.bootstrap",operationClass:"operate",scope:["products:read"],sideEffect:"write",cli:{group:"persona",command:"bootstrap",summary:"Issue a fresh fsk_test_ API key in a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name (must be test-strategy)",required:!0},{field:"plan",kind:"flag",token:"--plan <planKey>",describe:"Plan key to assign (e.g. starter)"},{field:"displayName",kind:"flag",token:"--display-name <name>",describe:"Persona display name"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Yl(e,o,t.env),i=await e.issuePersonaBootstrapKey(o,n,{planKey:t.plan,displayName:t.displayName});r({productId:o,environmentId:n,result:i},"Persona bootstrapped")}},mcp:{tool:"fs_persona_bootstrap",title:"Bootstrap a test persona",description:"Issue a one-time test bootstrap key for a product environment \u2014 use it to provision a test persona. Returns the key ONCE; store it now.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id to scope the persona to.")},handler:async(e,{productId:t,environmentId:r})=>e.issuePersonaBootstrapKey(t,r)}},{opKey:"persona.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"persona",command:"list",summary:"List personas for a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Yl(e,o,t.env),i=await e.listPersonas(o,n);r({productId:o,environmentId:n,result:i},"Personas")}},mcp:{tool:"fs_persona_list",title:"List personas",description:"List a product environment's test personas (id, label, status). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id whose personas to list.")},handler:async(e,{productId:t,environmentId:r})=>e.listPersonas(t,r)}},{opKey:"persona.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"persona",command:"revoke",summary:"Revoke a persona's API key",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"personaId",kind:"positional",token:"<personaId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.personaId,i=await Yl(e,o,t.env),s=await e.revokePersona(o,i,n);r({productId:o,environmentId:i,result:s},`Persona ${n} revoked`)}},mcp:{tool:"fs_persona_revoke",title:"Revoke a persona",description:"Revoke a test persona. Its credentials stop working.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id."),personaId:a.string().describe("The persona id to revoke.")},handler:async(e,{productId:t,environmentId:r,personaId:o})=>e.revokePersona(t,r,o)}}];function qh(e,t){W(e,t,LS)}async function Yl(e,t,r){try{return await Fi(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var FS=[{opKey:"usage.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"usage",command:"summary",summary:"Show usage summary for the last 30 days",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.managementGetUsage(o);r({productId:o,summary:n},"Usage summary")}},mcp:{tool:"fs_usage_read",title:"Read usage summary",description:"Read a product's usage summary \u2014 metered request counts and tier utilization. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose usage to read.")},handler:async(e,{productId:t})=>e.managementGetUsage(t)}}];function Jh(e,t){W(e,t,FS)}function Yh(e,t){let r=e.command("connect").description("Connection status for GitHub and Stripe (browser-only flows)");r.command("github").description("Print GitHub-connection status").action(async()=>{let n=await t().builderGitHubStatus();B({status:n},"GitHub status")}),r.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let n=t(),i=await Li(n,o),s=await n.productStripeStatus(i);B({productId:i,status:s},"Stripe status")})}function MS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}var ZS=[{opKey:"maker_token.read",operationClass:"operate",scope:[],sideEffect:"read",cli:{group:"token",command:"list",summary:"List maker tokens in the current org",args:[],handler:async({client:e,emit:t})=>{let r=MS(await e.managementListMakerTokens());t({count:r.length,tokens:r.map(o=>({id:o.id,name:o.name??null,scopes:o.scopes??[],productId:o.productId??null,lastFour:o.lastFour??null,createdAt:o.createdAt??null,revokedAt:o.revokedAt??null}))},`${r.length} token(s)`)}},mcp:{tool:"fs_maker_token_list",title:"List maker tokens",description:"List the workspace's maker tokens (mk_) \u2014 id, label, scopes, last-four, status. Read-only; secrets are never shown. Creating/revoking maker tokens is intentionally not exposed via MCP.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>e.managementListMakerTokens()}},{opKey:"maker_token.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"create",summary:"Create a new maker token (returns the secret once)",args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly token name",required:!0},{field:"scope",kind:"flag",token:"--scope <scope...>",describe:"Scope(s) to attach (e.g. products:update products:publish)"},{field:"product",kind:"flag",token:"--product <productId>",describe:"Scope to a specific product"}],handler:async({client:e,args:t,emit:r})=>{let o=await e.managementCreateMakerToken({name:t.name,scopes:t.scope,productId:t.product});r({result:o},"Token created")}},mcp:null},{opKey:"maker_token.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"revoke",summary:"Revoke a maker token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm token revocation.",args:[{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.tokenId;await e.managementRevokeMakerToken(o),r({revoked:o},`Token ${o} revoked`)}},mcp:null}];function Xh(e,t){W(e,t,ZS)}var Xl=["gateway_verification","metering","health","tunnel"],VS="<productId>",Ln="products:update",Fn="The product id.",nt={field:"productId",kind:"positional",token:VS};function Qh(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.backends)?t.backends:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}async function e_(e,t,r){if(!r)return null;try{return await Fi(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var Ql=e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):void 0,BS=[{opKey:"backend.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend",command:"list",summary:"List backends for a product",args:[nt],handler:async({client:e,args:t,emit:r})=>{let o=Qh(await e.builderListBackends(t.productId));r({count:o.length,backends:o},`${o.length} backend(s)`)}},mcp:{tool:"fs_backend_list",title:"List backends",description:"List a product's backends (origins) \u2014 id, name, slug, transport mode, default flag. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose backends to list.")},handler:async(e,{productId:t})=>e.builderListBackends(t)}},{opKey:"backend.create",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend",command:"create",summary:"Create a backend (default transport: public_origin)",idempotent:!0,args:[nt,{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly backend name",required:!0},{field:"slug",kind:"flag",token:"--slug <slug>",describe:"Stable slug (defaults to a slugified name)"},{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope backend to an environment name or id"},{field:"transport",kind:"flag",token:"--transport <mode>",describe:"Transport mode: public_origin | mtls | cloudflare_tunnel",defaultValue:"public_origin"},{field:"runner",kind:"flag",token:"--runner <runner>",describe:"managed_cloudflared | sidecar"},{field:"runtime",kind:"flag",token:"--runtime <runtime>",describe:"Container/runtime descriptor"},{field:"originUrl",kind:"flag",token:"--origin-url <url>",describe:"Builder origin URL (public_origin/mtls)"},{field:"default",kind:"flag",token:"--default",describe:"Mark this backend the product default"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e_(e,i,t.env),c=t.transport==="mtls"||t.transport==="cloudflare_tunnel"?t.transport:"public_origin",u=await e.builderCreateBackend(i,{name:t.name,slug:t.slug,environmentId:s,transportMode:c,runner:t.runner==="managed_cloudflared"||t.runner==="sidecar"?t.runner:null,runtime:t.runtime??null,originUrl:t.originUrl??null,isDefault:t.default},r);n(u)||o({result:u},"Backend created")}},mcp:{tool:"fs_backend_create",title:"Create a backend",description:"Create a backend (origin) for a product. Pick a transport mode: public_origin (plain HTTPS), mtls (mutual TLS), or cloudflare_tunnel (secure bring-your-own-backend). Mark it default to route traffic to it.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the backend in."),name:a.string().describe("Backend name (e.g. 'prod-origin')."),slug:a.string().optional().describe("URL-safe slug; derived from name if omitted."),transportMode:a.enum(["public_origin","mtls","cloudflare_tunnel"]).optional().describe("How the gateway reaches the origin; defaults to public_origin."),originUrl:a.string().optional().describe("The origin URL (for public_origin / mtls modes)."),isDefault:a.boolean().optional().describe("Route traffic to this backend by default."),...he},handler:async(e,t)=>e.builderCreateBackend(t.productId,{name:t.name,slug:t.slug,transportMode:t.transportMode,originUrl:t.originUrl,isDefault:t.isDefault},{idempotencyKey:t.idempotencyKey})}},{opKey:"backend.delete",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend",command:"delete",summary:"Delete a backend (revokes its runtime tokens). Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm backend deletion.",args:[nt,{field:"backendId",kind:"positional",token:"<backendId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.backendId;await e.builderDeleteBackend(o,n),r({productId:o,deleted:n},`Backend ${n} deleted`)}},mcp:{tool:"fs_backend_delete",title:"Delete a backend",description:"Delete a backend (origin). Traffic routed to it stops; re-create to restore.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),backendId:a.string().describe("The backend id to delete.")},handler:async(e,{productId:t,backendId:r})=>e.builderDeleteBackend(t,r)}},{opKey:"runtime_token.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend tokens",command:"list",summary:"List runtime tokens for a product",args:[nt],handler:async({client:e,args:t,emit:r})=>{let o=Qh(await e.builderListRuntimeTokens(t.productId));r({count:o.length,tokens:o},`${o.length} runtime token(s)`)}},mcp:{tool:"fs_runtime_token_list",title:"List runtime tokens",description:"List a product's runtime tokens (fsrt_) \u2014 id, last-four, capabilities, status. Read-only; secrets are never shown.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn)},handler:async(e,{productId:t})=>e.builderListRuntimeTokens(t)}},{opKey:"runtime_token.mint",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend tokens",command:"create",summary:"Create a runtime token (returns FS_RUNTIME_TOKEN once)",idempotent:!0,args:[nt,{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope token to an environment name or id"},{field:"backend",kind:"flag",token:"--backend <backendId>",describe:"Bind token to a specific backend"},{field:"kind",kind:"flag",token:"--kind <kind>",describe:"live | test (defaults from env scope)"},{field:"capabilities",kind:"flag",token:"--capabilities <list>",describe:`Comma-separated capabilities: ${Xl.join(" | ")}. Default: core's DEFAULT_CAPABILITIES. Use tunnel for cloudflare_tunnel backends.`},{field:"meters",kind:"flag",token:"--meters <list>",describe:"Comma-separated allowed meters (default: all product meters)"},{field:"routes",kind:"flag",token:"--routes <list>",describe:"Comma-separated allowed routes"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await e_(e,i,t.env),c=t.kind==="test"||t.kind==="live"?t.kind:void 0,u=Ql(t.capabilities);if(u){for(let d of u)if(!Xl.includes(d))throw new k(`Unknown capability "${d}". Available: ${Xl.join(", ")}.`,void 0,{code:"UNKNOWN_RUNTIME_TOKEN_CAPABILITY"})}let l=await e.builderCreateRuntimeToken(i,{environmentId:s,backendId:t.backend??null,kind:c,capabilities:u,allowedMeters:Ql(t.meters),allowedRoutes:Ql(t.routes)},r);n(l)||o({envVar:"FS_RUNTIME_TOKEN",result:l},"Runtime token created")}},mcp:{tool:"fs_runtime_token_mint",title:"Mint a runtime token",description:"Mint a new runtime token (fsrt_) for a backend. Returns the plaintext token ONCE \u2014 store it now (e.g. as FS_RUNTIME_TOKEN). Capabilities default to the backend's needs (gateway_verification, metering, health).",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),backendId:a.string().optional().describe("Bind the token to this backend."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),kind:a.enum(["live","test"]).optional().describe("Token kind; defaults from the env scope."),capabilities:a.array(a.string()).optional().describe("Capabilities (gateway_verification, metering, health, tunnel)."),...he},handler:async(e,t)=>e.builderCreateRuntimeToken(t.productId,{backendId:t.backendId??null,environmentId:t.environmentId??null,kind:t.kind,capabilities:t.capabilities},{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.rotate",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend tokens",command:"rotate",summary:"Rotate a runtime token (returns a fresh FS_RUNTIME_TOKEN once)",args:[nt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId,i=await e.builderRotateRuntimeToken(o,n);r({envVar:"FS_RUNTIME_TOKEN",result:i},`Runtime token ${n} rotated`)}},mcp:{tool:"fs_runtime_token_rotate",title:"Rotate a runtime token",description:"Rotate a runtime token: mint a fresh secret carrying the same scope and revoke the old one. Returns the new plaintext token ONCE.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),tokenId:a.string().describe("The runtime token id to rotate."),...he},handler:async(e,t)=>e.builderRotateRuntimeToken(t.productId,t.tokenId,{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.revoke",operationClass:"operate",scope:[Ln],sideEffect:"write",cli:{group:"backend tokens",command:"revoke",summary:"Revoke a runtime token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm runtime token revocation.",args:[nt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId;await e.builderRevokeRuntimeToken(o,n),r({productId:o,revoked:n},`Runtime token ${n} revoked`)}},mcp:{tool:"fs_runtime_token_revoke",title:"Revoke a runtime token",description:"Revoke a runtime token. The backend using it stops verifying.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Fn),tokenId:a.string().describe("The runtime token id to revoke.")},handler:async(e,{productId:t,tokenId:r})=>e.builderRevokeRuntimeToken(t,r)}}];function t_(e,t){W(e,t,BS)}var ed="The product id.",td={field:"productId",kind:"positional",token:"<productId>"},nd={field:"env",kind:"flag",token:"--env <environmentId>",describe:"Scope to a preview environment id (omit for production)."},HS=[{opKey:"frontend.deploy",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"deploy",summary:"Trigger a frontend build (deploy) for a product's connected repo",idempotent:!0,args:[td,nd,{field:"ref",kind:"flag",token:"--ref <ref>",describe:"Git ref to build (defaults to the env branch / repo default)."},{field:"buildCmd",kind:"flag",token:"--build-cmd <cmd>",describe:"Override the build command."}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendDeploy(t.productId,{ref:t.ref,buildCmd:t.buildCmd,environmentId:t.env},r);n(i)||o({result:i},"Frontend build triggered")}},mcp:{tool:"fs_frontend_deploy",title:"Deploy a product frontend",description:"Trigger a Managed Frontend Hosting build for the product's connected repo (production by default; pass environmentId for a preview env). Returns the enqueued build.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ed),ref:a.string().optional().describe("Git ref to build (defaults to the env branch / repo default)."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...he},handler:async(e,t)=>e.builderFrontendDeploy(t.productId,{ref:t.ref,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}},{opKey:"frontend.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"frontend",command:"status",summary:"Show the product's current frontend release + recent release history",args:[td,nd],handler:async({client:e,args:t,emit:r})=>{let o=await e.builderFrontendStatus(t.productId,t.env);r(o,"Frontend status")}},mcp:{tool:"fs_frontend_status",title:"Get frontend status",description:"Read a product's current frontend serve state (uiMode, active release hash + producing build, pin flag) plus the recent SUCCEEDED releases (rollback targets). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ed),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production).")},handler:async(e,t)=>e.builderFrontendStatus(t.productId,t.environmentId)}},{opKey:"frontend.rollback",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"rollback",summary:"Roll the product frontend back to a prior release (re-activate its releaseId)",idempotent:!0,args:[td,{field:"releaseId",kind:"flag",token:"--release-id <releaseId>",describe:"The prior release id (manifest hash) to re-activate \u2014 see `frontend status`.",required:!0},nd],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.env},r);n(i)||o({result:i},"Frontend rolled back")}},mcp:{tool:"fs_frontend_rollback",title:"Roll back a product frontend",description:"Roll a product's frontend back to a prior release by its releaseId (manifest hash, from fs_frontend_status). Flips the live pointer back and pins it. The releaseId must belong to this target's build history.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ed),releaseId:a.string().describe("The prior release id (manifest hash) to re-activate."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...he},handler:async(e,t)=>e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}}];function n_(e,t){W(e,t,HS)}import{existsSync as s_,mkdirSync as U$,writeFileSync as j$}from"node:fs";import{basename as L$,dirname as rd,join as F$,resolve as M$}from"node:path";import{createInterface as Z$}from"node:readline/promises";import{stdin as c_,stdout as u_}from"node:process";import{createRequire as GS}from"node:module";var X0=GS(import.meta.url),KS=new Set(["name","displayName","description","sandboxBaseUrl","visibility","logoUrl","primaryColor","envBranchPrefix","baseUrl"]),WS=new Set(["authHeader","upstreamAuth"]),qS=new Set(["meters","billOn4xx"]),JS=new Set(["applyLimitUpgradesInstantly"]),YS=new Set(["product","gateway","metering","billing","frontend","migrations","policies","customer_context","resources","surfaces","entitlements","workflows","plans"]);function XS(e){let t=e.product,r={origin:t.baseUrl};t.displayName!==void 0&&(r.displayName=t.displayName),t.description!==void 0&&(r.description=t.description),t.sandboxBaseUrl!==void 0&&(r.sandboxOrigin=t.sandboxBaseUrl),t.visibility!==void 0&&(r.visibility=t.visibility),t.logoUrl!==void 0&&(r.logoUrl=t.logoUrl),t.primaryColor!==void 0&&(r.primaryColor=t.primaryColor),t.envBranchPrefix!==void 0&&(r.envBranchPrefix=t.envBranchPrefix);let o=e.gateway??{};o.authHeader!==void 0&&(r.authHeader=o.authHeader),o.upstreamAuth!==void 0&&(r.upstreamAuth=o.upstreamAuth),e.metering?.billOn4xx!==void 0&&(r.billOn4xx=e.metering.billOn4xx),e.policies!==void 0&&(r.operatorPolicies=e.policies),e.customer_context!==void 0&&(r.customerContext=QS(e.customer_context));let n=e.billing;if(n){let i={};n.applyLimitUpgradesInstantly!==void 0&&(i.applyLimitUpgradesInstantly=n.applyLimitUpgradesInstantly),Object.keys(i).length&&(r.billing=i)}return r}function QS(e){return{...e.identity_requirement!==void 0?{identityRequirement:e.identity_requirement}:{},...e.context_tokens!==void 0?{contextTokens:e.context_tokens}:{},...e.portal_auth!==void 0?{customerAuth:e.portal_auth}:{}}}function e$(e){let t={};for(let[c,u]of Object.entries(e))YS.has(c)||(t[c]=u);let r=(c,u)=>{if(typeof c!="object"||c===null)return{};let l={};for(let[d,m]of Object.entries(c))u.has(d)||(l[d]=m);return l},o=r(e.product,KS);Object.keys(o).length&&(t.product=o);let n=r(e.gateway,WS);Object.keys(n).length&&(t.gateway=n);let i=r(e.metering,qS);Object.keys(i).length&&(t.metering=i);let s=r(e.billing,JS);return Object.keys(s).length&&(t.billing=s),t}function N(e,t=0){if(typeof e=="object"&&e!==null&&!Array.isArray(e)&&"__capabilityGrant"in e){let r=e,o=[N(r.__capabilityGrant)];return r.__capabilityGrantLimits!==void 0&&o.push(N({limits:r.__capabilityGrantLimits},t)),`capabilityGrant(${o.join(", ")})`}if(Array.isArray(e)){if(e.length===0)return"[]";let r=e.map(i=>N(i,t+1)),o=`[${r.join(", ")}]`;if(o.length<=72&&!o.includes(`
106
- `))return o;let n=" ".repeat(t+1);return`[
107
- ${r.map(i=>`${n}${i}`).join(`,
108
- `)},
109
- ${" ".repeat(t)}]`}if(typeof e=="object"&&e!==null){let r=Object.entries(e);if(r.length===0)return"{}";let o=r.map(([s,c])=>`${t$(s)}: ${N(c,t+1)}`),n=`{ ${o.join(", ")} }`;if(n.length<=72&&!n.includes(`
110
- `))return n;let i=" ".repeat(t+1);return`{
111
- ${o.map(s=>`${i}${s}`).join(`,
112
- `)},
113
- ${" ".repeat(t)}}`}return JSON.stringify(e)}function t$(e){return/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)?e:JSON.stringify(e)}function re(e,t){return`@${e}(${t.join(", ")})`}function r_(e){let t=e.product,r=i_(t.product.name),o=[];o.push(re("Product",[N(a$(t),0)]));let n=O$(t);n&&o.push(n);let i=T$(t);i&&o.push(i);let s=new o$,c=[];s$(c,s,t),c$(c,s,t),u$(c,s,t),l$(c,s,t),d$(c,s,e),p$(c,s,e),g$(c,s,e),b$(c,s,t),y$(c,s,t),x$(c,s,t),k$(c,s,t);let u=[];u.push("import {");for(let l of n$(o,c))u.push(` ${l},`);u.push('} from "@farthershore/product";'),u.push("");for(let l of o)u.push(l);return u.push(`export default class ${r} {`),u.push(r$(c.join(`
114
-
115
- `))),u.push("}"),u.push(""),u.join(`
116
- `)}function n$(e,t){let r=["Product","Frontend","Raw","Meter","Resource","Surface","Backend","Capability","Policy","Feature","Entitlement","Workflow","Migration","Plan"],o=[...e,...t].join(`
117
- `),n=new Set;for(let s of r)new RegExp(`@${s}\\(`).test(o)&&n.add(s);let i=r.filter(s=>n.has(s));return/capabilityGrant\(/.test(o)&&i.push("capabilityGrant"),i}function r$(e){return e.split(`
118
- `).map(t=>t.length?` ${t}`:t).join(`
119
- `)}function i_(e){let r=e.split(/[^A-Za-z0-9]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join("");return(/^[A-Za-z]/.test(r)?r:`Product${r}`)||"Product"}function i$(e){let t=e.replace(/[^A-Za-z0-9_$]/g,"_");return/^[A-Za-z_$]/.test(t)?t:`_${t}`}var o$=class{used=new Set;next(e){let t=i$(e),r=t,o=2;for(;this.used.has(r);)r=`${t}_${o++}`;return this.used.add(r),r}};function a$(e){let t=XS(e),r=e.product.name;return i_(r)!==r?{name:r,...t}:t}function s$(e,t,r){for(let o of r.metering?.meters??[]){let{key:n,...i}=o,s=t.next(n);e.push(`${re("Meter",[N(n),N(i,0)])}
120
- ${s}!: unknown;`)}}function c$(e,t,r){for(let o of r.resources??[]){let{name:n,...i}=o,s=t.next(n);e.push(`${re("Resource",[N(n),N(i,0)])}
121
- ${s}!: unknown;`)}}function u$(e,t,r){for(let o of r.surfaces??[]){let{type:n,key:i,...s}=o,c=t.next(`surface_${i}`);e.push(`${re("Surface",[N(n),N({key:i,...s},0)])}
122
- ${c}!: unknown;`)}}function l$(e,t,r){let o=r.backend;if(o)for(let[n,i]of Object.entries(o)){let s=t.next(n);e.push(`${re("Backend",[N(n),N(i,0)])}
123
- ${s}!: unknown;`)}}function d$(e,t,r){for(let o of r.capabilities){let n=m$(o),i=t.next(o.capability);e.push(`${re("Capability",[N(o.capability),N(n,0)])}
124
- ${i}!: unknown;`)}}function m$(e){let t={};return e.description!==void 0&&(t.description=e.description),e.mutation_class!==void 0&&(t.mutationClass=e.mutation_class),e.includes_features?.length&&(t.includesFeatures=e.includes_features),e.includes_policies?.length&&(t.includesPolicies=e.includes_policies),e.includes_capabilities?.length&&(t.includesCapabilities=e.includes_capabilities),t}function p$(e,t,r){for(let o of r.policies){let n=f$(o),i=t.next(o.name);e.push(`${re("Policy",[N(o.name),N(n,0)])}
125
- ${i}!: unknown;`)}}function f$(e){let t={type:e.type,config:e.config};if(e.description!==void 0&&(t.description=e.description),e.mutation_class!==void 0&&(t.mutationClass=e.mutation_class),e.cacheProfile!==void 0&&(t.cacheProfile=e.cacheProfile),e.compatible_with!==void 0){let r=e.compatible_with;t.compatibleWith={...r.route_types?{routeTypes:r.route_types}:{},...r.meters?{meters:r.meters}:{},...r.auth_modes?{authModes:r.auth_modes}:{}}}return t}function g$(e,t,r){for(let o of r.routes){let n=h$(o),i=t.next(o.feature);e.push(`${re("Feature",[N(o.feature),N(n,0)])}
126
- ${i}!: unknown;`)}}function h$(e){let t={};if(e.description!==void 0&&(t.description=e.description),e.mutation_class!==void 0&&(t.mutationClass=e.mutation_class),e.cacheProfile!==void 0&&(t.cacheProfile=e.cacheProfile),e.upstream!==void 0&&(t.upstreamOrigin=e.upstream.override_origin),e.policies?.length&&(t.policies=e.policies),e.plans?.length&&(t.plans=e.plans),e.runtime?.rollout_key!==void 0&&(t.rolloutKey=e.runtime.rollout_key),e.runtime?.required_flags?.length&&(t.requiredFlags=e.runtime.required_flags),e.actions?.length&&(t.actions=e.actions),e.backend!==void 0&&(t.backend=e.backend),e.routes.length){let r={};for(let o of e.routes)r[_$(o)]=v$(o);t.routes=r}return t}function _$(e){return`${e.match.method??"*"} ${e.match.path}`}function v$(e){let t={};return e.metering?.defaults&&Object.keys(e.metering.defaults).length&&(t.cost=e.metering.defaults),e.metering?.reports?.length&&(t.reports=e.metering.reports),e.metering?.estimates&&Object.keys(e.metering.estimates).length&&(t.estimates=e.metering.estimates),e.action!==void 0&&(t.action=e.action),e.backend!==void 0&&(t.backend=e.backend),e.metering?.onStatusCodes!==void 0&&(t.onStatusCodes=e.metering.onStatusCodes),e.unmetered!==void 0&&(t.unmetered=e.unmetered),e.inheritDefaultMeters!==void 0&&(t.inheritDefaultMeters=e.inheritDefaultMeters),t}function b$(e,t,r){for(let o of r.entitlements??[]){let{key:n,...i}=o,s=t.next(n);e.push(`${re("Entitlement",[N(n),N(i,0)])}
127
- ${s}!: unknown;`)}}function y$(e,t,r){for(let o of r.workflows??[]){let{key:n,...i}=o,s=t.next(n);e.push(`${re("Workflow",[N(n),N(i,0)])}
128
- ${s}!: unknown;`)}}function x$(e,t,r){for(let o of r.migrations??[]){let{id:n,...i}=o,s=t.next(n);e.push(`${re("Migration",[N(n),N(i,0)])}
129
- ${s}!: unknown;`)}}function k$(e,t,r){for(let o of r.plans??[]){let n=I$(o),i=t.next(o.key);e.push(`${re("Plan",[N(o.key),N(n,0)])}
130
- ${i}!: unknown;`)}}function S$(e){let t=e.recurring_fee_cents,r=e.billing_interval,o=e.free,n={};return o===!0&&t===0&&r==="month"?{price:{free:!0},rawPrice:n}:o!==!0&&t!==void 0&&Number.isInteger(t)&&t>=0&&(r==="month"||r==="year")?{price:{amount:t,currency:"usd",interval:r},rawPrice:n}:(t!==void 0&&(n.recurring_fee_cents=t),r!==void 0&&(n.billing_interval=r),o!==void 0&&(n.free=o),{rawPrice:n})}var o_=[["meters","meters"],["limits","limits"],["capability_limits","caps"],["grants","grants"],["trial_days","trialDays"],["max_monthly_spend_cents","maxMonthlySpendCents"],["min_monthly_spend_cents","minMonthlySpendCents"],["featureGates","featureGates"],["capabilities","capabilities"],["overageBehavior","overageBehavior"],["selfServeEnabled","selfServeEnabled"],["legacy","legacy"],["archive","archive"]],$$=new Set(["key","name","description","details","recurring_fee_cents","billing_interval","free",...o_.map(([e])=>e)]);function I$(e){if(e.name===void 0||e.name===null)throw new Error(`plan "${e.key}" is missing a required name`);let t={name:e.name};e.description!==void 0&&(t.description=e.description),e.details!==void 0&&(t.details=e.details);let{price:r,rawPrice:o}=S$(e);r!==void 0&&(t.price=r);let n={...o};for(let[i,s]of o_){let c=e[i];if(c!==void 0){if(i==="limits"){let u=w$(e.limits??[]);u?t.limits=u:n.limits=e.limits;continue}if(i==="capability_limits"){let u=e.capability_limits??{};Object.values(u).every(l=>typeof l=="number")?t.caps=u:n.capability_limits=u;continue}if(i==="grants"){t.grants=e.grants?.map(E$);continue}t[s]=c}}for(let[i,s]of Object.entries(e))$$.has(i)||(n[i]=s);return Object.keys(n).length&&(t.raw=n),t}function E$(e){if(e.kind==="capability_grant"){let{kind:t,capability:r,limits:o,...n}=e;return{__capabilityGrant:r,...o!==void 0?{__capabilityGrantLimits:o}:{},...n}}return e}function w$(e){if(!e||!e.length)return;let t={};for(let r of e){if(r.window.type!=="named"||r.reset_trigger!==void 0||!Number.isInteger(r.capacity)||r.capacity<=0||Object.prototype.hasOwnProperty.call(t,r.dimension))return;t[r.dimension]={rate:r.capacity,interval:r.window.name,...r.enforcement!==void 0?{enforcement:r.enforcement}:{}}}return t}function O$(e){if(e.frontend!==void 0)return re("Frontend",[N({manifest:e.frontend},0)])}function T$(e){let t=e$(e);if(Object.keys(t).length)return re("Raw",[N({productPatch:t},0)])}var A$="@farthershore/farthershore-js";function P$(e){let t={...e.packageName?{name:e.packageName}:{},private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{[A$]:e.frontendSdkRange,react:"^19.0.0","react-dom":"^19.0.0"},devDependencies:{"@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4",typescript:"^6.0.2",vite:"^6.0.0"}};return`${JSON.stringify(t,null,2)}
131
- `}function C$(e){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />',` <title>${e}</title>`," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
132
- `)}function N$(){return`// Customer-facing portal \u2014 the editable frontend for your product.
108
+ `,handler:async({client:e,args:t,emit:r})=>{let o=t.productId,i=ES(await e.managementListPlans(o)).map(s=>({id:s.id,key:s.planKey??s.key??"",name:s.name??"",version:s.version??null,free:s.free??!1,recurring_fee_cents:s.recurring_fee_cents??0,grants:s.grants??[],recurring_grant_cents:Rn({grants:s.grants}),one_time_grant_cents:jt({grants:s.grants}),trial_days:s.trial_days??0,max_monthly_spend_cents:s.max_monthly_spend_cents??null,status:s.status??(s.isActive===!1?"INACTIVE":"ACTIVE")}));r({productId:o,count:i.length,plans:i},`${i.length} plan(s) for product ${o}`),ue()!=="json"&&console.log(wS(i))}},mcp:{tool:"fs_plan_list",title:"List plans",description:"List a product's pricing plans (read-only). Plans are managed as code in the product's GitHub repo \u2014 to add/change/remove a plan, edit the manifest (product/) and push; this tool only reads the current state. Pass the product id (from fs_product_list).",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose plans to list.")},handler:async(e,{productId:t})=>e.managementListPlans(t)}},{opKey:"plan.create",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"create",summary:"Create a plan on a product (canonical plan spec)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"key",kind:"flag",token:"--key <key>",describe:"Stable plan key (e.g. starter, pro)",required:!0},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name",required:!0},{field:"free",kind:"flag",token:"--free",describe:"Mark this as the free plan (requires hard-enforced limits)"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--rate-limit <maxPerWindow>",describe:"Burst-protection rate limit on requests (default: 600). Publishing requires every plan to carry one \u2014 pass --no-rate-limit only for drafts.",parser:e=>parseInt(e,10)},{field:"rateLimit",kind:"flag",token:"--no-rate-limit",describe:"Create the plan without a burst rate limit"},{field:"rateWindow",kind:"flag",token:"--rate-window <window>",describe:"Rate limit window: second | minute | hour (default: minute)"},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Counts as revenue for the no-revenue check.",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=Lh(t.meter),c=Fh(t.grant),u=jh({key:t.key,name:t.name,free:t.free,recurringFeeCents:t.recurringFeeCents,grants:c,trialDays:t.trialDays,maxMonthlySpendCents:t.maxMonthlySpendCents,rateLimit:t.rateLimit,rateWindow:t.rateWindow,meters:s}),l=await e.createPlan(i,u,{env:t.env},r);n(l)||o({productId:i,plan:l},`Plan ${t.key} created`)}},mcp:null},{opKey:"plan.update",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"update",summary:"Update a plan (canonical plan spec)",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly plan name"},{field:"recurringFeeCents",kind:"flag",token:"--recurring-fee-cents <cents>",describe:"Flat subscription fee per period, in cents",parser:e=>parseInt(e,10)},{field:"grant",kind:"flag",token:"--grant <kind:amount_cents>",describe:"Canonical credit grant, repeatable. Supported: recurring:2000, one_time:10000. Replaces the plan's grants[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"trialDays",kind:"flag",token:"--trial-days <days>",describe:"Free-trial length in days",parser:e=>parseInt(e,10)},{field:"maxMonthlySpendCents",kind:"flag",token:"--max-monthly-spend-cents <cents>",describe:"Optional hard cap on monthly spend, in cents",parser:e=>parseInt(e,10)},{field:"meter",kind:"flag",token:"--meter <dimension:price_per_unit_micros>",describe:"Usage meter for PAY_AS_YOU_GO / INCLUDED_USAGE plans, repeatable (e.g. --meter requests:1000). Replaces the plan's meters[].",parser:(e,t)=>[...t,e],defaultValue:[]},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId,i={};t.name!==void 0&&(i.name=t.name),typeof t.recurringFeeCents=="number"&&(i.recurring_fee_cents=t.recurringFeeCents);let s=Fh(t.grant);s&&(i.grants=s);let c=Lh(t.meter);if(c&&(i.meters=c),typeof t.trialDays=="number"&&(i.trial_days=t.trialDays),typeof t.maxMonthlySpendCents=="number"&&(i.max_monthly_spend_cents=t.maxMonthlySpendCents),Object.keys(i).length===0)throw new k("No fields to update. Pass --name, --recurring-fee-cents, --grant, --trial-days, --max-monthly-spend-cents, or --meter.",void 0,{code:"PLAN_UPDATE_NO_FIELDS"});let u=await e.updatePlan(o,n,i,{env:t.env});r({productId:o,plan:u},`Plan ${n} updated`)}},mcp:null},{opKey:"plan.delete",operationClass:"contract",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"delete",summary:"Delete a plan. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm plan deletion.",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planId",kind:"positional",token:"<planId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment scope"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.planId;await e.deletePlan(o,n,{env:t.env}),r({productId:o,deleted:n},`Plan ${n} deleted`)}},mcp:null},{opKey:"plan.migration_batch.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"plan",command:"migrate",summary:"Migrate subscribers between plan versions under a policy (owner-only)",idempotent:!0,args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"planKey",kind:"positional",token:"<planKey>"},{field:"from",kind:"flag",token:"--from <version>",describe:"Source plan version to migrate FROM: an integer (e.g. 1) or head/latest.",required:!0},{field:"to",kind:"flag",token:"--to <version>",describe:"Target plan version to migrate TO: an integer (e.g. 2) or head/latest.",required:!0},{field:"policy",kind:"flag",token:"--policy <policy>",describe:`Migration policy: ${Mi.join(" | ")}.`,required:!0},{field:"proration",kind:"flag",token:"--proration <proration>",describe:"Optional proration: none | prorate | credit."},{field:"completeBy",kind:"flag",token:"--complete-by <iso8601>",describe:"Deadline (ISO 8601) \u2014 required by the by_date policy."}],helpTextAfter:`
109
+ Examples:
110
+ farthershore plan migrate my-product pro --from 1 --to head --policy next_renewal
111
+ farthershore plan migrate my-product pro --from 1 --to 2 --policy immediate --proration prorate
112
+ `,handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=t.planKey,c=t.policy;if(!Mi.includes(c))throw new k(`Invalid --policy "${c}". Supported: ${Mi.join(", ")}.`,void 0,{code:"INVALID_MIGRATION_POLICY"});let u=await e.migratePlan(i,s,{fromVersion:t.from,toVersion:t.to,policy:c,proration:t.proration,completeBy:t.completeBy},r);n(u)||o({productId:i,planKey:s,migration:u},`Migration scheduled for plan ${s}`)}},mcp:{tool:"fs_plan_migrate",title:"Migrate subscribers between plan versions",description:"Schedule a subscriber migration for a plan: move subscribers from one plan version to another under a policy. Pass the plan KEY plus fromVersion/toVersion (each an integer or 'head'/'latest') \u2014 the server resolves them to the right plan versions. Policies: grandfather (keep existing subs as-is), next_renewal (migrate at each sub's renewal), immediate (migrate now), by_date (migrate everyone by a deadline), opt_in (subs choose). This is an OPERATE action (it changes live subscriber state, not the product's code-managed definition).",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose subscribers to migrate."),planKey:a.string().describe("The stable plan key (e.g. 'pro') to migrate within."),fromVersion:a.union([a.string(),a.number().int().positive()]).describe("Source plan version: an integer or 'head'/'latest'."),toVersion:a.union([a.string(),a.number().int().positive()]).describe("Target plan version: an integer or 'head'/'latest'."),policy:a.enum(Mi).describe("Migration policy: grandfather | next_renewal | immediate | by_date | opt_in."),proration:a.enum(["none","prorate","credit"]).optional().describe("Optional proration behaviour."),completeBy:a.string().optional().describe("ISO 8601 deadline \u2014 required by the by_date policy."),...ie},handler:async(e,t)=>e.migratePlan(t.productId,t.planKey,{fromVersion:t.fromVersion,toVersion:t.toVersion,policy:t.policy,proration:t.proration,completeBy:t.completeBy},{idempotencyKey:t.idempotencyKey})}}];function Mh(e,t){K(e,t,OS)}var TS=[{opKey:"persona.bootstrap",operationClass:"operate",scope:["products:read"],sideEffect:"write",cli:{group:"persona",command:"bootstrap",summary:"Issue a fresh fsk_test_ API key in a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name (must be test-strategy)",required:!0},{field:"plan",kind:"flag",token:"--plan <planKey>",describe:"Plan key to assign (e.g. starter)"},{field:"displayName",kind:"flag",token:"--display-name <name>",describe:"Persona display name"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Gl(e,o,t.env),i=await e.issuePersonaBootstrapKey(o,n,{planKey:t.plan,displayName:t.displayName});r({productId:o,environmentId:n,result:i},"Persona bootstrapped")}},mcp:{tool:"fs_persona_bootstrap",title:"Bootstrap a test persona",description:"Issue a one-time test bootstrap key for a product environment \u2014 use it to provision a test persona. Returns the key ONCE; store it now.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id to scope the persona to.")},handler:async(e,{productId:t,environmentId:r})=>e.issuePersonaBootstrapKey(t,r)}},{opKey:"persona.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"persona",command:"list",summary:"List personas for a test environment",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await Gl(e,o,t.env),i=await e.listPersonas(o,n);r({productId:o,environmentId:n,result:i},"Personas")}},mcp:{tool:"fs_persona_list",title:"List personas",description:"List a product environment's test personas (id, label, status). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id whose personas to list.")},handler:async(e,{productId:t,environmentId:r})=>e.listPersonas(t,r)}},{opKey:"persona.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"persona",command:"revoke",summary:"Revoke a persona's API key",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0},{field:"personaId",kind:"positional",token:"<personaId>"},{field:"env",kind:"flag",token:"--env <env>",describe:"Environment name",required:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.personaId,i=await Gl(e,o,t.env),s=await e.revokePersona(o,i,n);r({productId:o,environmentId:i,result:s},`Persona ${n} revoked`)}},mcp:{tool:"fs_persona_revoke",title:"Revoke a persona",description:"Revoke a test persona. Its credentials stop working.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id."),environmentId:a.string().describe("The environment id."),personaId:a.string().describe("The persona id to revoke.")},handler:async(e,{productId:t,environmentId:r,personaId:o})=>e.revokePersona(t,r,o)}}];function Zh(e,t){K(e,t,TS)}async function Gl(e,t,r){try{return await Li(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var AS=[{opKey:"usage.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"usage",command:"summary",summary:"Show usage summary for the last 30 days",args:[{field:"productId",kind:"positional",token:"<productIdOrName>",resolveProduct:!0}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=await e.managementGetUsage(o);r({productId:o,summary:n},"Usage summary")}},mcp:{tool:"fs_usage_read",title:"Read usage summary",description:"Read a product's usage summary \u2014 metered request counts and tier utilization. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose usage to read.")},handler:async(e,{productId:t})=>e.managementGetUsage(t)}}];function Vh(e,t){K(e,t,AS)}function Bh(e,t){let r=e.command("connect").description("Connection status for GitHub and Stripe (browser-only flows)");r.command("github").description("Print GitHub-connection status").action(async()=>{let n=await t().builderGitHubStatus();V({status:n},"GitHub status")}),r.command("stripe <productIdOrName>").description("Print Stripe Connect status for a product").action(async o=>{let n=t(),i=await ji(n,o),s=await n.productStripeStatus(i);V({productId:i,status:s},"Stripe status")})}function PS(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}var NS=[{opKey:"maker_token.read",operationClass:"operate",scope:[],sideEffect:"read",cli:{group:"token",command:"list",summary:"List maker tokens in the current org",args:[],handler:async({client:e,emit:t})=>{let r=PS(await e.managementListMakerTokens());t({count:r.length,tokens:r.map(o=>({id:o.id,name:o.name??null,scopes:o.scopes??[],productId:o.productId??null,lastFour:o.lastFour??null,createdAt:o.createdAt??null,revokedAt:o.revokedAt??null}))},`${r.length} token(s)`)}},mcp:{tool:"fs_maker_token_list",title:"List maker tokens",description:"List the workspace's maker tokens (mk_) \u2014 id, label, scopes, last-four, status. Read-only; secrets are never shown. Creating/revoking maker tokens is intentionally not exposed via MCP.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{},handler:async e=>e.managementListMakerTokens()}},{opKey:"maker_token.create",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"create",summary:"Create a new maker token (returns the secret once)",args:[{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly token name",required:!0},{field:"scope",kind:"flag",token:"--scope <scope...>",describe:"Scope(s) to attach (e.g. products:update products:publish)"},{field:"product",kind:"flag",token:"--product <productId>",describe:"Scope to a specific product"}],handler:async({client:e,args:t,emit:r})=>{let o=await e.managementCreateMakerToken({name:t.name,scopes:t.scope,productId:t.product});r({result:o},"Token created")}},mcp:null},{opKey:"maker_token.revoke",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"token",command:"revoke",summary:"Revoke a maker token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm token revocation.",args:[{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.tokenId;await e.managementRevokeMakerToken(o),r({revoked:o},`Token ${o} revoked`)}},mcp:null}];function Hh(e,t){K(e,t,NS)}var Kl=["gateway_verification","metering","health","tunnel"],CS="<productId>",jn="products:update",Ln="The product id.",tt={field:"productId",kind:"positional",token:CS};function Gh(e){if(!e||typeof e!="object")return[];let t=e;return Array.isArray(t.data)?t.data:Array.isArray(t.backends)?t.backends:Array.isArray(t.tokens)?t.tokens:Array.isArray(e)?e:[]}function RS(e){let t=e.status;if(typeof t=="string"&&t.length>0)return t;let r=typeof e.readinessState=="string"?e.readinessState:null,o=typeof e.provisionStatus=="string"?e.provisionStatus:null;return r??o??"unknown"}function DS(e){return{id:e.id,name:e.name,slug:e.slug,transport:e.transportMode,default:e.isDefault??!1,status:RS(e),originUrl:e.originUrl??null,lastSeenAt:e.lastSeenAt??null}}async function Kh(e,t,r){if(!r)return null;try{return await Li(e,t,r)}catch(o){throw new k(o instanceof Error?o.message:`Environment "${r}" not found on product ${t}.`,void 0,{code:"ENV_NOT_FOUND"})}}var Wl=e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()).filter(t=>t.length>0):void 0,zS=[{opKey:"backend.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend",command:"list",summary:"List backends for a product (id, name, transport, status)",args:[tt],handler:async({client:e,args:t,emit:r})=>{let n=Gh(await e.builderListBackends(t.productId)).map(DS);r({count:n.length,backends:n},`${n.length} backend(s)`)}},mcp:{tool:"fs_backend_list",title:"List backends",description:"List a product's backends (origins) \u2014 id, name, slug, transport (direct|tunnel), default flag, and derived status. Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id whose backends to list.")},handler:async(e,{productId:t})=>e.builderListBackends(t)}},{opKey:"backend.create",operationClass:"operate",scope:[jn],sideEffect:"write",cli:{group:"backend",command:"create",summary:"Create a backend (default transport: direct)",idempotent:!0,args:[tt,{field:"name",kind:"flag",token:"--name <name>",describe:"Human-friendly backend name",required:!0},{field:"slug",kind:"flag",token:"--slug <slug>",describe:"Stable slug (defaults to a slugified name)"},{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope backend to an environment name or id"},{field:"transport",kind:"flag",token:"--transport <mode>",describe:"Transport mode: direct | tunnel",defaultValue:"direct"},{field:"runner",kind:"flag",token:"--runner <runner>",describe:"embedded | sidecar"},{field:"runtime",kind:"flag",token:"--runtime <runtime>",describe:"Container/runtime descriptor"},{field:"originUrl",kind:"flag",token:"--origin-url <url>",describe:"Builder origin URL (direct)"},{field:"default",kind:"flag",token:"--default",describe:"Mark this backend the product default"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await Kh(e,i,t.env),c=t.transport==="tunnel"?"tunnel":"direct",u=await e.builderCreateBackend(i,{name:t.name,slug:t.slug,environmentId:s,transportMode:c,runner:t.runner==="embedded"||t.runner==="sidecar"?t.runner:null,runtime:t.runtime??null,originUrl:t.originUrl??null,isDefault:t.default},r);n(u)||o({result:u},"Backend created")}},mcp:{tool:"fs_backend_create",title:"Create a backend",description:"Create a backend (origin) for a product. Pick a transport mode: direct (public HTTPS URL, secured by Ed25519 request signing) or tunnel (private outbound-only cloudflared, secure bring-your-own-backend). Mark it default to route traffic to it.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe("The product id to create the backend in."),name:a.string().describe("Backend name (e.g. 'prod-origin')."),slug:a.string().optional().describe("URL-safe slug; derived from name if omitted."),transportMode:a.enum(["direct","tunnel"]).optional().describe("How the gateway reaches the origin; defaults to direct."),originUrl:a.string().optional().describe("The origin URL (for direct mode)."),isDefault:a.boolean().optional().describe("Route traffic to this backend by default."),...ie},handler:async(e,t)=>e.builderCreateBackend(t.productId,{name:t.name,slug:t.slug,transportMode:t.transportMode,originUrl:t.originUrl,isDefault:t.isDefault},{idempotencyKey:t.idempotencyKey})}},{opKey:"backend.delete",operationClass:"operate",scope:[jn],sideEffect:"write",cli:{group:"backend",command:"delete",summary:"Delete a backend (revokes its runtime tokens). Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm backend deletion.",args:[tt,{field:"backendId",kind:"positional",token:"<backendId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.backendId;await e.builderDeleteBackend(o,n),r({productId:o,deleted:n},`Backend ${n} deleted`)}},mcp:{tool:"fs_backend_delete",title:"Delete a backend",description:"Delete a backend (origin). Traffic routed to it stops; re-create to restore.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Ln),backendId:a.string().describe("The backend id to delete.")},handler:async(e,{productId:t,backendId:r})=>e.builderDeleteBackend(t,r)}},{opKey:"runtime_token.read",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"backend tokens",command:"list",summary:"List runtime tokens for a product",args:[tt],handler:async({client:e,args:t,emit:r})=>{let o=Gh(await e.builderListRuntimeTokens(t.productId));r({count:o.length,tokens:o},`${o.length} runtime token(s)`)}},mcp:{tool:"fs_runtime_token_list",title:"List runtime tokens",description:"List a product's runtime tokens (fsrt_) \u2014 id, last-four, capabilities, status. Read-only; secrets are never shown.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Ln)},handler:async(e,{productId:t})=>e.builderListRuntimeTokens(t)}},{opKey:"runtime_token.mint",operationClass:"operate",scope:[jn],sideEffect:"write",cli:{group:"backend tokens",command:"create",summary:"Create a runtime token (returns FS_RUNTIME_TOKEN once)",idempotent:!0,args:[tt,{field:"env",kind:"flag",token:"--env <environment>",describe:"Scope token to an environment name or id"},{field:"backend",kind:"flag",token:"--backend <backendId>",describe:"Bind token to a specific backend"},{field:"kind",kind:"flag",token:"--kind <kind>",describe:"live | test (defaults from env scope)"},{field:"capabilities",kind:"flag",token:"--capabilities <list>",describe:`Comma-separated capabilities: ${Kl.join(" | ")}. Default: core's DEFAULT_CAPABILITIES. Use tunnel for tunnel backends.`},{field:"meters",kind:"flag",token:"--meters <list>",describe:"Comma-separated allowed meters (default: all product meters)"},{field:"routes",kind:"flag",token:"--routes <list>",describe:"Comma-separated allowed routes"}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=t.productId,s=await Kh(e,i,t.env),c=t.kind==="test"||t.kind==="live"?t.kind:void 0,u=Wl(t.capabilities);if(u){for(let d of u)if(!Kl.includes(d))throw new k(`Unknown capability "${d}". Available: ${Kl.join(", ")}.`,void 0,{code:"UNKNOWN_RUNTIME_TOKEN_CAPABILITY"})}let l=await e.builderCreateRuntimeToken(i,{environmentId:s,backendId:t.backend??null,kind:c,capabilities:u,allowedMeters:Wl(t.meters),allowedRoutes:Wl(t.routes)},r);n(l)||o({envVar:"FS_RUNTIME_TOKEN",result:l},"Runtime token created")}},mcp:{tool:"fs_runtime_token_mint",title:"Mint a runtime token",description:"Mint a new runtime token (fsrt_) for a backend. Returns the plaintext token ONCE \u2014 store it now (e.g. as FS_RUNTIME_TOKEN). Capabilities default to the backend's needs (gateway_verification, metering, health).",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(Ln),backendId:a.string().optional().describe("Bind the token to this backend."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),kind:a.enum(["live","test"]).optional().describe("Token kind; defaults from the env scope."),capabilities:a.array(a.string()).optional().describe("Capabilities (gateway_verification, metering, health, tunnel)."),...ie},handler:async(e,t)=>e.builderCreateRuntimeToken(t.productId,{backendId:t.backendId??null,environmentId:t.environmentId??null,kind:t.kind,capabilities:t.capabilities},{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.rotate",operationClass:"operate",scope:[jn],sideEffect:"write",cli:{group:"backend tokens",command:"rotate",summary:"Rotate a runtime token (returns a fresh FS_RUNTIME_TOKEN once)",args:[tt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId,i=await e.builderRotateRuntimeToken(o,n);r({envVar:"FS_RUNTIME_TOKEN",result:i},`Runtime token ${n} rotated`)}},mcp:{tool:"fs_runtime_token_rotate",title:"Rotate a runtime token",description:"Rotate a runtime token: mint a fresh secret carrying the same scope and revoke the old one. Returns the new plaintext token ONCE.",returnsOneTimeSecret:!0,annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!1},inputSchema:{productId:a.string().describe(Ln),tokenId:a.string().describe("The runtime token id to rotate."),...ie},handler:async(e,t)=>e.builderRotateRuntimeToken(t.productId,t.tokenId,{idempotencyKey:t.idempotencyKey})}},{opKey:"runtime_token.revoke",operationClass:"operate",scope:[jn],sideEffect:"write",cli:{group:"backend tokens",command:"revoke",summary:"Revoke a runtime token. Requires --yes.",destructive:!0,yesMessage:"Pass --yes to confirm runtime token revocation.",args:[tt,{field:"tokenId",kind:"positional",token:"<tokenId>"}],handler:async({client:e,args:t,emit:r})=>{let o=t.productId,n=t.tokenId;await e.builderRevokeRuntimeToken(o,n),r({productId:o,revoked:n},`Runtime token ${n} revoked`)}},mcp:{tool:"fs_runtime_token_revoke",title:"Revoke a runtime token",description:"Revoke a runtime token. The backend using it stops verifying.",annotations:{readOnlyHint:!1,destructiveHint:!0,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(Ln),tokenId:a.string().describe("The runtime token id to revoke.")},handler:async(e,{productId:t,tokenId:r})=>e.builderRevokeRuntimeToken(t,r)}}];function Wh(e,t){K(e,t,zS)}var ql="The product id.",Jl={field:"productId",kind:"positional",token:"<productId>"},Yl={field:"env",kind:"flag",token:"--env <environmentId>",describe:"Scope to a preview environment id (omit for production)."},US=[{opKey:"frontend.deploy",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"deploy",summary:"Trigger a frontend build (deploy) for a product's connected repo",idempotent:!0,args:[Jl,Yl,{field:"ref",kind:"flag",token:"--ref <ref>",describe:"Git ref to build (defaults to the env branch / repo default)."},{field:"buildCmd",kind:"flag",token:"--build-cmd <cmd>",describe:"Override the build command."}],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendDeploy(t.productId,{ref:t.ref,buildCmd:t.buildCmd,environmentId:t.env},r);n(i)||o({result:i},"Frontend build triggered")}},mcp:{tool:"fs_frontend_deploy",title:"Deploy a product frontend",description:"Trigger a Managed Frontend Hosting build for the product's connected repo (production by default; pass environmentId for a preview env). Returns the enqueued build.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ql),ref:a.string().optional().describe("Git ref to build (defaults to the env branch / repo default)."),buildCmd:a.string().optional().describe("Override the build command."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...ie},handler:async(e,t)=>e.builderFrontendDeploy(t.productId,{ref:t.ref,buildCmd:t.buildCmd,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}},{opKey:"frontend.status",operationClass:"operate",scope:["products:read"],sideEffect:"read",cli:{group:"frontend",command:"status",summary:"Show the product's current frontend release + recent release history",args:[Jl,Yl],handler:async({client:e,args:t,emit:r})=>{let o=await e.builderFrontendStatus(t.productId,t.env);r(o,"Frontend status")}},mcp:{tool:"fs_frontend_status",title:"Get frontend status",description:"Read a product's current frontend serve state (uiMode, active release hash + producing build, pin flag) plus the recent SUCCEEDED releases (rollback targets). Read-only.",annotations:{readOnlyHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ql),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production).")},handler:async(e,t)=>e.builderFrontendStatus(t.productId,t.environmentId)}},{opKey:"frontend.rollback",operationClass:"operate",scope:["products:update"],sideEffect:"write",cli:{group:"frontend",command:"rollback",summary:"Roll the product frontend back to a prior release (re-activate its releaseId)",idempotent:!0,args:[Jl,{field:"releaseId",kind:"flag",token:"--release-id <releaseId>",describe:"The prior release id (manifest hash) to re-activate \u2014 see `frontend status`.",required:!0},Yl],handler:async({client:e,args:t,reqOpts:r,emit:o,emitDryRunPreview:n})=>{let i=await e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.env},r);n(i)||o({result:i},"Frontend rolled back")}},mcp:{tool:"fs_frontend_rollback",title:"Roll back a product frontend",description:"Roll a product's frontend back to a prior release by its releaseId (manifest hash, from fs_frontend_status). Flips the live pointer back and pins it. The releaseId must belong to this target's build history.",annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!1},inputSchema:{productId:a.string().describe(ql),releaseId:a.string().describe("The prior release id (manifest hash) to re-activate."),environmentId:a.string().optional().describe("Scope to a preview environment (omit for production)."),...ie},handler:async(e,t)=>e.builderFrontendRollback(t.productId,{releaseId:t.releaseId,environmentId:t.environmentId},{idempotencyKey:t.idempotencyKey})}}];function qh(e,t){K(e,t,US)}import{existsSync as Yh,mkdirSync as HS,writeFileSync as GS}from"node:fs";import{basename as KS,dirname as Xl,join as WS,resolve as qS}from"node:path";import{createInterface as JS}from"node:readline/promises";import{stdin as Xh,stdout as Qh}from"node:process";var jS="@farthershore/farthershore-js";function LS(e){let t={...e.packageName?{name:e.packageName}:{},private:!0,type:"module",scripts:{dev:"vite",build:"tsc -b && vite build",preview:"vite preview"},dependencies:{[jS]:e.frontendSdkRange,react:"^19.0.0","react-dom":"^19.0.0"},devDependencies:{"@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@vitejs/plugin-react":"^4.3.4",typescript:"^6.0.2",vite:"^6.0.0"}};return`${JSON.stringify(t,null,2)}
113
+ `}function FS(e){return["<!doctype html>",'<html lang="en">'," <head>",' <meta charset="UTF-8" />',' <meta name="viewport" content="width=device-width, initial-scale=1.0" />',` <title>${e}</title>`," </head>"," <body>",' <div id="root"></div>',' <script type="module" src="/src/App.tsx"></script>'," </body>","</html>",""].join(`
114
+ `)}function MS(){return`// Customer-facing portal \u2014 the editable frontend for your product.
133
115
  //
134
116
  // PORTAL CUSTOMIZATION = EDIT THIS \`frontend/\` TREE (the fork model). The
135
117
  // platform serves a generic managed template by default; once you edit and
@@ -192,7 +174,7 @@ createRoot(root).render(
192
174
  </FartherShoreRoot>
193
175
  </StrictMode>,
194
176
  );
195
- `}function R$(){return`:root {
177
+ `}function ZS(){return`:root {
196
178
  color-scheme: light;
197
179
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
198
180
  color: #18181b;
@@ -224,19 +206,20 @@ body {
224
206
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
225
207
  align-items: start;
226
208
  }
227
- `}function D$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,lib:["DOM","DOM.Iterable","ES2022"],allowJs:!1,skipLibCheck:!0,esModuleInterop:!0,allowSyntheticDefaultImports:!0,strict:!0,forceConsistentCasingInFileNames:!0,module:"ESNext",moduleResolution:"Bundler",resolveJsonModule:!0,isolatedModules:!0,noEmit:!0,jsx:"react-jsx",types:["vite/client"]},include:["src"],references:[]},null,2)}
228
- `}function z$(){return`import { defineConfig } from "vite";
209
+ `}function VS(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,lib:["DOM","DOM.Iterable","ES2022"],allowJs:!1,skipLibCheck:!0,esModuleInterop:!0,allowSyntheticDefaultImports:!0,strict:!0,forceConsistentCasingInFileNames:!0,module:"ESNext",moduleResolution:"Bundler",resolveJsonModule:!0,isolatedModules:!0,noEmit:!0,jsx:"react-jsx",types:["vite/client"]},include:["src"],references:[]},null,2)}
210
+ `}function BS(){return`import { defineConfig } from "vite";
229
211
  import react from "@vitejs/plugin-react";
230
212
 
231
213
  export default defineConfig({
232
214
  plugins: [react()],
233
215
  });
234
- `}function a_(e){let t=e.productName??"Farther Shore Product";return[{path:"frontend/package.json",content:P$(e)},{path:"frontend/index.html",content:C$(t)},{path:"frontend/src/App.tsx",content:N$()},{path:"frontend/src/styles.css",content:R$()},{path:"frontend/tsconfig.json",content:D$()},{path:"frontend/vite.config.ts",content:z$()}]}var Zi="product/product.config.ts",V$="0.8.1",B$="0.8.1";function H$(e){let t=new Set;for(let c of e.pricing.meters??[])typeof c.dimension=="string"&&t.add(c.dimension);let r=new Set,o={key:e.kind,name:e.label.split(" \u2014 ")[0]??e.label,description:e.description,...e.pricing},n=[{dimension:"requests",window:{type:"named",name:"minute"},capacity:600,enforcement:"enforce"}];r.add("requests"),e.kind==="free"&&(o.free=!0,n.push({dimension:"requests",window:{type:"named",name:"month"},capacity:1e3,enforcement:"enforce"})),o.limits=n;let i={product:{name:"my-product",displayName:"My Product",baseUrl:"https://app.example.com"},gateway:{},plans:[o]},s=new Set([...t,...r]);return s.size>0&&(i.metering={meters:[...s].map(c=>({key:c,display:X$(c)}))}),i}function G$(e){if(!e)throw new k(`--template is required. Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let t=e.toLowerCase();if(!_e.includes(t))throw new k(`Unknown template "${e}". Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return t}function K$(e,t){let r=H$(e),o=ql(t),n=o.includes("api"),i={...r,surfaces:o.map(s=>({key:s,type:s}))};return Bl.parse({irVersion:Ui,sdkVersion:"0.0.0",product:i,routes:n?[{feature:"api",mutation_class:"contractual",routes:[{match:{method:"GET",path:"/v1/example"},metering:{defaults:{requests:1}}}]}]:[],policies:[],capabilities:[]})}function l_(e,t){return r_(K$(e,t))}function W$(e,t=Zi,r){let o=rd(t),n=u=>o==="."?u:`${o}/${u}`,i=L$(o)==="product"?rd(o):o,s=u=>i==="."?u:F$(i,u),c=a_({frontendSdkRange:B$}).map(u=>({path:s(u.path),content:u.content}));return[{path:s(".gitignore"),content:Y$()},{path:t,content:l_(e,r)},{path:n("package.json"),content:q$()},{path:n("tsconfig.json"),content:J$()},...c]}function q$(){return`${JSON.stringify({private:!0,type:"module",scripts:{build:"farthershore-manifest-build --out manifest-ir.json",validate:"farthershore-manifest-build --out manifest-ir.json"},dependencies:{"@farthershore/product":V$},devDependencies:{typescript:"^6.0.2"}},null,2)}
235
- `}function J$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
236
- `}function Y$(){return["# OS",".DS_Store","Thumbs.db","","# Dependencies and local output","product/node_modules/","product/manifest-ir.json","product/manifest-diagnostics.json","frontend/node_modules/","frontend/dist/","manifest-ir.json","manifest-diagnostics.json","","# Local env + tooling",".env",".env.local",".vscode/",".idea/",""].join(`
237
- `)}function X$(e){return e.split("_").filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Q$(){return Jl().map((e,t)=>` ${t+1}) ${e.kind.padEnd(8)} \u2014 ${e.description}`).join(`
238
- `)}function eI(e){let t=e.pricing,r=(t.meters??[]).map(n=>`${n.dimension} @ ${n.price_per_unit_micros} micros/unit`).join(", "),o=[` recurring_fee_cents ${t.recurring_fee_cents}`,` recurring credit (grant) ${Dn(t)}`,` one-time credit (grant) ${Ft(t)}`,` trial_days ${t.trial_days}`];return r&&o.push(` meters ${r}`),o.join(`
239
- `)}async function tI(e){e.log("FartherShore init \u2014 pick a starter plan preset:"),e.log(""),e.log(Q$()),e.log("");let t=(await e.ask("Preset (number or name, blank to cancel): ")).trim();if(!t)return null;let r=Number.parseInt(t,10),o=null;if(Number.isInteger(r)&&r>=1&&r<=_e.length?o=_e[r-1]??null:_e.includes(t.toLowerCase())&&(o=t.toLowerCase()),!o)throw new k(`Unknown preset "${t}". Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});e.log(""),e.log(`Preview \u2014 ${Mi(o).label}:`),e.log(eI(Mi(o))),e.log("");let n=(await e.ask(`Output path (default: ${Zi}): `)).trim();return{kind:o,path:n||Zi}}function d_(e){e.command("init").description("Scaffold a starter product/product.config.ts from a named plan preset (free | starter | pro | prepaid | metered)").option("--template <kind>",`Plan preset to scaffold. One of: ${_e.join(" | ")}`).option("--force","Overwrite product/product.config.ts if it already exists").option("--path <path>","Output path for the generated product config (default: ./product/product.config.ts)").option("--surface <surface>",`Initial Product SDK surface, repeatable. Available: ${Bt.join(", ")}. Default: frontend, api.`,(t,r)=>[...r,t],[]).addHelpText("after",`
216
+ `}function Jh(e){let t=e.productName??"Farther Shore Product";return[{path:"frontend/package.json",content:LS(e)},{path:"frontend/index.html",content:FS(t)},{path:"frontend/src/App.tsx",content:MS()},{path:"frontend/src/styles.css",content:ZS()},{path:"frontend/tsconfig.json",content:VS()},{path:"frontend/vite.config.ts",content:BS()}]}var Zi="product/product.config.ts",YS="0.8.2",XS="0.8.2";function QS(e){if(!e)throw new k(`--template is required. Choose one of: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let t=e.toLowerCase();if(!ge.includes(t))throw new k(`Unknown template "${e}". Choose one of: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});return t}var e$='limits: { requests: { rate: 600, interval: "minute" } },';function t$(e){let t=e.pricing,r=e.kind==="free",o=[` name: "${n$(e)}",`];r?o.push(" price: { free: true },"):t.recurring_fee_cents>0&&o.push(` price: { amount: ${t.recurring_fee_cents}, currency: "usd", interval: "${t.billing_interval}" },`);let n=(t.meters??[]).filter(i=>typeof i.dimension=="string").map(i=>`${i.dimension}: { micros: ${i.price_per_unit_micros??0} }`);if(n.length>0&&o.push(` meter: { ${n.join(", ")} },`),(t.grants??[]).length>0){let i=(t.grants??[]).map(Ql).join(", ");o.push(` grants: [${i}],`)}return t.trial_days>0&&o.push(` trialDays: ${t.trial_days},`),o.push(` ${e$}`),o}function e_(e,t){let r=Bl(t),n=r.includes("api"),i=["Product","Plan","Requests","Surface"];n&&i.push("Feature");let s=[];s.push("import {");for(let c of i)s.push(` ${c},`);s.push('} from "@farthershore/product";'),s.push(""),s.push("@Product({"),s.push(' name: "my-product",'),s.push(' origin: "https://app.example.com",'),s.push(' displayName: "My Product",'),s.push("})"),s.push("export default class MyProduct {");for(let c of r)s.push(` @Surface("${c}")`),s.push(` ${r$(c)}Surface!: unknown;`),s.push("");s.push(" @Requests()"),s.push(" requests!: unknown;"),s.push(""),n&&(s.push(' @Feature("api", {'),s.push(' routes: { "GET /v1/example": {} },'),s.push(" })"),s.push(" apiFeature!: unknown;"),s.push("")),s.push(` @Plan("${e.kind}", {`);for(let c of t$(e))s.push(c);return s.push(" })"),s.push(` ${e.kind}!: unknown;`),s.push("}"),s.push(""),s.join(`
217
+ `)}function n$(e){return e.label.split(" \u2014 ")[0]??e.label}function r$(e){return e.replace(/-/g,"_")}function Ql(e){return Array.isArray(e)?`[${e.map(Ql).join(", ")}]`:e&&typeof e=="object"?`{ ${Object.entries(e).map(([r,o])=>`${/^[A-Za-z_$][\w$]*$/.test(r)?r:JSON.stringify(r)}: ${Ql(o)}`).join(", ")} }`:JSON.stringify(e)}function i$(e,t=Zi,r){let o=Xl(t),n=u=>o==="."?u:`${o}/${u}`,i=KS(o)==="product"?Xl(o):o,s=u=>i==="."?u:WS(i,u),c=Jh({frontendSdkRange:XS}).map(u=>({path:s(u.path),content:u.content}));return[{path:s(".gitignore"),content:s$()},{path:t,content:e_(e,r)},{path:n("package.json"),content:o$()},{path:n("tsconfig.json"),content:a$()},...c]}function o$(){return`${JSON.stringify({private:!0,type:"module",scripts:{build:"farthershore-manifest-build --out manifest-ir.json",validate:"farthershore-manifest-build --out manifest-ir.json"},dependencies:{"@farthershore/product":YS},devDependencies:{typescript:"^6.0.2"}},null,2)}
218
+ `}function a$(){return`${JSON.stringify({compilerOptions:{target:"ES2022",useDefineForClassFields:!0,module:"NodeNext",moduleResolution:"NodeNext",strict:!0,noEmit:!0,skipLibCheck:!0},include:["**/*.ts"]},null,2)}
219
+ `}function s$(){return["# OS",".DS_Store","Thumbs.db","","# Dependencies and local output","product/node_modules/","product/manifest-ir.json","product/manifest-diagnostics.json","frontend/node_modules/","frontend/dist/","manifest-ir.json","manifest-diagnostics.json","","# Local env + tooling",".env",".env.local",".vscode/",".idea/",""].join(`
220
+ `)}function c$(){return Hl().map((e,t)=>` ${t+1}) ${e.kind.padEnd(8)} \u2014 ${e.description}`).join(`
221
+ `)}function u$(e){let t=e.pricing,r=(t.meters??[]).map(n=>`${n.dimension} @ ${n.price_per_unit_micros} micros/unit`).join(", "),o=[` recurring_fee_cents ${t.recurring_fee_cents}`,` recurring credit (grant) ${Rn(t)}`,` one-time credit (grant) ${jt(t)}`,` trial_days ${t.trial_days}`];return r&&o.push(` meters ${r}`),o.join(`
222
+ `)}async function l$(e){e.log("FartherShore init \u2014 pick a starter plan preset:"),e.log(""),e.log(c$()),e.log("");let t=(await e.ask("Preset (number or name, blank to cancel): ")).trim();if(!t)return null;let r=Number.parseInt(t,10),o=null;if(Number.isInteger(r)&&r>=1&&r<=ge.length?o=ge[r-1]??null:ge.includes(t.toLowerCase())&&(o=t.toLowerCase()),!o)throw new k(`Unknown preset "${t}". Choose one of: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_UNKNOWN"});e.log(""),e.log(`Preview \u2014 ${Fi(o).label}:`),e.log(u$(Fi(o))),e.log("");let n=(await e.ask(`Output path (default: ${Zi}): `)).trim();return{kind:o,path:n||Zi}}function t_(e){e.command("init").description("Scaffold a starter product/product.config.ts from a named plan preset (free | starter | pro | prepaid | metered)").option("--template <kind>",`Plan preset to scaffold. One of: ${ge.join(" | ")}`).option("--force","Overwrite product/product.config.ts if it already exists").option("--path <path>","Output path for the generated product config (default: ./product/product.config.ts)").option("--surface <surface>",`Initial Product SDK surface, repeatable. Available: ${Zt.join(", ")}. Default: frontend, api.`,(t,r)=>[...r,t],[]).addHelpText("after",`
240
223
  Examples:
241
224
  farthershore init # interactive (TTY only)
242
225
  farthershore init --template free
@@ -245,21 +228,21 @@ Examples:
245
228
  farthershore init --template starter --surface frontend --surface agent
246
229
 
247
230
  Available templates:
248
- ${Jl().map(t=>` ${t.kind.padEnd(8)} ${t.description}`).join(`
231
+ ${Hl().map(t=>` ${t.kind.padEnd(8)} ${t.description}`).join(`
249
232
  `)}
250
- `).action(async t=>{let r,o=t.path;if(t.template)r=G$(t.template);else if(c_.isTTY&&u_.isTTY){let d=Z$({input:c_,output:u_});try{let m=await tI({ask:g=>d.question(g),log:g=>{console.log(g)}});if(!m){He("Cancelled.");return}r=m.kind,o=o??m.path}finally{d.close()}}else throw new k(`--template is required when stdin is not a TTY. Choose one of: ${_e.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let n=Mi(r),i=M$(o??Zi),s=jn(t);if(s_(i)&&!t.force)throw new k(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let c=W$(n,i,s),u=c.map(d=>d.path).filter(d=>s_(d));if(u.length>0&&!t.force)throw new k(`${u[0]} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});for(let d of c)U$(rd(d.path),{recursive:!0}),j$(d.path,d.content,"utf-8");let l=c.find(d=>d.path===i)?.content??l_(n,s);B({template:r,path:i,surfaces:ql(s),preset:{kind:n.kind,label:n.label},content:l,files:c},`Scaffolded ${i} from preset "${n.label}".`),He("Next: edit product/product.config.ts, then run `farthershore build`.")})}var nI="x-fs-surface",rI="cli",iI=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow"];function oI(){let e=process.env.FARTHERSHORE_API_URL;if(!e)throw new k("FARTHERSHORE_API_URL is not set. Point it at the core base URL (e.g. https://core.farthershore.com) before running `farthershore workflows`.",void 0,{code:"ADMIN_API_URL_MISSING"});return e.replace(/\/+$/,"")}function aI(){let e=process.env.FARTHERSHORE_ADMIN_SECRET;if(!e)throw new k("FARTHERSHORE_ADMIN_SECRET is not set. This command authenticates against core's /internal/admin/workflow/* proxy with the same shared secret fs-admin uses.",void 0,{code:"ADMIN_SECRET_MISSING"});return e}async function m_(e){let t=oI(),r=aI(),o=await fetch(`${t}${e}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":r,"x-admin-actor-id":"farthershore-cli",[nI]:rI}});if(!o.ok){let i=(await o.json().catch(()=>null))?.error;throw new k(i?.message??o.statusText,o.status,{code:i?.code,details:i?.details})}if(o.status!==204)return o.json()}function od(e){if(e==null)return"\u2014";if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=t/60;return r<60?`${r.toFixed(1)}m`:`${(r/60).toFixed(1)}h`}function p_(e,t=new Date){let r=new Date(e.startedAt).getTime(),o=e.completedAt?new Date(e.completedAt).getTime():e.failedAt?new Date(e.failedAt).getTime():t.getTime();return Math.max(0,o-r)}function Vi(e){switch(e){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return j.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return j.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return j.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return j.magenta;default:return t=>t}}function w(e,t){return e.length<=t?e.padEnd(t):t<=1?e.slice(0,t):`${e.slice(0,t-1)}\u2026`}var V={id:30,type:24,product:18,status:16,phase:26,started:24,duration:10};function sI(e,t=new Date){let r=j.dim([w("ID",V.id),w("TYPE",V.type),w("PRODUCT",V.product),w("STATUS",V.status),w("PHASE",V.phase),w("STARTED",V.started),w("DURATION",V.duration)].join(" ")),o=j.dim(["-".repeat(V.id),"-".repeat(V.type),"-".repeat(V.product),"-".repeat(V.status),"-".repeat(V.phase),"-".repeat(V.started),"-".repeat(V.duration)].join(" ")),n=e.map(i=>{let s=od(p_(i,t)),c=Vi(i.status)(w(i.status,V.status));return[w(i.id,V.id),w(i.workflowType,V.type),w(i.productId??"\u2014",V.product),c,w(i.currentPhase??"\u2014",V.phase),w(i.startedAt,V.started),w(s,V.duration)].join(" ")});return[r,o,...n].join(`
251
- `)}function ve(e,t){let r;return t==null||t===""?r=j.dim("(unset)"):typeof t=="object"?r=JSON.stringify(t):typeof t=="string"||typeof t=="number"||typeof t=="boolean"?r=String(t):r=JSON.stringify(t),` ${j.dim(e.padEnd(20))}${r}`}var $e={stepName:28,phase:26,status:14,attempt:8,duration:10},Ht={eventType:28,occurredAt:24,payload:60},Gt={surface:24,status:14,delta:60};function cI(e){if(e.length===0)return j.dim(" (no steps recorded)");let t=j.dim([w("STEP",$e.stepName),w("PHASE",$e.phase),w("STATUS",$e.status),w("ATTEMPT",$e.attempt),w("DURATION",$e.duration)].join(" ")),r=e.map(o=>[w(o.stepName,$e.stepName),w(o.phase,$e.phase),Vi(o.status)(w(o.status,$e.status)),w(String(o.attempt),$e.attempt),w(od(o.durationMs),$e.duration)].join(" "));return[t,...r].join(`
252
- `)}function uI(e){return Object.keys(e).length===0?"(empty)":JSON.stringify(e)}function lI(e){if(e.length===0)return j.dim(" (no events recorded)");let t=j.dim([w("EVENT",Ht.eventType),w("OCCURRED AT",Ht.occurredAt),w("PAYLOAD",Ht.payload)].join(" ")),r=e.map(o=>[w(o.eventType,Ht.eventType),w(o.occurredAt,Ht.occurredAt),w(uI(o.payload),Ht.payload)].join(" "));return[t,...r].join(`
253
- `)}function dI(e){if(e.length===0)return j.dim(" (no convergence state recorded)");let t=j.dim([w("SURFACE",Gt.surface),w("STATUS",Gt.status),w("DELTA",Gt.delta)].join(" ")),r=e.map(o=>[w(o.surface,Gt.surface),Vi(o.status)(w(o.status,Gt.status)),w(o.deltaDescription??"\u2014",Gt.delta)].join(" "));return[t,...r].join(`
254
- `)}function mI(e){let{execution:t,steps:r,events:o,convergence:n}=e,i=[];return i.push(j.bold(`Workflow ${t.id}`)),i.push(ve("type",t.workflowType)),i.push(ve("status",Vi(t.status)(t.status))),i.push(ve("currentPhase",t.currentPhase)),i.push(ve("startedAt",t.startedAt)),i.push(ve("completedAt",t.completedAt)),i.push(ve("triggeredBy",t.triggeredBy)),i.push(ve("correlationId",t.correlationId)),i.push(ve("productId",t.productId)),i.push(ve("duration",od(p_(t)))),i.push(""),i.push(j.bold("Steps")),i.push(cI(r)),i.push(""),i.push(j.bold("Events")),i.push(lI(o)),i.push(""),i.push(j.bold("Convergence")),i.push(dI(n)),t.errorReason&&(i.push(""),i.push(j.bold(j.red("Error"))),i.push(ve("reason",t.errorReason)),i.push(ve("classification",t.errorClassification))),i.join(`
255
- `)}var id=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function pI(e){if(!e)return 50;let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<=0)throw new k(`--limit must be a positive integer (got "${e}")`,void 0,{code:"INVALID_LIMIT"});return t}function fI(e){let t=new URLSearchParams;if(e.status){if(!id.includes(e.status))throw new k(`--status must be one of: ${id.join(", ")} (got "${e.status}")`,void 0,{code:"INVALID_STATUS"});t.set("status",e.status)}e.type&&t.set("workflowType",e.type),e.product&&t.set("productId",e.product),t.set("limit",String(pI(e.limit)));let r=t.toString();return r?`?${r}`:""}function f_(e){let t=e.command("workflows").description("Inspect durable lifecycle workflow executions (list / show / replay)");t.command("ls").description("List workflow executions as a table").option("--status <status>",`Filter by status (one of: ${id.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${iI.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").action(async r=>{let o=fI(r),n=await m_(`/internal/admin/workflow/executions${o}`);B(n),le()!=="json"&&(console.log(sI(n.items)),console.log(j.dim(`
256
- ${n.items.length} executions${n.nextCursor?" (more available \u2014 pass --limit to see more)":""}`)))}),t.command("show <workflowExecutionId>").description("Show a single workflow execution: header, steps, events, convergence panel").action(async r=>{let o=await m_(`/internal/admin/workflow/executions/${encodeURIComponent(r)}`);B(o),le()!=="json"&&console.log(mI(o))}),t.command("replay <workflowExecutionId>").description("Replay a workflow execution (or a single step). STUB in Wave 5 \u2014 operator-action endpoints land in a follow-up.").option("--step <stepName>","Replay only the named step rather than the full execution").action((r,o)=>{throw new k("Replay not yet implemented via CLI; use core's /workflow/<id>/rollback for now. Tracked in FAR-<followup>.",501,{code:"NOT_IMPLEMENTED"})})}import{spawn as gI}from"node:child_process";import{existsSync as h_}from"node:fs";import{readFile as hI}from"node:fs/promises";var _I="product/product.config.ts",vI="manifest-ir.json",g_="./product/node_modules/.bin/farthershore-manifest-build",bI="./node_modules/.bin/farthershore-manifest-build";function yI(e=h_){return e(g_)?g_:bI}async function xI(e,t=gI,r=h_){let o=yI(r),n=["--entry",e.entry,"--out",e.out],i=t(o,n,{stdio:["ignore","pipe","pipe"]}),s="",c="",u=!1;return i.stdout?.setEncoding("utf8"),i.stderr?.setEncoding("utf8"),i.stdout?.on("data",l=>{s+=l}),i.stderr?.on("data",l=>{c+=l}),new Promise(l=>{let d=(m,g)=>{u||(u=!0,l({command:o,args:n,exitCode:m,signal:g,stdout:s,stderr:c}))};i.on("error",m=>{c+=`${m.message}
257
- `,d(1,null)}),i.on("close",(m,g)=>{d(m??(g?1:0),g)})})}async function kI(e){let t=await hI(e,"utf8"),r=JSON.parse(t);if(!OI(r)||!("ir"in r))throw new Error(`${e} is not a Manifest IR envelope with an ir field`);return{ir:r.ir,irHash:typeof r.irHash=="string"?r.irHash:void 0}}function __(e,t,r={}){e.command("build").description("Build product/product.config.ts into a Manifest IR envelope").option("--entry <path>","Product-as-code entry file (default: product/product.config.ts)").option("--out <path>","Output path for the Manifest IR envelope (default: manifest-ir.json)").addHelpText("after",`
233
+ `).action(async t=>{let r,o=t.path;if(t.template)r=QS(t.template);else if(Xh.isTTY&&Qh.isTTY){let d=JS({input:Xh,output:Qh});try{let m=await l$({ask:g=>d.question(g),log:g=>{console.log(g)}});if(!m){Ie("Cancelled.");return}r=m.kind,o=o??m.path}finally{d.close()}}else throw new k(`--template is required when stdin is not a TTY. Choose one of: ${ge.join(", ")}.`,void 0,{code:"INIT_TEMPLATE_REQUIRED"});let n=Fi(r),i=qS(o??Zi),s=Un(t);if(Yh(i)&&!t.force)throw new k(`${i} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});let c=i$(n,i,s),u=c.map(d=>d.path).filter(d=>Yh(d));if(u.length>0&&!t.force)throw new k(`${u[0]} already exists. Pass --force to overwrite.`,void 0,{code:"INIT_FILE_EXISTS"});for(let d of c)HS(Xl(d.path),{recursive:!0}),GS(d.path,d.content,"utf-8");let l=c.find(d=>d.path===i)?.content??e_(n,s);V({template:r,path:i,surfaces:Bl(s),preset:{kind:n.kind,label:n.label},content:l,files:c},`Scaffolded ${i} from preset "${n.label}".`),Ie("Next: edit product/product.config.ts, then run `farthershore build`.")})}var d$="x-fs-surface",m$="cli",p$=["ProductApplyWorkflow","RollbackWorkflow","StripeSyncWorkflow","WebhookDispatchWorkflow"];function f$(){let e=process.env.FARTHERSHORE_API_URL;if(!e)throw new k("FARTHERSHORE_API_URL is not set. Point it at the core base URL (e.g. https://core.farthershore.com) before running `farthershore workflows`.",void 0,{code:"ADMIN_API_URL_MISSING"});return e.replace(/\/+$/,"")}function g$(){let e=process.env.FARTHERSHORE_ADMIN_SECRET;if(!e)throw new k("FARTHERSHORE_ADMIN_SECRET is not set. This command authenticates against core's /internal/admin/workflow/* proxy with the same shared secret fs-admin uses.",void 0,{code:"ADMIN_SECRET_MISSING"});return e}async function n_(e){let t=f$(),r=g$(),o=await fetch(`${t}${e}`,{method:"GET",headers:{"content-type":"application/json","x-admin-service-secret":r,"x-admin-actor-id":"farthershore-cli",[d$]:m$}});if(!o.ok){let i=(await o.json().catch(()=>null))?.error;throw new k(i?.message??o.statusText,o.status,{code:i?.code,details:i?.details})}if(o.status!==204)return o.json()}function td(e){if(e==null)return"\u2014";if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=t/60;return r<60?`${r.toFixed(1)}m`:`${(r/60).toFixed(1)}h`}function r_(e,t=new Date){let r=new Date(e.startedAt).getTime(),o=e.completedAt?new Date(e.completedAt).getTime():e.failedAt?new Date(e.failedAt).getTime():t.getTime();return Math.max(0,o-r)}function Vi(e){switch(e){case"COMPLETED":case"SUCCEEDED":case"CONVERGED":return z.green;case"RUNNING":case"PENDING":case"PAUSED":case"RETRYING":case"WAITING_FOR_APPROVAL":return z.yellow;case"FAILED":case"DIVERGED":case"STALLED":case"REQUIRES_HUMAN_INTERVENTION":case"TIMEOUT":return z.red;case"ROLLED_BACK":case"CANCELLED":case"COMPENSATED":return z.magenta;default:return t=>t}}function w(e,t){return e.length<=t?e.padEnd(t):t<=1?e.slice(0,t):`${e.slice(0,t-1)}\u2026`}var Z={id:30,type:24,product:18,status:16,phase:26,started:24,duration:10};function h$(e,t=new Date){let r=z.dim([w("ID",Z.id),w("TYPE",Z.type),w("PRODUCT",Z.product),w("STATUS",Z.status),w("PHASE",Z.phase),w("STARTED",Z.started),w("DURATION",Z.duration)].join(" ")),o=z.dim(["-".repeat(Z.id),"-".repeat(Z.type),"-".repeat(Z.product),"-".repeat(Z.status),"-".repeat(Z.phase),"-".repeat(Z.started),"-".repeat(Z.duration)].join(" ")),n=e.map(i=>{let s=td(r_(i,t)),c=Vi(i.status)(w(i.status,Z.status));return[w(i.id,Z.id),w(i.workflowType,Z.type),w(i.productId??"\u2014",Z.product),c,w(i.currentPhase??"\u2014",Z.phase),w(i.startedAt,Z.started),w(s,Z.duration)].join(" ")});return[r,o,...n].join(`
234
+ `)}function he(e,t){let r;return t==null||t===""?r=z.dim("(unset)"):typeof t=="object"?r=JSON.stringify(t):typeof t=="string"||typeof t=="number"||typeof t=="boolean"?r=String(t):r=JSON.stringify(t),` ${z.dim(e.padEnd(20))}${r}`}var ke={stepName:28,phase:26,status:14,attempt:8,duration:10},Vt={eventType:28,occurredAt:24,payload:60},Bt={surface:24,status:14,delta:60};function _$(e){if(e.length===0)return z.dim(" (no steps recorded)");let t=z.dim([w("STEP",ke.stepName),w("PHASE",ke.phase),w("STATUS",ke.status),w("ATTEMPT",ke.attempt),w("DURATION",ke.duration)].join(" ")),r=e.map(o=>[w(o.stepName,ke.stepName),w(o.phase,ke.phase),Vi(o.status)(w(o.status,ke.status)),w(String(o.attempt),ke.attempt),w(td(o.durationMs),ke.duration)].join(" "));return[t,...r].join(`
235
+ `)}function v$(e){return Object.keys(e).length===0?"(empty)":JSON.stringify(e)}function b$(e){if(e.length===0)return z.dim(" (no events recorded)");let t=z.dim([w("EVENT",Vt.eventType),w("OCCURRED AT",Vt.occurredAt),w("PAYLOAD",Vt.payload)].join(" ")),r=e.map(o=>[w(o.eventType,Vt.eventType),w(o.occurredAt,Vt.occurredAt),w(v$(o.payload),Vt.payload)].join(" "));return[t,...r].join(`
236
+ `)}function y$(e){if(e.length===0)return z.dim(" (no convergence state recorded)");let t=z.dim([w("SURFACE",Bt.surface),w("STATUS",Bt.status),w("DELTA",Bt.delta)].join(" ")),r=e.map(o=>[w(o.surface,Bt.surface),Vi(o.status)(w(o.status,Bt.status)),w(o.deltaDescription??"\u2014",Bt.delta)].join(" "));return[t,...r].join(`
237
+ `)}function x$(e){let{execution:t,steps:r,events:o,convergence:n}=e,i=[];return i.push(z.bold(`Workflow ${t.id}`)),i.push(he("type",t.workflowType)),i.push(he("status",Vi(t.status)(t.status))),i.push(he("currentPhase",t.currentPhase)),i.push(he("startedAt",t.startedAt)),i.push(he("completedAt",t.completedAt)),i.push(he("triggeredBy",t.triggeredBy)),i.push(he("correlationId",t.correlationId)),i.push(he("productId",t.productId)),i.push(he("duration",td(r_(t)))),i.push(""),i.push(z.bold("Steps")),i.push(_$(r)),i.push(""),i.push(z.bold("Events")),i.push(b$(o)),i.push(""),i.push(z.bold("Convergence")),i.push(y$(n)),t.errorReason&&(i.push(""),i.push(z.bold(z.red("Error"))),i.push(he("reason",t.errorReason)),i.push(he("classification",t.errorClassification))),i.join(`
238
+ `)}var ed=["RUNNING","COMPLETED","FAILED","ROLLED_BACK","STALLED","REQUIRES_HUMAN_INTERVENTION","WAITING_FOR_APPROVAL","CANCELLED"];function k$(e){if(!e)return 50;let t=Number.parseInt(e,10);if(Number.isNaN(t)||t<=0)throw new k(`--limit must be a positive integer (got "${e}")`,void 0,{code:"INVALID_LIMIT"});return t}function S$(e){let t=new URLSearchParams;if(e.status){if(!ed.includes(e.status))throw new k(`--status must be one of: ${ed.join(", ")} (got "${e.status}")`,void 0,{code:"INVALID_STATUS"});t.set("status",e.status)}e.type&&t.set("workflowType",e.type),e.product&&t.set("productId",e.product),t.set("limit",String(k$(e.limit)));let r=t.toString();return r?`?${r}`:""}function i_(e){let t=e.command("workflows").description("Inspect durable lifecycle workflow executions (list / show / replay)");t.command("ls").description("List workflow executions as a table").option("--status <status>",`Filter by status (one of: ${ed.join(", ")})`).option("--type <type>",`Filter by workflow type (e.g. ${p$.join(", ")})`).option("--product <productId>","Filter by productId").option("--limit <N>","Maximum number of rows to return (default 50)").action(async r=>{let o=S$(r),n=await n_(`/internal/admin/workflow/executions${o}`);V(n),ue()!=="json"&&(console.log(h$(n.items)),console.log(z.dim(`
239
+ ${n.items.length} executions${n.nextCursor?" (more available \u2014 pass --limit to see more)":""}`)))}),t.command("show <workflowExecutionId>").description("Show a single workflow execution: header, steps, events, convergence panel").action(async r=>{let o=await n_(`/internal/admin/workflow/executions/${encodeURIComponent(r)}`);V(o),ue()!=="json"&&console.log(x$(o))}),t.command("replay <workflowExecutionId>").description("Replay a workflow execution (or a single step). STUB in Wave 5 \u2014 operator-action endpoints land in a follow-up.").option("--step <stepName>","Replay only the named step rather than the full execution").action((r,o)=>{throw new k("Replay not yet implemented via CLI; use core's /workflow/<id>/rollback for now. Tracked in FAR-<followup>.",501,{code:"NOT_IMPLEMENTED"})})}import{spawn as $$}from"node:child_process";import{existsSync as a_}from"node:fs";import{readFile as I$}from"node:fs/promises";var E$="product/product.config.ts",w$="manifest-ir.json",o_="./product/node_modules/.bin/farthershore-manifest-build",O$="./node_modules/.bin/farthershore-manifest-build";function T$(e=a_){return e(o_)?o_:O$}async function A$(e,t=$$,r=a_){let o=T$(r),n=["--entry",e.entry,"--out",e.out],i=t(o,n,{stdio:["ignore","pipe","pipe"]}),s="",c="",u=!1;return i.stdout?.setEncoding("utf8"),i.stderr?.setEncoding("utf8"),i.stdout?.on("data",l=>{s+=l}),i.stderr?.on("data",l=>{c+=l}),new Promise(l=>{let d=(m,g)=>{u||(u=!0,l({command:o,args:n,exitCode:m,signal:g,stdout:s,stderr:c}))};i.on("error",m=>{c+=`${m.message}
240
+ `,d(1,null)}),i.on("close",(m,g)=>{d(m??(g?1:0),g)})})}async function P$(e){let t=await I$(e,"utf8"),r=JSON.parse(t);if(!U$(r)||!("ir"in r))throw new Error(`${e} is not a Manifest IR envelope with an ir field`);return{ir:r.ir,irHash:typeof r.irHash=="string"?r.irHash:void 0}}function s_(e,t,r={}){e.command("build").description("Build product/product.config.ts into a Manifest IR envelope").option("--entry <path>","Product-as-code entry file (default: product/product.config.ts)").option("--out <path>","Output path for the Manifest IR envelope (default: manifest-ir.json)").addHelpText("after",`
258
241
  Examples:
259
242
  farthershore build
260
243
  farthershore build --entry product/product.config.ts --out manifest-ir.json
261
244
  farthershore build --format json
262
- `).action(async o=>{let n=e.opts(),i=qn(n.format),s=o.entry??_I,c=o.out??vI,u=r.runLocalManifestBuild??xI,l=r.readManifestEnvelope??kI,d=await u({entry:s,out:c});SI(d,i),d.exitCode!==0&&$I(d,s,c);let m;try{m=await l(c)}catch(g){II(g,s,c)}EI({entry:s,out:c,envelope:m})})}function SI(e,t){t!=="json"&&(e.stdout&&process.stdout.write(e.stdout),e.stderr&&process.stderr.write(e.stderr))}function $I(e,t,r){throw new k(`Manifest build failed with exit code ${e.exitCode||1}`,0,{code:"MANIFEST_BUILD_FAILED",details:{success:!1,phase:"local_build",entry:t,out:r,command:e.command,args:e.args,exitCode:e.exitCode,signal:e.signal,stdout:e.stdout,stderr:e.stderr,nextActions:["Fix product/product.config.ts and run farthershore build again"]}})}function II(e,t,r){let o=e instanceof Error?e.message:"Manifest IR output could not be read";throw new k(o,0,{code:"MANIFEST_IR_READ_FAILED",details:{success:!1,phase:"read_manifest_ir",entry:t,out:r,errors:[{message:o}],nextActions:["Check the manifest build output path and run farthershore build again"]}})}function EI(e){B({success:!0,entry:e.entry,out:e.out,irHash:e.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:wI()},`Manifest IR written to ${e.out}`),He("Commit and push product/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function wI(){return["Commit and push product/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function OI(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}import{spawn as TI}from"node:child_process";import{existsSync as AI,mkdtempSync as PI,writeFileSync as CI}from"node:fs";import{tmpdir as NI}from"node:os";import{join as Bi,resolve as RI}from"node:path";function DI(e,t){let r=e.coreUrl??t.VITE_FS_CORE_URL;if(!r)throw new k("frontend preview needs a Core URL to shim window.__FS_CONFIG__ (the edge injects it in production). Pass --core-url <url> or set VITE_FS_CORE_URL.",void 0,{code:"FRONTEND_PREVIEW_CORE_URL_REQUIRED"});let o=e.clerkPublishableKey??t.VITE_CLERK_PUBLISHABLE_KEY,n=e.clerkSignInUrl??t.VITE_CLERK_SIGN_IN_URL,i=e.clerkSatelliteDomain??t.VITE_CLERK_SATELLITE_DOMAIN,s={};return o&&(s.publishableKey=o),n&&(s.signInUrl=n),i&&(s.satelliteDomain=i),{coreUrl:r,...Object.keys(s).length>0?{clerk:s}:{}}}function zI(e){return`<script>window.__FS_CONFIG__ = ${JSON.stringify(e).replace(/</g,"\\u003c")};</script>`}function UI(e){return`import { defineConfig, mergeConfig, loadConfigFromFile } from "vite";
245
+ `).action(async o=>{let n=e.opts(),i=qn(n.format),s=o.entry??E$,c=o.out??w$,u=r.runLocalManifestBuild??A$,l=r.readManifestEnvelope??P$,d=await u({entry:s,out:c});N$(d,i),d.exitCode!==0&&C$(d,s,c);let m;try{m=await l(c)}catch(g){R$(g,s,c)}D$({entry:s,out:c,envelope:m})})}function N$(e,t){t!=="json"&&(e.stdout&&process.stdout.write(e.stdout),e.stderr&&process.stderr.write(e.stderr))}function C$(e,t,r){throw new k(`Manifest build failed with exit code ${e.exitCode||1}`,0,{code:"MANIFEST_BUILD_FAILED",details:{success:!1,phase:"local_build",entry:t,out:r,command:e.command,args:e.args,exitCode:e.exitCode,signal:e.signal,stdout:e.stdout,stderr:e.stderr,nextActions:["Fix product/product.config.ts and run farthershore build again"]}})}function R$(e,t,r){let o=e instanceof Error?e.message:"Manifest IR output could not be read";throw new k(o,0,{code:"MANIFEST_IR_READ_FAILED",details:{success:!1,phase:"read_manifest_ir",entry:t,out:r,errors:[{message:o}],nextActions:["Check the manifest build output path and run farthershore build again"]}})}function D$(e){V({success:!0,entry:e.entry,out:e.out,irHash:e.envelope.irHash??null,mode:null,validation:null,errors:[],warnings:[],lifecyclePlan:null,nextActions:z$()},`Manifest IR written to ${e.out}`),Ie("Commit and push product/ changes for the GitHub bot to compile and publish accepted lifecycle state.")}function z$(){return["Commit and push product/ changes; the GitHub bot will compile and publish accepted lifecycle state"]}function U$(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}import{spawn as j$}from"node:child_process";import{existsSync as L$,mkdtempSync as F$,writeFileSync as M$}from"node:fs";import{tmpdir as Z$}from"node:os";import{join as Bi,resolve as V$}from"node:path";function B$(e,t){let r=e.coreUrl??t.VITE_FS_CORE_URL;if(!r)throw new k("frontend preview needs a Core URL to shim window.__FS_CONFIG__ (the edge injects it in production). Pass --core-url <url> or set VITE_FS_CORE_URL.",void 0,{code:"FRONTEND_PREVIEW_CORE_URL_REQUIRED"});let o=e.clerkPublishableKey??t.VITE_CLERK_PUBLISHABLE_KEY,n=e.clerkSignInUrl??t.VITE_CLERK_SIGN_IN_URL,i=e.clerkSatelliteDomain??t.VITE_CLERK_SATELLITE_DOMAIN,s={};return o&&(s.publishableKey=o),n&&(s.signInUrl=n),i&&(s.satelliteDomain=i),{coreUrl:r,...Object.keys(s).length>0?{clerk:s}:{}}}function H$(e){return`<script>window.__FS_CONFIG__ = ${JSON.stringify(e).replace(/</g,"\\u003c")};</script>`}function G$(e){return`import { defineConfig, mergeConfig, loadConfigFromFile } from "vite";
263
246
 
264
247
  // Generated by \`farthershore frontend preview\` \u2014 injects window.__FS_CONFIG__
265
248
  // (the edge does this in production). Throwaway; safe to delete.
@@ -298,9 +281,9 @@ export default defineConfig(async (configEnv) => {
298
281
  ],
299
282
  });
300
283
  });
301
- `}function jI(e){let t=PI(Bi(NI(),"fs-frontend-preview-")),r=Bi(t,"vite.preview.config.mjs");return CI(r,e,"utf-8"),r}function LI(e,t,r={}){let o=r.existsImpl??AI,n=r.writeTempConfig??jI,i=RI(e.dir??"frontend");if(!o(Bi(i,"package.json")))throw new k(`No frontend/ project at ${i} (expected ${Bi(i,"package.json")}). Run from a product repo root, or pass --dir <path>.`,void 0,{code:"FRONTEND_PREVIEW_NO_PROJECT"});let s=DI(e,t),c=zI(s),u=UI(c),l=n(u),d=["vite","--config",l];return e.port&&d.push("--port",e.port),{cwd:i,config:s,configPath:l,command:"npx",args:d}}function v_(e,t={}){(e.commands.find(o=>o.name()==="frontend")??e.command("frontend").description("Managed Frontend Hosting: deploy/status/rollback (+ local preview)")).command("preview").alias("dev").description("Run the frontend's `vite dev` with an injected window.__FS_CONFIG__ shim so the portal renders as it serves (coreUrl + optional Clerk).").option("--dir <path>","Frontend project directory (default: ./frontend)").option("--core-url <url>","Platform Core base URL to shim (default: VITE_FS_CORE_URL)").option("--clerk-publishable-key <key>","Clerk publishable key for clerk-strategy envs (default: VITE_CLERK_PUBLISHABLE_KEY)").option("--clerk-sign-in-url <url>","Clerk hosted sign-in URL (default: VITE_CLERK_SIGN_IN_URL)").option("--clerk-satellite-domain <domain>","Clerk satellite domain (default: VITE_CLERK_SATELLITE_DOMAIN)").option("--port <port>","Dev server port (passed to vite)").addHelpText("after",`
284
+ `}function K$(e){let t=F$(Bi(Z$(),"fs-frontend-preview-")),r=Bi(t,"vite.preview.config.mjs");return M$(r,e,"utf-8"),r}function W$(e,t,r={}){let o=r.existsImpl??L$,n=r.writeTempConfig??K$,i=V$(e.dir??"frontend");if(!o(Bi(i,"package.json")))throw new k(`No frontend/ project at ${i} (expected ${Bi(i,"package.json")}). Run from a product repo root, or pass --dir <path>.`,void 0,{code:"FRONTEND_PREVIEW_NO_PROJECT"});let s=B$(e,t),c=H$(s),u=G$(c),l=n(u),d=["vite","--config",l];return e.port&&d.push("--port",e.port),{cwd:i,config:s,configPath:l,command:"npx",args:d}}function c_(e,t={}){(e.commands.find(o=>o.name()==="frontend")??e.command("frontend").description("Managed Frontend Hosting: deploy/status/rollback (+ local preview)")).command("preview").alias("dev").description("Run the frontend's `vite dev` with an injected window.__FS_CONFIG__ shim so the portal renders as it serves (coreUrl + optional Clerk).").option("--dir <path>","Frontend project directory (default: ./frontend)").option("--core-url <url>","Platform Core base URL to shim (default: VITE_FS_CORE_URL)").option("--clerk-publishable-key <key>","Clerk publishable key for clerk-strategy envs (default: VITE_CLERK_PUBLISHABLE_KEY)").option("--clerk-sign-in-url <url>","Clerk hosted sign-in URL (default: VITE_CLERK_SIGN_IN_URL)").option("--clerk-satellite-domain <domain>","Clerk satellite domain (default: VITE_CLERK_SATELLITE_DOMAIN)").option("--port <port>","Dev server port (passed to vite)").addHelpText("after",`
302
285
  Examples:
303
286
  farthershore frontend preview --core-url http://localhost:8787
304
287
  VITE_FS_CORE_URL=http://localhost:8787 farthershore frontend preview
305
288
  farthershore frontend preview --dir ./frontend --port 4321
306
- `).action(async o=>{let n=LI(o,process.env,t);if(B({action:"frontend_preview",dir:n.cwd,coreUrl:n.config.coreUrl,clerk:n.config.clerk??null,command:`${n.command} ${n.args.join(" ")}`},`Previewing ${n.cwd} with window.__FS_CONFIG__ shimmed (coreUrl ${n.config.coreUrl}).`),t.spawnVite===!1||le()==="json")return;He(`Starting vite in ${n.cwd} (window.__FS_CONFIG__ injected). Ctrl-C to stop.`);let s=(t.spawnImpl??TI)(n.command,n.args,{cwd:n.cwd,stdio:"inherit"});await new Promise(c=>{s.on("close",()=>c()),s.on("error",u=>{Gd(`vite failed to start: ${u.message}`),c()})})})}function b_(e,t){Lh(e,t),Zh(e,t),Vh(e,t),Wh(e,t),qh(e,t),Jh(e,t),Yh(e,t),Xh(e,t),t_(e,t),n_(e,t),d_(e),__(e,t),v_(e),f_(e)}var BI=ZI(MI(import.meta.url)),HI=JSON.parse(await FI(VI(BI,"..","package.json"),"utf-8")),Ve=new xd;Ve.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for product configuration").version(HI.version).option("--token <token>","Override auth token").option("--api-url <url>","Override API base URL").option("--format <format>","Output format. Use --format json for machine-readable agent output").option("--no-input","Never prompt; fail fast in non-interactive (agent) use");Ve.hook("preAction",(e,t)=>{Bd(Ve.opts().format),Uh(GI(t))});function GI(e){let t=[],r=e;for(;r&&r.name()&&r.name()!==Ve.name();)t.unshift(r.name()),r=r.parent;return t.join(".")||"unknown"}function KI(){let e=Od(),t=Ve.opts(),r=Pd(t.token),o=t.apiUrl??process.env.FARTHERSHORE_API_URL??e.apiUrl;return kd({apiUrl:o,token:r})}b_(Ve,KI);Ve.exitOverride();async function WI(){try{await Ve.parseAsync(process.argv)}catch(e){if(e instanceof k)process.exitCode=Wl(e);else if(e instanceof Error){let t=e.code;t==="commander.helpDisplayed"||t==="commander.version"||e.message!=="(outputHelp)"&&(process.exitCode=Wl(new k(e.message,0)))}}}WI();
289
+ `).action(async o=>{let n=W$(o,process.env,t);if(V({action:"frontend_preview",dir:n.cwd,coreUrl:n.config.coreUrl,clerk:n.config.clerk??null,command:`${n.command} ${n.args.join(" ")}`},`Previewing ${n.cwd} with window.__FS_CONFIG__ shimmed (coreUrl ${n.config.coreUrl}).`),t.spawnVite===!1||ue()==="json")return;Ie(`Starting vite in ${n.cwd} (window.__FS_CONFIG__ injected). Ctrl-C to stop.`);let s=(t.spawnImpl??j$)(n.command,n.args,{cwd:n.cwd,stdio:"inherit"});await new Promise(c=>{s.on("close",()=>c()),s.on("error",u=>{Zd(`vite failed to start: ${u.message}`),c()})})})}function u_(e,t){Ph(e,t),Dh(e,t),zh(e,t),Mh(e,t),Zh(e,t),Vh(e,t),Bh(e,t),Hh(e,t),Wh(e,t),qh(e,t),t_(e),s_(e,t),c_(e),i_(e)}var Q$=Y$(J$(import.meta.url)),eI=JSON.parse(await q$(X$(Q$,"..","package.json"),"utf-8")),Ze=new _d;Ze.name("farthershore").description("FartherShore CLI \u2014 agent-friendly commands for product configuration").version(eI.version).option("--token <token>","Override auth token").option("--api-url <url>","Override API base URL").option("--format <format>","Output format. Use --format json for machine-readable agent output").option("--no-input","Never prompt; fail fast in non-interactive (agent) use");Ze.hook("preAction",(e,t)=>{Fd(Ze.opts().format),Th(tI(t))});function tI(e){let t=[],r=e;for(;r&&r.name()&&r.name()!==Ze.name();)t.unshift(r.name()),r=r.parent;return t.join(".")||"unknown"}function nI(){let e=$d(),t=Ze.opts(),r=wd(t.token),o=t.apiUrl??process.env.FARTHERSHORE_API_URL??e.apiUrl;return vd({apiUrl:o,token:r})}u_(Ze,nI);Ze.exitOverride();async function rI(){try{await Ze.parseAsync(process.argv)}catch(e){if(e instanceof k)process.exitCode=Vl(e);else if(e instanceof Error){let t=e.code;t==="commander.helpDisplayed"||t==="commander.version"||e.message!=="(outputHelp)"&&(process.exitCode=Vl(new k(e.message,0)))}}}rI();