gamestage 0.8.0 → 0.9.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.
- package/cli.mjs +166 -383
- 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
|
|
14
|
-
`)}displayWidth(t){return
|
|
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
15
|
`+" ".repeat(r+c)),a+s+" ".repeat(c)+p.replace(/\n/g,`
|
|
16
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=
|
|
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}
|
|
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
|
|
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?`
|
|
24
24
|
(Did you mean one of ${o.join(", ")}?)`:o.length===1?`
|
|
25
|
-
(Did you mean ${o[0]}?)`:""}var Wt=class e extends
|
|
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
|
|
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
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
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(
|
|
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
|
|
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(
|
|
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}
|
|
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
|
|
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=>
|
|
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.
|
|
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
|
|
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=`/**
|
|
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
|
-
`,
|
|
165
|
+
`,nr="d783262b079500e8",be="gamestage-player.js",Jt=`/**
|
|
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
|
|
@@ -472,14 +472,14 @@ function createRouter(options) {
|
|
|
472
472
|
let withheld = 0;
|
|
473
473
|
let sent = 0;
|
|
474
474
|
return {
|
|
475
|
-
track(
|
|
475
|
+
track(event) {
|
|
476
476
|
if (!analyticsAllowed(options.policy, options.consent())) {
|
|
477
477
|
withheld += 1;
|
|
478
478
|
return false;
|
|
479
479
|
}
|
|
480
480
|
for (const destination of options.destinations) {
|
|
481
481
|
try {
|
|
482
|
-
destination.send(
|
|
482
|
+
destination.send(event);
|
|
483
483
|
} catch {
|
|
484
484
|
}
|
|
485
485
|
}
|
|
@@ -718,12 +718,12 @@ var init_dist = __esm({
|
|
|
718
718
|
* @param handler - The callback function
|
|
719
719
|
* @returns A function that unsubscribes the handler when called
|
|
720
720
|
*/
|
|
721
|
-
on(
|
|
722
|
-
if (!this.listeners.has(
|
|
723
|
-
this.listeners.set(
|
|
721
|
+
on(event, handler) {
|
|
722
|
+
if (!this.listeners.has(event)) {
|
|
723
|
+
this.listeners.set(event, /* @__PURE__ */ new Set());
|
|
724
724
|
}
|
|
725
|
-
this.listeners.get(
|
|
726
|
-
return () => this.off(
|
|
725
|
+
this.listeners.get(event).add(handler);
|
|
726
|
+
return () => this.off(event, handler);
|
|
727
727
|
}
|
|
728
728
|
/**
|
|
729
729
|
* Unsubscribes from an event.
|
|
@@ -731,13 +731,13 @@ var init_dist = __esm({
|
|
|
731
731
|
* @param event - The event name
|
|
732
732
|
* @param handler - The handler to remove. If omitted, all handlers for the event are removed.
|
|
733
733
|
*/
|
|
734
|
-
off(
|
|
734
|
+
off(event, handler) {
|
|
735
735
|
var _a4;
|
|
736
736
|
if (handler === void 0) {
|
|
737
|
-
this.listeners.delete(
|
|
737
|
+
this.listeners.delete(event);
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
|
-
(_a4 = this.listeners.get(
|
|
740
|
+
(_a4 = this.listeners.get(event)) === null || _a4 === void 0 ? void 0 : _a4.delete(handler);
|
|
741
741
|
}
|
|
742
742
|
/**
|
|
743
743
|
* Emits an event with optional arguments.
|
|
@@ -745,9 +745,9 @@ var init_dist = __esm({
|
|
|
745
745
|
* @param event - The event name
|
|
746
746
|
* @param args - Arguments to pass to handlers
|
|
747
747
|
*/
|
|
748
|
-
emit(
|
|
748
|
+
emit(event, ...args) {
|
|
749
749
|
var _a4;
|
|
750
|
-
(_a4 = this.listeners.get(
|
|
750
|
+
(_a4 = this.listeners.get(event)) === null || _a4 === void 0 ? void 0 : _a4.forEach((handler) => handler(...args));
|
|
751
751
|
}
|
|
752
752
|
/**
|
|
753
753
|
* Subscribes to an event and automatically unsubscribes after the first call.
|
|
@@ -756,17 +756,17 @@ var init_dist = __esm({
|
|
|
756
756
|
* @param handler - The callback function
|
|
757
757
|
* @returns A function that unsubscribes the handler when called
|
|
758
758
|
*/
|
|
759
|
-
once(
|
|
759
|
+
once(event, handler) {
|
|
760
760
|
const wrapper = (...args) => {
|
|
761
761
|
handler(...args);
|
|
762
|
-
this.off(
|
|
762
|
+
this.off(event, wrapper);
|
|
763
763
|
};
|
|
764
|
-
return this.on(
|
|
764
|
+
return this.on(event, wrapper);
|
|
765
765
|
}
|
|
766
766
|
};
|
|
767
|
-
subscribe = (emitter2,
|
|
768
|
-
emitter2.on(
|
|
769
|
-
return () => emitter2.off(
|
|
767
|
+
subscribe = (emitter2, event, callback) => {
|
|
768
|
+
emitter2.on(event, callback);
|
|
769
|
+
return () => emitter2.off(event, callback);
|
|
770
770
|
};
|
|
771
771
|
/**
|
|
772
772
|
* @license
|
|
@@ -3823,42 +3823,42 @@ function buildEvent(options, context) {
|
|
|
3823
3823
|
if (events.has(options.id)) {
|
|
3824
3824
|
return events.get(options.id);
|
|
3825
3825
|
}
|
|
3826
|
-
const
|
|
3827
|
-
|
|
3828
|
-
events.set(options.id,
|
|
3829
|
-
return
|
|
3826
|
+
const event = new EventImpl(options, context);
|
|
3827
|
+
event.on("internal_state", handleEventInternalState.bind(event));
|
|
3828
|
+
events.set(options.id, event);
|
|
3829
|
+
return event;
|
|
3830
3830
|
}
|
|
3831
|
-
async function init(
|
|
3832
|
-
if (
|
|
3831
|
+
async function init(event) {
|
|
3832
|
+
if (event.initState === InitState2.Initialising) {
|
|
3833
3833
|
throw new Error("can't initialise event, event is already being initialised");
|
|
3834
3834
|
}
|
|
3835
|
-
if (
|
|
3835
|
+
if (event.initState === InitState2.Initialised) {
|
|
3836
3836
|
throw new Error("can't initialise event, event is already initialised");
|
|
3837
3837
|
}
|
|
3838
|
-
|
|
3839
|
-
if (
|
|
3840
|
-
const history = await fetchHistory(
|
|
3841
|
-
|
|
3838
|
+
event.initState = InitState2.Initialising;
|
|
3839
|
+
if (event.canLoadHistory && event.history === null) {
|
|
3840
|
+
const history = await fetchHistory(event.context.project.host, event.id);
|
|
3841
|
+
event.history = history;
|
|
3842
3842
|
}
|
|
3843
|
-
if (
|
|
3844
|
-
await subscribe3(
|
|
3843
|
+
if (event.canSubscribe) {
|
|
3844
|
+
await subscribe3(event);
|
|
3845
3845
|
}
|
|
3846
|
-
await listenConnHealth(
|
|
3847
|
-
|
|
3846
|
+
await listenConnHealth(event);
|
|
3847
|
+
event.initState = InitState2.Initialised;
|
|
3848
3848
|
}
|
|
3849
|
-
async function subscribe3(
|
|
3850
|
-
if (!
|
|
3849
|
+
async function subscribe3(event) {
|
|
3850
|
+
if (!event.canSubscribe) {
|
|
3851
3851
|
throw new Error("Event can't be subscribed");
|
|
3852
3852
|
}
|
|
3853
|
-
const connect2 = await getConnect2(
|
|
3854
|
-
await connect2.subscribeEvent(
|
|
3853
|
+
const connect2 = await getConnect2(event.context.project.host);
|
|
3854
|
+
await connect2.subscribeEvent(event.id);
|
|
3855
3855
|
}
|
|
3856
|
-
async function unsubscribe2(
|
|
3857
|
-
const connect2 = await getConnect2(
|
|
3858
|
-
connect2.unsubscribeEvent(
|
|
3856
|
+
async function unsubscribe2(event) {
|
|
3857
|
+
const connect2 = await getConnect2(event.context.project.host);
|
|
3858
|
+
connect2.unsubscribeEvent(event.id);
|
|
3859
3859
|
}
|
|
3860
|
-
async function listenConnHealth(
|
|
3861
|
-
const { project } =
|
|
3860
|
+
async function listenConnHealth(event) {
|
|
3861
|
+
const { project } = event.context;
|
|
3862
3862
|
if (healthListeners.has(project.id)) {
|
|
3863
3863
|
return;
|
|
3864
3864
|
}
|
|
@@ -3874,10 +3874,10 @@ async function handleEventInternalState(state) {
|
|
|
3874
3874
|
}
|
|
3875
3875
|
}
|
|
3876
3876
|
async function handleEnmasseConnected() {
|
|
3877
|
-
for (const
|
|
3878
|
-
if (
|
|
3879
|
-
const history = await fetchHistory(
|
|
3880
|
-
|
|
3877
|
+
for (const event of Array.from(events.values())) {
|
|
3878
|
+
if (event.initState === InitState2.Initialised) {
|
|
3879
|
+
const history = await fetchHistory(event.context.project.host, event.id);
|
|
3880
|
+
event.history = history;
|
|
3881
3881
|
}
|
|
3882
3882
|
}
|
|
3883
3883
|
}
|
|
@@ -3887,8 +3887,8 @@ function getEvents(project) {
|
|
|
3887
3887
|
function getEvent(id, project) {
|
|
3888
3888
|
return getEventMemoized(trimWhitespace(id), project);
|
|
3889
3889
|
}
|
|
3890
|
-
function onEventUpdated(
|
|
3891
|
-
return subscribe(
|
|
3890
|
+
function onEventUpdated(event, callback) {
|
|
3891
|
+
return subscribe(event, "updated", callback);
|
|
3892
3892
|
}
|
|
3893
3893
|
async function buildElement(options, context) {
|
|
3894
3894
|
if (elements.has(options.id)) {
|
|
@@ -3902,8 +3902,8 @@ async function buildElement(options, context) {
|
|
|
3902
3902
|
function getElementByPolld(pollId) {
|
|
3903
3903
|
return Array.from(elements.values()).find((element) => element.pollId === pollId);
|
|
3904
3904
|
}
|
|
3905
|
-
async function configureEvent(
|
|
3906
|
-
return configureEventMemoized(
|
|
3905
|
+
async function configureEvent(event) {
|
|
3906
|
+
return configureEventMemoized(event);
|
|
3907
3907
|
}
|
|
3908
3908
|
async function configureConnect(host) {
|
|
3909
3909
|
return configureConnectMemoized(host);
|
|
@@ -3928,8 +3928,8 @@ async function handleConnectMessage(message) {
|
|
|
3928
3928
|
async function handleCreateMessage(message) {
|
|
3929
3929
|
const { id, data } = message;
|
|
3930
3930
|
const options = JSON.parse(data[0]);
|
|
3931
|
-
const
|
|
3932
|
-
if (
|
|
3931
|
+
const event = await getEvent(id);
|
|
3932
|
+
if (event === null) {
|
|
3933
3933
|
return;
|
|
3934
3934
|
}
|
|
3935
3935
|
if (elements.has(options.id)) {
|
|
@@ -3942,12 +3942,12 @@ async function handleCreateMessage(message) {
|
|
|
3942
3942
|
// the element is updated correctly.
|
|
3943
3943
|
options.duration !== element.duration) {
|
|
3944
3944
|
element.update(options);
|
|
3945
|
-
|
|
3945
|
+
event.emit("update", element);
|
|
3946
3946
|
}
|
|
3947
3947
|
} else {
|
|
3948
|
-
const context = Object.assign(Object.assign({},
|
|
3948
|
+
const context = Object.assign(Object.assign({}, event.context), { event });
|
|
3949
3949
|
const element = await buildElement(options, context);
|
|
3950
|
-
|
|
3950
|
+
event.emit("publish", element);
|
|
3951
3951
|
}
|
|
3952
3952
|
}
|
|
3953
3953
|
function handleRevokeMessage(message) {
|
|
@@ -3994,11 +3994,11 @@ async function handleEventHistory(history) {
|
|
|
3994
3994
|
if (history.timeline.length === 0) {
|
|
3995
3995
|
return;
|
|
3996
3996
|
}
|
|
3997
|
-
const
|
|
3998
|
-
if (
|
|
3997
|
+
const event = await getEvent(history.config.id);
|
|
3998
|
+
if (event === null) {
|
|
3999
3999
|
return;
|
|
4000
4000
|
}
|
|
4001
|
-
const context = Object.assign(Object.assign({},
|
|
4001
|
+
const context = Object.assign(Object.assign({}, event.context), { event });
|
|
4002
4002
|
for (const snapshot of history.timeline) {
|
|
4003
4003
|
if (!elements.has(snapshot.id)) {
|
|
4004
4004
|
await buildElement(snapshot, context);
|
|
@@ -4011,9 +4011,9 @@ async function restoreAnswer(element) {
|
|
|
4011
4011
|
element.userAnswer = Answer.fromJSON(userAnswer);
|
|
4012
4012
|
}
|
|
4013
4013
|
}
|
|
4014
|
-
function onElementUpdated(
|
|
4015
|
-
configureEvent(
|
|
4016
|
-
return subscribe(
|
|
4014
|
+
function onElementUpdated(event, callback) {
|
|
4015
|
+
configureEvent(event);
|
|
4016
|
+
return subscribe(event, "update", callback);
|
|
4017
4017
|
}
|
|
4018
4018
|
var State, Klass2, Channel, ConnectImpl2, getConnectMemoized2, ConnectionHealthState, ConnectionHealthImpl, getConnectionHealthMemoized, DEFAULT_IGNORE_TIME, ProjectImpl, logger4, projects, connects, getProjectMemoized, EventState, InitState2, EventImpl, events, healthListeners, getEventsMemoized, getEventMemoized, AnswerError, AnswerErrorMessages, ElementState, Answer, ElementType, ShowResultsMode, ElementImpl, elements, configureEventMemoized, configureConnectMemoized, getElementMemoized, getElementsMemoized, PresenceCounterState, PresenceCounterImpl, presenceCounters, getPresenceCounterMemoized;
|
|
4019
4019
|
var init_dist10 = __esm({
|
|
@@ -4287,7 +4287,7 @@ var init_dist10 = __esm({
|
|
|
4287
4287
|
if (!this._listings) {
|
|
4288
4288
|
return [];
|
|
4289
4289
|
}
|
|
4290
|
-
return newListings.events.filter(({ id }) => !this._listings.events.some((
|
|
4290
|
+
return newListings.events.filter(({ id }) => !this._listings.events.some((event) => id === event.id));
|
|
4291
4291
|
}
|
|
4292
4292
|
/**
|
|
4293
4293
|
* Calculates events that were updated (present in old listings and new,
|
|
@@ -4297,9 +4297,9 @@ var init_dist10 = __esm({
|
|
|
4297
4297
|
if (!this._listings) {
|
|
4298
4298
|
return [];
|
|
4299
4299
|
}
|
|
4300
|
-
return newListings.events.filter((
|
|
4301
|
-
const existingEvent = this._listings.events.find(({ id }) =>
|
|
4302
|
-
return existingEvent &&
|
|
4300
|
+
return newListings.events.filter((event) => {
|
|
4301
|
+
const existingEvent = this._listings.events.find(({ id }) => event.id === id);
|
|
4302
|
+
return existingEvent && event.digest !== existingEvent.digest;
|
|
4303
4303
|
});
|
|
4304
4304
|
}
|
|
4305
4305
|
/**
|
|
@@ -4309,7 +4309,7 @@ var init_dist10 = __esm({
|
|
|
4309
4309
|
if (!this._listings) {
|
|
4310
4310
|
return [];
|
|
4311
4311
|
}
|
|
4312
|
-
return this._listings.events.filter(({ id }) => !newListings.events.some((
|
|
4312
|
+
return this._listings.events.filter(({ id }) => !newListings.events.some((event) => id === event.id));
|
|
4313
4313
|
}
|
|
4314
4314
|
/**
|
|
4315
4315
|
* Processes and updates locales from project listings
|
|
@@ -4322,7 +4322,7 @@ var init_dist10 = __esm({
|
|
|
4322
4322
|
* Updates the events checksum based on new listings
|
|
4323
4323
|
*/
|
|
4324
4324
|
_updateEventsChecksum(newListings) {
|
|
4325
|
-
this.eventsChecksum = checksum(newListings.events.map((
|
|
4325
|
+
this.eventsChecksum = checksum(newListings.events.map((event) => event.digest).join(""));
|
|
4326
4326
|
}
|
|
4327
4327
|
/**
|
|
4328
4328
|
* Emits events based on created and deleted events
|
|
@@ -4656,18 +4656,18 @@ var init_dist10 = __esm({
|
|
|
4656
4656
|
const context = Object.assign(Object.assign({}, project.context), { project });
|
|
4657
4657
|
const data = project.events.find((eventData) => eventData.id === id);
|
|
4658
4658
|
if (data !== void 0) {
|
|
4659
|
-
const
|
|
4660
|
-
if (
|
|
4659
|
+
const event = buildEvent(data, context);
|
|
4660
|
+
if (event.canLoadHistory) {
|
|
4661
4661
|
const history = await fetchHistory(project.host, id);
|
|
4662
|
-
|
|
4662
|
+
event.history = history;
|
|
4663
4663
|
}
|
|
4664
|
-
return
|
|
4664
|
+
return event;
|
|
4665
4665
|
}
|
|
4666
4666
|
try {
|
|
4667
4667
|
const history = await fetchHistory(project.host, id);
|
|
4668
|
-
const
|
|
4669
|
-
|
|
4670
|
-
return
|
|
4668
|
+
const event = buildEvent(history.config, context);
|
|
4669
|
+
event.history = history;
|
|
4670
|
+
return event;
|
|
4671
4671
|
} catch (err) {
|
|
4672
4672
|
return null;
|
|
4673
4673
|
}
|
|
@@ -4977,14 +4977,14 @@ var init_dist10 = __esm({
|
|
|
4977
4977
|
* More details on the license can be found at https://www.monterosa.co/sdk/license
|
|
4978
4978
|
*/
|
|
4979
4979
|
elements = /* @__PURE__ */ new Map();
|
|
4980
|
-
configureEventMemoized = memoizePromise(async (
|
|
4981
|
-
|
|
4982
|
-
if (
|
|
4983
|
-
handleEventHistory(
|
|
4984
|
-
}
|
|
4985
|
-
await configureConnect(
|
|
4986
|
-
await init(
|
|
4987
|
-
}, (
|
|
4980
|
+
configureEventMemoized = memoizePromise(async (event) => {
|
|
4981
|
+
event.on("history", handleEventHistory);
|
|
4982
|
+
if (event.history !== null) {
|
|
4983
|
+
handleEventHistory(event.history);
|
|
4984
|
+
}
|
|
4985
|
+
await configureConnect(event.context.sdk.options.host);
|
|
4986
|
+
await init(event);
|
|
4987
|
+
}, (event) => event.id);
|
|
4988
4988
|
configureConnectMemoized = memoizePromise(async (host) => {
|
|
4989
4989
|
const connect2 = await getConnect2(host);
|
|
4990
4990
|
connect2.on("message", handleConnectMessage);
|
|
@@ -4997,15 +4997,15 @@ var init_dist10 = __esm({
|
|
|
4997
4997
|
*
|
|
4998
4998
|
* More details on the license can be found at https://www.monterosa.co/sdk/license
|
|
4999
4999
|
*/
|
|
5000
|
-
getElementMemoized = memoizePromise(async (
|
|
5001
|
-
await configureEvent(
|
|
5000
|
+
getElementMemoized = memoizePromise(async (event, id) => {
|
|
5001
|
+
await configureEvent(event);
|
|
5002
5002
|
const element = Array.from(elements.values()).find((el) => el.id === id);
|
|
5003
5003
|
return element || null;
|
|
5004
|
-
}, (
|
|
5005
|
-
getElementsMemoized = memoizePromise(async (
|
|
5006
|
-
await configureEvent(
|
|
5007
|
-
return Array.from(elements.values()).filter((element) => element.eventId ===
|
|
5008
|
-
}, (
|
|
5004
|
+
}, (event, id) => id);
|
|
5005
|
+
getElementsMemoized = memoizePromise(async (event) => {
|
|
5006
|
+
await configureEvent(event);
|
|
5007
|
+
return Array.from(elements.values()).filter((element) => element.eventId === event.id).sort((a, b) => a.publishedAt - b.publishedAt);
|
|
5008
|
+
}, (event) => event.id, {
|
|
5009
5009
|
clearOnResolve: true
|
|
5010
5010
|
});
|
|
5011
5011
|
/**
|
|
@@ -5133,7 +5133,7 @@ function read() {
|
|
|
5133
5133
|
async function liveEvent(project, named) {
|
|
5134
5134
|
if (named) return await getEvent(named, project ?? void 0);
|
|
5135
5135
|
const listed = await getEvents(project ?? void 0);
|
|
5136
|
-
return listed.find((
|
|
5136
|
+
return listed.find((event) => event.state === "active");
|
|
5137
5137
|
}
|
|
5138
5138
|
async function createMonterosaPlatform(ids2) {
|
|
5139
5139
|
const clock = createClock();
|
|
@@ -5148,8 +5148,8 @@ async function createMonterosaPlatform(ids2) {
|
|
|
5148
5148
|
try {
|
|
5149
5149
|
const project = await getProject();
|
|
5150
5150
|
const next = readPresentation(project?.fields);
|
|
5151
|
-
const
|
|
5152
|
-
if (
|
|
5151
|
+
const event = await liveEvent(project, ids2.eventId);
|
|
5152
|
+
if (event) Object.assign(next, readPresentation(event.fields));
|
|
5153
5153
|
for (const key of Object.keys(presentation)) {
|
|
5154
5154
|
delete presentation[key];
|
|
5155
5155
|
}
|
|
@@ -5174,17 +5174,17 @@ async function createMonterosaPlatform(ids2) {
|
|
|
5174
5174
|
]);
|
|
5175
5175
|
const project = await getProject();
|
|
5176
5176
|
Object.assign(presentation, readPresentation(project?.fields));
|
|
5177
|
-
const
|
|
5178
|
-
if (
|
|
5179
|
-
Object.assign(presentation, readPresentation(
|
|
5180
|
-
teardown.push(onElementUpdated(
|
|
5181
|
-
teardown.push(onEventUpdated(
|
|
5177
|
+
const event = await liveEvent(project, ids2.eventId);
|
|
5178
|
+
if (event) {
|
|
5179
|
+
Object.assign(presentation, readPresentation(event.fields));
|
|
5180
|
+
teardown.push(onElementUpdated(event, announce));
|
|
5181
|
+
teardown.push(onEventUpdated(event, () => void refreshPresentation()));
|
|
5182
5182
|
}
|
|
5183
5183
|
if (project) {
|
|
5184
5184
|
teardown.push(onProjectFieldsUpdated(project, () => void refreshPresentation()));
|
|
5185
5185
|
}
|
|
5186
5186
|
teardown.push(() => disconnect(conn));
|
|
5187
|
-
return Boolean(
|
|
5187
|
+
return Boolean(event);
|
|
5188
5188
|
} catch {
|
|
5189
5189
|
return false;
|
|
5190
5190
|
}
|
|
@@ -5245,8 +5245,8 @@ async function createMonterosaPlatform(ids2) {
|
|
|
5245
5245
|
* site, because the shape a kit accepts is exactly the sort of thing a facade
|
|
5246
5246
|
* exists to absorb.
|
|
5247
5247
|
*/
|
|
5248
|
-
emit(
|
|
5249
|
-
trackEvent(
|
|
5248
|
+
emit(event) {
|
|
5249
|
+
trackEvent(event.name, { ...flatten(event.properties), at: event.at });
|
|
5250
5250
|
},
|
|
5251
5251
|
storage: {
|
|
5252
5252
|
read: (key) => storageRead(key),
|
|
@@ -5522,11 +5522,11 @@ function installDebugPanel(facts, view) {
|
|
|
5522
5522
|
doc.body?.append(styled(view, debugReport(facts(), view)));
|
|
5523
5523
|
};
|
|
5524
5524
|
let typed = "";
|
|
5525
|
-
const onKey = (
|
|
5526
|
-
const target =
|
|
5525
|
+
const onKey = (event) => {
|
|
5526
|
+
const target = event.target;
|
|
5527
5527
|
const editing = target?.isContentEditable || target?.tagName === "INPUT" || target?.tagName === "TEXTAREA";
|
|
5528
|
-
if (editing ||
|
|
5529
|
-
typed = (typed +
|
|
5528
|
+
if (editing || event.key.length !== 1) return;
|
|
5529
|
+
typed = (typed + event.key.toLowerCase()).slice(-COMBINATION.length);
|
|
5530
5530
|
if (typed === COMBINATION) open();
|
|
5531
5531
|
};
|
|
5532
5532
|
doc.addEventListener("keydown", onKey);
|
|
@@ -5593,8 +5593,8 @@ function createLocalPlatform(options = {}) {
|
|
|
5593
5593
|
return () => announced.delete(listener);
|
|
5594
5594
|
},
|
|
5595
5595
|
announce,
|
|
5596
|
-
emit(
|
|
5597
|
-
emitted.push(
|
|
5596
|
+
emit(event) {
|
|
5597
|
+
emitted.push(event);
|
|
5598
5598
|
},
|
|
5599
5599
|
storage: {
|
|
5600
5600
|
read: async (key) => store.get(key) ?? null,
|
|
@@ -5645,224 +5645,6 @@ function applyPresentation(presentation, targets = {}) {
|
|
|
5645
5645
|
}
|
|
5646
5646
|
}
|
|
5647
5647
|
|
|
5648
|
-
// packages/gamestage/src/platform-conformance.ts
|
|
5649
|
-
init_consent();
|
|
5650
|
-
function check(condition, message) {
|
|
5651
|
-
if (!condition) throw new Error(message);
|
|
5652
|
-
}
|
|
5653
|
-
var event = (name, at) => ({
|
|
5654
|
-
name,
|
|
5655
|
-
properties: {},
|
|
5656
|
-
at
|
|
5657
|
-
});
|
|
5658
|
-
var PLATFORM_CONFORMANCE = [
|
|
5659
|
-
{
|
|
5660
|
-
/**
|
|
5661
|
-
* A platform always answers about presentation, and absence is an answer.
|
|
5662
|
-
*
|
|
5663
|
-
* Both implementations expose the producer's settings, and both must say
|
|
5664
|
-
* "nothing set" the same way: an object with no keys rather than one full of
|
|
5665
|
-
* empty strings. A game that received \`displayName: ""\` would render a blank
|
|
5666
|
-
* heading the first time somebody opened Studio and saved without typing,
|
|
5667
|
-
* which is the whole reason \`readPresentation\` drops what it cannot use.
|
|
5668
|
-
*/
|
|
5669
|
-
name: "presentation is an object, and an unset field is absent rather than empty",
|
|
5670
|
-
async run(make) {
|
|
5671
|
-
const { platform } = await make();
|
|
5672
|
-
const presentation = platform.presentation;
|
|
5673
|
-
check(typeof presentation === "object" && presentation !== null, "presentation must be an object");
|
|
5674
|
-
for (const [key, value] of Object.entries(presentation)) {
|
|
5675
|
-
check(
|
|
5676
|
-
typeof value === "string" && value.trim().length > 0,
|
|
5677
|
-
\`\${key} is present and empty, which a game cannot tell from a choice\`
|
|
5678
|
-
);
|
|
5679
|
-
}
|
|
5680
|
-
platform.stop();
|
|
5681
|
-
}
|
|
5682
|
-
},
|
|
5683
|
-
{
|
|
5684
|
-
/**
|
|
5685
|
-
* Every platform can be asked to say when the producer's words changed.
|
|
5686
|
-
*
|
|
5687
|
-
* What a change looks like differs: Monterosa hears it over the Mesh, and
|
|
5688
|
-
* local mode has no Studio project to change at all. What cannot differ is
|
|
5689
|
-
* that a game may subscribe and unsubscribe without knowing which it is on.
|
|
5690
|
-
* A game written against a platform that lacked this would crash on the
|
|
5691
|
-
* other one, which is the whole reason the port has a conformance suite.
|
|
5692
|
-
*/
|
|
5693
|
-
name: "a game can subscribe to presentation changes and unsubscribe again",
|
|
5694
|
-
async run(make) {
|
|
5695
|
-
const { platform } = await make();
|
|
5696
|
-
const undo = platform.onPresentationChanged(() => {
|
|
5697
|
-
});
|
|
5698
|
-
check(typeof undo === "function", "subscribing must return an unsubscribe");
|
|
5699
|
-
undo();
|
|
5700
|
-
undo();
|
|
5701
|
-
platform.stop();
|
|
5702
|
-
}
|
|
5703
|
-
},
|
|
5704
|
-
{
|
|
5705
|
-
/**
|
|
5706
|
-
* The default is the one that records nothing.
|
|
5707
|
-
*
|
|
5708
|
-
* consent-kit's own \`hasConsent\` answers true for every category when no
|
|
5709
|
-
* authority has declared one, documented as backwards compatibility. A
|
|
5710
|
-
* standalone game has no authority, so a facade built on that function would
|
|
5711
|
-
* report full consent for a game that has never asked anybody anything. This
|
|
5712
|
-
* case is the reason \`consent.ts\` does not call it.
|
|
5713
|
-
*/
|
|
5714
|
-
name: "consent is withheld until something declares it, on both platforms",
|
|
5715
|
-
async run(make) {
|
|
5716
|
-
const { platform } = await make();
|
|
5717
|
-
const reading = platform.consent();
|
|
5718
|
-
check(reading.declared === false, "a fresh platform must have no declaration");
|
|
5719
|
-
check(
|
|
5720
|
-
granted(reading, "analytics") === false,
|
|
5721
|
-
"nothing declared must not read as granted"
|
|
5722
|
-
);
|
|
5723
|
-
check(
|
|
5724
|
-
analyticsAllowed({ analyticsRequiresConsent: true }, reading) === false,
|
|
5725
|
-
"a policy requiring consent must be closed before one is given"
|
|
5726
|
-
);
|
|
5727
|
-
platform.stop();
|
|
5728
|
-
}
|
|
5729
|
-
},
|
|
5730
|
-
{
|
|
5731
|
-
name: "a declaration opens only the categories it names",
|
|
5732
|
-
async run(make) {
|
|
5733
|
-
const { platform, declareConsent } = await make();
|
|
5734
|
-
declareConsent({ necessary: true, analytics: true });
|
|
5735
|
-
const reading = platform.consent();
|
|
5736
|
-
check(reading.declared === true, "a declaration must read as declared");
|
|
5737
|
-
check(granted(reading, "analytics") === true, "a granted category must read granted");
|
|
5738
|
-
check(
|
|
5739
|
-
granted(reading, "marketing") === false,
|
|
5740
|
-
"an absent category is not a grant, it is an absence"
|
|
5741
|
-
);
|
|
5742
|
-
platform.stop();
|
|
5743
|
-
}
|
|
5744
|
-
},
|
|
5745
|
-
{
|
|
5746
|
-
name: "a declaration that withholds a category keeps it withheld",
|
|
5747
|
-
async run(make) {
|
|
5748
|
-
const { platform, declareConsent } = await make();
|
|
5749
|
-
declareConsent({ necessary: true, analytics: false });
|
|
5750
|
-
check(
|
|
5751
|
-
granted(platform.consent(), "analytics") === false,
|
|
5752
|
-
"false must not be read as a grant"
|
|
5753
|
-
);
|
|
5754
|
-
platform.stop();
|
|
5755
|
-
}
|
|
5756
|
-
},
|
|
5757
|
-
{
|
|
5758
|
-
name: "a consent change reaches a listener, and unsubscribing stops it",
|
|
5759
|
-
async run(make) {
|
|
5760
|
-
const { platform, declareConsent } = await make();
|
|
5761
|
-
let seen = 0;
|
|
5762
|
-
const undo = platform.onConsentChanged(() => seen += 1);
|
|
5763
|
-
declareConsent({ necessary: true, analytics: true });
|
|
5764
|
-
check(seen === 1, \`a change must reach the listener once, saw \${seen}\`);
|
|
5765
|
-
undo();
|
|
5766
|
-
declareConsent({ necessary: true, analytics: false });
|
|
5767
|
-
check(seen === 1, \`an unsubscribed listener must hear nothing, saw \${seen}\`);
|
|
5768
|
-
platform.stop();
|
|
5769
|
-
}
|
|
5770
|
-
},
|
|
5771
|
-
{
|
|
5772
|
-
name: "an announcement reaches a listener, and unsubscribing stops it",
|
|
5773
|
-
async run(make) {
|
|
5774
|
-
const { platform, announce } = await make();
|
|
5775
|
-
let seen = 0;
|
|
5776
|
-
const undo = platform.onRoundAnnounced(() => seen += 1);
|
|
5777
|
-
announce();
|
|
5778
|
-
check(seen === 1, \`an announcement must reach the listener once, saw \${seen}\`);
|
|
5779
|
-
undo();
|
|
5780
|
-
announce();
|
|
5781
|
-
check(seen === 1, \`an unsubscribed listener must hear nothing, saw \${seen}\`);
|
|
5782
|
-
platform.stop();
|
|
5783
|
-
}
|
|
5784
|
-
},
|
|
5785
|
-
{
|
|
5786
|
-
name: "an announcement carries nothing a client could act on",
|
|
5787
|
-
async run(make) {
|
|
5788
|
-
const { platform, announce } = await make();
|
|
5789
|
-
const payloads = [];
|
|
5790
|
-
platform.onRoundAnnounced((...args) => payloads.push(args));
|
|
5791
|
-
announce();
|
|
5792
|
-
check(payloads.length === 1, "the announcement must have fired");
|
|
5793
|
-
check(
|
|
5794
|
-
Array.isArray(payloads[0]) && payloads[0].length === 0,
|
|
5795
|
-
"an announcement must carry no arguments: the round is re-read, never received"
|
|
5796
|
-
);
|
|
5797
|
-
platform.stop();
|
|
5798
|
-
}
|
|
5799
|
-
},
|
|
5800
|
-
{
|
|
5801
|
-
name: "the clock takes a server's word for the time",
|
|
5802
|
-
async run(make) {
|
|
5803
|
-
const { platform } = await make();
|
|
5804
|
-
const server = Date.now() + 36e5;
|
|
5805
|
-
platform.clock.sample(server);
|
|
5806
|
-
check(platform.clock.synchronised, "a sampled clock must report itself synchronised");
|
|
5807
|
-
const drift = Math.abs(platform.clock.now() - server);
|
|
5808
|
-
check(drift < 5e3, \`now() must follow the sample, drifted \${drift}ms\`);
|
|
5809
|
-
platform.stop();
|
|
5810
|
-
}
|
|
5811
|
-
},
|
|
5812
|
-
{
|
|
5813
|
-
name: "an unparseable sample is ignored rather than believed",
|
|
5814
|
-
async run(make) {
|
|
5815
|
-
const { platform } = await make();
|
|
5816
|
-
platform.clock.sample(Number.NaN);
|
|
5817
|
-
check(
|
|
5818
|
-
!platform.clock.synchronised,
|
|
5819
|
-
"a clock must not call itself synchronised on a sample it could not read"
|
|
5820
|
-
);
|
|
5821
|
-
const drift = Math.abs(platform.clock.now() - Date.now());
|
|
5822
|
-
check(drift < 5e3, \`an ignored sample must leave the clock alone, drifted \${drift}ms\`);
|
|
5823
|
-
platform.stop();
|
|
5824
|
-
}
|
|
5825
|
-
},
|
|
5826
|
-
{
|
|
5827
|
-
name: "the egress receives what it is given, in order",
|
|
5828
|
-
async run(make) {
|
|
5829
|
-
const { platform, emitted } = await make();
|
|
5830
|
-
platform.emit(event("first", 1));
|
|
5831
|
-
platform.emit(event("second", 2));
|
|
5832
|
-
const names = emitted().map((e) => e.name);
|
|
5833
|
-
check(
|
|
5834
|
-
names.length === 2 && names[0] === "first" && names[1] === "second",
|
|
5835
|
-
\`the egress must keep order, saw \${JSON.stringify(names)}\`
|
|
5836
|
-
);
|
|
5837
|
-
platform.stop();
|
|
5838
|
-
}
|
|
5839
|
-
},
|
|
5840
|
-
{
|
|
5841
|
-
name: "storage round-trips, and a removed key is gone",
|
|
5842
|
-
async run(make) {
|
|
5843
|
-
const { platform } = await make();
|
|
5844
|
-
check(await platform.storage.read("absent") === null, "an unwritten key must read null");
|
|
5845
|
-
await platform.storage.write("streak", "4");
|
|
5846
|
-
check(await platform.storage.read("streak") === "4", "a written key must read back");
|
|
5847
|
-
await platform.storage.remove("streak");
|
|
5848
|
-
check(await platform.storage.read("streak") === null, "a removed key must read null");
|
|
5849
|
-
platform.stop();
|
|
5850
|
-
}
|
|
5851
|
-
},
|
|
5852
|
-
{
|
|
5853
|
-
name: "stop is idempotent, and a stopped platform announces nothing",
|
|
5854
|
-
async run(make) {
|
|
5855
|
-
const { platform, announce } = await make();
|
|
5856
|
-
let seen = 0;
|
|
5857
|
-
platform.onRoundAnnounced(() => seen += 1);
|
|
5858
|
-
platform.stop();
|
|
5859
|
-
platform.stop();
|
|
5860
|
-
announce();
|
|
5861
|
-
check(seen === 0, \`a stopped platform must not announce, saw \${seen}\`);
|
|
5862
|
-
}
|
|
5863
|
-
}
|
|
5864
|
-
];
|
|
5865
|
-
|
|
5866
5648
|
// packages/gamestage/src/index.ts
|
|
5867
5649
|
function ids(globals4) {
|
|
5868
5650
|
const api = globals4.GAMESTAGE_API;
|
|
@@ -6095,7 +5877,6 @@ async function start(options = {}) {
|
|
|
6095
5877
|
}
|
|
6096
5878
|
export {
|
|
6097
5879
|
ANALYTICS_CATEGORY,
|
|
6098
|
-
PLATFORM_CONFORMANCE,
|
|
6099
5880
|
analyticsAllowed,
|
|
6100
5881
|
applyPresentation,
|
|
6101
5882
|
createClock,
|
|
@@ -6112,7 +5893,7 @@ export {
|
|
|
6112
5893
|
storageAllowed,
|
|
6113
5894
|
tokenOf
|
|
6114
5895
|
};
|
|
6115
|
-
`,qt="
|
|
5896
|
+
`,qt="be3cfb500a7cc446",we="gamestage.js",Db=`<!doctype html>
|
|
6116
5897
|
<html lang="en">
|
|
6117
5898
|
<head>
|
|
6118
5899
|
<meta charset="utf-8" />
|
|
@@ -6360,7 +6141,7 @@ main().catch((error) => {
|
|
|
6360
6141
|
</script>
|
|
6361
6142
|
</body>
|
|
6362
6143
|
</html>
|
|
6363
|
-
|
|
6144
|
+
`,Lb=`<!doctype html>
|
|
6364
6145
|
<html lang="en">
|
|
6365
6146
|
<head>
|
|
6366
6147
|
<meta charset="utf-8" />
|
|
@@ -6657,7 +6438,7 @@ main().catch((error) => {
|
|
|
6657
6438
|
</script>
|
|
6658
6439
|
</body>
|
|
6659
6440
|
</html>
|
|
6660
|
-
`,
|
|
6441
|
+
`,zb=`<!doctype html>
|
|
6661
6442
|
<html lang="en">
|
|
6662
6443
|
<head>
|
|
6663
6444
|
<meta charset="utf-8" />
|
|
@@ -7008,7 +6789,7 @@ main().catch((error) => {
|
|
|
7008
6789
|
</script>
|
|
7009
6790
|
</body>
|
|
7010
6791
|
</html>
|
|
7011
|
-
`,
|
|
6792
|
+
`,Mb=`<!doctype html>
|
|
7012
6793
|
<html lang="en">
|
|
7013
6794
|
<head>
|
|
7014
6795
|
<meta charset="utf-8" />
|
|
@@ -7257,15 +7038,15 @@ main().catch((error) => {
|
|
|
7257
7038
|
</script>
|
|
7258
7039
|
</body>
|
|
7259
7040
|
</html>
|
|
7260
|
-
`,
|
|
7261
|
-
`)}function I(e){v(),v(
|
|
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)+`
|
|
7262
7043
|
`)}function P(e,t){if(Xt)process.stderr.write(JSON.stringify({ok:!1,error:e,detail:t??[]},null,2)+`
|
|
7263
|
-
`);else{process.stderr.write(`${
|
|
7044
|
+
`);else{process.stderr.write(`${S.red("Error")} ${e}
|
|
7264
7045
|
`);for(let r of t??[])process.stderr.write(` ${r}
|
|
7265
|
-
`)}process.exit(1)}async function Db(e,t){let r;try{r=await Cb(e,"utf8")}catch{return"absent"}return r===t?"same":"different"}async function zm(e,t,r){let o=Nb(e,t),n=await Db(o,r);try{await Ib(Ob(o),{recursive:!0}),await Pb(o,r,"utf8")}catch{throw P(`Cannot write ${o}.`),new Error("unreachable")}return{where:Rb(process.cwd(),o)||t,state:n}}async function Mm(e){let t=jb(e.out??"."),r=await zm(t,we,Jt),o=await zm(t,be,Ht),n=`import { start } from "./${we}";`,i=`import { createPlayerClient, newIdempotencyKey } from "./${be}";`,a=r.state==="same"&&o.state==="same";if(L())return M({ok:!0,status:a?"unchanged":"written",files:[{path:r.where,digest:qt,import:n},{path:o.where,digest:tr,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} (${tr})`),v(),A(`Import it: ${$.cyan(n)}`),A(`The player API on its own: ${$.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 Zr}from"node:fs/promises";import{createHash as hT}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 Lb={target_selection:"hunt",target_total:"push",puzzle:"group",prediction:"forecast"};function We(e){return Lb[e]??e}function Um(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 Ka={hunt:"gamestage-target-selection-element",push:"gamestage-target-total-element",group:"gamestage-puzzle-element",forecast:"gamestage-prediction-element"},Fm={hunt:"Find the answer",push:"Under the limit",group:"Puzzle",forecast:"Prediction"};var u={};Ke(u,{$brand:()=>Wa,$input:()=>fl,$output:()=>ml,NEVER:()=>Va,TimePrecision:()=>vl,ZodAny:()=>sd,ZodArray:()=>dd,ZodBase64:()=>Oi,ZodBase64URL:()=>Ni,ZodBigInt:()=>Pn,ZodBigIntFormat:()=>Di,ZodBoolean:()=>Cn,ZodCIDRv4:()=>Ci,ZodCIDRv6:()=>Pi,ZodCUID:()=>xi,ZodCUID2:()=>Si,ZodCatch:()=>Nd,ZodCodec:()=>Nr,ZodCustom:()=>Rr,ZodCustomStringFormat:()=>An,ZodDate:()=>Ar,ZodDefault:()=>Td,ZodDiscriminatedUnion:()=>md,ZodE164:()=>Ri,ZodEmail:()=>bi,ZodEmoji:()=>wi,ZodEnum:()=>En,ZodError:()=>fx,ZodExactOptional:()=>Sd,ZodFile:()=>kd,ZodFirstPartyTypeKind:()=>Vd,ZodFunction:()=>Zd,ZodGUID:()=>xr,ZodIPv4:()=>Ai,ZodIPv6:()=>Ii,ZodISODate:()=>fi,ZodISODateTime:()=>mi,ZodISODuration:()=>gi,ZodISOTime:()=>hi,ZodIntersection:()=>fd,ZodIssueCode:()=>gx,ZodJWT:()=>ji,ZodKSUID:()=>Ti,ZodLazy:()=>Ud,ZodLiteral:()=>wd,ZodMAC:()=>ed,ZodMap:()=>_d,ZodNaN:()=>jd,ZodNanoID:()=>ki,ZodNever:()=>ld,ZodNonOptional:()=>Gi,ZodNull:()=>id,ZodNullable:()=>Ed,ZodNumber:()=>In,ZodNumberFormat:()=>zt,ZodObject:()=>Cr,ZodOptional:()=>Fi,ZodPipe:()=>Or,ZodPrefault:()=>Id,ZodPreprocess:()=>Dd,ZodPromise:()=>Gd,ZodReadonly:()=>Ld,ZodRealError:()=>ge,ZodRecord:()=>$n,ZodSet:()=>bd,ZodString:()=>Tn,ZodStringFormat:()=>K,ZodSuccess:()=>Od,ZodSymbol:()=>rd,ZodTemplateLiteral:()=>Md,ZodTransform:()=>xd,ZodTuple:()=>gd,ZodType:()=>z,ZodULID:()=>$i,ZodURL:()=>Tr,ZodUUID:()=>Me,ZodUndefined:()=>od,ZodUnion:()=>Pr,ZodUnknown:()=>cd,ZodVoid:()=>ud,ZodXID:()=>Ei,ZodXor:()=>pd,_ZodString:()=>_i,_default:()=>Ad,_function:()=>Cg,any:()=>sg,array:()=>Ir,base64:()=>Bh,base64url:()=>Kh,bigint:()=>ng,boolean:()=>nd,catch:()=>Rd,check:()=>Pg,cidrv4:()=>Gh,cidrv6:()=>Zh,clone:()=>ce,codec:()=>Eg,coerce:()=>Wd,config:()=>J,core:()=>qe,cuid:()=>Rh,cuid2:()=>jh,custom:()=>Og,date:()=>lg,decode:()=>Wu,decodeAsync:()=>Ju,describe:()=>Ng,discriminatedUnion:()=>hg,e164:()=>Vh,email:()=>Sh,emoji:()=>Oh,encode:()=>Vu,encodeAsync:()=>Hu,endsWith:()=>hn,enum:()=>Mi,exactOptional:()=>$d,file:()=>kg,flattenError:()=>lr,float32:()=>Xh,float64:()=>Qh,formatError:()=>ur,fromJSONSchema:()=>Ug,function:()=>Cg,getErrorMap:()=>vx,globalRegistry:()=>ne,gt:()=>Le,gte:()=>ue,guid:()=>$h,hash:()=>Yh,hex:()=>qh,hostname:()=>Jh,httpUrl:()=>Ph,includes:()=>mn,instanceof:()=>jg,int:()=>yi,int32:()=>eg,int64:()=>rg,intersection:()=>hd,invertCodec:()=>Tg,ipv4:()=>Mh,ipv6:()=>Fh,iso:()=>Sn,json:()=>Lg,jwt:()=>Wh,keyof:()=>ug,ksuid:()=>zh,lazy:()=>Fd,length:()=>Dt,literal:()=>wg,locales:()=>vr,looseObject:()=>mg,looseRecord:()=>yg,lowercase:()=>dn,lt:()=>De,lte:()=>xe,mac:()=>Uh,map:()=>vg,maxLength:()=>jt,maxSize:()=>mt,meta:()=>Rg,mime:()=>gn,minLength:()=>Je,minSize:()=>ze,multipleOf:()=>pt,nan:()=>$g,nanoid:()=>Nh,nativeEnum:()=>bg,negative:()=>ri,never:()=>Li,nonnegative:()=>ii,nonoptional:()=>Pd,nonpositive:()=>oi,normalize:()=>yn,null:()=>ad,nullable:()=>$r,nullish:()=>xg,number:()=>td,object:()=>dg,optional:()=>Sr,overwrite:()=>Ie,parse:()=>Gu,parseAsync:()=>Zu,partialRecord:()=>gg,pipe:()=>vi,positive:()=>ni,prefault:()=>Cd,preprocess:()=>zg,prettifyError:()=>as,promise:()=>Ig,property:()=>ai,readonly:()=>zd,record:()=>vd,refine:()=>Bd,regex:()=>un,regexes:()=>ke,registry:()=>jo,safeDecode:()=>Yu,safeDecodeAsync:()=>Qu,safeEncode:()=>qu,safeEncodeAsync:()=>Xu,safeParse:()=>Bu,safeParseAsync:()=>Ku,set:()=>_g,setErrorMap:()=>yx,size:()=>Rt,slugify:()=>wn,startsWith:()=>fn,strictObject:()=>pg,string:()=>kr,stringFormat:()=>Hh,stringbool:()=>Dg,success:()=>Sg,superRefine:()=>Kd,symbol:()=>ig,templateLiteral:()=>Ag,toJSONSchema:()=>ui,toLowerCase:()=>_n,toUpperCase:()=>bn,transform:()=>Ui,treeifyError:()=>is,trim:()=>vn,tuple:()=>yd,uint32:()=>tg,uint64:()=>og,ulid:()=>Dh,undefined:()=>ag,union:()=>zi,unknown:()=>Lt,uppercase:()=>pn,url:()=>Ch,util:()=>k,uuid:()=>Eh,uuidv4:()=>Th,uuidv6:()=>Ah,uuidv7:()=>Ih,void:()=>cg,xid:()=>Lh,xor:()=>fg});var qe={};Ke(qe,{$ZodAny:()=>jc,$ZodArray:()=>Uc,$ZodAsyncError:()=>Ae,$ZodBase64:()=>$c,$ZodBase64URL:()=>Ec,$ZodBigInt:()=>To,$ZodBigIntFormat:()=>Pc,$ZodBoolean:()=>fr,$ZodCIDRv4:()=>kc,$ZodCIDRv6:()=>xc,$ZodCUID:()=>uc,$ZodCUID2:()=>dc,$ZodCatch:()=>ol,$ZodCheck:()=>V,$ZodCheckBigIntFormat:()=>Us,$ZodCheckEndsWith:()=>Xs,$ZodCheckGreaterThan:()=>wo,$ZodCheckIncludes:()=>qs,$ZodCheckLengthEquals:()=>Vs,$ZodCheckLessThan:()=>bo,$ZodCheckLowerCase:()=>Hs,$ZodCheckMaxLength:()=>Bs,$ZodCheckMaxSize:()=>Fs,$ZodCheckMimeType:()=>ec,$ZodCheckMinLength:()=>Ks,$ZodCheckMinSize:()=>Gs,$ZodCheckMultipleOf:()=>zs,$ZodCheckNumberFormat:()=>Ms,$ZodCheckOverwrite:()=>tc,$ZodCheckProperty:()=>Qs,$ZodCheckRegex:()=>Ws,$ZodCheckSizeEquals:()=>Zs,$ZodCheckStartsWith:()=>Ys,$ZodCheckStringFormat:()=>cn,$ZodCheckUpperCase:()=>Js,$ZodCodec:()=>gr,$ZodCustom:()=>pl,$ZodCustomStringFormat:()=>Ic,$ZodDate:()=>Mc,$ZodDefault:()=>el,$ZodDiscriminatedUnion:()=>Zc,$ZodE164:()=>Tc,$ZodEmail:()=>ac,$ZodEmoji:()=>cc,$ZodEncodeError:()=>st,$ZodEnum:()=>Hc,$ZodError:()=>cr,$ZodExactOptional:()=>Xc,$ZodFile:()=>qc,$ZodFunction:()=>ll,$ZodGUID:()=>oc,$ZodIPv4:()=>_c,$ZodIPv6:()=>bc,$ZodISODate:()=>gc,$ZodISODateTime:()=>hc,$ZodISODuration:()=>vc,$ZodISOTime:()=>yc,$ZodIntersection:()=>Bc,$ZodJWT:()=>Ac,$ZodKSUID:()=>fc,$ZodLazy:()=>dl,$ZodLiteral:()=>Jc,$ZodMAC:()=>wc,$ZodMap:()=>Vc,$ZodNaN:()=>il,$ZodNanoID:()=>lc,$ZodNever:()=>Lc,$ZodNonOptional:()=>nl,$ZodNull:()=>Rc,$ZodNullable:()=>Qc,$ZodNumber:()=>Eo,$ZodNumberFormat:()=>Cc,$ZodObject:()=>_f,$ZodObjectJIT:()=>Fc,$ZodOptional:()=>Io,$ZodPipe:()=>Co,$ZodPrefault:()=>tl,$ZodPreprocess:()=>al,$ZodPromise:()=>ul,$ZodReadonly:()=>sl,$ZodRealError:()=>he,$ZodRecord:()=>Kc,$ZodRegistry:()=>Ro,$ZodSet:()=>Wc,$ZodString:()=>Nt,$ZodStringFormat:()=>B,$ZodSuccess:()=>rl,$ZodSymbol:()=>Oc,$ZodTemplateLiteral:()=>cl,$ZodTransform:()=>Yc,$ZodTuple:()=>Ao,$ZodType:()=>R,$ZodULID:()=>pc,$ZodURL:()=>sc,$ZodUUID:()=>ic,$ZodUndefined:()=>Nc,$ZodUnion:()=>hr,$ZodUnknown:()=>Dc,$ZodVoid:()=>zc,$ZodXID:()=>mc,$ZodXor:()=>Gc,$brand:()=>Wa,$constructor:()=>g,$input:()=>fl,$output:()=>ml,Doc:()=>mr,JSONSchema:()=>wh,JSONSchemaGenerator:()=>di,NEVER:()=>Va,TimePrecision:()=>vl,_any:()=>Ml,_array:()=>Vl,_base64:()=>Xo,_base64url:()=>Qo,_bigint:()=>Ol,_boolean:()=>Cl,_catch:()=>ax,_check:()=>bh,_cidrv4:()=>qo,_cidrv6:()=>Yo,_coercedBigint:()=>Nl,_coercedBoolean:()=>Pl,_coercedDate:()=>Bl,_coercedNumber:()=>Sl,_coercedString:()=>gl,_cuid:()=>Zo,_cuid2:()=>Bo,_custom:()=>Hl,_date:()=>Zl,_decode:()=>uo,_decodeAsync:()=>mo,_default:()=>rx,_discriminatedUnion:()=>Kk,_e164:()=>ei,_email:()=>Do,_emoji:()=>Fo,_encode:()=>lo,_encodeAsync:()=>po,_endsWith:()=>hn,_enum:()=>Yk,_file:()=>Wl,_float32:()=>El,_float64:()=>Tl,_gt:()=>Le,_gte:()=>ue,_guid:()=>_r,_includes:()=>mn,_int:()=>$l,_int32:()=>Al,_int64:()=>Rl,_intersection:()=>Vk,_ipv4:()=>Ho,_ipv6:()=>Jo,_isoDate:()=>bl,_isoDateTime:()=>_l,_isoDuration:()=>kl,_isoTime:()=>wl,_jwt:()=>ti,_ksuid:()=>Wo,_lazy:()=>ux,_length:()=>Dt,_literal:()=>Qk,_lowercase:()=>dn,_lt:()=>De,_lte:()=>xe,_mac:()=>yl,_map:()=>Jk,_max:()=>xe,_maxLength:()=>jt,_maxSize:()=>mt,_mime:()=>gn,_min:()=>ue,_minLength:()=>Je,_minSize:()=>ze,_multipleOf:()=>pt,_nan:()=>Kl,_nanoid:()=>Go,_nativeEnum:()=>Xk,_negative:()=>ri,_never:()=>Fl,_nonnegative:()=>ii,_nonoptional:()=>ox,_nonpositive:()=>oi,_normalize:()=>yn,_null:()=>zl,_nullable:()=>nx,_number:()=>xl,_optional:()=>tx,_overwrite:()=>Ie,_parse:()=>rn,_parseAsync:()=>on,_pipe:()=>sx,_positive:()=>ni,_promise:()=>dx,_property:()=>ai,_readonly:()=>cx,_record:()=>Hk,_refine:()=>Jl,_regex:()=>un,_safeDecode:()=>ho,_safeDecodeAsync:()=>yo,_safeEncode:()=>fo,_safeEncodeAsync:()=>go,_safeParse:()=>an,_safeParseAsync:()=>sn,_set:()=>qk,_size:()=>Rt,_slugify:()=>wn,_startsWith:()=>fn,_string:()=>hl,_stringFormat:()=>kn,_stringbool:()=>Ql,_success:()=>ix,_superRefine:()=>ql,_symbol:()=>Dl,_templateLiteral:()=>lx,_toLowerCase:()=>_n,_toUpperCase:()=>bn,_transform:()=>ex,_trim:()=>vn,_tuple:()=>Wk,_uint32:()=>Il,_uint64:()=>jl,_ulid:()=>Ko,_undefined:()=>Ll,_union:()=>Zk,_unknown:()=>Ul,_uppercase:()=>pn,_url:()=>br,_uuid:()=>Lo,_uuidv4:()=>zo,_uuidv6:()=>Mo,_uuidv7:()=>Uo,_void:()=>Gl,_xid:()=>Vo,_xor:()=>Bk,clone:()=>ce,config:()=>J,createStandardJSONSchemaMethod:()=>xn,createToJSONSchemaMethod:()=>eu,decode:()=>dw,decodeAsync:()=>mw,describe:()=>Yl,encode:()=>uw,encodeAsync:()=>pw,extractDefs:()=>ht,finalize:()=>gt,flattenError:()=>lr,formatError:()=>ur,globalConfig:()=>Ct,globalRegistry:()=>ne,initializeContext:()=>ft,isValidBase64:()=>Sc,isValidBase64URL:()=>hf,isValidJWT:()=>gf,locales:()=>vr,meta:()=>Xl,parse:()=>so,parseAsync:()=>co,prettifyError:()=>as,process:()=>Z,regexes:()=>ke,registry:()=>jo,safeDecode:()=>hw,safeDecodeAsync:()=>yw,safeEncode:()=>fw,safeEncodeAsync:()=>gw,safeParse:()=>ss,safeParseAsync:()=>cs,toDotPath:()=>Wm,toJSONSchema:()=>ui,treeifyError:()=>is,util:()=>k,version:()=>nc});var Gm,Va=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 Wa=Symbol("zod_brand"),Ae=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"}};(Gm=globalThis).__zod_globalConfig??(Gm.__zod_globalConfig={});var Ct=globalThis.__zod_globalConfig;function J(e){return e&&Object.assign(Ct,e),Ct}var k={};Ke(k,{BIGINT_FORMAT_RANGES:()=>rs,Class:()=>Ja,NUMBER_FORMAT_RANGES:()=>ns,aborted:()=>dt,allowsEval:()=>Xa,assert:()=>Gb,assertEqual:()=>zb,assertIs:()=>Ub,assertNever:()=>Fb,assertNotEqual:()=>Mb,assignProp:()=>lt,base64ToUint8Array:()=>Bm,base64urlToUint8Array:()=>iw,cached:()=>tn,captureStackTrace:()=>ao,cleanEnum:()=>ow,cleanRegex:()=>or,clone:()=>ce,cloneDef:()=>Bb,createTransparentProxy:()=>qb,defineLazy:()=>U,esc:()=>io,escapeRegex:()=>Ee,explicitlyAborted:()=>os,extend:()=>Qb,finalizeIssue:()=>le,floatSafeRemainder:()=>qa,getElementAtPath:()=>Kb,getEnumValues:()=>rr,getLengthableOrigin:()=>sr,getParsedType:()=>Jb,getSizableOrigin:()=>ar,hexToUint8Array:()=>sw,isObject:()=>Pt,isPlainObject:()=>ut,issue:()=>nn,joinValues:()=>y,jsonStringifyReplacer:()=>en,merge:()=>tw,mergeDefs:()=>He,normalizeParams:()=>x,nullish:()=>ct,numKeys:()=>Hb,objectClone:()=>Zb,omit:()=>Xb,optionalKeys:()=>ts,parsedType:()=>w,partial:()=>nw,pick:()=>Yb,prefixIssues:()=>fe,primitiveTypes:()=>es,promiseAllObject:()=>Vb,propertyKeyTypes:()=>ir,randomString:()=>Wb,required:()=>rw,safeExtend:()=>ew,shallowClone:()=>Qa,slugify:()=>Ya,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Km,uint8ArrayToBase64url:()=>aw,uint8ArrayToHex:()=>cw,unwrapMessage:()=>nr});function zb(e){return e}function Mb(e){return e}function Ub(e){}function Fb(e){throw new Error("Unexpected value in exhaustive check")}function Gb(e){}function rr(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 or(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function qa(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 Zm=Symbol("evaluating");function U(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==Zm)return o===void 0&&(o=Zm,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Zb(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 Bb(e){return He(e._zod.def)}function Kb(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function Vb(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 Wb(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function io(e){return JSON.stringify(e)}function Ya(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ao="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xa=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 Qa(e){return ut(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Hb(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Jb=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}`)}},ir=new Set(["string","number","symbol"]),es=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ce(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 qb(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 ts(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var ns={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]},rs={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Yb(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 ce(e,i)}function Xb(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 ce(e,i)}function Qb(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 ce(e,n)}function ew(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 ce(e,r)}function tw(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 ce(e,r)}function nw(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 ce(t,a)}function rw(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 ce(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 os(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 nr(e){return typeof e=="string"?e:e?.message}function le(e,t,r){let o=e.message?e.message:nr(e.inst?._zod.def?.error?.(e))??nr(t?.error?.(e))??nr(r.customError?.(e))??nr(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 ar(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function sr(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 ow(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Bm(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Km(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function iw(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Bm(t+r)}function aw(e){return Km(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function sw(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 cw(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Ja=class{constructor(...t){}};var Vm=(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})},cr=g("$ZodError",Vm),he=g("$ZodError",Vm,{Parent:Error});function lr(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 ur(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 is(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 Wm(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 as(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 ${Wm(o.path)}`);return t.join(`
|
|
7266
|
-
`)}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 Ae;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>le(c,i,J())));throw ao(s,n?.callee),s}return a.value},so=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=>le(c,i,J())));throw ao(s,n?.callee),s}return a.value},co=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 Ae;return i.issues.length?{success:!1,error:new(e??cr)(i.issues.map(a=>le(a,n,J())))}:{success:!0,data:i.value}},ss=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=>le(a,n,J())))}:{success:!0,data:i.value}},cs=sn(he),lo=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return rn(e)(t,r,n)},uw=lo(he),uo=e=>(t,r,o)=>rn(e)(t,r,o),dw=uo(he),po=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return on(e)(t,r,n)},pw=po(he),mo=e=>async(t,r,o)=>on(e)(t,r,o),mw=mo(he),fo=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return an(e)(t,r,n)},fw=fo(he),ho=e=>(t,r,o)=>an(e)(t,r,o),hw=ho(he),go=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return sn(e)(t,r,n)},gw=go(he),yo=e=>async(t,r,o)=>sn(e)(t,r,o),yw=yo(he);var ke={};Ke(ke,{base64:()=>Ss,base64url:()=>vo,bigint:()=>Ps,boolean:()=>Ns,browserEmail:()=>$w,cidrv4:()=>ks,cidrv6:()=>xs,cuid:()=>ls,cuid2:()=>us,date:()=>Ts,datetime:()=>Is,domain:()=>Aw,duration:()=>hs,e164:()=>Es,email:()=>ys,emoji:()=>vs,extendedDuration:()=>vw,guid:()=>gs,hex:()=>Iw,hostname:()=>Tw,html5Email:()=>kw,httpProtocol:()=>$s,idnEmail:()=>Sw,integer:()=>Os,ipv4:()=>_s,ipv6:()=>bs,ksuid:()=>ms,lowercase:()=>Ds,mac:()=>ws,md5_base64:()=>Pw,md5_base64url:()=>Ow,md5_hex:()=>Cw,nanoid:()=>fs,null:()=>Rs,number:()=>_o,rfc5322Email:()=>xw,sha1_base64:()=>Rw,sha1_base64url:()=>jw,sha1_hex:()=>Nw,sha256_base64:()=>Lw,sha256_base64url:()=>zw,sha256_hex:()=>Dw,sha384_base64:()=>Uw,sha384_base64url:()=>Fw,sha384_hex:()=>Mw,sha512_base64:()=>Zw,sha512_base64url:()=>Bw,sha512_hex:()=>Gw,string:()=>Cs,time:()=>As,ulid:()=>ds,undefined:()=>js,unicodeEmail:()=>Hm,uppercase:()=>Ls,uuid:()=>Ot,uuid4:()=>_w,uuid6:()=>bw,uuid7:()=>ww,xid:()=>ps});var ls=/^[cC][0-9a-z]{6,}$/,us=/^[0-9a-z]+$/,ds=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ps=/^[0-9a-vA-V]{20}$/,ms=/^[A-Za-z0-9]{27}$/,fs=/^[a-zA-Z0-9_-]{21}$/,hs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vw=/^[-+]?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)?)??$/,gs=/^([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)$/,_w=Ot(4),bw=Ot(6),ww=Ot(7),ys=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,kw=/^[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])?)*$/,xw=/^(([^<>()\[\]\\.,;:\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,}))$/,Hm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Sw=Hm,$w=/^[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])?)*$/,Ew="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vs(){return new RegExp(Ew,"u")}var _s=/^(?:(?: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])$/,bs=/^(([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}|:))$/,ws=e=>{let t=Ee(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ks=/^((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])$/,xs=/^(([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])$/,Ss=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vo=/^[A-Za-z0-9_-]*$/,Tw=/^(?=.{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])?)*\.?$/,Aw=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,$s=/^https?$/,Es=/^\+[1-9]\d{6,14}$/,Jm="(?:(?:\\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])))",Ts=new RegExp(`^${Jm}$`);function qm(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 As(e){return new RegExp(`^${qm(e)}$`)}function Is(e){let t=qm({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(`^${Jm}T(?:${o})$`)}var Cs=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ps=/^-?\d+n?$/,Os=/^-?\d+$/,_o=/^-?\d+(?:\.\d+)?$/,Ns=/^(?:true|false)$/i,Rs=/^null$/i;var js=/^undefined$/i;var Ds=/^[^A-Z]*$/,Ls=/^[^a-z]*$/,Iw=/^[0-9a-fA-F]*$/;function dr(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function pr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Cw=/^[0-9a-fA-F]{32}$/,Pw=dr(22,"=="),Ow=pr(22),Nw=/^[0-9a-fA-F]{40}$/,Rw=dr(27,"="),jw=pr(27),Dw=/^[0-9a-fA-F]{64}$/,Lw=dr(43,"="),zw=pr(43),Mw=/^[0-9a-fA-F]{96}$/,Uw=dr(64,""),Fw=pr(64),Gw=/^[0-9a-fA-F]{128}$/,Zw=dr(86,"=="),Bw=pr(86);var V=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Xm={number:"number",bigint:"bigint",object:"date"},bo=g("$ZodCheckLessThan",(e,t)=>{V.init(e,t);let r=Xm[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})}}),wo=g("$ZodCheckGreaterThan",(e,t)=>{V.init(e,t);let r=Xm[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):qa(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})}}),Ms=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]=ns[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=Os)}),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})}}),Us=g("$ZodCheckBigIntFormat",(e,t)=>{V.init(e,t);let[r,o]=rs[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})}}),Fs=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:ar(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Gs=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:ar(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Zs=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:ar(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})}}),Bs=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=sr(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ks=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=sr(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Vs=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=sr(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=()=>{})}),Ws=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})}}),Hs=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ds),cn.init(e,t)}),Js=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ls),cn.init(e,t)}),qs=g("$ZodCheckIncludes",(e,t)=>{V.init(e,t);let r=Ee(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})}}),Ys=g("$ZodCheckStartsWith",(e,t)=>{V.init(e,t);let r=new RegExp(`^${Ee(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})}}),Xs=g("$ZodCheckEndsWith",(e,t)=>{V.init(e,t);let r=new RegExp(`.*${Ee(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 Ym(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues))}var Qs=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=>Ym(n,r,t.property));Ym(o,r,t.property)}}),ec=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})}}),tc=g("$ZodCheckOverwrite",(e,t)=>{V.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var mr=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(`
|
|
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(`
|
|
7267
7048
|
`).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(`
|
|
7268
|
-
`))}};var nc={major:4,minor:4,patch:3};var R=g("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=nc;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(os(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 Ae;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 Ae;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 Ae;return c.then(l=>n(l,o,s))}return n(c,o,s)}}U(e,"~standard",()=>({validate:n=>{try{let i=ss(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return cs(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Nt=g("$ZodString",(e,t)=>{R.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Cs(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)}),oc=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gs),B.init(e,t)}),ic=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)}),ac=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=ys),B.init(e,t)}),sc=g("$ZodURL",(e,t)=>{B.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===$s.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})}}}),cc=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vs()),B.init(e,t)}),lc=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=fs),B.init(e,t)}),uc=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ls),B.init(e,t)}),dc=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=us),B.init(e,t)}),pc=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=ds),B.init(e,t)}),mc=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ps),B.init(e,t)}),fc=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=ms),B.init(e,t)}),hc=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Is(t)),B.init(e,t)}),gc=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ts),B.init(e,t)}),yc=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=As(t)),B.init(e,t)}),vc=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=hs),B.init(e,t)}),_c=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=_s),B.init(e,t),e._zod.bag.format="ipv4"}),bc=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bs),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})}}}),wc=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=ws(t.delimiter)),B.init(e,t),e._zod.bag.format="mac"}),kc=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ks),B.init(e,t)}),xc=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=xs),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 Sc(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var $c=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ss),B.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Sc(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function hf(e){if(!vo.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Sc(r)}var Ec=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=vo),B.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{hf(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Tc=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Es),B.init(e,t)});function gf(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 Ac=g("$ZodJWT",(e,t)=>{B.init(e,t),e._zod.check=r=>{gf(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ic=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})}}),Eo=g("$ZodNumber",(e,t)=>{R.init(e,t),e._zod.pattern=e._zod.bag.pattern??_o,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}}),Cc=g("$ZodNumberFormat",(e,t)=>{Ms.init(e,t),Eo.init(e,t)}),fr=g("$ZodBoolean",(e,t)=>{R.init(e,t),e._zod.pattern=Ns,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}}),To=g("$ZodBigInt",(e,t)=>{R.init(e,t),e._zod.pattern=Ps,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}}),Pc=g("$ZodBigIntFormat",(e,t)=>{Us.init(e,t),To.init(e,t)}),Oc=g("$ZodSymbol",(e,t)=>{R.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}}),Nc=g("$ZodUndefined",(e,t)=>{R.init(e,t),e._zod.pattern=js,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}}),Rc=g("$ZodNull",(e,t)=>{R.init(e,t),e._zod.pattern=Rs,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}}),jc=g("$ZodAny",(e,t)=>{R.init(e,t),e._zod.parse=r=>r}),Dc=g("$ZodUnknown",(e,t)=>{R.init(e,t),e._zod.parse=r=>r}),Lc=g("$ZodNever",(e,t)=>{R.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)=>{R.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}}),Mc=g("$ZodDate",(e,t)=>{R.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 ef(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues)),t.value[r]=e.value}var Uc=g("$ZodArray",(e,t)=>{R.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=>ef(l,r,a))):ef(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function $o(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 yf(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=ts(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function vf(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=>$o(h,r,m,t,d,p))):$o(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 _f=g("$ZodObject",(e,t)=>{if(R.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(()=>yf(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",S=f._zod.run({value:l[m],issues:[]},c);S instanceof Promise?d.push(S.then(O=>$o(O,s,m,l,h,b))):$o(S,s,m,l,h,b)}return i?vf(d,l,s,c,o.value,e):d.length?Promise.all(d).then(()=>s):s}}),Fc=g("$ZodObjectJIT",(e,t)=>{_f.init(e,t);let r=e._zod.parse,o=tn(()=>yf(t)),n=m=>{let f=new mr(["shape","payload","ctx"]),h=o.value,b=te=>{let G=io(te);return`shape[${G}]._zod.run({ value: input[${G}], issues: [] }, ctx)`};f.write("const input = payload.value;");let S=Object.create(null),O=0;for(let te of h.keys)S[te]=`key_${O++}`;f.write("const newResult = {};");for(let te of h.keys){let G=S[te],N=io(te),q=m[te],Et=q?._zod?.optin==="optional",ot=q?._zod?.optout==="optional";f.write(`const ${G} = ${b(te)};`),Et&&ot?f.write(`
|
|
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(`
|
|
7269
7050
|
if (${G}.issues.length) {
|
|
7270
7051
|
if (${N} in input) {
|
|
7271
7052
|
payload.issues = payload.issues.concat(${G}.issues.map(iss => ({
|
|
@@ -7324,55 +7105,55 @@ main().catch((error) => {
|
|
|
7324
7105
|
}
|
|
7325
7106
|
}
|
|
7326
7107
|
|
|
7327
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");let j=f.compile();return(te,G)=>j(m,te,G)},i,a=Pt,s=!Ct.jitless,l=s&&Xa.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?vf([],h,m,f,p,e):m):r(m,f):(m.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),m)}});function tf(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=>le(a,o,J())))}),t)}var hr=g("$ZodUnion",(e,t)=>{R.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=>or(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=>tf(s,o,e,n)):tf(a,o,e,n)}});function nf(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=>le(a,o,J())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var Gc=g("$ZodXor",(e,t)=>{hr.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=>nf(s,o,e,n)):nf(a,o,e,n)}}),Zc=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,hr.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)}}),Bc=g("$ZodIntersection",(e,t)=>{R.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])=>rf(r,c,l)):rf(r,i,a)}});function rc(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=rc(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=rc(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 rf(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=rc(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 Ao=g("$ZodTuple",(e,t)=>{R.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=of(r,"optin"),c=of(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=>af(h,o,d))):af(f,o,d)}}return a.length?Promise.all(a).then(()=>sf(l,o,r,i,c)):sf(l,o,r,i,c)}});function of(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function af(e,t,r){e.issues.length&&t.issues.push(...fe(r,e.issues)),t.value[r]=e.value}function sf(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 Kc=g("$ZodRecord",(e,t)=>{R.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=>le(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"&&_o.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=>le(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}}),Vc=g("$ZodMap",(e,t)=>{R.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])=>{cf(d,p,r,a,n,e,o)})):cf(c,l,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function cf(e,t,r,o,n,i,a){e.issues.length&&(ir.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=>le(s,a,J()))})),t.issues.length&&(ir.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=>le(s,a,J()))})),r.value.set(e.value,t.value)}var Wc=g("$ZodSet",(e,t)=>{R.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=>lf(c,r))):lf(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function lf(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Hc=g("$ZodEnum",(e,t)=>{R.init(e,t);let r=rr(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>ir.has(typeof n)).map(n=>typeof n=="string"?Ee(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}}),Jc=g("$ZodLiteral",(e,t)=>{if(R.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"?Ee(o):o?Ee(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}}),qc=g("$ZodFile",(e,t)=>{R.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}}),Yc=g("$ZodTransform",(e,t)=>{R.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 Ae;return r.value=n,r.fallback=!0,r}});function uf(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Io=g("$ZodOptional",(e,t)=>{R.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(`^(${or(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=>uf(a,n)):uf(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Xc=g("$ZodExactOptional",(e,t)=>{Io.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)}),Qc=g("$ZodNullable",(e,t)=>{R.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(`^(${or(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)}),el=g("$ZodDefault",(e,t)=>{R.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=>df(i,t)):df(n,t)}});function df(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tl=g("$ZodPrefault",(e,t)=>{R.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))}),nl=g("$ZodNonOptional",(e,t)=>{R.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=>pf(i,e)):pf(n,e)}});function pf(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 rl=g("$ZodSuccess",(e,t)=>{R.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)}}),ol=g("$ZodCatch",(e,t)=>{R.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=>le(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=>le(i,o,J()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),il=g("$ZodNaN",(e,t)=>{R.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)}),Co=g("$ZodPipe",(e,t)=>{R.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=>ko(a,t.in,o)):ko(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>ko(i,t.out,o)):ko(n,t.out,o)}});function ko(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 gr=g("$ZodCodec",(e,t)=>{R.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=>xo(a,t,o)):xo(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>xo(a,t,o)):xo(i,t,o)}}});function xo(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=>So(e,i,t.out,r)):So(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>So(e,i,t.in,r)):So(e,n,t.in,r)}}function So(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var al=g("$ZodPreprocess",(e,t)=>{Co.init(e,t)}),sl=g("$ZodReadonly",(e,t)=>{R.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(mf):mf(n)}});function mf(e){return e.value=Object.freeze(e.value),e}var cl=g("$ZodTemplateLiteral",(e,t)=>{R.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||es.has(typeof o))r.push(Ee(`${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)}),ll=g("$ZodFunction",(e,t)=>(R.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?so(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?so(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 co(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await co(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 Ao({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)),ul=g("$ZodPromise",(e,t)=>{R.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),dl=g("$ZodLazy",(e,t)=>{R.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)}),pl=g("$ZodCustom",(e,t)=>{V.init(e,t),R.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=>ff(i,r,o,e));ff(n,r,o,e)}});function ff(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 vr={};Ke(vr,{ar:()=>bf,az:()=>wf,be:()=>xf,bg:()=>Sf,ca:()=>$f,cs:()=>Ef,da:()=>Tf,de:()=>Af,el:()=>If,en:()=>Po,eo:()=>Cf,es:()=>Pf,fa:()=>Of,fi:()=>Nf,fr:()=>Rf,frCA:()=>jf,he:()=>Df,hr:()=>Lf,hu:()=>zf,hy:()=>Uf,id:()=>Ff,is:()=>Gf,it:()=>Zf,ja:()=>Bf,ka:()=>Kf,kh:()=>Vf,km:()=>Oo,ko:()=>Wf,lt:()=>Jf,mk:()=>qf,ms:()=>Yf,nl:()=>Xf,no:()=>Qf,ota:()=>eh,pl:()=>nh,ps:()=>th,pt:()=>rh,ro:()=>oh,ru:()=>ah,sl:()=>sh,sv:()=>ch,ta:()=>lh,th:()=>uh,tr:()=>dh,ua:()=>ph,uk:()=>No,ur:()=>mh,uz:()=>fh,vi:()=>hh,yo:()=>vh,zhCN:()=>gh,zhTW:()=>yh});var Vw=()=>{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 bf(){return{localeError:Vw()}}var Ww=()=>{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 wf(){return{localeError:Ww()}}function kf(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 Hw=()=>{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=kf(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=kf(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 xf(){return{localeError:Hw()}}var Jw=()=>{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 Sf(){return{localeError:Jw()}}var qw=()=>{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 $f(){return{localeError:qw()}}var Yw=()=>{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 Ef(){return{localeError:Yw()}}var Xw=()=>{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 Tf(){return{localeError:Xw()}}var Qw=()=>{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 Af(){return{localeError:Qw()}}var ek=()=>{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 If(){return{localeError:ek()}}var tk=()=>{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 Po(){return{localeError:tk()}}var nk=()=>{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 Cf(){return{localeError:nk()}}var rk=()=>{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 Pf(){return{localeError:rk()}}var ok=()=>{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 Of(){return{localeError:ok()}}var ik=()=>{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 Nf(){return{localeError:ik()}}var ak=()=>{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 Rf(){return{localeError:ak()}}var sk=()=>{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 jf(){return{localeError:sk()}}var ck=()=>{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 S=(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 ${S}`}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 Df(){return{localeError:ck()}}var lk=()=>{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 Lf(){return{localeError:lk()}}var uk=()=>{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 zf(){return{localeError:uk()}}function Mf(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 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=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=Mf(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=Mf(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 Uf(){return{localeError:dk()}}var pk=()=>{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 Ff(){return{localeError:pk()}}var mk=()=>{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 Gf(){return{localeError:mk()}}var fk=()=>{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 Zf(){return{localeError:fk()}}var hk=()=>{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 Bf(){return{localeError:hk()}}var gk=()=>{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 Kf(){return{localeError:gk()}}var yk=()=>{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 Oo(){return{localeError:yk()}}function Vf(){return Oo()}var vk=()=>{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 Wf(){return{localeError:vk()}}var yr=e=>e.charAt(0).toUpperCase()+e.slice(1);function Hf(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 _k=()=>{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,Hf(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${yr(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`${yr(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,Hf(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${yr(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`${yr(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`${yr(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Jf(){return{localeError:_k()}}var bk=()=>{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 qf(){return{localeError:bk()}}var wk=()=>{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 Yf(){return{localeError:wk()}}var kk=()=>{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 Xf(){return{localeError:kk()}}var xk=()=>{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 Qf(){return{localeError:xk()}}var Sk=()=>{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 eh(){return{localeError:Sk()}}var $k=()=>{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 th(){return{localeError:$k()}}var Ek=()=>{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 nh(){return{localeError:Ek()}}var Tk=()=>{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 rh(){return{localeError:Tk()}}var Ak=()=>{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 oh(){return{localeError:Ak()}}function ih(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 Ik=()=>{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=ih(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=ih(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 ah(){return{localeError:Ik()}}var Ck=()=>{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 sh(){return{localeError:Ck()}}var Pk=()=>{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 ch(){return{localeError:Pk()}}var Ok=()=>{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 lh(){return{localeError:Ok()}}var Nk=()=>{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 uh(){return{localeError:Nk()}}var Rk=()=>{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 dh(){return{localeError:Rk()}}var jk=()=>{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 No(){return{localeError:jk()}}function ph(){return No()}var Dk=()=>{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 mh(){return{localeError:Dk()}}var Lk=()=>{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 fh(){return{localeError:Lk()}}var zk=()=>{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 hh(){return{localeError:zk()}}var Mk=()=>{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 gh(){return{localeError:Mk()}}var Uk=()=>{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 yh(){return{localeError:Uk()}}var Fk=()=>{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 vh(){return{localeError:Fk()}}var _h,ml=Symbol("ZodOutput"),fl=Symbol("ZodInput"),Ro=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 jo(){return new Ro}(_h=globalThis).__zod_globalRegistry??(_h.__zod_globalRegistry=jo());var ne=globalThis.__zod_globalRegistry;function hl(e,t){return new e({type:"string",...x(t)})}function gl(e,t){return new e({type:"string",coerce:!0,...x(t)})}function Do(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...x(t)})}function _r(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...x(t)})}function Lo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...x(t)})}function zo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...x(t)})}function Mo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...x(t)})}function Uo(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...x(t)})}function br(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...x(t)})}function Fo(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...x(t)})}function Go(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...x(t)})}function Zo(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...x(t)})}function Bo(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...x(t)})}function Ko(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...x(t)})}function Vo(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...x(t)})}function Wo(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...x(t)})}function Ho(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...x(t)})}function Jo(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...x(t)})}function yl(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 Yo(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...x(t)})}function Xo(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...x(t)})}function Qo(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...x(t)})}function ei(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...x(t)})}function ti(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...x(t)})}var vl={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _l(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...x(t)})}function bl(e,t){return new e({type:"string",format:"date",check:"string_format",...x(t)})}function wl(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...x(t)})}function kl(e,t){return new e({type:"string",format:"duration",check:"string_format",...x(t)})}function xl(e,t){return new e({type:"number",checks:[],...x(t)})}function Sl(e,t){return new e({type:"number",coerce:!0,checks:[],...x(t)})}function $l(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...x(t)})}function El(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...x(t)})}function Tl(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...x(t)})}function Al(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...x(t)})}function Il(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...x(t)})}function Cl(e,t){return new e({type:"boolean",...x(t)})}function Pl(e,t){return new e({type:"boolean",coerce:!0,...x(t)})}function Ol(e,t){return new e({type:"bigint",...x(t)})}function Nl(e,t){return new e({type:"bigint",coerce:!0,...x(t)})}function Rl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...x(t)})}function jl(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...x(t)})}function Dl(e,t){return new e({type:"symbol",...x(t)})}function Ll(e,t){return new e({type:"undefined",...x(t)})}function zl(e,t){return new e({type:"null",...x(t)})}function Ml(e){return new e({type:"any"})}function Ul(e){return new e({type:"unknown"})}function Fl(e,t){return new e({type:"never",...x(t)})}function Gl(e,t){return new e({type:"void",...x(t)})}function Zl(e,t){return new e({type:"date",...x(t)})}function Bl(e,t){return new e({type:"date",coerce:!0,...x(t)})}function Kl(e,t){return new e({type:"nan",...x(t)})}function De(e,t){return new bo({check:"less_than",...x(t),value:e,inclusive:!1})}function xe(e,t){return new bo({check:"less_than",...x(t),value:e,inclusive:!0})}function Le(e,t){return new wo({check:"greater_than",...x(t),value:e,inclusive:!1})}function ue(e,t){return new wo({check:"greater_than",...x(t),value:e,inclusive:!0})}function ni(e){return Le(0,e)}function ri(e){return De(0,e)}function oi(e){return xe(0,e)}function ii(e){return ue(0,e)}function pt(e,t){return new zs({check:"multiple_of",...x(t),value:e})}function mt(e,t){return new Fs({check:"max_size",...x(t),maximum:e})}function ze(e,t){return new Gs({check:"min_size",...x(t),minimum:e})}function Rt(e,t){return new Zs({check:"size_equals",...x(t),size:e})}function jt(e,t){return new Bs({check:"max_length",...x(t),maximum:e})}function Je(e,t){return new Ks({check:"min_length",...x(t),minimum:e})}function Dt(e,t){return new Vs({check:"length_equals",...x(t),length:e})}function un(e,t){return new Ws({check:"string_format",format:"regex",...x(t),pattern:e})}function dn(e){return new Hs({check:"string_format",format:"lowercase",...x(e)})}function pn(e){return new Js({check:"string_format",format:"uppercase",...x(e)})}function mn(e,t){return new qs({check:"string_format",format:"includes",...x(t),includes:e})}function fn(e,t){return new Ys({check:"string_format",format:"starts_with",...x(t),prefix:e})}function hn(e,t){return new Xs({check:"string_format",format:"ends_with",...x(t),suffix:e})}function ai(e,t,r){return new Qs({check:"property",property:e,schema:t,...x(r)})}function gn(e,t){return new ec({check:"mime_type",mime:e,...x(t)})}function Ie(e){return new tc({check:"overwrite",tx:e})}function yn(e){return Ie(t=>t.normalize(e))}function vn(){return Ie(e=>e.trim())}function _n(){return Ie(e=>e.toLowerCase())}function bn(){return Ie(e=>e.toUpperCase())}function wn(){return Ie(e=>Ya(e))}function Vl(e,t,r){return new e({type:"array",element:t,...x(r)})}function Zk(e,t,r){return new e({type:"union",options:t,...x(r)})}function Bk(e,t,r){return new e({type:"union",options:t,inclusive:!1,...x(r)})}function Kk(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...x(o)})}function Vk(e,t,r){return new e({type:"intersection",left:t,right:r})}function Wk(e,t,r,o){let n=r instanceof R,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...x(i)})}function Hk(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...x(o)})}function Jk(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...x(o)})}function qk(e,t,r){return new e({type:"set",valueType:t,...x(r)})}function Yk(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 Xk(e,t,r){return new e({type:"enum",entries:t,...x(r)})}function Qk(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...x(r)})}function Wl(e,t){return new e({type:"file",...x(t)})}function ex(e,t){return new e({type:"transform",transform:t})}function tx(e,t){return new e({type:"optional",innerType:t})}function nx(e,t){return new e({type:"nullable",innerType:t})}function rx(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Qa(r)}})}function ox(e,t,r){return new e({type:"nonoptional",innerType:t,...x(r)})}function ix(e,t){return new e({type:"success",innerType:t})}function ax(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function sx(e,t,r){return new e({type:"pipe",in:t,out:r})}function cx(e,t){return new e({type:"readonly",innerType:t})}function lx(e,t,r){return new e({type:"template_literal",parts:t,...x(r)})}function ux(e,t){return new e({type:"lazy",getter:t})}function dx(e,t){return new e({type:"promise",innerType:t})}function Hl(e,t,r){let o=x(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function Jl(e,t,r){return new e({type:"custom",check:"custom",fn:t,...x(r)})}function ql(e,t){let r=bh(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 bh(e,t){let r=new V({check:"custom",...x(t)});return r._zod.check=e,r}function Yl(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 Xl(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 Ql(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??gr,c=e.Boolean??fr,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"&&de(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>
|
|
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>
|
|
7328
7109
|
|
|
7329
|
-
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 S in l)S==="$ref"||S==="allOf"||S in d||delete l[S];if(h.$ref&&f.def)for(let S in l)S==="$ref"||S==="allOf"||S in f.def&&JSON.stringify(l[S])===JSON.stringify(f.def[S])&&delete l[S]}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 de(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 de(o.element,r);if(o.type==="set")return de(o.valueType,r);if(o.type==="lazy")return de(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 de(o.innerType,r);if(o.type==="intersection")return de(o.left,r)||de(o.right,r);if(o.type==="record"||o.type==="map")return de(o.keyType,r)||de(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:de(o.in,r)||de(o.out,r);if(o.type==="object"){for(let n in o.shape)if(de(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(de(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(de(n,r))return!0;return!!(o.rest&&de(o.rest,r))}return!1}var eu=(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 px={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},tu=(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=px[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}))])}},nu=(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)},ru=(e,t,r,o)=>{r.type="boolean"},ou=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},iu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},au=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},su=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},cu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},lu=(e,t,r,o)=>{r.not={}},uu=(e,t,r,o)=>{},du=(e,t,r,o)=>{},pu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},mu=(e,t,r,o)=>{let n=e._zod.def,i=rr(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},fu=(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},hu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},gu=(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},yu=(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)},vu=(e,t,r,o)=>{r.type="boolean"},_u=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},bu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},wu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ku=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},xu=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Su=(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"]})},$u=(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)},ci=(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},Eu=(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},Tu=(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)},Au=(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)}},Iu=(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"}]},Cu=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Pu=(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))},Ou=(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)))},Nu=(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},Ru=(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},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,r.readOnly=!0},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},li=(e,t,r,o)=>{let n=e._zod.def;Z(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Lu=(e,t,r,o)=>{let n=e._zod.innerType;Z(n,t,o);let i=t.seen.get(e);i.ref=n},si={string:tu,number:nu,boolean:ru,bigint:ou,symbol:iu,null:au,undefined:su,void:cu,never:lu,any:uu,unknown:du,date:pu,enum:mu,literal:fu,nan:hu,template_literal:gu,file:yu,success:vu,custom:_u,function:bu,transform:wu,map:ku,set:xu,array:Su,object:$u,union:ci,intersection:Eu,tuple:Tu,record:Au,nullable:Iu,nonoptional:Cu,default:Pu,prefault:Ou,catch:Nu,pipe:Ru,readonly:ju,promise:Du,optional:li,lazy:Lu};function ui(e,t){if("_idmap"in e){let o=e,n=ft({...t,processors:si}),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:si});return Z(e,r),ht(r,e),gt(r,e)}var di=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:si,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 wh={};var wr={};Ke(wr,{ZodAny:()=>sd,ZodArray:()=>dd,ZodBase64:()=>Oi,ZodBase64URL:()=>Ni,ZodBigInt:()=>Pn,ZodBigIntFormat:()=>Di,ZodBoolean:()=>Cn,ZodCIDRv4:()=>Ci,ZodCIDRv6:()=>Pi,ZodCUID:()=>xi,ZodCUID2:()=>Si,ZodCatch:()=>Nd,ZodCodec:()=>Nr,ZodCustom:()=>Rr,ZodCustomStringFormat:()=>An,ZodDate:()=>Ar,ZodDefault:()=>Td,ZodDiscriminatedUnion:()=>md,ZodE164:()=>Ri,ZodEmail:()=>bi,ZodEmoji:()=>wi,ZodEnum:()=>En,ZodExactOptional:()=>Sd,ZodFile:()=>kd,ZodFunction:()=>Zd,ZodGUID:()=>xr,ZodIPv4:()=>Ai,ZodIPv6:()=>Ii,ZodIntersection:()=>fd,ZodJWT:()=>ji,ZodKSUID:()=>Ti,ZodLazy:()=>Ud,ZodLiteral:()=>wd,ZodMAC:()=>ed,ZodMap:()=>_d,ZodNaN:()=>jd,ZodNanoID:()=>ki,ZodNever:()=>ld,ZodNonOptional:()=>Gi,ZodNull:()=>id,ZodNullable:()=>Ed,ZodNumber:()=>In,ZodNumberFormat:()=>zt,ZodObject:()=>Cr,ZodOptional:()=>Fi,ZodPipe:()=>Or,ZodPrefault:()=>Id,ZodPreprocess:()=>Dd,ZodPromise:()=>Gd,ZodReadonly:()=>Ld,ZodRecord:()=>$n,ZodSet:()=>bd,ZodString:()=>Tn,ZodStringFormat:()=>K,ZodSuccess:()=>Od,ZodSymbol:()=>rd,ZodTemplateLiteral:()=>Md,ZodTransform:()=>xd,ZodTuple:()=>gd,ZodType:()=>z,ZodULID:()=>$i,ZodURL:()=>Tr,ZodUUID:()=>Me,ZodUndefined:()=>od,ZodUnion:()=>Pr,ZodUnknown:()=>cd,ZodVoid:()=>ud,ZodXID:()=>Ei,ZodXor:()=>pd,_ZodString:()=>_i,_default:()=>Ad,_function:()=>Cg,any:()=>sg,array:()=>Ir,base64:()=>Bh,base64url:()=>Kh,bigint:()=>ng,boolean:()=>nd,catch:()=>Rd,check:()=>Pg,cidrv4:()=>Gh,cidrv6:()=>Zh,codec:()=>Eg,cuid:()=>Rh,cuid2:()=>jh,custom:()=>Og,date:()=>lg,describe:()=>Ng,discriminatedUnion:()=>hg,e164:()=>Vh,email:()=>Sh,emoji:()=>Oh,enum:()=>Mi,exactOptional:()=>$d,file:()=>kg,float32:()=>Xh,float64:()=>Qh,function:()=>Cg,guid:()=>$h,hash:()=>Yh,hex:()=>qh,hostname:()=>Jh,httpUrl:()=>Ph,instanceof:()=>jg,int:()=>yi,int32:()=>eg,int64:()=>rg,intersection:()=>hd,invertCodec:()=>Tg,ipv4:()=>Mh,ipv6:()=>Fh,json:()=>Lg,jwt:()=>Wh,keyof:()=>ug,ksuid:()=>zh,lazy:()=>Fd,literal:()=>wg,looseObject:()=>mg,looseRecord:()=>yg,mac:()=>Uh,map:()=>vg,meta:()=>Rg,nan:()=>$g,nanoid:()=>Nh,nativeEnum:()=>bg,never:()=>Li,nonoptional:()=>Pd,null:()=>ad,nullable:()=>$r,nullish:()=>xg,number:()=>td,object:()=>dg,optional:()=>Sr,partialRecord:()=>gg,pipe:()=>vi,prefault:()=>Cd,preprocess:()=>zg,promise:()=>Ig,readonly:()=>zd,record:()=>vd,refine:()=>Bd,set:()=>_g,strictObject:()=>pg,string:()=>kr,stringFormat:()=>Hh,stringbool:()=>Dg,success:()=>Sg,superRefine:()=>Kd,symbol:()=>ig,templateLiteral:()=>Ag,transform:()=>Ui,tuple:()=>yd,uint32:()=>tg,uint64:()=>og,ulid:()=>Dh,undefined:()=>ag,union:()=>zi,unknown:()=>Lt,url:()=>Ch,uuid:()=>Eh,uuidv4:()=>Th,uuidv6:()=>Ah,uuidv7:()=>Ih,void:()=>cg,xid:()=>Lh,xor:()=>fg});var pi={};Ke(pi,{endsWith:()=>hn,gt:()=>Le,gte:()=>ue,includes:()=>mn,length:()=>Dt,lowercase:()=>dn,lt:()=>De,lte:()=>xe,maxLength:()=>jt,maxSize:()=>mt,mime:()=>gn,minLength:()=>Je,minSize:()=>ze,multipleOf:()=>pt,negative:()=>ri,nonnegative:()=>ii,nonpositive:()=>oi,normalize:()=>yn,overwrite:()=>Ie,positive:()=>ni,property:()=>ai,regex:()=>un,size:()=>Rt,slugify:()=>wn,startsWith:()=>fn,toLowerCase:()=>_n,toUpperCase:()=>bn,trim:()=>vn,uppercase:()=>pn});var Sn={};Ke(Sn,{ZodISODate:()=>fi,ZodISODateTime:()=>mi,ZodISODuration:()=>gi,ZodISOTime:()=>hi,date:()=>Mu,datetime:()=>zu,duration:()=>Fu,time:()=>Uu});var mi=g("ZodISODateTime",(e,t)=>{hc.init(e,t),K.init(e,t)});function zu(e){return _l(mi,e)}var fi=g("ZodISODate",(e,t)=>{gc.init(e,t),K.init(e,t)});function Mu(e){return bl(fi,e)}var hi=g("ZodISOTime",(e,t)=>{yc.init(e,t),K.init(e,t)});function Uu(e){return wl(hi,e)}var gi=g("ZodISODuration",(e,t)=>{vc.init(e,t),K.init(e,t)});function Fu(e){return kl(gi,e)}var kh=(e,t)=>{cr.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>ur(e,r)},flatten:{value:r=>lr(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}}})},fx=g("ZodError",kh),ge=g("ZodError",kh,{Parent:Error});var Gu=rn(ge),Zu=on(ge),Bu=an(ge),Ku=sn(ge),Vu=lo(ge),Wu=uo(ge),Hu=po(ge),Ju=mo(ge),qu=fo(ge),Yu=ho(ge),Xu=go(ge),Qu=yo(ge);var xh=new WeakMap;function Er(e,t,r){let o=Object.getPrototypeOf(e),n=xh.get(o);if(n||(n=new Set,xh.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 z=g("ZodType",(e,t)=>(R.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:xn(e,"input"),output:xn(e,"output")}}),e.toJSONSchema=eu(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>Gu(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Bu(e,r,o),e.parseAsync=async(r,o)=>Zu(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Ku(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>Vu(e,r,o),e.decode=(r,o)=>Wu(e,r,o),e.encodeAsync=async(r,o)=>Hu(e,r,o),e.decodeAsync=async(r,o)=>Ju(e,r,o),e.safeEncode=(r,o)=>qu(e,r,o),e.safeDecode=(r,o)=>Yu(e,r,o),e.safeEncodeAsync=async(r,o)=>Xu(e,r,o),e.safeDecodeAsync=async(r,o)=>Qu(e,r,o),Er(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 ce(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(Bd(r,o))},superRefine(r,o){return this.check(Kd(r,o))},overwrite(r){return this.check(Ie(r))},optional(){return Sr(this)},exactOptional(){return $d(this)},nullable(){return $r(this)},nullish(){return Sr($r(this))},nonoptional(r){return Pd(this,r)},array(){return Ir(this)},or(r){return zi([this,r])},and(r){return hd(this,r)},transform(r){return vi(this,Ui(r))},default(r){return Ad(this,r)},prefault(r){return Cd(this,r)},catch(r){return Rd(this,r)},pipe(r){return vi(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)),_i=g("_ZodString",(e,t)=>{Nt.init(e,t),z.init(e,t),e._zod.processJSONSchema=(o,n,i)=>tu(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Er(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),_i.init(e,t),e.email=r=>e.check(Do(bi,r)),e.url=r=>e.check(br(Tr,r)),e.jwt=r=>e.check(ti(ji,r)),e.emoji=r=>e.check(Fo(wi,r)),e.guid=r=>e.check(_r(xr,r)),e.uuid=r=>e.check(Lo(Me,r)),e.uuidv4=r=>e.check(zo(Me,r)),e.uuidv6=r=>e.check(Mo(Me,r)),e.uuidv7=r=>e.check(Uo(Me,r)),e.nanoid=r=>e.check(Go(ki,r)),e.guid=r=>e.check(_r(xr,r)),e.cuid=r=>e.check(Zo(xi,r)),e.cuid2=r=>e.check(Bo(Si,r)),e.ulid=r=>e.check(Ko($i,r)),e.base64=r=>e.check(Xo(Oi,r)),e.base64url=r=>e.check(Qo(Ni,r)),e.xid=r=>e.check(Vo(Ei,r)),e.ksuid=r=>e.check(Wo(Ti,r)),e.ipv4=r=>e.check(Ho(Ai,r)),e.ipv6=r=>e.check(Jo(Ii,r)),e.cidrv4=r=>e.check(qo(Ci,r)),e.cidrv6=r=>e.check(Yo(Pi,r)),e.e164=r=>e.check(ei(Ri,r)),e.datetime=r=>e.check(zu(r)),e.date=r=>e.check(Mu(r)),e.time=r=>e.check(Uu(r)),e.duration=r=>e.check(Fu(r))});function kr(e){return hl(Tn,e)}var K=g("ZodStringFormat",(e,t)=>{B.init(e,t),_i.init(e,t)}),bi=g("ZodEmail",(e,t)=>{ac.init(e,t),K.init(e,t)});function Sh(e){return Do(bi,e)}var xr=g("ZodGUID",(e,t)=>{oc.init(e,t),K.init(e,t)});function $h(e){return _r(xr,e)}var Me=g("ZodUUID",(e,t)=>{ic.init(e,t),K.init(e,t)});function Eh(e){return Lo(Me,e)}function Th(e){return zo(Me,e)}function Ah(e){return Mo(Me,e)}function Ih(e){return Uo(Me,e)}var Tr=g("ZodURL",(e,t)=>{sc.init(e,t),K.init(e,t)});function Ch(e){return br(Tr,e)}function Ph(e){return br(Tr,{protocol:ke.httpProtocol,hostname:ke.domain,...k.normalizeParams(e)})}var wi=g("ZodEmoji",(e,t)=>{cc.init(e,t),K.init(e,t)});function Oh(e){return Fo(wi,e)}var ki=g("ZodNanoID",(e,t)=>{lc.init(e,t),K.init(e,t)});function Nh(e){return Go(ki,e)}var xi=g("ZodCUID",(e,t)=>{uc.init(e,t),K.init(e,t)});function Rh(e){return Zo(xi,e)}var Si=g("ZodCUID2",(e,t)=>{dc.init(e,t),K.init(e,t)});function jh(e){return Bo(Si,e)}var $i=g("ZodULID",(e,t)=>{pc.init(e,t),K.init(e,t)});function Dh(e){return Ko($i,e)}var Ei=g("ZodXID",(e,t)=>{mc.init(e,t),K.init(e,t)});function Lh(e){return Vo(Ei,e)}var Ti=g("ZodKSUID",(e,t)=>{fc.init(e,t),K.init(e,t)});function zh(e){return Wo(Ti,e)}var Ai=g("ZodIPv4",(e,t)=>{_c.init(e,t),K.init(e,t)});function Mh(e){return Ho(Ai,e)}var ed=g("ZodMAC",(e,t)=>{wc.init(e,t),K.init(e,t)});function Uh(e){return yl(ed,e)}var Ii=g("ZodIPv6",(e,t)=>{bc.init(e,t),K.init(e,t)});function Fh(e){return Jo(Ii,e)}var Ci=g("ZodCIDRv4",(e,t)=>{kc.init(e,t),K.init(e,t)});function Gh(e){return qo(Ci,e)}var Pi=g("ZodCIDRv6",(e,t)=>{xc.init(e,t),K.init(e,t)});function Zh(e){return Yo(Pi,e)}var Oi=g("ZodBase64",(e,t)=>{$c.init(e,t),K.init(e,t)});function Bh(e){return Xo(Oi,e)}var Ni=g("ZodBase64URL",(e,t)=>{Ec.init(e,t),K.init(e,t)});function Kh(e){return Qo(Ni,e)}var Ri=g("ZodE164",(e,t)=>{Tc.init(e,t),K.init(e,t)});function Vh(e){return ei(Ri,e)}var ji=g("ZodJWT",(e,t)=>{Ac.init(e,t),K.init(e,t)});function Wh(e){return ti(ji,e)}var An=g("ZodCustomStringFormat",(e,t)=>{Ic.init(e,t),K.init(e,t)});function Hh(e,t,r={}){return kn(An,e,t,r)}function Jh(e){return kn(An,"hostname",ke.hostname,e)}function qh(e){return kn(An,"hex",ke.hex,e)}function Yh(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)=>{Eo.init(e,t),z.init(e,t),e._zod.processJSONSchema=(o,n,i)=>nu(e,o,n,i),Er(e,"ZodNumber",{gt(o,n){return this.check(Le(o,n))},gte(o,n){return this.check(ue(o,n))},min(o,n){return this.check(ue(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(yi(o))},safe(o){return this.check(yi(o))},positive(o){return this.check(Le(0,o))},nonnegative(o){return this.check(ue(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 td(e){return xl(In,e)}var zt=g("ZodNumberFormat",(e,t)=>{Cc.init(e,t),In.init(e,t)});function yi(e){return $l(zt,e)}function Xh(e){return El(zt,e)}function Qh(e){return Tl(zt,e)}function eg(e){return Al(zt,e)}function tg(e){return Il(zt,e)}var Cn=g("ZodBoolean",(e,t)=>{fr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ru(e,r,o,n)});function nd(e){return Cl(Cn,e)}var Pn=g("ZodBigInt",(e,t)=>{To.init(e,t),z.init(e,t),e._zod.processJSONSchema=(o,n,i)=>ou(e,o,n,i),e.gte=(o,n)=>e.check(ue(o,n)),e.min=(o,n)=>e.check(ue(o,n)),e.gt=(o,n)=>e.check(Le(o,n)),e.gte=(o,n)=>e.check(ue(o,n)),e.min=(o,n)=>e.check(ue(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(ue(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 ng(e){return Ol(Pn,e)}var Di=g("ZodBigIntFormat",(e,t)=>{Pc.init(e,t),Pn.init(e,t)});function rg(e){return Rl(Di,e)}function og(e){return jl(Di,e)}var rd=g("ZodSymbol",(e,t)=>{Oc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>iu(e,r,o,n)});function ig(e){return Dl(rd,e)}var od=g("ZodUndefined",(e,t)=>{Nc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>su(e,r,o,n)});function ag(e){return Ll(od,e)}var id=g("ZodNull",(e,t)=>{Rc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>au(e,r,o,n)});function ad(e){return zl(id,e)}var sd=g("ZodAny",(e,t)=>{jc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>uu(e,r,o,n)});function sg(){return Ml(sd)}var cd=g("ZodUnknown",(e,t)=>{Dc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>du(e,r,o,n)});function Lt(){return Ul(cd)}var ld=g("ZodNever",(e,t)=>{Lc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>lu(e,r,o,n)});function Li(e){return Fl(ld,e)}var ud=g("ZodVoid",(e,t)=>{zc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cu(e,r,o,n)});function cg(e){return Gl(ud,e)}var Ar=g("ZodDate",(e,t)=>{Mc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(o,n,i)=>pu(e,o,n,i),e.min=(o,n)=>e.check(ue(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 lg(e){return Zl(Ar,e)}var dd=g("ZodArray",(e,t)=>{Uc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Su(e,r,o,n),e.element=t.element,Er(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 Ir(e,t){return Vl(dd,e,t)}function ug(e){let t=e._zod.def.shape;return Mi(Object.keys(t))}var Cr=g("ZodObject",(e,t)=>{Fc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$u(e,r,o,n),k.defineLazy(e,"shape",()=>t.shape),Er(e,"ZodObject",{keyof(){return Mi(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:Li()})},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(Fi,this,r[0])},required(...r){return k.required(Gi,this,r[0])}})});function dg(e,t){let r={type:"object",shape:e??{},...k.normalizeParams(t)};return new Cr(r)}function pg(e,t){return new Cr({type:"object",shape:e,catchall:Li(),...k.normalizeParams(t)})}function mg(e,t){return new Cr({type:"object",shape:e,catchall:Lt(),...k.normalizeParams(t)})}var Pr=g("ZodUnion",(e,t)=>{hr.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ci(e,r,o,n),e.options=t.options});function zi(e,t){return new Pr({type:"union",options:e,...k.normalizeParams(t)})}var pd=g("ZodXor",(e,t)=>{Pr.init(e,t),Gc.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ci(e,r,o,n),e.options=t.options});function fg(e,t){return new pd({type:"union",options:e,inclusive:!1,...k.normalizeParams(t)})}var md=g("ZodDiscriminatedUnion",(e,t)=>{Pr.init(e,t),Zc.init(e,t)});function hg(e,t,r){return new md({type:"union",options:t,discriminator:e,...k.normalizeParams(r)})}var fd=g("ZodIntersection",(e,t)=>{Bc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Eu(e,r,o,n)});function hd(e,t){return new fd({type:"intersection",left:e,right:t})}var gd=g("ZodTuple",(e,t)=>{Ao.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tu(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function yd(e,t,r){let o=t instanceof R,n=o?r:t,i=o?t:null;return new gd({type:"tuple",items:e,rest:i,...k.normalizeParams(n)})}var $n=g("ZodRecord",(e,t)=>{Kc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Au(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function vd(e,t,r){return!t||!t._zod?new $n({type:"record",keyType:kr(),valueType:e,...k.normalizeParams(t)}):new $n({type:"record",keyType:e,valueType:t,...k.normalizeParams(r)})}function gg(e,t,r){let o=ce(e);return o._zod.values=void 0,new $n({type:"record",keyType:o,valueType:t,...k.normalizeParams(r)})}function yg(e,t,r){return new $n({type:"record",keyType:e,valueType:t,mode:"loose",...k.normalizeParams(r)})}var _d=g("ZodMap",(e,t)=>{Vc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ku(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 vg(e,t,r){return new _d({type:"map",keyType:e,valueType:t,...k.normalizeParams(r)})}var bd=g("ZodSet",(e,t)=>{Wc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xu(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 _g(e,t){return new bd({type:"set",valueType:e,...k.normalizeParams(t)})}var En=g("ZodEnum",(e,t)=>{Hc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(o,n,i)=>mu(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 Mi(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 bg(e,t){return new En({type:"enum",entries:e,...k.normalizeParams(t)})}var wd=g("ZodLiteral",(e,t)=>{Jc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fu(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 wg(e,t){return new wd({type:"literal",values:Array.isArray(e)?e:[e],...k.normalizeParams(t)})}var kd=g("ZodFile",(e,t)=>{qc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>yu(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 kg(e){return Wl(kd,e)}var xd=g("ZodTransform",(e,t)=>{Yc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wu(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 Ui(e){return new xd({type:"transform",transform:e})}var Fi=g("ZodOptional",(e,t)=>{Io.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>li(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Sr(e){return new Fi({type:"optional",innerType:e})}var Sd=g("ZodExactOptional",(e,t)=>{Xc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>li(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function $d(e){return new Sd({type:"optional",innerType:e})}var Ed=g("ZodNullable",(e,t)=>{Qc.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Iu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function $r(e){return new Ed({type:"nullable",innerType:e})}function xg(e){return Sr($r(e))}var Td=g("ZodDefault",(e,t)=>{el.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ad(e,t){return new Td({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}var Id=g("ZodPrefault",(e,t)=>{tl.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ou(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Cd(e,t){return new Id({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}var Gi=g("ZodNonOptional",(e,t)=>{nl.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Pd(e,t){return new Gi({type:"nonoptional",innerType:e,...k.normalizeParams(t)})}var Od=g("ZodSuccess",(e,t)=>{rl.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>vu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Sg(e){return new Od({type:"success",innerType:e})}var Nd=g("ZodCatch",(e,t)=>{ol.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Nu(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Rd(e,t){return new Nd({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var jd=g("ZodNaN",(e,t)=>{il.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hu(e,r,o,n)});function $g(e){return Kl(jd,e)}var Or=g("ZodPipe",(e,t)=>{Co.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ru(e,r,o,n),e.in=t.in,e.out=t.out});function vi(e,t){return new Or({type:"pipe",in:e,out:t})}var Nr=g("ZodCodec",(e,t)=>{Or.init(e,t),gr.init(e,t)});function Eg(e,t,r){return new Nr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Tg(e){let t=e._zod.def;return new Nr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Dd=g("ZodPreprocess",(e,t)=>{Or.init(e,t),al.init(e,t)}),Ld=g("ZodReadonly",(e,t)=>{sl.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ju(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function zd(e){return new Ld({type:"readonly",innerType:e})}var Md=g("ZodTemplateLiteral",(e,t)=>{cl.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>gu(e,r,o,n)});function Ag(e,t){return new Md({type:"template_literal",parts:e,...k.normalizeParams(t)})}var Ud=g("ZodLazy",(e,t)=>{dl.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lu(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function Fd(e){return new Ud({type:"lazy",getter:e})}var Gd=g("ZodPromise",(e,t)=>{ul.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Du(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ig(e){return new Gd({type:"promise",innerType:e})}var Zd=g("ZodFunction",(e,t)=>{ll.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>bu(e,r,o,n)});function Cg(e){return new Zd({type:"function",input:Array.isArray(e?.input)?yd(e?.input):e?.input??Ir(Lt()),output:e?.output??Lt()})}var Rr=g("ZodCustom",(e,t)=>{pl.init(e,t),z.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_u(e,r,o,n)});function Pg(e){let t=new V({check:"custom"});return t._zod.check=e,t}function Og(e,t){return Hl(Rr,e??(()=>!0),t)}function Bd(e,t={}){return Jl(Rr,e,t)}function Kd(e,t){return ql(e,t)}var Ng=Yl,Rg=Xl;function jg(e,t={}){let r=new Rr({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 Dg=(...e)=>Ql({Codec:Nr,Boolean:Cn,String:Tn},...e);function Lg(e){let t=Fd(()=>zi([kr(e),td(),nd(),ad(),Ir(t),vd(kr(),t)]));return t}function zg(e,t){return new Dd({type:"pipe",in:Ui(e),out:t})}var gx={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 yx(e){J({customError:e})}function vx(){return J().customError}var Vd;Vd||(Vd={});var E={...wr,...pi,iso:Sn},_x=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 bx(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 wx(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 Mg(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=wx(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 Mg(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=Mg(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))_x.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 Ug(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=bx(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 Wd={};Ke(Wd,{bigint:()=>$x,boolean:()=>Sx,date:()=>Ex,number:()=>xx,string:()=>kx});function kx(e){return gl(Tn,e)}function xx(e){return Sl(In,e)}function Sx(e){return Pl(Cn,e)}function $x(e){return Nl(Pn,e)}function Ex(e){return Bl(Ar,e)}J(Po());var Tx=[".localhost",".local",".internal",".test",".localdomain"],Ax=new Set(["localhost","127.0.0.1","::1","[::1]","0.0.0.0","[::]"]);function Fg(e){let t=e.trim().toLowerCase().replace(/\.$/,"");if(!t)return!1;if(Ax.has(t)||Tx.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 Fg(i)}return!!(/^169\.254\./.test(t)||/^\[?fe80:/.test(t)||/^\[?f[cd][0-9a-f]{2}:/.test(t))}function Gg(e){let t;try{t=new URL(e)}catch{return"unparseable"}if(Fg(t.hostname))return"local";if(t.protocol!=="https:")return"insecure"}var jr=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 Ix=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.`})}),Cx=u.object({key:u.string().min(1),label:u.string().min(1),value:u.number().int().nonnegative()}),Px=u.object({id:u.string().min(1),label:u.string().default(""),entries:u.array(Cx).min(1)}),Ox=u.object({within:u.number().min(0).max(1),label:u.string().min(1)}),Nx=[{within:.02,label:"Hall of Fame"},{within:.05,label:"All-NBA"},{within:.1,label:"All-Star"},{within:.18,label:"Starter"},{within:.28,label:"Veteran"}],Zg=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(Px).min(1),tiers:u.array(Ox).default(Nx),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."})}),Rx=u.object({key:u.string().min(1),label:u.string().min(1),members:u.array(u.string().min(1)).min(2)}),jx=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(Rx).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.`})}),Dx=u.object({key:u.string().min(1),label:u.string().min(1),points:u.number().int().nonnegative().optional()}),Lx=u.object({archetype:u.literal("forecast"),number:u.number().int().positive().default(1),prompt:u.string().default(""),options:u.array(Dx).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.`})}),zx=u.discriminatedUnion("archetype",[Ix,Zg,jx,Lx]),Te=u.preprocess(Um,zx);function On(e){return`round-${e.number}`}var uN=u.object({game:u.string().min(1),round:Te,origin:jr.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:Te,origin:jr.optional()})).min(1)}).optional()}),dN=u.object({roundId:u.string(),version:u.number().int().nonnegative(),changed:u.boolean(),current:u.boolean()});var Zi="1.0",Hd=u.enum(["missing","proposed","confirmed","verified","approved"]),Jd={missing:0,proposed:1,confirmed:2,verified:3,approved:4},qd=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},Bg={L0:"Concept",L1:"Experience",L2:"Integration",L3:"Deployable",L4:"Production",L5:"Operating"},Mx=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:Hd.default("missing"),provenance:u.array(Mx).default([])},Ux=u.object({schema_version:u.string(),revision:u.number().int().nonnegative().default(0),conformance:yt.default("L0")}),Fx=u.object({repository:u.string().url(),branch:u.string().default("main")}),Gx=u.object({id:u.string().min(1),title:u.string().min(1),summary:u.string().optional(),source:Fx.optional(),owners:u.object({ip:u.string().optional(),delivery:u.string().optional(),platform:u.string().optional()}).prefault({}),...Ue}),Zx=u.enum(["bring_your_own","managed_runtime","manifest_driven","dedicated_engine"]),Bx=u.enum(["trivia","forecast","group","timed_round","synchronous_event","collection_ranking","hunt","push"]),vt=u.preprocess(e=>typeof e=="string"?We(e):e,Bx),Kx=u.object({route:Zx.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:Te.optional(),...Ue}),Vx=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}),Wx=u.object({spec_url:u.string().optional(),version:u.string().optional(),...Ue}),Hx=u.object({family:u.string().optional(),version:u.string().optional(),configuration_schema:u.string().optional(),...Ue}),Jx=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}),qx=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()}),Yx=u.object({issuer:u.string().url(),jwks_uri:u.string().url(),audience:u.string().optional()}),Xx=u.object({provider:u.enum(["identify","anonymous","custom","jwt"]).optional(),jwt:Yx.optional(),require_authenticated_writes:u.boolean().default(!0),age_gate:qx.prefault({}),consent:u.object({analytics_requires_consent:u.boolean().default(!0),provider:u.string().optional()}).prefault({}),...Ue}),Qx=u.object({type:u.enum(["monterosa","posthog","ga4","webhook"]),enabled:u.boolean().default(!0),config:u.record(u.string(),u.string()).default({})}),eS=u.object({destinations:u.array(Qx).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}),tS=u.object({hosting:u.string().optional(),space_spec:u.string().optional(),environments:u.array(u.enum(["local","playground","staging","production"])).default(["local"]),...Ue}),nS=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([])}),rS=u.object({support_tier:qd.optional(),runbook:u.string().optional(),promotion:nS.prefault({}),...Ue}),Mt=u.object({manifest:Ux,app:Gx,experience:Vx.prefault({}),studio_app:Wx.prefault({}),studio_surface:Hx.prefault({}),backend:Kx.prefault({}),interaction_cloud:Jx.prefault({}),identity:Xx.prefault({}),measurement:eS.prefault({}),deployment:tS.prefault({}),operations:rS.prefault({})});function Kg(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=Gg(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 Jd[o?.status??"missing"]>=Jd[r]},ye=e=>typeof e=="string"?e.trim().length>0:e!=null,oS=[{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")}],Vg=["L0","L1","L2","L3","L4","L5"];function Ce(e){let t=oS.map(l=>({id:l.id,level:l.level,requirement:l.requirement,passed:l.check(e)})),r="L0",o=!0;for(let l of Vg)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=Vg[i],s=a?t.filter(l=>l.level===a&&!l.passed):[],c=e.manifest.conformance;return{computed:r,computedName:Bg[r],claimed:c,overclaimed:!n||Nn[c]>Nn[r],results:t,blockers:n?s:t.filter(l=>l.level==="L0"&&!l.passed)}}function Wg(e,t){let o=Ce(e).results.filter(n=>!n.passed&&Nn[n.level]<=Nn[t]);return{ok:o.length===0,missing:o}}function ly(e){return typeof e>"u"||e===null}function iS(e){return typeof e=="object"&&e!==null}function aS(e){return Array.isArray(e)?e:ly(e)?[]:[e]}function sS(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 cS(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function lS(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var uS=ly,dS=iS,pS=aS,mS=cS,fS=lS,hS=sS,X={isNothing:uS,isObject:dS,toArray:pS,repeat:mS,isNegativeZero:fS,extend:hS};function uy(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+=`
|
|
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+=`
|
|
7330
7111
|
|
|
7331
|
-
`+e.mark.snippet),o+" "+r):o}function
|
|
7332
|
-
`+s;for(l=
|
|
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+`
|
|
7333
7114
|
`,s+=X.repeat("-",t.indent+d+3+l.pos)+`^
|
|
7334
|
-
`,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)l=
|
|
7335
|
-
`;return s.replace(/\n$/,"")}var
|
|
7336
|
-
\r`;function
|
|
7337
|
-
`: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
|
|
7338
|
-
`,t-1))}function
|
|
7339
|
-
`,i?1+c:c):n===
|
|
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+=`
|
|
7340
7121
|
`);break}for(o?Ft(p)?(l=!0,e.result+=X.repeat(`
|
|
7341
7122
|
`,i?1+c:c)):l?(l=!1,e.result+=X.repeat(`
|
|
7342
7123
|
`,c+1)):c===0?i&&(e.result+=" "):e.result+=X.repeat(`
|
|
7343
7124
|
`,c):e.result+=X.repeat(`
|
|
7344
|
-
`,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
|
|
7345
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new
|
|
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(`
|
|
7346
7127
|
`,o),n===-1?(a=e.slice(o),o=s):(a=e.slice(o,n+1),o=n+1),a.length&&a!==`
|
|
7347
|
-
`&&(i+=r),i+=a;return i}function
|
|
7348
|
-
`+X.repeat(" ",e.indent*t)}function
|
|
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]===`
|
|
7349
7130
|
`,n=o&&(e[e.length-2]===`
|
|
7350
7131
|
`||e===`
|
|
7351
7132
|
`),i=n?"+":o?"":"-";return r+i+`
|
|
7352
|
-
`}function
|
|
7353
|
-
`?e.slice(0,-1):e}function
|
|
7354
|
-
`);return l=l!==-1?l:e.length,r.lastIndex=l,
|
|
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]===`
|
|
7355
7136
|
`||e[0]===" ",i,a;a=r.exec(e);){var s=a[1],c=a[2];i=c[0]===" ",o+=s+(!n&&!i&&c!==""?`
|
|
7356
|
-
`:"")+
|
|
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+=`
|
|
7357
7138
|
`+e.slice(n,i),n=i+1),a=s;return c+=`
|
|
7358
7139
|
`,e.length-n>t&&a>n?c+=e.slice(n,a)+`
|
|
7359
|
-
`+e.slice(a+1):c+=e.slice(n),c.slice(1)}function
|
|
7360
|
-
`:""}var cE=sE,lE={dump:cE};function up(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 uE=re,dE=dy,pE=hy,mE=by,fE=wy,hE=ap,gE=My.load,yE=My.loadAll,vE=lE.dump,_E=pe,bE={binary:Ey,float:_y,map:fy,null:gy,pairs:Ay,set:Iy,timestamp:Sy,bool:yy,int:vy,merge:$y,omap:Ty,seq:my,str:py},wE=up("safeLoad","load"),kE=up("safeLoadAll","loadAll"),xE=up("safeDump","dump"),dp={Type:uE,Schema:dE,FAILSAFE_SCHEMA:pE,JSON_SCHEMA:mE,CORE_SCHEMA:fE,DEFAULT_SCHEMA:hE,load:gE,loadAll:yE,dump:vE,YAMLException:_E,types:bE,safeLoad:wE,safeLoadAll:kE,safeDump:xE};function _e(e){let t;try{t=dp.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:SE(r.error)};let o=Kg(r.data);return o.length?{ok:!1,issues:o}:{ok:!0,manifest:r.data}}function SE(e){return e.issues.map(t=>({path:t.path.length?t.path.join("."):"(root)",message:t.message}))}function qi(e){return dp.dump(e,{indent:2,lineWidth:100,noRefs:!0,sortKeys:!1})}function Yi(e,t){return Mt.parse({manifest:{schema_version:Zi,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"},Xi="/play";var Yy="2.0",Gt=u.object({server_time:u.string(),snapshot:u.string()}),$E=u.enum(["at_commit","at_settlement"]),EE=u.enum(["shared","per_player","feed"]),TE=u.object({kind:u.enum(["fixed","local_midnight","feed","continuous"]),timezone:u.string().optional()}),IN=Gt.extend({game:u.string(),api_version:u.literal(Yy).default(Yy),archetype:vt,marking:$E,challenge_source:EE,schedule:TE,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([])}),AE=u.object({accepting_plays:u.boolean(),results_available:u.boolean(),solution_revealed:u.boolean(),closed:u.boolean()}),CN=Gt.extend({id:u.string(),number:u.number().int().positive().optional(),origin:jr.optional(),version:u.number().int().nonnegative(),can:AE,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()}),PN=Gt.extend({token:u.string(),player_id:u.string(),kind:u.literal("anonymous")}),Qy=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())}),IE=u.enum(["accepted","rejected","duplicate","stale","busy"]),CE=u.object({key:u.string(),verdict:u.enum(["correct","close","wrong","higher","lower","unknown"]),label:u.string().optional()}),ON=Gt.extend({play_id:u.string(),outcome:IE,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(CE).default([]),round_state:u.lazy(()=>OE).optional()}),PE=u.object({title:u.string(),grid:u.array(u.string()).default([]),text:u.string().optional()}),OE=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:PE.optional()}),NN=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({})}),Xy=u.object({rank:u.number().int().positive(),player_id:u.string(),display_name:u.string().optional(),score:u.number()}),RN=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(Xy).default([]),total:u.number().int().nonnegative().default(0),me:Xy.optional()}),jN=u.object({error:u.object({code:u.string(),message:u.string(),retryable:u.boolean()})});var NE=u.enum(["draft","live","sleeping","throttled","expired","archived"]),RE=u.enum(["scheduled","open","locked","settled"]),ev=u.object({id:u.string(),label:u.string(),used:u.number(),limit:u.number(),unit:u.string()}),jE=u.object({date:u.string(),plays:u.number(),players:u.number()}),DE=u.object({id:u.string(),label:u.string(),state:RE,opensAt:u.string(),locksAt:u.string(),settledAt:u.string().nullable(),plays:u.number()}),LE=u.object({id:u.string(),name:u.string(),enabled:u.boolean(),consentRequired:u.boolean(),note:u.string()}),zE=u.object({number:u.number().int().positive(),title:u.string(),openedAt:u.string(),labels:u.array(u.string()).default([]),fromGame:u.boolean().default(!1)}),tv=u.object({at:u.string(),level:u.enum(["info","warn","error"]),roundId:u.string().nullable(),message:u.string()});var ME=u.enum(["absent","pending","ready","failed"]),UE=u.object({state:ME.default("absent"),url:u.string().nullable().default(null),regenerations:u.number().int().nonnegative().default(0),updatedAt:u.string().nullable().default(null)});var nv=u.object({section:u.string(),status:Hd}),FE=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(zE).default([]),archetype:vt,offersPrize:u.boolean().default(!1),state:NE,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:UE.prefault({}).optional(),playgroundUrl:u.string().nullable(),playerEndpoint:u.string().nullable(),manifestRevision:u.string(),conformance:yt,contentHash:u.string(),sections:u.array(nv),meters:u.array(ev),history:u.array(jE),rounds:u.array(DE),destinations:u.array(LE),logs:u.array(tv),updatedAt:u.string()}),GE=u.object({login:u.string(),linkedAt:u.string()}),ZE=u.object({enabled:u.boolean().default(!1),applicationId:u.string().nullable().default(null),writeKey:u.string().nullable().default(null)}),BE=u.object({id:u.string(),name:u.string(),tier:qd,ownerEmail:u.string(),liveGameAllowance:u.number(),github:GE.nullable().default(null),signal:ZE.prefault({}),meters:u.array(ev),games:u.array(FE)}),GN=BE.extend({gamesTotal:u.number().int().nonnegative()}),ZN=u.object({player:u.string().nullable(),control:u.string().nullable(),playground:u.string().nullable()}),BN=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(nv).default([]),containerLabel:u.string().min(1).optional()}),KN=u.object({uploadUrl:u.string(),publicUrl:u.string(),key:u.string(),expiresInSeconds:u.number().int().positive(),playerApiOrigin:u.string()}),VN=u.object({manifestRevision:u.string(),contentHash:u.string(),conformance:yt,offersPrize:u.boolean().default(!1),round:Te.optional(),wording:u.array(u.string()).optional()}),KE=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),since:u.string().nullable().default(null),level:tv.shape.level.nullable().default(null)}),WN=u.enum(["github_not_linked","live_allowance_reached","meter_breached","nothing_to_do","tier_required","game_archived","art_limit_reached","art_unavailable","round_source_unreadable"]),rv=u.enum(["workspace.created","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"]),HN=u.object({id:u.string(),at:u.string(),action:rv,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({})}),VE=u.object({limit:u.coerce.number().int().positive().max(1e3).default(100),action:rv.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 ov(e){return e.filter(t=>t.limit>0&&t.used>=t.limit)}function iv(e){return e.limit<=0?0:Math.min(1,e.used/e.limit)}var YN=3600*24;var WE=u.object({key:u.string().min(1),label:u.string().default(""),values:u.record(u.string(),u.number().int().nonnegative())}),aR=u.object({corpus:u.literal("1"),measures:u.array(WE).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 mp=[{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"}],fp=mp.map(e=>e.key),av=[{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"},...mp,{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}],hp=[{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}],gp=[{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}],yp=[{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"}]}]}],sv=[{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"}],vp={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 _p(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 Qi(e){return mp.filter(t=>_p(e,vp[t.key])).map(t=>t.key)}var cv=Fm,uv=e=>{let t=We(e);return Ka[t]??`gamestage-${t.replaceAll("_","-")}-element`},lv={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"}}},qE=new Set(["freetext","wysiwyg","image","file"]),YE=e=>({key:e.key,type:e.type,...qE.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 XE(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 bp(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 QE(e){let t=e.archetypes.map(We);for(let i of t)if(!cv[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??fp),n=av.filter(i=>!fp.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:cv[i],content_type:uv(i),derived_from:lv[i]?.derivedFrom??"data",duration:lv[i]?.duration??{mode:"instant"},label:i==="forecast"?"{{question.text}}":e.name,custom_fields:bp([...gp,...i==="push"?yp:[]]),...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":XE([...n,...hp,...gp,...sv,...yp]).map(YE),"project_settings.json":{sections:bp(n)},"event_settings.json":{sections:bp(hp)}}}function dv(e){return QE({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"}},eT=e=>new Promise(t=>setTimeout(t,e));function tT(e){let t=1e3*2**(e-1),r=t*.2*(Math.random()*2-1);return Math.round(t+r)}function Un(e){let t=e.fetch??globalThis.fetch,r=e.maxAttempts??4,o=e.baseUrl.replace(/\/+$/,"");async function n(a,s,c={}){let l=globalThis.location?.origin,d=new URL(`${o}${s}`,o.startsWith("/")?l:void 0);for(let[m,f]of Object.entries(c.query??{}))f!=null&&d.searchParams.set(m,String(f));let p;for(let m=1;m<=r;m++){let f=typeof e.token=="function"?await e.token():e.token,h=await t(d,{method:a,headers:{authorization:`Bearer ${f}`,...c.body===void 0?{}:{"content-type":"application/json"}},body:c.body===void 0?void 0:JSON.stringify(c.body)});if(h.ok)return await h.json();let b=await h.json().catch(()=>({}));if(p=new Mn(h.status,b.error?.code??"unknown",b.error?.message??h.statusText,b.error?.retryable??!1),!p.retryable||m===r)break;let S=Number(h.headers.get("retry-after"));await eT(Number.isFinite(S)&&S>0?S*1e3:tT(m))}throw p??new Mn(0,"unknown","Request failed.",!1)}let i=a=>({...a,containerLabel:a.containerLabel??"Round"});return{getWorkspace:async()=>{let a=await n("GET","/v1/workspace");return{...a,games:(a.games??[]).map(i)}},linkGitHub:a=>n("PUT","/v1/workspace/github",{body:{login:a}}),setPlan:a=>n("PUT","/v1/workspace/plan",{body:{tier:a}}),uploadTarget:(a,s)=>n("POST",`/v1/games/${encodeURIComponent(a)}/uploads`,{body:{filename:s}}),pruneBundle:(a,s)=>n("PUT",`/v1/games/${encodeURIComponent(a)}/bundle`,{body:{filenames:s}}),async getGame(a){try{return i(await n("GET",`/v1/games/${encodeURIComponent(a)}`))}catch(s){if(s instanceof Mn&&s.status===404)return;throw s}},setAwake:(a,s)=>n("PUT",`/v1/games/${encodeURIComponent(a)}/state`,{body:{awake:s}}),setDestination:(a,s,c)=>n("PUT",`/v1/games/${encodeURIComponent(a)}/destinations`,{body:{destination_id:s,enabled:c}}),registerGame:a=>n("POST","/v1/games",{body:a}),archiveGame:a=>n("POST",`/v1/games/${encodeURIComponent(a)}/archive`),requestArt:a=>n("POST",`/v1/games/${encodeURIComponent(a)}/art`),deploy:(a,s)=>n("POST",`/v1/games/${encodeURIComponent(a)}/deploy`,{body:s}),refreshRound:a=>n("POST",`/v1/games/${encodeURIComponent(a)}/round/refresh`),setSignal:a=>n("PUT","/v1/workspace/signal",{body:{enabled:a}}),async getEndpoints(a){try{return await n("GET",`/v1/games/${encodeURIComponent(a)}/endpoints`)}catch(s){if(s instanceof Mn&&s.status===404)return;throw s}},async getLogs(a,s){let{lines:c}=await n("GET",`/v1/games/${encodeURIComponent(a)}/logs`,{query:s});return c},async getAuditLog(a){let{records:s}=await n("GET","/v1/audit",{query:a});return s}}}var qR=600*1e3;function wp(e){return e.playerId?.trim()||e.sourceIp?.trim()||"unknown"}function kp(e,t){return`${e.length}:${e}${t}`}import{spawn as pv}from"node:child_process";import{chmod as nT,mkdir as rT,readFile as oT,rm as iT,writeFile as aT}from"node:fs/promises";import{homedir as sT,platform as Fn}from"node:os";import{join as mv}from"node:path";var xp="https://api.workos.com",Sp=process.env.GAMESTAGE_CLIENT_ID??"client_01KYVPJ1MA6GA9EXTJ7GJ81YW4";async function fv(){let e=await fetch(`${xp}/user_management/authorize/device`,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:Sp})});if(!e.ok)throw new Error(`Could not start sign-in (${e.status}). ${await e.text()}`);return await e.json()}async function hv(e){let t=await fetch(`${xp}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Sp,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 gv(e){let t=Fn()==="darwin"?"open":Fn()==="win32"?"cmd":"xdg-open",r=Fn()==="win32"?["/c","start","",e]:[e];try{pv(t,r,{stdio:"ignore",detached:!0}).unref()}catch{}}var Gn="gamestage-cli",yv=mv(sT(),".gamestage"),ea=mv(yv,"credentials.json");function $p(e,t){return new Promise(r=>{let o=pv("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 Ep(e){let t=JSON.stringify(e);return Fn()==="darwin"&&await $p(["add-generic-password","-a",Gn,"-s",Gn,"-U","-w",t])!==null?"keychain":(await rT(yv,{recursive:!0,mode:448}),await aT(ea,t,{mode:384}),await nT(ea,384),"file")}function cT(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 lT(e){if(!e.refreshToken)return null;let t=await fetch(`${xp}/user_management/authenticate`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({client_id:Sp,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 uT(){if(Fn()==="darwin"){let e=await $p(["find-generic-password","-a",Gn,"-s",Gn,"-w"]);if(e)try{return JSON.parse(e)}catch{}}try{return JSON.parse(await oT(ea,"utf8"))}catch{return null}}async function vv(){Fn()==="darwin"&&await $p(["delete-generic-password","-a",Gn,"-s",Gn]),await iT(ea,{force:!0})}async function Pe(){let e=await uT();if(!e)return null;if(!cT(e.accessToken)||!e.refreshToken)return e;let t=await lT(e);return t?(await Ep(t),t):null}import{randomUUID as dT}from"node:crypto";var pT=/-[0-9a-f]{4}$/;function ta(e){return`${e}-${dT().replace(/-/g,"").slice(0,4)}`}function _v(e){return pT.test(e)}var me=process.env.GAMESTAGE_CONTROL_URL??"https://api.gamestage.ai";function mT(e){try{let t=new URL(e).hostname.toLowerCase();return t==="localhost"||t.endsWith(".localhost")||t==="::1"||t.startsWith("127.")}catch{return!1}}function fT(e=me,t=process.env){if(t.GAMESTAGE_TEST_RUN==="1"&&!mT(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=me){let t=fT(e);t&&P(t)}async function Se(){let e=await Pe();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:me,token:async()=>(await Pe())?.accessToken??e.accessToken}),email:e.email??e.userId??"unknown"}}async function bv(e){try{return await e.getWorkspace(),{ok:!0}}catch(t){let r=t.status,o=t.code;return r===404||o==="not_found"?{ok:!1,reason:`Nothing is serving a control plane at ${me}.`,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?{ok:!1,reason:"The control plane refused this account's token.",detail:[`It is at ${me}.`,"A token from one environment is refused by another, so check which one you signed into."]}:{ok:!1,reason:`Could not reach the control plane at ${me}.`,detail:[String(t.message??t),"You are signed in. Deploying will fail until this answers."]}}}function Oe(e){let t=[],r=e.status,o=e.code;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: ${me}`),P(e instanceof Error?e.message:"The control plane call failed.",t)}var Qe="favicon.svg",Fr=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
|
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">
|
|
7361
7142
|
<rect width="32" height="32" rx="7" fill="#1b1c1f"/>
|
|
7362
7143
|
<path d="m12 8 12 8-12 8Z" fill="#fff"/>
|
|
7363
7144
|
</svg>
|
|
7364
|
-
`;function
|
|
7365
|
-
`,r=e.search(/<\/head>/i);return r===-1?t+e:e.slice(0,r)+t+e.slice(r)}var
|
|
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
|
|
7366
7147
|
and settlement. Picking it before any client code is what keeps the
|
|
7367
|
-
game trustworthy later.`)),v();for(let[f,h]of Object.entries(
|
|
7368
|
-
`))}catch{return}}async function
|
|
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>
|
|
7369
7150
|
// Written by \`gamestage deploy\`. Where this game's Engine answers.
|
|
7370
7151
|
window.GAMESTAGE_API = ${JSON.stringify(t)};
|
|
7371
7152
|
window.GAMESTAGE_GAME = ${JSON.stringify(r)};
|
|
7372
7153
|
// This page was deployed, so it may ask which Interaction Cloud project it is.
|
|
7373
7154
|
window.GAMESTAGE_IC_LOOKUP = true;
|
|
7374
7155
|
</script>
|
|
7375
|
-
`,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 Bn(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 oa(e){let t=new URL(e.publicUrl);return t.pathname=`/${e.key.split("/").map(encodeURIComponent).join("/")}`,t.search="",t.hash="",t.toString()}function IT(e){switch(ST(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 CT(e,t,r){let o=$T(r),n;try{n=Op(o)}catch{throw P(`Cannot read ${r}.`),new Error("unreachable")}let i=await e.uploadTarget(t,"index.html"),a=jv(Gr(n.toString("utf8")),`${i.playerApiOrigin}`,t);await Bn(i.uploadUrl,a,"text/html; charset=utf-8");let s=await e.uploadTarget(t,be);await Bn(s.uploadUrl,Ht,"text/javascript; charset=utf-8");let c=await e.uploadTarget(t,we);await Bn(c.uploadUrl,Jt,"text/javascript; charset=utf-8");let l=await e.uploadTarget(t,Qe);return await Bn(l.uploadUrl,Fr,"image/svg+xml"),L()||(v(),A(`Uploaded ${r} to ${oa(i)}`),A(`Wired it to ${i.playerApiOrigin} as "${t}"`),A(`Shipped @monterosa/gamestage beside it (${qt})`),A(`Shipped the player client beside it (${tr})`)),oa(i)}async function PT(e,t,r){let o;try{o=Cp(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=Op(n.path,"utf8"),a=Tp(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=Op(m.path),b=m.relativePath==="index.html"?jv(l?Gr(h.toString("utf8")):h.toString("utf8"),f.playerApiOrigin,t):h;await Bn(f.uploadUrl,b,IT(m.relativePath))}if(d){let m=await e.uploadTarget(t,Qe);await Bn(m.uploadUrl,Fr,"image/svg+xml")}if(await e.pruneBundle(t,[...o.map(m=>m.relativePath),...d?[Qe]:[]]),!L()&&p&&(v(),A(`Uploaded ${o.length} files from ${r}`),A(`Playground: ${oa(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 oa(p)}import{readFile as fI}from"node:fs/promises";var zv="player-conformance",jp="round-current",OT="sha256:emulator-conformance";function et(e){return structuredClone(e)}function tt(){return{server_time:"2026-08-01T09:00:00.000Z",snapshot:OT}}function NT(e){let t=e==="per-player-challenge";return{...tt(),id:jp,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 Dv(e,t){let r=t==="mistakes";return{...tt(),player_id:zv,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 RT(e){let t=NT(e),r=new Map([[t.id,t]]),o=new Map([[t.id,Dv(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",Dv("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:jp,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:zv,played:0,won:0,current_streak:0,max_streak:0,distribution:{},constraints:{}},plays:new Map,nextPlay:1}}function Lv(e,t){return{...tt(),play_id:`rejected-${e.nextPlay++}`,outcome:"rejected",reason:t,round_version:2,marked:!1,feedback:[]}}function Dp(e){let t=RT(e);return{async getRuntime(){return et(t.runtime)},async getCurrentRound(){return et(t.rounds.get(jp))},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 Lv(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 Lv(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 jT(){return e=>Dp(e)}var dD=jT();import{createServer as DT}from"node:http";function Zt(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^${t.replace(/\\\{[^}]+\\\}/g,"([^/]+)")}$`)}var LT=Zt(Q.runtime),zT=Zt(Q.currentRound),MT=Zt(Q.round),UT=Zt(Q.plays),FT=Zt(Q.roundState),GT=Zt(Q.profile),ZT=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 Kn(e,t,r,o){wt(e,t,{error:{code:r,message:o,retryable:!1}})}async function BT(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 KT(e,t,r){if(!e.url){Kn(t,400,"invalid_request","The request URL is missing.");return}let n=new URL(e.url,"http://localhost").pathname;if(e.method==="GET"){if(LT.test(n)){wt(t,200,await r.getRuntime());return}if(zT.test(n)){wt(t,200,await r.getCurrentRound());return}let i=MT.exec(n);if(i){let s=await r.getRound(decodeURIComponent(i[2]));if(!s){Kn(t,404,"round_not_found","The requested round was not found.");return}wt(t,200,s);return}let a=FT.exec(n);if(a){let s=decodeURIComponent(a[2]);try{wt(t,200,await r.getRoundState(s))}catch{Kn(t,404,"round_not_found","The requested round was not found.")}return}if(GT.test(n)){wt(t,200,await r.getProfile());return}if(ZT.test(n)){wt(t,200,await r.getLeaderboard());return}}if(e.method==="POST"){let i=UT.exec(n);if(i){try{let a=await BT(e);wt(t,200,await r.play(decodeURIComponent(i[2]),a))}catch(a){Kn(t,400,"invalid_request",a instanceof SyntaxError?"The request body must be valid JSON.":"The request body is invalid.")}return}}Kn(t,404,"not_found","The requested player API route was not found.")}function aa(e="default"){let t=Dp(e);return DT((r,o)=>{KT(r,o,t).catch(()=>{o.headersSent?o.destroy():Kn(o,500,"internal_error","The emulator could not answer the request.")})})}import{createServer as lI}from"node:http";import{createHmac as VT,randomBytes as WT,timingSafeEqual as HT}from"node:crypto";var Lp="anon:";function zp(e){return e.startsWith(Lp)}function Br(e){let t=(e??"").replace(/[^A-Za-z0-9_.-]/g,"").slice(0,64);return`${Lp}${t||"unknown"}`}var JT={async resolve(){}};async function Mv(e){if(!e.token)return e.sessionSecret?{playerId:YT(e.anonymousId,e.sessionSecret)??Br(void 0)}:{playerId:Br(e.anonymousId)};let t=e.resolver??JT,r=await t.resolve(e.token);return r?{playerId:r.playerId,alias:r.alias}:{playerId:Br(e.anonymousId),refused:t.lastRefusal?.()??"identity_unresolved"}}var Uv=".";function Fv(e){let t=`${Lp}${WT(16).toString("base64url")}`;return{playerId:t,token:qT(t,e)}}function Gv(e,t){return VT("sha256",t).update(e).digest("base64url")}function qT(e,t){return`${e}${Uv}${Gv(e,t)}`}function YT(e,t){if(!e)return;let r=e.lastIndexOf(Uv);if(r<=0)return;let o=e.slice(0,r);if(!zp(o))return;let n=Buffer.from(e.slice(r+1)),i=Buffer.from(Gv(o,t));if(n.length===i.length)return HT(n,i)?o:void 0}var Mp="round_not_found";function Zv(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(Mp);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(Mp);let b=l(h),{state:S}=await p(f,b.limits);return{...d(b,S),...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",Mp,0);let S=l(b);if(e.runtime.identity?.required&&zp(r))return m("rejected",e.identityRefusal??"identity_required",S.round.version);if(S.limits.playsPerSecond!==void 0){let it=i().slice(0,19),oe=await o.countPlay(t,f,it,r),Xn=Math.max(1,Math.ceil(S.limits.playsPerSecond/oe.buckets));if(oe.inBucket>Xn)return{...m("busy","capped",S.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:j,version:te}=await p(f,S.limits),G=n.admissible({accepting:S.round.can.accepting_plays,roundVersion:S.round.version,playedVersion:h.round_version,challengeInstanceId:S.round.challenge_instance_id??null,playedChallengeInstanceId:h.challenge_instance_id??null,state:j,secret:S.secret,limits:S.limits});if(!G.ok){let it=G.reason==="round_version"?"stale":"rejected";return m(it,G.reason,S.round.version)}let N=n.mark({payload:h.payload,secret:S.secret,state:j,limits:S.limits,markAtSettlement:e.runtime.marking==="at_settlement",now:i()});if(N.outcome!=="accepted")return m("rejected",N.reason??"rejected",S.round.version);let q={...c(),play_id:s(),outcome:N.outcome,round_version:S.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:j.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:S.secret,before:j,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:j.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",S.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",S.round.version))}}}function XT(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 QT(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 eA(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 Up={archetype:"hunt",admissible:XT,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return QT({...e,attempt:{picks:t}})},initialState:eA,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 Fp(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 tA(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 nA(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 rA(e){let{secret:t,state:r,limits:o}=e,n=Fp(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:tA(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 oA(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 Gp={archetype:"push",admissible:nA,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return rA({...e,attempt:{picks:t}})},initialState:oA,auditDetail({secret:e,before:t,decision:r}){let o=Fp(t),n=Fp(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 iA=(e,t)=>e.length===t.length&&new Set([...e,...t]).size===e.length,aA=(e,t)=>new Set(e.filter(r=>t.members.includes(r))).size;function sA(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 cA(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=>iA(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),S={...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:S};let O=s.reduce((N,q)=>Math.max(N,aA(t.picks,q)),0),j=!c&&t.picks.length>1&&O===t.picks.length-1,te=c?"correct":j?"close":"wrong";return{outcome:"accepted",marked:!0,feedback:t.picks.map(N=>({key:N,verdict:te,...c?{label:c.label}:{}})),next:S}}function lA(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 Bv={archetype:"group",admissible:sA,mark(e){let t=Array.isArray(e.payload.picks)?e.payload.picks:[];return cA({...e,attempt:{picks:t}})},initialState:lA,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 uA(e,t){return e.options.find(r=>r.key===t)?.points??e.pointsForCorrect}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.attempts_used>=e.limits.attemptsAllowed?{ok:!1,reason:"attempts_exhausted"}:{ok:!0}:{ok:!1,reason:"round_closed"}}function pA(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:mA(r,t.pick),next:Kv(r,c,t.pick)}}function mA(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 Kv(e,t,r){let o=r===e.result;return{...t,score:o?uA(e,r):0,finished:!0,outcome:o?"won":"lost"}}function fA(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"}:{...Kv(t,r,o[0]),server_time:e.now}}function hA(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 Vv={archetype:"forecast",admissible:dA,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 pA({...e,attempt:{pick:t}})},initialState:hA,settle:fA,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 Wv={hunt:Up,push:Gp,group:Bv,forecast:Vv},Bt=Object.keys(Wv);function gA(e){return Wv[We(e)]}function Hv(e){return gA(e.archetype??"hunt")}function Jv(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 qv(e){let t=Hv(e.round);if(t)return Zv({...e,rules:t})}import{createHash as yA}from"node:crypto";var Yv=128;function Xv(e){return yA("sha256").update(e,"utf8").digest()[0]&127}var Ne=(...e)=>e.join("#");function Qv(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(Xv(f))),b=(i.get(h)??0)+1;return i.set(h,b),{inBucket:b,buckets:Yv}},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 vA(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 _A(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 bA(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 wA(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 kA(e,t){switch(e.archetype){case"hunt":return vA(e,t);case"push":return _A(e,t);case"group":return bA(e,t);case"forecast":return wA(e,t)}}function sa(e){return e===null||typeof e!="object"?JSON.stringify(e):Array.isArray(e)?`[${e.map(sa).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)}:${sa(o)}`).join(",")}}`}function xA(e,t){let r=o=>{let{server_time:n,snapshot:i,...a}=o,{version:s,...c}=a;return c};return sa({round:r(e.round),secret:e.secret,limits:e.limits,archetype:e.archetype})===sa({round:r(t.round),secret:t.secret,limits:t.limits,archetype:t.archetype??"hunt"})}async function e_(e,t,r,o,n=!0,i,a){let s=i??On(r),c=await e.getRound(t,s),l=kA(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 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 Zp={"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",...Zp},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)},SA=Ze(404,"not_found","No such route on the player API."),t_=e=>({status:429,headers:{"content-type":"application/json","retry-after":String(e),...Zp},body:{error:{code:"rate_limited",message:"Too many requests for this game from one caller. Slow down.",retryable:!0}}});async function n_(e,t,r,o){let n=e.path.replace(/\/+$/,"")||e.path;if(e.method==="OPTIONS")return{status:204,headers:Zp,body:void 0};if(e.method==="GET"&&n===`${Xi}/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(kp(s,wp(e)));if(c&&!c.allowed)return t_(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(kp(d,wp(e)));if(m&&!m.allowed)return t_(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=Qy.safeParse(e.body);if(!b.success)return Ze(422,"invalid_request",b.error.issues.map(j=>`${j.path.join(".")||"body"}: ${j.message}`).join("; "));let S=await h.play(p,b.data),O=Ge(200,S);return S.outcome==="busy"&&S.retry_after_seconds&&(O.headers["retry-after"]=String(S.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 SA}import{createPublicKey as sI,generateKeyPairSync as cI}from"node:crypto";var Kt=new TextEncoder,Kr=new TextDecoder,ca=new TextDecoder("utf-8",{fatal:!0}),HD=2**32;function la(...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 ua=(e,t="algorithm.name")=>new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`);function $A(e,t){if(t&&!e.usages.includes(t))throw new TypeError(`CryptoKey does not support this operation, its usages must include ${t}.`)}function r_(e,t,r){let o=e.algorithm;if(o.name!==t.name)throw ua(t.name);if(t.hash&&o.hash?.name!==t.hash)throw ua(t.hash,"algorithm.hash");if(t.namedCurve&&o.namedCurve!==t.namedCurve)throw ua(t.namedCurve,"algorithm.namedCurve");if(t.length!==void 0&&o.length!==t.length)throw ua(t.length,"algorithm.length");$A(e,r)}function o_(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 i_=(e,...t)=>o_("Key must be ",e,...t),Bp=(e,t,...r)=>o_(`Key for the ${e} algorithm must be `,t,...r);var se=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)}},$e=class extends se{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}},Vr=class extends se{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}},da=class extends se{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"},ee=class extends se{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"};var W=class extends se{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"},St=class extends se{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"};var Wr=class extends se{static code="ERR_JWKS_INVALID";code="ERR_JWKS_INVALID"},Vn=class extends se{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)}},pa=class extends se{[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)}},ma=class extends se{static code="ERR_JWKS_TIMEOUT";code="ERR_JWKS_TIMEOUT";constructor(t="request timed out",r){super(t,r)}},fa=class extends se{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(t="signature verification failed",r){super(t,r)}};var Wn=e=>{if(e?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return e instanceof CryptoKey}catch{return!1}},Kp=e=>e?.[Symbol.toStringTag]==="KeyObject",Vp=e=>Wn(e)||Kp(e);function Wp(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 ha(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 Hr(e){if(Uint8Array.fromBase64)try{return Uint8Array.fromBase64(typeof e=="string"?e:Kr.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=Kr.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 ha(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}}function Hn(e){let t=e;return typeof t=="string"&&(t=Kt.encode(t)),Uint8Array.prototype.toBase64?t.toBase64({alphabet:"base64url",omitPadding:!0}):Wp(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var EA=e=>typeof e=="object"&&e!==null;function Re(e){if(!EA(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 ga(...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 Hp=e=>Re(e)&&typeof e.kty=="string",a_=e=>e.kty!=="oct"&&(e.kty==="AKP"&&typeof e.priv=="string"||typeof e.d=="string"),s_=e=>e.kty!=="oct"&&e.d===void 0&&e.priv===void 0,c_=e=>e.kty==="oct"&&typeof e.k=="string";function Jp(e,t){if(e)throw new TypeError(`${t} can only be called once`)}function qp(e,t,r){try{return Hr(e)}catch{throw new r(`Failed to base64url decode the ${t}`)}}function l_(e,t,r){try{return nt(e)}catch{throw new r(`The ${t} is not a valid base64url string`)}}function u_(e,t,r){let o;try{o=JSON.parse(ca.decode(Hr(e)))}catch{throw new t(r)}if(!Re(o))throw new t(r);return o}var AA='Invalid or unsupported JWK "alg" (Algorithm) Parameter value';function IA(e,t){if(!e.kty.includes(t.kty))throw new ee(AA);return e.subtleFor?.({kty:t.kty,crv:t.crv})??e.subtle}async function ya(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=IA(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 Jn=e=>e[Symbol.toStringTag],Yp=(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},CA=(e,t,r)=>{let{alg:o}=e;if(t instanceof Uint8Array)return{kind:p_,key:t};if(Hp(t)){if(c_(t)&&Yp(e,t,r))return{kind:va,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(!Vp(t))throw new TypeError(Bp(o,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"));if(t.type!=="secret")throw new TypeError(`${Jn(t)} instances for symmetric algorithms must be of type "secret"`);return Wn(t)?{kind:Xp,key:t}:{kind:Qp,key:t}},PA=(e,t,r)=>{let{alg:o}=e;if(Hp(t))switch(r){case"decrypt":case"sign":if(a_(t)&&Yp(e,t,r))return{kind:va,key:t};throw new TypeError("JSON Web Key for this operation must be a private JWK");case"encrypt":case"verify":if(s_(t)&&Yp(e,t,r))return{kind:va,key:t};throw new TypeError("JSON Web Key for this operation must be a public JWK")}if(!Vp(t))throw new TypeError(Bp(o,t,"CryptoKey","KeyObject","JSON Web Key"));if(t.type==="secret")throw new TypeError(`${Jn(t)} instances for asymmetric algorithms must not be of type "secret"`);if(t.type==="public")switch(r){case"sign":throw new TypeError(`${Jn(t)} instances for asymmetric algorithm signing must be of type "private"`);case"decrypt":throw new TypeError(`${Jn(t)} instances for asymmetric algorithm decryption must be of type "private"`)}if(t.type==="private")switch(r){case"verify":throw new TypeError(`${Jn(t)} instances for asymmetric algorithm verifying must be of type "public"`);case"encrypt":throw new TypeError(`${Jn(t)} instances for asymmetric algorithm encryption must be of type "public"`)}return Wn(t)?{kind:Xp,key:t}:{kind:Qp,key:t}},p_=Symbol(),Xp=Symbol(),Qp=Symbol(),va=Symbol();function OA(e,t,r){return e.symmetric?CA(e,t,r):PA(e,t,r)}var _a,NA={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function m_(e,t){return _a||=new WeakMap,_a.get(e)?.[t]}function f_(e,t,r){let o=_a.get(e);return o?o[t]=r:_a.set(e,{[t]:r}),r}var d_=async(e,t,r)=>{let o=m_(e,r.alg);if(o)return o;let n=await ya(r,{...t,alg:r.alg});return f_(e,r.alg,n)},RA=(e,t)=>{let r=m_(e,t.alg);if(r)return r;let o=e.type==="public",n=o?t.usages.public:t.usages.private,{asymmetricKeyType:i}=e,a=NA[e.asymmetricKeyDetails?.namedCurve],s=t.subtleFor?.({crv:a,asymmetricKeyType:i})??t.subtle;return f_(e,t.alg,e.toCryptoKey(s,o,n))};async function ba(e,t,r){let o=OA(e,t,r);switch(o.kind){case p_:case Xp:return o.key;case va:{if(o.key.k)return Hr(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 d_(o.key,o.key,e)}case Qp:{let n=o.key;return n.type==="secret"?n.export():"toCryptoKey"in n&&typeof n.toCryptoKey=="function"?RA(n,e):d_(n,n.export({format:"jwk"}),e)}}}function Jr(e){let t={__proto__:null};for(let r of Object.keys(e))t[r]={...e[r],alg:r};return t}var jA={public:["encrypt","wrapKey"],private:["decrypt","unwrapKey"]},DA={public:[],private:["deriveBits"]},xa={public:[],private:[]};function wa(e){return{kty:["RSA"],subtle:{name:"RSA-OAEP",hash:`SHA-${e}`},usages:jA,minModulusLength:2048,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function ka(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:DA,kwBits:e,keyOps:{decrypt:"deriveBits"}}}function em(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-KW",length:e},usages:xa,keyOps:{encrypt:"wrapKey",decrypt:"unwrapKey"}}}function tm(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:xa,gcmkw:`A${e}GCM`,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}}}function nm(e,t){return{kty:["oct"],symmetric:!0,subtle:{name:"PBKDF2"},usages:xa,pbes2Hash:`SHA-${e}`,kwBits:t,keyOps:{encrypt:"deriveBits",decrypt:"deriveBits"}}}var LA=Jr({dir:{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM"},usages:xa,keyOps:{encrypt:"encrypt",decrypt:"decrypt"}},"RSA-OAEP":wa(1),"RSA-OAEP-256":wa(256),"RSA-OAEP-384":wa(384),"RSA-OAEP-512":wa(512),"ECDH-ES":ka(),"ECDH-ES+A128KW":ka(128),"ECDH-ES+A192KW":ka(192),"ECDH-ES+A256KW":ka(256),A128KW:em(128),A192KW:em(192),A256KW:em(256),A128GCMKW:tm(128),A192GCMKW:tm(192),A256GCMKW:tm(256),"PBES2-HS256+A128KW":nm(256,128),"PBES2-HS384+A192KW":nm(384,192),"PBES2-HS512+A256KW":nm(512,256)}),h_={public:[],private:[]},g_={encrypt:"encrypt",decrypt:"decrypt"};function rm(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-GCM",length:e},usages:h_,keyOps:g_,cekBits:e,ivBits:96,cbc:!1}}function om(e){return{kty:["oct"],symmetric:!0,subtle:{name:"AES-CBC",length:e},usages:h_,keyOps:g_,cekBits:e,ivBits:128,cbc:!0}}var vL=Jr({A128GCM:rm(128),A192GCM:rm(192),A256GCM:rm(256),"A128CBC-HS256":om(256),"A192CBC-HS384":om(384),"A256CBC-HS512":om(512)});function y_(e){return LA[e]}function zA(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 MA(e,t,r){r_(t,e.subtle,r),e.minModulusLength&&zA(e.alg,t)}async function v_(e,t,r){return t instanceof Uint8Array?crypto.subtle.importKey("raw",t,e.subtle,!1,[r]):(MA(e,t,r),t)}async function __(e,t,r){let o=await v_(e,t,"sign"),n=await crypto.subtle.sign(e.operation,o,r);return new Uint8Array(n)}async function b_(e,t,r,o){let n=await v_(e,t,"verify");try{return await crypto.subtle.verify(e.operation,n,r,o)}catch{return!1}}var Sa=new Map([["b64",!0]]);function w_(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 k_(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 $a(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 im(e){let t={name:"HMAC",hash:`SHA-${e}`};return{kty:["oct"],symmetric:!0,subtle:t,operation:t,usages:qr}}function qn(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 am(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},operation:{name:"ECDSA",hash:`SHA-${t}`},usages:qr}}function x_(){let e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,operation:e,usages:qr}}function sm(e){let t={name:e};return{kty:["AKP"],subtle:t,operation:t,usages:qr}}var S_=Jr({HS256:im(256),HS384:im(384),HS512:im(512),RS256:qn("RSASSA-PKCS1-v1_5",256),RS384:qn("RSASSA-PKCS1-v1_5",384),RS512:qn("RSASSA-PKCS1-v1_5",512),PS256:qn("RSA-PSS",256,32),PS384:qn("RSA-PSS",384,48),PS512:qn("RSA-PSS",512,64),ES256:am("P-256",256),ES384:am("P-384",384),ES512:am("P-521",512),EdDSA:x_(),Ed25519:x_(),"ML-DSA-44":sm("ML-DSA-44"),"ML-DSA-65":sm("ML-DSA-65"),"ML-DSA-87":sm("ML-DSA-87")});function Ea(e){let t=S_[e];if(!t)throw new ee(`alg ${e} is not supported either by JOSE or your javascript runtime`);return t}function Ta(e){return S_[e]}function $_(e){return{algorithms:e&&w_("algorithms",e.algorithms),crit:e?.crit}}async function UA(e,t,r){let o={};e.protected&&(o=u_(e.protected,W,"JWS Protected Header is invalid"));let n;if(e.header!==void 0){if(!ga(o,e.header))throw new W("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");n={...o,...e.header}}else n=o;let i=$a(W,Sa,t.crit,o,n),a=!0;if(i.has("b64")&&(a=o.b64,typeof a!="boolean"))throw new W('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new W('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(t.algorithms&&!t.algorithms.has(s))throw new da('"alg" (Algorithm) Header Parameter value not allowed');if(a){if(typeof e.payload!="string")throw new W("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new W("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=Ea(s),d=la(e.protected!==void 0?nt(e.protected):new Uint8Array,nt("."),typeof e.payload=="string"?a?t.b64p??=l_(e.payload,"payload",W):Kt.encode(e.payload):e.payload),p=qp(e.signature,"signature",W),m=await ba(l,r,"verify");if(!await b_(l,m,p,d))throw new fa;let h;return a?h=qp(e.payload,"payload",W):typeof e.payload=="string"?h=Kt.encode(e.payload):h=e.payload,{payload:h,parsedProt:o,b64:a,key:m,resolvedKey:c}}async function E_(e,t,r){if(e instanceof Uint8Array&&(e=Kr.decode(e)),typeof e!="string")throw new W("Compact JWS must be a string or Uint8Array");let{0:o,1:n,2:i,length:a}=e.split(".");if(a!==3)throw new W("Invalid Compact JWS");return UA({payload:n,protected:o,signature:i},t,r)}var $t=e=>Math.floor(e.getTime()/1e3),A_=60,I_=A_*60,cm=I_*24,FA=cm*7,GA=cm*365.25,ZA=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;function Yr(e){let t=ZA.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*A_);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(r*I_);break;case"day":case"days":case"d":n=Math.round(r*cm);break;case"week":case"weeks":case"w":n=Math.round(r*FA);break;default:n=Math.round(r*GA);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 T_=e=>e.includes("/")?e.toLowerCase():`application/${e.toLowerCase()}`,BA=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1;function C_(e,t,r={}){let o;try{o=JSON.parse(ca.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"||T_(e.typ)!==T_(n)))throw new $e('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 $e(`missing required "${h}" claim`,o,h,"missing");if(a!==void 0&&!(Array.isArray(a)?a:[a]).includes(o.iss))throw new $e('unexpected "iss" claim value',o,"iss","check_failed");if(s!==void 0&&o.sub!==s)throw new $e('unexpected "sub" claim value',o,"sub","check_failed");if(c!==void 0&&!BA(o.aud,typeof c=="string"?[c]:c))throw new $e('unexpected "aud" claim value',o,"aud","check_failed");let p;switch(typeof r.clockTolerance){case"string":p=Yr(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 $e('"iat" claim must be a number',o,"iat","invalid");if(o.nbf!==void 0){if(typeof o.nbf!="number")throw new $e('"nbf" claim must be a number',o,"nbf","invalid");if(o.nbf>f+p)throw new $e('"nbf" claim timestamp check failed',o,"nbf","check_failed")}if(o.exp!==void 0){if(typeof o.exp!="number")throw new $e('"exp" claim must be a number',o,"exp","invalid");if(o.exp<=f-p)throw new Vr('"exp" claim timestamp check failed',o,"exp","check_failed")}if(l!==void 0){let h=f-o.iat,b=typeof l=="number"?l:Yr(l);if(h-p>b)throw new Vr('"iat" claim timestamp check failed (too far in the past)',o,"iat","check_failed");if(h<0-p)throw new $e('"iat" claim timestamp check failed (it should be in the past)',o,"iat","check_failed")}return o}var Aa=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)+Yr(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)+Yr(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)+Yr(t)):this.#e.iat=rt("setIssuedAt",t)}};async function lm(e,t,r){let o=await E_(e,$_(r),t);if(!o.b64)throw new St("JWTs MUST NOT use unencoded payload");let i={payload:C_(o.parsedProt,o.payload,r),protectedHeader:o.parsedProt};return typeof t=="function"?{...i,key:o.key}:i}function Ia(e){return e?.b64===!1&&Array.isArray(e.crit)&&e.crit.includes("b64")}async function P_(e,t){let{protectedHeader:r,unprotectedHeader:o}=e;if(!ga(r,o))throw new W("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...r,...o};k_(W,r);let i=$a(W,Sa,e.crit,r,n),a=!0;if(i.has("b64")&&(a=r.b64,typeof a!="boolean"))throw new W('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:s}=n;if(typeof s!="string"||!s)throw new W('JWS "alg" (Algorithm) Header Parameter missing or invalid');let c=Ea(s),l,d;if(a){let O=e.encoded??={};O.b64??=Hn(e.payload),O.raw??=nt(O.b64),l=O.b64,d=O.raw}else d=e.payload,l="";let p,m;r?(p=Hn(JSON.stringify(r)),m=nt(p)):(p="",m=new Uint8Array);let f=la(m,nt("."),d),h=await ba(c,t,"sign"),b=await __(c,h,f),S={signature:Hn(b),payload:l};return r&&(S.protected=p),S}var Ca=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 Jp(this.#t,"setProtectedHeader"),this.#t=t,this}setUnprotectedHeader(t){return Jp(this.#n,"setUnprotectedHeader"),this.#n=t,this}async sign(t,r){if(!this.#t&&!this.#n)throw new W("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");let o=await P_({payload:this.#e,protectedHeader:this.#t,unprotectedHeader:this.#n,crit:r?.crit},t);return this.#n&&(o.header=this.#n),o}};var Pa=class{#e;#t;constructor(t){this.#e=new Ca(t)}setProtectedHeader(t){return this.#e.setProtectedHeader(t),this.#t=t,this}async sign(t,r){if(Ia(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 Xr=class{#e;#t;constructor(t={}){this.#t=new Aa(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 Pa(this.#t.data());if(o.setProtectedHeader(this.#e),Ia(this.#e))throw new St("JWTs MUST NOT use unencoded payload");return o.sign(t,r)}};function O_(){return new ee('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}function N_(e){if(typeof e!="string")throw O_();let t=Ta(e)??y_(e);if(!t)throw O_();return t}var um=(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},KA=e=>({data:e,pos:0}),dm=e=>{let t=e.data[e.pos++];if(t===void 0)throw new Error("Unexpected end of ASN.1 input");return t},Qr=e=>{let t=dm(e);if(t&128){let r=t&127,o=0;for(let n=0;n<r;n++)o=o<<8|dm(e);return o}return t};var eo=(e,t,r)=>{if(dm(e)!==t)throw new Error(r)},R_=(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},VA=e=>{eo(e,6,"Expected algorithm OID");let t=Qr(e);return R_(e,t)};function WA(e){eo(e,48,"Invalid PKCS#8 structure"),Qr(e),eo(e,2,"Expected version field");let t=Qr(e);e.pos+=t,eo(e,48,"Expected algorithm identifier");let r=Qr(e);return{algIdStart:e.pos,algIdLength:r}}var HA=e=>{let t=VA(e);if(um(t,[43,101,110]))return"X25519";if(!um(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");eo(e,6,"Expected curve OID");let r=Qr(e),o=R_(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(um(o,i))return n;throw new Error("Unsupported named curve")},JA=async(e,t,r,o)=>{let n=N_(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)},qA=(e,t)=>ha(e.replace(t,"")),j_=(e,t,r)=>{let o=qA(e,/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g),n=r;return t?.startsWith?.("ECDH-ES")&&(n||={},n.getNamedCurve=i=>{let a=KA(i);return WA(a),HA(a)}),JA("pkcs8",o,t,n)};function YA(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}async function XA(e){if(Kp(e))if(e.type==="secret")e=e.export();else return e.export({format:"jwk"});if(e instanceof Uint8Array)return{kty:"oct",k:Hn(e)};if(!Wn(e))throw new TypeError(i_(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}=YA(await crypto.subtle.exportKey("jwk",e));return i.kty==="AKP"&&(i.alg=o),i}async function pm(e){return XA(e)}function QA(e){let t=typeof e=="string"?Ta(e):void 0;if(!t||t.symmetric)throw new ee('Unsupported "alg" value for a JSON Web Key Set');return t}function eI(e){if(!e||typeof e!="object")return!1;let{keys:t}=e;return Array.isArray(t)&&t.every(tI)}function tI(e){return Re(e)}var mm=class{#e;#t=new WeakMap;constructor(t){if(!eI(t))throw new Wr("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=QA(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 Vn;if(c!==1){let l=new pa,d=this.#t;throw l[Symbol.asyncIterator]=async function*(){for(let p of a)try{yield await D_(d,p,i)}catch{}},l}return D_(this.#t,s,i)}};async function D_(e,t,r){let o=e.get(t)||e.set(t,{}).get(t);if(o[r.alg]===void 0){let n=await ya(r,{...t,alg:r.alg,ext:!0});if(n.type!=="public")throw new Wr("JSON Web Key Set members must be public keys");o[r.alg]=n}return o[r.alg]}function fm(e){let t=new mm(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 nI(){return typeof WebSocketPair<"u"||typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"||typeof EdgeRuntime<"u"&&EdgeRuntime==="vercel"}var hm;(typeof navigator>"u"||!navigator.userAgent?.startsWith?.("Mozilla/5.0 "))&&(hm="jose/v6.2.5");var L_=Symbol();async function rI(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 ma:i});if(n.status!==200)throw new se("Expected 200 OK from the JSON Web Key Set HTTP response");try{return await n.json()}catch{throw new se("Failed to parse the JSON Web Key Set HTTP response as JSON")}}var Oa=Symbol();function oI(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 gm=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),hm&&!this.#o.has("User-Agent")&&this.#o.set("User-Agent",hm),this.#o.has("accept")||(this.#o.set("accept","application/json"),this.#o.append("accept","application/jwk-set+json")),this.#l=r?.[L_],r?.[Oa]!==void 0&&(this.#s=r?.[Oa],oI(r?.[Oa],this.#c)&&(this.#i=this.#s.uat,this.#a=fm(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 Vn&&this.coolingDown()===!1)return await this.reload(),this.#a(t,r);throw o}}async reload(){this.#r&&nI()&&(this.#r=void 0),this.#r||=rI(this.#e.href,this.#o,AbortSignal.timeout(this.#t),this.#l).then(t=>{this.#a=fm(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 ym(e,t){let r=new gm(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 vm(e,t,r){if(typeof e!="string"||e.indexOf("-----BEGIN PRIVATE KEY-----")!==0)throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return j_(e,t,r)}var z_=new Map;function iI(e){let t=z_.get(e);return t||(t=ym(new URL(e)),z_.set(e,t)),t}var aI="id:";function M_(e){let t;return{lastRefusal:()=>t,async resolve(r){t=void 0;try{let{payload:o}=await lm(r,iI(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:`${aI}${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 Na="/.well-known/jwks.json";async function _m(e){let t=e.replace(/\/+$/,""),r=t,o=`${t}${Na}`,{privateKey:n,publicKey:i}=cI("rsa",{modulusLength:2048,privateKeyEncoding:{type:"pkcs8",format:"pem"},publicKeyEncoding:{type:"spki",format:"pem"}}),a=await vm(n,"RS256"),s=await pm(sI(i)),c="gamestage-dev",l={keys:[{...s,kid:c,alg:"RS256",use:"sig"}]};return{issuer:r,jwksUri:o,jwks:l,resolver:M_({issuer:r,jwksUri:o}),async mint(d,p={}){let m=Math.floor(Date.now()/1e3);return new Xr({name:d}).setProtectedHeader({alg:"RS256",kid:c}).setIssuer(r).setSubject(d).setIssuedAt(m).setExpirationTime(m+(p.expiresInSeconds??3600)).sign(a)}}}import{randomBytes as uI}from"node:crypto";var dI="x-gamestage-player";async function pI(e){let t=Qv({tenant:e.game,rounds:[],currentRoundId:""});await e_(t,e.game,e.round,"local",!0,void 0,{source:"manifest"});let r=Jv({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 qv({tenant:e.game,playerId:n.playerId??Br(void 0),identityRefusal:n.identityRefusal,runtime:r,store:t,round:{archetype:e.round.archetype}})}}}async function mI(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 Ra(e){let t=await pI(e),r=uI(32).toString("base64"),o={issue:()=>Fv(r)},n=e.devIdentity,i=lI((a,s)=>{(async()=>{let c=new URL(a.url??"/","http://localhost");if(n&&c.pathname===Na){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[dI],d=a.headers.authorization,p=await n_({method:a.method??"GET",path:c.pathname,body:await mI(a),...(({playerId:m,refused:f})=>({playerId:m,identityRefusal:f}))(await Mv({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 hI(e){let t;try{t=await fI(e,"utf8")}catch{return}let r=_e(t);if(!r.ok){P(`${e} is not a valid App Manifest.`,r.issues.map(o=>`${$.cyan(o.path)} ${o.message}`));return}return r.manifest}async function gI(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:aa(r),what:"fixture",game:"conformance-game"};let o=await hI(e.manifest??"gamestage.yaml");if(!o)return{server:aa(r),what:"fixture",game:"conformance-game"};let n=o.backend.round;if(!n)return{server:aa(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 Ra({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 U_(e){let t=await gI(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)),L())M({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} (${$.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 ${$.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 Em}from"node:fs/promises";import{dirname as H_,resolve as Tm}from"node:path";import{spawn as yI}from"node:child_process";import{createHash as vI,randomBytes as G_}from"node:crypto";import{constants as _I}from"node:fs";import{access as bI,mkdtemp as wI,rm as Z_}from"node:fs/promises";import{request as kI}from"node:http";import{homedir as ja,tmpdir as xI}from"node:os";import{join as to}from"node:path";var SI="258EAFA5-E914-47DA-95CA-C5AB0DC85B11";function bm(e,t={}){let r=Buffer.isBuffer(e)?e:Buffer.from(e),o=t.maskingKey??G_(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 km=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}},xm=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 km;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(bm(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(bm(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(bm(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()}},Sm=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(`
|
|
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(`
|
|
7376
7157
|
`)[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(`(() => {
|
|
7377
7158
|
const element = document.querySelectorAll(${JSON.stringify(t)})[${r}];
|
|
7378
7159
|
if (!element) return false;
|
|
@@ -7390,22 +7171,24 @@ window.GAMESTAGE_IC_LOOKUP = true;
|
|
|
7390
7171
|
if ("disabled" in element && element.disabled) return { ok: false, error: "Element is disabled." };
|
|
7391
7172
|
element.click();
|
|
7392
7173
|
return { ok: true };
|
|
7393
|
-
})()`);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
|
|
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=>`
|
|
7394
7175
|
`.repeat(n.split(`
|
|
7395
7176
|
`).length-1)).replace(/<style[\s\S]*?<\/style>/gi,n=>`
|
|
7396
7177
|
`.repeat(n.split(`
|
|
7397
7178
|
`).length-1)).split(`
|
|
7398
|
-
`).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(!
|
|
7399
|
-
`).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(!
|
|
7400
|
-
`).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
|
|
7401
|
-
`),h=f?
|
|
7402
|
-
`),b=
|
|
7403
|
-
`);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 YI(e,t){if(!(await Cm(e)).isFile())try{let o=JSON.parse(await za(Pm(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=eb(n[1]);if(a)return a}let i=/<title[^>]*>([^<]+)<\/title>/i.exec(o.text);if(i){let a=eb(i[1].split(/\s+[|\u2013\u2014-]\s+/)[0]);if(a)return a}}return null}function eb(e){let t=e.replace(/\s+/g," ").trim();return/[a-z0-9]/i.test(t)?t.slice(0,60):null}var XI=[{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"}}],QI=[{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}],e0=[{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 t0(e){let t=e.map(s=>s.text).join(`
|
|
7404
|
-
`),r=
|
|
7405
|
-
`),a=QI.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=Da(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 YI(e,t)}}var c0=e=>s0(e).replace(/\.[^.]+$/,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"inspected-game",l0=e=>e.split("-").filter(Boolean).map(t=>t[0].toUpperCase()+t.slice(1)).join(" ");function u0(e,t){let r=c0(e.name??e.target),o=t&&_v(t)?t:ta(r),n=e.name??l0(r),i=Yi(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 d0(e,t){let r=await Pe();if(!r)return!1;Zn();let o=e.backend.archetype;return o?(await Un({baseUrl:me,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:${a0("sha256").update(t).digest("hex")}`,conformance:Ce(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 p0(e){try{let t=_e(await r0(e,"utf8"));return t.ok?t.manifest.app.id:void 0}catch{return}}async function m0(e){try{return await o0(e),!0}catch{return!1}}async function nb(e,t){let r;try{r=await tb(e)}catch(l){return P(l instanceof Error?l.message:"Inspection failed")}let o=u0(r,await p0(typeof t.write=="string"?t.write:"gamestage.yaml")),n=Ce(o),i=qi(o),a=!1,s;try{a=await d0(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 m0(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.","",`${$.cyan(`gamestage manifest validate ${c}`)} check what you have`,`${$.cyan("gamestage inspect . --force")} replace it anyway`]);await i0(c,i,"utf8")}if(L()){M({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 ${$.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} ${$.dim(`(${r.archetype.confidence} confidence)`)}`),r.keep.length){I("Keep as yours");for(let l of r.keep)A($.green(l.title)),v(` ${$.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($.yellow(l.title)),v(` ${$.dim(l.detail)}`);for(let d of l.evidence.slice(0,2)){let p=d.line?`${d.file}:${d.line}`:d.file;v(` ${$.dim("\u2192")} ${$.cyan(p)}${d.excerpt?$.dim(" "+d.excerpt):""}`)}l.remedy&&(v(` ${$.dim("delete")} ${l.remedy.delete}`),v(` ${$.dim("call")} ${$.cyan(l.remedy.call)}`),l.remedy.render&&v(` ${$.dim("render")} ${l.remedy.render}`),l.remedy.move&&v(` ${$.dim("move")} ${l.remedy.move}`),v(` ${$.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(` ${$.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($.dim(" To reach the next level:"));for(let l of n.blockers)v(` ${$.dim("\xB7")} ${l.requirement}`)}v(),c?v(` Written to ${$.cyan(c)}`):v($.dim(" Re-run with --write to save this manifest.")),v(a?" Registered in Studio as a draft.":s?` Not registered in Studio: ${s} (${me})`:" No account found, so registration was skipped."),v()}var rb="https://github.com",f0="https://api.github.com",Ma=process.env.GAMESTAGE_GITHUB_CLIENT_ID??"Ov23livKf8DOgOm2a383";async function ob(){let e=await fetch(`${rb}/login/device/code`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Ma,scope:""})});if(!e.ok)throw new Error(`GitHub refused the device request (${e.status}).`);return await e.json()}async function ib(e){let r=await(await fetch(`${rb}/login/oauth/access_token`,{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify({client_id:Ma,device_code:e,grant_type:"urn:ietf:params:oauth:grant-type:device_code"})})).json();if(r.access_token)return{status:"linked",login:await h0(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 h0(e){let t=await fetch(`${f0}/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 g0=e=>new Promise(t=>setTimeout(t,e));async function ab(){let{client:e}=await Se();try{let t=await ob();L()?M({ok:!0,status:"awaiting_authorisation",userCode:t.user_code,verificationUri:t.verification_uri,clientId:Ma}):(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 g0(o*1e3);let n=await ib(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(L())return M({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){Oe(t)}}var y0=e=>new Promise(t=>setTimeout(t,e));async function sb(){let e=await Pe();if(e){if(L()){M({ok:!0,status:"already_signed_in",email:e.email});return}I("Already signed in"),T("Account",e.email??e.userId??"unknown"),v(),A("Run `gamestage logout` first to sign in as someone else."),v();return}let t;try{t=await fv()}catch(c){P("Could not reach the sign-in service.",[String(c)])}L()?M({ok:!0,status:"awaiting_approval",user_code:t.user_code,verification_uri:t.verification_uri,verification_uri_complete:t.verification_uri_complete,expires_in:t.expires_in}):(I("Sign in to Gamestage"),v(" This also creates your account if you do not have one. No approval,"),v(" no waitlist. Google or email."),v(),T("Open",t.verification_uri),T("Code",t.user_code),v(),v(" Waiting for you to confirm in the browser..."),gv(t.verification_uri_complete));let r=Date.now()+t.expires_in*1e3,o=t.interval*1e3,n=null;for(;Date.now()<r;){await y0(o);let c=await hv(t.device_code);if(c.status==="ok"){n=c.session;break}if(c.status==="slow_down"){o+=5e3;continue}c.status!=="pending"&&(c.status==="expired"&&P("That code expired.",["Run `gamestage login` again."]),P("Sign-in was refused.",[c.reason]))}n||P("Timed out waiting for approval.",["Run `gamestage login` again."]);let i=await Ep(n),{client:a}=await Se(),s=await bv(a);if(L()){M({ok:s.ok,status:s.ok?"signed_in":"signed_in_control_plane_unreachable",email:n.email,stored_in:i,control_plane:me,...s.ok?{}:{error:s.reason,detail:s.detail}}),s.ok||process.exit(1);return}v(),I("Signed in"),T("Account",n.email??n.userId??"unknown"),T("Token stored in",i==="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."),v(),s.ok||P(s.reason,s.detail)}async function cb(){let e=await Pe();if(await vv(),L()){M({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 lb(){let e=await Pe();if(L()){M(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()}import{readdir as v0,readFile as _0,stat as b0}from"node:fs/promises";async function w0(e){let t=[];try{t=await v0(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 b0(`${e}/${a}`),n=!0;try{let s=_e(await _0(`${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 ub(){let e=process.cwd(),t=await w0(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(L()){M({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:Ba(),authentication:`Not required for inspect, create, validate or local development. First needed at \`${je("deploy")}\`.`});return}if(I("Gamestage"),v($.dim(" Take an agent-built game to production, on the platform behind the")),v($.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(` ${$.cyan(o[r].command)}`),v(` ${$.dim(o[r].why)}`),I("Good to know"),v($.dim(` Nothing needs an account yet. Inspect, create, validate and local
|
|
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
|
|
7406
7188
|
development all run anonymously. Sign-in arrives when you deploy,
|
|
7407
|
-
which is what puts the game at a URL a fan can open.`)),v()}var
|
|
7408
|
-
Inspect, create
|
|
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.
|
|
7190
|
+
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)}
|
|
7409
7192
|
`),process.exit(1)});
|
|
7410
7193
|
/*! Bundled license information:
|
|
7411
7194
|
|