gamestage 0.9.0 → 0.11.0

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 (2) hide show
  1. package/cli.mjs +84 -76
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -10,32 +10,32 @@
10
10
  * A single bundled file, minified. Nothing here phones home, and inspect,
11
11
  * create and manifest validate all run without an account.
12
12
  */
13
- var Cb=Object.defineProperty;var Ke=(e,t)=>{for(var r in t)Cb(e,r,{get:t[r],enumerable:!0})};var at=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}},At=class extends at{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var er=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new At(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function io(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}import{EventEmitter as Rb}from"node:events";import Wa from"node:child_process";import Ve from"node:path";import so from"node:fs";import F from"node:process";import{stripVTControlCharacters as jb}from"node:util";import{stripVTControlCharacters as Pb}from"node:util";var tr=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=>io(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=[];if(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){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return 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}formatItemList(t,r,o){return r.length===0?[]:[o.styleTitle(t),...r,""]}groupItems(t,r,o){let n=new Map;return t.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[])}),r.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[]),n.get(a).push(i)}),n}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(p,m){return r.formatItem(p,o,m,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(a=a.concat([r.boxWrap(r.styleCommandDescription(s),n),""]));let c=r.visibleArguments(t).map(p=>i(r.styleArgumentTerm(r.argumentTerm(p)),r.styleArgumentDescription(r.argumentDescription(p))));if(a=a.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(t.options,r.visibleOptions(t),p=>p.helpGroupHeading??"Options:").forEach((p,m)=>{let f=p.map(h=>i(r.styleOptionTerm(r.optionTerm(h)),r.styleOptionDescription(r.optionDescription(h))));a=a.concat(this.formatItemList(m,f,r))}),r.showGlobalOptions){let p=r.visibleGlobalOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));a=a.concat(this.formatItemList("Global Options:",p,r))}return this.groupItems(t.commands,r.visibleCommands(t),p=>p.helpGroup()||"Commands:").forEach((p,m)=>{let f=p.map(h=>i(r.styleSubcommandTerm(r.subcommandTerm(h)),r.styleSubcommandDescription(r.subcommandDescription(h))));a=a.concat(this.formatItemList(m,f,r))}),a.join(`
14
- `)}displayWidth(t){return Pb(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 a=" ".repeat(2);if(!o)return a+t;let s=t.padEnd(r+t.length-n.displayWidth(t)),c=2,d=(this.helpWidth??80)-r-c-2,p;return d<this.minWidthToWrap||n.preformatted(o)?p=o:p=n.boxWrap(o,d).replace(/\n/g,`
15
- `+" ".repeat(r+c)),a+s+" ".repeat(c)+p.replace(/\n/g,`
16
- ${a}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,i=[];return o.forEach(a=>{let s=a.match(n);if(s===null){i.push("");return}let c=[s.shift()],l=this.displayWidth(c[0]);s.forEach(d=>{let p=this.displayWidth(d);if(l+p<=r){c.push(d),l+=p;return}i.push(c.join(""));let m=d.trimStart();c=[m],l=this.displayWidth(m)}),i.push(c.join(""))}),i.join(`
17
- `)}};var Vt=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=Ob(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,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new At(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Fm(this.name().replace(/^no-/,"")):Fm(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},ao=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 Fm(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function Ob(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 a=i[0],s=`option creation failed due to '${a}' in option flags '${e}'`;throw/^-[^-][^-]/.test(a)?new Error(`${s}
13
+ var Zb=Object.defineProperty;var Ke=(e,t)=>{for(var r in t)Zb(e,r,{get:t[r],enumerable:!0})};var at=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}},Tt=class extends at{constructor(t){super(1,"commander.invalidArgument",t),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};var nr=class{constructor(t,r){switch(this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}argParser(t){return this.parseArg=t,this}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new Tt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function so(e){let t=e.name()+(e.variadic===!0?"...":"");return e.required?"<"+t+">":"["+t+"]"}import{EventEmitter as Wb}from"node:events";import Ya from"node:child_process";import Ve from"node:path";import lo from"node:fs";import F from"node:process";import{stripVTControlCharacters as Hb}from"node:util";import{stripVTControlCharacters as Bb}from"node:util";var rr=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=>so(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=[];if(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){let o=`(${r.join(", ")})`;return t.description?`${t.description} ${o}`:o}return 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}formatItemList(t,r,o){return r.length===0?[]:[o.styleTitle(t),...r,""]}groupItems(t,r,o){let n=new Map;return t.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[])}),r.forEach(i=>{let a=o(i);n.has(a)||n.set(a,[]),n.get(a).push(i)}),n}formatHelp(t,r){let o=r.padWidth(t,r),n=r.helpWidth??80;function i(d,m){return r.formatItem(d,o,m,r)}let a=[`${r.styleTitle("Usage:")} ${r.styleUsage(r.commandUsage(t))}`,""],s=r.commandDescription(t);s.length>0&&(a=a.concat([r.boxWrap(r.styleCommandDescription(s),n),""]));let c=r.visibleArguments(t).map(d=>i(r.styleArgumentTerm(r.argumentTerm(d)),r.styleArgumentDescription(r.argumentDescription(d))));if(a=a.concat(this.formatItemList("Arguments:",c,r)),this.groupItems(t.options,r.visibleOptions(t),d=>d.helpGroupHeading??"Options:").forEach((d,m)=>{let f=d.map(h=>i(r.styleOptionTerm(r.optionTerm(h)),r.styleOptionDescription(r.optionDescription(h))));a=a.concat(this.formatItemList(m,f,r))}),r.showGlobalOptions){let d=r.visibleGlobalOptions(t).map(m=>i(r.styleOptionTerm(r.optionTerm(m)),r.styleOptionDescription(r.optionDescription(m))));a=a.concat(this.formatItemList("Global Options:",d,r))}return this.groupItems(t.commands,r.visibleCommands(t),d=>d.helpGroup()||"Commands:").forEach((d,m)=>{let f=d.map(h=>i(r.styleSubcommandTerm(r.subcommandTerm(h)),r.styleSubcommandDescription(r.subcommandDescription(h))));a=a.concat(this.formatItemList(m,f,r))}),a.join(`
14
+ `)}displayWidth(t){return Bb(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 a=" ".repeat(2);if(!o)return a+t;let s=t.padEnd(r+t.length-n.displayWidth(t)),c=2,p=(this.helpWidth??80)-r-c-2,d;return p<this.minWidthToWrap||n.preformatted(o)?d=o:d=n.boxWrap(o,p).replace(/\n/g,`
15
+ `+" ".repeat(r+c)),a+s+" ".repeat(c)+d.replace(/\n/g,`
16
+ ${a}`)}boxWrap(t,r){if(r<this.minWidthToWrap)return t;let o=t.split(/\r\n|\n/),n=/[\s]*[^\s]+/g,i=[];return o.forEach(a=>{let s=a.match(n);if(s===null){i.push("");return}let c=[s.shift()],l=this.displayWidth(c[0]);s.forEach(p=>{let d=this.displayWidth(p);if(l+d<=r){c.push(p),l+=d;return}i.push(c.join(""));let m=p.trimStart();c=[m],l=this.displayWidth(m)}),i.push(c.join(""))}),i.join(`
17
+ `)}};var Wt=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=Kb(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,this.helpGroupHeading=void 0}default(t,r){return this.defaultValue=t,this.defaultValueDescription=r,this}preset(t){return this.presetArg=t,this}conflicts(t){return this.conflictsWith=this.conflictsWith.concat(t),this}implies(t){let r=t;return typeof t=="string"&&(r={[t]:!0}),this.implied=Object.assign(this.implied||{},r),this}env(t){return this.envVar=t,this}argParser(t){return this.parseArg=t,this}makeOptionMandatory(t=!0){return this.mandatory=!!t,this}hideHelp(t=!0){return this.hidden=!!t,this}_collectValue(t,r){return r===this.defaultValue||!Array.isArray(r)?[t]:(r.push(t),r)}choices(t){return this.argChoices=t.slice(),this.parseArg=(r,o)=>{if(!this.argChoices.includes(r))throw new Tt(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(r,o):r},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Bm(this.name().replace(/^no-/,"")):Bm(this.name())}helpGroup(t){return this.helpGroupHeading=t,this}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}},co=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 Bm(e){return e.split("-").reduce((t,r)=>t+r[0].toUpperCase()+r.slice(1))}function Kb(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 a=i[0],s=`option creation failed due to '${a}' in option flags '${e}'`;throw/^-[^-][^-]/.test(a)?new Error(`${s}
18
18
  - a short flag is a single dash and a single character
19
19
  - either use a single dash and a single character (for a short flag)
20
20
  - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):o.test(a)?new Error(`${s}
21
21
  - too many short flags`):n.test(a)?new Error(`${s}
22
22
  - too many long flags`):new Error(`${s}
23
- - 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}}function Nb(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;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 Va(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(a=>a.slice(2)));let o=[],n=3,i=.4;return t.forEach(a=>{if(a.length<=1)return;let s=Nb(e,a),c=Math.max(e.length,a.length);(c-s)/c>i&&(s<n?(n=s,o=[a]):s===n&&o.push(a))}),o.sort((a,s)=>a.localeCompare(s)),r&&(o=o.map(a=>`--${a}`)),o.length>1?`
23
+ - 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}}function Vb(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;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 Ja(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(a=>a.slice(2)));let o=[],n=3,i=.4;return t.forEach(a=>{if(a.length<=1)return;let s=Vb(e,a),c=Math.max(e.length,a.length);(c-s)/c>i&&(s<n?(n=s,o=[a]):s===n&&o.push(a))}),o.sort((a,s)=>a.localeCompare(s)),r&&(o=o.map(a=>`--${a}`)),o.length>1?`
24
24
  (Did you mean one of ${o.join(", ")}?)`:o.length===1?`
25
- (Did you mean ${o[0]}?)`:""}var Wt=class e extends Rb{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=>F.stdout.write(r),writeErr:r=>F.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>F.stdout.isTTY?F.stdout.columns:void 0,getErrHelpWidth:()=>F.stderr.isTTY?F.stderr.columns:void 0,getOutHasColors:()=>Zm()??(F.stdout.isTTY&&F.stdout.hasColors?.()),getErrHasColors:()=>Zm()??(F.stderr.isTTY&&F.stderr.hasColors?.()),stripColor:r=>jb(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,a,s]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(a);return n&&(c.description(n),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._executableFile=i.executableFile||null,s&&c.arguments(s),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(t){return new e(t)}createHelp(){return Object.assign(new tr,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
26
- - 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 er(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?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let o=t??"help [command]",[,n,i]=o.match(/([^ ]+) *(.*)/),a=r??"display help for command",s=this.createCommand(n);return s.helpOption(!1),i&&s.arguments(i),a&&s.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=s,(t||r)&&this._initCommandGroup(s),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
27
- 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 at(t,r,o)),F.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 Vt(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let a=`${n} ${i.message}`;this.error(a,{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}'
28
- - already used by option '${r.flags}'`)}this._initOptionGroup(t),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._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,a,s)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let c=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,c,a):i!==null&&t.variadic&&(i=t._collectValue(i,c)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,s)};return this.on("option:"+r,i=>{let a=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,a,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let a=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,a,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof Vt)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,o);if(a.makeOptionMandatory(!!t.mandatory),typeof n=="function")a.default(i).argParser(n);else if(n instanceof RegExp){let s=n;n=(c,l)=>{let d=s.exec(c);return d?d[0]:l},a.default(i).argParser(n)}else a.default(n);return this.addOption(a)}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){F.versions?.electron&&(r.from="electron");let n=F.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=F.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":F.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.options.filter(t=>t.negate&&t.defaultValue===void 0&&this.getOptionValue(t.attributeName())===void 0).forEach(t=>{let r=t.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(t.attributeName(),!0,"default")}),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.
29
- - 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(so.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
25
+ (Did you mean ${o[0]}?)`:""}var Ht=class e extends Wb{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=>F.stdout.write(r),writeErr:r=>F.stderr.write(r),outputError:(r,o)=>o(r),getOutHelpWidth:()=>F.stdout.isTTY?F.stdout.columns:void 0,getErrHelpWidth:()=>F.stderr.isTTY?F.stderr.columns:void 0,getOutHasColors:()=>Vm()??(F.stdout.isTTY&&F.stdout.hasColors?.()),getErrHasColors:()=>Vm()??(F.stderr.isTTY&&F.stderr.hasColors?.()),stripColor:r=>Hb(r)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(t){return this._outputConfiguration=t._outputConfiguration,this._helpOption=t._helpOption,this._helpCommand=t._helpCommand,this._helpConfiguration=t._helpConfiguration,this._exitCallback=t._exitCallback,this._storeOptionsAsProperties=t._storeOptionsAsProperties,this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue,this._allowExcessArguments=t._allowExcessArguments,this._enablePositionalOptions=t._enablePositionalOptions,this._showHelpAfterError=t._showHelpAfterError,this._showSuggestionAfterError=t._showSuggestionAfterError,this}_getCommandAndAncestors(){let t=[];for(let r=this;r;r=r.parent)t.push(r);return t}command(t,r,o){let n=r,i=o;typeof n=="object"&&n!==null&&(i=n,n=null),i=i||{};let[,a,s]=t.match(/([^ ]+) *(.*)/),c=this.createCommand(a);return n&&(c.description(n),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._executableFile=i.executableFile||null,s&&c.arguments(s),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),n?this:c}createCommand(t){return new e(t)}createHelp(){return Object.assign(new rr,this.configureHelp())}configureHelp(t){return t===void 0?this._helpConfiguration:(this._helpConfiguration=t,this)}configureOutput(t){return t===void 0?this._outputConfiguration:(this._outputConfiguration={...this._outputConfiguration,...t},this)}showHelpAfterError(t=!0){return typeof t!="string"&&(t=!!t),this._showHelpAfterError=t,this}showSuggestionAfterError(t=!0){return this._showSuggestionAfterError=!!t,this}addCommand(t,r){if(!t._name)throw new Error(`Command passed to .addCommand() must have a name
26
+ - 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 nr(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?.variadic)throw new Error(`only the last argument can be variadic '${r.name()}'`);if(t.required&&t.defaultValue!==void 0&&t.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${t.name()}'`);return this.registeredArguments.push(t),this}helpCommand(t,r){if(typeof t=="boolean")return this._addImplicitHelpCommand=t,t&&this._defaultCommandGroup&&this._initCommandGroup(this._getHelpCommand()),this;let o=t??"help [command]",[,n,i]=o.match(/([^ ]+) *(.*)/),a=r??"display help for command",s=this.createCommand(n);return s.helpOption(!1),i&&s.arguments(i),a&&s.description(a),this._addImplicitHelpCommand=!0,this._helpCommand=s,(t||r)&&this._initCommandGroup(s),this}addHelpCommand(t,r){return typeof t!="object"?(this.helpCommand(t,r),this):(this._addImplicitHelpCommand=!0,this._helpCommand=t,this._initCommandGroup(t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(t,r){let o=["preSubcommand","preAction","postAction"];if(!o.includes(t))throw new Error(`Unexpected value for event passed to hook : '${t}'.
27
+ 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 at(t,r,o)),F.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 Wt(t,r)}_callParseArg(t,r,o,n){try{return t.parseArg(r,o)}catch(i){if(i.code==="commander.invalidArgument"){let a=`${n} ${i.message}`;this.error(a,{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}'
28
+ - already used by option '${r.flags}'`)}this._initOptionGroup(t),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._initCommandGroup(t),this.commands.push(t)}addOption(t){this._registerOption(t);let r=t.name(),o=t.attributeName();t.defaultValue!==void 0&&this.setOptionValueWithSource(o,t.defaultValue,"default");let n=(i,a,s)=>{i==null&&t.presetArg!==void 0&&(i=t.presetArg);let c=this.getOptionValue(o);i!==null&&t.parseArg?i=this._callParseArg(t,i,c,a):i!==null&&t.variadic&&(i=t._collectValue(i,c)),i==null&&(t.negate?i=!1:t.isBoolean()||t.optional?i=!0:i=""),this.setOptionValueWithSource(o,i,s)};return this.on("option:"+r,i=>{let a=`error: option '${t.flags}' argument '${i}' is invalid.`;n(i,a,"cli")}),t.envVar&&this.on("optionEnv:"+r,i=>{let a=`error: option '${t.flags}' value '${i}' from env '${t.envVar}' is invalid.`;n(i,a,"env")}),this}_optionEx(t,r,o,n,i){if(typeof r=="object"&&r instanceof Wt)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(r,o);if(a.makeOptionMandatory(!!t.mandatory),typeof n=="function")a.default(i).argParser(n);else if(n instanceof RegExp){let s=n;n=(c,l)=>{let p=s.exec(c);return p?p[0]:l},a.default(i).argParser(n)}else a.default(n);return this.addOption(a)}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){F.versions?.electron&&(r.from="electron");let n=F.execArgv??[];(n.includes("-e")||n.includes("--eval")||n.includes("-p")||n.includes("--print"))&&(r.from="eval")}t===void 0&&(t=F.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":F.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.options.filter(t=>t.negate&&t.defaultValue===void 0&&this.getOptionValue(t.attributeName())===void 0).forEach(t=>{let r=t.long.replace(/^--no-/,"--");this._findOption(r)||this.setOptionValueWithSource(t.attributeName(),!0,"default")}),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.
29
+ - 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(lo.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
30
30
  - if '${o}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
31
31
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
32
- - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=[".js",".ts",".tsx",".mjs",".cjs"];function n(d,p){let m=Ve.resolve(d,p);if(so.existsSync(m))return m;if(o.includes(Ve.extname(p)))return;let f=o.find(h=>so.existsSync(`${m}${h}`));if(f)return`${m}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let d;try{d=so.realpathSync(this._scriptPath)}catch{d=this._scriptPath}a=Ve.resolve(Ve.dirname(d),a)}if(a){let d=n(a,i);if(!d&&!t._executableFile&&this._scriptPath){let p=Ve.basename(this._scriptPath,Ve.extname(this._scriptPath));p!==this._name&&(d=n(a,`${p}-${t._name}`))}i=d||i}let s=o.includes(Ve.extname(i)),c;F.platform!=="win32"?s?(r.unshift(i),r=Gm(F.execArgv).concat(r),c=Wa.spawn(F.argv[0],r,{stdio:"inherit"})):c=Wa.spawn(i,r,{stdio:"inherit"}):(this._checkForMissingExecutable(i,a,t._name),r.unshift(i),r=Gm(F.execArgv).concat(r),c=Wa.spawn(F.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(p=>{F.on(p,()=>{c.killed===!1&&c.exitCode===null&&c.kill(p)})});let l=this._exitCallback;c.on("close",d=>{d=d??1,l?l(new at(d,"commander.executeSubCommandAsync","(close)")):F.exit(d)}),c.on("error",d=>{if(d.code==="ENOENT")this._checkForMissingExecutable(i,a,t._name);else if(d.code==="EACCES")throw new Error(`'${i}' not executable`);if(!l)F.exit(1);else{let p=new at(1,"commander.executeSubCommandAsync","(error)");p.nestedError=d,l(p)}}),this.runningCommand=c}_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 a=n;if(n!==null&&o.parseArg){let s=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;a=this._callParseArg(o,n,i,s)}return a};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((a,s)=>t(o,s,a),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?.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(a=>{n.push({hookedCommand:i,callback:a})})}),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 a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(i,t,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(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;function i(d){return d.length>1&&d[0]==="-"}let a=d=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(d)?!this._getCommandAndAncestors().some(p=>p.options.map(m=>m.short).some(m=>/^-\d$/.test(m))):!1,s=null,c=null,l=0;for(;l<t.length||c;){let d=c??t[l++];if(c=null,d==="--"){n===o&&n.push(d),n.push(...t.slice(l));break}if(s&&(!i(d)||a(d))){this.emit(`option:${s.name()}`,d);continue}if(s=null,i(d)){let p=this._findOption(d);if(p){if(p.required){let m=t[l++];m===void 0&&this.optionMissingArgument(p),this.emit(`option:${p.name()}`,m)}else if(p.optional){let m=null;l<t.length&&(!i(t[l])||a(t[l]))&&(m=t[l++]),this.emit(`option:${p.name()}`,m)}else this.emit(`option:${p.name()}`);s=p.variadic?p:null;continue}}if(d.length>2&&d[0]==="-"&&d[1]!=="-"){let p=this._findOption(`-${d[1]}`);if(p){p.required||p.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${p.name()}`,d.slice(2)):(this.emit(`option:${p.name()}`),c=`-${d.slice(2)}`);continue}}if(/^--[^=]+=/.test(d)){let p=d.indexOf("="),m=this._findOption(d.slice(0,p));if(m&&(m.required||m.optional)){this.emit(`option:${m.name()}`,d.slice(p+1));continue}}if(n===r&&i(d)&&!(this.commands.length===0&&a(d))&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(d)){r.push(d),o.push(...t.slice(l));break}else if(this._getHelpCommand()&&d===this._getHelpCommand().name()){r.push(d,...t.slice(l));break}else if(this._defaultCommandName){o.push(d,...t.slice(l));break}}if(this._passThroughOptions){n.push(d,...t.slice(l));break}n.push(d)}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}
32
+ - ${n}`;throw new Error(i)}_executeSubCommand(t,r){r=r.slice();let o=[".js",".ts",".tsx",".mjs",".cjs"];function n(p,d){let m=Ve.resolve(p,d);if(lo.existsSync(m))return m;if(o.includes(Ve.extname(d)))return;let f=o.find(h=>lo.existsSync(`${m}${h}`));if(f)return`${m}${f}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=t._executableFile||`${this._name}-${t._name}`,a=this._executableDir||"";if(this._scriptPath){let p;try{p=lo.realpathSync(this._scriptPath)}catch{p=this._scriptPath}a=Ve.resolve(Ve.dirname(p),a)}if(a){let p=n(a,i);if(!p&&!t._executableFile&&this._scriptPath){let d=Ve.basename(this._scriptPath,Ve.extname(this._scriptPath));d!==this._name&&(p=n(a,`${d}-${t._name}`))}i=p||i}let s=o.includes(Ve.extname(i)),c;F.platform!=="win32"?s?(r.unshift(i),r=Km(F.execArgv).concat(r),c=Ya.spawn(F.argv[0],r,{stdio:"inherit"})):c=Ya.spawn(i,r,{stdio:"inherit"}):(this._checkForMissingExecutable(i,a,t._name),r.unshift(i),r=Km(F.execArgv).concat(r),c=Ya.spawn(F.execPath,r,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(d=>{F.on(d,()=>{c.killed===!1&&c.exitCode===null&&c.kill(d)})});let l=this._exitCallback;c.on("close",p=>{p=p??1,l?l(new at(p,"commander.executeSubCommandAsync","(close)")):F.exit(p)}),c.on("error",p=>{if(p.code==="ENOENT")this._checkForMissingExecutable(i,a,t._name);else if(p.code==="EACCES")throw new Error(`'${i}' not executable`);if(!l)F.exit(1);else{let d=new at(1,"commander.executeSubCommandAsync","(error)");d.nestedError=p,l(d)}}),this.runningCommand=c}_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 a=n;if(n!==null&&o.parseArg){let s=`error: command-argument value '${n}' is invalid for argument '${o.name()}'.`;a=this._callParseArg(o,n,i,s)}return a};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((a,s)=>t(o,s,a),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?.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(a=>{n.push({hookedCommand:i,callback:a})})}),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 a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(i,t,r)})),a=this._chainOrCallHooks(a,"postAction"),a}if(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;function i(p){return p.length>1&&p[0]==="-"}let a=p=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(p)?!this._getCommandAndAncestors().some(d=>d.options.map(m=>m.short).some(m=>/^-\d$/.test(m))):!1,s=null,c=null,l=0;for(;l<t.length||c;){let p=c??t[l++];if(c=null,p==="--"){n===o&&n.push(p),n.push(...t.slice(l));break}if(s&&(!i(p)||a(p))){this.emit(`option:${s.name()}`,p);continue}if(s=null,i(p)){let d=this._findOption(p);if(d){if(d.required){let m=t[l++];m===void 0&&this.optionMissingArgument(d),this.emit(`option:${d.name()}`,m)}else if(d.optional){let m=null;l<t.length&&(!i(t[l])||a(t[l]))&&(m=t[l++]),this.emit(`option:${d.name()}`,m)}else this.emit(`option:${d.name()}`);s=d.variadic?d:null;continue}}if(p.length>2&&p[0]==="-"&&p[1]!=="-"){let d=this._findOption(`-${p[1]}`);if(d){d.required||d.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${d.name()}`,p.slice(2)):(this.emit(`option:${d.name()}`),c=`-${p.slice(2)}`);continue}}if(/^--[^=]+=/.test(p)){let d=p.indexOf("="),m=this._findOption(p.slice(0,d));if(m&&(m.required||m.optional)){this.emit(`option:${m.name()}`,p.slice(d+1));continue}}if(n===r&&i(p)&&!(this.commands.length===0&&a(p))&&(n=o),(this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&o.length===0){if(this._findCommand(p)){r.push(p),o.push(...t.slice(l));break}else if(this._getHelpCommand()&&p===this._getHelpCommand().name()){r.push(p,...t.slice(l));break}else if(this._defaultCommandName){o.push(p,...t.slice(l));break}}if(this._passThroughOptions){n.push(p,...t.slice(l));break}n.push(p)}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}
33
33
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
34
34
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
35
- `),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 F.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()}`,F.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new ao(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=a=>{let s=a.attributeName(),c=this.getOptionValue(s),l=this.options.find(p=>p.negate&&s===p.attributeName()),d=this.options.find(p=>!p.negate&&s===p.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:d||a},n=a=>{let s=o(a),c=s.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${s.envVar}'`:`option '${s.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 a=i.createHelp().visibleOptions(i).filter(s=>s.long).map(s=>s.long);n=n.concat(a),i=i.parent}while(i&&!i._enablePositionalOptions);r=Va(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",n=t.length,i=this.parent?` for '${this.name()}'`:"",a=t.join(", "),s=`error: too many arguments${i}. Expected ${r} argument${o} but got ${n}: ${a}.`;this.error(s,{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=Va(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}
36
- `),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=>io(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)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Ve.basename(t,Ve.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=s=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=s=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(n||(s=this._outputConfiguration.stripColor(s)),o(s)),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(a=>a.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(a=>a.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(F.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.
35
+ `),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 F.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()}`,F.env[t.envVar]):this.emit(`optionEnv:${t.name()}`))}})}_parseOptionsImplied(){let t=new co(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=a=>{let s=a.attributeName(),c=this.getOptionValue(s),l=this.options.find(d=>d.negate&&s===d.attributeName()),p=this.options.find(d=>!d.negate&&s===d.attributeName());return l&&(l.presetArg===void 0&&c===!1||l.presetArg!==void 0&&c===l.presetArg)?l:p||a},n=a=>{let s=o(a),c=s.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${s.envVar}'`:`option '${s.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 a=i.createHelp().visibleOptions(i).filter(s=>s.long).map(s=>s.long);n=n.concat(a),i=i.parent}while(i&&!i._enablePositionalOptions);r=Ja(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",n=t.length,i=this.parent?` for '${this.name()}'`:"",a=t.join(", "),s=`error: too many arguments${i}. Expected ${r} argument${o} but got ${n}: ${a}.`;this.error(s,{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=Ja(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}
36
+ `),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=>so(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)}helpGroup(t){return t===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=t,this)}commandsGroup(t){return t===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=t,this)}optionsGroup(t){return t===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=t,this)}_initOptionGroup(t){this._defaultOptionGroup&&!t.helpGroupHeading&&t.helpGroup(this._defaultOptionGroup)}_initCommandGroup(t){this._defaultCommandGroup&&!t.helpGroup()&&t.helpGroup(this._defaultCommandGroup)}nameFromFilename(t){return this._name=Ve.basename(t,Ve.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=s=>this._outputConfiguration.writeErr(s),n=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(o=s=>this._outputConfiguration.writeOut(s),n=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:r,write:s=>(n||(s=this._outputConfiguration.stripColor(s)),o(s)),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(a=>a.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(a=>a.emit("afterAllHelp",n))}helpOption(t,r){return typeof t=="boolean"?(t?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(t??"-h, --help",r??"display help for command"),(t||r)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(t){return this._helpOption=t,this._initOptionGroup(t),this}help(t){this.outputHelp(t);let r=Number(F.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.
37
37
  Expecting one of '${o.join("', '")}'`);let n=`${t}Help`;return this.on(n,i=>{let a;typeof r=="function"?a=r({error:i.error,command:i.command}):a=r,a&&i.write(`${a}
38
- `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Gm(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 Zm(){if(F.env.NO_COLOR||F.env.FORCE_COLOR==="0"||F.env.FORCE_COLOR==="false")return!1;if(F.env.FORCE_COLOR||F.env.CLICOLOR_FORCE!==void 0)return!0}var dC=new Wt;import{mkdir as Fb,readFile as Gb,writeFile as Zb}from"node:fs/promises";import{dirname as Bb,join as Kb,relative as Vb,resolve as Wb}from"node:path";var Ht=`/**
38
+ `)}),this}_outputHelpIfRequested(t){let r=this._getHelpOption();r&&t.find(n=>r.is(n))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Km(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 Vm(){if(F.env.NO_COLOR||F.env.FORCE_COLOR==="0"||F.env.FORCE_COLOR==="false")return!1;if(F.env.FORCE_COLOR||F.env.CLICOLOR_FORCE!==void 0)return!0}var IC=new Ht;import{mkdir as ew,readFile as tw,writeFile as nw}from"node:fs/promises";import{dirname as rw,join as ow,relative as iw,resolve as aw}from"node:path";var Jt=`/**
39
39
  * @monterosa/gamestage-player, bundled for a browser.
40
40
  *
41
41
  * Generated by the Gamestage CLI. Do not edit: it is replaced whenever the CLI
@@ -162,7 +162,7 @@ export {
162
162
  createPlayerClient,
163
163
  newIdempotencyKey
164
164
  };
165
- `,nr="d783262b079500e8",be="gamestage-player.js",Jt=`/**
165
+ `,or="d783262b079500e8",we="gamestage-player.js",Yt=`/**
166
166
  * @monterosa/gamestage, bundled for a browser.
167
167
  *
168
168
  * Generated by the Gamestage CLI. Do not edit: it is replaced whenever the CLI
@@ -5831,12 +5831,20 @@ async function start(options = {}) {
5831
5831
  if (!current) {
5832
5832
  throw new Error("There is no round to play. The Engine did not return one.");
5833
5833
  }
5834
- const key = newIdempotencyKey();
5835
- const result = await client.play(
5836
- current.id,
5837
- { picks: input.picks, roundVersion: current.version },
5838
- key
5839
- );
5834
+ const key = input.idempotencyKey ?? newIdempotencyKey();
5835
+ let result;
5836
+ try {
5837
+ result = await client.play(
5838
+ current.id,
5839
+ { picks: input.picks, roundVersion: current.version },
5840
+ key
5841
+ );
5842
+ } catch (error) {
5843
+ if (error && typeof error === "object") {
5844
+ error.idempotency_key = key;
5845
+ }
5846
+ throw error;
5847
+ }
5840
5848
  sampleIso(platform.clock, result.server_time);
5841
5849
  return { ...result, idempotency_key: key };
5842
5850
  },
@@ -5893,7 +5901,7 @@ export {
5893
5901
  storageAllowed,
5894
5902
  tokenOf
5895
5903
  };
5896
- `,qt="be3cfb500a7cc446",we="gamestage.js",Db=`<!doctype html>
5904
+ `,qt="bdd61f815518d2fa",ke="gamestage.js",Jb=`<!doctype html>
5897
5905
  <html lang="en">
5898
5906
  <head>
5899
5907
  <meta charset="utf-8" />
@@ -6141,7 +6149,7 @@ main().catch((error) => {
6141
6149
  </script>
6142
6150
  </body>
6143
6151
  </html>
6144
- `,Lb=`<!doctype html>
6152
+ `,Yb=`<!doctype html>
6145
6153
  <html lang="en">
6146
6154
  <head>
6147
6155
  <meta charset="utf-8" />
@@ -6438,7 +6446,7 @@ main().catch((error) => {
6438
6446
  </script>
6439
6447
  </body>
6440
6448
  </html>
6441
- `,zb=`<!doctype html>
6449
+ `,qb=`<!doctype html>
6442
6450
  <html lang="en">
6443
6451
  <head>
6444
6452
  <meta charset="utf-8" />
@@ -6789,7 +6797,7 @@ main().catch((error) => {
6789
6797
  </script>
6790
6798
  </body>
6791
6799
  </html>
6792
- `,Mb=`<!doctype html>
6800
+ `,Xb=`<!doctype html>
6793
6801
  <html lang="en">
6794
6802
  <head>
6795
6803
  <meta charset="utf-8" />
@@ -7038,15 +7046,15 @@ main().catch((error) => {
7038
7046
  </script>
7039
7047
  </body>
7040
7048
  </html>
7041
- `,Ha={hunt:Db,push:Lb,group:zb,forecast:Mb};var Xt=!1;function Bm(e){Xt=e}function R(){return Xt}var Ub=()=>!Xt&&process.stdout.isTTY===!0&&!process.env.NO_COLOR,Yt=(e,t)=>Ub()?`\x1B[${e}m${t}\x1B[0m`:t,S={bold:e=>Yt("1",e),dim:e=>Yt("2",e),red:e=>Yt("31",e),green:e=>Yt("32",e),yellow:e=>Yt("33",e),cyan:e=>Yt("36",e)};function Ja(e=process.argv,t=process.env){if(t.GAMESTAGE_INVOCATION)return t.GAMESTAGE_INVOCATION;let r=(e[1]??"").split(/[\\/]/).pop()??"";return r==="gamestage.mjs"||r==="cli.mjs"?`node ${r}`:"gamestage"}function je(e){return`${Ja()} ${e}`}function v(e=""){Xt||process.stdout.write(e+`
7042
- `)}function I(e){v(),v(S.bold(e))}function A(e,t="-"){v(` ${S.dim(t)} ${e}`)}function T(e,t){v(` ${S.dim(e.padEnd(18))} ${t}`)}function z(e){Xt&&process.stdout.write(JSON.stringify(e,null,2)+`
7043
- `)}function P(e,t){if(Xt)process.stderr.write(JSON.stringify({ok:!1,error:e,detail:t??[]},null,2)+`
7049
+ `,qa={hunt:Jb,push:Yb,group:qb,forecast:Xb};var Qt=!1;function Wm(e){Qt=e}function R(){return Qt}var Qb=()=>!Qt&&process.stdout.isTTY===!0&&!process.env.NO_COLOR,Xt=(e,t)=>Qb()?`\x1B[${e}m${t}\x1B[0m`:t,S={bold:e=>Xt("1",e),dim:e=>Xt("2",e),red:e=>Xt("31",e),green:e=>Xt("32",e),yellow:e=>Xt("33",e),cyan:e=>Xt("36",e)};function Xa(e=process.argv,t=process.env){if(t.GAMESTAGE_INVOCATION)return t.GAMESTAGE_INVOCATION;let r=(e[1]??"").split(/[\\/]/).pop()??"";return r==="gamestage.mjs"||r==="cli.mjs"?`node ${r}`:"gamestage"}function Ie(e){return`${Xa()} ${e}`}function v(e=""){Qt||process.stdout.write(e+`
7050
+ `)}function I(e){v(),v(S.bold(e))}function A(e,t="-"){v(` ${S.dim(t)} ${e}`)}function E(e,t){v(` ${S.dim(e.padEnd(18))} ${t}`)}function j(e){Qt&&process.stdout.write(JSON.stringify(e,null,2)+`
7051
+ `)}function C(e,t){if(Qt)process.stderr.write(JSON.stringify({ok:!1,error:e,detail:t??[]},null,2)+`
7044
7052
  `);else{process.stderr.write(`${S.red("Error")} ${e}
7045
7053
  `);for(let r of t??[])process.stderr.write(` ${r}
7046
- `)}process.exit(1)}async function Hb(e,t){let r;try{r=await Gb(e,"utf8")}catch{return"absent"}return r===t?"same":"different"}async function Km(e,t,r){let o=Kb(e,t),n=await Hb(o,r);try{await Fb(Bb(o),{recursive:!0}),await Zb(o,r,"utf8")}catch{throw P(`Cannot write ${o}.`),new Error("unreachable")}return{where:Vb(process.cwd(),o)||t,state:n}}async function Vm(e){let t=Wb(e.out??"."),r=await Km(t,we,Jt),o=await Km(t,be,Ht),n=`import { start } from "./${we}";`,i=`import { createPlayerClient, newIdempotencyKey } from "./${be}";`,a=r.state==="same"&&o.state==="same";if(R())return z({ok:!0,status:a?"unchanged":"written",files:[{path:r.where,digest:qt,import:n},{path:o.where,digest:nr,import:i}],path:r.where,digest:qt,import:n});I(a?"Already current":"Wrote the Gamestage client"),T("Facade",`${r.where} (${qt})`),T("Player client",`${o.where} (${nr})`),v(),A(`Import it: ${S.cyan(n)}`),A(`The player API on its own: ${S.cyan(i)}`),(r.state==="different"||o.state==="different")&&A("An earlier copy was replaced. It is generated, so nothing of yours was in it."),v()}import{writeFile as Vr}from"node:fs/promises";import{createHash as TT}from"node:crypto";var Qt="Round";function It(e,t={}){let r=e?.trim()||Qt;return t.lower&&!/[A-Z]/.test(r.slice(1))&&(r=r.toLowerCase()),t.plural?`${r}s`:r}var Jb={target_selection:"hunt",target_total:"push",puzzle:"group",prediction:"forecast"};function We(e){return Jb[e]??e}function Wm(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if(typeof t.archetype!="string")return e;let r=We(t.archetype);return r===t.archetype?e:{...t,archetype:r}}var qa={hunt:"gamestage-target-selection-element",push:"gamestage-target-total-element",group:"gamestage-puzzle-element",forecast:"gamestage-prediction-element"},Hm={hunt:"Find the answer",push:"Under the limit",group:"Puzzle",forecast:"Prediction"};var u={};Ke(u,{$brand:()=>Xa,$input:()=>_l,$output:()=>vl,NEVER:()=>Ya,TimePrecision:()=>xl,ZodAny:()=>pd,ZodArray:()=>gd,ZodBase64:()=>ji,ZodBase64URL:()=>Di,ZodBigInt:()=>Pn,ZodBigIntFormat:()=>Mi,ZodBoolean:()=>Cn,ZodCIDRv4:()=>Ni,ZodCIDRv6:()=>Ri,ZodCUID:()=>Ei,ZodCUID2:()=>Ti,ZodCatch:()=>zd,ZodCodec:()=>Rr,ZodCustom:()=>jr,ZodCustomStringFormat:()=>An,ZodDate:()=>Ir,ZodDefault:()=>Od,ZodDiscriminatedUnion:()=>vd,ZodE164:()=>Li,ZodEmail:()=>xi,ZodEmoji:()=>Si,ZodEnum:()=>En,ZodError:()=>Ex,ZodExactOptional:()=>Id,ZodFile:()=>Td,ZodFirstPartyTypeKind:()=>Yd,ZodFunction:()=>Hd,ZodGUID:()=>Sr,ZodIPv4:()=>Pi,ZodIPv6:()=>Oi,ZodISODate:()=>yi,ZodISODateTime:()=>gi,ZodISODuration:()=>_i,ZodISOTime:()=>vi,ZodIntersection:()=>_d,ZodIssueCode:()=>Ax,ZodJWT:()=>zi,ZodKSUID:()=>Ci,ZodLazy:()=>Kd,ZodLiteral:()=>Ed,ZodMAC:()=>id,ZodMap:()=>Sd,ZodNaN:()=>Ud,ZodNanoID:()=>$i,ZodNever:()=>fd,ZodNonOptional:()=>Ki,ZodNull:()=>ud,ZodNullable:()=>Pd,ZodNumber:()=>In,ZodNumberFormat:()=>zt,ZodObject:()=>Pr,ZodOptional:()=>Bi,ZodPipe:()=>Nr,ZodPrefault:()=>Rd,ZodPreprocess:()=>Fd,ZodPromise:()=>Wd,ZodReadonly:()=>Gd,ZodRealError:()=>ge,ZodRecord:()=>$n,ZodSet:()=>$d,ZodString:()=>Tn,ZodStringFormat:()=>K,ZodSuccess:()=>Ld,ZodSymbol:()=>cd,ZodTemplateLiteral:()=>Bd,ZodTransform:()=>Ad,ZodTuple:()=>wd,ZodType:()=>M,ZodULID:()=>Ai,ZodURL:()=>Ar,ZodUUID:()=>Me,ZodUndefined:()=>ld,ZodUnion:()=>Or,ZodUnknown:()=>md,ZodVoid:()=>hd,ZodXID:()=>Ii,ZodXor:()=>yd,_ZodString:()=>ki,_default:()=>Nd,_function:()=>Lg,any:()=>fg,array:()=>Cr,base64:()=>Yh,base64url:()=>Xh,bigint:()=>lg,boolean:()=>sd,catch:()=>Md,check:()=>zg,cidrv4:()=>Jh,cidrv6:()=>qh,clone:()=>le,codec:()=>Ng,coerce:()=>Xd,config:()=>J,core:()=>qe,cuid:()=>Fh,cuid2:()=>Gh,custom:()=>Mg,date:()=>gg,decode:()=>Xu,decodeAsync:()=>ed,describe:()=>Ug,discriminatedUnion:()=>kg,e164:()=>Qh,email:()=>Ph,emoji:()=>Mh,encode:()=>Yu,encodeAsync:()=>Qu,endsWith:()=>hn,enum:()=>Gi,exactOptional:()=>Cd,file:()=>Ig,flattenError:()=>ur,float32:()=>ig,float64:()=>ag,formatError:()=>dr,fromJSONSchema:()=>Wg,function:()=>Lg,getErrorMap:()=>Cx,globalRegistry:()=>ne,gt:()=>Le,gte:()=>de,guid:()=>Oh,hash:()=>og,hex:()=>rg,hostname:()=>ng,httpUrl:()=>zh,includes:()=>mn,instanceof:()=>Gg,int:()=>bi,int32:()=>sg,int64:()=>ug,intersection:()=>bd,invertCodec:()=>Rg,ipv4:()=>Vh,ipv6:()=>Hh,iso:()=>Sn,json:()=>Bg,jwt:()=>eg,keyof:()=>yg,ksuid:()=>Kh,lazy:()=>Vd,length:()=>Dt,literal:()=>Ag,locales:()=>_r,looseObject:()=>bg,looseRecord:()=>Sg,lowercase:()=>dn,lt:()=>De,lte:()=>xe,mac:()=>Wh,map:()=>$g,maxLength:()=>jt,maxSize:()=>mt,meta:()=>Fg,mime:()=>gn,minLength:()=>Je,minSize:()=>ze,multipleOf:()=>pt,nan:()=>Og,nanoid:()=>Uh,nativeEnum:()=>Tg,negative:()=>ai,never:()=>Ui,nonnegative:()=>ci,nonoptional:()=>Dd,nonpositive:()=>si,normalize:()=>yn,null:()=>dd,nullable:()=>Er,nullish:()=>Cg,number:()=>ad,object:()=>vg,optional:()=>$r,overwrite:()=>Pe,parse:()=>Wu,parseAsync:()=>Hu,partialRecord:()=>xg,pipe:()=>wi,positive:()=>ii,prefault:()=>jd,preprocess:()=>Kg,prettifyError:()=>ds,promise:()=>Dg,property:()=>li,readonly:()=>Zd,record:()=>xd,refine:()=>Jd,regex:()=>un,regexes:()=>ke,registry:()=>zo,safeDecode:()=>nd,safeDecodeAsync:()=>od,safeEncode:()=>td,safeEncodeAsync:()=>rd,safeParse:()=>Ju,safeParseAsync:()=>qu,set:()=>Eg,setErrorMap:()=>Ix,size:()=>Rt,slugify:()=>wn,startsWith:()=>fn,strictObject:()=>_g,string:()=>xr,stringFormat:()=>tg,stringbool:()=>Zg,success:()=>Pg,superRefine:()=>qd,symbol:()=>pg,templateLiteral:()=>jg,toJSONSchema:()=>mi,toLowerCase:()=>_n,toUpperCase:()=>bn,transform:()=>Zi,treeifyError:()=>us,trim:()=>vn,tuple:()=>kd,uint32:()=>cg,uint64:()=>dg,ulid:()=>Zh,undefined:()=>mg,union:()=>Fi,unknown:()=>Lt,uppercase:()=>pn,url:()=>Lh,util:()=>k,uuid:()=>Nh,uuidv4:()=>Rh,uuidv6:()=>jh,uuidv7:()=>Dh,void:()=>hg,xid:()=>Bh,xor:()=>wg});var qe={};Ke(qe,{$ZodAny:()=>Uc,$ZodArray:()=>Kc,$ZodAsyncError:()=>Ce,$ZodBase64:()=>Cc,$ZodBase64URL:()=>Pc,$ZodBigInt:()=>Co,$ZodBigIntFormat:()=>Dc,$ZodBoolean:()=>hr,$ZodCIDRv4:()=>Tc,$ZodCIDRv6:()=>Ac,$ZodCUID:()=>hc,$ZodCUID2:()=>gc,$ZodCatch:()=>ll,$ZodCheck:()=>V,$ZodCheckBigIntFormat:()=>Ks,$ZodCheckEndsWith:()=>rc,$ZodCheckGreaterThan:()=>So,$ZodCheckIncludes:()=>tc,$ZodCheckLengthEquals:()=>Ys,$ZodCheckLessThan:()=>xo,$ZodCheckLowerCase:()=>Qs,$ZodCheckMaxLength:()=>Js,$ZodCheckMaxSize:()=>Vs,$ZodCheckMimeType:()=>ic,$ZodCheckMinLength:()=>qs,$ZodCheckMinSize:()=>Ws,$ZodCheckMultipleOf:()=>Zs,$ZodCheckNumberFormat:()=>Bs,$ZodCheckOverwrite:()=>ac,$ZodCheckProperty:()=>oc,$ZodCheckRegex:()=>Xs,$ZodCheckSizeEquals:()=>Hs,$ZodCheckStartsWith:()=>nc,$ZodCheckStringFormat:()=>cn,$ZodCheckUpperCase:()=>ec,$ZodCodec:()=>yr,$ZodCustom:()=>yl,$ZodCustomStringFormat:()=>Rc,$ZodDate:()=>Bc,$ZodDefault:()=>il,$ZodDiscriminatedUnion:()=>Hc,$ZodE164:()=>Oc,$ZodEmail:()=>dc,$ZodEmoji:()=>mc,$ZodEncodeError:()=>st,$ZodEnum:()=>Qc,$ZodError:()=>lr,$ZodExactOptional:()=>rl,$ZodFile:()=>tl,$ZodFunction:()=>fl,$ZodGUID:()=>lc,$ZodIPv4:()=>Sc,$ZodIPv6:()=>$c,$ZodISODate:()=>wc,$ZodISODateTime:()=>bc,$ZodISODuration:()=>xc,$ZodISOTime:()=>kc,$ZodIntersection:()=>Jc,$ZodJWT:()=>Nc,$ZodKSUID:()=>_c,$ZodLazy:()=>gl,$ZodLiteral:()=>el,$ZodMAC:()=>Ec,$ZodMap:()=>Yc,$ZodNaN:()=>ul,$ZodNanoID:()=>fc,$ZodNever:()=>Gc,$ZodNonOptional:()=>sl,$ZodNull:()=>Mc,$ZodNullable:()=>ol,$ZodNumber:()=>Io,$ZodNumberFormat:()=>jc,$ZodObject:()=>Ef,$ZodObjectJIT:()=>Vc,$ZodOptional:()=>Oo,$ZodPipe:()=>No,$ZodPrefault:()=>al,$ZodPreprocess:()=>dl,$ZodPromise:()=>hl,$ZodReadonly:()=>pl,$ZodRealError:()=>he,$ZodRecord:()=>qc,$ZodRegistry:()=>Lo,$ZodSet:()=>Xc,$ZodString:()=>Nt,$ZodStringFormat:()=>B,$ZodSuccess:()=>cl,$ZodSymbol:()=>Lc,$ZodTemplateLiteral:()=>ml,$ZodTransform:()=>nl,$ZodTuple:()=>Po,$ZodType:()=>j,$ZodULID:()=>yc,$ZodURL:()=>pc,$ZodUUID:()=>uc,$ZodUndefined:()=>zc,$ZodUnion:()=>gr,$ZodUnknown:()=>Fc,$ZodVoid:()=>Zc,$ZodXID:()=>vc,$ZodXor:()=>Wc,$brand:()=>Xa,$constructor:()=>g,$input:()=>_l,$output:()=>vl,Doc:()=>fr,JSONSchema:()=>Ah,JSONSchemaGenerator:()=>fi,NEVER:()=>Ya,TimePrecision:()=>xl,_any:()=>Bl,_array:()=>Yl,_base64:()=>ti,_base64url:()=>ni,_bigint:()=>Ll,_boolean:()=>jl,_catch:()=>vx,_check:()=>Th,_cidrv4:()=>Qo,_cidrv6:()=>ei,_coercedBigint:()=>zl,_coercedBoolean:()=>Dl,_coercedDate:()=>Jl,_coercedNumber:()=>Il,_coercedString:()=>wl,_cuid:()=>Vo,_cuid2:()=>Wo,_custom:()=>Ql,_date:()=>Hl,_decode:()=>fo,_decodeAsync:()=>go,_default:()=>hx,_discriminatedUnion:()=>rx,_e164:()=>ri,_email:()=>Mo,_emoji:()=>Bo,_encode:()=>mo,_encodeAsync:()=>ho,_endsWith:()=>hn,_enum:()=>lx,_file:()=>Xl,_float32:()=>Pl,_float64:()=>Ol,_gt:()=>Le,_gte:()=>de,_guid:()=>br,_includes:()=>mn,_int:()=>Cl,_int32:()=>Nl,_int64:()=>Ml,_intersection:()=>ox,_ipv4:()=>Yo,_ipv6:()=>Xo,_isoDate:()=>$l,_isoDateTime:()=>Sl,_isoDuration:()=>Tl,_isoTime:()=>El,_jwt:()=>oi,_ksuid:()=>qo,_lazy:()=>kx,_length:()=>Dt,_literal:()=>dx,_lowercase:()=>dn,_lt:()=>De,_lte:()=>xe,_mac:()=>kl,_map:()=>sx,_max:()=>xe,_maxLength:()=>jt,_maxSize:()=>mt,_mime:()=>gn,_min:()=>de,_minLength:()=>Je,_minSize:()=>ze,_multipleOf:()=>pt,_nan:()=>ql,_nanoid:()=>Ko,_nativeEnum:()=>ux,_negative:()=>ai,_never:()=>Vl,_nonnegative:()=>ci,_nonoptional:()=>gx,_nonpositive:()=>si,_normalize:()=>yn,_null:()=>Zl,_nullable:()=>fx,_number:()=>Al,_optional:()=>mx,_overwrite:()=>Pe,_parse:()=>rn,_parseAsync:()=>on,_pipe:()=>_x,_positive:()=>ii,_promise:()=>xx,_property:()=>li,_readonly:()=>bx,_record:()=>ax,_refine:()=>eu,_regex:()=>un,_safeDecode:()=>vo,_safeDecodeAsync:()=>bo,_safeEncode:()=>yo,_safeEncodeAsync:()=>_o,_safeParse:()=>an,_safeParseAsync:()=>sn,_set:()=>cx,_size:()=>Rt,_slugify:()=>wn,_startsWith:()=>fn,_string:()=>bl,_stringFormat:()=>kn,_stringbool:()=>ou,_success:()=>yx,_superRefine:()=>tu,_symbol:()=>Fl,_templateLiteral:()=>wx,_toLowerCase:()=>_n,_toUpperCase:()=>bn,_transform:()=>px,_trim:()=>vn,_tuple:()=>ix,_uint32:()=>Rl,_uint64:()=>Ul,_ulid:()=>Ho,_undefined:()=>Gl,_union:()=>tx,_unknown:()=>Kl,_uppercase:()=>pn,_url:()=>wr,_uuid:()=>Uo,_uuidv4:()=>Fo,_uuidv6:()=>Go,_uuidv7:()=>Zo,_void:()=>Wl,_xid:()=>Jo,_xor:()=>nx,clone:()=>le,config:()=>J,createStandardJSONSchemaMethod:()=>xn,createToJSONSchemaMethod:()=>iu,decode:()=>xw,decodeAsync:()=>$w,describe:()=>nu,encode:()=>kw,encodeAsync:()=>Sw,extractDefs:()=>ht,finalize:()=>gt,flattenError:()=>ur,formatError:()=>dr,globalConfig:()=>Ct,globalRegistry:()=>ne,initializeContext:()=>ft,isValidBase64:()=>Ic,isValidBase64URL:()=>kf,isValidJWT:()=>xf,locales:()=>_r,meta:()=>ru,parse:()=>uo,parseAsync:()=>po,prettifyError:()=>ds,process:()=>Z,regexes:()=>ke,registry:()=>zo,safeDecode:()=>Tw,safeDecodeAsync:()=>Iw,safeEncode:()=>Ew,safeEncodeAsync:()=>Aw,safeParse:()=>ps,safeParseAsync:()=>ms,toDotPath:()=>ef,toJSONSchema:()=>mi,treeifyError:()=>us,util:()=>k,version:()=>sc});var Jm,Ya=Object.freeze({status:"aborted"});function g(e,t,r){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,d=Object.keys(l);for(let p=0;p<d.length;p++){let m=d[p];m in s||(s[m]=l[m].bind(s))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=r?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Xa=Symbol("zod_brand"),Ce=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},st=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Jm=globalThis).__zod_globalConfig??(Jm.__zod_globalConfig={});var Ct=globalThis.__zod_globalConfig;function J(e){return e&&Object.assign(Ct,e),Ct}var k={};Ke(k,{BIGINT_FORMAT_RANGES:()=>cs,Class:()=>es,NUMBER_FORMAT_RANGES:()=>ss,aborted:()=>dt,allowsEval:()=>rs,assert:()=>ew,assertEqual:()=>qb,assertIs:()=>Xb,assertNever:()=>Qb,assertNotEqual:()=>Yb,assignProp:()=>lt,base64ToUint8Array:()=>Ym,base64urlToUint8Array:()=>yw,cached:()=>tn,captureStackTrace:()=>lo,cleanEnum:()=>gw,cleanRegex:()=>ir,clone:()=>le,cloneDef:()=>nw,createTransparentProxy:()=>cw,defineLazy:()=>U,esc:()=>co,escapeRegex:()=>Te,explicitlyAborted:()=>ls,extend:()=>dw,finalizeIssue:()=>ue,floatSafeRemainder:()=>ts,getElementAtPath:()=>rw,getEnumValues:()=>or,getLengthableOrigin:()=>cr,getParsedType:()=>sw,getSizableOrigin:()=>sr,hexToUint8Array:()=>_w,isObject:()=>Pt,isPlainObject:()=>ut,issue:()=>nn,joinValues:()=>y,jsonStringifyReplacer:()=>en,merge:()=>mw,mergeDefs:()=>He,normalizeParams:()=>x,nullish:()=>ct,numKeys:()=>aw,objectClone:()=>tw,omit:()=>uw,optionalKeys:()=>as,parsedType:()=>w,partial:()=>fw,pick:()=>lw,prefixIssues:()=>fe,primitiveTypes:()=>is,promiseAllObject:()=>ow,propertyKeyTypes:()=>ar,randomString:()=>iw,required:()=>hw,safeExtend:()=>pw,shallowClone:()=>os,slugify:()=>ns,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Xm,uint8ArrayToBase64url:()=>vw,uint8ArrayToHex:()=>bw,unwrapMessage:()=>rr});function qb(e){return e}function Yb(e){return e}function Xb(e){}function Qb(e){throw new Error("Unexpected value in exhaustive check")}function ew(e){}function or(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 y(e,t="|"){return e.map(r=>_(r)).join(t)}function en(e,t){return typeof t=="bigint"?t.toString():t}function tn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ct(e){return e==null}function ir(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ts(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 qm=Symbol("evaluating");function U(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==qm)return o===void 0&&(o=qm,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function tw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function lt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function He(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function nw(e){return He(e._zod.def)}function rw(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function ow(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 iw(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function co(e){return JSON.stringify(e)}function ns(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var lo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var rs=tn(()=>{if(Ct.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ut(e){if(Pt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Pt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function os(e){return ut(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function aw(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var sw=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ar=new Set(["string","number","symbol"]),is=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Te(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function le(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function x(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 cw(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 as(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var ss={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]},cs={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function lw(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=He(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return lt(this,"shape",a),a},checks:[]});return le(e,i)}function uw(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=He(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return lt(this,"shape",a),a},checks:[]});return le(e,i)}function dw(e,t){if(!ut(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 a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=He(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return lt(this,"shape",i),i}});return le(e,n)}function pw(e,t){if(!ut(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=He(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return lt(this,"shape",o),o}});return le(e,r)}function mw(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=He(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return lt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return le(e,r)}function fw(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 a=He(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return lt(this,"shape",c),c},checks:[]});return le(t,a)}function hw(e,t,r){let o=He(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return lt(this,"shape",i),i}});return le(t,o)}function dt(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 ls(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 fe(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function rr(e){return typeof e=="string"?e:e?.message}function ue(e,t,r){let o=e.message?e.message:rr(e.inst?._zod.def?.error?.(e))??rr(t?.error?.(e))??rr(r.customError?.(e))??rr(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function sr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function cr(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function w(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 nn(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function gw(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Ym(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 Xm(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function yw(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Ym(t+r)}function vw(e){return Xm(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _w(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 bw(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var es=class{constructor(...t){}};var Qm=(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,en,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},lr=g("$ZodError",Qm),he=g("$ZodError",Qm,{Parent:Error});function ur(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 dr(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,l=0;for(;l<s.length;){let d=s[l];l===s.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a))):c[d]=c[d]||{_errors:[]},c=c[d],l++}}}};return o(e),r}function us(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var a,s;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let l=[...i,...c.path];if(l.length===0){r.errors.push(t(c));continue}let d=r,p=0;for(;p<l.length;){let m=l[p],f=p===l.length-1;typeof m=="string"?(d.properties??(d.properties={}),(a=d.properties)[m]??(a[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(s=d.items)[m]??(s[m]={errors:[]}),d=d.items[m]),f&&d.errors.push(t(c)),p++}}};return o(e),r}function ef(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 ds(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 ${ef(o.path)}`);return t.join(`
7047
- `)}var rn=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ce;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>ue(c,i,J())));throw lo(s,n?.callee),s}return a.value},uo=rn(he),on=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>ue(c,i,J())));throw lo(s,n?.callee),s}return a.value},po=on(he),an=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 Ce;return i.issues.length?{success:!1,error:new(e??lr)(i.issues.map(a=>ue(a,n,J())))}:{success:!0,data:i.value}},ps=an(he),sn=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(a=>ue(a,n,J())))}:{success:!0,data:i.value}},ms=sn(he),mo=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return rn(e)(t,r,n)},kw=mo(he),fo=e=>(t,r,o)=>rn(e)(t,r,o),xw=fo(he),ho=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return on(e)(t,r,n)},Sw=ho(he),go=e=>async(t,r,o)=>on(e)(t,r,o),$w=go(he),yo=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return an(e)(t,r,n)},Ew=yo(he),vo=e=>(t,r,o)=>an(e)(t,r,o),Tw=vo(he),_o=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return sn(e)(t,r,n)},Aw=_o(he),bo=e=>async(t,r,o)=>sn(e)(t,r,o),Iw=bo(he);var ke={};Ke(ke,{base64:()=>Is,base64url:()=>wo,bigint:()=>Ds,boolean:()=>zs,browserEmail:()=>Lw,cidrv4:()=>Ts,cidrv6:()=>As,cuid:()=>fs,cuid2:()=>hs,date:()=>Os,datetime:()=>Rs,domain:()=>Uw,duration:()=>bs,e164:()=>Ps,email:()=>ks,emoji:()=>xs,extendedDuration:()=>Cw,guid:()=>ws,hex:()=>Fw,hostname:()=>Mw,html5Email:()=>Rw,httpProtocol:()=>Cs,idnEmail:()=>Dw,integer:()=>Ls,ipv4:()=>Ss,ipv6:()=>$s,ksuid:()=>vs,lowercase:()=>Fs,mac:()=>Es,md5_base64:()=>Zw,md5_base64url:()=>Bw,md5_hex:()=>Gw,nanoid:()=>_s,null:()=>Ms,number:()=>ko,rfc5322Email:()=>jw,sha1_base64:()=>Vw,sha1_base64url:()=>Ww,sha1_hex:()=>Kw,sha256_base64:()=>Jw,sha256_base64url:()=>qw,sha256_hex:()=>Hw,sha384_base64:()=>Xw,sha384_base64url:()=>Qw,sha384_hex:()=>Yw,sha512_base64:()=>tk,sha512_base64url:()=>nk,sha512_hex:()=>ek,string:()=>js,time:()=>Ns,ulid:()=>gs,undefined:()=>Us,unicodeEmail:()=>tf,uppercase:()=>Gs,uuid:()=>Ot,uuid4:()=>Pw,uuid6:()=>Ow,uuid7:()=>Nw,xid:()=>ys});var fs=/^[cC][0-9a-z]{6,}$/,hs=/^[0-9a-z]+$/,gs=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ys=/^[0-9a-vA-V]{20}$/,vs=/^[A-Za-z0-9]{27}$/,_s=/^[a-zA-Z0-9_-]{21}$/,bs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cw=/^[-+]?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)?)??$/,ws=/^([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})$/,Ot=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)$/,Pw=Ot(4),Ow=Ot(6),Nw=Ot(7),ks=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Rw=/^[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])?)*$/,jw=/^(([^<>()\[\]\\.,;:\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,}))$/,tf=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Dw=tf,Lw=/^[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])?)*$/,zw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function xs(){return new RegExp(zw,"u")}var Ss=/^(?:(?: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])$/,$s=/^(([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}|:))$/,Es=e=>{let t=Te(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Ts=/^((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])$/,As=/^(([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])$/,Is=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,wo=/^[A-Za-z0-9_-]*$/,Mw=/^(?=.{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])?)*\.?$/,Uw=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Cs=/^https?$/,Ps=/^\+[1-9]\d{6,14}$/,nf="(?:(?:\\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])))",Os=new RegExp(`^${nf}$`);function rf(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 Ns(e){return new RegExp(`^${rf(e)}$`)}function Rs(e){let t=rf({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(`^${nf}T(?:${o})$`)}var js=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ds=/^-?\d+n?$/,Ls=/^-?\d+$/,ko=/^-?\d+(?:\.\d+)?$/,zs=/^(?:true|false)$/i,Ms=/^null$/i;var Us=/^undefined$/i;var Fs=/^[^A-Z]*$/,Gs=/^[^a-z]*$/,Fw=/^[0-9a-fA-F]*$/;function pr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function mr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Gw=/^[0-9a-fA-F]{32}$/,Zw=pr(22,"=="),Bw=mr(22),Kw=/^[0-9a-fA-F]{40}$/,Vw=pr(27,"="),Ww=mr(27),Hw=/^[0-9a-fA-F]{64}$/,Jw=pr(43,"="),qw=mr(43),Yw=/^[0-9a-fA-F]{96}$/,Xw=pr(64,""),Qw=mr(64),ek=/^[0-9a-fA-F]{128}$/,tk=pr(86,"=="),nk=mr(86);var V=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),af={number:"number",bigint:"bigint",object:"date"},xo=g("$ZodCheckLessThan",(e,t)=>{V.init(e,t);let r=af[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})}}),So=g("$ZodCheckGreaterThan",(e,t)=>{V.init(e,t);let r=af[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})}}),Zs=g("$ZodCheckMultipleOf",(e,t)=>{V.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):ts(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})}}),Bs=g("$ZodCheckNumberFormat",(e,t)=>{V.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=ss[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=Ls)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,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}):a.issues.push({input:s,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}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ks=g("$ZodCheckBigIntFormat",(e,t)=>{V.init(e,t);let[r,o]=cs[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})}}),Vs=g("$ZodCheckMaxSize",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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:sr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ws=g("$ZodCheckMinSize",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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:sr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Hs=g("$ZodCheckSizeEquals",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=i>t.size;o.issues.push({origin:sr(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Js=g("$ZodCheckMaxLength",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=cr(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),qs=g("$ZodCheckMinLength",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=cr(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ys=g("$ZodCheckLengthEquals",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=cr(n),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),cn=g("$ZodCheckStringFormat",(e,t)=>{var r,o;V.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=()=>{})}),Xs=g("$ZodCheckRegex",(e,t)=>{cn.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})}}),Qs=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Fs),cn.init(e,t)}),ec=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Gs),cn.init(e,t)}),tc=g("$ZodCheckIncludes",(e,t)=>{V.init(e,t);let r=Te(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})}}),nc=g("$ZodCheckStartsWith",(e,t)=>{V.init(e,t);let r=new RegExp(`^${Te(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})}}),rc=g("$ZodCheckEndsWith",(e,t)=>{V.init(e,t);let r=new RegExp(`.*${Te(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 of(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues))}var oc=g("$ZodCheckProperty",(e,t)=>{V.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=>of(n,r,t.property));of(o,r,t.property)}}),ic=g("$ZodCheckMimeType",(e,t)=>{V.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})}}),ac=g("$ZodCheckOverwrite",(e,t)=>{V.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var fr=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(`
7054
+ `)}process.exit(1)}async function sw(e,t){let r;try{r=await tw(e,"utf8")}catch{return"absent"}return r===t?"same":"different"}async function Hm(e,t,r){let o=ow(e,t),n=await sw(o,r);try{await ew(rw(o),{recursive:!0}),await nw(o,r,"utf8")}catch{throw C(`Cannot write ${o}.`),new Error("unreachable")}return{where:iw(process.cwd(),o)||t,state:n}}async function Jm(e){let t=aw(e.out??"."),r=await Hm(t,ke,Yt),o=await Hm(t,we,Jt),n=`import { start } from "./${ke}";`,i=`import { createPlayerClient, newIdempotencyKey } from "./${we}";`,a=r.state==="same"&&o.state==="same";if(R())return j({ok:!0,status:a?"unchanged":"written",files:[{path:r.where,digest:qt,import:n},{path:o.where,digest:or,import:i}],path:r.where,digest:qt,import:n});I(a?"Already current":"Wrote the Gamestage client"),E("Facade",`${r.where} (${qt})`),E("Player client",`${o.where} (${or})`),v(),A(`Import it: ${S.cyan(n)}`),A(`The player API on its own: ${S.cyan(i)}`),(r.state==="different"||o.state==="different")&&A("An earlier copy was replaced. It is generated, so nothing of yours was in it."),v()}import{stat as FT,writeFile as Mv}from"node:fs/promises";import{createHash as GT}from"node:crypto";var en="Round";function At(e,t={}){let r=e?.trim()||en;return t.lower&&!/[A-Z]/.test(r.slice(1))&&(r=r.toLowerCase()),t.plural?`${r}s`:r}var cw={target_selection:"hunt",target_total:"push",puzzle:"group",prediction:"forecast"};function We(e){return cw[e]??e}function Ym(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if(typeof t.archetype!="string")return e;let r=We(t.archetype);return r===t.archetype?e:{...t,archetype:r}}var Qa={hunt:"gamestage-target-selection-element",push:"gamestage-target-total-element",group:"gamestage-puzzle-element",forecast:"gamestage-prediction-element"},qm={hunt:"Find the answer",push:"Under the limit",group:"Puzzle",forecast:"Prediction"};var u={};Ke(u,{$brand:()=>ts,$input:()=>kl,$output:()=>wl,NEVER:()=>es,TimePrecision:()=>El,ZodAny:()=>hd,ZodArray:()=>_d,ZodBase64:()=>Li,ZodBase64URL:()=>zi,ZodBigInt:()=>On,ZodBigIntFormat:()=>Fi,ZodBoolean:()=>Pn,ZodCIDRv4:()=>ji,ZodCIDRv6:()=>Di,ZodCUID:()=>Ai,ZodCUID2:()=>Ii,ZodCatch:()=>Fd,ZodCodec:()=>Dr,ZodCustom:()=>Lr,ZodCustomStringFormat:()=>In,ZodDate:()=>Pr,ZodDefault:()=>jd,ZodDiscriminatedUnion:()=>wd,ZodE164:()=>Mi,ZodEmail:()=>$i,ZodEmoji:()=>Ei,ZodEnum:()=>Tn,ZodError:()=>Mx,ZodExactOptional:()=>Od,ZodFile:()=>Cd,ZodFirstPartyTypeKind:()=>ep,ZodFunction:()=>qd,ZodGUID:()=>Er,ZodIPv4:()=>Ni,ZodIPv6:()=>Ri,ZodISODate:()=>_i,ZodISODateTime:()=>vi,ZodISODuration:()=>wi,ZodISOTime:()=>bi,ZodIntersection:()=>kd,ZodIssueCode:()=>Fx,ZodJWT:()=>Ui,ZodKSUID:()=>Oi,ZodLazy:()=>Hd,ZodLiteral:()=>Id,ZodMAC:()=>cd,ZodMap:()=>Td,ZodNaN:()=>Zd,ZodNanoID:()=>Ti,ZodNever:()=>yd,ZodNonOptional:()=>Wi,ZodNull:()=>md,ZodNullable:()=>Rd,ZodNumber:()=>Cn,ZodNumberFormat:()=>Lt,ZodObject:()=>Nr,ZodOptional:()=>Vi,ZodPipe:()=>jr,ZodPrefault:()=>Ld,ZodPreprocess:()=>Bd,ZodPromise:()=>Yd,ZodReadonly:()=>Kd,ZodRealError:()=>ge,ZodRecord:()=>En,ZodSet:()=>Ad,ZodString:()=>An,ZodStringFormat:()=>K,ZodSuccess:()=>Ud,ZodSymbol:()=>dd,ZodTemplateLiteral:()=>Wd,ZodTransform:()=>Pd,ZodTuple:()=>Sd,ZodType:()=>M,ZodULID:()=>Ci,ZodURL:()=>Cr,ZodUUID:()=>Me,ZodUndefined:()=>pd,ZodUnion:()=>Rr,ZodUnknown:()=>gd,ZodVoid:()=>vd,ZodXID:()=>Pi,ZodXor:()=>bd,_ZodString:()=>Si,_default:()=>Dd,_function:()=>Ug,any:()=>yg,array:()=>Or,base64:()=>eg,base64url:()=>tg,bigint:()=>pg,boolean:()=>ud,catch:()=>Gd,check:()=>Fg,cidrv4:()=>Xh,cidrv6:()=>Qh,clone:()=>le,codec:()=>Dg,coerce:()=>tp,config:()=>J,core:()=>Ye,cuid:()=>Bh,cuid2:()=>Kh,custom:()=>Gg,date:()=>_g,decode:()=>td,decodeAsync:()=>rd,describe:()=>Zg,discriminatedUnion:()=>$g,e164:()=>ng,email:()=>Rh,emoji:()=>Gh,encode:()=>ed,encodeAsync:()=>nd,endsWith:()=>gn,enum:()=>Bi,exactOptional:()=>Nd,file:()=>Og,flattenError:()=>pr,float32:()=>cg,float64:()=>lg,formatError:()=>mr,fromJSONSchema:()=>Yg,function:()=>Ug,getErrorMap:()=>Zx,globalRegistry:()=>re,gt:()=>Le,gte:()=>de,guid:()=>jh,hash:()=>sg,hex:()=>ag,hostname:()=>ig,httpUrl:()=>Fh,includes:()=>fn,instanceof:()=>Kg,int:()=>ki,int32:()=>ug,int64:()=>mg,intersection:()=>xd,invertCodec:()=>Lg,ipv4:()=>Jh,ipv6:()=>qh,iso:()=>$n,json:()=>Wg,jwt:()=>rg,keyof:()=>bg,ksuid:()=>Hh,lazy:()=>Jd,length:()=>jt,literal:()=>Pg,locales:()=>wr,looseObject:()=>xg,looseRecord:()=>Tg,lowercase:()=>pn,lt:()=>De,lte:()=>Se,mac:()=>Yh,map:()=>Ag,maxLength:()=>Rt,maxSize:()=>mt,meta:()=>Bg,mime:()=>yn,minLength:()=>Je,minSize:()=>ze,multipleOf:()=>pt,nan:()=>jg,nanoid:()=>Zh,nativeEnum:()=>Cg,negative:()=>ci,never:()=>Gi,nonnegative:()=>ui,nonoptional:()=>Md,nonpositive:()=>li,normalize:()=>vn,null:()=>fd,nullable:()=>Ar,nullish:()=>Ng,number:()=>ld,object:()=>wg,optional:()=>Tr,overwrite:()=>Ne,parse:()=>Yu,parseAsync:()=>qu,partialRecord:()=>Eg,pipe:()=>xi,positive:()=>si,prefault:()=>zd,preprocess:()=>Hg,prettifyError:()=>fs,promise:()=>Mg,property:()=>di,readonly:()=>Vd,record:()=>Ed,refine:()=>Xd,regex:()=>dn,regexes:()=>xe,registry:()=>Uo,safeDecode:()=>id,safeDecodeAsync:()=>sd,safeEncode:()=>od,safeEncodeAsync:()=>ad,safeParse:()=>Xu,safeParseAsync:()=>Qu,set:()=>Ig,setErrorMap:()=>Gx,size:()=>Nt,slugify:()=>kn,startsWith:()=>hn,strictObject:()=>kg,string:()=>$r,stringFormat:()=>og,stringbool:()=>Vg,success:()=>Rg,superRefine:()=>Qd,symbol:()=>hg,templateLiteral:()=>zg,toJSONSchema:()=>hi,toLowerCase:()=>bn,toUpperCase:()=>wn,transform:()=>Ki,treeifyError:()=>ms,trim:()=>_n,tuple:()=>$d,uint32:()=>dg,uint64:()=>fg,ulid:()=>Vh,undefined:()=>gg,union:()=>Zi,unknown:()=>Dt,uppercase:()=>mn,url:()=>Uh,util:()=>x,uuid:()=>Dh,uuidv4:()=>Lh,uuidv6:()=>zh,uuidv7:()=>Mh,void:()=>vg,xid:()=>Wh,xor:()=>Sg});var Ye={};Ke(Ye,{$ZodAny:()=>Zc,$ZodArray:()=>Hc,$ZodAsyncError:()=>Oe,$ZodBase64:()=>Nc,$ZodBase64URL:()=>Rc,$ZodBigInt:()=>Oo,$ZodBigIntFormat:()=>Mc,$ZodBoolean:()=>yr,$ZodCIDRv4:()=>Cc,$ZodCIDRv6:()=>Pc,$ZodCUID:()=>vc,$ZodCUID2:()=>_c,$ZodCatch:()=>pl,$ZodCheck:()=>V,$ZodCheckBigIntFormat:()=>Hs,$ZodCheckEndsWith:()=>ac,$ZodCheckGreaterThan:()=>Eo,$ZodCheckIncludes:()=>oc,$ZodCheckLengthEquals:()=>ec,$ZodCheckLessThan:()=>$o,$ZodCheckLowerCase:()=>nc,$ZodCheckMaxLength:()=>Xs,$ZodCheckMaxSize:()=>Js,$ZodCheckMimeType:()=>cc,$ZodCheckMinLength:()=>Qs,$ZodCheckMinSize:()=>Ys,$ZodCheckMultipleOf:()=>Vs,$ZodCheckNumberFormat:()=>Ws,$ZodCheckOverwrite:()=>lc,$ZodCheckProperty:()=>sc,$ZodCheckRegex:()=>tc,$ZodCheckSizeEquals:()=>qs,$ZodCheckStartsWith:()=>ic,$ZodCheckStringFormat:()=>ln,$ZodCheckUpperCase:()=>rc,$ZodCodec:()=>_r,$ZodCustom:()=>bl,$ZodCustomStringFormat:()=>Lc,$ZodDate:()=>Wc,$ZodDefault:()=>cl,$ZodDiscriminatedUnion:()=>qc,$ZodE164:()=>jc,$ZodEmail:()=>fc,$ZodEmoji:()=>gc,$ZodEncodeError:()=>st,$ZodEnum:()=>nl,$ZodError:()=>dr,$ZodExactOptional:()=>al,$ZodFile:()=>ol,$ZodFunction:()=>yl,$ZodGUID:()=>pc,$ZodIPv4:()=>Tc,$ZodIPv6:()=>Ac,$ZodISODate:()=>Sc,$ZodISODateTime:()=>xc,$ZodISODuration:()=>Ec,$ZodISOTime:()=>$c,$ZodIntersection:()=>Xc,$ZodJWT:()=>Dc,$ZodKSUID:()=>kc,$ZodLazy:()=>_l,$ZodLiteral:()=>rl,$ZodMAC:()=>Ic,$ZodMap:()=>el,$ZodNaN:()=>ml,$ZodNanoID:()=>yc,$ZodNever:()=>Kc,$ZodNonOptional:()=>ul,$ZodNull:()=>Gc,$ZodNullable:()=>sl,$ZodNumber:()=>Po,$ZodNumberFormat:()=>zc,$ZodObject:()=>If,$ZodObjectJIT:()=>Jc,$ZodOptional:()=>Ro,$ZodPipe:()=>jo,$ZodPrefault:()=>ll,$ZodPreprocess:()=>fl,$ZodPromise:()=>vl,$ZodReadonly:()=>hl,$ZodRealError:()=>he,$ZodRecord:()=>Qc,$ZodRegistry:()=>Mo,$ZodSet:()=>tl,$ZodString:()=>Ot,$ZodStringFormat:()=>B,$ZodSuccess:()=>dl,$ZodSymbol:()=>Uc,$ZodTemplateLiteral:()=>gl,$ZodTransform:()=>il,$ZodTuple:()=>No,$ZodType:()=>L,$ZodULID:()=>bc,$ZodURL:()=>hc,$ZodUUID:()=>mc,$ZodUndefined:()=>Fc,$ZodUnion:()=>vr,$ZodUnknown:()=>Bc,$ZodVoid:()=>Vc,$ZodXID:()=>wc,$ZodXor:()=>Yc,$brand:()=>ts,$constructor:()=>g,$input:()=>kl,$output:()=>wl,Doc:()=>gr,JSONSchema:()=>Ph,JSONSchemaGenerator:()=>gi,NEVER:()=>es,TimePrecision:()=>El,_any:()=>Wl,_array:()=>eu,_base64:()=>ri,_base64url:()=>oi,_bigint:()=>Ul,_boolean:()=>zl,_catch:()=>Px,_check:()=>Ch,_cidrv4:()=>ti,_cidrv6:()=>ni,_coercedBigint:()=>Fl,_coercedBoolean:()=>Ml,_coercedDate:()=>Xl,_coercedNumber:()=>Ol,_coercedString:()=>Sl,_cuid:()=>Ho,_cuid2:()=>Jo,_custom:()=>nu,_date:()=>ql,_decode:()=>go,_decodeAsync:()=>vo,_default:()=>Ax,_discriminatedUnion:()=>gx,_e164:()=>ii,_email:()=>Fo,_emoji:()=>Vo,_encode:()=>ho,_encodeAsync:()=>yo,_endsWith:()=>gn,_enum:()=>kx,_file:()=>tu,_float32:()=>Rl,_float64:()=>jl,_gt:()=>Le,_gte:()=>de,_guid:()=>kr,_includes:()=>fn,_int:()=>Nl,_int32:()=>Dl,_int64:()=>Gl,_intersection:()=>yx,_ipv4:()=>Qo,_ipv6:()=>ei,_isoDate:()=>Al,_isoDateTime:()=>Tl,_isoDuration:()=>Cl,_isoTime:()=>Il,_jwt:()=>ai,_ksuid:()=>Xo,_lazy:()=>jx,_length:()=>jt,_literal:()=>Sx,_lowercase:()=>pn,_lt:()=>De,_lte:()=>Se,_mac:()=>$l,_map:()=>bx,_max:()=>Se,_maxLength:()=>Rt,_maxSize:()=>mt,_mime:()=>yn,_min:()=>de,_minLength:()=>Je,_minSize:()=>ze,_multipleOf:()=>pt,_nan:()=>Ql,_nanoid:()=>Wo,_nativeEnum:()=>xx,_negative:()=>ci,_never:()=>Jl,_nonnegative:()=>ui,_nonoptional:()=>Ix,_nonpositive:()=>li,_normalize:()=>vn,_null:()=>Vl,_nullable:()=>Tx,_number:()=>Pl,_optional:()=>Ex,_overwrite:()=>Ne,_parse:()=>on,_parseAsync:()=>an,_pipe:()=>Ox,_positive:()=>si,_promise:()=>Dx,_property:()=>di,_readonly:()=>Nx,_record:()=>_x,_refine:()=>ru,_regex:()=>dn,_safeDecode:()=>bo,_safeDecodeAsync:()=>ko,_safeEncode:()=>_o,_safeEncodeAsync:()=>wo,_safeParse:()=>sn,_safeParseAsync:()=>cn,_set:()=>wx,_size:()=>Nt,_slugify:()=>kn,_startsWith:()=>hn,_string:()=>xl,_stringFormat:()=>xn,_stringbool:()=>su,_success:()=>Cx,_superRefine:()=>ou,_symbol:()=>Bl,_templateLiteral:()=>Rx,_toLowerCase:()=>bn,_toUpperCase:()=>wn,_transform:()=>$x,_trim:()=>_n,_tuple:()=>vx,_uint32:()=>Ll,_uint64:()=>Zl,_ulid:()=>Yo,_undefined:()=>Kl,_union:()=>fx,_unknown:()=>Hl,_uppercase:()=>mn,_url:()=>xr,_uuid:()=>Go,_uuidv4:()=>Zo,_uuidv6:()=>Bo,_uuidv7:()=>Ko,_void:()=>Yl,_xid:()=>qo,_xor:()=>hx,clone:()=>le,config:()=>J,createStandardJSONSchemaMethod:()=>Sn,createToJSONSchemaMethod:()=>cu,decode:()=>Dw,decodeAsync:()=>zw,describe:()=>iu,encode:()=>jw,encodeAsync:()=>Lw,extractDefs:()=>ht,finalize:()=>gt,flattenError:()=>pr,formatError:()=>mr,globalConfig:()=>It,globalRegistry:()=>re,initializeContext:()=>ft,isValidBase64:()=>Oc,isValidBase64URL:()=>$f,isValidJWT:()=>Ef,locales:()=>wr,meta:()=>au,parse:()=>mo,parseAsync:()=>fo,prettifyError:()=>fs,process:()=>Z,regexes:()=>xe,registry:()=>Uo,safeDecode:()=>Uw,safeDecodeAsync:()=>Gw,safeEncode:()=>Mw,safeEncodeAsync:()=>Fw,safeParse:()=>hs,safeParseAsync:()=>gs,toDotPath:()=>rf,toJSONSchema:()=>hi,treeifyError:()=>ms,util:()=>x,version:()=>uc});var Xm,es=Object.freeze({status:"aborted"});function g(e,t,r){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let l=a.prototype,p=Object.keys(l);for(let d=0;d<p.length;d++){let m=p[d];m in s||(s[m]=l[m].bind(s))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=r?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var ts=Symbol("zod_brand"),Oe=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},st=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Xm=globalThis).__zod_globalConfig??(Xm.__zod_globalConfig={});var It=globalThis.__zod_globalConfig;function J(e){return e&&Object.assign(It,e),It}var x={};Ke(x,{BIGINT_FORMAT_RANGES:()=>ds,Class:()=>rs,NUMBER_FORMAT_RANGES:()=>us,aborted:()=>dt,allowsEval:()=>as,assert:()=>mw,assertEqual:()=>lw,assertIs:()=>dw,assertNever:()=>pw,assertNotEqual:()=>uw,assignProp:()=>lt,base64ToUint8Array:()=>ef,base64urlToUint8Array:()=>Cw,cached:()=>nn,captureStackTrace:()=>po,cleanEnum:()=>Iw,cleanRegex:()=>sr,clone:()=>le,cloneDef:()=>hw,createTransparentProxy:()=>ww,defineLazy:()=>U,esc:()=>uo,escapeRegex:()=>Ce,explicitlyAborted:()=>ps,extend:()=>Sw,finalizeIssue:()=>ue,floatSafeRemainder:()=>os,getElementAtPath:()=>gw,getEnumValues:()=>ar,getLengthableOrigin:()=>ur,getParsedType:()=>bw,getSizableOrigin:()=>lr,hexToUint8Array:()=>Ow,isObject:()=>Ct,isPlainObject:()=>ut,issue:()=>rn,joinValues:()=>y,jsonStringifyReplacer:()=>tn,merge:()=>Ew,mergeDefs:()=>He,normalizeParams:()=>$,nullish:()=>ct,numKeys:()=>_w,objectClone:()=>fw,omit:()=>xw,optionalKeys:()=>ls,parsedType:()=>k,partial:()=>Tw,pick:()=>kw,prefixIssues:()=>fe,primitiveTypes:()=>cs,promiseAllObject:()=>yw,propertyKeyTypes:()=>cr,randomString:()=>vw,required:()=>Aw,safeExtend:()=>$w,shallowClone:()=>ss,slugify:()=>is,stringifyPrimitive:()=>w,uint8ArrayToBase64:()=>tf,uint8ArrayToBase64url:()=>Pw,uint8ArrayToHex:()=>Nw,unwrapMessage:()=>ir});function lw(e){return e}function uw(e){return e}function dw(e){}function pw(e){throw new Error("Unexpected value in exhaustive check")}function mw(e){}function ar(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 y(e,t="|"){return e.map(r=>w(r)).join(t)}function tn(e,t){return typeof t=="bigint"?t.toString():t}function nn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ct(e){return e==null}function sr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function os(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 Qm=Symbol("evaluating");function U(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Qm)return o===void 0&&(o=Qm,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function fw(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function lt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function He(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function hw(e){return He(e._zod.def)}function gw(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function yw(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 vw(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function uo(e){return JSON.stringify(e)}function is(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var po="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ct(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var as=nn(()=>{if(It.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ut(e){if(Ct(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Ct(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function ss(e){return ut(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function _w(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var bw=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}`)}},cr=new Set(["string","number","symbol"]),cs=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ce(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function le(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function $(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ww(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 w(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ls(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var us={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]},ds={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function kw(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=He(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return lt(this,"shape",a),a},checks:[]});return le(e,i)}function xw(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=He(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return lt(this,"shape",a),a},checks:[]});return le(e,i)}function Sw(e,t){if(!ut(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 a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=He(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return lt(this,"shape",i),i}});return le(e,n)}function $w(e,t){if(!ut(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=He(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return lt(this,"shape",o),o}});return le(e,r)}function Ew(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=He(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return lt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return le(e,r)}function Tw(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 a=He(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let l in r){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return lt(this,"shape",c),c},checks:[]});return le(t,a)}function Aw(e,t,r){let o=He(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return lt(this,"shape",i),i}});return le(t,o)}function dt(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 ps(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 fe(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function ir(e){return typeof e=="string"?e:e?.message}function ue(e,t,r){let o=e.message?e.message:ir(e.inst?._zod.def?.error?.(e))??ir(t?.error?.(e))??ir(r.customError?.(e))??ir(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function lr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ur(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function k(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 rn(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function Iw(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function ef(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 tf(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Cw(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return ef(t+r)}function Pw(e){return tf(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Ow(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 Nw(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var rs=class{constructor(...t){}};var nf=(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,tn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},dr=g("$ZodError",nf),he=g("$ZodError",nf,{Parent:Error});function pr(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 mr(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,l=0;for(;l<s.length;){let p=s[l];l===s.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(t(a))):c[p]=c[p]||{_errors:[]},c=c[p],l++}}}};return o(e),r}function ms(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var a,s;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>o({issues:l},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{let l=[...i,...c.path];if(l.length===0){r.errors.push(t(c));continue}let p=r,d=0;for(;d<l.length;){let m=l[d],f=d===l.length-1;typeof m=="string"?(p.properties??(p.properties={}),(a=p.properties)[m]??(a[m]={errors:[]}),p=p.properties[m]):(p.items??(p.items=[]),(s=p.items)[m]??(s[m]={errors:[]}),p=p.items[m]),f&&p.errors.push(t(c)),d++}}};return o(e),r}function rf(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 fs(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 ${rf(o.path)}`);return t.join(`
7055
+ `)}var on=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Oe;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>ue(c,i,J())));throw po(s,n?.callee),s}return a.value},mo=on(he),an=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>ue(c,i,J())));throw po(s,n?.callee),s}return a.value},fo=an(he),sn=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 Oe;return i.issues.length?{success:!1,error:new(e??dr)(i.issues.map(a=>ue(a,n,J())))}:{success:!0,data:i.value}},hs=sn(he),cn=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(a=>ue(a,n,J())))}:{success:!0,data:i.value}},gs=cn(he),ho=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return on(e)(t,r,n)},jw=ho(he),go=e=>(t,r,o)=>on(e)(t,r,o),Dw=go(he),yo=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return an(e)(t,r,n)},Lw=yo(he),vo=e=>async(t,r,o)=>an(e)(t,r,o),zw=vo(he),_o=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return sn(e)(t,r,n)},Mw=_o(he),bo=e=>(t,r,o)=>sn(e)(t,r,o),Uw=bo(he),wo=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return cn(e)(t,r,n)},Fw=wo(he),ko=e=>async(t,r,o)=>cn(e)(t,r,o),Gw=ko(he);var xe={};Ke(xe,{base64:()=>Os,base64url:()=>xo,bigint:()=>Ms,boolean:()=>Fs,browserEmail:()=>Yw,cidrv4:()=>Cs,cidrv6:()=>Ps,cuid:()=>ys,cuid2:()=>vs,date:()=>js,datetime:()=>Ls,domain:()=>Qw,duration:()=>xs,e164:()=>Rs,email:()=>$s,emoji:()=>Es,extendedDuration:()=>Zw,guid:()=>Ss,hex:()=>ek,hostname:()=>Xw,html5Email:()=>Ww,httpProtocol:()=>Ns,idnEmail:()=>Jw,integer:()=>Us,ipv4:()=>Ts,ipv6:()=>As,ksuid:()=>ws,lowercase:()=>Bs,mac:()=>Is,md5_base64:()=>nk,md5_base64url:()=>rk,md5_hex:()=>tk,nanoid:()=>ks,null:()=>Gs,number:()=>So,rfc5322Email:()=>Hw,sha1_base64:()=>ik,sha1_base64url:()=>ak,sha1_hex:()=>ok,sha256_base64:()=>ck,sha256_base64url:()=>lk,sha256_hex:()=>sk,sha384_base64:()=>dk,sha384_base64url:()=>pk,sha384_hex:()=>uk,sha512_base64:()=>fk,sha512_base64url:()=>hk,sha512_hex:()=>mk,string:()=>zs,time:()=>Ds,ulid:()=>_s,undefined:()=>Zs,unicodeEmail:()=>of,uppercase:()=>Ks,uuid:()=>Pt,uuid4:()=>Bw,uuid6:()=>Kw,uuid7:()=>Vw,xid:()=>bs});var ys=/^[cC][0-9a-z]{6,}$/,vs=/^[0-9a-z]+$/,_s=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,bs=/^[0-9a-vA-V]{20}$/,ws=/^[A-Za-z0-9]{27}$/,ks=/^[a-zA-Z0-9_-]{21}$/,xs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Zw=/^[-+]?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)?)??$/,Ss=/^([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})$/,Pt=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)$/,Bw=Pt(4),Kw=Pt(6),Vw=Pt(7),$s=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ww=/^[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])?)*$/,Hw=/^(([^<>()\[\]\\.,;:\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,}))$/,of=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Jw=of,Yw=/^[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])?)*$/,qw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Es(){return new RegExp(qw,"u")}var Ts=/^(?:(?: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])$/,As=/^(([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}|:))$/,Is=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}$`)},Cs=/^((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])$/,Ps=/^(([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])$/,Os=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xo=/^[A-Za-z0-9_-]*$/,Xw=/^(?=.{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])?)*\.?$/,Qw=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Ns=/^https?$/,Rs=/^\+[1-9]\d{6,14}$/,af="(?:(?:\\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])))",js=new RegExp(`^${af}$`);function sf(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 Ds(e){return new RegExp(`^${sf(e)}$`)}function Ls(e){let t=sf({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(`^${af}T(?:${o})$`)}var zs=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ms=/^-?\d+n?$/,Us=/^-?\d+$/,So=/^-?\d+(?:\.\d+)?$/,Fs=/^(?:true|false)$/i,Gs=/^null$/i;var Zs=/^undefined$/i;var Bs=/^[^A-Z]*$/,Ks=/^[^a-z]*$/,ek=/^[0-9a-fA-F]*$/;function fr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function hr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var tk=/^[0-9a-fA-F]{32}$/,nk=fr(22,"=="),rk=hr(22),ok=/^[0-9a-fA-F]{40}$/,ik=fr(27,"="),ak=hr(27),sk=/^[0-9a-fA-F]{64}$/,ck=fr(43,"="),lk=hr(43),uk=/^[0-9a-fA-F]{96}$/,dk=fr(64,""),pk=hr(64),mk=/^[0-9a-fA-F]{128}$/,fk=fr(86,"=="),hk=hr(86);var V=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),lf={number:"number",bigint:"bigint",object:"date"},$o=g("$ZodCheckLessThan",(e,t)=>{V.init(e,t);let r=lf[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})}}),Eo=g("$ZodCheckGreaterThan",(e,t)=>{V.init(e,t);let r=lf[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})}}),Vs=g("$ZodCheckMultipleOf",(e,t)=>{V.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):os(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})}}),Ws=g("$ZodCheckNumberFormat",(e,t)=>{V.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=us[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=Us)}),e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,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}):a.issues.push({input:s,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}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Hs=g("$ZodCheckBigIntFormat",(e,t)=>{V.init(e,t);let[r,o]=ds[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})}}),Js=g("$ZodCheckMaxSize",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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:lr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ys=g("$ZodCheckMinSize",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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:lr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),qs=g("$ZodCheckSizeEquals",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=i>t.size;o.issues.push({origin:lr(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Xs=g("$ZodCheckMaxLength",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=ur(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Qs=g("$ZodCheckMinLength",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=ur(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),ec=g("$ZodCheckLengthEquals",(e,t)=>{var r;V.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!ct(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 a=ur(n),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),ln=g("$ZodCheckStringFormat",(e,t)=>{var r,o;V.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=()=>{})}),tc=g("$ZodCheckRegex",(e,t)=>{ln.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})}}),nc=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Bs),ln.init(e,t)}),rc=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ks),ln.init(e,t)}),oc=g("$ZodCheckIncludes",(e,t)=>{V.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})}}),ic=g("$ZodCheckStartsWith",(e,t)=>{V.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})}}),ac=g("$ZodCheckEndsWith",(e,t)=>{V.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 cf(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues))}var sc=g("$ZodCheckProperty",(e,t)=>{V.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=>cf(n,r,t.property));cf(o,r,t.property)}}),cc=g("$ZodCheckMimeType",(e,t)=>{V.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})}}),lc=g("$ZodCheckOverwrite",(e,t)=>{V.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var gr=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(`
7048
7056
  `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
7049
- `))}};var sc={major:4,minor:4,patch:3};var j=g("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=sc;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=(a,s,c)=>{let l=dt(a),d;for(let p of s){if(p._zod.def.when){if(ls(a)||!p._zod.def.when(a))continue}else if(l)continue;let m=a.issues.length,f=p._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Ce;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,a.issues.length!==m&&(l||(l=dt(a,m)))});else{if(a.issues.length===m)continue;l||(l=dt(a,m))}}return d?d.then(()=>a):a},i=(a,s,c)=>{if(dt(a))return a.aborted=!0,a;let l=n(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new Ce;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,a,s)):i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Ce;return c.then(l=>n(l,o,s))}return n(c,o,s)}}U(e,"~standard",()=>({validate:n=>{try{let i=ps(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ms(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Nt=g("$ZodString",(e,t)=>{j.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??js(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}}),B=g("$ZodStringFormat",(e,t)=>{cn.init(e,t),Nt.init(e,t)}),lc=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=ws),B.init(e,t)}),uc=g("$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=Ot(o))}else t.pattern??(t.pattern=Ot());B.init(e,t)}),dc=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ks),B.init(e,t)}),pc=g("$ZodURL",(e,t)=>{B.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Cs.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})}}}),mc=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=xs()),B.init(e,t)}),fc=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=_s),B.init(e,t)}),hc=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=fs),B.init(e,t)}),gc=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=hs),B.init(e,t)}),yc=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=gs),B.init(e,t)}),vc=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ys),B.init(e,t)}),_c=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=vs),B.init(e,t)}),bc=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Rs(t)),B.init(e,t)}),wc=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Os),B.init(e,t)}),kc=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ns(t)),B.init(e,t)}),xc=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=bs),B.init(e,t)}),Sc=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ss),B.init(e,t),e._zod.bag.format="ipv4"}),$c=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=$s),B.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})}}}),Ec=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Es(t.delimiter)),B.init(e,t),e._zod.bag.format="mac"}),Tc=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ts),B.init(e,t)}),Ac=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=As),B.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 a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>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 Ic(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Cc=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Is),B.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Ic(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function kf(e){if(!wo.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ic(r)}var Pc=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=wo),B.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{kf(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Oc=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ps),B.init(e,t)});function xf(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 Nc=g("$ZodJWT",(e,t)=>{B.init(e,t),e._zod.check=r=>{xf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Rc=g("$ZodCustomStringFormat",(e,t)=>{B.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})}}),Io=g("$ZodNumber",(e,t)=>{j.init(e,t),e._zod.pattern=e._zod.bag.pattern??ko,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}}),jc=g("$ZodNumberFormat",(e,t)=>{Bs.init(e,t),Io.init(e,t)}),hr=g("$ZodBoolean",(e,t)=>{j.init(e,t),e._zod.pattern=zs,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}}),Co=g("$ZodBigInt",(e,t)=>{j.init(e,t),e._zod.pattern=Ds,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}}),Dc=g("$ZodBigIntFormat",(e,t)=>{Ks.init(e,t),Co.init(e,t)}),Lc=g("$ZodSymbol",(e,t)=>{j.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}}),zc=g("$ZodUndefined",(e,t)=>{j.init(e,t),e._zod.pattern=Us,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}}),Mc=g("$ZodNull",(e,t)=>{j.init(e,t),e._zod.pattern=Ms,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}}),Uc=g("$ZodAny",(e,t)=>{j.init(e,t),e._zod.parse=r=>r}),Fc=g("$ZodUnknown",(e,t)=>{j.init(e,t),e._zod.parse=r=>r}),Gc=g("$ZodNever",(e,t)=>{j.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Zc=g("$ZodVoid",(e,t)=>{j.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}}),Bc=g("$ZodDate",(e,t)=>{j.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 cf(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues)),t.value[r]=e.value}var Kc=g("$ZodArray",(e,t)=>{j.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 a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>cf(l,r,a))):cf(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Ao(e,t,r,o,n,i){let a=r in o;if(e.issues.length){if(n&&i&&!a)return;t.issues.push(...fe(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function Sf(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=as(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function $f(e,t,r,o,n,i){let a=[],s=n.keySet,c=n.catchall._zod,l=c.def.type,d=c.optin==="optional",p=c.optout==="optional";for(let m in t){if(m==="__proto__"||s.has(m))continue;if(l==="never"){a.push(m);continue}let f=c.run({value:t[m],issues:[]},o);f instanceof Promise?e.push(f.then(h=>Ao(h,r,m,t,d,p))):Ao(f,r,m,t,d,p)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var Ef=g("$ZodObject",(e,t)=>{if(j.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=tn(()=>Sf(t));U(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let d=s[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let p of d.values)c[l].add(p)}}return c});let n=Pt,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let l=s.value;if(!n(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let d=[],p=a.shape;for(let m of a.keys){let f=p[m],h=f._zod.optin==="optional",b=f._zod.optout==="optional",$=f._zod.run({value:l[m],issues:[]},c);$ instanceof Promise?d.push($.then(O=>Ao(O,s,m,l,h,b))):Ao($,s,m,l,h,b)}return i?$f(d,l,s,c,o.value,e):d.length?Promise.all(d).then(()=>s):s}}),Vc=g("$ZodObjectJIT",(e,t)=>{Ef.init(e,t);let r=e._zod.parse,o=tn(()=>Sf(t)),n=m=>{let f=new fr(["shape","payload","ctx"]),h=o.value,b=te=>{let G=co(te);return`shape[${G}]._zod.run({ value: input[${G}], issues: [] }, ctx)`};f.write("const input = payload.value;");let $=Object.create(null),O=0;for(let te of h.keys)$[te]=`key_${O++}`;f.write("const newResult = {};");for(let te of h.keys){let G=$[te],N=co(te),q=m[te],Et=q?._zod?.optin==="optional",ot=q?._zod?.optout==="optional";f.write(`const ${G} = ${b(te)};`),Et&&ot?f.write(`
7057
+ `))}};var uc={major:4,minor:4,patch:3};var L=g("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=uc;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=(a,s,c)=>{let l=dt(a),p;for(let d of s){if(d._zod.def.when){if(ps(a)||!d._zod.def.when(a))continue}else if(l)continue;let m=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Oe;if(p||f instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await f,a.issues.length!==m&&(l||(l=dt(a,m)))});else{if(a.issues.length===m)continue;l||(l=dt(a,m))}}return p?p.then(()=>a):a},i=(a,s,c)=>{if(dt(a))return a.aborted=!0,a;let l=n(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new Oe;return l.then(p=>e._zod.parse(p,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(p=>i(p,a,s)):i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Oe;return c.then(l=>n(l,o,s))}return n(c,o,s)}}U(e,"~standard",()=>({validate:n=>{try{let i=hs(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return gs(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ot=g("$ZodString",(e,t)=>{L.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??zs(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}}),B=g("$ZodStringFormat",(e,t)=>{ln.init(e,t),Ot.init(e,t)}),pc=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ss),B.init(e,t)}),mc=g("$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=Pt(o))}else t.pattern??(t.pattern=Pt());B.init(e,t)}),fc=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=$s),B.init(e,t)}),hc=g("$ZodURL",(e,t)=>{B.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Ns.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})}}}),gc=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Es()),B.init(e,t)}),yc=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=ks),B.init(e,t)}),vc=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ys),B.init(e,t)}),_c=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=vs),B.init(e,t)}),bc=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=_s),B.init(e,t)}),wc=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=bs),B.init(e,t)}),kc=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ws),B.init(e,t)}),xc=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ls(t)),B.init(e,t)}),Sc=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=js),B.init(e,t)}),$c=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ds(t)),B.init(e,t)}),Ec=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=xs),B.init(e,t)}),Tc=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ts),B.init(e,t),e._zod.bag.format="ipv4"}),Ac=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=As),B.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})}}}),Ic=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Is(t.delimiter)),B.init(e,t),e._zod.bag.format="mac"}),Cc=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Cs),B.init(e,t)}),Pc=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ps),B.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 a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>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 Oc(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Nc=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Os),B.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Oc(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function $f(e){if(!xo.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Oc(r)}var Rc=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=xo),B.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{$f(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),jc=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Rs),B.init(e,t)});function Ef(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 Dc=g("$ZodJWT",(e,t)=>{B.init(e,t),e._zod.check=r=>{Ef(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Lc=g("$ZodCustomStringFormat",(e,t)=>{B.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})}}),Po=g("$ZodNumber",(e,t)=>{L.init(e,t),e._zod.pattern=e._zod.bag.pattern??So,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}}),zc=g("$ZodNumberFormat",(e,t)=>{Ws.init(e,t),Po.init(e,t)}),yr=g("$ZodBoolean",(e,t)=>{L.init(e,t),e._zod.pattern=Fs,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}}),Oo=g("$ZodBigInt",(e,t)=>{L.init(e,t),e._zod.pattern=Ms,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}}),Mc=g("$ZodBigIntFormat",(e,t)=>{Hs.init(e,t),Oo.init(e,t)}),Uc=g("$ZodSymbol",(e,t)=>{L.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}}),Fc=g("$ZodUndefined",(e,t)=>{L.init(e,t),e._zod.pattern=Zs,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}}),Gc=g("$ZodNull",(e,t)=>{L.init(e,t),e._zod.pattern=Gs,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}}),Zc=g("$ZodAny",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Bc=g("$ZodUnknown",(e,t)=>{L.init(e,t),e._zod.parse=r=>r}),Kc=g("$ZodNever",(e,t)=>{L.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Vc=g("$ZodVoid",(e,t)=>{L.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}}),Wc=g("$ZodDate",(e,t)=>{L.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 df(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues)),t.value[r]=e.value}var Hc=g("$ZodArray",(e,t)=>{L.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 a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>df(l,r,a))):df(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Co(e,t,r,o,n,i){let a=r in o;if(e.issues.length){if(n&&i&&!a)return;t.issues.push(...fe(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function Tf(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=ls(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Af(e,t,r,o,n,i){let a=[],s=n.keySet,c=n.catchall._zod,l=c.def.type,p=c.optin==="optional",d=c.optout==="optional";for(let m in t){if(m==="__proto__"||s.has(m))continue;if(l==="never"){a.push(m);continue}let f=c.run({value:t[m],issues:[]},o);f instanceof Promise?e.push(f.then(h=>Co(h,r,m,t,p,d))):Co(f,r,m,t,p,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var If=g("$ZodObject",(e,t)=>{if(L.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=nn(()=>Tf(t));U(e._zod,"propValues",()=>{let s=t.shape,c={};for(let l in s){let p=s[l]._zod;if(p.values){c[l]??(c[l]=new Set);for(let d of p.values)c[l].add(d)}}return c});let n=Ct,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let l=s.value;if(!n(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let p=[],d=a.shape;for(let m of a.keys){let f=d[m],h=f._zod.optin==="optional",_=f._zod.optout==="optional",b=f._zod.run({value:l[m],issues:[]},c);b instanceof Promise?p.push(b.then(P=>Co(P,s,m,l,h,_))):Co(b,s,m,l,h,_)}return i?Af(p,l,s,c,o.value,e):p.length?Promise.all(p).then(()=>s):s}}),Jc=g("$ZodObjectJIT",(e,t)=>{If.init(e,t);let r=e._zod.parse,o=nn(()=>Tf(t)),n=m=>{let f=new gr(["shape","payload","ctx"]),h=o.value,_=ne=>{let G=uo(ne);return`shape[${G}]._zod.run({ value: input[${G}], issues: [] }, ctx)`};f.write("const input = payload.value;");let b=Object.create(null),P=0;for(let ne of h.keys)b[ne]=`key_${P++}`;f.write("const newResult = {};");for(let ne of h.keys){let G=b[ne],N=uo(ne),Y=m[ne],Et=Y?._zod?.optin==="optional",it=Y?._zod?.optout==="optional";f.write(`const ${G} = ${_(ne)};`),Et&&it?f.write(`
7050
7058
  if (${G}.issues.length) {
7051
7059
  if (${N} in input) {
7052
7060
  payload.issues = payload.issues.concat(${G}.issues.map(iss => ({
@@ -7105,55 +7113,55 @@ main().catch((error) => {
7105
7113
  }
7106
7114
  }
7107
7115
 
7108
- `)}f.write("payload.value = newResult;"),f.write("return payload;");let D=f.compile();return(te,G)=>D(m,te,G)},i,a=Pt,s=!Ct.jitless,l=s&&rs.value,d=t.catchall,p;e._zod.parse=(m,f)=>{p??(p=o.value);let h=m.value;return a(h)?s&&l&&f?.async===!1&&f.jitless!==!0?(i||(i=n(t.shape)),m=i(m,f),d?$f([],h,m,f,p,e):m):r(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function lf(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=>!dt(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(a=>ue(a,o,J())))}),t)}var gr=g("$ZodUnion",(e,t)=>{j.init(e,t),U(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),U(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),U(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),U(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=>ir(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,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>lf(s,o,e,n)):lf(a,o,e,n)}});function uf(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(a=>ue(a,o,J())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var Wc=g("$ZodXor",(e,t)=>{gr.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,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);c instanceof Promise?(a.push(c),i=!0):a.push(c)}return i?Promise.all(a).then(s=>uf(s,o,e,n)):uf(a,o,e,n)}}),Hc=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,gr.init(e,t);let r=e._zod.parse;U(e._zod,"propValues",()=>{let n={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(let l of c)n[s].add(l)}}return n});let o=tn(()=>{let n=t.options,i=new Map;for(let a of n){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(n,i)=>{let a=n.value;if(!Pt(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._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:a,path:[t.discriminator],inst:e}),n)}}),Jc=g("$ZodIntersection",(e,t)=>{j.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>df(r,c,l)):df(r,i,a)}});function cc(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(ut(e)&&ut(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 a=cc(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.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],a=cc(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function df(e,t,r){let o=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),dt(e))return e;let a=cc(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Po=g("$ZodTuple",(e,t)=>{j.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 a=[],s=pf(r,"optin"),c=pf(r,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,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 p=r[d]._zod.run({value:i[d],issues:[]},n);p instanceof Promise?a.push(p.then(m=>{l[d]=m})):l[d]=p}if(t.rest){let d=r.length-1,p=i.slice(r.length);for(let m of p){d++;let f=t.rest._zod.run({value:m,issues:[]},n);f instanceof Promise?a.push(f.then(h=>mf(h,o,d))):mf(f,o,d)}}return a.length?Promise.all(a).then(()=>ff(l,o,r,i,c)):ff(l,o,r,i,c)}});function pf(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function mf(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues)),t.value[r]=e.value}function ff(e,t,r,o,n){for(let i=0;i<r.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=n){t.value.length=i;break}t.issues.push(...fe(i,a.issues))}t.value[i]=a.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 qc=g("$ZodRecord",(e,t)=>{j.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!ut(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.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(f=>ue(f,o,J())),input:l,path:[l],inst:e});continue}let p=d.value,m=t.valueType._zod.run({value:n[l],issues:[]},o);m instanceof Promise?i.push(m.then(f=>{f.issues.length&&r.issues.push(...fe(l,f.issues)),r.value[p]=f.value})):(m.issues.length&&r.issues.push(...fe(l,m.issues)),r.value[p]=m.value)}let c;for(let l in n)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&ko.test(s)&&c.issues.length){let p=t.keyType._zod.run({value:Number(s),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>ue(p,o,J())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:n[s],issues:[]},o);d instanceof Promise?i.push(d.then(p=>{p.issues.length&&r.issues.push(...fe(s,p.issues)),r.value[c.value]=p.value})):(d.issues.length&&r.issues.push(...fe(s,d.issues)),r.value[c.value]=d.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Yc=g("$ZodMap",(e,t)=>{j.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[a,s]of n){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([d,p])=>{hf(d,p,r,a,n,e,o)})):hf(c,l,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function hf(e,t,r,o,n,i,a){e.issues.length&&(ar.has(typeof o)?r.issues.push(...fe(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>ue(s,a,J()))})),t.issues.length&&(ar.has(typeof o)?r.issues.push(...fe(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>ue(s,a,J()))})),r.value.set(e.value,t.value)}var Xc=g("$ZodSet",(e,t)=>{j.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 a of n){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>gf(c,r))):gf(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function gf(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Qc=g("$ZodEnum",(e,t)=>{j.init(e,t);let r=or(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>ar.has(typeof n)).map(n=>typeof n=="string"?Te(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),el=g("$ZodLiteral",(e,t)=>{if(j.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"?Te(o):o?Te(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}}),tl=g("$ZodFile",(e,t)=>{j.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}}),nl=g("$ZodTransform",(e,t)=>{j.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new st(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Ce;return r.value=n,r.fallback=!0,r}});function yf(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Oo=g("$ZodOptional",(e,t)=>{j.init(e,t),e._zod.optin="optional",e._zod.optout="optional",U(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),U(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${ir(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(a=>yf(a,n)):yf(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),rl=g("$ZodExactOptional",(e,t)=>{Oo.init(e,t),U(e._zod,"values",()=>t.innerType._zod.values),U(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),ol=g("$ZodNullable",(e,t)=>{j.init(e,t),U(e._zod,"optin",()=>t.innerType._zod.optin),U(e._zod,"optout",()=>t.innerType._zod.optout),U(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${ir(r.source)}|null)$`):void 0}),U(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)}),il=g("$ZodDefault",(e,t)=>{j.init(e,t),e._zod.optin="optional",U(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=>vf(i,t)):vf(n,t)}});function vf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var al=g("$ZodPrefault",(e,t)=>{j.init(e,t),e._zod.optin="optional",U(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))}),sl=g("$ZodNonOptional",(e,t)=>{j.init(e,t),U(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=>_f(i,e)):_f(n,e)}});function _f(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 cl=g("$ZodSuccess",(e,t)=>{j.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new st("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)}}),ll=g("$ZodCatch",(e,t)=>{j.init(e,t),e._zod.optin="optional",U(e._zod,"optout",()=>t.innerType._zod.optout),U(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(a=>ue(a,o,J()))},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=>ue(i,o,J()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),ul=g("$ZodNaN",(e,t)=>{j.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)}),No=g("$ZodPipe",(e,t)=>{j.init(e,t),U(e._zod,"values",()=>t.in._zod.values),U(e._zod,"optin",()=>t.in._zod.optin),U(e._zod,"optout",()=>t.out._zod.optout),U(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(a=>$o(a,t.in,o)):$o(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>$o(i,t.out,o)):$o(n,t.out,o)}});function $o(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 yr=g("$ZodCodec",(e,t)=>{j.init(e,t),U(e._zod,"values",()=>t.in._zod.values),U(e._zod,"optin",()=>t.in._zod.optin),U(e._zod,"optout",()=>t.out._zod.optout),U(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(a=>Eo(a,t,o)):Eo(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>Eo(a,t,o)):Eo(i,t,o)}}});function Eo(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=>To(e,i,t.out,r)):To(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>To(e,i,t.in,r)):To(e,n,t.in,r)}}function To(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var dl=g("$ZodPreprocess",(e,t)=>{No.init(e,t)}),pl=g("$ZodReadonly",(e,t)=>{j.init(e,t),U(e._zod,"propValues",()=>t.innerType._zod.propValues),U(e._zod,"values",()=>t.innerType._zod.values),U(e._zod,"optin",()=>t.innerType?._zod?.optin),U(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(bf):bf(n)}});function bf(e){return e.value=Object.freeze(e.value),e}var ml=g("$ZodTemplateLiteral",(e,t)=>{j.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,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||is.has(typeof o))r.push(Te(`${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)}),fl=g("$ZodFunction",(e,t)=>(j.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?uo(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?uo(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 po(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await po(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 Po({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)),hl=g("$ZodPromise",(e,t)=>{j.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),gl=g("$ZodLazy",(e,t)=>{j.init(e,t),U(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),U(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),U(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),U(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),U(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),yl=g("$ZodCustom",(e,t)=>{V.init(e,t),j.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=>wf(i,r,o,e));wf(n,r,o,e)}});function wf(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(nn(n))}}var _r={};Ke(_r,{ar:()=>Tf,az:()=>Af,be:()=>Cf,bg:()=>Pf,ca:()=>Of,cs:()=>Nf,da:()=>Rf,de:()=>jf,el:()=>Df,en:()=>Ro,eo:()=>Lf,es:()=>zf,fa:()=>Mf,fi:()=>Uf,fr:()=>Ff,frCA:()=>Gf,he:()=>Zf,hr:()=>Bf,hu:()=>Kf,hy:()=>Wf,id:()=>Hf,is:()=>Jf,it:()=>qf,ja:()=>Yf,ka:()=>Xf,kh:()=>Qf,km:()=>jo,ko:()=>eh,lt:()=>nh,mk:()=>rh,ms:()=>oh,nl:()=>ih,no:()=>ah,ota:()=>sh,pl:()=>lh,ps:()=>ch,pt:()=>uh,ro:()=>dh,ru:()=>mh,sl:()=>fh,sv:()=>hh,ta:()=>gh,th:()=>yh,tr:()=>vh,ua:()=>_h,uk:()=>Do,ur:()=>bh,uz:()=>wh,vi:()=>kh,yo:()=>$h,zhCN:()=>xh,zhTW:()=>Sh});var ok=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?` \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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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":""}: ${y(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 Tf(){return{localeError:ok()}}var ik=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}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: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Af(){return{localeError:ik()}}function If(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var ak=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=If(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${i}${n.maximum.toString()} ${c}`}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?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=If(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${i}${n.minimum.toString()} ${c}`}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"}: ${y(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 Cf(){return{localeError:ak()}}var sk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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 a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${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":""}: ${y(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 Pf(){return{localeError:sk()}}var ck=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${_(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.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",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.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":""}: ${y(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 Of(){return{localeError:ck()}}var lk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.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: ${y(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 Nf(){return{localeError:lk()}}var uk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${_(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} 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"}: ${y(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 Rf(){return{localeError:uk()}}var dk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${_(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.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"}: ${y(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 jf(){return{localeError:dk()}}var pk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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"}: ${y(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 Df(){return{localeError:pk()}}var mk=()=>{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,a=w(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${_(n.values[0])}`:`Invalid option: expected one of ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.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":""}: ${y(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(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Ro(){return{localeError:mk()}}var fk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${_(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Lf(){return{localeError:fk()}}var hk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${_(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} 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":""}: ${y(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 zf(){return{localeError:hk()}}var gk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s} \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 ${s} \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 ${y(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.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: ${y(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 Mf(){return{localeError:gk()}}var yk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${_(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.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"}: ${y(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 Uf(){return{localeError:yk()}}var vk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${_(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.minimum.toString()} ${a.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":""} : ${y(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 Ff(){return{localeError:vk()}}var _k=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${_(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.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":""} : ${y(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 Gf(){return{localeError:_k()}}var bk=()=>{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",a=l=>l?t[l]??null:null,s={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"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,p=c[d??""]??o(d),m=w(l.input),f=c[m]??e[m]?.label??m;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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}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(f=>_(f));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 p=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 ${p}`}case"too_big":{let d=a(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \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 h=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",b=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: ${p} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}let m=l.inclusive?"<=":"<",f=i(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),p=n(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \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 h=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let $=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`}let b=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: ${p} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}let m=l.inclusive?">=":">",f=i(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${f} ${m}${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 p=s[d.format],m=p?.label??d.format,h=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${h}`}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"}: ${y(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 Zf(){return{localeError:bk()}}var wk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${_(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} 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"}: ${y(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 Bf(){return{localeError:wk()}}var kk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Kf(){return{localeError:kk()}}function Vf(e,t,r){return Math.abs(e)===1?t:r}function ln(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 xk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Vf(s,a.unit.one,a.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 ${ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${c}`}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 ${ln(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Vf(s,a.unit.one,a.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 ${ln(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${c}`}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 ${ln(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":""}. ${y(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ln(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 ${ln(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Wf(){return{localeError:xk()}}var Sk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${_(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Hf(){return{localeError:Sk()}}var $k=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.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"}: ${y(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 Jf(){return{localeError:$k()}}var Ek=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${_(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.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"}: ${y(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 qf(){return{localeError:Ek()}}var Tk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\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: ${y(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",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.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",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.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":""}: ${y(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 Yf(){return{localeError:Tk()}}var Ak=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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"} ${a.verb} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\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} ${a.verb} ${i}${n.minimum.toString()} ${a.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"}: ${y(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 Xf(){return{localeError:Ak()}}var Ik=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.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 ${y(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 jo(){return{localeError:Ik()}}function Qf(){return jo()}var Ck=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\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: ${y(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}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: ${y(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 eh(){return{localeError:Ck()}}var vr=e=>e.charAt(0).toUpperCase()+e.slice(1);function th(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 Pk=()=>{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,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${_(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,a=t(n.origin,th(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${vr(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${vr(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,a=t(n.origin,th(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${vr(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${vr(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.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"}: ${y(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`${vr(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function nh(){return{localeError:Pk()}}var Ok=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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"}: ${y(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 rh(){return{localeError:Ok()}}var Nk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${_(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.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: ${y(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 oh(){return{localeError:Nk()}}var Rk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${_(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: 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":""}: ${y(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 ih(){return{localeError:Rk()}}var jk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${_(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.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"}: ${y(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 ah(){return{localeError:jk()}}var Dk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${_(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 sh(){return{localeError:Dk()}}var Lk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s} \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 ${s} \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 ${y(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.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"}: ${y(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 ch(){return{localeError:Lk()}}var zk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 lh(){return{localeError:zk()}}var Mk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${_(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 uh(){return{localeError:Mk()}}var Uk=()=>{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,a=w(n.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${_(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.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: ${y(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 dh(){return{localeError:Uk()}}function ph(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var Fk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=ph(s,a.unit.one,a.unit.few,a.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()} ${c}`}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?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=ph(s,a.unit.one,a.unit.few,a.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()} ${c}`}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":""}: ${y(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 mh(){return{localeError:Fk()}}var Gk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${_(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.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"}: ${y(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 fh(){return{localeError:Gk()}}var Zk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${_(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.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"}: ${y(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 hh(){return{localeError:Zk()}}var Bk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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":""}: ${y(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 gh(){return{localeError:Bk()}}var Kk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.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",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.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: ${y(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 yh(){return{localeError:Kk()}}var Vk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}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: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 vh(){return{localeError:Vk()}}var Wk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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"} ${a.verb} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\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} ${a.verb} ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Do(){return{localeError:Wk()}}function _h(){return Do()}var Hk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s} \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 ${s} \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: ${y(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?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 bh(){return{localeError:Hk()}}var Jk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${_(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.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":""}: ${y(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 wh(){return{localeError:Jk()}}var qk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.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: ${y(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 kh(){return{localeError:qk()}}var Yk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.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): ${y(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 xh(){return{localeError:Yk()}}var Xk=()=>{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,a=w(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.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${y(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 Sh(){return{localeError:Xk()}}var Qk=()=>{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,a=w(n.input),s=o[a]??a;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 ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.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?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.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: ${y(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 $h(){return{localeError:Qk()}}var Eh,vl=Symbol("ZodOutput"),_l=Symbol("ZodInput"),Lo=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 zo(){return new Lo}(Eh=globalThis).__zod_globalRegistry??(Eh.__zod_globalRegistry=zo());var ne=globalThis.__zod_globalRegistry;function bl(e,t){return new e({type:"string",...x(t)})}function wl(e,t){return new e({type:"string",coerce:!0,...x(t)})}function Mo(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...x(t)})}function br(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...x(t)})}function Uo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...x(t)})}function Fo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...x(t)})}function Go(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...x(t)})}function Zo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...x(t)})}function wr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...x(t)})}function Bo(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...x(t)})}function Ko(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...x(t)})}function Vo(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...x(t)})}function Wo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...x(t)})}function Ho(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...x(t)})}function Jo(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...x(t)})}function qo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...x(t)})}function Yo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...x(t)})}function Xo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...x(t)})}function kl(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...x(t)})}function Qo(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...x(t)})}function ei(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...x(t)})}function ti(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...x(t)})}function ni(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...x(t)})}function ri(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...x(t)})}function oi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...x(t)})}var xl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Sl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...x(t)})}function $l(e,t){return new e({type:"string",format:"date",check:"string_format",...x(t)})}function El(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...x(t)})}function Tl(e,t){return new e({type:"string",format:"duration",check:"string_format",...x(t)})}function Al(e,t){return new e({type:"number",checks:[],...x(t)})}function Il(e,t){return new e({type:"number",coerce:!0,checks:[],...x(t)})}function Cl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...x(t)})}function Pl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...x(t)})}function Ol(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...x(t)})}function Nl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...x(t)})}function Rl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...x(t)})}function jl(e,t){return new e({type:"boolean",...x(t)})}function Dl(e,t){return new e({type:"boolean",coerce:!0,...x(t)})}function Ll(e,t){return new e({type:"bigint",...x(t)})}function zl(e,t){return new e({type:"bigint",coerce:!0,...x(t)})}function Ml(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...x(t)})}function Ul(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...x(t)})}function Fl(e,t){return new e({type:"symbol",...x(t)})}function Gl(e,t){return new e({type:"undefined",...x(t)})}function Zl(e,t){return new e({type:"null",...x(t)})}function Bl(e){return new e({type:"any"})}function Kl(e){return new e({type:"unknown"})}function Vl(e,t){return new e({type:"never",...x(t)})}function Wl(e,t){return new e({type:"void",...x(t)})}function Hl(e,t){return new e({type:"date",...x(t)})}function Jl(e,t){return new e({type:"date",coerce:!0,...x(t)})}function ql(e,t){return new e({type:"nan",...x(t)})}function De(e,t){return new xo({check:"less_than",...x(t),value:e,inclusive:!1})}function xe(e,t){return new xo({check:"less_than",...x(t),value:e,inclusive:!0})}function Le(e,t){return new So({check:"greater_than",...x(t),value:e,inclusive:!1})}function de(e,t){return new So({check:"greater_than",...x(t),value:e,inclusive:!0})}function ii(e){return Le(0,e)}function ai(e){return De(0,e)}function si(e){return xe(0,e)}function ci(e){return de(0,e)}function pt(e,t){return new Zs({check:"multiple_of",...x(t),value:e})}function mt(e,t){return new Vs({check:"max_size",...x(t),maximum:e})}function ze(e,t){return new Ws({check:"min_size",...x(t),minimum:e})}function Rt(e,t){return new Hs({check:"size_equals",...x(t),size:e})}function jt(e,t){return new Js({check:"max_length",...x(t),maximum:e})}function Je(e,t){return new qs({check:"min_length",...x(t),minimum:e})}function Dt(e,t){return new Ys({check:"length_equals",...x(t),length:e})}function un(e,t){return new Xs({check:"string_format",format:"regex",...x(t),pattern:e})}function dn(e){return new Qs({check:"string_format",format:"lowercase",...x(e)})}function pn(e){return new ec({check:"string_format",format:"uppercase",...x(e)})}function mn(e,t){return new tc({check:"string_format",format:"includes",...x(t),includes:e})}function fn(e,t){return new nc({check:"string_format",format:"starts_with",...x(t),prefix:e})}function hn(e,t){return new rc({check:"string_format",format:"ends_with",...x(t),suffix:e})}function li(e,t,r){return new oc({check:"property",property:e,schema:t,...x(r)})}function gn(e,t){return new ic({check:"mime_type",mime:e,...x(t)})}function Pe(e){return new ac({check:"overwrite",tx:e})}function yn(e){return Pe(t=>t.normalize(e))}function vn(){return Pe(e=>e.trim())}function _n(){return Pe(e=>e.toLowerCase())}function bn(){return Pe(e=>e.toUpperCase())}function wn(){return Pe(e=>ns(e))}function Yl(e,t,r){return new e({type:"array",element:t,...x(r)})}function tx(e,t,r){return new e({type:"union",options:t,...x(r)})}function nx(e,t,r){return new e({type:"union",options:t,inclusive:!1,...x(r)})}function rx(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...x(o)})}function ox(e,t,r){return new e({type:"intersection",left:t,right:r})}function ix(e,t,r,o){let n=r instanceof j,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...x(i)})}function ax(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...x(o)})}function sx(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...x(o)})}function cx(e,t,r){return new e({type:"set",valueType:t,...x(r)})}function lx(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...x(r)})}function ux(e,t,r){return new e({type:"enum",entries:t,...x(r)})}function dx(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...x(r)})}function Xl(e,t){return new e({type:"file",...x(t)})}function px(e,t){return new e({type:"transform",transform:t})}function mx(e,t){return new e({type:"optional",innerType:t})}function fx(e,t){return new e({type:"nullable",innerType:t})}function hx(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():os(r)}})}function gx(e,t,r){return new e({type:"nonoptional",innerType:t,...x(r)})}function yx(e,t){return new e({type:"success",innerType:t})}function vx(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function _x(e,t,r){return new e({type:"pipe",in:t,out:r})}function bx(e,t){return new e({type:"readonly",innerType:t})}function wx(e,t,r){return new e({type:"template_literal",parts:t,...x(r)})}function kx(e,t){return new e({type:"lazy",getter:t})}function xx(e,t){return new e({type:"promise",innerType:t})}function Ql(e,t,r){let o=x(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function eu(e,t,r){return new e({type:"custom",check:"custom",fn:t,...x(r)})}function tu(e,t){let r=Th(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(nn(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(nn(i))}},e(o.value,o)),t);return r}function Th(e,t){let r=new V({check:"custom",...x(t)});return r._zod.check=e,r}function nu(e){let t=new V({check:"describe"});return t._zod.onattach=[r=>{let o=ne.get(r)??{};ne.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function ru(e){let t=new V({check:"meta"});return t._zod.onattach=[r=>{let o=ne.get(r)??{};ne.add(r,{...o,...e})}],t._zod.check=()=>{},t}function ou(e,t){let r=x(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(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let i=new Set(o),a=new Set(n),s=e.Codec??yr,c=e.Boolean??hr,l=e.String??Nt,d=new l({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:d,out:p,transform:((f,h)=>{let b=f;return r.case!=="sensitive"&&(b=b.toLowerCase()),i.has(b)?!0:a.has(b)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:h.value,inst:m,continue:!1}),{})}),reverseTransform:((f,h)=>f===!0?o[0]||"true":n[0]||"false"),error:r.error});return m}function kn(e,t,r,o={}){let n=x(o),i={...x(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function ft(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??ne,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 Z(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 a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let m=a.schema,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,m,d)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Z(p,t,d),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&pe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ht(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 a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,m=e.external.uri??(h=>h);if(p)return{ref:m(p)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${f}`}}if(a[1]===r)return{ref:"#"};let l=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=n(a);s.def={...s.schema},l&&(s.defId=l);let d=s.schema;for(let p in d)delete d[p];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
7109
-
7110
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function gt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,d={...l},p=c.ref;if(c.ref=null,p){o(p);let f=e.seen.get(p),h=f.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,d),s._zod.parent===p)for(let $ in l)$==="$ref"||$==="allOf"||$ in d||delete l[$];if(h.$ref&&f.def)for(let $ in l)$==="$ref"||$==="allOf"||$ in f.def&&JSON.stringify(l[$])===JSON.stringify(f.def[$])&&delete l[$]}let m=s._zod.parent;if(m&&m!==p){o(m);let f=e.seen.get(m);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:xn(t,"input",e.processors),output:xn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function pe(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 pe(o.element,r);if(o.type==="set")return pe(o.valueType,r);if(o.type==="lazy")return pe(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 pe(o.innerType,r);if(o.type==="intersection")return pe(o.left,r)||pe(o.right,r);if(o.type==="record"||o.type==="map")return pe(o.keyType,r)||pe(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:pe(o.in,r)||pe(o.out,r);if(o.type==="object"){for(let n in o.shape)if(pe(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(pe(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(pe(n,r))return!0;return!!(o.rest&&pe(o.rest,r))}return!1}var iu=(e,t={})=>r=>{let o=ft({...r,processors:t});return Z(e,o),ht(o,e),gt(o,e)},xn=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=ft({...n??{},target:i,io:t,processors:r});return Z(e,a),ht(a,e),gt(a,e)};var Sx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},au=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=Sx[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let d=[...c];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},su=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";let p=typeof d=="number"&&d>=(i??Number.NEGATIVE_INFINITY),m=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";p?f?(n.minimum=d,n.exclusiveMinimum=!0):n.exclusiveMinimum=d:typeof i=="number"&&(n.minimum=i),m?f?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},cu=(e,t,r,o)=>{r.type="boolean"},lu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},uu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},du=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},pu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},mu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},fu=(e,t,r,o)=>{r.not={}},hu=(e,t,r,o)=>{},gu=(e,t,r,o)=>{},yu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},vu=(e,t,r,o)=>{let n=e._zod.def,i=or(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},_u=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},bu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},wu=(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},ku=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(n,i)},xu=(e,t,r,o)=>{r.type="boolean"},Su=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},$u=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Eu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Tu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Au=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Iu=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=Z(i.element,t,{...o,path:[...o.path,"items"]})},Cu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let l in a)n.properties[l]=Z(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let d=i.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=Z(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},di=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>Z(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},Pu=(e,t,r,o)=>{let n=e._zod.def,i=Z(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=Z(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},Ou=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,f)=>Z(m,t,{...o,path:[...o.path,a,f]})),l=i.rest?Z(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),n.minItems=c.length,l||(n.maxItems=c.length)):(n.items=c,l&&(n.additionalItems=l));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof p=="number"&&(n.maxItems=p)},Nu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let d=Z(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let p of c)n.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=Z(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=Z(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=a._zod.values;if(l){let d=[...l].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(n.required=d)}},Ru=(e,t,r,o)=>{let n=e._zod.def,i=Z(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},ju=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Du=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Lu=(e,t,r,o)=>{let n=e._zod.def;Z(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)))},zu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Mu=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?n.out:n.in:n.out;Z(a,t,o);let s=t.seen.get(e);s.ref=a},Uu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},Fu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},pi=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Gu=(e,t,r,o)=>{let n=e._zod.innerType;Z(n,t,o);let i=t.seen.get(e);i.ref=n},ui={string:au,number:su,boolean:cu,bigint:lu,symbol:uu,null:du,undefined:pu,void:mu,never:fu,any:hu,unknown:gu,date:yu,enum:vu,literal:_u,nan:bu,template_literal:wu,file:ku,success:xu,custom:Su,function:$u,transform:Eu,map:Tu,set:Au,array:Iu,object:Cu,union:di,intersection:Pu,tuple:Ou,record:Nu,nullable:Ru,nonoptional:ju,default:Du,prefault:Lu,catch:zu,pipe:Mu,readonly:Uu,promise:Fu,optional:pi,lazy:Gu};function mi(e,t){if("_idmap"in e){let o=e,n=ft({...t,processors:ui}),i={};for(let c of o._idmap.entries()){let[l,d]=c;Z(d,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let c of o._idmap.entries()){let[l,d]=c;ht(n,d),a[l]=gt(n,d)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let r=ft({...t,processors:ui});return Z(e,r),ht(r,e),gt(r,e)}var fi=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=ft({processors:ui,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 Z(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)),ht(this.ctx,t);let o=gt(this.ctx,t),{"~standard":n,...i}=o;return i}};var Ah={};var kr={};Ke(kr,{ZodAny:()=>pd,ZodArray:()=>gd,ZodBase64:()=>ji,ZodBase64URL:()=>Di,ZodBigInt:()=>Pn,ZodBigIntFormat:()=>Mi,ZodBoolean:()=>Cn,ZodCIDRv4:()=>Ni,ZodCIDRv6:()=>Ri,ZodCUID:()=>Ei,ZodCUID2:()=>Ti,ZodCatch:()=>zd,ZodCodec:()=>Rr,ZodCustom:()=>jr,ZodCustomStringFormat:()=>An,ZodDate:()=>Ir,ZodDefault:()=>Od,ZodDiscriminatedUnion:()=>vd,ZodE164:()=>Li,ZodEmail:()=>xi,ZodEmoji:()=>Si,ZodEnum:()=>En,ZodExactOptional:()=>Id,ZodFile:()=>Td,ZodFunction:()=>Hd,ZodGUID:()=>Sr,ZodIPv4:()=>Pi,ZodIPv6:()=>Oi,ZodIntersection:()=>_d,ZodJWT:()=>zi,ZodKSUID:()=>Ci,ZodLazy:()=>Kd,ZodLiteral:()=>Ed,ZodMAC:()=>id,ZodMap:()=>Sd,ZodNaN:()=>Ud,ZodNanoID:()=>$i,ZodNever:()=>fd,ZodNonOptional:()=>Ki,ZodNull:()=>ud,ZodNullable:()=>Pd,ZodNumber:()=>In,ZodNumberFormat:()=>zt,ZodObject:()=>Pr,ZodOptional:()=>Bi,ZodPipe:()=>Nr,ZodPrefault:()=>Rd,ZodPreprocess:()=>Fd,ZodPromise:()=>Wd,ZodReadonly:()=>Gd,ZodRecord:()=>$n,ZodSet:()=>$d,ZodString:()=>Tn,ZodStringFormat:()=>K,ZodSuccess:()=>Ld,ZodSymbol:()=>cd,ZodTemplateLiteral:()=>Bd,ZodTransform:()=>Ad,ZodTuple:()=>wd,ZodType:()=>M,ZodULID:()=>Ai,ZodURL:()=>Ar,ZodUUID:()=>Me,ZodUndefined:()=>ld,ZodUnion:()=>Or,ZodUnknown:()=>md,ZodVoid:()=>hd,ZodXID:()=>Ii,ZodXor:()=>yd,_ZodString:()=>ki,_default:()=>Nd,_function:()=>Lg,any:()=>fg,array:()=>Cr,base64:()=>Yh,base64url:()=>Xh,bigint:()=>lg,boolean:()=>sd,catch:()=>Md,check:()=>zg,cidrv4:()=>Jh,cidrv6:()=>qh,codec:()=>Ng,cuid:()=>Fh,cuid2:()=>Gh,custom:()=>Mg,date:()=>gg,describe:()=>Ug,discriminatedUnion:()=>kg,e164:()=>Qh,email:()=>Ph,emoji:()=>Mh,enum:()=>Gi,exactOptional:()=>Cd,file:()=>Ig,float32:()=>ig,float64:()=>ag,function:()=>Lg,guid:()=>Oh,hash:()=>og,hex:()=>rg,hostname:()=>ng,httpUrl:()=>zh,instanceof:()=>Gg,int:()=>bi,int32:()=>sg,int64:()=>ug,intersection:()=>bd,invertCodec:()=>Rg,ipv4:()=>Vh,ipv6:()=>Hh,json:()=>Bg,jwt:()=>eg,keyof:()=>yg,ksuid:()=>Kh,lazy:()=>Vd,literal:()=>Ag,looseObject:()=>bg,looseRecord:()=>Sg,mac:()=>Wh,map:()=>$g,meta:()=>Fg,nan:()=>Og,nanoid:()=>Uh,nativeEnum:()=>Tg,never:()=>Ui,nonoptional:()=>Dd,null:()=>dd,nullable:()=>Er,nullish:()=>Cg,number:()=>ad,object:()=>vg,optional:()=>$r,partialRecord:()=>xg,pipe:()=>wi,prefault:()=>jd,preprocess:()=>Kg,promise:()=>Dg,readonly:()=>Zd,record:()=>xd,refine:()=>Jd,set:()=>Eg,strictObject:()=>_g,string:()=>xr,stringFormat:()=>tg,stringbool:()=>Zg,success:()=>Pg,superRefine:()=>qd,symbol:()=>pg,templateLiteral:()=>jg,transform:()=>Zi,tuple:()=>kd,uint32:()=>cg,uint64:()=>dg,ulid:()=>Zh,undefined:()=>mg,union:()=>Fi,unknown:()=>Lt,url:()=>Lh,uuid:()=>Nh,uuidv4:()=>Rh,uuidv6:()=>jh,uuidv7:()=>Dh,void:()=>hg,xid:()=>Bh,xor:()=>wg});var hi={};Ke(hi,{endsWith:()=>hn,gt:()=>Le,gte:()=>de,includes:()=>mn,length:()=>Dt,lowercase:()=>dn,lt:()=>De,lte:()=>xe,maxLength:()=>jt,maxSize:()=>mt,mime:()=>gn,minLength:()=>Je,minSize:()=>ze,multipleOf:()=>pt,negative:()=>ai,nonnegative:()=>ci,nonpositive:()=>si,normalize:()=>yn,overwrite:()=>Pe,positive:()=>ii,property:()=>li,regex:()=>un,size:()=>Rt,slugify:()=>wn,startsWith:()=>fn,toLowerCase:()=>_n,toUpperCase:()=>bn,trim:()=>vn,uppercase:()=>pn});var Sn={};Ke(Sn,{ZodISODate:()=>yi,ZodISODateTime:()=>gi,ZodISODuration:()=>_i,ZodISOTime:()=>vi,date:()=>Bu,datetime:()=>Zu,duration:()=>Vu,time:()=>Ku});var gi=g("ZodISODateTime",(e,t)=>{bc.init(e,t),K.init(e,t)});function Zu(e){return Sl(gi,e)}var yi=g("ZodISODate",(e,t)=>{wc.init(e,t),K.init(e,t)});function Bu(e){return $l(yi,e)}var vi=g("ZodISOTime",(e,t)=>{kc.init(e,t),K.init(e,t)});function Ku(e){return El(vi,e)}var _i=g("ZodISODuration",(e,t)=>{xc.init(e,t),K.init(e,t)});function Vu(e){return Tl(_i,e)}var Ih=(e,t)=>{lr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>dr(e,r)},flatten:{value:r=>ur(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,en,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,en,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ex=g("ZodError",Ih),ge=g("ZodError",Ih,{Parent:Error});var Wu=rn(ge),Hu=on(ge),Ju=an(ge),qu=sn(ge),Yu=mo(ge),Xu=fo(ge),Qu=ho(ge),ed=go(ge),td=yo(ge),nd=vo(ge),rd=_o(ge),od=bo(ge);var Ch=new WeakMap;function Tr(e,t,r){let o=Object.getPrototypeOf(e),n=Ch.get(o);if(n||(n=new Set,Ch.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let a=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var M=g("ZodType",(e,t)=>(j.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:xn(e,"input"),output:xn(e,"output")}}),e.toJSONSchema=iu(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>Wu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Ju(e,r,o),e.parseAsync=async(r,o)=>Hu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>qu(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Yu(e,r,o),e.decode=(r,o)=>Xu(e,r,o),e.encodeAsync=async(r,o)=>Qu(e,r,o),e.decodeAsync=async(r,o)=>ed(e,r,o),e.safeEncode=(r,o)=>td(e,r,o),e.safeDecode=(r,o)=>nd(e,r,o),e.safeEncodeAsync=async(r,o)=>rd(e,r,o),e.safeDecodeAsync=async(r,o)=>od(e,r,o),Tr(e,"ZodType",{check(...r){let o=this.def;return this.clone(k.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 le(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(Jd(r,o))},superRefine(r,o){return this.check(qd(r,o))},overwrite(r){return this.check(Pe(r))},optional(){return $r(this)},exactOptional(){return Cd(this)},nullable(){return Er(this)},nullish(){return $r(Er(this))},nonoptional(r){return Dd(this,r)},array(){return Cr(this)},or(r){return Fi([this,r])},and(r){return bd(this,r)},transform(r){return wi(this,Zi(r))},default(r){return Nd(this,r)},prefault(r){return jd(this,r)},catch(r){return Md(this,r)},pipe(r){return wi(this,r)},readonly(){return Zd(this)},describe(r){let o=this.clone();return ne.add(o,{description:r}),o},meta(...r){if(r.length===0)return ne.get(this);let o=this.clone();return ne.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 ne.get(e)?.description},configurable:!0}),e)),ki=g("_ZodString",(e,t)=>{Nt.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>au(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Tr(e,"_ZodString",{regex(...o){return this.check(un(...o))},includes(...o){return this.check(mn(...o))},startsWith(...o){return this.check(fn(...o))},endsWith(...o){return this.check(hn(...o))},min(...o){return this.check(Je(...o))},max(...o){return this.check(jt(...o))},length(...o){return this.check(Dt(...o))},nonempty(...o){return this.check(Je(1,...o))},lowercase(o){return this.check(dn(o))},uppercase(o){return this.check(pn(o))},trim(){return this.check(vn())},normalize(...o){return this.check(yn(...o))},toLowerCase(){return this.check(_n())},toUpperCase(){return this.check(bn())},slugify(){return this.check(wn())}})}),Tn=g("ZodString",(e,t)=>{Nt.init(e,t),ki.init(e,t),e.email=r=>e.check(Mo(xi,r)),e.url=r=>e.check(wr(Ar,r)),e.jwt=r=>e.check(oi(zi,r)),e.emoji=r=>e.check(Bo(Si,r)),e.guid=r=>e.check(br(Sr,r)),e.uuid=r=>e.check(Uo(Me,r)),e.uuidv4=r=>e.check(Fo(Me,r)),e.uuidv6=r=>e.check(Go(Me,r)),e.uuidv7=r=>e.check(Zo(Me,r)),e.nanoid=r=>e.check(Ko($i,r)),e.guid=r=>e.check(br(Sr,r)),e.cuid=r=>e.check(Vo(Ei,r)),e.cuid2=r=>e.check(Wo(Ti,r)),e.ulid=r=>e.check(Ho(Ai,r)),e.base64=r=>e.check(ti(ji,r)),e.base64url=r=>e.check(ni(Di,r)),e.xid=r=>e.check(Jo(Ii,r)),e.ksuid=r=>e.check(qo(Ci,r)),e.ipv4=r=>e.check(Yo(Pi,r)),e.ipv6=r=>e.check(Xo(Oi,r)),e.cidrv4=r=>e.check(Qo(Ni,r)),e.cidrv6=r=>e.check(ei(Ri,r)),e.e164=r=>e.check(ri(Li,r)),e.datetime=r=>e.check(Zu(r)),e.date=r=>e.check(Bu(r)),e.time=r=>e.check(Ku(r)),e.duration=r=>e.check(Vu(r))});function xr(e){return bl(Tn,e)}var K=g("ZodStringFormat",(e,t)=>{B.init(e,t),ki.init(e,t)}),xi=g("ZodEmail",(e,t)=>{dc.init(e,t),K.init(e,t)});function Ph(e){return Mo(xi,e)}var Sr=g("ZodGUID",(e,t)=>{lc.init(e,t),K.init(e,t)});function Oh(e){return br(Sr,e)}var Me=g("ZodUUID",(e,t)=>{uc.init(e,t),K.init(e,t)});function Nh(e){return Uo(Me,e)}function Rh(e){return Fo(Me,e)}function jh(e){return Go(Me,e)}function Dh(e){return Zo(Me,e)}var Ar=g("ZodURL",(e,t)=>{pc.init(e,t),K.init(e,t)});function Lh(e){return wr(Ar,e)}function zh(e){return wr(Ar,{protocol:ke.httpProtocol,hostname:ke.domain,...k.normalizeParams(e)})}var Si=g("ZodEmoji",(e,t)=>{mc.init(e,t),K.init(e,t)});function Mh(e){return Bo(Si,e)}var $i=g("ZodNanoID",(e,t)=>{fc.init(e,t),K.init(e,t)});function Uh(e){return Ko($i,e)}var Ei=g("ZodCUID",(e,t)=>{hc.init(e,t),K.init(e,t)});function Fh(e){return Vo(Ei,e)}var Ti=g("ZodCUID2",(e,t)=>{gc.init(e,t),K.init(e,t)});function Gh(e){return Wo(Ti,e)}var Ai=g("ZodULID",(e,t)=>{yc.init(e,t),K.init(e,t)});function Zh(e){return Ho(Ai,e)}var Ii=g("ZodXID",(e,t)=>{vc.init(e,t),K.init(e,t)});function Bh(e){return Jo(Ii,e)}var Ci=g("ZodKSUID",(e,t)=>{_c.init(e,t),K.init(e,t)});function Kh(e){return qo(Ci,e)}var Pi=g("ZodIPv4",(e,t)=>{Sc.init(e,t),K.init(e,t)});function Vh(e){return Yo(Pi,e)}var id=g("ZodMAC",(e,t)=>{Ec.init(e,t),K.init(e,t)});function Wh(e){return kl(id,e)}var Oi=g("ZodIPv6",(e,t)=>{$c.init(e,t),K.init(e,t)});function Hh(e){return Xo(Oi,e)}var Ni=g("ZodCIDRv4",(e,t)=>{Tc.init(e,t),K.init(e,t)});function Jh(e){return Qo(Ni,e)}var Ri=g("ZodCIDRv6",(e,t)=>{Ac.init(e,t),K.init(e,t)});function qh(e){return ei(Ri,e)}var ji=g("ZodBase64",(e,t)=>{Cc.init(e,t),K.init(e,t)});function Yh(e){return ti(ji,e)}var Di=g("ZodBase64URL",(e,t)=>{Pc.init(e,t),K.init(e,t)});function Xh(e){return ni(Di,e)}var Li=g("ZodE164",(e,t)=>{Oc.init(e,t),K.init(e,t)});function Qh(e){return ri(Li,e)}var zi=g("ZodJWT",(e,t)=>{Nc.init(e,t),K.init(e,t)});function eg(e){return oi(zi,e)}var An=g("ZodCustomStringFormat",(e,t)=>{Rc.init(e,t),K.init(e,t)});function tg(e,t,r={}){return kn(An,e,t,r)}function ng(e){return kn(An,"hostname",ke.hostname,e)}function rg(e){return kn(An,"hex",ke.hex,e)}function og(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=ke[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return kn(An,o,n,t)}var In=g("ZodNumber",(e,t)=>{Io.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>su(e,o,n,i),Tr(e,"ZodNumber",{gt(o,n){return this.check(Le(o,n))},gte(o,n){return this.check(de(o,n))},min(o,n){return this.check(de(o,n))},lt(o,n){return this.check(De(o,n))},lte(o,n){return this.check(xe(o,n))},max(o,n){return this.check(xe(o,n))},int(o){return this.check(bi(o))},safe(o){return this.check(bi(o))},positive(o){return this.check(Le(0,o))},nonnegative(o){return this.check(de(0,o))},negative(o){return this.check(De(0,o))},nonpositive(o){return this.check(xe(0,o))},multipleOf(o,n){return this.check(pt(o,n))},step(o,n){return this.check(pt(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 ad(e){return Al(In,e)}var zt=g("ZodNumberFormat",(e,t)=>{jc.init(e,t),In.init(e,t)});function bi(e){return Cl(zt,e)}function ig(e){return Pl(zt,e)}function ag(e){return Ol(zt,e)}function sg(e){return Nl(zt,e)}function cg(e){return Rl(zt,e)}var Cn=g("ZodBoolean",(e,t)=>{hr.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cu(e,r,o,n)});function sd(e){return jl(Cn,e)}var Pn=g("ZodBigInt",(e,t)=>{Co.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>lu(e,o,n,i),e.gte=(o,n)=>e.check(de(o,n)),e.min=(o,n)=>e.check(de(o,n)),e.gt=(o,n)=>e.check(Le(o,n)),e.gte=(o,n)=>e.check(de(o,n)),e.min=(o,n)=>e.check(de(o,n)),e.lt=(o,n)=>e.check(De(o,n)),e.lte=(o,n)=>e.check(xe(o,n)),e.max=(o,n)=>e.check(xe(o,n)),e.positive=o=>e.check(Le(BigInt(0),o)),e.negative=o=>e.check(De(BigInt(0),o)),e.nonpositive=o=>e.check(xe(BigInt(0),o)),e.nonnegative=o=>e.check(de(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(pt(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function lg(e){return Ll(Pn,e)}var Mi=g("ZodBigIntFormat",(e,t)=>{Dc.init(e,t),Pn.init(e,t)});function ug(e){return Ml(Mi,e)}function dg(e){return Ul(Mi,e)}var cd=g("ZodSymbol",(e,t)=>{Lc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>uu(e,r,o,n)});function pg(e){return Fl(cd,e)}var ld=g("ZodUndefined",(e,t)=>{zc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pu(e,r,o,n)});function mg(e){return Gl(ld,e)}var ud=g("ZodNull",(e,t)=>{Mc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>du(e,r,o,n)});function dd(e){return Zl(ud,e)}var pd=g("ZodAny",(e,t)=>{Uc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hu(e,r,o,n)});function fg(){return Bl(pd)}var md=g("ZodUnknown",(e,t)=>{Fc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>gu(e,r,o,n)});function Lt(){return Kl(md)}var fd=g("ZodNever",(e,t)=>{Gc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fu(e,r,o,n)});function Ui(e){return Vl(fd,e)}var hd=g("ZodVoid",(e,t)=>{Zc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mu(e,r,o,n)});function hg(e){return Wl(hd,e)}var Ir=g("ZodDate",(e,t)=>{Bc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>yu(e,o,n,i),e.min=(o,n)=>e.check(de(o,n)),e.max=(o,n)=>e.check(xe(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 gg(e){return Hl(Ir,e)}var gd=g("ZodArray",(e,t)=>{Kc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Iu(e,r,o,n),e.element=t.element,Tr(e,"ZodArray",{min(r,o){return this.check(Je(r,o))},nonempty(r){return this.check(Je(1,r))},max(r,o){return this.check(jt(r,o))},length(r,o){return this.check(Dt(r,o))},unwrap(){return this.element}})});function Cr(e,t){return Yl(gd,e,t)}function yg(e){let t=e._zod.def.shape;return Gi(Object.keys(t))}var Pr=g("ZodObject",(e,t)=>{Vc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cu(e,r,o,n),k.defineLazy(e,"shape",()=>t.shape),Tr(e,"ZodObject",{keyof(){return Gi(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Lt()})},loose(){return this.clone({...this._zod.def,catchall:Lt()})},strict(){return this.clone({...this._zod.def,catchall:Ui()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return k.extend(this,r)},safeExtend(r){return k.safeExtend(this,r)},merge(r){return k.merge(this,r)},pick(r){return k.pick(this,r)},omit(r){return k.omit(this,r)},partial(...r){return k.partial(Bi,this,r[0])},required(...r){return k.required(Ki,this,r[0])}})});function vg(e,t){let r={type:"object",shape:e??{},...k.normalizeParams(t)};return new Pr(r)}function _g(e,t){return new Pr({type:"object",shape:e,catchall:Ui(),...k.normalizeParams(t)})}function bg(e,t){return new Pr({type:"object",shape:e,catchall:Lt(),...k.normalizeParams(t)})}var Or=g("ZodUnion",(e,t)=>{gr.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>di(e,r,o,n),e.options=t.options});function Fi(e,t){return new Or({type:"union",options:e,...k.normalizeParams(t)})}var yd=g("ZodXor",(e,t)=>{Or.init(e,t),Wc.init(e,t),e._zod.processJSONSchema=(r,o,n)=>di(e,r,o,n),e.options=t.options});function wg(e,t){return new yd({type:"union",options:e,inclusive:!1,...k.normalizeParams(t)})}var vd=g("ZodDiscriminatedUnion",(e,t)=>{Or.init(e,t),Hc.init(e,t)});function kg(e,t,r){return new vd({type:"union",options:t,discriminator:e,...k.normalizeParams(r)})}var _d=g("ZodIntersection",(e,t)=>{Jc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pu(e,r,o,n)});function bd(e,t){return new _d({type:"intersection",left:e,right:t})}var wd=g("ZodTuple",(e,t)=>{Po.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ou(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function kd(e,t,r){let o=t instanceof j,n=o?r:t,i=o?t:null;return new wd({type:"tuple",items:e,rest:i,...k.normalizeParams(n)})}var $n=g("ZodRecord",(e,t)=>{qc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nu(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function xd(e,t,r){return!t||!t._zod?new $n({type:"record",keyType:xr(),valueType:e,...k.normalizeParams(t)}):new $n({type:"record",keyType:e,valueType:t,...k.normalizeParams(r)})}function xg(e,t,r){let o=le(e);return o._zod.values=void 0,new $n({type:"record",keyType:o,valueType:t,...k.normalizeParams(r)})}function Sg(e,t,r){return new $n({type:"record",keyType:e,valueType:t,mode:"loose",...k.normalizeParams(r)})}var Sd=g("ZodMap",(e,t)=>{Yc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tu(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ze(...r)),e.nonempty=r=>e.check(ze(1,r)),e.max=(...r)=>e.check(mt(...r)),e.size=(...r)=>e.check(Rt(...r))});function $g(e,t,r){return new Sd({type:"map",keyType:e,valueType:t,...k.normalizeParams(r)})}var $d=g("ZodSet",(e,t)=>{Xc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Au(e,r,o,n),e.min=(...r)=>e.check(ze(...r)),e.nonempty=r=>e.check(ze(1,r)),e.max=(...r)=>e.check(mt(...r)),e.size=(...r)=>e.check(Rt(...r))});function Eg(e,t){return new $d({type:"set",valueType:e,...k.normalizeParams(t)})}var En=g("ZodEnum",(e,t)=>{Qc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>vu(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 a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new En({...t,checks:[],...k.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new En({...t,checks:[],...k.normalizeParams(n),entries:i})}});function Gi(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new En({type:"enum",entries:r,...k.normalizeParams(t)})}function Tg(e,t){return new En({type:"enum",entries:e,...k.normalizeParams(t)})}var Ed=g("ZodLiteral",(e,t)=>{el.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_u(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 Ag(e,t){return new Ed({type:"literal",values:Array.isArray(e)?e:[e],...k.normalizeParams(t)})}var Td=g("ZodFile",(e,t)=>{tl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ku(e,r,o,n),e.min=(r,o)=>e.check(ze(r,o)),e.max=(r,o)=>e.check(mt(r,o)),e.mime=(r,o)=>e.check(gn(Array.isArray(r)?r:[r],o))});function Ig(e){return Xl(Td,e)}var Ad=g("ZodTransform",(e,t)=>{nl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Eu(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new st(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(k.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(k.issue(a))}};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 Zi(e){return new Ad({type:"transform",transform:e})}var Bi=g("ZodOptional",(e,t)=>{Oo.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pi(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function $r(e){return new Bi({type:"optional",innerType:e})}var Id=g("ZodExactOptional",(e,t)=>{rl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pi(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Cd(e){return new Id({type:"optional",innerType:e})}var Pd=g("ZodNullable",(e,t)=>{ol.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ru(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Er(e){return new Pd({type:"nullable",innerType:e})}function Cg(e){return $r(Er(e))}var Od=g("ZodDefault",(e,t)=>{il.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Du(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Nd(e,t){return new Od({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}var Rd=g("ZodPrefault",(e,t)=>{al.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function jd(e,t){return new Rd({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}var Ki=g("ZodNonOptional",(e,t)=>{sl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ju(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Dd(e,t){return new Ki({type:"nonoptional",innerType:e,...k.normalizeParams(t)})}var Ld=g("ZodSuccess",(e,t)=>{cl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Pg(e){return new Ld({type:"success",innerType:e})}var zd=g("ZodCatch",(e,t)=>{ll.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Md(e,t){return new zd({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Ud=g("ZodNaN",(e,t)=>{ul.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>bu(e,r,o,n)});function Og(e){return ql(Ud,e)}var Nr=g("ZodPipe",(e,t)=>{No.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mu(e,r,o,n),e.in=t.in,e.out=t.out});function wi(e,t){return new Nr({type:"pipe",in:e,out:t})}var Rr=g("ZodCodec",(e,t)=>{Nr.init(e,t),yr.init(e,t)});function Ng(e,t,r){return new Rr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Rg(e){let t=e._zod.def;return new Rr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Fd=g("ZodPreprocess",(e,t)=>{Nr.init(e,t),dl.init(e,t)}),Gd=g("ZodReadonly",(e,t)=>{pl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Zd(e){return new Gd({type:"readonly",innerType:e})}var Bd=g("ZodTemplateLiteral",(e,t)=>{ml.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wu(e,r,o,n)});function jg(e,t){return new Bd({type:"template_literal",parts:e,...k.normalizeParams(t)})}var Kd=g("ZodLazy",(e,t)=>{gl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gu(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function Vd(e){return new Kd({type:"lazy",getter:e})}var Wd=g("ZodPromise",(e,t)=>{hl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Dg(e){return new Wd({type:"promise",innerType:e})}var Hd=g("ZodFunction",(e,t)=>{fl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$u(e,r,o,n)});function Lg(e){return new Hd({type:"function",input:Array.isArray(e?.input)?kd(e?.input):e?.input??Cr(Lt()),output:e?.output??Lt()})}var jr=g("ZodCustom",(e,t)=>{yl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Su(e,r,o,n)});function zg(e){let t=new V({check:"custom"});return t._zod.check=e,t}function Mg(e,t){return Ql(jr,e??(()=>!0),t)}function Jd(e,t={}){return eu(jr,e,t)}function qd(e,t){return tu(e,t)}var Ug=nu,Fg=ru;function Gg(e,t={}){let r=new jr({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...k.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 Zg=(...e)=>ou({Codec:Rr,Boolean:Cn,String:Tn},...e);function Bg(e){let t=Vd(()=>Fi([xr(e),ad(),sd(),dd(),Cr(t),xd(xr(),t)]));return t}function Kg(e,t){return new Fd({type:"pipe",in:Zi(e),out:t})}var Ax={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 Ix(e){J({customError:e})}function Cx(){return J().customError}var Yd;Yd||(Yd={});var E={...kr,...hi,iso:Sn},Px=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 Ox(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 Nx(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 Vg(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return E.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 E.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=Nx(n,t),a=ie(i,t);return t.refs.set(n,a),t.processing.delete(n),a}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 E.null();if(n.length===0)return E.never();if(n.length===1)return E.literal(n[0]);if(n.every(a=>typeof a=="string"))return E.enum(n);let i=n.map(a=>E.literal(a));return i.length<2?i[0]:E.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return E.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return Vg(a,t)});return n.length===0?E.never():n.length===1?n[0]:E.union(n)}if(!r)return E.any();let o;switch(r){case"string":{let n=E.string();if(e.format){let i=e.format;i==="email"?n=n.check(E.email()):i==="uri"||i==="uri-reference"?n=n.check(E.url()):i==="uuid"||i==="guid"?n=n.check(E.uuid()):i==="date-time"?n=n.check(E.iso.datetime()):i==="date"?n=n.check(E.iso.date()):i==="time"?n=n.check(E.iso.time()):i==="duration"?n=n.check(E.iso.duration()):i==="ipv4"?n=n.check(E.ipv4()):i==="ipv6"?n=n.check(E.ipv6()):i==="mac"?n=n.check(E.mac()):i==="cidr"?n=n.check(E.cidrv4()):i==="cidr-v6"?n=n.check(E.cidrv6()):i==="base64"?n=n.check(E.base64()):i==="base64url"?n=n.check(E.base64url()):i==="e164"?n=n.check(E.e164()):i==="jwt"?n=n.check(E.jwt()):i==="emoji"?n=n.check(E.emoji()):i==="nanoid"?n=n.check(E.nanoid()):i==="cuid"?n=n.check(E.cuid()):i==="cuid2"?n=n.check(E.cuid2()):i==="ulid"?n=n.check(E.ulid()):i==="xid"?n=n.check(E.xid()):i==="ksuid"&&(n=n.check(E.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"?E.number().int():E.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=E.boolean();break}case"null":{o=E.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let d=ie(l,t);n[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=ie(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?ie(e.additionalProperties,t):E.any();if(Object.keys(n).length===0){o=E.record(c,l);break}let d=E.object(n).passthrough(),p=E.looseRecord(c,l);o=E.intersection(d,p);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let m of l){let f=ie(c[m],t),h=E.string().regex(new RegExp(m));d.push(E.looseRecord(h,f))}let p=[];if(Object.keys(n).length>0&&p.push(E.object(n).passthrough()),p.push(...d),p.length===0)o=E.object({}).passthrough();else if(p.length===1)o=p[0];else{let m=E.intersection(p[0],p[1]);for(let f=2;f<p.length;f++)m=E.intersection(m,p[f]);o=m}break}let s=E.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(ie(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>ie(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?ie(i,t):void 0;s?o=E.tuple(a).rest(s):o=E.tuple(a),typeof e.minItems=="number"&&(o=o.check(E.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(E.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>ie(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?ie(e.additionalItems,t):void 0;s?o=E.tuple(a).rest(s):o=E.tuple(a),typeof e.minItems=="number"&&(o=o.check(E.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(E.maxLength(e.maxItems)))}else if(i!==void 0){let a=ie(i,t),s=E.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=E.array(E.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function ie(e,t){if(typeof e=="boolean")return e?E.any():E.never();let r=Vg(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>ie(l,t)),c=E.union(s);r=o?E.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>ie(l,t)),c=E.xor(s);r=o?E.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:E.any();else{let s=o?r:ie(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=E.intersection(s,ie(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=E.nullable(r)),e.readOnly===!0&&(r=E.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))Px.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Wg(e,t){if(typeof e=="boolean")return e?E.any():E.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=Ox(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ne};return ie(r,i)}var Xd={};Ke(Xd,{bigint:()=>Lx,boolean:()=>Dx,date:()=>zx,number:()=>jx,string:()=>Rx});function Rx(e){return wl(Tn,e)}function jx(e){return Il(In,e)}function Dx(e){return Dl(Cn,e)}function Lx(e){return zl(Pn,e)}function zx(e){return Jl(Ir,e)}J(Ro());var Mx=[".localhost",".local",".internal",".test",".localdomain"],Ux=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0","[::]"]);function Hg(e){let t=e.trim().toLowerCase().replace(/\.$/,"");if(!t)return!1;if(Ux.has(t)||Mx.some(o=>t.endsWith(o))||/^127\./.test(t)||/^10\./.test(t)||/^192\.168\./.test(t)||/^172\.(1[6-9]|2[0-9]|3[01])\./.test(t))return!0;let r=/^\[::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);if(r){let o=Number.parseInt(r[1],16),n=Number.parseInt(r[2],16),i=`${o>>8}.${o&255}.${n>>8}.${n&255}`;if(i!==t)return Hg(i)}return!!(/^169\.254\./.test(t)||/^\[?fe80:/.test(t)||/^\[?f[cd][0-9a-f]{2}:/.test(t))}function Jg(e){let t;try{t=new URL(e)}catch{return"unparseable"}if(Hg(t.hostname))return"local";if(t.protocol!=="https:")return"insecure"}var Dr=u.discriminatedUnion("source",[u.object({source:u.literal("manifest")}),u.object({source:u.literal("studio"),element_id:u.string().min(1),edition_id:u.string().min(1)})]);var Fx=u.object({archetype:u.literal("hunt"),number:u.number().int().positive().default(1),prompt:u.string().default(""),board:u.array(u.string().min(1)).min(2),targets:u.array(u.string().min(1)).min(1),required:u.number().int().positive().optional(),pointsPerTarget:u.number().int().nonnegative().default(10),completionBonus:u.number().int().nonnegative().default(0),attemptsAllowed:u.number().int().positive().default(10),mistakesAllowed:u.number().int().positive().default(4),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.targets.filter(o=>!e.board.includes(o));r.length&&t.addIssue({code:"custom",path:["targets"],message:`Not on the board: ${r.join(", ")}. Every target must be pickable.`}),new Set(e.targets).size!==e.targets.length&&t.addIssue({code:"custom",path:["targets"],message:"The same target twice. Each one counts once."}),e.required!==void 0&&e.required>e.targets.length&&t.addIssue({code:"custom",path:["required"],message:`Asks for ${e.required} of ${e.targets.length} targets, which cannot be reached.`})}),Gx=u.object({key:u.string().min(1),label:u.string().min(1),value:u.number().int().nonnegative()}),Zx=u.object({id:u.string().min(1),label:u.string().default(""),entries:u.array(Gx).min(1)}),Bx=u.object({within:u.number().min(0).max(1),label:u.string().min(1)}),Kx=[{within:.02,label:"Hall of Fame"},{within:.05,label:"All-NBA"},{within:.1,label:"All-Star"},{within:.18,label:"Starter"},{within:.28,label:"Veteran"}],qg=u.object({archetype:u.literal("push"),number:u.number().int().positive().default(1),prompt:u.string().default(""),target:u.number().int().positive(),targetLabel:u.string().default(""),slates:u.array(Zx).min(1),tiers:u.array(Bx).default(Kx),floorLabel:u.string().default("Rookie"),bustLabel:u.string().default("Busted"),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.slates.map(s=>s.id);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["slates"],message:"Two slates share an id. A play names the slate it picked from."});let o=e.slates.flatMap(s=>s.entries.map(c=>c.key)),n=[...new Set(o.filter((s,c)=>o.indexOf(s)!==c))];n.length&&t.addIssue({code:"custom",path:["slates"],message:`The same key on more than one slate: ${n.join(", ")}. A play names a key, so each one must belong to exactly one slate.`});let i=e.slates.reduce((s,c)=>s+Math.min(...c.entries.map(l=>l.value)),0);i>e.target&&t.addIssue({code:"custom",path:["target"],message:`The lowest possible total is ${i}, which is already over ${e.target}. Every player would bust.`}),e.tiers.every((s,c)=>c===0||s.within>e.tiers[c-1].within)||t.addIssue({code:"custom",path:["tiers"],message:"Tiers must be ordered from closest to furthest. Out of order, the first one that matches is the wrong one and every player is awarded it."})}),Vx=u.object({key:u.string().min(1),label:u.string().min(1),members:u.array(u.string().min(1)).min(2)}),Wx=u.object({archetype:u.literal("group"),number:u.number().int().positive().default(1),prompt:u.string().default(""),board:u.array(u.string().min(1)).min(4),groups:u.array(Vx).min(2),pointsPerGroup:u.number().int().nonnegative().default(10),completionBonus:u.number().int().nonnegative().default(0),attemptsAllowed:u.number().int().positive().default(10),mistakesAllowed:u.number().int().positive().default(4),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=new Map;for(let i of e.groups){let a=i.members.filter(s=>!e.board.includes(s));a.length&&t.addIssue({code:"custom",path:["groups"],message:`${i.key} has members that are not on the board: ${a.join(", ")}.`});for(let s of i.members){let c=r.get(s);c&&c!==i.key&&t.addIssue({code:"custom",path:["groups"],message:`${s} is in both ${c} and ${i.key}. Groups cannot overlap.`}),r.set(s,i.key)}}new Set(e.groups.map(i=>i.key)).size!==e.groups.length&&t.addIssue({code:"custom",path:["groups"],message:"Two groups share a key. Each one needs its own."}),e.groups.length>e.attemptsAllowed&&t.addIssue({code:"custom",path:["attemptsAllowed"],message:`${e.groups.length} groups cannot be found in ${e.attemptsAllowed} attempts.`});let o=new Set(e.groups.flatMap(i=>i.members)),n=e.board.filter(i=>!o.has(i));n.length&&t.addIssue({code:"custom",path:["board"],message:`On the board and in no group: ${n.join(", ")}. Every item needs a group.`})}),Hx=u.object({key:u.string().min(1),label:u.string().min(1),points:u.number().int().nonnegative().optional()}),Jx=u.object({archetype:u.literal("forecast"),number:u.number().int().positive().default(1),prompt:u.string().default(""),options:u.array(Hx).min(2),result:u.string().min(1).optional(),pointsForCorrect:u.number().int().nonnegative().default(10),attemptsAllowed:u.number().int().positive().default(1),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{new Set(e.options.map(r=>r.key)).size!==e.options.length&&t.addIssue({code:"custom",path:["options"],message:"Two options share a key. Each one needs its own."}),e.result!==void 0&&!e.options.some(r=>r.key===e.result)&&t.addIssue({code:"custom",path:["result"],message:`${e.result} is not one of the options, so nobody could have predicted it.`})}),qx=u.discriminatedUnion("archetype",[Fx,qg,Wx,Jx]),Ae=u.preprocess(Wm,qx);function On(e){return`round-${e.number}`}var xN=u.object({game:u.string().min(1),round:Ae,origin:Dr.optional(),snapshot:u.string().default(""),source:u.string().optional(),roundId:u.string().min(1).optional(),selection:u.object({mode:u.literal("rotation"),windowSeconds:u.number().int().positive(),rounds:u.array(u.object({id:u.string().min(1),round:Ae,origin:Dr.optional()})).min(1)}).optional()}),SN=u.object({roundId:u.string(),version:u.number().int().nonnegative(),changed:u.boolean(),current:u.boolean()});var Vi="1.0",Qd=u.enum(["missing","proposed","confirmed","verified","approved"]),ep={missing:0,proposed:1,confirmed:2,verified:3,approved:4},tp=u.enum(["runtime","live","enterprise"]);var yt=u.enum(["L0","L1","L2","L3","L4","L5"]),Nn={L0:0,L1:1,L2:2,L3:3,L4:4,L5:5},Yg={L0:"Concept",L1:"Experience",L2:"Integration",L3:"Deployable",L4:"Production",L5:"Operating"},Yx=u.discriminatedUnion("kind",[u.object({kind:u.literal("human_decision"),owner:u.string(),date:u.string(),note:u.string().optional()}),u.object({kind:u.literal("generated_proposal"),tool:u.string(),model:u.string().optional(),source_context:u.string().optional()}),u.object({kind:u.literal("repository_evidence"),file:u.string(),commit:u.string().optional(),package:u.string().optional()}),u.object({kind:u.literal("platform_evidence"),system:u.string(),id:u.string()}),u.object({kind:u.literal("external_evidence"),supplier:u.string(),licence:u.string().optional(),dataset_version:u.string().optional()})]),Ue={status:Qd.default("missing"),provenance:u.array(Yx).default([])},Xx=u.object({schema_version:u.string(),revision:u.number().int().nonnegative().default(0),conformance:yt.default("L0")}),Qx=u.object({repository:u.string().url(),branch:u.string().default("main")}),eS=u.object({id:u.string().min(1),title:u.string().min(1),summary:u.string().optional(),source:Qx.optional(),owners:u.object({ip:u.string().optional(),delivery:u.string().optional(),platform:u.string().optional()}).prefault({}),...Ue}),tS=u.enum(["bring_your_own","managed_runtime","manifest_driven","dedicated_engine"]),nS=u.enum(["trivia","forecast","group","timed_round","synchronous_event","collection_ranking","hunt","push"]),vt=u.preprocess(e=>typeof e=="string"?We(e):e,nS),rS=u.object({route:tS.optional(),archetype:vt.optional(),component:u.string().optional(),version:u.string().optional(),variant:u.string().optional(),configuration:u.record(u.string(),u.unknown()).default({}),round:Ae.optional(),...Ue}),oS=u.object({surfaces:u.array(u.string()).default([]),container_label:u.string().min(1).default(Qt),screen_graph:u.string().optional(),design:u.object({figma_file:u.string().optional(),figma_version:u.string().optional(),tokens:u.string().optional(),fidelity:yt.optional()}).optional(),...Ue}),iS=u.object({spec_url:u.string().optional(),version:u.string().optional(),...Ue}),aS=u.object({family:u.string().optional(),version:u.string().optional(),configuration_schema:u.string().optional(),...Ue}),sS=u.object({project_template:u.string().optional(),project_id:u.string().optional(),events:u.array(u.string()).default([]),elements:u.array(u.string()).default([]),...Ue}),cS=u.object({required:u.boolean().default(!1),minimum_age:u.number().int().positive().max(120).optional(),method:u.enum(["self_declared","verified"]).default("self_declared"),verifier:u.string().optional()}),lS=u.object({issuer:u.string().url(),jwks_uri:u.string().url(),audience:u.string().optional()}),uS=u.object({provider:u.enum(["identify","anonymous","custom","jwt"]).optional(),jwt:lS.optional(),require_authenticated_writes:u.boolean().default(!0),age_gate:cS.prefault({}),consent:u.object({analytics_requires_consent:u.boolean().default(!0),provider:u.string().optional()}).prefault({}),...Ue}),dS=u.object({type:u.enum(["monterosa","posthog","ga4","webhook"]),enabled:u.boolean().default(!0),config:u.record(u.string(),u.string()).default({})}),pS=u.object({destinations:u.array(dS).default([{type:"monterosa",enabled:!0,config:{}}]),trusted_events:u.array(u.string()).default([]),signal:u.object({enabled:u.boolean().default(!1),application_id:u.string().optional(),write_key:u.string().optional(),monterosa:u.object({enabled:u.boolean().default(!1),organisation_id:u.string().optional(),project_id:u.string().optional()}).prefault({})}).prefault({}),...Ue}),mS=u.object({hosting:u.string().optional(),space_spec:u.string().optional(),environments:u.array(u.enum(["local","playground","staging","production"])).default(["local"]),...Ue}),fS=u.object({offers_prize:u.boolean().default(!1),free_entry_route:u.string().optional(),skill_based:u.boolean().default(!1),terms_url:u.string().optional(),jurisdictions:u.array(u.string()).default([])}),hS=u.object({support_tier:tp.optional(),runbook:u.string().optional(),promotion:fS.prefault({}),...Ue}),Mt=u.object({manifest:Xx,app:eS,experience:oS.prefault({}),studio_app:iS.prefault({}),studio_surface:aS.prefault({}),backend:rS.prefault({}),interaction_cloud:sS.prefault({}),identity:uS.prefault({}),measurement:pS.prefault({}),deployment:mS.prefault({}),operations:hS.prefault({})});function Xg(e){let t=[];e.measurement.signal.enabled&&!e.identity.consent.analytics_requires_consent&&t.push({path:"identity.consent.analytics_requires_consent",message:"Cannot be false while measurement.signal.enabled is true. Signal collects player engagement under Monterosa's own controllership, so consent is required and is not the game's to waive. Turn Signal off, or leave consent required."});let r=e.operations.promotion;if(r.offers_prize&&(r.terms_url||t.push({path:"operations.promotion.terms_url",message:"Required when the game offers a prize."}),r.jurisdictions.length===0&&t.push({path:"operations.promotion.jurisdictions",message:"Name the countries the promotion is open in. An unbounded prize draw is open in jurisdictions whose rules you have not read."}),!r.skill_based&&!r.free_entry_route&&t.push({path:"operations.promotion.free_entry_route",message:"A paid-entry prize needs either a published free entry route or a real skill test. Set `free_entry_route`, or set `skill_based` if entry turns on skill, knowledge or judgement."})),e.identity.provider==="jwt"&&!e.identity.jwt&&t.push({path:"identity.jwt",message:"Required when identity.provider is `jwt`. Name the `issuer` and the `jwks_uri` of the login system whose tokens this game accepts. Gamestage provides no identity provider."}),e.identity.jwt)for(let o of["issuer","jwks_uri"]){let n=e.identity.jwt[o],i=Jg(n);i&&t.push({path:`identity.jwt.${o}`,message:i==="local"?"Names a host only the machine running it can reach, which is the local `gamestage dev --as` harness. That harness signs its own tokens, so a deployed game pointed at it would let anyone who can reach the key be any player. Name the login system a real fan signs in to. `gamestage dev` supplies its own and needs nothing here.":i==="insecure"?"Must be https. A key set fetched in clear text is a key set the network chooses, and a token checked against it has proved nothing.":"Not a URL. Name the full issuer and JWKS URI of the login system whose tokens this game accepts."})}return e.identity.age_gate.required&&!e.identity.age_gate.minimum_age&&t.push({path:"identity.age_gate.minimum_age",message:"Required when identity.age_gate.required is true."}),e.identity.age_gate.method==="verified"&&!e.identity.age_gate.verifier&&t.push({path:"identity.age_gate.verifier",message:"Name the verifier when the method is `verified`. Gamestage provides no age verification, so an unnamed verifier is an unevidenced claim."}),t}var Rn=["app","experience","studio_app","studio_surface","backend","interaction_cloud","identity","measurement","deployment","operations"];var Ye=(e,t,r)=>{let o=e[t];return ep[o?.status??"missing"]>=ep[r]},ye=e=>typeof e=="string"?e.trim().length>0:e!=null,gS=[{level:"L0",id:"L0.app.identity",requirement:"app.id and app.title are set",check:e=>ye(e.app.id)&&ye(e.app.title)},{level:"L0",id:"L0.app.status",requirement:"app section is at least proposed",check:e=>Ye(e,"app","proposed")},{level:"L0",id:"L0.schema.version",requirement:"manifest.schema_version is set",check:e=>ye(e.manifest.schema_version)},{level:"L1",id:"L1.experience.defined",requirement:"experience declares a screen graph or at least one player surface",check:e=>ye(e.experience.screen_graph)||e.experience.surfaces.length>0},{level:"L1",id:"L1.experience.status",requirement:"experience section is at least proposed",check:e=>Ye(e,"experience","proposed")},{level:"L1",id:"L1.backend.route",requirement:"backend.route is chosen, so authority is decided before client code",check:e=>ye(e.backend.route)},{level:"L2",id:"L2.backend.pinned",requirement:"backend names a component and version, confirmed or better",check:e=>ye(e.backend.component)&&ye(e.backend.version)&&Ye(e,"backend","confirmed")},{level:"L2",id:"L2.identity.policy",requirement:"identity provider is set and the section is confirmed",check:e=>ye(e.identity.provider)&&Ye(e,"identity","confirmed")},{level:"L2",id:"L2.measurement.destination",requirement:"at least one enabled analytics destination is declared",check:e=>e.measurement.destinations.some(t=>t.enabled)},{level:"L2",id:"L2.platform.identifiers",requirement:"a real platform identity exists (Studio App Spec or Interaction Cloud project)",check:e=>ye(e.studio_app.spec_url)||ye(e.interaction_cloud.project_id)},{level:"L3",id:"L3.deployment.space",requirement:"deployment names a Space spec and a non-local environment",check:e=>ye(e.deployment.space_spec)&&e.deployment.environments.some(t=>t!=="local")},{level:"L3",id:"L3.surface.declared",requirement:"a Studio Surface family is declared for operator control",check:e=>ye(e.studio_surface.family)},{level:"L3",id:"L3.sections.confirmed",requirement:"experience, backend and deployment are all confirmed or better",check:e=>Ye(e,"experience","confirmed")&&Ye(e,"backend","confirmed")&&Ye(e,"deployment","confirmed")},{level:"L4",id:"L4.sections.verified",requirement:"experience, backend, identity and deployment are verified with evidence attached",check:e=>["experience","backend","identity","deployment"].every(t=>Ye(e,t,"verified")&&e[t].provenance.length>0)},{level:"L4",id:"L4.operations.runbook",requirement:"operations declares a support tier and a runbook",check:e=>ye(e.operations.support_tier)&&ye(e.operations.runbook)},{level:"L5",id:"L5.production.approved",requirement:"the manifest is approved and deployed to a production environment",check:e=>Ye(e,"operations","approved")&&e.deployment.environments.includes("production")}],Qg=["L0","L1","L2","L3","L4","L5"];function Oe(e){let t=gS.map(l=>({id:l.id,level:l.level,requirement:l.requirement,passed:l.check(e)})),r="L0",o=!0;for(let l of Qg)t.filter(m=>m.level===l).every(m=>m.passed)&&o?r=l:o=!1;let n=t.filter(l=>l.level==="L0").every(l=>l.passed),i=Nn[r]+1,a=Qg[i],s=a?t.filter(l=>l.level===a&&!l.passed):[],c=e.manifest.conformance;return{computed:r,computedName:Yg[r],claimed:c,overclaimed:!n||Nn[c]>Nn[r],results:t,blockers:n?s:t.filter(l=>l.level==="L0"&&!l.passed)}}function ey(e,t){let o=Oe(e).results.filter(n=>!n.passed&&Nn[n.level]<=Nn[t]);return{ok:o.length===0,missing:o}}function gy(e){return typeof e>"u"||e===null}function yS(e){return typeof e=="object"&&e!==null}function vS(e){return Array.isArray(e)?e:gy(e)?[]:[e]}function _S(e,t){var r,o,n,i;if(t)for(i=Object.keys(t),r=0,o=i.length;r<o;r+=1)n=i[r],e[n]=t[n];return e}function bS(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function wS(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var kS=gy,xS=yS,SS=vS,$S=bS,ES=wS,TS=_S,X={isNothing:kS,isObject:xS,toArray:SS,repeat:$S,isNegativeZero:ES,extend:TS};function yy(e,t){var r="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
7111
-
7112
- `+e.mark.snippet),o+" "+r):o}function zr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=yy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}zr.prototype=Object.create(Error.prototype);zr.prototype.constructor=zr;zr.prototype.toString=function(t){return this.name+": "+yy(this,t)};var me=zr;function np(e,t,r,o,n){var i="",a="",s=Math.floor(n/2)-1;return o-t>s&&(i=" ... ",t=o-s+i.length),r-o>s&&(a=" ...",r=o+s-a.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:o-t+i.length}}function rp(e,t){return X.repeat(" ",t-e.length)+e}function AS(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,o=[0],n=[],i,a=-1;i=r.exec(e.buffer);)n.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s="",c,l,d=Math.min(e.line+t.linesAfter,n.length).toString().length,p=t.maxLength-(t.indent+d+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)l=np(e.buffer,o[a-c],n[a-c],e.position-(o[a]-o[a-c]),p),s=X.repeat(" ",t.indent)+rp((e.line-c+1).toString(),d)+" | "+l.str+`
7113
- `+s;for(l=np(e.buffer,o[a],n[a],e.position,p),s+=X.repeat(" ",t.indent)+rp((e.line+1).toString(),d)+" | "+l.str+`
7114
- `,s+=X.repeat("-",t.indent+d+3+l.pos)+`^
7115
- `,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)l=np(e.buffer,o[a+c],n[a+c],e.position-(o[a]-o[a+c]),p),s+=X.repeat(" ",t.indent)+rp((e.line+c+1).toString(),d)+" | "+l.str+`
7116
- `;return s.replace(/\n$/,"")}var IS=AS,CS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],PS=["scalar","sequence","mapping"];function OS(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}function NS(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(CS.indexOf(r)===-1)throw new me('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=OS(t.styleAliases||null),PS.indexOf(this.kind)===-1)throw new me('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var re=NS;function ty(e,t){var r=[];return e[t].forEach(function(o){var n=r.length;r.forEach(function(i,a){i.tag===o.tag&&i.kind===o.kind&&i.multi===o.multi&&(n=a)}),r[n]=o}),r}function RS(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function o(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(o);return e}function ip(e){return this.extend(e)}ip.prototype.extend=function(t){var r=[],o=[];if(t instanceof re)o.push(t);else if(Array.isArray(t))o=o.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit));else throw new me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof re))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(i){if(!(i instanceof re))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(ip.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(o),n.compiledImplicit=ty(n,"implicit"),n.compiledExplicit=ty(n,"explicit"),n.compiledTypeMap=RS(n.compiledImplicit,n.compiledExplicit),n};var vy=ip,_y=new re("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),by=new re("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),wy=new re("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ky=new vy({explicit:[_y,by,wy]});function jS(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function DS(){return null}function LS(e){return e===null}var xy=new re("tag:yaml.org,2002:null",{kind:"scalar",resolve:jS,construct:DS,predicate:LS,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function zS(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function MS(e){return e==="true"||e==="True"||e==="TRUE"}function US(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Sy=new re("tag:yaml.org,2002:bool",{kind:"scalar",resolve:zS,construct:MS,predicate:US,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function FS(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function GS(e){return 48<=e&&e<=55}function ZS(e){return 48<=e&&e<=57}function BS(e){if(e===null)return!1;var t=e.length,r=0,o=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;o=!0}return o&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!FS(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!GS(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!ZS(e.charCodeAt(r)))return!1;o=!0}return!(!o||n==="_")}function KS(e){var t=e,r=1,o;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),o=t[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),t=t.slice(1),o=t[0]),t==="0")return 0;if(o==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function VS(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!X.isNegativeZero(e)}var $y=new re("tag:yaml.org,2002:int",{kind:"scalar",resolve:BS,construct:KS,predicate:VS,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),WS=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function HS(e){return!(e===null||!WS.test(e)||e[e.length-1]==="_")}function JS(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var qS=/^[-+]?[0-9]+e/;function YS(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(X.isNegativeZero(e))return"-0.0";return r=e.toString(10),qS.test(r)?r.replace("e",".e"):r}function XS(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||X.isNegativeZero(e))}var Ey=new re("tag:yaml.org,2002:float",{kind:"scalar",resolve:HS,construct:JS,predicate:XS,represent:YS,defaultStyle:"lowercase"}),Ty=ky.extend({implicit:[xy,Sy,$y,Ey]}),Ay=Ty,Iy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Cy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function QS(e){return e===null?!1:Iy.exec(e)!==null||Cy.exec(e)!==null}function e$(e){var t,r,o,n,i,a,s,c=0,l=null,d,p,m;if(t=Iy.exec(e),t===null&&(t=Cy.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,o,n));if(i=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(d=+t[10],p=+(t[11]||0),l=(d*60+p)*6e4,t[9]==="-"&&(l=-l)),m=new Date(Date.UTC(r,o,n,i,a,s,c)),l&&m.setTime(m.getTime()-l),m}function t$(e){return e.toISOString()}var Py=new re("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:QS,construct:e$,instanceOf:Date,represent:t$});function n$(e){return e==="<<"||e===null}var Oy=new re("tag:yaml.org,2002:merge",{kind:"scalar",resolve:n$}),up=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
7117
- \r`;function r$(e){if(e===null)return!1;var t,r,o=0,n=e.length,i=up;for(r=0;r<n;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function o$(e){var t,r,o=e.replace(/[\r\n=]/g,""),n=o.length,i=up,a=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|i.indexOf(o.charAt(t));return r=n%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function i$(e){var t="",r=0,o,n,i=e.length,a=up;for(o=0;o<i;o++)o%3===0&&o&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[o];return n=i%3,n===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):n===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):n===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function a$(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ny=new re("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r$,construct:o$,predicate:a$,represent:i$}),s$=Object.prototype.hasOwnProperty,c$=Object.prototype.toString;function l$(e){if(e===null)return!0;var t=[],r,o,n,i,a,s=e;for(r=0,o=s.length;r<o;r+=1){if(n=s[r],a=!1,c$.call(n)!=="[object Object]")return!1;for(i in n)if(s$.call(n,i))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function u$(e){return e!==null?e:[]}var Ry=new re("tag:yaml.org,2002:omap",{kind:"sequence",resolve:l$,construct:u$}),d$=Object.prototype.toString;function p$(e){if(e===null)return!0;var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(o=a[t],d$.call(o)!=="[object Object]"||(n=Object.keys(o),n.length!==1))return!1;i[t]=[n[0],o[n[0]]]}return!0}function m$(e){if(e===null)return[];var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)o=a[t],n=Object.keys(o),i[t]=[n[0],o[n[0]]];return i}var jy=new re("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:p$,construct:m$}),f$=Object.prototype.hasOwnProperty;function h$(e){if(e===null)return!0;var t,r=e;for(t in r)if(f$.call(r,t)&&r[t]!==null)return!1;return!0}function g$(e){return e!==null?e:{}}var Dy=new re("tag:yaml.org,2002:set",{kind:"mapping",resolve:h$,construct:g$}),dp=Ay.extend({implicit:[Py,Oy],explicit:[Ny,Ry,jy,Dy]}),bt=Object.prototype.hasOwnProperty,Wi=1,Ly=2,zy=3,Hi=4,op=1,y$=2,ny=3,v$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_$=/[\x85\u2028\u2029]/,b$=/[,\[\]\{\}]/,My=/^(?:!|!!|![a-z\-]+!)$/i,Uy=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ry(e){return Object.prototype.toString.call(e)}function Fe(e){return e===10||e===13}function Ft(e){return e===9||e===32}function ve(e){return e===9||e===32||e===10||e===13}function Dn(e){return e===44||e===91||e===93||e===123||e===125}function w$(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function k$(e){return e===120?2:e===117?4:e===85?8:0}function x$(e){return 48<=e&&e<=57?e-48:-1}function oy(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
7118
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function S$(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Fy(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Gy=new Array(256),Zy=new Array(256);for(Ut=0;Ut<256;Ut++)Gy[Ut]=oy(Ut)?1:0,Zy[Ut]=oy(Ut);var Ut;function $$(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||dp,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function By(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=IS(r),new me(t,r)}function C(e,t){throw By(e,t)}function Ji(e,t){e.onWarning&&e.onWarning.call(null,By(e,t))}var iy={YAML:function(t,r,o){var n,i,a;t.version!==null&&C(t,"duplication of %YAML directive"),o.length!==1&&C(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),n===null&&C(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),i!==1&&C(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Ji(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var n,i;o.length!==2&&C(t,"TAG directive accepts exactly two arguments"),n=o[0],i=o[1],My.test(n)||C(t,"ill-formed tag handle (first argument) of the TAG directive"),bt.call(t.tagMap,n)&&C(t,'there is a previously declared suffix for "'+n+'" tag handle'),Uy.test(i)||C(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{C(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}};function _t(e,t,r,o){var n,i,a,s;if(t<r){if(s=e.input.slice(t,r),o)for(n=0,i=s.length;n<i;n+=1)a=s.charCodeAt(n),a===9||32<=a&&a<=1114111||C(e,"expected valid JSON character");else v$.test(s)&&C(e,"the stream contains non-printable characters");e.result+=s}}function ay(e,t,r,o){var n,i,a,s;for(X.isObject(r)||C(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,s=n.length;a<s;a+=1)i=n[a],bt.call(t,i)||(Fy(t,i,r[i]),o[i]=!0)}function Ln(e,t,r,o,n,i,a,s,c){var l,d;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,d=n.length;l<d;l+=1)Array.isArray(n[l])&&C(e,"nested arrays are not supported inside keys"),typeof n=="object"&&ry(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&ry(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(l=0,d=i.length;l<d;l+=1)ay(e,t,i[l],r);else ay(e,t,i,r);else!e.json&&!bt.call(r,n)&&bt.call(t,n)&&(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,C(e,"duplicated mapping key")),Fy(t,n,i),delete r[n];return t}function pp(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):C(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Y(e,t,r){for(var o=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ft(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Fe(n))for(pp(e),n=e.input.charCodeAt(e.position),o++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&o!==0&&e.lineIndent<r&&Ji(e,"deficient indentation"),o}function Xi(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ve(r)))}function mp(e,t){t===1?e.result+=" ":t>1&&(e.result+=X.repeat(`
7119
- `,t-1))}function E$(e,t,r){var o,n,i,a,s,c,l,d,p=e.kind,m=e.result,f;if(f=e.input.charCodeAt(e.position),ve(f)||Dn(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),ve(n)||r&&Dn(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,s=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),ve(n)||r&&Dn(n))break}else if(f===35){if(o=e.input.charCodeAt(e.position-1),ve(o))break}else{if(e.position===e.lineStart&&Xi(e)||r&&Dn(f))break;if(Fe(f))if(c=e.line,l=e.lineStart,d=e.lineIndent,Y(e,!1,-1),e.lineIndent>=t){s=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=d;break}}s&&(_t(e,i,a,!1),mp(e,e.line-c),i=a=e.position,s=!1),Ft(f)||(a=e.position+1),f=e.input.charCodeAt(++e.position)}return _t(e,i,a,!1),e.result?!0:(e.kind=p,e.result=m,!1)}function T$(e,t){var r,o,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(_t(e,o,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)o=e.position,e.position++,n=e.position;else return!0;else Fe(r)?(_t(e,o,n,!0),mp(e,Y(e,!1,t)),o=n=e.position):e.position===e.lineStart&&Xi(e)?C(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);C(e,"unexpected end of the stream within a single quoted scalar")}function A$(e,t){var r,o,n,i,a,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return _t(e,r,e.position,!0),e.position++,!0;if(s===92){if(_t(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Fe(s))Y(e,!1,t);else if(s<256&&Gy[s])e.result+=Zy[s],e.position++;else if((a=k$(s))>0){for(n=a,i=0;n>0;n--)s=e.input.charCodeAt(++e.position),(a=w$(s))>=0?i=(i<<4)+a:C(e,"expected hexadecimal character");e.result+=S$(i),e.position++}else C(e,"unknown escape sequence");r=o=e.position}else Fe(s)?(_t(e,r,o,!0),mp(e,Y(e,!1,t)),r=o=e.position):e.position===e.lineStart&&Xi(e)?C(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}C(e,"unexpected end of the stream within a double quoted scalar")}function I$(e,t){var r=!0,o,n,i,a=e.tag,s,c=e.anchor,l,d,p,m,f,h=Object.create(null),b,$,O,D;if(D=e.input.charCodeAt(e.position),D===91)d=93,f=!1,s=[];else if(D===123)d=125,f=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),D=e.input.charCodeAt(++e.position);D!==0;){if(Y(e,!0,t),D=e.input.charCodeAt(e.position),D===d)return e.position++,e.tag=a,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=s,!0;r?D===44&&C(e,"expected the node content, but found ','"):C(e,"missed comma between flow collection entries"),$=b=O=null,p=m=!1,D===63&&(l=e.input.charCodeAt(e.position+1),ve(l)&&(p=m=!0,e.position++,Y(e,!0,t))),o=e.line,n=e.lineStart,i=e.position,zn(e,t,Wi,!1,!0),$=e.tag,b=e.result,Y(e,!0,t),D=e.input.charCodeAt(e.position),(m||e.line===o)&&D===58&&(p=!0,D=e.input.charCodeAt(++e.position),Y(e,!0,t),zn(e,t,Wi,!1,!0),O=e.result),f?Ln(e,s,h,$,b,O,o,n,i):p?s.push(Ln(e,null,h,$,b,O,o,n,i)):s.push(b),Y(e,!0,t),D=e.input.charCodeAt(e.position),D===44?(r=!0,D=e.input.charCodeAt(++e.position)):r=!1}C(e,"unexpected end of the stream within a flow collection")}function C$(e,t){var r,o,n=op,i=!1,a=!1,s=t,c=0,l=!1,d,p;if(p=e.input.charCodeAt(e.position),p===124)o=!1;else if(p===62)o=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)op===n?n=p===43?ny:y$:C(e,"repeat of a chomping mode identifier");else if((d=x$(p))>=0)d===0?C(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?C(e,"repeat of an indentation width identifier"):(s=t+d-1,a=!0);else break;if(Ft(p)){do p=e.input.charCodeAt(++e.position);while(Ft(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!Fe(p)&&p!==0)}for(;p!==0;){for(pp(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!a||e.lineIndent<s)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>s&&(s=e.lineIndent),Fe(p)){c++;continue}if(e.lineIndent<s){n===ny?e.result+=X.repeat(`
7120
- `,i?1+c:c):n===op&&i&&(e.result+=`
7121
- `);break}for(o?Ft(p)?(l=!0,e.result+=X.repeat(`
7122
- `,i?1+c:c)):l?(l=!1,e.result+=X.repeat(`
7123
- `,c+1)):c===0?i&&(e.result+=" "):e.result+=X.repeat(`
7124
- `,c):e.result+=X.repeat(`
7125
- `,i?1+c:c),i=!0,a=!0,c=0,r=e.position;!Fe(p)&&p!==0;)p=e.input.charCodeAt(++e.position);_t(e,r,e.position,!1)}return!0}function sy(e,t){var r,o=e.tag,n=e.anchor,i=[],a,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,C(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!ve(a))));){if(s=!0,e.position++,Y(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,zn(e,t,zy,!1,!0),i.push(e.result),Y(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)C(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=o,e.anchor=n,e.kind="sequence",e.result=i,!0):!1}function P$(e,t,r){var o,n,i,a,s,c,l=e.tag,d=e.anchor,p={},m=Object.create(null),f=null,h=null,b=null,$=!1,O=!1,D;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),D=e.input.charCodeAt(e.position);D!==0;){if(!$&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,C(e,"tab characters must not be used in indentation")),o=e.input.charCodeAt(e.position+1),i=e.line,(D===63||D===58)&&ve(o))D===63?($&&(Ln(e,p,m,f,h,null,a,s,c),f=h=b=null),O=!0,$=!0,n=!0):$?($=!1,n=!0):C(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,D=o;else{if(a=e.line,s=e.lineStart,c=e.position,!zn(e,r,Ly,!1,!0))break;if(e.line===i){for(D=e.input.charCodeAt(e.position);Ft(D);)D=e.input.charCodeAt(++e.position);if(D===58)D=e.input.charCodeAt(++e.position),ve(D)||C(e,"a whitespace character is expected after the key-value separator within a block mapping"),$&&(Ln(e,p,m,f,h,null,a,s,c),f=h=b=null),O=!0,$=!1,n=!1,f=e.tag,h=e.result;else if(O)C(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=d,!0}else if(O)C(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=d,!0}if((e.line===i||e.lineIndent>t)&&($&&(a=e.line,s=e.lineStart,c=e.position),zn(e,t,Hi,!0,n)&&($?h=e.result:b=e.result),$||(Ln(e,p,m,f,h,b,a,s,c),f=h=b=null),Y(e,!0,-1),D=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&D!==0)C(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return $&&Ln(e,p,m,f,h,null,a,s,c),O&&(e.tag=l,e.anchor=d,e.kind="mapping",e.result=p),O}function O$(e){var t,r=!1,o=!1,n,i,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&C(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(o=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):C(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!ve(a);)a===33&&(o?C(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),My.test(n)||C(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),b$.test(i)&&C(e,"tag suffix cannot contain flow indicator characters")}i&&!Uy.test(i)&&C(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{C(e,"tag name is malformed: "+i)}return r?e.tag=i:bt.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:n==="!"?e.tag="!"+i:n==="!!"?e.tag="tag:yaml.org,2002:"+i:C(e,'undeclared tag handle "'+n+'"'),!0}function N$(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&C(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ve(r)&&!Dn(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&C(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function R$(e){var t,r,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!ve(o)&&!Dn(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&C(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),bt.call(e.anchorMap,r)||C(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Y(e,!0,-1),!0}function zn(e,t,r,o,n){var i,a,s,c=1,l=!1,d=!1,p,m,f,h,b,$;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=a=s=Hi===r||zy===r,o&&Y(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;O$(e)||N$(e);)Y(e,!0,-1)?(l=!0,s=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||Hi===r)&&(Wi===r||Ly===r?b=t:b=t+1,$=e.position-e.lineStart,c===1?s&&(sy(e,$)||P$(e,$,b))||I$(e,b)?d=!0:(a&&C$(e,b)||T$(e,b)||A$(e,b)?d=!0:R$(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&C(e,"alias node should not have any properties")):E$(e,b,Wi===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(d=s&&sy(e,$))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&C(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,m=e.implicitTypes.length;p<m;p+=1)if(h=e.implicitTypes[p],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(bt.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,f=e.typeMap.multi[e.kind||"fallback"],p=0,m=f.length;p<m;p+=1)if(e.tag.slice(0,f[p].tag.length)===f[p].tag){h=f[p];break}h||C(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&C(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):C(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function j$(e){var t=e.position,r,o,n,i=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Y(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(i=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!ve(a);)a=e.input.charCodeAt(++e.position);for(o=e.input.slice(r,e.position),n=[],o.length<1&&C(e,"directive name must not be less than one character in length");a!==0;){for(;Ft(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Fe(a));break}if(Fe(a))break;for(r=e.position;a!==0&&!ve(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&pp(e),bt.call(iy,o)?iy[o](e,o,n):Ji(e,'unknown document directive "'+o+'"')}if(Y(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Y(e,!0,-1)):i&&C(e,"directives end mark is expected"),zn(e,e.lineIndent-1,Hi,!1,!0),Y(e,!0,-1),e.checkLineBreaks&&_$.test(e.input.slice(t,e.position))&&Ji(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Xi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Y(e,!0,-1));return}if(e.position<e.length-1)C(e,"end of the stream or a document separator is expected");else return}function Ky(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
7126
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new $$(e,t),o=e.indexOf("\0");for(o!==-1&&(r.position=o,C(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)j$(r);return r.documents}function D$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var o=Ky(e,r);if(typeof t!="function")return o;for(var n=0,i=o.length;n<i;n+=1)t(o[n])}function L$(e,t){var r=Ky(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new me("expected a single document in the stream, but found more")}}var z$=D$,M$=L$,Vy={loadAll:z$,load:M$},Wy=Object.prototype.toString,Hy=Object.prototype.hasOwnProperty,fp=65279,U$=9,Mr=10,F$=13,G$=32,Z$=33,B$=34,ap=35,K$=37,V$=38,W$=39,H$=42,Jy=44,J$=45,qi=58,q$=61,Y$=62,X$=63,Q$=64,qy=91,Yy=93,eE=96,Xy=123,tE=124,Qy=125,ae={};ae[0]="\\0";ae[7]="\\a";ae[8]="\\b";ae[9]="\\t";ae[10]="\\n";ae[11]="\\v";ae[12]="\\f";ae[13]="\\r";ae[27]="\\e";ae[34]='\\"';ae[92]="\\\\";ae[133]="\\N";ae[160]="\\_";ae[8232]="\\L";ae[8233]="\\P";var nE=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],rE=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function oE(e,t){var r,o,n,i,a,s,c;if(t===null)return{};for(r={},o=Object.keys(t),n=0,i=o.length;n<i;n+=1)a=o[n],s=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&Hy.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[a]=s;return r}function iE(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else if(e<=4294967295)r="U",o=8;else throw new me("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+X.repeat("0",o-t.length)+t}var aE=1,Ur=2;function sE(e){this.schema=e.schema||dp,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=X.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=oE(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Ur:aE,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cy(e,t){for(var r=X.repeat(" ",t),o=0,n=-1,i="",a,s=e.length;o<s;)n=e.indexOf(`
7116
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let z=f.compile();return(ne,G)=>z(m,ne,G)},i,a=Ct,s=!It.jitless,l=s&&as.value,p=t.catchall,d;e._zod.parse=(m,f)=>{d??(d=o.value);let h=m.value;return a(h)?s&&l&&f?.async===!1&&f.jitless!==!0?(i||(i=n(t.shape)),m=i(m,f),p?Af([],h,m,f,d,e):m):r(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function pf(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=>!dt(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(a=>ue(a,o,J())))}),t)}var vr=g("$ZodUnion",(e,t)=>{L.init(e,t),U(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),U(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),U(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),U(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=>sr(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,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>pf(s,o,e,n)):pf(a,o,e,n)}});function mf(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(a=>ue(a,o,J())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var Yc=g("$ZodXor",(e,t)=>{vr.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,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);c instanceof Promise?(a.push(c),i=!0):a.push(c)}return i?Promise.all(a).then(s=>mf(s,o,e,n)):mf(a,o,e,n)}}),qc=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,vr.init(e,t);let r=e._zod.parse;U(e._zod,"propValues",()=>{let n={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(let l of c)n[s].add(l)}}return n});let o=nn(()=>{let n=t.options,i=new Map;for(let a of n){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(n,i)=>{let a=n.value;if(!Ct(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._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:a,path:[t.discriminator],inst:e}),n)}}),Xc=g("$ZodIntersection",(e,t)=>{L.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>ff(r,c,l)):ff(r,i,a)}});function dc(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(ut(e)&&ut(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 a=dc(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.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],a=dc(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function ff(e,t,r){let o=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),dt(e))return e;let a=dc(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var No=g("$ZodTuple",(e,t)=>{L.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 a=[],s=hf(r,"optin"),c=hf(r,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,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 p=0;p<r.length;p++){let d=r[p]._zod.run({value:i[p],issues:[]},n);d instanceof Promise?a.push(d.then(m=>{l[p]=m})):l[p]=d}if(t.rest){let p=r.length-1,d=i.slice(r.length);for(let m of d){p++;let f=t.rest._zod.run({value:m,issues:[]},n);f instanceof Promise?a.push(f.then(h=>gf(h,o,p))):gf(f,o,p)}}return a.length?Promise.all(a).then(()=>yf(l,o,r,i,c)):yf(l,o,r,i,c)}});function hf(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function gf(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues)),t.value[r]=e.value}function yf(e,t,r,o,n){for(let i=0;i<r.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=n){t.value.length=i;break}t.issues.push(...fe(i,a.issues))}t.value[i]=a.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 Qc=g("$ZodRecord",(e,t)=>{L.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!ut(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let p=t.keyType._zod.run({value:l,issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(f=>ue(f,o,J())),input:l,path:[l],inst:e});continue}let d=p.value,m=t.valueType._zod.run({value:n[l],issues:[]},o);m instanceof Promise?i.push(m.then(f=>{f.issues.length&&r.issues.push(...fe(l,f.issues)),r.value[d]=f.value})):(m.issues.length&&r.issues.push(...fe(l,m.issues)),r.value[d]=m.value)}let c;for(let l in n)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&So.test(s)&&c.issues.length){let d=t.keyType._zod.run({value:Number(s),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>ue(d,o,J())),input:s,path:[s],inst:e});continue}let p=t.valueType._zod.run({value:n[s],issues:[]},o);p instanceof Promise?i.push(p.then(d=>{d.issues.length&&r.issues.push(...fe(s,d.issues)),r.value[c.value]=d.value})):(p.issues.length&&r.issues.push(...fe(s,p.issues)),r.value[c.value]=p.value)}}return i.length?Promise.all(i).then(()=>r):r}}),el=g("$ZodMap",(e,t)=>{L.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[a,s]of n){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([p,d])=>{vf(p,d,r,a,n,e,o)})):vf(c,l,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function vf(e,t,r,o,n,i,a){e.issues.length&&(cr.has(typeof o)?r.issues.push(...fe(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>ue(s,a,J()))})),t.issues.length&&(cr.has(typeof o)?r.issues.push(...fe(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>ue(s,a,J()))})),r.value.set(e.value,t.value)}var tl=g("$ZodSet",(e,t)=>{L.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 a of n){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>_f(c,r))):_f(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function _f(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var nl=g("$ZodEnum",(e,t)=>{L.init(e,t);let r=ar(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>cr.has(typeof n)).map(n=>typeof n=="string"?Ce(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),rl=g("$ZodLiteral",(e,t)=>{if(L.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}}),ol=g("$ZodFile",(e,t)=>{L.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}}),il=g("$ZodTransform",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new st(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Oe;return r.value=n,r.fallback=!0,r}});function bf(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ro=g("$ZodOptional",(e,t)=>{L.init(e,t),e._zod.optin="optional",e._zod.optout="optional",U(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),U(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sr(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(a=>bf(a,n)):bf(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),al=g("$ZodExactOptional",(e,t)=>{Ro.init(e,t),U(e._zod,"values",()=>t.innerType._zod.values),U(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),sl=g("$ZodNullable",(e,t)=>{L.init(e,t),U(e._zod,"optin",()=>t.innerType._zod.optin),U(e._zod,"optout",()=>t.innerType._zod.optout),U(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${sr(r.source)}|null)$`):void 0}),U(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)}),cl=g("$ZodDefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",U(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=>wf(i,t)):wf(n,t)}});function wf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ll=g("$ZodPrefault",(e,t)=>{L.init(e,t),e._zod.optin="optional",U(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))}),ul=g("$ZodNonOptional",(e,t)=>{L.init(e,t),U(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=>kf(i,e)):kf(n,e)}});function kf(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 dl=g("$ZodSuccess",(e,t)=>{L.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new st("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)}}),pl=g("$ZodCatch",(e,t)=>{L.init(e,t),e._zod.optin="optional",U(e._zod,"optout",()=>t.innerType._zod.optout),U(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(a=>ue(a,o,J()))},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=>ue(i,o,J()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),ml=g("$ZodNaN",(e,t)=>{L.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)}),jo=g("$ZodPipe",(e,t)=>{L.init(e,t),U(e._zod,"values",()=>t.in._zod.values),U(e._zod,"optin",()=>t.in._zod.optin),U(e._zod,"optout",()=>t.out._zod.optout),U(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(a=>To(a,t.in,o)):To(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>To(i,t.out,o)):To(n,t.out,o)}});function To(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 _r=g("$ZodCodec",(e,t)=>{L.init(e,t),U(e._zod,"values",()=>t.in._zod.values),U(e._zod,"optin",()=>t.in._zod.optin),U(e._zod,"optout",()=>t.out._zod.optout),U(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(a=>Ao(a,t,o)):Ao(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>Ao(a,t,o)):Ao(i,t,o)}}});function Ao(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=>Io(e,i,t.out,r)):Io(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>Io(e,i,t.in,r)):Io(e,n,t.in,r)}}function Io(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var fl=g("$ZodPreprocess",(e,t)=>{jo.init(e,t)}),hl=g("$ZodReadonly",(e,t)=>{L.init(e,t),U(e._zod,"propValues",()=>t.innerType._zod.propValues),U(e._zod,"values",()=>t.innerType._zod.values),U(e._zod,"optin",()=>t.innerType?._zod?.optin),U(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(xf):xf(n)}});function xf(e){return e.value=Object.freeze(e.value),e}var gl=g("$ZodTemplateLiteral",(e,t)=>{L.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,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||cs.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)}),yl=g("$ZodFunction",(e,t)=>(L.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?mo(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?mo(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 fo(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await fo(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 No({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)),vl=g("$ZodPromise",(e,t)=>{L.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),_l=g("$ZodLazy",(e,t)=>{L.init(e,t),U(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),U(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),U(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),U(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),U(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),bl=g("$ZodCustom",(e,t)=>{V.init(e,t),L.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=>Sf(i,r,o,e));Sf(n,r,o,e)}});function Sf(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(rn(n))}}var wr={};Ke(wr,{ar:()=>Cf,az:()=>Pf,be:()=>Nf,bg:()=>Rf,ca:()=>jf,cs:()=>Df,da:()=>Lf,de:()=>zf,el:()=>Mf,en:()=>Do,eo:()=>Uf,es:()=>Ff,fa:()=>Gf,fi:()=>Zf,fr:()=>Bf,frCA:()=>Kf,he:()=>Vf,hr:()=>Wf,hu:()=>Hf,hy:()=>Yf,id:()=>qf,is:()=>Xf,it:()=>Qf,ja:()=>eh,ka:()=>th,kh:()=>nh,km:()=>Lo,ko:()=>rh,lt:()=>ih,mk:()=>ah,ms:()=>sh,nl:()=>ch,no:()=>lh,ota:()=>uh,pl:()=>ph,ps:()=>dh,pt:()=>mh,ro:()=>fh,ru:()=>gh,sl:()=>yh,sv:()=>vh,ta:()=>_h,th:()=>bh,tr:()=>wh,ua:()=>kh,uk:()=>zo,ur:()=>xh,uz:()=>Sh,vi:()=>$h,yo:()=>Ah,zhCN:()=>Eh,zhTW:()=>Th});var yk=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?` \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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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":""}: ${y(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 Cf(){return{localeError:yk()}}var vk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${w(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Pf(){return{localeError:vk()}}function Of(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var _k=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Of(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${i}${n.maximum.toString()} ${c}`}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?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Of(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${i}${n.minimum.toString()} ${c}`}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"}: ${y(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 Nf(){return{localeError:_k()}}var bk=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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 a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${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":""}: ${y(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 Rf(){return{localeError:bk()}}var wk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${w(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${y(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.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",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.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":""}: ${y(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 jf(){return{localeError:wk()}}var kk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${w(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.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: ${y(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 Df(){return{localeError:kk()}}var xk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${w(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} 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"}: ${y(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 Lf(){return{localeError:xk()}}var Sk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${w(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.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"}: ${y(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 zf(){return{localeError:Sk()}}var $k=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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"}: ${y(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 Mf(){return{localeError:$k()}}var Ek=()=>{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,a=k(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${w(n.values[0])}`:`Invalid option: expected one of ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.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":""}: ${y(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(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Do(){return{localeError:Ek()}}var Tk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${w(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Uf(){return{localeError:Tk()}}var Ak=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${w(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} 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":""}: ${y(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 Ff(){return{localeError:Ak()}}var Ik=()=>{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,a=k(n.input),s=o[a]??a;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 ${s} \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 ${s} \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 ${w(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 ${y(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.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: ${y(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 Gf(){return{localeError:Ik()}}var Ck=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${w(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.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"}: ${y(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 Zf(){return{localeError:Ck()}}var Pk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${w(n.values[0])} attendu`:`Option invalide : une valeur parmi ${y(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.minimum.toString()} ${a.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":""} : ${y(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 Bf(){return{localeError:Pk()}}var Ok=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${w(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.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":""} : ${y(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 Kf(){return{localeError:Ok()}}var Nk=()=>{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 p=r(l);return p?p.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",a=l=>l?t[l]??null:null,s={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"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let p=l.expected,d=c[p??""]??o(p),m=k(l.input),f=c[m]??e[m]?.label??m;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 ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(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 ${w(l.values[0])}`;let p=l.values.map(f=>w(f));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 ${p[0]} \u05D0\u05D5 ${p[1]}`;let d=p[p.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 ${p.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let p=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${p?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${p?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",_=l.inclusive?`${l.maximum} ${p?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${p?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let m=l.inclusive?"<=":"<",f=i(l.origin??"value");return p?.unit?`${p.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.maximum.toString()} ${p.unit}`:`${p?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.maximum.toString()}`}case"too_small":{let p=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${p?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${p?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(l.origin==="array"||l.origin==="set"){let h=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let b=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let _=l.inclusive?`${l.minimum} ${p?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${p?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${_}`.trim()}let m=l.inclusive?">=":">",f=i(l.origin??"value");return p?.unit?`${p.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.minimum.toString()} ${p.unit}`:`${p?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${m}${l.minimum.toString()}`}case"invalid_format":{let p=l;if(p.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${p.prefix}"`;if(p.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${p.suffix}"`;if(p.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${p.includes}"`;if(p.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 ${p.pattern}`;let d=s[p.format],m=d?.label??p.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${m} \u05DC\u05D0 ${h}`}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"}: ${y(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 Vf(){return{localeError:Nk()}}var Rk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${w(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} 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"}: ${y(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 Wf(){return{localeError:Rk()}}var jk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${w(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 Hf(){return{localeError:jk()}}function Jf(e,t,r){return Math.abs(e)===1?t:r}function un(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 Dk=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Jf(s,a.unit.one,a.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 ${un(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${c}`}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 ${un(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Jf(s,a.unit.one,a.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 ${un(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${c}`}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 ${un(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":""}. ${y(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${un(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 ${un(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Yf(){return{localeError:Dk()}}var Lk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${w(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 qf(){return{localeError:Lk()}}var zk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${w(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.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"}: ${y(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 Xf(){return{localeError:zk()}}var Mk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${w(n.values[0])}`:`Opzione non valida: atteso uno tra ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.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"}: ${y(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 Qf(){return{localeError:Mk()}}var Uk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${w(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${y(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",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.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",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.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":""}: ${y(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 eh(){return{localeError:Uk()}}var Fk=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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"} ${a.verb} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\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} ${a.verb} ${i}${n.minimum.toString()} ${a.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"}: ${y(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function th(){return{localeError:Fk()}}var Gk=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.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 ${y(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 Lo(){return{localeError:Gk()}}function nh(){return Lo()}var Zk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${w(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${y(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}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: ${y(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 rh(){return{localeError:Zk()}}var br=e=>e.charAt(0).toUpperCase()+e.slice(1);function oh(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 Bk=()=>{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,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${w(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${y(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,a=t(n.origin,oh(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${br(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${br(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,a=t(n.origin,oh(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${br(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${br(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.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"}: ${y(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`${br(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function ih(){return{localeError:Bk()}}var Kk=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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"}: ${y(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 ah(){return{localeError:Kk()}}var Vk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${w(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.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: ${y(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 sh(){return{localeError:Vk()}}var Wk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${w(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: 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":""}: ${y(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 ch(){return{localeError:Wk()}}var Hk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${w(n.values[0])}`:`Ugyldig valg: forventet en av ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.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"}: ${y(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 lh(){return{localeError:Hk()}}var Jk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${w(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 uh(){return{localeError:Jk()}}var Yk=()=>{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,a=k(n.input),s=o[a]??a;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 ${s} \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 ${s} \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 ${w(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${y(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.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"}: ${y(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 dh(){return{localeError:Yk()}}var qk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${w(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 ph(){return{localeError:qk()}}var Xk=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${w(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 mh(){return{localeError:Xk()}}var Qk=()=>{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,a=k(n.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${w(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.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: ${y(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 fh(){return{localeError:Qk()}}function hh(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var ex=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=hh(s,a.unit.one,a.unit.few,a.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()} ${c}`}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?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=hh(s,a.unit.one,a.unit.few,a.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()} ${c}`}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":""}: ${y(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 gh(){return{localeError:ex()}}var tx=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${w(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.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"}: ${y(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 yh(){return{localeError:tx()}}var nx=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${w(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.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"}: ${y(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 vh(){return{localeError:nx()}}var rx=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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()} ${a.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?">=":">",a=t(n.origin);return a?`\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()} ${a.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":""}: ${y(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 _h(){return{localeError:rx()}}var ox=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.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",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.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: ${y(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 bh(){return{localeError:ox()}}var ix=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${w(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 wh(){return{localeError:ix()}}var ax=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\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 ${s}`}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 ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\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"} ${a.verb} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\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} ${a.verb} ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 zo(){return{localeError:ax()}}function kh(){return zo()}var sx=()=>{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,a=k(n.input),s=o[a]??a;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 ${s} \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 ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${w(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${y(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?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.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":""}: ${y(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 xh(){return{localeError:sx()}}var cx=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${w(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.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":""}: ${y(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 Sh(){return{localeError:cx()}}var lx=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${w(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 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.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: ${y(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 $h(){return{localeError:lx()}}var ux=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${w(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.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): ${y(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 Eh(){return{localeError:ux()}}var dx=()=>{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,a=k(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${w(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.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?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.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${y(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 Th(){return{localeError:dx()}}var px=()=>{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,a=k(n.input),s=o[a]??a;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 ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${w(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${y(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.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?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.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: ${y(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 Ah(){return{localeError:px()}}var Ih,wl=Symbol("ZodOutput"),kl=Symbol("ZodInput"),Mo=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 Uo(){return new Mo}(Ih=globalThis).__zod_globalRegistry??(Ih.__zod_globalRegistry=Uo());var re=globalThis.__zod_globalRegistry;function xl(e,t){return new e({type:"string",...$(t)})}function Sl(e,t){return new e({type:"string",coerce:!0,...$(t)})}function Fo(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...$(t)})}function kr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...$(t)})}function Go(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...$(t)})}function Zo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...$(t)})}function Bo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...$(t)})}function Ko(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...$(t)})}function xr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...$(t)})}function Vo(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...$(t)})}function Wo(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...$(t)})}function Ho(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...$(t)})}function Jo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...$(t)})}function Yo(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...$(t)})}function qo(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...$(t)})}function Xo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...$(t)})}function Qo(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...$(t)})}function ei(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...$(t)})}function $l(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...$(t)})}function ti(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...$(t)})}function ni(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...$(t)})}function ri(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...$(t)})}function oi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...$(t)})}function ii(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...$(t)})}function ai(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...$(t)})}var El={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Tl(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...$(t)})}function Al(e,t){return new e({type:"string",format:"date",check:"string_format",...$(t)})}function Il(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...$(t)})}function Cl(e,t){return new e({type:"string",format:"duration",check:"string_format",...$(t)})}function Pl(e,t){return new e({type:"number",checks:[],...$(t)})}function Ol(e,t){return new e({type:"number",coerce:!0,checks:[],...$(t)})}function Nl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...$(t)})}function Rl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...$(t)})}function jl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...$(t)})}function Dl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...$(t)})}function Ll(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...$(t)})}function zl(e,t){return new e({type:"boolean",...$(t)})}function Ml(e,t){return new e({type:"boolean",coerce:!0,...$(t)})}function Ul(e,t){return new e({type:"bigint",...$(t)})}function Fl(e,t){return new e({type:"bigint",coerce:!0,...$(t)})}function Gl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...$(t)})}function Zl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...$(t)})}function Bl(e,t){return new e({type:"symbol",...$(t)})}function Kl(e,t){return new e({type:"undefined",...$(t)})}function Vl(e,t){return new e({type:"null",...$(t)})}function Wl(e){return new e({type:"any"})}function Hl(e){return new e({type:"unknown"})}function Jl(e,t){return new e({type:"never",...$(t)})}function Yl(e,t){return new e({type:"void",...$(t)})}function ql(e,t){return new e({type:"date",...$(t)})}function Xl(e,t){return new e({type:"date",coerce:!0,...$(t)})}function Ql(e,t){return new e({type:"nan",...$(t)})}function De(e,t){return new $o({check:"less_than",...$(t),value:e,inclusive:!1})}function Se(e,t){return new $o({check:"less_than",...$(t),value:e,inclusive:!0})}function Le(e,t){return new Eo({check:"greater_than",...$(t),value:e,inclusive:!1})}function de(e,t){return new Eo({check:"greater_than",...$(t),value:e,inclusive:!0})}function si(e){return Le(0,e)}function ci(e){return De(0,e)}function li(e){return Se(0,e)}function ui(e){return de(0,e)}function pt(e,t){return new Vs({check:"multiple_of",...$(t),value:e})}function mt(e,t){return new Js({check:"max_size",...$(t),maximum:e})}function ze(e,t){return new Ys({check:"min_size",...$(t),minimum:e})}function Nt(e,t){return new qs({check:"size_equals",...$(t),size:e})}function Rt(e,t){return new Xs({check:"max_length",...$(t),maximum:e})}function Je(e,t){return new Qs({check:"min_length",...$(t),minimum:e})}function jt(e,t){return new ec({check:"length_equals",...$(t),length:e})}function dn(e,t){return new tc({check:"string_format",format:"regex",...$(t),pattern:e})}function pn(e){return new nc({check:"string_format",format:"lowercase",...$(e)})}function mn(e){return new rc({check:"string_format",format:"uppercase",...$(e)})}function fn(e,t){return new oc({check:"string_format",format:"includes",...$(t),includes:e})}function hn(e,t){return new ic({check:"string_format",format:"starts_with",...$(t),prefix:e})}function gn(e,t){return new ac({check:"string_format",format:"ends_with",...$(t),suffix:e})}function di(e,t,r){return new sc({check:"property",property:e,schema:t,...$(r)})}function yn(e,t){return new cc({check:"mime_type",mime:e,...$(t)})}function Ne(e){return new lc({check:"overwrite",tx:e})}function vn(e){return Ne(t=>t.normalize(e))}function _n(){return Ne(e=>e.trim())}function bn(){return Ne(e=>e.toLowerCase())}function wn(){return Ne(e=>e.toUpperCase())}function kn(){return Ne(e=>is(e))}function eu(e,t,r){return new e({type:"array",element:t,...$(r)})}function fx(e,t,r){return new e({type:"union",options:t,...$(r)})}function hx(e,t,r){return new e({type:"union",options:t,inclusive:!1,...$(r)})}function gx(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...$(o)})}function yx(e,t,r){return new e({type:"intersection",left:t,right:r})}function vx(e,t,r,o){let n=r instanceof L,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...$(i)})}function _x(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...$(o)})}function bx(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...$(o)})}function wx(e,t,r){return new e({type:"set",valueType:t,...$(r)})}function kx(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...$(r)})}function xx(e,t,r){return new e({type:"enum",entries:t,...$(r)})}function Sx(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...$(r)})}function tu(e,t){return new e({type:"file",...$(t)})}function $x(e,t){return new e({type:"transform",transform:t})}function Ex(e,t){return new e({type:"optional",innerType:t})}function Tx(e,t){return new e({type:"nullable",innerType:t})}function Ax(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():ss(r)}})}function Ix(e,t,r){return new e({type:"nonoptional",innerType:t,...$(r)})}function Cx(e,t){return new e({type:"success",innerType:t})}function Px(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function Ox(e,t,r){return new e({type:"pipe",in:t,out:r})}function Nx(e,t){return new e({type:"readonly",innerType:t})}function Rx(e,t,r){return new e({type:"template_literal",parts:t,...$(r)})}function jx(e,t){return new e({type:"lazy",getter:t})}function Dx(e,t){return new e({type:"promise",innerType:t})}function nu(e,t,r){let o=$(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function ru(e,t,r){return new e({type:"custom",check:"custom",fn:t,...$(r)})}function ou(e,t){let r=Ch(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(rn(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(rn(i))}},e(o.value,o)),t);return r}function Ch(e,t){let r=new V({check:"custom",...$(t)});return r._zod.check=e,r}function iu(e){let t=new V({check:"describe"});return t._zod.onattach=[r=>{let o=re.get(r)??{};re.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function au(e){let t=new V({check:"meta"});return t._zod.onattach=[r=>{let o=re.get(r)??{};re.add(r,{...o,...e})}],t._zod.check=()=>{},t}function su(e,t){let r=$(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(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let i=new Set(o),a=new Set(n),s=e.Codec??_r,c=e.Boolean??yr,l=e.String??Ot,p=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),m=new s({type:"pipe",in:p,out:d,transform:((f,h)=>{let _=f;return r.case!=="sensitive"&&(_=_.toLowerCase()),i.has(_)?!0:a.has(_)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:h.value,inst:m,continue:!1}),{})}),reverseTransform:((f,h)=>f===!0?o[0]||"true":n[0]||"false"),error:r.error});return m}function xn(e,t,r,o={}){let n=$(o),i={...$(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function ft(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??re,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 Z(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 a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let p={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,p);else{let m=a.schema,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,m,p)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),Z(d,t,p),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&pe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function ht(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 a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,m=e.external.uri??(h=>h);if(d)return{ref:m(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${m("__shared")}#/${s}/${f}`}}if(a[1]===r)return{ref:"#"};let l=`#/${s}/`,p=a[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+p}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=n(a);s.def={...s.schema},l&&(s.defId=l);let p=s.schema;for(let d in p)delete p[d];p.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
7117
+
7118
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function gt(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,p={...l},d=c.ref;if(c.ref=null,d){o(d);let f=e.seen.get(d),h=f.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,p),s._zod.parent===d)for(let b in l)b==="$ref"||b==="allOf"||b in p||delete l[b];if(h.$ref&&f.def)for(let b in l)b==="$ref"||b==="allOf"||b in f.def&&JSON.stringify(l[b])===JSON.stringify(f.def[b])&&delete l[b]}let m=s._zod.parent;if(m&&m!==d){o(m);let f=e.seen.get(m);if(f?.schema.$ref&&(l.$ref=f.schema.$ref,f.def))for(let h in l)h==="$ref"||h==="allOf"||h in f.def&&JSON.stringify(l[h])===JSON.stringify(f.def[h])&&delete l[h]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Sn(t,"input",e.processors),output:Sn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function pe(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 pe(o.element,r);if(o.type==="set")return pe(o.valueType,r);if(o.type==="lazy")return pe(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 pe(o.innerType,r);if(o.type==="intersection")return pe(o.left,r)||pe(o.right,r);if(o.type==="record"||o.type==="map")return pe(o.keyType,r)||pe(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:pe(o.in,r)||pe(o.out,r);if(o.type==="object"){for(let n in o.shape)if(pe(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(pe(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(pe(n,r))return!0;return!!(o.rest&&pe(o.rest,r))}return!1}var cu=(e,t={})=>r=>{let o=ft({...r,processors:t});return Z(e,o),ht(o,e),gt(o,e)},Sn=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=ft({...n??{},target:i,io:t,processors:r});return Z(e,a),ht(a,e),gt(a,e)};var Lx={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},lu=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=Lx[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let p=[...c];p.length===1?n.pattern=p[0].source:p.length>1&&(n.allOf=[...p.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},uu=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:p}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";let d=typeof p=="number"&&p>=(i??Number.NEGATIVE_INFINITY),m=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";d?f?(n.minimum=p,n.exclusiveMinimum=!0):n.exclusiveMinimum=p:typeof i=="number"&&(n.minimum=i),m?f?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},du=(e,t,r,o)=>{r.type="boolean"},pu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},mu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},fu=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},hu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},gu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},yu=(e,t,r,o)=>{r.not={}},vu=(e,t,r,o)=>{},_u=(e,t,r,o)=>{},bu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},wu=(e,t,r,o)=>{let n=e._zod.def,i=ar(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},ku=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},xu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Su=(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},$u=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(n,i)},Eu=(e,t,r,o)=>{r.type="boolean"},Tu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Au=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Iu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Cu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Pu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Ou=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=Z(i.element,t,{...o,path:[...o.path,"items"]})},Nu=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let l in a)n.properties[l]=Z(a[l],t,{...o,path:[...o.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let p=i.shape[l]._zod;return t.io==="input"?p.optin===void 0:p.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=Z(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},mi=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>Z(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},Ru=(e,t,r,o)=>{let n=e._zod.def,i=Z(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=Z(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},ju=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((m,f)=>Z(m,t,{...o,path:[...o.path,a,f]})),l=i.rest?Z(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),n.minItems=c.length,l||(n.maxItems=c.length)):(n.items=c,l&&(n.additionalItems=l));let{minimum:p,maximum:d}=e._zod.bag;typeof p=="number"&&(n.minItems=p),typeof d=="number"&&(n.maxItems=d)},Du=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let p=Z(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)n.patternProperties[d.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=Z(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=Z(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let l=a._zod.values;if(l){let p=[...l].filter(d=>typeof d=="string"||typeof d=="number");p.length>0&&(n.required=p)}},Lu=(e,t,r,o)=>{let n=e._zod.def,i=Z(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},zu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Mu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Uu=(e,t,r,o)=>{let n=e._zod.def;Z(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)))},Fu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Gu=(e,t,r,o)=>{let n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?n.out:n.in:n.out;Z(a,t,o);let s=t.seen.get(e);s.ref=a},Zu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},Bu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},fi=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Ku=(e,t,r,o)=>{let n=e._zod.innerType;Z(n,t,o);let i=t.seen.get(e);i.ref=n},pi={string:lu,number:uu,boolean:du,bigint:pu,symbol:mu,null:fu,undefined:hu,void:gu,never:yu,any:vu,unknown:_u,date:bu,enum:wu,literal:ku,nan:xu,template_literal:Su,file:$u,success:Eu,custom:Tu,function:Au,transform:Iu,map:Cu,set:Pu,array:Ou,object:Nu,union:mi,intersection:Ru,tuple:ju,record:Du,nullable:Lu,nonoptional:zu,default:Mu,prefault:Uu,catch:Fu,pipe:Gu,readonly:Zu,promise:Bu,optional:fi,lazy:Ku};function hi(e,t){if("_idmap"in e){let o=e,n=ft({...t,processors:pi}),i={};for(let c of o._idmap.entries()){let[l,p]=c;Z(p,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let c of o._idmap.entries()){let[l,p]=c;ht(n,p),a[l]=gt(n,p)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let r=ft({...t,processors:pi});return Z(e,r),ht(r,e),gt(r,e)}var gi=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=ft({processors:pi,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 Z(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)),ht(this.ctx,t);let o=gt(this.ctx,t),{"~standard":n,...i}=o;return i}};var Ph={};var Sr={};Ke(Sr,{ZodAny:()=>hd,ZodArray:()=>_d,ZodBase64:()=>Li,ZodBase64URL:()=>zi,ZodBigInt:()=>On,ZodBigIntFormat:()=>Fi,ZodBoolean:()=>Pn,ZodCIDRv4:()=>ji,ZodCIDRv6:()=>Di,ZodCUID:()=>Ai,ZodCUID2:()=>Ii,ZodCatch:()=>Fd,ZodCodec:()=>Dr,ZodCustom:()=>Lr,ZodCustomStringFormat:()=>In,ZodDate:()=>Pr,ZodDefault:()=>jd,ZodDiscriminatedUnion:()=>wd,ZodE164:()=>Mi,ZodEmail:()=>$i,ZodEmoji:()=>Ei,ZodEnum:()=>Tn,ZodExactOptional:()=>Od,ZodFile:()=>Cd,ZodFunction:()=>qd,ZodGUID:()=>Er,ZodIPv4:()=>Ni,ZodIPv6:()=>Ri,ZodIntersection:()=>kd,ZodJWT:()=>Ui,ZodKSUID:()=>Oi,ZodLazy:()=>Hd,ZodLiteral:()=>Id,ZodMAC:()=>cd,ZodMap:()=>Td,ZodNaN:()=>Zd,ZodNanoID:()=>Ti,ZodNever:()=>yd,ZodNonOptional:()=>Wi,ZodNull:()=>md,ZodNullable:()=>Rd,ZodNumber:()=>Cn,ZodNumberFormat:()=>Lt,ZodObject:()=>Nr,ZodOptional:()=>Vi,ZodPipe:()=>jr,ZodPrefault:()=>Ld,ZodPreprocess:()=>Bd,ZodPromise:()=>Yd,ZodReadonly:()=>Kd,ZodRecord:()=>En,ZodSet:()=>Ad,ZodString:()=>An,ZodStringFormat:()=>K,ZodSuccess:()=>Ud,ZodSymbol:()=>dd,ZodTemplateLiteral:()=>Wd,ZodTransform:()=>Pd,ZodTuple:()=>Sd,ZodType:()=>M,ZodULID:()=>Ci,ZodURL:()=>Cr,ZodUUID:()=>Me,ZodUndefined:()=>pd,ZodUnion:()=>Rr,ZodUnknown:()=>gd,ZodVoid:()=>vd,ZodXID:()=>Pi,ZodXor:()=>bd,_ZodString:()=>Si,_default:()=>Dd,_function:()=>Ug,any:()=>yg,array:()=>Or,base64:()=>eg,base64url:()=>tg,bigint:()=>pg,boolean:()=>ud,catch:()=>Gd,check:()=>Fg,cidrv4:()=>Xh,cidrv6:()=>Qh,codec:()=>Dg,cuid:()=>Bh,cuid2:()=>Kh,custom:()=>Gg,date:()=>_g,describe:()=>Zg,discriminatedUnion:()=>$g,e164:()=>ng,email:()=>Rh,emoji:()=>Gh,enum:()=>Bi,exactOptional:()=>Nd,file:()=>Og,float32:()=>cg,float64:()=>lg,function:()=>Ug,guid:()=>jh,hash:()=>sg,hex:()=>ag,hostname:()=>ig,httpUrl:()=>Fh,instanceof:()=>Kg,int:()=>ki,int32:()=>ug,int64:()=>mg,intersection:()=>xd,invertCodec:()=>Lg,ipv4:()=>Jh,ipv6:()=>qh,json:()=>Wg,jwt:()=>rg,keyof:()=>bg,ksuid:()=>Hh,lazy:()=>Jd,literal:()=>Pg,looseObject:()=>xg,looseRecord:()=>Tg,mac:()=>Yh,map:()=>Ag,meta:()=>Bg,nan:()=>jg,nanoid:()=>Zh,nativeEnum:()=>Cg,never:()=>Gi,nonoptional:()=>Md,null:()=>fd,nullable:()=>Ar,nullish:()=>Ng,number:()=>ld,object:()=>wg,optional:()=>Tr,partialRecord:()=>Eg,pipe:()=>xi,prefault:()=>zd,preprocess:()=>Hg,promise:()=>Mg,readonly:()=>Vd,record:()=>Ed,refine:()=>Xd,set:()=>Ig,strictObject:()=>kg,string:()=>$r,stringFormat:()=>og,stringbool:()=>Vg,success:()=>Rg,superRefine:()=>Qd,symbol:()=>hg,templateLiteral:()=>zg,transform:()=>Ki,tuple:()=>$d,uint32:()=>dg,uint64:()=>fg,ulid:()=>Vh,undefined:()=>gg,union:()=>Zi,unknown:()=>Dt,url:()=>Uh,uuid:()=>Dh,uuidv4:()=>Lh,uuidv6:()=>zh,uuidv7:()=>Mh,void:()=>vg,xid:()=>Wh,xor:()=>Sg});var yi={};Ke(yi,{endsWith:()=>gn,gt:()=>Le,gte:()=>de,includes:()=>fn,length:()=>jt,lowercase:()=>pn,lt:()=>De,lte:()=>Se,maxLength:()=>Rt,maxSize:()=>mt,mime:()=>yn,minLength:()=>Je,minSize:()=>ze,multipleOf:()=>pt,negative:()=>ci,nonnegative:()=>ui,nonpositive:()=>li,normalize:()=>vn,overwrite:()=>Ne,positive:()=>si,property:()=>di,regex:()=>dn,size:()=>Nt,slugify:()=>kn,startsWith:()=>hn,toLowerCase:()=>bn,toUpperCase:()=>wn,trim:()=>_n,uppercase:()=>mn});var $n={};Ke($n,{ZodISODate:()=>_i,ZodISODateTime:()=>vi,ZodISODuration:()=>wi,ZodISOTime:()=>bi,date:()=>Wu,datetime:()=>Vu,duration:()=>Ju,time:()=>Hu});var vi=g("ZodISODateTime",(e,t)=>{xc.init(e,t),K.init(e,t)});function Vu(e){return Tl(vi,e)}var _i=g("ZodISODate",(e,t)=>{Sc.init(e,t),K.init(e,t)});function Wu(e){return Al(_i,e)}var bi=g("ZodISOTime",(e,t)=>{$c.init(e,t),K.init(e,t)});function Hu(e){return Il(bi,e)}var wi=g("ZodISODuration",(e,t)=>{Ec.init(e,t),K.init(e,t)});function Ju(e){return Cl(wi,e)}var Oh=(e,t)=>{dr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>mr(e,r)},flatten:{value:r=>pr(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,tn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,tn,2)}},isEmpty:{get(){return e.issues.length===0}}})},Mx=g("ZodError",Oh),ge=g("ZodError",Oh,{Parent:Error});var Yu=on(ge),qu=an(ge),Xu=sn(ge),Qu=cn(ge),ed=ho(ge),td=go(ge),nd=yo(ge),rd=vo(ge),od=_o(ge),id=bo(ge),ad=wo(ge),sd=ko(ge);var Nh=new WeakMap;function Ir(e,t,r){let o=Object.getPrototypeOf(e),n=Nh.get(o);if(n||(n=new Set,Nh.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let a=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var M=g("ZodType",(e,t)=>(L.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Sn(e,"input"),output:Sn(e,"output")}}),e.toJSONSchema=cu(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>Yu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Xu(e,r,o),e.parseAsync=async(r,o)=>qu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Qu(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>ed(e,r,o),e.decode=(r,o)=>td(e,r,o),e.encodeAsync=async(r,o)=>nd(e,r,o),e.decodeAsync=async(r,o)=>rd(e,r,o),e.safeEncode=(r,o)=>od(e,r,o),e.safeDecode=(r,o)=>id(e,r,o),e.safeEncodeAsync=async(r,o)=>ad(e,r,o),e.safeDecodeAsync=async(r,o)=>sd(e,r,o),Ir(e,"ZodType",{check(...r){let o=this.def;return this.clone(x.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 le(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(Xd(r,o))},superRefine(r,o){return this.check(Qd(r,o))},overwrite(r){return this.check(Ne(r))},optional(){return Tr(this)},exactOptional(){return Nd(this)},nullable(){return Ar(this)},nullish(){return Tr(Ar(this))},nonoptional(r){return Md(this,r)},array(){return Or(this)},or(r){return Zi([this,r])},and(r){return xd(this,r)},transform(r){return xi(this,Ki(r))},default(r){return Dd(this,r)},prefault(r){return zd(this,r)},catch(r){return Gd(this,r)},pipe(r){return xi(this,r)},readonly(){return Vd(this)},describe(r){let o=this.clone();return re.add(o,{description:r}),o},meta(...r){if(r.length===0)return re.get(this);let o=this.clone();return re.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 re.get(e)?.description},configurable:!0}),e)),Si=g("_ZodString",(e,t)=>{Ot.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>lu(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ir(e,"_ZodString",{regex(...o){return this.check(dn(...o))},includes(...o){return this.check(fn(...o))},startsWith(...o){return this.check(hn(...o))},endsWith(...o){return this.check(gn(...o))},min(...o){return this.check(Je(...o))},max(...o){return this.check(Rt(...o))},length(...o){return this.check(jt(...o))},nonempty(...o){return this.check(Je(1,...o))},lowercase(o){return this.check(pn(o))},uppercase(o){return this.check(mn(o))},trim(){return this.check(_n())},normalize(...o){return this.check(vn(...o))},toLowerCase(){return this.check(bn())},toUpperCase(){return this.check(wn())},slugify(){return this.check(kn())}})}),An=g("ZodString",(e,t)=>{Ot.init(e,t),Si.init(e,t),e.email=r=>e.check(Fo($i,r)),e.url=r=>e.check(xr(Cr,r)),e.jwt=r=>e.check(ai(Ui,r)),e.emoji=r=>e.check(Vo(Ei,r)),e.guid=r=>e.check(kr(Er,r)),e.uuid=r=>e.check(Go(Me,r)),e.uuidv4=r=>e.check(Zo(Me,r)),e.uuidv6=r=>e.check(Bo(Me,r)),e.uuidv7=r=>e.check(Ko(Me,r)),e.nanoid=r=>e.check(Wo(Ti,r)),e.guid=r=>e.check(kr(Er,r)),e.cuid=r=>e.check(Ho(Ai,r)),e.cuid2=r=>e.check(Jo(Ii,r)),e.ulid=r=>e.check(Yo(Ci,r)),e.base64=r=>e.check(ri(Li,r)),e.base64url=r=>e.check(oi(zi,r)),e.xid=r=>e.check(qo(Pi,r)),e.ksuid=r=>e.check(Xo(Oi,r)),e.ipv4=r=>e.check(Qo(Ni,r)),e.ipv6=r=>e.check(ei(Ri,r)),e.cidrv4=r=>e.check(ti(ji,r)),e.cidrv6=r=>e.check(ni(Di,r)),e.e164=r=>e.check(ii(Mi,r)),e.datetime=r=>e.check(Vu(r)),e.date=r=>e.check(Wu(r)),e.time=r=>e.check(Hu(r)),e.duration=r=>e.check(Ju(r))});function $r(e){return xl(An,e)}var K=g("ZodStringFormat",(e,t)=>{B.init(e,t),Si.init(e,t)}),$i=g("ZodEmail",(e,t)=>{fc.init(e,t),K.init(e,t)});function Rh(e){return Fo($i,e)}var Er=g("ZodGUID",(e,t)=>{pc.init(e,t),K.init(e,t)});function jh(e){return kr(Er,e)}var Me=g("ZodUUID",(e,t)=>{mc.init(e,t),K.init(e,t)});function Dh(e){return Go(Me,e)}function Lh(e){return Zo(Me,e)}function zh(e){return Bo(Me,e)}function Mh(e){return Ko(Me,e)}var Cr=g("ZodURL",(e,t)=>{hc.init(e,t),K.init(e,t)});function Uh(e){return xr(Cr,e)}function Fh(e){return xr(Cr,{protocol:xe.httpProtocol,hostname:xe.domain,...x.normalizeParams(e)})}var Ei=g("ZodEmoji",(e,t)=>{gc.init(e,t),K.init(e,t)});function Gh(e){return Vo(Ei,e)}var Ti=g("ZodNanoID",(e,t)=>{yc.init(e,t),K.init(e,t)});function Zh(e){return Wo(Ti,e)}var Ai=g("ZodCUID",(e,t)=>{vc.init(e,t),K.init(e,t)});function Bh(e){return Ho(Ai,e)}var Ii=g("ZodCUID2",(e,t)=>{_c.init(e,t),K.init(e,t)});function Kh(e){return Jo(Ii,e)}var Ci=g("ZodULID",(e,t)=>{bc.init(e,t),K.init(e,t)});function Vh(e){return Yo(Ci,e)}var Pi=g("ZodXID",(e,t)=>{wc.init(e,t),K.init(e,t)});function Wh(e){return qo(Pi,e)}var Oi=g("ZodKSUID",(e,t)=>{kc.init(e,t),K.init(e,t)});function Hh(e){return Xo(Oi,e)}var Ni=g("ZodIPv4",(e,t)=>{Tc.init(e,t),K.init(e,t)});function Jh(e){return Qo(Ni,e)}var cd=g("ZodMAC",(e,t)=>{Ic.init(e,t),K.init(e,t)});function Yh(e){return $l(cd,e)}var Ri=g("ZodIPv6",(e,t)=>{Ac.init(e,t),K.init(e,t)});function qh(e){return ei(Ri,e)}var ji=g("ZodCIDRv4",(e,t)=>{Cc.init(e,t),K.init(e,t)});function Xh(e){return ti(ji,e)}var Di=g("ZodCIDRv6",(e,t)=>{Pc.init(e,t),K.init(e,t)});function Qh(e){return ni(Di,e)}var Li=g("ZodBase64",(e,t)=>{Nc.init(e,t),K.init(e,t)});function eg(e){return ri(Li,e)}var zi=g("ZodBase64URL",(e,t)=>{Rc.init(e,t),K.init(e,t)});function tg(e){return oi(zi,e)}var Mi=g("ZodE164",(e,t)=>{jc.init(e,t),K.init(e,t)});function ng(e){return ii(Mi,e)}var Ui=g("ZodJWT",(e,t)=>{Dc.init(e,t),K.init(e,t)});function rg(e){return ai(Ui,e)}var In=g("ZodCustomStringFormat",(e,t)=>{Lc.init(e,t),K.init(e,t)});function og(e,t,r={}){return xn(In,e,t,r)}function ig(e){return xn(In,"hostname",xe.hostname,e)}function ag(e){return xn(In,"hex",xe.hex,e)}function sg(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=xe[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return xn(In,o,n,t)}var Cn=g("ZodNumber",(e,t)=>{Po.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>uu(e,o,n,i),Ir(e,"ZodNumber",{gt(o,n){return this.check(Le(o,n))},gte(o,n){return this.check(de(o,n))},min(o,n){return this.check(de(o,n))},lt(o,n){return this.check(De(o,n))},lte(o,n){return this.check(Se(o,n))},max(o,n){return this.check(Se(o,n))},int(o){return this.check(ki(o))},safe(o){return this.check(ki(o))},positive(o){return this.check(Le(0,o))},nonnegative(o){return this.check(de(0,o))},negative(o){return this.check(De(0,o))},nonpositive(o){return this.check(Se(0,o))},multipleOf(o,n){return this.check(pt(o,n))},step(o,n){return this.check(pt(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 ld(e){return Pl(Cn,e)}var Lt=g("ZodNumberFormat",(e,t)=>{zc.init(e,t),Cn.init(e,t)});function ki(e){return Nl(Lt,e)}function cg(e){return Rl(Lt,e)}function lg(e){return jl(Lt,e)}function ug(e){return Dl(Lt,e)}function dg(e){return Ll(Lt,e)}var Pn=g("ZodBoolean",(e,t)=>{yr.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>du(e,r,o,n)});function ud(e){return zl(Pn,e)}var On=g("ZodBigInt",(e,t)=>{Oo.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>pu(e,o,n,i),e.gte=(o,n)=>e.check(de(o,n)),e.min=(o,n)=>e.check(de(o,n)),e.gt=(o,n)=>e.check(Le(o,n)),e.gte=(o,n)=>e.check(de(o,n)),e.min=(o,n)=>e.check(de(o,n)),e.lt=(o,n)=>e.check(De(o,n)),e.lte=(o,n)=>e.check(Se(o,n)),e.max=(o,n)=>e.check(Se(o,n)),e.positive=o=>e.check(Le(BigInt(0),o)),e.negative=o=>e.check(De(BigInt(0),o)),e.nonpositive=o=>e.check(Se(BigInt(0),o)),e.nonnegative=o=>e.check(de(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(pt(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function pg(e){return Ul(On,e)}var Fi=g("ZodBigIntFormat",(e,t)=>{Mc.init(e,t),On.init(e,t)});function mg(e){return Gl(Fi,e)}function fg(e){return Zl(Fi,e)}var dd=g("ZodSymbol",(e,t)=>{Uc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mu(e,r,o,n)});function hg(e){return Bl(dd,e)}var pd=g("ZodUndefined",(e,t)=>{Fc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hu(e,r,o,n)});function gg(e){return Kl(pd,e)}var md=g("ZodNull",(e,t)=>{Gc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fu(e,r,o,n)});function fd(e){return Vl(md,e)}var hd=g("ZodAny",(e,t)=>{Zc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>vu(e,r,o,n)});function yg(){return Wl(hd)}var gd=g("ZodUnknown",(e,t)=>{Bc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_u(e,r,o,n)});function Dt(){return Hl(gd)}var yd=g("ZodNever",(e,t)=>{Kc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>yu(e,r,o,n)});function Gi(e){return Jl(yd,e)}var vd=g("ZodVoid",(e,t)=>{Vc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>gu(e,r,o,n)});function vg(e){return Yl(vd,e)}var Pr=g("ZodDate",(e,t)=>{Wc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>bu(e,o,n,i),e.min=(o,n)=>e.check(de(o,n)),e.max=(o,n)=>e.check(Se(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 _g(e){return ql(Pr,e)}var _d=g("ZodArray",(e,t)=>{Hc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ou(e,r,o,n),e.element=t.element,Ir(e,"ZodArray",{min(r,o){return this.check(Je(r,o))},nonempty(r){return this.check(Je(1,r))},max(r,o){return this.check(Rt(r,o))},length(r,o){return this.check(jt(r,o))},unwrap(){return this.element}})});function Or(e,t){return eu(_d,e,t)}function bg(e){let t=e._zod.def.shape;return Bi(Object.keys(t))}var Nr=g("ZodObject",(e,t)=>{Jc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nu(e,r,o,n),x.defineLazy(e,"shape",()=>t.shape),Ir(e,"ZodObject",{keyof(){return Bi(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Dt()})},loose(){return this.clone({...this._zod.def,catchall:Dt()})},strict(){return this.clone({...this._zod.def,catchall:Gi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return x.extend(this,r)},safeExtend(r){return x.safeExtend(this,r)},merge(r){return x.merge(this,r)},pick(r){return x.pick(this,r)},omit(r){return x.omit(this,r)},partial(...r){return x.partial(Vi,this,r[0])},required(...r){return x.required(Wi,this,r[0])}})});function wg(e,t){let r={type:"object",shape:e??{},...x.normalizeParams(t)};return new Nr(r)}function kg(e,t){return new Nr({type:"object",shape:e,catchall:Gi(),...x.normalizeParams(t)})}function xg(e,t){return new Nr({type:"object",shape:e,catchall:Dt(),...x.normalizeParams(t)})}var Rr=g("ZodUnion",(e,t)=>{vr.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mi(e,r,o,n),e.options=t.options});function Zi(e,t){return new Rr({type:"union",options:e,...x.normalizeParams(t)})}var bd=g("ZodXor",(e,t)=>{Rr.init(e,t),Yc.init(e,t),e._zod.processJSONSchema=(r,o,n)=>mi(e,r,o,n),e.options=t.options});function Sg(e,t){return new bd({type:"union",options:e,inclusive:!1,...x.normalizeParams(t)})}var wd=g("ZodDiscriminatedUnion",(e,t)=>{Rr.init(e,t),qc.init(e,t)});function $g(e,t,r){return new wd({type:"union",options:t,discriminator:e,...x.normalizeParams(r)})}var kd=g("ZodIntersection",(e,t)=>{Xc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ru(e,r,o,n)});function xd(e,t){return new kd({type:"intersection",left:e,right:t})}var Sd=g("ZodTuple",(e,t)=>{No.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ju(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function $d(e,t,r){let o=t instanceof L,n=o?r:t,i=o?t:null;return new Sd({type:"tuple",items:e,rest:i,...x.normalizeParams(n)})}var En=g("ZodRecord",(e,t)=>{Qc.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Du(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function Ed(e,t,r){return!t||!t._zod?new En({type:"record",keyType:$r(),valueType:e,...x.normalizeParams(t)}):new En({type:"record",keyType:e,valueType:t,...x.normalizeParams(r)})}function Eg(e,t,r){let o=le(e);return o._zod.values=void 0,new En({type:"record",keyType:o,valueType:t,...x.normalizeParams(r)})}function Tg(e,t,r){return new En({type:"record",keyType:e,valueType:t,mode:"loose",...x.normalizeParams(r)})}var Td=g("ZodMap",(e,t)=>{el.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cu(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ze(...r)),e.nonempty=r=>e.check(ze(1,r)),e.max=(...r)=>e.check(mt(...r)),e.size=(...r)=>e.check(Nt(...r))});function Ag(e,t,r){return new Td({type:"map",keyType:e,valueType:t,...x.normalizeParams(r)})}var Ad=g("ZodSet",(e,t)=>{tl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pu(e,r,o,n),e.min=(...r)=>e.check(ze(...r)),e.nonempty=r=>e.check(ze(1,r)),e.max=(...r)=>e.check(mt(...r)),e.size=(...r)=>e.check(Nt(...r))});function Ig(e,t){return new Ad({type:"set",valueType:e,...x.normalizeParams(t)})}var Tn=g("ZodEnum",(e,t)=>{nl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(o,n,i)=>wu(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 a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Tn({...t,checks:[],...x.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Tn({...t,checks:[],...x.normalizeParams(n),entries:i})}});function Bi(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Tn({type:"enum",entries:r,...x.normalizeParams(t)})}function Cg(e,t){return new Tn({type:"enum",entries:e,...x.normalizeParams(t)})}var Id=g("ZodLiteral",(e,t)=>{rl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ku(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 Pg(e,t){return new Id({type:"literal",values:Array.isArray(e)?e:[e],...x.normalizeParams(t)})}var Cd=g("ZodFile",(e,t)=>{ol.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$u(e,r,o,n),e.min=(r,o)=>e.check(ze(r,o)),e.max=(r,o)=>e.check(mt(r,o)),e.mime=(r,o)=>e.check(yn(Array.isArray(r)?r:[r],o))});function Og(e){return tu(Cd,e)}var Pd=g("ZodTransform",(e,t)=>{il.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Iu(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new st(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(x.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(x.issue(a))}};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 Ki(e){return new Pd({type:"transform",transform:e})}var Vi=g("ZodOptional",(e,t)=>{Ro.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fi(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Tr(e){return new Vi({type:"optional",innerType:e})}var Od=g("ZodExactOptional",(e,t)=>{al.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fi(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Nd(e){return new Od({type:"optional",innerType:e})}var Rd=g("ZodNullable",(e,t)=>{sl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ar(e){return new Rd({type:"nullable",innerType:e})}function Ng(e){return Tr(Ar(e))}var jd=g("ZodDefault",(e,t)=>{cl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Dd(e,t){return new jd({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():x.shallowClone(t)}})}var Ld=g("ZodPrefault",(e,t)=>{ll.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Uu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function zd(e,t){return new Ld({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():x.shallowClone(t)}})}var Wi=g("ZodNonOptional",(e,t)=>{ul.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Md(e,t){return new Wi({type:"nonoptional",innerType:e,...x.normalizeParams(t)})}var Ud=g("ZodSuccess",(e,t)=>{dl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Eu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Rg(e){return new Ud({type:"success",innerType:e})}var Fd=g("ZodCatch",(e,t)=>{pl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Gd(e,t){return new Fd({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Zd=g("ZodNaN",(e,t)=>{ml.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xu(e,r,o,n)});function jg(e){return Ql(Zd,e)}var jr=g("ZodPipe",(e,t)=>{jo.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gu(e,r,o,n),e.in=t.in,e.out=t.out});function xi(e,t){return new jr({type:"pipe",in:e,out:t})}var Dr=g("ZodCodec",(e,t)=>{jr.init(e,t),_r.init(e,t)});function Dg(e,t,r){return new Dr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Lg(e){let t=e._zod.def;return new Dr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Bd=g("ZodPreprocess",(e,t)=>{jr.init(e,t),fl.init(e,t)}),Kd=g("ZodReadonly",(e,t)=>{hl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Vd(e){return new Kd({type:"readonly",innerType:e})}var Wd=g("ZodTemplateLiteral",(e,t)=>{gl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Su(e,r,o,n)});function zg(e,t){return new Wd({type:"template_literal",parts:e,...x.normalizeParams(t)})}var Hd=g("ZodLazy",(e,t)=>{_l.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ku(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function Jd(e){return new Hd({type:"lazy",getter:e})}var Yd=g("ZodPromise",(e,t)=>{vl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Mg(e){return new Yd({type:"promise",innerType:e})}var qd=g("ZodFunction",(e,t)=>{yl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Au(e,r,o,n)});function Ug(e){return new qd({type:"function",input:Array.isArray(e?.input)?$d(e?.input):e?.input??Or(Dt()),output:e?.output??Dt()})}var Lr=g("ZodCustom",(e,t)=>{bl.init(e,t),M.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tu(e,r,o,n)});function Fg(e){let t=new V({check:"custom"});return t._zod.check=e,t}function Gg(e,t){return nu(Lr,e??(()=>!0),t)}function Xd(e,t={}){return ru(Lr,e,t)}function Qd(e,t){return ou(e,t)}var Zg=iu,Bg=au;function Kg(e,t={}){let r=new Lr({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...x.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 Vg=(...e)=>su({Codec:Dr,Boolean:Pn,String:An},...e);function Wg(e){let t=Jd(()=>Zi([$r(e),ld(),ud(),fd(),Or(t),Ed($r(),t)]));return t}function Hg(e,t){return new Bd({type:"pipe",in:Ki(e),out:t})}var Fx={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 Gx(e){J({customError:e})}function Zx(){return J().customError}var ep;ep||(ep={});var T={...Sr,...yi,iso:$n},Bx=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 Kx(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 Vx(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 Jg(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return T.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 T.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=Vx(n,t),a=ie(i,t);return t.refs.set(n,a),t.processing.delete(n),a}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 T.null();if(n.length===0)return T.never();if(n.length===1)return T.literal(n[0]);if(n.every(a=>typeof a=="string"))return T.enum(n);let i=n.map(a=>T.literal(a));return i.length<2?i[0]:T.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return T.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return Jg(a,t)});return n.length===0?T.never():n.length===1?n[0]:T.union(n)}if(!r)return T.any();let o;switch(r){case"string":{let n=T.string();if(e.format){let i=e.format;i==="email"?n=n.check(T.email()):i==="uri"||i==="uri-reference"?n=n.check(T.url()):i==="uuid"||i==="guid"?n=n.check(T.uuid()):i==="date-time"?n=n.check(T.iso.datetime()):i==="date"?n=n.check(T.iso.date()):i==="time"?n=n.check(T.iso.time()):i==="duration"?n=n.check(T.iso.duration()):i==="ipv4"?n=n.check(T.ipv4()):i==="ipv6"?n=n.check(T.ipv6()):i==="mac"?n=n.check(T.mac()):i==="cidr"?n=n.check(T.cidrv4()):i==="cidr-v6"?n=n.check(T.cidrv6()):i==="base64"?n=n.check(T.base64()):i==="base64url"?n=n.check(T.base64url()):i==="e164"?n=n.check(T.e164()):i==="jwt"?n=n.check(T.jwt()):i==="emoji"?n=n.check(T.emoji()):i==="nanoid"?n=n.check(T.nanoid()):i==="cuid"?n=n.check(T.cuid()):i==="cuid2"?n=n.check(T.cuid2()):i==="ulid"?n=n.check(T.ulid()):i==="xid"?n=n.check(T.xid()):i==="ksuid"&&(n=n.check(T.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"?T.number().int():T.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=T.boolean();break}case"null":{o=T.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(i)){let p=ie(l,t);n[c]=a.has(c)?p:p.optional()}if(e.propertyNames){let c=ie(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?ie(e.additionalProperties,t):T.any();if(Object.keys(n).length===0){o=T.record(c,l);break}let p=T.object(n).passthrough(),d=T.looseRecord(c,l);o=T.intersection(p,d);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),p=[];for(let m of l){let f=ie(c[m],t),h=T.string().regex(new RegExp(m));p.push(T.looseRecord(h,f))}let d=[];if(Object.keys(n).length>0&&d.push(T.object(n).passthrough()),d.push(...p),d.length===0)o=T.object({}).passthrough();else if(d.length===1)o=d[0];else{let m=T.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)m=T.intersection(m,d[f]);o=m}break}let s=T.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(ie(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>ie(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?ie(i,t):void 0;s?o=T.tuple(a).rest(s):o=T.tuple(a),typeof e.minItems=="number"&&(o=o.check(T.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(T.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>ie(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?ie(e.additionalItems,t):void 0;s?o=T.tuple(a).rest(s):o=T.tuple(a),typeof e.minItems=="number"&&(o=o.check(T.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(T.maxLength(e.maxItems)))}else if(i!==void 0){let a=ie(i,t),s=T.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=T.array(T.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function ie(e,t){if(typeof e=="boolean")return e?T.any():T.never();let r=Jg(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>ie(l,t)),c=T.union(s);r=o?T.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>ie(l,t)),c=T.xor(s);r=o?T.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:T.any();else{let s=o?r:ie(e.allOf[0],t),c=o?0:1;for(let l=c;l<e.allOf.length;l++)s=T.intersection(s,ie(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=T.nullable(r)),e.readOnly===!0&&(r=T.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))Bx.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function Yg(e,t){if(typeof e=="boolean")return e?T.any():T.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=Kx(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??re};return ie(r,i)}var tp={};Ke(tp,{bigint:()=>Yx,boolean:()=>Jx,date:()=>qx,number:()=>Hx,string:()=>Wx});function Wx(e){return Sl(An,e)}function Hx(e){return Ol(Cn,e)}function Jx(e){return Ml(Pn,e)}function Yx(e){return Fl(On,e)}function qx(e){return Xl(Pr,e)}J(Do());var Xx=[".localhost",".local",".internal",".test",".localdomain"],Qx=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0","[::]"]);function qg(e){let t=e.trim().toLowerCase().replace(/\.$/,"");if(!t)return!1;if(Qx.has(t)||Xx.some(o=>t.endsWith(o))||/^127\./.test(t)||/^10\./.test(t)||/^192\.168\./.test(t)||/^172\.(1[6-9]|2[0-9]|3[01])\./.test(t))return!0;let r=/^\[::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})\]$/.exec(t);if(r){let o=Number.parseInt(r[1],16),n=Number.parseInt(r[2],16),i=`${o>>8}.${o&255}.${n>>8}.${n&255}`;if(i!==t)return qg(i)}return!!(/^169\.254\./.test(t)||/^\[?fe80:/.test(t)||/^\[?f[cd][0-9a-f]{2}:/.test(t))}function Xg(e){let t;try{t=new URL(e)}catch{return"unparseable"}if(qg(t.hostname))return"local";if(t.protocol!=="https:")return"insecure"}var zr=u.discriminatedUnion("source",[u.object({source:u.literal("manifest")}),u.object({source:u.literal("studio"),element_id:u.string().min(1),edition_id:u.string().min(1)})]);var eS=u.object({archetype:u.literal("hunt"),number:u.number().int().positive().default(1),prompt:u.string().default(""),board:u.array(u.string().min(1)).min(2),targets:u.array(u.string().min(1)).min(1),required:u.number().int().positive().optional(),pointsPerTarget:u.number().int().nonnegative().default(10),completionBonus:u.number().int().nonnegative().default(0),attemptsAllowed:u.number().int().positive().default(10),mistakesAllowed:u.number().int().positive().default(4),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.targets.filter(o=>!e.board.includes(o));r.length&&t.addIssue({code:"custom",path:["targets"],message:`Not on the board: ${r.join(", ")}. Every target must be pickable.`}),new Set(e.targets).size!==e.targets.length&&t.addIssue({code:"custom",path:["targets"],message:"The same target twice. Each one counts once."}),e.required!==void 0&&e.required>e.targets.length&&t.addIssue({code:"custom",path:["required"],message:`Asks for ${e.required} of ${e.targets.length} targets, which cannot be reached.`})}),tS=u.object({key:u.string().min(1),label:u.string().min(1),value:u.number().int().nonnegative()}),nS=u.object({id:u.string().min(1),label:u.string().default(""),entries:u.array(tS).min(1)}),rS=u.object({within:u.number().min(0).max(1),label:u.string().min(1)}),oS=[{within:.02,label:"Hall of Fame"},{within:.05,label:"All-NBA"},{within:.1,label:"All-Star"},{within:.18,label:"Starter"},{within:.28,label:"Veteran"}],Qg=u.object({archetype:u.literal("push"),number:u.number().int().positive().default(1),prompt:u.string().default(""),target:u.number().int().positive(),targetLabel:u.string().default(""),slates:u.array(nS).min(1),tiers:u.array(rS).default(oS),floorLabel:u.string().default("Rookie"),bustLabel:u.string().default("Busted"),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=e.slates.map(s=>s.id);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["slates"],message:"Two slates share an id. A play names the slate it picked from."});let o=e.slates.flatMap(s=>s.entries.map(c=>c.key)),n=[...new Set(o.filter((s,c)=>o.indexOf(s)!==c))];n.length&&t.addIssue({code:"custom",path:["slates"],message:`The same key on more than one slate: ${n.join(", ")}. A play names a key, so each one must belong to exactly one slate.`});let i=e.slates.reduce((s,c)=>s+Math.min(...c.entries.map(l=>l.value)),0);i>e.target&&t.addIssue({code:"custom",path:["target"],message:`The lowest possible total is ${i}, which is already over ${e.target}. Every player would bust.`}),e.tiers.every((s,c)=>c===0||s.within>e.tiers[c-1].within)||t.addIssue({code:"custom",path:["tiers"],message:"Tiers must be ordered from closest to furthest. Out of order, the first one that matches is the wrong one and every player is awarded it."})}),iS=u.object({key:u.string().min(1),label:u.string().min(1),members:u.array(u.string().min(1)).min(2)}),aS=u.object({archetype:u.literal("group"),number:u.number().int().positive().default(1),prompt:u.string().default(""),board:u.array(u.string().min(1)).min(4),groups:u.array(iS).min(2),pointsPerGroup:u.number().int().nonnegative().default(10),completionBonus:u.number().int().nonnegative().default(0),attemptsAllowed:u.number().int().positive().default(10),mistakesAllowed:u.number().int().positive().default(4),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{let r=new Map;for(let i of e.groups){let a=i.members.filter(s=>!e.board.includes(s));a.length&&t.addIssue({code:"custom",path:["groups"],message:`${i.key} has members that are not on the board: ${a.join(", ")}.`});for(let s of i.members){let c=r.get(s);c&&c!==i.key&&t.addIssue({code:"custom",path:["groups"],message:`${s} is in both ${c} and ${i.key}. Groups cannot overlap.`}),r.set(s,i.key)}}new Set(e.groups.map(i=>i.key)).size!==e.groups.length&&t.addIssue({code:"custom",path:["groups"],message:"Two groups share a key. Each one needs its own."}),e.groups.length>e.attemptsAllowed&&t.addIssue({code:"custom",path:["attemptsAllowed"],message:`${e.groups.length} groups cannot be found in ${e.attemptsAllowed} attempts.`});let o=new Set(e.groups.flatMap(i=>i.members)),n=e.board.filter(i=>!o.has(i));n.length&&t.addIssue({code:"custom",path:["board"],message:`On the board and in no group: ${n.join(", ")}. Every item needs a group.`})}),sS=u.object({key:u.string().min(1),label:u.string().min(1),points:u.number().int().nonnegative().optional()}),cS=u.object({archetype:u.literal("forecast"),number:u.number().int().positive().default(1),prompt:u.string().default(""),options:u.array(sS).min(2),result:u.string().min(1).optional(),pointsForCorrect:u.number().int().nonnegative().default(10),attemptsAllowed:u.number().int().positive().default(1),open:u.boolean().default(!0),playsPerSecond:u.number().int().positive().optional()}).superRefine((e,t)=>{new Set(e.options.map(r=>r.key)).size!==e.options.length&&t.addIssue({code:"custom",path:["options"],message:"Two options share a key. Each one needs its own."}),e.result!==void 0&&!e.options.some(r=>r.key===e.result)&&t.addIssue({code:"custom",path:["result"],message:`${e.result} is not one of the options, so nobody could have predicted it.`})}),lS=u.discriminatedUnion("archetype",[eS,Qg,aS,cS]),Pe=u.preprocess(Ym,lS);function Nn(e){return`round-${e.number}`}var FN=u.object({game:u.string().min(1),round:Pe,origin:zr.optional(),snapshot:u.string().default(""),source:u.string().optional(),roundId:u.string().min(1).optional(),selection:u.object({mode:u.literal("rotation"),windowSeconds:u.number().int().positive(),rounds:u.array(u.object({id:u.string().min(1),round:Pe,origin:zr.optional()})).min(1)}).optional()}),GN=u.object({roundId:u.string(),version:u.number().int().nonnegative(),changed:u.boolean(),current:u.boolean()});var Hi="1.0",np=u.enum(["missing","proposed","confirmed","verified","approved"]),rp={missing:0,proposed:1,confirmed:2,verified:3,approved:4},op=u.enum(["runtime","live","enterprise"]);var yt=u.enum(["L0","L1","L2","L3","L4","L5"]),Rn={L0:0,L1:1,L2:2,L3:3,L4:4,L5:5},ey={L0:"Concept",L1:"Experience",L2:"Integration",L3:"Deployable",L4:"Production",L5:"Operating"},uS=u.discriminatedUnion("kind",[u.object({kind:u.literal("human_decision"),owner:u.string(),date:u.string(),note:u.string().optional()}),u.object({kind:u.literal("generated_proposal"),tool:u.string(),model:u.string().optional(),source_context:u.string().optional()}),u.object({kind:u.literal("repository_evidence"),file:u.string(),commit:u.string().optional(),package:u.string().optional()}),u.object({kind:u.literal("platform_evidence"),system:u.string(),id:u.string()}),u.object({kind:u.literal("external_evidence"),supplier:u.string(),licence:u.string().optional(),dataset_version:u.string().optional()})]),Ue={status:np.default("missing"),provenance:u.array(uS).default([])},dS=u.object({schema_version:u.string(),revision:u.number().int().nonnegative().default(0),conformance:yt.default("L0")}),pS=u.object({repository:u.string().url(),branch:u.string().default("main")}),mS=u.object({id:u.string().min(1),title:u.string().min(1),summary:u.string().optional(),source:pS.optional(),owners:u.object({ip:u.string().optional(),delivery:u.string().optional(),platform:u.string().optional()}).prefault({}),...Ue}),fS=u.enum(["bring_your_own","managed_runtime","manifest_driven","dedicated_engine"]),hS=u.enum(["trivia","forecast","group","timed_round","synchronous_event","collection_ranking","hunt","push"]),vt=u.preprocess(e=>typeof e=="string"?We(e):e,hS),gS=u.object({route:fS.optional(),archetype:vt.optional(),component:u.string().optional(),version:u.string().optional(),variant:u.string().optional(),configuration:u.record(u.string(),u.unknown()).default({}),round:Pe.optional(),...Ue}),yS=u.object({surfaces:u.array(u.string()).default([]),container_label:u.string().min(1).default(en),screen_graph:u.string().optional(),design:u.object({figma_file:u.string().optional(),figma_version:u.string().optional(),tokens:u.string().optional(),fidelity:yt.optional()}).optional(),...Ue}),vS=u.object({spec_url:u.string().optional(),version:u.string().optional(),...Ue}),_S=u.object({family:u.string().optional(),version:u.string().optional(),configuration_schema:u.string().optional(),...Ue}),bS=u.object({project_template:u.string().optional(),project_id:u.string().optional(),events:u.array(u.string()).default([]),elements:u.array(u.string()).default([]),...Ue}),wS=u.object({required:u.boolean().default(!1),minimum_age:u.number().int().positive().max(120).optional(),method:u.enum(["self_declared","verified"]).default("self_declared"),verifier:u.string().optional()}),kS=u.object({issuer:u.string().url(),jwks_uri:u.string().url(),audience:u.string().optional()}),xS=u.object({provider:u.enum(["identify","anonymous","custom","jwt"]).optional(),jwt:kS.optional(),require_authenticated_writes:u.boolean().default(!0),age_gate:wS.prefault({}),consent:u.object({analytics_requires_consent:u.boolean().default(!0),provider:u.string().optional()}).prefault({}),...Ue}),SS=u.object({type:u.enum(["monterosa","posthog","ga4","webhook"]),enabled:u.boolean().default(!0),config:u.record(u.string(),u.string()).default({})}),$S=u.object({destinations:u.array(SS).default([{type:"monterosa",enabled:!0,config:{}}]),trusted_events:u.array(u.string()).default([]),signal:u.object({enabled:u.boolean().default(!1),application_id:u.string().optional(),write_key:u.string().optional(),monterosa:u.object({enabled:u.boolean().default(!1),organisation_id:u.string().optional(),project_id:u.string().optional()}).prefault({})}).prefault({}),...Ue}),ES=u.object({hosting:u.string().optional(),space_spec:u.string().optional(),environments:u.array(u.enum(["local","playground","staging","production"])).default(["local"]),...Ue}),TS=u.object({offers_prize:u.boolean().default(!1),free_entry_route:u.string().optional(),skill_based:u.boolean().default(!1),terms_url:u.string().optional(),jurisdictions:u.array(u.string()).default([])}),AS=u.object({support_tier:op.optional(),runbook:u.string().optional(),promotion:TS.prefault({}),...Ue}),zt=u.object({manifest:dS,app:mS,experience:yS.prefault({}),studio_app:vS.prefault({}),studio_surface:_S.prefault({}),backend:gS.prefault({}),interaction_cloud:bS.prefault({}),identity:xS.prefault({}),measurement:$S.prefault({}),deployment:ES.prefault({}),operations:AS.prefault({})});function ty(e){let t=[];e.measurement.signal.enabled&&!e.identity.consent.analytics_requires_consent&&t.push({path:"identity.consent.analytics_requires_consent",message:"Cannot be false while measurement.signal.enabled is true. Signal collects player engagement under Monterosa's own controllership, so consent is required and is not the game's to waive. Turn Signal off, or leave consent required."});let r=e.operations.promotion;if(r.offers_prize&&(r.terms_url||t.push({path:"operations.promotion.terms_url",message:"Required when the game offers a prize."}),r.jurisdictions.length===0&&t.push({path:"operations.promotion.jurisdictions",message:"Name the countries the promotion is open in. An unbounded prize draw is open in jurisdictions whose rules you have not read."}),!r.skill_based&&!r.free_entry_route&&t.push({path:"operations.promotion.free_entry_route",message:"A paid-entry prize needs either a published free entry route or a real skill test. Set `free_entry_route`, or set `skill_based` if entry turns on skill, knowledge or judgement."})),e.identity.provider==="jwt"&&!e.identity.jwt&&t.push({path:"identity.jwt",message:"Required when identity.provider is `jwt`. Name the `issuer` and the `jwks_uri` of the login system whose tokens this game accepts. Gamestage provides no identity provider."}),e.identity.jwt)for(let o of["issuer","jwks_uri"]){let n=e.identity.jwt[o],i=Xg(n);i&&t.push({path:`identity.jwt.${o}`,message:i==="local"?"Names a host only the machine running it can reach, which is the local `gamestage dev --as` harness. That harness signs its own tokens, so a deployed game pointed at it would let anyone who can reach the key be any player. Name the login system a real fan signs in to. `gamestage dev` supplies its own and needs nothing here.":i==="insecure"?"Must be https. A key set fetched in clear text is a key set the network chooses, and a token checked against it has proved nothing.":"Not a URL. Name the full issuer and JWKS URI of the login system whose tokens this game accepts."})}return e.identity.age_gate.required&&!e.identity.age_gate.minimum_age&&t.push({path:"identity.age_gate.minimum_age",message:"Required when identity.age_gate.required is true."}),e.identity.age_gate.method==="verified"&&!e.identity.age_gate.verifier&&t.push({path:"identity.age_gate.verifier",message:"Name the verifier when the method is `verified`. Gamestage provides no age verification, so an unnamed verifier is an unevidenced claim."}),t}var jn=["app","experience","studio_app","studio_surface","backend","interaction_cloud","identity","measurement","deployment","operations"];var qe=(e,t,r)=>{let o=e[t];return rp[o?.status??"missing"]>=rp[r]},ye=e=>typeof e=="string"?e.trim().length>0:e!=null,IS=[{level:"L0",id:"L0.app.identity",requirement:"app.id and app.title are set",check:e=>ye(e.app.id)&&ye(e.app.title)},{level:"L0",id:"L0.app.status",requirement:"app section is at least proposed",check:e=>qe(e,"app","proposed")},{level:"L0",id:"L0.schema.version",requirement:"manifest.schema_version is set",check:e=>ye(e.manifest.schema_version)},{level:"L1",id:"L1.experience.defined",requirement:"experience declares a screen graph or at least one player surface",check:e=>ye(e.experience.screen_graph)||e.experience.surfaces.length>0},{level:"L1",id:"L1.experience.status",requirement:"experience section is at least proposed",check:e=>qe(e,"experience","proposed")},{level:"L1",id:"L1.backend.route",requirement:"backend.route is chosen, so authority is decided before client code",check:e=>ye(e.backend.route)},{level:"L2",id:"L2.backend.pinned",requirement:"backend names a component and version, confirmed or better",check:e=>ye(e.backend.component)&&ye(e.backend.version)&&qe(e,"backend","confirmed")},{level:"L2",id:"L2.identity.policy",requirement:"identity provider is set and the section is confirmed",check:e=>ye(e.identity.provider)&&qe(e,"identity","confirmed")},{level:"L2",id:"L2.measurement.destination",requirement:"at least one enabled analytics destination is declared",check:e=>e.measurement.destinations.some(t=>t.enabled)},{level:"L2",id:"L2.platform.identifiers",requirement:"a real platform identity exists (Studio App Spec or Interaction Cloud project)",check:e=>ye(e.studio_app.spec_url)||ye(e.interaction_cloud.project_id)},{level:"L3",id:"L3.deployment.space",requirement:"deployment names a Space spec and a non-local environment",check:e=>ye(e.deployment.space_spec)&&e.deployment.environments.some(t=>t!=="local")},{level:"L3",id:"L3.surface.declared",requirement:"a Studio Surface family is declared for operator control",check:e=>ye(e.studio_surface.family)},{level:"L3",id:"L3.sections.confirmed",requirement:"experience, backend and deployment are all confirmed or better",check:e=>qe(e,"experience","confirmed")&&qe(e,"backend","confirmed")&&qe(e,"deployment","confirmed")},{level:"L4",id:"L4.sections.verified",requirement:"experience, backend, identity and deployment are verified with evidence attached",check:e=>["experience","backend","identity","deployment"].every(t=>qe(e,t,"verified")&&e[t].provenance.length>0)},{level:"L4",id:"L4.operations.runbook",requirement:"operations declares a support tier and a runbook",check:e=>ye(e.operations.support_tier)&&ye(e.operations.runbook)},{level:"L5",id:"L5.production.approved",requirement:"the manifest is approved and deployed to a production environment",check:e=>qe(e,"operations","approved")&&e.deployment.environments.includes("production")}],ny=["L0","L1","L2","L3","L4","L5"];function Re(e){let t=IS.map(l=>({id:l.id,level:l.level,requirement:l.requirement,passed:l.check(e)})),r="L0",o=!0;for(let l of ny)t.filter(m=>m.level===l).every(m=>m.passed)&&o?r=l:o=!1;let n=t.filter(l=>l.level==="L0").every(l=>l.passed),i=Rn[r]+1,a=ny[i],s=a?t.filter(l=>l.level===a&&!l.passed):[],c=e.manifest.conformance;return{computed:r,computedName:ey[r],claimed:c,overclaimed:!n||Rn[c]>Rn[r],results:t,blockers:n?s:t.filter(l=>l.level==="L0"&&!l.passed)}}function ry(e,t){let o=Re(e).results.filter(n=>!n.passed&&Rn[n.level]<=Rn[t]);return{ok:o.length===0,missing:o}}function _y(e){return typeof e>"u"||e===null}function CS(e){return typeof e=="object"&&e!==null}function PS(e){return Array.isArray(e)?e:_y(e)?[]:[e]}function OS(e,t){var r,o,n,i;if(t)for(i=Object.keys(t),r=0,o=i.length;r<o;r+=1)n=i[r],e[n]=t[n];return e}function NS(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function RS(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var jS=_y,DS=CS,LS=PS,zS=NS,MS=RS,US=OS,Q={isNothing:jS,isObject:DS,toArray:LS,repeat:zS,isNegativeZero:MS,extend:US};function by(e,t){var r="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
7119
+
7120
+ `+e.mark.snippet),o+" "+r):o}function Ur(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=by(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ur.prototype=Object.create(Error.prototype);Ur.prototype.constructor=Ur;Ur.prototype.toString=function(t){return this.name+": "+by(this,t)};var me=Ur;function ip(e,t,r,o,n){var i="",a="",s=Math.floor(n/2)-1;return o-t>s&&(i=" ... ",t=o-s+i.length),r-o>s&&(a=" ...",r=o+s-a.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:o-t+i.length}}function ap(e,t){return Q.repeat(" ",t-e.length)+e}function FS(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,o=[0],n=[],i,a=-1;i=r.exec(e.buffer);)n.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&a<0&&(a=o.length-2);a<0&&(a=o.length-1);var s="",c,l,p=Math.min(e.line+t.linesAfter,n.length).toString().length,d=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)l=ip(e.buffer,o[a-c],n[a-c],e.position-(o[a]-o[a-c]),d),s=Q.repeat(" ",t.indent)+ap((e.line-c+1).toString(),p)+" | "+l.str+`
7121
+ `+s;for(l=ip(e.buffer,o[a],n[a],e.position,d),s+=Q.repeat(" ",t.indent)+ap((e.line+1).toString(),p)+" | "+l.str+`
7122
+ `,s+=Q.repeat("-",t.indent+p+3+l.pos)+`^
7123
+ `,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)l=ip(e.buffer,o[a+c],n[a+c],e.position-(o[a]-o[a+c]),d),s+=Q.repeat(" ",t.indent)+ap((e.line+c+1).toString(),p)+" | "+l.str+`
7124
+ `;return s.replace(/\n$/,"")}var GS=FS,ZS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],BS=["scalar","sequence","mapping"];function KS(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}function VS(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(ZS.indexOf(r)===-1)throw new me('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=KS(t.styleAliases||null),BS.indexOf(this.kind)===-1)throw new me('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var oe=VS;function oy(e,t){var r=[];return e[t].forEach(function(o){var n=r.length;r.forEach(function(i,a){i.tag===o.tag&&i.kind===o.kind&&i.multi===o.multi&&(n=a)}),r[n]=o}),r}function WS(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function o(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(o);return e}function cp(e){return this.extend(e)}cp.prototype.extend=function(t){var r=[],o=[];if(t instanceof oe)o.push(t);else if(Array.isArray(t))o=o.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit));else throw new me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof oe))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(i){if(!(i instanceof oe))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(cp.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(o),n.compiledImplicit=oy(n,"implicit"),n.compiledExplicit=oy(n,"explicit"),n.compiledTypeMap=WS(n.compiledImplicit,n.compiledExplicit),n};var wy=cp,ky=new oe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),xy=new oe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Sy=new oe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),$y=new wy({explicit:[ky,xy,Sy]});function HS(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function JS(){return null}function YS(e){return e===null}var Ey=new oe("tag:yaml.org,2002:null",{kind:"scalar",resolve:HS,construct:JS,predicate:YS,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function qS(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function XS(e){return e==="true"||e==="True"||e==="TRUE"}function QS(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Ty=new oe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:qS,construct:XS,predicate:QS,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function e$(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function t$(e){return 48<=e&&e<=55}function n$(e){return 48<=e&&e<=57}function r$(e){if(e===null)return!1;var t=e.length,r=0,o=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;o=!0}return o&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!e$(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!t$(e.charCodeAt(r)))return!1;o=!0}return o&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!n$(e.charCodeAt(r)))return!1;o=!0}return!(!o||n==="_")}function o$(e){var t=e,r=1,o;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),o=t[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),t=t.slice(1),o=t[0]),t==="0")return 0;if(o==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function i$(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Q.isNegativeZero(e)}var Ay=new oe("tag:yaml.org,2002:int",{kind:"scalar",resolve:r$,construct:o$,predicate:i$,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),a$=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s$(e){return!(e===null||!a$.test(e)||e[e.length-1]==="_")}function c$(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var l$=/^[-+]?[0-9]+e/;function u$(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Q.isNegativeZero(e))return"-0.0";return r=e.toString(10),l$.test(r)?r.replace("e",".e"):r}function d$(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Q.isNegativeZero(e))}var Iy=new oe("tag:yaml.org,2002:float",{kind:"scalar",resolve:s$,construct:c$,predicate:d$,represent:u$,defaultStyle:"lowercase"}),Cy=$y.extend({implicit:[Ey,Ty,Ay,Iy]}),Py=Cy,Oy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ny=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function p$(e){return e===null?!1:Oy.exec(e)!==null||Ny.exec(e)!==null}function m$(e){var t,r,o,n,i,a,s,c=0,l=null,p,d,m;if(t=Oy.exec(e),t===null&&(t=Ny.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,o,n));if(i=+t[4],a=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(p=+t[10],d=+(t[11]||0),l=(p*60+d)*6e4,t[9]==="-"&&(l=-l)),m=new Date(Date.UTC(r,o,n,i,a,s,c)),l&&m.setTime(m.getTime()-l),m}function f$(e){return e.toISOString()}var Ry=new oe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:p$,construct:m$,instanceOf:Date,represent:f$});function h$(e){return e==="<<"||e===null}var jy=new oe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:h$}),mp=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
7125
+ \r`;function g$(e){if(e===null)return!1;var t,r,o=0,n=e.length,i=mp;for(r=0;r<n;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function y$(e){var t,r,o=e.replace(/[\r\n=]/g,""),n=o.length,i=mp,a=0,s=[];for(t=0;t<n;t++)t%4===0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)),a=a<<6|i.indexOf(o.charAt(t));return r=n%4*6,r===0?(s.push(a>>16&255),s.push(a>>8&255),s.push(a&255)):r===18?(s.push(a>>10&255),s.push(a>>2&255)):r===12&&s.push(a>>4&255),new Uint8Array(s)}function v$(e){var t="",r=0,o,n,i=e.length,a=mp;for(o=0;o<i;o++)o%3===0&&o&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[o];return n=i%3,n===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):n===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):n===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function _$(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Dy=new oe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:g$,construct:y$,predicate:_$,represent:v$}),b$=Object.prototype.hasOwnProperty,w$=Object.prototype.toString;function k$(e){if(e===null)return!0;var t=[],r,o,n,i,a,s=e;for(r=0,o=s.length;r<o;r+=1){if(n=s[r],a=!1,w$.call(n)!=="[object Object]")return!1;for(i in n)if(b$.call(n,i))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function x$(e){return e!==null?e:[]}var Ly=new oe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:k$,construct:x$}),S$=Object.prototype.toString;function $$(e){if(e===null)return!0;var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(o=a[t],S$.call(o)!=="[object Object]"||(n=Object.keys(o),n.length!==1))return!1;i[t]=[n[0],o[n[0]]]}return!0}function E$(e){if(e===null)return[];var t,r,o,n,i,a=e;for(i=new Array(a.length),t=0,r=a.length;t<r;t+=1)o=a[t],n=Object.keys(o),i[t]=[n[0],o[n[0]]];return i}var zy=new oe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:$$,construct:E$}),T$=Object.prototype.hasOwnProperty;function A$(e){if(e===null)return!0;var t,r=e;for(t in r)if(T$.call(r,t)&&r[t]!==null)return!1;return!0}function I$(e){return e!==null?e:{}}var My=new oe("tag:yaml.org,2002:set",{kind:"mapping",resolve:A$,construct:I$}),fp=Py.extend({implicit:[Ry,jy],explicit:[Dy,Ly,zy,My]}),bt=Object.prototype.hasOwnProperty,Ji=1,Uy=2,Fy=3,Yi=4,sp=1,C$=2,iy=3,P$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,O$=/[\x85\u2028\u2029]/,N$=/[,\[\]\{\}]/,Gy=/^(?:!|!!|![a-z\-]+!)$/i,Zy=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function ay(e){return Object.prototype.toString.call(e)}function Fe(e){return e===10||e===13}function Ut(e){return e===9||e===32}function ve(e){return e===9||e===32||e===10||e===13}function Ln(e){return e===44||e===91||e===93||e===123||e===125}function R$(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function j$(e){return e===120?2:e===117?4:e===85?8:0}function D$(e){return 48<=e&&e<=57?e-48:-1}function sy(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
7126
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function L$(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function By(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var Ky=new Array(256),Vy=new Array(256);for(Mt=0;Mt<256;Mt++)Ky[Mt]=sy(Mt)?1:0,Vy[Mt]=sy(Mt);var Mt;function z$(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||fp,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Wy(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=GS(r),new me(t,r)}function O(e,t){throw Wy(e,t)}function qi(e,t){e.onWarning&&e.onWarning.call(null,Wy(e,t))}var cy={YAML:function(t,r,o){var n,i,a;t.version!==null&&O(t,"duplication of %YAML directive"),o.length!==1&&O(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),n===null&&O(t,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),i!==1&&O(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&qi(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var n,i;o.length!==2&&O(t,"TAG directive accepts exactly two arguments"),n=o[0],i=o[1],Gy.test(n)||O(t,"ill-formed tag handle (first argument) of the TAG directive"),bt.call(t.tagMap,n)&&O(t,'there is a previously declared suffix for "'+n+'" tag handle'),Zy.test(i)||O(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{O(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i}};function _t(e,t,r,o){var n,i,a,s;if(t<r){if(s=e.input.slice(t,r),o)for(n=0,i=s.length;n<i;n+=1)a=s.charCodeAt(n),a===9||32<=a&&a<=1114111||O(e,"expected valid JSON character");else P$.test(s)&&O(e,"the stream contains non-printable characters");e.result+=s}}function ly(e,t,r,o){var n,i,a,s;for(Q.isObject(r)||O(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,s=n.length;a<s;a+=1)i=n[a],bt.call(t,i)||(By(t,i,r[i]),o[i]=!0)}function zn(e,t,r,o,n,i,a,s,c){var l,p;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,p=n.length;l<p;l+=1)Array.isArray(n[l])&&O(e,"nested arrays are not supported inside keys"),typeof n=="object"&&ay(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&ay(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(l=0,p=i.length;l<p;l+=1)ly(e,t,i[l],r);else ly(e,t,i,r);else!e.json&&!bt.call(r,n)&&bt.call(t,n)&&(e.line=a||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,O(e,"duplicated mapping key")),By(t,n,i),delete r[n];return t}function hp(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):O(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function X(e,t,r){for(var o=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ut(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Fe(n))for(hp(e),n=e.input.charCodeAt(e.position),o++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&o!==0&&e.lineIndent<r&&qi(e,"deficient indentation"),o}function ea(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ve(r)))}function gp(e,t){t===1?e.result+=" ":t>1&&(e.result+=Q.repeat(`
7127
+ `,t-1))}function M$(e,t,r){var o,n,i,a,s,c,l,p,d=e.kind,m=e.result,f;if(f=e.input.charCodeAt(e.position),ve(f)||Ln(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),ve(n)||r&&Ln(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,s=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),ve(n)||r&&Ln(n))break}else if(f===35){if(o=e.input.charCodeAt(e.position-1),ve(o))break}else{if(e.position===e.lineStart&&ea(e)||r&&Ln(f))break;if(Fe(f))if(c=e.line,l=e.lineStart,p=e.lineIndent,X(e,!1,-1),e.lineIndent>=t){s=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=l,e.lineIndent=p;break}}s&&(_t(e,i,a,!1),gp(e,e.line-c),i=a=e.position,s=!1),Ut(f)||(a=e.position+1),f=e.input.charCodeAt(++e.position)}return _t(e,i,a,!1),e.result?!0:(e.kind=d,e.result=m,!1)}function U$(e,t){var r,o,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(_t(e,o,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)o=e.position,e.position++,n=e.position;else return!0;else Fe(r)?(_t(e,o,n,!0),gp(e,X(e,!1,t)),o=n=e.position):e.position===e.lineStart&&ea(e)?O(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);O(e,"unexpected end of the stream within a single quoted scalar")}function F$(e,t){var r,o,n,i,a,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return _t(e,r,e.position,!0),e.position++,!0;if(s===92){if(_t(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),Fe(s))X(e,!1,t);else if(s<256&&Ky[s])e.result+=Vy[s],e.position++;else if((a=j$(s))>0){for(n=a,i=0;n>0;n--)s=e.input.charCodeAt(++e.position),(a=R$(s))>=0?i=(i<<4)+a:O(e,"expected hexadecimal character");e.result+=L$(i),e.position++}else O(e,"unknown escape sequence");r=o=e.position}else Fe(s)?(_t(e,r,o,!0),gp(e,X(e,!1,t)),r=o=e.position):e.position===e.lineStart&&ea(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}function G$(e,t){var r=!0,o,n,i,a=e.tag,s,c=e.anchor,l,p,d,m,f,h=Object.create(null),_,b,P,z;if(z=e.input.charCodeAt(e.position),z===91)p=93,f=!1,s=[];else if(z===123)p=125,f=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),z=e.input.charCodeAt(++e.position);z!==0;){if(X(e,!0,t),z=e.input.charCodeAt(e.position),z===p)return e.position++,e.tag=a,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=s,!0;r?z===44&&O(e,"expected the node content, but found ','"):O(e,"missed comma between flow collection entries"),b=_=P=null,d=m=!1,z===63&&(l=e.input.charCodeAt(e.position+1),ve(l)&&(d=m=!0,e.position++,X(e,!0,t))),o=e.line,n=e.lineStart,i=e.position,Mn(e,t,Ji,!1,!0),b=e.tag,_=e.result,X(e,!0,t),z=e.input.charCodeAt(e.position),(m||e.line===o)&&z===58&&(d=!0,z=e.input.charCodeAt(++e.position),X(e,!0,t),Mn(e,t,Ji,!1,!0),P=e.result),f?zn(e,s,h,b,_,P,o,n,i):d?s.push(zn(e,null,h,b,_,P,o,n,i)):s.push(_),X(e,!0,t),z=e.input.charCodeAt(e.position),z===44?(r=!0,z=e.input.charCodeAt(++e.position)):r=!1}O(e,"unexpected end of the stream within a flow collection")}function Z$(e,t){var r,o,n=sp,i=!1,a=!1,s=t,c=0,l=!1,p,d;if(d=e.input.charCodeAt(e.position),d===124)o=!1;else if(d===62)o=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)sp===n?n=d===43?iy:C$:O(e,"repeat of a chomping mode identifier");else if((p=D$(d))>=0)p===0?O(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?O(e,"repeat of an indentation width identifier"):(s=t+p-1,a=!0);else break;if(Ut(d)){do d=e.input.charCodeAt(++e.position);while(Ut(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Fe(d)&&d!==0)}for(;d!==0;){for(hp(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>s&&(s=e.lineIndent),Fe(d)){c++;continue}if(e.lineIndent<s){n===iy?e.result+=Q.repeat(`
7128
+ `,i?1+c:c):n===sp&&i&&(e.result+=`
7129
+ `);break}for(o?Ut(d)?(l=!0,e.result+=Q.repeat(`
7130
+ `,i?1+c:c)):l?(l=!1,e.result+=Q.repeat(`
7131
+ `,c+1)):c===0?i&&(e.result+=" "):e.result+=Q.repeat(`
7132
+ `,c):e.result+=Q.repeat(`
7133
+ `,i?1+c:c),i=!0,a=!0,c=0,r=e.position;!Fe(d)&&d!==0;)d=e.input.charCodeAt(++e.position);_t(e,r,e.position,!1)}return!0}function uy(e,t){var r,o=e.tag,n=e.anchor,i=[],a,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!ve(a))));){if(s=!0,e.position++,X(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Mn(e,t,Fy,!1,!0),i.push(e.result),X(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)O(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return s?(e.tag=o,e.anchor=n,e.kind="sequence",e.result=i,!0):!1}function B$(e,t,r){var o,n,i,a,s,c,l=e.tag,p=e.anchor,d={},m=Object.create(null),f=null,h=null,_=null,b=!1,P=!1,z;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),z=e.input.charCodeAt(e.position);z!==0;){if(!b&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,O(e,"tab characters must not be used in indentation")),o=e.input.charCodeAt(e.position+1),i=e.line,(z===63||z===58)&&ve(o))z===63?(b&&(zn(e,d,m,f,h,null,a,s,c),f=h=_=null),P=!0,b=!0,n=!0):b?(b=!1,n=!0):O(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,z=o;else{if(a=e.line,s=e.lineStart,c=e.position,!Mn(e,r,Uy,!1,!0))break;if(e.line===i){for(z=e.input.charCodeAt(e.position);Ut(z);)z=e.input.charCodeAt(++e.position);if(z===58)z=e.input.charCodeAt(++e.position),ve(z)||O(e,"a whitespace character is expected after the key-value separator within a block mapping"),b&&(zn(e,d,m,f,h,null,a,s,c),f=h=_=null),P=!0,b=!1,n=!1,f=e.tag,h=e.result;else if(P)O(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=p,!0}else if(P)O(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=p,!0}if((e.line===i||e.lineIndent>t)&&(b&&(a=e.line,s=e.lineStart,c=e.position),Mn(e,t,Yi,!0,n)&&(b?h=e.result:_=e.result),b||(zn(e,d,m,f,h,_,a,s,c),f=h=_=null),X(e,!0,-1),z=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&z!==0)O(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return b&&zn(e,d,m,f,h,null,a,s,c),P&&(e.tag=l,e.anchor=p,e.kind="mapping",e.result=d),P}function K$(e){var t,r=!1,o=!1,n,i,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&O(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(o=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(i=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):O(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!ve(a);)a===33&&(o?O(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Gy.test(n)||O(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),N$.test(i)&&O(e,"tag suffix cannot contain flow indicator characters")}i&&!Zy.test(i)&&O(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{O(e,"tag name is malformed: "+i)}return r?e.tag=i:bt.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:n==="!"?e.tag="!"+i:n==="!!"?e.tag="tag:yaml.org,2002:"+i:O(e,'undeclared tag handle "'+n+'"'),!0}function V$(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&O(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ve(r)&&!Ln(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function W$(e){var t,r,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!ve(o)&&!Ln(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),bt.call(e.anchorMap,r)||O(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],X(e,!0,-1),!0}function Mn(e,t,r,o,n){var i,a,s,c=1,l=!1,p=!1,d,m,f,h,_,b;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=a=s=Yi===r||Fy===r,o&&X(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;K$(e)||V$(e);)X(e,!0,-1)?(l=!0,s=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&(s=l||n),(c===1||Yi===r)&&(Ji===r||Uy===r?_=t:_=t+1,b=e.position-e.lineStart,c===1?s&&(uy(e,b)||B$(e,b,_))||G$(e,_)?p=!0:(a&&Z$(e,_)||U$(e,_)||F$(e,_)?p=!0:W$(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&O(e,"alias node should not have any properties")):M$(e,_,Ji===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=s&&uy(e,b))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&O(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,m=e.implicitTypes.length;d<m;d+=1)if(h=e.implicitTypes[d],h.resolve(e.result)){e.result=h.construct(e.result),e.tag=h.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(bt.call(e.typeMap[e.kind||"fallback"],e.tag))h=e.typeMap[e.kind||"fallback"][e.tag];else for(h=null,f=e.typeMap.multi[e.kind||"fallback"],d=0,m=f.length;d<m;d+=1)if(e.tag.slice(0,f[d].tag.length)===f[d].tag){h=f[d];break}h||O(e,"unknown tag !<"+e.tag+">"),e.result!==null&&h.kind!==e.kind&&O(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+h.kind+'", not "'+e.kind+'"'),h.resolve(e.result,e.tag)?(e.result=h.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):O(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function H$(e){var t=e.position,r,o,n,i=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(X(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(i=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!ve(a);)a=e.input.charCodeAt(++e.position);for(o=e.input.slice(r,e.position),n=[],o.length<1&&O(e,"directive name must not be less than one character in length");a!==0;){for(;Ut(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Fe(a));break}if(Fe(a))break;for(r=e.position;a!==0&&!ve(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&hp(e),bt.call(cy,o)?cy[o](e,o,n):qi(e,'unknown document directive "'+o+'"')}if(X(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,X(e,!0,-1)):i&&O(e,"directives end mark is expected"),Mn(e,e.lineIndent-1,Yi,!1,!0),X(e,!0,-1),e.checkLineBreaks&&O$.test(e.input.slice(t,e.position))&&qi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ea(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,X(e,!0,-1));return}if(e.position<e.length-1)O(e,"end of the stream or a document separator is expected");else return}function Hy(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
7134
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new z$(e,t),o=e.indexOf("\0");for(o!==-1&&(r.position=o,O(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)H$(r);return r.documents}function J$(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var o=Hy(e,r);if(typeof t!="function")return o;for(var n=0,i=o.length;n<i;n+=1)t(o[n])}function Y$(e,t){var r=Hy(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new me("expected a single document in the stream, but found more")}}var q$=J$,X$=Y$,Jy={loadAll:q$,load:X$},Yy=Object.prototype.toString,qy=Object.prototype.hasOwnProperty,yp=65279,Q$=9,Fr=10,eE=13,tE=32,nE=33,rE=34,lp=35,oE=37,iE=38,aE=39,sE=42,Xy=44,cE=45,Xi=58,lE=61,uE=62,dE=63,pE=64,Qy=91,ev=93,mE=96,tv=123,fE=124,nv=125,ae={};ae[0]="\\0";ae[7]="\\a";ae[8]="\\b";ae[9]="\\t";ae[10]="\\n";ae[11]="\\v";ae[12]="\\f";ae[13]="\\r";ae[27]="\\e";ae[34]='\\"';ae[92]="\\\\";ae[133]="\\N";ae[160]="\\_";ae[8232]="\\L";ae[8233]="\\P";var hE=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],gE=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function yE(e,t){var r,o,n,i,a,s,c;if(t===null)return{};for(r={},o=Object.keys(t),n=0,i=o.length;n<i;n+=1)a=o[n],s=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&qy.call(c.styleAliases,s)&&(s=c.styleAliases[s]),r[a]=s;return r}function vE(e){var t,r,o;if(t=e.toString(16).toUpperCase(),e<=255)r="x",o=2;else if(e<=65535)r="u",o=4;else if(e<=4294967295)r="U",o=8;else throw new me("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Q.repeat("0",o-t.length)+t}var _E=1,Gr=2;function bE(e){this.schema=e.schema||fp,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Q.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=yE(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Gr:_E,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function dy(e,t){for(var r=Q.repeat(" ",t),o=0,n=-1,i="",a,s=e.length;o<s;)n=e.indexOf(`
7127
7135
  `,o),n===-1?(a=e.slice(o),o=s):(a=e.slice(o,n+1),o=n+1),a.length&&a!==`
7128
- `&&(i+=r),i+=a;return i}function sp(e,t){return`
7129
- `+X.repeat(" ",e.indent*t)}function cE(e,t){var r,o,n;for(r=0,o=e.implicitTypes.length;r<o;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function Yi(e){return e===G$||e===U$}function Fr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==fp||65536<=e&&e<=1114111}function ly(e){return Fr(e)&&e!==fp&&e!==F$&&e!==Mr}function uy(e,t,r){var o=ly(e),n=o&&!Yi(e);return(r?o:o&&e!==Jy&&e!==qy&&e!==Yy&&e!==Xy&&e!==Qy)&&e!==ap&&!(t===qi&&!n)||ly(t)&&!Yi(t)&&e===ap||t===qi&&n}function lE(e){return Fr(e)&&e!==fp&&!Yi(e)&&e!==J$&&e!==X$&&e!==qi&&e!==Jy&&e!==qy&&e!==Yy&&e!==Xy&&e!==Qy&&e!==ap&&e!==V$&&e!==H$&&e!==Z$&&e!==tE&&e!==q$&&e!==Y$&&e!==W$&&e!==B$&&e!==K$&&e!==Q$&&e!==eE}function uE(e){return!Yi(e)&&e!==qi}function Lr(e,t){var r=e.charCodeAt(t),o;return r>=55296&&r<=56319&&t+1<e.length&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function ev(e){var t=/^\n* /;return t.test(e)}var tv=1,cp=2,nv=3,rv=4,jn=5;function dE(e,t,r,o,n,i,a,s){var c,l=0,d=null,p=!1,m=!1,f=o!==-1,h=-1,b=lE(Lr(e,0))&&uE(Lr(e,e.length-1));if(t||a)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Lr(e,c),!Fr(l))return jn;b=b&&uy(l,d,s),d=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Lr(e,c),l===Mr)p=!0,f&&(m=m||c-h-1>o&&e[h+1]!==" ",h=c);else if(!Fr(l))return jn;b=b&&uy(l,d,s),d=l}m=m||f&&c-h-1>o&&e[h+1]!==" "}return!p&&!m?b&&!a&&!n(e)?tv:i===Ur?jn:cp:r>9&&ev(e)?jn:a?i===Ur?jn:cp:m?rv:nv}function pE(e,t,r,o,n){e.dump=(function(){if(t.length===0)return e.quotingType===Ur?'""':"''";if(!e.noCompatMode&&(nE.indexOf(t)!==-1||rE.test(t)))return e.quotingType===Ur?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=o||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return cE(e,l)}switch(dE(t,s,e.indent,a,c,e.quotingType,e.forceQuotes&&!o,n)){case tv:return t;case cp:return"'"+t.replace(/'/g,"''")+"'";case nv:return"|"+dy(t,e.indent)+py(cy(t,i));case rv:return">"+dy(t,e.indent)+py(cy(mE(t,a),i));case jn:return'"'+fE(t)+'"';default:throw new me("impossible error: invalid scalar style")}})()}function dy(e,t){var r=ev(e)?String(t):"",o=e[e.length-1]===`
7136
+ `&&(i+=r),i+=a;return i}function up(e,t){return`
7137
+ `+Q.repeat(" ",e.indent*t)}function wE(e,t){var r,o,n;for(r=0,o=e.implicitTypes.length;r<o;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function Qi(e){return e===tE||e===Q$}function Zr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==yp||65536<=e&&e<=1114111}function py(e){return Zr(e)&&e!==yp&&e!==eE&&e!==Fr}function my(e,t,r){var o=py(e),n=o&&!Qi(e);return(r?o:o&&e!==Xy&&e!==Qy&&e!==ev&&e!==tv&&e!==nv)&&e!==lp&&!(t===Xi&&!n)||py(t)&&!Qi(t)&&e===lp||t===Xi&&n}function kE(e){return Zr(e)&&e!==yp&&!Qi(e)&&e!==cE&&e!==dE&&e!==Xi&&e!==Xy&&e!==Qy&&e!==ev&&e!==tv&&e!==nv&&e!==lp&&e!==iE&&e!==sE&&e!==nE&&e!==fE&&e!==lE&&e!==uE&&e!==aE&&e!==rE&&e!==oE&&e!==pE&&e!==mE}function xE(e){return!Qi(e)&&e!==Xi}function Mr(e,t){var r=e.charCodeAt(t),o;return r>=55296&&r<=56319&&t+1<e.length&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function rv(e){var t=/^\n* /;return t.test(e)}var ov=1,dp=2,iv=3,av=4,Dn=5;function SE(e,t,r,o,n,i,a,s){var c,l=0,p=null,d=!1,m=!1,f=o!==-1,h=-1,_=kE(Mr(e,0))&&xE(Mr(e,e.length-1));if(t||a)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Mr(e,c),!Zr(l))return Dn;_=_&&my(l,p,s),p=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Mr(e,c),l===Fr)d=!0,f&&(m=m||c-h-1>o&&e[h+1]!==" ",h=c);else if(!Zr(l))return Dn;_=_&&my(l,p,s),p=l}m=m||f&&c-h-1>o&&e[h+1]!==" "}return!d&&!m?_&&!a&&!n(e)?ov:i===Gr?Dn:dp:r>9&&rv(e)?Dn:a?i===Gr?Dn:dp:m?av:iv}function $E(e,t,r,o,n){e.dump=(function(){if(t.length===0)return e.quotingType===Gr?'""':"''";if(!e.noCompatMode&&(hE.indexOf(t)!==-1||gE.test(t)))return e.quotingType===Gr?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=o||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return wE(e,l)}switch(SE(t,s,e.indent,a,c,e.quotingType,e.forceQuotes&&!o,n)){case ov:return t;case dp:return"'"+t.replace(/'/g,"''")+"'";case iv:return"|"+fy(t,e.indent)+hy(dy(t,i));case av:return">"+fy(t,e.indent)+hy(dy(EE(t,a),i));case Dn:return'"'+TE(t)+'"';default:throw new me("impossible error: invalid scalar style")}})()}function fy(e,t){var r=rv(e)?String(t):"",o=e[e.length-1]===`
7130
7138
  `,n=o&&(e[e.length-2]===`
7131
7139
  `||e===`
7132
7140
  `),i=n?"+":o?"":"-";return r+i+`
7133
- `}function py(e){return e[e.length-1]===`
7134
- `?e.slice(0,-1):e}function mE(e,t){for(var r=/(\n+)([^\n]*)/g,o=(function(){var l=e.indexOf(`
7135
- `);return l=l!==-1?l:e.length,r.lastIndex=l,my(e.slice(0,l),t)})(),n=e[0]===`
7141
+ `}function hy(e){return e[e.length-1]===`
7142
+ `?e.slice(0,-1):e}function EE(e,t){for(var r=/(\n+)([^\n]*)/g,o=(function(){var l=e.indexOf(`
7143
+ `);return l=l!==-1?l:e.length,r.lastIndex=l,gy(e.slice(0,l),t)})(),n=e[0]===`
7136
7144
  `||e[0]===" ",i,a;a=r.exec(e);){var s=a[1],c=a[2];i=c[0]===" ",o+=s+(!n&&!i&&c!==""?`
7137
- `:"")+my(c,t),n=i}return o}function my(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,o,n=0,i,a=0,s=0,c="";o=r.exec(e);)s=o.index,s-n>t&&(i=a>n?a:s,c+=`
7145
+ `:"")+gy(c,t),n=i}return o}function gy(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,o,n=0,i,a=0,s=0,c="";o=r.exec(e);)s=o.index,s-n>t&&(i=a>n?a:s,c+=`
7138
7146
  `+e.slice(n,i),n=i+1),a=s;return c+=`
7139
7147
  `,e.length-n>t&&a>n?c+=e.slice(n,a)+`
7140
- `+e.slice(a+1):c+=e.slice(n),c.slice(1)}function fE(e){for(var t="",r=0,o,n=0;n<e.length;r>=65536?n+=2:n++)r=Lr(e,n),o=ae[r],!o&&Fr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=o||iE(r);return t}function hE(e,t,r){var o="",n=e.tag,i,a,s;for(i=0,a=r.length;i<a;i+=1)s=r[i],e.replacer&&(s=e.replacer.call(r,String(i),s)),(Xe(e,t,s,!1,!1)||typeof s>"u"&&Xe(e,t,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=n,e.dump="["+o+"]"}function fy(e,t,r,o){var n="",i=e.tag,a,s,c;for(a=0,s=r.length;a<s;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(Xe(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Xe(e,t+1,null,!0,!0,!1,!0))&&((!o||n!=="")&&(n+=sp(e,t)),e.dump&&Mr===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=i,e.dump=n||"[]"}function gE(e,t,r){var o="",n=e.tag,i=Object.keys(r),a,s,c,l,d;for(a=0,s=i.length;a<s;a+=1)d="",o!==""&&(d+=", "),e.condenseFlow&&(d+='"'),c=i[a],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),Xe(e,t,c,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xe(e,t,l,!1,!1)&&(d+=e.dump,o+=d));e.tag=n,e.dump="{"+o+"}"}function yE(e,t,r,o){var n="",i=e.tag,a=Object.keys(r),s,c,l,d,p,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new me("sortKeys must be a boolean or a function");for(s=0,c=a.length;s<c;s+=1)m="",(!o||n!=="")&&(m+=sp(e,t)),l=a[s],d=r[l],e.replacer&&(d=e.replacer.call(r,l,d)),Xe(e,t+1,l,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&Mr===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,p&&(m+=sp(e,t)),Xe(e,t+1,d,!0,p)&&(e.dump&&Mr===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=i,e.dump=n||"{}"}function hy(e,t,r){var o,n,i,a,s,c;for(n=r?e.explicitTypes:e.implicitTypes,i=0,a=n.length;i<a;i+=1)if(s=n[i],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,Wy.call(s.represent)==="[object Function]")o=s.represent(t,c);else if(Hy.call(s.represent,c))o=s.represent[c](t,c);else throw new me("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=o}return!0}return!1}function Xe(e,t,r,o,n,i,a){e.tag=null,e.dump=r,hy(e,r,!1)||hy(e,r,!0);var s=Wy.call(e.dump),c=o,l;o&&(o=e.flowLevel<0||e.flowLevel>t);var d=s==="[object Object]"||s==="[object Array]",p,m;if(d&&(p=e.duplicates.indexOf(r),m=p!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&m&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),s==="[object Object]")o&&Object.keys(e.dump).length!==0?(yE(e,t,e.dump,n),m&&(e.dump="&ref_"+p+e.dump)):(gE(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?fy(e,t-1,e.dump,n):fy(e,t,e.dump,n),m&&(e.dump="&ref_"+p+e.dump)):(hE(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&pE(e,e.dump,t,i,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new me("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}function vE(e,t){var r=[],o=[],n,i;for(lp(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function lp(e,t,r){var o,n,i;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,i=e.length;n<i;n+=1)lp(e[n],t,r);else for(o=Object.keys(e),n=0,i=o.length;n<i;n+=1)lp(e[o[n]],t,r)}function _E(e,t){t=t||{};var r=new sE(t);r.noRefs||vE(e,r);var o=e;return r.replacer&&(o=r.replacer.call({"":o},"",o)),Xe(r,0,o,!0,!0)?r.dump+`
7141
- `:""}var bE=_E,wE={dump:bE};function hp(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var kE=re,xE=vy,SE=ky,$E=Ty,EE=Ay,TE=dp,AE=Vy.load,IE=Vy.loadAll,CE=wE.dump,PE=me,OE={binary:Ny,float:Ey,map:wy,null:xy,pairs:jy,set:Dy,timestamp:Py,bool:Sy,int:$y,merge:Oy,omap:Ry,seq:by,str:_y},NE=hp("safeLoad","load"),RE=hp("safeLoadAll","loadAll"),jE=hp("safeDump","dump"),gp={Type:kE,Schema:xE,FAILSAFE_SCHEMA:SE,JSON_SCHEMA:$E,CORE_SCHEMA:EE,DEFAULT_SCHEMA:TE,load:AE,loadAll:IE,dump:CE,YAMLException:PE,types:OE,safeLoad:NE,safeLoadAll:RE,safeDump:jE};function _e(e){let t;try{t=gp.load(e)}catch(n){return{ok:!1,issues:[{path:"(document)",message:n instanceof Error?n.message:"YAML parse failed"}]}}if(t===null||typeof t!="object")return{ok:!1,issues:[{path:"(document)",message:"Manifest must be a YAML mapping"}]};let r=Mt.safeParse(t);if(!r.success)return{ok:!1,issues:DE(r.error)};let o=Xg(r.data);return o.length?{ok:!1,issues:o}:{ok:!0,manifest:r.data}}function DE(e){return e.issues.map(t=>({path:t.path.length?t.path.join("."):"(root)",message:t.message}))}function Qi(e){return gp.dump(e,{indent:2,lineWidth:100,noRefs:!0,sortKeys:!1})}function ea(e,t){return Mt.parse({manifest:{schema_version:Vi,revision:0,conformance:"L0"},app:{id:e,title:t,status:"proposed"}})}var Q={runtime:"/play/v1/games/{game}/runtime",currentRound:"/play/v1/games/{game}/rounds/current",round:"/play/v1/games/{game}/rounds/{round}",plays:"/play/v1/games/{game}/rounds/{round}/plays",session:"/play/v1/games/{game}/session",roundState:"/play/v1/games/{game}/rounds/{round}/players/me",profile:"/play/v1/games/{game}/players/me/profile",leaderboard:"/play/v1/games/{game}/leaderboard"},ta="/play";var ov="2.0",Gt=u.object({server_time:u.string(),snapshot:u.string()}),LE=u.enum(["at_commit","at_settlement"]),zE=u.enum(["shared","per_player","feed"]),ME=u.object({kind:u.enum(["fixed","local_midnight","feed","continuous"]),timezone:u.string().optional()}),GN=Gt.extend({game:u.string(),api_version:u.literal(ov).default(ov),archetype:vt,marking:LE,challenge_source:zE,schedule:ME,updates:u.object({transport:u.enum(["poll","socket"]),freshness_seconds:u.number().int().positive()}),display:u.record(u.string(),u.unknown()).default({}),identity:u.object({required:u.boolean(),provider:u.string(),anonymous_play:u.boolean().default(!1)}),archive:u.boolean().default(!1),capabilities:u.array(u.string()).default([])}),UE=u.object({accepting_plays:u.boolean(),results_available:u.boolean(),solution_revealed:u.boolean(),closed:u.boolean()}),ZN=Gt.extend({id:u.string(),number:u.number().int().positive().optional(),origin:Dr.optional(),version:u.number().int().nonnegative(),can:UE,opens_at:u.string().optional(),locks_at:u.string().optional(),challenge_instance_id:u.string().nullable().default(null),challenge:u.record(u.string(),u.unknown()).default({}),solution:u.record(u.string(),u.unknown()).optional()}),BN=Gt.extend({token:u.string(),player_id:u.string(),kind:u.literal("anonymous")}),av=u.object({idempotency_key:u.string().min(8),round_version:u.number().int().nonnegative(),challenge_instance_id:u.string().nullable().default(null),payload:u.record(u.string(),u.unknown())}),FE=u.enum(["accepted","rejected","duplicate","stale","busy"]),GE=u.object({key:u.string(),verdict:u.enum(["correct","close","wrong","higher","lower","unknown"]),label:u.string().optional()}),KN=Gt.extend({play_id:u.string(),outcome:FE,reason:u.string().optional(),round_version:u.number().int().nonnegative(),retry_after_seconds:u.number().int().positive().optional(),marked:u.boolean().default(!0),feedback:u.array(GE).default([]),round_state:u.lazy(()=>BE).optional()}),ZE=u.object({title:u.string(),grid:u.array(u.string()).default([]),text:u.string().optional()}),BE=Gt.extend({player_id:u.string(),round_id:u.string(),attempts_used:u.number().int().nonnegative().default(0),attempts_allowed:u.number().int().nonnegative().optional(),mistakes_used:u.number().int().nonnegative().default(0),mistakes_allowed:u.number().int().nonnegative().optional(),progress:u.record(u.string(),u.unknown()).default({}),score:u.number().default(0),score_revision:u.number().int().nonnegative().default(0),finished:u.boolean().default(!1),outcome:u.enum(["won","lost","incomplete","pending"]).optional(),share:ZE.optional()}),VN=Gt.extend({player_id:u.string(),played:u.number().int().nonnegative().default(0),won:u.number().int().nonnegative().default(0),current_streak:u.number().int().nonnegative().default(0),max_streak:u.number().int().nonnegative().default(0),distribution:u.record(u.string(),u.number()).default({}),constraints:u.record(u.string(),u.unknown()).default({})}),iv=u.object({rank:u.number().int().positive(),player_id:u.string(),display_name:u.string().optional(),score:u.number()}),WN=Gt.extend({round_id:u.string().optional(),order:u.enum(["high_first","low_first"]).default("high_first"),tie_break:u.enum(["earliest_play","fewest_attempts","none"]).default("none"),entries:u.array(iv).default([]),total:u.number().int().nonnegative().default(0),me:iv.optional()}),HN=u.object({error:u.object({code:u.string(),message:u.string(),retryable:u.boolean()})});var KE=u.enum(["draft","live","sleeping","throttled","expired","archived"]),VE=u.enum(["scheduled","open","locked","settled"]),sv=u.object({id:u.string(),label:u.string(),used:u.number(),limit:u.number(),unit:u.string()}),WE=u.object({date:u.string(),plays:u.number(),players:u.number()}),HE=u.object({id:u.string(),label:u.string(),state:VE,opensAt:u.string(),locksAt:u.string(),settledAt:u.string().nullable(),plays:u.number()}),JE=u.object({id:u.string(),name:u.string(),enabled:u.boolean(),consentRequired:u.boolean(),note:u.string()}),qE=u.object({number:u.number().int().positive(),title:u.string(),openedAt:u.string(),labels:u.array(u.string()).default([]),fromGame:u.boolean().default(!1)}),cv=u.object({at:u.string(),level:u.enum(["info","warn","error"]),roundId:u.string().nullable(),message:u.string()});var YE=u.enum(["absent","pending","ready","failed"]),XE=u.object({state:YE.default("absent"),url:u.string().nullable().default(null),regenerations:u.number().int().nonnegative().default(0),updatedAt:u.string().nullable().default(null)});var lv=u.object({section:u.string(),status:Qd}),QE=u.object({id:u.string(),name:u.string(),containerLabel:u.string().min(1).default(Qt),repository:u.string().nullable(),openIssues:u.number().int().nonnegative(),issues:u.array(qE).default([]),archetype:vt,offersPrize:u.boolean().default(!1),state:KE,archivePrefix:u.string().nullable().default(null),space:u.string().nullable().default(null).optional(),platformProject:u.string().nullable().default(null).optional(),platformEvent:u.string().nullable().default(null).optional(),platformElement:u.string().nullable().default(null).optional(),appSpec:u.object({version:u.string(),shape:u.string(),resource:u.string().nullable().default(null),specUrl:u.string().optional(),wording:u.array(u.string()).optional()}).nullable().default(null).optional(),art:XE.prefault({}).optional(),playgroundUrl:u.string().nullable(),playerEndpoint:u.string().nullable(),manifestRevision:u.string(),conformance:yt,contentHash:u.string(),sections:u.array(lv),meters:u.array(sv),history:u.array(WE),rounds:u.array(HE),destinations:u.array(JE),logs:u.array(cv),updatedAt:u.string()}),eT=u.object({login:u.string(),linkedAt:u.string()}),tT=u.object({enabled:u.boolean().default(!1),applicationId:u.string().nullable().default(null),writeKey:u.string().nullable().default(null)}),uv=u.enum(["pending","approved","refused"]),tR=u.enum(["manual","automatic"]);function na(e){let t=uv.safeParse(e.access);return t.success?t.data:"pending"}var nR=u.enum(["approved","refused"]),nT=u.object({id:u.string(),name:u.string(),tier:tp,ownerEmail:u.string(),access:uv.default("pending"),liveGameAllowance:u.number(),github:eT.nullable().default(null),signal:tT.prefault({}),meters:u.array(sv),games:u.array(QE)}),rR=nT.extend({gamesTotal:u.number().int().nonnegative()}),oR=u.object({player:u.string().nullable(),control:u.string().nullable(),playground:u.string().nullable()}),iR=u.object({id:u.string(),name:u.string(),archetype:vt,repository:u.string().nullable().default(null),manifestRevision:u.string(),contentHash:u.string(),conformance:yt,offersPrize:u.boolean().default(!1),sections:u.array(lv).default([]),containerLabel:u.string().min(1).optional()}),aR=u.object({uploadUrl:u.string(),publicUrl:u.string(),key:u.string(),expiresInSeconds:u.number().int().positive(),playerApiOrigin:u.string()}),sR=u.object({manifestRevision:u.string(),contentHash:u.string(),conformance:yt,offersPrize:u.boolean().default(!1),round:Ae.optional(),wording:u.array(u.string()).optional()}),rT=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),since:u.string().nullable().default(null),level:cv.shape.level.nullable().default(null)}),cR=u.enum(["access_pending","github_not_linked","live_allowance_reached","meter_breached","nothing_to_do","tier_required","game_archived","art_limit_reached","art_unavailable","round_source_unreadable"]),dv=u.enum(["workspace.created","workspace.approved","workspace.refused","github.linked","github.unlinked","game.registered","game.deployed","game.deploy_refused","round.provisioned","round.provision_failed","game.platform_provisioned","game.platform_provision_failed","art.requested","art.generated","art.failed","game.woken","game.suspended","game.archived","game.deleted","workspace.plan_changed","destination.changed","signal.enabled","signal.disabled"]),lR=u.object({id:u.string(),at:u.string(),action:dv,actor:u.object({kind:u.enum(["creator","operator","system"]),id:u.string(),email:u.string().nullable().default(null)}),gameId:u.string().nullable().default(null),correlationId:u.string(),detail:u.record(u.string(),u.unknown()).default({})}),oT=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),action:dv.nullable().default(null),actorId:u.string().nullable().default(null),gameId:u.string().nullable().default(null),from:u.string().nullable().default(null),to:u.string().nullable().default(null)});function pv(e){return e.filter(t=>t.limit>0&&t.used>=t.limit)}function mv(e){return e.limit<=0?0:Math.min(1,e.used/e.limit)}var pR=3600*24;var iT=u.object({key:u.string().min(1),label:u.string().default(""),values:u.record(u.string(),u.number().int().nonnegative())}),wR=u.object({corpus:u.literal("1"),measures:u.array(iT).min(1)}).superRefine((e,t)=>{let r=e.measures.map(o=>o.key);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["measures"],message:"Two measures share a key. A round names the measure it is counted on."})});var OR=1440*60;var vp=[{key:"play_again_label",label:"Play again button",type:"freetext",description:"What the button that starts the next round says, at the end of a finished one. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its play-again button.",section:"Wording"},{key:"result_button_label",label:"Result link",type:"freetext",description:"What the link back to a finished round says, for a fan who has already played today. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its see-your-result link.",section:"Wording"},{key:"share_button_label",label:"Share button",type:"freetext",description:"What the share button says at the end of a round. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its share button.",section:"Wording"}],_p=vp.map(e=>e.key),fv=[{key:"display_name",label:"Game name",type:"freetext",description:"What a fan sees at the top of the game. Leave it empty to use the name the game was deployed with.",readBy:"The game's own page, as its heading and its browser title.",section:"Identity"},{key:"strapline",label:"Strapline",type:"freetext",description:"One line under the name. Leave it empty and the line is not drawn.",readBy:"The game's own page, under the heading.",section:"Identity"},{key:"how_to_play",label:"How to play",type:"freetext",description:"The rules in a fan's words. Shown before they start, and reachable while they play.",readBy:"The game's own page, in its how-to-play panel.",section:"Identity"},{key:"reference_url",label:"Reference data",type:"freetext",description:"A link to JSON holding the data this game draws on, shared by every round. Fetched by the Engine, never sent to a fan's browser. Leave it empty if each round carries everything it needs.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"primary_colour",label:"Primary colour",type:"colour",description:"The colour of the button a fan presses. Everything else stays as the game was built.",readBy:"The game's own page, as the --gamestage-primary custom property.",section:"Brand"},{key:"play_button_label",label:"Main button",type:"freetext",description:"What the button that submits a fan's answer says. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its submit button.",section:"Wording"},...vp,{key:"rank_ladder",label:"Rank names",type:"collection",itemLabel:"{{rank_label}}",description:"What each rank is called, best first. The game decides which rank a fan earned; this is only what it is called. Leave it empty to use the game's own names.",readBy:"The Engine, which awards the rank and returns its name.",section:"Wording",fieldset:[{key:"rank_label",label:"Name",type:"freetext",description:'What a fan sees when they earn this rank, e.g. "Hall of Fame".',readBy:"The Engine, on a finished round.",section:"Wording"}]},{key:"round_selection",label:"How the live round is chosen",type:"freetext",description:"Calendar: the round on today's edition, which a producer prepares. Rotation: one of a pool, chosen by the clock, the same one for everybody playing at that moment. Leave it empty for calendar.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"round_window_seconds",label:"How long a round stays up",type:"number",description:"Under rotation, how many seconds each round is the live one before the next takes over. Leave it empty for a day.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data a round counts, when it holds more than one, e.g. "points". A round can name its own instead. Leave it empty if the data holds one measure.',readBy:"The control plane, when it joins a round to the reference data.",section:"Content",public:!1}],bp=[{key:"edition_name",label:"Edition name",type:"freetext",description:"What a fan sees this edition called. Leave it empty to use the game's own word for its container.",readBy:"The game's own page, wherever it names the round.",section:"This edition"},{key:"edition_strapline",label:"Edition line",type:"freetext",description:"A line for this edition only: a sponsor, a fixture, a date. Leave it empty and the line is not drawn.",readBy:"The game's own page, beside the edition name.",section:"This edition"},{key:"edition_source_url",label:"Edition source",type:"freetext",description:"A link to JSON holding what this edition is about, shared by every round in it. Fetched by the Engine, never sent to a fan's browser.",readBy:"The control plane, when it provisions a round.",section:"This edition",public:!1}],wp=[{key:"source_url",label:"Content source",type:"freetext",description:"A link to JSON holding this round's content. Fetched by the Engine when the round is provisioned, so it is never sent to a fan's browser and may hold the answers. Leave it empty to use the round in the game's manifest.",readBy:"The control plane, when it provisions the round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data this round counts, e.g. "assists". Leave it empty to count what the game counts.',readBy:"The control plane, when it joins this round to the reference data.",section:"Content",public:!1}],kp=[{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},{key:"round_target",label:"The target",type:"number",description:"The total a fan must get as close to as they can without going over. Public: it is the goal they are set, and the game is unplayable without it.",readBy:"The Engine, which marks against it, and the page, which shows it.",section:"This round"},{key:"round_target_label",label:"What is being counted",type:"freetext",description:'Shown beside the target, e.g. "Career Points".',readBy:"The game's own page, beside the target.",section:"This round"},{key:"round_slates",label:"The picks",type:"collection",itemLabel:"{{slate_label}}",description:"One group per pick, in the order a fan plays them. Five groups means five picks.",readBy:"The Engine, which marks against them, and the page, which draws them.",section:"This round",fieldset:[{key:"slate_label",label:"Group",type:"freetext",description:'What a fan sees above the choices, e.g. "1996-97 CHI".',readBy:"The game's own page.",section:"This round"},{key:"slate_entries",label:"Choices",type:"collection",itemLabel:"{{entry_label}}",description:"The choices a fan picks between in this group.",readBy:"The Engine and the page.",section:"This round",fieldset:[{key:"entry_label",label:"Name",type:"freetext",description:'What a fan sees, e.g. "Michael Jordan".',readBy:"The game's own page.",section:"This round"},{key:"entry_key",label:"Reference",type:"freetext",description:`The id this choice has in the game's own data, e.g. "jordami01". It is how the Engine finds what the choice is worth, so it has to match the data the game was deployed with. Never shown to a fan.`,readBy:"The Engine, to look up what this choice is worth.",section:"This round"}]}]}],hv=[{key:"prediction_question",label:"Question",type:"freetext",description:"What a fan is asked to call, in their words.",readBy:"The Engine, when it provisions the round.",section:"Content"},{key:"prediction_option",label:"Option",type:"freetext",description:"One thing a fan can call. Add one per outcome.",readBy:"The Engine, when it provisions the round.",section:"Content"}],xp={display_name:"displayName",strapline:"strapline",how_to_play:"howToPlay",primary_colour:"primaryColour",play_button_label:"playButtonLabel",play_again_label:"playAgainLabel",result_button_label:"resultButtonLabel",share_button_label:"shareButtonLabel",edition_name:"editionName",edition_strapline:"editionStrapline"};function Sp(e,t){let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp([`\\bpresentation\\s*\\.\\s*${r}\\b`,`\\bpresentation\\s*\\[\\s*["']${r}["']\\s*\\]`,`\\b${r}\\s*:`].join("|")).test(e)||t==="primaryColour"&&/\broot\s*:/.test(e)}function ra(e){return vp.filter(t=>Sp(e,xp[t.key])).map(t=>t.key)}var gv=Hm,vv=e=>{let t=We(e);return qa[t]??`gamestage-${t.replaceAll("_","-")}-element`},yv={hunt:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},push:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},group:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},forecast:{derivedFrom:"prediction",duration:{mode:"flexible"}}},cT=new Set(["freetext","wysiwyg","image","file"]),lT=e=>({key:e.key,type:e.type,...cT.has(e.type)?{localisable:!1}:{},...e.type==="collection"?{...e.itemLabel?{item_label:e.itemLabel}:{},fieldset:(e.fieldset??[]).map(t=>({label:t.label,key:t.key,...t.description?{description:t.description}:{}}))}:{}});function uT(e){let t=new Map,r=o=>{for(let n of o){let i=t.get(n.key);if(i){if(i.type!==n.type)throw new Error(`The field "${n.key}" is declared as both ${i.type} and ${n.type}. One key is one declaration; a level's own label and description travel on its field set entry, its type does not.`)}else t.set(n.key,n);r(n.fieldset??[])}};return r(e),[...t.values()]}function $p(e){let t=[];for(let r of e){let o=r.public===!1,n={label:r.label,key:r.key,description:r.description,...r.type==="collection"?{}:{mandatory:!1},...o?{public:!1,cloneable:!1}:{}},i=t.find(a=>a.name===r.section);i?i.properties.push(n):t.push({name:r.section,properties:[n]})}return t}function dT(e){let t=e.archetypes.map(We);for(let i of t)if(!gv[i])throw new Error(`No Studio element name for the ${i} archetype. Add one to ARCHETYPE_ELEMENT_NAMES rather than letting Studio show a blank type.`);let r=i=>`${e.urls.baseAppsUrl}/${i}`,o=new Set(e.wording??_p),n=fv.filter(i=>!_p.includes(i.key)||o.has(i.key));return{"spec.json":{name:e.name,id:e.id,version:e.version,base_apps_url:e.urls.baseAppsUrl,dash_image:e.urls.dashImage,embed_url:e.urls.embedUrl,elements:r("elements.json"),fields:r("fields.json"),project_settings:r("project_settings.json"),event_settings:r("event_settings.json"),schedule:!0,analytics:!0,live_activity:!0,localisation:!1},"elements.json":t.map(i=>({name:gv[i],content_type:vv(i),derived_from:yv[i]?.derivedFrom??"data",duration:yv[i]?.duration??{mode:"instant"},label:i==="forecast"?"{{question.text}}":e.name,custom_fields:$p([...wp,...i==="push"?kp:[]]),...i==="forecast"?{label_question:"Question",label_option:"Option",reveal_results:{modes:["manual"],default:"manual"},question:[{label:"Question",key:"text",field:"prediction_question",mandatory:"question"}],option:[{label:"Option",key:"text",field:"prediction_option",mandatory:"option"}]}:{}})),"fields.json":uT([...n,...bp,...wp,...hv,...kp]).map(lT),"project_settings.json":{sections:$p(n)},"event_settings.json":{sections:$p(bp)}}}function _v(e){return dT({name:e.gameName,id:e.gameId,wording:e.wording??[],version:`0.0.${e.manifestRevision}`,archetypes:[e.archetype],urls:e.urls})}var Mn=class extends Error{status;code;retryable;constructor(t,r,o,n){super(o),this.status=t,this.code=r,this.retryable=n,this.name="ControlPlaneError"}},pT=e=>new Promise(t=>setTimeout(t,e));function mT(e){let t=1e3*2**(e-1),r=t*.2*(Math.random()*2-1);return Math.round(t+r)}function bv(e){let t=e.fetch??globalThis.fetch,r=e.maxAttempts??4,o=e.baseUrl.replace(/\/+$/,"");return async function(i,a,s={}){let c=globalThis.location?.origin,l=new URL(`${o}${a}`,o.startsWith("/")?c:void 0);for(let[p,m]of Object.entries(s.query??{}))m!=null&&l.searchParams.set(p,String(m));let d;for(let p=1;p<=r;p++){let m=typeof e.token=="function"?await e.token():e.token,f=await t(l,{method:i,headers:{authorization:`Bearer ${m}`,...s.body===void 0?{}:{"content-type":"application/json"}},body:s.body===void 0?void 0:JSON.stringify(s.body)});if(f.ok)return await f.json();let h=await f.json().catch(()=>({}));if(d=new Mn(f.status,h.error?.code??"unknown",h.error?.message??f.statusText,h.error?.retryable??!1),!d.retryable||p===r)break;let b=Number(f.headers.get("retry-after"));await pT(Number.isFinite(b)&&b>0?b*1e3:mT(p))}throw d??new Mn(0,"unknown","Request failed.",!1)}}function wv(e){let t=bv(e);return{setWorkspaceAccess:(r,o)=>t("PUT",`/v1/admin/workspaces/${encodeURIComponent(r)}/access`,{body:{access:o}})}}function Un(e){let t=bv(e),r=i=>({...i,containerLabel:i.containerLabel??"Round"}),o=i=>({...i,access:na(i),games:(i.games??[]).map(r)}),n=i=>({...i,workspace:{...i.workspace,access:na(i.workspace??{}),games:(i.workspace?.games??[]).map(r)}});return{getWorkspace:async()=>o(await t("GET","/v1/workspace")),linkGitHub:async i=>n(await t("PUT","/v1/workspace/github",{body:{login:i}})),setPlan:async i=>n(await t("PUT","/v1/workspace/plan",{body:{tier:i}})),uploadTarget:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/uploads`,{body:{filename:a}}),pruneBundle:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/bundle`,{body:{filenames:a}}),async getGame(i){try{return r(await t("GET",`/v1/games/${encodeURIComponent(i)}`))}catch(a){if(a instanceof Mn&&a.status===404)return;throw a}},setAwake:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/state`,{body:{awake:a}}),setDestination:(i,a,s)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/destinations`,{body:{destination_id:a,enabled:s}}),registerGame:i=>t("POST","/v1/games",{body:i}),archiveGame:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/archive`),requestArt:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/art`),deploy:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/deploy`,{body:a}),refreshRound:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/round/refresh`),setSignal:async i=>n(await t("PUT","/v1/workspace/signal",{body:{enabled:i}})),async getEndpoints(i){try{return await t("GET",`/v1/games/${encodeURIComponent(i)}/endpoints`)}catch(a){if(a instanceof Mn&&a.status===404)return;throw a}},async getLogs(i,a){let{lines:s}=await t("GET",`/v1/games/${encodeURIComponent(i)}/logs`,{query:a});return s},async getAuditLog(i){let{records:a}=await t("GET","/v1/audit",{query:i});return a}}}var pj=600*1e3;function Ep(e){return e.playerId?.trim()||e.sourceIp?.trim()||"unknown"}function Tp(e,t){return`${e.length}:${e}${t}`}import{spawn as kv}from"node:child_process";import{chmod as fT,mkdir as hT,readFile as gT,rm as yT,writeFile as vT}from"node:fs/promises";import{homedir as _T,platform as Fn}from"node:os";import{join as xv}from"node:path";var Ap="https://api.workos.com",Ip=process.env.GAMESTAGE_CLIENT_ID??"client_01KYVPJ1MA6GA9EXTJ7GJ81YW4";async function Sv(){let e=await fetch(`${Ap}/user_management/authorize/device`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Ip})});if(!e.ok)throw new Error(`Could not start sign-in (${e.status}). ${await e.text()}`);return await e.json()}async function $v(e){let t=await fetch(`${Ap}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Ip,grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:e})}),r=await t.json();if(t.ok){let o=r.user;return{status:"ok",session:{accessToken:String(r.access_token??""),refreshToken:r.refresh_token?String(r.refresh_token):void 0,email:o?.email,userId:o?.id}}}switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down"};case"expired_token":return{status:"expired"};default:return{status:"denied",reason:String(r.error_description??r.error??"unknown error")}}}function Ev(e){let t=Fn()==="darwin"?"open":Fn()==="win32"?"cmd":"xdg-open",r=Fn()==="win32"?["/c","start","",e]:[e];try{kv(t,r,{stdio:"ignore",detached:!0}).unref()}catch{}}var Gn="gamestage-cli",Tv=xv(_T(),".gamestage"),oa=xv(Tv,"credentials.json");function Cp(e,t){return new Promise(r=>{let o=kv("security",e,{stdio:["pipe","pipe","ignore"]}),n="";o.stdout.on("data",i=>n+=i),o.on("error",()=>r(null)),o.on("close",i=>r(i===0?n.trim():null)),t!==void 0?o.stdin.end(t):o.stdin.end()})}async function Pp(e){let t=JSON.stringify(e);return Fn()==="darwin"&&await Cp(["add-generic-password","-a",Gn,"-s",Gn,"-U","-w",t])!==null?"keychain":(await hT(Tv,{recursive:!0,mode:448}),await vT(oa,t,{mode:384}),await fT(oa,384),"file")}function bT(e){try{let[,t]=e.split("."),{exp:r}=JSON.parse(Buffer.from(t,"base64url").toString());return typeof r!="number"?!0:r*1e3-Date.now()<3e4}catch{return!0}}async function wT(e){if(!e.refreshToken)return null;let t=await fetch(`${Ap}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Ip,grant_type:"refresh_token",refresh_token:e.refreshToken})});if(!t.ok)return null;let r=await t.json();return r.access_token?{...e,accessToken:String(r.access_token),refreshToken:r.refresh_token?String(r.refresh_token):e.refreshToken}:null}async function kT(){if(Fn()==="darwin"){let e=await Cp(["find-generic-password","-a",Gn,"-s",Gn,"-w"]);if(e)try{return JSON.parse(e)}catch{}}try{return JSON.parse(await gT(oa,"utf8"))}catch{return null}}async function Av(){Fn()==="darwin"&&await Cp(["delete-generic-password","-a",Gn,"-s",Gn]),await yT(oa,{force:!0})}async function Se(){let e=await kT();if(!e)return null;if(!bT(e.accessToken)||!e.refreshToken)return e;let t=await wT(e);return t?(await Pp(t),t):null}import{randomUUID as xT}from"node:crypto";var ST=/-[0-9a-f]{4}$/;function ia(e){return`${e}-${xT().replace(/-/g,"").slice(0,4)}`}function Iv(e){return ST.test(e)}var Gr=process.env.GAMESTAGE_SITE_URL??"https://gamestage.ai";function Cv(e){return`${Gr}/stage/games/${encodeURIComponent(e)}?tab=overview`}function Pv(e){return e&&new Set(["hunt","push","group","forecast"]).has(e)?`${Gr}/docs/game-formats#${e}`:`${Gr}/docs`}var se=process.env.GAMESTAGE_CONTROL_URL??"https://api.gamestage.ai";function $T(e){try{let t=new URL(e).hostname.toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="::1"||t.startsWith("127.")}catch{return!1}}function ET(e=se,t=process.env){if(t.GAMESTAGE_TEST_RUN==="1"&&!$T(e)&&t.GAMESTAGE_ALLOW_REMOTE_TESTS!=="1")return`Refusing to register a test game against non-local control plane ${e}. Use the throwaway local control plane, or set GAMESTAGE_ALLOW_REMOTE_TESTS=1 for a deliberate real-plane run.`}function Zn(e=se){let t=ET(e);t&&P(t)}async function $e(){let e=await Se();return e||P("You are not signed in.",["Run `gamestage login`. It creates the account too if you do not have one.","Inspecting, scaffolding and local rounds keep working without one."]),{client:Un({baseUrl:se,token:async()=>(await Se())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}async function Ov(){let e=await Se();return e||P("You are not signed in.",["Run `gamestage login`. Approving a creator needs an operator's own session."]),{admin:wv({baseUrl:se,token:async()=>(await Se())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}var Op="access_pending";async function aa(e){try{let t=await e.getWorkspace(),r=t?.access;return r==="approved"||r==="pending"||r==="refused"?{access:r,workspace:t}:{access:"unreported",workspace:t}}catch(t){let r=t.status,o=t.code;return o===Op?{access:"pending"}:r===404||o==="not_found"?{access:"unknown",problem:"no_control_plane",reason:`Nothing is serving a control plane at ${se}.`,detail:["You are signed in, and deploying will fail until this is pointed somewhere real.","Set GAMESTAGE_CONTROL_URL to your control plane and run this again."]}:r===401||r===403?{access:"unknown",problem:"token_refused",reason:"The control plane refused this account's token.",detail:[`It is at ${se}.`,"A token from one environment is refused by another, so check which one you signed into."]}:{access:"unknown",problem:"unreachable",reason:`Could not reach the control plane at ${se}.`,detail:[String(t.message??t),"You are signed in. Deploying will fail until this answers."]}}}function Zr(e){switch(e.access){case"approved":return{ok:!0,status:"approved",access:"approved",heading:"Approved",message:"Your account is approved, so every command works, including deploy.",next:["`gamestage status` shows the workspace, its games and what they are using."]};case"pending":return{ok:!0,status:"pending_approval",access:"pending",code:Op,heading:"Registered, waiting for approval",message:"You are registered and your account is waiting for approval. That is the normal path for a new account, and approval is a person's decision today.",next:["Nothing is wrong and nothing is lost. There is no second form to fill in.","Inspecting a prototype, scaffolding a game and writing a round all work now and need no approval.","`gamestage status` re-checks approval. It never opens the browser again."]};case"refused":return{ok:!0,status:"access_refused",access:"refused",heading:"Access refused",message:"This account has been refused access. Signing in worked, so this is a decision about the account rather than a broken token.",next:["Nothing in the CLI changes this, and running `gamestage login` again will not.","Inspecting, scaffolding and writing a round still work and need no account.",`If you think this is wrong, say so where you registered: ${Gr}.`]};case"unreported":return{ok:!0,status:"access_not_reported",access:null,heading:"Signed in",message:"This control plane answered and does not report an access state, so whether this account is approved is not known here.",next:["It predates the access state rather than being broken, so carry on.","A deploy that is refused for approval will say so in its own words."]};default:return{ok:!1,status:e.problem==="no_control_plane"?"no_control_plane":e.problem==="token_refused"?"token_refused":"control_plane_unreachable",access:null,heading:"Signed in, and the control plane is not usable",message:e.reason,next:e.detail}}}function Nv(e){return e.changed?e.access==="approved"?{ok:!0,status:"approved",access:"approved",heading:"Approved",message:`${e.workspaceId} was ${e.previous} and is now approved.`,next:["Their next `gamestage status` says approved, and deploy works from then on."]}:{ok:!0,status:"refused",access:"refused",heading:"Refused",message:`${e.workspaceId} was ${e.previous} and is now refused.`,next:["Their next `gamestage status` says refused, and says how to argue with it."]}:{ok:!0,status:"unchanged",access:e.access,heading:"No change",message:`${e.workspaceId} was already ${e.previous}. Nothing was written.`,next:["No audit record either: the trail records transitions, and this was not one."]}}function Bn(e){if(I(e.heading),v(` ${e.message}`),e.next.length){v();for(let t of e.next)A(t)}v()}function Ie(e){let t=[],r=e.status,o=e.code;if(o===Op){let n=Zr({access:"pending"});R()?z({ok:n.ok,status:n.status,access:n.access,code:n.code,message:n.message,next:n.next}):Bn(n),process.exit(0)}r===401?t.push("Your session has expired. Run `gamestage login` again."):r===403?t.push("Either your session expired or that is not something this workspace is allowed to do. `gamestage login` rules out the first."):r===429?t.push("You are being rate limited. Wait a moment and try again."):e.retryable&&t.push("This one is worth retrying: the failure was at our end."),o&&t.push(`Code: ${o}`),t.push(`Control plane: ${se}`),P(e instanceof Error?e.message:"The control plane call failed.",t)}var Qe="favicon.svg",Br=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
7148
+ `+e.slice(a+1):c+=e.slice(n),c.slice(1)}function TE(e){for(var t="",r=0,o,n=0;n<e.length;r>=65536?n+=2:n++)r=Mr(e,n),o=ae[r],!o&&Zr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=o||vE(r);return t}function AE(e,t,r){var o="",n=e.tag,i,a,s;for(i=0,a=r.length;i<a;i+=1)s=r[i],e.replacer&&(s=e.replacer.call(r,String(i),s)),(Xe(e,t,s,!1,!1)||typeof s>"u"&&Xe(e,t,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=n,e.dump="["+o+"]"}function yy(e,t,r,o){var n="",i=e.tag,a,s,c;for(a=0,s=r.length;a<s;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(Xe(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Xe(e,t+1,null,!0,!0,!1,!0))&&((!o||n!=="")&&(n+=up(e,t)),e.dump&&Fr===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=i,e.dump=n||"[]"}function IE(e,t,r){var o="",n=e.tag,i=Object.keys(r),a,s,c,l,p;for(a=0,s=i.length;a<s;a+=1)p="",o!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=i[a],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),Xe(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Xe(e,t,l,!1,!1)&&(p+=e.dump,o+=p));e.tag=n,e.dump="{"+o+"}"}function CE(e,t,r,o){var n="",i=e.tag,a=Object.keys(r),s,c,l,p,d,m;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new me("sortKeys must be a boolean or a function");for(s=0,c=a.length;s<c;s+=1)m="",(!o||n!=="")&&(m+=up(e,t)),l=a[s],p=r[l],e.replacer&&(p=e.replacer.call(r,l,p)),Xe(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Fr===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,d&&(m+=up(e,t)),Xe(e,t+1,p,!0,d)&&(e.dump&&Fr===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,n+=m));e.tag=i,e.dump=n||"{}"}function vy(e,t,r){var o,n,i,a,s,c;for(n=r?e.explicitTypes:e.implicitTypes,i=0,a=n.length;i<a;i+=1)if(s=n[i],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t=="object"&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(r?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag="?",s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,Yy.call(s.represent)==="[object Function]")o=s.represent(t,c);else if(qy.call(s.represent,c))o=s.represent[c](t,c);else throw new me("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');e.dump=o}return!0}return!1}function Xe(e,t,r,o,n,i,a){e.tag=null,e.dump=r,vy(e,r,!1)||vy(e,r,!0);var s=Yy.call(e.dump),c=o,l;o&&(o=e.flowLevel<0||e.flowLevel>t);var p=s==="[object Object]"||s==="[object Array]",d,m;if(p&&(d=e.duplicates.indexOf(r),m=d!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(p&&m&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s==="[object Object]")o&&Object.keys(e.dump).length!==0?(CE(e,t,e.dump,n),m&&(e.dump="&ref_"+d+e.dump)):(IE(e,t,e.dump),m&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?yy(e,t-1,e.dump,n):yy(e,t,e.dump,n),m&&(e.dump="&ref_"+d+e.dump)):(AE(e,t,e.dump),m&&(e.dump="&ref_"+d+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&$E(e,e.dump,t,i,c);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new me("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}function PE(e,t){var r=[],o=[],n,i;for(pp(e,r,o),n=0,i=o.length;n<i;n+=1)t.duplicates.push(r[o[n]]);t.usedDuplicates=new Array(i)}function pp(e,t,r){var o,n,i;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,i=e.length;n<i;n+=1)pp(e[n],t,r);else for(o=Object.keys(e),n=0,i=o.length;n<i;n+=1)pp(e[o[n]],t,r)}function OE(e,t){t=t||{};var r=new bE(t);r.noRefs||PE(e,r);var o=e;return r.replacer&&(o=r.replacer.call({"":o},"",o)),Xe(r,0,o,!0,!0)?r.dump+`
7149
+ `:""}var NE=OE,RE={dump:NE};function vp(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var jE=oe,DE=wy,LE=$y,zE=Cy,ME=Py,UE=fp,FE=Jy.load,GE=Jy.loadAll,ZE=RE.dump,BE=me,KE={binary:Dy,float:Iy,map:Sy,null:Ey,pairs:zy,set:My,timestamp:Ry,bool:Ty,int:Ay,merge:jy,omap:Ly,seq:xy,str:ky},VE=vp("safeLoad","load"),WE=vp("safeLoadAll","loadAll"),HE=vp("safeDump","dump"),_p={Type:jE,Schema:DE,FAILSAFE_SCHEMA:LE,JSON_SCHEMA:zE,CORE_SCHEMA:ME,DEFAULT_SCHEMA:UE,load:FE,loadAll:GE,dump:ZE,YAMLException:BE,types:KE,safeLoad:VE,safeLoadAll:WE,safeDump:HE};function _e(e){let t;try{t=_p.load(e)}catch(n){return{ok:!1,issues:[{path:"(document)",message:n instanceof Error?n.message:"YAML parse failed"}]}}if(t===null||typeof t!="object")return{ok:!1,issues:[{path:"(document)",message:"Manifest must be a YAML mapping"}]};let r=zt.safeParse(t);if(!r.success)return{ok:!1,issues:JE(r.error)};let o=ty(r.data);return o.length?{ok:!1,issues:o}:{ok:!0,manifest:r.data}}function JE(e){return e.issues.map(t=>({path:t.path.length?t.path.join("."):"(root)",message:t.message}))}function ta(e){return _p.dump(e,{indent:2,lineWidth:100,noRefs:!0,sortKeys:!1})}function na(e,t){return zt.parse({manifest:{schema_version:Hi,revision:0,conformance:"L0"},app:{id:e,title:t,status:"proposed"}})}var ee={runtime:"/play/v1/games/{game}/runtime",currentRound:"/play/v1/games/{game}/rounds/current",round:"/play/v1/games/{game}/rounds/{round}",plays:"/play/v1/games/{game}/rounds/{round}/plays",session:"/play/v1/games/{game}/session",roundState:"/play/v1/games/{game}/rounds/{round}/players/me",profile:"/play/v1/games/{game}/players/me/profile",leaderboard:"/play/v1/games/{game}/leaderboard"},ra="/play";var sv="2.0",Ft=u.object({server_time:u.string(),snapshot:u.string()}),YE=u.enum(["at_commit","at_settlement"]),qE=u.enum(["shared","per_player","feed"]),XE=u.object({kind:u.enum(["fixed","local_midnight","feed","continuous"]),timezone:u.string().optional()}),aR=Ft.extend({game:u.string(),api_version:u.literal(sv).default(sv),archetype:vt,marking:YE,challenge_source:qE,schedule:XE,updates:u.object({transport:u.enum(["poll","socket"]),freshness_seconds:u.number().int().positive()}),display:u.record(u.string(),u.unknown()).default({}),identity:u.object({required:u.boolean(),provider:u.string(),anonymous_play:u.boolean().default(!1)}),archive:u.boolean().default(!1),capabilities:u.array(u.string()).default([])}),QE=u.object({accepting_plays:u.boolean(),results_available:u.boolean(),solution_revealed:u.boolean(),closed:u.boolean()}),sR=Ft.extend({id:u.string(),number:u.number().int().positive().optional(),origin:zr.optional(),version:u.number().int().nonnegative(),can:QE,opens_at:u.string().optional(),locks_at:u.string().optional(),challenge_instance_id:u.string().nullable().default(null),challenge:u.record(u.string(),u.unknown()).default({}),solution:u.record(u.string(),u.unknown()).optional()}),cR=Ft.extend({token:u.string(),player_id:u.string(),kind:u.literal("anonymous")}),lv=u.object({idempotency_key:u.string().min(8),round_version:u.number().int().nonnegative(),challenge_instance_id:u.string().nullable().default(null),payload:u.record(u.string(),u.unknown())}),eT=u.enum(["accepted","rejected","duplicate","stale","busy"]),tT=u.object({key:u.string(),verdict:u.enum(["correct","close","wrong","higher","lower","unknown"]),label:u.string().optional()}),lR=Ft.extend({play_id:u.string(),outcome:eT,reason:u.string().optional(),round_version:u.number().int().nonnegative(),retry_after_seconds:u.number().int().positive().optional(),marked:u.boolean().default(!0),feedback:u.array(tT).default([]),round_state:u.lazy(()=>rT).optional()}),nT=u.object({title:u.string(),grid:u.array(u.string()).default([]),text:u.string().optional()}),rT=Ft.extend({player_id:u.string(),round_id:u.string(),attempts_used:u.number().int().nonnegative().default(0),attempts_allowed:u.number().int().nonnegative().optional(),mistakes_used:u.number().int().nonnegative().default(0),mistakes_allowed:u.number().int().nonnegative().optional(),progress:u.record(u.string(),u.unknown()).default({}),score:u.number().default(0),score_revision:u.number().int().nonnegative().default(0),finished:u.boolean().default(!1),outcome:u.enum(["won","lost","incomplete","pending"]).optional(),share:nT.optional()}),uR=Ft.extend({player_id:u.string(),played:u.number().int().nonnegative().default(0),won:u.number().int().nonnegative().default(0),current_streak:u.number().int().nonnegative().default(0),max_streak:u.number().int().nonnegative().default(0),distribution:u.record(u.string(),u.number()).default({}),constraints:u.record(u.string(),u.unknown()).default({})});function oa(e,t){let r=t==="won"?e.current_streak+1:t==="lost"?0:e.current_streak;return{...e,played:e.played+1,won:e.won+(t==="won"?1:0),current_streak:r,max_streak:Math.max(e.max_streak,r)}}var cv=u.object({rank:u.number().int().positive(),player_id:u.string(),display_name:u.string().optional(),score:u.number()}),dR=Ft.extend({round_id:u.string().optional(),order:u.enum(["high_first","low_first"]).default("high_first"),tie_break:u.enum(["earliest_play","fewest_attempts","none"]).default("none"),entries:u.array(cv).default([]),total:u.number().int().nonnegative().default(0),truncated:u.boolean().default(!1),me:cv.optional()}),pR=u.object({error:u.object({code:u.string(),message:u.string(),retryable:u.boolean()})});var oT=u.enum(["draft","live","sleeping","throttled","expired","archived"]),iT=u.enum(["scheduled","open","locked","settled"]),uv=u.object({id:u.string(),label:u.string(),used:u.number(),limit:u.number(),unit:u.string()}),aT=u.object({date:u.string(),plays:u.number(),players:u.number()}),sT=u.object({id:u.string(),label:u.string(),state:iT,opensAt:u.string(),locksAt:u.string(),settledAt:u.string().nullable(),plays:u.number()}),cT=u.object({id:u.string(),name:u.string(),enabled:u.boolean(),consentRequired:u.boolean(),note:u.string()}),lT=u.object({number:u.number().int().positive(),title:u.string(),openedAt:u.string(),labels:u.array(u.string()).default([]),fromGame:u.boolean().default(!1)}),dv=u.object({at:u.string(),level:u.enum(["info","warn","error"]),roundId:u.string().nullable(),message:u.string()});var uT=u.enum(["absent","pending","ready","failed"]),dT=u.object({state:uT.default("absent"),url:u.string().nullable().default(null),regenerations:u.number().int().nonnegative().default(0),updatedAt:u.string().nullable().default(null)});function pv(e,t=new Date){let r=typeof t=="string"?Date.parse(t):t.getTime(),o,n=Number.NEGATIVE_INFINITY;for(let i of e.rounds){let a=Date.parse(i.locksAt);Number.isNaN(a)||a>n&&(n=a,o=i)}return o?n>r?{state:"live",round:o}:{state:"stale",round:o,lockedForMs:r-n}:{state:"none"}}function mv(e){if(e.state!=="stale")return null;let t=Math.floor(e.lockedForMs/36e5),r=t<1?`${Math.max(1,Math.floor(e.lockedForMs/6e4))} minutes`:t<48?`${t} hours`:`${Math.floor(t/24)} days`;return`The round this game is serving, ${e.round.label}, locked ${r} ago and nothing has replaced it. Fans are playing a closed round. Run \`gamestage deploy\` or refresh the round to move it on.`}var fv=u.object({section:u.string(),status:np}),pT=u.object({id:u.string(),name:u.string(),containerLabel:u.string().min(1).default(en),repository:u.string().nullable(),openIssues:u.number().int().nonnegative(),issues:u.array(lT).default([]),archetype:vt,offersPrize:u.boolean().default(!1),state:oT,archivePrefix:u.string().nullable().default(null),space:u.string().nullable().default(null).optional(),platformProject:u.string().nullable().default(null).optional(),platformEvent:u.string().nullable().default(null).optional(),platformElement:u.string().nullable().default(null).optional(),studioUrl:u.string().nullable().default(null).optional(),appSpec:u.object({version:u.string(),shape:u.string(),resource:u.string().nullable().default(null),specUrl:u.string().optional(),wording:u.array(u.string()).optional()}).nullable().default(null).optional(),art:dT.prefault({}).optional(),playgroundUrl:u.string().nullable(),playerEndpoint:u.string().nullable(),manifestRevision:u.string(),conformance:yt,contentHash:u.string(),sections:u.array(fv),meters:u.array(uv),history:u.array(aT),rounds:u.array(sT),destinations:u.array(cT),logs:u.array(dv),updatedAt:u.string()}),mT=u.object({login:u.string(),linkedAt:u.string()}),fT=u.object({enabled:u.boolean().default(!1),applicationId:u.string().nullable().default(null),writeKey:u.string().nullable().default(null)}),hv=u.enum(["pending","approved","refused"]),_R=u.enum(["manual","automatic"]);function ia(e){let t=hv.safeParse(e.access);return t.success?t.data:"pending"}var bR=u.enum(["approved","refused"]),hT=u.object({id:u.string(),name:u.string(),tier:op,ownerEmail:u.string(),access:hv.default("pending"),liveGameAllowance:u.number(),github:mT.nullable().default(null),signal:fT.prefault({}),meters:u.array(uv),games:u.array(pT)}),wR=hT.extend({gamesTotal:u.number().int().nonnegative()}),kR=u.object({player:u.string().nullable(),control:u.string().nullable(),playground:u.string().nullable()}),xR=u.object({id:u.string(),name:u.string(),archetype:vt,repository:u.string().nullable().default(null),manifestRevision:u.string(),contentHash:u.string(),conformance:yt,offersPrize:u.boolean().default(!1),sections:u.array(fv).default([]),containerLabel:u.string().min(1).optional()}),SR=u.object({uploadUrl:u.string(),publicUrl:u.string(),key:u.string(),expiresInSeconds:u.number().int().positive(),playerApiOrigin:u.string()}),$R=u.object({manifestRevision:u.string(),contentHash:u.string(),conformance:yt,offersPrize:u.boolean().default(!1),round:Pe.optional(),wording:u.array(u.string()).optional()}),gT=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),since:u.string().nullable().default(null),level:dv.shape.level.nullable().default(null)}),ER=u.enum(["access_pending","github_not_linked","live_allowance_reached","meter_breached","nothing_to_do","tier_required","game_archived","art_limit_reached","art_unavailable","round_source_unreadable"]),gv=u.enum(["workspace.created","workspace.approved","workspace.refused","github.linked","github.unlinked","game.registered","game.deployed","game.deploy_refused","round.provisioned","round.provision_failed","game.platform_provisioned","game.platform_provision_failed","art.requested","art.generated","art.failed","game.woken","game.suspended","game.archived","game.deleted","workspace.plan_changed","destination.changed","signal.enabled","signal.disabled"]),TR=u.object({id:u.string(),at:u.string(),action:gv,actor:u.object({kind:u.enum(["creator","operator","system"]),id:u.string(),email:u.string().nullable().default(null)}),gameId:u.string().nullable().default(null),correlationId:u.string(),detail:u.record(u.string(),u.unknown()).default({})}),yT=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),action:gv.nullable().default(null),actorId:u.string().nullable().default(null),gameId:u.string().nullable().default(null),from:u.string().nullable().default(null),to:u.string().nullable().default(null)});function yv(e){return e.filter(t=>t.limit>0&&t.used>=t.limit)}function vv(e){return e.limit<=0?0:Math.min(1,e.used/e.limit)}var CR=3600*24;var vT=u.object({key:u.string().min(1),label:u.string().default(""),values:u.record(u.string(),u.number().int().nonnegative())}),MR=u.object({corpus:u.literal("1"),measures:u.array(vT).min(1)}).superRefine((e,t)=>{let r=e.measures.map(o=>o.key);new Set(r).size!==r.length&&t.addIssue({code:"custom",path:["measures"],message:"Two measures share a key. A round names the measure it is counted on."})});var YR=1440*60;var wp=[{key:"play_again_label",label:"Play again button",type:"freetext",description:"What the button that starts the next round says, at the end of a finished one. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its play-again button.",section:"Wording"},{key:"result_button_label",label:"Result link",type:"freetext",description:"What the link back to a finished round says, for a fan who has already played today. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its see-your-result link.",section:"Wording"},{key:"share_button_label",label:"Share button",type:"freetext",description:"What the share button says at the end of a round. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its share button.",section:"Wording"}],kp=wp.map(e=>e.key),_v=[{key:"display_name",label:"Game name",type:"freetext",description:"What a fan sees at the top of the game. Leave it empty to use the name the game was deployed with.",readBy:"The game's own page, as its heading and its browser title.",section:"Identity"},{key:"strapline",label:"Strapline",type:"freetext",description:"One line under the name. Leave it empty and the line is not drawn.",readBy:"The game's own page, under the heading.",section:"Identity"},{key:"how_to_play",label:"How to play",type:"freetext",description:"The rules in a fan's words. Shown before they start, and reachable while they play.",readBy:"The game's own page, in its how-to-play panel.",section:"Identity"},{key:"reference_url",label:"Reference data",type:"freetext",description:"A link to JSON holding the data this game draws on, shared by every round. Fetched by the Engine, never sent to a fan's browser. Leave it empty if each round carries everything it needs.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"primary_colour",label:"Primary colour",type:"colour",description:"The colour of the button a fan presses. Everything else stays as the game was built.",readBy:"The game's own page, as the --gamestage-primary custom property.",section:"Brand"},{key:"play_button_label",label:"Main button",type:"freetext",description:"What the button that submits a fan's answer says. Leave it empty to keep the game's own word.",readBy:"The game's own page, on its submit button.",section:"Wording"},...wp,{key:"rank_ladder",label:"Rank names",type:"collection",itemLabel:"{{rank_label}}",description:"What each rank is called, best first. The game decides which rank a fan earned; this is only what it is called. Leave it empty to use the game's own names.",readBy:"The Engine, which awards the rank and returns its name.",section:"Wording",fieldset:[{key:"rank_label",label:"Name",type:"freetext",description:'What a fan sees when they earn this rank, e.g. "Hall of Fame".',readBy:"The Engine, on a finished round.",section:"Wording"}]},{key:"round_selection",label:"How the live round is chosen",type:"freetext",description:"Calendar: the round on today's edition, which a producer prepares. Rotation: one of a pool, chosen by the clock, the same one for everybody playing at that moment. Leave it empty for calendar.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"round_window_seconds",label:"How long a round stays up",type:"number",description:"Under rotation, how many seconds each round is the live one before the next takes over. Leave it empty for a day.",readBy:"The control plane, when it provisions a round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data a round counts, when it holds more than one, e.g. "points". A round can name its own instead. Leave it empty if the data holds one measure.',readBy:"The control plane, when it joins a round to the reference data.",section:"Content",public:!1}],xp=[{key:"edition_name",label:"Edition name",type:"freetext",description:"What a fan sees this edition called. Leave it empty to use the game's own word for its container.",readBy:"The game's own page, wherever it names the round.",section:"This edition"},{key:"edition_strapline",label:"Edition line",type:"freetext",description:"A line for this edition only: a sponsor, a fixture, a date. Leave it empty and the line is not drawn.",readBy:"The game's own page, beside the edition name.",section:"This edition"},{key:"edition_source_url",label:"Edition source",type:"freetext",description:"A link to JSON holding what this edition is about, shared by every round in it. Fetched by the Engine, never sent to a fan's browser.",readBy:"The control plane, when it provisions a round.",section:"This edition",public:!1}],Sp=[{key:"source_url",label:"Content source",type:"freetext",description:"A link to JSON holding this round's content. Fetched by the Engine when the round is provisioned, so it is never sent to a fan's browser and may hold the answers. Leave it empty to use the round in the game's manifest.",readBy:"The control plane, when it provisions the round.",section:"Content",public:!1},{key:"measure",label:"Measure",type:"freetext",description:'Which column of the reference data this round counts, e.g. "assists". Leave it empty to count what the game counts.',readBy:"The control plane, when it joins this round to the reference data.",section:"Content",public:!1}],$p=[{key:"round_prompt",label:"What a fan is told",type:"freetext",description:"The line above the board, in a fan's words. Leave it empty to keep the wording the game was built with.",readBy:"The game's own page, above the board.",section:"This round"},{key:"round_target",label:"The target",type:"number",description:"The total a fan must get as close to as they can without going over. Public: it is the goal they are set, and the game is unplayable without it.",readBy:"The Engine, which marks against it, and the page, which shows it.",section:"This round"},{key:"round_target_label",label:"What is being counted",type:"freetext",description:'Shown beside the target, e.g. "Career Points".',readBy:"The game's own page, beside the target.",section:"This round"},{key:"round_slates",label:"The picks",type:"collection",itemLabel:"{{slate_label}}",description:"One group per pick, in the order a fan plays them. Five groups means five picks.",readBy:"The Engine, which marks against them, and the page, which draws them.",section:"This round",fieldset:[{key:"slate_label",label:"Group",type:"freetext",description:'What a fan sees above the choices, e.g. "1996-97 CHI".',readBy:"The game's own page.",section:"This round"},{key:"slate_entries",label:"Choices",type:"collection",itemLabel:"{{entry_label}}",description:"The choices a fan picks between in this group.",readBy:"The Engine and the page.",section:"This round",fieldset:[{key:"entry_label",label:"Name",type:"freetext",description:'What a fan sees, e.g. "Michael Jordan".',readBy:"The game's own page.",section:"This round"},{key:"entry_key",label:"Reference",type:"freetext",description:`The id this choice has in the game's own data, e.g. "jordami01". It is how the Engine finds what the choice is worth, so it has to match the data the game was deployed with. Never shown to a fan.`,readBy:"The Engine, to look up what this choice is worth.",section:"This round"}]}]}],bv=[{key:"prediction_question",label:"Question",type:"freetext",description:"What a fan is asked to call, in their words.",readBy:"The Engine, when it provisions the round.",section:"Content"},{key:"prediction_option",label:"Option",type:"freetext",description:"One thing a fan can call. Add one per outcome.",readBy:"The Engine, when it provisions the round.",section:"Content"}],Ep={display_name:"displayName",strapline:"strapline",how_to_play:"howToPlay",primary_colour:"primaryColour",play_button_label:"playButtonLabel",play_again_label:"playAgainLabel",result_button_label:"resultButtonLabel",share_button_label:"shareButtonLabel",edition_name:"editionName",edition_strapline:"editionStrapline"};function Tp(e,t){let r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp([`\\bpresentation\\s*\\.\\s*${r}\\b`,`\\bpresentation\\s*\\[\\s*["']${r}["']\\s*\\]`,`\\b${r}\\s*:`].join("|")).test(e)||t==="primaryColour"&&/\broot\s*:/.test(e)}function aa(e){return wp.filter(t=>Tp(e,Ep[t.key])).map(t=>t.key)}var wv=qm,xv=e=>{let t=We(e);return Qa[t]??`gamestage-${t.replaceAll("_","-")}-element`},kv={hunt:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},push:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},group:{derivedFrom:"data",duration:{mode:"fixed",default:86400}},forecast:{derivedFrom:"prediction",duration:{mode:"flexible"}}},wT=new Set(["freetext","wysiwyg","image","file"]),kT=e=>({key:e.key,type:e.type,...wT.has(e.type)?{localisable:!1}:{},...e.type==="collection"?{...e.itemLabel?{item_label:e.itemLabel}:{},fieldset:(e.fieldset??[]).map(t=>({label:t.label,key:t.key,...t.description?{description:t.description}:{}}))}:{}});function xT(e){let t=new Map,r=o=>{for(let n of o){let i=t.get(n.key);if(i){if(i.type!==n.type)throw new Error(`The field "${n.key}" is declared as both ${i.type} and ${n.type}. One key is one declaration; a level's own label and description travel on its field set entry, its type does not.`)}else t.set(n.key,n);r(n.fieldset??[])}};return r(e),[...t.values()]}function Ap(e){let t=[];for(let r of e){let o=r.public===!1,n={label:r.label,key:r.key,description:r.description,...r.type==="collection"?{}:{mandatory:!1},...o?{public:!1,cloneable:!1}:{}},i=t.find(a=>a.name===r.section);i?i.properties.push(n):t.push({name:r.section,properties:[n]})}return t}function ST(e){let t=e.archetypes.map(We);for(let i of t)if(!wv[i])throw new Error(`No Studio element name for the ${i} archetype. Add one to ARCHETYPE_ELEMENT_NAMES rather than letting Studio show a blank type.`);let r=i=>`${e.urls.baseAppsUrl}/${i}`,o=new Set(e.wording??kp),n=_v.filter(i=>!kp.includes(i.key)||o.has(i.key));return{"spec.json":{name:e.name,id:e.id,version:e.version,base_apps_url:e.urls.baseAppsUrl,dash_image:e.urls.dashImage,embed_url:e.urls.embedUrl,elements:r("elements.json"),fields:r("fields.json"),project_settings:r("project_settings.json"),event_settings:r("event_settings.json"),schedule:!0,analytics:!0,live_activity:!0,localisation:!1},"elements.json":t.map(i=>({name:wv[i],content_type:xv(i),derived_from:kv[i]?.derivedFrom??"data",duration:kv[i]?.duration??{mode:"instant"},label:i==="forecast"?"{{question.text}}":e.name,custom_fields:Ap([...Sp,...i==="push"?$p:[]]),...i==="forecast"?{label_question:"Question",label_option:"Option",reveal_results:{modes:["manual"],default:"manual"},question:[{label:"Question",key:"text",field:"prediction_question",mandatory:"question"}],option:[{label:"Option",key:"text",field:"prediction_option",mandatory:"option"}]}:{}})),"fields.json":xT([...n,...xp,...Sp,...bv,...$p]).map(kT),"project_settings.json":{sections:Ap(n)},"event_settings.json":{sections:Ap(xp)}}}function Sv(e){return ST({name:e.gameName,id:e.gameId,wording:e.wording??[],version:`0.0.${e.manifestRevision}`,archetypes:[e.archetype],urls:e.urls})}var Un=class extends Error{status;code;retryable;constructor(t,r,o,n){super(o),this.status=t,this.code=r,this.retryable=n,this.name="ControlPlaneError"}},$T=e=>new Promise(t=>setTimeout(t,e));function ET(e){let t=1e3*2**(e-1),r=t*.2*(Math.random()*2-1);return Math.round(t+r)}function $v(e){let t=e.fetch??globalThis.fetch,r=e.maxAttempts??4,o=e.baseUrl.replace(/\/+$/,"");return async function(i,a,s={}){let c=globalThis.location?.origin,l=new URL(`${o}${a}`,o.startsWith("/")?c:void 0);for(let[d,m]of Object.entries(s.query??{}))m!=null&&l.searchParams.set(d,String(m));let p;for(let d=1;d<=r;d++){let m=typeof e.token=="function"?await e.token():e.token,f=await t(l,{method:i,headers:{authorization:`Bearer ${m}`,...s.body===void 0?{}:{"content-type":"application/json"}},body:s.body===void 0?void 0:JSON.stringify(s.body)});if(f.ok)return await f.json();let h=await f.json().catch(()=>({}));if(p=new Un(f.status,h.error?.code??"unknown",h.error?.message??f.statusText,h.error?.retryable??!1),!p.retryable||d===r)break;let _=Number(f.headers.get("retry-after"));await $T(Number.isFinite(_)&&_>0?_*1e3:ET(d))}throw p??new Un(0,"unknown","Request failed.",!1)}}function Ev(e){let t=$v(e);return{setWorkspaceAccess:(r,o)=>t("PUT",`/v1/admin/workspaces/${encodeURIComponent(r)}/access`,{body:{access:o}})}}function Fn(e){let t=$v(e),r=i=>({...i,containerLabel:i.containerLabel??"Round"}),o=i=>({...i,access:ia(i),games:(i.games??[]).map(r)}),n=i=>({...i,workspace:{...i.workspace,access:ia(i.workspace??{}),games:(i.workspace?.games??[]).map(r)}});return{getWorkspace:async()=>o(await t("GET","/v1/workspace")),linkGitHub:async i=>n(await t("PUT","/v1/workspace/github",{body:{login:i}})),setPlan:async i=>n(await t("PUT","/v1/workspace/plan",{body:{tier:i}})),uploadTarget:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/uploads`,{body:{filename:a}}),pruneBundle:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/bundle`,{body:{filenames:a}}),async getGame(i){try{return r(await t("GET",`/v1/games/${encodeURIComponent(i)}`))}catch(a){if(a instanceof Un&&a.status===404)return;throw a}},setAwake:(i,a)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/state`,{body:{awake:a}}),setDestination:(i,a,s)=>t("PUT",`/v1/games/${encodeURIComponent(i)}/destinations`,{body:{destination_id:a,enabled:s}}),registerGame:i=>t("POST","/v1/games",{body:i}),archiveGame:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/archive`),requestArt:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/art`),deploy:(i,a)=>t("POST",`/v1/games/${encodeURIComponent(i)}/deploy`,{body:a}),refreshRound:i=>t("POST",`/v1/games/${encodeURIComponent(i)}/round/refresh`),setSignal:async i=>n(await t("PUT","/v1/workspace/signal",{body:{enabled:i}})),async getEndpoints(i){try{return await t("GET",`/v1/games/${encodeURIComponent(i)}/endpoints`)}catch(a){if(a instanceof Un&&a.status===404)return;throw a}},async getLogs(i,a){let{lines:s}=await t("GET",`/v1/games/${encodeURIComponent(i)}/logs`,{query:a});return s},async getAuditLog(i){let{records:a}=await t("GET","/v1/audit",{query:i});return a}}}var Cj=600*1e3;function Ip(e){return e.playerId?.trim()||e.sourceIp?.trim()||"unknown"}function Cp(e,t){return`${e.length}:${e}${t}`}import{spawn as Tv}from"node:child_process";import{chmod as TT,mkdir as AT,readFile as IT,rm as CT,writeFile as PT}from"node:fs/promises";import{homedir as OT,platform as Gn}from"node:os";import{join as Av}from"node:path";var Pp="https://api.workos.com",Op=process.env.GAMESTAGE_CLIENT_ID??"client_01KYVPJ1MA6GA9EXTJ7GJ81YW4";async function Iv(){let e=await fetch(`${Pp}/user_management/authorize/device`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Op})});if(!e.ok)throw new Error(`Could not start sign-in (${e.status}). ${await e.text()}`);return await e.json()}async function Cv(e){let t=await fetch(`${Pp}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Op,grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:e})}),r=await t.json();if(t.ok){let o=r.user;return{status:"ok",session:{accessToken:String(r.access_token??""),refreshToken:r.refresh_token?String(r.refresh_token):void 0,email:o?.email,userId:o?.id}}}switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down"};case"expired_token":return{status:"expired"};default:return{status:"denied",reason:String(r.error_description??r.error??"unknown error")}}}function Pv(e){let t=Gn()==="darwin"?"open":Gn()==="win32"?"cmd":"xdg-open",r=Gn()==="win32"?["/c","start","",e]:[e];try{Tv(t,r,{stdio:"ignore",detached:!0}).unref()}catch{}}var Zn="gamestage-cli",Ov=Av(OT(),".gamestage"),sa=Av(Ov,"credentials.json");function Np(e,t){return new Promise(r=>{let o=Tv("security",e,{stdio:["pipe","pipe","ignore"]}),n="";o.stdout.on("data",i=>n+=i),o.on("error",()=>r(null)),o.on("close",i=>r(i===0?n.trim():null)),t!==void 0?o.stdin.end(t):o.stdin.end()})}async function Rp(e){let t=JSON.stringify(e);return Gn()==="darwin"&&await Np(["add-generic-password","-a",Zn,"-s",Zn,"-U","-w",t])!==null?"keychain":(await AT(Ov,{recursive:!0,mode:448}),await PT(sa,t,{mode:384}),await TT(sa,384),"file")}function NT(e){try{let[,t]=e.split("."),{exp:r}=JSON.parse(Buffer.from(t,"base64url").toString());return typeof r!="number"?!0:r*1e3-Date.now()<3e4}catch{return!0}}async function RT(e){if(!e.refreshToken)return null;let t=await fetch(`${Pp}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Op,grant_type:"refresh_token",refresh_token:e.refreshToken})});if(!t.ok)return null;let r=await t.json();return r.access_token?{...e,accessToken:String(r.access_token),refreshToken:r.refresh_token?String(r.refresh_token):e.refreshToken}:null}async function jT(){if(Gn()==="darwin"){let e=await Np(["find-generic-password","-a",Zn,"-s",Zn,"-w"]);if(e)try{return JSON.parse(e)}catch{}}try{return JSON.parse(await IT(sa,"utf8"))}catch{return null}}async function Nv(){Gn()==="darwin"&&await Np(["delete-generic-password","-a",Zn,"-s",Zn]),await CT(sa,{force:!0})}async function $e(){let e=await jT();if(!e)return null;if(!NT(e.accessToken)||!e.refreshToken)return e;let t=await RT(e);return t?(await Rp(t),t):null}var Qe="0.11.0";import{randomUUID as DT}from"node:crypto";var LT=/-[0-9a-f]{4}$/;function ca(e){return`${e}-${DT().replace(/-/g,"").slice(0,4)}`}function Rv(e){return LT.test(e)}var Br=process.env.GAMESTAGE_SITE_URL??"https://gamestage.ai";function jv(e){return`${Br}/stage/games/${encodeURIComponent(e)}?tab=overview`}function Dv(e){return e&&new Set(["hunt","push","group","forecast"]).has(e)?`${Br}/docs/game-formats#${e}`:`${Br}/docs`}var se=process.env.GAMESTAGE_CONTROL_URL??"https://api.gamestage.ai";function zT(e){try{let t=new URL(e).hostname.toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="::1"||t.startsWith("127.")}catch{return!1}}function MT(e){return e.GAMESTAGE_TEST_RUN==="1"||e.NODE_TEST_CONTEXT!==void 0}function UT(e=se,t=process.env){if(MT(t)&&!zT(e)&&t.GAMESTAGE_ALLOW_REMOTE_TESTS!=="1")return`Refusing to register a test game against non-local control plane ${e}. Use the throwaway local control plane, or set GAMESTAGE_ALLOW_REMOTE_TESTS=1 for a deliberate real-plane run.`}function Bn(e=se){let t=UT(e);t&&C(t)}async function be(){let e=await $e();return e||C("You are not signed in.",["Run `gamestage login`. It creates the account too if you do not have one.","Inspecting, scaffolding and local rounds keep working without one."]),{client:Fn({baseUrl:se,token:async()=>(await $e())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}async function Lv(){let e=await $e();return e||C("You are not signed in.",["Run `gamestage login`. Approving a creator needs an operator's own session."]),{admin:Ev({baseUrl:se,token:async()=>(await $e())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}var jp="access_pending";async function la(e){try{let t=await e.getWorkspace(),r=t?.access;return r==="approved"||r==="pending"||r==="refused"?{access:r,workspace:t}:{access:"unreported",workspace:t}}catch(t){let r=t.status,o=t.code;return o===jp?{access:"pending"}:r===404||o==="not_found"?{access:"unknown",problem:"no_control_plane",reason:`Nothing is serving a control plane at ${se}.`,detail:["You are signed in, and deploying will fail until this is pointed somewhere real.","Set GAMESTAGE_CONTROL_URL to your control plane and run this again."]}:r===401||r===403?{access:"unknown",problem:"token_refused",reason:"The control plane refused this account's token.",detail:[`It is at ${se}.`,"A token from one environment is refused by another, so check which one you signed into."]}:{access:"unknown",problem:"unreachable",reason:`Could not reach the control plane at ${se}.`,detail:[String(t.message??t),"You are signed in. Deploying will fail until this answers."]}}}function Kr(e){switch(e.access){case"approved":return{ok:!0,status:"approved",access:"approved",heading:"Approved",message:"Your account is approved, so every command works, including deploy.",next:["`gamestage status` shows the workspace, its games and what they are using."]};case"pending":return{ok:!0,status:"pending_approval",access:"pending",code:jp,heading:"Registered, waiting for approval",message:"You are registered and your account is waiting for approval. That is the normal path for a new account, and approval is a person's decision today.",next:["Nothing is wrong and nothing is lost. There is no second form to fill in.","Inspecting a prototype, scaffolding a game and writing a round all work now and need no approval.","`gamestage status` re-checks approval. It never opens the browser again."]};case"refused":return{ok:!0,status:"access_refused",access:"refused",heading:"Access refused",message:"This account has been refused access. Signing in worked, so this is a decision about the account rather than a broken token.",next:["Nothing in the CLI changes this, and running `gamestage login` again will not.","Inspecting, scaffolding and writing a round still work and need no account.",`If you think this is wrong, say so where you registered: ${Br}.`]};case"unreported":return{ok:!0,status:"access_not_reported",access:null,heading:"Signed in",message:"This control plane answered and does not report an access state, so whether this account is approved is not known here.",next:["It predates the access state rather than being broken, so carry on.","A deploy that is refused for approval will say so in its own words."]};default:return{ok:!1,status:e.problem==="no_control_plane"?"no_control_plane":e.problem==="token_refused"?"token_refused":"control_plane_unreachable",access:null,heading:"Signed in, and the control plane is not usable",message:e.reason,next:e.detail}}}function zv(e){return e.changed?e.access==="approved"?{ok:!0,status:"approved",access:"approved",heading:"Approved",message:`${e.workspaceId} was ${e.previous} and is now approved.`,next:["Their next `gamestage status` says approved, and deploy works from then on."]}:{ok:!0,status:"refused",access:"refused",heading:"Refused",message:`${e.workspaceId} was ${e.previous} and is now refused.`,next:["Their next `gamestage status` says refused, and says how to argue with it."]}:{ok:!0,status:"unchanged",access:e.access,heading:"No change",message:`${e.workspaceId} was already ${e.previous}. Nothing was written.`,next:["No audit record either: the trail records transitions, and this was not one."]}}function Kn(e){if(I(e.heading),v(` ${e.message}`),e.next.length){v();for(let t of e.next)A(t)}v()}function Ee(e){let t=[],r=e.status,o=e.code;if(o===jp){let n=Kr({access:"pending"});R()?j({ok:n.ok,status:n.status,access:n.access,code:n.code,message:n.message,next:n.next}):Kn(n),process.exit(0)}r===401?t.push("Your session has expired. Run `gamestage login` again."):r===403?t.push("Either your session expired or that is not something this workspace is allowed to do. `gamestage login` rules out the first."):r===429?t.push("You are being rate limited. Wait a moment and try again."):e.retryable&&t.push("This one is worth retrying: the failure was at our end."),o&&t.push(`Code: ${o}`),t.push(`Control plane: ${se}`),C(e instanceof Error?e.message:"The control plane call failed.",t)}var et="favicon.svg",Vr=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
7142
7150
  <rect width="32" height="32" rx="7" fill="#1b1c1f"/>
7143
7151
  <path d="m12 8 12 8-12 8Z" fill="#fff"/>
7144
7152
  </svg>
7145
- `;function Np(e){return/<link\b[^>]*\brel\s*=\s*(?:"[^"]*\bicon\b[^"]*"|'[^']*\bicon\b[^']*'|[^\s>]*\bicon\b[^\s>]*)[^>]*>/i.test(e)}function Kr(e){if(Np(e))return e;let t=`<link rel="icon" href="./${Qe}" type="image/svg+xml">
7146
- `,r=e.search(/<\/head>/i);return r===-1?t+e:e.slice(0,r)+t+e.slice(r)}var sa={hunt:"Find the marked few among many. A wrong pick costs an attempt.",push:"Picks add hidden value towards a limit. Going over is a bust.",group:"Form the hidden sets in a board. The whole guess is judged at once.",forecast:"Call it before it happens. It settles when the result arrives.",trivia:"Question, answer, mark against a server answer set, score, close.",timed_round:"Open and close rounds on a schedule, using server time.",synchronous_event:"React to a real-world trigger: kick-off, goal, period change.",collection_ranking:"Accumulate verified actions and expose rank, progress and eligibility."};async function AT(e,t,r){let o=await Se();return o?(Zn(),await Un({baseUrl:se,token:o.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:r,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${TT("sha256").update(t).digest("hex")}`,conformance:Oe(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:Rn.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function Rv(e){let t=(e.name??"new-game").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");if(!t)return P("Give the game a name with --name.");if(!e.archetype){R()&&(z({ok:!1,status:"archetype_required",message:"Choose an archetype before scaffolding. Authority is decided first, on purpose.",archetypes:Object.entries(sa).map(([f,h])=>({archetype:f,summary:h})),example:`gamestage create --name "${e.name??t}" --archetype hunt`}),process.exit(1)),I("Choose the game's authority first"),v(S.dim(` The archetype decides what the server owns: answers, locks, scoring
7153
+ `;function Dp(e){return/<link\b[^>]*\brel\s*=\s*(?:"[^"]*\bicon\b[^"]*"|'[^']*\bicon\b[^']*'|[^\s>]*\bicon\b[^\s>]*)[^>]*>/i.test(e)}function Wr(e){if(Dp(e))return e;let t=`<link rel="icon" href="./${et}" type="image/svg+xml">
7154
+ `,r=e.search(/<\/head>/i);return r===-1?t+e:e.slice(0,r)+t+e.slice(r)}async function Uv(e){try{return await FT(e),!0}catch{return!1}}var ua={hunt:"Find the marked few among many. A wrong pick costs an attempt.",push:"Picks add hidden value towards a limit. Going over is a bust.",group:"Form the hidden sets in a board. The whole guess is judged at once.",forecast:"Call it before it happens. It settles when the result arrives.",trivia:"Question, answer, mark against a server answer set, score, close.",timed_round:"Open and close rounds on a schedule, using server time.",synchronous_event:"React to a real-world trigger: kick-off, goal, period change.",collection_ranking:"Accumulate verified actions and expose rank, progress and eligibility."};async function ZT(e,t,r){let o=await $e();return o?(Bn(),await Fn({baseUrl:se,token:o.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:r,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${GT("sha256").update(t).digest("hex")}`,conformance:Re(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:jn.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function Fv(e){let t=(e.name??"new-game").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");if(!t)return C("Give the game a name with --name.");if(!e.archetype){R()&&(j({ok:!1,status:"archetype_required",message:"Choose an archetype before scaffolding. Authority is decided first, on purpose.",archetypes:Object.entries(ua).map(([_,b])=>({archetype:_,summary:b})),example:`gamestage create --name "${e.name??t}" --archetype hunt`}),process.exit(1)),I("Choose the game's authority first"),v(S.dim(` The archetype decides what the server owns: answers, locks, scoring
7147
7155
  and settlement. Picking it before any client code is what keeps the
7148
- game trustworthy later.`)),v();for(let[f,h]of Object.entries(sa))v(` ${S.cyan(f.padEnd(20))} ${S.dim(h)}`);v(),v(` ${S.dim("Then run:")} ${S.cyan(`gamestage create --name "${e.name??t}" --archetype <archetype>`)}`),v(),process.exit(1)}let r=vt.safeParse(e.archetype);if(!r.success)return P(`Unknown archetype "${e.archetype}".`,Object.keys(sa).map(f=>S.cyan(f)));let o=ia(t),n=ea(o,e.name??o);n.app.status="confirmed",n.app.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:"Created with gamestage create"}],n.experience.status="proposed",n.experience.surfaces=["web-embed"],n.backend.status="confirmed",n.backend.route="managed_runtime",n.backend.archetype=r.data,n.backend.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:`Archetype chosen at create time: ${r.data}`}],n.identity.status="proposed",n.identity.provider="identify";let i=Mt.parse(n),a=Qi(i),s=Oe(i),c=!1,l;try{c=await AT(i,a,r.data)}catch(f){l=f instanceof Error?f.message:"The control plane did not answer."}let d=null;e.write!==!1&&(d=typeof e.write=="string"?e.write:"gamestage.yaml",await Vr(d,a,"utf8"));let p=Ha[r.data],m=!!p&&e.write!==!1;if(m&&(await Vr("index.html",Kr(p),"utf8"),await Vr(Qe,Br,"utf8"),await Vr(we,Jt,"utf8"),await Vr(be,Ht,"utf8")),R()){z({ok:!0,manifest:i,manifest_yaml:a,written_to:d,conformance:{computed:s.computed,blockers:s.blockers},registered:c,...l?{registration_failed:l}:{},scaffolded:m,files:m?["index.html",Qe,we,be]:[],...p?{}:{scaffold_skipped:"no_engine",engines:Object.keys(Ha)},next:"gamestage dev"});return}I(`Created ${i.app.title}`),T("Archetype",r.data),m&&T("Game","index.html, with the Gamestage client beside it"),T("Authority","managed runtime (server-owned)"),T("Conformance",`${s.computed} ${s.computedName}`),d&&T("Manifest",d),v(c?" Registered in Studio as a draft.":l?` Not registered in Studio: ${l} (${se})`:" No account found, so registration was skipped."),I("What the server will own"),v(` ${S.dim(sa[r.data])}`),I("Next"),A(`${S.cyan("gamestage dev")} run the game locally against the archetype`),A(`${S.cyan("gamestage manifest validate "+(d??"gamestage.yaml"))} check where it stands`),v()}import{readFileSync as Lp}from"node:fs";import{readFile as zp}from"node:fs/promises";import{extname as DT,resolve as LT}from"node:path";import{createHash as Lv}from"node:crypto";import{readFile as IT}from"node:fs/promises";var CT=8e6;async function Rp(e){let t;try{t=await IT(e)}catch{return}if(t.byteLength>CT)return;if(t.byteLength>=2){if(t[0]===255&&t[1]===254)return t.toString("utf16le");if(t[0]===254&&t[1]===255)return t.swap16().toString("utf16le")}let r=t.subarray(0,8192);if(!r.includes(0))return t.toString("utf8");let o=0,n=0;for(let a=0;a<r.length;a+=1)r[a]===0&&(a%2===0?o+=1:n+=1);let i=Math.floor(r.length/2);if(i>8){if(n>i*.7&&o<i*.1)return t.toString("utf16le");if(o>i*.7&&n<i*.1)return t.swap16().toString("utf16le")}}async function ca(e){let t=[];for(let r of e){let o=r.relativePath.split("/").pop();if(o===we||o===be)continue;let n=await Rp(r.path);n!==void 0&&t.push({relative:r.relativePath,text:n})}return t}import{lstatSync as PT,readdirSync as OT}from"node:fs";import{relative as NT,resolve as jv,sep as RT}from"node:path";var jT=new Set(["gamestage.yaml","gamestage.yml",".env",".env.local"]);function Dv(e){let t=e.split("/").pop()??e;return jT.has(t)||t.startsWith(".env.")}function jp(e,t={}){let r=t.symlinks??"throw",o=jv(e),n=[],i=[];function a(s){for(let c of OT(s,{withFileTypes:!0}).sort((l,d)=>l.name.localeCompare(d.name))){let l=jv(s,c.name),d=NT(o,l).split(RT).join("/");if(c.isSymbolicLink()){if(r==="throw")throw new Error(`Directory ${e} contains a symlink: ${d}`);i.push(d);continue}if(c.isDirectory())a(l);else if(c.isFile()){if(Dv(d))continue;n.push({path:l,relativePath:d})}}}if(!PT(o).isDirectory())throw new Error(`${e} is not a directory.`);return a(o),{files:n,skippedLinks:i}}function Dp(e){return jp(e,{symlinks:"throw"}).files}function ua(e,t){return e.refused?R()?(z({ok:!0,status:"refused",action:t,code:e.code,reason:e.refused,game:e.game}),!0):(I("Not done"),v(` ${e.refused}`),v(),!0):!1}function zv(e,t=e.playgroundUrl){T("Game",`${e.name} (${e.id})`),T("State",e.state),T("Conformance",e.conformance),T("Revision",`${e.manifestRevision} (${e.contentHash})`),t&&T("Playground",t),e.playerEndpoint&&T("Player API",e.playerEndpoint),T("Manage",Cv(e.id)),T("Docs",Pv(e.archetype))}async function Mv(e){let{client:t,email:r}=await $e(),o=await aa(t),n=Zr(o);if(n.ok||P(n.message,n.next),n.access==="pending"||n.access==="refused"){if(R())return z({ok:!0,status:n.status,access:n.access,...n.code?{code:n.code}:{},message:n.message,next:n.next,email:r});I("Your account"),T("Signed in as",r),T("Access",n.access),Bn(n);return}try{if(e){let l=await t.getGame(e);if(l||P(`No game called "${e}" in this workspace.`),R())return z({ok:!0,game:l});if(I(l.name),zv(l),l.meters.length){v();for(let d of l.meters){let p=Math.round(mv(d)*100);T(d.label,`${d.used} of ${d.limit}${d.unit} (${p}%)`)}}v();return}let i="workspace"in o&&o.workspace?o.workspace:await t.getWorkspace(),a=i.games.length,s=typeof i.gamesTotal=="number"?i.gamesTotal:void 0;if(R())return z({ok:!0,status:n.status,access:n.access,games_total:s??null,games_shown:a,workspace:i});if(I(i.name),T("Signed in as",r),T("Access",n.access??"not reported by this control plane"),T("Tier",i.tier),T("Games",s===void 0?`${a} listed, and this control plane does not report a total`:`${s} ${s===1?"game":"games"}`),v(),s===0){A("No games yet. `gamestage create` or `gamestage inspect .` starts one."),v();return}for(let l of i.games)T(l.name,`${l.state}${l.playgroundUrl?"":" (never deployed)"}`);s!==void 0&&a<s&&(v(),A(`Showing ${a} of ${s} games.`));let c=pv(i.meters);if(c.length){v(),I("At a cap");for(let l of c)A(`${l.label}: ${l.used} of ${l.limit}${l.unit}`)}v()}catch(i){Ie(i)}}async function zT(e,t){let r;try{r=await zp(e,"utf8")}catch{t&&P(`Cannot read ${e}.`);return}let o=_e(r);if(!o.ok){P(`${e} is not a valid App Manifest, so its round cannot be provisioned.`,o.issues.map(n=>`${n.path} ${n.message}`));return}return o.manifest.backend.round}async function MT(e){try{let t=await ca(Dp(e));return ra(t.map(r=>r.text).join(`
7149
- `))}catch{return}}async function UT(e){try{let t=await zp(e,"utf8");return`c${Lv("sha256").update(t).digest("hex").slice(0,8)}`}catch{return"local"}}async function Uv(e,t){t.file&&t.dir&&P("Choose either --file or --dir for a deploy, not both.");let{client:r}=await $e(),o=await zT(t.manifest??"gamestage.yaml",!!t.manifest);try{let n;t.file?n=await GT(r,e,t.file):t.dir&&(n=await ZT(r,e,t.dir));let i=t.manifest??"gamestage.yaml",a=t.revision??await UT(i),s=await r.deploy(e,{manifestRevision:a,contentHash:t.hash??`sha256:${a}`,conformance:t.level??"L0",offersPrize:!!t.prize,round:o,...t.dir?{wording:await MT(t.dir)}:{}});if(ua(s,"deploy"))return;let c=o?s.game.rounds.some(m=>m.id===`round-${o.number}`):null,l=c===!1?[...s.game.logs].reverse().find(m=>m.level==="error"):void 0;if(R())return z({ok:!0,status:"deployed",roundProvisioned:c,...l?{roundError:l.message}:{},game:n?{...s.game,playgroundUrl:n}:s.game});let d=It(s.game.containerLabel),p=It(s.game.containerLabel,{lower:!0});if(I("Deployed"),zv(s.game,n),c&&T(d,`${o.number} is live`),v(),c===!1){I(`But there is no ${p}`),v(` ${l?.message??`The Engine did not accept the ${p}.`}`),v(),A("Anyone opening the game will find nothing on. Deploy again once it is fixed."),v();return}if(c===null){let m=s.game.rounds?.length??0;A(m?`No ${p} in the manifest, which is right: the game is playing ${m} from Studio.`:`No ${p} in the manifest and none in Studio, so the game has nothing on yet.`)}A("Share the playground URL. It sleeps when idle and wakes on a request."),v()}catch(n){Ie(n)}}async function Fv(e){let{client:t}=await $e();try{let r=await t.archiveGame(e);if(ua(r,"archive"))return;if(R()){z({ok:!0,status:"archived",game:r.game});return}I("Archived"),T("Game",`${r.game.name} (${r.game.id})`),v(),A("Taken off the air. Its record and files are retained outside the served bundle."),v()}catch(r){Ie(r)}}async function Gv(e){let{client:t}=await $e();try{let{workspace:r,refused:o}=await t.setPlan(e);if(o){v(o);return}if(R())return z({ok:!0,workspace:r});I("Plan changed"),T("Plan",r.tier),T("Live games",String(r.liveGameAllowance||"Contracted")),v()}catch(r){Ie(r)}}async function Mp(e,t){let{admin:r,email:o}=await Ov();try{let n=await r.setWorkspaceAccess(e,t),i=Nv(n);if(R())return z({ok:!0,status:i.status,changed:n.changed,workspace_id:n.workspaceId,access:n.access,previous:n.previous,message:i.message});Bn(i),n.changed&&(T("Decided by",o),v())}catch(n){Ie(n)}}async function Zv(e){let t;try{t=await zp(e,"utf8")}catch{return P(`Cannot read ${e}`,["`gamestage inspect . --write` or `gamestage create` writes one."])}let r=_e(t);if(!r.ok)return P(`${e} is not a valid App Manifest.`,[...r.issues.map(a=>`${S.cyan(a.path)} ${a.message}`),"",`${S.cyan(`gamestage manifest validate ${e}`)} the full report`]);let o=r.manifest,n=o.backend.archetype;if(!n)return P(`${e} declares no archetype, so there is nothing to register.`,["Add `backend.archetype`, and the round that goes with it."]);let{client:i}=await $e();Zn();try{let a=await i.registerGame({id:o.app.id,name:o.app.title,archetype:n,repository:o.app.source?.repository??null,manifestRevision:String(o.manifest.revision),contentHash:`sha256:${Lv("sha256").update(t).digest("hex")}`,conformance:Oe(o).computed,offersPrize:o.operations.promotion.offers_prize,containerLabel:o.experience.container_label,sections:Rn.map(s=>({section:s,status:o[s].status}))});if(ua(a,"register"))return;if(R()){z({ok:!0,status:"registered",game:a.game});return}I("Registered"),T("Game",`${a.game.name} (${a.game.id})`),T("State",a.game.state),T("Conformance",a.game.conformance),v(),A(`${S.cyan(`gamestage deploy ${a.game.id} --dir .`)} publish it`),v()}catch(a){Ie(a)}}async function Up(e,t){let{client:r}=await $e();try{let o=await r.setAwake(e,t);if(ua(o,t?"wake":"suspend"))return;if(R()){z({ok:!0,status:o.game.state,game:o.game});return}I(t?"Awake":"Suspended"),T("Game",`${o.game.name} (${o.game.id})`),T("State",o.game.state),v(),A(t?"It is taking plays again.":"It is off the air and its live slot is free. `gamestage wake` puts it back."),v()}catch(o){Ie(o)}}async function Bv(e,t){let{client:r}=await $e();try{let o=await r.getEndpoints(e);if(o||P(`No game called "${e}" in this workspace.`),R())return z({ok:!0,endpoints:o});if(t==="player"||t==="control"||t==="playground"){let n=o[t];n||P(`No ${t} endpoint yet.`,["Deploy the game first: `gamestage deploy "+e+"`."]),v(n);return}I("Endpoints"),T("Player",o.player??"not deployed"),T("Control",o.control??"not deployed"),T("Playground",o.playground??"not deployed"),v()}catch(o){Ie(o)}}async function Kv(e,t){let{client:r}=await $e();try{let o=await r.getLogs(e,{limit:t.limit?Number(t.limit):100,since:t.since??null,level:t.level??null});if(R())return z({ok:!0,lines:o});if(o.length===0){I("No log lines"),v(),A("Nothing yet, or everything is older than the tier's retention."),v();return}for(let n of o){let i=n.roundId?` [${n.roundId}]`:"";v(`${n.at} ${n.level.padEnd(5)}${i} ${n.message}`)}}catch(o){Ie(o)}}function Vv(e,t,r){let o=`<script>
7156
+ game trustworthy later.`)),v();for(let[_,b]of Object.entries(ua))v(` ${S.cyan(_.padEnd(20))} ${S.dim(b)}`);v(),v(` ${S.dim("Then run:")} ${S.cyan(`gamestage create --name "${e.name??t}" --archetype <archetype>`)}`),v(),process.exit(1)}let r=vt.safeParse(e.archetype);if(!r.success)return C(`Unknown archetype "${e.archetype}".`,[...Object.keys(ua).map(_=>S.cyan(_)),"",`You are running gamestage ${Qe}. If the name you used came from`,"the documentation, this CLI is probably older than it:",`${S.cyan("npx gamestage@latest create ...")} run the current one`]);let o=e.write===!1?null:typeof e.write=="string"?e.write:"gamestage.yaml";if(o&&!e.force&&await Uv(o))return C(`${o} already exists, and create would replace it.`,["That file holds a game: its id, its format and whatever has been done to it.","A new one minted here would be a second game in the same directory.","",`${S.cyan(`gamestage manifest validate ${o}`)} check what you have`,`${S.cyan("gamestage start")} find the next step for this directory`,"",S.dim("There is a --force, and it replaces your page and clients as well as the"),S.dim("manifest. Move the directory aside instead if you want a fresh start.")]);let n=ca(t),i=na(n,e.name??n);i.app.status="confirmed",i.app.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:"Created with gamestage create"}],i.experience.status="proposed",i.experience.surfaces=["web-embed"],i.backend.status="confirmed",i.backend.route="managed_runtime",i.backend.archetype=r.data,i.backend.provenance=[{kind:"human_decision",owner:"creator",date:new Date().toISOString().slice(0,10),note:`Archetype chosen at create time: ${r.data}`}],i.identity.status="proposed",i.identity.provider="identify";let a=zt.parse(i),s=ta(a),c=Re(a),l=!1,p;try{l=await ZT(a,s,r.data)}catch(_){p=_ instanceof Error?_.message:"The control plane did not answer."}let d=null;o&&(d=o,await Mv(d,s,"utf8"));let m=qa[r.data],f=!!m&&e.write!==!1,h=[];if(f){let _=[["index.html",Wr(m)],[et,Vr],[ke,Yt],[we,Jt]];for(let[b,P]of _){if(!e.force&&await Uv(b)){h.push(b);continue}await Mv(b,P,"utf8")}}if(R()){j({ok:!0,manifest:a,manifest_yaml:s,written_to:d,conformance:{computed:c.computed,blockers:c.blockers},registered:l,...p?{registration_failed:p}:{},scaffolded:f,files:f?["index.html",et,ke,we].filter(_=>!h.includes(_)):[],kept:h,...m?{}:{scaffold_skipped:"no_engine",engines:Object.keys(qa)},next:"gamestage dev"});return}I(`Created ${a.app.title}`),E("Game id",a.app.id),E("Game format",r.data),f&&h.length===0?E("Files","index.html, with the Gamestage client beside it"):f&&E("Kept",`${h.join(", ")} (already here, left as they were)`),E("Authority","managed runtime (server-owned)"),E("Build stage",`${c.computed} ${c.computedName}`),d&&E("Manifest",d),v(l?" Registered in Studio as a draft.":p?` Not registered in Studio: ${p} (${se})`:" No account found, so registration was skipped."),I("What the server will own"),v(` ${S.dim(ua[r.data])}`),I("Next"),h.includes("index.html")&&A(`${S.cyan("gamestage inspect .")} find what in your page has to move to the Engine`),A(`${S.cyan("gamestage dev")} run the game locally against the archetype`),A(`${S.cyan("gamestage manifest validate "+(d??"gamestage.yaml"))} check where it stands`),v()}import{readFileSync as Up}from"node:fs";import{readFile as Fp}from"node:fs/promises";import{extname as qT,resolve as XT}from"node:path";import{createHash as Bv}from"node:crypto";import{readFile as BT}from"node:fs/promises";var KT=8e6;async function Lp(e){let t;try{t=await BT(e)}catch{return}if(t.byteLength>KT)return;if(t.byteLength>=2){if(t[0]===255&&t[1]===254)return t.toString("utf16le");if(t[0]===254&&t[1]===255)return t.swap16().toString("utf16le")}let r=t.subarray(0,8192);if(!r.includes(0))return t.toString("utf8");let o=0,n=0;for(let a=0;a<r.length;a+=1)r[a]===0&&(a%2===0?o+=1:n+=1);let i=Math.floor(r.length/2);if(i>8){if(n>i*.7&&o<i*.1)return t.toString("utf16le");if(o>i*.7&&n<i*.1)return t.swap16().toString("utf16le")}}async function da(e){let t=[];for(let r of e){let o=r.relativePath.split("/").pop();if(o===ke||o===we)continue;let n=await Lp(r.path);n!==void 0&&t.push({relative:r.relativePath,text:n})}return t}import{lstatSync as VT,readdirSync as WT}from"node:fs";import{relative as HT,resolve as Gv,sep as JT}from"node:path";var YT=new Set(["gamestage.yaml","gamestage.yml",".env",".env.local","gamestage.mjs","cli.mjs"]);function Zv(e){let t=e.split("/").pop()??e;return YT.has(t)||t.startsWith(".env.")}function zp(e,t={}){let r=t.symlinks??"throw",o=Gv(e),n=[],i=[];function a(s){for(let c of WT(s,{withFileTypes:!0}).sort((l,p)=>l.name.localeCompare(p.name))){let l=Gv(s,c.name),p=HT(o,l).split(JT).join("/");if(c.isSymbolicLink()){if(r==="throw")throw new Error(`Directory ${e} contains a symlink: ${p}`);i.push(p);continue}if(c.isDirectory())a(l);else if(c.isFile()){if(Zv(p))continue;n.push({path:l,relativePath:p})}}}if(!VT(o).isDirectory())throw new Error(`${e} is not a directory.`);return a(o),{files:n,skippedLinks:i}}function Mp(e){return zp(e,{symlinks:"throw"}).files}function ma(e,t){return e.refused?R()?(j({ok:!0,status:"refused",action:t,code:e.code,reason:e.refused,game:e.game}),!0):(I("Not done"),v(` ${e.refused}`),v(),!0):!1}function Kv(e,t=e.playgroundUrl){E("Game",`${e.name} (${e.id})`),E("State",e.state),E("Build stage",e.conformance),E("Revision",`${e.manifestRevision} (${e.contentHash})`),t&&E("Playground",t),e.playerEndpoint&&E("Player API",e.playerEndpoint),E("Manage",jv(e.id)),e.studioUrl&&E("Studio",e.studioUrl),E("Docs",Dv(e.archetype))}async function Vv(e){let{client:t,email:r}=await be(),o=await la(t),n=Kr(o);if(n.ok||C(n.message,n.next),n.access==="pending"||n.access==="refused"){if(R())return j({ok:!0,status:n.status,access:n.access,...n.code?{code:n.code}:{},message:n.message,next:n.next,email:r});I("Your account"),E("Signed in as",r),E("Access",n.access),Kn(n);return}try{if(e){let l=await t.getGame(e);if(l||C(...Qv(e)),R())return j({ok:!0,game:l});if(I(l.name),Kv(l),l.meters.length){v();for(let p of l.meters){let d=Math.round(vv(p)*100);E(p.label,`${p.used} of ${p.limit}${p.unit} (${d}%)`)}}v();return}let i="workspace"in o&&o.workspace?o.workspace:await t.getWorkspace(),a=i.games.length,s=typeof i.gamesTotal=="number"?i.gamesTotal:void 0;if(R())return j({ok:!0,status:n.status,access:n.access,games_total:s??null,games_shown:a,workspace:i});if(I(i.name),E("Signed in as",r),E("Access",n.access??"not reported by this control plane"),E("Tier",i.tier),E("Games",s===void 0?`${a} listed, and this control plane does not report a total`:`${s} ${s===1?"game":"games"}`),v(),s===0){A("No games yet. `gamestage create` or `gamestage inspect .` starts one."),v();return}for(let l of i.games)E(l.name,`${l.state}${l.playgroundUrl?"":" (never deployed)"}`);s!==void 0&&a<s&&(v(),A(`Showing ${a} of ${s} games.`));let c=yv(i.meters);if(c.length){v(),I("At a cap");for(let l of c)A(`${l.label}: ${l.used} of ${l.limit}${l.unit}`)}v()}catch(i){Ee(i)}}async function QT(e,t){let r;try{r=await Fp(e,"utf8")}catch{t&&C(`Cannot read ${e}.`);return}let o=_e(r);if(!o.ok){C(`${e} is not a valid App Manifest, so its round cannot be provisioned.`,o.issues.map(n=>`${n.path} ${n.message}`));return}return o.manifest.backend.round}async function eA(e){try{let t=await da(Mp(e));return aa(t.map(r=>r.text).join(`
7157
+ `))}catch{return}}async function tA(e){try{let t=await Fp(e,"utf8");return`c${Bv("sha256").update(t).digest("hex").slice(0,8)}`}catch{return"local"}}async function Wv(e,t){t.file&&t.dir&&C("Choose either --file or --dir for a deploy, not both.");let{client:r}=await be(),o=await QT(t.manifest??"gamestage.yaml",!!t.manifest);try{let n;t.file?n=await rA(r,e,t.file):t.dir&&(n=await oA(r,e,t.dir));let i=t.manifest??"gamestage.yaml",a=t.revision??await tA(i),s=await r.deploy(e,{manifestRevision:a,contentHash:t.hash??`sha256:${a}`,conformance:t.level??"L0",offersPrize:!!t.prize,round:o,...t.dir?{wording:await eA(t.dir)}:{}});if(ma(s,"deploy"))return;let c=o?s.game.rounds.some(m=>m.id===`round-${o.number}`):null,l=c===!1?[...s.game.logs].reverse().find(m=>m.level==="error"):void 0;if(R())return j({ok:!0,status:"deployed",roundProvisioned:c,...l?{roundError:l.message}:{},game:n?{...s.game,playgroundUrl:n}:s.game});let p=At(s.game.containerLabel),d=At(s.game.containerLabel,{lower:!0});if(I("Deployed"),Kv(s.game,n),c&&E(p,`${o.number} is live`),v(),c===!1){I(`But there is no ${d}`),v(` ${l?.message??`The Engine did not accept the ${d}.`}`),v(),A("Anyone opening the game will find nothing on. Deploy again once it is fixed."),v();return}if(c===null){let m=s.game.rounds?.length??0;A(m?`No ${d} in the manifest, which is right: the game is playing ${m} from Studio.`:`No ${d} in the manifest and none in Studio, so the game has nothing on yet.`)}A("Share the playground URL. It sleeps when idle and wakes on a request."),v()}catch(n){Ee(n)}}async function Hv(e){let{client:t}=await be();try{let r=await t.archiveGame(e);if(ma(r,"archive"))return;if(R()){j({ok:!0,status:"archived",game:r.game});return}I("Archived"),E("Game",`${r.game.name} (${r.game.id})`),v(),A("Taken off the air. Its record and files are retained outside the served bundle."),v()}catch(r){Ee(r)}}async function Jv(e){let{client:t}=await be();try{let{workspace:r,refused:o}=await t.setPlan(e);if(o){v(o);return}if(R())return j({ok:!0,workspace:r});I("Plan changed"),E("Plan",r.tier),E("Live games",String(r.liveGameAllowance||"Contracted")),v()}catch(r){Ee(r)}}async function Gp(e,t){let{admin:r,email:o}=await Lv();try{let n=await r.setWorkspaceAccess(e,t),i=zv(n);if(R())return j({ok:!0,status:i.status,changed:n.changed,workspace_id:n.workspaceId,access:n.access,previous:n.previous,message:i.message});Kn(i),n.changed&&(E("Decided by",o),v())}catch(n){Ee(n)}}async function Yv(e){let t;try{t=await Fp(e,"utf8")}catch{return C(`Cannot read ${e}`,["`gamestage inspect . --write` or `gamestage create` writes one."])}let r=_e(t);if(!r.ok)return C(`${e} is not a valid App Manifest.`,[...r.issues.map(a=>`${S.cyan(a.path)} ${a.message}`),"",`${S.cyan(`gamestage manifest validate ${e}`)} the full report`]);let o=r.manifest,n=o.backend.archetype;if(!n)return C(`${e} declares no archetype, so there is nothing to register.`,["Add `backend.archetype`, and the round that goes with it."]);let{client:i}=await be();Bn();try{let a=await i.registerGame({id:o.app.id,name:o.app.title,archetype:n,repository:o.app.source?.repository??null,manifestRevision:String(o.manifest.revision),contentHash:`sha256:${Bv("sha256").update(t).digest("hex")}`,conformance:Re(o).computed,offersPrize:o.operations.promotion.offers_prize,containerLabel:o.experience.container_label,sections:jn.map(s=>({section:s,status:o[s].status}))});if(ma(a,"register"))return;if(R()){j({ok:!0,status:"registered",game:a.game});return}I("Registered"),E("Game",`${a.game.name} (${a.game.id})`),E("State",a.game.state),E("Conformance",a.game.conformance),v(),A(`${S.cyan(`gamestage deploy ${a.game.id} --dir .`)} publish it`),v()}catch(a){Ee(a)}}async function Zp(e,t){let{client:r}=await be();try{let o=await r.setAwake(e,t);if(ma(o,t?"wake":"suspend"))return;if(R()){j({ok:!0,status:o.game.state,game:o.game});return}I(t?"Awake":"Suspended"),E("Game",`${o.game.name} (${o.game.id})`),E("State",o.game.state),v(),A(t?"It is taking plays again.":"It is off the air and its live slot is free. `gamestage wake` puts it back."),v()}catch(o){Ee(o)}}async function qv(e,t){let{client:r}=await be();try{let o=await r.getEndpoints(e);if(o||C(...Qv(e)),R())return j({ok:!0,endpoints:o});if(t==="player"||t==="control"||t==="playground"){let n=o[t];n||C(`No ${t} endpoint yet.`,["Deploy the game first: `gamestage deploy "+e+"`."]),v(n);return}I("Endpoints"),E("Player",o.player??"not deployed"),E("Control",o.control??"not deployed"),E("Playground",o.playground??"not deployed"),v()}catch(o){Ee(o)}}async function Xv(e){let{client:t}=await be();try{let r=await t.requestArt(e);if(R())return j({ok:!r.refused,result:r});if(r.refused){C(r.refused);return}let o=r.game?.art;if(o?.state==="ready"&&o.url){I("Drawn"),v(),E("Game",r.game.name),E("Picture",o.url),v();return}C(`${r.game?.name??e} was not drawn.`,[`Read what happened: \`gamestage logs ${e}\`.`])}catch(r){Ee(r)}}function Qv(e){let t=/[A-Z\s]/.test(e);return[`No game with the id "${e}" in this workspace.`,t?["That looks like a game's name. Every command takes the id, which is","the name in lower case plus four characters, e.g. my-game-a3c9.","`gamestage status` lists them, and `create` prints one when it makes it."]:["`gamestage status` lists the games in this workspace and their ids."]]}async function e_(e,t){let{client:r}=await be();try{let o=await r.getLogs(e,{limit:t.limit?Number(t.limit):100,since:t.since??null,level:t.level??null}),n=await r.getGame(e).catch(()=>{}),i=n?pv(n):{state:"none"},a=mv(i);if(R())return j({ok:!0,lines:o,freshness:i});if(a&&(I("This game is serving a closed round"),v(),A(a),v()),o.length===0){I("No log lines"),v(),A("Nothing yet, or everything is older than the tier's retention."),v();return}for(let s of o){let c=s.roundId?` [${s.roundId}]`:"";v(`${s.at} ${s.level.padEnd(5)}${c} ${s.message}`)}}catch(o){Ee(o)}}function t_(e,t,r){let o=`<script>
7150
7158
  // Written by \`gamestage deploy\`. Where this game's Engine answers.
7151
7159
  window.GAMESTAGE_API = ${JSON.stringify(t)};
7152
7160
  window.GAMESTAGE_GAME = ${JSON.stringify(r)};
7153
7161
  // This page was deployed, so it may ask which Interaction Cloud project it is.
7154
7162
  window.GAMESTAGE_IC_LOOKUP = true;
7155
7163
  </script>
7156
- `,n=e.search(/<script\b/i);if(n===-1){let i=e.search(/<\/head>/i);return i===-1?o+e:e.slice(0,i)+o+e.slice(i)}return e.slice(0,n)+o+e.slice(n)}async function Kn(e,t,r){let o=await fetch(e,{method:"PUT",body:typeof t=="string"?new Uint8Array(Buffer.from(t,"utf8")):t,headers:{"content-type":r}});o.ok||P(`Upload refused with ${o.status}. Ask for a fresh URL and retry.`)}function la(e){let t=new URL(e.publicUrl);return t.pathname=`/${e.key.split("/").map(encodeURIComponent).join("/")}`,t.search="",t.hash="",t.toString()}function FT(e){switch(DT(e).toLowerCase()){case".html":return"text/html; charset=utf-8";case".css":return"text/css; charset=utf-8";case".js":case".mjs":return"text/javascript; charset=utf-8";case".json":return"application/json; charset=utf-8";case".svg":return"image/svg+xml";case".png":return"image/png";case".jpg":case".jpeg":return"image/jpeg";case".gif":return"image/gif";case".webp":return"image/webp";case".ico":return"image/x-icon";case".webmanifest":return"application/manifest+json; charset=utf-8";case".wasm":return"application/wasm";default:return"application/octet-stream"}}async function GT(e,t,r){let o=LT(r),n;try{n=Lp(o)}catch{throw P(`Cannot read ${r}.`),new Error("unreachable")}let i=await e.uploadTarget(t,"index.html"),a=Vv(Kr(n.toString("utf8")),`${i.playerApiOrigin}`,t);await Kn(i.uploadUrl,a,"text/html; charset=utf-8");let s=await e.uploadTarget(t,be);await Kn(s.uploadUrl,Ht,"text/javascript; charset=utf-8");let c=await e.uploadTarget(t,we);await Kn(c.uploadUrl,Jt,"text/javascript; charset=utf-8");let l=await e.uploadTarget(t,Qe);return await Kn(l.uploadUrl,Br,"image/svg+xml"),R()||(v(),A(`Uploaded ${r} to ${la(i)}`),A(`Wired it to ${i.playerApiOrigin} as "${t}"`),A(`Shipped @monterosa/gamestage beside it (${qt})`),A(`Shipped the player client beside it (${nr})`)),la(i)}async function ZT(e,t,r){let o;try{o=Dp(r)}catch(m){throw P(m instanceof Error?m.message:`Cannot read ${r}.`),new Error("unreachable")}let n=o.find(m=>m.relativePath==="index.html");n||P(`Directory ${r} must contain an index.html file.`);let i=Lp(n.path,"utf8"),a=Np(i),s=o.some(m=>m.relativePath==="favicon.ico"),c=o.some(m=>m.relativePath===Qe),l=!a&&!s,d=l&&!c,p;for(let m of o){let f=await e.uploadTarget(t,m.relativePath);m.relativePath==="index.html"&&(p=f);let h=Lp(m.path),b=m.relativePath==="index.html"?Vv(l?Kr(h.toString("utf8")):h.toString("utf8"),f.playerApiOrigin,t):h;await Kn(f.uploadUrl,b,FT(m.relativePath))}if(d){let m=await e.uploadTarget(t,Qe);await Kn(m.uploadUrl,Br,"image/svg+xml")}if(await e.pruneBundle(t,[...o.map(m=>m.relativePath),...d?[Qe]:[]]),!R()&&p&&(v(),A(`Uploaded ${o.length} files from ${r}`),A(`Playground: ${la(p)}`),A(`Wired it to ${p.playerApiOrigin} as "${t}"`),d&&A("Added a replaceable starter favicon")),!p)throw new Error("The directory index was not uploaded.");return la(p)}import{readFile as EI}from"node:fs/promises";var Jv="player-conformance",Fp="round-current",BT="sha256:emulator-conformance";function et(e){return structuredClone(e)}function tt(){return{server_time:"2026-08-01T09:00:00.000Z",snapshot:BT}}function KT(e){let t=e==="per-player-challenge";return{...tt(),id:Fp,number:412,version:2,can:{accepting_plays:!0,results_available:!1,solution_revealed:!1,closed:!1},challenge_instance_id:t?"challenge-player-conformance":null,challenge:{prompt:"alpha"}}}function Wv(e,t){let r=t==="mistakes";return{...tt(),player_id:Jv,round_id:e,attempts_used:r?6:0,attempts_allowed:10,mistakes_used:r?2:0,mistakes_allowed:4,progress:r?{solved:["group-1"]}:{},score:r?10:0,score_revision:0,finished:!1,outcome:r?"incomplete":void 0}}function VT(e){let t=KT(e),r=new Map([[t.id,t]]),o=new Map([[t.id,Wv(t.id,e)]]);return e==="solution-disclosure"&&(r.set("round-revealed",{...t,id:"round-revealed",number:411,version:3,can:{accepting_plays:!1,results_available:!0,solution_revealed:!0,closed:!0},solution:{answer:"revealed-alpha"}}),o.set("round-revealed",Wv("round-revealed",e))),{runtime:{...tt(),game:"conformance-game",api_version:"2.0",archetype:e==="at-settlement"?"forecast":"group",marking:e==="at-settlement"?"at_settlement":"at_commit",challenge_source:e==="per-player-challenge"?"per_player":"shared",schedule:{kind:"continuous"},updates:{transport:"poll",freshness_seconds:30},display:{title:"Conformance game"},identity:{required:!1,provider:"identify",anonymous_play:!0},archive:!0,capabilities:["plays","profile","leaderboard"]},rounds:r,roundStates:o,leaderboard:{...tt(),round_id:Fp,order:"high_first",tie_break:"earliest_play",entries:[{rank:1,player_id:"player-example",display_name:"Example",score:20}],total:1},profile:{...tt(),player_id:Jv,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}},plays:new Map,nextPlay:1}}function Hv(e,t){return{...tt(),play_id:`rejected-${e.nextPlay++}`,outcome:"rejected",reason:t,round_version:2,marked:!1,feedback:[]}}function Gp(e){let t=VT(e);return{async getRuntime(){return et(t.runtime)},async getCurrentRound(){return et(t.rounds.get(Fp))},async getRound(r){let o=t.rounds.get(r);return o?et(o):void 0},async play(r,o){let n=t.rounds.get(r);if(!n)return Hv(t,"round_not_found");let i=t.plays.get(o.idempotency_key);if(i)return{...et(i),outcome:"duplicate"};if(o.round_version!==n.version)return{...tt(),play_id:`stale-${t.nextPlay++}`,outcome:"stale",reason:"round_version",round_version:n.version,marked:!1,feedback:[]};if(n.challenge_instance_id!==null&&o.challenge_instance_id!==n.challenge_instance_id)return Hv(t,"challenge_instance_id");let a=t.roundStates.get(r),s=t.runtime.marking==="at_settlement",c={...a,...tt(),attempts_used:a.attempts_used+1,score:a.score+(s?0:10),finished:!s,outcome:s?"pending":"won"},l={...tt(),play_id:`play-${t.nextPlay++}`,outcome:"accepted",round_version:n.version,marked:!s,feedback:s?[]:[{key:"answer",verdict:"correct"}],round_state:et(c)};return t.roundStates.set(r,c),t.plays.set(o.idempotency_key,l),et(l)},async getRoundState(r){let o=t.roundStates.get(r);if(!o)throw new Error(`No such round: ${r}`);return et(o)},async getProfile(){return et(t.profile)},async getLeaderboard(){return et(t.leaderboard)}}}function WT(){return e=>Gp(e)}var AD=WT();import{createServer as HT}from"node:http";function Zt(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}var JT=Zt(Q.runtime),qT=Zt(Q.currentRound),YT=Zt(Q.round),XT=Zt(Q.plays),QT=Zt(Q.roundState),eA=Zt(Q.profile),tA=Zt(Q.leaderboard);function wt(e,t,r){let o=JSON.stringify(r);e.writeHead(t,{"content-type":"application/json; charset=utf-8","content-length":Buffer.byteLength(o)}),e.end(o)}function Vn(e,t,r,o){wt(e,t,{error:{code:r,message:o,retryable:!1}})}async function nA(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)return JSON.parse(Buffer.concat(t).toString("utf8"))}async function rA(e,t,r){if(!e.url){Vn(t,400,"invalid_request","The request URL is missing.");return}let n=new URL(e.url,"http://localhost").pathname;if(e.method==="GET"){if(JT.test(n)){wt(t,200,await r.getRuntime());return}if(qT.test(n)){wt(t,200,await r.getCurrentRound());return}let i=YT.exec(n);if(i){let s=await r.getRound(decodeURIComponent(i[2]));if(!s){Vn(t,404,"round_not_found","The requested round was not found.");return}wt(t,200,s);return}let a=QT.exec(n);if(a){let s=decodeURIComponent(a[2]);try{wt(t,200,await r.getRoundState(s))}catch{Vn(t,404,"round_not_found","The requested round was not found.")}return}if(eA.test(n)){wt(t,200,await r.getProfile());return}if(tA.test(n)){wt(t,200,await r.getLeaderboard());return}}if(e.method==="POST"){let i=XT.exec(n);if(i){try{let a=await nA(e);wt(t,200,await r.play(decodeURIComponent(i[2]),a))}catch(a){Vn(t,400,"invalid_request",a instanceof SyntaxError?"The request body must be valid JSON.":"The request body is invalid.")}return}}Vn(t,404,"not_found","The requested player API route was not found.")}function da(e="default"){let t=Gp(e);return HT((r,o)=>{rA(r,o,t).catch(()=>{o.headersSent?o.destroy():Vn(o,500,"internal_error","The emulator could not answer the request.")})})}import{createServer as wI}from"node:http";import{createHmac as oA,randomBytes as iA,timingSafeEqual as aA}from"node:crypto";var Zp="anon:";function Bp(e){return e.startsWith(Zp)}function Wr(e){let t=(e??"").replace(/[^A-Za-z0-9_.-]/g,"").slice(0,64);return`${Zp}${t||"unknown"}`}var sA={async resolve(){}};async function qv(e){if(!e.token)return e.sessionSecret?{playerId:lA(e.anonymousId,e.sessionSecret)??Wr(void 0)}:{playerId:Wr(e.anonymousId)};let t=e.resolver??sA,r=await t.resolve(e.token);return r?{playerId:r.playerId,alias:r.alias}:{playerId:Wr(e.anonymousId),refused:t.lastRefusal?.()??"identity_unresolved"}}var Yv=".";function Xv(e){let t=`${Zp}${iA(16).toString("base64url")}`;return{playerId:t,token:cA(t,e)}}function Qv(e,t){return oA("sha256",t).update(e).digest("base64url")}function cA(e,t){return`${e}${Yv}${Qv(e,t)}`}function lA(e,t){if(!e)return;let r=e.lastIndexOf(Yv);if(r<=0)return;let o=e.slice(0,r);if(!Bp(o))return;let n=Buffer.from(e.slice(r+1)),i=Buffer.from(Qv(o,t));if(n.length===i.length)return aA(n,i)?o:void 0}var Kp="round_not_found";function e_(e){let{tenant:t,playerId:r,store:o,rules:n}=e,i=e.now??(()=>new Date().toISOString()),a=0,s=e.newPlayId??(()=>`play_${++a}_${r}`),c=()=>({server_time:i(),snapshot:e.runtime.snapshot}),l=f=>f;function d(f,h){return!n.settle||!f.round.can.results_available||h.outcome!=="pending"?h:n.settle({secret:f.secret,state:h,limits:f.limits,now:i()})}async function p(f,h){let b=await o.getState(t,f,r);return b?{state:b.state,version:b.version}:{state:n.initialState({playerId:r,roundId:f,limits:h,now:i()}),version:void 0}}let m=(f,h,b)=>({...c(),play_id:s(),outcome:f,reason:h,round_version:b,marked:!1,feedback:[]});return{async getRuntime(){return{...e.runtime,...c()}},async getCurrentRound(){let f=await o.getCurrentRound(t);if(!f)throw new Error(Kp);return{...f.round,...c()}},async getRound(f){let h=await o.getRound(t,f);return h?{...h.round,...c()}:void 0},async getRoundState(f){let h=await o.getRound(t,f);if(!h)throw new Error(Kp);let b=l(h),{state:$}=await p(f,b.limits);return{...d(b,$),...c()}},async getProfile(){return{...await o.getProfile(t,r),...c()}},async getLeaderboard(){let h=(await o.getCurrentRound(t))?.round.id??"";return{...await o.getLeaderboard(t,h),...c()}},async play(f,h){let b=await o.getRound(t,f);if(!b)return m("rejected",Kp,0);let $=l(b);if(e.runtime.identity?.required&&Bp(r))return m("rejected",e.identityRefusal??"identity_required",$.round.version);if($.limits.playsPerSecond!==void 0){let it=i().slice(0,19),oe=await o.countPlay(t,f,it,r),Qn=Math.max(1,Math.ceil($.limits.playsPerSecond/oe.buckets));if(oe.inBucket>Qn)return{...m("busy","capped",$.round.version),retry_after_seconds:1}}let O=await o.getPlay(t,r,h.idempotency_key);if(O)return{...O.result,...c(),outcome:"duplicate"};let{state:D,version:te}=await p(f,$.limits),G=n.admissible({accepting:$.round.can.accepting_plays,roundVersion:$.round.version,playedVersion:h.round_version,challengeInstanceId:$.round.challenge_instance_id??null,playedChallengeInstanceId:h.challenge_instance_id??null,state:D,secret:$.secret,limits:$.limits});if(!G.ok){let it=G.reason==="round_version"?"stale":"rejected";return m(it,G.reason,$.round.version)}let N=n.mark({payload:h.payload,secret:$.secret,state:D,limits:$.limits,markAtSettlement:e.runtime.marking==="at_settlement",now:i()});if(N.outcome!=="accepted")return m("rejected",N.reason??"rejected",$.round.version);let q={...c(),play_id:s(),outcome:N.outcome,round_version:$.round.version,marked:N.marked,feedback:N.feedback,round_state:{...N.next,...c()}},Et=`play:${JSON.stringify([t,r,h.idempotency_key])}`,ot=[{id:Et,at:q.server_time,tenant:t,round_id:f,player_id:r,action:"play.committed",detail:{play_id:q.play_id,idempotency_key:h.idempotency_key,outcome:q.outcome,marked:q.marked,round_version:q.round_version,score_before:D.score,score_after:N.next.score,attempts_used:N.next.attempts_used,attempts_allowed:N.next.attempts_allowed,mistakes_used:N.next.mistakes_used,mistakes_allowed:N.next.mistakes_allowed,...n.auditDetail({secret:$.secret,before:D,decision:N,payload:h.payload})}}];N.marked&&ot.push({id:`score:${JSON.stringify([t,r,h.idempotency_key])}`,at:q.server_time,tenant:t,round_id:f,player_id:r,action:"score.recorded",detail:{play_id:q.play_id,score_before:D.score,score_after:N.next.score,marked:!0,outcome:N.next.outcome}});let Tt=await o.commitPlay({tenant:t,playerId:r,idempotencyKey:h.idempotency_key,play:{result:q},state:N.next,expectedVersion:te,audit:ot,...N.marked?{score:{roundId:f,score:N.next.score}}:{}});if(!Tt.ok&&Tt.reason==="play_exists"){let it=await o.getPlay(t,r,h.idempotency_key);return it?{...it.result,...c(),outcome:"duplicate"}:m("rejected","play_conflict",$.round.version)}return Tt.ok?q:(await o.appendAudit({id:Et,at:q.server_time,tenant:t,round_id:f,player_id:r,action:"play.refused",detail:{play_id:q.play_id,idempotency_key:h.idempotency_key,reason:"round_version",attempt_spent:!1}}),m("stale","round_version",$.round.version))}}}function uA(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function dA(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=t.picks.filter(O=>r.targets.includes(O)&&!i.has(O)),s=t.picks.filter(O=>!r.targets.includes(O)),c=o.attempts_used+1,l=o.mistakes_used+(s.length>0?1:0);for(let O of a)i.add(O);let d=i.size>=r.required,p=l>=n.mistakesAllowed,m=c>=n.attemptsAllowed,f=d||p||m,h=e.markAtSettlement?o.score:a.length*r.pointsPerTarget+o.score+(d?r.completionBonus:0),b={...o,server_time:e.now,attempts_used:c,attempts_allowed:n.attemptsAllowed,mistakes_used:l,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i]},score:h,finished:f,outcome:e.markAtSettlement?"pending":d?"won":f?"lost":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:b}:{outcome:"accepted",marked:!0,feedback:t.picks.map(O=>({key:O,verdict:r.targets.includes(O)?"correct":"wrong"})),next:b}}function pA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var Vp={archetype:"hunt",admissible:uA,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return dA({...e,attempt:{picks:t}})},initialState:pA,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[];return{correct_picks:t.feedback.filter(n=>n.verdict==="correct").length,picks_submitted:o.length,points_per_target:e.pointsPerTarget,completion_bonus:e.completionBonus}}};function Wp(e){let t=e.progress;return{total:typeof t.total=="number"?t.total:0,picks:Array.isArray(t.picks)?t.picks:[],bust:t.bust===!0}}function mA(e,t){if(t>e.target)return e.bustLabel;let r=(e.target-t)/e.target;for(let o of e.tiers)if(r<=o.within)return o.label;return e.floorLabel}function fA(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.picksAllowed?{ok:!1,reason:"picks_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function hA(e){let{secret:t,state:r,limits:o}=e,n=Wp(r),i=O=>({outcome:"rejected",reason:O,marked:!1,feedback:[],next:r});if(e.attempt.picks.length!==1)return i("one_pick_per_play");let a=t.slates[r.attempts_used];if(!a)return i("picks_exhausted");let[s]=e.attempt.picks,c=a.entries.find(O=>O.key===s);if(!c)return i("not_on_slate");let l=n.total+c.value,d=l>t.target,p=[...n.picks,{slate:a.id,key:c.key,label:c.label,value:c.value}],m=r.attempts_used+1,f=m>=o.picksAllowed,h=d||f,b={...r,server_time:e.now,attempts_used:m,attempts_allowed:o.picksAllowed,progress:{total:l,picks:p,bust:d,...h?{tier:mA(t,l)}:{}},score:e.markAtSettlement?r.score:d?0:l,finished:h,outcome:e.markAtSettlement?"pending":d?"lost":h?"won":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:b}:{outcome:"accepted",marked:!0,feedback:[{key:c.key,verdict:d?"wrong":"correct",label:String(c.value)}],next:b}}function gA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.picksAllowed,mistakes_used:0,mistakes_allowed:0,progress:{total:0,picks:[],bust:!1},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var Hp={archetype:"push",admissible:fA,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return hA({...e,attempt:{picks:t}})},initialState:gA,auditDetail({secret:e,before:t,decision:r}){let o=Wp(t),n=Wp(r.next);return{target:e.target,total_before:o.total,total_after:n.total,bust:n.bust,picks_committed:n.picks.length,...n.tier?{tier:n.tier}:{}}}};var yA=(e,t)=>e.length===t.length&&new Set([...e,...t]).size===e.length,vA=(e,t)=>new Set(e.filter(r=>t.members.includes(r))).size;function _A(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function bA(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=Array.isArray(o.progress.revealed)?o.progress.revealed:[],s=r.groups.filter(N=>!i.has(N.key)),c=s.find(N=>yA(N.members,t.picks)),l=o.attempts_used+1,d=o.mistakes_used+(c?0:1);c&&(i.add(c.key),a.push({key:c.key,label:c.label,members:[...c.members]}));let p=i.size>=r.groups.length,m=d>=n.mistakesAllowed,f=l>=n.attemptsAllowed,h=p||m||f,b=e.markAtSettlement?o.score:o.score+(c?r.pointsPerGroup:0)+(p?r.completionBonus:0),$={...o,server_time:e.now,attempts_used:l,attempts_allowed:n.attemptsAllowed,mistakes_used:d,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i],revealed:a},score:b,finished:h,outcome:e.markAtSettlement?"pending":p?"won":h?"lost":"incomplete"};if(e.markAtSettlement)return{outcome:"accepted",marked:!1,feedback:[],next:$};let O=s.reduce((N,q)=>Math.max(N,vA(t.picks,q)),0),D=!c&&t.picks.length>1&&O===t.picks.length-1,te=c?"correct":D?"close":"wrong";return{outcome:"accepted",marked:!0,feedback:t.picks.map(N=>({key:N,verdict:te,...c?{label:c.label}:{}})),next:$}}function wA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[],revealed:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var t_={archetype:"group",admissible:_A,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return bA({...e,attempt:{picks:t}})},initialState:wA,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[],n=t.feedback[0]?.verdict;return{group_found:n==="correct"?t.next.progress.solved.at(-1):null,near_miss:n==="close",picks_submitted:o.length,groups_total:e.groups.length,points_per_group:e.pointsPerGroup}}};function kA(e,t){return e.options.find(r=>r.key===t)?.points??e.pointsForCorrect}function xA(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function SA(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=r.options.some(l=>l.key===t.pick),a=o.attempts_used+1;if(!i)return{outcome:"rejected",reason:"unknown_option",marked:!1,feedback:[],next:o};let s=[...Array.isArray(o.progress.picks)?o.progress.picks:[],t.pick],c={...o,server_time:e.now,attempts_used:a,attempts_allowed:n.attemptsAllowed,progress:{...o.progress,picks:s},finished:a>=n.attemptsAllowed};return r.result===void 0?{outcome:"accepted",marked:!1,feedback:[],next:{...c,outcome:"pending"}}:{outcome:"accepted",marked:!0,feedback:$A(r,t.pick),next:n_(r,c,t.pick)}}function $A(e,t){return[{key:t,verdict:t===e.result?"correct":"wrong",...e.options.find(r=>r.key===e.result)?.label?{label:e.options.find(r=>r.key===e.result).label}:{}}]}function n_(e,t,r){let o=r===e.result;return{...t,score:o?kA(e,r):0,finished:!0,outcome:o?"won":"lost"}}function EA(e){let{secret:t,state:r}=e;if(t.result===void 0)return r;let o=Array.isArray(r.progress.picks)?r.progress.picks:[];return o.length===0?{...r,server_time:e.now,finished:!0,outcome:"lost"}:{...n_(t,r,o[0]),server_time:e.now}}function TA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:0,progress:{picks:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var r_={archetype:"forecast",admissible:xA,mark(e){let t=typeof e.payload.pick=="string"?e.payload.pick:Array.isArray(e.payload.picks)&&typeof e.payload.picks[0]=="string"?e.payload.picks[0]:"";return SA({...e,attempt:{pick:t}})},initialState:TA,settle:EA,auditDetail({secret:e,decision:t,payload:r}){return{predicted:typeof r.pick=="string"?r.pick:null,settled_at_commit:e.result!==void 0,marked:t.marked,options_offered:e.options.length}}};var o_={hunt:Vp,push:Hp,group:t_,forecast:r_},Bt=Object.keys(o_);function AA(e){return o_[We(e)]}function i_(e){return AA(e.archetype??"hunt")}function a_(e){return{server_time:"",snapshot:e.snapshot,game:e.game,api_version:"2.0",archetype:e.archetype,marking:e.marking??"at_commit",challenge_source:e.challengeSource??"shared",schedule:{kind:"local_midnight"},updates:{transport:"poll",freshness_seconds:30},display:{title:e.title??e.game},identity:{required:e.identityRequired??!1,provider:"jwt",anonymous_play:!e.identityRequired},archive:!0,capabilities:["plays","profile","leaderboard"]}}function s_(e){let t=i_(e.round);if(t)return e_({...e,rules:t})}import{createHash as IA}from"node:crypto";var c_=128;function l_(e){return IA("sha256").update(e,"utf8").digest()[0]&127}var Ne=(...e)=>e.join("#");function u_(e){let t=new Map,r=new Map,o=new Map,n=new Map,i=new Map,a=new Map,s=e.currentRoundId,c,l=e.now??Date.now;for(let d of e.rounds)t.set(d.round.id,d);for(let d of e.states??[])r.set(Ne(e.tenant,d.round_id,d.player_id),{state:d,version:0});return{async getRound(d,p){let m=t.get(p);return m?structuredClone(m):void 0},async putRound(d,p,m){t.set(p.round.id,structuredClone(p)),m&&(s=p.round.id,c=void 0)},async setRotation(d,p,m){c={roundIds:[...p],windowSeconds:m}},async getCurrentRound(){let d=c?c.roundIds[Math.floor(l()/1e3/c.windowSeconds)%c.roundIds.length]:s,p=t.get(d);return p?structuredClone(p):void 0},async getState(d,p,m){let f=r.get(Ne(d,p,m));return f?structuredClone(f):void 0},async putStateIfVersion(d,p,m){let f=Ne(d,p.round_id,p.player_id),h=r.get(f);return m===void 0?h?!1:(r.set(f,{state:structuredClone(p),version:0}),!0):!h||h.version!==m?!1:(r.set(f,{state:structuredClone(p),version:h.version+1}),!0)},async getPlay(d,p,m){let f=o.get(Ne(d,p,m));return f?structuredClone(f):void 0},async putPlayIfAbsent(d,p,m,f){let h=Ne(d,p,m);return o.has(h)?!1:(o.set(h,structuredClone(f)),!0)},async getLeaderboard(d,p){if(e.leaderboard)return structuredClone(e.leaderboard);let m=[...n.entries()].filter(([f])=>f.startsWith(Ne(d,p)+"#")).map(([f,h])=>({rank:0,player_id:f.slice(f.lastIndexOf("#")+1),display_name:f.slice(f.lastIndexOf("#")+1),score:h})).sort((f,h)=>h.score-f.score).map((f,h)=>({...f,rank:h+1}));return{server_time:"",snapshot:"",round_id:p,order:"high_first",tie_break:"earliest_play",entries:m,total:m.length}},async getProfile(d,p){return e.profile?structuredClone(e.profile):{server_time:"",snapshot:"",player_id:p,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}}},async countPlay(d,p,m,f){let h=Ne(d,p,m,String(l_(f))),b=(i.get(h)??0)+1;return i.set(h,b),{inBucket:b,buckets:c_}},async recordScore(d,p,m,f){n.set(Ne(d,p,m),f)},async appendAudit(d){if(a.has(d.id))throw new Error("audit_record_exists");a.set(d.id,structuredClone(d))},async commitPlay(d){let p=Ne(d.tenant,d.playerId,d.idempotencyKey);if(o.has(p))return{ok:!1,reason:"play_exists"};let m=Ne(d.tenant,d.state.round_id,d.state.player_id),f=r.get(m);if(d.expectedVersion===void 0){if(f)return{ok:!1,reason:"state_version"}}else if(!f||f.version!==d.expectedVersion)return{ok:!1,reason:"state_version"};for(let h of d.audit)if(a.has(h.id))throw new Error("audit_record_exists");o.set(p,structuredClone(d.play)),r.set(m,{state:structuredClone(d.state),version:d.expectedVersion===void 0?0:d.expectedVersion+1});for(let h of d.audit)a.set(h.id,structuredClone(h));return d.score&&n.set(Ne(d.tenant,d.score.roundId,d.playerId),d.score.score),{ok:!0}}}}function CA(e,t){return{archetype:"hunt",round:{server_time:"",snapshot:t,id:On(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open},challenge_instance_id:null,challenge:{board:e.board,pick:e.required??e.targets.length,prompt:e.prompt}},secret:{targets:e.targets,required:e.required??e.targets.length,pointsPerTarget:e.pointsPerTarget,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function PA(e,t){return{archetype:"push",round:{server_time:"",snapshot:t,id:On(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open},challenge_instance_id:null,challenge:{prompt:e.prompt,target:e.target,target_label:e.targetLabel,picks:e.slates.length,slates:e.slates.map(o=>({id:o.id,label:o.label,entries:o.entries.map(n=>({key:n.key,label:n.label}))})),tiers:e.tiers,floor_label:e.floorLabel,bust_label:e.bustLabel}},secret:{target:e.target,targetLabel:e.targetLabel,slates:e.slates,tiers:e.tiers,floorLabel:e.floorLabel,bustLabel:e.bustLabel},limits:{picksAllowed:e.slates.length,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function OA(e,t){return{archetype:"group",round:{server_time:"",snapshot:t,id:On(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open},challenge_instance_id:null,challenge:{board:e.board,prompt:e.prompt,groups:e.groups.length,group_size:e.groups[0]?.members.length??0}},secret:{groups:e.groups,pointsPerGroup:e.pointsPerGroup,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function NA(e,t){let r=e.result!==void 0;return{archetype:"forecast",round:{server_time:"",snapshot:t,id:On(e),number:e.number,can:{accepting_plays:e.open&&!r,results_available:r,solution_revealed:r,closed:!e.open||r},challenge_instance_id:null,challenge:{prompt:e.prompt,options:e.options.map(n=>({key:n.key,label:n.label})),...r?{result:e.result}:{}}},secret:{options:e.options,...r?{result:e.result}:{},pointsForCorrect:e.pointsForCorrect},limits:{attemptsAllowed:e.attemptsAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function RA(e,t){switch(e.archetype){case"hunt":return CA(e,t);case"push":return PA(e,t);case"group":return OA(e,t);case"forecast":return NA(e,t)}}function pa(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(pa).join(",")}]`:`{${Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>`${JSON.stringify(r)}:${pa(o)}`).join(",")}}`}function jA(e,t){let r=o=>{let{server_time:n,snapshot:i,...a}=o,{version:s,...c}=a;return c};return pa({round:r(e.round),secret:e.secret,limits:e.limits,archetype:e.archetype})===pa({round:r(t.round),secret:t.secret,limits:t.limits,archetype:t.archetype??"hunt"})}async function d_(e,t,r,o,n=!0,i,a){let s=i??On(r),c=await e.getRound(t,s),l=RA(r,o);if(l.round.id=s,a&&(l.round.origin=a),c&&jA(l,c))return await e.putRound(t,{...c,archetype:l.archetype},n),{roundId:s,version:c.round.version,changed:!1,current:n};let d=c?c.round.version+1:1,p={round:{...l.round,version:d},secret:l.secret,limits:l.limits,archetype:l.archetype};return await e.putRound(t,p,n),await e.appendAudit({id:`round_${s}_v${d}`,at:new Date().toISOString(),tenant:t,round_id:s,player_id:null,action:c?"round.replaced":"round.provisioned",detail:{version:d,snapshot:o,number:r.number,archetype:r.archetype,accepting_plays:r.open}}),{roundId:s,version:d,changed:!0,current:n}}var Jp={"access-control-allow-origin":"*","access-control-allow-methods":"GET, POST, OPTIONS","access-control-allow-headers":"authorization, content-type, x-gamestage-player","access-control-max-age":"600"},Ge=(e,t)=>({status:e,headers:{"content-type":"application/json",...Jp},body:t}),Ze=(e,t,r,o=!1)=>Ge(e,{error:{code:t,message:r,retryable:o}});function kt(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}var xt={runtime:kt(Q.runtime),currentRound:kt(Q.currentRound),round:kt(Q.round),plays:kt(Q.plays),roundState:kt(Q.roundState),profile:kt(Q.profile),leaderboard:kt(Q.leaderboard),session:kt(Q.session)},DA=Ze(404,"not_found","No such route on the player API."),p_=e=>({status:429,headers:{"content-type":"application/json","retry-after":String(e),...Jp},body:{error:{code:"rate_limited",message:"Too many requests for this game from one caller. Slow down.",retryable:!0}}});async function m_(e,t,r,o){let n=e.path.replace(/\/+$/,"")||e.path;if(e.method==="OPTIONS")return{status:204,headers:Jp,body:void 0};if(e.method==="GET"&&n===`${ta}/health`)return Ge(200,{status:"ok"});let i=xt.session.exec(n);if(i){if(e.method!=="POST")return Ze(405,"method_not_allowed","This route accepts POST.");let s=decodeURIComponent(i[1]),c=o?.check(Tp(s,Ep(e)));if(c&&!c.allowed)return p_(c.retryAfterSeconds);let l=r?.issue(s);return l?Ge(200,{server_time:"",snapshot:"",token:l.token,player_id:l.playerId,kind:"anonymous"}):Ze(503,"unavailable","This deployment cannot issue a session.",!0)}let a=[["runtime",xt.runtime],["currentRound",xt.currentRound],["plays",xt.plays],["roundState",xt.roundState],["profile",xt.profile],["leaderboard",xt.leaderboard],["round",xt.round]];for(let[s,c]of a){let l=c.exec(n);if(!l)continue;let d=decodeURIComponent(l[1]),p=l[2]?decodeURIComponent(l[2]):void 0,m=o?.check(Tp(d,Ep(e)));if(m&&!m.allowed)return p_(m.retryAfterSeconds);let f=s==="plays";if(f?e.method!=="POST":e.method!=="GET")return Ze(405,"method_not_allowed",`This route accepts ${f?"POST":"GET"}.`);let h;try{h=await t.forPlayer(d,e)}catch{return Ze(503,"unavailable","The Engine is briefly unavailable.",!0)}if(!h)return Ze(404,"not_found",`No game with id "${d}".`);try{switch(s){case"runtime":return Ge(200,await h.getRuntime());case"currentRound":return Ge(200,await h.getCurrentRound());case"round":{let b=await h.getRound(p);return b?Ge(200,b):Ze(404,"not_found","No such round.")}case"roundState":return Ge(200,await h.getRoundState(p));case"profile":return Ge(200,await h.getProfile());case"leaderboard":return Ge(200,await h.getLeaderboard());case"plays":{let b=av.safeParse(e.body);if(!b.success)return Ze(422,"invalid_request",b.error.issues.map(D=>`${D.path.join(".")||"body"}: ${D.message}`).join("; "));let $=await h.play(p,b.data),O=Ge(200,$);return $.outcome==="busy"&&$.retry_after_seconds&&(O.headers["retry-after"]=String($.retry_after_seconds)),O}}}catch(b){return b instanceof Error&&b.message==="round_not_found"?Ze(404,"not_found","No such round."):(console.error("engine_error",{path:e.path,method:e.method,game:d,name:b instanceof Error?b.name:"unknown"}),Ze(500,"internal","Something went wrong at our end.",!0))}}return DA}import{createPublicKey as _I,generateKeyPairSync as bI}from"node:crypto";var Kt=new TextEncoder,Hr=new TextDecoder,ma=new TextDecoder("utf-8",{fatal:!0}),dL=2**32;function fa(...e){let t=e.reduce((n,{length:i})=>n+i,0),r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function nt(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o>127)throw new TypeError("non-ASCII string encountered in encode()");t[r]=o}return t}var ha=(e,t="algorithm.name")=>new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function LA(e,t){if(t&&!e.usages.includes(t))throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function f_(e,t,r){let o=e.algorithm;if(o.name!==t.name)throw ha(t.name);if(t.hash&&o.hash?.name!==t.hash)throw ha(t.hash,"algorithm.hash");if(t.namedCurve&&o.namedCurve!==t.namedCurve)throw ha(t.namedCurve,"algorithm.namedCurve");if(t.length!==void 0&&o.length!==t.length)throw ha(t.length,"algorithm.length");LA(e,r)}function h_(e,t,...r){if(r=r.filter(Boolean),r.length>2){let o=r.pop();e+=`one of type ${r.join(", ")}, or ${o}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var g_=(e,...t)=>h_("Key must be ",e,...t),qp=(e,t,...r)=>h_(`Key for the ${e} algorithm must be `,t,...r);var ce=class extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(t,r){super(t,r),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},Ee=class extends ce{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},Jr=class extends ce{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},ga=class extends ce{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"},ee=class extends ce{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"};var H=class extends ce{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"},St=class extends ce{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"};var qr=class extends ce{static code="ERR_JWKS_INVALID";code="ERR_JWKS_INVALID"},Wn=class extends ce{static code="ERR_JWKS_NO_MATCHING_KEY";code="ERR_JWKS_NO_MATCHING_KEY";constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r)}},ya=class extends ce{[Symbol.asyncIterator]=async function*(){};static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r)}},va=class extends ce{static code="ERR_JWKS_TIMEOUT";code="ERR_JWKS_TIMEOUT";constructor(t="request timed out",r){super(t,r)}},_a=class extends ce{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(t="signature verification failed",r){super(t,r)}};var Hn=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},Yp=e=>e?.[Symbol.toStringTag]==="KeyObject",Xp=e=>Hn(e)||Yp(e);function Qp(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,r=[];for(let o=0;o<e.length;o+=t)r.push(String.fromCharCode.apply(null,e.subarray(o,o+t)));return btoa(r.join(""))}function ba(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(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 Yr(e){if(Uint8Array.fromBase64)try{return Uint8Array.fromBase64(typeof e=="string"?e:Hr.decode(e),{alphabet:"base64url"})}catch(r){throw new TypeError("The input to be decoded is not correctly encoded.",{cause:r})}let t=e;if(t instanceof Uint8Array&&(t=Hr.decode(t)),t.includes("+")||t.includes("/"))throw new TypeError("The input to be decoded is not correctly encoded.");t=t.replace(/-/g,"+").replace(/_/g,"/");try{return ba(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}function Jn(e){let t=e;return typeof t=="string"&&(t=Kt.encode(t)),Uint8Array.prototype.toBase64?t.toBase64({alphabet:"base64url",omitPadding:!0}):Qp(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var zA=e=>typeof e=="object"&&e!==null;function Re(e){if(!zA(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function wa(...e){let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let o of t){let n=Object.keys(o);if(!r||r.size===0){r=new Set(n);continue}for(let i of n){if(r.has(i))return!1;r.add(i)}}return!0}var em=e=>Re(e)&&typeof e.kty=="string",y_=e=>e.kty!=="oct"&&(e.kty==="AKP"&&typeof e.priv=="string"||typeof e.d=="string"),v_=e=>e.kty!=="oct"&&e.d===void 0&&e.priv===void 0,__=e=>e.kty==="oct"&&typeof e.k=="string";function tm(e,t){if(e)throw new TypeError(`${t} can only be called once`)}function nm(e,t,r){try{return Yr(e)}catch{throw new r(`Failed to base64url decode the ${t}`)}}function b_(e,t,r){try{return nt(e)}catch{throw new r(`The ${t} is not a valid base64url string`)}}function w_(e,t,r){let o;try{o=JSON.parse(ma.decode(Yr(e)))}catch{throw new t(r)}if(!Re(o))throw new t(r);return o}var UA='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';function FA(e,t){if(!e.kty.includes(t.kty))throw new ee(UA);return e.subtleFor?.({kty:t.kty,crv:t.crv})??e.subtle}async function ka(e,t){if(t.kty==="RSA"&&"oth"in t&&t.oth!==void 0)throw new ee('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');let r=FA(e,t),o=!!(t.d||t.priv),n=o?e.usages.private:e.usages.public,i={...t};return i.kty!=="AKP"&&delete i.alg,delete i.use,crypto.subtle.importKey("jwk",i,r,t.ext??!o,t.key_ops??n)}var qn=e=>e[Symbol.toStringTag],rm=(e,t,r)=>{let{alg:o}=e;if(t.use!==void 0){let n;switch(r){case"sign":case"verify":n="sig";break;case"encrypt":case"decrypt":n="enc";break}if(t.use!==n)throw new TypeError(`Invalid key for this operation, its "use" must be "${n}" when present`)}if(t.alg!==void 0&&t.alg!==o)throw new TypeError(`Invalid key for this operation, its "alg" must be "${o}" when present`);if(Array.isArray(t.key_ops)){let n=r==="encrypt"||r==="decrypt"?e.keyOps?.[r]:r;if(n&&t.key_ops?.includes?.(n)===!1)throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${n}" when present`)}return!0},GA=(e,t,r)=>{let{alg:o}=e;if(t instanceof Uint8Array)return{kind:x_,key:t};if(em(t)){if(__(t)&&rm(e,t,r))return{kind:xa,key:t};throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!Xp(t))throw new TypeError(qp(o,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(t.type!=="secret")throw new TypeError(`${qn(t)} instances for symmetric algorithms must be of type "secret"`);return Hn(t)?{kind:om,key:t}:{kind:im,key:t}},ZA=(e,t,r)=>{let{alg:o}=e;if(em(t))switch(r){case"decrypt":case"sign":if(y_(t)&&rm(e,t,r))return{kind:xa,key:t};throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if(v_(t)&&rm(e,t,r))return{kind:xa,key:t};throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!Xp(t))throw new TypeError(qp(o,t,"CryptoKey","KeyObject","JSON Web Key"));if(t.type==="secret")throw new TypeError(`${qn(t)} instances for asymmetric algorithms must not be of type "secret"`);if(t.type==="public")switch(r){case"sign":throw new TypeError(`${qn(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw new TypeError(`${qn(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.type==="private")switch(r){case"verify":throw new TypeError(`${qn(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw new TypeError(`${qn(t)} instances for asymmetric algorithm encryption must be of type "public"`)}return Hn(t)?{kind:om,key:t}:{kind:im,key:t}},x_=Symbol(),om=Symbol(),im=Symbol(),xa=Symbol();function BA(e,t,r){return e.symmetric?GA(e,t,r):ZA(e,t,r)}var Sa,KA={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function S_(e,t){return Sa||=new WeakMap,Sa.get(e)?.[t]}function $_(e,t,r){let o=Sa.get(e);return o?o[t]=r:Sa.set(e,{[t]:r}),r}var k_=async(e,t,r)=>{let o=S_(e,r.alg);if(o)return o;let n=await ka(r,{...t,alg:r.alg});return $_(e,r.alg,n)},VA=(e,t)=>{let r=S_(e,t.alg);if(r)return r;let o=e.type==="public",n=o?t.usages.public:t.usages.private,{asymmetricKeyType:i}=e,a=KA[e.asymmetricKeyDetails?.namedCurve],s=t.subtleFor?.({crv:a,asymmetricKeyType:i})??t.subtle;return $_(e,t.alg,e.toCryptoKey(s,o,n))};async function $a(e,t,r){let o=BA(e,t,r);switch(o.kind){case x_:case om:return o.key;case xa:{if(o.key.k)return Yr(o.key.k);if(!Object.isFrozen(o.key)){let{key_ops:n}=o.key;Array.isArray(n)&&Object.freeze(n),Object.freeze(o.key)}return k_(o.key,o.key,e)}case im:{let n=o.key;return n.type==="secret"?n.export():"toCryptoKey"in n&&typeof n.toCryptoKey=="function"?VA(n,e):k_(n,n.export({format:"jwk"}),e)}}}function Xr(e){let t={__proto__:null};for(let r of Object.keys(e))t[r]={...e[r],alg:r};return t}var WA={public:["encrypt","wrapKey"],private:["decrypt","unwrapKey"]},HA={public:[],private:["deriveBits"]},Aa={public:[],private:[]};function Ea(e){return{kty:["RSA"],subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:WA,minModulusLength:2048,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function Ta(e){return{kty:["EC","OKP"],subtle:{name:"ECDH"},subtleFor:({kty:t,crv:r,asymmetricKeyType:o})=>{if(r==="X25519"||o==="x25519")return{name:"X25519"};if(t==="OKP")throw new ee('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:r}},usages:HA,kwBits:e,keyOps:{decrypt:"deriveBits"}}}function am(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-KW",length:e},usages:Aa,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function sm(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:Aa,gcmkw:`A${e}GCM`,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}}}function cm(e,t){return{kty:["oct"],symmetric:!0,subtle:{name:"PBKDF2"},usages:Aa,pbes2Hash:`SHA-${e}`,kwBits:t,keyOps:{encrypt:"deriveBits",decrypt:"deriveBits"}}}var JA=Xr({dir:{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM"},usages:Aa,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}},"RSA-OAEP":Ea(1),"RSA-OAEP-256":Ea(256),"RSA-OAEP-384":Ea(384),"RSA-OAEP-512":Ea(512),"ECDH-ES":Ta(),"ECDH-ES+A128KW":Ta(128),"ECDH-ES+A192KW":Ta(192),"ECDH-ES+A256KW":Ta(256),A128KW:am(128),A192KW:am(192),A256KW:am(256),A128GCMKW:sm(128),A192GCMKW:sm(192),A256GCMKW:sm(256),"PBES2-HS256+A128KW":cm(256,128),"PBES2-HS384+A192KW":cm(384,192),"PBES2-HS512+A256KW":cm(512,256)}),E_={public:[],private:[]},T_={encrypt:"encrypt",decrypt:"decrypt"};function lm(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:E_,keyOps:T_,cekBits:e,ivBits:96,cbc:!1}}function um(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-CBC",length:e},usages:E_,keyOps:T_,cekBits:e,ivBits:128,cbc:!0}}var jL=Xr({A128GCM:lm(128),A192GCM:lm(192),A256GCM:lm(256),"A128CBC-HS256":um(256),"A192CBC-HS384":um(384),"A256CBC-HS512":um(512)});function A_(e){return JA[e]}function qA(e,t){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function YA(e,t,r){f_(t,e.subtle,r),e.minModulusLength&&qA(e.alg,t)}async function I_(e,t,r){return t instanceof Uint8Array?crypto.subtle.importKey("raw",t,e.subtle,!1,[r]):(YA(e,t,r),t)}async function C_(e,t,r){let o=await I_(e,t,"sign"),n=await crypto.subtle.sign(e.operation,o,r);return new Uint8Array(n)}async function P_(e,t,r,o){let n=await I_(e,t,"verify");try{return await crypto.subtle.verify(e.operation,n,r,o)}catch{return!1}}var Ia=new Map([["b64",!0]]);function O_(e,t){if(t!==void 0&&(!Array.isArray(t)||t.some(r=>typeof r!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}function N_(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function Ca(e,t,r,o,n){if(n.crit!==void 0&&o?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!o||o.crit===void 0)return new Set;if(!Array.isArray(o.crit)||o.crit.length===0||o.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;r!==void 0?i=new Map([...Object.entries(r),...t.entries()]):i=t;for(let a of o.crit){if(!i.has(a))throw new ee(`Extension Header Parameter "${a}" is not recognized`);if(n[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(i.get(a)&&o[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(o.crit)}var Qr={public:["verify"],private:["sign"]};function dm(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],symmetric:!0,subtle:t,operation:t,usages:Qr}}function Yn(e,t,r){let o={name:e,hash:`SHA-${t}`};return{kty:["RSA"],subtle:o,operation:r?{...o,saltLength:r}:o,usages:Qr,minModulusLength:2048}}function pm(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},operation:{name:"ECDSA",hash:`SHA-${t}`},usages:Qr}}function R_(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,operation:e,usages:Qr}}function mm(e){let t={name:e};return{kty:["AKP"],subtle:t,operation:t,usages:Qr}}var j_=Xr({HS256:dm(256),HS384:dm(384),HS512:dm(512),RS256:Yn("RSASSA-PKCS1-v1_5",256),RS384:Yn("RSASSA-PKCS1-v1_5",384),RS512:Yn("RSASSA-PKCS1-v1_5",512),PS256:Yn("RSA-PSS",256,32),PS384:Yn("RSA-PSS",384,48),PS512:Yn("RSA-PSS",512,64),ES256:pm("P-256",256),ES384:pm("P-384",384),ES512:pm("P-521",512),EdDSA:R_(),Ed25519:R_(),"ML-DSA-44":mm("ML-DSA-44"),"ML-DSA-65":mm("ML-DSA-65"),"ML-DSA-87":mm("ML-DSA-87")});function Pa(e){let t=j_[e];if(!t)throw new ee(`alg ${e} is not supported either by JOSE or your javascript runtime`);return t}function Oa(e){return j_[e]}function D_(e){return{algorithms:e&&O_("algorithms",e.algorithms),crit:e?.crit}}async function XA(e,t,r){let o={};e.protected&&(o=w_(e.protected,H,"JWS Protected Header is invalid"));let n;if(e.header!==void 0){if(!wa(o,e.header))throw new H("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");n={...o,...e.header}}else n=o;let i=Ca(H,Ia,t.crit,o,n),a=!0;if(i.has("b64")&&(a=o.b64,typeof a!="boolean"))throw new H('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new H('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(t.algorithms&&!t.algorithms.has(s))throw new ga('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new H("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new H("JWS Payload must be a string or an Uint8Array instance");let c=!1;typeof r=="function"&&(r=await r(o,e),c=!0);let l=Pa(s),d=fa(e.protected!==void 0?nt(e.protected):new Uint8Array,nt("."),typeof e.payload=="string"?a?t.b64p??=b_(e.payload,"payload",H):Kt.encode(e.payload):e.payload),p=nm(e.signature,"signature",H),m=await $a(l,r,"verify");if(!await P_(l,m,p,d))throw new _a;let h;return a?h=nm(e.payload,"payload",H):typeof e.payload=="string"?h=Kt.encode(e.payload):h=e.payload,{payload:h,parsedProt:o,b64:a,key:m,resolvedKey:c}}async function L_(e,t,r){if(e instanceof Uint8Array&&(e=Hr.decode(e)),typeof e!="string")throw new H("Compact JWS must be a string or Uint8Array");let{0:o,1:n,2:i,length:a}=e.split(".");if(a!==3)throw new H("Invalid Compact JWS");return XA({payload:n,protected:o,signature:i},t,r)}var $t=e=>Math.floor(e.getTime()/1e3),M_=60,U_=M_*60,fm=U_*24,QA=fm*7,eI=fm*365.25,tI=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function eo(e){let t=tI.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),o=t[3].toLowerCase(),n;switch(o){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(r*M_);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(r*U_);break;case"day":case"days":case"d":n=Math.round(r*fm);break;case"week":case"weeks":case"w":n=Math.round(r*QA);break;default:n=Math.round(r*eI);break}return t[1]==="-"||t[4]==="ago"?-n:n}function rt(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}var z_=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`,nI=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1;function F_(e,t,r={}){let o;try{o=JSON.parse(ma.decode(t))}catch{}if(!Re(o))throw new St("JWT Claims Set must be a top-level JSON object");let{typ:n}=r;if(n&&(typeof e.typ!="string"||z_(e.typ)!==z_(n)))throw new Ee('unexpected "typ" JWT header value',o,"typ","check_failed");let{requiredClaims:i=[],issuer:a,subject:s,audience:c,maxTokenAge:l}=r,d=[...i];l!==void 0&&d.push("iat"),c!==void 0&&d.push("aud"),s!==void 0&&d.push("sub"),a!==void 0&&d.push("iss");for(let h of new Set(d.reverse()))if(!(h in o))throw new Ee(`missing required "${h}" claim`,o,h,"missing");if(a!==void 0&&!(Array.isArray(a)?a:[a]).includes(o.iss))throw new Ee('unexpected "iss" claim value',o,"iss","check_failed");if(s!==void 0&&o.sub!==s)throw new Ee('unexpected "sub" claim value',o,"sub","check_failed");if(c!==void 0&&!nI(o.aud,typeof c=="string"?[c]:c))throw new Ee('unexpected "aud" claim value',o,"aud","check_failed");let p;switch(typeof r.clockTolerance){case"string":p=eo(r.clockTolerance);break;case"number":p=r.clockTolerance;break;case"undefined":p=0;break;default:throw new TypeError("Invalid clockTolerance option type")}rt("clockTolerance option",p);let{currentDate:m}=r,f=rt("currentDate option",$t(m||new Date));if((o.iat!==void 0||l!==void 0)&&typeof o.iat!="number")throw new Ee('"iat" claim must be a number',o,"iat","invalid");if(o.nbf!==void 0){if(typeof o.nbf!="number")throw new Ee('"nbf" claim must be a number',o,"nbf","invalid");if(o.nbf>f+p)throw new Ee('"nbf" claim timestamp check failed',o,"nbf","check_failed")}if(o.exp!==void 0){if(typeof o.exp!="number")throw new Ee('"exp" claim must be a number',o,"exp","invalid");if(o.exp<=f-p)throw new Jr('"exp" claim timestamp check failed',o,"exp","check_failed")}if(l!==void 0){let h=f-o.iat,b=typeof l=="number"?l:eo(l);if(h-p>b)throw new Jr('"iat" claim timestamp check failed (too far in the past)',o,"iat","check_failed");if(h<0-p)throw new Ee('"iat" claim timestamp check failed (it should be in the past)',o,"iat","check_failed")}return o}var Na=class{#e;constructor(t){if(!Re(t))throw new TypeError("JWT Claims Set MUST be an object");this.#e=structuredClone(t)}data(){return Kt.encode(JSON.stringify(this.#e))}get iss(){return this.#e.iss}set iss(t){this.#e.iss=t}get sub(){return this.#e.sub}set sub(t){this.#e.sub=t}get aud(){return this.#e.aud}set aud(t){this.#e.aud=t}set jti(t){this.#e.jti=t}set nbf(t){typeof t=="number"?this.#e.nbf=rt("setNotBefore",t):t instanceof Date?this.#e.nbf=rt("setNotBefore",$t(t)):this.#e.nbf=$t(new Date)+eo(t)}set exp(t){typeof t=="number"?this.#e.exp=rt("setExpirationTime",t):t instanceof Date?this.#e.exp=rt("setExpirationTime",$t(t)):this.#e.exp=$t(new Date)+eo(t)}set iat(t){t===void 0?this.#e.iat=$t(new Date):t instanceof Date?this.#e.iat=rt("setIssuedAt",$t(t)):typeof t=="string"?this.#e.iat=rt("setIssuedAt",$t(new Date)+eo(t)):this.#e.iat=rt("setIssuedAt",t)}};async function hm(e,t,r){let o=await L_(e,D_(r),t);if(!o.b64)throw new St("JWTs MUST NOT use unencoded payload");let i={payload:F_(o.parsedProt,o.payload,r),protectedHeader:o.parsedProt};return typeof t=="function"?{...i,key:o.key}:i}function Ra(e){return e?.b64===!1&&Array.isArray(e.crit)&&e.crit.includes("b64")}async function G_(e,t){let{protectedHeader:r,unprotectedHeader:o}=e;if(!wa(r,o))throw new H("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...r,...o};N_(H,r);let i=Ca(H,Ia,e.crit,r,n),a=!0;if(i.has("b64")&&(a=r.b64,typeof a!="boolean"))throw new H('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new H('JWS "alg" (Algorithm) Header Parameter missing or invalid');let c=Pa(s),l,d;if(a){let O=e.encoded??={};O.b64??=Jn(e.payload),O.raw??=nt(O.b64),l=O.b64,d=O.raw}else d=e.payload,l="";let p,m;r?(p=Jn(JSON.stringify(r)),m=nt(p)):(p="",m=new Uint8Array);let f=fa(m,nt("."),d),h=await $a(c,t,"sign"),b=await C_(c,h,f),$={signature:Jn(b),payload:l};return r&&($.protected=p),$}var ja=class{#e;#t;#n;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this.#e=t}setProtectedHeader(t){return tm(this.#t,"setProtectedHeader"),this.#t=t,this}setUnprotectedHeader(t){return tm(this.#n,"setUnprotectedHeader"),this.#n=t,this}async sign(t,r){if(!this.#t&&!this.#n)throw new H("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");let o=await G_({payload:this.#e,protectedHeader:this.#t,unprotectedHeader:this.#n,crit:r?.crit},t);return this.#n&&(o.header=this.#n),o}};var Da=class{#e;#t;constructor(t){this.#e=new ja(t)}setProtectedHeader(t){return this.#e.setProtectedHeader(t),this.#t=t,this}async sign(t,r){if(Ra(this.#t))throw new TypeError("use the flattened module for creating JWS with b64: false");let o=await this.#e.sign(t,r);return`${o.protected}.${o.payload}.${o.signature}`}};var to=class{#e;#t;constructor(t={}){this.#t=new Na(t)}setIssuer(t){return this.#t.iss=t,this}setSubject(t){return this.#t.sub=t,this}setAudience(t){return this.#t.aud=t,this}setJti(t){return this.#t.jti=t,this}setNotBefore(t){return this.#t.nbf=t,this}setExpirationTime(t){return this.#t.exp=t,this}setIssuedAt(t){return this.#t.iat=t,this}setProtectedHeader(t){return this.#e=t,this}async sign(t,r){let o=new Da(this.#t.data());if(o.setProtectedHeader(this.#e),Ra(this.#e))throw new St("JWTs MUST NOT use unencoded payload");return o.sign(t,r)}};function Z_(){return new ee('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}function B_(e){if(typeof e!="string")throw Z_();let t=Oa(e)??A_(e);if(!t)throw Z_();return t}var gm=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},rI=e=>({data:e,pos:0}),ym=e=>{let t=e.data[e.pos++];if(t===void 0)throw new Error("Unexpected end of ASN.1 input");return t},no=e=>{let t=ym(e);if(t&128){let r=t&127,o=0;for(let n=0;n<r;n++)o=o<<8|ym(e);return o}return t};var ro=(e,t,r)=>{if(ym(e)!==t)throw new Error(r)},K_=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw new Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},oI=e=>{ro(e,6,"Expected algorithm OID");let t=no(e);return K_(e,t)};function iI(e){ro(e,48,"Invalid PKCS#8 structure"),no(e),ro(e,2,"Expected version field");let t=no(e);e.pos+=t,ro(e,48,"Expected algorithm identifier");let r=no(e);return{algIdStart:e.pos,algIdLength:r}}var aI=e=>{let t=oI(e);if(gm(t,[43,101,110]))return"X25519";if(!gm(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");ro(e,6,"Expected curve OID");let r=no(e),o=K_(e,r);for(let{name:n,oid:i}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(gm(o,i))return n;throw new Error("Unsupported named curve")},sI=async(e,t,r,o)=>{let n=B_(r);if(n.symmetric)throw new ee('Invalid or unsupported "alg" (Algorithm) value');let i=e==="spki",a;if(n.subtleFor)try{a=n.subtleFor({crv:o.getNamedCurve(t)})}catch{throw new ee("Invalid or unsupported key format")}else a=n.subtle;return crypto.subtle.importKey(e,t,a,o?.extractable??!!i,i?n.usages.public:n.usages.private)},cI=(e,t)=>ba(e.replace(t,"")),V_=(e,t,r)=>{let o=cI(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),n=r;return t?.startsWith?.("ECDH-ES")&&(n||={},n.getNamedCurve=i=>{let a=rI(i);return iI(a),aI(a)}),sI("pkcs8",o,t,n)};function lI(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}async function uI(e){if(Yp(e))if(e.type==="secret")e=e.export();else return e.export({format:"jwk"});if(e instanceof Uint8Array)return{kty:"oct",k:Jn(e)};if(!Hn(e))throw new TypeError(g_(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:o,use:n,...i}=lI(await crypto.subtle.exportKey("jwk",e));return i.kty==="AKP"&&(i.alg=o),i}async function vm(e){return uI(e)}function dI(e){let t=typeof e=="string"?Oa(e):void 0;if(!t||t.symmetric)throw new ee('Unsupported "alg" value for a JSON Web Key Set');return t}function pI(e){if(!e||typeof e!="object")return!1;let{keys:t}=e;return Array.isArray(t)&&t.every(mI)}function mI(e){return Re(e)}var _m=class{#e;#t=new WeakMap;constructor(t){if(!pI(t))throw new qr("JSON Web Key Set malformed");this.#e=structuredClone(t)}jwks(){return this.#e}async getKey(t,r){let{alg:o,kid:n}={...t,...r?.header},i=dI(o),a=this.#e.keys.filter(l=>{let d=i.kty.includes(l.kty);return d&&typeof n=="string"&&(d=n===l.kid),d&&(typeof l.alg=="string"||l.kty==="AKP")&&(d=o===l.alg),d&&typeof l.use=="string"&&(d=l.use==="sig"),d&&Array.isArray(l.key_ops)&&(d=l.key_ops.includes("verify")),d&&i.crv&&(d=l.crv===i.crv),d}),{0:s,length:c}=a;if(c===0)throw new Wn;if(c!==1){let l=new ya,d=this.#t;throw l[Symbol.asyncIterator]=async function*(){for(let p of a)try{yield await W_(d,p,i)}catch{}},l}return W_(this.#t,s,i)}};async function W_(e,t,r){let o=e.get(t)||e.set(t,{}).get(t);if(o[r.alg]===void 0){let n=await ka(r,{...t,alg:r.alg,ext:!0});if(n.type!=="public")throw new qr("JSON Web Key Set members must be public keys");o[r.alg]=n}return o[r.alg]}function bm(e){let t=new _m(e),r=async(o,n)=>t.getKey(o,n);return Object.defineProperties(r,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),r}function fI(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}var wm;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(wm="jose/v6.2.5");var H_=Symbol();async function hI(e,t,r,o=fetch){let n=await o(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(i=>{throw i.name==="TimeoutError"?new va:i});if(n.status!==200)throw new ce("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch{throw new ce("Failed to parse the JSON Web Key Set HTTP response as JSON")}}var La=Symbol();function gI(e,t){return!(typeof e!="object"||e===null||!("uat"in e)||typeof e.uat!="number"||Date.now()-e.uat>=t||!("jwks"in e)||!Re(e.jwks)||!Array.isArray(e.jwks.keys)||!Array.prototype.every.call(e.jwks.keys,Re))}var km=class{#e;#t;#n;#c;#i;#r;#o;#l;#a;#s;constructor(t,r){if(!(t instanceof URL))throw new TypeError("url must be an instance of URL");this.#e=new URL(t.href),this.#t=typeof r?.timeoutDuration=="number"?r?.timeoutDuration:5e3,this.#n=typeof r?.cooldownDuration=="number"?r?.cooldownDuration:3e4,this.#c=typeof r?.cacheMaxAge=="number"?r?.cacheMaxAge:6e5,this.#o=new Headers(r?.headers),wm&&!this.#o.has("User-Agent")&&this.#o.set("User-Agent",wm),this.#o.has("accept")||(this.#o.set("accept","application/json"),this.#o.append("accept","application/jwk-set+json")),this.#l=r?.[H_],r?.[La]!==void 0&&(this.#s=r?.[La],gI(r?.[La],this.#c)&&(this.#i=this.#s.uat,this.#a=bm(this.#s.jwks)))}pendingFetch(){return!!this.#r}coolingDown(){return typeof this.#i=="number"?Date.now()<this.#i+this.#n:!1}fresh(){return typeof this.#i=="number"?Date.now()<this.#i+this.#c:!1}jwks(){return this.#a?.jwks()}async getKey(t,r){(!this.#a||!this.fresh())&&await this.reload();try{return await this.#a(t,r)}catch(o){if(o instanceof Wn&&this.coolingDown()===!1)return await this.reload(),this.#a(t,r);throw o}}async reload(){this.#r&&fI()&&(this.#r=void 0),this.#r||=hI(this.#e.href,this.#o,AbortSignal.timeout(this.#t),this.#l).then(t=>{this.#a=bm(t),this.#s&&(this.#s.uat=Date.now(),this.#s.jwks=t),this.#i=Date.now(),this.#r=void 0}).catch(t=>{throw this.#r=void 0,t}),await this.#r}};function xm(e,t){let r=new km(e,t),o=async(n,i)=>r.getKey(n,i);return Object.defineProperties(o,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>r.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>r.jwks(),enumerable:!0,configurable:!1,writable:!1}}),o}async function Sm(e,t,r){if(typeof e!="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return V_(e,t,r)}var J_=new Map;function yI(e){let t=J_.get(e);return t||(t=xm(new URL(e)),J_.set(e,t)),t}var vI="id:";function q_(e){let t;return{lastRefusal:()=>t,async resolve(r){t=void 0;try{let{payload:o}=await hm(r,yI(e.jwksUri),{issuer:e.issuer,...e.audience?{audience:e.audience}:{}}),n=typeof o.sub=="string"?o.sub:"";if(!n){t="token_malformed";return}let i=typeof o.name=="string"?o.name:typeof o.preferred_username=="string"?o.preferred_username:void 0;return{playerId:`${vI}${n}`,...i?{alias:i}:{}}}catch(o){let n=o?.code;t=n==="ERR_JWT_EXPIRED"?"token_expired":n==="ERR_JWS_INVALID"||n==="ERR_JWT_INVALID"?"token_malformed":"token_untrusted";return}}}}var za="/.well-known/jwks.json";async function $m(e){let t=e.replace(/\/+$/,""),r=t,o=`${t}${za}`,{privateKey:n,publicKey:i}=bI("rsa",{modulusLength:2048,privateKeyEncoding:{type:"pkcs8",format:"pem"},publicKeyEncoding:{type:"spki",format:"pem"}}),a=await Sm(n,"RS256"),s=await vm(_I(i)),c="gamestage-dev",l={keys:[{...s,kid:c,alg:"RS256",use:"sig"}]};return{issuer:r,jwksUri:o,jwks:l,resolver:q_({issuer:r,jwksUri:o}),async mint(d,p={}){let m=Math.floor(Date.now()/1e3);return new to({name:d}).setProtectedHeader({alg:"RS256",kid:c}).setIssuer(r).setSubject(d).setIssuedAt(m).setExpirationTime(m+(p.expiresInSeconds??3600)).sign(a)}}}import{randomBytes as kI}from"node:crypto";var xI="x-gamestage-player";async function SI(e){let t=u_({tenant:e.game,rounds:[],currentRoundId:""});await d_(t,e.game,e.round,"local",!0,void 0,{source:"manifest"});let r=a_({game:e.game,archetype:e.round.archetype,snapshot:"local",title:e.title,identityRequired:e.identityRequired});return{async forPlayer(o,n){if(o===e.game)return s_({tenant:e.game,playerId:n.playerId??Wr(void 0),identityRefusal:n.identityRefusal,runtime:r,store:t,round:{archetype:e.round.archetype}})}}}async function $I(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)try{return JSON.parse(Buffer.concat(t).toString("utf8"))}catch{return}}async function Ma(e){let t=await SI(e),r=kI(32).toString("base64"),o={issue:()=>Xv(r)},n=e.devIdentity,i=wI((a,s)=>{(async()=>{let c=new URL(a.url??"/","http://localhost");if(n&&c.pathname===za){let m=JSON.stringify(n.jwks);s.writeHead(200,{"content-type":"application/jwk-set+json; charset=utf-8","access-control-allow-origin":"*","content-length":Buffer.byteLength(m)}),s.end(m);return}let l=a.headers[xI],d=a.headers.authorization,p=await m_({method:a.method??"GET",path:c.pathname,body:await $I(a),...(({playerId:m,refused:f})=>({playerId:m,identityRefusal:f}))(await qv({token:d?.replace(/^Bearer\s+/i,"")||void 0,anonymousId:Array.isArray(l)?l[0]:l,sessionSecret:r,resolver:n?.resolver}))},t,o);s.writeHead(p.status,p.headers),s.end(p.body===void 0?void 0:JSON.stringify(p.body))})().catch(()=>{s.headersSent?s.destroy():(s.writeHead(500,{"content-type":"application/json"}),s.end(JSON.stringify({error:{code:"internal",message:"The local Engine failed.",retryable:!0}})))})});return i.attachDevIdentity=a=>{n=a},i}async function TI(e){let t;try{t=await EI(e,"utf8")}catch{return}let r=_e(t);if(!r.ok){P(`${e} is not a valid App Manifest.`,r.issues.map(o=>`${S.cyan(o.path)} ${o.message}`));return}return r.manifest}async function AI(e){let t=Number(e.port);if(!Number.isInteger(t)||t<0||t>65535)throw new Error("--port must be an integer between 0 and 65535");let r=e.scenario??"default";if(e.fixture)return{server:da(r),what:"fixture",game:"conformance-game"};let o=await TI(e.manifest??"gamestage.yaml");if(!o)return{server:da(r),what:"fixture",game:"conformance-game"};let n=o.backend.round;if(!n)return{server:da(r),what:"fixture",game:o.app.id,title:o.app.title};let i=o.backend.archetype;return i&&i!==n.archetype&&P(`The manifest declares the ${i} archetype and a ${n.archetype} round.`,["One of the two is wrong. The round decides what the Engine marks."]),Bt.includes(n.archetype)||P(`No Engine here serves the ${n.archetype} archetype yet.`,[`Built so far: ${Bt.join(", ")}. \`gamestage dev --fixture\` serves`,"the contract fixture if you are working against the wire rather than the rules."]),{server:await Ma({game:o.app.id,round:n,title:o.app.title,identityRequired:!!e.as}),what:"engine",game:o.app.id,round:n,title:o.app.title,containerLabel:o.experience.container_label,as:e.as}}async function Y_(e){let t=await AI(e),{server:r}=t,o=()=>new Promise((l,d)=>{r.close(p=>p?d(p):l())}),n=new Promise(l=>{let d=async()=>{process.off("SIGINT",d),process.off("SIGTERM",d),await o(),l()};process.once("SIGINT",d),process.once("SIGTERM",d)});await new Promise((l,d)=>{r.once("error",d),r.listen(Number(e.port),"127.0.0.1",()=>l())});let i=r.address();if(!i||typeof i=="string")throw new Error("The local server did not report its listening address");let a=`http://127.0.0.1:${i.port}`,s,c;if(t.as&&(s=await $m(a),r.attachDevIdentity?.(s),c=await s.mint(t.as)),R())z({ok:!0,status:"listening",serving:t.what,baseUrl:a,game:t.game,round:t.round?{number:t.round.number,id:`round-${t.round.number}`}:null,...s&&c?{identity:{as:t.as,player_id:`id:${t.as}`,issuer:s.issuer,jwks_uri:s.jwksUri,token:c,required:!0}}:{}});else if(t.what==="engine"){I(t.title??t.game);let l=It(t.containerLabel);T("Serving",`your ${It(t.containerLabel,{lower:!0})}, through the real Engine`),T(l,`${t.round.number} (round-${t.round.number})`),T("API",a),T("Game id",t.game),v(),A(`window.GAMESTAGE_API = "${a}"`),A(`window.GAMESTAGE_GAME = "${t.game}"`),c&&A(`window.GAMESTAGE_TOKEN = "${c}"`),v(),s&&c&&(T("Playing as",`${t.as} (${S.cyan(`id:${t.as}`)})`),T("Identity","required, so an anonymous play is refused here too"),T("Keys",s.jwksUri),v(),A("A real RS256 token, validated by the code that validates a customer's. The keypair lives for this run only."),A(`This harness cannot be deployed: its issuer is a loopback URL, and ${S.cyan("gamestage manifest validate")} refuses a manifest that names one.`),v()),A(`Edit the ${It(t.containerLabel,{lower:!0})} in your manifest and restart to see it change.`),v()}else I("Serving the contract fixture"),T("API",a),T("Game id",t.game),v(),A("No round in the manifest, so there is nothing of yours to serve."),A("Add `backend.round` and restart, and this becomes your game."),v();await n}import{readFile as Om}from"node:fs/promises";import{dirname as ib,resolve as Nm}from"node:path";import{spawn as II}from"node:child_process";import{createHash as CI,randomBytes as Q_}from"node:crypto";import{constants as PI}from"node:fs";import{access as OI,mkdtemp as NI,rm as eb}from"node:fs/promises";import{request as RI}from"node:http";import{homedir as Ua,tmpdir as jI}from"node:os";import{join as oo}from"node:path";var DI="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";function Em(e,t={}){let r=Buffer.isBuffer(e)?e:Buffer.from(e),o=t.maskingKey??Q_(4);if(o.length!==4)throw new Error("A WebSocket masking key must be four bytes.");let n=r.length<126?0:r.length<=65535?2:8,i=Buffer.alloc(2+n+4+r.length);i[0]=(t.fin===!1?0:128)|(t.opcode??1),i[1]=128|(n===0?r.length:n===2?126:127);let a=2;n===2?(i.writeUInt16BE(r.length,a),a+=2):n===8&&(i.writeBigUInt64BE(BigInt(r.length),a),a+=8),o.copy(i,a),a+=4;for(let s=0;s<r.length;s++)i[a+s]=r[s]^o[s%4];return i}var Am=class{buffered=Buffer.alloc(0);fragments=[];fragmentedOpcode;push(t){this.buffered=this.buffered.length?Buffer.concat([this.buffered,t]):Buffer.from(t);let r=[];for(;this.buffered.length>=2;){let o=this.buffered[0],n=this.buffered[1],i=(o&128)!==0,a=o&15,s=(n&128)!==0,c=n&127,l=2;if(c===126){if(this.buffered.length<l+2)break;c=this.buffered.readUInt16BE(l),l+=2}else if(c===127){if(this.buffered.length<l+8)break;let m=this.buffered.readBigUInt64BE(l);if(m>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("WebSocket frame is too large to decode safely.");c=Number(m),l+=8}let d=l;if(s&&(l+=4),this.buffered.length<l+c)break;let p=Buffer.from(this.buffered.subarray(l,l+c));if(s)for(let m=0;m<p.length;m++)p[m]^=this.buffered[d+m%4];if(this.buffered=this.buffered.subarray(l+c),a===8||a===9||a===10)r.push({opcode:a,payload:p});else if(a===1){if(this.fragmentedOpcode!==void 0)throw new Error("A new WebSocket message arrived before its continuation finished.");i?r.push({opcode:a,payload:p}):(this.fragmentedOpcode=a,this.fragments=[p])}else if(a===0){if(this.fragmentedOpcode===void 0)throw new Error("A WebSocket continuation arrived without a first frame.");this.fragments.push(p),i&&(r.push({opcode:this.fragmentedOpcode,payload:Buffer.concat(this.fragments)}),this.fragmentedOpcode=void 0,this.fragments=[])}else throw new Error(`Unsupported WebSocket opcode ${a}.`)}return r}},Im=class{constructor(t,r){this.socket=t;t.on("data",o=>this.receive(o)),t.on("error",o=>this.fail(o)),t.on("close",()=>this.fail(new Error("Chrome closed the DevTools connection."))),r.length&&this.receive(r)}socket;decoder=new Am;pending=new Map;listeners=new Map;nextId=1;ended=!1;send(t,r={},o){if(this.ended)return Promise.reject(new Error("Chrome's DevTools connection is closed."));let n=this.nextId++;return new Promise((i,a)=>{this.pending.set(n,{resolve:s=>i(s),reject:a}),this.socket.write(Em(JSON.stringify({id:n,method:t,params:r,...o?{sessionId:o}:{}})),s=>{s&&(this.pending.delete(n),a(s))})})}on(t,r,o){let n=`${o??""}:${t}`,i=this.listeners.get(n)??new Set;return i.add(r),this.listeners.set(n,i),()=>i.delete(r)}close(){this.ended||(this.ended=!0,this.socket.end(Em(Buffer.alloc(0),{opcode:8})),this.rejectPending(new Error("Chrome's DevTools connection was closed.")))}receive(t){try{for(let r of this.decoder.push(t)){if(r.opcode===8){this.ended=!0,this.socket.end(),this.rejectPending(new Error("Chrome closed the DevTools connection."));continue}if(r.opcode===9){this.socket.write(Em(r.payload,{opcode:10}));continue}if(r.opcode===10)continue;let o=JSON.parse(r.payload.toString("utf8"));if(o.id!==void 0){let n=this.pending.get(o.id);if(!n)continue;this.pending.delete(o.id),o.error?n.reject(new Error(o.error.message??"Chrome rejected a CDP command.")):n.resolve(o.result)}else if(o.method){let n=`${o.sessionId??""}:${o.method}`;for(let i of this.listeners.get(n)??[])i(o.params??{})}}}catch(r){this.fail(r instanceof Error?r:new Error("Could not read Chrome's response."))}}fail(t){this.ended||(this.ended=!0,this.socket.destroy(),this.rejectPending(t))}rejectPending(t){for(let r of this.pending.values())r.reject(t);this.pending.clear()}},Cm=class e{constructor(t,r,o,n){this.cdp=t;this.sessionId=r;this.child=o;this.profile=n;this.on("Runtime.exceptionThrown",a=>{let s=a.exceptionDetails,c=s?.exception?.description??s?.text??"Unknown page error";this.pageErrors.push(c.split(`
7164
+ `,n=e.search(/<script\b/i);if(n===-1){let i=e.search(/<\/head>/i);return i===-1?o+e:e.slice(0,i)+o+e.slice(i)}return e.slice(0,n)+o+e.slice(n)}async function Vn(e,t,r){let o=await fetch(e,{method:"PUT",body:typeof t=="string"?new Uint8Array(Buffer.from(t,"utf8")):t,headers:{"content-type":r}});o.ok||C(`Upload refused with ${o.status}. Ask for a fresh URL and retry.`)}function pa(e){let t=new URL(e.publicUrl);return t.pathname=`/${e.key.split("/").map(encodeURIComponent).join("/")}`,t.search="",t.hash="",t.toString()}function nA(e){switch(qT(e).toLowerCase()){case".html":return"text/html; charset=utf-8";case".css":return"text/css; charset=utf-8";case".js":case".mjs":return"text/javascript; charset=utf-8";case".json":return"application/json; charset=utf-8";case".svg":return"image/svg+xml";case".png":return"image/png";case".jpg":case".jpeg":return"image/jpeg";case".gif":return"image/gif";case".webp":return"image/webp";case".ico":return"image/x-icon";case".webmanifest":return"application/manifest+json; charset=utf-8";case".wasm":return"application/wasm";default:return"application/octet-stream"}}async function rA(e,t,r){let o=XT(r),n;try{n=Up(o)}catch{throw C(`Cannot read ${r}.`),new Error("unreachable")}let i=await e.uploadTarget(t,"index.html"),a=t_(Wr(n.toString("utf8")),`${i.playerApiOrigin}`,t);await Vn(i.uploadUrl,a,"text/html; charset=utf-8");let s=await e.uploadTarget(t,we);await Vn(s.uploadUrl,Jt,"text/javascript; charset=utf-8");let c=await e.uploadTarget(t,ke);await Vn(c.uploadUrl,Yt,"text/javascript; charset=utf-8");let l=await e.uploadTarget(t,et);return await Vn(l.uploadUrl,Vr,"image/svg+xml"),R()||(v(),A(`Uploaded ${r} to ${pa(i)}`),A(`Wired it to ${i.playerApiOrigin} as "${t}"`),A(`Shipped @monterosa/gamestage beside it (${qt})`),A(`Shipped the player client beside it (${or})`)),pa(i)}async function oA(e,t,r){let o;try{o=Mp(r)}catch(m){throw C(m instanceof Error?m.message:`Cannot read ${r}.`),new Error("unreachable")}let n=o.find(m=>m.relativePath==="index.html");n||C(`Directory ${r} must contain an index.html file.`);let i=Up(n.path,"utf8"),a=Dp(i),s=o.some(m=>m.relativePath==="favicon.ico"),c=o.some(m=>m.relativePath===et),l=!a&&!s,p=l&&!c,d;for(let m of o){let f=await e.uploadTarget(t,m.relativePath);m.relativePath==="index.html"&&(d=f);let h=Up(m.path),_=m.relativePath==="index.html"?t_(l?Wr(h.toString("utf8")):h.toString("utf8"),f.playerApiOrigin,t):h;await Vn(f.uploadUrl,_,nA(m.relativePath))}if(p){let m=await e.uploadTarget(t,et);await Vn(m.uploadUrl,Vr,"image/svg+xml")}if(await e.pruneBundle(t,[...o.map(m=>m.relativePath),...p?[et]:[]]),!R()&&d&&(v(),A(`Uploaded ${o.length} files from ${r}`),A(`Playground: ${pa(d)}`),A(`Wired it to ${d.playerApiOrigin} as "${t}"`),p&&A("Added a replaceable starter favicon")),!d)throw new Error("The directory index was not uploaded.");return pa(d)}import{readFile as ZI}from"node:fs/promises";var o_="player-conformance",Bp="round-current",iA="sha256:emulator-conformance";function tt(e){return structuredClone(e)}function nt(){return{server_time:"2026-08-01T09:00:00.000Z",snapshot:iA}}function aA(e){let t=e==="per-player-challenge";return{...nt(),id:Bp,number:412,version:2,can:{accepting_plays:!0,results_available:!1,solution_revealed:!1,closed:!1},challenge_instance_id:t?"challenge-player-conformance":null,challenge:{prompt:"alpha"}}}function n_(e,t){let r=t==="mistakes";return{...nt(),player_id:o_,round_id:e,attempts_used:r?6:0,attempts_allowed:10,mistakes_used:r?2:0,mistakes_allowed:4,progress:r?{solved:["group-1"]}:{},score:r?10:0,score_revision:0,finished:!1,outcome:r?"incomplete":void 0}}function sA(e){let t=aA(e),r=new Map([[t.id,t]]),o=new Map([[t.id,n_(t.id,e)]]);return e==="solution-disclosure"&&(r.set("round-revealed",{...t,id:"round-revealed",number:411,version:3,can:{accepting_plays:!1,results_available:!0,solution_revealed:!0,closed:!0},solution:{answer:"revealed-alpha"}}),o.set("round-revealed",n_("round-revealed",e))),{runtime:{...nt(),game:"conformance-game",api_version:"2.0",archetype:e==="at-settlement"?"forecast":"group",marking:e==="at-settlement"?"at_settlement":"at_commit",challenge_source:e==="per-player-challenge"?"per_player":"shared",schedule:{kind:"continuous"},updates:{transport:"poll",freshness_seconds:30},display:{title:"Conformance game"},identity:{required:!1,provider:"identify",anonymous_play:!0},archive:!0,capabilities:["plays","profile","leaderboard"]},rounds:r,roundStates:o,leaderboard:{...nt(),round_id:Bp,order:"high_first",tie_break:"earliest_play",entries:[{rank:1,player_id:"player-example",display_name:"Example",score:20}],total:1,truncated:!1},profile:{...nt(),player_id:o_,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}},plays:new Map,nextPlay:1}}function r_(e,t){return{...nt(),play_id:`rejected-${e.nextPlay++}`,outcome:"rejected",reason:t,round_version:2,marked:!1,feedback:[]}}function Kp(e){let t=sA(e);return{async getRuntime(){return tt(t.runtime)},async getCurrentRound(){return tt(t.rounds.get(Bp))},async getRound(r){let o=t.rounds.get(r);return o?tt(o):void 0},async play(r,o){let n=t.rounds.get(r);if(!n)return r_(t,"round_not_found");let i=t.plays.get(o.idempotency_key);if(i)return{...tt(i),outcome:"duplicate"};if(o.round_version!==n.version)return{...nt(),play_id:`stale-${t.nextPlay++}`,outcome:"stale",reason:"round_version",round_version:n.version,marked:!1,feedback:[]};if(n.challenge_instance_id!==null&&o.challenge_instance_id!==n.challenge_instance_id)return r_(t,"challenge_instance_id");let a=t.roundStates.get(r),s=t.runtime.marking==="at_settlement",c={...a,...nt(),attempts_used:a.attempts_used+1,score:a.score+(s?0:10),finished:!s,outcome:s?"pending":"won"},l={...nt(),play_id:`play-${t.nextPlay++}`,outcome:"accepted",round_version:n.version,marked:!s,feedback:s?[]:[{key:"answer",verdict:"correct"}],round_state:tt(c)};return t.roundStates.set(r,c),t.plays.set(o.idempotency_key,l),c.finished&&!a.finished&&(t.profile=oa(t.profile,c.outcome)),tt(l)},async getRoundState(r){let o=t.roundStates.get(r);if(!o)throw new Error(`No such round: ${r}`);return tt(o)},async getProfile(){return tt(t.profile)},async getLeaderboard(){return tt(t.leaderboard)}}}function cA(){return e=>Kp(e)}var JD=cA();import{createServer as lA}from"node:http";function Gt(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}var uA=Gt(ee.runtime),dA=Gt(ee.currentRound),pA=Gt(ee.round),mA=Gt(ee.plays),fA=Gt(ee.roundState),hA=Gt(ee.profile),gA=Gt(ee.leaderboard);function wt(e,t,r){let o=JSON.stringify(r);e.writeHead(t,{"content-type":"application/json; charset=utf-8","content-length":Buffer.byteLength(o)}),e.end(o)}function Wn(e,t,r,o){wt(e,t,{error:{code:r,message:o,retryable:!1}})}async function yA(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)return JSON.parse(Buffer.concat(t).toString("utf8"))}async function vA(e,t,r){if(!e.url){Wn(t,400,"invalid_request","The request URL is missing.");return}let n=new URL(e.url,"http://localhost").pathname;if(e.method==="GET"){if(uA.test(n)){wt(t,200,await r.getRuntime());return}if(dA.test(n)){wt(t,200,await r.getCurrentRound());return}let i=pA.exec(n);if(i){let s=await r.getRound(decodeURIComponent(i[2]));if(!s){Wn(t,404,"round_not_found","The requested round was not found.");return}wt(t,200,s);return}let a=fA.exec(n);if(a){let s=decodeURIComponent(a[2]);try{wt(t,200,await r.getRoundState(s))}catch{Wn(t,404,"round_not_found","The requested round was not found.")}return}if(hA.test(n)){wt(t,200,await r.getProfile());return}if(gA.test(n)){wt(t,200,await r.getLeaderboard());return}}if(e.method==="POST"){let i=mA.exec(n);if(i){try{let a=await yA(e);wt(t,200,await r.play(decodeURIComponent(i[2]),a))}catch(a){Wn(t,400,"invalid_request",a instanceof SyntaxError?"The request body must be valid JSON.":"The request body is invalid.")}return}}Wn(t,404,"not_found","The requested player API route was not found.")}function fa(e="default"){let t=Kp(e);return lA((r,o)=>{vA(r,o,t).catch(()=>{o.headersSent?o.destroy():Wn(o,500,"internal_error","The emulator could not answer the request.")})})}import{createServer as zI}from"node:http";import{createHmac as _A,randomBytes as bA,timingSafeEqual as wA}from"node:crypto";var Vp="anon:";function Wp(e){return e.startsWith(Vp)}function Hr(e){let t=(e??"").replace(/[^A-Za-z0-9_.-]/g,"").slice(0,64);return`${Vp}${t||"unknown"}`}var kA={async resolve(){}};async function i_(e){if(!e.token)return e.sessionSecret?{playerId:SA(e.anonymousId,e.sessionSecret)??Hr(void 0)}:{playerId:Hr(e.anonymousId)};let t=e.resolver??kA,r=await t.resolve(e.token);return r?{playerId:r.playerId,alias:r.alias}:{playerId:Hr(e.anonymousId),refused:t.lastRefusal?.()??"identity_unresolved"}}var a_=".";function s_(e){let t=`${Vp}${bA(16).toString("base64url")}`;return{playerId:t,token:xA(t,e)}}function c_(e,t){return _A("sha256",t).update(e).digest("base64url")}function xA(e,t){return`${e}${a_}${c_(e,t)}`}function SA(e,t){if(!e)return;let r=e.lastIndexOf(a_);if(r<=0)return;let o=e.slice(0,r);if(!Wp(o))return;let n=Buffer.from(e.slice(r+1)),i=Buffer.from(c_(o,t));if(n.length===i.length)return wA(n,i)?o:void 0}var $A="engine_error",EA="engine_integrity_violation";function Hp(e){return e instanceof Error?e.name:"unknown"}function Jr(e){console.error($A,e)}function l_(e,t){console.error(EA,{violation:e,...t})}var Jp="round_not_found";function u_(e){let{tenant:t,playerId:r,store:o,rules:n}=e,i=e.now??(()=>new Date().toISOString()),a=0,s=e.newPlayId??(()=>`play_${++a}_${r}`),c=()=>({server_time:i(),snapshot:e.runtime.snapshot}),l=f=>f;function p(f,h){return!n.settle||!f.round.can.results_available||h.outcome!=="pending"?h:n.settle({secret:f.secret,state:h,limits:f.limits,now:i()})}async function d(f,h){let _=await o.getState(t,f,r);return _?{state:_.state,version:_.version}:{state:n.initialState({playerId:r,roundId:f,limits:h,now:i()}),version:void 0}}let m=(f,h,_)=>({...c(),play_id:s(),outcome:f,reason:h,round_version:_,marked:!1,feedback:[]});return{async getRuntime(){return{...e.runtime,...c()}},async getCurrentRound(){let f=await o.getCurrentRound(t);if(!f)throw new Error(Jp);return{...f.round,...c()}},async getRound(f){let h=await o.getRound(t,f);return h?{...h.round,...c()}:void 0},async getRoundState(f){let h=await o.getRound(t,f);if(!h)throw new Error(Jp);let _=l(h),{state:b}=await d(f,_.limits);return{...p(_,b),...c()}},async getProfile(){return{...await o.getProfile(t,r),...c()}},async getLeaderboard(f){let _=(await o.getCurrentRound(t))?.round.id??"";return{...await o.getLeaderboard(t,_,{limit:f,viewerId:r}),...c()}},async play(f,h){let _=await o.getRound(t,f);if(!_)return m("rejected",Jp,0);let b=l(_);if(e.runtime.identity?.required&&Wp(r))return m("rejected",e.identityRefusal??"identity_required",b.round.version);if(b.limits.playsPerSecond!==void 0){let q=i().slice(0,19),Vt=await o.countPlay(t,f,q,r),D=Math.max(1,Math.ceil(b.limits.playsPerSecond/Vt.buckets));if(Vt.inBucket>D)return{...m("busy","capped",b.round.version),retry_after_seconds:1}}let P=await o.getPlay(t,r,h.idempotency_key);if(P)return{...P.result,...c(),outcome:"duplicate"};let{state:z,version:ne}=await d(f,b.limits),G=n.admissible({accepting:b.round.can.accepting_plays,roundVersion:b.round.version,playedVersion:h.round_version,challengeInstanceId:b.round.challenge_instance_id??null,playedChallengeInstanceId:h.challenge_instance_id??null,state:z,secret:b.secret,limits:b.limits});if(!G.ok){let q=G.reason==="round_version"?"stale":"rejected";return m(q,G.reason,b.round.version)}let N=n.mark({payload:h.payload,secret:b.secret,state:z,limits:b.limits,markAtSettlement:e.runtime.marking==="at_settlement",now:i()});if(N.outcome!=="accepted")return m("rejected",N.reason??"rejected",b.round.version);let Y={...c(),play_id:s(),outcome:N.outcome,round_version:b.round.version,marked:N.marked,feedback:N.feedback,round_state:{...N.next,...c()}},Et=`play:${JSON.stringify([t,r,h.idempotency_key])}`,it=[{id:Et,at:Y.server_time,tenant:t,round_id:f,player_id:r,action:"play.committed",detail:{play_id:Y.play_id,idempotency_key:h.idempotency_key,outcome:Y.outcome,marked:Y.marked,round_version:Y.round_version,score_before:z.score,score_after:N.next.score,attempts_used:N.next.attempts_used,attempts_allowed:N.next.attempts_allowed,mistakes_used:N.next.mistakes_used,mistakes_allowed:N.next.mistakes_allowed,...n.auditDetail({secret:b.secret,before:z,decision:N,payload:h.payload})}}];N.marked&&it.push({id:`score:${JSON.stringify([t,r,h.idempotency_key])}`,at:Y.server_time,tenant:t,round_id:f,player_id:r,action:"score.recorded",detail:{play_id:Y.play_id,score_before:z.score,score_after:N.next.score,marked:!0,outcome:N.next.outcome}});let Kt=N.next.finished&&!z.finished?oa(await o.getProfile(t,r),N.next.outcome):void 0,tr=await o.commitPlay({tenant:t,playerId:r,idempotencyKey:h.idempotency_key,play:{result:Y},state:N.next,expectedVersion:ne,audit:it,...N.marked?{score:{roundId:f,score:N.next.score}}:{},...Kt?{profile:Kt}:{}});if(!tr.ok&&tr.reason==="play_exists"){let q=await o.getPlay(t,r,h.idempotency_key);return q?{...q.result,...c(),outcome:"duplicate"}:(Jr({stage:"play_receipt_missing",tenant:t,round_id:f,player_id:r}),m("rejected","play_conflict",b.round.version))}return tr.ok?Y:(await o.appendAudit({id:Et,at:Y.server_time,tenant:t,round_id:f,player_id:r,action:"play.refused",detail:{play_id:Y.play_id,idempotency_key:h.idempotency_key,reason:"round_version",attempt_spent:!1}}),m("stale","round_version",b.round.version))}}}function TA(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function AA(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=t.picks.filter(P=>r.targets.includes(P)&&!i.has(P)),s=t.picks.filter(P=>!r.targets.includes(P)),c=o.attempts_used+1,l=o.mistakes_used+(s.length>0?1:0);for(let P of a)i.add(P);let p=i.size>=r.required,d=l>=n.mistakesAllowed,m=c>=n.attemptsAllowed,f=p||d||m,h=e.markAtSettlement?o.score:a.length*r.pointsPerTarget+o.score+(p?r.completionBonus:0),_={...o,server_time:e.now,attempts_used:c,attempts_allowed:n.attemptsAllowed,mistakes_used:l,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i]},score:h,finished:f,outcome:e.markAtSettlement?"pending":p?"won":f?"lost":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:_}:{outcome:"accepted",marked:!0,feedback:t.picks.map(P=>({key:P,verdict:r.targets.includes(P)?"correct":"wrong"})),next:_}}function IA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var Yp={archetype:"hunt",admissible:TA,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return AA({...e,attempt:{picks:t}})},initialState:IA,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[];return{correct_picks:t.feedback.filter(n=>n.verdict==="correct").length,picks_submitted:o.length,points_per_target:e.pointsPerTarget,completion_bonus:e.completionBonus}}};function qp(e){let t=e.progress;return{total:typeof t.total=="number"?t.total:0,picks:Array.isArray(t.picks)?t.picks:[],bust:t.bust===!0}}function CA(e,t){if(t>e.target)return e.bustLabel;let r=(e.target-t)/e.target;for(let o of e.tiers)if(r<=o.within)return o.label;return e.floorLabel}function PA(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.picksAllowed?{ok:!1,reason:"picks_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function OA(e){let{secret:t,state:r,limits:o}=e,n=qp(r),i=P=>({outcome:"rejected",reason:P,marked:!1,feedback:[],next:r});if(e.attempt.picks.length!==1)return i("one_pick_per_play");let a=t.slates[r.attempts_used];if(!a)return i("picks_exhausted");let[s]=e.attempt.picks,c=a.entries.find(P=>P.key===s);if(!c)return i("not_on_slate");let l=n.total+c.value,p=l>t.target,d=[...n.picks,{slate:a.id,key:c.key,label:c.label,value:c.value}],m=r.attempts_used+1,f=m>=o.picksAllowed,h=p||f,_={...r,server_time:e.now,attempts_used:m,attempts_allowed:o.picksAllowed,progress:{total:l,picks:d,bust:p,...h?{tier:CA(t,l)}:{}},score:e.markAtSettlement?r.score:p?0:l,finished:h,outcome:e.markAtSettlement?"pending":p?"lost":h?"won":"incomplete"};return e.markAtSettlement?{outcome:"accepted",marked:!1,feedback:[],next:_}:{outcome:"accepted",marked:!0,feedback:[{key:c.key,verdict:p?"wrong":"correct",label:String(c.value)}],next:_}}function NA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.picksAllowed,mistakes_used:0,mistakes_allowed:0,progress:{total:0,picks:[],bust:!1},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var Xp={archetype:"push",admissible:PA,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return OA({...e,attempt:{picks:t}})},initialState:NA,auditDetail({secret:e,before:t,decision:r}){let o=qp(t),n=qp(r.next);return{target:e.target,total_before:o.total,total_after:n.total,bust:n.bust,picks_committed:n.picks.length,...n.tier?{tier:n.tier}:{}}}};var RA=(e,t)=>e.length===t.length&&new Set([...e,...t]).size===e.length,jA=(e,t)=>new Set(e.filter(r=>t.members.includes(r))).size;function DA(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.finished?{ok:!1,reason:"round_finished"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:e.state.mistakes_used>=e.limits.mistakesAllowed?{ok:!1,reason:"mistakes_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function LA(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=new Set(Array.isArray(o.progress.solved)?o.progress.solved:[]),a=Array.isArray(o.progress.revealed)?o.progress.revealed:[],s=r.groups.filter(N=>!i.has(N.key)),c=s.find(N=>RA(N.members,t.picks)),l=o.attempts_used+1,p=o.mistakes_used+(c?0:1);c&&(i.add(c.key),a.push({key:c.key,label:c.label,members:[...c.members]}));let d=i.size>=r.groups.length,m=p>=n.mistakesAllowed,f=l>=n.attemptsAllowed,h=d||m||f,_=e.markAtSettlement?o.score:o.score+(c?r.pointsPerGroup:0)+(d?r.completionBonus:0),b={...o,server_time:e.now,attempts_used:l,attempts_allowed:n.attemptsAllowed,mistakes_used:p,mistakes_allowed:n.mistakesAllowed,progress:{...o.progress,solved:[...i],revealed:a},score:_,finished:h,outcome:e.markAtSettlement?"pending":d?"won":h?"lost":"incomplete"};if(e.markAtSettlement)return{outcome:"accepted",marked:!1,feedback:[],next:b};let P=s.reduce((N,Y)=>Math.max(N,jA(t.picks,Y)),0),z=!c&&t.picks.length>1&&P===t.picks.length-1,ne=c?"correct":z?"close":"wrong";return{outcome:"accepted",marked:!0,feedback:t.picks.map(N=>({key:N,verdict:ne,...c?{label:c.label}:{}})),next:b}}function zA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:e.limits.mistakesAllowed,progress:{solved:[],revealed:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var d_={archetype:"group",admissible:DA,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return LA({...e,attempt:{picks:t}})},initialState:zA,auditDetail({secret:e,decision:t,payload:r}){let o=Array.isArray(r.picks)?r.picks:[],n=t.feedback[0]?.verdict;return{group_found:n==="correct"?t.next.progress.solved.at(-1):null,near_miss:n==="close",picks_submitted:o.length,groups_total:e.groups.length,points_per_group:e.pointsPerGroup}}};function MA(e,t){return e.options.find(r=>r.key===t)?.points??e.pointsForCorrect}function UA(e){return e.accepting?e.playedVersion!==e.roundVersion?{ok:!1,reason:"round_version"}:e.challengeInstanceId!==null&&e.playedChallengeInstanceId!==e.challengeInstanceId?{ok:!1,reason:"challenge_instance_id"}:e.state.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function FA(e){let{attempt:t,secret:r,state:o,limits:n}=e,i=r.options.some(l=>l.key===t.pick),a=o.attempts_used+1;if(!i)return{outcome:"rejected",reason:"unknown_option",marked:!1,feedback:[],next:o};let s=[...Array.isArray(o.progress.picks)?o.progress.picks:[],t.pick],c={...o,server_time:e.now,attempts_used:a,attempts_allowed:n.attemptsAllowed,progress:{...o.progress,picks:s},finished:a>=n.attemptsAllowed};return r.result===void 0?{outcome:"accepted",marked:!1,feedback:[],next:{...c,outcome:"pending"}}:{outcome:"accepted",marked:!0,feedback:GA(r,t.pick),next:p_(r,c,t.pick)}}function GA(e,t){return[{key:t,verdict:t===e.result?"correct":"wrong",...e.options.find(r=>r.key===e.result)?.label?{label:e.options.find(r=>r.key===e.result).label}:{}}]}function p_(e,t,r){let o=r===e.result;return{...t,score:o?MA(e,r):0,finished:!0,outcome:o?"won":"lost"}}function ZA(e){let{secret:t,state:r}=e;if(t.result===void 0)return r;let o=Array.isArray(r.progress.picks)?r.progress.picks:[];return o.length===0?{...r,server_time:e.now,finished:!0,outcome:"lost"}:{...p_(t,r,o[0]),server_time:e.now}}function BA(e){return{server_time:e.now,snapshot:"",player_id:e.playerId,round_id:e.roundId,attempts_used:0,attempts_allowed:e.limits.attemptsAllowed,mistakes_used:0,mistakes_allowed:0,progress:{picks:[]},score:0,score_revision:0,finished:!1,outcome:"incomplete"}}var m_={archetype:"forecast",admissible:UA,mark(e){let t=typeof e.payload.pick=="string"?e.payload.pick:Array.isArray(e.payload.picks)&&typeof e.payload.picks[0]=="string"?e.payload.picks[0]:"";return FA({...e,attempt:{pick:t}})},initialState:BA,settle:ZA,auditDetail({secret:e,decision:t,payload:r}){return{predicted:typeof r.pick=="string"?r.pick:null,settled_at_commit:e.result!==void 0,marked:t.marked,options_offered:e.options.length}}};var f_={hunt:Yp,push:Xp,group:d_,forecast:m_},Zt=Object.keys(f_);function KA(e){return f_[We(e)]}function h_(e){return KA(e.archetype??"hunt")}function g_(e){return{server_time:"",snapshot:e.snapshot,game:e.game,api_version:"2.0",archetype:e.archetype,marking:e.marking??"at_commit",challenge_source:e.challengeSource??"shared",schedule:{kind:"local_midnight"},updates:{transport:"poll",freshness_seconds:30},display:{title:e.title??e.game},identity:{required:e.identityRequired??!1,provider:"jwt",anonymous_play:!e.identityRequired},archive:!0,capabilities:["plays","profile","leaderboard"]}}function y_(e){let t=h_(e.round);if(t)return u_({...e,rules:t})}import{createHash as VA}from"node:crypto";var v_=128;function __(e){return VA("sha256").update(e,"utf8").digest()[0]&127}var Te=(...e)=>e.join("#");function b_(e){let t=new Map,r=new Map,o=new Map,n=new Map,i=new Map,a=new Map,s=new Map,c=e.currentRoundId,l,p=e.now??Date.now;for(let d of e.rounds)t.set(d.round.id,d);for(let d of e.states??[])r.set(Te(e.tenant,d.round_id,d.player_id),{state:d,version:0});return{async getRound(d,m){let f=t.get(m);return f?structuredClone(f):void 0},async putRound(d,m,f){t.set(m.round.id,structuredClone(m)),f&&(c=m.round.id,l=void 0)},async setRotation(d,m,f){l={roundIds:[...m],windowSeconds:f}},async getCurrentRound(){let d=l?l.roundIds[Math.floor(p()/1e3/l.windowSeconds)%l.roundIds.length]:c,m=t.get(d);return m?structuredClone(m):void 0},async getState(d,m,f){let h=r.get(Te(d,m,f));return h?structuredClone(h):void 0},async putStateIfVersion(d,m,f){let h=Te(d,m.round_id,m.player_id),_=r.get(h);return f===void 0?_?!1:(r.set(h,{state:structuredClone(m),version:0}),!0):!_||_.version!==f?!1:(r.set(h,{state:structuredClone(m),version:_.version+1}),!0)},async getPlay(d,m,f){let h=o.get(Te(d,m,f));return h?structuredClone(h):void 0},async putPlayIfAbsent(d,m,f,h){let _=Te(d,m,f);return o.has(_)?!1:(o.set(_,structuredClone(h)),!0)},async getLeaderboard(d,m,f){if(e.leaderboard)return structuredClone(e.leaderboard);let h=[...n.entries()].filter(([b])=>b.startsWith(Te(d,m)+"#")).map(([b,P])=>({rank:0,player_id:b.slice(b.lastIndexOf("#")+1),display_name:b.slice(b.lastIndexOf("#")+1),score:P})).sort((b,P)=>P.score-b.score).map((b,P)=>({...b,rank:P+1})),_=f?.limit??h.length;return{server_time:"",snapshot:"",round_id:m,order:"high_first",tie_break:"earliest_play",entries:h.slice(0,_),total:h.length,truncated:!1,me:f?.viewerId?h.find(b=>b.player_id===f.viewerId):void 0}},async getProfile(d,m){let f=s.get(Te(d,m));return f?structuredClone(f):e.profile?structuredClone(e.profile):{server_time:"",snapshot:"",player_id:m,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}}},async countPlay(d,m,f,h){let _=Te(d,m,f,String(__(h))),b=(i.get(_)??0)+1;return i.set(_,b),{inBucket:b,buckets:v_}},async recordScore(d,m,f,h){n.set(Te(d,m,f),h)},async appendAudit(d){if(a.has(d.id))throw l_("audit_record_overwrite",{tenant:d.tenant,round_id:d.round_id,action:d.action,record_id:d.id}),new Error("audit_record_exists");a.set(d.id,structuredClone(d))},async commitPlay(d){let m=Te(d.tenant,d.playerId,d.idempotencyKey);if(o.has(m))return{ok:!1,reason:"play_exists"};let f=Te(d.tenant,d.state.round_id,d.state.player_id),h=r.get(f);if(d.expectedVersion===void 0){if(h)return{ok:!1,reason:"state_version"}}else if(!h||h.version!==d.expectedVersion)return{ok:!1,reason:"state_version"};for(let _ of d.audit)if(a.has(_.id))throw new Error("audit_record_exists");o.set(m,structuredClone(d.play)),r.set(f,{state:structuredClone(d.state),version:d.expectedVersion===void 0?0:d.expectedVersion+1});for(let _ of d.audit)a.set(_.id,structuredClone(_));return d.score&&n.set(Te(d.tenant,d.score.roundId,d.playerId),d.score.score),d.profile&&s.set(Te(d.tenant,d.playerId),structuredClone(d.profile)),{ok:!0}}}}function WA(e,t){return{archetype:"hunt",round:{server_time:"",snapshot:t,id:Nn(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open},challenge_instance_id:null,challenge:{board:e.board,pick:e.required??e.targets.length,prompt:e.prompt}},secret:{targets:e.targets,required:e.required??e.targets.length,pointsPerTarget:e.pointsPerTarget,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function HA(e,t){return{archetype:"push",round:{server_time:"",snapshot:t,id:Nn(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open},challenge_instance_id:null,challenge:{prompt:e.prompt,target:e.target,target_label:e.targetLabel,picks:e.slates.length,slates:e.slates.map(o=>({id:o.id,label:o.label,entries:o.entries.map(n=>({key:n.key,label:n.label}))})),tiers:e.tiers,floor_label:e.floorLabel,bust_label:e.bustLabel}},secret:{target:e.target,targetLabel:e.targetLabel,slates:e.slates,tiers:e.tiers,floorLabel:e.floorLabel,bustLabel:e.bustLabel},limits:{picksAllowed:e.slates.length,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function JA(e,t){return{archetype:"group",round:{server_time:"",snapshot:t,id:Nn(e),number:e.number,can:{accepting_plays:e.open,results_available:!1,solution_revealed:!1,closed:!e.open},challenge_instance_id:null,challenge:{board:e.board,prompt:e.prompt,groups:e.groups.length,group_size:e.groups[0]?.members.length??0}},secret:{groups:e.groups,pointsPerGroup:e.pointsPerGroup,completionBonus:e.completionBonus},limits:{attemptsAllowed:e.attemptsAllowed,mistakesAllowed:e.mistakesAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function YA(e,t){let r=e.result!==void 0;return{archetype:"forecast",round:{server_time:"",snapshot:t,id:Nn(e),number:e.number,can:{accepting_plays:e.open&&!r,results_available:r,solution_revealed:r,closed:!e.open||r},challenge_instance_id:null,challenge:{prompt:e.prompt,options:e.options.map(n=>({key:n.key,label:n.label})),...r?{result:e.result}:{}}},secret:{options:e.options,...r?{result:e.result}:{},pointsForCorrect:e.pointsForCorrect},limits:{attemptsAllowed:e.attemptsAllowed,...e.playsPerSecond===void 0?{}:{playsPerSecond:e.playsPerSecond}}}}function qA(e,t){switch(e.archetype){case"hunt":return WA(e,t);case"push":return HA(e,t);case"group":return JA(e,t);case"forecast":return YA(e,t)}}function ha(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(ha).join(",")}]`:`{${Object.entries(e).filter(([,r])=>r!==void 0).sort(([r],[o])=>r<o?-1:r>o?1:0).map(([r,o])=>`${JSON.stringify(r)}:${ha(o)}`).join(",")}}`}function XA(e,t){let r=o=>{let{server_time:n,snapshot:i,...a}=o,{version:s,...c}=a;return c};return ha({round:r(e.round),secret:e.secret,limits:e.limits,archetype:e.archetype})===ha({round:r(t.round),secret:t.secret,limits:t.limits,archetype:t.archetype??"hunt"})}async function w_(e,t,r,o,n=!0,i,a){let s=i??Nn(r),c=await e.getRound(t,s),l=qA(r,o);if(l.round.id=s,a&&(l.round.origin=a),c&&XA(l,c))return await e.putRound(t,{...c,archetype:l.archetype},n),{roundId:s,version:c.round.version,changed:!1,current:n};let p=c?c.round.version+1:1,d={round:{...l.round,version:p},secret:l.secret,limits:l.limits,archetype:l.archetype};return await e.putRound(t,d,n),await e.appendAudit({id:`round_${s}_v${p}`,at:new Date().toISOString(),tenant:t,round_id:s,player_id:null,action:c?"round.replaced":"round.provisioned",detail:{version:p,snapshot:o,number:r.number,archetype:r.archetype,accepting_plays:r.open}}),{roundId:s,version:p,changed:!0,current:n}}var Qp={"access-control-allow-origin":"*","access-control-allow-methods":"GET, POST, OPTIONS","access-control-allow-headers":"authorization, content-type, x-gamestage-player","access-control-max-age":"600"},Ge=(e,t)=>({status:e,headers:{"content-type":"application/json",...Qp},body:t}),Ze=(e,t,r,o=!1)=>Ge(e,{error:{code:t,message:r,retryable:o}});function kt(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}var xt={runtime:kt(ee.runtime),currentRound:kt(ee.currentRound),round:kt(ee.round),plays:kt(ee.plays),roundState:kt(ee.roundState),profile:kt(ee.profile),leaderboard:kt(ee.leaderboard),session:kt(ee.session)},QA=Ze(404,"not_found","No such route on the player API."),k_=e=>({status:429,headers:{"content-type":"application/json","retry-after":String(e),...Qp},body:{error:{code:"rate_limited",message:"Too many requests for this game from one caller. Slow down.",retryable:!0}}});async function x_(e,t,r,o){let n=e.path.replace(/\/+$/,"")||e.path;if(e.method==="OPTIONS")return{status:204,headers:Qp,body:void 0};if(e.method==="GET"&&n===`${ra}/health`)return Ge(200,{status:"ok"});let i=xt.session.exec(n);if(i){if(e.method!=="POST")return Ze(405,"method_not_allowed","This route accepts POST.");let s=decodeURIComponent(i[1]),c=o?.check(Cp(s,Ip(e)));if(c&&!c.allowed)return k_(c.retryAfterSeconds);let l=r?.issue(s);return l?Ge(200,{server_time:"",snapshot:"",token:l.token,player_id:l.playerId,kind:"anonymous"}):Ze(503,"unavailable","This deployment cannot issue a session.",!0)}let a=[["runtime",xt.runtime],["currentRound",xt.currentRound],["plays",xt.plays],["roundState",xt.roundState],["profile",xt.profile],["leaderboard",xt.leaderboard],["round",xt.round]];for(let[s,c]of a){let l=c.exec(n);if(!l)continue;let p=decodeURIComponent(l[1]),d=l[2]?decodeURIComponent(l[2]):void 0,m=o?.check(Cp(p,Ip(e)));if(m&&!m.allowed)return k_(m.retryAfterSeconds);let f=s==="plays";if(f?e.method!=="POST":e.method!=="GET")return Ze(405,"method_not_allowed",`This route accepts ${f?"POST":"GET"}.`);let h;try{h=await t.forPlayer(p,e)}catch(_){return Jr({path:e.path,method:e.method,game:p,stage:"resolve",name:Hp(_)}),Ze(503,"unavailable","The Engine is briefly unavailable.",!0)}if(!h)return Ze(404,"not_found",`No game with id "${p}".`);try{switch(s){case"runtime":return Ge(200,await h.getRuntime());case"currentRound":return Ge(200,await h.getCurrentRound());case"round":{let _=await h.getRound(d);return _?Ge(200,_):Ze(404,"not_found","No such round.")}case"roundState":return Ge(200,await h.getRoundState(d));case"profile":return Ge(200,await h.getProfile());case"leaderboard":return Ge(200,await h.getLeaderboard());case"plays":{let _=lv.safeParse(e.body);if(!_.success)return Ze(422,"invalid_request",_.error.issues.map(z=>`${z.path.join(".")||"body"}: ${z.message}`).join("; "));let b=await h.play(d,_.data),P=Ge(200,b);return b.outcome==="busy"&&b.retry_after_seconds&&(P.headers["retry-after"]=String(b.retry_after_seconds)),P}}}catch(_){return _ instanceof Error&&_.message==="round_not_found"?Ze(404,"not_found","No such round."):(Jr({path:e.path,method:e.method,game:p,name:Hp(_)}),Ze(500,"internal","Something went wrong at our end.",!0))}}return QA}import{createPublicKey as DI,generateKeyPairSync as LI}from"node:crypto";var Bt=new TextEncoder,Yr=new TextDecoder,ga=new TextDecoder("utf-8",{fatal:!0}),LL=2**32;function ya(...e){let t=e.reduce((n,{length:i})=>n+i,0),r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function rt(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);if(o>127)throw new TypeError("non-ASCII string encountered in encode()");t[r]=o}return t}var va=(e,t="algorithm.name")=>new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function eI(e,t){if(t&&!e.usages.includes(t))throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function S_(e,t,r){let o=e.algorithm;if(o.name!==t.name)throw va(t.name);if(t.hash&&o.hash?.name!==t.hash)throw va(t.hash,"algorithm.hash");if(t.namedCurve&&o.namedCurve!==t.namedCurve)throw va(t.namedCurve,"algorithm.namedCurve");if(t.length!==void 0&&o.length!==t.length)throw va(t.length,"algorithm.length");eI(e,r)}function $_(e,t,...r){if(r=r.filter(Boolean),r.length>2){let o=r.pop();e+=`one of type ${r.join(", ")}, or ${o}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}var E_=(e,...t)=>$_("Key must be ",e,...t),em=(e,t,...r)=>$_(`Key for the ${e} algorithm must be `,t,...r);var ce=class extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(t,r){super(t,r),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},Ae=class extends ce{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},qr=class extends ce{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.claim=o,this.reason=n,this.payload=r}},_a=class extends ce{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"},te=class extends ce{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"};var H=class extends ce{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"},St=class extends ce{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"};var Xr=class extends ce{static code="ERR_JWKS_INVALID";code="ERR_JWKS_INVALID"},Hn=class extends ce{static code="ERR_JWKS_NO_MATCHING_KEY";code="ERR_JWKS_NO_MATCHING_KEY";constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r)}},ba=class extends ce{[Symbol.asyncIterator]=async function*(){};static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r)}},wa=class extends ce{static code="ERR_JWKS_TIMEOUT";code="ERR_JWKS_TIMEOUT";constructor(t="request timed out",r){super(t,r)}},ka=class extends ce{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(t="signature verification failed",r){super(t,r)}};var Jn=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},tm=e=>e?.[Symbol.toStringTag]==="KeyObject",nm=e=>Jn(e)||tm(e);function rm(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,r=[];for(let o=0;o<e.length;o+=t)r.push(String.fromCharCode.apply(null,e.subarray(o,o+t)));return btoa(r.join(""))}function xa(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(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 Qr(e){if(Uint8Array.fromBase64)try{return Uint8Array.fromBase64(typeof e=="string"?e:Yr.decode(e),{alphabet:"base64url"})}catch(r){throw new TypeError("The input to be decoded is not correctly encoded.",{cause:r})}let t=e;if(t instanceof Uint8Array&&(t=Yr.decode(t)),t.includes("+")||t.includes("/"))throw new TypeError("The input to be decoded is not correctly encoded.");t=t.replace(/-/g,"+").replace(/_/g,"/");try{return xa(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}function Yn(e){let t=e;return typeof t=="string"&&(t=Bt.encode(t)),Uint8Array.prototype.toBase64?t.toBase64({alphabet:"base64url",omitPadding:!0}):rm(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var tI=e=>typeof e=="object"&&e!==null;function je(e){if(!tI(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Sa(...e){let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let o of t){let n=Object.keys(o);if(!r||r.size===0){r=new Set(n);continue}for(let i of n){if(r.has(i))return!1;r.add(i)}}return!0}var om=e=>je(e)&&typeof e.kty=="string",T_=e=>e.kty!=="oct"&&(e.kty==="AKP"&&typeof e.priv=="string"||typeof e.d=="string"),A_=e=>e.kty!=="oct"&&e.d===void 0&&e.priv===void 0,I_=e=>e.kty==="oct"&&typeof e.k=="string";function im(e,t){if(e)throw new TypeError(`${t} can only be called once`)}function am(e,t,r){try{return Qr(e)}catch{throw new r(`Failed to base64url decode the ${t}`)}}function C_(e,t,r){try{return rt(e)}catch{throw new r(`The ${t} is not a valid base64url string`)}}function P_(e,t,r){let o;try{o=JSON.parse(ga.decode(Qr(e)))}catch{throw new t(r)}if(!je(o))throw new t(r);return o}var rI='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';function oI(e,t){if(!e.kty.includes(t.kty))throw new te(rI);return e.subtleFor?.({kty:t.kty,crv:t.crv})??e.subtle}async function $a(e,t){if(t.kty==="RSA"&&"oth"in t&&t.oth!==void 0)throw new te('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');let r=oI(e,t),o=!!(t.d||t.priv),n=o?e.usages.private:e.usages.public,i={...t};return i.kty!=="AKP"&&delete i.alg,delete i.use,crypto.subtle.importKey("jwk",i,r,t.ext??!o,t.key_ops??n)}var qn=e=>e[Symbol.toStringTag],sm=(e,t,r)=>{let{alg:o}=e;if(t.use!==void 0){let n;switch(r){case"sign":case"verify":n="sig";break;case"encrypt":case"decrypt":n="enc";break}if(t.use!==n)throw new TypeError(`Invalid key for this operation, its "use" must be "${n}" when present`)}if(t.alg!==void 0&&t.alg!==o)throw new TypeError(`Invalid key for this operation, its "alg" must be "${o}" when present`);if(Array.isArray(t.key_ops)){let n=r==="encrypt"||r==="decrypt"?e.keyOps?.[r]:r;if(n&&t.key_ops?.includes?.(n)===!1)throw new TypeError(`Invalid key for this operation, its "key_ops" must include "${n}" when present`)}return!0},iI=(e,t,r)=>{let{alg:o}=e;if(t instanceof Uint8Array)return{kind:N_,key:t};if(om(t)){if(I_(t)&&sm(e,t,r))return{kind:Ea,key:t};throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!nm(t))throw new TypeError(em(o,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(t.type!=="secret")throw new TypeError(`${qn(t)} instances for symmetric algorithms must be of type "secret"`);return Jn(t)?{kind:cm,key:t}:{kind:lm,key:t}},aI=(e,t,r)=>{let{alg:o}=e;if(om(t))switch(r){case"decrypt":case"sign":if(T_(t)&&sm(e,t,r))return{kind:Ea,key:t};throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if(A_(t)&&sm(e,t,r))return{kind:Ea,key:t};throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!nm(t))throw new TypeError(em(o,t,"CryptoKey","KeyObject","JSON Web Key"));if(t.type==="secret")throw new TypeError(`${qn(t)} instances for asymmetric algorithms must not be of type "secret"`);if(t.type==="public")switch(r){case"sign":throw new TypeError(`${qn(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw new TypeError(`${qn(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.type==="private")switch(r){case"verify":throw new TypeError(`${qn(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw new TypeError(`${qn(t)} instances for asymmetric algorithm encryption must be of type "public"`)}return Jn(t)?{kind:cm,key:t}:{kind:lm,key:t}},N_=Symbol(),cm=Symbol(),lm=Symbol(),Ea=Symbol();function sI(e,t,r){return e.symmetric?iI(e,t,r):aI(e,t,r)}var Ta,cI={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function R_(e,t){return Ta||=new WeakMap,Ta.get(e)?.[t]}function j_(e,t,r){let o=Ta.get(e);return o?o[t]=r:Ta.set(e,{[t]:r}),r}var O_=async(e,t,r)=>{let o=R_(e,r.alg);if(o)return o;let n=await $a(r,{...t,alg:r.alg});return j_(e,r.alg,n)},lI=(e,t)=>{let r=R_(e,t.alg);if(r)return r;let o=e.type==="public",n=o?t.usages.public:t.usages.private,{asymmetricKeyType:i}=e,a=cI[e.asymmetricKeyDetails?.namedCurve],s=t.subtleFor?.({crv:a,asymmetricKeyType:i})??t.subtle;return j_(e,t.alg,e.toCryptoKey(s,o,n))};async function Aa(e,t,r){let o=sI(e,t,r);switch(o.kind){case N_:case cm:return o.key;case Ea:{if(o.key.k)return Qr(o.key.k);if(!Object.isFrozen(o.key)){let{key_ops:n}=o.key;Array.isArray(n)&&Object.freeze(n),Object.freeze(o.key)}return O_(o.key,o.key,e)}case lm:{let n=o.key;return n.type==="secret"?n.export():"toCryptoKey"in n&&typeof n.toCryptoKey=="function"?lI(n,e):O_(n,n.export({format:"jwk"}),e)}}}function eo(e){let t={__proto__:null};for(let r of Object.keys(e))t[r]={...e[r],alg:r};return t}var uI={public:["encrypt","wrapKey"],private:["decrypt","unwrapKey"]},dI={public:[],private:["deriveBits"]},Pa={public:[],private:[]};function Ia(e){return{kty:["RSA"],subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:uI,minModulusLength:2048,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function Ca(e){return{kty:["EC","OKP"],subtle:{name:"ECDH"},subtleFor:({kty:t,crv:r,asymmetricKeyType:o})=>{if(r==="X25519"||o==="x25519")return{name:"X25519"};if(t==="OKP")throw new te('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:r}},usages:dI,kwBits:e,keyOps:{decrypt:"deriveBits"}}}function um(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-KW",length:e},usages:Pa,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function dm(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:Pa,gcmkw:`A${e}GCM`,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}}}function pm(e,t){return{kty:["oct"],symmetric:!0,subtle:{name:"PBKDF2"},usages:Pa,pbes2Hash:`SHA-${e}`,kwBits:t,keyOps:{encrypt:"deriveBits",decrypt:"deriveBits"}}}var pI=eo({dir:{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM"},usages:Pa,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}},"RSA-OAEP":Ia(1),"RSA-OAEP-256":Ia(256),"RSA-OAEP-384":Ia(384),"RSA-OAEP-512":Ia(512),"ECDH-ES":Ca(),"ECDH-ES+A128KW":Ca(128),"ECDH-ES+A192KW":Ca(192),"ECDH-ES+A256KW":Ca(256),A128KW:um(128),A192KW:um(192),A256KW:um(256),A128GCMKW:dm(128),A192GCMKW:dm(192),A256GCMKW:dm(256),"PBES2-HS256+A128KW":pm(256,128),"PBES2-HS384+A192KW":pm(384,192),"PBES2-HS512+A256KW":pm(512,256)}),D_={public:[],private:[]},L_={encrypt:"encrypt",decrypt:"decrypt"};function mm(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:D_,keyOps:L_,cekBits:e,ivBits:96,cbc:!1}}function fm(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-CBC",length:e},usages:D_,keyOps:L_,cekBits:e,ivBits:128,cbc:!0}}var s1=eo({A128GCM:mm(128),A192GCM:mm(192),A256GCM:mm(256),"A128CBC-HS256":fm(256),"A192CBC-HS384":fm(384),"A256CBC-HS512":fm(512)});function z_(e){return pI[e]}function mI(e,t){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}function fI(e,t,r){S_(t,e.subtle,r),e.minModulusLength&&mI(e.alg,t)}async function M_(e,t,r){return t instanceof Uint8Array?crypto.subtle.importKey("raw",t,e.subtle,!1,[r]):(fI(e,t,r),t)}async function U_(e,t,r){let o=await M_(e,t,"sign"),n=await crypto.subtle.sign(e.operation,o,r);return new Uint8Array(n)}async function F_(e,t,r,o){let n=await M_(e,t,"verify");try{return await crypto.subtle.verify(e.operation,n,r,o)}catch{return!1}}var Oa=new Map([["b64",!0]]);function G_(e,t){if(t!==void 0&&(!Array.isArray(t)||t.some(r=>typeof r!="string")))throw new TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)}function Z_(e,t){let{crit:r}=t??{};if(Array.isArray(r)&&new Set(r).size!==r.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}function Na(e,t,r,o,n){if(n.crit!==void 0&&o?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!o||o.crit===void 0)return new Set;if(!Array.isArray(o.crit)||o.crit.length===0||o.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let i;r!==void 0?i=new Map([...Object.entries(r),...t.entries()]):i=t;for(let a of o.crit){if(!i.has(a))throw new te(`Extension Header Parameter "${a}" is not recognized`);if(n[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(i.get(a)&&o[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(o.crit)}var to={public:["verify"],private:["sign"]};function hm(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],symmetric:!0,subtle:t,operation:t,usages:to}}function Xn(e,t,r){let o={name:e,hash:`SHA-${t}`};return{kty:["RSA"],subtle:o,operation:r?{...o,saltLength:r}:o,usages:to,minModulusLength:2048}}function gm(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},operation:{name:"ECDSA",hash:`SHA-${t}`},usages:to}}function B_(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,operation:e,usages:to}}function ym(e){let t={name:e};return{kty:["AKP"],subtle:t,operation:t,usages:to}}var K_=eo({HS256:hm(256),HS384:hm(384),HS512:hm(512),RS256:Xn("RSASSA-PKCS1-v1_5",256),RS384:Xn("RSASSA-PKCS1-v1_5",384),RS512:Xn("RSASSA-PKCS1-v1_5",512),PS256:Xn("RSA-PSS",256,32),PS384:Xn("RSA-PSS",384,48),PS512:Xn("RSA-PSS",512,64),ES256:gm("P-256",256),ES384:gm("P-384",384),ES512:gm("P-521",512),EdDSA:B_(),Ed25519:B_(),"ML-DSA-44":ym("ML-DSA-44"),"ML-DSA-65":ym("ML-DSA-65"),"ML-DSA-87":ym("ML-DSA-87")});function Ra(e){let t=K_[e];if(!t)throw new te(`alg ${e} is not supported either by JOSE or your javascript runtime`);return t}function ja(e){return K_[e]}function V_(e){return{algorithms:e&&G_("algorithms",e.algorithms),crit:e?.crit}}async function hI(e,t,r){let o={};e.protected&&(o=P_(e.protected,H,"JWS Protected Header is invalid"));let n;if(e.header!==void 0){if(!Sa(o,e.header))throw new H("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");n={...o,...e.header}}else n=o;let i=Na(H,Oa,t.crit,o,n),a=!0;if(i.has("b64")&&(a=o.b64,typeof a!="boolean"))throw new H('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new H('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(t.algorithms&&!t.algorithms.has(s))throw new _a('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new H("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new H("JWS Payload must be a string or an Uint8Array instance");let c=!1;typeof r=="function"&&(r=await r(o,e),c=!0);let l=Ra(s),p=ya(e.protected!==void 0?rt(e.protected):new Uint8Array,rt("."),typeof e.payload=="string"?a?t.b64p??=C_(e.payload,"payload",H):Bt.encode(e.payload):e.payload),d=am(e.signature,"signature",H),m=await Aa(l,r,"verify");if(!await F_(l,m,d,p))throw new ka;let h;return a?h=am(e.payload,"payload",H):typeof e.payload=="string"?h=Bt.encode(e.payload):h=e.payload,{payload:h,parsedProt:o,b64:a,key:m,resolvedKey:c}}async function W_(e,t,r){if(e instanceof Uint8Array&&(e=Yr.decode(e)),typeof e!="string")throw new H("Compact JWS must be a string or Uint8Array");let{0:o,1:n,2:i,length:a}=e.split(".");if(a!==3)throw new H("Invalid Compact JWS");return hI({payload:n,protected:o,signature:i},t,r)}var $t=e=>Math.floor(e.getTime()/1e3),J_=60,Y_=J_*60,vm=Y_*24,gI=vm*7,yI=vm*365.25,vI=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function no(e){let t=vI.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),o=t[3].toLowerCase(),n;switch(o){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(r*J_);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(r*Y_);break;case"day":case"days":case"d":n=Math.round(r*vm);break;case"week":case"weeks":case"w":n=Math.round(r*gI);break;default:n=Math.round(r*yI);break}return t[1]==="-"||t[4]==="ago"?-n:n}function ot(e,t){if(!Number.isFinite(t))throw new TypeError(`Invalid ${e} input`);return t}var H_=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`,_I=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1;function q_(e,t,r={}){let o;try{o=JSON.parse(ga.decode(t))}catch{}if(!je(o))throw new St("JWT Claims Set must be a top-level JSON object");let{typ:n}=r;if(n&&(typeof e.typ!="string"||H_(e.typ)!==H_(n)))throw new Ae('unexpected "typ" JWT header value',o,"typ","check_failed");let{requiredClaims:i=[],issuer:a,subject:s,audience:c,maxTokenAge:l}=r,p=[...i];l!==void 0&&p.push("iat"),c!==void 0&&p.push("aud"),s!==void 0&&p.push("sub"),a!==void 0&&p.push("iss");for(let h of new Set(p.reverse()))if(!(h in o))throw new Ae(`missing required "${h}" claim`,o,h,"missing");if(a!==void 0&&!(Array.isArray(a)?a:[a]).includes(o.iss))throw new Ae('unexpected "iss" claim value',o,"iss","check_failed");if(s!==void 0&&o.sub!==s)throw new Ae('unexpected "sub" claim value',o,"sub","check_failed");if(c!==void 0&&!_I(o.aud,typeof c=="string"?[c]:c))throw new Ae('unexpected "aud" claim value',o,"aud","check_failed");let d;switch(typeof r.clockTolerance){case"string":d=no(r.clockTolerance);break;case"number":d=r.clockTolerance;break;case"undefined":d=0;break;default:throw new TypeError("Invalid clockTolerance option type")}ot("clockTolerance option",d);let{currentDate:m}=r,f=ot("currentDate option",$t(m||new Date));if((o.iat!==void 0||l!==void 0)&&typeof o.iat!="number")throw new Ae('"iat" claim must be a number',o,"iat","invalid");if(o.nbf!==void 0){if(typeof o.nbf!="number")throw new Ae('"nbf" claim must be a number',o,"nbf","invalid");if(o.nbf>f+d)throw new Ae('"nbf" claim timestamp check failed',o,"nbf","check_failed")}if(o.exp!==void 0){if(typeof o.exp!="number")throw new Ae('"exp" claim must be a number',o,"exp","invalid");if(o.exp<=f-d)throw new qr('"exp" claim timestamp check failed',o,"exp","check_failed")}if(l!==void 0){let h=f-o.iat,_=typeof l=="number"?l:no(l);if(h-d>_)throw new qr('"iat" claim timestamp check failed (too far in the past)',o,"iat","check_failed");if(h<0-d)throw new Ae('"iat" claim timestamp check failed (it should be in the past)',o,"iat","check_failed")}return o}var Da=class{#e;constructor(t){if(!je(t))throw new TypeError("JWT Claims Set MUST be an object");this.#e=structuredClone(t)}data(){return Bt.encode(JSON.stringify(this.#e))}get iss(){return this.#e.iss}set iss(t){this.#e.iss=t}get sub(){return this.#e.sub}set sub(t){this.#e.sub=t}get aud(){return this.#e.aud}set aud(t){this.#e.aud=t}set jti(t){this.#e.jti=t}set nbf(t){typeof t=="number"?this.#e.nbf=ot("setNotBefore",t):t instanceof Date?this.#e.nbf=ot("setNotBefore",$t(t)):this.#e.nbf=$t(new Date)+no(t)}set exp(t){typeof t=="number"?this.#e.exp=ot("setExpirationTime",t):t instanceof Date?this.#e.exp=ot("setExpirationTime",$t(t)):this.#e.exp=$t(new Date)+no(t)}set iat(t){t===void 0?this.#e.iat=$t(new Date):t instanceof Date?this.#e.iat=ot("setIssuedAt",$t(t)):typeof t=="string"?this.#e.iat=ot("setIssuedAt",$t(new Date)+no(t)):this.#e.iat=ot("setIssuedAt",t)}};async function _m(e,t,r){let o=await W_(e,V_(r),t);if(!o.b64)throw new St("JWTs MUST NOT use unencoded payload");let i={payload:q_(o.parsedProt,o.payload,r),protectedHeader:o.parsedProt};return typeof t=="function"?{...i,key:o.key}:i}function La(e){return e?.b64===!1&&Array.isArray(e.crit)&&e.crit.includes("b64")}async function X_(e,t){let{protectedHeader:r,unprotectedHeader:o}=e;if(!Sa(r,o))throw new H("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...r,...o};Z_(H,r);let i=Na(H,Oa,e.crit,r,n),a=!0;if(i.has("b64")&&(a=r.b64,typeof a!="boolean"))throw new H('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new H('JWS "alg" (Algorithm) Header Parameter missing or invalid');let c=Ra(s),l,p;if(a){let P=e.encoded??={};P.b64??=Yn(e.payload),P.raw??=rt(P.b64),l=P.b64,p=P.raw}else p=e.payload,l="";let d,m;r?(d=Yn(JSON.stringify(r)),m=rt(d)):(d="",m=new Uint8Array);let f=ya(m,rt("."),p),h=await Aa(c,t,"sign"),_=await U_(c,h,f),b={signature:Yn(_),payload:l};return r&&(b.protected=d),b}var za=class{#e;#t;#n;constructor(t){if(!(t instanceof Uint8Array))throw new TypeError("payload must be an instance of Uint8Array");this.#e=t}setProtectedHeader(t){return im(this.#t,"setProtectedHeader"),this.#t=t,this}setUnprotectedHeader(t){return im(this.#n,"setUnprotectedHeader"),this.#n=t,this}async sign(t,r){if(!this.#t&&!this.#n)throw new H("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");let o=await X_({payload:this.#e,protectedHeader:this.#t,unprotectedHeader:this.#n,crit:r?.crit},t);return this.#n&&(o.header=this.#n),o}};var Ma=class{#e;#t;constructor(t){this.#e=new za(t)}setProtectedHeader(t){return this.#e.setProtectedHeader(t),this.#t=t,this}async sign(t,r){if(La(this.#t))throw new TypeError("use the flattened module for creating JWS with b64: false");let o=await this.#e.sign(t,r);return`${o.protected}.${o.payload}.${o.signature}`}};var ro=class{#e;#t;constructor(t={}){this.#t=new Da(t)}setIssuer(t){return this.#t.iss=t,this}setSubject(t){return this.#t.sub=t,this}setAudience(t){return this.#t.aud=t,this}setJti(t){return this.#t.jti=t,this}setNotBefore(t){return this.#t.nbf=t,this}setExpirationTime(t){return this.#t.exp=t,this}setIssuedAt(t){return this.#t.iat=t,this}setProtectedHeader(t){return this.#e=t,this}async sign(t,r){let o=new Ma(this.#t.data());if(o.setProtectedHeader(this.#e),La(this.#e))throw new St("JWTs MUST NOT use unencoded payload");return o.sign(t,r)}};function Q_(){return new te('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}function eb(e){if(typeof e!="string")throw Q_();let t=ja(e)??z_(e);if(!t)throw Q_();return t}var bm=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},bI=e=>({data:e,pos:0}),wm=e=>{let t=e.data[e.pos++];if(t===void 0)throw new Error("Unexpected end of ASN.1 input");return t},oo=e=>{let t=wm(e);if(t&128){let r=t&127,o=0;for(let n=0;n<r;n++)o=o<<8|wm(e);return o}return t};var io=(e,t,r)=>{if(wm(e)!==t)throw new Error(r)},tb=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw new Error("Unexpected end of ASN.1 input");let r=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,r},wI=e=>{io(e,6,"Expected algorithm OID");let t=oo(e);return tb(e,t)};function kI(e){io(e,48,"Invalid PKCS#8 structure"),oo(e),io(e,2,"Expected version field");let t=oo(e);e.pos+=t,io(e,48,"Expected algorithm identifier");let r=oo(e);return{algIdStart:e.pos,algIdLength:r}}var xI=e=>{let t=wI(e);if(bm(t,[43,101,110]))return"X25519";if(!bm(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");io(e,6,"Expected curve OID");let r=oo(e),o=tb(e,r);for(let{name:n,oid:i}of[{name:"P-256",oid:[42,134,72,206,61,3,1,7]},{name:"P-384",oid:[43,129,4,0,34]},{name:"P-521",oid:[43,129,4,0,35]}])if(bm(o,i))return n;throw new Error("Unsupported named curve")},SI=async(e,t,r,o)=>{let n=eb(r);if(n.symmetric)throw new te('Invalid or unsupported "alg" (Algorithm) value');let i=e==="spki",a;if(n.subtleFor)try{a=n.subtleFor({crv:o.getNamedCurve(t)})}catch{throw new te("Invalid or unsupported key format")}else a=n.subtle;return crypto.subtle.importKey(e,t,a,o?.extractable??!!i,i?n.usages.public:n.usages.private)},$I=(e,t)=>xa(e.replace(t,"")),nb=(e,t,r)=>{let o=$I(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),n=r;return t?.startsWith?.("ECDH-ES")&&(n||={},n.getNamedCurve=i=>{let a=bI(i);return kI(a),xI(a)}),SI("pkcs8",o,t,n)};function EI(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}async function TI(e){if(tm(e))if(e.type==="secret")e=e.export();else return e.export({format:"jwk"});if(e instanceof Uint8Array)return{kty:"oct",k:Yn(e)};if(!Jn(e))throw new TypeError(E_(e,"CryptoKey","KeyObject","Uint8Array"));if(!e.extractable)throw new TypeError("non-extractable CryptoKey cannot be exported as a JWK");let{ext:t,key_ops:r,alg:o,use:n,...i}=EI(await crypto.subtle.exportKey("jwk",e));return i.kty==="AKP"&&(i.alg=o),i}async function km(e){return TI(e)}function AI(e){let t=typeof e=="string"?ja(e):void 0;if(!t||t.symmetric)throw new te('Unsupported "alg" value for a JSON Web Key Set');return t}function II(e){if(!e||typeof e!="object")return!1;let{keys:t}=e;return Array.isArray(t)&&t.every(CI)}function CI(e){return je(e)}var xm=class{#e;#t=new WeakMap;constructor(t){if(!II(t))throw new Xr("JSON Web Key Set malformed");this.#e=structuredClone(t)}jwks(){return this.#e}async getKey(t,r){let{alg:o,kid:n}={...t,...r?.header},i=AI(o),a=this.#e.keys.filter(l=>{let p=i.kty.includes(l.kty);return p&&typeof n=="string"&&(p=n===l.kid),p&&(typeof l.alg=="string"||l.kty==="AKP")&&(p=o===l.alg),p&&typeof l.use=="string"&&(p=l.use==="sig"),p&&Array.isArray(l.key_ops)&&(p=l.key_ops.includes("verify")),p&&i.crv&&(p=l.crv===i.crv),p}),{0:s,length:c}=a;if(c===0)throw new Hn;if(c!==1){let l=new ba,p=this.#t;throw l[Symbol.asyncIterator]=async function*(){for(let d of a)try{yield await rb(p,d,i)}catch{}},l}return rb(this.#t,s,i)}};async function rb(e,t,r){let o=e.get(t)||e.set(t,{}).get(t);if(o[r.alg]===void 0){let n=await $a(r,{...t,alg:r.alg,ext:!0});if(n.type!=="public")throw new Xr("JSON Web Key Set members must be public keys");o[r.alg]=n}return o[r.alg]}function Sm(e){let t=new xm(e),r=async(o,n)=>t.getKey(o,n);return Object.defineProperties(r,{jwks:{value:()=>structuredClone(t.jwks()),enumerable:!1,configurable:!1,writable:!1}}),r}function PI(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}var $m;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&($m="jose/v6.2.5");var ob=Symbol();async function OI(e,t,r,o=fetch){let n=await o(e,{method:"GET",signal:r,redirect:"manual",headers:t}).catch(i=>{throw i.name==="TimeoutError"?new wa:i});if(n.status!==200)throw new ce("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch{throw new ce("Failed to parse the JSON Web Key Set HTTP response as JSON")}}var Ua=Symbol();function NI(e,t){return!(typeof e!="object"||e===null||!("uat"in e)||typeof e.uat!="number"||Date.now()-e.uat>=t||!("jwks"in e)||!je(e.jwks)||!Array.isArray(e.jwks.keys)||!Array.prototype.every.call(e.jwks.keys,je))}var Em=class{#e;#t;#n;#c;#i;#r;#o;#l;#a;#s;constructor(t,r){if(!(t instanceof URL))throw new TypeError("url must be an instance of URL");this.#e=new URL(t.href),this.#t=typeof r?.timeoutDuration=="number"?r?.timeoutDuration:5e3,this.#n=typeof r?.cooldownDuration=="number"?r?.cooldownDuration:3e4,this.#c=typeof r?.cacheMaxAge=="number"?r?.cacheMaxAge:6e5,this.#o=new Headers(r?.headers),$m&&!this.#o.has("User-Agent")&&this.#o.set("User-Agent",$m),this.#o.has("accept")||(this.#o.set("accept","application/json"),this.#o.append("accept","application/jwk-set+json")),this.#l=r?.[ob],r?.[Ua]!==void 0&&(this.#s=r?.[Ua],NI(r?.[Ua],this.#c)&&(this.#i=this.#s.uat,this.#a=Sm(this.#s.jwks)))}pendingFetch(){return!!this.#r}coolingDown(){return typeof this.#i=="number"?Date.now()<this.#i+this.#n:!1}fresh(){return typeof this.#i=="number"?Date.now()<this.#i+this.#c:!1}jwks(){return this.#a?.jwks()}async getKey(t,r){(!this.#a||!this.fresh())&&await this.reload();try{return await this.#a(t,r)}catch(o){if(o instanceof Hn&&this.coolingDown()===!1)return await this.reload(),this.#a(t,r);throw o}}async reload(){this.#r&&PI()&&(this.#r=void 0),this.#r||=OI(this.#e.href,this.#o,AbortSignal.timeout(this.#t),this.#l).then(t=>{this.#a=Sm(t),this.#s&&(this.#s.uat=Date.now(),this.#s.jwks=t),this.#i=Date.now(),this.#r=void 0}).catch(t=>{throw this.#r=void 0,t}),await this.#r}};function Tm(e,t){let r=new Em(e,t),o=async(n,i)=>r.getKey(n,i);return Object.defineProperties(o,{coolingDown:{get:()=>r.coolingDown(),enumerable:!0,configurable:!1},fresh:{get:()=>r.fresh(),enumerable:!0,configurable:!1},reload:{value:()=>r.reload(),enumerable:!0,configurable:!1,writable:!1},reloading:{get:()=>r.pendingFetch(),enumerable:!0,configurable:!1},jwks:{value:()=>r.jwks(),enumerable:!0,configurable:!1,writable:!1}}),o}async function Am(e,t,r){if(typeof e!="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return nb(e,t,r)}var ib=new Map;function RI(e){let t=ib.get(e);return t||(t=Tm(new URL(e)),ib.set(e,t)),t}var jI="id:";function ab(e){let t;return{lastRefusal:()=>t,async resolve(r){t=void 0;try{let{payload:o}=await _m(r,RI(e.jwksUri),{issuer:e.issuer,...e.audience?{audience:e.audience}:{}}),n=typeof o.sub=="string"?o.sub:"";if(!n){t="token_malformed";return}let i=typeof o.name=="string"?o.name:typeof o.preferred_username=="string"?o.preferred_username:void 0;return{playerId:`${jI}${n}`,...i?{alias:i}:{}}}catch(o){let n=o?.code;t=n==="ERR_JWT_EXPIRED"?"token_expired":n==="ERR_JWS_INVALID"||n==="ERR_JWT_INVALID"?"token_malformed":"token_untrusted";return}}}}var Fa="/.well-known/jwks.json";async function Im(e){let t=e.replace(/\/+$/,""),r=t,o=`${t}${Fa}`,{privateKey:n,publicKey:i}=LI("rsa",{modulusLength:2048,privateKeyEncoding:{type:"pkcs8",format:"pem"},publicKeyEncoding:{type:"spki",format:"pem"}}),a=await Am(n,"RS256"),s=await km(DI(i)),c="gamestage-dev",l={keys:[{...s,kid:c,alg:"RS256",use:"sig"}]};return{issuer:r,jwksUri:o,jwks:l,resolver:ab({issuer:r,jwksUri:o}),async mint(p,d={}){let m=Math.floor(Date.now()/1e3);return new ro({name:p}).setProtectedHeader({alg:"RS256",kid:c}).setIssuer(r).setSubject(p).setIssuedAt(m).setExpirationTime(m+(d.expiresInSeconds??3600)).sign(a)}}}import{randomBytes as MI}from"node:crypto";var UI="x-gamestage-player";async function FI(e){let t=b_({tenant:e.game,rounds:[],currentRoundId:""});await w_(t,e.game,e.round,"local",!0,void 0,{source:"manifest"});let r=g_({game:e.game,archetype:e.round.archetype,snapshot:"local",title:e.title,identityRequired:e.identityRequired});return{async forPlayer(o,n){if(o===e.game)return y_({tenant:e.game,playerId:n.playerId??Hr(void 0),identityRefusal:n.identityRefusal,runtime:r,store:t,now:e.now,round:{archetype:e.round.archetype}})}}}async function GI(e){let t=[];for await(let r of e)t.push(Buffer.from(r));if(t.length!==0)try{return JSON.parse(Buffer.concat(t).toString("utf8"))}catch{return}}async function Ga(e){let t=await FI(e),r=MI(32).toString("base64"),o={issue:()=>s_(r)},n=e.devIdentity,i=zI((a,s)=>{(async()=>{let c=new URL(a.url??"/","http://localhost");if(n&&c.pathname===Fa){let m=JSON.stringify(n.jwks);s.writeHead(200,{"content-type":"application/jwk-set+json; charset=utf-8","access-control-allow-origin":"*","content-length":Buffer.byteLength(m)}),s.end(m);return}let l=a.headers[UI],p=a.headers.authorization,d=await x_({method:a.method??"GET",path:c.pathname,body:await GI(a),...(({playerId:m,refused:f})=>({playerId:m,identityRefusal:f}))(await i_({token:p?.replace(/^Bearer\s+/i,"")||void 0,anonymousId:Array.isArray(l)?l[0]:l,sessionSecret:r,resolver:n?.resolver}))},t,o);s.writeHead(d.status,d.headers),s.end(d.body===void 0?void 0:JSON.stringify(d.body))})().catch(()=>{s.headersSent?s.destroy():(s.writeHead(500,{"content-type":"application/json"}),s.end(JSON.stringify({error:{code:"internal",message:"The local Engine failed.",retryable:!0}})))})});return i.attachDevIdentity=a=>{n=a},i}async function BI(e){let t;try{t=await ZI(e,"utf8")}catch{return}let r=_e(t);if(!r.ok){C(`${e} is not a valid App Manifest.`,r.issues.map(o=>`${S.cyan(o.path)} ${o.message}`));return}return r.manifest}async function KI(e){let t=Number(e.port);if(!Number.isInteger(t)||t<0||t>65535)throw new Error("--port must be an integer between 0 and 65535");let r=e.scenario??"default";if(e.fixture)return{server:fa(r),what:"fixture",game:"conformance-game"};let o=await BI(e.manifest??"gamestage.yaml");if(!o)return{server:fa(r),what:"fixture",game:"conformance-game"};let n=o.backend.round;if(!n)return{server:fa(r),what:"fixture",game:o.app.id,title:o.app.title};let i=o.backend.archetype;return i&&i!==n.archetype&&C(`The manifest declares the ${i} archetype and a ${n.archetype} round.`,["One of the two is wrong. The round decides what the Engine marks."]),Zt.includes(n.archetype)||C(`No Engine here serves the ${n.archetype} archetype yet.`,[`Built so far: ${Zt.join(", ")}. \`gamestage dev --fixture\` serves`,"the contract fixture if you are working against the wire rather than the rules."]),{server:await Ga({game:o.app.id,round:n,title:o.app.title,identityRequired:!!e.as}),what:"engine",game:o.app.id,round:n,title:o.app.title,containerLabel:o.experience.container_label,as:e.as}}async function sb(e){let t=await KI(e),{server:r}=t,o=()=>new Promise((l,p)=>{r.close(d=>d?p(d):l())}),n=new Promise(l=>{let p=async()=>{process.off("SIGINT",p),process.off("SIGTERM",p),await o(),l()};process.once("SIGINT",p),process.once("SIGTERM",p)});await new Promise((l,p)=>{r.once("error",p),r.listen(Number(e.port),"127.0.0.1",()=>l())});let i=r.address();if(!i||typeof i=="string")throw new Error("The local server did not report its listening address");let a=`http://127.0.0.1:${i.port}`,s,c;if(t.as&&(s=await Im(a),r.attachDevIdentity?.(s),c=await s.mint(t.as)),R())j({ok:!0,status:"listening",serving:t.what,baseUrl:a,game:t.game,round:t.round?{number:t.round.number,id:`round-${t.round.number}`}:null,...s&&c?{identity:{as:t.as,player_id:`id:${t.as}`,issuer:s.issuer,jwks_uri:s.jwksUri,token:c,required:!0}}:{}});else if(t.what==="engine"){I(t.title??t.game);let l=At(t.containerLabel);E("Serving",`your ${At(t.containerLabel,{lower:!0})}, through the real Engine`),E(l,`${t.round.number} (round-${t.round.number})`),E("API",a),E("Game id",t.game),v(),A(`window.GAMESTAGE_API = "${a}"`),A(`window.GAMESTAGE_GAME = "${t.game}"`),c&&A(`window.GAMESTAGE_TOKEN = "${c}"`),v(),s&&c&&(E("Playing as",`${t.as} (${S.cyan(`id:${t.as}`)})`),E("Identity","required, so an anonymous play is refused here too"),E("Keys",s.jwksUri),v(),A("A real RS256 token, validated by the code that validates a customer's. The keypair lives for this run only."),A(`This harness cannot be deployed: its issuer is a loopback URL, and ${S.cyan("gamestage manifest validate")} refuses a manifest that names one.`),v()),A(`Edit the ${At(t.containerLabel,{lower:!0})} in your manifest and restart to see it change.`),v()}else I("Serving the contract fixture"),E("API",a),E("Game id",t.game),v(),A("No round in the manifest, so there is nothing of yours to serve."),A("Add `backend.round` and restart, and this becomes your game."),v();await n}import{readFile as Dm}from"node:fs/promises";import{dirname as hb,resolve as Lm}from"node:path";import{spawn as VI}from"node:child_process";import{createHash as WI,randomBytes as lb}from"node:crypto";import{constants as HI}from"node:fs";import{access as JI,mkdtemp as YI,rm as ub}from"node:fs/promises";import{request as qI}from"node:http";import{homedir as Za,tmpdir as XI}from"node:os";import{join as ao}from"node:path";var QI="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";function Cm(e,t={}){let r=Buffer.isBuffer(e)?e:Buffer.from(e),o=t.maskingKey??lb(4);if(o.length!==4)throw new Error("A WebSocket masking key must be four bytes.");let n=r.length<126?0:r.length<=65535?2:8,i=Buffer.alloc(2+n+4+r.length);i[0]=(t.fin===!1?0:128)|(t.opcode??1),i[1]=128|(n===0?r.length:n===2?126:127);let a=2;n===2?(i.writeUInt16BE(r.length,a),a+=2):n===8&&(i.writeBigUInt64BE(BigInt(r.length),a),a+=8),o.copy(i,a),a+=4;for(let s=0;s<r.length;s++)i[a+s]=r[s]^o[s%4];return i}var Om=class{buffered=Buffer.alloc(0);fragments=[];fragmentedOpcode;push(t){this.buffered=this.buffered.length?Buffer.concat([this.buffered,t]):Buffer.from(t);let r=[];for(;this.buffered.length>=2;){let o=this.buffered[0],n=this.buffered[1],i=(o&128)!==0,a=o&15,s=(n&128)!==0,c=n&127,l=2;if(c===126){if(this.buffered.length<l+2)break;c=this.buffered.readUInt16BE(l),l+=2}else if(c===127){if(this.buffered.length<l+8)break;let m=this.buffered.readBigUInt64BE(l);if(m>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("WebSocket frame is too large to decode safely.");c=Number(m),l+=8}let p=l;if(s&&(l+=4),this.buffered.length<l+c)break;let d=Buffer.from(this.buffered.subarray(l,l+c));if(s)for(let m=0;m<d.length;m++)d[m]^=this.buffered[p+m%4];if(this.buffered=this.buffered.subarray(l+c),a===8||a===9||a===10)r.push({opcode:a,payload:d});else if(a===1){if(this.fragmentedOpcode!==void 0)throw new Error("A new WebSocket message arrived before its continuation finished.");i?r.push({opcode:a,payload:d}):(this.fragmentedOpcode=a,this.fragments=[d])}else if(a===0){if(this.fragmentedOpcode===void 0)throw new Error("A WebSocket continuation arrived without a first frame.");this.fragments.push(d),i&&(r.push({opcode:this.fragmentedOpcode,payload:Buffer.concat(this.fragments)}),this.fragmentedOpcode=void 0,this.fragments=[])}else throw new Error(`Unsupported WebSocket opcode ${a}.`)}return r}},Nm=class{constructor(t,r){this.socket=t;t.on("data",o=>this.receive(o)),t.on("error",o=>this.fail(o)),t.on("close",()=>this.fail(new Error("Chrome closed the DevTools connection."))),r.length&&this.receive(r)}socket;decoder=new Om;pending=new Map;listeners=new Map;nextId=1;ended=!1;send(t,r={},o){if(this.ended)return Promise.reject(new Error("Chrome's DevTools connection is closed."));let n=this.nextId++;return new Promise((i,a)=>{this.pending.set(n,{resolve:s=>i(s),reject:a}),this.socket.write(Cm(JSON.stringify({id:n,method:t,params:r,...o?{sessionId:o}:{}})),s=>{s&&(this.pending.delete(n),a(s))})})}on(t,r,o){let n=`${o??""}:${t}`,i=this.listeners.get(n)??new Set;return i.add(r),this.listeners.set(n,i),()=>i.delete(r)}close(){this.ended||(this.ended=!0,this.socket.end(Cm(Buffer.alloc(0),{opcode:8})),this.rejectPending(new Error("Chrome's DevTools connection was closed.")))}receive(t){try{for(let r of this.decoder.push(t)){if(r.opcode===8){this.ended=!0,this.socket.end(),this.rejectPending(new Error("Chrome closed the DevTools connection."));continue}if(r.opcode===9){this.socket.write(Cm(r.payload,{opcode:10}));continue}if(r.opcode===10)continue;let o=JSON.parse(r.payload.toString("utf8"));if(o.id!==void 0){let n=this.pending.get(o.id);if(!n)continue;this.pending.delete(o.id),o.error?n.reject(new Error(o.error.message??"Chrome rejected a CDP command.")):n.resolve(o.result)}else if(o.method){let n=`${o.sessionId??""}:${o.method}`;for(let i of this.listeners.get(n)??[])i(o.params??{})}}}catch(r){this.fail(r instanceof Error?r:new Error("Could not read Chrome's response."))}}fail(t){this.ended||(this.ended=!0,this.socket.destroy(),this.rejectPending(t))}rejectPending(t){for(let r of this.pending.values())r.reject(t);this.pending.clear()}},Rm=class e{constructor(t,r,o,n){this.cdp=t;this.sessionId=r;this.child=o;this.profile=n;this.on("Runtime.exceptionThrown",a=>{let s=a.exceptionDetails,c=s?.exception?.description??s?.text??"Unknown page error";this.pageErrors.push(c.split(`
7157
7165
  `)[0].replace(/^[A-Za-z]*Error:\s*/,""))}),this.on("Network.requestWillBeSent",a=>{let s=String(a.requestId);this.requests.set(s,a.request??{}),this.inflight.add(s),this.lastNetworkActivity=Date.now()});let i=a=>{this.inflight.delete(String(a.requestId)),this.lastNetworkActivity=Date.now()};this.on("Network.loadingFinished",i),this.on("Network.loadingFailed",i)}cdp;sessionId;child;profile;pageErrors=[];requests=new Map;inflight=new Set;lastNetworkActivity=Date.now();closed=!1;static async create(t,r,o,n){let i=new e(t,r,o,n);return await Promise.all([i.send("Page.enable"),i.send("Runtime.enable"),i.send("Network.enable")]),i}async addScriptToEvaluateOnNewDocument(t){await this.send("Page.addScriptToEvaluateOnNewDocument",{source:t})}async navigate(t,r=2e4){let o=Date.now()+r,n=this.waitForEvent("Page.loadEventFired",r,"page load"),i=await this.send("Page.navigate",{url:t});if(i.errorText)throw new Error(i.errorText);await n,await this.waitForNetworkIdle(Math.max(1,o-Date.now()))}query(t){return this.evaluate(`Array.from(document.querySelectorAll(${JSON.stringify(t)}), (_, index) => index)`)}isVisible(t,r){return this.evaluate(`(() => {
7158
7166
  const element = document.querySelectorAll(${JSON.stringify(t)})[${r}];
7159
7167
  if (!element) return false;
@@ -7171,24 +7179,24 @@ window.GAMESTAGE_IC_LOOKUP = true;
7171
7179
  if ("disabled" in element && element.disabled) return { ok: false, error: "Element is disabled." };
7172
7180
  element.click();
7173
7181
  return { ok: true };
7174
- })()`);if(!o.ok)throw new Error(o.error??"Element could not be clicked.")}async waitForSelector(t,r=5e3){let o=Date.now()+r;for(;Date.now()<o;){if((await this.query(t)).length)return;await Tm(50)}throw new Error(`Timed out after ${r}ms waiting for ${t}.`)}waitForResponse(t){let r=t.timeout??15e3;return new Promise((o,n)=>{let i=!1,a=l=>{i||(i=!0,clearTimeout(c),s(),l())},s=this.on("Network.responseReceived",l=>{let d=String(l.requestId),p=this.requests.get(d);p?.url?.includes(t.urlIncludes)&&p.method?.toUpperCase()===t.method.toUpperCase()&&a(()=>o({json:async()=>JSON.parse(await this.responseBody(d,r))}))}),c=setTimeout(()=>a(()=>n(new Error(`Timed out after ${r}ms waiting for a response.`))),r)})}html(){return this.evaluate("document.documentElement.outerHTML")}async close(){this.closed||(this.closed=!0,this.cdp.close(),await nb(this.child),await eb(this.profile,{recursive:!0,force:!0}))}send(t,r={}){return this.cdp.send(t,r,this.sessionId)}on(t,r){return this.cdp.on(t,r,this.sessionId)}async evaluate(t){let r=await this.send("Runtime.evaluate",{expression:t,awaitPromise:!0,returnByValue:!0});if(r.exceptionDetails)throw new Error(r.exceptionDetails.exception?.description??r.exceptionDetails.text??"The page could not evaluate browser code.");return r.result.value}waitForEvent(t,r,o){return new Promise((n,i)=>{let a=l=>{clearTimeout(c),s(),l()},s=this.on(t,()=>a(n)),c=setTimeout(()=>a(()=>i(new Error(`Timed out after ${r}ms waiting for ${o}.`))),r)})}async waitForNetworkIdle(t){let r=Date.now()+t;for(;Date.now()<r;){if(this.inflight.size===0&&Date.now()-this.lastNetworkActivity>=500)return;await Tm(50)}throw new Error("Timed out after 20000ms waiting for the network to settle.")}async responseBody(t,r){let o=Date.now()+r,n=new Error("The response body was not available.");for(;Date.now()<o;)try{let i=await this.send("Network.getResponseBody",{requestId:t});return i.base64Encoded?Buffer.from(i.body,"base64").toString("utf8"):i.body}catch(i){n=i instanceof Error?i:n,await Tm(25)}throw n}},LI=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",oo(Ua(),"Applications/Google Chrome.app/Contents/MacOS/Google Chrome"),oo(Ua(),"Applications/Chromium.app/Contents/MacOS/Chromium"),oo(Ua(),"Applications/Brave Browser.app/Contents/MacOS/Brave Browser"),oo(Ua(),"Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"),"/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/opt/google/chrome/chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/lib/chromium/chromium","/snap/bin/chromium","/usr/bin/brave-browser","/usr/bin/brave-browser-stable","/opt/brave.com/brave/brave-browser","/usr/bin/microsoft-edge","/usr/bin/microsoft-edge-stable","/opt/microsoft/msedge/msedge"];async function tb(e={}){let r=[(e.env??process.env).GAMESTAGE_CHROME,...e.locations??LI].filter(s=>!!s),o;for(let s of[...new Set(r)])try{await OI(s,PI.X_OK),o=s;break}catch{}if(!o)return{status:"skipped",detail:"No supported browser found. Install Chrome, Chromium, Brave or Edge, or set GAMESTAGE_CHROME to its executable path, then run verify again."};let n=await NI(oo(jI(),"gamestage-chrome-")),i=II(o,["--headless=new","--remote-debugging-port=0","--no-first-run","--no-default-browser-check",`--user-data-dir=${n}`,"about:blank"],{stdio:["ignore","ignore","pipe"]}),a;try{a=await MI(await zI(i,1e4));let{targetId:s}=await a.send("Target.createTarget",{url:"about:blank"}),{sessionId:c}=await a.send("Target.attachToTarget",{targetId:s,flatten:!0});return{status:"available",browser:await Cm.create(a,c,i,n)}}catch(s){throw a?.close(),await nb(i),await eb(n,{recursive:!0,force:!0}),s}}function zI(e,t){return new Promise((r,o)=>{let n="",i=d=>{clearTimeout(l),e.stderr?.off("data",a),e.off("error",s),e.off("close",c),d()},a=d=>{n=(n+d.toString("utf8")).slice(-4e3);let p=n.match(/DevTools listening on (ws:\/\/\S+)/);p&&i(()=>r(p[1]))},s=d=>i(()=>o(d)),c=d=>i(()=>o(new Error(`Chrome exited before DevTools was ready${d===null?"":` (code ${d})`}.`)));e.stderr?.on("data",a),e.on("error",s),e.on("close",c);let l=setTimeout(()=>i(()=>o(new Error("Chrome did not open DevTools within 10000ms."))),t)})}function MI(e){return new Promise((t,r)=>{let o=new URL(e),n=Q_(16).toString("base64"),i=CI("sha1").update(n+DI).digest("base64"),a=RI({hostname:o.hostname,port:o.port,path:`${o.pathname}${o.search}`,headers:{Connection:"Upgrade",Upgrade:"websocket","Sec-WebSocket-Version":"13","Sec-WebSocket-Key":n}});a.on("upgrade",(s,c,l)=>{s.headers["sec-websocket-accept"]!==i?(c.destroy(),r(new Error("Chrome returned an invalid WebSocket handshake."))):t(new Im(c,l))}),a.on("response",s=>{s.resume(),r(new Error(`Chrome refused the WebSocket upgrade with status ${s.statusCode}.`))}),a.on("error",r),a.end()})}async function nb(e){e.exitCode===null&&(e.kill("SIGTERM"),!await X_(e,1e3)&&(e.kill("SIGKILL"),await X_(e,1e3)))}function X_(e,t){return e.exitCode!==null?Promise.resolve(!0):new Promise(r=>{let o=a=>{clearTimeout(i),e.off("close",n),r(a)},n=()=>o(!0);e.once("close",n);let i=setTimeout(()=>o(!1),t)})}function Tm(e){return new Promise(t=>setTimeout(t,e))}var UI=[/^(loading|error|ok|yes|no|on|off|true|false|null|undefined)$/i,/^[\d\s.,:%+-]+$/,/^[a-z0-9_-]+$/,/^(#|\.|\/|https?:|data:|mailto:)/i,/^[A-Z_]{2,}$/,/^\s*$/],FI=/[{}<>|]|=>|\(\)|;\s*$|^\s*(function|const|let|var|import|export)\b/;function Pm(e){return e.replace(/^[\s,.;:)\]}\-+*/=&|]+/,"").replace(/[\s+*/=&|]+$/,"").trim()}function rb(e){let t=Pm(e);return!(t.length<2||t.length>160||!/[A-Za-z]/.test(t)||FI.test(t)||UI.some(r=>r.test(t))||!/\s/.test(t)&&t===t.toLowerCase())}var GI=[{test:/^(play|start|go|begin|submit|share|try|see|next|done|finish)\b/i,level:"project",setting:"play_button_label",because:"reads as a button a fan presses, and a producer owns the words on it"},{test:/\b(how to play|the rules|instructions)\b/i,level:"project",setting:"how_to_play",because:"reads as the rules, which a producer rewrites without a deploy"},{test:/\b(hall of fame|all-?star|all-?nba|rookie|veteran|starter|busted|legend|champion|gold|silver|bronze)\b/i,level:"project",because:"reads as a rank a fan is given, which is the game's ladder and does not change between editions"},{test:/\b(today|tonight|this week|round \d|day \d|week \d)\b/i,level:"element",because:"names one round rather than the game, so it changes every time the round does"},{test:/\b(edition|season|fixture|matchday|gameweek|tournament|final|semi)\b/i,level:"event",because:"names a run of the game rather than the game, so it belongs to the edition"},{test:/\balready played\b|\bcome back\b|\bsee your result\b/i,level:"project",because:"a message a fan reads about their own state, and a producer's to word"}];function ob(e){for(let t of GI)if(t.test.test(e))return{confidence:"likely",level:t.level,...t.setting?{setting:t.setting}:{},because:t.because};return{confidence:"possible",level:"project",because:"a fan reads it and nothing in the code says it changes per round or per edition"}}function ZI(e){let t=[];return e.text.replace(/<script[\s\S]*?<\/script>/gi,n=>`
7182
+ })()`);if(!o.ok)throw new Error(o.error??"Element could not be clicked.")}async waitForSelector(t,r=5e3){let o=Date.now()+r;for(;Date.now()<o;){if((await this.query(t)).length)return;await Pm(50)}throw new Error(`Timed out after ${r}ms waiting for ${t}.`)}waitForResponse(t){let r=t.timeout??15e3;return new Promise((o,n)=>{let i=!1,a=l=>{i||(i=!0,clearTimeout(c),s(),l())},s=this.on("Network.responseReceived",l=>{let p=String(l.requestId),d=this.requests.get(p);d?.url?.includes(t.urlIncludes)&&d.method?.toUpperCase()===t.method.toUpperCase()&&a(()=>o({json:async()=>JSON.parse(await this.responseBody(p,r))}))}),c=setTimeout(()=>a(()=>n(new Error(`Timed out after ${r}ms waiting for a response.`))),r)})}html(){return this.evaluate("document.documentElement.outerHTML")}async close(){this.closed||(this.closed=!0,this.cdp.close(),await pb(this.child),await ub(this.profile,{recursive:!0,force:!0}))}send(t,r={}){return this.cdp.send(t,r,this.sessionId)}on(t,r){return this.cdp.on(t,r,this.sessionId)}async evaluate(t){let r=await this.send("Runtime.evaluate",{expression:t,awaitPromise:!0,returnByValue:!0});if(r.exceptionDetails)throw new Error(r.exceptionDetails.exception?.description??r.exceptionDetails.text??"The page could not evaluate browser code.");return r.result.value}waitForEvent(t,r,o){return new Promise((n,i)=>{let a=l=>{clearTimeout(c),s(),l()},s=this.on(t,()=>a(n)),c=setTimeout(()=>a(()=>i(new Error(`Timed out after ${r}ms waiting for ${o}.`))),r)})}async waitForNetworkIdle(t){let r=Date.now()+t;for(;Date.now()<r;){if(this.inflight.size===0&&Date.now()-this.lastNetworkActivity>=500)return;await Pm(50)}throw new Error("Timed out after 20000ms waiting for the network to settle.")}async responseBody(t,r){let o=Date.now()+r,n=new Error("The response body was not available.");for(;Date.now()<o;)try{let i=await this.send("Network.getResponseBody",{requestId:t});return i.base64Encoded?Buffer.from(i.body,"base64").toString("utf8"):i.body}catch(i){n=i instanceof Error?i:n,await Pm(25)}throw n}},e0=["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome","/Applications/Chromium.app/Contents/MacOS/Chromium","/Applications/Brave Browser.app/Contents/MacOS/Brave Browser","/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",ao(Za(),"Applications/Google Chrome.app/Contents/MacOS/Google Chrome"),ao(Za(),"Applications/Chromium.app/Contents/MacOS/Chromium"),ao(Za(),"Applications/Brave Browser.app/Contents/MacOS/Brave Browser"),ao(Za(),"Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"),"/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/opt/google/chrome/chrome","/usr/bin/chromium","/usr/bin/chromium-browser","/usr/lib/chromium/chromium","/snap/bin/chromium","/usr/bin/brave-browser","/usr/bin/brave-browser-stable","/opt/brave.com/brave/brave-browser","/usr/bin/microsoft-edge","/usr/bin/microsoft-edge-stable","/opt/microsoft/msedge/msedge"];async function db(e={}){let r=[(e.env??process.env).GAMESTAGE_CHROME,...e.locations??e0].filter(s=>!!s),o;for(let s of[...new Set(r)])try{await JI(s,HI.X_OK),o=s;break}catch{}if(!o)return{status:"skipped",detail:"No supported browser found. Install Chrome, Chromium, Brave or Edge, or set GAMESTAGE_CHROME to its executable path, then run verify again."};let n=await YI(ao(XI(),"gamestage-chrome-")),i=VI(o,["--headless=new","--remote-debugging-port=0","--no-first-run","--no-default-browser-check",`--user-data-dir=${n}`,"about:blank"],{stdio:["ignore","ignore","pipe"]}),a;try{a=await n0(await t0(i,1e4));let{targetId:s}=await a.send("Target.createTarget",{url:"about:blank"}),{sessionId:c}=await a.send("Target.attachToTarget",{targetId:s,flatten:!0});return{status:"available",browser:await Rm.create(a,c,i,n)}}catch(s){throw a?.close(),await pb(i),await ub(n,{recursive:!0,force:!0}),s}}function t0(e,t){return new Promise((r,o)=>{let n="",i=p=>{clearTimeout(l),e.stderr?.off("data",a),e.off("error",s),e.off("close",c),p()},a=p=>{n=(n+p.toString("utf8")).slice(-4e3);let d=n.match(/DevTools listening on (ws:\/\/\S+)/);d&&i(()=>r(d[1]))},s=p=>i(()=>o(p)),c=p=>i(()=>o(new Error(`Chrome exited before DevTools was ready${p===null?"":` (code ${p})`}.`)));e.stderr?.on("data",a),e.on("error",s),e.on("close",c);let l=setTimeout(()=>i(()=>o(new Error("Chrome did not open DevTools within 10000ms."))),t)})}function n0(e){return new Promise((t,r)=>{let o=new URL(e),n=lb(16).toString("base64"),i=WI("sha1").update(n+QI).digest("base64"),a=qI({hostname:o.hostname,port:o.port,path:`${o.pathname}${o.search}`,headers:{Connection:"Upgrade",Upgrade:"websocket","Sec-WebSocket-Version":"13","Sec-WebSocket-Key":n}});a.on("upgrade",(s,c,l)=>{s.headers["sec-websocket-accept"]!==i?(c.destroy(),r(new Error("Chrome returned an invalid WebSocket handshake."))):t(new Nm(c,l))}),a.on("response",s=>{s.resume(),r(new Error(`Chrome refused the WebSocket upgrade with status ${s.statusCode}.`))}),a.on("error",r),a.end()})}async function pb(e){e.exitCode===null&&(e.kill("SIGTERM"),!await cb(e,1e3)&&(e.kill("SIGKILL"),await cb(e,1e3)))}function cb(e,t){return e.exitCode!==null?Promise.resolve(!0):new Promise(r=>{let o=a=>{clearTimeout(i),e.off("close",n),r(a)},n=()=>o(!0);e.once("close",n);let i=setTimeout(()=>o(!1),t)})}function Pm(e){return new Promise(t=>setTimeout(t,e))}var r0=[/^(loading|error|ok|yes|no|on|off|true|false|null|undefined)$/i,/^[\d\s.,:%+-]+$/,/^[a-z0-9_-]+$/,/^(#|\.|\/|https?:|data:|mailto:)/i,/^[A-Z_]{2,}$/,/^\s*$/],o0=/[{}<>|]|=>|\(\)|;\s*$|^\s*(function|const|let|var|import|export)\b/;function jm(e){return e.replace(/^[\s,.;:)\]}\-+*/=&|]+/,"").replace(/[\s+*/=&|]+$/,"").trim()}function mb(e){let t=jm(e);return!(t.length<2||t.length>160||!/[A-Za-z]/.test(t)||o0.test(t)||r0.some(r=>r.test(t))||!/\s/.test(t)&&t===t.toLowerCase())}var i0=[{test:/^(play|start|go|begin|submit|share|try|see|next|done|finish)\b/i,level:"project",setting:"play_button_label",because:"reads as a button a fan presses, and a producer owns the words on it"},{test:/\b(how to play|the rules|instructions)\b/i,level:"project",setting:"how_to_play",because:"reads as the rules, which a producer rewrites without a deploy"},{test:/\b(hall of fame|all-?star|all-?nba|rookie|veteran|starter|busted|legend|champion|gold|silver|bronze)\b/i,level:"project",because:"reads as a rank a fan is given, which is the game's ladder and does not change between editions"},{test:/\b(today|tonight|this week|round \d|day \d|week \d)\b/i,level:"element",because:"names one round rather than the game, so it changes every time the round does"},{test:/\b(edition|season|fixture|matchday|gameweek|tournament|final|semi)\b/i,level:"event",because:"names a run of the game rather than the game, so it belongs to the edition"},{test:/\balready played\b|\bcome back\b|\bsee your result\b/i,level:"project",because:"a message a fan reads about their own state, and a producer's to word"}];function fb(e){for(let t of i0)if(t.test.test(e))return{confidence:"likely",level:t.level,...t.setting?{setting:t.setting}:{},because:t.because};return{confidence:"possible",level:"project",because:"a fan reads it and nothing in the code says it changes per round or per edition"}}function a0(e){let t=[];return e.text.replace(/<script[\s\S]*?<\/script>/gi,n=>`
7175
7183
  `.repeat(n.split(`
7176
7184
  `).length-1)).replace(/<style[\s\S]*?<\/style>/gi,n=>`
7177
7185
  `.repeat(n.split(`
7178
7186
  `).length-1)).split(`
7179
- `).forEach((n,i)=>{let a=[...[...n.matchAll(/>([^<>]{2,160})</g)].map(s=>s[1]),...[...n.matchAll(/\b(?:title|alt|placeholder|aria-label)="([^"]{2,160})"/gi)].map(s=>s[1])];for(let s of a){let c=s.replace(/\s+/g," ");if(!rb(c))continue;let l=Pm(c);t.push({text:l,...ob(l),file:e.relative,line:i+1})}}),t}function BI(e){let t=[];return e.text.split(`
7180
- `).forEach((r,o)=>{if(!/^\s*(import|export|require\()/.test(r))for(let n of r.matchAll(/(['"`])((?:(?!\1)[^\\\r\n]|\\.){2,160})\1/g)){let i=n[2].replace(/\s+/g," ");if(!rb(i))continue;let a=Pm(i),s=r.slice((n.index??0)+n[0].length);/^\s*[:\]]/.test(s)||t.push({text:a,...ob(a),file:e.relative,line:o+1})}}),t}function Fa(e){let t=[];for(let o of e)/\.(html?|svelte|vue)$/i.test(o.relative)&&t.push(...ZI(o)),/\.(m?[jt]sx?|svelte|vue)$/i.test(o.relative)&&t.push(...BI(o));let r=new Map;for(let o of t){let n=o.text.toLowerCase();r.has(n)||r.set(n,o)}return[...r.values()].sort((o,n)=>o.level===n.level?o.text.localeCompare(n.text):o.level.localeCompare(n.level))}function KI(e){switch(e){case"hunt":return Ae.parse({archetype:e,number:1,prompt:"Pick the two that belong",board:["alpha","beta","gamma","delta"],targets:["alpha","beta"],open:!0});case"push":return Ae.parse({archetype:e,number:1,prompt:"Two picks. Get close to 100 without going over.",target:100,targetLabel:"Points",slates:[{id:"first",label:"First pick",entries:[{key:"alpha",label:"Alpha",value:40},{key:"beta",label:"Beta",value:70}]},{id:"second",label:"Second pick",entries:[{key:"gamma",label:"Gamma",value:25},{key:"delta",label:"Delta",value:55}]}],open:!0});case"group":return Ae.parse({archetype:e,number:1,prompt:"Find the groups. Four at a time.",board:["alpha","beta","gamma","delta","epsilon","zeta","eta","theta"],groups:[{key:"first",label:"First four",members:["alpha","beta","gamma","delta"]},{key:"second",label:"Second four",members:["epsilon","zeta","eta","theta"]}],open:!0});case"forecast":return Ae.parse({archetype:e,number:1,prompt:"Who takes it?",options:[{key:"alpha",label:"Alpha"},{key:"beta",label:"Beta"},{key:"draw",label:"Neither, it ends level"}],open:!0});default:throw new Error(`No representative round exists for the ${e} archetype.`)}}function VI(e,t,r){return(_v({gameId:e.app.id,gameName:e.app.title,archetype:t,manifestRevision:e.manifest.revision,wording:r,urls:{baseAppsUrl:"",dashImage:"",embedUrl:""}})["project_settings.json"].sections??[]).flatMap(i=>i.properties??[]).flatMap(i=>{if(typeof i.key!="string")return[];let a=xp[i.key];return a?[[i.key,a]]:[]})}function WI(e){let t=e.filter(o=>o.status==="open").length,r=e.filter(o=>o.status==="skipped").length;return t>0?{outcome:"failed",exitCode:1,open:t,skipped:r}:r>0?{outcome:"unverified",exitCode:2,open:t,skipped:r}:{outcome:"verified",exitCode:0,open:t,skipped:r}}function Rm(e,t){if(t.archetype==="hunt"){let n=t.targets;if(n.length===0)return[];let i=n.filter(a=>new RegExp(`["'\`]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["'\`]`,"i").test(e));return i.length===n.length?i:[]}if(t.archetype==="forecast")return[];if(t.archetype==="group"){let n=[];for(let i of t.groups){if(new RegExp(`["\`']${i.label.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(e)){n.push(i.label);continue}e.split(`
7181
- `).some(c=>i.members.every(l=>new RegExp(`["\`']${l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(c)))&&n.push(i.label)}return n}let r=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=[];for(let n of t.slates)for(let i of n.entries){let a=`${r(i.key)}|${r(i.label)}`,s=new RegExp(`(?:${a})[^\\n]{0,120}?\\b${i.value}\\b`,"i"),c=new RegExp(`\\b${i.value}\\b[^\\n]{0,120}?(?:${a})`,"i");(s.test(e)||c.test(e))&&o.push(i.label)}return o}function jm(e,t){if(e.archetype==="hunt")return`Every target appears in the artefact: ${t.join(", ")}. A solution in the bundle can be read before anybody plays.`;if(e.archetype==="group")return`The page holds the grouping: ${t.join(", ")}. A player who reads it has the categories, which is the puzzle.`;let r=t.slice(0,5).join(", "),o=t.length>5?`, and ${t.length-5} more`:"";return`The page carries what each pick is worth: ${r}${o}. A game that is arithmetic is finished the moment the numbers ship, without a move being played.`}var Ga="button.pick, [data-pick]",ab="#submit, button[type=submit], .submit",sb="#submit:not([disabled]), button[type=submit]:not([disabled]), .submit:not([disabled])";async function HI(e,t,r){let o;try{o=await tb()}catch(i){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:"Chrome could not start. Check GAMESTAGE_CHROME points to a working browser, then "+`run verify again. ${i instanceof Error?i.message:""}`.trim()}}if(o.status==="skipped")return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:o.detail};let n=o.browser;try{await n.addScriptToEvaluateOnNewDocument(`window.GAMESTAGE_API = ${JSON.stringify(t)};window.GAMESTAGE_GAME = ${JSON.stringify(r)};`),await n.navigate(e,2e4);let i=n.waitForResponse({urlIncludes:"/plays",method:"POST",timeout:15e3}).catch(()=>{});for(let h=0;h<3&&!((await n.query(Ga)).length>0);h++){let b=await n.query("[data-gamestage-start]:not([disabled])"),$;for(let O of b)if(await n.isVisible("[data-gamestage-start]:not([disabled])",O)){$=O;break}if($===void 0)break;await n.click("[data-gamestage-start]:not([disabled])",$).catch(()=>{}),await n.waitForSelector(Ga,5e3).catch(()=>{})}let a=await n.query(Ga);if(a.length===0){let h=n.pageErrors[0],b=await n.query("#prompt").then(()=>n.html()).then(O=>/id="prompt"[^>]*>([^<]{0,160})/.exec(O)?.[1]?.trim()).catch(()=>{});return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Found nothing to pick. The page did not render a board from the round.${h?` The page threw: ${h}`:b?` The page says: ${b}`:""}`}}let s=0;for(let h of a)if(await n.click(Ga,h).catch(()=>{}),s+=1,(await n.query(sb)).length>0)break;let c=await n.query(ab);if(c.length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"No way to submit a play was found on the page."};if((await n.query(sb)).length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Selected ${s} of ${a.length} on the board and the page never allowed a play: Submit stayed disabled throughout. The page decides when a guess is complete, so either it needs a combination this cannot reach by picking in order, or it is not enabling Submit when it should.`};await n.click(ab,c[0]);let l=await i;if(!l)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"The page was played and never asked the Engine. Whatever it showed, it decided for itself."};let d=await l.json();if(n.pageErrors.length)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`The page threw: ${n.pageErrors[0]}`};let p=await n.html(),m=d.round_state?.score,f=m===void 0||p.includes(String(m))||p.includes(m.toLocaleString("en-US"));return{id:"rendered-outcome",what:"the screen shows what the server decided",status:f?"verified":"open",detail:f?`The play went to the Engine and came back ${d.outcome}.`:`The Engine committed a score of ${m} and the page does not show it.`}}catch(i){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:i instanceof Error?i.message:"The page could not be played."}}finally{await n.close().catch(()=>{})}}var JI=[".git","node_modules",".next",".nuxt",".svelte-kit","dist","build"];function qI(e){let t=e.split("/").slice(0,-1),r=t.findIndex(o=>JI.includes(o));return r===-1?void 0:t.slice(0,r+1).join("/")}var YI=new Set([".envrc",".netrc",".npmrc",".pgpass","id_rsa","id_ed25519","credentials","secrets","env.local"]);function XI(e){let t=(e.split("/").pop()??e).toLowerCase();return t===".env"||t.startsWith(".env.")||YI.has(t)||/^(credentials|secrets)\.(json|ya?ml|ini|toml|txt|env)$/.test(t)||/\.(pem|key|p12|pfx|keystore|jks)$/.test(t)}function cb(e){let t=e.split("/").pop()??e;return t.endsWith("~")||t===".DS_Store"||/\.(bak|orig|swp|swo|rej|old)$/.test(t)||/\.old\.[^.]+$/.test(t)}async function QI(e,t){let{files:r,skippedLinks:o}=jp(e,{symlinks:"skip"}),n=[],i=new Set,a=0;for(let s of o)n.push({path:s,why:"a symlink, which a deploy would refuse to publish",fatal:!1});for(let s of r){let c=qI(s.relativePath);if(c){i.has(c)||(i.add(c),n.push({path:`${c}/`,why:"a build or history directory; `deploy --dir` would upload it whole",fatal:!1}));continue}if(XI(s.relativePath)){n.push({path:s.relativePath,why:"environment or credential shaped",fatal:!0});continue}let l=await Rp(s.path);if(l===void 0)continue;a+=1;let d=_e(l);if(d.ok&&d.manifest.backend.round){n.push({path:s.relativePath,why:"an App Manifest, which carries the round's private half",fatal:!0});continue}let p=Rm(l,t);if(p.length){n.push({path:s.relativePath,why:jm(t,p),fatal:!0});continue}let m;try{let f=JSON.parse(l);f&&Array.isArray(f.sourcesContent)&&(m=f)}catch{}if(m){let f=m.sourcesContent.filter(b=>typeof b=="string").join(`
7182
- `),h=f?Rm(f,t):[];if(h.length){n.push({path:s.relativePath,why:`${jm(t,h)} It is inside the map's own copy of your sources.`,fatal:!0});continue}n.push({path:s.relativePath,why:"a source map, which publishes your sources",fatal:!1});continue}cb(s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1})}for(let s of r)cb(s.relativePath)&&!n.some(c=>c.path===s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1});return{files:r,read:a,findings:n}}async function lb(e){let t=e.manifest??"gamestage.yaml",r;try{let L=_e(await Om(t,"utf8"));if(!L.ok)return P(`${t} is not a valid App Manifest.`,L.issues.map(Be=>`${S.cyan(Be.path)} ${Be.message}`));r=L.manifest}catch{return P(`Cannot read ${t}.`,["Run `gamestage inspect .` or `gamestage create` first."])}let o=r.backend.round??KI(r.backend.archetype),n=r.backend.round?{source:"manifest",archetype:o.archetype,detail:"The Engine used this game's own backend.round from the manifest."}:{source:"stand-in",archetype:o.archetype,detail:`The manifest carries no round, so the Engine used a representative ${o.archetype} stand-in supplied by Gamestage. It did not test the game's production content from Studio.`};if(!Bt.includes(o.archetype))return P(`No Engine here serves the ${o.archetype} archetype yet.`,[`Built so far: ${Bt.join(", ")}.`]);let i=Nm(e.file??"index.html"),a;try{a=await Om(i,"utf8")}catch{return P(`Cannot read ${e.file??"index.html"}.`)}let s=[],c=Nm(e.dir??ib(i)),l;try{l=await QI(c,o)}catch(L){return P(`Cannot read the publish set at ${e.dir??ib(i)}.`,[L instanceof Error?L.message:"The directory could not be walked."])}let d=l.findings.filter(L=>L.fatal),p=Rm(a,o),m=p.length>0||d.length>0;s.push({id:"solution-absent",what:`the answers are not in what a deploy publishes (${l.files.length} file${l.files.length===1?"":"s"}, ${l.read} read)`,status:m?"open":"verified",detail:m?[p.length?jm(o,p):void 0,...d.map(L=>`${L.path}: ${L.why}`)].filter(Boolean).join(" "):void 0});let f=await ca(l.files),h=f.map(L=>L.text).join(`
7183
- `),b=ra(h),$=VI(r,o.archetype,b).filter(([,L])=>!Sp(h,L)).map(([L])=>L);s.push({id:"settings-read",what:"every producer setting the page offers is read by the game"+(b.length?`, and it offers ${b.length} more for controls it has (${b.join(", ")})`:""),status:$.length?"open":"verified",detail:$.length?`The page does not read: ${$.join(", ")}. Apply each setting from game.presentation before deploying.`:void 0});let O=Fa(f),te=l.files.some(L=>{let Be=L.relativePath.split("/").pop();return Be===we||Be===be})||a.includes(we)||a.includes(be),G=a.includes("createPlayerClient")||/\bstart\s*\(/.test(a);s.push({id:"client-present",what:"the client the page imports is there",status:te||!G?"verified":"open",detail:G&&!te?"The page uses a Gamestage client but does not import the one we ship. Run `gamestage client`.":void 0});let N=await Ma({game:r.app.id,round:o,title:r.app.title});await new Promise(L=>N.listen(0,"127.0.0.1",()=>L()));let q=N.address(),Et=q&&typeof q!="string"?`http://127.0.0.1:${q.port}`:"",ot=await import("node:http").then(({createServer:L})=>L(async(Be,Ka)=>{let Mm=(Be.url??"/").split("?")[0],Um=Mm==="/"?i:Nm(i,"..",Mm.slice(1));try{let Ib=await Om(Um);Ka.writeHead(200,{"content-type":Um.endsWith(".js")?"text/javascript":"text/html"}),Ka.end(Ib)}catch{Ka.writeHead(404).end()}}));await new Promise(L=>ot.listen(0,"127.0.0.1",()=>L()));let Tt=ot.address(),it=Tt&&typeof Tt!="string"?`http://127.0.0.1:${Tt.port}/`:"";try{s.push(e.noBrowser?{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:"Asked not to open a browser."}:await HI(it,Et,r.app.id))}finally{N.close(),ot.close()}let oe=WI(s),Qn=l.findings.filter(L=>!L.fatal);if(R()){z({ok:oe.outcome==="verified",outcome:oe.outcome,exitCode:oe.exitCode,checks:s,open:oe.open,skipped:oe.skipped,round:n,copy_candidates:O,publish_set:{directory:c,files:l.files.map(L=>L.relativePath),read:l.read,warnings:Qn}}),oe.exitCode!==0&&process.exit(oe.exitCode);return}I(oe.outcome==="verified"?"Verified":oe.outcome==="failed"?"Verification failed":"Verification incomplete"),T("round used for verification",n.source),v(` ${S.dim(n.detail)}`);for(let L of s){let Be=L.status==="verified"?S.green("ok"):L.status==="open"?S.yellow("open"):S.dim("skipped");T(L.what,Be),L.detail&&v(` ${S.dim(L.detail)}`)}if(Qn.length){v(),v(S.dim(" Also in the publish set, and a deploy would upload it:"));for(let L of Qn)v(` ${S.dim("\xB7")} ${S.cyan(L.path)} ${S.dim(L.why)}`)}if(O.length){v(),v(S.dim(" Copy a producer may need to own:"));for(let L of O)v(` ${S.dim("\xB7")} ${S.cyan(`${L.file}:${L.line}`)} ${L.text} ${S.dim(`(${L.confidence}, ${L.level})`)}`)}v(),oe.outcome==="verified"?A("The Engine decided the outcome and the page showed it. That is the migration done."):oe.outcome==="failed"?A("A check remains open, so the game failed verification. Read the open check and fix its cause."):A("No check is open, but the game could not be fully proved here. Run the skipped check before treating it as verified."),v(),oe.exitCode!==0&&process.exit(oe.exitCode)}import{stat as e0}from"node:fs/promises";async function ub(){let e=[],[t]=process.versions.node.split(".").map(Number);e.push({id:"node",label:"Node.js",ok:t>=20,detail:t>=20?`v${process.versions.node}`:`v${process.versions.node} - Gamestage needs Node 20 or newer`,blocking:!0}),e.push({id:"schema",label:"Manifest schema",ok:!0,detail:`v${Vi} bundled`,blocking:!1});let r=!1;try{await e0("gamestage.yaml"),r=!0}catch{}e.push({id:"manifest",label:"App Manifest",ok:r,detail:r?"gamestage.yaml found":"none here yet \u2014 `gamestage inspect .` or `gamestage create` makes one",blocking:!1}),e.push({id:"auth",label:"Signed in",ok:!1,detail:"not signed in \u2014 only needed to deploy",blocking:!1});let o=e.filter(n=>!n.ok&&n.blocking);R()&&(z({ok:o.length===0,checks:e}),process.exit(o.length===0?0:1)),I("Environment");for(let n of e){let i=n.ok?S.green("ok"):n.blocking?S.red("blocked"):S.dim("--");v(` ${i.padEnd(18)} ${n.label.padEnd(16)} ${S.dim(n.detail)}`)}v(),o.length&&(v(` ${S.red("Fix the blocked items above before continuing.")}`),v(),process.exit(1)),v(` ${S.green("Ready.")}`),v()}import{readFile as h0,stat as g0,writeFile as y0}from"node:fs/promises";import{createHash as v0}from"node:crypto";import{basename as _0}from"node:path";import{readdir as t0,readFile as Za,stat as Dm}from"node:fs/promises";import{basename as n0,extname as r0,join as Lm,relative as o0}from"node:path";var i0=new Set(["node_modules",".git","dist","build",".next",".wrangler","coverage"]),a0=new Set([".html",".htm",".js",".mjs",".cjs",".jsx",".ts",".tsx",".vue",".svelte"]);async function s0(e,t=200){let r=await Dm(e),o=[];if(r.isFile())return o.push({path:e,relative:n0(e),text:await Za(e,"utf8")}),o;let n=async i=>{if(o.length>=t)return;let a=await t0(i,{withFileTypes:!0});for(let s of a){if(o.length>=t)return;if(s.name.startsWith(".")&&s.name!==".openai")continue;let c=Lm(i,s.name);if(s.isDirectory()){if(i0.has(s.name))continue;await n(c)}else if(a0.has(r0(s.name)))try{o.push({path:c,relative:o0(e,c),text:await Za(c,"utf8")})}catch{}}};return await n(e),o}function c0(e,t){let r=e.text.split(`
7184
- `);for(let o=0;o<r.length;o++)if(t.test(r[o]))return{file:e.relative,line:o+1,excerpt:r[o].trim().slice(0,120)};return null}async function l0(e,t){if(!(await Dm(e)).isFile())try{let o=JSON.parse(await Za(Lm(e,"package.json"),"utf8"));if(o.name)return o.name.replace(/^@[^/]+\//,"")}catch{}for(let o of t){if(!/\.html?$/.test(o.relative))continue;let n=/<h1[^>]*>([^<]+)<\/h1>/i.exec(o.text);if(n){let a=db(n[1]);if(a)return a}let i=/<title[^>]*>([^<]+)<\/title>/i.exec(o.text);if(i){let a=db(i[1].split(/\s+[|\u2013\u2014-]\s+/)[0]);if(a)return a}}return null}function db(e){let t=e.replace(/\s+/g," ").trim();return/[a-z0-9]/i.test(t)?t.slice(0,60):null}var u0=[{id:"client-scoring",title:"Scoring runs in the browser",detail:"Score is computed client-side, so a player can edit it. Scoring must move into the Game Engine and the client must render a server-returned result.",patterns:[/\b\w*(score|points|total)\s*\+=/i,/\b\w*(score|points|total)\w*\s*=\s*\w*\s*[+*]/i,/function\s+\w*(calculate|compute|get)\w*(score|points|total|tier)/i],remedy:{delete:"the score arithmetic in the browser, and the answer set it marks against",call:"const result = await client.play(round.id, { picks, roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.score, and result.feedback[].verdict per pick. `round_state` is absent where a game marks at settlement, so read it optionally",move:"the answer set into `backend.round.targets` in gamestage.yaml, where a deploy provisions it into the Engine",keep:"every bit of the rendering, the animation and the copy",because:"a score the browser computes is a score a player can set"},remedies:{push:{delete:"the running total, the bust comparison and the tier table, and the dataset the values came from",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.total for the running total, .bust for whether they went over, and .tier for the rank. The value each pick contributed comes back in result.feedback[0].label",move:"what each pick is worth into `backend.round.slates[].entries[].value` in gamestage.yaml, and the ceiling into `backend.round.target`",keep:"every bit of the rendering, the animation and the copy",because:"a game whose whole mechanic is arithmetic is finished the moment its numbers reach the browser, whatever the page does afterwards"}}},{id:"client-outcome",title:"The result is decided in the browser",detail:"Win, loss or result tier is determined client-side, so the outcome cannot be trusted. The Engine must decide the outcome and return it as a committed decision.",patterns:[/\b(bust|win|won|lost|passed|failed)\s*=\s*\w+\s*[<>=]/i,/\bgetTier\s*\(|\bdetermine(Result|Outcome|Winner)/i],remedy:{delete:"the local decision about winning, losing or a result tier",call:"const result = await client.play(round.id, input, newIdempotencyKey())",render:"result.round_state?.outcome, which is won, lost, incomplete or pending",keep:"how the outcome is presented, including the celebration",because:"an outcome the page decides is one it can be persuaded to decide differently"},remedies:{push:{delete:"the bust comparison and the function that turns a distance into a rank",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.bust and .tier, which are decided on commit: the total only grows, so passing the target ends the round then rather than at the last pick",move:"the rank ladder into `backend.round.tiers`, as fractions of the target",keep:"how the result is presented, including the celebration",because:"a rank the page awards is one it can award itself"}}},{id:"client-answers",title:"Answers or targets are present in client code",detail:"The solution set ships to the browser, so it can be read before play. Answers must be held server-side and never cross the wire.",patterns:[/\b(answer|solution|correct)(Key|Set|s)?\s*[:=]/i,/\bisCorrect\s*[:=(]/i,/\b\w*(target|answer|solution)\w*\s*=\s*[[{](?!.*(fetch|await|response))/i,/\b(target|answer|solution)s?\s*:\s*[^,}\n]/i],remedy:{delete:"the array or object holding the correct answers",call:"const round = await client.getCurrentRound()",render:"round.challenge for what the player picks from. The Engine returns the verdict; the page never knows the answer until the round reveals it",move:"the answers into `backend.round.targets` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to mark against",keep:"the board, the layout and the interaction",because:"a solution in the bundle can be read before anybody plays"},remedies:{push:{delete:"the dataset the contributions are looked up in",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates, which carry each pick's key and label and no value at all. What a pick was worth arrives as feedback once it has been committed",move:"the values into `backend.round.slates[].entries[].value` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to count",keep:"the board, the layout and the interaction",because:"knowing every contribution is knowing which picks land on the target, which is the whole game"}}},{id:"client-play-limit",title:"Play limiting relies on browser storage",detail:"Attempt limits enforced through localStorage or cookies reset when storage is cleared. Limits must be enforced against an identified player server-side.",patterns:[/localStorage\.(set|get)Item\s*\(\s*['"`][^'"`]*(play|attempt|tries|daily|limit)/i,/sessionStorage\.(set|get)Item/i],remedy:{delete:"the localStorage or cookie bookkeeping that counts attempts",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed, and the same pair for mistakes",move:"the limits into `backend.round.attemptsAllowed` and `mistakesAllowed`",keep:"how the remaining attempts are shown",because:"a limit in storage is a limit that clearing storage removes"},remedies:{push:{delete:"the localStorage bookkeeping that remembers today's game",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed for picks taken, and state.finished for whether today is done",move:"the number of picks into `backend.round.slates`: one slate is one pick",keep:"how the remaining picks are shown",because:"a game that remembers in the browser is one a cleared browser lets you play again"}}},{id:"client-randomness",title:"The daily challenge is chosen in the browser",detail:"Client-side randomness means players can reroll until they like the challenge, and no two players share a verifiable daily. Selection must be server-issued.",patterns:[/Math\.random\s*\(\)/,/\b(daily|today|challenge)\w*\s*=\s*.*Math\.random/i],remedy:{delete:"the Math.random() that chooses the challenge",call:"const round = await client.getCurrentRound()",render:"round.challenge, which is the same for everyone playing that round",keep:"randomness that is only decoration, such as confetti or shuffling how options are laid out",because:"a challenge the browser picks is one a player can reroll, and no two players share a daily worth comparing"},remedies:{push:{delete:"the Math.random() that chooses which team and season comes up",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates in order: slate n is pick n. Keep the spin as an animation over a choice the round has already made",move:"the sequence into `backend.round.slates`, one per pick",keep:"the spin, the reveal and every bit of its timing",because:"a slate the browser draws is one a player can redraw, and it means no two players played the same day"}}},{id:"client-time",title:"Round timing uses client time",detail:"Device clocks can be changed. Open, lock and settle decisions must use authoritative server time.",patterns:[/new Date\(\)\.getTime\(\)/,/Date\.now\(\)\s*[<>]/],remedy:{delete:"the comparisons against Date.now() that decide whether the round is open",call:"const round = await client.getCurrentRound()",render:"round.can.accepting_plays, and round.server_time where a countdown needs an origin",keep:"the countdown itself, driven from the server's time rather than the device's",because:"a device clock is something a player can change"}}],d0=[{id:"sdk",title:"Monterosa JavaScript SDK 2",detail:"No SDK integration found. The SDK provides the EnMasse connection, live config and content updates, identity, consent, storage and experience hosting.",present:/@monterosa\/sdk-|sdk\.monterosa\.cloud/i},{id:"identity",title:"Player sign-in",detail:"No player identity found. Anonymous play is supported and the Engine's signed session carries it. To identify players, name your own issuer and its JWKS in `identity.jwt` and the Engine validates the token your login system already gives them.",present:/identify-kit|monterosa.*identity|\bIdentify\b|jwks|oidc|auth0|workos|firebase.*auth/i},{id:"consent",title:"Consent gating",detail:"No consent handling found. Analytics and storage must respect the player's consent choices.",present:/consent-kit|consent/i},{id:"analytics",title:"Analytics",detail:"No analytics found. Gamestage routes events to the destinations declared in the manifest, with Monterosa Analytics on by default.",present:/analytics-kit|gtag\(|posthog|analytics\.track/i}],p0=[{archetype:"hunt",signals:[{pattern:/\b(answer|solution|correct)(s|Set|Key)?\s*[:=]/i,because:"marks picks against a known answer set"},{pattern:/\bisCorrect\b|\bverdict\b/i,because:"judges a pick right or wrong"},{pattern:/\bpick(s|ed)?\b/i,because:"players make picks"},{pattern:/\broster|\bplayer(s)?\s*\[/i,because:"selects from a roster"}]},{archetype:"push",signals:[{pattern:/\b\w*(total|sum|running)\w*\s*\+=/i,because:"accumulates a running total from each pick"},{pattern:/\bbust\b/i,because:"has a bust condition for going over"},{pattern:/\b\w*total\w*\s*[><]=?\s*\w*target|\btarget\w*\s*-\s*\w*total/i,because:"compares the total against a target"},{pattern:/\bgetTier\b|\bwithout going over\b|\bclosest\b/i,because:"scores by how close the total came"}]},{archetype:"trivia",signals:[{pattern:/\bquestion\b/i,because:"presents questions"},{pattern:/\bchoice(s)?\b|\boption(s)?\b/i,because:"offers answer choices"},{pattern:/\bquiz\b/i,because:"describes itself as a quiz"}]},{archetype:"forecast",signals:[{pattern:/\bpredict/i,because:"asks players to predict"},{pattern:/\bmarket\b|\bodds\b/i,because:"has market or odds language"},{pattern:/\bsettle(d|ment)?\b/i,because:"settles outcomes"}]},{archetype:"group",signals:[{pattern:/\bpuzzle\b/i,because:"describes itself as a puzzle"},{pattern:/\bguess(es)?\b/i,because:"players guess"},{pattern:/\bstreak\b/i,because:"tracks streaks"}]},{archetype:"timed_round",signals:[{pattern:/\bcountdown\b|\btimer\b/i,because:"runs a countdown"},{pattern:/\bround\b/i,because:"is organised into rounds"}]}];function m0(e){let t=e.map(s=>s.text).join(`
7185
- `),r=p0.map(s=>{let c=s.signals.filter(l=>l.pattern.test(t)).map(l=>l.because);return{archetype:s.archetype,hits:c.length,because:c}}).filter(s=>s.hits>0).sort((s,c)=>c.hits-s.hits),o=r[0];if(!o)return null;let n=r[1]?.hits??0,i=o.hits-n,a=o.hits>=3&&i>=2?"high":o.hits>=2?"medium":"low";return{archetype:o.archetype,confidence:a,because:o.because}}async function f0(e,t){let o=(await Dm(e)).isFile()?null:e;if(o)try{let i=await Za(Lm(o,"package.json"),"utf8"),a=JSON.parse(i),s={...a.dependencies,...a.devDependencies},c=s.next?"Next.js":s.react?"React":s.vue?"Vue":s.svelte?"Svelte":void 0,l=s.vite?"Vite":s.webpack?"webpack":void 0;return{kind:"node_project",framework:c,build:l}}catch{}return t.length===1&&/\.html?$/.test(t[0].relative)||t.every(i=>/\.html?$/.test(i.relative))?{kind:"standalone_html"}:{kind:"unknown"}}async function pb(e){let t=await s0(e);if(t.length===0)throw new Error(`No inspectable source found at ${e}. Point inspect at a game file or a project directory.`);let r=await f0(e,t),o=m0(t),n=[];for(let p of u0){let m=[];for(let f of t){for(let h of p.patterns){let b=c0(f,h);if(b){m.push(b);break}}if(m.length>=3)break}if(m.length>0){let f=o?p.remedies?.[o.archetype]??p.remedy:p.remedy;n.push({...f?{remedy:f}:{},id:p.id,title:p.title,detail:p.detail,evidence:m})}}let i=t.map(p=>p.text).join(`
7186
- `),a=d0.filter(p=>!p.present.test(i)).map(p=>({id:p.id,title:p.title,detail:p.detail,evidence:[]})),s=[];t.some(p=>/<(div|section|main|canvas)/i.test(p.text))&&s.push({id:"presentation",title:"Player-facing presentation",detail:"Layout, styling and interaction feel can stay creator-owned. Gamestage replaces the authority beneath the interface, not the interface itself.",evidence:t.slice(0,2).map(p=>({file:p.relative}))});let l=Fa(t),d=[];return r.kind==="standalone_html"&&d.push("Where is this deployed today, and who owns that hosting?"),d.push("Which of the embedded datasets are licensed for production use, and at what refresh cadence?"),n.some(p=>p.id==="client-play-limit")&&d.push("Is the play limit per device or per person? That decides whether identity is required at launch."),{target:e,scanned_files:t.length,stack:r,keep:s,move_behind_authority:n,missing_integrations:a,copy_to_studio:l,unknowns:d,archetype:o,name:await l0(e,t)}}var b0=e=>_0(e).replace(/\.[^.]+$/,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"inspected-game",w0=e=>e.split("-").filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" ");function k0(e,t){let r=b0(e.name??e.target),o=t&&Iv(t)?t:ia(r),n=e.name??w0(r),i=ea(o,n);return i.manifest.conformance="L0",i.app.status="proposed",i.app.provenance=[{kind:"repository_evidence",file:e.target},{kind:"generated_proposal",tool:"gamestage inspect",source_context:`${e.scanned_files} file(s) inspected`}],i.experience.status="proposed",i.experience.surfaces=["web-embed"],i.experience.provenance=[{kind:"repository_evidence",file:e.target}],e.archetype&&(i.backend.status="proposed",i.backend.route="managed_runtime",i.backend.archetype=e.archetype.archetype,i.backend.provenance=[{kind:"generated_proposal",tool:"gamestage inspect",source_context:e.archetype.because.join("; ")}]),e.move_behind_authority.some(s=>s.id==="client-play-limit"||s.id==="client-scoring")&&(i.identity.status="proposed",i.identity.provider="identify",i.identity.require_authenticated_writes=!0),Mt.parse(i)}async function x0(e,t){let r=await Se();if(!r)return!1;Zn();let o=e.backend.archetype;return o?(await Un({baseUrl:se,token:r.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:o,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${v0("sha256").update(t).digest("hex")}`,conformance:Oe(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:Rn.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function S0(e){try{let t=_e(await h0(e,"utf8"));return t.ok?t.manifest.app.id:void 0}catch{return}}async function $0(e){try{return await g0(e),!0}catch{return!1}}async function mb(e,t){let r;try{r=await pb(e)}catch(l){return P(l instanceof Error?l.message:"Inspection failed")}let o=k0(r,await S0(typeof t.write=="string"?t.write:"gamestage.yaml")),n=Oe(o),i=Qi(o),a=!1,s;try{a=await x0(o,i)}catch(l){s=l instanceof Error?l.message:"The control plane did not answer."}let c=null;if(t.write){if(c=typeof t.write=="string"?t.write:"gamestage.yaml",!t.force&&await $0(c))return P(`${c} already exists, and inspect would replace it.`,["A manifest that has been worked on holds a round; this report cannot,","because a round is not visible in the code it read.","",`${S.cyan(`gamestage manifest validate ${c}`)} check what you have`,`${S.cyan("gamestage inspect . --force")} replace it anyway`]);await y0(c,i,"utf8")}if(R()){z({ok:!0,report:r,manifest:o,conformance:{computed:n.computed,blockers:n.blockers},manifest_yaml:i,written_to:c,registered:a,...s?{registration_failed:s}:{}});return}if(I(`Inspection report ${S.dim(r.target)}`),T("Files inspected",String(r.scanned_files)),T("Stack",r.stack.framework?`${r.stack.kind} (${r.stack.framework})`:r.stack.kind),r.archetype&&T("Archetype",`${r.archetype.archetype} ${S.dim(`(${r.archetype.confidence} confidence)`)}`),r.keep.length){I("Keep as yours");for(let l of r.keep)A(S.green(l.title)),v(` ${S.dim(l.detail)}`)}if(r.move_behind_authority.length){I("Must move behind an authoritative boundary");for(let l of r.move_behind_authority){A(S.yellow(l.title)),v(` ${S.dim(l.detail)}`);for(let d of l.evidence.slice(0,2)){let p=d.line?`${d.file}:${d.line}`:d.file;v(` ${S.dim("\u2192")} ${S.cyan(p)}${d.excerpt?S.dim(" "+d.excerpt):""}`)}l.remedy&&(v(` ${S.dim("delete")} ${l.remedy.delete}`),v(` ${S.dim("call")} ${S.cyan(l.remedy.call)}`),l.remedy.render&&v(` ${S.dim("render")} ${l.remedy.render}`),l.remedy.move&&v(` ${S.dim("move")} ${l.remedy.move}`),v(` ${S.dim("keep")} ${l.remedy.keep}`))}}if(r.missing_integrations.length){I("Platform integrations not present yet");for(let l of r.missing_integrations)A(l.title),v(` ${S.dim(l.detail)}`)}if(r.unknowns.length){I("Needs a human answer");for(let l of r.unknowns)A(l,"?")}if(I("App Manifest"),T("Conformance",`${n.computed} ${n.computedName}`),n.blockers.length){v(),v(S.dim(" To reach the next level:"));for(let l of n.blockers)v(` ${S.dim("\xB7")} ${l.requirement}`)}v(),c?v(` Written to ${S.cyan(c)}`):v(S.dim(" Re-run with --write to save this manifest.")),v(a?" Registered in Studio as a draft.":s?` Not registered in Studio: ${s} (${se})`:" No account found, so registration was skipped."),v()}var fb="https://github.com",E0="https://api.github.com",Ba=process.env.GAMESTAGE_GITHUB_CLIENT_ID??"Ov23livKf8DOgOm2a383";async function hb(){let e=await fetch(`${fb}/login/device/code`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Ba,scope:""})});if(!e.ok)throw new Error(`GitHub refused the device request (${e.status}).`);return await e.json()}async function gb(e){let r=await(await fetch(`${fb}/login/oauth/access_token`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Ba,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})})).json();if(r.access_token)return{status:"linked",login:await T0(r.access_token)};switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down",interval:r.interval??10};case"expired_token":return{status:"expired"};case"access_denied":return{status:"denied"};default:throw new Error(`GitHub returned an unexpected error (${r.error}).`)}}async function T0(e){let t=await fetch(`${E0}/user`,{headers:{accept:"application/vnd.github+json",authorization:`Bearer ${e}`,"user-agent":"gamestage-cli"}});if(!t.ok)throw new Error(`GitHub would not identify the account (${t.status}).`);let r=await t.json();if(!r.login)throw new Error("GitHub returned an account with no login.");return r.login}var A0=e=>new Promise(t=>setTimeout(t,e));async function yb(){let{client:e}=await $e();try{let t=await hb();R()?z({ok:!0,status:"awaiting_authorisation",userCode:t.user_code,verificationUri:t.verification_uri,clientId:Ba}):(I("Link GitHub"),T("Code",t.user_code),T("Open",t.verification_uri),v(),A("Enter the code on that page. This waits until you do."),v());let r=Date.now()+t.expires_in*1e3,o=Math.max(t.interval,5);for(;Date.now()<r;){await A0(o*1e3);let n=await gb(t.device_code);if(n.status==="pending")continue;if(n.status==="slow_down"){o=n.interval;continue}if(n.status==="denied")return P("You declined the request on GitHub.");if(n.status==="expired")return P("The code expired. Run `gamestage link github` again.");let{workspace:i}=await e.linkGitHub(n.login);if(R())return z({ok:!0,status:"linked",github:i.github});I("Linked"),T("Account",n.login),v(),A("Your first deploy is no longer gated. Run `gamestage deploy`."),v();return}P("The code expired before it was entered.")}catch(t){Ie(t)}}var I0=e=>new Promise(t=>setTimeout(t,e));function C0(e){process.stderr.write(JSON.stringify({ok:!0,status:"awaiting_approval",user_code:e.user_code,verification_uri:e.verification_uri,verification_uri_complete:e.verification_uri_complete,expires_in:e.expires_in},null,2)+`
7187
- `)}async function vb(e,t){let{client:r}=await $e(),o=Zr(await aa(r));if(R()){z({ok:o.ok,status:o.status,access:o.access,...o.code?{code:o.code}:{},message:o.message,next:o.next,email:e.email,...t?{stored_in:t}:{},control_plane:se}),o.ok||process.exit(1);return}v(),I("Signed in"),T("Account",e.email??e.userId??"unknown"),t&&T("Token stored in",t==="keychain"?"your macOS keychain":"~/.gamestage (owner only)"),v(),A("Never written into the project, and never passed to your agent."),A("`gamestage logout` removes it."),Bn(o),o.ok||process.exit(1)}async function _b(){let e=await Se();if(e){await vb(e);return}let t;try{t=await Sv()}catch(a){P("Could not reach the sign-in service.",[String(a)])}R()?C0(t):(I("Sign in to Gamestage"),v(" This also creates your account if you do not have one. Google or email."),v(" A new account is approved by a person, so this may end in a wait."),v(),T("Open",t.verification_uri),T("Code",t.user_code),v(),v(" Waiting for you to confirm in the browser..."),Ev(t.verification_uri_complete));let r=Date.now()+t.expires_in*1e3,o=t.interval*1e3,n=null;for(;Date.now()<r;){await I0(o);let a=await $v(t.device_code);if(a.status==="ok"){n=a.session;break}if(a.status==="slow_down"){o+=5e3;continue}a.status!=="pending"&&(a.status==="expired"&&P("That code expired.",["Run `gamestage login` again."]),P("Sign-in was refused.",[a.reason]))}n||P("Timed out waiting for approval.",["Run `gamestage login` again."]);let i=await Pp(n);await vb(n,i)}async function bb(){let e=await Se();if(await Av(),R()){z({ok:!0,status:e?"signed_out":"not_signed_in"});return}I(e?"Signed out":"Not signed in"),e&&T("Removed",e.email??"session"),v()}async function wb(){let e=await Se();if(R()){z(e?{ok:!0,signed_in:!0,email:e.email,user_id:e.userId}:{ok:!0,signed_in:!1});return}if(!e){I("Not signed in"),v(),A("Inspecting, scaffolding and local rounds need no account."),A("Run `gamestage login` when you want to deploy a playground."),v();return}I("Signed in"),T("Account",e.email??"unknown"),e.userId&&T("User",e.userId),v(),A("`gamestage status` says whether this account is approved."),v()}import{readdir as P0,readFile as O0,stat as N0}from"node:fs/promises";async function R0(e){let t=[];try{t=await P0(e)}catch{}let r=t.filter(a=>!a.startsWith(".")),o=[];for(let a of r)/\.html?$/.test(a)&&o.push(a);let n=!1,i;for(let a of["gamestage.yaml","gamestage.yml"])try{await N0(`${e}/${a}`),n=!0;try{let s=_e(await O0(`${e}/${a}`,"utf8"));s.ok&&(i=!!s.manifest.backend.round)}catch{}break}catch{}return{has_manifest:n,has_package_json:r.includes("package.json"),html_files:o,is_empty:r.length===0,has_round:i}}async function kb(){let e=process.cwd(),t=await R0(e),r=t.has_manifest?t.has_round===!1?"round":t.has_round===!0?"play":"continue":t.has_package_json||t.html_files.length>0?"inspect":"create",o={continue:{command:je("manifest validate gamestage.yaml"),why:"This project already has an App Manifest. Check where it stands."},round:{command:"edit gamestage.yaml, add backend.round",why:`The manifest names an archetype but no round, so there is no game for the Engine to serve yet. The round is the content the server owns: the board a player sees and the answers they never do. Until it is there, \`${je("dev")}\` serves the contract fixture rather than your game, and \`${je("verify")}\` has nothing to verify.`},play:{command:je("dev"),why:"The manifest declares a round. Serve it locally, through the real Engine."},inspect:{command:je("inspect ."),why:"There is a game here already. Read it read-only and produce an inspection report."},create:{command:je("create"),why:"Nothing to inspect. Start a new game from a concept."}};if(R()){z({ok:!0,cwd:e,detected:t,route:r,next:o[r],docs:{start:"https://gamestage.ai/start.md",schema:"https://gamestage.ai/schemas/app-manifest/1.0"},invocation:Ja(),authentication:`Not required for inspect, create, validate or local development. First needed at \`${je("deploy")}\`.`});return}if(I("Gamestage"),v(S.dim(" Take an agent-built game to production, on the platform behind the")),v(S.dim(" world's biggest fan experiences.")),I("Where you are"),t.has_manifest&&t.has_round===!1)v(" An App Manifest is present, and it declares no round.");else if(t.has_manifest&&t.has_round===!0)v(" An App Manifest is present, with a round the Engine can serve.");else if(t.has_manifest)v(" An App Manifest is already present.");else if(t.has_package_json||t.html_files.length){let n=[t.has_package_json?"a Node project":null,t.html_files.length?`${t.html_files.length} HTML file(s)`:null].filter(Boolean);v(` Found ${n.join(" and ")}. This looks like a game to inspect.`)}else v(" Nothing here yet. This looks like a fresh start.");I("Do this next"),v(` ${S.cyan(o[r].command)}`),v(` ${S.dim(o[r].why)}`),I("Good to know"),v(S.dim(` Nothing needs an account yet. Inspect, create, validate and local
7187
+ `).forEach((n,i)=>{let a=[...[...n.matchAll(/>([^<>]{2,160})</g)].map(s=>s[1]),...[...n.matchAll(/\b(?:title|alt|placeholder|aria-label)="([^"]{2,160})"/gi)].map(s=>s[1])];for(let s of a){let c=s.replace(/\s+/g," ");if(!mb(c))continue;let l=jm(c);t.push({text:l,...fb(l),file:e.relative,line:i+1})}}),t}function s0(e){let t=[];return e.text.split(`
7188
+ `).forEach((r,o)=>{if(!/^\s*(import|export|require\()/.test(r))for(let n of r.matchAll(/(['"`])((?:(?!\1)[^\\\r\n]|\\.){2,160})\1/g)){let i=n[2].replace(/\s+/g," ");if(!mb(i))continue;let a=jm(i),s=r.slice((n.index??0)+n[0].length);/^\s*[:\]]/.test(s)||t.push({text:a,...fb(a),file:e.relative,line:o+1})}}),t}function Ba(e){let t=[];for(let o of e)/\.(html?|svelte|vue)$/i.test(o.relative)&&t.push(...a0(o)),/\.(m?[jt]sx?|svelte|vue)$/i.test(o.relative)&&t.push(...s0(o));let r=new Map;for(let o of t){let n=o.text.toLowerCase();r.has(n)||r.set(n,o)}return[...r.values()].sort((o,n)=>o.level===n.level?o.text.localeCompare(n.text):o.level.localeCompare(n.level))}function c0(e){switch(e){case"hunt":return Pe.parse({archetype:e,number:1,prompt:"Pick the two that belong",board:["alpha","beta","gamma","delta"],targets:["alpha","beta"],open:!0});case"push":return Pe.parse({archetype:e,number:1,prompt:"Two picks. Get close to 100 without going over.",target:100,targetLabel:"Points",slates:[{id:"first",label:"First pick",entries:[{key:"alpha",label:"Alpha",value:40},{key:"beta",label:"Beta",value:70}]},{id:"second",label:"Second pick",entries:[{key:"gamma",label:"Gamma",value:25},{key:"delta",label:"Delta",value:55}]}],open:!0});case"group":return Pe.parse({archetype:e,number:1,prompt:"Find the groups. Four at a time.",board:["alpha","beta","gamma","delta","epsilon","zeta","eta","theta"],groups:[{key:"first",label:"First four",members:["alpha","beta","gamma","delta"]},{key:"second",label:"Second four",members:["epsilon","zeta","eta","theta"]}],open:!0});case"forecast":return Pe.parse({archetype:e,number:1,prompt:"Who takes it?",options:[{key:"alpha",label:"Alpha"},{key:"beta",label:"Beta"},{key:"draw",label:"Neither, it ends level"}],open:!0});default:throw new Error(`No representative round exists for the ${e} archetype.`)}}function l0(e,t,r){return(Sv({gameId:e.app.id,gameName:e.app.title,archetype:t,manifestRevision:e.manifest.revision,wording:r,urls:{baseAppsUrl:"",dashImage:"",embedUrl:""}})["project_settings.json"].sections??[]).flatMap(i=>i.properties??[]).flatMap(i=>{if(typeof i.key!="string")return[];let a=Ep[i.key];return a?[[i.key,a]]:[]})}function u0(e){let t=e.filter(o=>o.status==="open").length,r=e.filter(o=>o.status==="skipped").length;return t>0?{outcome:"failed",exitCode:1,open:t,skipped:r}:r>0?{outcome:"unverified",exitCode:2,open:t,skipped:r}:{outcome:"verified",exitCode:0,open:t,skipped:r}}function zm(e,t){if(t.archetype==="hunt"){let n=t.targets;if(n.length===0)return[];let i=n.filter(a=>new RegExp(`["'\`]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["'\`]`,"i").test(e));return i.length===n.length?i:[]}if(t.archetype==="forecast")return[];if(t.archetype==="group"){let n=[];for(let i of t.groups){if(new RegExp(`["\`']${i.label.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(e)){n.push(i.label);continue}e.split(`
7189
+ `).some(c=>i.members.every(l=>new RegExp(`["\`']${l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}["\`']`,"i").test(c)))&&n.push(i.label)}return n}let r=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),o=[];for(let n of t.slates)for(let i of n.entries){let a=`${r(i.key)}|${r(i.label)}`,s=new RegExp(`(?:${a})[^\\n]{0,120}?\\b${i.value}\\b`,"i"),c=new RegExp(`\\b${i.value}\\b[^\\n]{0,120}?(?:${a})`,"i");(s.test(e)||c.test(e))&&o.push(i.label)}return o}function Mm(e,t){if(e.archetype==="hunt")return`Every target appears in the artefact: ${t.join(", ")}. A solution in the bundle can be read before anybody plays.`;if(e.archetype==="group")return`The page holds the grouping: ${t.join(", ")}. A player who reads it has the categories, which is the puzzle.`;let r=t.slice(0,5).join(", "),o=t.length>5?`, and ${t.length-5} more`:"";return`The page carries what each pick is worth: ${r}${o}. A game that is arithmetic is finished the moment the numbers ship, without a move being played.`}var Ka="button.pick, [data-pick]",gb="#submit, button[type=submit], .submit",yb="#submit:not([disabled]), button[type=submit]:not([disabled]), .submit:not([disabled])";async function d0(e,t,r){let o;try{o=await db()}catch(i){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:"Chrome could not start. Check GAMESTAGE_CHROME points to a working browser, then "+`run verify again. ${i instanceof Error?i.message:""}`.trim()}}if(o.status==="skipped")return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:o.detail};let n=o.browser;try{await n.addScriptToEvaluateOnNewDocument(`window.GAMESTAGE_API = ${JSON.stringify(t)};window.GAMESTAGE_GAME = ${JSON.stringify(r)};`),await n.navigate(e,2e4);let i=n.waitForResponse({urlIncludes:"/plays",method:"POST",timeout:15e3}).catch(()=>{});for(let h=0;h<3&&!((await n.query(Ka)).length>0);h++){let _=await n.query("[data-gamestage-start]:not([disabled])"),b;for(let P of _)if(await n.isVisible("[data-gamestage-start]:not([disabled])",P)){b=P;break}if(b===void 0)break;await n.click("[data-gamestage-start]:not([disabled])",b).catch(()=>{}),await n.waitForSelector(Ka,5e3).catch(()=>{})}let a=await n.query(Ka);if(a.length===0){let h=n.pageErrors[0],_=await n.query("#prompt").then(()=>n.html()).then(P=>/id="prompt"[^>]*>([^<]{0,160})/.exec(P)?.[1]?.trim()).catch(()=>{});return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Found nothing to pick. The page did not render a board from the round.${h?` The page threw: ${h}`:_?` The page says: ${_}`:""}`}}let s=0;for(let h of a)if(await n.click(Ka,h).catch(()=>{}),s+=1,(await n.query(yb)).length>0)break;let c=await n.query(gb);if(c.length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"No way to submit a play was found on the page."};if((await n.query(yb)).length===0)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`Selected ${s} of ${a.length} on the board and the page never allowed a play: Submit stayed disabled throughout. The page decides when a guess is complete, so either it needs a combination this cannot reach by picking in order, or it is not enabling Submit when it should.`};await n.click(gb,c[0]);let l=await i;if(!l)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:"The page was played and never asked the Engine. Whatever it showed, it decided for itself."};let p=await l.json();if(n.pageErrors.length)return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:`The page threw: ${n.pageErrors[0]}`};let d=await n.html(),m=p.round_state?.score,f=m===void 0||d.includes(String(m))||d.includes(m.toLocaleString("en-US"));return{id:"rendered-outcome",what:"the screen shows what the server decided",status:f?"verified":"open",detail:f?`The play went to the Engine and came back ${p.outcome}.`:`The Engine committed a score of ${m} and the page does not show it.`}}catch(i){return{id:"rendered-outcome",what:"the screen shows what the server decided",status:"open",detail:i instanceof Error?i.message:"The page could not be played."}}finally{await n.close().catch(()=>{})}}var p0=[".git","node_modules",".next",".nuxt",".svelte-kit","dist","build"];function m0(e){let t=e.split("/").slice(0,-1),r=t.findIndex(o=>p0.includes(o));return r===-1?void 0:t.slice(0,r+1).join("/")}var f0=new Set([".envrc",".netrc",".npmrc",".pgpass","id_rsa","id_ed25519","credentials","secrets","env.local"]);function h0(e){let t=(e.split("/").pop()??e).toLowerCase();return t===".env"||t.startsWith(".env.")||f0.has(t)||/^(credentials|secrets)\.(json|ya?ml|ini|toml|txt|env)$/.test(t)||/\.(pem|key|p12|pfx|keystore|jks)$/.test(t)}function vb(e){let t=e.split("/").pop()??e;return t.endsWith("~")||t===".DS_Store"||/\.(bak|orig|swp|swo|rej|old)$/.test(t)||/\.old\.[^.]+$/.test(t)}async function g0(e,t){let{files:r,skippedLinks:o}=zp(e,{symlinks:"skip"}),n=[],i=new Set,a=0;for(let s of o)n.push({path:s,why:"a symlink, which a deploy would refuse to publish",fatal:!1});for(let s of r){let c=m0(s.relativePath);if(c){i.has(c)||(i.add(c),n.push({path:`${c}/`,why:"a build or history directory; `deploy --dir` would upload it whole",fatal:!1}));continue}if(h0(s.relativePath)){n.push({path:s.relativePath,why:"environment or credential shaped",fatal:!0});continue}let l=await Lp(s.path);if(l===void 0)continue;a+=1;let p=_e(l);if(p.ok&&p.manifest.backend.round){n.push({path:s.relativePath,why:"an App Manifest, which carries the round's private half",fatal:!0});continue}let d=zm(l,t);if(d.length){n.push({path:s.relativePath,why:Mm(t,d),fatal:!0});continue}let m;try{let f=JSON.parse(l);f&&Array.isArray(f.sourcesContent)&&(m=f)}catch{}if(m){let f=m.sourcesContent.filter(_=>typeof _=="string").join(`
7190
+ `),h=f?zm(f,t):[];if(h.length){n.push({path:s.relativePath,why:`${Mm(t,h)} It is inside the map's own copy of your sources.`,fatal:!0});continue}n.push({path:s.relativePath,why:"a source map, which publishes your sources",fatal:!1});continue}vb(s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1})}for(let s of r)vb(s.relativePath)&&!n.some(c=>c.path===s.relativePath)&&n.push({path:s.relativePath,why:"an editor or merge leftover",fatal:!1});return{files:r,read:a,findings:n}}async function _b(e){let t=e.manifest??"gamestage.yaml",r;try{let D=_e(await Dm(t,"utf8"));if(!D.ok)return C(`${t} is not a valid App Manifest.`,D.issues.map(Be=>`${S.cyan(Be.path)} ${Be.message}`));r=D.manifest}catch{return C(`Cannot read ${t}.`,["Run `gamestage inspect .` or `gamestage create` first."])}let o=r.backend.round??c0(r.backend.archetype),n=r.backend.round?{source:"manifest",archetype:o.archetype,detail:"The Engine used this game's own backend.round from the manifest."}:{source:"stand-in",archetype:o.archetype,detail:`The manifest carries no round, so the Engine used a representative ${o.archetype} stand-in supplied by Gamestage. It did not test the game's production content from Studio.`};if(!Zt.includes(o.archetype))return C(`No Engine here serves the ${o.archetype} archetype yet.`,[`Built so far: ${Zt.join(", ")}.`]);let i=Lm(e.file??"index.html"),a;try{a=await Dm(i,"utf8")}catch{return C(`Cannot read ${e.file??"index.html"}.`)}let s=[],c=Lm(e.dir??hb(i)),l;try{l=await g0(c,o)}catch(D){return C(`Cannot read the publish set at ${e.dir??hb(i)}.`,[D instanceof Error?D.message:"The directory could not be walked."])}let p=l.findings.filter(D=>D.fatal),d=zm(a,o),m=d.length>0||p.length>0;s.push({id:"solution-absent",what:`the answers are not in what a deploy publishes (${l.files.length} file${l.files.length===1?"":"s"}, ${l.read} read)`,status:m?"open":"verified",detail:m?[d.length?Mm(o,d):void 0,...p.map(D=>`${D.path}: ${D.why}`)].filter(Boolean).join(" "):void 0});let f=await da(l.files),h=f.map(D=>D.text).join(`
7191
+ `),_=aa(h),b=l0(r,o.archetype,_).filter(([,D])=>!Tp(h,D)).map(([D])=>D);s.push({id:"settings-read",what:"every producer setting the page offers is read by the game"+(_.length?`, and it offers ${_.length} more for controls it has (${_.join(", ")})`:""),status:b.length?"open":"verified",detail:b.length?`The page does not read: ${b.join(", ")}. Apply each setting from game.presentation before deploying.`:void 0});let P=Ba(f),ne=l.files.some(D=>{let Be=D.relativePath.split("/").pop();return Be===ke||Be===we})||a.includes(ke)||a.includes(we),G=a.includes("createPlayerClient")||/\bstart\s*\(/.test(a);s.push({id:"client-present",what:"the client the page imports is there",status:ne||!G?"verified":"open",detail:G&&!ne?"The page uses a Gamestage client but does not import the one we ship. Run `gamestage client`.":void 0});let N=await Ga({game:r.app.id,round:o,title:r.app.title});await new Promise(D=>N.listen(0,"127.0.0.1",()=>D()));let Y=N.address(),Et=Y&&typeof Y!="string"?`http://127.0.0.1:${Y.port}`:"",it=await import("node:http").then(({createServer:D})=>D(async(Be,Ha)=>{let Gm=(Be.url??"/").split("?")[0],Zm=Gm==="/"?i:Lm(i,"..",Gm.slice(1));try{let Gb=await Dm(Zm);Ha.writeHead(200,{"content-type":Zm.endsWith(".js")?"text/javascript":"text/html"}),Ha.end(Gb)}catch{Ha.writeHead(404).end()}}));await new Promise(D=>it.listen(0,"127.0.0.1",()=>D()));let Kt=it.address(),tr=Kt&&typeof Kt!="string"?`http://127.0.0.1:${Kt.port}/`:"";try{s.push(e.noBrowser?{id:"rendered-outcome",what:"the screen shows what the server decided",status:"skipped",detail:"Asked not to open a browser."}:await d0(tr,Et,r.app.id))}finally{N.close(),it.close()}let q=u0(s),Vt=l.findings.filter(D=>!D.fatal);if(R()){j({ok:q.outcome==="verified",outcome:q.outcome,exitCode:q.exitCode,checks:s,open:q.open,skipped:q.skipped,round:n,copy_candidates:P,publish_set:{directory:c,files:l.files.map(D=>D.relativePath),read:l.read,warnings:Vt}}),q.exitCode!==0&&process.exit(q.exitCode);return}I(q.outcome==="verified"?"Verified":q.outcome==="failed"?"Verification failed":"Verification incomplete"),E("round used for verification",n.source),v(` ${S.dim(n.detail)}`);for(let D of s){let Be=D.status==="verified"?S.green("ok"):D.status==="open"?S.yellow("open"):S.dim("skipped");E(D.what,Be),D.detail&&v(` ${S.dim(D.detail)}`)}if(Vt.length){v(),v(S.dim(" Also in the publish set, and a deploy would upload it:"));for(let D of Vt)v(` ${S.dim("\xB7")} ${S.cyan(D.path)} ${S.dim(D.why)}`)}if(P.length){v(),v(S.dim(" Copy a producer may need to own:"));for(let D of P)v(` ${S.dim("\xB7")} ${S.cyan(`${D.file}:${D.line}`)} ${D.text} ${S.dim(`(${D.confidence}, ${D.level})`)}`)}v(),q.outcome==="verified"?A("The Engine decided the outcome and the page showed it. That is the migration done."):q.outcome==="failed"?A("A check remains open, so the game failed verification. Read the open check and fix its cause."):A("No check is open, but the game could not be fully proved here. Run the skipped check before treating it as verified."),v(),q.exitCode!==0&&process.exit(q.exitCode)}import{stat as y0}from"node:fs/promises";async function bb(){let e=[],[t]=process.versions.node.split(".").map(Number);e.push({id:"node",label:"Node.js",ok:t>=20,detail:t>=20?`v${process.versions.node}`:`v${process.versions.node} - Gamestage needs Node 20 or newer`,blocking:!0}),e.push({id:"schema",label:"Manifest schema",ok:!0,detail:`v${Hi} bundled`,blocking:!1});let r=!1;try{await y0("gamestage.yaml"),r=!0}catch{}e.push({id:"manifest",label:"App Manifest",ok:r,detail:r?"gamestage.yaml found":"none here yet \u2014 `gamestage inspect .` or `gamestage create` makes one",blocking:!1}),e.push({id:"auth",label:"Signed in",ok:!1,detail:"not signed in \u2014 only needed to deploy",blocking:!1});let o=e.filter(n=>!n.ok&&n.blocking);R()&&(j({ok:o.length===0,checks:e}),process.exit(o.length===0?0:1)),I("Environment");for(let n of e){let i=n.ok?S.green("ok"):n.blocking?S.red("blocked"):S.dim("--");v(` ${i.padEnd(18)} ${n.label.padEnd(16)} ${S.dim(n.detail)}`)}v(),o.length&&(v(` ${S.red("Fix the blocked items above before continuing.")}`),v(),process.exit(1)),v(` ${S.green("Ready.")}`),v()}import{readFile as O0,stat as N0,writeFile as R0}from"node:fs/promises";import{createHash as j0}from"node:crypto";import{basename as D0}from"node:path";import{readdir as v0,readFile as Va,stat as Um}from"node:fs/promises";import{basename as _0,extname as b0,join as Fm,relative as w0}from"node:path";var k0=new Set(["node_modules",".git","dist","build",".next",".wrangler","coverage"]),x0=new Set([".html",".htm",".js",".mjs",".cjs",".jsx",".ts",".tsx",".vue",".svelte"]);async function S0(e,t=200){let r=await Um(e),o=[];if(r.isFile())return o.push({path:e,relative:_0(e),text:await Va(e,"utf8")}),o;let n=async i=>{if(o.length>=t)return;let a=await v0(i,{withFileTypes:!0});for(let s of a){if(o.length>=t)return;if(s.name.startsWith(".")&&s.name!==".openai")continue;let c=Fm(i,s.name);if(s.isDirectory()){if(k0.has(s.name))continue;await n(c)}else if(x0.has(b0(s.name)))try{o.push({path:c,relative:w0(e,c),text:await Va(c,"utf8")})}catch{}}};return await n(e),o}function $0(e,t){let r=e.text.split(`
7192
+ `);for(let o=0;o<r.length;o++)if(t.test(r[o]))return{file:e.relative,line:o+1,excerpt:r[o].trim().slice(0,120)};return null}async function E0(e,t){if(!(await Um(e)).isFile())try{let o=JSON.parse(await Va(Fm(e,"package.json"),"utf8"));if(o.name)return o.name.replace(/^@[^/]+\//,"")}catch{}for(let o of t){if(!/\.html?$/.test(o.relative))continue;let n=/<h1[^>]*>([^<]+)<\/h1>/i.exec(o.text);if(n){let a=wb(n[1]);if(a)return a}let i=/<title[^>]*>([^<]+)<\/title>/i.exec(o.text);if(i){let a=wb(i[1].split(/\s+[|\u2013\u2014-]\s+/)[0]);if(a)return a}}return null}function wb(e){let t=e.replace(/\s+/g," ").trim();return/[a-z0-9]/i.test(t)?t.slice(0,60):null}var T0=[{id:"client-scoring",title:"Scoring runs in the browser",detail:"Score is computed client-side, so a player can edit it. Scoring must move into the Game Engine and the client must render a server-returned result.",patterns:[/\b\w*(score|points|total)\s*\+=/i,/\b\w*(score|points|total)\w*\s*=\s*\w*\s*[+*]/i,/function\s+\w*(calculate|compute|get)\w*(score|points|total|tier)/i],remedy:{delete:"the score arithmetic in the browser, and the answer set it marks against",call:"const result = await client.play(round.id, { picks, roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.score, and result.feedback[].verdict per pick. `round_state` is absent where a game marks at settlement, so read it optionally",move:"the answer set into `backend.round.targets` in gamestage.yaml, where a deploy provisions it into the Engine",keep:"every bit of the rendering, the animation and the copy",because:"a score the browser computes is a score a player can set"},remedies:{push:{delete:"the running total, the bust comparison and the tier table, and the dataset the values came from",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.total for the running total, .bust for whether they went over, and .tier for the rank. The value each pick contributed comes back in result.feedback[0].label",move:"what each pick is worth into `backend.round.slates[].entries[].value` in gamestage.yaml, and the ceiling into `backend.round.target`",keep:"every bit of the rendering, the animation and the copy",because:"a game whose whole mechanic is arithmetic is finished the moment its numbers reach the browser, whatever the page does afterwards"}}},{id:"client-outcome",title:"The result is decided in the browser",detail:"Win, loss or result tier is determined client-side, so the outcome cannot be trusted. The Engine must decide the outcome and return it as a committed decision.",patterns:[/\b(bust|win|won|lost|passed|failed)\s*=\s*\w+\s*[<>=]/i,/\bgetTier\s*\(|\bdetermine(Result|Outcome|Winner)/i],remedy:{delete:"the local decision about winning, losing or a result tier",call:"const result = await client.play(round.id, input, newIdempotencyKey())",render:"result.round_state?.outcome, which is won, lost, incomplete or pending",keep:"how the outcome is presented, including the celebration",because:"an outcome the page decides is one it can be persuaded to decide differently"},remedies:{push:{delete:"the bust comparison and the function that turns a distance into a rank",call:"const result = await client.play(round.id, { picks: [key], roundVersion: round.version }, newIdempotencyKey())",render:"result.round_state?.progress.bust and .tier, which are decided on commit: the total only grows, so passing the target ends the round then rather than at the last pick",move:"the rank ladder into `backend.round.tiers`, as fractions of the target",keep:"how the result is presented, including the celebration",because:"a rank the page awards is one it can award itself"}}},{id:"client-answers",title:"Answers or targets are present in client code",detail:"The solution set ships to the browser, so it can be read before play. Answers must be held server-side and never cross the wire.",patterns:[/\b(answer|solution|correct)(Key|Set|s)?\s*[:=]/i,/\bisCorrect\s*[:=(]/i,/\b\w*(target|answer|solution)\w*\s*=\s*[[{](?!.*(fetch|await|response))/i,/\b(target|answer|solution)s?\s*:\s*[^,}\n]/i],remedy:{delete:"the array or object holding the correct answers",call:"const round = await client.getCurrentRound()",render:"round.challenge for what the player picks from. The Engine returns the verdict; the page never knows the answer until the round reveals it",move:"the answers into `backend.round.targets` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to mark against",keep:"the board, the layout and the interaction",because:"a solution in the bundle can be read before anybody plays"},remedies:{push:{delete:"the dataset the contributions are looked up in",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates, which carry each pick's key and label and no value at all. What a pick was worth arrives as feedback once it has been committed",move:"the values into `backend.round.slates[].entries[].value` in gamestage.yaml. Deleting them without moving them leaves the Engine nothing to count",keep:"the board, the layout and the interaction",because:"knowing every contribution is knowing which picks land on the target, which is the whole game"}}},{id:"client-play-limit",title:"Play limiting relies on browser storage",detail:"Attempt limits enforced through localStorage or cookies reset when storage is cleared. Limits must be enforced against an identified player server-side.",patterns:[/localStorage\.(set|get)Item\s*\(\s*['"`][^'"`]*(play|attempt|tries|daily|limit)/i,/sessionStorage\.(set|get)Item/i],remedy:{delete:"the localStorage or cookie bookkeeping that counts attempts",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed, and the same pair for mistakes",move:"the limits into `backend.round.attemptsAllowed` and `mistakesAllowed`",keep:"how the remaining attempts are shown",because:"a limit in storage is a limit that clearing storage removes"},remedies:{push:{delete:"the localStorage bookkeeping that remembers today's game",call:"const state = await client.getRoundState(round.id)",render:"state.attempts_used against state.attempts_allowed for picks taken, and state.finished for whether today is done",move:"the number of picks into `backend.round.slates`: one slate is one pick",keep:"how the remaining picks are shown",because:"a game that remembers in the browser is one a cleared browser lets you play again"}}},{id:"client-randomness",title:"The daily challenge is chosen in the browser",detail:"Client-side randomness means players can reroll until they like the challenge, and no two players share a verifiable daily. Selection must be server-issued.",patterns:[/Math\.random\s*\(\)/,/\b(daily|today|challenge)\w*\s*=\s*.*Math\.random/i],remedy:{delete:"the Math.random() that chooses the challenge",call:"const round = await client.getCurrentRound()",render:"round.challenge, which is the same for everyone playing that round",keep:"randomness that is only decoration, such as confetti or shuffling how options are laid out",because:"a challenge the browser picks is one a player can reroll, and no two players share a daily worth comparing"},remedies:{push:{delete:"the Math.random() that chooses which team and season comes up",call:"const round = await client.getCurrentRound()",render:"round.challenge.slates in order: slate n is pick n. Keep the spin as an animation over a choice the round has already made",move:"the sequence into `backend.round.slates`, one per pick",keep:"the spin, the reveal and every bit of its timing",because:"a slate the browser draws is one a player can redraw, and it means no two players played the same day"}}},{id:"client-time",title:"Round timing uses client time",detail:"Device clocks can be changed. Open, lock and settle decisions must use authoritative server time.",patterns:[/new Date\(\)\.getTime\(\)/,/Date\.now\(\)\s*[<>]/],remedy:{delete:"the comparisons against Date.now() that decide whether the round is open",call:"const round = await client.getCurrentRound()",render:"round.can.accepting_plays, and round.server_time where a countdown needs an origin",keep:"the countdown itself, driven from the server's time rather than the device's",because:"a device clock is something a player can change"}}],A0=[{id:"sdk",title:"Monterosa JavaScript SDK 2",detail:"No SDK integration found. The SDK provides the EnMasse connection, live config and content updates, identity, consent, storage and experience hosting.",present:/@monterosa\/sdk-|sdk\.monterosa\.cloud/i},{id:"identity",title:"Player sign-in",detail:"No player identity found. Anonymous play is supported and the Engine's signed session carries it. To identify players, name your own issuer and its JWKS in `identity.jwt` and the Engine validates the token your login system already gives them.",present:/identify-kit|monterosa.*identity|\bIdentify\b|jwks|oidc|auth0|workos|firebase.*auth/i},{id:"consent",title:"Consent gating",detail:"No consent handling found. Analytics and storage must respect the player's consent choices.",present:/consent-kit|consent/i},{id:"analytics",title:"Analytics",detail:"No analytics found. Gamestage routes events to the destinations declared in the manifest, with Monterosa Analytics on by default.",present:/analytics-kit|gtag\(|posthog|analytics\.track/i}],I0=[{archetype:"hunt",signals:[{pattern:/\b(answer|solution|correct)(s|Set|Key)?\s*[:=]/i,because:"marks picks against a known answer set"},{pattern:/\bisCorrect\b|\bverdict\b/i,because:"judges a pick right or wrong"},{pattern:/\bpick(s|ed)?\b/i,because:"players make picks"},{pattern:/\broster|\bplayer(s)?\s*\[/i,because:"selects from a roster"}]},{archetype:"push",signals:[{pattern:/\b\w*(total|sum|running)\w*\s*\+=/i,because:"accumulates a running total from each pick"},{pattern:/\bbust\b/i,because:"has a bust condition for going over"},{pattern:/\b\w*total\w*\s*[><]=?\s*\w*target|\btarget\w*\s*-\s*\w*total/i,because:"compares the total against a target"},{pattern:/\bgetTier\b|\bwithout going over\b|\bclosest\b/i,because:"scores by how close the total came"}]},{archetype:"trivia",signals:[{pattern:/\bquestion\b/i,because:"presents questions"},{pattern:/\bchoice(s)?\b|\boption(s)?\b/i,because:"offers answer choices"},{pattern:/\bquiz\b/i,because:"describes itself as a quiz"}]},{archetype:"forecast",signals:[{pattern:/\bpredict/i,because:"asks players to predict"},{pattern:/\bmarket\b|\bodds\b/i,because:"has market or odds language"},{pattern:/\bsettle(d|ment)?\b/i,because:"settles outcomes"}]},{archetype:"group",signals:[{pattern:/\bpuzzle\b/i,because:"describes itself as a puzzle"},{pattern:/\bguess(es)?\b/i,because:"players guess"},{pattern:/\bstreak\b/i,because:"tracks streaks"}]},{archetype:"timed_round",signals:[{pattern:/\bcountdown\b|\btimer\b/i,because:"runs a countdown"},{pattern:/\bround\b/i,because:"is organised into rounds"}]}];function C0(e){let t=e.map(s=>s.text).join(`
7193
+ `),r=I0.map(s=>{let c=s.signals.filter(l=>l.pattern.test(t)).map(l=>l.because);return{archetype:s.archetype,hits:c.length,because:c}}).filter(s=>s.hits>0).sort((s,c)=>c.hits-s.hits),o=r[0];if(!o)return null;let n=r[1]?.hits??0,i=o.hits-n,a=o.hits>=3&&i>=2?"high":o.hits>=2?"medium":"low";return{archetype:o.archetype,confidence:a,because:o.because}}async function P0(e,t){let o=(await Um(e)).isFile()?null:e;if(o)try{let i=await Va(Fm(o,"package.json"),"utf8"),a=JSON.parse(i),s={...a.dependencies,...a.devDependencies},c=s.next?"Next.js":s.react?"React":s.vue?"Vue":s.svelte?"Svelte":void 0,l=s.vite?"Vite":s.webpack?"webpack":void 0;return{kind:"node_project",framework:c,build:l}}catch{}return t.length===1&&/\.html?$/.test(t[0].relative)||t.every(i=>/\.html?$/.test(i.relative))?{kind:"standalone_html"}:{kind:"unknown"}}async function kb(e){let t=await S0(e);if(t.length===0)throw new Error(`No inspectable source found at ${e}. Point inspect at a game file or a project directory.`);let r=await P0(e,t),o=C0(t),n=[];for(let d of T0){let m=[];for(let f of t){for(let h of d.patterns){let _=$0(f,h);if(_){m.push(_);break}}if(m.length>=3)break}if(m.length>0){let f=o?d.remedies?.[o.archetype]??d.remedy:d.remedy;n.push({...f?{remedy:f}:{},id:d.id,title:d.title,detail:d.detail,evidence:m})}}let i=t.map(d=>d.text).join(`
7194
+ `),a=A0.filter(d=>!d.present.test(i)).map(d=>({id:d.id,title:d.title,detail:d.detail,evidence:[]})),s=[];t.some(d=>/<(div|section|main|canvas)/i.test(d.text))&&s.push({id:"presentation",title:"Player-facing presentation",detail:"Layout, styling and interaction feel can stay creator-owned. Gamestage replaces the authority beneath the interface, not the interface itself.",evidence:t.slice(0,2).map(d=>({file:d.relative}))});let l=Ba(t),p=[];return r.kind==="standalone_html"&&p.push("Where is this deployed today, and who owns that hosting?"),p.push("Which of the embedded datasets are licensed for production use, and at what refresh cadence?"),n.some(d=>d.id==="client-play-limit")&&p.push("Is the play limit per device or per person? That decides whether identity is required at launch."),{target:e,scanned_files:t.length,stack:r,keep:s,move_behind_authority:n,missing_integrations:a,copy_to_studio:l,unknowns:p,archetype:o,name:await E0(e,t)}}var L0=e=>D0(e).replace(/\.[^.]+$/,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"inspected-game",z0=e=>e.split("-").filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" ");function M0(e,t){let r=L0(e.name??e.target),o=t&&Rv(t)?t:ca(r),n=e.name??z0(r),i=na(o,n);return i.manifest.conformance="L0",i.app.status="proposed",i.app.provenance=[{kind:"repository_evidence",file:e.target},{kind:"generated_proposal",tool:"gamestage inspect",source_context:`${e.scanned_files} file(s) inspected`}],i.experience.status="proposed",i.experience.surfaces=["web-embed"],i.experience.provenance=[{kind:"repository_evidence",file:e.target}],e.archetype&&(i.backend.status="proposed",i.backend.route="managed_runtime",i.backend.archetype=e.archetype.archetype,i.backend.provenance=[{kind:"generated_proposal",tool:"gamestage inspect",source_context:e.archetype.because.join("; ")}]),e.move_behind_authority.some(s=>s.id==="client-play-limit"||s.id==="client-scoring")&&(i.identity.status="proposed",i.identity.provider="identify",i.identity.require_authenticated_writes=!0),zt.parse(i)}async function U0(e,t){let r=await $e();if(!r)return!1;Bn();let o=e.backend.archetype;return o?(await Fn({baseUrl:se,token:r.accessToken}).registerGame({id:e.app.id,name:e.app.title,archetype:o,repository:e.app.source?.repository??null,manifestRevision:String(e.manifest.revision),contentHash:`sha256:${j0("sha256").update(t).digest("hex")}`,conformance:Re(e).computed,offersPrize:e.operations.promotion.offers_prize,containerLabel:e.experience.container_label,sections:jn.map(i=>({section:i,status:e[i].status}))}),!0):!1}async function F0(e){try{let t=_e(await O0(e,"utf8"));return t.ok?t.manifest.app.id:void 0}catch{return}}async function G0(e){try{return await N0(e),!0}catch{return!1}}async function xb(e,t){let r;try{r=await kb(e)}catch(l){return C(l instanceof Error?l.message:"Inspection failed")}let o=M0(r,await F0(typeof t.write=="string"?t.write:"gamestage.yaml")),n=Re(o),i=ta(o),a=!1,s;try{a=await U0(o,i)}catch(l){s=l instanceof Error?l.message:"The control plane did not answer."}let c=null;if(t.write){if(c=typeof t.write=="string"?t.write:"gamestage.yaml",!t.force&&await G0(c))return C(`${c} already exists, and inspect would replace it.`,["A manifest that has been worked on holds a round; this report cannot,","because a round is not visible in the code it read.","",`${S.cyan(`gamestage manifest validate ${c}`)} check what you have`,`${S.cyan("gamestage inspect . --force")} replace it anyway`]);await R0(c,i,"utf8")}if(R()){j({ok:!0,report:r,manifest:o,conformance:{computed:n.computed,blockers:n.blockers},manifest_yaml:i,written_to:c,registered:a,...s?{registration_failed:s}:{}});return}if(I(`Inspection report ${S.dim(r.target)}`),E("Files inspected",String(r.scanned_files)),E("Stack",r.stack.framework?`${r.stack.kind} (${r.stack.framework})`:r.stack.kind),r.archetype&&E("Archetype",`${r.archetype.archetype} ${S.dim(`(${r.archetype.confidence} confidence)`)}`),r.keep.length){I("Keep as yours");for(let l of r.keep)A(S.green(l.title)),v(` ${S.dim(l.detail)}`)}if(r.move_behind_authority.length){I("Must move behind an authoritative boundary");for(let l of r.move_behind_authority){A(S.yellow(l.title)),v(` ${S.dim(l.detail)}`);for(let p of l.evidence.slice(0,2)){let d=p.line?`${p.file}:${p.line}`:p.file;v(` ${S.dim("\u2192")} ${S.cyan(d)}${p.excerpt?S.dim(" "+p.excerpt):""}`)}l.remedy&&(v(` ${S.dim("delete")} ${l.remedy.delete}`),v(` ${S.dim("call")} ${S.cyan(l.remedy.call)}`),l.remedy.render&&v(` ${S.dim("render")} ${l.remedy.render}`),l.remedy.move&&v(` ${S.dim("move")} ${l.remedy.move}`),v(` ${S.dim("keep")} ${l.remedy.keep}`))}}if(r.missing_integrations.length){I("Platform integrations not present yet");for(let l of r.missing_integrations)A(l.title),v(` ${S.dim(l.detail)}`)}if(r.unknowns.length){I("Needs a human answer");for(let l of r.unknowns)A(l,"?")}if(I("App Manifest"),E("Conformance",`${n.computed} ${n.computedName}`),n.blockers.length){v(),v(S.dim(" To reach the next level:"));for(let l of n.blockers)v(` ${S.dim("\xB7")} ${l.requirement}`)}v(),c?v(` Written to ${S.cyan(c)}`):v(S.dim(" Re-run with --write to save this manifest.")),v(a?" Registered in Studio as a draft.":s?` Not registered in Studio: ${s} (${se})`:" No account found, so registration was skipped."),v()}var Sb="https://github.com",Z0="https://api.github.com",Wa=process.env.GAMESTAGE_GITHUB_CLIENT_ID??"Ov23livKf8DOgOm2a383";async function $b(){let e=await fetch(`${Sb}/login/device/code`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Wa,scope:""})});if(!e.ok)throw new Error(`GitHub refused the device request (${e.status}).`);return await e.json()}async function Eb(e){let r=await(await fetch(`${Sb}/login/oauth/access_token`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Wa,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})})).json();if(r.access_token)return{status:"linked",login:await B0(r.access_token)};switch(r.error){case"authorization_pending":return{status:"pending"};case"slow_down":return{status:"slow_down",interval:r.interval??10};case"expired_token":return{status:"expired"};case"access_denied":return{status:"denied"};default:throw new Error(`GitHub returned an unexpected error (${r.error}).`)}}async function B0(e){let t=await fetch(`${Z0}/user`,{headers:{accept:"application/vnd.github+json",authorization:`Bearer ${e}`,"user-agent":"gamestage-cli"}});if(!t.ok)throw new Error(`GitHub would not identify the account (${t.status}).`);let r=await t.json();if(!r.login)throw new Error("GitHub returned an account with no login.");return r.login}var K0=e=>new Promise(t=>setTimeout(t,e));async function Tb(){let{client:e}=await be();try{let t=await $b();R()?j({ok:!0,status:"awaiting_authorisation",userCode:t.user_code,verificationUri:t.verification_uri,clientId:Wa}):(I("Link GitHub"),E("Code",t.user_code),E("Open",t.verification_uri),v(),A("Enter the code on that page. This waits until you do."),v());let r=Date.now()+t.expires_in*1e3,o=Math.max(t.interval,5);for(;Date.now()<r;){await K0(o*1e3);let n=await Eb(t.device_code);if(n.status==="pending")continue;if(n.status==="slow_down"){o=n.interval;continue}if(n.status==="denied")return C("You declined the request on GitHub.");if(n.status==="expired")return C("The code expired. Run `gamestage link github` again.");let{workspace:i}=await e.linkGitHub(n.login);if(R())return j({ok:!0,status:"linked",github:i.github});I("Linked"),E("Account",n.login),v(),A("Your first deploy is no longer gated. Run `gamestage deploy`."),v();return}C("The code expired before it was entered.")}catch(t){Ee(t)}}var V0=e=>new Promise(t=>setTimeout(t,e));function W0(e){process.stderr.write(JSON.stringify({ok:!0,status:"awaiting_approval",user_code:e.user_code,verification_uri:e.verification_uri,verification_uri_complete:e.verification_uri_complete,expires_in:e.expires_in},null,2)+`
7195
+ `)}async function Ab(e,t){let{client:r}=await be(),o=Kr(await la(r));if(R()){j({ok:o.ok,status:o.status,access:o.access,...o.code?{code:o.code}:{},message:o.message,next:o.next,email:e.email,...t?{stored_in:t}:{},control_plane:se}),o.ok||process.exit(1);return}v(),I("Signed in"),E("Account",e.email??e.userId??"unknown"),t&&E("Token stored in",t==="keychain"?"your macOS keychain":"~/.gamestage (owner only)"),v(),A("Never written into the project, and never passed to your agent."),A("`gamestage logout` removes it."),Kn(o),o.ok||process.exit(1)}async function Ib(){let e=await $e();if(e){await Ab(e);return}let t;try{t=await Iv()}catch(a){C("Could not reach the sign-in service.",[String(a)])}R()?W0(t):(I("Sign in to Gamestage"),v(" This also creates your account if you do not have one. Google or email."),v(" A new account is approved by a person, so this may end in a wait."),v(),E("Open",t.verification_uri_complete),E("Or enter",`${t.user_code} at ${t.verification_uri}`),v(),v(" Waiting for you to confirm in the browser..."),Pv(t.verification_uri_complete));let r=Date.now()+t.expires_in*1e3,o=t.interval*1e3,n=null;for(;Date.now()<r;){await V0(o);let a=await Cv(t.device_code);if(a.status==="ok"){n=a.session;break}if(a.status==="slow_down"){o+=5e3;continue}a.status!=="pending"&&(a.status==="expired"&&C("That code expired.",["Run `gamestage login` again."]),C("Sign-in was refused.",[a.reason]))}n||C("Timed out waiting for approval.",["Run `gamestage login` again."]);let i=await Rp(n);await Ab(n,i)}async function Cb(){let e=await $e();if(await Nv(),R()){j({ok:!0,status:e?"signed_out":"not_signed_in"});return}I(e?"Signed out":"Not signed in"),e&&E("Removed",e.email??"session"),v()}async function Pb(){let e=await $e();if(R()){j(e?{ok:!0,signed_in:!0,email:e.email,user_id:e.userId}:{ok:!0,signed_in:!1});return}if(!e){I("Not signed in"),v(),A("Inspecting, scaffolding and local rounds need no account."),A("Run `gamestage login` when you want to deploy a playground."),v();return}I("Signed in"),E("Account",e.email??"unknown"),e.userId&&E("User",e.userId),v(),A("`gamestage status` says whether this account is approved."),v()}import{readdir as H0,readFile as J0,stat as Y0}from"node:fs/promises";async function q0(e){let t=[];try{t=await H0(e)}catch{}let r=t.filter(a=>!a.startsWith(".")),o=[];for(let a of r)/\.html?$/.test(a)&&o.push(a);let n=!1,i;for(let a of["gamestage.yaml","gamestage.yml"])try{await Y0(`${e}/${a}`),n=!0;try{let s=_e(await J0(`${e}/${a}`,"utf8"));s.ok&&(i=!!s.manifest.backend.round)}catch{}break}catch{}return{has_manifest:n,has_package_json:r.includes("package.json"),html_files:o,is_empty:r.length===0,has_round:i}}async function Ob(){let e=process.cwd(),t=await q0(e),r=t.has_manifest?t.has_round===!1?"round":t.has_round===!0?"play":"continue":t.has_package_json||t.html_files.length>0?"inspect":"create",o={continue:{command:Ie("manifest validate gamestage.yaml"),why:"This project already has an App Manifest. Check where it stands."},round:{command:"edit gamestage.yaml, add backend.round",why:`The manifest names an archetype but no round, so there is no game for the Engine to serve yet. The round is the content the server owns: the board a player sees and the answers they never do. Until it is there, \`${Ie("dev")}\` serves the contract fixture rather than your game, and \`${Ie("verify")}\` has nothing to verify.`},play:{command:Ie("dev"),why:"The manifest declares a round. Serve it locally, through the real Engine."},inspect:{command:Ie("inspect ."),why:"There is a game here already. Read it read-only and produce an inspection report."},create:{command:Ie("create"),why:"Nothing to inspect. Start a new game from a concept."}};if(R()){j({ok:!0,cwd:e,version:Qe,detected:t,route:r,next:o[r],docs:{start:"https://gamestage.ai/start.md",schema:"https://gamestage.ai/schemas/app-manifest/1.0"},invocation:Xa(),authentication:`Not required for inspect, create, validate or local development. First needed at \`${Ie("deploy")}\`.`});return}if(I(`Gamestage ${Qe}`),v(S.dim(" Take an agent-built game to production, on the platform behind the")),v(S.dim(" world's biggest fan experiences.")),I("Where you are"),t.has_manifest&&t.has_round===!1)v(" An App Manifest is present, and it declares no round.");else if(t.has_manifest&&t.has_round===!0)v(" An App Manifest is present, with a round the Engine can serve.");else if(t.has_manifest)v(" An App Manifest is already present.");else if(t.has_package_json||t.html_files.length){let n=[t.has_package_json?"a Node project":null,t.html_files.length?`${t.html_files.length} HTML file(s)`:null].filter(Boolean);v(` Found ${n.join(" and ")}. This looks like a game to inspect.`)}else v(" Nothing here yet. This looks like a fresh start.");I("Do this next"),v(` ${S.cyan(o[r].command)}`),v(` ${S.dim(o[r].why)}`),I("Good to know"),v(S.dim(` Nothing needs an account yet. Inspect, create, validate and local
7188
7196
  development all run anonymously. Sign-in arrives when you deploy,
7189
- which is what puts the game at a URL a fan can open.`)),v()}var Xn=class extends Error{};function xb(e){let t=e.what.trim();if(!t)throw new Xn("Say what you were trying to build.");if(t.length>2e3)throw new Xn(`That is ${t.length} characters and the limit is 2000. Send the shape of the problem; we will ask for the rest.`);let r=(e.closest??"").trim();return{kind:"suggestion",what:t,closest:r||"none",cli_version:e.cliVersion}}function Sb(e){return JSON.stringify(e,null,2)}var j0=process.env.GAMESTAGE_SUGGEST_URL??"https://gamestage.ai/api/suggest";async function $b(e,t,r){let o;try{o=xb({what:e,closest:t.closest,cliVersion:r})}catch(a){throw a instanceof Xn&&P(a.message),a}if(!t.send){if(R()){z({sent:!1,would_send:o});return}I("This is everything that would be sent"),v(),v(Sb(o)),v(),A("No manifest, no round, no answers and no source. There is nowhere in that shape to put one."),A(`Send it with ${je('suggest "..." --send')}.`);return}let n;try{n=await fetch(j0,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)})}catch(a){P("Could not reach Gamestage to send that.",[a instanceof Error?a.message:String(a)])}let i=await n.json().catch(()=>({}));if(n.ok||P(`Gamestage refused that suggestion (${n.status}).`,[i.error?.message??"It said nothing more."]),R()){z({sent:!0,reference:i.reference??null});return}I("Sent"),i.reference&&A(`Reference ${i.reference}. Quote it if you follow up.`),A("Somebody at Monterosa reads these. A format that keeps arriving gets built.")}import{readFile as D0}from"node:fs/promises";async function Eb(e,t){let r;try{r=await D0(e,"utf8")}catch{return P(`Cannot read ${e}`)}let o=_e(r);if(!o.ok)return R()&&(z({ok:!1,stage:"parse",issues:o.issues}),process.exit(1)),P(`${e} is not a valid App Manifest`,o.issues.map(l=>`${S.cyan(l.path)} ${l.message}`));let n=o.manifest,i=Oe(n),a=null;if(t.level){let l=yt.safeParse(t.level.toUpperCase());if(!l.success)return P(`Unknown level "${t.level}". Use L0 through L5.`);a=l.data}let s=a?ey(n,a):null,c=!i.overclaimed&&(s?.ok??!0);if(R()&&(z({ok:c,manifest_id:n.app.id,conformance:{claimed:i.claimed,computed:i.computed,overclaimed:i.overclaimed},required_level:a,missing:s?.missing??[],blockers:i.blockers,rules:i.results}),process.exit(c?0:1)),I(`${n.app.title} ${S.dim(n.app.id)}`),T("Schema",n.manifest.schema_version),T("Revision",String(n.manifest.revision)),T("Conformance",i.overclaimed?`${S.red(i.claimed)} claimed, ${S.bold(i.computed)} evidenced`:`${S.green(i.computed)} ${i.computedName}`),i.overclaimed){I("Overclaimed"),v(S.dim(" The manifest claims a level its evidence does not support. Lower the claim or supply the evidence."));for(let l of i.blockers)A(S.red(l.requirement))}if(a&&s&&!s.ok){I(`Not yet ${a}`);for(let l of s.missing)A(`${S.yellow(l.id)} ${l.requirement}`)}if(c&&(v(),v(` ${S.green("Valid")}${a?` at ${a}`:""}.`),i.blockers.length)){v(),v(S.dim(" Next level needs:"));for(let l of i.blockers)v(` ${S.dim("\xB7")} ${l.requirement}`)}v(),process.exit(c?0:1)}var zm="0.9.0";for(let e of[process.stdout,process.stderr])e.on("error",t=>{throw t.code==="EPIPE"&&process.exit(0),t});var W=new Wt;W.name("gamestage").description(`Take an agent-built game prototype to a production fan game.
7197
+ which is what puts the game at a URL a fan can open.`)),v()}var Qn=class extends Error{};function Nb(e){let t=e.what.trim();if(!t)throw new Qn("Say what you were trying to build.");if(t.length>2e3)throw new Qn(`That is ${t.length} characters and the limit is 2000. Send the shape of the problem; we will ask for the rest.`);let r=(e.closest??"").trim();return{kind:"suggestion",what:t,closest:r||"none",cli_version:e.cliVersion}}function Rb(e){return JSON.stringify(e,null,2)}var X0=process.env.GAMESTAGE_SUGGEST_URL??"https://gamestage.ai/api/suggest";async function jb(e,t,r){let o;try{o=Nb({what:e,closest:t.closest,cliVersion:r})}catch(a){throw a instanceof Qn&&C(a.message),a}if(!t.send){if(R()){j({sent:!1,would_send:o});return}I("This is everything that would be sent"),v(),v(Rb(o)),v(),A("No manifest, no round, no answers and no source. There is nowhere in that shape to put one."),A(`Send it with ${Ie('suggest "..." --send')}.`);return}let n;try{n=await fetch(X0,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)})}catch(a){C("Could not reach Gamestage to send that.",[a instanceof Error?a.message:String(a)])}let i=await n.json().catch(()=>({}));if(n.ok||C(`Gamestage refused that suggestion (${n.status}).`,[i.error?.message??"It said nothing more."]),R()){j({sent:!0,reference:i.reference??null});return}I("Sent"),i.reference&&A(`Reference ${i.reference}. Quote it if you follow up.`),A("Somebody at Monterosa reads these. A format that keeps arriving gets built.")}var er=class extends Error{};function Db(e){let t=e.what.trim();if(!t)throw new er("Say what went wrong.");if(t.length>2e3)throw new er(`That is ${t.length} characters and the limit is 2000. Send what broke and how to hit it; we will ask for the rest.`);let r=(e.game??"").trim();return{kind:"issue",what:t,game:r||"none",cli_version:e.cliVersion,node_version:e.nodeVersion,platform:e.platform}}function Lb(e){return JSON.stringify(e,null,2)}var Q0=process.env.GAMESTAGE_ISSUE_URL??"https://gamestage.ai/api/issue";async function zb(e,t,r){let o;try{o=Db({what:e,game:t.game,cliVersion:r,nodeVersion:process.version,platform:process.platform})}catch(a){throw a instanceof er&&C(a.message),a}if(!t.send){if(R()){j({sent:!1,would_send:o});return}I("This is everything that would be sent"),v(),v(Lb(o)),v(),A("No manifest, no round, no answers and no source. There is nowhere in that shape to put one."),A(`Send it with ${Ie('issue "..." --send')}.`);return}let n;try{n=await fetch(Q0,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)})}catch(a){C("Could not reach Gamestage to send that.",[a instanceof Error?a.message:String(a)])}let i=await n.json().catch(()=>({}));if(n.ok||C(`Gamestage refused that report (${n.status}).`,[i.error?.message??"It said nothing more."]),R()){j({sent:!0,reference:i.reference??null});return}I("Reported"),i.reference&&A(`Reference ${i.reference}. Quote it if you follow up.`),A("It is in the backlog now. Somebody at Monterosa reads these.")}import{readFile as eC}from"node:fs/promises";async function Mb(e,t){let r;try{r=await eC(e,"utf8")}catch{return C(`Cannot read ${e}`)}let o=_e(r);if(!o.ok)return R()&&(j({ok:!1,stage:"parse",issues:o.issues}),process.exit(1)),C(`${e} is not a valid App Manifest`,o.issues.map(l=>`${S.cyan(l.path)} ${l.message}`));let n=o.manifest,i=Re(n),a=null;if(t.level){let l=yt.safeParse(t.level.toUpperCase());if(!l.success)return C(`Unknown level "${t.level}". Use L0 through L5.`);a=l.data}let s=a?ry(n,a):null,c=!i.overclaimed&&(s?.ok??!0);if(R()&&(j({ok:c,manifest_id:n.app.id,conformance:{claimed:i.claimed,computed:i.computed,overclaimed:i.overclaimed},required_level:a,missing:s?.missing??[],blockers:i.blockers,rules:i.results}),process.exit(c?0:1)),I(`${n.app.title} ${S.dim(n.app.id)}`),E("Schema",n.manifest.schema_version),E("Revision",String(n.manifest.revision)),E("Conformance",i.overclaimed?`${S.red(i.claimed)} claimed, ${S.bold(i.computed)} evidenced`:`${S.green(i.computed)} ${i.computedName}`),i.overclaimed){I("Overclaimed"),v(S.dim(" The manifest claims a level its evidence does not support. Lower the claim or supply the evidence."));for(let l of i.blockers)A(S.red(l.requirement))}if(a&&s&&!s.ok){I(`Not yet ${a}`);for(let l of s.missing)A(`${S.yellow(l.id)} ${l.requirement}`)}if(c&&(v(),v(` ${S.green("Valid")}${a?` at ${a}`:""}.`),i.blockers.length)){v(),v(S.dim(" Next level needs:"));for(let l of i.blockers)v(` ${S.dim("\xB7")} ${l.requirement}`)}v(),process.exit(c?0:1)}for(let e of[process.stdout,process.stderr])e.on("error",t=>{throw t.code==="EPIPE"&&process.exit(0),t});var W=new Ht;W.name("gamestage").description(`Take an agent-built game prototype to a production fan game.
7190
7198
  Inspect, create and validate need no account. Running, proving and
7191
- publishing a game go through an approved account.`).version(zm).option("--json","machine-readable output for agents",!1).hook("preAction",e=>{Bm(!!e.opts().json)});W.command("start").description("read the current directory and point at the right next step").action(kb);W.command("doctor").description("check the local environment").action(ub);W.command("inspect").alias("adopt").argument("[target]","game file or project directory",".").option("--write [path]","write the generated manifest (default gamestage.yaml)").option("--force","replace an existing manifest, losing whatever it holds",!1).description("read an existing game read-only and produce an inspection report").action(mb);W.command("create").option("--name <name>","game name").option("--archetype <archetype>","authority model for the game").option("--write [path]","manifest path (default gamestage.yaml)").description("start a new game, choosing its authority before scaffolding").action(Rv);W.command("verify").option("--file <path>","the game to verify (index.html)").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--dir <path>","the directory a deploy would publish (defaults to the game's own)").option("--no-browser","skip the browser proof (exits 2 unless another check fails)").description("run the game against a real Engine and prove the migration is done").action(e=>lb({...e,noBrowser:e.browser===!1}));W.command("client").option("--out <dir>","where to write it, defaulting to the current directory").description("write the player client into your project, as a browser can load it").action(Vm);var Tb=W.command("manifest").description("work with the App Manifest");Tb.command("register").argument("[path]","manifest path","gamestage.yaml").description("register an existing manifest with the control plane (requires sign-in)").action(Zv);Tb.command("validate").argument("[path]","manifest path","gamestage.yaml").option("--level <level>","require a conformance level (L0-L5)").description("validate a manifest and report its evidenced conformance").action(Eb);W.command("status").argument("[game]","one game, or the whole workspace when omitted").description("what is deployed, what state it is in, and what caps are near").action(Mv);W.command("deploy").argument("<game>","game id").option("--revision <revision>","manifest revision being published").option("--hash <hash>","content hash of the snapshot").option("--level <level>","evidenced conformance level (L0-L5)").option("--prize","the game offers a prize (paid tiers only)",!1).option("--file <path>","the game's HTML, uploaded before the deploy gate runs").option("--dir <path>","the game's directory, uploaded with relative paths").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").description("publish a snapshot to a playground, and the round it puts on").action(Uv);W.command("archive").argument("<game>","game id").description("take a game off the air while retaining its record and files").action(Fv);W.command("plan").argument("<plan>","runtime, live or enterprise").description("change this workspace's plan and its limits").action(Gv);W.command("suspend").argument("<game>","game id").description("take a game off the air and free its live slot").action(e=>Up(e,!1));W.command("wake").argument("<game>","game id").description("put a suspended game back on the air").action(e=>Up(e,!0));W.command("endpoint").argument("<game>","game id").argument("[which]","player, control or playground; all three when omitted").description("print where a deployed game answers").action(Bv);W.command("logs").argument("<game>","game id").option("--limit <n>","how many lines, newest kept","100").option("--since <iso>","only lines after this timestamp").option("--level <level>","info, warn or error").description("tail a game's runtime log").action(Kv);W.command("dev").option("--port <port>","local HTTP port","4000").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--fixture","serve the contract fixture instead of your own round",!1).option("--scenario <name>","fixture scenario, for contract work").option("--as <player>","play as a named signed-in player, with a keypair minted for this run").description("serve your round locally, through the Engine that will serve it in the cloud").action(Y_);W.command("suggest").description("tell us about a format or feature we do not have (no account needed)").argument("<what>","what you were trying to build").option("--closest <format>","the format that came nearest, if one did").option("--send","actually send it, having seen what it says",!1).action((e,t)=>$b(e,t,zm));W.command("login").description("sign in, or create an account (only needed to deploy)").action(_b);var L0=W.command("link").description("connect an account Gamestage needs (requires sign-in)");L0.command("github").description("link your GitHub account, which a first deploy requires").action(yb);var Ab=W.command("admin").description("approve or refuse a creator's account (operators only)");Ab.command("approve").argument("<workspace>","workspace id, from the registration alert").description("let this account use the runtime").action(e=>Mp(e,"approved"));Ab.command("refuse").argument("<workspace>","workspace id, from the registration alert").description("turn this account down, finally").action(e=>Mp(e,"refused"));W.command("logout").description("forget the stored session").action(bb);W.command("whoami").description("show who the CLI is signed in as").action(wb);W.parseAsync(process.argv).catch(e=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
7199
+ publishing a game go through an approved account.`).version(Qe).option("--json","machine-readable output for agents",!1).hook("preAction",e=>{Wm(!!e.opts().json)});W.command("start").description("read the current directory and point at the right next step").action(Ob);W.command("doctor").description("check the local environment").action(bb);W.command("inspect").alias("adopt").argument("[target]","game file or project directory",".").option("--write [path]","write the generated manifest (default gamestage.yaml)").option("--force","replace an existing manifest, losing whatever it holds",!1).description("read an existing game read-only and produce an inspection report").action(xb);W.command("create").option("--name <name>","game name").option("--archetype <archetype>","authority model for the game").option("--write [path]","manifest path (default gamestage.yaml)").option("--force","replace files that are already here, losing what they hold",!1).description("start a new game, choosing its authority before scaffolding").action(Fv);W.command("verify").option("--file <path>","the game to verify (index.html)").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--dir <path>","the directory a deploy would publish (defaults to the game's own)").option("--no-browser","skip the browser proof (exits 2 unless another check fails)").description("run the game against a real Engine and prove the migration is done").action(e=>_b({...e,noBrowser:e.browser===!1}));W.command("client").option("--out <dir>","where to write it, defaulting to the current directory").description("write the player client into your project, as a browser can load it").action(Jm);var Ub=W.command("manifest").description("work with the App Manifest");Ub.command("register").argument("[path]","manifest path","gamestage.yaml").description("register an existing manifest with the control plane (requires sign-in)").action(Yv);Ub.command("validate").argument("[path]","manifest path","gamestage.yaml").option("--level <level>","require a conformance level (L0-L5)").description("validate a manifest and report its evidenced conformance").action(Mb);W.command("status").argument("[game]","one game, or the whole workspace when omitted").description("what is deployed, what state it is in, and what caps are near").action(Vv);W.command("deploy").argument("<game>","game id").option("--revision <revision>","manifest revision being published").option("--hash <hash>","content hash of the snapshot").option("--level <level>","evidenced conformance level (L0-L5)").option("--prize","the game offers a prize (paid tiers only)",!1).option("--file <path>","the game's HTML, uploaded before the deploy gate runs").option("--dir <path>","the game's directory, uploaded with relative paths").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").description("publish a snapshot to a playground, and the round it puts on").action(Wv);W.command("archive").argument("<game>","game id").description("take a game off the air while retaining its record and files").action(Hv);W.command("plan").argument("<plan>","runtime, live or enterprise").description("change this workspace's plan and its limits").action(Jv);W.command("suspend").argument("<game>","game id").description("take a game off the air and free its live slot").action(e=>Zp(e,!1));W.command("wake").argument("<game>","game id").description("put a suspended game back on the air").action(e=>Zp(e,!0));W.command("endpoint").argument("<game>","game id").argument("[which]","player, control or playground; all three when omitted").description("print where a deployed game answers").action(qv);W.command("art").argument("<game>","game id").description("draw this game's picture, or draw it again").action(Xv);W.command("logs").argument("<game>","game id").option("--limit <n>","how many lines, newest kept","100").option("--since <iso>","only lines after this timestamp").option("--level <level>","info, warn or error").description("tail a game's runtime log").action(e_);W.command("dev").option("--port <port>","local HTTP port","4000").option("--manifest <path>","manifest the round is read from (gamestage.yaml)").option("--fixture","serve the contract fixture instead of your own round",!1).option("--scenario <name>","fixture scenario, for contract work").option("--as <player>","play as a named signed-in player, with a keypair minted for this run").description("serve your round locally, through the Engine that will serve it in the cloud").action(sb);W.command("suggest").description("tell us about a format or feature we do not have (no account needed)").argument("<what>","what you were trying to build").option("--closest <format>","the format that came nearest, if one did").option("--send","actually send it, having seen what it says",!1).action((e,t)=>jb(e,t,Qe));W.command("issue").description("report something that went wrong (no account needed)").argument("<what>","what went wrong").option("--game <id>","the game it happened on, if it was about one").option("--send","actually send it, having seen what it says",!1).action((e,t)=>zb(e,t,Qe));W.command("login").description("sign in, or create an account (only needed to deploy)").action(Ib);var tC=W.command("link").description("connect an account Gamestage needs (requires sign-in)");tC.command("github").description("link your GitHub account, which a first deploy requires").action(Tb);var Fb=W.command("admin").description("approve or refuse a creator's account (operators only)");Fb.command("approve").argument("<workspace>","workspace id, from the registration alert").description("let this account use the runtime").action(e=>Gp(e,"approved"));Fb.command("refuse").argument("<workspace>","workspace id, from the registration alert").description("turn this account down, finally").action(e=>Gp(e,"refused"));W.command("logout").description("forget the stored session").action(Cb);W.command("whoami").description("show who the CLI is signed in as").action(Pb);W.parseAsync(process.argv).catch(e=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
7192
7200
  `),process.exit(1)});
7193
7201
  /*! Bundled license information:
7194
7202